From 708b25e29e44385d4c91026a2de3143b1526416c Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Mon, 2 Oct 2023 11:04:21 -0700 Subject: [PATCH] feat(waydroid): Add new Waydroid launcher to streamline use --- Containerfile | 2 +- system_files/desktop/shared/usr/bin/waydroid-launcher | 6 +++--- system_files/desktop/shared/usr/etc/xdg/weston/weston.ini | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 system_files/desktop/shared/usr/etc/xdg/weston/weston.ini diff --git a/Containerfile b/Containerfile index 3cc3da1538..41f933523a 100644 --- a/Containerfile +++ b/Containerfile @@ -237,7 +237,7 @@ RUN /tmp/image-info.sh && \ ; fi && \ if grep -qv "nvidia" <<< "${IMAGE_NAME}"; then \ systemctl disable waydroid-container.service && \ - sed -i 's@Exec=waydroid first-launch@Exec=/usr/bin/waydroid-launcher@g' /usr/share/applications/Waydroid.desktop && \ + sed -i 's@Exec=waydroid@Exec=/usr/bin/waydroid-launcher@g' /usr/share/applications/Waydroid.desktop && \ rm /usr/share/wayland-sessions/weston.desktop \ ; fi && \ mkdir -p /usr/etc/default && \ diff --git a/system_files/desktop/shared/usr/bin/waydroid-launcher b/system_files/desktop/shared/usr/bin/waydroid-launcher index c19b6ff37a..eae6d15608 100755 --- a/system_files/desktop/shared/usr/bin/waydroid-launcher +++ b/system_files/desktop/shared/usr/bin/waydroid-launcher @@ -11,13 +11,13 @@ fi killall -9 weston pkexec /usr/bin/waydroid-container-start if [ -z "$(pgrep weston)" ]; then - /usr/bin/weston --xwayland --width="${WAYDROID_WIDTH}" --height="${WAYDROID_HEIGHT}" &> /dev/null & + /usr/bin/weston --socket=weston-waydroid --width=${WAYDROID_WIDTH} --height=${WAYDROID_HEIGHT} &> /dev/null & fi sleep 2 && export XDG_SESSION_TYPE='wayland' -export DISPLAY=':1' -/usr/bin/waydroid show-full-ui & +export WAYLAND_DISPLAY='weston-waydroid' +/usr/bin/waydroid $@ & while [ -n "$(pgrep weston)" ];do sleep 1 done diff --git a/system_files/desktop/shared/usr/etc/xdg/weston/weston.ini b/system_files/desktop/shared/usr/etc/xdg/weston/weston.ini new file mode 100644 index 0000000000..2b8d142f28 --- /dev/null +++ b/system_files/desktop/shared/usr/etc/xdg/weston/weston.ini @@ -0,0 +1,4 @@ +[shell] +clock-format=none +panel-position=none +background-color=0xff000000