[winswitch] Headless raspi & macOS

Antoine Martin antoine at nagafix.co.uk
Sun Mar 15 13:01:30 GMT 2020


On 15/03/2020 19:24, Markus Mohr via shifter-users wrote:
> 
>>
>> ie: assuming you want to connect via ssh:
>> xpra start --start=xterm ssh://user@rpi/ <ssh://user@rpi/>
>> Then re-attach with:
>> xpra attach ssh://user@rpi/ <ssh://user@rpi/>
> 
> I’ve tried this but I get a lot of error messages:
> 
> Nelson:~ markus$ xpra start --start=xterm ssh://pi@ra <ssh://pi@ra>
(..)
> (Xpra:64778): Gtk-CRITICAL **: 13:03:45.004: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed
> 2020-03-15 13:05:26,528 Error: failed to receive anything, not an xpra server?
> 2020-03-15 13:05:26,528   could also be the wrong protocol, username, password or port
> 2020-03-15 13:05:26,529   or the session was not found
> 2020-03-15 13:05:26,529 Connection lost
FYI: usually, this happens when xpra is not installed on the server, or
when you have more than one session already running.
On a pi, it is likely to be because the server is taking too long to
start up and / or running out of RAM.
(this will vary depending on what model you have)

> Then I wanted to make sure the Xpra service is running. Now its a bit weird: I can start and stop the service but status throws errors (and the same one no matter if Xpra has been started or not):
> 
> root at ra:/home/pi# /etc/init.d/xpra stop
> [ ok ] Stopping xpra (via systemctl): xpra.service.
> root at ra:/home/pi# /etc/init.d/xpra start
> [ ok ] Starting xpra (via systemctl): xpra.service.
> root at ra:/home/pi# /etc/init.d/xpra stop
> [ ok ] Stopping xpra (via systemctl): xpra.service.
> root at ra:/home/pi# /etc/init.d/xpra status
> ● xpra.service - Xpra System Server
>    Loaded: loaded (/lib/systemd/system/xpra.service; disabled; vendor preset: enabled)
>    Active: failed (Result: exit-code) since Sun 2020-03-15 13:17:49 CET; 31s ago
>      Docs: https://xpra.org/trac/wiki/Service <https://xpra.org/trac/wiki/Service>
>            man:xpra
>   Process: 31757 ExecStart=/usr/bin/xpra proxy :14500 --daemon=no --tcp-auth=${TCP_AUTH} --ssl-cert=/etc/xpra/ssl-cert.pem --ssl=on --bind=none --auth=${AUTH} --socket-dirs=/run/xpra --socket-permissions=666 --log-dir=/var/log --pidfile=/run/xpra.pid --debug=${DEBUG} (code=exited, status=1/FAILURE)
>  Main PID: 31757 (code=exited, status=1/FAILURE)
> 
> Mär 15 13:17:46 ra systemd[1]: Started Xpra System Server.
> Mär 15 13:17:49 ra xpra[31757]: wrote pid 31757 to '/run/xpra.pid'
> Mär 15 13:17:49 ra xpra[31757]: xpra initialization error:
> Mär 15 13:17:49 ra xpra[31757]:  cannot create SSL socket, check your certificate paths ('/etc/xpra/ssl-cert.pem'): [Errno 2] No such file or directory
> Mär 15 13:17:49 ra systemd[1]: xpra.service: Main process exited, code=exited, status=1/FAILURE
> Mär 15 13:17:49 ra systemd[1]: xpra.service: Failed with result 'exit-code'.
You don't need to have the service running.
It is optional and on a pi it will just consume extra RAM, which is
already scarce.

>> There's also a GUI for connecting more easily.
>> Just beware that the version in raspbian is well out of date..
>>
> 
> root at ra:/home/pi# xpra --version
> xpra v2.4.3-r21350M
> 
> Maybe this the root of my problems?
It doesn't help, but no, I have a working setup with 2.4.3 on a pi3.
The first problem is that they should have used Xvfb instead of Xdummy
on the pi, as the pi isn't powerful enough to load the Xdummy server.
To fix it:
apt-get install xvfb
Then edit /etc/xpra/conf.d/55_server_x11.conf, comment out the last line
which has xvfb=/usr/lib/xorg/Xorg and uncomment the line which has
xvfb=Xvfb...

Another problem is that the client times out because the pi still takes
so long to spin up a server. So you may want to start your session via
ssh before connecting. ssh to the pi and then:
xpra start --start=xterm
(and keep an eye on the xpra server log for failures)

The pi is OK as a client, but dreadfully slow as a server.

> Is there a current Debian package somewhere or do I have to build it myself (I can, just asking)?
There are no official packages from xpra.org at this point.
You could build from source easily enough though, if you wanted to.
Just make sure to build "--without-Xdummy".

Cheers,
Antoine


> 
> 
> Thanks
> Markus



More information about the shifter-users mailing list