luxtorpeda-dev / packages

Package build scripts and support for luxtorpeda client
https://luxtorpeda.org
zlib License
37 stars 28 forks source link

RuneLite plugins run into issues when run through Steam #716

Closed Jademalo closed 2 years ago

Jademalo commented 2 years ago

Game

Old School Runescape

Engine

Runelite

Linux Distribution

Steam Deck 3,3

Luxtorpeda Version

v56

Bug description

When running the game through luxtorpeda on Steam, the KeePassXC plugin doesn't work. https://github.com/abextm/keepassxc-runelite

This works fine if running the appimage directly as well as the scripts luxtorpeda uses, but fails if automatically running it with luxtorpeda set as the compatibility tool. Because of this, I believe it's an issue with this script rather than an issue with the plugin.

Steps To Reproduce

  1. Install KeePassXC
  2. Set the compatibility tool for Old School Runescape to Luxtorpeda
  3. Go to the plugin hub in RuneLite and install the KeePassXC plugin
  4. An error will be thrown when trying to use the plugin

Expected Behavior

The plugin should work and open KeePassXC, as it does when running the appimage directly

Additional Context

No response

Relevant log output

The following error is thrown by the plugin in the runelite log;

2022-08-14 10:38:51 [KeePassXCSocketConnection] WARN  abex.os.keepassxc.KeePassXcPanel - error connecting to KeePassXC
java.io.IOException: Cannot run program "keepassxc-proxy": error=2, No such file or directory
    at java.base/java.lang.ProcessBuilder.start(Unknown Source)
    at java.base/java.lang.ProcessBuilder.start(Unknown Source)
    at abex.os.keepassxc.proto.KeePassXCSocket.<init>(KeePassXCSocket.java:72)
    at abex.os.keepassxc.KeePassXcPanel.lambda$load$2(KeePassXcPanel.java:60)
    at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: error=2, No such file or directory
    at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
    at java.base/java.lang.ProcessImpl.<init>(Unknown Source)
    at java.base/java.lang.ProcessImpl.start(Unknown Source)
    ... 5 common frames omitted
d10sfan commented 2 years ago

@Jademalo

It sounds like this plugin is in two parts, a browser extension (that I'm assuming would be run on the steam deck's firefox, and the game plugin. Is that correct?

luxtorpeda by design runs inside the steam linux runtime (soldier), which has an isolation from the rest of the system. Because of that, it can't find applications installed at the normal system.

Do the changes that they mentioned in the new release help with this, from the ticket that you created related to appimages and flatpaks? - https://github.com/abextm/keepassxc-runelite/issues/11

The reason why the script is extracting the appimage instead of running it, is that an appimage can't be run directly in the runtime environment.

Jademalo commented 2 years ago

The game plugin is the browser extension, and there's also the KeePassXC software. The plugin implements itself as a Chromium browser extension to be able to communicate with KeePassXC.

I didn't realise luxtorpeda ran in soldier, that probably explains it. My setup to run it was ~/.local/bin/keepassxc & %command%, which I'm assuming is running keepass outside of soldier so the plugin can't communicate with it.

I've spent the last few hours attempting to get this to work, and unfortunately I think I'm at a dead end. Modifying the luxtorpeda script I can get both KeePass and RuneLite to run through it, however this requires extracting the KeePassXC appimage which breaks the plugin's ability to launch the proxy.

I can at least run the appimages manually through a launch arg with a custom "None" compatibility tool that lets me run windows flagged games without proton or SLR, and that seems to work. Obviously it's not as elegant a solution as using luxtorpeda (which is excellent I have to say!), but it at least gives me the right functionality.

d10sfan commented 2 years ago

OK, that makes sense. I'll go ahead and close this, but if you end up finding any way to make it work inside luxtorpeda, feel free to comment here!