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

The (gnu services desktop) module provides services that are usually useful in the context of a “desktop” setup—that is, on a machine running a graphical display server, possibly with graphical user interfaces, etc. It also defines services that provide specific desktop environments like GNOME, XFCE or MATE.

To simplify things, the module defines a variable containing the set of services that users typically expect on a machine with a graphical environment and networking:

Scheme Variable: %desktop-services

This is a list of services that builds upon %base-services and adds or adjusts services for a typical “desktop” setup.

In particular, it adds a graphical login manager (see slim-service), screen lockers, a network management tool (see network-manager-service-type), energy and color management services, the elogind login and seat manager, the Polkit privilege service, the GeoClue location service, the AccountsService daemon that allows authorized users change system passwords, an NTP client (see Networking Services), the Avahi daemon, and has the name service switch service configured to be able to use nss-mdns (see mDNS).

The %desktop-services variable can be used as the services field of an operating-system declaration (see services).

Additionally, the gnome-desktop-service, xfce-desktop-service, mate-desktop-service and enlightenment-desktop-service-type procedures can add GNOME, XFCE, MATE and/or Enlightenment to a system. To “add GNOME” means that system-level services like the backlight adjustment helpers and the power management utilities are added to the system, extending polkit and dbus appropriately, allowing GNOME to operate with elevated privileges on a limited number of special-purpose system interfaces. Additionally, adding a service made by gnome-desktop-service adds the GNOME metapackage to the system profile. Likewise, adding the XFCE service not only adds the xfce metapackage to the system profile, but it also gives the Thunar file manager the ability to open a “root-mode” file management window, if the user authenticates using the administrator’s password via the standard polkit graphical interface. To “add MATE” means that polkit and dbus are extended appropriately, allowing MATE to operate with elevated privileges on a limited number of special-purpose system interfaces. Additionally, adding a service made by mate-desktop-service adds the MATE metapackage to the system profile. “Adding ENLIGHTENMENT” means that dbus is extended appropriately, and several of Enlightenment’s binaries are set as setuid, allowing Enlightenment’s screen locker and other functionality to work as expetected.

The desktop environments in Guix use the Xorg display server by default. If you’d like to use the newer display server protocol called Wayland, you need to use the sddm-service instead of the slim-service for the graphical login manager. You should then select the “GNOME (Wayland)” session in SDDM. Alternatively you can also try starting GNOME on Wayland manually from a TTY with the command “XDG_SESSION_TYPE=wayland exec dbus-run-session gnome-session“. Currently only GNOME has support for Wayland.

Scheme Procedure: gnome-desktop-service

Return a service that adds the gnome package to the system profile, and extends polkit with the actions from gnome-settings-daemon.

Scheme Procedure: xfce-desktop-service

Return a service that adds the xfce package to the system profile, and extends polkit with the ability for thunar to manipulate the file system as root from within a user session, after the user has authenticated with the administrator’s password.

Scheme Procedure: mate-desktop-service

Return a service that adds the mate package to the system profile, and extends polkit with the actions from mate-settings-daemon.

Scheme Procedure: enlightenment-desktop-service-type

Return a service that adds the enlightenment package to the system profile, and extends dbus with actions from efl.

Data Type: enlightenment-desktop-service-configuration
enlightenment (default enlightenment)

The enlightenment package to use.

Because the GNOME, XFCE and MATE desktop services pull in so many packages, the default %desktop-services variable doesn’t include any of them by default. To add GNOME, XFCE or MATE, just cons them onto %desktop-services in the services field of your operating-system:

(use-modules (gnu))
(use-service-modules desktop)
  ;; cons* adds items to the list given as its last argument.
  (services (cons* (gnome-desktop-service)

These desktop environments will then be available as options in the graphical login window.

The actual service definitions included in %desktop-services and provided by (gnu services dbus) and (gnu services desktop) are described below.

Scheme Procedure: dbus-service [#:dbus dbus] [#:services '()]

Return a service that runs the “system bus”, using dbus, with support for services.

D-Bus is an inter-process communication facility. Its system bus is used to allow system services to communicate and to be notified of system-wide events.

services must be a list of packages that provide an etc/dbus-1/system.d directory containing additional D-Bus configuration and policy files. For example, to allow avahi-daemon to use the system bus, services must be equal to (list avahi).

Scheme Procedure: elogind-service [#:config config]

Return a service that runs the elogind login and seat management daemon. Elogind exposes a D-Bus interface that can be used to know which users are logged in, know what kind of sessions they have open, suspend the system, inhibit system suspend, reboot the system, and other tasks.

Elogind handles most system-level power events for a computer, for example suspending the system when a lid is closed, or shutting it down when the power button is pressed.

The config keyword argument specifies the configuration for elogind, and should be the result of an (elogind-configuration (parameter value)...) invocation. Available parameters and their default values are:
































(* 30 60)








("mem" "standby" "freeze")






("platform" "shutdown")




("suspend" "platform" "shutdown")

Scheme Procedure: accountsservice-service [#:accountsservice accountsservice]

Return a service that runs AccountsService, a system service that can list available accounts, change their passwords, and so on. AccountsService integrates with PolicyKit to enable unprivileged users to acquire the capability to modify their system configuration. the accountsservice web site for more information.

The accountsservice keyword argument is the accountsservice package to expose as a service.

Scheme Procedure: polkit-service [#:polkit polkit]

Return a service that runs the Polkit privilege management service, which allows system administrators to grant access to privileged operations in a structured way. By querying the Polkit service, a privileged system component can know when it should grant additional capabilities to ordinary users. For example, an ordinary user can be granted the capability to suspend the system if the user is logged in locally.

Scheme Procedure: upower-service [#:upower upower] [#:watts-up-pro? #f] [#:poll-batteries? #t] [#:ignore-lid? #f] [#:use-percentage-for-policy? #f] [#:percentage-low 10] [#:percentage-critical 3] [#:percentage-action 2] [#:time-low 1200] [#:time-critical 300] [#:time-action 120] [#:critical-power-action 'hybrid-sleep]

Return a service that runs upowerd, a system-wide monitor for power consumption and battery levels, with the given configuration settings. It implements the org.freedesktop.UPower D-Bus interface, and is notably used by GNOME.

Scheme Procedure: udisks-service [#:udisks udisks]

Return a service for UDisks, a disk management daemon that provides user interfaces with notifications and ways to mount/unmount disks. Programs that talk to UDisks include the udisksctl command, part of UDisks, and GNOME Disks.

Scheme Procedure: colord-service [#:colord colord]

Return a service that runs colord, a system service with a D-Bus interface to manage the color profiles of input and output devices such as screens and scanners. It is notably used by the GNOME Color Manager graphical tool. See the colord web site for more information.

Scheme Procedure: geoclue-application name [#:allowed? #t] [#:system? #f] [#:users '()]

Return a configuration allowing an application to access GeoClue location data. name is the Desktop ID of the application, without the .desktop part. If allowed? is true, the application will have access to location information by default. The boolean system? value indicates whether an application is a system component or not. Finally users is a list of UIDs of all users for which this application is allowed location info access. An empty users list means that all users are allowed.

Scheme Variable: %standard-geoclue-applications

The standard list of well-known GeoClue application configurations, granting authority to the GNOME date-and-time utility to ask for the current location in order to set the time zone, and allowing the IceCat and Epiphany web browsers to request location information. IceCat and Epiphany both query the user before allowing a web page to know the user’s location.

Scheme Procedure: geoclue-service [#:colord colord] [#:whitelist '()] [#:wifi-geolocation-url ""] [#:submit-data? #f]

[#:wifi-submission-url ""]   [#:submission-nick "geoclue"]   [#:applications %standard-geoclue-applications] Return a service that runs the GeoClue location service. This service provides a D-Bus interface to allow applications to request access to a user’s physical location, and optionally to add information to online location databases. See the GeoClue web site for more information.

Scheme Procedure: bluetooth-service [#:bluez bluez] [#:auto-enable? #f]

Return a service that runs the bluetoothd daemon, which manages all the Bluetooth devices and provides a number of D-Bus interfaces. When AUTO-ENABLE? is true, the bluetooth controller is powered automatically at boot, which can be useful when using a bluetooth keyboard or mouse.

Users need to be in the lp group to access the D-Bus service.

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