https://stackoverflow.com/questions/12356425/error-cannot-open-display-localhost0-0-trying-to-open-firefox-from-centos-6 在命令行输入下面这行指令即可: export DISPLAY="localhost:10.0" 如果还不行可以试下修改成: export DISPLAY="localhost:12.0"