Using Wine across distros with symlink

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
BobTheBull
Level 2
Level 2
Posts: 21
Joined: Wed Jan 27, 2010 1:27 pm

Using Wine across distros with symlink

Post by BobTheBull »

I have set up the configurations and profiles for some of my programs so that I can use them across distros, and easily configure new installations with all my old settings.

For instance, if I use Firefox in Fedora, add some bookmarks, then go to suse or Mandriva the new bookmarks are there, as is history, etc. Same for Thunderbird.

To do this I copy the relevant folder from /home/user to my data drive, /data1/user, then symlink the data1 drive. Make symlinks in each distro and you get the above results. Note this does not work with everything, but where it does it's great. Same for new installs; after install just set up the symlinks. I save all the symlinks in a file so I can cut and paste; when I get through being lazy I will write a script to do this, making it really easy.

I am getting ready to set up Civ4 in Wine; I know it works just fine in Wine. If I copy the /user/.wine folder and symlink it like the others, how well is this likely to work?
Fred2
Level 2
Level 2
Posts: 45
Joined: Mon Jul 18, 2011 11:58 am

Post by Fred2 »

I use a similar technique to access the same wine programs from different wine prefixes (I only need to have different registries). I do this because I have several GB of wine programs that I don't want to copy into new prefixes.
However it's on your own risk. If a wine installation in one distro has a different version and updates the windows system files, it could theoretically break it from working in the other distros.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Using Wine across distros with symlink

Post by vitamin »

BobTheBull wrote:If I copy the /user/.wine folder and symlink it like the others, how well is this likely to work?
It will not. Wineprefix have to be a real directory. Wine specifically checks for that.

That said, it doesn't mean you can't symlink stuff under wineprefix.
John Drescher

Using Wine across distros with symlink

Post by John Drescher »

I have a few advanced suggestions. Which you will have to look up
yourself since that is way beyond the scope of this list.

1. LVM, btrfs or zfs snapshots.
2. zfs or lessfs deduplication

John
BobTheBull
Level 2
Level 2
Posts: 21
Joined: Wed Jan 27, 2010 1:27 pm

Post by BobTheBull »

Thanks Vitamin; I think you nailed the topic, and I had suspected that. I need to learn more about prefixes. The online documentation is difficult to understand but I will keep studying. It seems to me one problem is prefix is not a very descriptive for what they do.
BobTheBull
Level 2
Level 2
Posts: 21
Joined: Wed Jan 27, 2010 1:27 pm

Post by BobTheBull »

I went back and reread the entire online manual and there is no explanation of prefixes. There are some examples in in the FAQ, one of which shows the cl steps to store the wine files somewhere other than ~/.wine, but there is no explanation of any thing. I did get that WINEPREFIX is an environment variable and there is a hint there can be more than one but no explanation. Where does one find an exposition of prefixes in Wine and how the work and can be manipulated.

Meanwhile, back at the ranch I tried my method with Wine. At this point I should tell that I am using openSuSE 12.1 with KDE 4.7.2 and Wine 1.3.33, which was setup by the suse installer; this is a new, clean install of suse 12.1.

The file locations in 12.1 are different than those in the manual and FAQ. Everything seems to be in /home/username/.wine, except for /usr/share/wine which has /fonts. /gecko and wine.inf.

I copied /home/username/.wine to /data1/username/.wine, renamed ~/.wine to .wineold and linked data1/username/.wine. So far everything works. I added some drives and they show up in /data1/username/.wine/dosdevices. This is exactly what I wanted.

However, this is at variance with what vitamin pointed out. Is there something different in suse which is making this work, or in latest Wine? If I keep going with this will eventually get my heart, or my wine bottle, broken?
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

BobTheBull wrote:I went back and reread the entire online manual and there is no explanation of prefixes. There are some examples in in the FAQ, one of which shows the cl steps to store the wine files somewhere other than ~/.wine, but there is no explanation of any thing. I did get that WINEPREFIX is an environment variable and there is a hint there can be more than one but no explanation. Where does one find an exposition of prefixes in Wine and how the work and can be manipulated.
See http://wiki.winehq.org/FAQ for some info.

In short, wineprefix is an instance of a PC. Specifically drive mappings, registry, and default c:\ drive.
Note Wine is NOT installed there. All "dll" files you'll find there are "fake dlls".
BobTheBull wrote:I copied /home/username/.wine to /data1/username/.wine, renamed ~/.wine to .wineold and linked data1/username/.wine. So far everything works. I added some drives and they show up in /data1/username/.wine/dosdevices. This is exactly what I wanted.
However, this is at variance with what vitamin pointed out.
Probably some modifications by suse Wine packager. Vanilla Wine won't let you do this.
BobTheBull
Level 2
Level 2
Posts: 21
Joined: Wed Jan 27, 2010 1:27 pm

Post by BobTheBull »

I have read the entire FAQ several times; it was not very clear to me on this subject.

If I understand you, I could have several "prefixes":

-/winea
-/wineb
-/winec

each of which would have it's own registry, drive and c:\; one could be used for, say Office, one for games, one for whatever?
John Drescher

Using Wine across distros with symlink

Post by John Drescher »

On Sun, Dec 4, 2011 at 6:54 PM, BobTheBull <[email protected]> wrote:
I have read the entire FAQ several times; it was not very clear to me on this subject.

If I understand you, I could have several "prefixes":

-/winea
-/wineb
-/winec

each of which would have it's own registry, drive and c:\; one could be used for, say Office, one for games, one for whatever?
Yes. this is correct.

John
BobTheBull
Level 2
Level 2
Posts: 21
Joined: Wed Jan 27, 2010 1:27 pm

Post by BobTheBull »

So then, why don't we call them what they are, sub directories or folders, rather than prefixes. Prefix: something placed before and which modifies the root. Don't see the descriptive here.

I believe this is what used to be called a bottle, a much more apt metaphor. Wrapper or container would be more descriptive.

All that aside, presumably a prefix can be located anywhere, not just in /home/username? One of the goals is to locate them outside home so that if a clean install is needed, including reformatting home, all your program installs and configurations in wine are not lost and have to be redone from scratch.

And how does wine know which prefix to use? Can particular programs be associated with a given prefix?
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Post by dimesio »

BobTheBull wrote: And how does wine know which prefix to use? Can particular programs be associated with a given prefix??
http://wiki.winehq.org/FAQ#head-faf9617 ... 522d490faf
Martin Gregorie

Using Wine across distros with symlink

Post by Martin Gregorie »

On Sun, 2011-12-04 at 21:16 -0600, BobTheBull wrote:
So then, why don't we call them what they are, sub directories or
folders, rather than prefixes. Prefix: something placed before and
which modifies the root. Don't see the descriptive here.
It sounds descriptive to me. It *IS* a prefix to the structure that
corresponds to a set of Windows filing systems (C:, D:, etc.).
All that aside, presumably a prefix can be located anywhere, not just
in /home/username? One of the goals is to locate them outside home so
that if a clean install is needed, including reformatting home, all
your program installs and configurations in wine are not lost and have
to be redone from scratch.
With all due respect, you've got that backwards. The basic plot for
painless upgrades is to put /home in a separate disk partition so you
can easily reformat everything else. I've been arranging my Linux system
this way for the last 10 years and haven't yet found a need to reformat
the /home partition. A useful side effect is that you don't need to back
anything outside this partition provided you're prepared to do a clean
install after a disk crash.

See http://www.libelle-systems.com/free/lin ... rades.html for a
fuller explanation of my approach.
And how does wine know which prefix to use? Can particular programs be
associated with a given prefix?
Easily - I use wrapper script per program with the prefix set inside
it. This means that, whether you run the script from the command line or
associate a desktop icon with it, the correct prefix is used every time.
There are other methods you can use, but this one works for me.


Martin
Locked