Xorg is a freely redistributable, open-source implementation of the X Window System. This system provides a client/server interface between display hardware (the mouse, keyboard, and video displays) and the desktop environment, while also providing both the windowing infrastructure and a standardized application interface (API).
This section however doesn't install Xorg-Server-21.1.20, but instead installs basic software that a lot of other software depend on, including the Xorg server, compositors, window managers or desktop environments, and Xwayland-24.1.9.
![[Note]](../images/note.png) 
        Xwayland is a necessary part of Wayland if you want to use Xorg-only software like Steam-1.0.0.84. Wine-10.17 has an experimental Wayland mode but it is still a good idea to install Xwayland-24.1.9 for now.
Xorg-7.0 introduced a completely auto-tooled, modular build system. With the new modular build system, it is no longer possible to download the entire package in a single file. In fact, there will be well over 100 packages that need to be fetched from the download location. To assist with such a large task, installing Wget-1.25.0 is strongly recommended for downloading the needed files. A complete wget file list is provided for each page that includes multiple packages.
Given the number of packages available, deciding which packages you need to install for your particular setup may seem a bit overwhelming at first. Take a look at this page and this thread to get an idea of what you will need. If you are unsure, you should install all packages at the cost of extra disk space.
![[Note]](../images/note.png) 
        Even if you intend to download only the necessary packages, you should download the wget file lists. The list of files are ordered by dependency, and the package versions listed in the files are known to work well with each other. Further, the wget file lists contain comments for specific packages that are deprecated or are not recommended to install. Newer packages are likely intended for the next release of Xorg and have already proved to be incompatible with current versions of software installed in GLFS. The installed size of Xorg can be reduced considerably by installing only the packages that you will need and use, however, the GLFS book cannot account for all dependencies and build options for the individual Xorg packages. The instructions assume that all packages have been built.
        Additionally, because of the large number of repetitive commands, you
        are encouraged to partially automate the build. Instructions have
        been given that utilize the BLFS sudo
        package. It is recommended that you use the :NOPASSWD configuration option for the
        user that will be building the xorg packages. There are other
        accommodations in the off chance you didn't install it. You can use
        the su utility,
        invoking -c . This requires
        that you enter your password each time a package needs to get
        installed. The last accommodation is allow you to build and install
        each package as the root user.
      
          Set the XORG_PREFIX variable for
          compatibility with installation instructions outside this book
          (BLFS and SLFS) with the following command:
        
export XORG_PREFIX="/usr"
![[Note]](../images/note.png) 
          
            The XORG_PREFIX variable will not be
            used in this book, but it is a necessary variable to set if you
            intend to follow instructions from BLFS or SLFS. If you aren't
            just copy and pasting said instructions, you may do without the
            variable but be sure to replace the variable in the instructions
            with /usr.
          
          Throughout these instructions, you will use the following
          configure switches
          for all of the packages. Create the XORG_CONFIG variable to use for this parameter
          substitution:
        
export XORG_CONFIG="--prefix=/usr --sysconfdir=/etc \
    --localstatedir=/var --disable-static"
        
        
          Create an /etc/profile.d/xorg.sh
          configuration file containing these variables as the root user:
        
cat > /etc/profile.d/xorg.sh << EOF
XORG_PREFIX="/usr"
XORG_CONFIG="--prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-static"
export XORG_PREFIX XORG_CONFIG
EOF
chmod 644 /etc/profile.d/xorg.sh
        Now source the main profile:
source /etc/profile
          If you've installed sudo, ensure that XORG_CONFIG is available in the sudo environment. As
          the root user, run the following
          command:
        
cat > /etc/sudoers.d/xorg << EOF
Defaults env_keep += XORG_CONFIG
EOF