Matoking / protontricks

A wrapper that does winetricks things for Proton enabled games, requires Winetricks.
GNU General Public License v3.0
1.61k stars 34 forks source link

It wont open on steam deck #169

Closed naldo29 closed 1 year ago

naldo29 commented 1 year ago

Describe the bug It literally just doesnt start, the app does nothing when I click on launch

To Reproduce Steps to reproduce the behavior:

  1. I click launch on the discover app

Expected behavior The app launches

System (please complete the following information):

Matoking commented 1 year ago

The "Launch" button seems to be broken due to what appears to be a bug in Discover. You can instead launch the application using the application launcher in the taskbar: you can click the "Start" button on the task bar and type "Protontricks" and click that, or look for it under the "Utilities" category.


As for the technical details, Protontricks, in contrast to most Flatpak applications, works both as a command-line application and as a graphical application.

The command to launch the CLI tool is defined in the com.github.Matoking.protontricks.yml Flatpak manifest, which allows users to simply substitute protontricks for flatpak run com.github.Matoking.protontricks using an alias, making the command-line option easier to use.

The command to launch the GUI is instead in a desktop file called com.github.Matoking.protontricks.desktop, which has the line Exec=protontricks --no-term --gui, which essentially causes the application chooser to pop up when launched. This desktop file is also what adds Protontricks to the application launcher, making it easier to launch if you're working on the desktop.

When you click "Launch", Discover tries to launch the application first using the desktop file. If that isn't found, it falls back to using the command in the Flatpak manifest. For most applications both essentially do the same thing, but because Protontricks is both an CLI and GUI application, when the desktop file isn't found, Discover tries to launch the CLI version, which isn't what we want.

Why isn't the desktop file found by Discover, then? Protontricks' AppStream identifier is com.github.Matoking.protontricks, but another valid form is also com.github.Matoking.protontricks.desktop, which is what applications have used historically, according to the AppStream specification. If you try to check for share/flatpak/exports/share/applications/<file> for the desktop file, you can substitute the file for the AppStream identifier, but you have to ensure the .desktop suffix exists since that's what all desktop files use. Discover doesn't take this into account and tries to look for com.github.Matoking.protontricks instead of com.github.Matoking.protontricks.desktop which causes the wrong launch method to be used as a fallback.


I'll have to look into either filing a bug report or submitting a bug fix to the Discover project. While I could change the Flatpak manifest to also launch the GUI, it would break the flatpak run com.github.Matoking.protontricks command for users who already have it as their alias.

Matoking commented 1 year ago

I've made an upstream merge request to Discover:

https://invent.kde.org/plasma/discover/-/merge_requests/371

Matoking commented 1 year ago

The Discover bug fix was merged and should be available in the upcoming Plasma 5.26. Until then, the application launcher can be used as a workaround.