Using x2go to Run Remote Desktops on HEP Linux Systems
The implementation of VNC has changed in RHEL9-based operating systems such as
AlmaLinux 9, making it unsuitable for a multiuser environment where users do not typically have admin access and wish to run remote graphical sessions on demand.
One alternative which does work on
AlmaLinux 9 is x2go.
Starting a Session on the HEP Network
x2go is started over SSH, and does not require user configuration on the server.
You can start by downloading the appropriate client for your operating system from
https://wiki.x2go.org/doku.php/start .
When you run that, you should be able to create a session, and then set (for example):
- Session name to whatever you like, but a short name for the host is typical, e.g. 'gamma'
- Host to the full hostname of the system you want to run a session on, e.g. 'gamma.ph.liv.ac.uk'
- Login to your user name
- Session type' to the desktop environment you want to use. From our testing so far, we recommend MATE, but see https://wiki.x2go.org/doku.php/doc:de-compat for compatibility information (GNOME does not appear to work, KDE seems to work but takes quite a while).
You can then put the session name you've defined into the 'session:' prompt, and log in as normal. This should then start the graphical session.
Starting a External Session
If you're connecting from outside the HEP network, you can connect directly to some systems, and proxy your connection to others, from within x2go.
If the system you're connecting to has SSH available externally (e.g. interactive nodes), you should be able to configure the session as above and log directly in as normal; x2go should present the normal Duo 2FA prompt.
If you're connecting to a system that does not have SSH available externally, you will need to proxy your connection, e.g. via gateway.ph.liv.ac.uk. Configure the session as above, and then:
- Check 'Use Proxy server for SSH connection'
- Set Proxy server Type to 'SSH'
- Set Host to 'gateway.ph.liv.ac.uk'
- Check 'Same login as on X2Go server' and 'Same password as on X2Go server' if both systems you're connecting to use HEP accounts, or otherwise have the same details; otherwise, enter the different login as appropriate.
Run the session as before; you should be prompted to log in to gateway (with Duo 2FA prompt), with further prompts to log into the session host as necessary.
Known Issues
MATE
In MATE, an error box stating "The panel encountered a problem while loading "GvcAppletFactory::GvcApplet" has been seen. We haven't identified any critical problems relating to this, and it may be safe to simple accept the prompt to 'delete the applet from your configuration'.
XFCE
With the XFCE session type, the session has been seen to render improperly; running "/usr/bin/xfconf-query -c xfwm4 -p /general/use_compositing -s false" resolves this.
GLX
GLX applications return errors and fail to run in x2go sessions. A workaround is to use 'xpra' -
https://github.com/Xpra-org/xpra/ - which should already be installed. Xpra is 'screen for X', a way of running a persistent graphical X11 program on the host, and redirecting its display to another session (in this case, the x2go session).
For an example, using 'glxgears' as the application:
An example of this with glxgears.
This command starts glxgears with session id :42 (the session number is arbitrary - one will be assigned automatically if not given, but particularly if you want to script this, you may wish to choose one someone else is unlikely to use):
-
xpra start --start=/usr/bin/glxgears :42
This command connects to the running session and displays the output:
If you try that in an x2go session, you should see glxgears running at this point. This command will list the running xpra sessions:
And 'xpra stop' can be used to end the session, e.g.:
You should in principle be able to substitute glxgears for any other X11 graphical application. Do take care to stop the session when you've finished using it, as it will run persistently consuming host resources otherwise.
If you have any problems, let us know at
helpdesk@hepREMOVETHIS.ph.liv.ac.uk. We are also looking at other alternatives to VNC, and if x2go does not meet your use case, we may be able to find a solution.
--
RobertFay - 07 Jan 2025