How can wine be available for all users?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
pcdoctor
Level 1
Level 1
Posts: 7
Joined: Fri Jun 06, 2008 6:06 am

How can wine be available for all users?

Post by pcdoctor »

I'm using kubuntu 8.04 and I'm able to run three programs that I installed but another user can't. Is there any way to make .wine available for all users? I thought about copying .wine to wine in /usr/lib/wine or /usr/bin/wine.

Nevermind, I found this:
http://ubuntuforums.org/showthread.php?t=917422
Warren Dumortier

How can wine be available for all users?

Post by Warren Dumortier »

I might be a nub, but you could symlink a .wine dir for each user to your
.wine directory...

2008/10/20 pcdoctor <[email protected]>
I'm using kubuntu 8.04 and I'm able to run three programs that I installed
but another user can't. Is there any way to make .wine available for all
users? I thought about copying .wine to wine in /usr/lib/wine or
/usr/bin/wine.





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-us ... chment.htm
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: How can wine be available for all users?

Post by vitamin »

Warren Dumortier wrote:I might be a nub, but you could symlink a .wine dir for each user to your .wine directory...
No you can't.
Erik Hahn

How can wine be available for all users?

Post by Erik Hahn »

On Mon, Oct 20, 2008 at 05:50:51AM -0500, pcdoctor wrote:
I'm using kubuntu 8.04 and I'm able to run three programs that I installed
but another user can't. Is there any way to make .wine available for
all users? I thought about copying .wine to wine in /usr/lib/wine or
/usr/bin/wine.
That should work, better use /usr/wine or something under /opt. You have
to set the WINEPREFIX variable to the location, also make sure you get
the access rights right (Users need read access of course, avoid write
access if possible)

-Erik

--
hackerkey://v4sw5hw2ln3pr5ck0ma2u7LwXm4l7Gi2e2t4b7Ken4/7a16s0r1p-5.62/-6.56g5OR
Erik Hahn

How can wine be available for all users?

Post by Erik Hahn »

On Mon, Oct 20, 2008 at 11:17:48AM -0500, vitamin wrote:
Warren Dumortier wrote:
I might be a nub, but you could symlink a .wine dir for each user to your .wine directory...
No you can't.
Why not (as long as the permissions are set correctly, that is)?
--
hackerkey://v4sw5hw2ln3pr5ck0ma2u7LwXm4l7Gi2e2t4b7Ken4/7a16s0r1p-5.62/-6.56g5OR
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

How can wine be available for all users?

Post by austin987 »

On Mon, Oct 20, 2008 at 11:53 AM, Erik Hahn <[email protected]> wrote:
On Mon, Oct 20, 2008 at 11:17:48AM -0500, vitamin wrote:
Warren Dumortier wrote:
I might be a nub, but you could symlink a .wine dir for each user to your .wine directory...
No you can't.
Why not (as long as the permissions are set correctly, that is)?
--
hackerkey://v4sw5hw2ln3pr5ck0ma2u7LwXm4l7Gi2e2t4b7Ken4/7a16s0r1p-5.62/-6.56g5OR

Wineserver doesn't support running multiple instances on the same prefix.
http://bugs.winehq.org/show_bug.cgi?id=11112

--
-Austin
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: How can wine be available for all users?

Post by vitamin »

Erik Hahn wrote:Why not (as long as the permissions are set correctly, that is)?
You can't share registry. You can't share any files read/write. And as Austin noted wineserver doesn't support more then one user per prefix.

Each user have to have their own WINEPREFIX. You can only share files read-only or you risking file corruption.
Erik Hahn

How can wine be available for all users?

Post by Erik Hahn »

On Mon, Oct 20, 2008 at 03:05:33PM -0500, vitamin wrote:
Erik Hahn wrote:
Why not (as long as the permissions are set correctly, that is)?
You can't share registry. You can't share any files read/write. And as Austin
noted wineserver doesn't support more then one user per prefix.

Each user have to have their own WINEPREFIX. You can only share files
read-only or you risking file corruption.
Do you refer to multiple users using the prefix at the same time or at
different times? After all there usually aren't multiple users logged in
at the same time.

--
hackerkey://v4sw5hw2ln3pr5ck0ma2u7LwXm4l7Gi2e2t4b7Ken4/7a16s0r1p-5.62/-6.56g5OR
stimpak
Level 3
Level 3
Posts: 72
Joined: Tue Apr 01, 2008 12:56 pm

Post by stimpak »

why assume that two or more people will be running wine at the same time?

from what i've gathered so far, most ppl have an ubuntu rig, which they have an account for them, another account for their sister/spouse/grandma or whoever. The whole idea is that the other accounts will be able to run their applications without having to access another account /home/~/.wine.
we're talking about centralization here!

Dont assume that every linux distro is to be run in a multi-user environment and dont assume that it is even running as server!!

i think its quite possible if you put restrictions, and warnings and thus allowing one account to run wine at a given time
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

stimpak wrote:why assume that two or more people will be running wine at the same time?
Because this is waht *NIX is. And that is what it's made for.

Anyway, wineserver won't let you use someone else's WINEPREFIX. Each user still have to have their own.
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

How can wine be available for all users?

Post by austin987 »

On Tue, Oct 21, 2008 at 7:53 AM, stimpak <[email protected]> wrote:
why assume that two or more people will be running wine at the same time?

from what i've gathered so far, most ppl have an ubuntu rig, which they have an account for them, another account for their sister/spouse/grandma or whoever. The whole idea is that the other accounts will be able to run their applications without having to access another account /home/~/.wine.
we're talking about centralization here!

Dont assume that every linux distro is to be run in a multi-user environment and dont assume that it is even running as server!!

i think its quite possible if you put restrictions, and warnings and thus allowing one account to run wine at a given time





*Nix is designed to be a multiuser system, even if you don't use it
that way. If you're adventurous, you can patch around it, but you risk
corruption of the registry, permission errors, etc.

Of course, if you've got a better implementation that would prevent
corruption, etc., patches are welcome.
--
-Austin
stimpak
Level 3
Level 3
Posts: 72
Joined: Tue Apr 01, 2008 12:56 pm

Post by stimpak »

vitamin wrote:
stimpak wrote:why assume that two or more people will be running wine at the same time?
Because this is waht *NIX is. And that is what it's made for.

not anymore, or soon enough at least, more and more rigs are being sold with Ubuntu in them by default. Are we going to turn a blind eye on them and just say they're the minority and we dont care about them?


austin987 wrote:Of course, if you've got a better implementation that would prevent
corruption, etc., patches are welcome.
Still working on that, need to learn C first and review the algorithms WINE uses to run
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

How can wine be available for all users?

Post by austin987 »

On Tue, Oct 21, 2008 at 1:59 PM, stimpak <[email protected]> wrote:
vitamin wrote: stimpak wrote:
why assume that two or more people will be running wine at the same time?
Because this is waht *NIX is. And that is what it's made for.

not anymore, or soon enough at least, more and more rigs are being sold with Ubuntu in them by default. Are we going to turn a blind eye on them and just say they're the minority and we dont care about them?
While it may be more often used for that purpose, Unixlike systems are
at their heart, mulituser systems. Multiple users could share that
directory over VNC/SSH with X11 forwarding/etc.

--
-Austin
JuEUS-U
Level 2
Level 2
Posts: 11
Joined: Tue Oct 21, 2008 7:46 pm

Post by JuEUS-U »

I think sharing 'wineserver' is better than sharing 'WINEPREFIX'.
bcuz it's little bit risky to let a number of process access a file at the same time.
Make the wineserver a real "server". This might be funny :D
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

JuEUS-U wrote:I think sharing 'wineserver' is better than sharing 'WINEPREFIX'.
bcuz it's little bit risky to let a number of process access a file at the same time.
Make the wineserver a real "server". This might be funny :D
It's much more complicated then seems.
occhigrigi
Level 2
Level 2
Posts: 24
Joined: Wed Oct 22, 2008 5:01 am

Post by occhigrigi »

I've done it this way
Created a /windows directory where i put all the WINEPREFIX created for every application i need.
Here is an example with 3 applications

/windows
/windows/remedes
/windows/remedes/drive_c
/windows/remedes/user.reg
/windows/remedes/userdef.reg
/windows/remedes/system.reg
/windows/remedes/dosdevices
/windows/lotusnotes
/windows/lotusnotes/drive_c
/windows/lotusnotes/user.reg
/windows/lotusnotes/userdef.reg
/windows/lotusnotes/system.reg
/windows/lotusnotes/dosdevices
/windows/teraterm
/windows/teraterm/drive_c
/windows/teraterm/user.reg
/windows/teraterm/userdef.reg
/windows/teraterm/system.reg
/windows/teraterm/dosdevices


Then I've made a launch script for every application
Here's the script i use for lotusnotes

winapp=lotusnotes
if [ ! -d $HOME/.windows/$winapp ]; then
mkdir -p $HOME/.windows/$winapp
cd $HOME/.windows/$winapp
ln -s /windows/$winapp/dosdevices
ln -s /windows/$winapp/drive_c
ln -s /windows/$winapp/system.reg
cp /windows/$winapp/user.reg .
ln -s /windows/$winapp/userdef.reg
fi
export WINEPREFIX=$HOME/.windows/$winapp
wine 'c:\programmi\lotus\notes\notes.exe' 2> /dev/null


As you can see I use a ~/.windows to link all the necessary files ad directories for each user.
So i can still have a ~/.wine for each user's use

Disadvantages: security, under /windows each dir has to be 777 and disk space waste
Advantages: every user still has his own settings.

Hope this helps
stimpak
Level 3
Level 3
Posts: 72
Joined: Tue Apr 01, 2008 12:56 pm

Post by stimpak »

exactly the file hierarchy i was thinking about!

put the core files somewhere reachable for all users,but instead of making syslinks, wouldnt be best or possible to create separate *.reg for each account, so you wont risk a registry corruption?

still that script doesnt make WINE multiuser (as in many users as the same time - so dont try that if you're looking for that solution), but its good enough for rigs that have only one user active at any given time. - such as desktop computers
Craig73
Level 1
Level 1
Posts: 6
Joined: Fri Dec 05, 2008 11:31 pm

Post by Craig73 »

stimpak wrote:exactly the file hierarchy i was thinking about!

put the core files somewhere reachable for all users,but instead of making syslinks, wouldnt be best or possible to create separate *.reg for each account, so you wont risk a registry corruption?

still that script doesnt make WINE multiuser (as in many users as the same time - so dont try that if you're looking for that solution), but its good enough for rigs that have only one user active at any given time. - such as desktop computers
Why doesn't the script make Wine multiuser? All the shared (ie - non-user modifiable files) are in a central directory and the registry (user modifiable) is the users directory. I might comment that the users profile folder and the temp folders are not local, but the users profile folder should be unique and the Wine should only ever hand out unique files in temp. So there is a privacy/security risk of having the temp and user profile folder exposed, but it shouldn't prevent multiuser should it?

[I haven't played much behind the scenes, so what am I not understanding?]
Craig73
Level 1
Level 1
Posts: 6
Joined: Fri Dec 05, 2008 11:31 pm

Post by Craig73 »

Craig73 wrote:
stimpak wrote:exactly the file hierarchy i was thinking about!

put the core files somewhere reachable for all users,but instead of making syslinks, wouldnt be best or possible to create separate *.reg for each account, so you wont risk a registry corruption?

still that script doesnt make WINE multiuser (as in many users as the same time - so dont try that if you're looking for that solution), but its good enough for rigs that have only one user active at any given time. - such as desktop computers
Why doesn't the script make Wine multiuser? All the shared (ie - non-user modifiable files) are in a central directory and the registry (user modifiable) is the users directory. I might comment that the users profile folder and the temp folders are not local, but the users profile folder should be unique and the Wine should only ever hand out unique files in temp. So there is a privacy/security risk of having the temp and user profile folder exposed, but it shouldn't prevent multiuser should it?

[I haven't played much behind the scenes, so what am I not understanding?]
Sorry - my idea for a application setup would be all this stuff in the script file be run once, the first time the application is setup. (I can see where it would cause issues if that ran every time)
Locked