How to Install a GUI Program on Ubuntu Server – Server Package Management

package-managementserver

I am using Ubuntu Server 10.10 in a VirtualBox. I need to install a single GUI program (RubyMine) on it.

I checked out installing ubuntu-desktop with apt-get, and it wants me to install 430 new packages (including OpenOffice). I installed the server in the first place to keep the install as clean as possible!

How do I do a minimal install of (all packages needed) to run that single GUI program?

I created a file /etc/apt/apt.conf and added the following:

APT::Install-Recommends "0";
APT::Install-Suggests "0";

But sudo apt-get install ubuntu-desktop still says:

0 upgraded, 430 newly installed, 1 to remove and 9 not upgraded.
Need to get 155MB of archives.
After this operation, 542MB of additional disk space will be used.
Do you want to continue [Y/n]? n

Best Answer

You can install X without a complete desktop environment but to be upfront and honest, installing ubuntu-desktop is probably the quickest and config-free method of doing what you want.

For our media centre, I use a simple stack of: nodmxserver-xorgopenbox. It's very raw but it allows me (with a bit of scripting) to have the system boot to X and then launch the media centre application (Boxee here). I could probably have gone without openbox but it's nice to have some sort of Window Manager just in case I do want to run something else.

When I was doing it, I followed a whole raft of different documentation but the bulk of it is summed up here. In short you should be aiming to:

  1. Install nodm, X, etc.
  2. Configure nodm by telling it what user to run as (I do suggest creating a non-root user)
  3. Create a ~/.xsession file to boot whatever application you want to be running. In my case this is:

    #!/bin/sh
    
    exec /home/oli/uberboxee
    

    You'd just swap out /home/oli/uberboxee for your launcher.

Just as a side note, if you install something that requires, for example, GTK, you'll find it might pull in a massive number of recommended packages. To keep things light, I strongly consider you run your apt-get installs with the --no-install-recommends flag.

The Low Memory System page on help.ubuntu.com is a good resource for finding alternatives to the Gnome desktop. Installing a desktop suite is going to bring a lot of stuff but it might save you a little bit of configuration.

Related Question