You can configure GNOME to automatically run applications or scripts when you log in. This method uses GNOME's autostart functionality to execute programs during startup without third-party tools. It applies to any Linux distribution running GNOME, such as Ubuntu, CentOS, or Red Hat.
By creating a simple autostart configuration file, GNOME can execute any script or application you specify. This setup ensures that programs launch automatically on login, simplifying repetitive tasks. For greater control, alternatives like systemd or crontab can be used to run scripts before or independently of login, but for GNOME users, autostart is usually sufficient.
This method is straightforward and allows for easy management of startup programs. No additional tools are required beyond what GNOME offers natively. You only need to specify the application or script and define its execution path within the GNOME startup configuration.
Steps to configure autostart programs for GNOME:
- Open GNOME Shell Activities.
- Search for and open Startup Applications.
- Click on the checkbox to uncheck or click on the Remove button to disable already enabled application from starting during GNOME startup.
- Select the Add button to configure a new startup program.
- Enter a name and description for the task.
- Specify the path to the application or script along with necessary arguments.
Ensure the user has execute permissions for the specified application or script.
Related: How to change file and folder permissions in Linux - Click the Add button to finish adding the startup entry to GNOME.
- Click on the Close button if you're not adding other startup entries.
- Check the generated autostart file to confirm.
The autostart file will be saved in the user's ~/.config/autostart directory with a .desktop extension.
Mohd Shakir Zakaria is an experienced cloud architect with a strong development and open-source advocacy background. He boasts multiple certifications in AWS, Red Hat, VMware, ITIL, and Linux, underscoring his expertise in cloud architecture and system administration.
Comment anonymously. Login not required.