您的位置:首页 > 产品设计 > UI/UE

Xming的一点tips

2016-03-27 22:41 585 查看
用VMWare装RHEL7虚拟机,用secureCRT连进去,但是默认是不能显示图形界面的,这个几乎学过Linux的都知道,因为是CLI接口嘛,没有GUI。 装了一个Xming作为X server,但是我的问题是我本地有多个网卡,每个都有IP,我启动Xming之后发现XDCMP注册的不是我想要的地址:

XdmcpRegisterConnection: newAddress 192.168.0.107

我希望它注册到另一个IP地址上,研究了半天,找到Xming的主页,研究了Xming的各种用法,还甚至给作者发了邮件询问,好在Colin回复的很快,2个solution:

Solution 1: 启动Xming的时候加参数 "-from IP address" 

测试结果可以work,log打印如下:

XdmcpRegisterConnection: fromAddr != regAddr 192.168.0.107

XdmcpRegisterConnection: newAddress 192.168.48.1

 

以上使用的是-from=192.168.48.1

Solution 2:  取消Auto Metrics, 手工指定metrics值,使得XDCMP可以优先注册到你指定的IP上

http://www.straightrunning.com/XmingNotes/trouble.php#head-24

(the 3rd bullet point is useful when you have lots of virtual IP addresses)

把solution贴出来:

In the presense of multiple network adapters, it is sometimes necessary to manually specify which one is the default used for internet routing, for example. To accomplish
this, you have to manually add a "metric" to each interface. Windows will automatically use the interface with a lower metric. To check and change your network adapters' metric:

1. Open Command Prompt and type: route print - you will see a list of active routes, the last column displaying their "metric". Lower metric routes are preferred over higher ones.

2. Open the Network Adapter Properties (Control Panel > Network and Internet > Network Connections > right-click on adapter and choose Properties)

3. Open the properties of Internet
Protocol Version 4 (TCP/IPv4).

4. Click on Advanced.

5. Untick "Automatic Metric" and set the interface metric to a number.

6. Hit OK until you close the Network Adapter properties.

7. Repeat steps 2-6 for your other network adapter(s) choosing different metrics. Remember lower metrics are preferred over higher ones.

Check the new metrics in Command Prompt by typing: route print

这个试了,不是太work,大家可以试一下, solution 1 还是最简单的 :-)

另外,看网上有乱贴说还要设置export DISPLAY到.bashrc或者.bash_profile中,这个我试过不需要, Linux端只需要保证X11Forwarding 为yes,secureCRT session property里面开启X11 Forwarding, Xming端开启-from <IP address>,对了,最好开启-ac
来disable access control,可以从XLaunch里面找到, 这样应该都没有问题。无论是secureCRT的远程连接还是从VMWare workstation 进去的本地连接,都测试过,没有问题
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Xming gui secureCRT vmware