| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| xfce:building [2026/02/11 15:49] – Add build instructions for meson andreldm | xfce:building [2026/10/25 05:53] (current) – Grammar improvement kevinbowen |
|---|
| ====== Building Xfce from source ====== | ====== Building Xfce from source ====== |
| |
| To compile a complete Xfce desktop from source requires some information about the dependency chain and the various configure options available in each module. This page will describe this in detail, so you can compile your own Xfce desktop; both system wide as well as in your $HOME directory. | To compile a complete Xfce desktop from source requires some information about the dependency chain and the various configuration options available in each module. This page will describe these requirements in detail, so that you can compile your own Xfce desktop; both system wide as well as in your $HOME directory. |
| |
| * **[[building#Choosing your Xfce version|Choosing your Xfce version]]** | * **[[building#Choosing your Xfce version|Choosing your Xfce version]]** |
| ===== Choosing your Xfce version ===== | ===== Choosing your Xfce version ===== |
| |
| First you will need to decide on which version of Xfce that you want to compile. Xfce version numbers are constructed like this: 1.2.3 => major.minor.micro. If the minor version is an even number, this means that it is a stable release. An odd numbered minor version indicate a development, or testing snapshots. The micro number increases with each release. Also, it is recommended to keep the major.minor version the same for the core components (some packages don't follow those numbers) or there will most likely be dependency version problems during compilation. | First you will need to decide on which version of Xfce that you want to compile. Xfce version numbers are constructed like this: 1.2.3 => major.minor.micro. If the minor version is an even number, this means that it is a stable release. An odd numbered minor version indicates a development, or testing snapshot. The micro number increases with each release. Also, it is recommended to keep the major.minor version the same for the core components (some packages don't follow those numbers) or there will most likely be dependency version problems during compilation. |
| |
| The latest releases available can be found on the [[https://www.xfce.org/download|download]] page. You can also build from the source repositories if you have enough experience. Additional information about this is provided below. | The latest releases available can be found on the [[https://www.xfce.org/download|download]] page. You can also build from the source repositories if you have enough experience. Additional information about this is provided below. |
| git clone https://gitlab.xfce.org/$category/$module | git clone https://gitlab.xfce.org/$category/$module |
| |
| After the repository is cloned, you will need to choose which branch you want to compile. By default, the ''master'' branch is selected, but there are also branches for stable releases like ''xfce-4.20''. The stable branches contain the latest bug fixes without any major new features, the master branch is the development version for the next release of Xfce. Both should not be used in a production environment. | After the repository is cloned, you will need to choose which branch you want to compile. By default, the ''master'' branch is selected, but there are also branches for stable releases like ''xfce-4.22''. The stable branches contain the latest bug fixes without any major new features, the master branch is the development version for the next release of Xfce. Both should not be used in a production environment. |
| |
| To switch to another branch (''git branch -a'' lists all available branches) run the following command inside the cloned directory to switch to, for example, the ''xfce-4.20'' branch: | To switch to another branch (''git branch -a'' lists all available branches) run the following command inside the cloned directory to switch to, for example, the ''xfce-4.20'' branch: |
| |
| git checkout --track origin/xfce-4.20 | git checkout --track origin/xfce-4.22 |
| |
| After this, you can update your local copy of the repository with git pull and switch to another branch with ''git checkout $branchname''. Read the [[http://git-scm.com/documentation|GIT manuals]] for more information about using GIT. | After this, you can update your local copy of the repository with git pull and switch to another branch with ''git checkout $branchname''. Read the [[http://git-scm.com/documentation|GIT manuals]] for more information about using GIT. |
| |
| For history, here are the versions needed for older Xfce releases: | For history, here are the versions needed for older Xfce releases: |
| | * Xfce 4.20 requires Gtk+ 3.24 and Glib 2.72 |
| * Xfce 4.18 requires Gtk+ 3.24 and Glib 2.66 | * Xfce 4.18 requires Gtk+ 3.24 and Glib 2.66 |
| * Xfce 4.16 requires Gtk+ 3.22 and Glib 2.50 | * Xfce 4.16 requires Gtk+ 3.22 and Glib 2.50 |
| ===== Building the packages (meson) ===== | ===== Building the packages (meson) ===== |
| |
| <note important>This section is working in progress, it applies for building from git master and Xfce 4.21</note> | <note important>This section is currently a work in progress, it applies for building from git master and Xfce 4.21+</note> |
| |
| Now it is finally time to start compiling the Xfce desktop. Last remaining thing is to choose an installation location. Possible examples are ''/usr'', ''/usr/local'' and ''/opt/xfce4'' for a system-wide installation or ''$HOME/local'' if you want to install in your home directory (whatever you choose, never put spaces in the name). We will refer to this location as ${PREFIX} in the code examples below! | Now it is finally time to start compiling the Xfce desktop. Last remaining thing is to choose an installation location. Possible examples are ''/usr'', ''/usr/local'' and ''/opt/xfce4'' for a system-wide installation or ''$HOME/local'' if you want to install in your home directory (whatever you choose, never put spaces in the name). We will refer to this location as ${PREFIX} in the code examples below! |
| |
| If you install the package in a public prefix, for example ''/usr'' or ''/usr/local'', ''meson install'' will attempt to use sudo. This way, you will be asked for the system administrator password and will have write permissions to install in those locations. | If you install the package in a public prefix, for example ''/usr'' or ''/usr/local'', ''meson install'' will attempt to use sudo. This way, you will be asked for the system administrator password and will have write permissions to install in those locations. |
| | |
| | If you want to remove the installed files, you can do so with: |
| | |
| | cd build && ninja uninstall |
| |
| [[|Back To Top]] | [[|Back To Top]] |
| |
| sudo make install | sudo make install |
| | |
| | If you want to uninstall the installed files, you can do so by executing: |
| | |
| | sudo make uninstall |
| | |
| |
| ==== Understanding Debug levels ==== | ==== Understanding Debug levels ==== |
| ===== Finding additional Help ===== | ===== Finding additional Help ===== |
| |
| Hopefully everything went fine after reading this guide. If you still have problems or questions you can ask on the [[https://www.xfce.org/community#mail|Xfce users mailing list]], the [[https://forum.xfce.org|forum]] or ask distribution related questions on their forums and mailing lists. | Hopefully everything went fine after reading this guide. More advanced options to build and debug Xfce applications can be found [[https://wiki.xfce.org/building/advanced|here]]. |
| | |
| | If you still have problems or questions you can ask on the [[https://www.xfce.org/community#mail|Xfce users mailing list]], the [[https://forum.xfce.org|forum]] or ask distribution related questions on their forums and mailing lists. |
| |
| Have fun building Xfce! | Have fun building Xfce! |