0

For some reasons, I need to run the whole GUI as root. So I tried to login root user account from ubuntu. I selected Not Listed? option. And I entered username root then when I enter the password it says That didn't worked... but that is the correct password for root user account.....

Can't I login as root??

I am using Ubuntu 20.04 LTS, up to date

Just Me
  • 14
  • 5
    Ubuntu is designed so that you should not run as root, but with a normal user ID. Use sudo program-name to raise permissions when necessary, but do as much as possible with normal permissions. The reason is simple: avoid severe damage to the operating system by mistake. You can make exceptions, and run sudo -i and arrive at the root prompt # and get elevated permissions. But please avoid it when possible. – sudodus Aug 21 '21 at 17:00
  • When i try to open gedit as root using sudo i get something like Unable to Open display: Connection refused what to do in that case? – Just Me Aug 21 '21 at 17:07
  • 2
    For some reasons, I need to run the whole GUI as root. Whatever those reasons are, they CAN'T be good. This is a X-Y problem. – ChanganAuto Aug 21 '21 at 17:09
  • This link may help you run gedit and nautilus with elevated permissions in a good way. Use the following command line: gedit admin:///path/to/file – sudodus Aug 21 '21 at 17:16
  • @sudodus sudo -H gedit /path/to/file should be easier. sudo -H should be used when starting any GUI app from the terminal CLI. – heynnema Aug 21 '21 at 17:27
  • 1
    @heynnema, Yes for a long time it was like that. But in the new versions of Ubuntu we no longer need -H. Anyway, it is considered safer to use that admin method with gedit, or simply stay with text mode tools with sudo. – sudodus Aug 21 '21 at 17:32
  • @sudodus In 21.04 man sudo still shows -H as a viable option. Do you know what/when the behavior that you describe kicked in? – heynnema Aug 21 '21 at 17:41
  • @heynnema, See this post by a forum moderator at the Ubuntu Forums. I think he will answer if you ask him directly. – sudodus Aug 21 '21 at 17:48
  • @sudodus I looked at your provided link. TL;DR... I'm not sure it applied to our conversation... but maybe I didn't spend enough time skimming it :-) – heynnema Aug 21 '21 at 18:55

0 Answers0