Originally posted by vinnywright
View Post
Also, sudoedit doesn't work like that, "kate sudoedit /etc/grub.d/40_custom" will just open a kate window (as regular user) with two files, an empty new file called "sudoedit" and "/etc/grub.d/40_custom". One could use "EDITOR=kate sudoedit /etc/grub.d/40_custom", but like you said, this isn't really necessary with a relatively new versions of kf5 (ktexteditor) which will ask for password when needed.
---
EDIT: To summarize (graphical editing as root)...just to clarify, kate version number is not the same as kubuntu version number:
1. The old way - kate version <17.04 (kate still runs as root)
Use: "kdesudo kate /etc/grub.d/40_custom" or "sudo -i /etc/grub.d/40_custom"
2. The intermediate way - kate >=17.04 (kate won't run as root), but kf5 [ktexteditor] not new enough <5.34 to support polkit file save.
Use: "EDITOR=kate sudoedit /etc/grub.d/40_custom"
3. The new way - new enough kf5 [ktexteditor] version >=5.34:
Use: "kate /etc/grub.d/40_custom" (no need to call root, KAuth/polkit will handle authentication when saving)
Comment