Auto login and startx in Backtrack 5

Let's face it, we all use tty1 to login as root/toor and launch startx... so why not boot automatically into our favorite desktop environment? In the following lines I'll explain how to achieve this in three simple steps.

We need a small application that allows us to auto login as the user that we want. There are severals apps in the repositories to do this task. In fact, you can write your own app to do this in C like many tutorials suggest on the Internet. I'll use mingetty.

apt-get install mingetty

Now we need to change the behaviour of tty1 to use mingetty instead of the standard getty. To achieve this we need to edit the file /etc/init/tty1.conf, so use your favourite editor. I'll use nano.

nano /etc/init/tty1.conf

Let's comment out the getty line so it looks like this:

#exec /sbin/getty -8 38400 tty1

Just below this commented line, add the following one:

exec /sbin/mingetty --autologin root --noclear tty1

Save and close the file.

The last thing we need to do is launch the startx command just after the login. To do this we need to edit the file /root/.bash_profile. Everything we write in this file is going to be executed just after the root logs in. By default there is no such file in BT5 installation but maybe you added some useful command for you and you want to keep it, so we are going to run the following command:

echo "startx" >> ~/.bash_profile

Done. Restart to see it working.

Enjoy.

Posted on December 30, 2011 at 17:31 by Samuel · Permalink
In: Backtrack, Linux · Tagged with: ,

5 Responses

Subscribe to comments via RSS

  1. Written by allisonalger277
    on October 25, 2016 at 08:53
    Reply · Permalink

    real jerseys wholesale | Cheap NFL Jerseys, Authentic Jerseys From China Free Shipping

  2. Written by login backtrack 5 root
    on September 3, 2014 at 16:06
    Reply · Permalink

    […] mendrugox » Auto login and startx in Backtrack 5 […]

  3. Written by login backtrack 5 default
    on September 3, 2014 at 12:52
    Reply · Permalink

    […] mendrugox » Auto login and startx in Backtrack 5 […]

  4. Written by backtrack 5 login command
    on September 3, 2014 at 12:50
    Reply · Permalink

    […] mendrugox » Auto login and startx in Backtrack 5 […]

  5. Written by backtrack 5 login auto
    on September 3, 2014 at 12:25
    Reply · Permalink

    […] mendrugox » Auto login and startx in Backtrack 5 […]

Subscribe to comments via RSS

Please leave a reply :)

Time limit is exhausted. Please reload CAPTCHA.