To set up your Parrot OS system to autostart applications in a specific order when you log into your desktop environment, you can follow these steps:
- Press
Alt + F2, then typegnome-session-propertiesor just search for "Startup Applications" in your application menu (depending on the desktop environment you're using). - If you don’t see the "Startup Applications" tool, you can install it by running the following command in a terminal:
sudo apt install gnome-startup-applications
You will need to add each application to the startup list in the correct order. However, most desktop environments execute all applications in parallel by default, so we'll need to use a workaround for ensuring they start in a specific order.
To enforce the order of the startup applications, you can create a shell script that starts each application with a delay, ensuring they launch in the specified sequence.
Create a custom script that runs the applications with a delay:
-
Open a terminal and create a new shell script:
nano ~/autostart.sh -
Add the following content to the script to start the applications in the desired order, with small delays between each launch:
#!/bin/bash # Must Sleep A Bit For System Startup sleep 4 # Start KeePassXC keepassxc & sleep 2 # Start Brave Browser brave-browser --incognito & sleep 2 # Start VSCodium codium & sleep 2 # Start Terminal gnome-terminal &
The
sleep 2ensures a 2-second delay between the launches. You can adjust the delay as necessary for your system’s performance. -
Save and exit by pressing
CTRL + X, thenY, and thenEnter.
Run the following command to make the script executable:
chmod +x ~/autostart.shNow, you need to add this script to the startup applications list.
- Open Startup Applications (same as step 1).
- Click Add and provide the following:
- Name:
Custom Autostart - Command:
/home/your-username/autostart.sh(replaceyour-usernamewith your actual username) - Comment: (optional) "Starts apps in a specific order"
- Name:
Alternatively, you can add it directly by editing the autostart configuration file:
vim ~/.config/autostart/custom-autostart.desktopAdd the following content:
[Desktop Entry]
Type=Application
Exec=/home/your-username/autostart.sh
Name=Custom Autostart
Comment=Starts applications in specific order
X-GNOME-Autostart-enabled=trueNow, when you log back into your Parrot OS system, the applications will start in the specified order.