System: Linux Mint 18.1 64-bit Cinnamon.
For example, the following aliases seem to work as expected:
alias sunano='sudo nano'
alias suxed='sudo xed'
They both open a file as root.
alias susubl='gksudo /opt/sublime_text/sublime_text'
Sometimes it works. It just does not do anything most of the time.
How do I debug such a thing with inconsistent behavior? It does not output anything. No error message or similar.
gksudo has been deprecated in Debian and also no longer included in Ubuntu 18.04 Bionic, so let me re-formulate this question to a still valid one:
How to properly edit system files (as root) in GUI (and CLI) in Linux?
Properly in this context I define as safely in case, for instance, a power loss occurs during the file edit, another example could be lost SSH connection, etc.