views:

4403

answers:

8

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.

+1  A: 

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.

matt b
+1 I can't stand using Windows without this!
Zifre
A: 
  • 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!

ChristopheD
I did try to modify Xaccess but I must confess I found it very confusing and I suspect this is the culprit. I will play with this some more. Thanks for the suggestion.
pajato0
A: 

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.

GodEater
"-nolisten tcp" has been the case on Fedora also for a long time
hlovdal
+2  A: 

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.

hlovdal
I had tried this as well but still get the same "Can't open display" error.
pajato0
A: 

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

Eddy
I don't know if either of these will be the solution I am looking for but they are both very interesting possibilities. Thanks!
pajato0
A: 

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.

Shannon Nelson
A: 

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?

janneb
A: 

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

pajato0