|
Bugzilla – Full Text Bug Listing |
| Summary: | Incomplete tmux path patch | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE Tumbleweed | Reporter: | Marcus Rückert <mrueckert> |
| Component: | Other | Assignee: | Cristian Rodríguez <crrodriguez> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P5 - None | CC: | forgotten_cAXlJ_FoSf |
| Version: | NO 13.2 BUGS!! | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Marcus Rückert
2014-11-25 10:46:44 UTC
export TMUX_TMPDIR="/run/tmux/$(id -u)/" is a workaround for now. reproduced.. what the... Hrmmm... looks like we are dealing with a tmux bug triggered by this change...all functions that want the tmux socket call makesocketpath()
which says..
char *
makesocketpath(const char *label)
{
...
uid = getuid();
if ((s = getenv("TMUX_TMPDIR")) != NULL && *s != '\0')
xsnprintf(base, sizeof base, "%s/", s);
else if ((s = getenv("TMPDIR")) != NULL && *s != '\0')
xsnprintf(base, sizeof base, "%s/tmux-%u", s, uid);
else
xsnprintf(base, sizeof base, "%s/tmux-%u", _PATH_TMP, uid);
I only modified the fallback.. case.. to
xsnprintf(base, sizeof base, "/run/tmux/%u", uid);
But in the case of this bug, the first session (in the real console) is created in /run/tmux/$uid as expected but when you try to attach to the existent session a new one is created in /tmp/tmux-$uid ..this is because in the desktop terminal emulator $TMPDIR is set.. le sigh...
request id 263031 should address this issue by not taking into consideration TMPDIR environment variable..which may be unset in real console but set in a virtual terminal../run/tmux is always available till the machine is shutdown anyway. I don't really like this, it's even more deviating from upstream behavior and somewhat unexpected for people like me who set TMPDIR and expect tmux to obey that. @Marcus: So you have TMPDIR set to /tmp but only for the shell you start in a terminal emulator, and if so why since /tmp should the default anyway? Note that this is documented and expected behavior in tmux and only worked previously by coincidence because TMPDIR and the fallback /tmp were the same. while it might be that it was only working by accident in the past. but the accident were our default settings. (In reply to Marcus Rückert from comment #6) > while it might be that it was only working by accident in the past. but the > accident were our default settings. Correct, because in either case the socket was created in /tmp .. as TMPDIR is set to /tmp in the desktop environment.. but if it was not , it used to fallback to /tmp and everything worked by accident.. (In reply to Marcus Rückert from comment #6) > while it might be that it was only working by accident in the past. but the > accident were our default settings. Well, it goes both ways, not obeying TMPDIR any more is an unexpected change just as well. My question remains, why would you set TMPDIR differently depending on the login method, that sounds like a recipe for breakage, and why set it at all if it only points to /tmp? OK, I had not noticed that TMPDIR=/tmp is a default because I always override it on all my boxes, it comes from /etc/X11/xdm/Xsession. @Werner: Why is TMPDIR actually set to /tmp in /etc/X11/xdm/Xsession? And, if it is actually needed by anything can we move that to /etc/profile so that it is at least consistent independent of the login method? (In reply to Guido Berhoerster from comment #9) > Why is TMPDIR actually set to /tmp in /etc/X11/xdm/Xsession? And, if it is > actually needed by anything can we move that to /etc/profile so that it is at > least consistent independent of the login method? TMPDIR is used to make sure that all tools used in /etc/X11/xdm/Xsession do use it. We might reset it before we execute the final user scripts/shell in the shell function exec_login() (In reply to Dr. Werner Fink from comment #10) > (In reply to Guido Berhoerster from comment #9) > > > Why is TMPDIR actually set to /tmp in /etc/X11/xdm/Xsession? And, if it is > > actually needed by anything can we move that to /etc/profile so that it is at > > least consistent independent of the login method? > > TMPDIR is used to make sure that all tools used in /etc/X11/xdm/Xsession do > use it. We might reset it before we execute the final user scripts/shell in > the shell function exec_login() OK, I'll take care of that. SR #263801 accepted. |