Closed elronzorro closed 2 years ago
When you choose "Allow Access", does it give you a pop up asking for which application you want to open the link in?
If I try it in Firefox, I click the link and get no popup. I believe I used to, but after running that command in the terminal, I may have told it to not ask again. I tried to go into Firefox settings, but if I change it to always ask, the setting doesn't save for some reason.
If I paste the link into Chrome and click Allow Access, I get a popup with only two buttons, Cancel or 'open xdg-open'. If I click the latter, nothing seems to happen.
Not sure if it'll help, but if I click 'Allow Access' in Firefox, the .auth file in ~/Games/humble-games-collection/drive_c is never created. If I copy the link to Chrome and click 'Allow Access', that file is created. From looking at handle-humble-scheme, it would appear I would just need to run 'flatpak run net.lutris.Lutris lutris:rungame/humble-games-collection' once the .auth file was there. However, when I run that, I get the following output and the Humble app never loads (and the .auth file gets deleted):
elronzorro@pop-os:~/Games/humble-games-collection$ flatpak run net.lutris.Lutris lutris:rungame/humble-games-collection Gtk-Message: 10:12:41.601: Failed to load module "appmenu-gtk-module" Gtk-Message: 10:12:42.451: Failed to load module "canberra-gtk-module" 2022-09-10 10:12:42,453: Starting Lutris 0.5.11 2022-09-10 10:12:42,499: Using NVIDIA drivers 515.48.07 for x86_64 2022-09-10 10:12:42,499: GPU: NVIDIA GeForce RTX 3070 2022-09-10 10:12:42,500: GPU: 10DE:2484 1043:87C1 (nvidia drivers) lutris-wrapper: Humble Games Collection Started initial process 33 from gamemoderun /home/elronzorro/.var/app/net.lutris.Lutris/data/lutris/runners/wine/lutris-7.2-2-x86_64/bin/wine /home/elronzorro/Games/humble-games-collection/start-humble.cmd --in-process-gpu Start monitoring process. gamemodeauto: fsync: up and running. Initial process has exited (return code: 0) Monitored process exited. Exit with return code 0 2022-09-10 10:12:50,856: Game still running (state: running) 2022-09-10 10:12:50,856: Stopping Humble Games Collection (wine) 2022-09-10 10:12:50,857: Shutting down Lutris
if the .auth
file gets created then it should log you in. You should try to edit the start-humble.cmd
script and remove the del C:\.auth
line so it doesn't remove the .auth
file.
If you can, post the contents of the file here (but make sure to redact the code=
portion since that's an auth code for your account)
Contents of the .auth file? If I remove the code= part, there's not much there:
humble://login/code=removed_code&state=0
I removed the line from start-humble.cmd, so the .auth file stays there now, but still no success logging in.
Contents of the .auth file? If I remove the code= part, there's not much there:
humble://login/code=removed_code&state=0
I removed the line from start-humble.cmd, so the .auth file stays there now, but still no success logging in.
Do you have a Humble Choice subscription? The url looks good
Yep, sure do:
I read somewhere to try:
handle-humble-scheme "humble://login/code=code_removed&state=0"
but that returns:
./handle-humble-scheme: 9: lutris: not found
The handle-humble-scheme already converts the ? to a /. I'm not sure why your account is not logging you in, but it seems like it should be, and since it was deleting the .auth file, it was taking the correct path to send the url to the app...
Well, it sounds like I'm out of luck. If you think of anything else to try, I'm all ears. Thanks for the help!
Perhaps my workaround will work also for you? (Doing some command line in lieu of running Gustashs Login App.)
I do not have the same issue in SteamOS. I haven't tried other Linux Flavors.
Yeah, that's one of the articles I was following.
From that thread, it says:
Pressing the "Allow" button will prompt you to select an application to handle x-scheme-handler/humble. Select to show more options and select your default web browser. This will open your web browser to a URL which is a "humble://" link - you need this text for a future step.
The only thing I get when I hit allow is this:
I can only hit 'Open xdg-open'. I have no way to select my default browser. Is the humble:// link it's referencing there the same one that's in the .auth file?
If it is the same, I use the handle-humble-scheme command it mentions: ~/Games/humble-games-collection/handle-humble-scheme "humble://login/code=code_removed&state=0"
That returns the following, though: /home/elronzorro/Games/humble-games-collection/handle-humble-scheme: 9: lutris: not found
don't replace the ? with a /, the script does it itself. but from your log it seems like the script is trying to call the lutris binary, but it doesn't find it?
that's odd since there's an if statement to check if the binary is even there before calling it...
Don't replace what ? with a /? I'm not sure what you're referring to. I don't believe I replaced any ? characters anywhere.
Lutris is installed via flatpak, if that matters.
the .auth file already has the ? replaced with a /. the url is supposed to look like humble://login?code=123123&state=2
if Lutris is installed via flatpak the script shouldn't even call lutris. what does your terminal output if you run command -v lutris
?
Oh, I've only ever seen that string inside the .auth file, so I didn't know there was a ? before.
'command -v lutris' returns no output
'whereis lutris' also can't find it.
Can you paste me your handle-humble-scheme
script?
set -e export LUTRIS_SKIP_INIT=1 LUTRIS_CMD="lutris:rungame/humble-games-collection" FIXED_SCHEME="$(echo "$1" | sed "s/?/\//")"
echo "$FIXED_SCHEME" > /home/elronzorro/Games/humble-games-collection/drive_c/.auth if command -v lutris 1&>/dev/null; then lutris $LUTRIS_CMD else flatpak run net.lutris.Lutris $LUTRIS_CMD fi
If you replace:
if command -v lutris 1&>/dev/null; then
lutris $LUTRIS_CMD
else
flatpak run net.lutris.Lutris $LUTRIS_CMD
fi
with:
flatpak run net.lutris.Lutris $LUTRIS_CMD
Does it work?
Yes it does! Thank you!
Will this break with any updates you release?
Yes it does! Thank you!
Will this break with any updates you release?
Yes, I've probably made a derp with the if statement. I'll take a look tomorrow, thanks for the confirmation 😄
I'm just glad I wasn't doing something stupid :)
Thanks again for the help.
@elronzorro Can you do me a favor?
If you change that line again to:
lutris $LUTRIS_CMD 2>/dev/null || flatpak run net.lutris.Lutris $LUTRIS_CMD
Then you logout and try logging it again, does it work?
Yes, it still works w/ that change.
and if you run lutris lutris:rungame/humble-games-collection
on your terminal, what happens?
Command 'lutris' not found, but can be installed with: sudo apt install lutris
Last thing to try. If you run:
if command -v lutris 1&>/dev/null; then
lutris lutris:rungame/humble-games-collection
fi
what do you get?
I just pasted it in a terminal, if that's what I was supposed to do. I ran it but it returned no output, Humble app did not load.
no clue why the script was failing then, it seems to correctly skip the command if the if check fails...
Yeah, if I run:
if command -v lutris 1&>/dev/null; then lutris "lutris:rungame/humble-games-collection" else
echo "in else" fi
It correctly echoes 'in else' to the console.
I got it working on a PopOS VM, and it was a blunder of mine. Not sure why it works on most distros but not on Pop_OS.
If you change those lines to:
if command -v lutris 1>/dev/null; then
lutris $LUTRIS_CMD
else
flatpak run net.lutris.Lutris $LUTRIS_CMD
fi
It should work. The &
was backgrounding the command
process which I guess for some reason on Pop_OS enters the first if branch?
EDIT: Would be good if you could verify that for me so I can go ahead and fix up the installer
Yep, made the change, logged out and logged back in successfully. Looks good.
great, thanks for the confirmation! I'll submit this update to lutris
Using PopOS! I've tried signing in and allowing access in Firefox and Chrome, without luck.
I tried running 'xdg-mime default Humble-scheme-handler.desktop x-scheme-handler/humble' in a terminal, but that also didn't seem to help. I was previously using the native Lutris client, but recently switched to the flatpak as it was more up to date and had the Amazon games support.
Thanks in advance for the help!