blob: ce8f4fb71aa01d6785a13aa1d72340a5f22e3491 [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
Andrew Geissleraf5e4ef2020-10-16 10:22:50 -050032EnvironmentFile=/etc/default/weston
Andrew Geisslerc9f78652020-09-18 14:11:35 -050033ExecStart=/usr/bin/weston --modules=systemd-notify.so
Brad Bishopa34c0302019-09-23 22:34:48 -040034
Andrew Geisslerc9f78652020-09-18 14:11:35 -050035# Optional watchdog setup
36TimeoutStartSec=60
37WatchdogSec=20
38
39# The user to run Weston as.
40User=%I
41
42# Make sure working directory is users home directory
43WorkingDirectory=/home/%i
44
45# Set up a full user session for the user, required by Weston.
46PAMName=weston-autologin
47
48# A virtual terminal is needed.
49TTYPath=/dev/tty7
50TTYReset=yes
51TTYVHangup=yes
52TTYVTDisallocate=yes
53
54# Fail to start if not controlling the tty.
55StandardInput=tty-fail
56StandardOutput=journal
57StandardError=journal
58
59# Log this user with utmp, letting it show up with commands 'w' and 'who'.
60UtmpIdentifier=tty7
61UtmpMode=user
62
63[Install]
64WantedBy=graphical.target
65DefaultInstance=tty7