I’ve logged into ubuntu 24 from a console login (I’ve pressed Ctrl+Alt F2) and logged in. who shows user1 tty2 2026-02-11 08:41

How can I start a windowing environment. Years ago on some system I remember running something like start-x (not sure if that is right). So… what is the way to start a graphical environment on Ubuntu 24.X after logging into the console on a tty (e.g., tty2)

The way to do this on Ubuntu 24.X is to run

sudo systemctl start graphical.target
sudo systemctl start gdm

Using startx

The command startx might still be around But this only works if:

  • Xorg is installed (Only Wayland is installed by default on Ubuntu 24.X)

  • You have a proper .xinitrc configuration.

  • You have a desktop environment or window manager installed (like GNOME, XFCE, etc.)

To use startx it must exist. If can be installed using sudo apt install xinit but this also requires the Xorg (X11 server). startx does not work with wayland's X11 compatability layer).

Wayland does not use or support startx, because Wayland sessions are launched differently (via login managers like GDM or manually via Weston, etc.).

sudo apt install xserver-orig xinit

In the weeds

This section explains the terminology used by old-school Linux and modern-Linux. Ubuntu is used for discussion but the concepts apply to other Linux distributions.

Suppose you have a Linux box, and it could have either Xorg’s X11 or Wayland’s X11. Using both on the same machine can cause GUI issues if the GUI thinks Xorg/X11 is installed but Wayland/X11 is installed.

You have one graphical monitor (normal setup) on one computer running Ubuntu 24.X linux.

By default it’s using Wayland/X11 compatability layer.

X11 terminology

These are referred to as X Displays:

  • :0 = first display server instance
  • :1 = second display server instance, etc.

Note: DISPLAY=:0 is an environment variable apps use to connect to the first X server session.

The X11 stack looks like

+----------------------------+
|     Graphical App (e.g.,  |
|     Firefox, GIMP, etc.)  |
+----------------------------+
|        Xlib / GTK / Qt     | <- Toolkit with X11 backend
+----------------------------+
|      X11 Protocol (Xlib)   |
+----------------------------+
|     X Server (Xorg)        |
|   (Handles drawing, input) |
+----------------------------+
|     OS Graphics Drivers    |
|     (DRM/KMS + Input APIs) |
+----------------------------+
|         Linux Kernel       |
+----------------------------+
|         TCP/IP Stack       | <- Optional for remote X11
+----------------------------+
|          Hardware          |
+----------------------------+

Wayland Terminology

The wayland stack looks like

+----------------------------+
|     Graphical App (e.g.,  |
|     Firefox, GIMP, etc.)  |
+----------------------------+
|        Wayland Toolkit     |
|      (GTK3/4, Qt5/6, etc.) |
+----------------------------+
|      Wayland Protocol      |
+----------------------------+
|   Wayland Compositor       |
|   (e.g., GNOME Mutter,     |
|    KDE KWin, Sway, etc.)   |
+----------------------------+
|     OS Graphics Drivers    |
|     (DRM/KMS + Input APIs) |
+----------------------------+
|         Linux Kernel       |
+----------------------------+
|         TCP/IP Stack       | <- Rarely used, mainly for remote protocols
+----------------------------+
|          Hardware          |
+----------------------------+

Keep points are:

  • Apps do not talk to a separate server — instead, they talk directly to the compositor, which acts as:
    • Display server
    • Window manager
    • Input handler
  • Compositors use Wayland protocol directly, with no need for an X server.

  • TCP/IP is not used in standard Wayland setups, though protocols like RDP or VNC can tunnel it remotely.

Key differences

| Layer          | X11                              | Wayland                                  |
| -------------- | -------------------------------- | ---------------------------------------- |
| Display server | Separate X server (Xorg)         | Built into compositor (e.g., Mutter)     |
| Communication  | X11 protocol over socket/TCP     | Wayland protocol via UNIX socket         |
| Compositing    | Optional (X11 compositors exist) | Built-in to Wayland                      |
| Remote display | Native X forwarding via SSH/TCP  | Not natively supported; 3rd party needed |

<
Previous Post
Common/Frequently Used Linux commands
>
Blog Archive
Archive of all previous blog posts