上兵伐谋

“上兵伐谋,其次伐交,其次伐兵,其下攻城”。
posts - 35, comments - 32, trackbacks - 0, articles - 3
以下的解决方案来自国外的一个论坛:

When connecting to another computer using ssh, we found that it had become impossible to run X programs on the remote computer, even though the DISPLAY variable and xhost settings were set correctly. Attempting to run an X-based program remotely produced the message "Couldn't open display". Changing /etc/X11/xdm/Xservers to eliminate the "nolisten" option and editing /etc/X11/xdm/xdm-config had no effect. Finally we discovered that it was necessary to edit /etc/sysconfig/displaymanager and set two variables as shown:

    DISPLAYMANAGER_REMOTE_ACCESS="yes"
    DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN="yes".

This finally allowed the connection.

但是我的实验发现,仅仅这样设置,重新启动后发信X依然是以-nolisten tcp参数启动的。
在SuSEFirewall中打开TCP端口6000,依然不行。
再仔细研究后发现,在/etc/opt/kde3/share/config/kdm/kdmrc文件中还有关于X启动的配置,在[X-:*-Core]段中有这样两个参数:

    ServerArgsLocal=-nolisten tcp
    ServerCmd=/usr/X11R6/bin/X -br

把ServerArgsLocal参数修改为
   
ServerArgsLocal=
再试,发现Remote X已经可以正常工作了。

注:另外发现的问题,我系统中的/etc/opt/kde3/share/config/kdm/kdmrc并不是SuSEconfig所要求的格式,我把SuSEconfig提供的Sample拷过来覆盖掉kdmrc,结果发现在KDE控制中心中运行过KDM的配置后,kdmrc又被修改回来了。这个BUG可能是我手动升级到KDE 3.5.2所引起的。我想可能正是这个原因导致SuSEconfig不能正确配置X的启动参数的。

Feedback

# re: SuSE Problem: X programs will not run remotely  回复  更多评论   

2006-04-26 22:51 by violetprince
咋的搞这么专业活!!
只有注册用户登录后才能发表评论。