how modifie the default linked Path for e.g. Documents?

Questions about Wine on Linux
Locked
orleans
Level 2
Level 2
Posts: 10
Joined: Thu Jul 23, 2015 8:59 am

how modifie the default linked Path for e.g. Documents?

Post by orleans »

Could I somehow modify where Wine link the Path into my Home?
If I create new Wine Prefixes all Windows Profile paths are linked into /home/User/. If Possible I would like to change as default setting it to another path e.g /home/User/Data/Wine/.

How could I do that?
spoon0042
Level 6
Level 6
Posts: 570
Joined: Thu Dec 24, 2009 11:00 am

Re: how modifie the default linked Path for e.g. Documents?

Post by spoon0042 »

Wine follows the XDG spec for those directories. Some explanation can be found here, for example: https://wiki.archlinux.org/title/XDG_user_directories

Short answer, you could edit ~/.config/user-dirs.dirs to set the paths to /home/User/Data/Wine ...but that would (I think) potentially have other apps putting things in /home/User/Data/Wine which probably isn't what you want.

Conveniently though you can specify an alternate config file. Like 'mkdir ~/.config/wine' or something and copy user-dirs.dirs there and edit it with your paths. Then when you create a wineprefix set the environment variable 'XDG_CONFIG_HOME=/home/User/.config/wine' and wine should use your paths. (I think you need to create the directories first otherwise wine will fallback to $HOME.) (And of course you could write a script or something to create a wineprefix with XDG_CONFIG_HOME set so you don't forget.)
Locked