Wine prefix communication

Questions about Wine on Linux
Post Reply
Wodger
Newbie
Newbie
Posts: 4
Joined: Sat May 01, 2021 6:51 am

Wine prefix communication

Post by Wodger » Sat May 01, 2021 7:07 am

Good day,

I have a windows program that can launch several windows apps from it. I have this program in one prefix. Everything works fine if I install and launch the apps within the same prefix as the launcher program - the apps depend on access to the launcher program. However, I would like to split the apps into separate prefixes that can each be configured with extra requirements (so I don't end up with one massive prefix doing everything and can do individual updates to the apps if required).

I have been playing around and googling and as far have not come up with a way yet to do this as the app cannot "see" the launcher as its on a different prefix.

Only one app will be required to be opened at once, so in total there would be only the launcher prefix (the "master" one in effect) and one of the app prefixes (the "slave" one) running at any one time.

If anyone could let me know if this is possible or I'm barking up the wrong tree :)

Pete.

invisible kid
Level 3
Level 3
Posts: 74
Joined: Tue Dec 24, 2019 3:23 pm

Re: Wine prefix communication

Post by invisible kid » Sun May 02, 2021 6:02 pm

Hi, I am just a commenter and not an "official" source on anything, but my guess is that it wouldn't be possible? It would be similar(not exactly) to having multiple versions of Windows on one computer at the same time?

Wodger
Newbie
Newbie
Posts: 4
Joined: Sat May 01, 2021 6:51 am

Re: Wine prefix communication

Post by Wodger » Sun May 02, 2021 9:15 pm

invisible kid wrote:
Sun May 02, 2021 6:02 pm
Hi, I am just a commenter and not an "official" source on anything, but my guess is that it wouldn't be possible? It would be similar(not exactly) to having multiple versions of Windows on one computer at the same time?
Thanks for your input and Happy Monday!

I see your point - pretty much everything I have read online suggests its a dead end. The way I am looking at it is each prefix is a separate unit in a way (separate system), and as such it comes down to probably issuing commands using networking of some sort (ssh, telnet or serial type communication?). I am actually planning to set up two test windows VM's on my linux system and try and communicate in that sort of fashion to see if it works via network commands - if it doesn't I probably am pretty much stuck with using one prefix for the launcher and the apps, which yeah it will work, but will make updating or adjusting requirements a bit more fiddly.
I will reply with results of my VM experiment perhaps later today.

Pete

fargodwe
Level 5
Level 5
Posts: 450
Joined: Mon Oct 02, 2017 7:08 am

Re: Wine prefix communication

Post by fargodwe » Sat May 08, 2021 12:02 am

oops. Didn't mean to post anything yet.

fargodwe
Level 5
Level 5
Posts: 450
Joined: Mon Oct 02, 2017 7:08 am

Re: Wine prefix communication

Post by fargodwe » Sat May 08, 2021 4:42 pm

Sorry about my previous post. I tried somethings here on my own and don't really see how to make it work. I think that even if you had them in their own prefixes wine is still going to think you are running within the bottle where you started the launcher. That would mean all the dll's, special needs, etc., would still need to be in the bottle with the launcher. Doesn't accomplish much. However......

If there is no need for communication between each of the programs that the launcher starts then 2 things come to mind.
  • The simplest would be just installing the launcher in each prefix.
  • The other might be just starting the program itself not using the launcher. Does the launcher start the programs (like games) via the net or is everything done local to your PC?

Wodger
Newbie
Newbie
Posts: 4
Joined: Sat May 01, 2021 6:51 am

Re: Wine prefix communication

Post by Wodger » Sun May 09, 2021 10:33 pm

fargodwe wrote:
Sat May 08, 2021 4:42 pm
Sorry about my previous post. I tried somethings here on my own and don't really see how to make it work. I think that even if you had them in their own prefixes wine is still going to think you are running within the bottle where you started the launcher. That would mean all the dll's, special needs, etc., would still need to be in the bottle with the launcher. Doesn't accomplish much. However......

If there is no need for communication between each of the programs that the launcher starts then 2 things come to mind.
  • The simplest would be just installing the launcher in each prefix.
  • The other might be just starting the program itself not using the launcher. Does the launcher start the programs (like games) via the net or is everything done local to your PC?
Hi!

I had to put this experiment on hold for a while due to other things coming up but what I managed to do is a hacky sort of method - more info is required here:

The launcher in question is UBISofts connect launcher. Sadly they seem to not provide any form of linux launcher nor an public available API (they obviously have one for their launcher else it wouldn't work) and this is despite calls for these things for years which have gone unanswered.

Because of this, the launcher itself has to sit in a prefix hence the issues I am encountering. so onto the options you mentioned:
  • Installing launcher in each prefix: Well this would work but would require you to log in everytime as each prefix would be seen as "another instance" and if you have 2FA on top of that, things can get really messy as logging into one, will log you out of the other
  • Starting from the program/game: This is what I was going for, but as the launcher is located on another prefix, the game itself looks for the launcher on its own prefix and fails saying launcher not found
So onto the hacky method which works in a way, but is still not working 100%. Installing the launcher outside the prefix to a common directory (e.g. /home/launcher). After getting the launcher verified and logged in, game located etc. close down and then duplicate the prefix folder, move and rename to something else (I usually use the game name and store the prefixes in their own dedicated dot folder near to the games). Now when starting from the game .exe using the "renamed" prefix, it usually logs in and launches the game.
This really is not a suitable solution, and I'm not at all happy with it but that's as far as I got before I got busy on other things.

From what I read online there is still a debate on whats better, single or multiple prefixes. I prefer multiple prefixes for reasons I have mentioned before. It's just a shame to have to jump through so many hoops just to get it to work.

When I get around to it, I will revisit this again, but I'm busy at the moment so I don't know when.

Pete

fargodwe
Level 5
Level 5
Posts: 450
Joined: Mon Oct 02, 2017 7:08 am

Re: Wine prefix communication

Post by fargodwe » Mon May 10, 2021 5:08 pm

I need to change what I originally posted here, so this is a bid edit.

Not being a gamer, I have no way to test this on my linux machine. I don't want to pay for something to try to debug it when it's not something I would use.

After doing a little research about the Obisoft Connect launcher and what it appears to do, from my limited experience I think they will all need to be in the same prefix to truly work. The idea that there is one login point and that it controls what you run, logs results, etc., seems tough to overcome,

When I was talking about running from separate prefixes I actually meant using wine itself to individually run a given game. Can you try running an individual game via the command line and see what it does? If so, please post back your result and the console log.

Found a few things that may help you, but I have no experience with any of them.

https://alternativeto.net/software/upla ... form=linux


Hopefully one of the experts here will see this thread and help out. In the mean time, what "help" or forums or whatever have you been following, if at all, to do this is wine?

Wodger
Newbie
Newbie
Posts: 4
Joined: Sat May 01, 2021 6:51 am

Re: Wine prefix communication

Post by Wodger » Tue May 11, 2021 3:30 am

Hi,

I have been busy with real life stuff that I haven't looked into this again yet.

What pretty much all the linux game launchers do is put the launcher into each prefix with the individual games so you will have to login every time when you want to play the game since most of UBISoft's games are copy protected (Denuvo protections) and typically are "online to start / intermittent check while running" to check legit status and a few games are typically online all the time through the connect launcher for various things.
In short I think you said it well: "tough to overcome".
Steam (Valve) and Epic Games (only recently) are open to Linux users - Steam providing a native Linux launcher enables customization and control of games using their public API (so you don't have to use their launcher to start / run the games - but it needs to start in the background for license check communication / time tracking / online friends / session joining etc.). Epic games on the other hand doesn't provide a native Linux launcher (which is a bit of an annoyance) but an open source alternative for Epic games store games has taken off (Heroic) using the backend of "Legendary" - a native CLI communication app with Epic Games public API - so people are having some more success with Epic Games on Linux using Wine.

I am not aware of many other game launchers other than these two that provide some form of native Linux interface or public API (anyone care to jump in with one I may have missed?)

I monitored the UBISoft connect launcher and game communication within windows using the free "Process Monitor" app, which helped me to decipher what is going on - basically alot of talking to and from the game executable and the launcher / launcher to UBISoft direct to make sure the game is really legit.

To answer your last question - what have I been looking at so far to do this in wine? Pretty much self research and googling. I typically try to solve the problem myself if I can and seek help if I cannot find anything online myself.
I would like to get back to this sometime soon as it would be interesting to see if it is indeed possible.

Lastly, I would like to thankyou for taking the time to answer here - the more heads thinking about these things the better.

Pete

SetantaLP
Level 3
Level 3
Posts: 52
Joined: Mon Jul 31, 2017 3:55 am

Re: Wine prefix communication

Post by SetantaLP » Tue May 11, 2021 4:22 pm

What you could definitely do is installing the games somewhere outside the prefix (if the launcher supports that and if you don't do that already) and also check how the launcher finds the installed games. In case of Steam I know that this is pretty easy (just add the library folder in which the game is in steam and steam will read the manifest files and show the games in the client) for Epic that's a bit more complicated (since the manifests are stored in the ProgramData for the client). For Ubisoft I don't know how that works.

In general you can also run software inside a wine prefix that you installed outside of it. So you could install the launcher in one prefix and run it from the other one, even though that might not fully work because of registry keys. And you can also set dll overrides and similar things at runtime by using environment variables.

What might be possible is to add a drive in winecfg (might just be a simple folder somewhere on your hard drive), install the launcher there, check which registry keys the launcher adds, and copy these keys to the other prefixes and also add the drive there.
And by that, you can use the launcher from all prefixes, without actually installing it in all of them (which brings me to the idea that it could be quite useful if it would be possible to tell wine to write some registry keys in some kind of shared registry multiple prefixes can access.

Post Reply