X windows on os x

What is the best way to use X windows on os X, and how can I get it on my machine?! And once I do get it, can I use X windows programs compiled for Intel or do I have to recompile them for my PPC?
Thanx!
 

iconara

Registered
if the apps are compiled for another processor you need to recompile in order to get them to work.

x-win; there are a few threads discussing the issue, but none of them (that I have read) have come up with an answer. sorry.


theo
 

strobe

Puny Member
There are three methods to run X11 in OS X:

1) XFree86 4 has been ported. However it needs it's own screen to work (doesn't co-exist with Quartz).

2) Xtools, commercial X11 server which co-exists with Quartz. Expensive but will eventually run GLX stuff.

3) Xvnc has been ported a long time ago. There are six viewers you can use. Still a bit slow for some reason.
 

zpincus

Registered
In another thread ( http://www.macosx.com/forums/showthread.php?threadid=1383 )I wrote a bit and gave some links about the various methods of getting up and running with an X server. There's also some stuff about KDE/Gnome apps and porting these tools.I myself have been wondering about how well Xfree8 and Xtools would live together. I would imagine that you would have problems installing one over the other, but has anyone asked Tenon? They seem pretty helpful.

 

strobe

Puny Member
Originally posted by mcreiss
Can XFree86 be installed over Xtools without damage ?
MC
Yea, some headers will be overwritten but they are equivalent or identical headers
 

rsteed

Registered
Tenon actually uses the XFree86 4.0 Libraries for Xtools. The following excerpt is from their site:

"Xtools is a full implementation of the X Windows system running on Mac OS X. Based on X11R6.4, Xtools inherits the clean, fast, stable, and portable codebase from XFree86. Integration with the Aqua environment is enabled by building the X server on top of Cocoa and QuickDraw, providing a rootless X windows display while still retaining the ability to use native applications."

Basically, Xtools is a window manager designed to live with Quartz. You are free to do whatever you wish with your XFree86 installation (except remove it). You can still run XFree86 with another window manager outside of Quartz if you wish.

Pretty smart if you ask me. No sense in reinventing the wheel and they are probably making contibutions to the XFree86 codebase too.
 

scruffy

Notorious Olive Counter
Strobe:<p>
<i>1) XFree86 4 has been ported. However it needs it's own screen to work (doesn't co-exist with Quartz). </i><p>
Since I have two monitors, this might not be a problem. Do you know if I could just hand XFree one monitor, and leave Quartz running on the other? They would still obviously have to share a cursor, although not the same screen.<p>
Granted, things like cut & paste between the two would be broken, but then that's pretty much broken in X by default, isn't it...<p>
Mind you, there's no real reason not to use XVNC, if that's all I'm going to be doing. Still, it would have a higher coolth value to give one monitor each to X and Quartz ;-
 

zpincus

Registered
I installed Xtools over Xfree86 just to see if it would work. That didn't -- the installer pooped out, even when run as root.
But, when I installed Xtools first and then Xfree86 on top (Xfree86 install method = gnutar'ing the tarball as root) everything worked great. Xtools starts up, vncserver runs fine, startx from a consloe login works great!

I don't know how to devote differnt monitors to each other than somehow torking a vnc viewer to go fullscreen on only one monitor. less cool that the real deal, but i can't even imagine how ot begin on that one.
 

scruffy

Notorious Olive Counter
<i>I don't know how to devote differnt monitors to each other than somehow torking a vnc viewer to go fullscreen on only one monitor.</i>

That's actually exactly what I have done. Robert Kedoin's VNCViewer takes up the nearest monitor when you tell it to go fullscreen. The only problem with it is that apps whose windows were in that monitor last time they were run still put them there, underneath X.

Now the most pressing thing is to get something other than (shudder) twm going... Holiday project for me, I guess.
 

zpincus

Registered
I, too, was disgusted with twm. So I thought, wait, the computers in the UNIX clusters at my school have all sorts of good managers, and it would be a cool, stupid trick to run it from there.

So, I start X, then ssh to my account on one of those boxes, then type
setenv DISPLAY myipaddress:0.0
(This works for the csh family of shells. I think its different for bash and its ilk. Also, if you want to do for a VNC session and not an honest to god X session, it should be yourip:yourVNCdisplay.0)

then on a local xterm, xhosts + clustercomputername (replaced with, of course the name of the remote computer.)

Finally, I just type afterstep into the ssh session, and pop, up comes afterstep on my display, running on someone else's hardware. On a 10baseT ethernet, there is hardly any lag.

Now, those familiar with UNIX will find this old hat. It's a pretty standard trick, and really useful for administrating headless systems with X windows.
Wouldn't it be cool if OS X could do this too? While it is pretty much possible to admin a UNIX box from a command-line remote session, it is much harder to do so for a OS X headless box.
What do you think the chances of getting Aqua forwarding a la X11 are? That would be really useful for the server market, and would be good even if a OS X VNC server comes out.

I think that as is, the lack of a DISPLAY variable for OS X and Aqua (and the related coolness that you can exploit with this) will prove to be a shortcoming.

Any thoughts? Is this something that people would really use (ie. worth nagging Apple about?)

Zach

PS. Good luck scruffy. Your posts have been really enlightening. Keep up the good work!
As I head home for the holidays, I will have to leave my os x box behind, so I don't think I'll be able to experiment as much as before with my machine. I'll try to keep current, though, and maybe even compile afterstep remotely. I'll try to give a report about the ease of CLI administration of OS X.
 

strobe

Puny Member
Originally posted by zpincus


What do you think the chances of getting Aqua forwarding a la X11 are? That would be really useful for the server market, and would be good even if a OS X VNC server comes out.

I think that as is, the lack of a DISPLAY variable for OS X and Aqua (and the related coolness that you can exploit with this) will prove to be a shortcoming.

Any thoughts? Is this something that people would really use (ie. worth nagging Apple about?)
There is no reason I can think of why Apple couldn't use something akin to nxhost which was like xhost except it used postscript commands. OS X could have xPDF or something to the same effect whereby PDF commands are pushed to the remote server. I don't think it's high on their priority however. Perhaps something to beg for the next major release.
 

int69h

Registered
As a variation on the method given by zpincus you could type X followed by one of these options to login to a remote machine running XDM.

-query host-name contact named host for XDMCP
-broadcast broadcast for XDMCP
-indirect host-name contact named host for indirect XDMCP
 

monty

Registered
I don't know if anyone has noticed this before but type man open, its a way of opening things from the command line as if you had double clicked it, it understands bundles etc.

anyway, one if its options is:

" -NXHost opens the file on the specified host (if its win-
dow server is public)."

looks like a hangover from Next? if I understand this right you could ssh into a remote computer, and open an app with -NXHost specifying your local ip and do remote GUI stuff that way. Unfortunately it seems broken in OS X.

Has Anyone used this in OpenStep etc. Does it work? Do you need to make the OSX window server "public"?
 

lnoelstorr

Registered
Now, I'll probably be lynched for this, however following zpincus' lead I got fvwm95 up as the wm on xfree86. So we now have a mac sitting here looking like it's running windows, if only I had my digital camera on me :)
 

sas

Registered
Originally posted by scruffy

Since I have two monitors, this might not be a problem. Do you know if I could just hand XFree one monitor, and leave Quartz running on the other?

Granted, things like cut & paste between the two would be broken, but then that's pretty much broken in X by default, isn't it...
Yes, you can do that. I'm using this setup on my TiBook for several months now with XFree from the XonX project (see sourceforge). The latest version of Xdarwin even supports cut & paste between environments.

HTH,
Sven
 
Top