Is it possible for two prefixes to share a desktop environment?

Questions about Wine on Linux
Post Reply
Kahenraz
Level 1
Level 1
Posts: 7
Joined: Mon Sep 23, 2019 11:52 pm

Is it possible for two prefixes to share a desktop environment?

Post by Kahenraz » Tue Sep 24, 2019 12:14 am

I'm setting up different applications in their own exclusive prefix as a kind of sandbox. Most of these applications don't have to talk to each other and it's easier for me to manage them this way.

Today I noticed that the desktop environment isn't shared between prefixes. For example, I can't FindWindow() across prefixes. That's understandable. Out of curiosity, is there any to override this behavior? This would allow me to continue to keep my applications sandboxed but also allow them to interact with each other.

User avatar
DarkShadow44
Level 8
Level 8
Posts: 1108
Joined: Tue Nov 22, 2016 5:39 pm

Re: Is it possible for two prefixes to share a desktop environment?

Post by DarkShadow44 » Wed Sep 25, 2019 2:36 pm

WINEPREFIXes are not sandboxes. What so you want to accomplish with that?

Two WINEPREFIXES will share the desktop environment, but that does not mean that a program running in one can see the windows in another. They both have their own wineserver, so you can't have them work together. I mean, that's why you separated them, right?

Kahenraz
Level 1
Level 1
Posts: 7
Joined: Mon Sep 23, 2019 11:52 pm

Re: Is it possible for two prefixes to share a desktop environment?

Post by Kahenraz » Wed Sep 25, 2019 4:33 pm

I see. So my question should have been: is it possible to use the same wineserver for two different (but same arch) prefixes?

I don't mean sandbox in the literal sense. But they are effectively sandboxed from each other as far as the Win32 environment is concerned; at least enough for my use case.

The reason I'm doing this is so that I can package my applications into a unique location (by prefix) so that I can copy or move them around as necessary without having to commit to an environment which may contain applications I don't want. This is convenient up until the point where I want to use the same wineserver for inter-process communication, which is why I'm asking here.

I'm already imaging that this isn't possible with the current implementation, specifically due to tight coupling for components which are inherently "single-instance" things such as the registry. It would be a cool feature nonetheless.

This type of environment of instanced prefixes on a single WINE server would be useful for encapsulating programs as single units which can then be administrated through a package manager. This would be ideal and help to make WINE applications integrate much more easily into the desktop environment.

User avatar
DarkShadow44
Level 8
Level 8
Posts: 1108
Joined: Tue Nov 22, 2016 5:39 pm

Re: Is it possible for two prefixes to share a desktop environment?

Post by DarkShadow44 » Thu Sep 26, 2019 1:20 pm

That's not supported. Keep in mind that wineserver also needs the registry and settings, and those are different for each WINEPREFIX.
You can however run one program in another WINEPREFIX, but the application needs to be portable for that.

Post Reply