PDA

View Full Version : What is this X11 and what does it do?



Currawong
11th September 2004, 09:29 AM
This question comes up quite frequently. Someone asks "What software can I get to do something or other?" and the answer can often be "There's an open source app, but it runs in X11". Immediately, a bunch of people who have no Unix/Linux knowledge are completely confused.

What I'm going to start by doing is explaining what I know, and people with a greater knowledge can add to what I write.

Very basically, X11, or XWindows as it's known is the graphical interface for Unix/Linux, where Quartz (including Quartz Extreme) is the graphical interface layer for OSX, the Finder is for OS9 and below, and Windows is (or rather, was) for DOS.

X11 itself is only a very basic system for drawing pixels on a screen. On top of XWindows one runs a window manager. KDE and Gnome are most well known in the Linux world, with the most basic window manager being TWM. In Mac OS X, Aqua is the closest thing to the Window Manager. If you've ever played with Linux and seen Windowmaker, that's the window manager NeXT came with. The dock in OSX is basically an evolution of a feature in Windowmaker for example.

In Mac OS X, it's possible to run Unix/Linux applications (that have been re-compiled) that require XWindows graphical user interface. The Gimp is a good example of this, being a freeware equivalent of Photoshop. As Aqua has nothing whatsoever in common with XWindows, Apple has provided an application, X11.app that runs XWindows, so you can run these applications.

Normally, XWindows would draw directly to the screen on a computer, but with X11.app it's drawing to that application. X11.app comes with its own special window manager that makes the individual windows behave like Aqua windows - ie: you can minimise them to the dock etc. You can run window managers like Windowmaker, KDE and Gnome instead, and even have the desktop icons appearing on your desktop!

With window managers other than the one that comes with X11.app, there are two ways of running the XWindows desktop, called "rooted" or "rootless". This is not quite "stuffed" or "haven't got any lately", but refers to the "root" window, ie, the screen being drawn to, the "root window", which is known in Mac OS (X) as the desktop. The X11.app standard window manager is "rootless" because it runs as if there is no desktop, whereas other window managers can, with a setting in X11.app, run so that, if you click on X11.app the entire screen dissapears, to be replaced entirely with the XWindows environment, including desktop. That's knows as "rooted".

Now I need some screenshots. Anyone else want to add to what I say or fix any blundering errors I've made until I have some?

Edit: Took Bahamut's suggestion about Quartz and Aqua, even though the comparison is a bit messy.

dev_enter
11th September 2004, 09:54 AM
I would say X11 is more comparable to Quartz/Quartz Extreme than to Aqua.

Aqua is more comparable to a WM/Theme.

elvis
11th September 2004, 11:04 AM
Excellent explanation. Very concise and clear.

The one saving grace of X11 is that despite what series of window managers you use (GNOME, KDE, TWM, XFCE4, etc) the applications underneath still understand how to draw basic graphic information to the screen.

This in turn means that any POSIX compliant C or C++ code that does not refer to cpu-specific features, and draws out to X11 is immediately accessible to MacOSX users who run X11. A simple recompile for the MacOSX kernel, and the application is usable on any Mac running OSX.

Examples of these are GIMP (Photoshop clone), OpenOffice, Inkscape (vector art package) and a host of other quality tools. Superb packages that until recently have needed entire rebuilds for use on other platforms. With Apple's X11 implementation, it means less effort to get these tools to a working status.

Native Aqua/Cocoa code would of course be preferred, as it means no need for X11 to sit in between. However, that means far more development time, or even worse, pushes developers away from Mac as a platform to experiment with.

For those wanting X11 for Apple, the GIMP.app page has links to X11 for OSX10.3 and OSX10.2:

http://gimp-app.sourceforge.net/

Nevets_Anderson
12th September 2004, 10:24 AM
Great thread guys bit don't forget FINK!

Once you have x11 installed on your mac

Get FinkCommander
"FinkCommander is an open-source, graphical user interface for the Fink software packaging system for Mac OS X. It provides an intuitive front-end to the Fink command-line tools for downloading and installing Unix software." (quote from Website)
Fihttp://finkcommander.sourceforge.net/ (http://finkcommander.sourceforge.net/)

Install Fink
"The Fink project wants to bring the full world of Unix Open Source software to Darwin and Mac OS X. We modify Unix software so that it compiles and runs on Mac OS X ("port" it) and make it available for download as a coherent distribution."(quote from Website)
(Note last time I installed Fink Commander it had a pre install of fink with it!)

The upshot of this is that you can then install hundreds of x11 programs with the click of a mouse although after installing them you have to open them in an xterminal

ie
sudo /sw/bin/./ethereal

or

/sw/bin/./gimp

if your installing just command line tools you can open them up in the mac os X terminal without needing to open x11 ! (very useful for enmap etc.)


Screeen shot shows finkcommander

Currawong
24th March 2005, 09:08 AM
Just found this useful thread I started while moving other threads :)

Daz34
24th March 2005, 11:16 AM
I want to get into the X11 thing...
What sparked my interest was talking to a teacher at TAFE, who is into Linux stuff. He was talking about compiling programs, Knoppix and the network testing tools that are included in that distro.
He also mentioned a fractal generating program in Knoppix, while not ground-breakingly useful (!), I was determined to get it for my mac.
I couldnt get my head around it till I installed the Fink package. Its not the Commander, cause I want to do the command line interface. Something like sudo apt-get instal Windows XP
:blink:

I can get it working in the terminal, all julia sets and mandelbrodts (in ascii hehehe) and in X11 all colours and patterns... I was stoked!
Ok, it makes me feel cleverer than I am to get it going,this CLI, Fink, X11 thing is a whole new world of personal computing that I find incredible and something I couldn't explore in my previous OS.

Thanks for opening my mind Apple, AppleTalk and Open Source.

MacDave
3rd April 2005, 11:58 PM
From left to right:

Gimp, pstree (a fink install which shows parentage of processes), top -u and Elena Anaya =)

McDull
24th September 2005, 01:26 AM
The exact name is X Window System (or simply X), not XWindows. Notice the lack of "s" in "Window".

I've switched from fink to DarwinPorts. IIRC DP has more packages and it feels more robust :D

elvis
6th October 2005, 04:06 PM
Originally posted by McDull@Sep 24 2005, 01:26 AM
I've switched from fink to DarwinPorts. IIRC DP has more packages and it feels more robust :D
I'm sticking with Fink. DarwinPorts is sorely lacking in available packages, and has played catchup with Fink since day one.

DarwinPorts:
http://darwinports.opendarwin.org/ports/
"View All Software Titles (2192)"

Fink:
http://fink.sourceforge.net/pdb/index.php?phpLang=en
"The database was last updated at 04:26 GMT on Thursday, October 06 and currently lists 5602 packages"

Fink weighs in at more than double the size of DarwinPorts. And they're not just bizzare or obscure ones either. I've tried DarwinPorts 3 times to date, and each time fell back to Fink shortly thereafter thanks to DP missing essential packages that I use daily. Same goes for MacOSX-Gentoo. Great system, but grossly lacking in usable content.

macintoshrules
6th October 2005, 05:01 PM
What's wrong with keeping them both? I use both, and just look for the same package on both, and get whichever one has the more up-to-date version.

xsive
17th November 2005, 06:18 PM
So anyway.. this thread is great but.. how do I run X11?
I grabbed an X11 dmg from Apple but when I tried to install it, it tells me there is a newer version already installed (I'm running 10.4.3). Spotlight tells me there's no X11.app though I do have various x11 folders about the place.

Would anyone like to shed some light on this for me?

elvis
30th November 2005, 06:45 PM
Originally posted by xsive@Nov 17 2005, 06:18 PM
So anyway.. this thread is great but.. how do I run X11?
I grabbed an X11 dmg from Apple but when I tried to install it, it tells me there is a newer version already installed (I'm running 10.4.3). Spotlight tells me there's no X11.app though I do have various x11 folders about the place.

Would anyone like to shed some light on this for me?
There should be a more up to date X11 installer on your 10.4 install CDs. The X11 installer on Apple's website is a beta, and designed for 10.2 from memory.

dagaz
17th December 2005, 07:20 AM
Originally posted by xsive@Nov 17 2005, 06:18 PM
So anyway.. this thread is great but.. how do I run X11?
I grabbed an X11 dmg from Apple but when I tried to install it, it tells me there is a newer version already installed (I'm running 10.4.3). Spotlight tells me there's no X11.app though I do have various x11 folders about the place.

Would anyone like to shed some light on this for me?
X11 is not installed by default, you have to choose a custom installation and select it. Assuming you have done so it can be found in /Applications/Utilities/X11. The X11 app only comes bundled with xterm (an alternative to Terminal.app, xman and xlogo. The easiest way to install other packages is then with either fink (my preferred pm) or DarwinPorts (see above).

ngift
6th February 2007, 08:52 AM
Here is an example of X11 in action!

http://www.osxautomation.com/2007/02/02/x11-on-tiger/

richardcavell
18th May 2009, 08:11 PM
I'll just clarify for those who are a little confused as to where to find it...

X11 is not installed in Mac OS X by default. If you don't have it:

If you're using OS 10.3, download the X11 installer from the Apple website here: Apple - Downloads - Mac OS X Updates - X11 for Mac OS X (http://www.apple.com/downloads/macosx/apple/macosx_updates/x11formacosx.html).

If you're using 10.4 or 10.5, you need to install it from your CD that came with your computer. There's no online version available.

Richard