Xauthority - cannot open display:
Gtk-WARNING **: cannot open display:
cannot open display 0:0
Most of the time it’s a very bad idea to operate your Linux computer as root. There are those times, however, when you need to launch an application with root privileges. Every time I install a new version of Linux I run into this problem and here’s the solution:
If you can’t open X programs as root, you need to type the following:
# su
# [type the password]
# echo 'xauth -f /home/[your user account here]/.Xauthority list 0:0'
where you replace the stuff in brackets with the appropriate values.
If you found this post helpful, please leave a comment.
(feel free to ask about other Linux problems you’re having - I read all comments)