Next: , Previous: , Up: Services   [Contents][Index]


6.2.7.5 X Window

Support for the X Window graphical display system—specifically Xorg—is provided by the (gnu services xorg) module. Note that there is no xorg-service procedure. Instead, the X server is started by the login manager, by default SLiM.

To use X11, you must install at least one window manager—for example the windowmaker or openbox packages—preferably by adding it to the packages field of your operating system definition (see system-wide packages).

Scheme Variable: slim-service-type

This is the type for the SLiM graphical login manager for X11.

SLiM looks for session types described by the .desktop files in /run/current-system/profile/share/xsessions and allows users to choose a session from the log-in screen using F1. Packages such as xfce, sawfish, and ratpoison provide .desktop files; adding them to the system-wide set of packages automatically makes them available at the log-in screen.

In addition, ~/.xsession files are honored. When available, ~/.xsession must be an executable that starts a window manager and/or other X clients.

Data Type: slim-configuration

Data type representing the configuration of slim-service-type.

allow-empty-passwords? (default: #t)

Whether to allow logins with empty passwords.

auto-login? (default: #f)
default-user (default: "")

When auto-login? is false, SLiM presents a log-in screen.

When auto-login? is true, SLiM logs in directly as default-user.

theme (default: %default-slim-theme)
theme-name (default: %default-slim-theme-name)

The graphical theme to use and its name.

auto-login-session (default: #f)

If true, this must be the name of the executable to start as the default session—e.g., (file-append windowmaker "/bin/windowmaker").

If false, a session described by one of the available .desktop files in /run/current-system/profile and ~/.guix-profile will be used.

Note: You must install at least one window manager in the system profile or in your user profile. Failing to do that, if auto-login-session is false, you will be unable to log in.

startx (default: (xorg-start-command))

The command used to start the X11 graphical server.

xauth (default: xauth)

The XAuth package to use.

shepherd (default: shepherd)

The Shepherd package used when invoking halt and reboot.

slim (default: slim)

The SLiM package to use.

Scheme Variable: %default-theme
Scheme Variable: %default-theme-name

The default SLiM theme and its name.

Data Type: sddm-configuration

This is the data type representing the sddm service configuration.

display-server (default: "x11")

Select display server to use for the greeter. Valid values are "x11" or "wayland".

numlock (default: "on")

Valid values are "on", "off" or "none".

halt-command (default #~(string-apppend #$shepherd "/sbin/halt"))

Command to run when halting.

reboot-command (default #~(string-append #$shepherd "/sbin/reboot"))

Command to run when rebooting.

theme (default "maldives")

Theme to use. Default themes provided by SDDM are "elarun" or "maldives".

themes-directory (default "/run/current-system/profile/share/sddm/themes")

Directory to look for themes.

faces-directory (default "/run/current-system/profile/share/sddm/faces")

Directory to look for faces.

default-path (default "/run/current-system/profile/bin")

Default PATH to use.

minimum-uid (default 1000)

Minimum UID to display in SDDM.

maximum-uid (default 2000)

Maximum UID to display in SDDM

remember-last-user? (default #t)

Remember last user.

remember-last-session? (default #t)

Remember last session.

hide-users (default "")

Usernames to hide from SDDM greeter.

hide-shells (default #~(string-append #$shadow "/sbin/nologin"))

Users with shells listed will be hidden from the SDDM greeter.

session-command (default #~(string-append #$sddm "/share/sddm/scripts/wayland-session"))

Script to run before starting a wayland session.

sessions-directory (default "/run/current-system/profile/share/wayland-sessions")

Directory to look for desktop files starting wayland sessions.

xorg-server-path (default xorg-start-command)

Path to xorg-server.

xauth-path (default #~(string-append #$xauth "/bin/xauth"))

Path to xauth.

xephyr-path (default #~(string-append #$xorg-server "/bin/Xephyr"))

Path to Xephyr.

xdisplay-start (default #~(string-append #$sddm "/share/sddm/scripts/Xsetup"))

Script to run after starting xorg-server.

xdisplay-stop (default #~(string-append #$sddm "/share/sddm/scripts/Xstop"))

Script to run before stopping xorg-server.

xsession-command (default: xinitr )

Script to run before starting a X session.

xsessions-directory (default: "/run/current-system/profile/share/xsessions")

Directory to look for desktop files starting X sessions.

minimum-vt (default: 7)

Minimum VT to use.

xserver-arguments (default "-nolisten tcp")

Arguments to pass to xorg-server.

auto-login-user (default "")

User to use for auto-login.

auto-login-session (default "")

Desktop file to use for auto-login.

relogin? (default #f)

Relogin after logout.

Scheme Procedure: sddm-service config

Return a service that spawns the SDDM graphical login manager for config of type <sddm-configuration>.

  (sddm-service (sddm-configuration
                 (auto-login-user "Alice")
                 (auto-login-session "xfce.desktop")))
Scheme Procedure: xorg-start-command [#:guile] [#:modules %default-xorg-modules] [#:fonts %default-xorg-fonts] [#:configuration-file (xorg-configuration-file …)] [#:xorg-server xorg-server]

Return a startx script in which modules, a list of X module packages, and fonts, a list of X font directories, are available. See xorg-wrapper for more details on the arguments. The result should be used in place of startx.

Usually the X server is started by a login manager.

Scheme Procedure: xorg-configuration-file [#:modules %default-xorg-modules] [#:fonts %default-xorg-fonts] [#:drivers '()] [#:resolutions '()] [#:extra-config '()]

Return a configuration file for the Xorg server containing search paths for all the common drivers.

modules must be a list of module packages loaded by the Xorg server—e.g., xf86-video-vesa, xf86-input-keyboard, and so on. fonts must be a list of font directories to add to the server’s font path.

drivers must be either the empty list, in which case Xorg chooses a graphics driver automatically, or a list of driver names that will be tried in this order—e.g., ("modesetting" "vesa").

Likewise, when resolutions is the empty list, Xorg chooses an appropriate screen resolution; otherwise, it must be a list of resolutions—e.g., ((1024 768) (640 480)).

Last, extra-config is a list of strings or objects appended to the configuration file. It is used to pass extra text to be added verbatim to the configuration file.

Scheme Procedure: screen-locker-service package [name]

Add package, a package for a screen-locker or screen-saver whose command is program, to the set of setuid programs and add a PAM entry for it. For example:

(screen-locker-service xlockmore "xlock")

makes the good ol’ XlockMore usable.


Next: , Previous: , Up: Services   [Contents][Index]