Using .wine directory of another user?

Questions about Wine on Linux
Locked
stem
Level 1
Level 1
Posts: 6
Joined: Sun Jun 07, 2015 10:41 am

Using .wine directory of another user?

Post by stem »

Hi,

I have two users, "admin" with sudo privileges and "normaluser" without sudo privileges. At every login, the home directory of "normaluser" gets restored.

In order to keep the home directory of "normaluser" small, I'm wondering if it is possible that "normaluser" uses the .wine directory of "admin".

Any ideas? :wink:

Thank you alot!


stem
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: Using .wine directory of another user?

Post by jkfloris »

Never run Wine as root!

The wineprefix (the .wine directory) can be anywhere on your system as long as you have the right permissions.
You probably do not have permission to look in the /root directory, so that location is not possible.
But you can create a folder in /opt and save your wine prefixes there.
For example:

Code: Select all

sudo mkdir /opt/wine-prefixes
sudo chown username:groupname /opt/wine-prefixes  # Replace username:groupname
WINEPREFIX=/opt/wine-prefixes/wine wine program.exe # <- Don't use sudo here!
Read the Wine Wiki for more information: https://wiki.winehq.org/FAQ#Wineprefixes
stem
Level 1
Level 1
Posts: 6
Joined: Sun Jun 07, 2015 10:41 am

Re: Using .wine directory of another user?

Post by stem »

Hi,

thank you for your answer!

So is it possible to "prepare" this folder with the "admin" user and give "normaluser" read-only permissions to that directory? The idea is to make available certain Windows applications, but the "normaluser" (which could be different persons at different logins) should
a) not be able to change anything and
b) have the same state of the Windows applications at every login.


stem
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: Using .wine directory of another user?

Post by jkfloris »

So is it possible to "prepare" this folder with the "admin" user and give "normaluser" read-only permissions to that directory?
In theory this should work, but keep in mind that some Windows programs must have write access to certain folders.
which could be different persons at different logins
This is more difficult to solve. Wine demands that the user is also the owner of the Wine prefix.
You could fool Wine with symlinks, but this is unsupported and can cause registry corruption.
Locked