Home > bash, ubuntu > Don’t use sudo with graphical applications

Don’t use sudo with graphical applications

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
Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: