PDA

View Full Version : [other] parts of my openbox autostart.sh don't work



Stefanie
January 9th, 2009, 10:39 AM
i've been using openbox for a few days but i can't get some parts of my autostart.sh-file to work properly.
this is the file:


#!/bin/bash

# Run the system-wide support stuff
. $GLOBALAUTOSTART

xset b off &
xmodmap /etc/SwapCapsEsc.kmap &

# Programs that will run after Openbox has started
(sleep 2 && gnome-panel) &
(sleep 2 && nm-applet) &
(sleep 2 && combiconky) &
(sleep 2 && gnome-do) &
(sleep 2 && checkgmail) &
(sleep 2 && genesis) &



everything seems to work fine except "xset b off" (to turn that stupid system bell off) and the xmodmap-line (script to swap caps lock and escape). both work fine in gnome, why doesn't it work in openbox?

der_joachim
January 11th, 2009, 09:36 AM
Are you sure that xset and xmodmap need to be backgrounded? AFAIK they are not meant to be run as daemons. What happens if you remove the ampersands at the end of the xset and xmodmap lines?

Stefanie
January 12th, 2009, 10:49 AM
thanks for your reply, but that didn't help. i also tried enclosing the commands in brackets, quotes or backticks but still no result.

urukrama
January 12th, 2009, 01:35 PM
Both those commands rely on X. Perhaps they are run before X is fully loaded, and therefore have no effect. Have you tried them with some sleep (like you do with the other commands)?

Stefanie
January 14th, 2009, 10:28 AM
the first time i tried them i put them at the end of the file with sleep 2, like my other applications, but that didn't work either. do you think increasing the sleep-time might help?

urukrama
January 14th, 2009, 01:48 PM
I just tried it myself, and it works fine in my Openbox session (I checked the xset settings with xset q and it made the changes I requested).

My guess is that gnome-settings-daemon (or xfce-mcs-manager), which is started by the default autostart.sh script with the . $GLOBALAUTOSTART command, overrides those settings. A brief internet search seems to confirm this.

You'd either have to use something else to set your Gtk themes, change the settings in Gnome (using gconf-editor, look under desktop/gnome/peripherals/keyboard for both keyboard and system bell settings), or possibly load xset after gnome-settings-daemon is fully loaded.

Stefanie
January 15th, 2009, 11:56 AM
thanks, i didn't know about gnome-settings-daemon overriding those options. i will try to find a work around.

(where's the thanks button gone?)

Stefanie
January 16th, 2009, 10:34 AM
i increased the sleep time and it seemed to work after logging in again, but after restarting it doesn't work anymore :confused:

urukrama
January 16th, 2009, 11:06 AM
If you do use gnome-settings-daemon, why don't you just adjust the settings in gconf-editor? You will then have no need to launch xset and xmodmap. If you start gconf-editor, have a look under desktop/gnome/peripherals/keyboard and you should see all the options you want.

Stefanie
January 19th, 2009, 10:29 AM
ok thanks.