Ssh – Do I need a desktop to run a GUI

sshwindow-managerxorg

I am setting up a lightweight VM, following the guide in the Ubuntu Documentation

What I want to be able to do is ssh into the VM and then launch a GUI application. I don't need / want a desktop.

First I installed xorg. But I can't launch a gui. The next step in the documentation is to install a "Window Manager", but it is not clear why this is necessary.

What is the smallest program that will run a gui?

I asked this on ubuntu.SE, but all of the answers required installing a window manager, all of which provide a desktop. The best answer was to go ahead and install a window manager and then limit what startx does with the .xintrc file.

Installing openbox increased the size of my original VM from 0.9 to 2.2GB. I want to minimize the size of my VM. What is the smallest group of programs that will allow me to launch a GUI?

Best Answer

If you only want to run GUI applications from a remote display, and never want to have a graphical environment inside the virtual machine, then you don't need to install anything other than the applications and whatever libraries it depends on.

You don't need to install an X server, which provides the capability of running GUI applications (it provides the underlying canvas for applications to draw on).

You don't need to install a window manager or desktop environment: these provide services like automatic window placement, ways to switch between multiple workspaces, keyboard and mouse commands to manipulate windows, ways to launch applications, all kinds of widgets and applets (little items that are more or less permanently displayed somewhere on the screen), … While you can run a GUI without a window manager, it'll be near-unusable. But you only need (indeed, only can) have a single window manager for your display: if you run a GUI application remotely, it's still managed by your local window manager.

Related Question