When I google “gksu gedit” one of the top entries (How to run gedit and nautilus as root) advises that
gksu usage is frowned upon:
gksu hasn't been updated since 2009 and is not recommendedany more. In
fact, Ubuntu no longer ships with gksu by default (though it may be
installed for many of you, because some apps still depend on it) and
it may even be completely removed at some point.
A link to AskUbuntu (Why is gksu no longer installed by default?) suggests
pkexec should be used instead but doesn't provide clear and concise steps to do this.
How can I use pkexec within a new wrapper shell script called
gsu that supports both
I feel a wrapper script called
gsu is most appropriate because my "muscle memory" is to type
gksu all the time and I don't want to have to type
Additionally I would like those pesky
gtk warning messages to disappear. Also I would like the terminal prompt back right away instead of waiting for editor or file manager to end.
AU Duplicates: I've searched many Q&A but none are asking (or offering how to) give a complete solution for
gsu wrapper script to call
pkexec AND install all necessary policy kits AND get rid of pesky gtk warnings AND get terminal prompt back right away… All in one answer.