How to control order of startup items in Gnome?

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)?

-

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.

-
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? –  theTuxRacer Jan 19 '11 at 5:29

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.

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