Skip to content
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

screen - open fifo /var/run/screen/S-root/2904.tty.localhost: No such file or directory #39

Closed
atari opened this issue Apr 7, 2016 · 15 comments

Comments

@atari
Copy link

atari commented Apr 7, 2016

apt-get install screen

screen
open fifo /var/run/screen/S-root/2904.tty.localhost: No such file or directory

@patryk9200
Copy link

@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/

@stehufntdev
Copy link
Collaborator

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.

@sdaugherty
Copy link

stephanie@ASYLUM:~$ screen
Cannot make directory '/var/run/screen': Permission denied

build 14393

@bitcrazed
Copy link
Contributor

You have to run sudo screen the first time, but otherwise, screen should now work.

@archon810
Copy link

sudo screen starts you in root, that's bad. We need screen without privilege escalation.

@benhillis
Copy link
Member

@archon810 - you only need to run screen as root the first time.

sudo screen
exit
screen

@archon810
Copy link

archon810 commented Jul 10, 2017

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

@benhillis
Copy link
Member

benhillis commented Jul 10, 2017

@archon810 - agreed, that's another way to do it.

@archon810
Copy link

@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%.

@michaelmhoffman
Copy link

sudo screen only fixes the problem until the next time the WSL session is restarted. Then you're back to square one.

@therealkenc
Copy link
Collaborator

therealkenc commented Nov 20, 2017

@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.

@michaelmhoffman
Copy link

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

@bitcrazed
Copy link
Contributor

This sounds v. like #2350 wherein tmux fails to run after restarting openSUSE session; caused by missing /run/ tmpfs folder.

Please try this:

  1. Close all WSL sessions/instances
  2. Open Ubuntu instance
  3. Run systemd-tmpfiles
  4. Try running screen

Expected: Screen should now work
Actual: ?

@michaelmhoffman
Copy link

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

@therealkenc
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants