# Running Julia.exe from Mintty terminal

**URL:** <https://discourse.julialang.org/t/running-julia-exe-from-mintty-terminal/3638>\
**Category:** General Usage\
**Created:** [May 10, 2017, 10:14pm UTC](https://discourse.julialang.org/t/running-julia-exe-from-mintty-terminal/3638 "2017-05-10T22:14:26Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![musm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/musm/32/3675_2.png) [@musm](https://discourse.julialang.org/u/musm)\
**Post date:** [May 10, 2017, 10:14pm UTC](https://discourse.julialang.org/t/running-julia-exe-from-mintty-terminal/3638/1 "2017-05-10T22:14:26Z")

</div>

Has anyone tried or got this to work

currently it just hangs the terminal

```julia
mus@mus-laptop /mnt/c/Users/Mus
$ julia-debug.exe --compile=no
code missing for Base.Multimedia.Type(Type{Base.Multimedia.TextDisplay}, Base.IOStream) : sysimg may not have been built with --compile=all
code missing for Base.haskey(typeof(Base.haskey), Base.ObjectIdDict, Symbol) : sysimg may not have been built with --compile=all

```

---

<div class="post-metadata">

**Author:** ![tkelman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkelman/32/692_2.png) [@tkelman](https://discourse.julialang.org/u/tkelman)\
**Post date:** [May 11, 2017, 2:19am UTC](https://discourse.julialang.org/t/running-julia-exe-from-mintty-terminal/3638/2 "2017-05-11T02:19:13Z")

</div>

Try fewer things at a time. Start with the release julia.exe, without --compile=no, and not from windows subsystem for linux. Release, and probably debug, julia run fine from inside cygwin’s mintty. Adding --compile=no and WSL to that means you’re doing things that never get tested.

---

<div class="post-metadata">

**Author:** ![musm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/musm/32/3675_2.png) [@musm](https://discourse.julialang.org/u/musm)\
**Post date:** [May 11, 2017, 2:22am UTC](https://discourse.julialang.org/t/running-julia-exe-from-mintty-terminal/3638/3 "2017-05-11T02:22:14Z")

</div>

Ah yes it works from regular Mintty.

On bash for windows, however it doesn’t.  
for reference here is the strace from a regular `julia.exe` started from the acutal julia folder from bash on windows

maybe someone else understands what’s going on here

```julia
execve("./julia.exe", ["./julia.exe"], [/* 16 vars */]) = 0
brk(NULL) = 0x7fffee147000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1a70e10000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=36374, ...}) = 0
mmap(NULL, 36374, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f1a70e16000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\t\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1864888, ...}) = 0
mmap(NULL, 3967392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f1a70630000
mprotect(0x7f1a707ef000, 2097152, PROT_NONE) = 0
mmap(0x7f1a709ef000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bf000) = 0x7f1a709ef000
mmap(0x7f1a709f5000, 14752, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f1a709f5000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1a70e00000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1a70df0000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1a70de0000
arch_prctl(ARCH_SET_FS, 0x7f1a70df0700) = 0
mprotect(0x7f1a709ef000, 16384, PROT_READ) = 0
mprotect(0x7f1a71209000, 4096, PROT_READ) = 0
mprotect(0x7f1a70c25000, 4096, PROT_READ) = 0
munmap(0x7f1a70e16000, 36374) = 0
getpid() = 177
brk(NULL) = 0x7fffee147000
brk(0x7fffee168000) = 0x7fffee168000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1668976, ...}) = 0
mmap(NULL, 1668976, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f1a70c48000
close(3) = 0
getcwd("/mnt/c/Julia/julia-0.6-latest/bin", 4096) = 34
open("/dev/lxssclient", O_RDWR) = 3
ioctl(3, _IOC(0, 0x00, 0x2f, 0x22), 0x7ffff4deaab0) = 0
open("./julia.exe", O_RDONLY) = 5
ioctl(3, _IOC(0, 0x00, 0x3f, 0x22), 0x7ffff4dea960) = 0
close(5) = 0
open("/mnt/c/Julia/julia-0.6-latest/bin", O_RDONLY) = 5
ioctl(3, _IOC(0, 0x00, 0x3f, 0x22), 0x7ffff4dea960) = 0
close(5) = 0
ioctl(4, _IOC(0, 0x00, 0x97, 0x22), 0x7ffff4deaa08) = 0
ioctl(4, _IOC(0, 0x00, 0xb7, 0x22), 0x7ffff4deaa00) = 0
ioctl(4, _IOC(0, 0x00, 0xb7, 0x22), 0x7ffff4deaa00) = 0
ioctl(4, _IOC(0, 0x00, 0xb7, 0x22), 0x7ffff4deaa00) = 0
write(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\"\0\0\0\0\0\0\0"..., 194) = 194
read(4, "\0\0\0\0\0\0\0\0*\0\0\0\0\0\0\0", 16) = 16
ioctl(4, _IOC(0, 0x00, 0x9b, 0x22), 0x7ffff4deaaa8) = 0
write(4, "\0\0\0\0\0\0\0\0*\0\0\0\0\0\0\0", 16) = 16
ioctl(5, _IOC(0, 0x00, 0xbf, 0x22), 0x7ffff4deaaa0) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGINT {si_signo=SIGINT, si_code=SI_KERNEL} ---
+++ killed by SIGINT +++

```

---

<div class="post-metadata">

**Author:** ![musm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/musm/32/3675_2.png) [@musm](https://discourse.julialang.org/u/musm)\
**Post date:** [May 11, 2017, 2:26am UTC](https://discourse.julialang.org/t/running-julia-exe-from-mintty-terminal/3638/4 "2017-05-11T02:26:47Z")

</div>

Actually trying to use julia.exe with plain Mintty, hangs the terminal after trying to load a package  
e.g.

```julia
julia> using ImageInTerminals

julia> # frozen can't do anything have to force close the terminal

```

---

<div class="post-metadata">

**Author:** ![tkelman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkelman/32/692_2.png) [@tkelman](https://discourse.julialang.org/u/tkelman)\
**Post date:** [May 11, 2017, 2:27am UTC](https://discourse.julialang.org/t/running-julia-exe-from-mintty-terminal/3638/5 "2017-05-11T02:27:53Z")

</div>

Does it happen outside of mintty? Probably a bug in WSL’s interoperation with win32 programs, which is beta functionality. Report a bug on the WSL github tracker, maybe they’ll look at it.

---

<div class="post-metadata">

**Author:** ![musm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/musm/32/3675_2.png) [@musm](https://discourse.julialang.org/u/musm)\
**Post date:** [May 11, 2017, 2:29am UTC](https://discourse.julialang.org/t/running-julia-exe-from-mintty-terminal/3638/6 "2017-05-11T02:29:26Z")

</div>

[quote=“tkelman, post:5, topic:3638”]  
Does it happen outside of mintty? [/quote]

No, it works fine using conemu or regular cmd/powershell.  
WSL? That was _using_ plain old mintty and _not_ WSL

The strace posted above, _however_, was when I tried WSL

---

<div class="post-metadata">

**Author:** ![tkelman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkelman/32/692_2.png) [@tkelman](https://discourse.julialang.org/u/tkelman)\
**Post date:** [May 11, 2017, 2:32am UTC](https://discourse.julialang.org/t/running-julia-exe-from-mintty-terminal/3638/7 "2017-05-11T02:32:38Z")

</div>

Is it just WSL that’s the problem, or the combination of WSL inside mintty?

---

<div class="post-metadata">

**Author:** ![musm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/musm/32/3675_2.png) [@musm](https://discourse.julialang.org/u/musm)\
**Post date:** [May 11, 2017, 2:33am UTC](https://discourse.julialang.org/t/running-julia-exe-from-mintty-terminal/3638/8 "2017-05-11T02:33:46Z")

</div>

Both

Plain Mintty no WSL:  
Starts fine, but hangs after trying to load a package

WSL:  
See, strace linked above, won’t start
