Translation(s): English -


When you start the X Window System on Debian, an X session will be created. There are a few different types of X sessions; this page describes the default Debian X session, and how to work with it.

The man pages Xsession(5) and Xsession.options(5) offer technical descriptions.

Starting the Debian X session

The standard ways to run a Debian X session are to run startx from a console login, or to login through a DisplayManager such as lightdm, gdm3 or xdm.

Some display managers may offer a choice of session types. If you select something other than a Debian X session, the remainder of this page may not apply completely.

Configuration

System-wide configuration

System-wide configuration of the Debian X session consists mainly of options inside the /etc/X11/Xsession.options file, and scripts inside the /etc/X11/Xsession.d directory. These scripts are all dotted in by a single /bin/sh shell, in the order determined by sorting their names. Administrators may edit the scripts, though caution is advised if you are not comfortable with shell programming.

The Debian reference manual describes how the defaults work:

  1. If the user has a ~/.xsessionrc file, read it.

  2. If a specific session was selected in gdm3, run it.

  3. Otherwise, if the user has a ~/.xsession or ~/.Xsession file, run it.

  4. Otherwise, if the /usr/bin/x-session-manager command exists, run it.

  5. Otherwise, if the /usr/bin/x-window-manager command exists, run it.

  6. Otherwise, if the /usr/bin/x-terminal-manager command exists, run it.

User configuration

User configuration should be done by creating a ~/.xsessionrc file, which will be used by all X session types. It is read by a POSIX shell (/bin/sh, typically provided by dash). You should avoid using features that are not supported in POSIX sh.

There are typically two kinds of commands you may wish to use in this file:

If you choose to dot in one of your regular shell dot files, make sure it does not use bash specific features, zsh specific features, ksh specific features, etc.

If you selected a GNOME session, additional configuration will be read from the ~/.gnomerc file, if it exists.

See also


CategoryBootProcess