root用户在终端下运行x程序,会报:

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
Gtk-WARNING **: cannot open display: :0.0

 

解决办法:

export XAUTHORITY=your home/.Xauthority