Oracle® Solaris 11.2 Desktop Administrator's Guide

Exit Print View

Updated: July 2014
 
 

Setting Session Defaults

    Certain applications might be configured to start automatically when you log in. Applications to be started are specified by placing a .desktop file for each application in the appropriate directory, as defined in the Freedesktop Application Autostart Specification. When you log in, the system searches the following directories for the .desktop files in the following order:

  1. The ~/.config/gnome-session/saved-session directory.

  2. The $XDG_CONFIG_HOME/autostart directory. If the $XDG_CONFIG_HOME environment variable is not set, searches in the ~/.config/autostart default directory.

  3. The autostart subdirectory of each directory in the $XDG_CONFIG_DIRS. If the $XDG_CONFIG_DIRS environment variable is not set, searches in the /usr/share/gnome/autostart:/etc/xdg/autostart default directory list.

    If conflicting .desktop files for the same application are found, the .desktop file that is found first takes precedence.

The .desktop file of an application must have the format defined in the Working With Desktop Entry Files. All keys should be interpreted as defined, with the following exceptions. These exceptions take into account that the .desktop files in an autostart directory are not shown in a menu.

  • Hidden key – If the Hidden key is set in the .desktop file, then the application described in the .desktop file will not be shown on the Applications menu, even though it is installed. The Hidden key is a quick way to remove infrequently used applications from the menu, without deleting the .desktop file or uninstalling the application.

    When the .desktop file has the Hidden key set to true, the .desktop file must be ignored. When multiple .desktop files with the same name exist in multiple directories, then only the Hidden key in the .desktop file that is found first must be considered. If that Hidden key is set to true, all .desktop files with the same name in the other directories are also ignored.

  • OnlyShowIn and NotShowIn keys – The OnlyShownIn entry contains a list of strings identifying the desktop environments that will autostart this application. All other desktop environments will not autostart this application. For example, OnlyShowIn=GNOME;KDE.

    The NotShowIn entry contains a list of strings that must not autostart this application. All other desktop applications must autostart this application.


    Note - Only one of these keys, either OnlyShowIn or NotShowIn, may appear in a single .desktop file.
  • TryExec key – The value of the TryExec key must match an installed executable program, or the program will not autostart. The value of the TryExec field may either be an absolute path or the name of an executable without any path components. If the name of an executable is specified without any path components, the $PATH environment is searched to find a matching executable program.

To set default session applications for all users, place the appropriate .desktop files in the /etc/xdg/autostart directory.