How to get into Graphical mode in kali?????


Text mode to Graphical Mode:
I have recently faced a problem with my kali linux, The problem is that i can't get into graphical mode, When ever i reboot my kali its starts in terminal mode(tty3) and asked root password when i typed password it still shows me text. i tried many things to get into graphical mode.
Typing Startx to enter into graphical mode but it is used in backtrack not in kali. Later i tried pressing control+alt+f7 but still it didn't worked.
After searching all websites and blogs i noticed many things
Like some told to type "use fsck command then reboot, first login by entering your password"
I tried fsck and came back with an error e2fsck cannot continue, aborting
And even tried gdm3 but it didn't worked
At some point i decided to reinstall the KALI. But i feared to lost the files in which i saved.
Before typing "apt-get update" and "apt-get upgrade" to install missing files Let's check the Network connectivity by following steps
Service networking start
Service Network-manager start
Service samba start
dhclient eth0
(ifconfig to check the net interface configuration is ok and eth0 is working right)


Then Update and Upgrade the kali..

Next install "chkconfig" if its not installed through "apt-get install chkconfig"
Then check the status of level 2 of gdm3 using "chkconfig --level 2 gdm3"
Install gdm3 service if it's not installed 
when i typed gdm3 it showed me "bash: gdm3:command not found"
then i typed  sudo "apt-get install gdm3"
after installing i just typed gdm3 in the terminal. Then it directly taken me to the graphical mode..

Graphical mode to text mode:


Its good thing i like in BackTrack was it boot in console mode. It is quite helpful if we have to run few console commands instead of using full GUI.
But Kali linux directly boot into graphical mode. To make it boot into command line mode we need to remove auto start of gdm service (kdm or xdm based on your desktop manager) from current runlevel. 
First we need to know current runlevel. Using following command   who -r


Remember your current runlevel from output of previous command. Mine is 2.
We also need to know service name of display manager we are running, check it with following command (replace 2 with your run level)

chkconfig --list | grep '2:on'


It will show all services set to autostart for run level 2. Look here for entry similar to gdm or kdm or xdm etc. I am running gdm3.
Ok, now we have identified which service (gdm3 in my case) we have to turn off at which run level (mine is 2).
Now issue following command to stop gdm3 service for run level 2.

chkconfig --level 2 gdm3 off

Now on next boot it will boot into command line login. After login use startx command to start xsession.

IFFail: Follow the upper procedure to retrive the GUI mode


"PLEASE SHARE AND COMMENT IF YOU LIKE"







Comments

  1. And how do you download "apt-get update" and "apt-get upgrade" if you havent internet?

    ReplyDelete
    Replies
    1. ya i have connected to the internet without that u can't update or upgrade

      Delete
    2. i think this fix the issue:

      http://www.kalilinux.net/community/threads/cant-boot-kali-linux-into-gui.771/page-3

      (please see the jebacas comment)

      Delete
    3. thanks for ur comment.. I am going through ur link..

      Delete
  2. Great . . . worked like a peach !!

    ReplyDelete
  3. It worked, thanks!!

    ReplyDelete
  4. Upgrade takes a very long time

    ReplyDelete
  5. ya if you didn't update kali since a long time, then it will take a long time to upgarde.. so upgrade kali for every 10 to 15 days.

    ReplyDelete
  6. Replies
    1. "X" work for me. thx

      Delete
  7. This comment has been removed by the author.

    ReplyDelete
  8. Gdm3 is running ..then also its NT showing GUI when I typed gdm3 in console

    ReplyDelete
  9. works fine thx for tip

    ReplyDelete
  10. command fsck works for me thank you...

    ReplyDelete
  11. Hi all
    after getting the boot screen there is no graphical install option
    any one know what's wrong ??

    ReplyDelete
  12. Oh.. thanks... I have kali but when playing HD video... seem so heavy... any ideas to fix it???

    ReplyDelete
  13. You are amazing! Thank you so much!!!

    ReplyDelete
  14. i have a problem the kali linux desktop has disappeared then i dint know how to work with terminal pls urgent assistant ..have tried startx,gmd3 but still not working'

    ReplyDelete
  15. Service Network-manager start <- after this command line freezes. time out and can't pass. Any Idea?

    ReplyDelete
    Replies
    1. Nevermind. Typing X worked, thank you.

      Delete
  16. command: Service samba start
    Failed to start samba.service: Unit samba.service masked

    ReplyDelete
  17. When I type: " service samba start"
    I get an error:
    "Failed to start samba.service: Unit samba.service masked"
    (No quotes in input and also on output.).
    Despite this error I continued with the apt-get commands and other commands mentioned after that .completed all steps successfully but on typing "chkconfig --level 2 gdm3", the output was: " gdm3 on" but I was not taken to gui , nothing happened .Tuen I reboot but still no success.
    I am stuck at a blinking cursor before which it's written "[ok] started network manager script dispatcher service."
    Please help Sir.!

    ReplyDelete
  18. I have a problem. it is here: http://10.175.165.11/SP104.16.112.18/SDi.stack.imgur.com/SpshZnM.jpg/Rqae5eb53b-c103-49e4-a363-9cb05f81161d/IDF0E3D1C2CA8FF909/RV200000/AVSkyController_3.2.5.54985/Br200/CL2-ea/DL0/DT0/EI1142082675/Ht240/IP10.108.33.17%3a49622/IQ25/MO15/MT0/NIGPMOCCA-SAVDIST1-SKFCTL1/OC0/OS0/Otjpeg/PB200/PNMedCongestion_3G_Desktop/SI07000600d6c150000000000000000000000000000a6c211100000000000000000000000068107012a19fcd8db2257c01/SUhttp%3a%2f%2fi.stack.imgur.com%2fshZnM.jpg/Sd736B7966697265/TI1142082675/Tr1/Wh400/EUEoquD7.fY3jXTcJU6-GujBLUJMPfRY0ywau4Xx8s23L9cQDsmGOwAzaY024CCTR4XksOhI2R7oRQ0UFc9v1UNnJzdnd2d3p7ent-f35.goM%3d/EV560415217c6357dd2d366e849c6bb70b/file.jpeg

    ReplyDelete
  19. After doing the update and upgrade when tried chkconfig it showed -bash command not found when typed apt-get install chkconfig it showed up the error that ' chkconfig has no installation candidate '
    Plz help

    ReplyDelete
    Replies
    1. it looks like you are using kali 2.0 which is the latest version, in kali 2.0 init.d is replaced by systemd. so instead of chkconfig enable service use systemctl for enabling service to start automatically after reboot.

      Delete
    2. So what I have to type plz tell me.
      Yes I am using Kali 2016.2 version.

      Delete
    3. run below commands to enable the gdm3 process to run automatically post boot.

      systemctl enable gdm3

      to start the service

      systemctl start gdm3

      Delete
    4. It says

      " the unit file have no installation configuration settings in the unit section
      This means they are not meant to enable using systemctl.
      Possible reasons for having this kind of units are:
      1. A unit may be statistically enabled by being symlinked from another unit's
      2. A unit's purpose may be to act as a helper for some other unit which has a requirement dependency on it
      3. A unit may be started when needed via activation (socket,path, .....)
      In case of template units, the unit is meant to be enabled with some instance name specified. "

      I also tried apt-get install chkconfig but same result that
      " Package chkconfig has no installation candidate "

      Plz help what should I do ?

      Delete
  20. This comment has been removed by the author.

    ReplyDelete
  21. Thanks dear, it works for me....!! thank a lot.
    Actually I'm facing the same problem from the last 2 days..! thank you so much.!!

    ReplyDelete

Post a Comment