You can sign up to get a daily email of our articles, see the Mailing List page!
Support us on Patreon to keep GamingOnLinux alive. This ensures we have no timed articles and no paywalls. Just good, fresh content! Alternatively, you can donate through Paypal, Flattr and Liberapay.!
Proton: Enabling Virtual Desktop and disabling mouse grabbing
Lakorta commented on 19 September 2018 at 12:46 am UTC

I just wanted to share a way to enable Virtual Desktop and disable mouse grabbing for Steam's Proton. Not having Virtual Desktop enabled is (imo) quite annoying for multi monitor user since most fullsreen applications will minimize if they lose focus. Mouse grabbing also annoys me since I can't use anything on my second monitor without Alt+Tabbing or using activating the Steam Overlay.

Method 1:

Spoiler, click me
One way is to run winecfg in the corresponding Proton prefix (e.g. "WINEPREFIX=~/.steam/steam/steamapps/compatdata/16700/pfx winecfg" for Stronghold Crusader Extreme HD (AppID 16700)). Mind though that "Automatically capture the mouse in full-screen windows" may appear as disabled already in which case you have to enable it, restart winecfg and then disable it. This probably happens since Proton has a different default value for that feature than standart wine has. Also steam may be at a different location (like ~/.local/share/steam) depending on your distro.

Method 2:
Spoiler, click me
Now for another method: Run the following commands preferable from your steamapps/compatdata directory:
printf "REGEDIT4\n[HKEY_CURRENT_USER\Software\Wine\\\Explorer]\n\"Desktop\"=\"Default\"\n[HKEY_CURRENT_USER\Software\Wine\\\Explorer\Desktops]\n\"Default\"=\"1920x1080\"\n[HKEY_CURRENT_USER\Software\Wine\\X11 Driver]\n\"GrabFullscreen\"=\"N\"" >> temp.reg && find -name "pfx" | xargs readlink -f | xargs -I{} env WINEPREFIX={} regedit temp.reg && rm temp.reg
This will change/add the registry keys needed to enable virtual desktop and disable mouse grabbing for all currently installed Proton prefixes (if you install any game later on you have to rerun those commands. Two important notes: This will create a temporary file called temp.reg and removes the file afterwards. If you already have a filled called that in the directory you're running those commands from it will overwrite and delete that file! Another thing is that mouse grabbing may actually be desired for some games since those may not work without that feature (which is the reason mouse grabbing was enabled by default). In that case you can use those commands which do the same as the ones above just without disabling mouse grabbing:
printf "REGEDIT4\n[HKEY_CURRENT_USER\Software\Wine\\\Explorer]\n\"Desktop\"=\"Default\"\n[HKEY_CURRENT_USER\Software\Wine\\\Explorer\Desktops]\n\"Default\"=\"1920x1080\"" >> temp.reg && find -name "pfx" | xargs readlink -f | xargs -I{} env WINEPREFIX={} regedit temp.reg && rm temp.reg

Running winecfg or regedit in a Proton prefix is not officially supported and winecfg/regedit initializes some stuff when run in one. While I did test several games after using it I can not promise that it won't cause unexpected behavior.
I'm a beginner when it comes to bash so if you have any suggestions please tell me
Also if you have any questions ask away.

PS: I give absolutely no warranty for doing any of the things I mentioned. Never run any commands you don't understand especially if you found them on the internet.

slaapliedje commented on 19 September 2018 at 6:21 am UTC

Ha, I thought this was for the VR program called Virtual Desktop. I still need to test that out to see if it works with Proton. I use it usually to watch movies as if I'm in my own IMAX theater.

whizse commented on 19 September 2018 at 2:00 pm UTC

LakortaRunning winecfg or regedit in a Proton prefix is not officially supported and winecfg/regedit initializes some stuff when run in one. While I did test several games after using it I can not promise that it won't cause unexpected behavior.
I'm a beginner when it comes to bash so if you have any suggestions please tell me
Also if you have any questions ask away.

Doing this will most likely update the wineprefix for a game to the version of Wine on your system. A much better way is to just use Proton to run winecfg or regedt:

Just use
.../steamapps/common/Proton 3.7 Beta/dist/bin/wine winecfg
instead.

You can also use this path with the WINE environment variable if you need to run winetricks for a proton prefix.

Xpander commented on 21 September 2018 at 2:40 pm UTC

minimize on focus loss can be fixed with

export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0
into /etc/environment for example.


multimonitor mouse grab, most games offer mouse release when bringing up the menu (escape menu), but some that don't i usually just switch workspace to chat on my other monitor, so i dont need to alt+tab then.

Lakorta commented on 23 September 2018 at 11:34 am UTC

whizseDoing this will most likely update the wineprefix for a game to the version of Wine on your system. A much better way is to just use Proton to run winecfg or regedt:

Just use
.../steamapps/common/Proton 3.7 Beta/dist/bin/wine winecfg
instead.

You can also use this path with the WINE environment variable if you need to run winetricks for a proton prefix.
Running the game through Steam will make it use Proton. But yeah, using Proton's winecfg/regedit may be the better idea. Not sure why I didn't think of that

Xpanderminimize on focus loss can be fixed with

export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0
into /etc/environment for example.


multimonitor mouse grab, most games offer mouse release when bringing up the menu (escape menu), but some that don't i usually just switch workspace to chat on my other monitor, so i dont need to alt+tab then.
I already had SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS set to zero and while it works with most native games it doesn't work with proton.

Xpander commented on 23 September 2018 at 12:22 pm UTC

LakortaI already had SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS set to zero and while it works with most native games it doesn't work with proton.

hmm, i remember reading that proton is using SDL. Anyway i have yet to see a game in proton that minimizes when i go into my other monitor. Played: GTA V, DOOM, The Forest, Bioshock 2 Remastered, SCUM, Kingdom Come, Dishonored, Alan Wake, Trackmania 2, Mirrors Edge just to name few. Maybe im lucky then with the games i have played.

Due to spam you need to Register and Login to comment.


Or login with...

Livestreams & Videos
Community Livestreams
  • Puzzle Tiles: „Opus Magnum“
  • Date:
See more!
Popular this week
View by Category
Contact
Latest Comments
Latest Forum Posts