Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to start the GNOME 2 desktop environment manually from scratch but have a few questions. This is an experiment, you can call it a school project.

I need to make a /usr/share/xsessions entry that will start the gnome desktop without starting "gnome-session" but rather each app that is required manually.

Obviously, I will need a script because there are several applications that need to be launched. I know i need to start gnome-panel and networking, and nautilus, and gtk, could someone point me in the right direction as of how it should look like (apps that need to be started and in what order)?


share|improve this question
up vote 2 down vote accepted

A minimal session would be something like this:

#!/usr/bin/env bash
metacity & #start the window manager. You could use compiz, openbox etc. instead
gnome-settings-daemon & #ensure themes show properly
gnome-panel & #run the panel. You could use avant-window-navigator, docky etc. instead
nautilus & #show your desktop background and icons

This will not load your gnome startup applications so you will need to add these to this script.

To test this out, save the script into the file ~/.xinitrc and make the file executable (chmod +x ~/.xinitrc). Then logout and log back in again but choose 'User Defined Session' as your session.

share|improve this answer
Thank you so much! It's working like a charm! – Martin Zeltin Jun 11 '11 at 17:38

Your Answer


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.