Linux

Automatically Start X with GDM in BackTrack 5


I’ve heard about BT5 a while ago, but since it’s also a Debian-based distro and I’ve been using Debian-based Linux distributions for like one-third of my life, I was reluctant. Until a couple of weeks ago, after a friend told me that it comes out-of-the-box with tons of InfoSec tools I’ve decided to give it a try just to see what it really can do. So I downloaded and install it in VirtualBox to give it a test-run.

My first impression was it’s like Arch Linux. By default, you’d be booted up on a Tty and you have to manually login as ‘root,’ with ‘toor’ as the default root password Then you have to run ‘startx’ so you can have a graphical interface – the BT5 way. It’s pretty simple actually, but I don’t think it’s a very good idea for any smart Linux user to run it’s entire system as root all the time. You might destroy your important system files before you know it.

So in this tutorial let me share to you how I created a sudoer (regular user) account in a fresh installed BT5. And then we will try and install Gnome Desktop Manager (GDM) because Gnome is the default desktop environment pre-installed in BT5.

OK, first we need to make a sudoer. It’s actually very simple. Simply fire up your Terminal and then run the following command (assuming that you don’t have a user account yet, so we’re doing the entire process as root):

For this example, we are going to use ‘homer125‘ as our test username.

Then we need to add a password to your username:

After we have created a sudoer, we’re going to install GDM, so we can boot up and login directly using the username (homer125) we’ve just created. To install GDM simply run this command in your Terminal:

Now we need to test GDM and see if it’s working the way it should. To run GDM simply run this command:

If GDM is working the way it should, you should see the good old Gnome login screen. Let me remind you , the default login screen is quite ugly so you gonna have to be patient about it, you can change it though if you want to. Now, try to login using your new username. If you see no problem, restart your computer and then login again as root in Tty. This time we’re going to automate GDM so you won’t have to login as root everytime you boot up before you can go the the graphical interface.

To do just that, you have to edit /etc/init/gdm.conf using vim or nano. I suggest you create a backup of your gdm.conf file first, just in case you run into trouble along the way.

By default this is what gdm.conf file in BT5 looks like:

Highlighted in orange are the codes that you need to remove for you to be able to automate GDM at bootup. Once you have trimmed the code, your gdm.conf file should now look exactly like this:

Now, restart your computer.
You should now be able to run X and login with your new username via GDM automatically. I’ve only used BT5 for like 2 days, but I think I’m going to like it. Happy BackTracking! Cheers 🙂

4 Comments

    1. yes correct, because most of the tools need to run as root. But if you just want to play along with it then it’s ok not to run as root. =)

      I’m aslo a backtrack user and I use the root all the time =)

      Reply
  1. and it’s also stated there in the wiki, that there are “security risks” when you run a Linux system as root. creating a sudoer (regular user) account in this case could serve as a precaution, specially to users who are just starting to use Linux, particularly BackTrack.

    after all, you can still run apps that require root privilege even if you’re logged in as a regular user – you just gonna have to enter your password, right? cheers! 🙂

    Reply
  2. I like your website, have you considered adding and RSS feed feature? That will allow me to get automatic notifications of new sites. If you set up notifications via RSS, please email me! I will fav your topic for now. Again Excellent website!

    Reply

Leave a Reply