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.
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.
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!
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.
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.
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
for i in /sys/block/s[dr]?/uevent ; do sudo /bin/sh -c "echo add > $i" done
with sudo /usr/sbin/sys_uevent_add.sh. Twice!
new executable file /usr/bin/x with content
#!/bin/sh exec /usr/bin/startx.orig
sudo visudo (i.e. edit /etc/sudoers).
# Cmnd alias specification # sudo stuff used in startx -> /usr/bin/startsimple.sh Cmnd_Alias MYSTARTX = /usr/bin/sessreg, \ /usr/sbin/sys_uevent_add.sh, \ /bin/rm -f /tmp/kdesession /tmp/nologin, \ /bin/rm /tmp/nologin
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.
guest ALL=(ALL) NOPASSWD:MYSTARTX
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