Bởi vì phiên Window X chạy trong VNC là sử dụng một màn hình hiển thị thay thế, bạn có thể cần phải làm cho chắc chắn rằng bạn thiết lập các biến môi trường DISPLAY một cách chính xác bên trong nó để bắt đầu ứng dụng hệ thống X Window khác. | 81 o _ . TwMVNC Sustafl Langmwjc Thrflic OiiCiwwHjCT T uc S-CỊ1 2ÍI. Cl 21 P M Welcome to LjMffllffiE Rpast flJTlisr fffljr G .0f namr ỘK Because the X Window session running in VNC is using an alternate display you may need to make sure that you set the DISPLAY environment variable correctly within it in order to start other X Window System applications. For example if you are running Xvnc on port 5908 you may need to set the display in your shell appropriately using a command such as export DISPLAY . . Troubleshooting Xvnc Startup If you re lucky you re already looking at Figure 2-7 and thinking problems what problems However if your vncvie simply hangs or terminates with information-packed messages such as vncviewer ConnectToTcpAddr connect Connection refused or Unable to connect to VNC server don t despair. These problems are easily resolved. If your vncviewer connection to the remote machine simply . you press Return and nothing happenschances a 81 82 the ports associated with your VNC setup are being firewalled on the remote machine the local machine or somewhere in between. Check to make sure that whatever ports you put in etc services on the remote system are actually available and that a process is listening on the XDMCP port. An easy way to do this is by executing the netstat -an command and filtering its output for port 177 the port used by XDMCP as in the following example netstat -an grep 177 udp 0 0 177 If you do not see any output from this command make sure you have correctly configured XDMCP support in your display manager and that the Xvnc entries in etc vnc are not disabled. Worst-case you can reboot your system to make sure everything starts up correctly. If you still can t establish a VNC connection to your system make sure no firewall rules are blocking any of the ports used by XDMCP or Xvnc. An easy but completely insecure way to do this is to temporarily terminate your firewalls or punt