1
# gdm - GNOME Display Manager
3
# The display manager service manages the X servers running on the
4
# system, providing login and auto-login services
6
description "GNOME Display Manager"
7
author "William Jon McCann <mccann@jhu.edu>"
13
or runlevel PREVLEVEL=S)
15
stop on runlevel [016]
17
emits login-session-start
18
emits desktop-session-start
19
emits desktop-shutdown
21
env XORGCONFIG=/etc/X11/xorg.conf
24
# Try to dbus activate logind to avoid a race conditions if we are not
25
# running systemd as PID1 (see: #747292)
26
if [ ! -d /run/systemd/system ] && [ -x /lib/systemd/systemd-logind ]; then
27
dbus-send --system --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus \
28
org.freedesktop.DBus.StartServiceByName string:org.freedesktop.login1 uint32:0 2>&1 > /dev/null || true
34
if [ -n "$UPSTART_EVENTS" ]
36
# Check kernel command-line for inhibitors, unless we are being called
38
for ARG in $(cat /proc/cmdline); do
39
if [ "$ARG" = "text" ]; then
46
if [ -f /etc/X11/default-display-manager ]; then
47
[ "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/sbin/gdm3" ] || { stop; exit 0; }
49
type lightdm >/dev/null 2>&1 && { stop; exit 0; } || true
52
if [ "$RUNLEVEL" = S -o "$RUNLEVEL" = 1 ]
60
test -f /etc/profile && . /etc/profile
62
if [ -r /etc/default/locale ]; then
64
export LANG LANGUAGE LC_MESSAGES LC_ALL
65
elif [ -r /etc/environment ]; then
67
export LANG LANGUAGE LC_MESSAGES LC_ALL
71
# update the dconf profile if needed
72
/usr/share/gdm/generate-config
74
exec gdm3 $CONFIG_FILE
78
if [ "$UPSTART_STOP_EVENTS" = runlevel ]; then
79
initctl emit desktop-shutdown