Created
September 12, 2019 17:08
-
-
Save stokito/e89cdf05591b4faefabccd55d7b6b5be to your computer and use it in GitHub Desktop.
The one-liner to open a file in editor (pluma). It will show a file chose dialog and if the file is owned by root it will ask for a sudo password
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FILE=$(zenity --file-selection); echo $FILE; if [ -w "$FILE" ]; then pluma "$FILE"; else pkexec pluma "$FILE"; fi; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment