Configure live targets for autologin as 'liveuser' user instead of root

This commit is contained in:
Silvan Calarco 2011-10-06 02:22:35 +02:00
parent 6588c96653
commit e947cb52c6
9 changed files with 10 additions and 70 deletions

View File

@ -30,8 +30,8 @@ libGLcore.so.1 = xorg-drv-video-nvidia
# xorg-drv-video-nvidia_71xx xorg-drv-video-nvidia_96xx xorg-drv-video-nvidia_173xx # xorg-drv-video-nvidia_71xx xorg-drv-video-nvidia_96xx xorg-drv-video-nvidia_173xx
libnvidia-tls.so.1 = xorg-drv-video-nvidia libnvidia-tls.so.1 = xorg-drv-video-nvidia
# xorg-drv-video-nvidia_71xx xorg-drv-video-nvidia_96xx xorg-drv-video-nvidia_173xx # xorg-drv-video-nvidia_71xx xorg-drv-video-nvidia_96xx xorg-drv-video-nvidia_173xx
xorgdrvvideo = xorg-drv-video-base xorg-drv-video-fglrx xorg-drv-video-nvidia xorg-drv-video-nouveau xorg-drv-video-vboxvideo xorgdrvvideo = xorg-drv-video-base xorg-drv-video-fglrx xorg-drv-video-nvidia xorg-drv-video-nouveau
# xorg-drv-video-nvidia_71xx xorg-drv-video-nvidia_96xx xorg-drv-video-nvidia_173xx # xorg-drv-video-nvidia_71xx xorg-drv-video-nvidia_96xx xorg-drv-video-nvidia_173xx xorg-drv-video-vboxvideo
xorgdrvinput = xorg-drv-input-void xorg-drv-input-synaptics xorg-drv-input-vboxmouse xorg-drv-input-evdev xorgdrvinput = xorg-drv-input-void xorg-drv-input-synaptics xorg-drv-input-vboxmouse xorg-drv-input-evdev
# xorg-drv-input-mouse xorg-drv-input-keyboard xorg-drv-input-joystick xorg-drv-input-evtouch # xorg-drv-input-mouse xorg-drv-input-keyboard xorg-drv-input-joystick xorg-drv-input-evtouch
libGL.so.1 = libGL-Mesa-dri libGL.so.1 = libGL-Mesa-dri

View File

@ -90,15 +90,8 @@ if [ -e $MOUNTDIR/opt/kde/share/config/kdm/kdmrc ]; then
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc $MOUNTDIR/opt/kde/share/config/kdm/kdmrc
sed -i 's|[#]AutoReLogin=.*|AutoReLogin=true|' \ sed -i 's|[#]AutoReLogin=.*|AutoReLogin=true|' \
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc $MOUNTDIR/opt/kde/share/config/kdm/kdmrc
sed -i 's|[#]AutoLoginUser=.*|AutoLoginUser=root|' \ sed -i 's|[#]AutoLoginUser=.*|AutoLoginUser=liveuser|' \
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc $MOUNTDIR/opt/kde/share/config/kdm/kdmrc
sed -i 's|[#]AllowRootLogin=.*|AllowRootLogin=root|' \
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc
# installer icon on root desktop
# FIXME: move this somewhere else
mkdir -p $MOUNTDIR/root/Desktop/
cp $MOUNTDIR/usr/share/applications/openmamba-installer.desktop $MOUNTDIR/root/Desktop/
# prebuild postplug sound CARDID_DB (with some ugly trick to make it work from chroot) # prebuild postplug sound CARDID_DB (with some ugly trick to make it work from chroot)
[ -e $MOUNTDIR/lib/modules/`uname -r` ] || ln -s ${KERNEL_MAJVER}${KERNEL_EXTRAVER} $MOUNTDIR/lib/modules/`uname -r` [ -e $MOUNTDIR/lib/modules/`uname -r` ] || ln -s ${KERNEL_MAJVER}${KERNEL_EXTRAVER} $MOUNTDIR/lib/modules/`uname -r`
@ -108,6 +101,3 @@ rm -f $MOUNTDIR/tmp/sounddb.sh
[ -L $MOUNTDIR/lib/modules/`uname -r` ] && rm $MOUNTDIR/lib/modules/`uname -r` [ -L $MOUNTDIR/lib/modules/`uname -r` ] && rm $MOUNTDIR/lib/modules/`uname -r`
prelink prelink
#echo "Performing binaries prelinking..."
#chroot $MOUNTDIR /bin/bash -c "PRELINK_NOINITCHECK=1 /etc/cron.daily/prelink"

View File

@ -17,7 +17,7 @@ sed -i "s|id:3\(:initdefault.*\)|id:5\1|" $MOUNTDIR/etc/inittab
cat > $MOUNTDIR/etc/gdm/custom.conf << _EOF cat > $MOUNTDIR/etc/gdm/custom.conf << _EOF
[daemon] [daemon]
AutomaticLoginEnable=true AutomaticLoginEnable=true
AutomaticLogin=root AutomaticLogin=liveuser
_EOF _EOF
## provide a basilar gtkrc (to be improved) ## provide a basilar gtkrc (to be improved)
@ -53,12 +53,6 @@ sed -i -e '/^halt .*/i \
sed -i -e '/^reboot .*/i \ sed -i -e '/^reboot .*/i \
/sbin/eject_cd.sh 2>&1 >/dev/null' $MOUNTDIR/etc/init.d/reboot /sbin/eject_cd.sh 2>&1 >/dev/null' $MOUNTDIR/etc/init.d/reboot
# installer icon on root desktop
# FIXME: move this somewhere else
mkdir -p $MOUNTDIR/root/Desktop/
cp $MOUNTDIR/usr/share/applications/openmamba-installer.desktop $MOUNTDIR/root/Desktop/
cp $MOUNTDIR/usr/share/applications/openmamba-bootrecover.desktop $MOUNTDIR/root/Desktop/
# prebuild postplug sound CARDID_DB (with some ugly trick to make it work from chroot) # prebuild postplug sound CARDID_DB (with some ugly trick to make it work from chroot)
[ -e $MOUNTDIR/lib/modules/`uname -r` ] || ln -s ${KERNEL_MAJVER}${KERNEL_EXTRAVER} $MOUNTDIR/lib/modules/`uname -r` [ -e $MOUNTDIR/lib/modules/`uname -r` ] || ln -s ${KERNEL_MAJVER}${KERNEL_EXTRAVER} $MOUNTDIR/lib/modules/`uname -r`
echo "SOUND_BUILD_CARDID_DB_ONLY=1 /etc/postplug/postplug.d/sound" >> $MOUNTDIR/tmp/sounddb.sh echo "SOUND_BUILD_CARDID_DB_ONLY=1 /etc/postplug/postplug.d/sound" >> $MOUNTDIR/tmp/sounddb.sh

View File

@ -14,7 +14,7 @@ sed -i "s|id:3\(:initdefault.*\)|id:5\1|" $MOUNTDIR/etc/inittab
# configure LXDM for autologin # configure LXDM for autologin
# #
sed -i "s|# autologin.*|autologin=root|" $MOUNTDIR/etc/lxdm/lxdm.conf sed -i "s|# autologin.*|autologin=liveuser|" $MOUNTDIR/etc/lxdm/lxdm.conf
# FIXME: ensure alternatives are correclty set # FIXME: ensure alternatives are correclty set
chroot $MOUNTDIR update-alternatives-set-dri chroot $MOUNTDIR update-alternatives-set-dri
@ -42,12 +42,6 @@ sed -i -e '/^halt .*/i \
sed -i -e '/^reboot .*/i \ sed -i -e '/^reboot .*/i \
/sbin/eject_cd.sh 2>&1 >/dev/null' $MOUNTDIR/etc/init.d/reboot /sbin/eject_cd.sh 2>&1 >/dev/null' $MOUNTDIR/etc/init.d/reboot
# installer icon on root desktop
# FIXME: move this somewhere else
mkdir -p $MOUNTDIR/root/Desktop/
cp $MOUNTDIR/usr/share/applications/openmamba-installer.desktop $MOUNTDIR/root/Desktop/
cp $MOUNTDIR/usr/share/applications/openmamba-bootrecover.desktop $MOUNTDIR/root/Desktop/
# prebuild postplug sound CARDID_DB (with some ugly trick to make it work from chroot) # prebuild postplug sound CARDID_DB (with some ugly trick to make it work from chroot)
[ -e $MOUNTDIR/lib/modules/`uname -r` ] || ln -s ${KERNEL_MAJVER}${KERNEL_EXTRAVER} $MOUNTDIR/lib/modules/`uname -r` [ -e $MOUNTDIR/lib/modules/`uname -r` ] || ln -s ${KERNEL_MAJVER}${KERNEL_EXTRAVER} $MOUNTDIR/lib/modules/`uname -r`
echo "SOUND_BUILD_CARDID_DB_ONLY=1 /etc/postplug/postplug.d/sound" >> $MOUNTDIR/tmp/sounddb.sh echo "SOUND_BUILD_CARDID_DB_ONLY=1 /etc/postplug/postplug.d/sound" >> $MOUNTDIR/tmp/sounddb.sh

View File

@ -19,9 +19,7 @@ if [ -e $MOUNTDIR/opt/kde/share/config/kdm/kdmrc ]; then
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc $MOUNTDIR/opt/kde/share/config/kdm/kdmrc
sed -i 's|[#]*AutoReLogin=.*|AutoReLogin=true|' \ sed -i 's|[#]*AutoReLogin=.*|AutoReLogin=true|' \
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc $MOUNTDIR/opt/kde/share/config/kdm/kdmrc
sed -i 's|[#]*AutoLoginUser=.*|AutoLoginUser=root|' \ sed -i 's|[#]*AutoLoginUser=.*|AutoLoginUser=liveuser|' \
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc
sed -i 's|[#]*AllowRootLogin=.*|AllowRootLogin=true|' \
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc $MOUNTDIR/opt/kde/share/config/kdm/kdmrc
fi fi
@ -51,11 +49,6 @@ sed -i -e '/^halt .*/i \
sed -i -e '/^reboot .*/i \ sed -i -e '/^reboot .*/i \
/sbin/eject_cd.sh 2>&1 >/dev/null' $MOUNTDIR/etc/init.d/reboot /sbin/eject_cd.sh 2>&1 >/dev/null' $MOUNTDIR/etc/init.d/reboot
# installer icon on root desktop
# FIXME: move this somewhere else
mkdir -p $MOUNTDIR/root/Desktop/
cp $MOUNTDIR/usr/share/applications/openmamba-installer.desktop $MOUNTDIR/root/Desktop/
cp $MOUNTDIR/usr/share/applications/openmamba-bootrecover.desktop $MOUNTDIR/root/Desktop/
# configure favorites in kde menu # configure favorites in kde menu
for f in /usr/share/applications/chromium-devel.desktop /opt/kde/share/applications/kaffeine.desktop; do for f in /usr/share/applications/chromium-devel.desktop /opt/kde/share/applications/kaffeine.desktop; do

View File

@ -19,11 +19,8 @@ if [ -e $MOUNTDIR/opt/kde/share/config/kdm/kdmrc ]; then
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc $MOUNTDIR/opt/kde/share/config/kdm/kdmrc
sed -i 's|[#]*AutoReLogin=.*|AutoReLogin=true|' \ sed -i 's|[#]*AutoReLogin=.*|AutoReLogin=true|' \
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc $MOUNTDIR/opt/kde/share/config/kdm/kdmrc
sed -i 's|[#]*AutoLoginUser=.*|AutoLoginUser=root|' \ sed -i 's|[#]*AutoLoginUser=.*|AutoLoginUser=liveuser|' \
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc $MOUNTDIR/opt/kde/share/config/kdm/kdmrc
sed -i 's|[#]*AllowRootLogin=.*|AllowRootLogin=true|' \
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc
fi fi
# FIXME: ensure alternatives are correclty set # FIXME: ensure alternatives are correclty set
@ -52,12 +49,6 @@ sed -i -e '/^halt .*/i \
sed -i -e '/^reboot .*/i \ sed -i -e '/^reboot .*/i \
/sbin/eject_cd.sh 2>&1 >/dev/null' $MOUNTDIR/etc/init.d/reboot /sbin/eject_cd.sh 2>&1 >/dev/null' $MOUNTDIR/etc/init.d/reboot
# installer icon on root desktop
# FIXME: move this somewhere else
mkdir -p $MOUNTDIR/root/Desktop/
cp $MOUNTDIR/usr/share/applications/openmamba-installer.desktop $MOUNTDIR/root/Desktop/
cp $MOUNTDIR/usr/share/applications/openmamba-bootrecover.desktop $MOUNTDIR/root/Desktop/
# configure favorites in kde menu # configure favorites in kde menu
for f in /usr/share/applications/chromium-devel.desktop \ for f in /usr/share/applications/chromium-devel.desktop \
/opt/kde/share/applications/kaffeine.desktop /opt/kde/share/applications/amarok.desktop; do /opt/kde/share/applications/kaffeine.desktop /opt/kde/share/applications/amarok.desktop; do

View File

@ -19,9 +19,7 @@ if [ -e $MOUNTDIR/opt/kde/share/config/kdm/kdmrc ]; then
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc $MOUNTDIR/opt/kde/share/config/kdm/kdmrc
sed -i 's|[#]*AutoReLogin=.*|AutoReLogin=true|' \ sed -i 's|[#]*AutoReLogin=.*|AutoReLogin=true|' \
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc $MOUNTDIR/opt/kde/share/config/kdm/kdmrc
sed -i 's|[#]*AutoLoginUser=.*|AutoLoginUser=root|' \ sed -i 's|[#]*AutoLoginUser=.*|AutoLoginUser=liveuser|' \
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc
sed -i 's|[#]*AllowRootLogin=.*|AllowRootLogin=true|' \
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc $MOUNTDIR/opt/kde/share/config/kdm/kdmrc
fi fi
@ -51,12 +49,6 @@ sed -i -e '/^halt .*/i \
sed -i -e '/^reboot .*/i \ sed -i -e '/^reboot .*/i \
/sbin/eject_cd.sh 2>&1 >/dev/null' $MOUNTDIR/etc/init.d/reboot /sbin/eject_cd.sh 2>&1 >/dev/null' $MOUNTDIR/etc/init.d/reboot
# installer icon on root desktop
# FIXME: move this somewhere else
mkdir -p $MOUNTDIR/root/Desktop/
cp $MOUNTDIR/usr/share/applications/openmamba-installer.desktop $MOUNTDIR/root/Desktop/
cp $MOUNTDIR/usr/share/applications/openmamba-bootrecover.desktop $MOUNTDIR/root/Desktop/
# configure favorites in kde menu # configure favorites in kde menu
for f in /usr/share/applications/chromium-devel.desktop; do for f in /usr/share/applications/chromium-devel.desktop; do
chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f

View File

@ -19,7 +19,7 @@ if [ -e $MOUNTDIR/opt/kde/share/config/kdm/kdmrc ]; then
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc $MOUNTDIR/opt/kde/share/config/kdm/kdmrc
sed -i 's|[#]AutoReLogin=.*|AutoReLogin=true|' \ sed -i 's|[#]AutoReLogin=.*|AutoReLogin=true|' \
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc $MOUNTDIR/opt/kde/share/config/kdm/kdmrc
sed -i 's|[#]AutoLoginUser=.*|AutoLoginUser=root|' \ sed -i 's|[#]AutoLoginUser=.*|AutoLoginUser=liveuser|' \
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc $MOUNTDIR/opt/kde/share/config/kdm/kdmrc
# FIXME: move to /etc some configuration files and make appropriate symlinks # FIXME: move to /etc some configuration files and make appropriate symlinks
@ -53,12 +53,6 @@ sed -i -e '/^halt .*/i \
sed -i -e '/^reboot .*/i \ sed -i -e '/^reboot .*/i \
/sbin/eject_cd.sh 2>&1 >/dev/null' $MOUNTDIR/etc/init.d/reboot /sbin/eject_cd.sh 2>&1 >/dev/null' $MOUNTDIR/etc/init.d/reboot
# installer icon on root desktop
# FIXME: move this somewhere else
mkdir -p $MOUNTDIR/root/Desktop/
cp $MOUNTDIR/usr/share/applications/openmamba-installer.desktop $MOUNTDIR/root/Desktop/
cp $MOUNTDIR/usr/share/applications/openmamba-bootrecover.desktop $MOUNTDIR/root/Desktop/
# prebuild postplug sound CARDID_DB (with some ugly trick to make it work from chroot) # prebuild postplug sound CARDID_DB (with some ugly trick to make it work from chroot)
[ -e $MOUNTDIR/lib/modules/`uname -r` ] || ln -s ${KERNEL_MAJVER}${KERNEL_EXTRAVER} $MOUNTDIR/lib/modules/`uname -r` [ -e $MOUNTDIR/lib/modules/`uname -r` ] || ln -s ${KERNEL_MAJVER}${KERNEL_EXTRAVER} $MOUNTDIR/lib/modules/`uname -r`
echo "SOUND_BUILD_CARDID_DB_ONLY=1 /etc/postplug/postplug.d/sound" >> $MOUNTDIR/tmp/sounddb.sh echo "SOUND_BUILD_CARDID_DB_ONLY=1 /etc/postplug/postplug.d/sound" >> $MOUNTDIR/tmp/sounddb.sh

View File

@ -19,9 +19,7 @@ if [ -e $MOUNTDIR/opt/kde/share/config/kdm/kdmrc ]; then
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc $MOUNTDIR/opt/kde/share/config/kdm/kdmrc
sed -i 's|[#]*AutoReLogin=.*|AutoReLogin=true|' \ sed -i 's|[#]*AutoReLogin=.*|AutoReLogin=true|' \
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc $MOUNTDIR/opt/kde/share/config/kdm/kdmrc
sed -i 's|[#]*AutoLoginUser=.*|AutoLoginUser=root|' \ sed -i 's|[#]*AutoLoginUser=.*|AutoLoginUser=liveuser|' \
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc
sed -i 's|[#]*AllowRootLogin=.*|AllowRootLogin=true|' \
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc $MOUNTDIR/opt/kde/share/config/kdm/kdmrc
fi fi
@ -51,12 +49,6 @@ sed -i -e '/^halt .*/i \
sed -i -e '/^reboot .*/i \ sed -i -e '/^reboot .*/i \
/sbin/eject_cd.sh 2>&1 >/dev/null' $MOUNTDIR/etc/init.d/reboot /sbin/eject_cd.sh 2>&1 >/dev/null' $MOUNTDIR/etc/init.d/reboot
# installer icon on root desktop
# FIXME: move this somewhere else
mkdir -p $MOUNTDIR/root/Desktop/
cp $MOUNTDIR/usr/share/applications/openmamba-installer.desktop $MOUNTDIR/root/Desktop/
cp $MOUNTDIR/usr/share/applications/openmamba-bootrecover.desktop $MOUNTDIR/root/Desktop/
# configure favorites in kde menu # configure favorites in kde menu
for f in /usr/share/applications/chromium-devel.desktop /opt/kde/share/applications/kaffeine.desktop; do for f in /usr/share/applications/chromium-devel.desktop /opt/kde/share/applications/kaffeine.desktop; do
chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f