screen - open fifo /var/run/screen/S-root/2904.tty.localhost: No such file or directory
apt-get install screen
screen open fifo /var/run/screen/S-root/2904.tty.localhost: No such file or directory
@atari MS know about that, they are working to fix this. You can read about this there: https://insights.ubuntu.com/2016/03/30/ubuntu-on-windows-the-ubuntu-userspace-for-windows-developers/
Thanks for reporting the issue. Some fixes were made recently to support tmux, but from strace it appears that screen is still blocked due to a lack of packet mode on ptmx (TIOCPKT).
Please give us feedback on the user voice page so we can prioritize.
stephanie@ASYLUM:~$ screen Cannot make directory '/var/run/screen': Permission denied
build 14393
You have to run sudo screen the first time, but otherwise, screen should now work.
sudo screen starts you in root, that's bad. We need screen without privilege escalation.
@archon810 - you only need to run screen as root the first time.
sudo screen
exit
screen
This solution works better for me.
https://www.systutorials.com/qa/1639/screen-reporting-cannot-directory-screen-permission-denied
Screen works without root now.
I use SecureCRT with logon action of screen -xR, which seems to somehow execute it without running .bashrc first, but this fixes it: export SCREENDIR=$HOME/.screen; screen -xR
@archon810 - agreed, that's another way to do it.
@benhillis I'm not sure if you're working on this, but it's a pretty simple issue to fix and the only one standing between screen working out of the box like tmux does. Would be great to finish the 1% left from making it 100%.
sudo screen only fixes the problem until the next time the WSL session is restarted. Then you're back to square one.
@michaelmhoffman - It is looking like this is kind of a dupe of #2530 (correct me if I am wrong). The SCREENDIR work-around seems like the right approach for WSL under the present circumstances. I don't run screen much myself, but if there is a well-formed actionable to bring screen over the aforementioned 1% you could open a new issue; this was closed a year ago. But I am thinking anything requested would fall under a "/var/run isn't the awesome on WSL right now" umbrella.
Basically, although it's /var/run not /run in this case. sudo /etc/init.d/screen-cleanup start will also fix the problem, but only until the WSL session ends. Yes, I am using the SCREENDIR workaround myself:
if [[ "$(uname -r)" == *Microsoft ]]; then
export SCREENDIR="$HOME/.screen"
fi
This sounds v. like #2350 wherein tmux fails to run after restarting openSUSE session; caused by missing /run/ tmpfs folder.
Please try this:
- Close all WSL sessions/instances
- Open Ubuntu instance
- Run
systemd-tmpfiles - Try running screen
Expected: Screen should now work Actual: ?
I think you mean #2530 as pointed out by @therealkenc. It works but only until the next WSL session starts.
Microsoft Windows [Version 10.0.16299.19]
(c) 2017 Microsoft Corporation. All rights reserved.
C:\Users\mhoffman>bash
$ uname -a
Linux mhoffman-m02 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux
$ sudo systemd-tmpfiles --create
[sudo] password for mhoffman:
[/usr/lib/tmpfiles.d/tmp.conf:15] Failed to replace specifiers: /tmp/systemd-private-%b-*
[/usr/lib/tmpfiles.d/tmp.conf:16] Failed to replace specifiers: /tmp/systemd-private-%b-*/tmp
[/usr/lib/tmpfiles.d/tmp.conf:17] Failed to replace specifiers: /var/tmp/systemd-private-%b-*
[/usr/lib/tmpfiles.d/tmp.conf:18] Failed to replace specifiers: /var/tmp/systemd-private-%b-*/tmp
[/usr/lib/tmpfiles.d/var.conf:14] Duplicate line for path "/var/log", ignoring.
$ screen
/var/run/utmp: No such file or directory
[screen successfully starts here]
[screen is terminating]
$ logout
C:\Users\mhoffman>bash
$ screen
Cannot make directory '/var/run/screen': Permission denied
Thanks @michaelmhoffman. Since you've verified it works (temporarily) and this issue tracker is long closed since the fall of 2016, follow further developments over in #2530. /var/run is just a symlink to /run FWIW.