Ubuntu Version:
Noble, fully updated as of this 2025/01/19
Desktop Environment (if applicable):
Gnome
Problem Description:
I’m running Wine in Distrobox for a couple of Window’s games. I notice that if I either have another window open such as a text editor, or even a browser that my keybinds in the game don’t work, like they are getting intercepted somewhere. As soon as I close the other program everything works again in the games. I’ve only found this on Gnome specifically thus far.
EDIT For the record I did try running it outside of distrobox on the bare metal. Same result. Fairly certain distrobox isn’t the culprit.
What I’ve Tried:
Nothing as my only solution thus far is to only have one window open. However this makes it difficult when I’m tinkering with lua code for messing with UI customization as I need to close my editor every time I make a change so I can test it in game.
Hi @jmgibson81 - thanks for posting your first question after hanging out here for a while.
Minor aside
I have never considered running WINE in Distrobox. That sounds like a good way to isolate the WINE version and game content from the rest of your system. Neat idea! I'm intrigued to know what games work well in this setup, as I'm a retro game nerd always looking for robust ways to play the classics!
Is it all keypresses or only specific ones you’ve mapped in the games? Is it limited to function keys, or using meta keys like ALT or Windows (or Super as it’s called around here.
I had a few scripts to deal with this kind of thing. I’ve smashed them together and made a utility that might help you:
I’ll try the script. It seems to be just certain ones. Which is even more confusing. Im wondering it’s Wayland and not gnome. I was just realizing i was on Debian and with KDE and Xfce i was under xorg. Debian bookworm’s KDE Wayland isn’t so great
As far as wine in distrobox it seems to work exactly the same. I gave that container it’s own /home directory under ~/.distrobox/wine. I have normal .desktop files in ~/.local/share/applications and the exec line is as follows.
Exec=/usr/local/bin/distrobox enter wine -- wine "/home/jason/.distrobox/wine/.wine/drive_c/Program Files (x86)/executable.exe"
Ultimately this keeps my system from being polluted by 32bit stuff as well as keeping anything wine does in it’s own home directory. This works with Steam as well although streaming to another computer thus far I have not had success with.