9

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?

1 Answer 1

8

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 [Note the capital X]:

x-window-manager &
firefox

Logout, and login again.

5
  • but it is not working on ubuntu
    – amin
    Nov 21, 2011 at 11:54
  • 1
    Which 'it' isn't working?
    – ams
    Nov 21, 2011 at 12:10
  • Ok, I did a bit of checking and found a better way ... edited above.
    – ams
    Nov 21, 2011 at 12:59
  • If you want to skip logging in, you can use nodm as your desktop manager.
    – zstewart
    Jan 13, 2016 at 13:56
  • x-window-manager seems to bring of a blue background before the app loads. Where is the x-window manager loading the backrgound from? Oct 27, 2020 at 21:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .