2016年8月8日 星期一

[RR Python] Matplotlib with VNC

while using VNC with matplotlib, I found that there is error "_tkinter.tclerror couldn't connect to display 1.0"

the solution is here 

quote as below

===
Write these few lines to etc/sudoers*:
Defaults    env_reset
Defaults    secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Defaults    env_keep += "DISPLAY"
Defaults    env_keep += "XAUTHORITY"
And these few lines to ~/.bashrc:
if [ -z "$XAUTHORITY" ]; then
    if [ -e $HOME/.Xauthority ]; then
        export XAUTHORITY=$HOME/.Xauthority;
    fi;
fi
===

沒有留言:

張貼留言