Skip to content

Launching games creates ~/.wine prefix #178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
slanderous-mambo opened this issue Feb 19, 2021 · 9 comments
Closed

Launching games creates ~/.wine prefix #178

slanderous-mambo opened this issue Feb 19, 2021 · 9 comments
Labels
bug:confirmed Something isn't working.

Comments

@slanderous-mambo
Copy link

When I launch a game that has a custom prefix set, and ~/.wine does not exist, ~/.wine gets initialized before the game launches. The game however saves to the right prefix.
I assume that somewhere in the launching games process, wine gets called without the WINEPREFIX environment variable set.
This does not occur launching winecfg or winetricks.

  • OS: Fedora 33
  • Version: 1.5.2, didn't happen on 1.4.0
  • Game: every game
  • Wine/Proton version: lutris-6.0, wine-6.2
@flavioislima
Copy link
Member

Looks similar to #120
I found the issue, was running one of the commands on launching with an empty wine prefix.
Good catch @slanderous-mambo

@flavioislima flavioislima added the bug:confirmed Something isn't working. label Feb 19, 2021
@slanderous-mambo
Copy link
Author

slanderous-mambo commented Feb 19, 2021

The fix prevents Lutris from working at all, for me:
stderr: '/bin/sh: /home/paul/.local/share/lutris/runners/wineboot/lutris-6.0-x86_64/bin/wineboot: Datei oder Verzeichnis nicht gefunden\n'
The actual path sould be ~/.local/share/lutris/runners/wine/... – I think you just replaced one wine too many, here!

@flavioislima
Copy link
Member

I see. I think I forgot to test wine lutris before release it.
Is better to use the full wine boot path then.

@flavioislima
Copy link
Member

But in this it is just for new prefixes, right? If the prefix exists that line should not run. So you can at least create the prefix with wine and change it to use lutris after that.

@flavioislima
Copy link
Member

I figure out a better logic now. Is on the main branch but I won't release a new fix unless other bugs appear.

@slanderous-mambo
Copy link
Author

slanderous-mambo commented Feb 20, 2021

No, this was with an existing prefix. On the main branch, the correct executable seems to get run now (~/.local/share/lutris/runners/wine/lutris-6.0-x86_64/bin/wine64).

That said, now games don't run correctly anymore, if I use any non-default prefix (wine or lutris). For example, World of Goo shows "Could not find game data", Enter the Gungeon shows "There should be 'EtG_Data' folder next to the executable" (most games show nothing and just quit immediately). So I assume all exe's get run from the wrong directory?
I tried to run the command Heroic runs manually, and it worked if the prefix was not yet touched by Heroic:
/home/paul/builds/HeroicGamesLauncher/dist/linux-unpacked/resources/app.asar.unpacked/build/bin/legendary launch Garlic --wine '/home/paul/.local/share/lutris/runners/wine/lutris-6.0-x86_64/bin/wine64' --wine-prefix '/home/paul/Games/Heroic/pfx_default'
So it must still be something Heroic does to the prefix. This might be a completely seperate issue, though?

@flavioislima
Copy link
Member

Weird. So you compiled from the main branch and had these issues? I don't know why this is not happening to me because before every release I test install, play, uninstall, proton, wine, etc. Basic stuff.
I will need to revise the whole flow to understand what's is happening but it is really weird.

Heroic basically checks if the prefix exists, if not, creates a new one using the wineboot script and the winetricks sandbox command to keep the home folders in a a sandbox.

After that, uses the install dxvk using the setup script that comes with it.

At last, calls legendary with the arguments to launch the game.

Not being able to find the exe should not be something with heroic since is legendary that runs the game. But if it runs from the terminal, so and don't really know what's is going on. 🤔

So unless something weird is happening when checking

@slanderous-mambo
Copy link
Author

I found the problem! Heroic seems to remove the mapping "Z: -> /" from non-default prefixes and I was keeping my games outside my prefix. So naturally, the game exe can't find the game data. Everything is fine, if I just put my game directory inside drive_c.
Bildschirmfoto von 2021-02-20 16-46-33
I'm not sure if this is caused by winetricks sandbox, but it doesn't seem unreasonable.

@flavioislima
Copy link
Member

I found the problem! Heroic seems to remove the mapping "Z: -> /" from non-default prefixes and I was keeping my games outside my prefix. So naturally, the game exe can't find the game data. Everything is fine, if I just put my game directory inside drive_c.
Bildschirmfoto von 2021-02-20 16-46-33
I'm not sure if this is caused by winetricks sandbox, but it doesn't seem unreasonable.

might be the winetricks command because I added it on 1.5 version. I should add an option then. With the option it will be easier to debug as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:confirmed Something isn't working.
Projects
None yet
Development

No branches or pull requests

2 participants