Debian Admin

Debian/Ubuntu Linux System Administration Tutorials,Howtos,Tips

  • RSS Subscribe

    subscribe to the Debian Admin RSS feed
  • Sponsors



  • Categories

  • Sponsors

  • Support DebianAdmin

    Amount $:
    Website(Optional):


  • Meta

  • Archives



How to auto login and startx without a display manager in Debian

Posted by Admin on December 23rd, 2008

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

If you want to auto login and startx without a display manager in Debian use the one of the following method

Method 1

First you need to edit the /etc/inittab file

#nano /etc/inittab

look for the following line

1:2345:respawn:/sbin/getty 38400 tty1

and commentout

#1:2345:respawn:/sbin/getty 38400 tty1

add the following line

1:2345:respawn:/bin/login -f YOUR_USER_NAME tty1 </dev/tty1 >/dev/tty1 2>&1

Save and exit the file

Now you need to edit .bash_profile and at the bottom add  the following command and save

startx

Method 2

First install rungetty using the following command

#apt-get install rungetty

you need to edit the /etc/inittab file

#nano /etc/inittab

look for the following line

comment out

#1:2345:respawn:/sbin/getty 38400 tty1

and add

1:2345:respawn:/sbin/rungetty tty1 --autologin YOUR_USER_NAME

edit .bash_profile and at the bottom add

if [ -z "$DISPLAY" ] && [ $(tty) = /dev/tty1 ]; then
while true
do
startx --
sleep 10
done
fi

  • Share/Bookmark

Random Posts

2 Responses to “How to auto login and startx without a display manager in Debian”

  1. anonymous Says:

    Method 2:
    while; true
    do

    You forgot about `;` after “while”.

  2. tawan Says:

    Great, I had a hunch you could do this and so happy you can. Method 1 worked perfectly, thank you.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>