我們知道unix/linux剛開始的時候是沒有圖形界面的,随着時代的發展,排版、制圖、多媒體應用越來越普遍了,這些需求都需要用到圖形界面(Graphical User Interface)。為此,MIT在1984年開發出了X window system,X在字母表中是W(indows)的下一個字母,寓意“下一代GUI”的意思。目前為止,unix/linux上幾乎所有的發行版都采用X window system來作為自己的圖形界面,它已經成為事實上的unix/linux圖形界面标準。
X window system,又名X,X11(現在主要的X window system大都基于其第11個版本),是一個能夠跨網絡和作業系統平台的圖形界面。開發者在開發x時就希望,這個視窗界面不要與硬體有強烈的相關性,這是因為如果與硬體的相關性高,那就等于開發一個作業系統了,如此一來其應用性就要受到限制。故此,x是一套軟體體系,而不是作業系統中的組成部分,就像浏覽器不是作業系統的組成部分一樣(當然微軟在與網景幹仗時可不管這些)。
x server和x client之間所使用的通信協定對網絡來說是透明的,是以client和server可以運作在相同機器上,也可以運作在不同機器上,甚至機器本身的硬體架構和作業系統也可以不一樣(如windows上的xmanager就是一個x server,它可以遠端連接配接linux上的主機為linux上的x client提供服務,有興趣的童鞋可以試下)。
X11 is the window system. Gnome is a desktop environment. The difference is that Gnome works through X11. Gnome and X11 run on Linux, though, not Windows.
Basically, X11 is what displays everything. It's the graphical shell that connects you to the operating system. None of the applications you run ever send anything directly to the screen - they need to tell X11 what they want to display and let it do the work for them.
X11 draws and moves windows and responds to input from the keyboard and mouse. That's pretty much it. Everything else is taken care of by the desktop environment. What that means is that the look and feel of the windows and the way those windows behave are all decided by which desktop environment you're using (Gnome, KDE, XFCE, etc.).
The desktop environments all have their own graphics libraries (reusable chunks of code) that they use, along with APIs (Application Programming Interfaces) which allow programmers to use those libraries when they create GUI applications. This way programmers don't have to recreate commonly used functions and elements from scratch, and the whole operating system has a more standardized look.