{"id":29616632,"url":"https://github.com/crispinprojects/xfce4-wayland","last_synced_at":"2025-07-21T01:01:55.153Z","repository":{"id":305376112,"uuid":"1022309200","full_name":"crispinprojects/xfce4-wayland","owner":"crispinprojects","description":"Setting up and testing Xfce 4.20 with the labwc Wayland compositor","archived":false,"fork":false,"pushed_at":"2025-07-19T17:40:13.000Z","size":726,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-19T20:58:21.821Z","etag":null,"topics":["calendar","gtk4","labwc","wayland","wayland-compositor","xfce4"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crispinprojects.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-18T20:22:32.000Z","updated_at":"2025-07-19T17:40:17.000Z","dependencies_parsed_at":"2025-07-19T21:10:53.144Z","dependency_job_id":null,"html_url":"https://github.com/crispinprojects/xfce4-wayland","commit_stats":null,"previous_names":["crispinprojects/xfce4-wayland"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/crispinprojects/xfce4-wayland","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crispinprojects%2Fxfce4-wayland","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crispinprojects%2Fxfce4-wayland/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crispinprojects%2Fxfce4-wayland/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crispinprojects%2Fxfce4-wayland/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crispinprojects","download_url":"https://codeload.github.com/crispinprojects/xfce4-wayland/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crispinprojects%2Fxfce4-wayland/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266222295,"owners_count":23894992,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["calendar","gtk4","labwc","wayland","wayland-compositor","xfce4"],"created_at":"2025-07-21T01:01:44.190Z","updated_at":"2025-07-21T01:01:55.147Z","avatar_url":"https://github.com/crispinprojects.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Xfce4 Wayland (labwc)\n\n## Set Up \u0026 Testing Using Debian 13 Trixie\n\nXfce is a lightweight desktop environment and version 4.20 is in the Debian 13 Trixie package repositories. This github page shows how it can be setup using the labwc Wayland compositor.\n\nA screenshot of Xfce 4.20 Wayland is shown below. \n\n![](xfce4-wayland.png)\n\nNotice that the Window Manager (WM) is the Wayland compositor called labwc and Xfce 4.20 is being used.\n\n## Install Debian 13 Trixie\n\nInstall Debian Trixie (testing) with no desktop just the standard utilities using the net installer. The iso called ***debian-testing-amd64-netinst.iso*** can be downloaded from the web page below.\n\n```\nhttps://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/amd64/iso-cd/\n```\n\nWhen installing skip the root password section so that you are automatically added to the sudo group. Otherwise add yourself to the sudo group using the add user command. With a minimum install Debian 13 boots to a console terminal (tty1 by default). Here tty is short for teletype now more commonly called a terminal.\n\n## Console Font Size\n\nLog into the console terminal and increase font size by editing the console-setup file to that shown below. \n\n```\nsudo nano /etc/default/console-setup\n```\n\n```\nCHARMAP=\"UTF-8\"\nCODESET=\"Lat7\"\nFONTFACE=\"Terminus\"\nFONTSIZE=\"28x14\"\n```\n\nThen reboot\n```\nsudo reboot\n```\n\n## Install Xfce and Wayland\n\nInstall Xfce and the Wayland compositor called labwc. [Labwc](https://github.com/labwc/labwc) stands for Lab Wayland Compositor. It is a [wlroots](https://gitlab.freedesktop.org/wlroots) based window stacking compositor for Wayland inspired by [Openbox](https://openbox.org/).  To install Xfce4 and labwc use the terminal commands below.\n\n```\nsudo apt install xfce4\nsudo apt install labwc\nsudo apt install xfce4-goodies\n```\n\n\nThe [Xfce Wayland roadmap](https://wiki.xfce.org/releng/wayland_roadmap)  reveals that Xfce 4.20 provides preliminary Wayland support to core components. Various websites discuss using the following Sway components for added functionality.\n\n* swaybg: Wayland wallpaper utility\n* swayidle: Wayland idle management daemon \n* swaylock: Wayland screen locking utility \n\n\nThese are installed using the commands below. \n\n```\nsudo apt install swaybg\nsudo apt install swayidle\nsudo apt install swaylock\n```\n\nReboot using \n```\nsudo reboot\n```\n\n## Circumventing LightDM \n\nBy default the LightDM display manager is invoked to start Xfce in an X11 session. Log-in using your username and password and open a terminal. Run the command below to get Debian to always boot to console mode.\n\n```\nsudo systemctl set-default multi-user.target\n```\n\nReboot again and Debian boots to console mode.\n\nNow check that a Xfce4 Wayland session can be started using the command below.\n\n```\nstartxfce4 --wayland\n```\n\nYou should see a very basic Xfce Wayland session with no wallpaper just a black background.\n\nNote if you want to undo this change and get your Linux system to boot to the default graphical mode use the terminal command below.\n```\nsudo systemctl set-default graphical.target\n```\n\n## Boot to Wayland Session Automatically on Log-in\n\nUse the command \"ls -a\" to list hidden files in the home directory. This reveals the hidden ***.profile*** file. Add the following code lines to the bottom of the profile file so that when you log into Debian via the console a Wayland Xfce session is automatically invoked.\n\n```\ncase \"`tty`\" in\n(/dev/tty[1-4]) exec startxfce4 --wayland\nesac\n```\n\nReboot and log in via the console using your password and an Xfce Wayland session will be automatically started.\n\n## Setup Wayland Environment\n\nOpen the labwc environment file using nano as shown below.\n\n```\nnano ./config/xfce4/labwc/environment\n```\n\nSet the default keyboard. In my case the default is set to the GB keyboard as shown below.\n\n```\nXKB_DEFAULT_LAYOUT=gb\n```\n\nRestart labwc\n```\nlabwc -r\n```\n\nBefore rebooting create an empty file using the Mousepad text editor and save it as \"lock\" into the ./config/xfce4/labwc/ directory. This prevents Xfce automatically generating an fresh default environment file when it starts. \n\nNow reboot and check your keyboard.\n\n## Sway Utilities\n\nSway is a tiling window manager and Wayland compositor. It is designed to be a drop-in replacement for the i3 X11 window manager. \n\nVarious websites report that some Sway utilities can be used with a Xfce Wayland session. For example the Sway background utility called swaybg can be used to display a wallpaper.\n\nRun the following command in a terminal which uses swaybg to display the default Xfce wallpaper background.\n\n```\nswaybg -i /usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg\n```\n\nYou can created a startup script in the home directory to set the wallpaper. The script is shown below. You need to make sure that you put an \"\u0026\" at the end of the swaybg command to make it run in the background.\n\n```\n#!/bin/bash\necho \"startup script\"\nswaybg -i /usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg \u0026\n```\n\nThe chmod command can be used to make the startup script executable.\n\n```\nchmod +x startup.sh\n```\n\nRunning the startup script results in the default Wallpaper being displayed.\n\n```\n./startup.sh\n```\n\nThe startup script can be added to the \"Application Autostart\" list in the [Session and Startup](https://docs.xfce.org/xfce/xfce4-session/4.20/preferences?s[]=autostart) preferences window so that the default wallpaper is loaded when the computer is restarted.\n\nIt seems that with Xfce startup entries are populated from:\n\n~/.config/autostart (user-specific)\n\nand\n\n/etc/xdg/autostart/ (system-wide)\n\nXfce creates and adds a startup desktop file to the local ***~/.config/autostart*** directory as shown below. This runs after Xfce has set up the system and so there is a short delay when displaying the wallpaper.\n\n```\n[Desktop Entry]\nEncoding=UTF-8\nVersion=0.9.4\nType=Application\nName=Startup\nComment=Background\nExec=/home/user/startup.sh\nOnlyShowIn=XFCE;\nRunHook=0\nStartupNotify=false\nTerminal=false\nHidden=false\n```\n\n\nI also tried  adding an autostart file to the .config/xfce4/labwc directory with the swaybg command to set the wallpaper. Although the wallpaper is temporarily displayed you need to add a startup script.\n\nI am still experimenting with other Sway utilities and but not having a great deal of success. See [Manty's blog](http://blog.manty.net/2025/05/wayland-en-debian-13-trixie-usando-xfce.html) for more information on using Sway utilities with Xfce4.\n\nIt looks like we will need to wait until the Xfce team have their own versions of a Wayland wallpaper utility, Wayland idle management daemon and screen locking utility to avoid workarounds as discussed above.\n\n## Web Browser\n\nNo web browser was installed in the default Xfce Wayland session and so I installed Epiphany which is the default GNOME web browser and known to work with Wayland. Epiphany is also called GNOME Web.\n\n```\nsudo apt install epiphany-browser\n```\n\nSet this as the default browser using Applications-\u003eSettings-\u003eDefault Applications.\n\n## Sound\n\nTo get sound working install the Alsa utilities as shown below.\n\n```\nsudo apt install alsa-utils\n```\n\n## SQLite\n\nSQLite is a C library that provides a lightweight disk-based database that does not require a separate server and so is used by various Linux applications. It can be installed using the command below.\n\n```\nsudo apt install sqlite3\n```\n\n## Testing GTK4 Wayland Application\n\nTo verify that a GTK4 app can be run using a Xfce labwc Wayland session download the Talk Calendar binary and installer from [here](https://github.com/crispinprojects/talkcalendar). This uses Alsa audio and Sqlite3.\n\nThe screenshot below shows that the Talk Calendar executable runs. Talk Calendar can also be installed using the generic BASH script installer. The volume control works. \n\n![](talkcalendar-xfce-wayland.png)\n\n\n## Compiling GTK4 Wayland Application\n\nFinally to verify that GTK4 (Wayland) applications can be compiled download the source code for Talk Calendar from the [github page](https://github.com/crispinprojects/talkcalendar). This is an example of a GTK4 application which runs on other GTK4 Wayland desktops such as Debian 13 GNOME and the Ubuntu 24.04 Desktop.\n\nInstall the build-essential meta-package which contains a collection of essential software tools and libraries required for building and compiling applications from source code. This includes the GNU Compiler Collection (GCC) for compiling C and  C++  programs together with GNU Make build automation tool. \n\nInstall the libgtk-4-dev package which contains the header and development files for the GTK4 library and associated libraries such as GLib and Gio. These packages are installed as shown below together with Sqlite3 development library.\n\n```\nsudo apt install build-essential\nsudo apt install libgtk-4-dev\nsudo apt install libasound2-dev\nsudo apt install libsqlite3-dev\n```\n\n\nUse the Makefile to build the project by using the command below.\n\n```\nmake\n```\nCheck that the binary executable runs using the command below.\n\n```\n./talkcalendar\n```\n\nYes it all works using Xfce 4.20 and the labwc Wayland compositor. Absolutely Brilliant!\n\nAssuming that Talk Calendar has been installed using the BASH script then a desktop file as shown below can be added to the directory ./config/autostart to enable Talk Calendar to read out the date and any day events when the computer is switched on.\n\n```\n[Desktop Entry]\nEncoding=UTF-8\nVersion=0.4.8\nType=Application\nName=Talk Calendar\nComment=Talking Calendar\nExec=/usr/bin/talkcalendar/talkcalendar\nOnlyShowIn=XFCE;\nRunHook=0\nStartupNotify=false\nTerminal=false\nHidden=false\nIcon=\nPath=\n```\n\n## Not yet implemented\n\nXfce4 Wayland is under development and so some features of the normal Xfce session are not yet implemented. For example, only full screen screenshots can be taken when using Xfce 4.20 screenshot tool. However, Xfce4 is a capable lightweight Wayland desktop when coupled with labwc. \n\n## Acknowledgements\n\n[Xfce Desktop Environment](https://www.xfce.org/)\n\n[Xfce Wayland Development Roadmap](https://wiki.xfce.org/releng/wayland_roadmap)\n\n[labwc](https://github.com/labwc/labwc)\n\n[Wayland en Debian 13 (Trixie) usando xfce](http://blog.manty.net/2025/05/wayland-en-debian-13-trixie-usando-xfce.html) \n\n[Talk Calendar](https://github.com/crispinprojects/talkcalendar)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrispinprojects%2Fxfce4-wayland","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrispinprojects%2Fxfce4-wayland","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrispinprojects%2Fxfce4-wayland/lists"}