2

How would you control the order of startup items in Gnome?

For example on my system I have a program called Tilda that requires that Compiz be loaded so that transparency will work, otherwise if it isn't I have to manually close and reopen the program once it is loaded for the transparency to work.

I have tried using the startup applications, and editing the launcher to add sleep 3 && tilda but this doesn't seem to work.

So is there anyway to control the order of startup items so that programs that require compiz or some other feature like the notification area(for dock only setups not using the gnome-panel)?

2 Answers 2

3

You have the right idea using the command sleep 3 && tilda, but that doesn't work.
If you look in ~/.xsession-errors you probably find the following error message:

sleep: invalid time interval `&&'
sleep: invalid time interval `tilda'
Try `sleep --help' for more information.

This is because the command is not executed like it would be if you ran it from a terminal.
The workaround for this is to change the command to bash -c "sleep 3 && tilda".

More detailed information on session startup ordering: http://ubuntuforums.org/showthread.php?t=1119945.

1
  • 1
    Doesnt that have something to do with runlevels? Cant he tell the Tilda script to start on a particular runlevel ie after Compiz has loaded? Jan 19, 2011 at 5:29
2

Open gedit (or any other text editor you might like) and paste in the following

#!/bin/bash

while [ -z `pgrep compiz` ]; do
    sleep 5
done

tilda

Save it as .tildastart.sh in your homefolder. Make the script executable (in a terminal you would issue chmod +x .tildastart.sh).

Go to startup applications (System -> Preferences) and add the script.

1
  • You can do this inline with bash -c 'while ...'too. Saves on writing a whole script. Nice idea though.
    – Oli
    Jan 23, 2011 at 0:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .