First I saw this tip, but sleep 20;xscreensaver -nosplash
seems not to work anymore on Ubuntu 14.04.
So I coded this script execLater.sh
and put it at a place in my $PATH, chown
ed it root:root
and mode permissions rwxr-xr-x
, and put it on a fully root:root
folder structure like /usr/local/bin
.
sleep $1;shift;"$@"
So it sleeps before executing the command.
Show all hidden startup applications by following this tip
Now for each startup application.
If there is, for example, this:
xscreensaver -nosplash
change to this below, where "20" is the delay; I used up to "60" knowing I dont care much for some applications; and a minimum of "5" for the ones I care most.
execLater.sh 20 xscreensaver -nosplash
The tricky part
each of these below must have an exclusive delay of "1" because everything else depends on them
/usr/bin/gnome-keyring-daemon --start --components=secrets
/usr/bin/gnome-keyring-daemon --start --components=pkcs11
/usr/bin/gnome-keyring-daemon --start --components=gpg
/usr/bin/gnome-keyring-daemon --start --components=ssh
/usr/lib/unity-settings-daemon/unity-fallback-mount-helper
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
gsettings-data-convert
start-pulseaudio-x11
nautilus -n
My guess is, when all 60 apps startup at same time, these above take longer to complete and so the whole desktop stays unavailable...
If you log when each command was executed, you will understand what applications must have delay of "1", because all others are "actually only executed (?)" or "called?" after these; the above list is not fixed, it is just a tip, just logoff and login (no need to reboot to complete this list) so you can make the tests until you are satisfied with the results - now my desktop is available after only 5 seconds :)
I am not sure what Syndeamon is or should do, but it could very well be that it is started too early, and crashes because the desktop is not fully loaded yet.
What you can do is to add a small pause of 10-15 seconds to the start up command.
To do that:
You can experiment a bit with the time to optimize it.
Explanation
Some commands break if you add them to startup applications, because they need a fully loaded desktop to run succesfully, and Startup Applications runs the commands too early.
Touchpad- related commands are in that category, and then you need to add a little break after startup to make it work.
Since Startup Applications creates a .desktop
file in ~/.config/autostart
to run the startup command, you need the "regular" syntax to add a complicated command to be used in a .desktop
file, which is in this case:
/bin/bash -c "sleep 15&&syndaemon -i 0.3 -d -K"
Best Answer
if the startup app is a script, you could add as the last line of the script,
logger "such-n-such script started."
Then, it will appear in /var/log/syslog