[openbox] Run on startup

Holly Bostick motub at planet.nl
Fri Dec 10 08:59:04 EST 2004


Lutz Schönemann wrote:

> Does this work also with gdm? Is there no other way with a specific 
> config file of openbox (i.e. rc.xml)?

Not exactly-- gdm doesn't use  ~/.xinitrc. So I use a separate script 
(~/obstart.sh), and edit the openbox.desktop file in 
/etc/X11/dm/Sessions to point to it.

As follows-- openbox.desktop is actually just a text file, but can't be 
opened from the file manager; open a root text editor and open it from 
there.

You should see something like:

[Desktop Entry]
Encoding=UTF-8
Name=Openbox
Comment=Openbox
TryExec=/usr/X11R6/bin/startopenbox
Exec=/etc/X11/xdm/Xsession Openbox
Icon=
Type=Application

I would then change the Exec= line to point to my script. ~/obstart.sh, 
so the desktop entry now looks like this:
[Desktop Entry]
Encoding=UTF-8
Name=Openbox
Comment=Openbox
TryExec=/usr/X11R6/bin/startopenbox
Exec=/home/username/obstart.sh
Icon=
Type=Application

Save this and exit.

The obstart.sh script itself looks like this:

#!/bin/bash
export LANG="nl_NL at euro"
devilspie &
numlockx &
feh --bg-scale /usr/share/backgrounds/0106_1024.jpg &
/usr/libexec/gnome-settings-daemon &
feh --bg-scale /usr/share/backgrounds/flower.png &
LinNeighborhood -m &
(sleep 15 &&  gnome-panel) &
multi-gnome-terminal &
(sleep 20 && thunderbird) &
(sleep 25 && firefox) &
(sleep 120 && krusader) &
#(sleep 125 && korn) &
#(sleep 40 && gnome-terminal --window-with-profile=boinc) &
exec openbox

When I select openbox from the GDM menu, the script is run, starting all 
of the programs I want and then Openbox.

Hope this helps,
Holly


>
> Jesper Noehr wrote:
>
>> Put 'em in ~/.xinitrc as such:
>>
>> mmkeys &
>> xmms &
>> exec openbox
>>
>> On fre, 2004-12-10 at 14:30 +0000, Lutz Schönemann wrote:
>>
>>> How can I configure Openbox to run some apps when it starts up? Fluxbox
>>> has a file called startup where you can place some commands that should
>>> be executed on startup. Someone can help me?
>>>
>>> Thnx
>>
>>
>>
>




More information about the openbox mailing list