[FAQ] [RFC] How can multiple users share an installed Wine a

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Paul Menzel

[FAQ] [RFC] How can multiple users share an installed Wine a

Post by Paul Menzel »

Dear Wine users,


could you please review the following question and add it to the FAQ
[1].

=== How can multiple users share an installed Wine application? ===

»Wine is a per-user app; every user has their own Wine Registry, with
the list of installed apps for that user.

So one user installing App A is not going to tell the Wine Registry of
any other user that App A is installed. The other user will have to
install the application as well.« [2]

So this scenario is not officially supported. There are some solutions
written down on the WWW as for example for Ubuntu [3].


Thanks,

Paul


[1] http://wiki.winehq.org/FAQ
[2] http://www.winehq.org/pipermail/wine-us ... 15831.html
[3] http://ubuntuforums.org/showthread.php?t=917422
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://www.winehq.org/pipermail/wine-us ... chment.pgp>
User avatar
dimesio
Moderator
Moderator
Posts: 13202
Joined: Tue Mar 25, 2008 10:30 pm

Re: [FAQ] [RFC] How can multiple users share an installed Wi

Post by dimesio »

Paul Menzel wrote:Dear Wine users,


could you please review the following question and add it to the FAQ
[1].

=== How can multiple users share an installed Wine application? ===

»Wine is a per-user app; every user has their own Wine Registry, with
the list of installed apps for that user.

So one user installing App A is not going to tell the Wine Registry of
any other user that App A is installed. The other user will have to
install the application as well.« [2]

So this scenario is not officially supported. There are some solutions
written down on the WWW as for example for Ubuntu [3].
Using one wineprefix for multiple users is not supported at present because of the risk of registry corruption (bug #11112), and no, we are not going to point users to outside sites telling them how to do things that can trash their wineprefix.

There probably should be an FAQ item explaining this, however, as the question does come up from time to time. I'll add it.
Paul Menzel

[FAQ] [RFC] How can multiple users share an installed Wine a

Post by Paul Menzel »

Am Samstag, den 02.01.2010, 10:00 -0600 schrieb dimesio:
Paul Menzel wrote:
could you please review the following question and add it to the FAQ
[1].

=== How can multiple users share an installed Wine application? ===

»Wine is a per-user app; every user has their own Wine Registry, with
the list of installed apps for that user.

So one user installing App A is not going to tell the Wine Registry of
any other user that App A is installed. The other user will have to
install the application as well.« [2]

So this scenario is not officially supported. There are some solutions
written down on the WWW as for example for Ubuntu [3].
Using one wineprefix for multiple users is not supported at present
because of the risk of registry corruption (bug #11112
(http://bugs.winehq.org/show_bug.cgi?id=11112)),
Understood.
and no, we are not going to point users to outside sites telling them
how to do things that can trash their wineprefix.
My text was just a suggestion.
There probably should be an FAQ item explaining this, however, as the
question does come up from time to time. I'll add it.
Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://www.winehq.org/pipermail/wine-us ... chment.pgp>
fcmartins
Level 4
Level 4
Posts: 114
Joined: Sat Nov 01, 2008 5:48 pm

Post by fcmartins »

bug #11112 http://bugs.winehq.org/show_bug.cgi?id=11112 is about running multiple wineservers at the same time.

In a common situation of multiple users sharing the same machine, obviously not at the same time, the solution on that howto http://ubuntuforums.org/showthread.php?t=917422 does not seem problematic.

Of course, if the users' home are shared over the network, that solution doesn't work even if using the same user account.

Personally I prefer to have different wineprefixes per application and per user but keep the program files in a shared location (just using a drive letter to point to it).
Paul Menzel

[FAQ] [RFC] How can multiple users share an installed Wine a

Post by Paul Menzel »

Am Sonntag, den 03.01.2010, 04:35 -0600 schrieb fcmartins:

[…]
Personally I prefer to have different wineprefixes per application and
per user but keep the program files in a shared location (just using a
drive letter to point to it).
That is interesting.

The first user install his application using wine and selects the shared
location. How does the second user get the program installed, that means
get this application registered as installed? How do you handle the file
permissions?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://www.winehq.org/pipermail/wine-us ... chment.pgp>
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Post by oiaohm »

fcmartins way does work. But we don't go around recommending due to a few issues.

Number 1 applications that only allow one per user to be run. Yes it can get really screwy with the setup the Ubuntu users describe. Particular if the event of two users running it ever happened. Multi head setups.

Number 2 the wine system normally ends up with access to everyone usb devices and the like. So if infected will infect everyone.

Even the shared location has issues. Particular with application updating and registry records.

Really without addressing the wineserver issue we are really playing with fire every way is a hack and shows it.

I know is hard for people to accept there is no way at this stage to do it without downsides. Some of them are secuirty nightmares others are update nightmares and some are a mixture of both.
User avatar
dimesio
Moderator
Moderator
Posts: 13202
Joined: Tue Mar 25, 2008 10:30 pm

Post by dimesio »

fcmartins wrote: In a common situation of multiple users sharing the same machine, obviously not at the same time, the solution on that howto http://ubuntuforums.org/showthread.php?t=917422 does not seem problematic.
That "solution" requires users to run Wine as sudo.
fcmartins
Level 4
Level 4
Posts: 114
Joined: Sat Nov 01, 2008 5:48 pm

Post by fcmartins »

oiaohm wrote:fcmartins way does work. But we don't go around recommending due to a few issues.
...

Really without addressing the wineserver issue we are really playing with fire every way is a hack and shows it.
yes, thanks for listing these. Further, my "solution" is not suitable to CLI averse people.
Paul Menzel wrote: How does the second user get the program installed, that means
get this application registered as installed? How do you handle the file
permissions?
I just copy the .wine folder per application, per user. What I do is keep a /home/user/WinePrefixes folder per user. After install and tweaking I do
mv .wine to admin/WinePrefixes/appname
then hand-edit .desktop file to open from the renamed prefix. Then, for each user (not tested, from the top of my head),
su user
cd
cp -r /home/admin/WinePrefixes/appname WinePrefixes
cp /home/admin/Desktop/appname.desktop Desktop

hand-edit appname.desktop so that it reflects the users WinePrefix.

As for permissions, if the application uses MyDocuments (which recent games do), each user's Documents folder is used transparently. Otherwise, if needed I do

sudo chmod -R 775 /path-to-app/appname

assuming all users are in the same group. I vaguely remember a case where I had to do 777 and another in which it didn't work at all because a file was always be recreated with 700 or something like that. Not perfect, in practice works for most of the apps.

For the record, I think my "solution" requires more work than the one on ubuntu's. I have 4 users sharing two computers, and /home is network-shared. So this solution is suitable for my setup. It is certainly not recommendable in general.
perryh

[FAQ] [RFC] How can multiple users share an installed Wine a

Post by perryh »

"dimesio" <winehq.org![email protected]> wrote:
fcmartins wrote:
In a common situation of multiple users sharing the same
machine, obviously not at the same time, the solution on
that howto http://ubuntuforums.org/showthread.php?t=917422
does not seem problematic.
That "solution" requires users to run Wine as sudo.
Which might be perfectly OK if sudo were configured to run
wine as a unique wine user, rather than as root.
Snaga
Newbie
Newbie
Posts: 2
Joined: Fri Jun 13, 2014 2:20 pm

Re: [FAQ] [RFC] How can multiple users share an installed Wi

Post by Snaga »

In the following use case, there is a problem that needs to be solved.

I have set up an Ubuntu machine for customer use in a copier store. Customers can view, compose, and print documents. But sometimes they need to print MS Word documents that may not format correctly in LibreOffice. I have installed MS Word Viewer from the Microsoft website for the administrative account. No problems so far.

The difficulty comes when using the Ubuntu Guest account. It is a new account created each time a user logs in, and when they log out, the account and all saved data are deleted. It is not a sudo account. It is not possible to reinstall MS Office Viewer each time a user logs in.

I have set up a dummy user called "Guest Options" that, if I remember right, uses a copy of /var/skel to populate the launcher and things like Firefox options. It copies the user preferences from the Options account to the temporary guest account, but it will not copy installed Wine applications in a way that lets them run.

The Ubuntu Guest account is an important feature. I haven't used Windows for years, but I think they have a guest account feature, too. Using non-native applications on this account is sometimes a necessity. Currently there doesn't seem to be a way to do it. Wine architecture is a handicap.

What options do I have? Is WineHQ working on anything that would let a guest user run installed Wine applications? If not, what is the least offensive hack you know of?
User avatar
dimesio
Moderator
Moderator
Posts: 13202
Joined: Tue Mar 25, 2008 10:30 pm

Re: [FAQ] [RFC] How can multiple users share an installed Wi

Post by dimesio »

but it will not copy installed Wine applications in a way that lets them run.
How exactly is it copying them? Copying the whole wineprefix should work.
Snaga
Newbie
Newbie
Posts: 2
Joined: Fri Jun 13, 2014 2:20 pm

Re: [FAQ] [RFC] How can multiple users share an installed Wi

Post by Snaga »

dimesio wrote:
but it will not copy installed Wine applications in a way that lets them run.
How exactly is it copying them? Copying the whole wineprefix should work.
Well, I used a third-party app to create a custom launcher for MS Office Viewer on the dummy account. It also has an icon on the desktop that for some reason can't be removed without erasing the launcher.

Anyway, when I go to the guest session, everything from the dummy account is visible, including Firefox preferences and the icon on the desktop. But of course clicking the icon or launcher does nothing, because it means you are trying to open another user's Wine installation.

But as I said, running a startup script to copy the Wine directory and the associated icons, etc. in other directories to the new guest account is a very awkward hack that I'd like to avoid.

I'm hoping WineHQ comes up with a solution that works with an Ubuntu guest session. In fact, I'm hoping Ubuntu comes up with a better way to customize the guest session.

Still, I'm open to your solution. Can you point me to a post that describes how to "copy the whole wineprefix" with a startup script? Remember it has to work for a locked-down guest session.
User avatar
dimesio
Moderator
Moderator
Posts: 13202
Joined: Tue Mar 25, 2008 10:30 pm

Re: [FAQ] [RFC] How can multiple users share an installed Wi

Post by dimesio »

I don't know what third party app you used, but none of them are supported here.

As for startup scripts, you can try searching the forum, but I don't recall the issue of Ubuntu "guest" sessions ever coming up before, and I've never used it, so I know nothing about how to set things up in it. You should probably ask about it on the Ubuntu forum. What I can tell you is that the whole wineprefix needs to be copied, and the guest user needs to be set as the owner.

You also might want to look into Crossover. I believe they have a way to share "bottles" between all users on a given system that involves symlinks. (That might be something you could do with plain Wine, too, if you can figure out exactly how Crossover symlinks things.)
marcus@wine
Newbie
Newbie
Posts: 1
Joined: Thu Nov 12, 2015 5:55 am

Re: [FAQ] [RFC] How can multiple users share an installed Wi

Post by marcus@wine »

I have created a tool to have a shared wine environment

https://sourceforge.net/projects/sharedwine/

It will share the C: files, but create separate profiles and registries for each linux user.
Locked