Skip to content

Instantly share code, notes, and snippets.

@ikbelkirasan
Created January 13, 2019 16:32
Show Gist options
  • Save ikbelkirasan/5547b339dd90663e86c91b4efcdfb2f5 to your computer and use it in GitHub Desktop.
Save ikbelkirasan/5547b339dd90663e86c91b4efcdfb2f5 to your computer and use it in GitHub Desktop.
Create gksudo in Ubuntu 18.04
#!/bin/bash
mkdir -p ~/.local/bin
echo -e '#!/bin/sh\n/usr/bin/pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY HOME=$HOME "$@"' > ~/.local/bin/gksudo
chmod u+x ~/.local/bin/gksudo