Use Gnome-Boxes In Linux Lite 4.x With SSH X11 Forwarding

I have a nice little Linux Lite 64bit ASUS desktop computer with 4Gig of RAM and a decent little AMD CPU that I like very much. I’ve tweaked it and the Linux Lite OS to do a lot of things including some Ruby work. It can run a virtual box reasonably well but with 4Gig of RAM it slows at times more than I’d like. I also have a couple of newer and bigger Debian 9.9 computers, and one that is a LAMP Web server with a complete Debian 9.9 DE, and SSH. Both of them have gnome-boxes installed and a bunch of virtual systems. I use SSH, VNC and Remmina to connect to both of them with my Linux Lite system, but I want to discuss using X11 forwarding and single application launching as a much more RAM efficient way of working with virtualized systems from my Linux Lite client. It allows me to get the heavy lifting done with my more powerful machines, and gives my little Linux Lite desktop access to their power and speed.

I’m going to assume here that you have a situation like mine and would like to connect to another machine running a virtualized OS with an SSH X11 forwarded connection. If you have never used SSH, or only used it with SFTP, or as a tunnel for VNC, my tutorial at the link below is worth the read, as it covers various types of connections, various ways of securing your connections, and setting up keys, etc.

Linux Lite 4.x Connections To & From Debian 9

If you’re already setup with a keyed SSH connection all you really need to do is change one line in your sshd_config file on the machine where you are running virtual systems with the gnome-boxes application. From sudo or a root prompt run the command nano /etc/ssh/sshd_config When the file opens scroll down and locate the line #X11Forwarding. Backspace out the # (uncomment) and add the yes at the end of the line if necessary so that it reads like the image below: X11Forwarding yes

That should do it for the SSH server end of your connection. Now go to your Linux Lite computer, open its XFCE4 terminal and type the command like it is shown here below.

ssh -X yourusername@yourseversIPv4address gnome-boxes 2>/dev/null

The -X sets your Linux Lite client to allow X11 forwarding from the server’s end so that you can use the server’s applications with a GUI on your Linux Lite desktop. The 2>/dev/null just sends error messages into the void instead of printing them out in your terminal. Gnome-boxes like many Linux graphical applications will normally print out a series of GTK warnings when started from the CLI rather than the GUI. See image below:

If all has gone well you should be presented with the gnome-boxes graphical interface on your Linux Lite desktop. See image below:

Choose a virtual system from the menu i/e the Linux Lite 4.x virtual system I have installed on my Debian 9 main desktop computer. Everything should load normally for you. See image below:

Test out the workability of the system. It should run as fast as it does on whatever computer you have it installed to because that is where it is running. Your Linux Lite client is only producing the graphical interface. Open the menu and start an application. See image below:

To prove the point start a heavy application like Firefox and while you’re at it go ahead and go to the Linux Lite forum. See images below:

Test your file manager. Everything should run just as fast as it does on your bigger machine.

When you’re finished just log out and shut down like you normally would. See images below:

Gnome-boxes will return to its system start up page with your listed installed virtual systems. I’ll run Fedora next here and show a few screenshots just for demonstration purposes. See images below:

When you’re done shut down your virtual system and after the boxes interface shows that your virtual systems are powered off just close the gnome-boxes window with the X in the corner. See image below:

The SSH connection will end, and your terminal will return your command prompt.

SSH with X11 forwarding will allow you to connect your Linux Lite 4.x client to other computers and graphically display many of the applications on those machines without the client RAM tax of using VNC connections.

Return To Index Of Tutorials