Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 1774  / 3 Years ago, fri, september 24, 2021, 11:49:31

Gnome enforces barriers to viewing files requiring root privileges. Trying to open /var/log/boot.log file with gedit fails, with no visible option to perform this action as root from the GUI file manager. What is the Gnome doctrine for dealing with situations like this? I know that I can use sudo gedit, but that makes it more cumbersome than launching an application from Nautilus, pardon me, Files.




A close-to-ideal solution is provided by Nemo, the file manager in the Cinnamon desktop. It gives you an option to open a directory as a root, and then you can open this file with a text editor.


Another option is to enforce permissions in the editor on file save, not on file open. It could allow opening any file in read-only mode, which doesn't present any safety concern. This used to be done in the past somewhere. The current design is unnecessarily authoritarian.


More From » gnome

 Answers
2

I added this as a separate answer, since you mentioned you would like a more convenient (less "cumbersome") way of editing files as root.


You can use the nautilus-admin extension.


This extension adds a right-click context menu item called "Edit as Administrator" to Nautilus. Just right click on the file you want to edit as root, and select this option.


The best way to install this extension is:


sudo apt install nautilus-admin

The recommended technique to edit files as root is to use gedit admin://, as indicated in my other answer. This extension does exactly the same thing, but you don't have to open a terminal and type the command yourself.


[#146] Friday, September 24, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
hirtieve

Total Points: 207
Total Questions: 104
Total Answers: 114

Location: Cook Islands
Member since Thu, May 21, 2020
4 Years ago
hirtieve questions
;