Most Linux desktop environments have their own graphical user interface (GUI) that allows users to configure automatic startup programs or services for specific users. This article describes how to start a program automatically in a variety of Linux desktop environments.
AD:WOT2014: User labeling system and user data Operation training session
"51CTO" Sometimes, when you log in to the Linux desktop, you may want to start a program automatically. These start-up programs can be configured for an entire system (such as an automatic proxy), or customized for a specific user's desktop (such as Conky), after you log in to the desktop.
Most Linux desktop environments have their own graphical user interface (GUI) that allows users to configure automatic startup programs or services for specific users.
In this tutorial, I'll show you how to start a program automatically in a variety of Linux desktop environments.
GNOME Desktop Environment
Run this command in the terminal to start the "Startup Applications Preferences" (Launch application Preferences) GUI.
- $ gnome-session-properties
Click the "Add" button to configure a new launch application. Type the name of the application and the CLI command for the application, respectively, into the Name column and command bar. Type an optional description into the "Comment" (note) column.
Unity Desktop Environment
Type "startup" in Unity Dash. Once the "Startup Application" icon appears, click on the icon.
Once the startup applications Preferences (Launch Application Preferences) window opens, enter "name", "command", and "Comment" (note) to configure a program that starts automatically.
KDE desktop Environment
First, open the System Settings window. You will find the "Startup and Shutdown" (Start and close) icon under System administration. Click the icon.
You will be asked to select an application that starts automatically from a list of known applications. If your program is not listed, enter the name of the application in the blank area above. If the program (such as a CLI command) will run in the terminal, select the run in terminal (running in terminal) check box. Click the "OK" button.
Next, you are asked to enter the details of the application, including the name, command, and description.
After that, you will see that the program has finished configuring and can be run automatically. To configure an additional launcher/script, you can click on the "Add Program" button or the "Add Script" button in the right sidebar.
Mate Desktop Environment
On the Mate desktop, go to "Applications" (application), Preferences (Preferences), "Startup Applications" (Launch application).
You will see the "Startup Applications Preferences" (Launch application Preferences) window. Click the "Add" button.
Enter the details of the startup application: "Name", "command" and "Comment" (note).
XFCE Desktop Environment
From the XFCE desktop menu, choose Settings Manager (Setup Manager). In the "Settings" window, click the "Session and startup" icon.
Under Application Autostart (Application Auto-Start) tab, click the Add button at the bottom.
Enter the details of a program that starts automatically: "Name", "command" and "Description" (description).
LXDE Desktop Environment
To configure the startup application in the LXDE desktop environment, simply run the following commands in the terminal.
- $ mkdir-p ~/.config/lxsession/lubuntu/
- $ Touch ~/.config/lxsession/lubuntu/autostart
- $ Leafpad Autostart
Then, add the following item to the auto-start file that you created:
@conky
Here, "Conky" is the name of the CLI command that I want to run automatically after logging in.
Save and close.