Bottles icon indicating copy to clipboard operation
Bottles copied to clipboard

[Request]: Enable the user to have their data in a specified directory outside of a bottle

Open omichalek opened this issue 1 year ago • 1 comments

Tell us the problem or your need

I think it would make sense to introduce per-bottle toggle that would "outsource" the user data from within the bottle to a specified directory:

  1. It would help to protect created content when deleting the bottle
  2. It would make sharing of data between bottles easier
  3. The hard part is choosing which folders to move outside of the bottle (or directories to which to create links inside a new bottle)
    • Should the whole users/username be included? This includes "garbage" folders like Temp and the problematic AppData, eg.:
      • One probably doesn't want to deal with stuff like AppData/Local/Microsoft/Windows/INetCookies/ in their home dir
      • If I am not mistaken, there are also programs that install into AppData. Again not something that should be shared between bottles.
    • An attempt at a "reasonable" list of inclusions could be made
      • Some directories are easy to choose: Documents, Downloads, Music, Pictures, Saved Games, Videos,
      • but again what about AppData as above? Many games place save files in there.
    • Should users choose specific folders themselves?
      • This could become cumbersome and possibly end up not much better than diving into the directory structure manually but maybe it wouldn't

Describe the solution you'd like

The default or suggested location for the user-data directory could be ~/Wine The user should easily change the destination but if there was a default setting the permission could be set in flatpak upon installation.

Other solutions?

No response

Additional context and references

I have another related user-data suggestion here: https://github.com/bottlesdevs/Bottles/issues/1924 - the user directory should be named always the same

omichalek avatar Aug 10 '22 09:08 omichalek

This is too difficult to handle with the current backend structure. Adding to future features

mirkobrombin avatar Aug 10 '22 19:08 mirkobrombin

Maybe symlink could be used as a workaround? Haven't tried it, just an idea

  • Create bottle
  • Move user-created content directory inside the bottle to a safe location on the system
  • Create symlink to safe location in the original bottle path
  • Delete bottle, and safe location should remain untouched

ghost avatar Sep 26 '22 20:09 ghost

Just realized that this can be done by using the Custom environment, then picking a new path to store the bottle

mirkobrombin avatar Sep 26 '22 21:09 mirkobrombin

symlink could be used

that's exactly how I do it. I only need to have ~/WINE permission added in flatpak

omichalek avatar Sep 27 '22 07:09 omichalek

Closing as there is already such option: https://github.com/bottlesdevs/Bottles/issues/1923#issuecomment-1258649888

mirkobrombin avatar Sep 28 '22 18:09 mirkobrombin