For sure it is possible! In any .sh
script, you can combine as many commands as you wish! Then use the sleep
command to include a delay.
1. Create a launcher script: Thus, if you have two apps, myapp1.sh
and myapp2.sh
, make a third app for example myapplauncher.sh
, with the contents
#!/bin/bash
myapp1.sh &
sleep 15
myapp2.sh
This launches the first app and forks it to the background (by adding the &
). Thus, the script immediately proceeds with a sleep 15
command, introducing the 15 second pause. Then the second app is launched.
2. Create a .desktop launcher: The next step is to make a .desktop
shortcut for myapplauncher.sh
.
The easiest way may be to install a tool "Alacarte" or "MenuLibre". This provides a graphical interface to create desktop launchers.
Alternatively, create a .desktop launcher yourself. It should contain at minimum:
[Desktop Entry]
Name=Editor
Exec=gedit
Type=Application
You can add a comment (Comment=...
), specify an icon (Icon=...
), and more. You can see many examples of .desktop
files under /usr/share/applications
.
When finished creating the .desktop
launcher, copy it into ~/.local/share/applications
if it has to appear in the menu of your user only, or into /usr/local/share/applications
if the launcher should be available for all users. To achieve the latter, you need root permissions.