按照 https://www.how2shout.com/how-to/how-to-access-linux-desktop-gui-from-windows-10-remotely.html
gqqnbig@gqq-server:~$ echo $DISPLAY localhost:11.0 gqqnbig@gqq-server:~$ firefox
可见远程服务器上运行的Firefox已经在本地Windows显示了。但是打开中文网页仍然乱码,说明没有安装中文字体。
如果遇到错误“Error: no DISPLAY environment variable specified”,运行echo $DISPLAY
查看DISPLAY
是否为空。若为空,一般是putty没有勾选Enable X11 forwarding。
应该任何中文字体都可以,这里安装的是文泉驿字体。
sudo apt-get install -y ttf-wqy-zenhei
sudo apt install -y gedit gedit
运行gedit成功。
echo ‘dbus-update-activation-environment –all’ > ~/.xinitrc
运行gnome-terminal成功。