Skip to content

Commit 4b01630

Browse files
committed
add wayland init logic
1 parent 349d549 commit 4b01630

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

root/defaults/startwm_wayland.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/with-contenv bash
2+
3+
# Enable Nvidia GPU support if detected
4+
if which nvidia-smi > /dev/null 2>&1 && ls -A /dev/dri 2>/dev/null && [ "${DISABLE_ZINK}" == "false" ]; then
5+
export LIBGL_KOPPER_DRI2=1
6+
export MESA_LOADER_DRIVER_OVERRIDE=zink
7+
export GALLIUM_DRIVER=zink
8+
fi
9+
10+
# Default settings
11+
if [ ! -d "${HOME}"/.config/xfce4/xfconf/xfce-perchannel-xml ]; then
12+
mkdir -p "${HOME}"/.config/xfce4/xfconf/xfce-perchannel-xml
13+
cp /defaults/xfce/* "${HOME}"/.config/xfce4/xfconf/xfce-perchannel-xml/
14+
fi
15+
16+
# Start DE
17+
WAYLAND_DISPLAY=wayland-1 Xwayland :1 &
18+
sleep 2
19+
exec dbus-launch /usr/bin/xfce4-session > /dev/null 2>&1

0 commit comments

Comments
 (0)