How do I start a program automatically in a Linux desktop environment?

Source: Internet
Author: User

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.

    1. $ 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.

    1. $ mkdir-p ~/.config/lxsession/lubuntu/
    2. $ Touch ~/.config/lxsession/lubuntu/autostart
    3. $ 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.