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 want to start a program on top of X after startup. I want no desktop manager, nor window manager, but I just want to start a single program like Firefox after startup.

Is there a standard way to do it?

share|improve this question
up vote 8 down vote accepted

I remember way back I had to set up my own X stuff by writing a .xinitrc file and running startx. I suspect that won't work well with modern xorg/distros.

Alternatively, I notice that there's a file named /etc/X11/xinit that just launches the X session manager. I expect you could just edit that to do something else.

BTW, I think you probably do want a window manager or you might have trouble with Firefox. The default one is named x-window-manager.

Ok, here's a better answer ....

Create a new file, ~/.xsessionrc:


Create a new file, ~/.xsession:

x-window-manager &

Logout, and login again.

share|improve this answer
but it is not working on ubuntu – amin Nov 21 '11 at 11:54
Which 'it' isn't working? – ams Nov 21 '11 at 12:10
Ok, I did a bit of checking and found a better way ... edited above. – ams Nov 21 '11 at 12:59
If you want to skip logging in, you can use nodm as your desktop manager. – zstewart Jan 13 at 13:56

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.