blob: 0a1df15bdf0cc8a5f9446ea32cdf3aeeec0b7cf7 [file] [log] [blame]
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001# This is a system unit for launching Weston with auto-login as the
2# user configured here.
3#
4# Weston must be built with systemd support, and your weston.ini must load
5# the plugin systemd-notify.so.
Brad Bishopa34c0302019-09-23 22:34:48 -04006[Unit]
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007Description=Weston, a Wayland compositor, as a system service
8Documentation=man:weston(1) man:weston.ini(5)
9Documentation=http://wayland.freedesktop.org/
10
11# Make sure we are started after logins are permitted.
12After=systemd-user-sessions.service
13
14# If Plymouth is used, we want to start when it is on its way out.
15After=plymouth-quit-wait.service
16
17# D-Bus is necessary for contacting logind. Logind is required.
18Wants=dbus.socket
19After=dbus.socket
20
21# Since we are part of the graphical session, make sure we are started before
22# it is complete.
23Before=graphical.target
24
25# Prevent starting on systems without virtual consoles, Weston requires one
26# for now.
27ConditionPathExists=/dev/tty0
Brad Bishopa34c0302019-09-23 22:34:48 -040028
29[Service]
Andrew Geisslerc9f78652020-09-18 14:11:35 -050030# Requires systemd-notify.so Weston plugin.
31Type=notify
32ExecStart=/usr/bin/weston --modules=systemd-notify.so
Brad Bishopa34c0302019-09-23 22:34:48 -040033
Andrew Geisslerc9f78652020-09-18 14:11:35 -050034# Optional watchdog setup
35TimeoutStartSec=60
36WatchdogSec=20
37
38# The user to run Weston as.
39User=%I
40
41# Make sure working directory is users home directory
42WorkingDirectory=/home/%i
43
44# Set up a full user session for the user, required by Weston.
45PAMName=weston-autologin
46
47# A virtual terminal is needed.
48TTYPath=/dev/tty7
49TTYReset=yes
50TTYVHangup=yes
51TTYVTDisallocate=yes
52
53# Fail to start if not controlling the tty.
54StandardInput=tty-fail
55StandardOutput=journal
56StandardError=journal
57
58# Log this user with utmp, letting it show up with commands 'w' and 'who'.
59UtmpIdentifier=tty7
60UtmpMode=user
61
62[Install]
63WantedBy=graphical.target
64DefaultInstance=tty7