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