xpra icon
Bug tracker and wiki

Opened 8 weeks ago

Closed 8 weeks ago

#1698 closed defect (fixed)

server fails when logging to ~/.xpra/

Reported by: Boruch Owned by: Antoine Martin
Priority: minor Milestone: 2.2
Component: server Version: trunk
Keywords: configuration log-dir logging Cc:

Description (last modified by Antoine Martin)

The parsing for option 'log-dir' does not seem to be expanding shell variables, such as ~, $HOME, or $USER, and causes the server to fail when the 'log-dir' option is set with those variables.

PART 1

When changing option log-dir in file /etc/xpra/60_server.conf from its default "auto" to "~/.xpra", the xpra server fails to launch. The alternative "~/.xpra" is provided for in the comments for the config file. The entire STDERR output is

Warning: cannot use the system proxy for 'start' subcommand,
 failed to connect to '/run/xpra/system':
 [Errno 111] Connection refused
InitException: cannot open log file '~/.xpra/S9585.log': [Errno 2] No such file or directory: '~/.xpra/S9585.log'
xpra initialization error:
 cannot open log file '~/.xpra/S9585.log': [Errno 2] No such file or directory: '~/.xpra/S9585.log'

However, the directory does exist, with adequate permissions, and xpra does create two files there (a commented-out 'xpra.conf', and a 'run-xpra' executable).

When reverting the log-dir option to its default, 'auto', the server does start, but the log file, at /run/user/$UID/xpra/:1.log includes:

failed to rename Xorg log file from '/run/user/1007/xpra/Xorg.S13030.log' to '/run/user/1007/xpra/Xorg.:1.log'
 [Errno 2] No such file or directory
-- END---------------

The log files that do exist are: :1.log and Xorg.S13030.log.old

PART 2

Experimenting with the option on both the command-line and in the config file showed that the server WOULD succeed when the explicit path to ~/.xpra was used, ie. /home/.../.xpra, and would fail with the same output as above for $HOME/.xpra and /home/$USER/.xpra

Change History (3)

comment:1 Changed 8 weeks ago by Antoine Martin

Description: modified (diff)
Status: newassigned

failed to rename Xorg...

This one is not a bug in xpra but a bug in the Xorg server: #1192.
There is a patch, which is languishing upstream. I think they need a nudge.

As for the rest, I will take a look.
Please always include full OS version, as this may be relevant when debugging.

comment:2 Changed 8 weeks ago by Boruch

Oops.

Version: Xpra gtk2 client version 2.1.3-r17247 64-bit
Platform: Debian Stretch / Devuan Ascii
Kernel: Linux 4.9.0-3-amd64 [Debian version: 4.9.30-2+deb9u5 (2017-09-19)]

comment:3 Changed 8 weeks ago by Antoine Martin

Resolution: fixed
Status: assignedclosed

Fixed in r17502. (I will have to come up with a more concise fix for older branches)

Note: See TracTickets for help on using tickets.