Force Applications to start in a Window

Sometimes, I work on a task which requires opening many different applications from different sources, without time to meticulously configure everything about each one. In these cases, I want these applications to open in limited-size windows, rather than full-screen as most of them try to.

In my use-case, these applications are games, but I’m looking for a solution which will work for all applications.

KDE Window Rules are a great feature, but there are two problems. One: filtering only for these applications and not all other ones is near-impossible, and many applications don’t play nice with having their screen size changed.

Xephyr is another option, but every application I’ve tried with it had issues, from input devices not working properly, to a segmentation fault before anything even displayed (even though both applications run fine outside of Xephyr)

A virtual machine is not going to be as performant as I need (my motherboard doesn’t have the right IOMMU groups unfortunately). Still, it seems ridiculous to have to go to this extent when literally all I need is to contain a window reliably.

When using wine, I can run the applications in their own windowed desktop, but that has also caused critical problems, and only some of the applications in question run in wine.

Ideally, I’m hoping for a command I can run applications with which locks them into a sizeable window on the current display, even if the application might think it’s in fullscreen. I recognise this might not be possible in practice.

I’m hoping there’s something obvious I’ve missed. Thanks in advance.

Have you considered trying a tiling window manager? You might be able to get your stuff set up with less futzing than it sounds like you are currently doing. The Kwin tiling extension for KDE is available on GitHub (no need to change desktop environment, plus you can turn it off when you don’t need it).

thank you, I’ll give that a try.

I assume the mechanism of that is similar to another idea I had: simply writing a script to use wmctrl or something to adjust the window size and fullscreen status, maybe on a hotkey or something. I’m willing to do that if there’s no other option.

Honestly if you have never tried a tiling window manager it’s worth checking out. There is a learning curve, but a lot of people find they make their workflow more efficient.