Archive for June 4th, 2016

If during the installation of Kali Linux 2.0, you have chose to not use any network mirrors, chances are you  will be using a pretty basic version of the sources.lst file. For those of you don’t know, sources.lst file determines the software repositories from where you can install packages using “apt”. If you have a minimal version of “sources.lst”, you won’t be able to install many of the packages. For example, if you try to install “htop”, you will get an error saying “package not found”. Follow the instructions below to get a full sources.lst file

First of all, let’s move the previous sources.lst file to backup location and then let’s create a new one with needed repositories.

mv /etc/apt/sources.list /etc/apt/sources.list-backup

Now open up a text editor of your choice and open the /etc/apt/sources.list file.

nano /etc/apt/sources.list

Now, copy the following content and paste it in the leafpad window, and save it.

The following is the Kali rolling repository. You should be using this unless you have some reasons to use the old repo.

deb http://http.kali.org/kali kali-rolling main contrib non-free
deb-src http://http.kali.org/kali kali-rolling main contrib non-free

The following is the old repositories. Use this only if you know what you are doing.

deb http://http.kali.org/kali sana main non-free contrib
deb http://security.kali.org/kali-security sana/updates main contrib non-free
deb-src http://http.kali.org/kali sana main non-free contrib
deb-src http://security.kali.org/kali-security sana/updates main contrib non-free

That’s it, you should now have access to most of the packages. Once you save the file, do the following command once,

And you’re good to go.

Well, I just installed the latest Kali OS, I found out no guide out there is up to date. So here it is, I’ll try to write as much as possible.

 

Step 1: Get the deb file

You need to download the Chrome .deb file to install on your Kali Machine. Go HERE and download the .deb ( Make sure you download the correct one – 32bit or 64bit )

 

Step 2: Installing the deb using dpkg

Let’s install the .deb file. For that, open up a terminal and “cd” to the directory where you have downloaded the deb file. Remember to use “sudo” if you’re not root. As a side not, you can install any .deb file on Kali or any Debian based distro using the following command.

It will probably show you an error saying there is some dependency issue or some stuff like that.

Install the following package

in terminal Do:

nano /etc/apt/sources.list

And make sure these two lines are there:

deb http://http.kali.org/kali sana main non-free contrib

deb http://security.kali.org/kali-security sana/updates main contrib non-free

ctrl + O to save and ctrl+x to close

 

Type:

  1. apt-get update && apt-get upgrade && apt-get dist-upgrade
  2. apt-get -f install
  3. and again type, apt-get update && apt-get upgrade && apt-get dist-upgrade

Now install chrome with commad: dpkg -i chrome*.deb

I guarantee that chrome gets installed now.

 

Now comes another issue, you cannot run Chrome, yet

 

This is where things get ugly. If you try to open up google chrome, it won’t open. Nothing would happen. Actually, you won’t see any error messages. It just won’t open. And there is a reason why it won’t open, that’s because you’re trying to run it as “root”.

Default user in Kali is “root” and it was done for a reason, Kali is not intended to use as a daily OS. But that does not mean that you can’t use it as a daily OS. In fact, Kali 2.0 is my main OS and it runs without any issues.

If you want to use Chrome, you have two options:

In fact there are several methods by which you can use Google chrome. Most of them involve enabling chrome to be run as root. This is not the right way to handle things. There is a reason why chrome refuses to run as root. That’s because, if you run the browser as root, then someone exploiting your browser could get root privileges. But, anyway, let’s cut to the chase.

Option 1. Create a normal user with sudo privileges to use daily, and use “sudo su -” to switch to root whenever you want.

This is the preferred method. This is how I use Kali. If you want to know how to set up a sudo user in Kali, google it:). I’ll probably write about it later.

Option 2. Create another user and switch to that user in a terminal and open up the applications like google chrome or VLC. Let me explain this for you:

This is how it’s done in the second option:

 

<pre class="toolbar:2 lang:default decode:true "># First of all, we need to enable access to X server for all users
# Otherwise, the newly created user won't be able to run applications with GUI
# Issue the following command
xhost +
# Create a new user. Here bob is the username
adduser bob
# Now the program will ask for password etc, provide them
# Once the user is created, you can switch to the new user using the following command 
su - bob
# Now you're in bob's terminal, and you can open google chrome by typing
google-chrome 
# It should open up the chrome browser</pre>

 

That’s it. That way you can run chrome browser, without changing any system files.