Is it possible to change how new Wine bottles are created?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
zzarko
Level 1
Level 1
Posts: 6
Joined: Sun Nov 21, 2010 7:29 am

Is it possible to change how new Wine bottles are created?

Post by zzarko »

I'd like to disable linking of Windows directories to my home directory by default when creating a new bottle (i.e. Wine My Documents shouldn't link to my home directory, etc.). Is it possible to somewhere change default settings for new bottles? Or, at least, to unlink these directories from command line?

Thanks!
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: Is it possible to change how new Wine bottles are create

Post by dimesio »

You can change or remove them in winecfg, on the Desktop Integration tab. Winetricks sandbox is a quick way to remove all of them, but it will also remove the symlink to the z: drive, which may break some apps.
zzarko
Level 1
Level 1
Posts: 6
Joined: Sun Nov 21, 2010 7:29 am

Re: Is it possible to change how new Wine bottles are create

Post by zzarko »

Yes, I know I can change that in winecfg, but I wanted to skip this step completely. I didn't know about sandbox option in winetricks, but it looks like it would do the job (at least I can run that from command line - I want to automate some tasks when creating bottles). Thanks!
zzarko
Level 1
Level 1
Posts: 6
Joined: Sun Nov 21, 2010 7:29 am

Re: Is it possible to change how new Wine bottles are create

Post by zzarko »

Hmmm... Sandbox option does more than just unlinking home directories, because using that option makes most of games that I tried unrunnable. If I unlink them manually, everything is OK. Any other way to unlink from command line or to not link at all?
lahmbi5678
Level 7
Level 7
Posts: 823
Joined: Thu Aug 27, 2009 6:23 am

Re: Is it possible to change how new Wine bottles are create

Post by lahmbi5678 »

Hm, you could write a shell (bash, Perl, Python, etc) script, which would remove the symlinks. You'd have to execute that script after creating the new wineprefix (the term bottle is used by Codeweavers).
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: Is it possible to change how new Wine bottles are create

Post by dimesio »

that option makes most of games that I tried unrunnable.
I did warn you about that.

Winetricks is a script. You can edit it in any text editor and comment out the part where it removes the z: drive symlink. The downside is that you will have to do that every time you update winetricks. An alternative is to copy the section of winetricks that removes the desktop integration symlinks, without the part that removes the z: link, and run that as a standalone script.
Locked