Posts

Showing posts from July, 2021

Virtualising X11 GUI, printers and sound on Linux

I recently had a requirement to do some testing involving a GUI, a printer and sound devices on Linux. Would be simple with a laptop and a real printer, but in this case the work was being done on a remote data center in the cloud. So how do you do these sorts of tests when you haven't got the hardware in front of you? 1. A virtual GUI The X Window System, version 11 ("X11" for short) is the graphical subsystem used on most UNIX systems that handles the display 1.1 SSH tunnelling If you're running a GUI on your local Linux system (Or a comparable X11 server on something else!) then you can forward GUI traffic over an ssh connection. It's not particularly quick but it gives you an option. You can set up the forwarding from your local system with: ssh -X user@remotehost This will automatically define a DISPLAY environment variable on your ssh session with a value such as "localhost:10.0" which will tunnel the X11 traffic back to your local server. in If it