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


你可能感兴趣的:(eclipse,eclipse,centos,centos,centos,xWindow)