centos5.5启动eclipse报错Gtk-WARNING **: cannot open display: :0.0

通过yum install eclipse*安装了eclipse,

执行eclipse报错:

Gtk-WARNING **: cannot open display: :0.0


原因是没有可用的xwindow. 可能服务器已有应用占用了xwindow

解决方法,可在PC上安装cygwin/X11(xinit和xorg-server)

然后启动PC上的xserver: startxwin

iefreer@iefreer-THINK /usr/bin
$ startxwin

Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 1.13.0.0
OS: CYGWIN_NT-6.1 iefreer-THINK 1.7.17(0.262/5/3) 2012-10-19 14:39 i686
OS: Windows 7 Service Pack 1 [Windows NT 6.1 build 7601] (Win32)
Package: version 1.13.0-1 built 2012-09-06

XWin was started with the following command line:

X :0 -multiwindow

然后在centos服务器上设置DISPLAY到PC上的XWindow

export DISPLAY:192.168.1.87:0.0 (假设你的PC IP地址为192.168.1.87)

最后启动eclipse, 如报错服务器拒绝连接, 需要在PC上执行如下命令把eclipse所在的主机添加到XWindow的访问列表中:

xhost + 192.168.1.152 (your centos ip)


iefreer


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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值