Saturday, February 13, 2010

Disable GDM "face browser" user list in Fedora 12

GDM (Genome Display Manager) supports a face browser which displays a list of users who can login and an icon for each user. But for security reason i didn't want to display list of all system users. So I decided to disable GDM "face browser" user list. I found the solution to disable face browser by "gonf-editor",
Applications > System Tools > Configuration Editor > Apps > gdm > simple-greeter
Check  "disable_user_list" in right pane.
but it didn't work for me. This is a reported bug (https://bugzilla.redhat.com/show_bug.cgi?id=445449). So I decided to use "lxdm", a nice Display Manager from lxde which by default disable list of users.
lxdm screenshot
                                                lxdm screenshot
Install lxdm
Login with "root" and run the following command.
#yum install lxdm                                                                   
Start lxdm by default
#echo "DISPLAYMANAGER=LXDE" >/etc/sysconfig/desktop          
edit "/etc/X11/prefdm". Notice bold text in script. New prefdm will look like :-
----------------------------------------------------------------------------------------
#!/bin/sh

PATH=/sbin:/usr/sbin:/bin:/usr/bin

# We need to source this so that the login screens get translated
[ -f /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n

# Run preferred X display manager
quit_arg=
preferred=
if [ -f /etc/sysconfig/desktop ]; then
    . /etc/sysconfig/desktop
    if [ "$DISPLAYMANAGER" = GNOME ]; then
        preferred=/usr/sbin/gdm
        quit_arg="--retain-splash"
    elif [ "$DISPLAYMANAGER" = KDE ]; then
        preferred=/usr/bin/kdm
    elif [ "$DISPLAYMANAGER" = WDM ]; then
        preferred=/usr/bin/wdm
    elif [ "$DISPLAYMANAGER" = LXDE ]; then
          preferred=/usr/bin/lxdm

        elif [ -n "$DISPLAYMANAGER" ]; then
        preferred=$DISPLAYMANAGER
    else
        quit_arg="--retain-splash"
    fi
else
    quit_arg="--retain-splash"
fi

# shut down boot splash
/usr/bin/plymouth quit $quit_arg

shopt -s execfail

[ -n "$preferred" ] && exec $preferred "$@" >/dev/null 2>&1

# Fallbacks, in order
exec gdm "$@" >/dev/null 2>&1
exec kdm "$@" >/dev/null 2>&1

for pkg in $(rpm -q --qf "%{NAME}\n" --whatprovides "service(graphical-login)"| LC_ALL=C sort -u) ; do
    dm=$(rpm -q --provides $pkg | awk '/^service\(graphical-login\)/ { print $3 ; exit }')
    if [ -n "$dm" ]; then
        exec $dm "$@" >/dev/null 2>&1
    else
        exec $pkg "$@" >/dev/null 2>&1
    fi
done

# catch all exit error
exit 1

-----------------------------------------------------------------------------------------
That's all. You have replaced GDM with new "LXDM". Reboot system to see you new login window.

0 comments :

Post a Comment