# HG changeset patch # User Christophe Lincoln # Date 1398975242 -7200 # Node ID 3671428835e56d3dca8c04d31ea33c85ed2ba45f # Parent 1368d468177feb8984c816f05bb6d76716e1cb78 Fix: starting Xorg (we dont need any config file) diff -r 1368d468177f -r 3671428835e5 etc/init.d/bootopts.sh --- a/etc/init.d/bootopts.sh Fri Mar 28 15:00:11 2014 +0000 +++ b/etc/init.d/bootopts.sh Thu May 01 22:14:02 2014 +0200 @@ -23,6 +23,7 @@ # This option is not handled by a loop and case like others and has no # effect on an installed system. if ! grep -q "100[0-9]:100" /etc/passwd; then + if fgrep -q "user=" /proc/cmdline; then USER=$(cat /proc/cmdline | sed 's/.*user=\([^ ]*\).*/\1/') # Avoid usage of an existing system user or root. @@ -32,19 +33,21 @@ else USER=tux fi + + # Make sure we have users applications.conf + if [ ! -f "/etc/skel/.config/slitaz/applications.conf" ]; then + mkdir -p /etc/skel/.config/slitaz + cp /etc/slitaz/applications.conf /etc/skel/.config/slitaz + fi + echo -n "Configuring user and group: $USER..." adduser -D -s /bin/sh -g "SliTaz User" -G users -h /home/$USER $USER passwd -d $USER >/dev/null status - # Audio and cdrom group. - addgroup $USER audio - addgroup $USER cdrom - addgroup $USER video - addgroup $USER tty - # Slim default user. + + # Slim default user if [ -f /etc/slim.conf ]; then - sed -i s/"default_user .*"/"default_user $USER"/\ - /etc/slim.conf + sed -i s/"default_user .*"/"default_user $USER"/ /etc/slim.conf fi fi @@ -180,8 +183,3 @@ continue ;; esac done - -# If no default WM fallback to Openbox (we never know). -if [ ! -f /etc/X11/wm.default ]; then - echo "openbox" > /etc/X11/wm.default -fi diff -r 1368d468177f -r 3671428835e5 etc/init.d/rcS --- a/etc/init.d/rcS Fri Mar 28 15:00:11 2014 +0000 +++ b/etc/init.d/rcS Thu May 01 22:14:02 2014 +0200 @@ -178,6 +178,18 @@ /etc/init.d/$script done +# Start X session +if [ "$SCREEN" != "text" ] && [ "$LOGIN_MANAGER" ] && [ -x "/etc/init.d/$LOGIN_MANAGER" ]; then + colorize 36 "Starting X environment..." + # We need Xorg 40-Keyboard.conf and SliTaz applications.conf + if [ ! -s "/etc/X11/xorg.conf.d/40-Keyboard.conf" ]; then + echo "Configuring Xorg server..." && HOME="/root" + tazx init + fi + #/etc/init.d/dbus start + (sleep 2; /etc/init.d/${LOGIN_MANAGER} start >/dev/null) & +fi + # Start all daemons specified with $RUN_DAEMONS if [ "$RUN_DAEMONS" ]; then colorize 33 "Starting all daemons..." @@ -186,14 +198,6 @@ done fi -# Start X session -if [ "$SCREEN" != "text" ] && [ "$LOGIN_MANAGER" ] && [ -x /etc/init.d/$LOGIN_MANAGER ]; then - mkdir -p /var/run/dbus - /etc/init.d/dbus start - colorize 36 "Starting X environment..." - (sleep 2 && /etc/init.d/$LOGIN_MANAGER start >/dev/null) & -fi - # Back to a verbose mode (sleep 6 && echo "7 4 1 7" > /proc/sys/kernel/printk) & diff -r 1368d468177f -r 3671428835e5 etc/init.d/system.sh --- a/etc/init.d/system.sh Fri Mar 28 15:00:11 2014 +0000 +++ b/etc/init.d/system.sh Thu May 01 22:14:02 2014 +0200 @@ -114,13 +114,5 @@ swapon -a && status fi -# Xorg auto configuration: $HOME is not yet set. We config even if -# screen=text so X can be started by users via 'startx' -if [ ! -s /etc/X11/xorg.conf ] && [ -x /usr/bin/Xorg ]; then - echo "Configuring Xorg..." - HOME=/root - tazx config-xorg 2>/var/log/xorg.configure.log -fi - # Start TazPanel [ -x /usr/bin/tazpanel ] && tazpanel start