greetd

From Gentoo Wiki
Jump to:navigation Jump to:search
This page contains changes which are not marked for translation.

greetd is a system login and authentication daemon designed for Wayland display managers.

greetd only provides a backend authentication service and is meant to be used with a frontend greeter, such as gui-apps/gtkgreet, gui-apps/qtgreet or gui-apps/tuigreet.

Installation

USE flags

USE flags for gui-libs/greetd ipc based login daemon

debug Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
man Build and install man pages
selinux !!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur

Front-ends

greetd implements an authentication protocol and provides the backend service daemon implementation, integrated with PAM. The frontend provided to a user, called a greeter, is implemented separately, with multiple greeters available.

GTKGreet

GTKGreet.png

root #emerge --ask gui-apps/gtkgreet

TUIGreet

Tuigreet.png

root #emerge --ask gui-apps/tuigreet

QTGreet

QTGreet.jpg

QTGreet is available from the wayland-desktop overlay.

root #eselect repository enable wayland-desktop
root #emaint sync --repo wayland-desktop
root #emerge --ask --verbose gui-apps/qtgreet

Usage

The GUI greeters, GTKGreet and QTGreet, need a wayland compositor to display them. The compositor used to display the greeter does not need to be the same as the one used by the user in their session. For example, it is possible to configure sway to start gui-apps/gtkgreet to start a Wayfire session.

A few example configurations are shown here.

Preliminaries

OpenRC

Enable the display-manager service from gui-libs/display-manager-init

root #rc-update add display-manager default

Configure the display-manager service to use greetd:

FILE /etc/conf.d/display-managerSetting greetd as the display manager
CHECKVT=7
DISPLAYMANAGER="greetd"

systemd

Enable the greetd service to start on boot

root #systemctl enable greetd.service

GTKGreet/QTGreet + Wayfire

Configure greetd to use wayfire as the startup command, where wayfire will be started with a custom configuration file:

FILE /etc/greetd/config.tomlWayfire startup on greetd
[terminal]
vt = 7
 
[default_session]
command = "wayfire -c /etc/wayfire.ini"
user = "greetd"
FILE /etc/wayfire.iniWayfire config to start GTKGreet/QTGreet
[autostart]
autostart_wf_shell = false
gtkgreet = /usr/bin/gtkgreet -l
#qtgreet = /usr/bin/qtgreet
 
[core]
plugins = autostart
vheight = 1
vwidth = 1
xwayland = false

Hyprland + QTGreet

greetd can be configured to start Hyprland directly, where Hyprland in turn starts the greeter (such as QTGreet) via its own configuration.

Example configuration for greetd:

FILE /etc/greetd/config.tomlHyprland startup with greetd
[terminal]
vt = 7

[default_session]
command = "Hyprland --config /etc/greetd/hyprland.conf"
user = "greetd"

Example Hyprland configuration to launch QTGreet and exit afterward:

FILE /etc/greetd/hyprland.confHyprland config to start QTGreet
exec-once = qtgreet; hyprctl dispatch exit

Hyprland session with D-Bus (OpenRC)

Under OpenRC, a dbus session is not started automatically. If a desktop environment or compositor requires dbus, it must be launched manually. The recommended method is to use dbus-run-session, although dbus-launch may still work for some environments.

For example, Hyprland can be configured to start with dbus using a modified or new Wayland session file.

FILE /usr/share/wayland-sessions/hyprland-dbus.desktopCreate a D-Bus-enabled Hyprland session entry
[Desktop Entry]
Name=Hyprland (with D-Bus)
Comment=Start Hyprland with a D-Bus session
Exec=dbus-run-session Hyprland
Type=Application
DesktopNames=Hyprland

Alternatively, modify the existing Hyprland session entry:

FILE /usr/share/wayland-sessions/hyprland.desktopModify existing Hyprland session entry
[Desktop Entry]
Name=Hyprland
Comment=An intelligent dynamic tiling Wayland compositor
Exec=dbus-run-session Hyprland
Type=Application
DesktopNames=Hyprland
Keywords=tiling;wayland;compositor;


TUIGreet

TUIGreet does not need a compositor to be used.

FILE /etc/greetd/config.tomlTUIGreet with GreetD
[terminal]
vt = 7
 
[default_session]
command = "tuigreet --cmd sway"
user = "greetd"

See also

  • Display manager — presents the user with a graphical login screen to start a GUI session, either X or Wayland.
  • Wayland — a replacement for the X11 window system protocol and architecture with the aim to be easier to develop, extend, and maintain