Nobara-Project / steamdeck-edition-packages

Package sources used for Nobara's steamdeck edition
3 stars 4 forks source link

Update steamos-desktop-return #2

Closed fennectech closed 8 months ago

fennectech commented 8 months ago

Handle running inside nested desktop

matte-schwartz commented 8 months ago
#!/bin/bash
# Check if running in a nested desktop
if [[ "$PATH" =~ nested_plasma ]]; then
    # If running in a nested desktop, close the session immediately and exit
    qdbus org.kde.ksmserver /KSMServer logout 0 0 1
    exit
fi

# If not running in a nested desktop, continue with normal script execution
/usr/bin/steamrestart
/usr/libexec/os-session-select gamescope
if [[ ! -z $(systemctl status gdm | grep running) ]]; then
        exec gnome-session-quit --no-prompt
fi
if [[ ! -z $(systemctl status sddm | grep running) ]]; then
        exec qdbus org.kde.ksmserver /KSMServer logout 0 0 0
fi

dont know how to submit this as a review since I'm not a Nobara project maintainer but this would be my suggestion for the script, if merged.

fennectech commented 8 months ago

Whoo. I've officially helped!