xpra icon
Bug tracker and wiki

Opened 4 weeks ago

Closed 4 weeks ago

Last modified 4 weeks ago

#2128 closed defect (invalid)

Flag --start-on-last-client-exit appears not to be working

Reported by: stdedos Owned by: Antoine Martin
Priority: major Milestone: 2.5
Component: server Version: 2.4.x
Keywords: Cc:

Description

Ubuntu 16.04.5 xpra v2.5-r21480 (py2?) / Win10 Xpra-Python3-x86_64_Setup_2.5-r21454

I have tried testing the usability of the --start-on-last-client-exit flag with a number of definitions:

"C:\Program Files\Xpra\xpra_cmd" shadow ssh://user@ip/0 --opengl=no --desktop-scaling=0.75

--start-on-last-client-exit="gnome-screensaver-command -l"
--start-on-last-client-exit="DISPLAY=:0 gnome-screensaver-command -l"
--start-on-last-client-exit="bash -c 'DBUS_SESSION_BUS_ADDRESS=$(cut -f 2- -d= /run/user/1000/dbus-session) gnome-screensaver-command -l'"
--start-on-last-client-exit="bash -c 'touch /tmp/xpra-test ; DBUS_SESSION_BUS_ADDRESS=$(cut -f 2- -d= /run/user/1000/dbus-session) gnome-screensaver-command -l'"
--start-on-last-client-exit="/tmp/lock-test.sh"

and with a variety of ways:

  • "Network timeout"
  • Disconnect server
  • Shutdown Server

All of which, appear not to be working - neither the naive:

$ ls -lah /tmp/xpra-test
ls: cannot access '/tmp/xpra-test': No such file or directory
$

nor the (original) locking of the screen.


There seem to be other interoperability issues between the client and the server: Connections that constantly need to be initiated twice (or more) before they are working, (major) leak of screens (cannot be reconnected, need to be killed manually) etc., so, I am not sure how to approach debugging.

Change History (3)

comment:1 Changed 4 weeks ago by Antoine Martin

Resolution: invalid
Status: newclosed

Original feature ticket is #2057.

This is not supported when starting a remote server as the client has no way of knowing if the server supports the start-on-last-client-exit command line option. Specifying this command line option would cause the server to fail to start with older versions.

Instead, try:

xpra shadow --start-on-last-client-exit="/tmp/lock-test.sh"

Directly on the system you want to shadow.

BTW, you have not specified your server version.

comment:2 in reply to:  1 Changed 4 weeks ago by stdedos

Replying to Antoine Martin:

BTW, you have not specified your server version.

Replying to stdedos:

Ubuntu 16.04.5 xpra v2.5-r21480 (py2?) / Win10 Xpra-Python3-x86_64_Setup_2.5-r21454

Server is the Ubuntu machine, client is the Windows one.


Can I instead have this "as a default" (in the configuration file somehow)? For locking purposes, I'd want this hook to be active regardless.

comment:3 Changed 4 weeks ago by Antoine Martin

Can I instead have this "as a default" (in the configuration file somehow)? For locking purposes, I'd want this hook to be active regardless.

For a specific user:

echo 'start-on-last-client-exit="/tmp/lock-test.sh"' >> ~/.xpra/xpra.conf

Repeat as necessary.

Or globally, stick this in the global root config:

echo 'start-on-last-client-exit="/tmp/lock-test.sh"' >> /etc/xpra/conf.d/80_lock.conf
Note: See TracTickets for help on using tickets.