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


11.10.7 Sistema X Window

El sistema gráfico X Window—específicamente Xorg—se proporciona en el módulo (gnu services xorg). Fíjese que no existe un procedimiento xorg-service. En vez de eso, el servidor X se inicia por el gestor de ingreso al sistema, de manera predeterminada el gestor de acceso de GNOME (GDM).

GDM por supuesto que permite a las usuarias ingresar al sistema con gestores de ventanas y entornos de escritorio distintos a GNOME; para aquellas que usan GNOME, GDM es necesario para características como el bloqueo automático de pantalla.

Para usar X11, debe instalar al menos un gestor de ventanas—por ejemplo los paquetes windowmaker o openbox—, preferiblemente añadiendo el que desee al campo packages de su definición de sistema operativo (see paquetes del sistema).

GDM also supports Wayland: it can itself use Wayland instead of X11 for its user interface, and it can also start Wayland sessions. The former is required for the latter, to enable, set wayland? to #t in gdm-configuration.

Variable: gdm-service-type

Este es el tipo para el gestor de acceso de GNOME (GDM), un programa que gestiona servidores gráficos y maneja de forma gráfica el ingreso al sistema de usuarias. Su valor debe ser ungdm-configuration (véase a continuación).

GDM looks for session types described by the .desktop files in /run/current-system/profile/share/xsessions (for X11 sessions) and /run/current-system/profile/share/wayland-sessions (for Wayland sessions) and allows users to choose a session from the log-in screen. Packages such as gnome, xfce, i3 and sway provide .desktop files; adding them to the system-wide set of packages automatically makes them available at the log-in screen.

Además, se respetan los archivos ~/.xsession. Cuando esté disponible, ~/.xsession debe ser un ejecutable que inicie un gestor de ventanas y/o otros clientes de X.

Tipo de datos: gdm-configuration
auto-login? (predeterminado: #f)
default-user (predeterminado: #f)

Cuando auto-login? es falso, GDM presenta una pantalla de ingreso.

Cuando auto-login? es verdadero, GDM ingresa directamente al sistema como default-user.

auto-suspend? (default #t)

When true, GDM will automatically suspend to RAM when nobody is physically connected. When a machine is used via remote desktop or SSH, this should be set to false to avoid GDM interrupting remote sessions or rendering the machine unavailable.

debug? (predeterminado: #f)

Cuando tiene valor verdadero, GDM escribe los mensajes de depuración en su registro.

gnome-shell-assets (predeterminados: ...)

Lista de activos de GNOME Shell necesarios para GDM: tema de iconos, fuentes, etc.cc

xorg-configuration (predeterminada: (xorg-configuration))

Configuración del servidor gráfico Xorg.

x-session (default: (xinitrc))

Guión a ejecutar antes de iniciar una sesión X.

xdmcp? (default: #f)

When true, enable the X Display Manager Control Protocol (XDMCP). This should only be enabled in trusted environments, as the protocol is not secure. When enabled, GDM listens for XDMCP queries on the UDP port 177.

dbus-daemon (predeterminado: dbus-daemon-wrapper)

El nombre de archivo del ejecutable dbus-daemon.

gdm (predeterminado: gdm)

El paquete GDM usado.

wayland? (default: #f)

When true, enables Wayland in GDM, necessary to use Wayland sessions.

wayland-session (default: gdm-wayland-session-wrapper)

The Wayland session wrapper to use, needed to setup the environment.

Variable: slim-service-type

Este es el tipo para el gestor de ingreso al sistema gráfico para X11 SLiM.

Como GDM, SLiM busca tipos de sesión descritos por archivos .desktop y permite a las usuarias la selección de sesión en la pantalla de ingreso al sistema mediante el uso de F1. También respeta los archivos ~/.xsession.

Al contrario que GDM, SLiM no lanza las sesiones de las usuarias en terminales virtuales diferentes al usado para el ingreso, lo que significa que únicamente puede iniciar una sesión gráfica. Si desea ejecutar varias sesiones gráficas de manera simultánea, debe añadir múltiples servicios de SLiM a los servicios de su sistema. El ejemplo siguiente muestra cómo sustituir el servicio GDM predeterminado con dos servicios de SLiM en tty7 y tty8.

(use-modules (gnu services)
             (gnu services desktop)
             (gnu services xorg))

(operating-system
  ;; ...
  (services (cons* (service slim-service-type (slim-configuration
                                               (display ":0")
                                               (vt "vt7")))
                   (service slim-service-type (slim-configuration
                                               (display ":1")
                                               (vt "vt8")))
                   (modify-services %desktop-services
                     (delete gdm-service-type)))))
Tipo de datos: slim-configuration

Tipo de datos que representa la configuración de slim-service-type.

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

Si se permite el ingreso al sistema con contraseñas vacías.

gnupg? (default: #f)

If enabled, pam-gnupg will attempt to automatically unlock the user’s GPG keys with the login password via gpg-agent. The keygrips of all keys to be unlocked should be written to ~/.pam-gnupg, and can be queried with gpg -K --with-keygrip. Presetting passphrases must be enabled by adding allow-preset-passphrase in ~/.gnupg/gpg-agent.conf.

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

Cuando auto-login? es falso, SLiM presenta una pantalla de ingreso.

Cuando auto-login? es verdadero, SLiM ingresa en el sistema directamente como default-user.

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

El tema gráfico usado y su nombre.

auto-login-session (predeterminado: #f)

Si es verdadero, debe ser el nombre del ejecutable a arrancar como la sesión predeterminada—por ejemplo, (file-append windowmaker "/bin/windowmaker").

Si es falso, se usará una sesión de las descritas en uno de los archivos .desktop disponibles en /run/current-system/profile y ~/.guix-profile.

Nota: Debe instalar al menos un gestor de ventanas en el perfil del sistema o en su perfil de usuaria. En caso de no hacerlo, si auto-login-session es falso, no podrá ingresar al sistema.

xorg-configuration (predeterminada (xorg-configuration))

Configuración del servidor gráfico Xorg.

display (predeterminada: ":0")

La pantalla en la que se iniciará el servidor gráfico Xorg.

vt (predeterminado: "vt7")

El terminal virtual (VT) en el que se iniciará el servidor gráfico Xorg.

xauth (predeterminado: xauth)

El paquete XAuth usado.

shepherd (predeterminado: shepherd)

El paquete de Shepherd usado para la invocación de halt y reboot.

sessreg (predeterminado: sessreg)

El paquete sessreg usado para el registro de la sesión.

slim (predeterminado: slim)

El paquete SLiM usado.

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

El tema predeterminado de SLiM y su nombre.

Variable: sddm-service-type

Es el tipo del servicio que ejecuta el gestor de entrada SDDM. Su valor es un registro sddm-configuration (véase a continuación).

Este es un ejemplo de su uso:

(service sddm-service-type
         (sddm-configuration
           (auto-login-user "alicia")
           (auto-login-session "xfce.desktop")))
Tipo de datos: sddm-configuration

Este tipo de datos representa la configuración del gestor de ingreso al sistema SDDM. Los campos disponibles son:

sddm (predeterminado: sddm)

El paquete SDDM usado.

display-server (predeterminado: "x11")

Selecciona el servidor de pantalla usado para el saludo. Los valores validos son ‘"x11"’ o ‘"wayland"’.

numlock (predeterminado: "on")

Son valores válidos ‘"on"’, ‘"off"’ o ‘"none"’.

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

Orden a ejecutar para parar el sistema.

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

Orden a ejecutar para reiniciar el sistema.

theme (predeterminado "maldives")

Tema usado. Los temas predeterminados proporcionados por SDDM son ‘"elarun"’, ‘"maldives"’ o ‘"maya"’.

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

Directorio en el que buscar temas.

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

Directorio en el que buscar caras.

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

El valor predeterminado del PATH.

minimum-uid (predeterminado: 1000)

UID mínimo mostrado en SDDM y al que se le permite el acceso.

maximum-uid (predeterminado: 2000)

UID máximo mostrado en SDDM.

remember-last-user? (predeterminado #t)

Recuerda la última usuaria.

remember-last-session? (predeterminado #t)

Recuerda la última sesión.

hide-users (predeterminado "")

Nombres de usuaria a ocultar de la pantalla de inicio de SDDM.

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

Las usuarias que tengan alguno de los shell enumerados se ocultarán de la pantalla de inicio de SDDM.

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

Guión a ejecutar antes de iniciar una sesión wayland.

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

Directorio en el que buscar archivos desktop que inicien sesiones wayland.

xorg-configuration (predeterminada (xorg-configuration))

Configuración del servidor gráfico Xorg.

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

Ruta de xauth.

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

Ruta de Xephyr.

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

Guión a ejecutar tras iniciar xorg-server.

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

Guión a ejecutar antes de parar xorg-server.

xsession-command (predeterminado: xinitrc)

Guión a ejecutar antes de iniciar una sesión X.

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

Directorio para buscar archivos desktop que inicien sesiones X.

minimum-vt (predeterminado: 7)

VT mínimo usado.

auto-login-user (predeterminado "")

User account that will be automatically logged in. Setting this to the empty string disables auto-login.

auto-login-session (predeterminado "")

The .desktop file name to use as the auto-login session, or the empty string.

relogin? (predeterminado #f)

Volver a ingresar en el sistema tras salir.

Variable: lightdm-service-type

This is the type of the service to run the LightDM display manager. Its value must be a lightdm-configuration record, which is documented below. Among its distinguishing features are TigerVNC integration for easily remoting your desktop as well as support for the XDMCP protocol, which can be used by remote clients to start a session from the login manager.

In its most basic form, it can be used simply as:

A more elaborate example making use of the VNC capabilities and enabling more features and verbose logs could look like:

(service lightdm-service-type
         (lightdm-configuration
          (allow-empty-passwords? #t)
          (xdmcp? #t)
          (vnc-server? #t)
          (vnc-server-command
           (file-append tigervnc-server "/bin/Xvnc"
                        "  -SecurityTypes None"))
          (seats
           (list (lightdm-seat-configuration
                  (name "*")
                  (user-session "ratpoison"))))))
Data Type: lightdm-configuration

Available lightdm-configuration fields are:

lightdm (default: lightdm) (type: file-like)

The lightdm package to use.

allow-empty-passwords? (default: #f) (type: boolean)

Whether users not having a password set can login.

debug? (default: #f) (type: boolean)

Enable verbose output.

xorg-configuration (type: xorg-configuration)

The default Xorg server configuration to use to generate the Xorg server start script. It can be refined per seat via the xserver-command of the <lightdm-seat-configuration> record, if desired.

greeters (type: list-of-greeter-configurations)

The LightDM greeter configurations specifying the greeters to use.

seats (type: list-of-seat-configurations)

The seat configurations to use. A LightDM seat is akin to a user.

xdmcp? (default: #f) (type: boolean)

Whether a XDMCP server should listen on port UDP 177.

xdmcp-listen-address (type: maybe-string)

The host or IP address the XDMCP server listens for incoming connections. When unspecified, listen on for any hosts/IP addresses.

vnc-server? (default: #f) (type: boolean)

Whether a VNC server is started.

vnc-server-command (type: file-like)

The Xvnc command to use for the VNC server, it’s possible to provide extra options not otherwise exposed along the command, for example to disable security:

(vnc-server-command (file-append tigervnc-server "/bin/Xvnc"
                                 " -SecurityTypes None" ))

Or to set a PasswordFile for the classic (unsecure) VncAuth mechanism:

(vnc-server-command (file-append tigervnc-server "/bin/Xvnc"
                                 " -PasswordFile /var/lib/lightdm/.vnc/passwd"))

The password file should be manually created using the vncpasswd command. Note that LightDM will create new sessions for VNC users, which means they need to authenticate in the same way as local users would.

vnc-server-listen-address (type: maybe-string)

The host or IP address the VNC server listens for incoming connections. When unspecified, listen for any hosts/IP addresses.

vnc-server-port (default: 5900) (type: number)

The TCP port the VNC server should listen to.

extra-config (default: '()) (type: list-of-strings)

Extra configuration values to append to the LightDM configuration file.

Data Type: lightdm-gtk-greeter-configuration

Available lightdm-gtk-greeter-configuration fields are:

lightdm-gtk-greeter (default: lightdm-gtk-greeter) (type: file-like)

The lightdm-gtk-greeter package to use.

assets (default: (adwaita-icon-theme gnome-themes-extra hicolor-icon-theme)) (type: list-of-file-likes)

The list of packages complementing the greeter, such as package providing icon themes.

theme-name (default: "Adwaita") (type: string)

The name of the theme to use.

icon-theme-name (default: "Adwaita") (type: string)

The name of the icon theme to use.

cursor-theme-name (default: "Adwaita") (type: string)

The name of the cursor theme to use.

cursor-theme-size (default: 16) (type: number)

The size to use for the cursor theme.

allow-debugging? (type: maybe-boolean)

Set to #t to enable debug log level.

background (type: file-like)

The background image to use.

at-spi-enabled? (default: #f) (type: boolean)

Enable accessibility support through the Assistive Technology Service Provider Interface (AT-SPI).

a11y-states (default: (contrast font keyboard reader)) (type: list-of-a11y-states)

The accessibility features to enable, given as list of symbols.

reader (type: maybe-file-like)

The command to use to launch a screen reader.

extra-config (default: '()) (type: list-of-strings)

Extra configuration values to append to the LightDM GTK Greeter configuration file.

Data Type: lightdm-seat-configuration

Available lightdm-seat-configuration fields are:

name (type: seat-name)

The name of the seat. An asterisk (*) can be used in the name to apply the seat configuration to all the seat names it matches.

user-session (type: maybe-string)

The session to use by default. The session name must be provided as a lowercase string, such as "gnome", "ratpoison", etc.

type (default: local) (type: seat-type)

The type of the seat, either the local or xremote symbol.

autologin-user (type: maybe-string)

The username to automatically log in with by default.

greeter-session (default: lightdm-gtk-greeter) (type: greeter-session)

The greeter session to use, specified as a symbol. Currently, only lightdm-gtk-greeter is supported.

xserver-command (type: maybe-file-like)

The Xorg server command to run.

session-wrapper (type: file-like)

The xinitrc session wrapper to use.

extra-config (default: '()) (type: list-of-strings)

Extra configuration values to append to the seat configuration section.

Tipo de datos: xorg-configuration

This data type represents the configuration of the Xorg graphical display server. Note that there is no Xorg service; instead, the X server is started by a “display manager” such as GDM, SDDM, LightDM or SLiM. Thus, the configuration of these display managers aggregates an xorg-configuration record.

modules (predeterminados: %default-xorg-modules)

Esta es la lista de paquetes de módulos cargados por el servidor Xorg—por ejemplo, xf86-video-vesa, xf86-input-keyboard, etcétera.

fonts (predeterminadas: %default-xorg-fonts)

Es una lista de directorios de tipografías a añadir a la ruta de tipografías del servidor.

drivers (predeterminados: '())

Debe ser o bien la lista vacía, en cuyo caso Xorg selecciona el controlador gráfico automáticamente, o una lista de nombres de controladores que se intentarán en el orden especificado—por ejemplo, '("modesetting" "vesa").

resolutions (predeterminadas: '())

Cuando resolutions es la lista vacía, Xorg selecciona una resolución de pantalla adecuada. En otro caso, debe ser una lista de resoluciones—por ejemplo, '((1024 768) (640 480)).

keyboard-layout (predeterminada: #f)

Si es #f, Xorg usa la distribución de teclado predeterminada—normalmente inglés de EEUU (“qwerty”) para un teclado de PC de 105 teclas.

En otro caso, debe ser un objeto keyboard-layout que especifique la distribución de teclado usada para la ejecución de Xorg. See Distribución de teclado, para más información sobre cómo especificar la distribución de teclado.

extra-config (predeterminada: '())

Es una lista de cadenas u objetos añadida al final del archivo de configuración. Se usa para proporcionar texto adicional para ser introducido de forma literal en el archivo de configuración.

server (predeterminado: xorg-server)

Este es el paquete que proporciona el servidor Xorg.

server-arguments (predeterminados: %default-xorg-server-arguments)

Es la lista de parámetros de línea de órdenes que se proporcionarán al servidor X. El valor predeterminado es -nolisten tcp.

Procedure: set-xorg-configuration config [login-manager-service-type]

Tell the log-in manager (of type login-manager-service-type) to use config, an <xorg-configuration> record.

Debido a que la configuración de Xorg se embebe en la configuración del gestor de ingreso en el sistema—por ejemplo, gdm-configuration—este procedimiento proporciona un atajo para establecer la configuración de Xorg.

Procedure: xorg-start-command [config]

Devuelve un script startx en el que los módulos, las tipografías, etcétera, especificadas en config están disponibles. El resultado debe usarse en lugar de startx.

Habitualmente el servidor X es iniciado por un gestor de ingreso al sistema.

Variable: screen-locker-service-type

Type for a service that adds a package for a screen locker or screen saver to the set of setuid programs and/or add a PAM entry for it. The value for this service is a <screen-locker-configuration> object.

While the default behavior is to setup both a setuid program and PAM entry, these two methods are redundant. Screen locker programs may not execute when PAM is configured and setuid is set on their executable. In this case, using-setuid? can be set to #f.

For example, to make XlockMore usable:

(service screen-locker-service-type
         (screen-locker-configuration
           (name "xlock")
           (program (file-append xlockmore "/bin/xlock"))))

permite usar el viejo XlockMore.

For example, swaylock fails to execute when compiled with PAM support and setuid enabled. One can thus disable setuid:

(service screen-locker-service-type
         (screen-locker-configuration
           (name "swaylock")
           (program (file-append swaylock "/bin/swaylock"))
           (using-pam? #t)
           (using-setuid? #f)))
Data Type: screen-locker-configuration

Available screen-locker-configuration fields are:

name (type: string)

Name of the screen locker.

program (type: file-like)

Path to the executable for the screen locker as a G-Expression.

allow-empty-password? (default: #f) (type: boolean)

Si se permiten las contraseñas vacías.

using-pam? (default: #t) (type: boolean)

Whether to setup PAM entry.

using-setuid? (default: #t) (type: boolean)

Whether to setup program as setuid binary.


Next: Servicios de impresión, Previous: Actualizaciones no-atendidas, Up: Servicios   [Contents][Index]