New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tmux sessions not kept across bash exits #2252
Comments
@KireinaHoro - Quote from
|
@sunjoong thanks for the thread quote. Yet simply keeping a window open is a rather awkward workaround for the situation. Is it possible to elevate |
@KireinaHoro - Hmm... Yeah, that looks awkward but think like this; If WSL be a linux box, what's the booting up and what's the shutting down? I think no running bash process might be similar to shutdown status. And... for system service... https://superuser.com/questions/1112007/how-to-run-ubuntu-service-on-windows-at-startup and http://webkempers.com/wsl-auto-start-workaround . You don't need sshd on this workaround, so... hmm... might this work? I'm not sure but making only one bash process alive you need, so... try to add this to Windows's Task Scheduler but don't belive me :)
|
I've had trouble with the ws option because wscript.exe it is a 32-bit program which looks in SysWOW64 instead of System32 for The solution seems to be to use One can also use the run.exe program from the xming site to start a bash window hidden. Advantage: the window is not around to close accidentally. Disadvantage: it's hard to close it from Windows. (From within bash.exe, |
@rodrymbo - Thans. On my Windows 10 Home edition, wscript.exe is in C:\Windows\System32 directory and in C:\Windows\SysWOW64 directory too, so I guessed that might work :) |
@sunjoong - Ooh. When did that happen? Looks like Microsoft is catching up with itself. Anyway, it took me a while to figure out why some programs were getting "The system cannot find the file specified" for c:\windows\system32\bash.exe. It will be excellent if no one has to go through that again! But I suspect it will be good scripting style for a while yet to do a test for existence before invoking bash.exe, just to be sure, and so you've got a start at figuring out what is going on. And it does look like invoking bash.exe via VBS is a good way to keep the window hidden (if that's what you want). And yes, if you use that technique to launch a script that runs, say, cron, or sshd, or @sunjoong's loop, and waits, the window will stay open but running, the WSL subsystem will keep running, and there's a good chance background programs or tmux started later will keep running, even if their window is closed. |
Windows Insider Build 17046 allows programs to execute without an active terminal. |
Fixed in 1803. |
Not fixed. |
ver
at a Windows Command Prompt)10.0.15063
Detach from a session and exit bash and powershell. Open up powershell and bash again and try to attach back and one will see a "no sessions" error (nothing shows up when executing
tmux list-sessions
)Sessions should be kept as long as the system stays on and in a reasonable state.
<cmd>
is failing, then runstrace -o strace.txt -ff <cmd>
, and post the strace.txt output here)(inapplicable)
The text was updated successfully, but these errors were encountered: