Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Sorry, this is going to be a multi-prong question, so please bear with me:

I have been a Linux user for years now, but I still struggle to understand how X compares with the software used for display on Windows and Mac systems.

I know it is a client/server based software, but what is particularly puzzling for me is how it works with widget toolkits to provide a display and how these interact with each other.

I mean, take the Cocoa framework of Mac: You have GnuStep, which is an open source implementation of that framework, but (from what I can guess), it runs on X, right? Yet I suppose that Mac does not use X.

Are there any alternative options to Xorg on Linux? Can I run GnuStep, for example, with something else?

Are window managers and desktop environments written specifically to work with X or can they work with other display software?

share|improve this question
1  
OS X actually use X11, till 10.7, then switch to XQuartz on 10.8 (Mountain Lion). A bit more info in wikipedia regarding this. –  John Siu Jan 30 '13 at 21:28
    
OK, that's interesting thanks. I tried Ctrl+Alt+F1/2/3 on a Mac notebook and because I couldn't switch into console mode, I just assumed they use something other than X. –  mydoghasworms Jan 31 '13 at 5:37
    
Ctrl+Alt+F1/2/3 is a linux thing :) OS X don't have that. –  John Siu Jan 31 '13 at 5:43
1  
I guess it's more of a *nix thing, but I suppose you can configure your terminals such as to disable this behaviour. Which would make sense for a high-end commercial desktop like Mac. I mean imagine someone not familiar with the console pressing that combination by mistake; Apple would have endless support calls. –  mydoghasworms Jan 31 '13 at 5:59
add comment

2 Answers 2

up vote 5 down vote accepted

First check Understanding linux desktop

I have been a Linux user for years now, but I still struggle to understand how X compares with the software used for display on Windows and Mac systems.

I know it is a client/server based software, but what is particularly puzzling for me is how it works with widget toolkits to provide a display and how these interact with each other.

I mean, take the Cocoa framework of Mac: You have GnuStep, which is an open source implementation of that framework, but (from what I can guess), it runs on X, right? Yet I suppose that Mac does not use X.

The toolkits (GTK, Qt...) generally do not interact among themselves - they are just libraries and as such (mostly) separated on a per process basis. They of course interact with the X server - by sending draw commands and reading inputs. However, some of them are not limited to a single backend (X11) - for example GTK, Qt and GNUstep have also MS Windows flavours.

The toolkits act as a unified API layer above the native drawing interface - in the case of X11 they translate request to draw a button into a series of simple objects (rectangles, shadings etc.; for example in recent GTK versions this is achieved through another abstraction layer provided by Cairo). On Windows or Mac they have the possibility to use the native API so that e.g. "GTK button" can be translated to "Windows Button", and for example on a framebuffer device it would be translated directly into the single pixels (probably again through a rastering engine like Cairo). For example Qt has about 15 various backends.

If you are talking about the desktop environments communicating with applications using different toolkits, that's a whole different story. These days, D-Bus is usually used in an X session, which allows not only GUI applications to send and receive messages to/from other applications.

Are there any alternative options to Xorg on Linux? Can I run GnuStep, for example, with something else?

One alternative (apart fom those mentioned by John Siu in his answer) might be Wayland. Yet there aren't many applications that would be able to use it natively.

Are window managers and desktop environments written specifically to work with X or can they work with other display software?

Most of the time window managers only understand the X protocol and are supposed to be run under (or above, depending from which side one looks) the X server. Pretty much because there isn't anything better (even though there are things in X11 and it's implementations, that could be better).

share|improve this answer
    
Thanks, you have answered all my questions, and the links have pointed me in the right direction, and especially the information about D-bus is useful. My only query now is still how GTK manages to work on X11 and Windows, but I guess that is a question for another day... –  mydoghasworms Jan 31 '13 at 5:48
    
The "toolkits" paragraph is what I originally planned to update in my answer. peterph did a good job here. +1 –  John Siu Jan 31 '13 at 6:02
    
Check the updated answer on toolkit backends –  peterph Jan 31 '13 at 13:11
add comment

If you are looking for alternate to X11 on Linux, there are a few base on this post. However checking their wiki links, some of them seems no longer under development. Following are 2 that seems active

  1. DirectFB

  2. KDrive/TinyX

Personally I use/try directfb before. I was using Gentoo during that time and can specify window application compile with DirectFB library instead of X11 (or both? I forget.)

share|improve this answer
    
definition of gtk/gnustep/kde/cocoa are some how pretty blurry. Have to update those into answer later tonight. –  John Siu Jan 30 '13 at 22:00
    
Thanks for your answer. I had actually looked at that post prior to coming here; it just added to my confusion! I find the prospect of being able to use a different display program other than X11 a very enticing one, but it seems to me that you would have to rewrite a whole lot of software to make such a desktop useful. –  mydoghasworms Jan 31 '13 at 5:50
    
Not exactly, for example DirectFB, you just need to set the compile option to use directfb library and many programs will just work. I remember replacing X11 completely for months with no issue. –  John Siu Jan 31 '13 at 5:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.