Loading Search...

Thursday, October 23, 2008

linux automatic login, startx and shutdown

making linux easier for noob and kids by automatic login into linux, then startx and then shutdown the computer when they quit.

first, setup mingetty for automatic login on debian minimal desktop:
# sudo aptitude install mingetty
# sudo nano -w /etc/inittab 
# then comment this line and add the next line:
# 1:2345:respawn:/sbin/getty 38400 tty1
1:2345:respawn:/sbin/mingetty --autologin replacewithyourusername tty1

or, on ubuntu minimal desktop:
# sudo aptitude install mingetty
# sudo nano -w /etc/event.d/tty1
# look at the last line
# comment this line and add the next line:
# exec /sbin/getty 38400 tty1 
exec /sbin/mingetty --autologin replacewithyourusername tty1

then allow everyone to shutdown:
sudo chmod +s /sbin/halt

then, automatic startx and shutdown after exiting x:
# nano -w .bashrc
# put these lines at the most bottom
if [ $(tty) == "/dev/tty1" ]; then
  startx
  /sbin/halt
fi
--
tips & tricks on computers and gadgets
denny on IT ; let's doIT
documenting the brain

Wednesday, October 22, 2008

replacing kdm/gdm/slim with qingy


qingy is not getty. and surely it is not x display manager. but it's a getty replacement. just like getty, it ask you for login and let you access your linux according to your login. beyond login, qingy can give you X session in addition to text/console session. you can even start multiple X session at once.
so, it's (almost) a perfect replacement for any x display manager like kdm/gdm/slim/xdm/wdm. especially usefull for ubuntu / debian minimal desktop installation. save you a lot of system resources on legacy computers.

first, remove any display manager you have:
sudo aptitude purge kdm gdm slim xdm wdm

easily install it on debian/ubuntu:
sudo aptitude install qingy

now, to make qingy works on ubuntu minimal desktop, edit file as follow:
# sudo nano -w /etc/event.d/tty1
# look at the last line
# comment this line and add the next line:
#exec /sbin/getty 38400 tty1
exec /usr/sbin/qingy tty1
or, on debian minimal desktop:
# sudo nano -w /etc/inittab 
# then comment this line and add the next line:
# 1:2345:respawn:/sbin/getty 38400 tty1
1:2345:respawn:/usr/sbin/qingy tty1

that's it. now you can reboot and get into qingy instead of x display manager.
how do you like it?
--
tips & tricks on computers and gadgets
denny on IT ; let's doIT
documenting the brain