How to AutoStart Applications on CentOS

Make sure Server should be configured as a Gnome-Desktop. 

  • To check the package is installed on the system: # yum list installed | grep gnome-desktop. 

  • To install the gnome package: #yum install gnome-desktop*  

  • To validate, you will see the app called gnome tweak under installed application 

  • Open the Activities overview and start typing Tweaks. 

  • Click Tweaks to open the application. 

  • Click the Startup Applications tab. 

  • Click the + button to get a list of available applications. 

  • Click + icon to add an application of your choice to the list. 

  • Now logout from the system and login back, you will see the added application will start automatically once user is logged into the system. 

How to AutoStart applications on Ubuntu 20.04 

The objective of this article is to show the reader how to auto-start applications after user login on Ubuntu 20.04 GNOME desktop automatically. 

  • Software Requirements and Conventions Used 

Software Requirements and Linux Command Line Conventions 

Category 

Requirements, Conventions or Software Version Used 

System 

Installed Ubuntu 20.04 or upgraded Ubuntu 20.04  

Software 

N/A 

Other 

Privileged access to your Linux system as root or via the sudo command. 

Conventions 

# – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command 
$ – requires given linux commands to be executed as a regular non-privileged user 

  • First step is to make sure that the gnome-session-properties package is installed and available on the Ubuntu system. If not available execute the below command to install it. 

              # sudo apt list --installed | grep gnome (to check the installed package) 

# sudo apt install gnome-startup-applications (to install a specific package) 

  • Next, via activities menu search for startup keyword: 

  • Click on the Startup Applications Preferences to begin the AutoStart applications configuration. 

  • Hit the Add button to add a new application to the AutoStart list. 

  • In this step you will need to enter a full path to the application’s binary executable of the application you wish to automatically start after user login. You may use the which Linux command to locate the full path of the application. 

  • For example, to locate a full path of the Firefox browser or Gnome terminal execute: 

# which firefox 

/usr/bin/firefox 

# which gnome-terminal 

/usr/bin/gnome-terminal 

  • Enter any Name and Comment. Include full path to the application within a Command field and hit Add. From now onwards every time, user logs into the Ubuntu system the selected application will start automatically.