Multiuser mode

A word of warning: I did this and it works for me. Still, the procedure is quite complicated and I won't recommended it to unexperienced Linux users.

If you wish to understand what i'm doing here, first read The Boot Process explanation. And enable rescue console, just in case.

STEP 1
add another user (i'm using user guest as an example) and make it part of groups audio,video,plugdev,users,fuse (and others?). setup a password for this new user.

STEP 2
we're going to hack the following files: /usr/sbin/services.sh /usr/bin/startx /usr/bin/startsimple.sh /etc/sudoers . make backup copy of them (i use to do something like cp /usr/sbin/services.sh /usr/sbin/services.sh.orig )

I won't tell this again. MAKE BACKUPS to all implied files!

STEP 3

cp /usr/bin/startx /usr/bin/startx.orig
# edit /usr/bin/startx and insert a line with 'exit 0' just before the first line
### like this
#!/bin/sh
exit 0
...

It's right, the startx command is doing nothing now.

STEP 4
edit /usr/sbin/services.sh and add, somewhere in the end


/usr/sbin/chvt 4
while : ; do /sbin/getty 38400 tty4 ; done &
while : ; do /sbin/getty 38400 tty5 ; done &

Uh, oh. I forgot, you'll have to install console-tools (for chvt) from a xandros repo.

STEP 5
create new (executable!) file /usr/sbin/sys_uevent_add.sh with content

#!/bin/sh
# by vang
# this script is called from /usr/bin/startsimple.sh (as root via sudo)

for i in /sys/block/s[dr]?/uevent ; do
  echo add > $i
done

STEP 6

STEP 7
new executable file /usr/bin/x with content

#!/bin/sh
exec /usr/bin/startx.orig

STEP 8
sudo visudo (i.e. edit /etc/sudoers).

More commands will probably get added here. The idea is that i don't want any user to be able to do 'sudo bash / sudo anything' on the system.

STEP 9
reboot. it should gave you a nice text only terminal (on tty4) with the login prompt. user and password. Still in text mode. Now just use the command x to start the graphical mode. You can leave the graphical mode with crtl-alt-backspace (killing X11 session) and you're back in terminal. logout and login as user guest. have fun ;-)