I am trying to configure my .xinitrc to be able to choose different window managers before starting X but I cannot reproduce the same environment as when I just run startx without a .xinitrc file in my home dir.

case $session in
awesome           ) exec awesome;;
ob           ) exec openbox-lxde-pi;;
# No known session, try to run it as command
*) exec $1;;

I am able to run either of my options on the file. The problem is that when I run openbox I don't enter to the default X session with all the menus and background processes running.

What is the exact command that happens when you run startx (and you have no .xinitrc)?

Is there a conf file that I need to specify to open box so I get the default session?

EDIT: I have checked the system wide file that startx runs in the case of an absent .xinitrc at home. These are it's contents:


# /etc/X11/xinit/xinitrc
# global xinitrc file, used by all X sessions started by xinit (startx)

# invoke global X session script
. /etc/X11/Xsession

and the file /etc/X11/Xsession never shows any call to start any window manager.

  • 1
    I think the issue here is that you want to set openbox as the window manager for LXDE, but what you want to actually start from .xinitrc is lxde. "What is the exact command that happens when you run startx (and you have no .xinitrc)?" -> see man startx; it either falls back on a system wide xinitrc or it just starts the X server with nothing on top. – goldilocks Apr 28 '15 at 15:35
  • I've checked the system wide xinitrc and didn't get any insight as what is the window manager it is loading by default. I edited the question to show the content of it. – pedrosaurio Apr 29 '15 at 15:16
  • Beware what startx does applies only literally to startx; if you are using a graphical login, that uses something else. – goldilocks Apr 29 '15 at 15:30
  • I am not using graphical login. – pedrosaurio Apr 29 '15 at 15:30
  • Have you looked through the openbox docs about this? Just to be clear the "default session" you say starts with no xinitrc is openbox? What about it is different from starting with an xinitrc? – goldilocks Apr 29 '15 at 15:36

Ok after fiddling around the system I found that startlxde-pi exists so and it is actually what launches the default raspbian session (with openbox). Running

xinit startlxde-pi 

does the job. Now I need to investigate how is that being called by startx when .xinitrc is missing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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