Proton prefixes use "steamuser" as the system username
There are games like Doki Doki Literature Club that read the system username and use it in interesting ways inside the game. Proton prefixes always use "steamuser" instead of the user's choice, breaking certain game elements. Using the current username should be possible as well. (Perhaps this should be done in per-title configuration?)
That is because of this hack:
https://github.com/ValveSoftware/wine/commit/c31fff3533fe8d9285a7f971108ae2b7adfa6deb
Perhaps it should be reverted a 3rd time.
From the number of reverts and reverts of reverts there's been on the issue I think there's a debate on how to handle usernames in Proton.
I'd argue using the system username probably isn't as good of an idea as it is on Windows. *nix usernames are conventionally short and lowercase, often reflecting your actual name. This could lead to an unintentional information leak in online games, especially those who do not let you change it (like Burnout Paradise). Ideally the username would be configurable in case some game decides the username cannot match the name of the Steam user. On the other hand just reporting the name of the Steam user should be fine, AFAIK.
Can conform this happens in Blur as well.
Maybe an option under steam play to chose between system name, steam name or custom?
I think there is an option of whitelisting games to specific systems information, similarly to how android permissions work. It could spoil some intentions of certain games.
There is also the perspective of "This is expected information for games to have about the system being run on".
In that regard, I believe Valve should make it universal: "Games have access to system information by default on all platforms." or "Games have no access to system information on all platforms" ... by default, to be set by user, or promted on first launch of a game. Similarly to how EULA's work.
Like @Djhg2000 noted, we tried to fix this, but it broke a bunch of stuff, so we reverted it. It's complicated for a number of reasons, and privacy isn't really one of them. The primary problem is Wine isn't really built to handle multiple usernames in one prefix. Since we pre-create a prefix at build-time, it needs a username at that point, and it can't be changed later at run-time.
It's not impossible to fix any of this, but we ran out of time (note the timestamps on those commits) and made a judgment call. It would be nice to fix.
Reviving this since i just noticed another quite big problem on why using the fixed user "steamuser" is not a good solution and maybe the Steam-Loginname would be a way better idea:
I'm sharing a Library-Folder with 2 Linux users (and Family sharing), so if one wants to play the same game as the other user already had played, the user will have the same savegames as the other. Because many games are of course saving in the exact same Prefix-Folder in something like My Games or whatever without any other difference. While on a real Windows system those save games would have been of course in the real correct userfolders without any complications. The next problem which results is, that Save-Cloud-Sync also goes havoc and might overwrite/upload the wrong save games (already happened to me)!
So IMO this Issue should get a higher Priority than "nice to have" since it's very annoying.
It's not impossible to fix any of this, but we ran out of time (note the timestamps on those commits) and made a judgment call. It would be nice to fix.
How about still using the pre-created prefixes but upon start just symlink the unix username to the "steamuser" profile directory?
Would be great to see this fixed, even if it means regenerating all of our prefixes. Personally I don't think using someones steam name is the way to go as the games that tend to get a username are trying to spook a player with their real name, not a pseudonym.
Reviving this since i just noticed another quite big problem on why using the fixed user "steamuser" is not a good solution and maybe the Steam-Loginname would be a way better idea:
I'm sharing a Library-Folder with 2 Linux users (and Family sharing), so if one wants to play the same game as the other user already had played, the user will have the same savegames as the other. Because many games are of course saving in the exact same Prefix-Folder in something like My Games or whatever without any other difference. While on a real Windows system those save games would have been of course in the real correct userfolders without any complications. The next problem which results is, that Save-Cloud-Sync also goes havoc and might overwrite/upload the wrong save games (already happened to me)!
So IMO this Issue should get a higher Priority than "nice to have" since it's very annoying.
This could also be fixed via this commit too, https://github.com/ValveSoftware/Proton/pull/4861 but I think Steamuser needs to be changed regardless.
Reviving this, because i also would appreciate a solution for this.
why using steamuser instead of the actual username? I could not find any clear explanation so far
why using steamuser instead of the actual username? I could not find any clear explanation so far
Most likely so that Steam cloud saves still sync to the correct user after you reinstalled your system. And if you restored your game prefixes from a backup after reinstalling with a new username, game settings won't be lost. It's actually quite convenient and probably avoids several support requests about behavior users wouldn't expect. After all, in Windows you would restore your old profile into your new profile. But if you did this on Linux (which generally works fine), the old prefix username would no longer match the new username - surprise surprise!
But Windows can use a different display name than username. Maybe Proton wine could implement that and use the Linux username as the display name only - and stick to "steamuser" on the file system only? Or maybe set the profile path in the registry statically, i.e. not based on the username? I'm not sure if that would fix the cosmetic problem with some games.
Most likely so that Steam cloud saves still sync to the correct user after you reinstalled your system. And if you restored your game prefixes from a backup after reinstalling with a new username, game settings won't be lost.
What in opposite means, if you have multiple spearate (real) users on Linux, they would share all cloud saves, because they are all "steamuser"?
And if you setup windows and use a different account name and do NOT restore any old profiles, your cloud saves are still lost?
I'm unsure if this all makes any sense... but probably it would be a good idea if you could set the name for (each) prefix manually, completely independent of any account names.
Not so common today anymore, but some (stupid) games used the account name as playername (and don't provide an option to change it)... so the last time playing such games we suddenly had 4 players all named steamuser.
What in opposite means, if you have multiple spearate (real) users on Linux, they would share all cloud saves, because they are all "steamuser"?
Nope, the prefixes are not shared between Linux user profiles.
And if you setup windows and use a different account name and do NOT restore any old profiles, your cloud saves are still lost?
No - because there's no such thing as a wine prefix in Windows-native Steam.
I'm unsure if this all makes any sense... but probably it would be a good idea if you could set the name for (each) prefix manually, completely independent of any account names.
I think this idea is actually not too bad. Just default to "steamuser" - and if someone wants to shoot their own foot, or knows what they are doing, let's run with STEAMUSER=iamwhoiam %command%.
Not so common today anymore, but some (stupid) games used the account name as playername (and don't provide an option to change it)... so the last time playing such games we suddenly had 4 players all named steamuser.
I wonder if such games really use the account name, or if they use the display name... If they use the display name, it could probably be solved very easily in Proton.
But still, your idea with an adjustable name may be more flexible.
But using your Linux profile name by default is probably the worst idea if people restore their $HOME under a new Linux username: your prefixes would then just be broken.
I think an env variable PROTON_USER is needed to control this behavior, which could be very wrong in some cases
I think this idea is actually not too bad. Just default to "steamuser" - and if someone wants to shoot their own foot, or knows what they are doing, let's run with
STEAMUSER=iamwhoiam %command%.
Yes, optionally using an environment variable would be a solution which would be completely sufficient, at least for me.
As already said, it seems to be just a rare case where it would be even necessary, but if you encounter such a case it's very anoying it can't be changed at all.
Would use a different name for the variable, because STEAMUSER might cause heavy confusion. PROTON_USER as suggested by cipitaua sounds suitable.
I would recommend using the Steam username as the prefix username instead of steamuser.
On my Steam Deck and Laptop, I share my games with my partner via Family Sharing. In Oxygen Not Included, the saves are set up appropriately; they're only shown for the right logged in steam user. In Halo: MCC, it shares the entire prefix, and my partner will be logged into my Xbox account, meaning I have to log out and log him in, or vice versa every time we switch on the Deck.
Steam account names can't be changed very often, especially not without Support intervention. I think that would be best.
I wonder what the game from the initial issue report actually uses for the username in the game:
- I think Proton mostly cares about properly mapping
C:\Users\steamuserso this doesn't arbitrarily change if the Linux user changes their username or restores prefixes from backup to a different username. So that could probably be statically set inside Proton. - But Proton could still communicate the Linux username as the Windows username. Windows doesn't force that the profile path is the exact name as the Windows logon name, and even the Windows username can be different from that. This should fix the issue with that initially referenced game?
@orowith2os Your requests sound like you actually want to share prefixes, or do share prefixes. I think that should not be done. Only the game library can be shared. But if you logon with different user accounts, they should get their private Proton prefix.
This more sounds like an oversight from Valve:
I'm pretty sure that you log into Steam with different Steam accounts, still all inside the same Linux account. What Steam should actually do is creating a Proton prefix per Steam user, not creating different "Windows users" inside the prefix. Think about it that way: In Windows, you won't have different Windows user profiles per Steam account, too. It would have the same consequence in Windows: You would still be logged into the Xbox account of your partner if you don't log in as a different Windows user.
Currently, Steam stores user data per Steam account in $HOME/.local/share/Steam/userdata. But it stores Proton prefixes globally in $HOME/.local/share/steamapps/compatdata. So there are two ways: Either Steam should move Proton prefixes to userdata instead, or Steam should symlink the virtual Windows profile directly to userdata instead. The latter will obviously create compatibility nightmares if different Steam accounts in the same Linux account use different Proton versions per game. So moving the full prefix to userdata may be better even tho we'd have duplicate wine files then (we have them anyways because there's one wine prefix per game). OTOH, the current implementation mostly mimics the Windows multi user experience - so it's probably fine, and Steam should allow only one virtual Windows user per prefix. Having a static user profile path in the prefix supports backups and restores better (you can just restore to a different Linux account, and the prefix will just work as expected).
I think Steam for Linux is mostly designed around the idea that you log on with different Linux accounts - just like in Windows, then have one unique Steam account per Linux account, and create a shared library folder with proper shared permissions where you install your games.
I also think that your request is very distinct from the original intent of the reporter of this issue. And I don't mean to downplay your request, I'm just saying we have to carefully differentiate between those two intents: One is about having actual different virtual user profiles in one Proton prefix (to map different Steam accounts), one is about seeing your proper Linux username inside the Proton prefix. These are two completely distinct requests with two very different consequences.