Remove systemd user session and clean up packagegroups and images
[AGL/meta-agl.git] / meta-agl-core / recipes-graphics / wayland / agl-compositor-init / agl-compositor.service
1 # This is a system unit for launching AGL compositor with auto-login as the
2 # user configured here.
3 #
4 # AGL compositor and Weston must be built with systemd support, and your
5 # weston.ini must load the plugin systemd-notify.so.
6 [Unit]
7 Description=AGL compositor
8 Documentation=man:weston(1) man:weston.ini(5)
9 Documentation=http://wayland.freedesktop.org/
10
11 # Make sure we are started after logins are permitted.
12 Requires=systemd-user-sessions.service
13 After=systemd-user-sessions.service
14
15 # D-Bus is necessary for contacting logind. Logind is required.
16 Wants=dbus.socket
17 After=dbus.socket
18
19 # Ensure the socket is present
20 Requires=agl-compositor.socket
21
22 # Since we are part of the graphical session, make sure we are started before
23 # it is complete.
24 Before=graphical.target
25
26 # Prevent starting on systems without virtual consoles, Weston requires one
27 # for now.
28 ConditionPathExists=/dev/tty0
29
30 [Service]
31 # Requires systemd-notify.so Weston plugin.
32 Type=notify
33 EnvironmentFile=-/etc/default/agl-compositor
34 ExecStart=/usr/bin/agl-compositor --modules=systemd-notify.so
35
36 # Watchdog setup
37 TimeoutStartSec=60
38 WatchdogSec=20
39
40 # The user to run as.
41 User=agl-driver
42 Group=agl-driver
43
44 # Make sure the working directory is the users home directory
45 WorkingDirectory=/home/agl-driver
46
47 # Set up a full user session for the user
48 PAMName=agl-compositor-autologin
49
50 # A virtual terminal is needed.
51 TTYPath=/dev/tty7
52 TTYReset=yes
53 TTYVHangup=yes
54 TTYVTDisallocate=yes
55
56 # Fail to start if not controlling the tty.
57 StandardInput=tty-fail
58 StandardOutput=journal
59 StandardError=journal
60
61 # Log this user with utmp, letting it show up with commands 'w' and 'who'.
62 UtmpIdentifier=tty7
63 UtmpMode=user
64
65 [Install]
66 # Note: If you only want weston to start on-demand, remove this line with a
67 # service drop file
68 WantedBy=graphical.target