Remote X Display with Fedora 10 running KDM and XFCE

11.2k views Asked by At

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.

8

There are 8 answers

0
pajato0 On BEST ANSWER

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

1
Eddy On

An alternate to "Portable Ubuntu" is andLinux - I liked the desktop integration they have.

0
matt b On

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.

1
ChristopheD On
  • Did you add the hosts which are allowed xdmcp access to /etc/X11/xdm/Xaccess ?
  • I'm not on a box with xdm at the moment but if i recall correctly there should also be a config file which could contain relevant configuration, have a look at /etc/X11/xdm/xdm-config

edit: you may need to restart X after these configuration changes off course!

1
GodEater On

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.

1
hlovdal On

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

ssh -X myfedora10box xclock

of your cygwin machine and you should get the clock running. For interactive usage log in with ssh -X myfedora10box.

0
Shannon Nelson On

Did you try the 'xhost' command? From the man page:

The xhost program is used to add and delete host names or user names to the list allowed to make connections to the X server.

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.

0
janneb On

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?