You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tmux fails on openSUSE when tempfs folder doesn't exist #1092
tmux crashes when run from a freshly opened openSUSE instance:
> tmux
can't create socket: No such file or directory
Took a look at the strace and noticed that tmux is trying to open a file in /run/tmux, but failing.
Immediately after installing tmux:
> ls /run
lock shm tmux user zypp.pid
After closing openSUSE session and re-opening:
> ls /run
lock shm user
If we manually create /run/tmux tmux opens fine.
Since we clear tempfs when we shutdown an instance, this affects all our users running openSUSE.
Note: Tried to capture a log as per CONTRIBUTING instructions, but cannot:
> tmux -Ltest kill-server
can't create socket: No such file or directory> tmux -vv -Ltest -f/dev/null newcan't create socket: No such file or directory
It sounds like you have modified tmux so that it puts sockets in /run/tmux instead of _PATH_TMP (usually /tmp). If you do this, you need to make sure the directory exists. tmux will not (and should not) attempt to create it.
For the period where Debian tried to move tmux sockets to /var/run/tmux, they had a boot script to create the directory with the right permissions, doesn't SuSE have similar?
SUSE also has a policy that sockets etc. get created under /run, which is on tmpfs, which WSL:
a) Nukes when we shut-down a distro instance
b) Does not initialize when the distro starts-up
This combination of factors means that:
Tools & apps like tmux have no socket at startup
We need to figure out a way to allow distro owners to execute some init steps (e.g. call system-tmpfiles) when a distro instance is started:
Closing this issue - we'll go figure out a fix at our end! :)
tmux doesn't need a socket at startup, it will create one (and the user
parent directory). But it does need the top level directory (usually /tmp,
in your case /run/tmux) to exist. Don't forget it will also need the right
permissions (777 + sticky bit).
Just wanted to provide one additional tidbit of info for anybody else who comes across this thread - in the comment above from the WSL team, the command you need to run is systemd-tmpfiles --create (note that it is systemd and not system).
Activity
nicm commentedon Sep 27, 2017
This issue does not include enough information. Please read the CONTRIBUTING file.
bitcrazed commentedon Sep 27, 2017
Hey @nicm - updated description above with a little info.
nicm commentedon Sep 27, 2017
It sounds like you have modified tmux so that it puts sockets in /run/tmux instead of _PATH_TMP (usually /tmp). If you do this, you need to make sure the directory exists. tmux will not (and should not) attempt to create it.
nicm commentedon Sep 27, 2017
For the period where Debian tried to move tmux sockets to /var/run/tmux, they had a boot script to create the directory with the right permissions, doesn't SuSE have similar?
bitcrazed commentedon Sep 29, 2017
Hey @nicm: Sorry - was swamped at SUSECON the last few days.
So, we dug into this and it turns out that it's likely our fault (I work on the WSL team at Microsoft):
Many systemd distros are adopting the new /run folder replacing
/var/runas a place to store transient info at startup, because/var/runis mounted later in the startup process.SUSE also has a policy that sockets etc. get created under /run, which is on tmpfs, which WSL:
a) Nukes when we shut-down a distro instance
b) Does not initialize when the distro starts-up
This combination of factors means that:
Closing this issue - we'll go figure out a fix at our end! :)
nicm commentedon Sep 29, 2017
bitcrazed commentedon Sep 30, 2017
Yep - sorry - should have been clearer.
If we run
system-tmpfiles --create, the tmux folder will be created correctly.Have just filed an issue for us to track the fix for this: microsoft/WSL#2530
ray13eezy commentedon Aug 12, 2019
Just wanted to provide one additional tidbit of info for anybody else who comes across this thread - in the comment above from the WSL team, the command you need to run is
systemd-tmpfiles --create(note that it is systemd and not system).Hope this helps.
lock commentedon Feb 14, 2020
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.