I am using ubuntu 15.04.

I have installed wine in the superuser account so that I can use MS office 2010. But I can't use it when I login the other normal user account.

Is is possible to set the applications to be for all users, so that I need not install them again the in other accounts?

  • 1
    If the file permissions are set for other=rx on the directories containing these applications and the executables of the applications it will work. Could you describe the location of some of these applications so that a more complete answer can be provided?
    – Stephen
    Jun 17 '15 at 12:17
  • For example, I've installed wine in superuser so that I can use MS office 2010. But in the normal user account I can't see wine at all. Even in the superuser login, I have no idea where the wine directory and files are.
    – velut luna
    Jun 17 '15 at 12:45
  • 1
    Wine places content into the user's home directory. If you're going to share a wine instance, you should probably put the .wine folder in a common location, then set WINEPREFIX to that location before trying to launch an application. All users that need to access it should then belong to a similar group, or set group to rxw for those files. If this is the question you want answered, update your question and I (or someone else) can provide a detailed answer.
    – Stephen
    Jun 17 '15 at 14:42
  • Did you actually install wine to the root user's home directory (that is, putting the executable for wine and related binaries in the /root folder,) or do you mean you used wine to install applications as root?
    – Stephen
    Jun 17 '15 at 21:37
  • Hi Stephen, I purchased crossover and installed it. And then I installed MS office 2010.
    – velut luna
    Jun 18 '15 at 0:28

I'm going to assume you installed wine via apt-get from the typical repositories or that you added a ppa for wine and installed it from there or generally just have wine installed such that any user can run it. If you have some other setup, add a comment and I'll update my post.

So, here's what needs to be done:

  1. You need to put the files somewhere that all the users that will be running wine can read/write.
  2. You need to set the permissions on the directories and files so that all the users that will be running wine can use them.
  3. You need to update any paths that refer to the old location

For 1 -- You can just copy the files to a common location, such as /opt/windows. To do this: sudo cp -r /root/.wine /opt/windows

For 2 -- If you have more than one user that will be using the various windows applications, you will need to make sure they are all part of a common group, or if you only have one user you can set the owner to that user.

Option a: If you have one user, just change the owner recursively for the directory. This is easier, so I'll describe this first:

sudo chown -R $USER:$USER /opt/windows

Option b: If you have multiple users, then you need to create a new group, change the ownership of the directory to the new group, set file permissions, and then log out and back in so the new group settings take effect. don't do this if you used the previous method of just one user.

sudo groupadd wine
sudo usermod -a -G wine $USER
sudo chgrp -R /opt/windows
sudo chmod -R g+rw /opt/windows
sudo find /opt/windows -type d | while read DIR ; do sudo chmod g+rwx "${DIR}" ; done
#this is where you would log out and back in.

Also, whenever you add a new user to the system and that user will be using wine, add them to the group: sudo usermod -a -G wine NEW_USER

For 3 -- When you run wine it puts files in ~/.wine/. Some of these files contain absolute paths. Since you've moved /root/.wine to /opt/windows, these paths need to be updated. You can manually update these by using winecfg and updating the "Links to" entries for all the folders under the "Desktop Integration" tab. If you created a new group for the user, then you need to have logged out and back in before you do this. To do this, set the prefix for wine and run winecfg:

WINEPREFIX=/opt/windows winecfg

Once the paths have been updated, click okay and you should be ready to run any of the applications as a normal user.

Before you run any applications, you will need to set WINEPREFIX to /opt/windows. If there are any ".desktop" files for applications you have installed, you need to modify them to include the WINEPREFIX. You could also put export WINEPREFIX=/opt/windows in your .bash_profile or .bashrc so you don't have to manually specify it at the command line.

If you can update your question with a description of how you launch any of the installed applications I can further cater the answer.

Also, as an aside, when I install new applications through wine, I tend to use a different WINEPREFIX for each application. That way if they have strange settings or incompatible dependencies, I don't inadvertently break old applications when installing new applications. Then, for dependencies, I use winetricks to fetch and install.

  • sorry, i struggle with point nm 3. i dont know where to change the paths
    – user238156
    Apr 13 '16 at 14:03
  • 1
    When you run winecfg, look at the tab regarding Desktop Integration. For all of the "Folders" entries, uncheck the "Link to" option to discard the links, or type in a new location, for each. For example: Desktop -> /opt/windows/Desktop
    – Stephen
    Apr 13 '16 at 23:34
  • I don't know if it is because WINE has changed since this answer, but I find the suggestions here do not work. WINE absolutely insists that the current user must be the owner of the wine directory.
    – AlastairG
    Oct 31 '20 at 11:42

Unfortunately it seems wine checks owner of the prefix directory. Unsure if it checks for every file, but it seems to do for $WINEPREFIX (default ~/.wine) on recent versions. I ran into the problem after having created a group and adding users to that group. Winedebug just complains about other users not being owner. My guess is best option is leaving .wine where it is (~/.wine) and try setting up a drive_d with shared ownerships inside (). Not sure if it will work, but I am sure shared ownership of .wine / WINEPREFIX will give problems not mentioned here. Would be nice you could make a common user too with no rights except to read/write files for wine and no need for password. Haven't seen any suggestions how to set this all up for wine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.