Opened 15 years ago
Last modified 14 years ago
#80 new defect
activar el number lock con gdm si no esta ya activado
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | minor | Milestone: | cacique-1.0 |
Component: | UI : escritorio : login | Version: | |
Keywords: | Cc: |
Description
Change History (2)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
No se como terminar de definirlo, ni adonde ponerlo, esto seria una clase?
package { numlockx:
ensure => installed }
file {
"/etc/gdm/Init/Default":
owner => "root", group => "root", mode => "755"; source => "puppet:///files/etc/gdm/Init/Default"
### # # file: /etc/gdm/Init/Default # # Contenido del archivo original modificado, se le añaden las lineas: # # if [ -x /usr/bin/numlockx ]; then # /usr/bin/numlockx on # fi # # Al final del archivo, ver comentarios. # ###
#!/bin/sh # Stolen from the debian kdm setup, aren't I sneaky # Plus a lot of fun stuff added # -George
PATH="/usr/bin:$PATH" OLD_IFS=$IFS
#if [ -x '/usr/bin/xsplash' ]; #then # /usr/bin/xsplash --gdm-session --daemon #fi
/sbin/initctl -q emit login-session-start DISPLAY_MANAGER=gdm
gdmwhich () {
COMMAND="$1" OUTPUT= IFS=: for dir in $PATH do
if test -x "$dir/$COMMAND" ; then
if test "x$OUTPUT" = "x" ; then
OUTPUT="$dir/$COMMAND"
fi
fi
done IFS=$OLD_IFS echo "$OUTPUT"
}
sysresources=/etc/X11/Xresources
# merge in defaults if [ -f "$sysresources" ]; then
xrdb -merge "$sysresources"
fi
sysmodmap=/etc/X11/Xmodmap
XMODMAP=gdmwhich xmodmap
if [ "x$XMODMAP" != "x" ] ; then
if [ "x$GDM_PARENT_DISPLAY" = "x" ]; then
if [ -f $sysmodmap ]; then
$XMODMAP $sysmodmap
fi
else
( DISPLAY=$GDM_PARENT_DISPLAY XAUTHORITY=$GDM_PARENT_XAUTHORITY $XMODMAP -pke ) | $XMODMAP -
fi
# # Switch Sun's Alt and Meta mod mappings #
UNAME=
gdmwhich uname
PROCESSOR=$UNAME -p
if [ "x$PROCESSOR" = "xsparc" ]; thenif $XMODMAP | /usr/bin/grep mod4 | /usr/bin/grep Alt > /dev/null 2>/dev/null then
$XMODMAP -e "clear Mod1" \
-e "clear Mod4" \ -e "add Mod1 = Alt_L" \ -e "add Mod1 = Alt_R" \ -e "add Mod4 = Meta_L" \ -e "add Mod4 = Meta_R"
fi
fi
fi
SETXKBMAP=gdmwhich setxkbmap
if [ "x$SETXKBMAP" != "x" ] ; then
# FIXME: is this all right? Is this completely on crack? # What this does is move the xkb configuration from the GDM_PARENT_DISPLAY # FIXME: This should be done in code. Or there must be an easier way ... if [ -n "$GDM_PARENT_DISPLAY" ]; then
XKBSETUP=
( DISPLAY=$GDM_PARENT_DISPLAY XAUTHORITY=$GDM_PARENT_XAUTHORITY $SETXKBMAP -v )
if [ -n "$XKBSETUP" ]; thenXKBKEYMAP=
echo "$XKBSETUP" | grep '^keymap' | awk '{ print $2 }'
XKBTYPES=echo "$XKBSETUP" | grep '^types' | awk '{ print $2 }'
XKBCOMPAT=echo "$XKBSETUP" | grep '^compat' | awk '{ print $2 }'
XKBSYMBOLS=echo "$XKBSETUP" | grep '^symbols' | awk '{ print $2 }'
XKBGEOMETRY=echo "$XKBSETUP" | grep '^geometry' | awk '{ print $2 }'
if [ -n "$XKBKEYMAP" ]; then$SETXKBMAP -keymap "$XKBKEYMAP"
elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" -a -n "$XKBGEOMETRY" ]; then
$SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS" -geometry "$XKBGEOMETRY"
elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" ]; then
$SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS"
elif [ -n "$XKBSYMBOLS" ]; then
$SETXKBMAP -symbols "$XKBSYMBOLS"
fi
fi
fi
fi
exit 0
### Añadido para habilitar numlock al iniciar X.
if [ -x /usr/bin/numlockx ]; then
/usr/bin/numlockx on
fi
Enabling NumLock in GDM (as used in Ubuntu Gnome and Xubuntu XFCE)
If you are using GDM you can use numlockx:
Install numlockx using apt-get
Edit /etc/gdm/Init/Default. For older versions of ubuntu edit /etc/X11/gdm/Init/Default instead. Find the line exit 0 Add the following code above that line
https://help.ubuntu.com/community/NumLock