Archive

Posts Tagged ‘gksudo’

Don’t use sudo with graphical applications

March 29, 2012 Leave a comment

This post is based on a comment of one of my readers called gourgi.

Problem
You want to launch a graphical application with administrator privileges. Shall I use “sudo”?

Solution
No. In the case of graphical applications, you should use “gksudo” instead. “You should never use normal sudo to start graphical applications as root. You should use gksudo (kdesudo on Kubuntu) to run such programs. gksudo sets HOME=~root, and copies .Xauthority to a tmp directory. This prevents files in your home directory becoming owned by root.” [1]

More info:

  1. https://help.ubuntu.com/community/RootSudo#Graphical_sudo
  2. http://www.psychocats.net/ubuntu/graphicalsudo
Design a site like this with WordPress.com
Get started