Next: Sound Services, Previous: Printing Services, Up: Services [Contents][Index]
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:
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.
Return a service that adds the gnome package to the system
profile, and extends polkit with the actions from
gnome-settings-daemon.
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.
Return a service that adds the mate package to the system
profile, and extends polkit with the actions from
mate-settings-daemon.
Return a service that adds the enlightenment package to the system
profile, and extends dbus with actions from efl.
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)
(operating-system
...
;; cons* adds items to the list given as its last argument.
(services (cons* (gnome-desktop-service)
(xfce-desktop-service)
%desktop-services))
...)
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.
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).
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:
kill-user-processes?#f
kill-only-users()
kill-exclude-users("root")
inhibit-delay-max-seconds5
handle-power-keypoweroff
handle-suspend-keysuspend
handle-hibernate-keyhibernate
handle-lid-switchsuspend
handle-lid-switch-dockedignore
power-key-ignore-inhibited?#f
suspend-key-ignore-inhibited?#f
hibernate-key-ignore-inhibited?#f
lid-switch-ignore-inhibited?#t
holdoff-timeout-seconds30
idle-actionignore
idle-action-seconds(* 30 60)
runtime-directory-size-percent10
runtime-directory-size#f
remove-ipc?#t
suspend-state("mem" "standby" "freeze")
suspend-mode()
hibernate-state("disk")
hibernate-mode("platform" "shutdown")
hybrid-sleep-state("disk")
hybrid-sleep-mode("suspend" "platform" "shutdown")
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.
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.
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.
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.
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.
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.
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.
[#:wifi-submission-url "https://location.services.mozilla.com/v1/submit?key=geoclue"] [#: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.
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: Sound Services, Previous: Printing Services, Up: Services [Contents][Index]