mirror of
https://github.com/tumillanino/miasma-os.git
synced 2026-06-15 11:29:31 +00:00
kernel still breaking. updated name which may have been issue
This commit is contained in:
27
docs/solarpowered-main/files/shared/usr/bin/waydroid-session
Executable file
27
docs/solarpowered-main/files/shared/usr/bin/waydroid-session
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
export XDG_RUNTIME_DIR=/run/user/$(id -u)
|
||||
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
|
||||
eval $(dbus-launch --sh-syntax)
|
||||
fi
|
||||
|
||||
mutter --wayland &
|
||||
MUTTER_PID=$!
|
||||
sleep 5
|
||||
export DISPLAY=:1
|
||||
|
||||
# Start Waydroid in the background
|
||||
waydroid show-full-ui &
|
||||
WAYDROID_PID=$!
|
||||
|
||||
# Wait for Waydroid exit event in the log
|
||||
tail -f -n0 /var/lib/waydroid/waydroid.log | grep -m1 run_buffer
|
||||
|
||||
# Cleanup and logout
|
||||
kill $WAYDROID_PID
|
||||
kill $MUTTER_PID
|
||||
|
||||
# Use loginctl to end the session gracefully
|
||||
loginctl terminate-session "$XDG_SESSION_ID"
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user