Skip to content

Instantly share code, notes, and snippets.

@Krush206
Last active February 8, 2022 23:38
Show Gist options
  • Save Krush206/bb2e6ce50b2100f0cfdacacc9c3c2d01 to your computer and use it in GitHub Desktop.
Save Krush206/bb2e6ce50b2100f0cfdacacc9c3c2d01 to your computer and use it in GitHub Desktop.
A true gksu Shell script replacement
xterm -e su -c "$* &"
mkfifo ~/gksu 2>&1 > /dev/null
ps -x | grep "tail -f $HOME/gksu$" | \
kill -9 `awk '{ printf $1 }'` 2>&1 > /dev/null
tail -f ~/gksu &
xterm -e su -c "$* 2>&1 | tee ~/gksu &"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment