Closed NotSoSeriouss closed 5 months ago
Do you happen to have /bin/zsh
symlinked to /bin/sh
? Cartridges runs /bin/sh, not your login shell as it cannot do that from Flatpak.
Regardless, this seems to be an issue with the PATH not being correctly set in /bin/sh
on your host.
Sorry I wrote the example with /bin/zsh without noticing, but this is the same with /bin/sh since, yes, it is symlinked to /bin/zsh.
Also, both /usr/bin
and /var/lib/flatpak/exports/bin
are in my path
Then I'm guessing your PATH gets set in your zshrc and not your zprofile, meaning it only works for interactive non-login shells?
I didn't have a .zprofile file in my home so I made a simple one like this: export PATH="$HOME/bin:$PATH"
but it doesn't seem to work. Did I misunderstand your comment? (i'm not very good with env variables and stuff like that)
Where is the initial PATH
being set? It looks like xdg-open
cannot find binaries it needs which are probably not in /home.
But if the command doesn't work even when running from the Flatpak shell directly, this is not a Cartridges issue, but rather something with how your shell environment is set up on your host and so I will mark this issue as invalid.
I understand that this is an issue in my system's configuration but still i can't find a solution to this. Should I try to re-install something? What should be present in my PATH for xdg-open to work? I checked 10 times and everything seems to be in place but still it doesn't work
PS: i just tried this: flatpak enter page.kramo.Cartridges /bin/sh -c 'xdg-open steam://rungameid/211820'
and it works. I truly have no idea what to do at this point, the issue seems to appear only when flatpak-spawn
is used.
Also I think it is unnecessary since, after looking at the permissions, cartridges has the filesystem shared with the host already.
The issue is not what is set in PATH, but rather when it is set. I don't know where the Arch ZSH package does so, but it seems like it's probably in /etc/zshrc
instead of /etc/zprofile
so it is only available to non-login shells. I would be curious if you install bash and set that as an alias to your /bin/sh
, whether the issue still persists.
I found a fix by changing my path setup thanks
I know this has already been discussed in #76 and i'm sorry if I had to make this new issue, but i'm having the exact same issue apparently. You can close this issue as duplicate if you want to as long as #76 gets reopened. Sorry for the trouble again
This command:
flatpak enter page.kramo.Cartridges flatpak-spawn --host /bin/zsh -c 'xdg-open heroic://launch/legendary/4656facc740742a39e265b026e13d075'
Doesn't work, which of course implies that cartridges itself runs into some problems when trying to execute:flatpak-spawn --host /bin/zsh -c 'xdg-open heroic://launch/legendary/4656facc740742a39e265b026e13d075'
The output log is the following:The log seems to report something about a missing browser but this is insignificant since if I run the command:
xdg-open heroic://launch/legendary/4656facc740742a39e265b026e13d075
from the host's terminal, the heroic launcher starts the game correctly without any tweaks needed which is strangeTrying the following command:
flatpak enter page.kramo.Cartridges flatpak-spawn --host /bin/zsh -c 'xdg-open --help'
outputs:So i'm positive that xdg-open can be reached well from cartridges I have no idea what to do now, plz help?
I am running the latest version of Arch Linux. Cartridges is installed from flatpak and it is at the latest version