How do I do a multi-user WINE prefix?

Questions about Wine on Linux
Locked
JontomXire
Level 2
Level 2
Posts: 37
Joined: Wed Sep 28, 2011 8:01 am

How do I do a multi-user WINE prefix?

Post by JontomXire »

Increasingly these days, games install themselves on a per-user basis. Steam does it, Minecraft does it...and Wine does it. I may be a bit of a dinosaur, but this seems to be very stupid to me. I have a family. We share use of computers. If I and my family all want to play the same game, it doesn't make sense to install 5 different copies of it on the same PC!

When I use WINE I create a prefix per game under /wine so that they can be shared by all users...but I have found that this doesn't work. Even when I give everyone full permissions on all files and directories in the prefix, WINE still refuses to let anyone but the creator/owner use it.

This is very irritating. Short of having a "start" script for the prefix which first changes all permissions (and I am not sure even that will necessarily work), how do I make a Wine prefix so it can be used by all users?
jkfloris
Level 12
Level 12
Posts: 3201
Joined: Thu Aug 14, 2014 10:10 am

Re: How do I do a multi-user WINE prefix?

Post by jkfloris »

Due to bug 11112, it is not possible for multiple users to use the same prefix at the same time.
However, there are some options to get around this.
- If it is not the intention to play the same game at the same time, then you can create a "game" user, of which everyone knows the login details, and install the games under that account.
- Using symbolic links, create a reference to the shared wineprefix.
spoon0042
Level 6
Level 6
Posts: 572
Joined: Thu Dec 24, 2009 11:00 am

Re: How do I do a multi-user WINE prefix?

Post by spoon0042 »

afaik there's no easy way to do this, there is a brief mention in the faq here: https://wiki.winehq.org/FAQ#Can_I_insta ... e_users.3F

... even though you'd probably only ever have one user running things at a time.

Just running 'chown -R' should mostly work, though there is the issue of by default wine linking 'My Documents' and others to directories under the home directory of whichever user created the wineprefix.

Another approach would be configuring Steam to use a common library path. I don't know if other platforms allow that but for Steam at least you could save space that way. (symlinks could be an option for others but that's getting complicated and requires some manual effort.)
roker
Newbie
Newbie
Posts: 1
Joined: Thu Aug 26, 2021 7:44 am

Re: How do I do a multi-user WINE prefix?

Post by roker »

JontomXire wrote: Tue Aug 17, 2021 1:15 am Increasingly these days, games install themselves on a per-user basis. Steam does it, Minecraft does it...and Wine does it. I may be a bit of a dinosaur, but this seems to be very stupid to me. I have a family. We share use of computers. If I and my family all want to play the same game, it doesn't make sense to install 5 different copies of it on the same PC!

When I use WINE I create a prefix per game under /wine so that they can be shared by all users...but I have found that this doesn't work. Even when I give everyone full permissions on all files and directories in the prefix, WINE still refuses to let anyone but the creator/owner use it.

This is very irritating. Short of having a "start" script for the prefix which first changes all permissions (and I am not sure even that will necessarily work), how do I make a Wine prefix so it can be used by all users?
Short answer, as mentioned before, you can't but there is a very nice workaround you can do to preserve your disk while letting every user to have it's own prefix. Keep the in mind that this uses no third-party software like Steam or Lutris, this is standalone program/game installation

Wine prefixes have a folder called

Code: Select all

dosdevices
which can expose linux resources to wine environment more easily.
Basically you want to create some kind of installation folder in you system,

Code: Select all

/opt/wine-games
for example. All users that will use this need to have access to this folder so don't forget to check permissions.
Then you will symlink this folder to a letter inside dosdevices:

Code: Select all

ln -s /opt/wine-games <yourwineprefix>/dosdevices/d:
(it could be any letter you want besides C: or Z: that already used in wine)
This will make anything inside wine to see this folder as a new drive in your system, similar to Windows. Then you can install your game into "D:\" in wine.
Now copy and chown this wine prefix to each user, copy its shortcut (if there is any) and enjoy!

I personally use this to share files between wine prefixes in my system and works very well!
Locked