9.4.5 X sessions
An X session (X server + X client) can be started by:
startx: wrapper script command for
xinit to start an
X server and client from a Linux character console. If
does not exist,
/etc/X11/Xsession is executed through
display manager daemons to start the X server and client, and to control login
via a GUI screen.
/etc/X11/Xsession is directly executed.
The console can be made available as in "Let me disable X on boot!",
126.96.36.199 Custom X sessions
The default startup script
/etc/X11/Xsession is effectively a
/etc/X11/Xsession is somewhat affected by
/etc/X11/Xsession.options and is essentially an execution of a
program which was first found in the following order with the
~/.Xsession, if it is defined.
/usr/bin/x-session-manager, if it is defined.
/usr/bin/x-window-manager, if it is defined.
/usr/bin/x-terminal-emulator, if it is defined.
The exact meaning of these commands is determined by the Debian alternative
system described in
commands, Section 6.5.3. For example:
# update-alternatives --config x-session-manager
# update-alternatives --config x-window-manager
In order to make any X window manager a default while keeping GNOME and KDE
session managers installed, replace
/etc/X11/Xsession.d/50xfree86-common_determine-startup with the
one attached in the second bug report at
(I hope this will be included soon) and edit
/etc/X11/Xsession.options as follows to disallow the X session
# configuration options for /etc/X11/Xsession
# See Xsession.options(5) for an explanation of the available options.
# Default enabled
# Default disabled (enable them by uncommenting)
Without the above mentioned modification to the system,
kdebase are the packages containing
these X session managers. Removing them allows X window manager to be a
default. (Yack, any better idea?)
On a system where
/etc/X11/Xsession.options contains a line
allow-user-xsession without preceding characters, any user who
~/.Xsession will be able to
customize the action of
The last command in the
~/.xsession file should use form of
exec some-window/session-manager to start your favorite
X window/session manager.
A good example of an
~/.xsession script is given at
I use this to set the window manager, screen access, and language support for
each user account. See
Starting an X session for a
user, Section 188.8.131.52,
Getting root in X, Section
Example for a multilingual X window system,
If you wish to have several X client programs started automatically, see X clients, Section 9.4.4 examples and invoke them from
~/.xsession instead of
User-specific additional X resources can be stored in
X resources, Section
User-customized keymaps and pointer button mappings in X can also be specified
in the user's start up script. See
Keymaps and pointer
button mappings in X, Section 9.4.11.
184.108.40.206 Starting an X session for a user
Following the principle described at
Custom X sessions,
Section 220.127.116.11, a user-specific X session/window manager can be activated
by installing the package indicated and setting the contents at the end of
~/.xsession file as follows. (I like
fluxbox for its simple style and fast
Window Managers for X.
18.104.22.168 Setting up KDE and GNOME
In order to setup full KDE or GNOME environment, the following metapackages are
Installing these packages with tools which handle Recommends, such
aptitude, provides you with richer
choices of software than just installing these with
If you want console login, be sure to disable X display managers, such as
wdm, which may be pulled
in by the dependencies, as described in "Let me disable X on boot!",
If you want to have GNOME as the system default over KDE, make sure to
x-session-manager as in Alternative commands, Section