当前位置: 首页 > news >正文

wayland桌面环境-labwc编译

编译

sudo apt remove libwlroots-0.18 # 让labwc从wlroots编译 还有drm(虽然不知道是做什么的。)
meson setup build -Dxwayland=enabled --prefix=./build_output --wipe # build 是目录名称
meson setup build -Dxwayland=enabled --wipe # build 是目录名称
ninja -C build/ install

Dockerfile

FROM debian:latestRUN echo 'root:root' | chpasswd# Configure full Aliyun APT sources for Debian 13 (Trixie)
RUN rm -f /etc/apt/sources.list.d/* && \printf "deb http://mirrors.aliyun.com/debian/ trixie main contrib non-free non-free-firmware\n\
deb-src http://mirrors.aliyun.com/debian/ trixie main contrib non-free non-free-firmware\n\
\n\
deb http://mirrors.aliyun.com/debian/ trixie-updates main contrib non-free non-free-firmware\n\
deb-src http://mirrors.aliyun.com/debian/ trixie-updates main contrib non-free non-free-firmware\n\
\n\
deb http://mirrors.aliyun.com/debian/ trixie-backports main contrib non-free non-free-firmware\n\
deb-src http://mirrors.aliyun.com/debian/ trixie-backports main contrib non-free non-free-firmware\n\
\n\
deb http://mirrors.aliyun.com/debian-security trixie-security main contrib non-free non-free-firmware\n\
deb-src http://mirrors.aliyun.com/debian-security trixie-security main contrib non-free non-free-firmware\n" \> /etc/apt/sources.list && \apt-get clean && apt-get updateENV DEBIAN_FRONTEND=noninteractive
RUN apt-get install -y git meson ninja-build build-essential pkg-config cmakeRUN apt-get clean && rm -rf /var/lib/apt/lists/*WORKDIR /build
USER root:rootENTRYPOINT [ "/bin/bash", "-l", "-c" ]
docker run --rm --net=host --ulimit core=-1 -it -v /data/code/labwc:/build --name debian_env debian_env bash

install_deps.sh

#!/usr/bin/env bash
set -eecho "⚙️ Installing Labwc build dependencies by category..."# --- Core build tools ---
apt-get install -y \git build-essential meson ninja-build pkg-config# --- Wayland compositor stack ---
# no libwlroots-dev, labwc will download and build it from code sources 
apt-get install -y \wayland-protocols libwayland-dev # --- Input and keyboard ---
apt-get install -y \libinput-dev libxkbcommon-dev# --- Graphics and text rendering ---
apt-get install -y \libcairo2-dev libpango1.0-dev libpng-dev librsvg2-dev# --- System integration and session management ---
apt-get install -y \libseat-dev seatd libudev-dev# --- XML and GLib utilities ---
apt-get install -y \libxml2-dev libglib2.0-dev# --- XWayland / X11 (optional) ---
apt-get install -y \xwayland libxcb1-dev###############################################################
# --- wlroots need ---
# --- Core graphics stack (EGL, GLES, DRM, GBM) ---
apt-get install -y \libegl1-mesa-dev \libgles2-mesa-dev \libgbm-dev \libdrm-dev# --- Vulkan support (optional but recommended) ---
apt-get install -y \libvulkan-dev \glslang-tools \glslang-dev# --- Color management and display info ---
apt-get install -y \liblcms2-dev \hwdata \libdisplay-info-dev# --- Plane allocation and compositor helpers ---
apt-get install -y \libliftoff-dev# --- X11 extensions (optional, for XWayland integration) ---
apt-get install -y \libxcb-dri3-dev \libxcb-composite0-dev \libxcb-xfixes0-dev \libxcb-present-dev \libxcb-ewmh-dev \libxcb-render-util0-dev \libxcb-icccm4-dev \libxcb-xinput-dev \libxcb-res0-dev \libxcb-errors-dev################################################################ Other 
apt-get install -y \gettext scdoc

TODO

meson setup with prefix dir XXX and ninjia build and install to prefix dir XXX, how to install to user computer from prefix dir XXX

Compositor does not support wlr_layer_shell protocol

当前的 合成器(compositor) 不支持 wlr-layer-shell 协议。

wlr-layer-shell 是一个 Wayland 协议,用于让程序(如 rofi、waybar)在桌面上以“图层”的形式显示(类似于 X11 的窗口类型)

⚙️ 常见场景对照表:

环境 是否支持 wlr-layer-shell 说明
sway ✅ 支持 完全兼容
wayfire ✅ 支持 正常
Hyprland ✅ 支持 完全支持
weston ✅ 支持 OK
GNOME (Mutter) ❌ 不支持 GNOME 不使用 wlroots
KDE Plasma (KWin) ❌ 不支持 KDE 使用自家协议

配置labwc (利用AI辅助)

参考:https://github.com/kmephistoh/dotfiles

Suggested apps to use with Labwc:

  • Screen shooter: [grim]
  • Screen recorder: [wf-recorder]
  • Background image: [swaybg]
  • Panel: [waybar], [lavalauncher], [sfwbar], [xfce4-panel]
  • Launchers: [bemenu], [fuzzel], [wofi]
  • Output managers: [wlopm], [kanshi], [wlr-randr]
  • Screen locker: [swaylock]
  • Gamma adjustment: [gammastep]
  • Idle screen inhibitor: [sway-audio-idle-inhibit]
XDG_CURRENT_DESKTOP=wlroots

cd ~/.config/labwc

  1. environment 环境变量 谁的环境变量?
点击查看代码
# Example environment file# This allows xdg-desktop-portal-wlr to function (e.g. for screen-recording)
XDG_CURRENT_DESKTOP=wlroots# Set keyboard layout to Swedish# Set two keyboard layouts and toggle between them using alt+shift
#XKB_DEFAULT_OPTIONS=grp:alt_shift_toggle# Force firefox to use wayland backend
MOZ_ENABLE_WAYLAND=1# WLR_RENDERER: forces the creation of a specified renderer (available renderers: gles2, pixman, vulkan)
# WLR_RENDERER=vulkan# Set cursor theme.
# Find icons themes with the command below or similar:
#     find /usr/share/icons/ -type d -name "cursors"
XCURSOR_THEME=breeze_cursors# Disable hardware cursors. Most users wouldn't want to do this, but if you
# are experiencing issues with disappearing cursors, this might fix it.
#WLR_NO_HARDWARE_CURSORS=1# For Java applications such as JetBrains/Intellij Idea, set this variable
# to avoid menus with incorrect offset and blank windows
# See https://github.com/swaywm/sway/issues/595
#_JAVA_AWT_WM_NONREPARENTING=1
_JAVA_AWT_WM_NONREPARENTING=1
## fcitx5
#GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
INPUT_METHOD=fcitx
SDL_IM_MODULE=fcitx#vulkan
#============
#MESA RADV
#VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.i686.json:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json
#
#AMDVLK
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_icd32.json:/usr/share/vulkan/icd.d/amd_icd64.json#MangoHud
MANGOHUD=1
XCURSOR_SIZE=24
XKB_DEFAULT_LAYOUT=us
  1. autostart 自动启动常用组件

chmod +x ~/.config/labwc/autostart

点击查看代码
# Example autostart file# Set background color.
# swaybg -i ~/Pictures/land.jpg >/dev/null 2>&1 &
swaybg -i /data/code/dotfiles-kmephistoh/Wallpapers/2021-travel-enshi.jpg 2>&1 &
# wpaperd >/dev/null 2>&1 & # debian 13 apt install 未找到, 代研究# Configure output directives such as mode, position, scale and transform.
# Use wlr-randr to get your output names
# Example ~/.config/kanshi/config below:
#   profile {
#     output HDMI-A-1 position 1366,0
#     output eDP-1 position 0,0
#   }
##kanshi >/dev/null 2>&1 &# Launch a panel such as yambar or waybar.
waybar >/dev/null 2>&1 &# fcitx5
fcitx5 >/dev/null 2>&1 &# clipman
#wl-paste -t text --watch clipman store > /dev/null 2>&1 &
#
# clipcat 待研究
# systemctl --user start clipcat.service# Enable notifications. Typically GNOME/KDE application notifications go
# through the org.freedesktop.Notifications D-Bus API and require a client such
# as mako to function correctly. Thunderbird is an example of this.
#mako >/dev/null 2>&1 &# Lock screen after 5 minutes; turn off display after another 5 minutes.
#
# Note that in the context of idle system power management, it is *NOT* a good
# idea to turn off displays by 'disabling outputs' for example by
# `wlr-randr --output <whatever> --off` because this re-arranges views
# (since a837fef). Instead use a wlr-output-power-management client such as
# https://git.sr.ht/~leon_plickat/wlopm
#swayidle -w \
#	timeout 300 'swaylock -f -c 000000' \
#	timeout 600 'wlopm --off \*' \
#	resume 'wlopm --on \*' \
#	before-sleep 'swaylock -f -c 000000' >/dev/null 2>&1 &

实验下,之前rofi在debian 13 gonme wayland 运行时会提示Rofi on wayland requires support for the layer shell protocol

在labwc下还会不会

rofi编译直接指定只包含wayland(meson setup build -Dxcb=disabled --wipe)

测试 OK

http://www.jsqmd.com/news/445850/

相关文章:

  • 聊聊2026年山西预应力混凝土管桩生产厂家哪家性价比高 - 工业品网
  • 北航2026软件工程第一次个人作业
  • 2026太原靠谱的花灯彩灯生产厂家代加工推荐,性价比如何 - 工业设备
  • Z-BlogPHP强制开启 Debug 调试模式 zblog网站常见问题
  • 2026好的职业培训学校口碑排名,学电焊的专业学校哪家强 - 工业品牌热点
  • 资深用户推荐:2025年高效短视频获客平台,抖音运营公司/短视频代运营团队/小红书代运营/抖音代运营/企业号代运营短视频获客服务商有哪些 - 品牌推荐师
  • 网站出现SQL语句报错是什么原因?
  • 2026年江门性价比高的装修公司,鲁班匠心费用合理 - myqiye
  • 帝国cms万能标签(ecmsinfo)和灵动标签(e:loop)主要区别EmpireCMS
  • 2026方案多有经验的防伪公司价格,哪家口碑好值得考虑 - 工业推荐榜
  • Z-BlogPHP网站文件结构,zblog网站常见问题之模板目录在哪里
  • 闲置京东e卡变钱攻略 - 京顺回收
  • PbootCMS附件上传失败报错UNKNOW: Code: 8192; Desc: stripos():
  • 帝国cms设置数据库配置信息后提交空白EmpireCMS
  • 探讨上海岸昶机械设备创新能力,上海地区选购它性价比高吗 - 工业品网
  • 探讨太原东方红花灯费用,作为大型花灯设计制作厂家怎么收费? - 工业设备
  • 帝国cms多值字段如何调用?EmpireCMS
  • 总结上海岸昶机械设备实力怎么样 其口碑在行业中如何 - 工业品网
  • 总结2026年浙江靠谱的高臂钻机品牌,推荐高臂钻机型号汇总 - 工业品牌热点
  • 蓝天智能焊机节气阀
  • 探讨2026年高性价比的代理公司注册企业,鑫诚财务不容错过 - mypinpai
  • 帝国cms后台管理目录是否可以修改?
  • 分析余热回收换热器批量定制口碑,选哪家比较靠谱 - myqiye
  • 字面量前后缀
  • 帝国cms留言板如何设置验证码?EmpireCMS
  • 帝国cms建立数据表: phome_ecms_article 完毕......EmpireCMS
  • 2026年嘉兴权威的老牌西点培训费用分析,到底多少钱 - 工业推荐榜
  • 苏州市短视频拍摄专业团队:苏州星野来信影视传媒有限公司全方位方案,无锡市优质的短视频拍摄专业团队行业优质排行榜亮相 - 品牌推荐师
  • 帝国cms不知道数据库链接信息,怎么办?EmpireCMS
  • 性能优化策略:代码与架构双升级