在Centos上安装x窗口不工作

我正试图在远程的CentOS 5.3盒子上安装x-windows。 以下是我迄今所做的:

$ yum groupinstall "X Window System" "GNOME Desktop Environment" $ echo PATH=$PATH:/etc/X11 $ xinit 

我没有问题的安装yum。 我将path设置为'/ etc / X11',因为那是我看到xinit的地方。 但是当我调用xinit时,出现以下错误:

 xinit: No such file or directory (errno 2): no server "X" in PATH Use the -- option, or make sure that /usr/bin is in your path and that "X" is a program or a link to the right type of server for your display. Possible server names include: Xorg X.Org displays xinit: Server error. Couldnt get a file descriptor referring to the console 

所以,我认为X没有真正安装。 那么我检查'/ usr / X11R6'目录,我看到的只是“mkfontdir”和“mkfontscale”。 是不是“Xorg”应该在那里?

我做错了什么?

首先,运行“echo PATH = $ PATH:/ etc / X11”实际上不会改变path – 它只会回显它。 你应该使用“导出”命令而不是“回声”。

我只是尝试了上面提到的命令,不包括path命令,它对我来说工作得很好。 也许你无意中把PATH改成排除/ usr / bin /,这是X二进制文件在CentOS 5.3中的位置?

鉴于它是遥远的,你可能不想在机器本身启动X服务器。 尝试使用-X参数(例如,ssh -X user @ remotehost)将系统切入系统,然后运行“xterm”或“nautilus”。

如果你想要一个完整的远程桌面(例如,窗口pipe理器),你需要在本地计算机上运行Xnest或其他东西来连接它,否则它会replace原来的窗口pipe理器。