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 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

1 Answer 1

up vote 6 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:

STARTUP=

Create a new file, ~/.xsession:

x-window-manager &
firefox

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

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.