[openbox] Run on startup

Holly Bostick motub at planet.nl
Fri Dec 10 09:13:13 EST 2004


Lutz Schönemann wrote:

> This is a nice solution but then a ~/obstart.sh file has to be in 
> every homedir.

No it doesn't. It could be anyplace you want; I just use my home 
directory because I'm the only user, and that's easier for me.

No reason why it couldn't be in /etc/X11/dm/Sessions, /usr/bin, or 
wherever. The only issue is if different users want to start different 
programs, but in that case you'd have to write multiple scripts anyway, 
unless you used a session manager in combination with Openbox (in which 
case, it might be easier to just use ROX and Openbox together, or GNOME 
or KDE with Openbox, for that matter), replacing the WM under those DEs 
with OB (all three of them allow this).

Holly



>
> Holly Bostick wrote:
>
>> 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