-
-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Request] Replicate a homedir in the sandbox and point the userdir to it #572
Comments
Originally posted by mirkobrombin September 28, 2021 I've managed to reproduce the problem, using notepad I created a file and saved in C:\users\USER\Downloads, the file is detected by wine but not by the system and once the subsystem is restarted, the file disappears. The problem is that wine default point the folders inside the user's dir, to the user's home dir. As you have seen, you can fix the problem by exposing the homedir to Bottles, so that the runner can write to that directory. Regarding your question, I believe it is possible to force wine to use an internal path for those links, I believe I will turn this thread into an issue to add the functionality to the roadmap. Workaround: Exposing the homedir to Bottles Feature conceptAs the Bottles' Flatpak is now sandboxed, it cannot access the homedir, this cause the runner to treat that directory as a temp which will be cleaned on restart. To fix it we can just place a homedir folder in each bottles, e.g. /data/bottles/myBottle:
then reproducing the standard homedir structure inside that folder:
and link the userdir from the prefix to these:
I think this can be made a default and not an only flatpak-feature. Maybe the first step for a all-packages-sandbox. Resources: |
@mirkobrombin Could you let me know how to activate the new behavior in an existing Bottle? I just tried and the local files are still being deleted after Bottles restart with version 2021.10.14-treviso-2. Or do I have to recreate the Bottle? |
In existing bottle you should unlink (using the Here you can find more information, like the correct directories and the symlinks: https://docs.usebottles.com/flatpak/expose-directories/use-system-home |
Discussed in #571
Originally posted by stonebuckl September 28, 2021
I have an issue where after closing and opening Bottles running with Flatpak all settings and local characters in Diablo 2 Resurrected are deleted. It seems as if those files are stored in a virtual file system that only exists during the sandboxed execution. I also understand that I could probably expose a folder to circumvent this issue as described here. However, I think it should be possible for D2R to create and keep local files inside the sandbox. Am I wrong?
It seems to me, the main issue is that in my Bottles
winecfg
, the folderDocuments
links to/home/username
instead of (what I would assume to be correct) an existing directory in the bottle directory. Usingstrace
, I can see that the files are accessed at/home/username/.var/app/com.usebottles.bottles/data/bottles/bottles/Battlenet/dosdevices/c:/users/username/Documents/Diablo II Resurrected/Save/
but that folder only exists in Wine (checked with command prompt), not physically on the disk. Consequently, the folder vanishes after closing Bottles.My understanding is that as the Battle.net client can somehow use local files to keep my login credentials and store game data, so should the game itself be able to. Am I wrong?
The text was updated successfully, but these errors were encountered: