Tiny Core Linux
Tiny Core Base => TCB Bugs => Topic started by: ToasterKing on June 16, 2011, 06:24:15 PM
-
By default logging in starts X. I like to run with the noautologin boot code and frequently log in across the network.
X gets started leaving anyone who walks by the box able to pop up a shell as me even though I logged in via a text-only ssh session. My suggested fix for this is below.
To only start X from the console, change the last few lines in the users .profile from:
[ ! -f /etc/sysconfig/Xserver ] ||
[ -f /etc/sysconfig/text ] ||
[ -e /tmp/.X11-unix/X0 ] ||
startx
to:
term_type=`/usr/bin/tty`
[ ${term_type:5:3} = "tty" ] && (
[ ! -f /etc/sysconfig/Xserver ] ||
[ -f /etc/sysconfig/text ] ||
[ -e /tmp/.X11-unix/X0 ] ||
startx
)
-
Use the boot code 'text'.
-
The 'text' boot code prevents X from being launched on login at all (without the user typing 'startx'). The tweak launches it on login, but only on local login.
The effect is that locally it looks no different than 'noautologin' by itself but the remote launch of the desktop no longer happens.
Happy to keep making the change locally, but the tweaked version seems more correct to me.
-
@ToasterKing, Your suggestion is more flexible and is therefore accepted. Thanks. Look for it in v.3.7.1.