CertNote/ Commute Study Notes
Roadmap
KOEN
CLF-C02 · FoundationalCloud Practitioner - Foundational
DVA-C02 · AssociateDeveloper - Associate
SAA-C03 · AssociateSolutions Architect - Associate
SOA-C02 · AssociateCloudOps Engineer - Associate
SAP-C02 · ProfessionalSolutions Architect - Professional
DOP-C02 · ProfessionalDevOps Engineer - Professional
Linux Master 2 · 2급KAIT Linux Master - Level 2
  • Week 1
    • 1.Operating Systems and the Kernel: What Linux Does
    • 2.The Birth of Linux: From Unix to Linus
    • 3.Free Software and Open Source: What a License Decides
    • 4.Distributions: The Unit That Bundles the Kernel and Tools for Sale
    • 5.Week 1 Review: The Identity Behind the Name Linux
  • Week 2
  • Week 3
  • Week 4
  • Week 5
  • Week 6
  • Week 7
  • Week 8
    • 1.The Structure and Evolution of the X Window System
    • 2.Libraries and the Toolkit Layers
    • 3.Window Manager · Display Manager · Desktop Environment
    • 4.Running X and Remote Displays
    • 5.Week 8 Comprehensive Review: The X Window Name Tag Sheet
  • Week 9
  • Week 10
  • Week 11
SCS-C03 · SpecialtySecurity - Specialty
Linux Master 1 · 1급KAIT Linux Master - Level 1
MLA-C01 · AssociateMachine Learning Engineer - Associate
AIF-C01 · FoundationalAI Practitioner - Foundational
DEA-C01 · AssociateData Engineer - Associate
MLS-C01 · SpecialtyMachine Learning - Specialty
SQLD · 개발자SQL Developer (SQLD)

© CertNote · 주간랩스

  • About
  • Changelog
  • Contact
  • Terms
  • Privacy
← Linux Master 2/Week 8/Day 5

Based on the Linux Master 2 exam syllabus·Report an error

Linux Master 2· AssociateWeek 8 · Day 5~21 min read

Day 5 - Week 8 Comprehensive Review: The X Window Name Tag Sheet

📌 Key Takeaways

  • The side with the screen is the X server and the program is the X client. It is the opposite of the web.
  • The evolution order is XFree86 → X.org Server → Wayland.
  • The layers from the bottom are X server → Xlib · XCB → toolkit → application. XCB is the lowest level.
  • A name ending in DM is a display manager. This one rule can sort a good share of classification questions.
  • DISPLAY is host:display.screen, and local is :0.0.

One Sheet of Name Tags

This week is all about which slot a name goes into.

   Layer                     Names
   ─────────────────────────────────────────────────────────────
   X server impl.   XFree86 → X.org Server → Wayland
                    (XWayland is a compatibility layer)
 
   Low-level libs   Xlib · XCB          ← XCB is further down (lower level)
 
   Toolkits         GTK+ (C, GIMP Toolkit) · Qt (C++) · FLTK · Motif · Tk
 
   Window managers  KWin (KDE) · Mutter (GNOME) · Metacity (GNOME 2)
                    Xfwm (Xfce) · Openbox (LXDE) · Marco (MATE) · Muffin (Cinnamon)
                    Windowmaker · Afterstep · Enlightenment · Fluxbox · twm · FVWM
 
   Display managers XDM (default) · GDM (GNOME) · KDM (old KDE)
                    SDDM (KDE Plasma) · LightDM (Ubuntu · Xfce) · LXDM
 
   Desktop environments  GNOME · KDE · Xfce · LXDE · LXQt · MATE · Cinnamon · CDE
 
   File managers    Nautilus (GNOME) · Dolphin (KDE) · Thunar (Xfce) · PCManFM (LXDE)

Bundling Desktop Environments on One Line

EnvironmentToolkitWindow managerFile managerDisplay manager
GNOMEGTK+MutterNautilusGDM
KDEQtKWinDolphinSDDM
XfceGTK+XfwmThunarLightDM
LXDEGTK+OpenboxPCManFMLXDM
CDEMotif———

Memorize each horizontal line as a whole. Even just being sure of the GNOME line and the KDE line solves most pairing questions.

Contrasting the Confusing Pairs

ItemABDeciding criterion
X server vs X clientThe side with the screenThe programWho provides the resource
Xlib vs XCBTraditional, heavyLower level, lightDistance from the X server
Library vs toolkitXlib · XCBGTK+ · Qt · FLTKWhether it provides widgets
GTK+ vs QtC, GNOMEC++, KDELanguage and camp
Xfce vs XfwmDesktop environmentWindow managerThey differ by one letter
Window vs display managerWindowsLogin screenWhen it operates
Window manager vs desktop environmentWindows onlyIncludes everythingContainment relationship
XFree86 vs X.orgFormerCurrent standardGeneration
X vs WaylandExistingReplacement protocolNot a new version
xhost vs xauthPer host, weakPer user, strongAuthentication method
Runlevel 3 vs 5TextGraphicalBoot mode

Commonly Missed Points

  1. The remote server is the X server → No. The computer in front of me is the X server.
  2. Xlib is the lowest level → XCB is further down.
  3. GTK+ is C++ → It is C. Qt is C++.
  4. Xfce is a window manager → It is a desktop environment. The window manager is Xfwm.
  5. Wayland is a new version of X → It is a replacement. The structure is different.
  6. The X Window System is part of the kernel → No. It is an application, so you can do without it.
  7. Using xhost + is convenient → It is a dangerous command that opens your screen to everyone.
  8. DISPLAY=0:0 → The order is reversed. :0.0 — the colon comes first.
  9. Runlevel 5 is text → 3 is text and 5 is graphical.
  10. KDM is the current KDE display manager → It is SDDM now. KDM is the old one.

Values That Appear on the Exam as They Are

ValueWhat it is
1984 / MITThe start of the X Window System
X11The version still in use today
:0.0The DISPLAY value for the local first screen
3 / 5Text / graphical runlevels
/etc/X11/xorg.confThe X server config file
~/.XauthorityThe file where magic cookies are stored
MIT-MAGIC-COOKIE-1The authentication method of xauth
AbbreviationFull name
XCBX protocol C-language Binding
GTK+GIMP Toolkit
FLTKFast Light Toolkit
CDECommon Desktop Environment
GDM / KDM / XDMGNOME / KDE / X Display Manager

Dissecting One Window by Layer

If you have memorized the name tags, this time take one window on the screen and point out who is responsible for which part. This is the case of launching gedit on GNOME and Kate on KDE.

What you see on the screenLayer responsibleIn GNOMEIn KDE
The login screen right after bootDisplay managerGDMSDDM
The top panel, menus, settings windowsDesktop environmentGNOMEKDE Plasma
The window's title bar, borders, close buttonWindow managerMutterKWin
The menus, buttons, and text boxes inside the windowToolkitGTK+Qt
The editor program itselfApplication (X client)geditKate
Converting drawing requests into X protocol and sending themLow-level libraryXlib · XCBXlib · XCB
Actually drawing on the screen and passing key inputX serverX.org ServerX.org Server
  • The window's border and the window's interior are drawn by different parties. The window manager draws the border and title bar, and the program draws the interior content using the toolkit. That is why, if you launch a Qt program on GNOME, the border has the GNOME look while only the buttons inside look different.
  • The bottom two lines are the same whether GNOME or KDE. The camps split from the toolkit upward.
  • So even if a program freezes and its interior locks up, you can still grab the border and move the window. That is because the window manager is a separate program and is still alive. At that point, click the window with xkill to close it.
  • Among recent GNOME programs, some even draw the title bar themselves. What the exam asks is the traditional division of roles in the table above.

From Power to Window — In Time Order

   Boot        graphical.target (runlevel 5)        ← if multi-user.target (3), a text login happens here
     │
   Display manager starts (GDM · SDDM · LightDM)
     │           launches the X server (X.org Server) as display :0   ← config /etc/X11/xorg.conf
     │           draws the login screen
     │
   Session starts    desktop environment = window manager + panel + file manager …
     │
   Program      the X client looks at DISPLAY=:0 and connects to the X server
     │           toolkit (GTK+ · Qt) → Xlib · XCB → X protocol
     ▼
   Window on the screen
  • If you booted into text, a single startx line does the job of launching the X server and starting the session. Since you have already logged in by text, you skip the login screen.
  • This week's four days are one slot each of this picture — Day 1 is the X server and client, Day 2 is libraries and toolkits, Day 3 is the three managers, and Day 4 is execution and DISPLAY.

Separating Names with the Same Initial

The people who make the choices gather names that begin with the same letter. Sort them out in advance.

Starting with XWhat it is
XFree86The old X server implementation
X.org ServerThe current X server implementation
X11The version of the X protocol
Xlib · XCBLow-level libraries
XDMDisplay manager
XfceDesktop environment
XfwmXfce's window manager
XWaylandThe compatibility layer that runs X programs on Wayland
xterm · xclock · xeyesX clients (applications)
xhost · xauth · xrandr · xkill · xdpyinfoX-related commands
InitialDesktop environmentWindow managerDisplay managerToolkitOther programs
GGNOME(Mutter)GDMGTK+GIMP, gedit
KKDEKWinKDM (now SDDM)(Qt)Konsole, Kate
LLXDE, LXQt(Openbox)LXDM, LightDM——
MMATEMutter, Metacity, Marco, Muffin—Motif—
  • In the G row, GNOME, GDM, GTK+, and GIMP are all different kinds — environment, login, toolkit, and application. If asked to pick "the same kind as GNOME", you must look in the KDE and Xfce side, not among the names starting with G.
  • In the M row, only MATE is a desktop environment, Motif is a toolkit, and the other four are window managers.

Practice Identifying — Picking the Odd One Out

Cover the answer and first say "what the other three have in common". Once the commonality comes out in words, the odd one becomes visible on its own.

ChoicesThe odd oneCommonality of the other three
GTK+ · Qt · Motif · XlibXlibToolkits
The one providing widgets among XCB · Xlib · FLTKFLTK(The other two are low-level libraries)
Mutter · KWin · Xfwm · SDDMSDDMWindow managers
GDM · KDM · XDM · twmtwmDisplay managers
GNOME · Xfce · LXDE · KDE (by toolkit)KDEGTK+-based
The one not Qt-based among KDE · LXQt · XfceXfce(The other two are Qt-based)
Nautilus · Dolphin · Thunar · EvinceEvinceFile managers (Evince is a document viewer)
XFree86 · X.org Server · Wayland · XlibXlibOn the server/protocol side that handles the screen (Xlib is a client library)
xhost · xauth · ssh -X · xrandrxrandrAccess and connection for remote screens (xrandr is resolution)
Windowmaker · Afterstep · Fluxbox · CinnamonCinnamonStandalone window managers

Practice Identifying — Reading Values

What is givenHow to read it
DISPLAY=:0Local, display 0, screen omitted (0) — same as :0.0
DISPLAY=192.168.0.10:1.0The second X server of 192.168.0.10, first screen. TCP port 6001
DISPLAY=localhost:10.0A session that came in with ssh -X. The fake display made by sshd
access control disabled, clients can connect from any hostSomeone ran xhost + — to close it, xhost -
Error: Can't open display:DISPLAY is empty
systemctl get-default → multi-user.targetBoots into text (runlevel 3). For graphics, use startx
id:5:initdefault:A line in the old /etc/inittab saying to boot into graphical mode
Section "Device"The graphics card section of xorg.conf (not the keyboard or mouse)

The Old and the Current

AreaOldCurrent
X server implementationXFree86X.org Server (and the replacement protocol Wayland)
Low-level libraryXlibXCB (Xlib is also used alongside)
X server config fileXF86Configxorg.conf
GNOME's window managerMetacityMutter
KDE's display managerKDMSDDM
Specifying the boot modeRunlevel (/etc/inittab)Target (systemctl set-default)
Remote displayxhost + DISPLAYssh -X
  • The exam also uses the old names as they are. The answer differs between when it asks for the "current standard" and when it asks for the "evolution order", so remember the two columns as a pair.

Next week is network concepts. We cover the OSI 7 layers, TCP/IP, and IP addresses and subnets.

📖 Glossary

  • X server / X client: The side with the screen and input devices / the program that requests that something be drawn on the screen.
  • XCB: A low-level library thinner than Xlib and closer to the X server.
  • Toolkit: A higher-level library that provides widgets such as buttons and menus. GTK+, Qt, etc.
  • Window manager / display manager / desktop environment: Handles windows / handles the login screen / the overall integrated environment.
  • DISPLAY: The environment variable that specifies the screen to output to.
  • X11 forwarding: The feature that carries X traffic over SSH's encrypted connection. Used as ssh -X.
  • Compositor: In Wayland, the program that handles both screen output and window management.
  • Wayland: A display server protocol newly designed to replace X.

📝 Practice Questions

Click a choice to reveal the answer and explanation.

Question 1

Which of the following sits lowest in the layers of the X Window System and communicates directly with the X server?

Question 2

Which of the following is not a display manager?

Question 3

Which window manager does the Xfce desktop environment use?

Question 4

Which runlevel corresponds to text mode in the X Window context?

Question 5

Which desktop environment was built on the Qt toolkit?

Question 6

Which method safely displays a graphical program from a remote computer on my screen through encrypted communication?

PreviousRunning X and Remote DisplaysWeek 8 · Day 4Next The OSI 7 Layers and TCP/IPWeek 9 · Day 1

Official references

  • Linux Master 2 official exam syllabus(opens in a new tab)

On this page

  • Key Takeaways
  • One Sheet of Name Tags
  • Bundling Desktop Environments on One Line
  • Contrasting the Confusing Pairs
  • Commonly Missed Points
  • Values That Appear on the Exam as They Are
  • Dissecting One Window by Layer
  • From Power to Window — In Time Order
  • Separating Names with the Same Initial
  • Practice Identifying — Picking the Odd One Out
  • Practice Identifying — Reading Values
  • The Old and the Current
  • Glossary
  • Practice Questions