sonic2kk / steamtinkerlaunch

Linux wrapper tool for use with the Steam client for custom launch options and 3rd party programs
GNU General Public License v3.0
2.15k stars 72 forks source link

v11 not handling Vortex Links on my SteamDeck #551

Closed MaggiWuerze closed 2 years ago

MaggiWuerze commented 2 years ago

Hey, using v11.0 of stl I currently face the issue of it not handling vortex links correctly. Firefox is handing it to the system handler but there's nothing to select in there. Using it on my SteamDeck with latest SteamOS.

I couldn't find a wiki page to tell me what I could do fix that and the vortex page tells me it should work out of the box. Thanks for any help

sonic2kk commented 2 years ago

Thanks for the bug report!

Sounds like the mimetype file associations aren't fully set up on Steam Deck. I would guess that this has something to do with the Steam Deck using the Firefox Flatpak.

This doesn't sound like it should be too hard to fix, hopefully :-) I'll take a look at it and see if there's a way to set the Nexus links to be handled by the Firefox Flatpak. I would be more surprised if Firefox Flatpak didn't allow for this

MaggiWuerze commented 2 years ago

Cool, thanks. Here I thought I was just dumb :smile:

sonic2kk commented 2 years ago

So I'm still digging around and just to be sure I'm on the right track, can you go to Firefox settings and scroll down until you see "Applications", then search for either nxm, vortex, or mod, and press enter. When STL sets the file associations correctly, something should show up for one of those at least :sweat_smile: Below is an example on my desktop PC, where I use MO2:

image

The Vortex wiki page does say it should work out of the box, but don't worry, I don't think anything you've done here is user error. I think sometimes STL just doesn't set it correctly for both Vortex and MO2 (see #260, #349, #485, #502), and so this might not be anything specific to Flatpak/Steam Deck!

If there aren't any NXM file associations set up in Firefox, there are a few steps we can do to troubleshoot.

  1. Can you open your file manager and go to ~/.local/share/applications, and see if you have any of the following files:
    • firefox.desktop - I suspect Firefox Flatpak may store .desktop files in another location. I don't know that STL actually directly modifies the file but still would be useful to know :smile:
    • vortex-steamtinkerlaunch-dl.desktop-off or a file named something to this effect. If you do have this file, can you right click and open it with a text editor such as KWrite or Kate (I think Steam Deck comes with both, but either should work). Once opened, can you verify that it has the line MimeType=x-scheme-handler/nxm;x-scheme-handler/nxm-protocol?
  2. Can you open system settings, search for "Default Applications" and ensure that Firefox is selected as the default browser? I can't foresee a sane case where it wouldn't be but just covering all bases :-)

If the mentioned Vortex file is missing or if it is missing the line mentioned, you can try pasting that line in (with STL and stuff all closed to be on the safe side), then restarting STL and opening Vortex. If that doesn't work, you can try closing STL and renaming the mentioned Vortex file, then running STL again, as that will completely regenerate the file. This comment in #485 seems to suggest that renaming/deleting the Nexus .desktop file and relaunching STL and Vortex might fix the issue. If that does fix your issue, I'll add a note about that to the wiki.

Failing all of this, can you check if there is an open in Vortex to set file associations, if you haven't done so already? Trying to get it to set the associations again could be a good last resort. Of course, the very, very last resort here would be deleting the vortex-steamtinkerlaunch-dl.desktop-off file in ~/.local/share/applications, and then deleting the ~/.config/steamtinkerlaunch/vortex folder to completely uninstall Vortex, and then trying to reinstall. But if it's just the file associations that are not working, I suspect this is either STL once again not setting the NXM mime type for some reason, or Firefox Flatpak being grumpy :-)

Good luck!

MaggiWuerze commented 2 years ago

There's an entry for nxm but it says Use System Handler (default)

I don't have a firefox.desktop in the applications folder. But I have two for Vortex:

The System Settings say, Firefox is the default. Firefox itself says it's not but also claims to be managed by my "organization", I guess that's on flatpak

Deleting and regenerating the files did not help.

There's a toggle in Vortex to disable/enable the handling of Vortex buttons on Nexus but it was active and I had toggled it before asking here, It does not seem to help. I tried it one more time none the less.

In the end I tried deleting and reinstalling but it did not change anything.

Thank you for your effort

sonic2kk commented 2 years ago

That's really strange that FIrefox says Use System Handler (default), I haven't seen that before.

As for Firefox saying its not the default, I think that's fine and just a Flatpak thing as you mentioned.

If reinstalling still didn't help, I feel like this could indeed be related to Firefox Flatpak

sonic2kk commented 2 years ago

Within Firefox, where you can see the File Associations, can you search for nxm (or whatever brought up the Vortex file association before) and then click on where it says Use System Handler (default)? You might see a dropdown of options where it'll say something like Use Vortex, or unfortunately it might not.

image

If it doesn't list anything like Use Vortex or anything else useful, you can try selecting the Select Other... option which should be available. From here, navigate to the vortex-downloads-handler.desktop file you mentioned. You might need to right click and "Show Hidden Files" from the file browser, so that you can access the ~/.local folder. If you have the file open in a file explorer, dragging it into Firefox's file chooser dialog might also work.

I suspect this is the one that manages downloading the actual Vortex files, but I'm not sure. If it doesn't work you can try adding the other Vortex STL file.

Essentially this should "force" Firefox to use Vortex. It seems like for some reason Firefox Flatpak isn't correctly setting the file association but it is seeing that something should handle NXM links.

Good luck, I hope we get somewhere this time :-)

MaggiWuerze commented 2 years ago

Ok, I've tried to set the vortex-download-handler.desktop and it at least accepted that as an option and doesn't ask anymore when I try to use a vortex button, but vortex still does not receive any mods.

sonic2kk commented 2 years ago

Were you able to try selecting vortex-steamtinkerlaunch-dl.desktop and seeing if that lets you download mods from Vortex?

MaggiWuerze commented 2 years ago

No, Firefox wouldn't accept that file.

sonic2kk commented 2 years ago

Hmm, I feel like this may be some sort of issue with Flatpak after doing some digging. There's an issue I found where Filezilla Flatpak doesn't handle file associations correctly (flathub/org.filezillaproject.Filezilla#40).

It seems like Flatpaks require some other kind of Portal to ask which program to open files with. I'm not sure exactly how to implement this with SteamTinkerLaunch or how nicely it'll play with Wine programs like Vortex.

I'm not sure though, that's just me going out on a limb from some light research. I'll need to look into it further. For now with Vortex you might have to settle for manually importing mods, sorry :sweat:

If anyone else has any idea how file associations and Flatpaks work please chime in!

sonic2kk commented 2 years ago

Just for further clarity, could you post the contents of your vortex-downloads-handler.desktop file? What I'm interested in here is seeing the paths that the .desktop file contains. I am particularly interested in the Exec= line.

If it's alright as well, I'd like to see your vortex-steamtinkerlaunch-dl.desktop file.

MaggiWuerze commented 2 years ago
[Desktop Entry]
Type=Application
Categories=Game;
Path=/home/deck/Games/vortex-mod-manager/drive_c/Program Files/Black Tree Gaming Ltd/Vortex
Exec=env WINEPREFIX="/home/deck/Games/vortex-mod-manager" PATH="/home/deck/.local/share/lutris/runners/wine/lutris-5.2-x86_64/bin:$PATH" wine Vortex.exe -d %u
Name=Vortex
MimeType=x-scheme-handler/nxm;x-scheme-handler/nxm-protocol
NoDisplay=true
MaggiWuerze commented 2 years ago

I don't know where that path is coming from, that's not where STLs vortex installation is

frostworx commented 2 years ago

this is no steamtinkerlaunch desktop file content. I assume it comes from lutris

MaggiWuerze commented 2 years ago

Ah ok, guess then we're back to the other one

MaggiWuerze commented 2 years ago

Here's the vortex-steamtinkerlaunch-dl.desktop:

Type=Application
Categories=Game;
Name=Vortex (SteamTinkerLaunch - steamtinkerlaunch)
MimeType=x-scheme-handler/nxm;x-scheme-handler/nxm-protocol
Terminal=false
X-KeepTerminal=false
Path=/home/deck/.config/steamtinkerlaunch/vortex/compatdata/pfx/drive_c/Program Files/Black Tree Gaming Ltd/Vortex
Exec=/home/deck/stl/prefix/steamtinkerlaunch vortex u %u
NoDisplay=true
[Desktop Entry]
Type=Application
Categories=Game;
Name=Vortex (SteamTinkerLaunch - steamtinkerlaunch)
MimeType=x-scheme-handler/nxm;x-scheme-handler/nxm-protocol
Terminal=false
X-KeepTerminal=false
Path=/home/deck/.config/steamtinkerlaunch/vortex/compatdata/pfx/drive_c/Program Files/Black Tree Gaming Ltd/Vortex
Exec=/home/deck/stl/prefix/steamtinkerlaunch vortex u %u
NoDisplay=true
frostworx commented 2 years ago

that is the correct one. can't remember having vortex tested on the steam deck, but the paths look correct. can you confirm that /home/deck/stl/prefix/steamtinkerlaunch vortex start actually starts vortex at least? haven't touched it for a while, because I don't use it at all, but maybe something broke with a newer vortex version. the dotnet6 version mentioned here might be related as well. just running steamtinkerlaunch vortex start on a zero-config system (not steam deck) and report back if it still works when it is done.

frostworx commented 2 years ago

yeah, I'd guess dotnet6 is the problem: 2022-08-25_19-30

I assume Vortex support is broken because of dotnet6. I'm afraid I won't find the time and motivation to work on this and turn #555 into a generic Vortex broken issue.

MaggiWuerze commented 2 years ago

Yeah vortex actually mentions, that the .NET installation is broken but says that only affects the installation of mods. Wouldn't have thought it would stop it from collecting the mods.

MaggiWuerze commented 2 years ago

Anyway, thanks for all your help. Guess I'll close this then

frostworx commented 2 years ago

Yeah vortex actually mentions, that the .NET installation is broken but says that only affects the installation of mods. Wouldn't have thought it would stop it from collecting the mods.

Maybe it doesn't. But this is the only visible change, so not unlikely the problem is not directly related to steamtinkerlaunch, but caused from an external change (always a moving target). Thanks for your understanding. closing :)

sonic2kk commented 2 years ago

@MaggiWuerze For what it's worth I noticed this, and allowing Vortex install DotNet6 by clicking "fix" seems to work, though STL still can't launch it on my side. Seems like Vortex is just generally broken. But if you can get it to launch you can try letting it "fix" itself.

ModOrganizer 2 should hopefully work though.

frostworx commented 2 years ago

what does clicking "fix"do exactly?

MaggiWuerze commented 2 years ago

Nothing

MaggiWuerze commented 2 years ago

I will try MO, but the Vortex Button really is comfortable

sonic2kk commented 2 years ago

MO2 has Vortex button Integration as well. At least on my PC it works really well, I haven't tried Steam Deck.

MaggiWuerze commented 2 years ago

It does? Then I will definitely try it this weekend. Thanks for the info.

sonic2kk commented 2 years ago

Yup, they should appear in your "Downloads" tab, then you can right click on them to install.

image

TheEliteGeek commented 2 years ago

No, Firefox wouldn't accept that file.

I have the same issue as you where the nxm file handler won't work.

I was able to get Firefox to accept the vortex-steamtinkerlaunch-dl.desktop file by setting it as an executable, but this is as far as I was able to get.

For now I've just been manually downloading the files and dragging them into Vortex to be installed. I don't know if this is actually working though (since I've yet to try running the game).

sonic2kk commented 2 years ago

@TheEliteGeek Due to issues with Vortex this may not work, see #555 for Vortex breaking on Linux. Your issue with Vortex file handler not working is likely unrelated, though. If you're also running on Steam Deck and/or using Firefox Flatpak (which you pretty much have to use on Steam Deck), it's likely that the file handler won't work.

Personally when I use mod managers even when I used them on Windows, I never trusted their file handlers as they were always subject to break :smiley: It's a bit more work but imo it's more reliable to simply download and add mods yourself. Whether or not they will work is another story (for now), but if/when Vortex's dotnet6 issues are fixed on an available version of Proton, you should be able to use your mods via Vortex.

If it helps, for now, MO2 should work if it supports your game.