[ubuntu-x] How do I have more than one display manager working and other things
shirish
shirishag75 at gmail.com
Thu Jul 10 05:37:36 BST 2008
Hi all,
First off sorry for a long long mail. I've been wondering for the
last couple of development cycles.
Now I don't know whether this is the right way to go about it or not.
Please revert back and lemme know
if my logic is right or are there some other things to do as well. I
tried installing the 'slim' display manager.
While installing the following dialog box comes up. :-
A display manager is a program that provides graphical login
capabilities for the X window system
Only one display manager can manage a given X server, but multiple
display managers are installed.
Please select which display manager should run by default.
Multiple display managers can run simultaneously if they are
configured to manage different servers; to achieve
this, configure the display managers accordingly, edit each of their
init scripts in /etc/init.d/ , and disable the check for
a default display manager
I find both the display managers initscripts in /etc/init.d/
This is of GDM
#! /bin/sh
#
# Originally based on:
# Version: @(#)skeleton 1.8 03-Mar-1998 miquels at cistron.nl
#
# Modified for gdm, Steve Haslam <steve at arise.dmeon.co.uk> 14mar99
# modified to remove --exec, as it does not work on upgrades. 18jan2000
# modified to use --name, to detect stale PID files 18mar2000
# sleep until gdm dies, then restart it 16jul2000
# get along with other display managers (Branden Robinson, Ryan
Murray) 05sep2001
set -e
# To start gdm even if it is not the default display manager, change
# HEED_DEFAULT_DISPLAY_MANAGER to "false."
HEED_DEFAULT_DISPLAY_MANAGER=true
DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/gdm
PIDFILE=/var/run/gdm.pid
UPGRADEFILE=/var/run/gdm.upgrade
if [ -e $UPGRADEFILE -a "$1" != "restart" -a "$1" != "force-reload" ]; then
SSD_ARG="--startas $DAEMON"
rm -f $UPGRADEFILE
else
SSD_ARG="--exec $DAEMON"
fi
# Allow cdd to override the config
if [ -f /etc/gdm/gdm-cdd.conf ]; then
CONFIG_FILE="--config=/etc/gdm/gdm-cdd.conf"
fi
test -x $DAEMON || exit 0
if [ -r /etc/default/locale ]; then
. /etc/default/locale
export LANG LANGUAGE
elif [ -r /etc/environment ]; then
. /etc/environment
export LANG LANGUAGE
fi
. /lib/lsb/init-functions
case "$1" in
start)
if [ -e "$DEFAULT_DISPLAY_MANAGER_FILE" -a
"$HEED_DEFAULT_DISPLAY_MANAGER" = "true" -a "$(cat
$DEFAULT_DISPLAY_MANAGER_FILE 2>/dev/null)" != "$DAEMON" ]; then
log_warning_msg "Not starting GNOME Display Manager (gdm); it is not
the default display manager."
else
log_begin_msg "Starting GNOME Display Manager..."
# if usplash is running, make sure to stop it now, yes "start" kills it.
if pidof usplash > /dev/null; then
usplash=:
orig_console="$(fgconsole)"
DO_NOT_SWITCH_VT=yes /etc/init.d/usplash start
# We've just shut down usplash, so don't log
# success as it will look weird on the console.
log_end_msg=:
else
usplash=false
log_end_msg=log_end_msg
fi
start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --name
gdm $SSD_ARG -- $CONFIG_FILE >/dev/null 2>&1 || log_end_msg 1
$log_end_msg 0
if $usplash && [ "$orig_console" != serial ]; then
# Wait a short while for the active console to
# change, to try to avoid visible console noise from
# later init scripts.
i=0
while [ "$(fgconsole)" = "$orig_console" ]; do
i="$(($i + 1))"
if [ "$i" -gt 5 ]; then
break
fi
sleep 1
done
fi
fi
;;
stop)
log_begin_msg "Stopping GNOME Display Manager..."
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE --name
gdm $SSD_ARG --retry 30 >/dev/null 2>&1
log_end_msg 0
;;
reload)
log_begin_msg "Reloading GNOME Display Manager configuration..."
log_warning_msg "Changes will take effect when all current X sessions
have ended."
start-stop-daemon --stop --signal USR1 --quiet --pidfile \
$PIDFILE --name gdm $SSD_ARG >/dev/null 2>&1
log_end_msg 0
;;
restart|force-reload)
$0 stop || true
$0 start
;;
*)
log_success_msg "Usage: /etc/init.d/gdm
{start|stop|restart|reload|force-reload}"
exit 1
;;
esac
exit 0
While this is of slim :-
#!/bin/sh
# Largely adapted from xdm's init script:
# Copyright 1998-2002, 2004, 2005 Branden Robinson <branden at debian.org>.
# Copyright 2006 Eugene Konev <ejka at imfi.kspu.ru>
### BEGIN INIT INFO
# Provides: slim
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: xfs $named slapd
# Should-Stop: xfs $named slapd
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/stop the SLiM daemon.
### END INIT INFO
test -z "$HEED_DEFAULT_DISPLAY_MANAGER" && HEED_DEFAULT_DISPLAY_MANAGER=true
DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
DAEMON=/usr/bin/slim
PIDFILE=/var/run/slim.lock
SSD_START_ARGS="--pidfile $PIDFILE --name $(basename $DAEMON)
--startas $DAEMON -- -d"
SSD_STOP_ARGS="--pidfile $PIDFILE --name $(basename $DAEMON) --retry
TERM/5/TERM/5"
case $1 in
start)
if [ "$HEED_DEFAULT_DISPLAY_MANAGER" = "true" ] &&
[ -e $DEFAULT_DISPLAY_MANAGER_FILE ] &&
[ "$(cat $DEFAULT_DISPLAY_MANAGER_FILE)" != "$DAEMON" ]; then
echo "Not starting X display manager (slim); it is not the
default display manager."
else
echo -n "Starting X display manager: slim"
start-stop-daemon --start --quiet $SSD_START_ARGS || echo -n "
already running"
echo "."
fi
;;
stop)
echo -n "Stopping X display manager: slim"
if ! [ -f $PIDFILE ]; then
echo -n " not running ($PIDFILE not found)"
else
start-stop-daemon --stop --quiet $SSD_STOP_ARGS
SSD_RES=$?
if [ $SSD_RES -eq 1 ]; then
echo -n " not running"
fi
if [ $SSD_RES -eq 2 ]; then
echo -n " not responding to TERM signals"
else
if [ -f $PIDFILE ]; then
echo -n " (removing stale $PIDFILE)"
rm $PIDFILE
fi
fi
fi
echo "."
;;
restart)
$0 stop
sleep 2
$0 start
;;
force-reload)
/etc/init.d/slim restart
;;
*)
echo "Usage: /etc/init.d/slim {start|stop|restart|force-reload}"
exit 1
;;
esac
# End of file
Now what I want to do is to be able to select either of the gdm's
while they're initializing, something like
use 1. gdm 2. slim
Is this possible?
Another thing, for all the xorg crashes and what not, there doesn't
seem to be a channel for xorg? Why is that?
Looking forward for replies on the same as well.
--
Regards,
Shirish Agarwal
This email is licensed under http://creativecommons.org/licenses/by-nc/3.0/
065C 6D79 A68C E7EA 52B3 8D70 950D 53FB 729A 8B17
More information about the Ubuntu-x
mailing list