"[screen is terminating]" Immediately, Never Creates Screen Instance
Solution 1
tmux works in Windows 10 bash. It is the same as screen, like so:
tmux # starts a new tmux session
ctrl-b c # new tab
ctrl-b 0 # switch to tab 0
ctrl-b d # detach
tmux a # re-attach to your previous session
ctrl-b ? # for help
Solution 2
I googled the error and the first thing that came up was this site which said to try
Use Windows Bash Shell sources for Windows Bash Shell, not native Ubuntu. The 2 systems are not interchangeable. Regarding Bash itself you can get away with it but tools like "screen" and "tmux" have specific needs that Windows Bash Shell just does not have (yet!). Any command you use in Ubuntu is bound to fail on Windows Bash Shell.
I'm not trying to use any special programs, not trying to ssh, just want to use screen natively on my bash/Ubuntu console.
Yes, you do: "screen" IS a special program.
You wont succeed to get this running unless you can hack your way around software. "screen" is not supported in Windows Bash Shell (yet!). Windows 10 build 14361 will introduce "tmux" (and I assume "screen" will then work too) and that version seems to be an "insider preview build", not released yet to the general public.
Related videos on Youtube
Metomorphose
Updated on September 18, 2022Comments
-
Metomorphose over 1 year
A friend of mine just showed me a neat built-in utility called
screen
that, long story short, allows you to create instances of the terminal.I am running Windows 10 and trying to use this utility with Bash on Ubuntu on Windows, but since it was a built-in utility, I didn't expect any problems. After playing with it on a different computer, I went to start an instance on mine with
screen -S hello
and all I got back wasCannot make directory '/var/run/screen': Permission denied
I googled the error and the first thing that came up was this site which said to try
sudo /etc/init.d/screen-cleanup start
which I did with little luck. Now with the same screen command all that happens is
[screen is terminating] [11:44:25 ~]> _
with no other explanation. I made sure that there were no instances left running with
screen -ls
and gotNo Sockets found in /home/daniel/.screen.
. I went back to google to then fix this issue but all of the questions / answers I found were for CentOS (which I'm not running, and just to be clear,cat /etc/issue
returnsUbuntu 14.04.4 LTS \n \l
). I did try some of their suggestions anyway, trying all of these:sudo chmod 2775 /usr/bin/screen sudo chmod 755 /usr/bin/screen sudo chmod 777 /usr/bin/screen sudo chmod u+s /usr/bin/screen sudo chmod 755 /var/run/screen
as well as
chmod 700 ~/.screen
after creating and exporting a newSCREENDIR
.I'm not trying to use any special programs, not trying to ssh, just want to use
screen
natively on my bash/Ubuntu console.Any help is appreciated!
-
bashBedlam over 7 yearsHave you tried starting screen without the parameters? If it opens, then split the terminal with Ctrl-a S.
-
Metomorphose over 7 years@bashBedlam same result, just terminates.
-
stalet over 7 yearsCan toy try inserting the line
shell /bin/bash
in~/.screenrc
? -
sмurf over 7 yearsTry command
screen bash
. If that fails and you feel confident examining failed system calls you could trystrace -f -o trc -v screen bash
and then examine filetrc
. More info on strace is available here: wiki.ubuntu.com/Strace -
sмurf over 7 yearsOops, strace does not work well with screen. Workaround: unix.stackexchange.com/questions/93892/screen-is-terminating
-
Metomorphose over 7 years@stalet
No command 'shell' found
. @smurf same thing again and oh gosh stack tracing... Maybe I'll try it after some sleep... -
muru over 7 yearsI'm pretty certain Dustin Kirkland said screen and tmux don't work.
-
Rinzwind over 7 years
-
Rinzwind over 7 yearsYou need at least Windows 10 build 14361 to use tmux.
-
muru over 7 years@Rinzwind that's still Insider-only, I think. Beta software.
-
Dimitry K about 7 years+1 (post surprisingly had -1): this is valid question, well described, and any questions regarding "weirdness of windows ubuntu subsystem" are valid, because it is a new product and there's a lot of unknowns)
-
Metomorphose about 7 years@Dimitry K, thanks, I was wondering why it was getting negative votes myself lol
-
-
user2760375 over 7 yearsthough strange earlier I was able to build and run screen successfully in bash inside windows. But now in another system after a month I am not able to do with the latest windows 10 build.
-
Zanna about 6 yearshmm... I wonder whether that is a good idea...