Give me a guide on how to install xfce4 with wayland support ( updated docs provided…
- User
Give me a guide on how to install xfce4 with wayland support ( updated docs provided below) on a barebones alpine linux install. \n\npreliminary support to Wayland to core components without losing X11 support. This doesn't mean that by the next major release an Xfce session on Wayland will offer all existing features, but we hope it will be minimally usable. We also intend to continue refining our applications to work acceptably on Wayland (those that already work or can be made to work with low effort).\n\nCheck the table in the component specific status section for details and labelled issues by group:\n\nCore\nApps\nPanel Plugins\nThunar Plugins\nLong Term Goals\nIt is not clear yet which Xfce release will target a complete Xfce Wayland transition (or if such a transition will happen at all). Below is a list of larger tasks which would need to be done in some way for such a transition to occur.\n\nSome of them are mostly agreed on by the Xfce devs.\n\nAgreed guidelines\nDo not depend on XWayland\nNo xsettings\nUse wlroots over libmutter\nkeep the possibility to run xfdesktop and xfce4-panel as separate components\nPrevent dependency on libgnome-desktop\nxfce4-panel and xfdesktop have been ported to Wayland assuming our compositor will be based on wlroots.\nThere is also an unofficial port of xfwm4 in progress.\nKeep X11 compatibility for the foreseeable future\nNvidia support to Wayland is still problematic, one more reason to keep X11 backward compatibility (nouveau driver usually is slower)\nWayland compositors which were written from scratch like Weston or sway will never run as a x11 window manager. But others which started as x11 window managers such as kwin or mutter still keep their x11 window management code\nFreeBSD has decent support for Wayland, OpenBSD is still working on supporting Wayland\nComponent specific status\nCore components\nThis table reflects the current status of what's released as 4.19 or git master.\n\nComponent\tWayland Support\tRemarks\nexo\tyes\t\nlibxfce4ui\tyes\tX11 code paths properly protected in libxfce4ui!110\nlibxfce4util\tyes\t\nthunar\tyes\t\nxfce4-appfinder\tyes\t\nxfce4-panel\tyes\tSee below\nxfce4-session\tyes\tSee xfce4-session!49 about limitations and how to use it\nxfce4-settings\tyes\tSee below\nxfconf\tyes\t\nxfdesktop\tyes\tSee below\nxfwm4\tno\t\nxfce4-power-manager\tyes\tSee below\ntumbler\tyes\t\ngarcon\tyes\t\nthunar-volman\tyes\t\nxfce4-dev-tools\tyes\t\nxfce4-panel\nPort to Wayland done: xfce4-panel!103\nWlroots-based, targeted compositors: Labwc, Wayfire\nOn Wayland the panel cannot use GtkSocket/GtkPlug any more to run plugins as external (separate processes). Initially, to advance in the porting of other features, it is enough to run them as internal (same process as the panel, so the crash of a plugin causes the panel to crash). If we want to get this back “natively” afterwards, it seems that we'll have to make the panel a Wayland compositor to some extent (Embedding Compositor, see also Allow embedding foreign wl_surfaces). For the moment the socket/plug structure has been reproduced on Wayland using the layer-shell protocol and D-Bus, which, although not native, has the merit of simplicity and of reusing what exists (more details here).\nxfdesktop\nPort to Wayland done: xfdesktop!43\nWorkspaces support needs an X11/Wayland abstraction, and could use the wlr-workspace-unstable-v1 protocol on Wayland.\nListing all toplevel windows (windowlist menu, window icons on desktop) needs an X11/Wayland abstraction, and could use the wlr-foreign-toplevel-management-unstable-v1 protocol on Wayland.\nxfwm4\nUnofficial port to Wayland in progress: counterpart to xsettings on Wayland has been added in xfce4-settings!104, with the minimum of modifications to make xfsettingd executable on Wayland.\nA port to Wayland of the display settings has been made in xfce4-settings!112, this time with a complete separation of the X11/Wayland code paths throughout xfce4-settings.\nOf the things whose implementation is specific to X11, only the display settings are suitable for porting to Wayland. There is currently no protocol for the rest (keyboard, mouse, workspaces, etc., are all internal to the compositor).\nxfce4-power-manager\nPort to Wayland done: xfce4-power-manager!54\nThe essential features of user inactivity monitoring and display power management have been restored via protocols ext-idle-notify and wlr-output-power-management.\nThere's no real counterpart to brightness management (the wlr-gamma-control protocol offers similar functionality in appearance, but in fact has nothing to do with power saving), but the existing Polkit implementation works independently of the windowing environment.\nEverything to do with keyboard handling (brightness keys, suspend key, etc.) is not restored, since only the compositor is currently able to manage this.\nApplications\nComponent\tWayland Support\tRemarks\nxfce4-terminal\tyes\tdrop-down requires layer-shell to work properly xfce4-terminal!72\nmousepad\tyes\t\nxfce4-notifyd\tyes\t\nxfdashboard\tno\tcrash on startup\nxfce4-taskmanager\tyes\tno libwnck (appicons, xfce4-taskmanager#75), no “identify window”, no systray icon (xfce4-taskmanager#78)\nxfce4-mixer\tyes\t\nristretto\tyes\t\ncatfish\tyes\t\nxfburn\tyes\t\nparole\tyes\tno systray icon (parole#126)\nxfce4-screenshooter\tyes\tpartial, see below\nxfce4-screensaver\tno\tPort to Wayland is essentially done xfce4-screensaver!28\nBut this requires libwlembed, which is still experimental and has no release at this stage (2024-02-04)\nxfmpc\tyes\t\nxfce4-volumed-pulse\tno\tkey bindings fail\nxfce4-dict\tyes\t\ngigolo\tyes\t\nxfce4-panel-profiles\tyes\t\nxfce4-notifyd\nGTK doesn't appear to do anything special if you set a window to be override-redirect or always-on-top.\n\nxfce4-screenshooter\nWayland does not specify a native interface for the compositor for taking screenshots and it looks like it never will. We decided to use wlroots' screencopy protocol because that's probably what our compositor will support.\n\nAt the moment only Entire Screen screenshots are supported (xfce4-screenshooter!52), Rectangle Selection will be implemented next but Active Window is going to be much trickier, perhaps we'll need a custom protocol for our compositor to take care of that.\n\nIf we want to support compositors that don't implement the protocol above, we have to add DBus Support for org.freedesktop.portal.Screenshot. This however is not planned and it's unlikely we'll ever fully support other compositors.\n\nThunar Plugins\nComponent\tWayland Support\tRemarks\nthunar-archive-plugin\tyes\t\nthunar-media-tags-plugin\tyes\t\nthunar-shares-plugin\tyes\t\nthunar-vcs-plugin\tyes\t\nPanel Plugins\nSee details in the xfce4-panel section about how to run external plugins on Wayland. At first, “yes” below simply means “doesn't crash”, even after some elementary manipulations (eventually). It does not mean that everything works like on X11.\n\nComponent\tWayland Support\tRemarks\nxfce4-battery-plugin\tyes\t\nxfce4-calculator-plugin\tyes\tinsensitive text entry\nxfce4-clipman-plugin\tyes\tPorted via wlr-data-control\nTODO: use status notifier instead of status icon\nxfce4-cpufreq-plugin\tyes\t\nxfce4-cpugraph-plugin\tyes\t\nxfce4-diskperf-plugin\tyes\t\nxfce4-docklike-plugin\tyes\tRequires libxfce4windowing 4.19.3\nxfce4-embed-plugin\tno\tunmaintained, gtk2\nxfce4-eyes-plugin\tyes\tthe pointer is not followed outside the panel\nxfce4-fsguard-plugin\tyes\t\nxfce4-generic-slider\tyes\t\nxfce4-genmon-plugin\tyes\t\nxfce4-indicator-plugin\tyes\t\nxfce4-mailwatch-plugin\tyes\t\nxfce4-mount-plugin\tyes\t\nxfce4-mpc-plugin\tyes\tthough probably relying on non working stuff (?)\nxfce4-netload-plugin\tyes\t\nxfce4-notes-plugin\tyes\t\nxfce4-places-plugin\tyes\ticon issue, critical errors when removing the plugin\nxfce4-pulseaudio-plugin\tyes\twith warnings (needs to be rechecked)\nxfce4-sample-plugin\tyes\t\nxfce4-sensors-plugin\tyes\t\nxfce4-smartbookmark-plugin\tyes\tinsensitive text entry\nxfce4-stopwatch-plugin\tyes\t\nxfce4-systemload-plugin\tyes\t\nxfce4-time-out-plugin\tyes\tcoredumps on pause and critical errors when removing/re-adding the plugin\nxfce4-timer-plugin\tyes\t\nxfce4-verve-plugin\tyes\tinsensitive text entry\nxfce4-wavelan-plugin\tyes\t\nxfce4-weather-plugin\tyes\t\nxfce4-whiskermenu-plugin\tyes\ticons issue, menu window floating\nxfce4-windowck-plugin\tno\tdoes not work (Libwnck)\nxfce4-xkb-plugin\tno\tcrashes (Libwnck)\nTesting\nInfo about testing specific components.\n\nRegarding the version to test: master, or latest dev release would be best, though latest stable release as well will do. Currently there is not much difference for most components. If you don't test master, best add info on which version you tested.\n\nIf you run a NVidia GPU, you will need to use the “Nouveau” driver for testing, Since the proprietary NVidia driver does not provide Wayland support. (Though some things might work in some cases)\n\nNative Wayland\nInstall Weston with your distribution package manager (if a Wlroots-based compositor is required, as for xfce4-panel, see this MR for more information)\nMaybe set a minimal configuration, for example\n~/.config/weston.ini\n[keyboard]\nkeymap_layout=fr\nnumlock-on=true\nRun weston in a terminal emulator, or better: in a tty with a different user, or by logging out of the X11 session first (the compositor may not have quite the same behavior, and this avoids interactions with the current environment)\nIf run in a terminal emulator, make sure at least the component to test isn't already running in your X11 session (e.g Thunar as daemon)\nOpen a terminal in the Weston session and start the component which is to be tested\nFor Wayfire you need to run startxfce4 --wayland from a tty (or the equivalent via a Display Manager), but before that add the following configuration:\n~/.config/wayfire.ini\n[autostart]\nsession = xfce4-session\nOk now review the following solutions to the problem and then give me a new guide on a fresh install of alpine-linux-virt-arm64 \n\napk add py3-gobject3\n\n\n# Complete Guide to Setting Up a Minimal XFCE Desktop on Alpine Linux with Wayland\n\nWelcome to the comprehensive guide on setting up a minimal XFCE desktop environment on Alpine Linux with Wayland support. This guide will walk you through the process step-by-step, ensuring you have a functional and efficient desktop environment.\n\n## Table of Contents\n\n1. Introduction\n2. Prerequisites\n3. Creating Custom Setup Scripts\n4. Modifying the Setup Scripts\n5. Configuring LightDM for Wayland\n6. Creating a User and Adding to Necessary Groups\n7. Enabling and Starting LightDM\n8. Verifying the XFCE Session Under Wayland\n9. Troubleshooting Tips\n10. Conclusion\n\n---\n\n## Introduction\n\nAs of October 2023, XFCE does not natively support Wayland. However, we can set up a minimal XFCE desktop environment on Alpine Linux with Wayland support using XWayland. This guide will help you achieve this by creating custom setup scripts and configuring the necessary components.\n\n---\n\n## Prerequisites\n\nBefore we begin, ensure you have the following:\n\n- An Alpine Linux installation.\n- Basic knowledge of shell scripting and Linux system administration.\n- Root or sudo access to your Alpine Linux system.\n\n---\n\n## Creating Custom Setup Scripts\n\nTo avoid modifying the original setup scripts, we will create custom versions. This ensures a safer and more maintainable approach.\n\n### Step 1: Create Custom Setup Scripts\n\nsh\ncp /sbin/setup-desktop /sbin/setup-desktop-wayland\nchmod +x /sbin/setup-desktop-wayland\n\ncp /usr/bin/startxfce4 /usr/bin/startxfce4-wayland\nchmod +x /usr/bin/startxfce4-wayland\n\n\n---\n\n## Modifying the Setup Scripts\n\n### Step 2: Edit the Custom Setup Script\n\nOpen the setup-desktop-wayland script with your preferred text editor:\n\nsh\nnano /sbin/setup-desktop-wayland\n\n\n### Step 3: Modify the Script\n\nReplace the contents with the following:\n\nsh\n#!/bin/sh\n\nPREFIX=@PREFIX@\n: PREFIX/lib}\n. "1\n}\n\nwhile getopts "h" opt; do\n case ((# -gt 1 ]; then\n usage "1" >&2\nfi\n\nde="# -eq 1 ] && ! isin "valid_desktops; then\n echo "de" resp"\ndone\n\ncase "{BROWSER:-firefox} "(apk info --quiet --depends gnome gnome-apps-core)\n rc-update add gdm\n rc-update add elogind\n ;;\n plasma)\n # KDE Plasma with Wayland support\n setup-wayland-base @"\n rc-update add dbus\n rc-update add sddm\n rc-update add elogind\n ;;\n xfce)\n echo "Warning: XFCE does not have full Wayland support and relies on X11 (Xorg)."\n ask_yesno "Do you want to install XFCE with Xorg (X11)? [Y/n]" "Y"\n if yesno "{BROWSER:-firefox} lightdm lightdm-gtk-greeter polkit dbus "{BROWSER:-firefox} consolekit2 gvfs lightdm lightdm-gtk-greeter polkit dbus dbus-x11 font-dejavu "{BROWSER:-firefox} dmenu font-dejavu foot grim i3status sway swayidle swaylock util-linux-login wl-clipboard "(awk -F: '{if (3 >= 1000) print ROOT"/etc/passwd 2>/dev/null)\nif [ -z "#" -eq 0 ]; then\n OPTS=""\n for OPT in "OPT" = "--help" ]; then\n echo\n echo "startxfce4 [OPTIONS...]"\n echo\n echo "Options:"\n echo " --help Show help options"\n exit 0\n else\n OPTS="OPT"\n fi\n done\n\n CLIENTRC=""\nfi\n\nif [ -z "HOME/.config/xfce4/"\nelse\n BASEDIR="XDG_DATA_DIRS" ]; then\n XDG_DATA_DIRS="/usr/local/share:/usr/share"\nelif [ "XDG_DATA_DIRS:/usr/share"\nfi\nexport XDG_DATA_DIRS\n\nif [ -z "{XDG_CONFIG_DIRS##:}" != "/etc/xdg" ]; then\n XDG_CONFIG_DIRS="WAYLAND_DISPLAY" ]; then\n echo "BASEDIR/xinitrc" ]; then\n exec "BASEDIR/xinitrc" "HOME/.xfce4/xinitrc" ]; then\n mkdir -p "HOME/.xfce4/xinitrc" "prog" "CLIENTRC"\n else\n exec "CLIENTRC"\n fi\nelse\n echo "WAYLAND_DISPLAY"\n # Start XFCE4 session directly\n exec /usr/bin/xfce4-session "XDG_SESSION_TYPE\n\n\nThis should output wayland. If it doesn't, further troubleshooting is needed to ensure Wayland is correctly configured.\n\n---\n\n## Troubleshooting Tips\n\n- Check Logs: If the XFCE session fails to start, check LightDM and system logs for errors.\n\nsh\ntail -f /var/log/lightdm/lightdm.log\ntail -f /var/log/syslog\n\n\n- Wayland Support Limitations: XFCE's native Wayland support is limited. Some components might still rely on X11. Ensure that xwayland is installed to handle these dependencies.\n\n- Alternative Compositors: If you encounter persistent issues, consider using a compositor with better Wayland support or a different desktop environment that natively supports Wayland, such as Sway.\n\n---\n\n## Conclusion\n\nBy following this guide, you should have a more minimal XFCE installation running on Wayland without Firefox on Alpine Linux. Keep in mind that XFCE's Wayland support isn't as mature as some other desktop environments. For a stable and functional desktop environment on Wayland without Xorg, it's recommended to use a desktop environment that fully supports Wayland.\n\n### Final Recommendation\n\n- For XFCE Lovers: Install XFCE with Xorg to enjoy a stable and fully functional desktop environment.\n- For Wayland Enthusiasts: Choose GNOME, KDE Plasma, or Sway, which offer mature Wayland support and provide a smooth experience without relying on Xorg.\n- Stay Informed: Keep an eye on the development of XFCE, as Wayland support may improve in future releases.\n\n---\n\nIf you need assistance with the installation process or have further questions about configuring your Alpine Linux system, feel free to reach out! 🚀\n\n\n\n\nActual o1 - instructions \n\n\n\n\nAnalysis of the Solutions ### Your Solution (Initial Submission) 1. Wayland Focus: You replaced setup-xorg-base with setup-wayland-base in an attempt to install XFCE without X11 (Xorg), aiming for a more minimal setup using Wayland. 2. XFCE without X11: You tried to remove X11-specific components like lightdm, acknowledging that they depend on Xorg. However, XFCE itself relies on X11, and attempting to run it without Xorg leads to significant issues. 3. Session Management: Including elogind for session management is good, as it helps with user sessions and permissions in Wayland environments. 4. XWayland Dependency: Adding xwayland and wlroots is a sensible approach to run X11 applications in a Wayland session, but it doesn't resolve the core issue of XFCE's dependency on Xorg. ### Modified Solution (Your Review) 1. Deeper Customization: You expanded on the idea by suggesting the use of compositors like sway or weston to handle Wayland sessions since XFCE isn't fully Wayland-native. This is important to provide a functioning graphical environment. 2. Manual XFCE Startup: You mentioned that users might need to manually configure how XFCE starts, possibly using custom startup scripts or a Wayland compositor. This level of customization acknowledges the current limitations of XFCE on Wayland. 3. Service Management: Ensuring services like elogind are properly added to rc-update is crucial for session and permission handling. Issues in Both Approaches 1. XFCE Wayland Limitations: Neither solution directly addresses the fundamental issue that XFCE does not natively support Wayland as of October 2023. Both solutions attempt to run XFCE on Wayland, but since XFCE relies on X11, this leads to a non-functional or severely limited desktop environment. 2. No Native Wayland Display Manager: Both solutions either remove lightdm or don't provide a Wayland-compatible display manager like greetd or sddm. Without a suitable display manager, users would have to start their sessions manually from the terminal, which is not user-friendly. 3. Compositor Dependency: Since XFCE lacks native Wayland support, relying on a compositor like sway without proper integration doesn't fully address the problem. Both solutions should have either provided explicit steps to integrate XFCE with a Wayland compositor or recommended using an alternative desktop environment with mature Wayland support. --- Who Did It Better and Why The Modified Solution is better because: - Acknowledgment of Limitations: It explicitly recognizes that XFCE lacks native Wayland support and discusses the implications. - Alternative Recommendations: It suggests using desktop environments like GNOME or KDE Plasma, which have better Wayland support, providing users with viable options. - Display Manager Inclusion: By proposing the installation of a Wayland-compatible display manager (greetd), it ensures a smoother user experience without manual session startups. - Comprehensive Approach: It combines the strengths of both solutions, addresses their shortcomings, and offers practical advice for users seeking a Wayland environment. --- A Better Solution After Reviewing Mistakes Here's an improved solution that combines the strengths of both approaches and addresses their mistakes:\n\n#!/bin/sh\n\n# Improved setup-desktop script for Alpine Linux\n\nPREFIX=@PREFIX@\n: PREFIX/lib}\n. "1\n}\n\nwhile getopts "h" opt; do\n case ((# -gt 1 ]; then\n usage "1" >&2\nfi\n\nde="# -eq 1 ] && ! isin "valid_desktops; then\n echo "de" resp"\ndone\n\ncase "{BROWSER:-firefox} "(apk info --quiet --depends gnome gnome-apps-core)\n rc-update add gdm\n rc-update add elogind\n ;;\n plasma)\n # KDE Plasma with Wayland support\n setup-wayland-base @"\n rc-update add dbus\n rc-update add sddm\n rc-update add elogind\n ;;\n xfce)\n echo "Warning: XFCE does not have full Wayland support and relies on X11 (Xorg)."\n ask_yesno "Do you want to install XFCE with Xorg (X11)? [Y/n]" "Y"\n if yesno "{BROWSER:-firefox} lightdm lightdm-gtk-greeter polkit dbus "{BROWSER:-firefox} consolekit2 gvfs lightdm lightdm-gtk-greeter polkit dbus dbus-x11 font-dejavu "{BROWSER:-firefox} dmenu font-dejavu foot grim # We can add xfce4-terminal if desired\n # xfce4-terminal i3status sway swayidle swaylock util-linux-login wl-clipboard "(awk -F: '{if (3 >= 1000) print ROOT"/etc/passwd 2>/dev/null)\nif [ -z "{LIBDIR=LIBDIR/libalpine.sh"\n\nusage() {\n cat <<-EOF\n usage: setup-desktop [-h] [gnome|plasma|xfce|mate|sway]\n\n Install a standard desktop\n\n options:\n -h Show this help\n\n EOF\n exit opt in\n h) usage 0;;\n '?') usage "1" >&2;;\n esac\ndone\nshift OPTIND - 1))\n\nif [ # -eq 0 ]; then\n users=3<65000 && 1}' "users" ]; then\n setup-user -g "audio,video,netdev"\n fi\nfi\n\nde="# -eq 1 ] && ! isin "valid_desktops; then\n echo "de" resp"\ndone\n\ncase "@"\n rc-update add dbus\n rc-update add lightdm\n ;;\n xfce)\n setup-wayland-base xfce4 consolekit2 gvfs lightdm lightdm-gtk-greeter polkit xfce4-terminal "(apk info --quiet --depends gnome gnome-apps-core) "@"\n rc-update add dbus\n rc-update add sddm\n ;;\n sway)\n setup-wayland-base dmenu font-dejavu foot grim i3status sway swayidle swaylock util-linux-login wl-clipboard xwayland "(awk -F: '{if (3 >= 1000) print ROOT"/etc/passwd 2>/dev/null)\nif [ -z "{BROWSER:-firefox} from the package list under the xfce case to prevent Firefox from being installed.\n- Replaced setup-xorg-base with setup-wayland-base: Changed setup-xorg-base to setup-wayland-base in the xfce case to attempt a Wayland-based setup.\n- Retained Necessary Packages: Kept essential packages like xfce4, consolekit2, gvfs, lightdm, polkit, and xfce4-terminal.\n\n---\n\n### Modified startxfce4 Script\n\nHere's the modified startxfce4 script, adapted to avoid starting xinit and to attempt starting XFCE without Xorg:\n\n#!/bin/sh\n\nif [ "@"; do\n if [ "OPTS OPTS"\nelse\n CLIENTRC="XDG_CONFIG_HOME" ]; then\n BASEDIR="XDG_CONFIG_HOME/xfce4"\nfi\n\nif [ -z "{XDG_DATA_DIRS##:}" != "/usr/share" ]; then\n XDG_DATA_DIRS="XDG_CONFIG_DIRS" ]; then\n XDG_CONFIG_DIRS="/etc/xdg"\nelif [ "XDG_CONFIG_DIRS:/etc/xdg"\nfi\nexport XDG_CONFIG_DIRS\n\nif [ -z "0: Starting XFCE4 in Wayland session"\n prog="/usr/bin/xfce4-session"\n\n if [ -f "prog" "CLIENTRC"\n elif [ -f "BASEDIR"\n cp "BASEDIR/"\n exec "BASEDIR/xinitrc" "prog" "/etc/xdg/xfce4/xinitrc" "0: Wayland display detected: CLIENTRC"\nfi\n\n\nModifications Made:\n\n- Removed Xinit References: Eliminated references to xinit and adjusted the script to attempt starting xfce4-session directly.\n- Added Wayland Detection: Added checks for WAYLAND_DISPLAY to determine if running in a Wayland session.\n- Adjusted Environment Variables: Ensured that XDG_DATA_DIRS and XDG_CONFIG_DIRS are set appropriately.\n\n---\n\nPlease Note:\n\n- XFCE's Wayland Support: As of October 2023, XFCE does not have full native support for Wayland. Therefore, attempting to run XFCE without Xorg may not result in a functional desktop environment.\n\n- XWayland Requirement: Even if you attempt to run XFCE in a Wayland session, it will rely on XWayland, which is a compatibility layer that allows X11 applications to run in Wayland. This still requires Xorg components.\n\n- Alternative Desktop Environments: If you require a desktop environment that runs natively on Wayland without Xorg, consider using Sway or GNOME, as they have better support for Wayland.\n\n---\n\nConclusion\n\nWhile the scripts above have been modified to reflect your request, please be aware that XFCE may not work as expected without Xorg due to its reliance on X11. For a stable and functional desktop environment on Wayland without Xorg, it's recommended to use a desktop environment that fully supports Wayland.\n\nIf you have any further questions or need assistance with alternative solutions\n\n\n\n\no1-mini solution To achieve a minimal installation of XFCE on Alpine Linux using Wayland instead of X11, and to exclude Firefox from the installation, you'll need to make several modifications to your existing scripts. Here's a comprehensive guide to help you accomplish this: ### 1. Modify the setup-desktop Script The setup-desktop script is responsible for installing the desktop environment and its dependencies. By default, for XFCE, it uses setup-xorg-base, which installs X11/Xorg packages. To switch to Wayland and exclude Firefox, follow these steps: #### a. Create a Custom Setup Script Instead of modifying the original setup-desktop, it's safer to create a custom version to prevent overwriting original scripts. Let's name it setup-desktop-wayland.\n\ncp /sbin/setup-desktop /sbin/setup-desktop-wayland\nchmod +x /sbin/setup-desktop-wayland\n\n\n#### b. Edit the Custom Script\n\nOpen the setup-desktop-wayland script with your preferred text editor:\n\nnano /sbin/setup-desktop-wayland\n\n\n#### c. Locate and Modify the XFCE Section\n\nFind the section handling the xfce case. It should look something like this:\n\nxfce)\n setup-xorg-base xfce4 @"\n rc-update add lightdm\n ;;\n\n\nModify it to use setup-wayland-base and exclude Firefox:\n\nxfce)\n setup-wayland-base xfce4 consolekit2 gvfs lightdm lightdm-gtk-greeter polkit xfce4-terminal xwayland "{BROWSER:-firefox}, Firefox won't be installed.\n- Added xwayland: XFCE doesn’t have native Wayland support, so xwayland is necessary to run X11 applications within a Wayland session.\n\n#### d. Save and Exit\n\nAfter making the changes, save the file and exit the editor (Ctrl + X, then Y, and Enter for nano).\n\n### 2. Ensure Necessary Wayland Packages Are Installed\n\nWhile setup-wayland-base installs essential Wayland components, ensure that additional packages required for XFCE and Wayland integration are present.\n\napk add xwayland\n\n\n### 3. Modify the startxfce4 Script\n\nThe startxfce4 script is designed to start an XFCE session, typically leveraging X11. Since we aim to use Wayland, we'll simplify this script to launch the XFCE session directly without invoking xinit.\n\n#### a. Create a Custom startxfce4 Script\n\nIt's advisable to create a custom version to avoid disrupting the original. Let's name it startxfce4-wayland.\n\ncp /usr/bin/startxfce4 /usr/bin/startxfce4-wayland\nchmod +x /usr/bin/startxfce4-wayland\n\n\n#### b. Edit the Custom Script\n\nOpen the startxfce4-wayland script:\n\nnano /usr/bin/startxfce4-wayland\n\n\n#### c. Simplify the Script\n\nReplace the contents with a simplified version that starts the XFCE session directly:\n\n#!/bin/sh\n\n# Start XFCE session directly under Wayland\nexec dbus-run-session -- xfce4-session\n\n\nExplanation:\n\n- dbus-run-session: Ensures a D-Bus session is available, which is necessary for many desktop environment components.\n- xfce4-session: Starts the XFCE session without invoking X11.\n\n#### d. Save and Exit\n\nSave the changes and exit the editor.\n\n### 4. Configure LightDM for Wayland\n\nLightDM is your display manager, and it needs to be configured to handle Wayland sessions properly.\n\n#### a. Edit LightDM Configuration\n\nOpen the LightDM configuration file:\n\nnano /etc/lightdm/lightdm.conf\n\n\n#### b. Set the Session to Use Wayland\n\nAdd or modify the [Seat:] section to specify the session and ensure Wayland is used:\n\n[Seat:*]\nuser-session=xfce\ngreeter-session=lightdm-gtk-greeter\n# Enable Wayland\nwayland=true\n\n\nNote: Ensure that the lightdm-gtk-greeter supports Wayland. If not, you might need to use a different greeter that does.\n\n#### c. Save and Exit\n\nSave the changes and exit the editor.\n\n### 5. Create a User and Add to Necessary Groups\n\nIf you haven't already created a user, do so and add them to the required groups:\n\nsetup-user -g "audio,video,netdev"\n\n\nFollow the prompts to set up the user account.\n\n### 6. Enable and Start LightDM\n\nEnsure that LightDM is enabled to start at boot and start the service immediately:\n\nrc-update add lightdm\nrc-service lightdm start\n\n\n### 7. Verify the XFCE Session Under Wayland\n\n- Log In: Use LightDM to log into the XFCE session.\n- Check Wayland Session: Once logged in, verify that you're running under Wayland. You can do this by opening a terminal and running:\n\n echo $XDG_SESSION_TYPE\n\n\n This should output wayland. If it doesn't, further troubleshooting is needed to ensure Wayland is correctly configured.\n\n### 8. Troubleshooting Tips\n\n- Check Logs: If the XFCE session fails to start, check LightDM and system logs for errors.\n\n tail -f /var/log/lightdm/lightdm.log\n tail -f /var/log/syslog\n\n\n- Wayland Support Limitations: XFCE's native Wayland support is limited. Some components might still rely on X11. Ensure that xwayland is installed to handle these dependencies.\n\n- Alternative Compositors: If you encounter persistent issues, consider using a compositor with better Wayland support or a different desktop environment that natively supports Wayland, such as Sway.\n\n### 9. Final Thoughts\n\nSwitching XFCE to use Wayland on Alpine Linux is a commendable goal for a minimal and modern desktop setup. However, be aware that XFCE's Wayland support isn't as mature as some other desktop environments. You might encounter limitations or require additional tweaks to get everything working smoothly. Always ensure you have backups or recovery options in case you need to revert changes.\n\n---\n\nSummary of Changes:\n\n1. Custom setup-desktop-wayland Script:\n - Switched from setup-xorg-base to setup-wayland-base.\n - Removed Firefox from the package list.\n - Added xwayland to support X11 applications.\n\n2. Custom startxfce4-wayland Script:\n - Simplified to start xfce4-session directly under Wayland using dbus-run-session.\n\n3. LightDM Configuration:\n - Enabled Wayland usage in LightDM.\n\n4. Package Installation:\n - Ensured all necessary Wayland-related packages are installed.\n\nBy following these steps, you should have a more minimal XFCE installation running on Wayland without Firefox on Alpine Linux.\nXfce Wayland Development Roadmap\nThis document is intended for Xfce developers to keep track of Wayland development. This is a work in progress and does not imply any future implementation commitments.\nOverall Plans\nLong Term Goals\nComponent specific status\nCore components\nApplications\nThunar Plugins\nPanel Plugins\nTesting\nLinks\nOverall Plans\nFor Xfce 4.20, the plan is, to add preliminary support to Wayland to core components without losing X11 support. This doesn't mean that by the next major release an Xfce session on Wayland will offer all existing features, but we hope it will be minimally usable. We also intend to continue refining our applications to work acceptably on Wayland (those that already work or can be made to work with low effort).\n\nCheck the table in the component specific status section for details and labelled issues by group:\n\nCore\nApps\nPanel Plugins\nThunar Plugins\nLong Term Goals\nIt is not clear yet which Xfce release will target a complete Xfce Wayland transition (or if such a transition will happen at all). Below is a list of larger tasks which would need to be done in some way for such a transition to occur.\n\nSome of them are mostly agreed on by the Xfce devs.\n\nAgreed guidelines\nDo not depend on XWayland\nNo xsettings\nUse wlroots over libmutter\nkeep the possibility to run xfdesktop and xfce4-panel as separate components\nPrevent dependency on libgnome-desktop\nxfce4-panel and xfdesktop have been ported to Wayland assuming our compositor will be based on wlroots.\nThere is also an unofficial port of xfwm4 in progress.\nKeep X11 compatibility for the foreseeable future\nNvidia support to Wayland is still problematic, one more reason to keep X11 backward compatibility (nouveau driver usually is slower)\nWayland compositors which were written from scratch like Weston or sway will never run as a x11 window manager. But others which started as x11 window managers such as kwin or mutter still keep their x11 window management code\nFreeBSD has decent support for Wayland, OpenBSD is still working on supporting Wayland\nComponent specific status\nCore components\nThis table reflects the current status of what's released as 4.19 or git master.\n\nComponent\tWayland Support\tRemarks\nexo\tyes\t\nlibxfce4ui\tyes\tX11 code paths properly protected in libxfce4ui!110\nlibxfce4util\tyes\t\nthunar\tyes\t\nxfce4-appfinder\tyes\t\nxfce4-panel\tyes\tSee below\nxfce4-session\tyes\tSee xfce4-session!49 about limitations and how to use it\nxfce4-settings\tyes\tSee below\nxfconf\tyes\t\nxfdesktop\tyes\tSee below\nxfwm4\tno\t\nxfce4-power-manager\tyes\tSee below\ntumbler\tyes\t\ngarcon\tyes\t\nthunar-volman\tyes\t\nxfce4-dev-tools\tyes\t\nxfce4-panel\nPort to Wayland done: xfce4-panel!103\nWlroots-based, targeted compositors: Labwc, Wayfire\nOn Wayland the panel cannot use GtkSocket/GtkPlug any more to run plugins as external (separate processes). Initially, to advance in the porting of other features, it is enough to run them as internal (same process as the panel, so the crash of a plugin causes the panel to crash). If we want to get this back “natively” afterwards, it seems that we'll have to make the panel a Wayland compositor to some extent (Embedding Compositor, see also Allow embedding foreign wl_surfaces). For the moment the socket/plug structure has been reproduced on Wayland using the layer-shell protocol and D-Bus, which, although not native, has the merit of simplicity and of reusing what exists (more details here).\nxfdesktop\nPort to Wayland done: xfdesktop!43\nWorkspaces support needs an X11/Wayland abstraction, and could use the wlr-workspace-unstable-v1 protocol on Wayland.\nListing all toplevel windows (windowlist menu, window icons on desktop) needs an X11/Wayland abstraction, and could use the wlr-foreign-toplevel-management-unstable-v1 protocol on Wayland.\nxfwm4\nUnofficial port to Wayland in progress: counterpart to xsettings on Wayland has been added in xfce4-settings!104, with the minimum of modifications to make xfsettingd executable on Wayland.\nA port to Wayland of the display settings has been made in xfce4-settings!112, this time with a complete separation of the X11/Wayland code paths throughout xfce4-settings.\nOf the things whose implementation is specific to X11, only the display settings are suitable for porting to Wayland. There is currently no protocol for the rest (keyboard, mouse, workspaces, etc., are all internal to the compositor).\nxfce4-power-manager\nPort to Wayland done: xfce4-power-manager!54\nThe essential features of user inactivity monitoring and display power management have been restored via protocols ext-idle-notify and wlr-output-power-management.\nThere's no real counterpart to brightness management (the wlr-gamma-control protocol offers similar functionality in appearance, but in fact has nothing to do with power saving), but the existing Polkit implementation works independently of the windowing environment.\nEverything to do with keyboard handling (brightness keys, suspend key, etc.) is not restored, since only the compositor is currently able to manage this.\nApplications\nComponent\tWayland Support\tRemarks\nxfce4-terminal\tyes\tdrop-down requires layer-shell to work properly xfce4-terminal!72\nmousepad\tyes\t\nxfce4-notifyd\tyes\t\nxfdashboard\tno\tcrash on startup\nxfce4-taskmanager\tyes\tno libwnck (appicons, xfce4-taskmanager#75), no “identify window”, no systray icon (xfce4-taskmanager#78)\nxfce4-mixer\tyes\t\nristretto\tyes\t\ncatfish\tyes\t\nxfburn\tyes\t\nparole\tyes\tno systray icon (parole#126)\nxfce4-screenshooter\tyes\tpartial, see below\nxfce4-screensaver\tno\tPort to Wayland is essentially done xfce4-screensaver!28\nBut this requires libwlembed, which is still experimental and has no release at this stage (2024-02-04)\nxfmpc\tyes\t\nxfce4-volumed-pulse\tno\tkey bindings fail\nxfce4-dict\tyes\t\ngigolo\tyes\t\nxfce4-panel-profiles\tyes\t\nxfce4-notifyd\nGTK doesn't appear to do anything special if you set a window to be override-redirect or always-on-top.\n\nxfce4-screenshooter\nWayland does not specify a native interface for the compositor for taking screenshots and it looks like it never will. We decided to use wlroots' screencopy protocol because that's probably what our compositor will support.\n\nAt the moment only Entire Screen screenshots are supported (xfce4-screenshooter!52), Rectangle Selection will be implemented next but Active Window is going to be much trickier, perhaps we'll need a custom protocol for our compositor to take care of that.\n\nIf we want to support compositors that don't implement the protocol above, we have to add DBus Support for org.freedesktop.portal.Screenshot. This however is not planned and it's unlikely we'll ever fully support other compositors.\n\nThunar Plugins\nComponent\tWayland Support\tRemarks\nthunar-archive-plugin\tyes\t\nthunar-media-tags-plugin\tyes\t\nthunar-shares-plugin\tyes\t\nthunar-vcs-plugin\tyes\t\nPanel Plugins\nSee details in the xfce4-panel section about how to run external plugins on Wayland. At first, “yes” below simply means “doesn't crash”, even after some elementary manipulations (eventually). It does not mean that everything works like on X11.\n\nComponent\tWayland Support\tRemarks\nxfce4-battery-plugin\tyes\t\nxfce4-calculator-plugin\tyes\tinsensitive text entry\nxfce4-clipman-plugin\tyes\tPorted via wlr-data-control\nTODO: use status notifier instead of status icon\nxfce4-cpufreq-plugin\tyes\t\nxfce4-cpugraph-plugin\tyes\t\nxfce4-diskperf-plugin\tyes\t\nxfce4-docklike-plugin\tyes\tRequires libxfce4windowing 4.19.3\nxfce4-embed-plugin\tno\tunmaintained, gtk2\nxfce4-eyes-plugin\tyes\tthe pointer is not followed outside the panel\nxfce4-fsguard-plugin\tyes\t\nxfce4-generic-slider\tyes\t\nxfce4-genmon-plugin\tyes\t\nxfce4-indicator-plugin\tyes\t\nxfce4-mailwatch-plugin\tyes\t\nxfce4-mount-plugin\tyes\t\nxfce4-mpc-plugin\tyes\tthough probably relying on non working stuff (?)\nxfce4-netload-plugin\tyes\t\nxfce4-notes-plugin\tyes\t\nxfce4-places-plugin\tyes\ticon issue, critical errors when removing the plugin\nxfce4-pulseaudio-plugin\tyes\twith warnings (needs to be rechecked)\nxfce4-sample-plugin\tyes\t\nxfce4-sensors-plugin\tyes\t\nxfce4-smartbookmark-plugin\tyes\tinsensitive text entry\nxfce4-stopwatch-plugin\tyes\t\nxfce4-systemload-plugin\tyes\t\nxfce4-time-out-plugin\tyes\tcoredumps on pause and critical errors when removing/re-adding the plugin\nxfce4-timer-plugin\tyes\t\nxfce4-verve-plugin\tyes\tinsensitive text entry\nxfce4-wavelan-plugin\tyes\t\nxfce4-weather-plugin\tyes\t\nxfce4-whiskermenu-plugin\tyes\ticons issue, menu window floating\nxfce4-windowck-plugin\tno\tdoes not work (Libwnck)\nxfce4-xkb-plugin\tno\tcrashes (Libwnck)\nTesting\nInfo about testing specific components.\n\nRegarding the version to test: master, or latest dev release would be best, though latest stable release as well will do. Currently there is not much difference for most components. If you don't test master, best add info on which version you tested.\n\nIf you run a NVidia GPU, you will need to use the “Nouveau” driver for testing, Since the proprietary NVidia driver does not provide Wayland support. (Though some things might work in some cases)\n\nNative Wayland\nInstall Weston with your distribution package manager (if a Wlroots-based compositor is required, as for xfce4-panel, see this MR for more information)\nMaybe set a minimal configuration, for example\n~/.config/weston.ini\n[keyboard]\nkeymap_layout=fr\nnumlock-on=true\nRun weston in a terminal emulator, or better: in a tty with a different user, or by logging out of the X11 session first (the compositor may not have quite the same behavior, and this avoids interactions with the current environment)\nIf run in a terminal emulator, make sure at least the component to test isn't already running in your X11 session (e.g Thunar as daemon)\nOpen a terminal in the Weston session and start the component which is to be tested\nFor Wayfire you need to run startxfce4 --wayland from a tty (or the equivalent via a Display Manager), but before that add the following configuration:\n~/.config/wayfire.ini\n[autostart]\nsession = xfce4-session\n\n\nAgain review the aboove solutions to the problem and then give me a new guide on a fresh install of alpine-linux-virt-arm64. So nothing was working and I just kind of want to start fresh on this problem because the support for Wayland for XFCE is just not that great. That's the main issue. And in order to fix it, I have... I need to do a new installation from scratch, basically. So I need you to give me a new guide as to how to do this. How to do this from scratch. I've just set up a barebones command line only, very tiny install of Alpine Linux.
- Assistant