It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Edit: For those reading in the future, I've decided that the method I'll use is to stop wine from creating anything outside the prefixes as indicated in the solution post, and to create little scripts in the base directory of each one which does the same thing as a .desktop file would. Any time I'll ever save by having those entries in Whisker menu has been overtaken by the amount of time already used fighting to make them work consistently.

Give a look to the other good suggestions given in this thread too which may work better for you!

An example script which should work for any game by changing the third and fourth line:

#!/bin/bash
export WINEPREFIX="$PWD"
cd "./drive_c/GOG Games/Europa Universalis III Complete"
wine eu3.exe

Original post:

Hi all,

This is an issue that's been plaguing me since I started using Wine to play Windows games. How do you make it so you don't have to reinstall every Windows game you own when you change computers or want to change the directory they're in? I have a feeling I don't know the location of some Wine config file that lists all prefixes, and you may see by my processes that that's the case; please let me know if so.

Setting up and using a new Wine prefix wherein I install a game with its installer works flawlessly for me every time, but as soon as I want to reuse the set up prefix on a different computer or I want to change the location of it, I have issues almost every time. I'll focus on the moving because that's what's really bothering me now.

I decided today that I'd like to have my Wine games be set up in my home folder differently, e.g. instead of ~/.wine-whatever it would be ~/Wine/Whatever.

What am I doing wrong? My process:

1. Move the contents of ~/.wine-whatever into ~/Wine/Whatever
2. Change the appropriate desktop files in ~/.local/share/applications/wine/Programs to point everything to the new location, escaping spaces only when appropriate.
3. Making sure everything is ok in ~/.config/menus
4. Try to run the game through the entry in Whiskermenu (I use XFCE)

Sometimes it works, and sometimes Wine pops up saying it's configuring the prefix, and it does so by setting up a new one in .wine-whatever and blowing away my desktop and menu files! If I had backed those files up before and restore them after their unwarranted deletion, then trying to launch through Whiskermenu gives a useless "Error: File not found" Wine popup, but running the .desktop file directly works...

What am I missing? When I copy the wine prefixes and desktop files to the same location and name on a new computer and try to launch it, wine complains that it can't set up a new wine prefix in the space that I just copied everything into!

My searches online lead to either irrelevant winehq pages or tips on how to move literal wine bottles safely without breaking them.

What a frustrating mess.
Post edited October 23, 2016 by pbnjoe
This question / problem has been solved by immi101image
avatar
pbnjoe: Hi all,

This is an issue that's been plaguing me since I started using Wine to play Windows games. How do you make it so you don't have to reinstall every Windows game you own when you change computers or want to change the directory they're in? I have a feeling I don't know the location of some Wine config file that lists all prefixes, and you may see by my processes that that's the case; please let me know if so.

Setting up and using a new Wine prefix wherein I install a game with its installer works flawlessly for me every time, but as soon as I want to reuse the set up prefix on a different computer or I want to change the location of it, I have issues almost every time. I'll focus on the moving because that's what's really bothering me now.

I decided today that I'd like to have my Wine games be set up in my home folder differently, e.g. instead of ~/.wine-whatever it would be ~/Wine/Whatever.

What am I doing wrong? My process:

1. Move the contents of ~/.wine-whatever into ~/Wine/Whatever
2. Change the appropriate desktop files in ~/.local/share/applications/wine/Programs to point everything to the new location, escaping spaces only when appropriate.
3. Making sure everything is ok in ~/.config/menus
4. Try to run the game through the entry in Whiskermenu (I use XFCE)

Sometimes it works, and sometimes Wine pops up saying it's configuring the prefix, and it does so by setting up a new one in .wine-whatever and blowing away my desktop and menu files! If I had backed those files up before and restore them after their unwarranted deletion, then trying to launch through Whiskermenu gives a useless "Error: File not found" Wine popup, but running the .desktop file directly works...

What am I missing? When I copy the wine prefixes and desktop files to the same location and name on a new computer and try to launch it, wine complains that it can't set up a new wine prefix in the space that I just copied everything into!

My searches online lead to either irrelevant winehq pages or tips on how to move literal wine bottles safely without breaking them.

What a frustrating mess.
I just rename the .wine folder to something relevant. So if I have a .wine prefix with Unreal Engine 4 games I just rename it ".wine_unreal_4". As for my other prefixes, I just rename the prefix I want to use back to ".wine", run winecfg, and away I go :)
avatar
JudasIscariot: I just rename the .wine folder to something relevant. So if I have a .wine prefix with Unreal Engine 4 games I just rename it ".wine_unreal_4". As for my other prefixes, I just rename the prefix I want to use back to ".wine", run winecfg, and away I go :)
Something I'd consider doing is making a small filesystem and putting the files in that filesystem, and then just mounting it to the directory. I've done this with SquashFS (10+ years ago) and it worked fabulously. As long as you don't need more than 1 wine configuration active at a time. Otherwise having multiple directories with the prefixes/versions would be a better solution so long as you configure them appropriately for the programs you plan on using.
avatar
JudasIscariot: I just rename the .wine folder to something relevant. So if I have a .wine prefix with Unreal Engine 4 games I just rename it ".wine_unreal_4". As for my other prefixes, I just rename the prefix I want to use back to ".wine", run winecfg, and away I go :)
avatar
rtcvb32: Something I'd consider doing is making a small filesystem and putting the files in that filesystem, and then just mounting it to the directory. I've done this with SquashFS (10+ years ago) and it worked fabulously. As long as you don't need more than 1 wine configuration active at a time. Otherwise having multiple directories with the prefixes/versions would be a better solution so long as you configure them appropriately for the programs you plan on using.
That kind of sounds like a lot of work and I try to avoid work when I am at home :P
avatar
rtcvb32: Something I'd consider doing is making a small filesystem and putting the files in that filesystem, and then just mounting it to the directory. I've done this with SquashFS (10+ years ago) and it worked fabulously.
avatar
JudasIscariot: That kind of sounds like a lot of work and I try to avoid work when I am at home :P
mksquashfs /usr/location/wine wine.sqfs

mount wine.sqfs /usr/location/wine -t squashfs

As part of the script to load the program it could auto mount and auto-unmount afterwards...

To note I remember doing this as I said 10+ years ago, on a computer and laptop when there was very very limited space, maybe a Gig total. So compressing all the user programs and files (that couldn't be changed because of access limitations) and having it auto-mount like a normal drive during bootup cost almost nothing. Better yet they couldn't be corrupted or infected because it was a read-only filesystem.
avatar
JudasIscariot: That kind of sounds like a lot of work and I try to avoid work when I am at home :P
avatar
rtcvb32: mksquashfs /usr/location/wine wine.sqfs

mount wine.sqfs /usr/location/wine -t squashfs

As part of the script to load the program it could auto mount and auto-unmount afterwards...

To note I remember doing this as I said 10+ years ago, on a computer and laptop when there was very very limited space, maybe a Gig total. So compressing all the user programs and files (that couldn't be changed because of access limitations) and having it auto-mount like a normal drive during bootup cost almost nothing. Better yet they couldn't be corrupted or infected because it was a read-only filesystem.
Quicker to simply rename the folder, open up a terminal and type "winecfg" for me and less commands to recall/remember :P
avatar
JudasIscariot: Quicker to simply rename the folder, open up a terminal and type "winecfg" for me and less commands to recall/remember :P
Specialty commands are rarely needed, once per configuration at best. Not only that --help usually brings up all the flags/details of how to run the command.

And mount is a basic command everyone should know. The hard part is knowing which devices to use (if you are mounting the devices via the /dev/ directory)

But do whatever works...
I use PoL :D

when I moved from Mint 17.3 to Ubuntu Mate 16.04 I copied all my prefixes to my external, and after installing PoL I moved them back. PoL (and Crossover) makes running different .wine prefixes something you don't worry about or care
avatar
pbnjoe: <snip>
After you've already done what you described, open a terminal:
-- (assuming you are using the "bash") --

export WINEPREFIX=~/Wine/Whatever
-- verify it with "echo $WINEPREFIX"
winecfg #it should already work

-- make it permanent:
vim ~/.bashrc #use whatever editor you prefer
-- add the export line above to the end of the file
avatar
classicgogger: After you've already done what you described, open a terminal:
-- (assuming you are using the "bash") --
Commandline, bash, terminal and it's uses are underutilized and underrated today. Which is kinda sad.
avatar
pbnjoe: What am I doing wrong? My process:

1. Move the contents of ~/.wine-whatever into ~/Wine/Whatever
2. Change the appropriate desktop files in ~/.local/share/applications/wine/Programs to point everything to the new location, escaping spaces only when appropriate.
3. Making sure everything is ok in ~/.config/menus
4. Try to run the game through the entry in Whiskermenu (I use XFCE)

Sometimes it works, and sometimes Wine pops up saying it's configuring the prefix, and it does so by setting up a new one in .wine-whatever and blowing away my desktop and menu files! If I had backed those files up before and restore them after their unwarranted deletion, then trying to launch through Whiskermenu gives a useless "Error: File not found" Wine popup, but running the .desktop file directly works...

What am I missing? When I copy the wine prefixes and desktop files to the same location and name on a new computer and try to launch it, wine complains that it can't set up a new wine prefix in the space that I just copied everything into!
yes, dealing with the menu entries created by wine (or worse changed file associations) is a frustrating mess when you have multiple prefixes and try to move them around.
personally, I always disable that, so that wine really is contained in its prefix and doesn't muck around in ~/.config or ~/.local.
Just use the terminal, go to the prefix and launch the game manually.
This way you can also just drop the prefix somewhere else.
If you want a nice GUI to go with all this, use PlayOnLinux.

Can't really help with the specific error you are seeing. The fact that it sometimes works and sometimes not makes me think you maybe made some errors when changing the .desktop file?
avatar
rtcvb32: Something I'd consider doing is making a small filesystem and putting the files in that filesystem, and then just mounting it to the directory. I've done this with SquashFS (10+ years ago) and it worked fabulously. As long as you don't need more than 1 wine configuration active at a time. Otherwise having multiple directories with the prefixes/versions would be a better solution so long as you configure them appropriately for the programs you plan on using.
isn't squashFS read-only? That doesn't really work for a wine prefix, does it?

avatar
rtcvb32: Commandline, bash, terminal and it's uses are underutilized and underrated today.
they really aren't. At least not in the linux/unix world
Post edited October 20, 2016 by immi101
avatar
JudasIscariot: I just rename the .wine folder to something relevant. So if I have a .wine prefix with Unreal Engine 4 games I just rename it ".wine_unreal_4". As for my other prefixes, I just rename the prefix I want to use back to ".wine", run winecfg, and away I go :)
Hmm, I'm not sure I follow. Do you start all your Wine games from the terminal then?
avatar
te_lanus: I use PoL :D

when I moved from Mint 17.3 to Ubuntu Mate 16.04 I copied all my prefixes to my external, and after installing PoL I moved them back. PoL (and Crossover) makes running different .wine prefixes something you don't worry about or care
Oh? Does PoL let you import prefixes? I'd rather not have to use its methods of downloading and installing a different version of wine for every game, if possible. Using it just as a simple manager would be nice.
avatar
classicgogger: After you've already done what you described, open a terminal:
-- (assuming you are using the "bash") --

export WINEPREFIX=~/Wine/Whatever
-- verify it with "echo $WINEPREFIX"
winecfg #it should already work

-- make it permanent:
vim ~/.bashrc #use whatever editor you prefer
-- add the export line above to the end of the file
I don't think making a prefix permanent is what I'm looking for (especially since I have 10+ prefixes, .wine-whatever was an example name), but thanks :) I do export the prefix I want if I run things from the terminal and the .desktop files handle it when I run them, so I should be good on that front.

avatar
immi101: yes, dealing with the menu entries created by wine (or worse changed file associations) is a frustrating mess when you have multiple prefixes and try to move them around.
personally, I always disable that, so that wine really is contained in its prefix and doesn't muck around in ~/.config or ~/.local.
Just use the terminal, go to the prefix and launch the game manually.
This way you can also just drop the prefix somewhere else.
If you want a nice GUI to go with all this, use PlayOnLinux.

Can't really help with the specific error you are seeing. The fact that it sometimes works and sometimes not makes me think you maybe made some errors when changing the .desktop file?
Oh? I didn't know that was possible to disable. Interesting. Browsing to the .exe I want via a file explorer or terminal takes much longer than pressing <Super>, the first few letters of the game, and <Enter>, though, and you don't get those nice icons either :P

Hmm, another PoL suggestion. As above, is it possible to use only as a basic manager that can import and handle existing prefixes?

As for the specific error, I'm baffled. I'd assume I did something wrong with the .desktop file too, but the error only pops up when using Whisker menu to launch it. If I go directly to the file, or right click in Whisker menu and add a copy to my Desktop, it runs fine... Really, that's the biggest issue I've got. I can handle wine thinking it needs to delete things if it would work properly when I copy things back.

avatar
immi101: isn't squashFS read-only? That doesn't really work for a wine prefix, does it?
That's what I was thinking too.

Thanks for all the responses, everyone :)
Post edited October 20, 2016 by pbnjoe
avatar
JudasIscariot: I just rename the .wine folder to something relevant. So if I have a .wine prefix with Unreal Engine 4 games I just rename it ".wine_unreal_4". As for my other prefixes, I just rename the prefix I want to use back to ".wine", run winecfg, and away I go :)
avatar
pbnjoe: Hmm, I'm not sure I follow. Do you start all your Wine games from the terminal then?
Yes, I do :)
avatar
JudasIscariot: Yes, I do :)
Ah, OK. But with .desktop files, there's no need to rename folders or browse to the .exe, which are conveniences I'd really like to keep if possible. Thanks for letting me know your process though! :)
avatar
JudasIscariot: Yes, I do :)
avatar
pbnjoe: Ah, OK. But with .desktop files, there's no need to rename folders or browse to the .exe, which are conveniences I'd really like to keep if possible. Thanks for letting me know your process though! :)
Welll... I do it this way to ensure that I have an updated prefix so for some it may seem inefficient but at least I know exactly what I am dealing with :)

I also trash prefixes left and right so going back to .desktop files would be a pain for me :)

edit: I also start games from the terminal so I can get the terminal output for any bug reports that need to be sent to WineHQ or to make WINEDEBUG logs :)
Post edited October 20, 2016 by JudasIscariot