Persistent remote X applications with xpra (was: Remote xboard without Desktop Environment)
Hello there,
On Wed, Nov 20, 2013 at 01:33:21PM -0200, Beco wrote:
> [...]
> (3) Now, how can I keep xboard running on lizard, after I turn off fox.
TTBOMK (being former Debian package maintainer of xboard) xboard will
need a DISPLAY to run interactively. ssh -X was already mentioned, but
if the connection gets lost so does any X application running in ssh -X.
screen won't help due to the X requirement. VNC and/or RDP (e.g. via
xrdp) would allow persistent X applications, but both have some overhead
you'd prefer to avoid (and I personally dislike both of them for the
fixed display size of a running session).
So far so bad. xpra might help, though.
Consider the following sample session. fernst is my powerful (ahem...)
workstation, c01n01v01 is a remote virtual server I just had running
(still running Squeeze w/ backports, but still enough to illustrate my
point).
Starting xboard on c01n01v01:
:) fe@fernst:~$ ssh fe@c01n01v01
Linux c01n01v01zfs 2.6.32-26-pve #1 SMP Mon Oct 14 08:22:20 CEST 2013 x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
fe@c01n01v01zfs:~$ xpra start :8
Entering daemon mode; any further errors will be reported to:
/usr/users/support/fe/.xpra/c01n01v01zfs-8.log
fe@c01n01v01zfs:~$ DISPLAY=:8 xboard -ncp &
[1] 29158
fe@c01n01v01zfs:~$ ps auxwwkstart_time
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 8360 804 ? Ss Nov20 0:00 init [2]
root 2 0.0 0.0 0 0 ? S Nov20 0:00 [kthreadd/150]
root 3 0.0 0.0 0 0 ? S Nov20 0:00 [khelper/150]
root 340 0.0 0.2 60436 1492 ? Sl Nov20 0:00 /usr/sbin/rsyslogd -c4
root 412 0.0 0.1 21160 972 ? Ss Nov20 0:00 /usr/sbin/cron
102 704 0.0 0.1 44144 1004 ? Ss Nov20 0:00 /usr/sbin/exim4 -bd -q30m
root 728 0.0 1.4 53000 7672 ? Sl Nov20 0:14 /usr/bin/python /usr/bin/fail2ban-server -b -s /var/run/fail2ban/fail2ban.sock
root 28523 0.0 0.2 49180 1136 ? Ss 09:23 0:00 /usr/sbin/sshd
root 29136 0.0 0.6 70464 3288 ? Ss 09:27 0:00 sshd: fe [priv]
fe 29138 0.0 0.3 70464 1596 ? S 09:27 0:00 sshd: fe@pts/0
fe 29139 0.0 0.3 17712 1908 pts/0 Ss 09:27 0:00 -bash
fe 29148 0.8 4.1 185000 21664 ? S 09:27 0:00 /usr/bin/python /usr/bin/xpra start :8
fe 29149 2.0 9.7 94236 51160 ? S 09:27 0:00 Xvfb-for-Xpra-:8 +extension Composite -screen 0 3840x2560x24+32 -nolisten tcp -noreset -auth /usr/users/support/fe/.Xauthority :8
fe 29158 0.6 0.6 45828 3508 pts/0 S 09:27 0:00 xboard -ncp
fe 29161 0.0 0.1 14820 1008 pts/0 R+ 09:27 0:00 ps auxwwkstart_time
fe@c01n01v01zfs:~$ logout
Connection to xxx.x.xxx.xx closed.
:) fe@fernst:~$
Now connecting to the still running xboard within my xpra session:
:) fe@fernst:~$ xpra attach ssh:fe@c01n01v01:8
Attached (press Control-C to detach)
The xboard window now appears in my regular DE on fernst. I can interact
with it as usual (including resizing it to my liking), and finally
detach (but keep running) as indicated:
^Creceived SIGINT, closing
Connection lost
:) fe@fernst:~$
I can reattach again at will. And if not required anymore the xpra
session running on my server can be terminated via
fe@c01n01v01zfs:~$ xpra stop :8
HTH,
Flo
Reply to: