What Now?

#### Gaming Linux® From Scratch - Version 13.0

### Chapter 15. Checkpoint

- Prev

  Checkpoint

- Next

  Steam

- Up
- Home

# What Now?

By now, you should have most of the packages needed to compile any packages on this page and beyond. The good news is you are now done with the hardest part of this book. Congrats!

Well, where do you go from here? You could continue straight to the following chapters if you wish. But to run graphical programs like Steam-1.0.0.85 and Wine-11.2 (including wineboot as shown in the setup for DXVK-2.7.1), you will need a graphical environment. There are a few components you will need in order to get a graphical environment working and not accidentally lock yourself inside of it without a hard reboot. The installation of those components is not covered in this book, as the specific components will depend on if you plan to use X11, Wayland, or both. This page acts as a simple nudge to help point you in the right direction. When you are done setting up your graphical environment, you can come back and continue with the next chapters.

Furthermore, make sure to install a video userland driver. While no sections later in this book depend on the drivers, a graphical environment needs a driver. Be sure to read What Drivers to Install and install the driver(s) of your choosing.

While you are at it, make sure you have followed The Bash Shell Startup Files if you have not already as the files in that section set necessary variables.

Lastly, it would be a good idea to create a normal user and add it to three groups (`audio`, `input`, and `video`) as the `root` user:

    useradd -mG audio,input,video <username>

A lot of software will need the user to be a part of those groups to access the proper APIs and devices.

## X11

It is recommended to read up on the BLFS page Xorg-7 Testing and Configuration. It is pretty comprehensive. However, using NVIDIA with X11 requires a slightly different setup, and there may be extra information you wish to know.

### X11 With NVIDIA

Using a conventional `/etc/X11/xorg.conf` can lead to issues, if X11 manages to even start. In order to use the NVIDIA driver when starting X11, run the following command as the `root` user:

    nvidia-xconfig

### Important

The above command will overwrite the current `/etc/X11/xorg.conf` configuration file. If you wish to preserve it, move it out of the way or rename it.

If you desire to use a high refresh rate, using cvt as the method will result in failure. When you start the server, launch nvidia-settings as the `root` user and navigate to the “X Server Display Configuration” section on the left sidebar and change the Hz located to the right of the screen size. Click “Apply” when you are done, accept the changes, then click “Save to X Configuration File”. If given the option, choose to merge the file. Note that this method requires GTK3.

If you have an integrated graphics card (being either AMD or Intel) and a discrete graphics card (being NVIDIA), run the following as the `root` user:

    nvidia-xconfig --prime

It will tell you to run a few commands. While in a TTY, put those commands into your `~/.xinitrc` file, or else when you start Xorg you will be greeted with a black screen. You can also put the commands in a different script and use a keybind to open a terminal and blindly execute the script — at which point the graphics should appear like normal. Running the commands in a TTY will result in complaints that no screens were found. Additionally, make sure you have installed drivers for both your iGPU and dGPU.

### Using Zink

If you compiled Zink in Mesa-25.3.5, chances are X11 or any Wayland compositors will use the Gallium3D driver meant for your GPU specifically. You can override this by setting the following variable:

    export MESA_LOADER_DRIVER_OVERRIDE=zink

This could be considered unstable, so if you experience crashes, the Zink driver could be the issue and you should use the Gallium3D driver meant for your GPU instead.

If you are on a NVIDIA Turing or newer GPU, Zink will be used by default instead of Gallium3D Nouveau.

### X11 Components

There are typically three important components of an X11 environment:

- a window manager or desktop environment

- a terminal and/or launcher

- and optionally a compositor

##### Window Manager

A window manager is an application that manages windows, their placement, how they move, and more. It is a minimal option for a graphical environment. Some popular window managers include AwesomeWM, BSPWM, DWM, and i3. In order to start your chosen window manager, add the following line to `~/.xinitrc`:

    echo "exec <WINDOW-MANAGER>" >> ~/.xinitrc

Then launch it:

    startx

A desktop environment is a more user-friendly graphical environment which provides much more than a standard window manager [7]. However, desktop environments also require more packages, RAM usage, and disk space. Some popular desktop environments include Cinnamon, GNOME, and KDE Plasma. These should be loaded by a display manager, like SDDM. A display manager is often loaded by a service or daemon.

##### Terminal and/or Launcher

By this point, you should know what a terminal is, whether it be a TTY or a graphical terminal. Terminals are almost a necessity and help when you are in a pinch. You can launch most applications with a terminal. This is useful when you have no other way to launch an application. There are a wide variety of terminals and some integrate better with the system depending on if you went with a window manager or desktop environment. Check the Arch Wiki page Category:Terminal emulators for a comprehensive list of terminals. Some of the listed terminals are in BLFS. If you decided to go with a window manager, make sure to add a keybind for your chosen terminal.

A launcher is what it sounds like: an application that launches a specified application. Some launch applications by the binary name in the `PATH` variable, while others launch applications according to desktop file entries[8]. Don't be afraid to create your own! It's okay to be creative sometimes. Check the Arch Wiki page Category:Application launchers for a comprehensive list of launchers. Desktop environments include their own launcher and are often accessed via the “start menu”. If you decide to use a window manager, make sure to add a keybind for your chosen launcher.

##### Compositor

A compositor talks with Xorg-Server-21.1.21 and can change what is seen on screen. Compositors can add animations, borders, shadows, opacity, etc. to windows. They can also enable vsync. Though compositors aren't needed on X11, they make the graphical environment look nicer. These visual enhancements can be GPU-intensive if the GPU is weak or the graphics driver isn't that performant[9]. Check the Arch Wiki page Xorg Composite for a list of compositors. In order to enable a compositor when starting a window manager[10], add the following line BEFORE the ``exec ...`` line:

    <compositor> &

Desktop environments include their own compositors which are started when the desktop environment loads up.

## Wayland

Wayland is much simpler to set up than X11. You should still read the X11 section above, as much of the information is also relevant to Wayland. There are a few changes, however.

### NVIDIA

You will only need to worry about the refresh rate if it's applicable to you. You won't need to worry about making sure the NVIDIA driver is used when starting Wayland. However, read through the installation instructions for your chosen graphical environment, as they may have information regarding NVIDIA. Results can be shotty, and sometimes the environment won't be able to start. Do your research first.

### Window Managers, Desktop Environments, and Compositors

Unlike on X11, the window manager and compositor will always be combined on Wayland. Minimal graphical environments are called compositors instead of window managers, but desktop environments are still called desktop environments. For compositors, the only additional components that need to be installed are a terminal and optionally a launcher.

##### Compositors

Many X11 window managers do not support Wayland. There are some unofficial ports that use certain reusable frameworks which would be called an X11 compositor, like wlroots (these are called compositor libraries). You can try some ports if you wish but some of them do their own thing which you may not agree with.

Native Wayland compositors include Hyprland, Sway, and Wayfire. In order to start these compositors, you can start them by using a display manager or simply running their binary.

##### Desktop Environments

Go with GNOME or KDE Plasma. They have good Wayland support. Like with X11, you can launch these using a display manager.

[7] It is worth noting that a desktop environment includes a window manager.

[8] Desktop files are often located in `/usr/share/applications` and/or `~/.local/share/applications`.

[9] If you decide to use a compositor, it might be a good idea to temporarily kill it when gaming.

[10] Note that some window managers handle compositing on their own. For more information, reference the Arch Wiki page Xorg Composite.

- Prev

  Checkpoint

- Next

  Steam

- Up
- Home