使用运行 KDM 和 XFCE 的 Fedora 10 进行远程 X 显示
我正在 Windows 机器上使用 Emacs 作为编辑器开发 JSF Web 应用程序,但我更喜欢在 Linux 环境中使用 Emacs。 在(有些遥远的)过去,使用远程 X 显示器来完成这种非常有用的编程辅助是不费吹灰之力的。 Cygwin 有所帮助,但真正的远程 X 是首选解决方案。 然而,在最近的 Fedora(和 Ubuntu)发行版中,远程 X 是一个令人头疼的问题(Google 远程 X 或 XDMCP),您会看到现在有许多 GDM、XDM 和 KDM 的配置设置,更不用说 xhost 和防火墙了使远程 X 的配置比说服 Barry Kelley 此类问题真正与编程相关更困难。
现在,我正在运行 Fedora 10,并使用 XFCE 环境和 KDM 作为我的显示管理器。 我已经关闭了防火墙,关闭了selinux,启用了XDMCP(在/etc/kde/kdm/kdmrc中),但在使用(Cywin)测试时仍然得到“无法打开显示”“$ export DISPLAY= myfedora10box:0.0; x时钟”。 当我远程显示到另一个运行 Cygwin/X 的 Windows 盒子时,测试工作正常。 所以问题显然是 Fedora 10 中的配置设置。
I am developing a JSF web application on a Windows box using Emacs as my editor but I far prefer to use Emacs in a Linux environment. In the (somewhat distant) past it was a no-brainer to use a remote X display to accomplish this very useful programming aid. Cygwin helps out somewhat but true remote X is the preferred solution. However, in recent Fedora (and Ubuntu) distros, remote X is a royal pain in the butt (Google remote X or XDMCP) and you will see there are now many configuration settings for GDM, XDM and KDM not to mention xhost and the firewall configurations that make remote X more difficult than convincing Barry Kelley that this type of question is TRULY programming related.
Now, I am running Fedora 10 with an XFCE environment and KDM as my display manager. I have turned the firewall off, selinux off, enabled XDMCP (in /etc/kde/kdm/kdmrc), but I still get "Can't open display" when testing using (Cywin) "$ export DISPLAY= myfedora10box:0.0; xclock". The test works fine when I remote display to another windows box running Cygwin/X. So the problem is clearly a configuration setting in Fedora 10.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
Portable Ubuntu 将允许您直接运行 Linux 环境在 Windows 中,无需任何混乱的 X Windows 设置或必须设置虚拟机。 如果您真正想做的只是运行 Emacs,这可能是最快的解决方案。
Portable Ubuntu would allow you to run a Linux environment directly from within Windows without any messy X Windows setups or having to set up a virtual machine. Might be the quickest solution if all you really want to do is run Emacs.
X 服务器通常配置为不接受 tcp 连接(“-nolisten tcp”),但另一种选择是使用 ssh 的 X11 转发机制。 尝试运行
你的 cygwin 机器,你应该让时钟运行。 如需交互式使用,请使用 ssh -X myfedora10box 登录。
The X server is normally configured to not accept tcp connections ("-nolisten tcp"), but another option is to use the X11 forwarding mechanism of ssh. Try to run
of your cygwin machine and you should get the clock running. For interactive usage log in with
ssh -X myfedora10box
./etc/X11/xdm/Xaccess
的主机?/etc/X11/xdm/xdm-config
编辑:当然,这些配置更改后您可能需要重新启动 X!
/etc/X11/xdm/Xaccess
?/etc/X11/xdm/xdm-config
edit: you may need to restart X after these configuration changes off course!
您可能会发现 X 服务器会话是使用“-nolisten tcp”选项启动的,这意味着无法远程连接到桌面,因为它没有侦听任何网络端口。
当然,在我的 Ubuntu 机器上,这是默认配置。
You'll probably find that the X server session is being launched with the "-nolisten tcp" option, meaning it's not possible to connect to the desktop remotely since it's not listening on any network ports.
Certainly on my Ubuntu box this is the default configuration.
“Portable Ubuntu”的替代品是 andLinux - 我喜欢他们的桌面集成。
An alternate to "Portable Ubuntu" is andLinux - I liked the desktop integration they have.
您尝试过“xhost”命令吗? 从手册页:
在 Fedora 盒子上,您可以输入“xhost +mywindowsbox”,以允许 xclock 和 emacs 以及 Windows 盒子上的其他内容显示在 Fedora X 屏幕上。
但是,这只能让您在 Fedora 屏幕上编辑 Windows 文件的 Windows emacs。 如果您希望在 Windows 上使用 Fedora emacs 文件,您可能需要将 Windows 机器设置为共享其文件,并在 Fedora 上使用 samba 以使在 Fedora 机器上运行的 emacs 可以访问该文件。
Did you try the 'xhost' command? From the man page:
On your Fedora box you would type "xhost +mywindowsbox" to allow the xclock and emacs and whatever else on the windows box to be displayed on the Fedora X screen.
However, this only gives you the Windows emacs on the Fedora screen editing the Windows file. If you are looking to use the Fedora emacs on the Windows file, you may want to set the Windows box to share its files and use samba on Fedora to make it accessible by an emacs running on the Fedora box.
当我不幸使用 Windows 时,我通常只是使用 putty 或其他 ssh 客户端登录到终端,然后从终端(XMing 或其他 X 服务器)启动 X 应用程序。
但是,如果您想要一个完整的 X 会话,而不仅仅是启动单个应用程序,也许像 VNC 或 NX 这样的帧缓冲系统会更容易设置?
When I have the misfortune of using windows, I usually just login to a terminal with putty or some other ssh client, and launch X apps from the terminal (XMing or some other X server).
But if you want a full X session rather than just launching individual apps maybe some framebuffer system like VNC or NX would be easier to setup?
我收到的一些答案很有帮助,尤其是布莱恩·蔡尔兹 (Bryan Childs) 的答案。 有一次我确认“$ ps -ef | grep X”在 X 命令上显示了 -nolisten tcp 参数,从那里到 /etc 下的 grep 查找“-nolisten”是很容易的事(Emacs 的 rgrep 是精确),我在 /etc/kde/kdm/kdmrc:457 中找到了罪魁祸首,其中指定了“ServerArgsLocal=-br -nolisten tcp”。
感谢所有回复的人。
-pmr
Some of the answers I received helped, especially the one from Bryan Childs. For once I confirmed that "$ ps -ef | grep X" showed the -nolisten tcp arguments on the X command it was a no-brainer to go from there to grep for "-nolisten" under /etc (Emacs' rgrep to be precise) where I found the culprit in /etc/kde/kdm/kdmrc:457 where "ServerArgsLocal=-br -nolisten tcp" was specified.
Thanks to all who responded.
-pmr