Gtk-WARNING **: cannot open display: :0

I have installed a gparted on my Debian and when I tried to run it as a root from the terminal the unexpected message has appear:

(gpartedbin:14177): Gtk-WARNING **: cannot open display: :0

Simple solution for this is:

  1. As a user (non root) type:
    xhost +local:root

    Message should appear:

    non-network local connections being added to access control list
  2. As a root type:
    export DISPLAY=:0.0

Now you should be able to run your application. For me it works!


One response to “Gtk-WARNING **: cannot open display: :0

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your 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