https://bugs.winehq.org/show_bug.cgi?id=39013
--- Comment #7 from Sebastian Lackner sebastian@fds-team.de --- (In reply to Alexandre Julliard from comment #6)
Yes, but XDG_RUNTIME_DIR is in theory supposed to be constant across a user session. Of course the user can still mess with it, but that would probably break other things too.
Do you have other suggestions?
Couldn't we use the code path for Android on all platforms, or does this have other disadvantages? This would also ensure that people can only access the wineserver sockets, when they have access to the wine prefix itself.
Using an environment variable is probably also fine, but it would be nice to have some precautions against wine prefix corruptions, for example a file lock on the registry or similar. I could imagine that XDG_RUNTIME_DIR is not set when people execute wine directly from a cronjob for example.