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?


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.

  • Great. I think that this is exactly the answer that I was looking for; I'll try it out next week. Does this mean that I don't need to ssh with -X? – David LeBauer Oct 22 '11 at 2:13
  • @David You need ssh -X whenever you want to run a remote X application (or equivalently put ForwardX11 yes in your ~/.ssh/config). – Gilles 'SO- stop being evil' Oct 22 '11 at 2:21
  • I think I get it now, after reading this and @billthors answer - that 'x forwarding' implies the use of the host / local X capacity – David LeBauer Oct 22 '11 at 3:57

If you are accessing the program remotely, you don't need a GUI or window manager on the server. SSH can be configured to do X11Forwarding. You will need an X-server on your end to do provide the display, keyboard, and mouse.

Alternatively, there are Xservers which provide a dummy display driver. This can be usefull if you need an Xserver, but don't need to interact with or view the output using the XWindow display. The most common use I have seen for this is report generation.

A RDP or VNC Xserver can be used to provide a Display without a window manager. You will need to provide the display id to the program. Some programs have a display parameter, but typically a DISPLAY environment variable is used to specify the display.

I documented what I did in my posting on Remote Desktops with VNC and RDP. You can skip installing xdm if you only need the display. You could skip xinetd as well and run the VNC server from the command line.


To answer the question in the thread title, no. You can run a lightweight window manager that doesn't provide a desktop and still use GUI applications.

In most Linux distributions, twm comes bundled with X, so you could use that without installing any additional software.

Alternatively, you could look at one of the lightweight wm's like ratpoison or dwm.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.