Offer way to re-open files as admin:// if they are not writable
I know I can manually start
gedit with an
admin:// URL to edit a file that only root can edit.
E.g. like this:
(I guess you see the use case here, e.g.)
Problems with that
However, this is:
- something an "average" user does not discover. I also just read kit online and was surprised this is possible.
- inconvenient, because I found no way to do the same inside of gedit without starting it from the command line
That's why I'd like to have a way, so I can open such a file in the
admin:// mode when it is (to be) opened in a "regular" mode.
So e.g. if I try to open
/usr/share/applications/my-nice-app.desktop it can show me a bar "This file is write-protected. [Open in admin mode]" and when I click on the button, it triggers the re-opening.
Or just do it automatically, without any previous request… (Comparison: AFAIK this is how Nautilus asks for root privileges if I try to navigate to a dir that is only readable by root.)
Or, possibly even better, only if I save it after doing/writing my changes, notice me it cannot be saved and allow me elevate privileges then.
(Comparison: This is how Notepad++ does it on Windows with UAC/admin privileges. It restarts, but keeps the content I wrote.)