-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gedit should be opened with root or sudo for files belonging to root. #62
Comments
Came back to report this, though maybe this should be something that Gedit itself can do TBH. |
If it's a local file then it can be opened with admin |
@stuaxo I pushed a commit that should handle this scenario. Can you test it out? |
I get password popup, but after I enter my password nothing happens. In the log I can see this message:
|
@bluesabre You should never open GUI apps as root, even through pkexec. This is insecure and unsupported in Wayland. Instead, use admin:// protocol for editors like gedit (and forks, and maybe mousepad etc.). This works only with GIO/GVFS-based editors but root privileges are handled automatically and GUI is ran as current desktop user. |
- Use admin:// protocol for supported editors gedit, pluma - Prefer admin-protocol supporting editors - Check for Wayland before using pkexec - Fail gracefully for no editors found
@stuaxo @TomaszGasior Thanks for the feedback. I just pushed up another change that should do the best-case scenario for supported editors. Tested with Gedit (admin:// supported), Pluma (admin:// supported), Mousepad (pkexec), and elementary Code (pkexec). |
Use case:
Currently the user will click to edit the file, it will open in gedit and they cannot save it.
What should happen: There should be a prompt to get root permissions and then gedit opened by root.
I'm not sure if there is a HIG / GNOME compliant way of doing the GUI for this, but if there is it should be followed.
The text was updated successfully, but these errors were encountered: