From e947cb52c6b08511c3a44e8ec3bb47030df2e2cb Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Thu, 6 Oct 2011 02:22:35 +0200 Subject: [PATCH] Configure live targets for autologin as 'liveuser' user instead of root --- Makefile.defs | 4 ++-- platforms/flash-1GB/post.inc.sh | 12 +----------- platforms/livecd-gnome-root/post.inc.sh | 8 +------- platforms/livecd-light-root/post.inc.sh | 8 +------- platforms/livecd-root/post.inc.sh | 9 +-------- platforms/livedvd-root/post.inc.sh | 11 +---------- platforms/livegames-root/post.inc.sh | 10 +--------- platforms/livestudio-root/post.inc.sh | 8 +------- platforms/testcd-root/post.inc.sh | 10 +--------- 9 files changed, 10 insertions(+), 70 deletions(-) diff --git a/Makefile.defs b/Makefile.defs index 439e6dd..d84b5cf 100644 --- a/Makefile.defs +++ b/Makefile.defs @@ -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 libnvidia-tls.so.1 = xorg-drv-video-nvidia # 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 -# 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-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 # xorg-drv-input-mouse xorg-drv-input-keyboard xorg-drv-input-joystick xorg-drv-input-evtouch libGL.so.1 = libGL-Mesa-dri diff --git a/platforms/flash-1GB/post.inc.sh b/platforms/flash-1GB/post.inc.sh index bb89507..8e01a4c 100644 --- a/platforms/flash-1GB/post.inc.sh +++ b/platforms/flash-1GB/post.inc.sh @@ -90,15 +90,8 @@ if [ -e $MOUNTDIR/opt/kde/share/config/kdm/kdmrc ]; then $MOUNTDIR/opt/kde/share/config/kdm/kdmrc sed -i 's|[#]AutoReLogin=.*|AutoReLogin=true|' \ $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=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) [ -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` prelink - -#echo "Performing binaries prelinking..." -#chroot $MOUNTDIR /bin/bash -c "PRELINK_NOINITCHECK=1 /etc/cron.daily/prelink" diff --git a/platforms/livecd-gnome-root/post.inc.sh b/platforms/livecd-gnome-root/post.inc.sh index a43aab2..89d9cd7 100644 --- a/platforms/livecd-gnome-root/post.inc.sh +++ b/platforms/livecd-gnome-root/post.inc.sh @@ -17,7 +17,7 @@ sed -i "s|id:3\(:initdefault.*\)|id:5\1|" $MOUNTDIR/etc/inittab cat > $MOUNTDIR/etc/gdm/custom.conf << _EOF [daemon] AutomaticLoginEnable=true -AutomaticLogin=root +AutomaticLogin=liveuser _EOF ## provide a basilar gtkrc (to be improved) @@ -53,12 +53,6 @@ sed -i -e '/^halt .*/i \ sed -i -e '/^reboot .*/i \ /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) [ -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 diff --git a/platforms/livecd-light-root/post.inc.sh b/platforms/livecd-light-root/post.inc.sh index a9f3e11..bab1b21 100644 --- a/platforms/livecd-light-root/post.inc.sh +++ b/platforms/livecd-light-root/post.inc.sh @@ -14,7 +14,7 @@ sed -i "s|id:3\(:initdefault.*\)|id:5\1|" $MOUNTDIR/etc/inittab # 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 chroot $MOUNTDIR update-alternatives-set-dri @@ -42,12 +42,6 @@ sed -i -e '/^halt .*/i \ sed -i -e '/^reboot .*/i \ /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) [ -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 diff --git a/platforms/livecd-root/post.inc.sh b/platforms/livecd-root/post.inc.sh index 808da58..a29ed0f 100644 --- a/platforms/livecd-root/post.inc.sh +++ b/platforms/livecd-root/post.inc.sh @@ -19,9 +19,7 @@ if [ -e $MOUNTDIR/opt/kde/share/config/kdm/kdmrc ]; then $MOUNTDIR/opt/kde/share/config/kdm/kdmrc sed -i 's|[#]*AutoReLogin=.*|AutoReLogin=true|' \ $MOUNTDIR/opt/kde/share/config/kdm/kdmrc - sed -i 's|[#]*AutoLoginUser=.*|AutoLoginUser=root|' \ - $MOUNTDIR/opt/kde/share/config/kdm/kdmrc - sed -i 's|[#]*AllowRootLogin=.*|AllowRootLogin=true|' \ + sed -i 's|[#]*AutoLoginUser=.*|AutoLoginUser=liveuser|' \ $MOUNTDIR/opt/kde/share/config/kdm/kdmrc fi @@ -51,11 +49,6 @@ sed -i -e '/^halt .*/i \ sed -i -e '/^reboot .*/i \ /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 for f in /usr/share/applications/chromium-devel.desktop /opt/kde/share/applications/kaffeine.desktop; do diff --git a/platforms/livedvd-root/post.inc.sh b/platforms/livedvd-root/post.inc.sh index 28d5263..3a80b32 100644 --- a/platforms/livedvd-root/post.inc.sh +++ b/platforms/livedvd-root/post.inc.sh @@ -19,11 +19,8 @@ if [ -e $MOUNTDIR/opt/kde/share/config/kdm/kdmrc ]; then $MOUNTDIR/opt/kde/share/config/kdm/kdmrc sed -i 's|[#]*AutoReLogin=.*|AutoReLogin=true|' \ $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 - fi # FIXME: ensure alternatives are correclty set @@ -52,12 +49,6 @@ sed -i -e '/^halt .*/i \ sed -i -e '/^reboot .*/i \ /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 for f in /usr/share/applications/chromium-devel.desktop \ /opt/kde/share/applications/kaffeine.desktop /opt/kde/share/applications/amarok.desktop; do diff --git a/platforms/livegames-root/post.inc.sh b/platforms/livegames-root/post.inc.sh index a4c9388..7d27432 100644 --- a/platforms/livegames-root/post.inc.sh +++ b/platforms/livegames-root/post.inc.sh @@ -19,9 +19,7 @@ if [ -e $MOUNTDIR/opt/kde/share/config/kdm/kdmrc ]; then $MOUNTDIR/opt/kde/share/config/kdm/kdmrc sed -i 's|[#]*AutoReLogin=.*|AutoReLogin=true|' \ $MOUNTDIR/opt/kde/share/config/kdm/kdmrc - sed -i 's|[#]*AutoLoginUser=.*|AutoLoginUser=root|' \ - $MOUNTDIR/opt/kde/share/config/kdm/kdmrc - sed -i 's|[#]*AllowRootLogin=.*|AllowRootLogin=true|' \ + sed -i 's|[#]*AutoLoginUser=.*|AutoLoginUser=liveuser|' \ $MOUNTDIR/opt/kde/share/config/kdm/kdmrc fi @@ -51,12 +49,6 @@ sed -i -e '/^halt .*/i \ sed -i -e '/^reboot .*/i \ /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 for f in /usr/share/applications/chromium-devel.desktop; do chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f diff --git a/platforms/livestudio-root/post.inc.sh b/platforms/livestudio-root/post.inc.sh index 51ab9f8..2df90d6 100644 --- a/platforms/livestudio-root/post.inc.sh +++ b/platforms/livestudio-root/post.inc.sh @@ -19,7 +19,7 @@ if [ -e $MOUNTDIR/opt/kde/share/config/kdm/kdmrc ]; then $MOUNTDIR/opt/kde/share/config/kdm/kdmrc sed -i 's|[#]AutoReLogin=.*|AutoReLogin=true|' \ $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 # 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 \ /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) [ -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 diff --git a/platforms/testcd-root/post.inc.sh b/platforms/testcd-root/post.inc.sh index 27872ec..2768a84 100644 --- a/platforms/testcd-root/post.inc.sh +++ b/platforms/testcd-root/post.inc.sh @@ -19,9 +19,7 @@ if [ -e $MOUNTDIR/opt/kde/share/config/kdm/kdmrc ]; then $MOUNTDIR/opt/kde/share/config/kdm/kdmrc sed -i 's|[#]*AutoReLogin=.*|AutoReLogin=true|' \ $MOUNTDIR/opt/kde/share/config/kdm/kdmrc - sed -i 's|[#]*AutoLoginUser=.*|AutoLoginUser=root|' \ - $MOUNTDIR/opt/kde/share/config/kdm/kdmrc - sed -i 's|[#]*AllowRootLogin=.*|AllowRootLogin=true|' \ + sed -i 's|[#]*AutoLoginUser=.*|AutoLoginUser=liveuser|' \ $MOUNTDIR/opt/kde/share/config/kdm/kdmrc fi @@ -51,12 +49,6 @@ sed -i -e '/^halt .*/i \ sed -i -e '/^reboot .*/i \ /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 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