I'm using Debian Wheezy, and I need to be always as a root. So I do the following every-time I restart the OS: $ sudo -i then startx.

Is there a way to restart directly as a root every-time?


I assume you're using GNOME if you're on Debian :

edit /etc/gdm3/daemon.conf

You should get something like this :

# Enabling automatic login
  AutomaticLoginEnable = true
  AutomaticLogin = root

You could replace root by an other user

More info here : https://wiki.debian.org/GDM

Small note : Loggin as root is not a good practice, depending on what you need, you could simply use the commande sudo to gain permission for a moment In gnome, loggin in the GUI as root is disable by default (Considered unsafe)

EDIT : To bypass that protection, you could go in GNOME's setting, under Security and check Allow to login as Root


| improve this answer | |
  • I did what you recommended, but now it gives me the login window to choose a user. I have only my user and when I choose other and type in the username as "root" and the corresponding password, it gives me "authentication failed" – KhaledWas Mar 16 '16 at 14:02
  • Try to go in gnome settings, in Security, you should be able to check something like Allow root/admin to log in. – Xyrodileas Mar 16 '16 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.