Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

What I want to be able to do is launch a GUI application. I don't need / want anything on the desktop.

First I installed xorg. But I can't launch a gui. The next step is to install a "Window Manager". So I installed xfce4, and then startx launches a desktop.

What do I need to launch a gui but not launch a desktop?

share|improve this question
    
I suppose you could do this, but I wouldn't think it would be very comfortable running everything in the terminal... –  TheX Sep 2 '11 at 14:57
    
@TheX That is a good point. While waiting for the answer to this question, I found that it was handy to have the standard desktop features around. However, when I am finished setting up this system, I'd like it to be a single-use VM for demonstrating the use of the software. Having everything minimal like this makes it easier to identify what additional features the software will need; most of these, like a text editor and bash shell, can be run from the command line. –  David Sep 2 '11 at 16:15
add comment

5 Answers

If you want to control exactly what runs when you run startx you should create a .xinitrc file in your home directory. If you make .xinitrc something very simple like:

xfwm4 &
xterm

Then startx will run with only a window manager and a terminal.

share|improve this answer
    
excellent. That is exactly what I was looking for. –  David Sep 2 '11 at 16:39
add comment

From gdm you can select xterm (recovery console) and it will give you a simple terminal runing on X. From it, you can start any gui app without the full desktop, like:

nautilus $HOME &

Since gnome is not running, the themes won't work so you'll see the application running in simple gtk (ugly but functional).

Remember to add & at the end so it returns to prompt in case you want to start other applications.

Also, if you install evilwm

sudo aptitude install evilwm

and run it fromt that xterm, also with the &, it will allow you to move the windows with Alt+click

evilwm &
nautilus &
whatever_program &
share|improve this answer
    
good advice on the evilwm, but I'd prefer not to install gdm, which itself is a gui. –  David Sep 2 '11 at 19:24
    
Well, in fact you don't need gdm, you only need it to launch the xterm. If you prefer you can install lightdm or even better, not install any session manager and launch x from a tty with startx command. Once you get a terminal on X you can launch evilwm and other programs. –  darent Sep 4 '11 at 1:54
add comment

If you start with a clean minimal installation, install openbox, then run startx on startup. After this, you just need to right click the desktop to access the Openbox menu which should allow you to launch a xterm or any installed applications.

Openbox is very light and has little dependencies.

share|improve this answer
add comment
up vote 1 down vote accepted

I asked this question over at unix.SE, and got the following answer:

If you build the VM and use it as a server, then ssh with x11forwarding (e.g. ssh -X), then the system does not need a desktop or window manager, although the host will.

share|improve this answer
add comment

why you don't install gnome it is easier !!!


Or if you still want xfce : http://www.omgubuntu.co.uk/2011/01/install-xfce-4-8-in-ubuntu-10-10-ppa/

share|improve this answer
    
Those are both heavy desktop environments, which he's explicitly trying to avoid. -1 –  Jo-Erlend Schinstad Sep 2 '11 at 2:23
    
what is the computer RAM in which you will install ? –  volvo14 Sep 2 '11 at 2:52
    
@volvo it is not a matter of RAM, it is that I want to make an application-specific VM rather than a desktop. –  David Sep 2 '11 at 3:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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