Setting the DISPLAY environment variable
When you connect via SSH, your X11 environment should be automatically configured. If it is not, you may have to connect using the -X (upper-case X) or -Y (upper-case Y) option on the ssh command line.
If your X11 display still does not work, check that the DISPLAY environment variable has been set properly. This variable is used by the X application to determine the internet address of your local screen. You can check by typing this command at the NERSC machine prompt:
% echo $DISPLAY
The system should respond with something like
s00609:13.0
If the echo $DISPLAY command produces a blank response you can configure it manually. This method will bypass SSH encryption. At the prompt, type
% setenv DISPLAY hostname:0 (csh)
or
% export DISPLAY=hostname:0 (ksh)
where hostname is the internet name of the machine you are using for your display. If you do not know your machine name, you can probably find it with the command
% who | grep username
where username is your user name. For example, on Seaborg:
s00609% who | grep consult consult ttyp007 Jan 7 08:36 (generic.lbl.gov)
The hostname is in parentheses (it might be a set of numbers formatted like this: 128.55.200.24).
Note: Explicitly setting the DISPLAY environment variable will not work on seaborg; xterms originating on that system MUST use the DISPLAY setting provided by SSH during initial login. Other systems are also likely to be configured to disallow unencrypted connections.
本文介绍了当通过SSH连接时,如何解决X11显示问题。包括使用-X或-Y选项进行连接,检查并手动设置DISPLAY环境变量的方法。适用于无法自动配置X11环境的情况。
358

被折叠的 条评论
为什么被折叠?



