[openbox] How do I set up openbox?

Alessandro Vesely vesely at tana.it
Sun Jun 4 05:54:03 EDT 2023


On Sun 04/Jun/2023 00:05:25 +0200 Steve Litt wrote:
> Alessandro Vesely said on Sat, 3 Jun 2023 19:25:58 +0200
>>
>>I don't recall what did I do to set up openbox.  Now I want to set up
>>another PC and I'm unable to find out any hint.  The
>>Help:Getting_started wiki page talks about cases I never saw.
> 
> I'm not sure what you mean by "set up".


I mean have it run when I start the box.  Yesterday I finally did using Debian 
alternatives, but it's still not clear how alternatives came into the play.

By a mix of recollection and deduction, I think I what I did on my PC was to 
uninstall all gnome stuff after installing openbox, which must have triggered 
it as the only alternative.


>>On my PC, I see openbox started by lightdm.  However, the string 
>>"openbox" appears nowhere in /etc/lightdm/*.  There is a directory 
>>/etc/xdg/openbox, but I'm not clear if/how it gets involved.
>
> If you're asking what program actually executes Openbox, I'm pretty 
> sure that if you start with startx it's ~/.xinitrc and if you start with 
> something like lightdm it's started by ~/.Xsession  .
> 
> The following is a copy of my .xinitrc:
> 
> ==================================================
> #!/bin/sh
> xrdb -load /home/slitt/.Xdefaults
> exec /usr/bin/openbox-session
> ==================================================
> 
> You'd probably have the same material in your ~/.Xsession   .


No, I don't have one.  And on xinit man page I read that, lacking a .xinitrc, 
the program runs xterm as the only client, which is not what I experience.

On the PC, rather than using startx, I have a graphic session-manager start up 
in the beginning.  I never chose between slim and lightdm; they happen.

In /etc/X11/Xsession, which might seem to be the file to look when there is no 
~/.Xsession, the string "openbox" doesn't appear.  However, in 
/etc/X11/Xsession.d/50x11-common_determine-startup there is a sequence like so:

# If there is still nothing to use for a startup program, try the system
# default session manager, window manager, and terminal emulator.
if [ -z "$STARTUP" ]; then
   if [ -x /usr/bin/x-session-manager ]; then
     STARTUP=x-session-manager
   elif [ -x /usr/bin/x-window-manager ]; then
     STARTUP=x-window-manager
   elif [ -x /usr/bin/x-terminal-emulator ]; then
     STARTUP=x-terminal-emulator
   fi
fi


And that's where Debian alternatives enter the game:

root at pcale:/etc# namei -l /usr/bin/x-session-manager
f: /usr/bin/x-session-manager
drwxr-xr-x root root /
drwxr-xr-x root root usr
drwxr-xr-x root root bin
lrwxrwxrwx root root x-session-manager -> /etc/alternatives/x-session-manager
drwxr-xr-x root root   /
drwxr-xr-x root root   etc
drwxr-xr-x root root   alternatives
lrwxrwxrwx root root   x-session-manager -> /usr/bin/openbox-session
drwxr-xr-x root root     /
drwxr-xr-x root root     usr
drwxr-xr-x root root     bin
-rwxr-xr-x root root     openbox-session

The best-kept secret in the boot sequence, eh?


> If you're asking how to configure Openbox, this is done in
> ~/.config/openbox/rc.xml


No, that's clear, both well documented and easy to guess.


Thanks for the replies

Best
Ale
-- 










More information about the openbox mailing list