Tuesday, July 22, 2014

Gnome 3.12: Auto start applications with a delay

In gnome, applications can be start by copying *.desktop files into ~/.config/autostart.

The installed desktop files of your applications are in /usr/share/applications and in ~/.local/share/applications. Thus you can copy files from there into ~/.config/autostart and modify to your liking.

Off course, you can also create your own desktop files for running, or starting applications with a delay. For example, I made the desktop file called myautostart.desktop in ~/.config/autostart[Desktop Entry]
Type=Application
Name=MyStartup
Comment=Starts my applications
Exec=/bin/bash /home/put-your-user-name/.mystartups.sh
X-GNOME-Autostart-enabled=true
Hidden=false
NoDisplay=false

As can be seen the file starts ~/.mystartups.sh which has the following contents:#!/bin/bash
sleep 2
exo-open /usr/share/applications/terminator.desktop
sleep 1
exo-open /usr/share/applications/chromium.desktop

The file launches terminator and chromium using desktop files with 2 and 1 second delays.