Automatically starting applications during login.

This document (7001106) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Desktop (SLED) or Server (SLES)
openSUSE

Situation

Applications, scripts, or commands need to be run for a user at login time.  These can be scripts, commands, or graphic applications.

Resolution

Text Based

For startup of scripts, daemons, declaration of environment variables, and applications that are not dependent on the graphic desktop being up and running you can modify (or create if it does not exist) the file ~/.profile.  By default this file already exists and has some information that may be helpful.  This file is executed each time the user logs in whether it is in runlevel 3 (text based) or runlevel 5 (graphic desktop).

GNOME

Option 1.  Right-Click a menu item and select "Add to Startup Programs"

Option 2.  Open the main (Computer) menu and select "Control Center" (on the right side).  In the Control Center select"System" on the left then "Sessions" on the right.  This will take you into the Session Manager.

In the Session Manager select the "Startup Programs" tab at the top.  This will give you a listing of all applications that will start on login to the GNOME desktop.

From within the session manager you can add, edit, delete, or disable the startup commands for the applications.

Option 3.  Place a ".desktop" file, executable application file or script in the directory "~/.config/autostart".

KDE

Place a ".desktop" file, executable application file or script in the directory "~/.kde/Autostart".

Additional options can be placed in the .desktop file for KDE that will indicate when the application should be started and possible conditions for starting the applications.

X-KDE-autostart-phase=1

This field describes the phase in which the application should be started. There are currently two phases defined:

     1     Before applications that are part of the session are restored by the session manager.
     2     After applications that are part of the session are restored by the session manager.

The default is 1. If an application is auto-started but can also be part of the session, you typically want to have it in phase 2, that way the application that gets auto-started can detect that it has already been restored by the session manager and exit.

X-KDE-autostart-condition=kalarmdrc:General:Autostart:true

This field makes the auto-start of the application conditional. In this example the application is only started if the config file kalarmdrc has the key Autostart in the General group set to true. The value true at the end of the line is used as default value if the key or config file is not present.

X-KDE-autostart-after=panel

This field can be used to control when an application should be auto-started. It refers to the name of another desktop file in the Autostart directory. In this example the application will be started after the panel (Kicker) has been started. This is useful for such things as applications that dock into the panel.

Additional Information

Note

Both GNOME and KDE can make use of a ".desktop" file placed in the autostart directory indicated above.  This file is generally included in the installation of the application but if it is not, the creation of a launcher on the Desktop will create one in the users ~/Desktop directory.  There are many options which can be included in the .desktop file including the special startup options for KDE mentioned above.  For more information on the .desktop file format see the documentation at http://standards.freedesktop.org/desktop-entry-spec/latest/


Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7001106
  • Creation Date: 05-Aug-2008
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Desktop
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center