0

I'm trying to eliminate some mysterious "Evolution" notifications I keep getting. Google tells me to edit the /etc/xdg/autostart/org.gnome.Evolution-alarm-notify.desktop file, but it is owned by root and it opens as read-only in the text editor. I figure I can sudo the Vi editor or equivalent. I suppose I could also sudo chown to my user account, but that seems kludgey.

In my search for the answer to the above question, I found a post talking about how the root account is disabled in Ubuntu (with great reasons given, no argument there) and being unnecessary because of sudo. How do you do something as simple as editing a configuration file that is owned by root?

karel
  • 110,292
  • 102
  • 269
  • 299
  • Does this answer your question? [Can there ever be any problem when using gedit to edit system files with 'sudo -H gedit'?](https://askubuntu.com/questions/1162608/can-there-ever-be-any-problem-when-using-gedit-to-edit-system-files-with-sudo) (Since the real question being asked here seems to be "how do I edit system configuration files without `sudo vi`") – muru Apr 14 '22 at 16:40
  • 1
    Ah, wrong link, should have been [How do I get permissions to edit system configuration files?](https://askubuntu.com/questions/92379/how-do-i-get-permissions-to-edit-system-configuration-files) – muru Apr 14 '22 at 16:41
  • ... I wonder if in this case it might not be better to *copy* the file to `~/.config/autostart` and edit it there? That doesn't require elevated permissions at all - and any changes won't risk being overwritten by subsequent system updates. – steeldriver Apr 14 '22 at 16:51
  • Read `man sudoedit`, set up your `$EDITOR` and `$VISUAL` environment variables and it's easy. – waltinator Apr 14 '22 at 23:00
  • You should distinct between "account is disabled" and "login with the account is disabled". The root account itself is by no means disabled, but logging in with password for the root account is disabled by default. These are two very different things. – Artur Meinild Apr 19 '22 at 11:39

0 Answers0