ryanrudolfoba/SteamOS-Waydroid-Installer

[SteamOS 3.5.7] Add as non-steam game does not function properly

Closed this issue · 4 comments

In SteamOS 3.5.7 stable channel, the script to add as non steam game seems to have been modified so that it doesn't allow shell scripts.

Here is the output of the script steamos-add-to-steam that is used in the last line of the waydroid-installer script:

$ deck@steamdeck SteamOS-Waydroid-Installer)$ cat /usr/bin/steamos-add-to-steam
#! /bin/sh

add_to_steam() {
    encodedUrl="steam://addnonsteamgame/$(python3 -c "import urllib.parse;print(urllib.parse.quote(\"$1\", safe=''))")"
    touch /tmp/addnonsteamgamefile
    xdg-open $encodedUrl
}

show_error() {
    if [ "$show_dialog" = "1" ]; then
        kdialog --title Error --error "$1"
    else
        echo "$1" >&2
    fi
}

if [ "$1" = "-ui" ]; then
    show_dialog=1
    shift
fi

file=$1
if [ ! -e "$file" ]
then
    echo "Usage: steamos-add-to-steam [-ui] <path>"
    exit 1
fi
mime=$(xdg-mime query filetype "$file")
case "$mime" in
    "application/x-desktop"|"application/x-ms-dos-executable")
        add_to_steam "$file"
        ;;
    "application/x-executable"|"application/vnd.appimage"|"application/x-shellscript")
        if [ -x "$file" ]; then
            add_to_steam "$file"
        else
            show_error "Unable to add non-Steam game. Is the file executable?"
        fi
        ;;
    *)
        show_error "Unsupported file type"
        ;;
esac

"Unsupported file type" is returned, because the MIME type does not match any of the specified ones.

$ deck@steamdeck SteamOS-Waydroid-Installer)$ xdg-mime query filetype "PlasmaNested.sh" 
text/x-shellscript

i just tried this on my SteamOS 3.5.7 install and it works as expected.

i've also performed a cleanup on the repo. Since 3.5.x is already on stable, i've removed support for SteamOS 3.4.11.

This resulted in several files not needed anymore as this are already included in SteamOS 3.5.x -
removed PlasmaNested.sh
removed the weston binary
cleanup on the script and remove traces of 3.4.x. Script will exit immediately if run on SteamOS 3.4.x

I'm also having this issue

I can't replicate this issue. Tried the script on multiple 3.5.x versions and i dont encounter that error -

  • 3.5.5
  • 3.5.7
  • 3.5.9
  • 3.5.10

Went back to 3.5.7 and its good.

Can you please send a screenshot of the error.

If you need further help please feel free to reopen this case or create a new one.