By default Kali uses gmd3 (GNOME Display Manager). However, you can install KDE and use kdm in Kali Linux. I’ll show both auto login here.
Auto login – GNOME
Just open and edit the file called
/etc/gdm3/daemon.conf
, assuming you’re using GNOME Display Manager(gmd3) a your main Display Manager. root@kali:~# leafpad /etc/gdm3/daemon.conf
In the daemon section un-comment the 2 lines for automatic login. It should finally look like this
[daemon] # Enabling automatic login AutomaticLoginEnable = true AutomaticLogin = root
That’s it. Too easy. In case you’re wondering how to use a different user than
root
, here’s how[daemon] # Enabling automatic login AutomaticLoginEnable = true AutomaticLogin = myanotheruser
Reboot
Last but not the least, reboot to check if it worked.
reboot
Enjoy your auto autologin to Kali Linux GNOME gdm3.
Auto login – KDE
Edit the file called
/etc/kde4/kdm/kdmrc
, assuming you’re using KDE Display Manager(kdm4) a your main Display Manager.root@kali:~# leafpad /etc/kde4/kdm/kdmrc
Add the following lines to the end of this file:
[X-:0-Core] AllowRootLogin=true AutoLoginAgain=true AutoLoginDelay=0 AutoLoginEnable=true AutoLoginLocked=false AutoLoginUser=root ClientLogFile=.xsession-errors
In this example AutoLoginUser specifies which user will auto login into KDE using kdm4. You can change it from
root
to myanotheruser
.
Here’s the catch, you can’t autologin as root in KDE unless you specify
AllowRootLogin=true
. There’s multiple forums that talks about this, I have yet to find any other solution than outlined here. However, depending on how you’ve setup your KDE, you might already have some of stuffs in the section mentioned above. Just change values to match the code above and you’re all set.
Don’t forget to share with KDE buddies about this.
Reboot
As always reboot to confirm if auto login root user is working or not.
reboot
That’s it.