Xming的一点tips


用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 进去的本地连接,都测试过,没有问题


  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值