tags:

views:

657

answers:

2

Question now asked on SU.

I have a Windows XP laptop, and I can run the Cygwin X11 server on there (script startxwin.bat, IIRC). I also use a remote machine - it happens to be a Solaris 10 SPARC machine, about 1800 miles away - that can be called xclient.subdom2.example.com for the purposes of this question.

For better or worse - mostly worse - I use xhost +xclient.subdom2.example.com on the laptop to allow anyone who uses the remote machine to display their X client on my machine. Fortunately, I'm the only person who uses the Solaris machine on a regular basis and the corporate security is stringent enough that I can live with the security risks.

From the XP laptop, I then remotely connect to the X client machine, and set environment variable DISPLAY=xplaptop.subdom1.example.com:0.0 and can run X client programs on the remote machine and see the display happily, if a little slowly on occasion, on the XP laptop. (Depending on the length of the DHCP name assigned to the laptop, I've occasionally had to resort to an IPv4 address instead of the machine's FQDN.)

I also have an Apple MacBook Pro, and I want to replicate the functionality of the XP laptop on it. Unfortunately, I have not yet been able to work out what magic incantation is needed to get the X11 server to run satisfactorily on it. It appears that simply clicking on the X11 server in /Applications/Utilities is not sufficient. Running the xhost command again (with DISPLAY=macpro.subdom1.example.com:0.0) doesn't seem to do the trick.

Can you suggest what the incantations needed are? Or suggest pointers to where the answer is spelled out in words of one or two syllables?


Also - and very much in the bonus question category - how readily and well does the X11 server react to changes in networking (between corporate direct wired DHCP connection and wireless Airport at home with connection to corporate via a VPN)? Is it a 'restart in the new environment' issue, or will it manage to detect the changes automatically?


I would also consider other ways of achieving about the same result - such as VNC or Mac equivalents - if they are easier to set up. I believe that VNC is installed on the Solaris box; it can be if it is not.

+2  A: 

This question should probably move to superuser.com.

Personally, I don't use the xhost stuff. Its a logistics nightmare...you have to worry about security, little configuration items in your x server such as allowing tcp connections and such.

Usually, the easy thing to do is to ssh -X remote.host. This will pipe x11 clients back to your host's server. It basically sets up a DISPLAY variable within your ssh session so that X11 clients have a place to send their commands.

I don't have a Mac, but I would figure that this would work with both their quartz display server and their x11 server.

KFro
Why do you think it would work with the Quartz display server? I don't think Quartz has any support for networked display.
Amuck
My quartz experience is pretty limited, so i'm probably wrong there.VNC should work though, right?Something like NX would need an X server i would think.
KFro
+1  A: 

As mentioned by KFro, using ssh forwarding (the -X flag) is much easier than dealing with xhost. It also happens to be secure, which you claim you network is, but well, it's your data. The ssh-forwarding just making your application see the X client and server appear to be on the same machine, and everything just works.

If you want to go the xhost route, first make sure you have the latest version of XQuartz (Apple's X Server installed). You can get it from http://xquartz.macosforge.org/trac/wiki and I'd recommend it regardless.

It lets you do lots of nice configuration things like clipboard synchronization, keymaps, and window focus without having to poke around inside of OS X's innards. With the newer versions (or atleast the most recent) you have a security tab which lets you allow connections from network clients. I believe you still have to do the xhost voodoo, but it provides the nice checkbox which lets X is listen to it.

D'Nabre