4 # Should-Start: console-screen kbd acpid dbus hal consolekit
5 # Required-Start: $local_fs $remote_fs x11-common
6 # Required-Stop: $local_fs $remote_fs
7 # Default-Start: 2 3 4 5
9 # Short-Description: Light Display Manager
10 # Description: Debian init script for the Light Display Manager
13 # Author: Yves-Alexis Perez <corsac@debian.org> using gdm script from
14 # Ryan Murray <rmurray@debian.org>
18 PATH=/sbin:/bin:/usr/sbin:/usr/bin
19 DAEMON=/usr/sbin/lightdm
21 test -x $DAEMON || exit 0
23 if [ -r /etc/default/locale ]; then
28 . /lib/lsb/init-functions
30 # To start lightdm even if it is not the default display manager, change
31 # HEED_DEFAULT_DISPLAY_MANAGER to "false."
32 HEED_DEFAULT_DISPLAY_MANAGER=true
33 DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
37 CONFIGURED_DAEMON=$(basename "$(cat $DEFAULT_DISPLAY_MANAGER_FILE 2> /dev/null)")
38 if grep -wqs text /proc/cmdline; then
39 log_warning_msg "Not starting Light Display Manager (lightdm); found 'text' in kernel commandline."
40 elif [ -e "$DEFAULT_DISPLAY_MANAGER_FILE" ] && \
41 [ "$HEED_DEFAULT_DISPLAY_MANAGER" = "true" ] && \
42 [ "$CONFIGURED_DAEMON" != lightdm ] ; then
43 log_action_msg "Not starting Light Display Manager; it is not the default display manager"
45 log_daemon_msg "Starting Light Display Manager" "lightdm"
46 start-stop-daemon --start --quiet --pidfile /var/run/lightdm.pid --name lightdm --exec $DAEMON -b|| echo -n " already running"
51 log_daemon_msg "Stopping Light Display Manager" "lightdm"
53 start-stop-daemon --stop --quiet --pidfile /var/run/lightdm.pid \
54 --name lightdm --retry 5
59 log_daemon_msg "Scheduling reload of Light Display Manager configuration" "lightdm"
61 start-stop-daemon --stop --signal USR1 --quiet --pidfile \
62 /var/run/lightdm.pid --name lightdm
67 status_of_proc -p "$PIDFILE" "$DAEMON" lightdm && exit 0 || exit $?
75 echo "Usage: /etc/init.d/lightdm {start|stop|restart|reload|force-reload|status}"