When running games in Linux, especially through Wine, occasionally you will run into a game that doesn't support fullscreen and otherwise appears a bit small for comfort. In my case, I ran into this running Environmental Station Alpha and the classic Entertainment Pack version of Chip's Challenge.
The approach I came up with was to enlarge the game as much as possible and get the usual GUI elements out of the way, run the game, then put everything back. Here is an annotated version of my script:
#!/bin/sh
# Scale the display to double pixels
xrandr --output HDMI-0 --scale 0.5x0.5
# Record the previous value of WM theme and panel 1 mode
theme=`xfconf-query -c xfwm4 -p /general/theme`
pmode=`xfconf-query -c xfce4-panel -p /panels/panel-1/mode`
# Set window manager theme to "True Minimalist" to hide window frame
xfconf-query -c xfwm4 -p /general/theme -s "TrueMinimalist"
# Set panel 1 to vertical orientation so it gets out of the way of the game window
xfconf-query -c xfce4-panel -p /panels/panel-1/mode -s 1
# Run the game
wine-stable Environmental\ Station\ Alpha.exe > /dev/null 2>&1
# Set everything back
xfconf-query -c xfwm4 -p /general/theme -s "$theme"
xfconf-query -c xfce4-panel -p /panels/panel-1/mode -s $pmode
xrandr --output HDMI-0 --scale 1x1
The script itself can be downloaded and adapted for your own use cases. Note it is aimed at Xfce in particular, so you may need to research the command-line settings tools for other desktop environments (GNOME, KDE, etc.). The TrueMinimalist theme can be found at Pling.
EDIT from 2024!
The following is another simpler example for KDE on Wayland for just changing the resolution (i.e. while Wine can't do it):
#!/bin/sh
kscreen-doctor output.DP-2.mode.800x600@60
wine Tetris.exe
kscreen-doctor output.DP-2.mode.2560x1440@144
Or a combined example of both resolution and scaling if that's useful to you:
#!/bin/sh
kscreen-doctor output.DP-2.mode.1600x1200@60
kscreen-doctor output.DP-2.scale.2
wine Tetris.exe
kscreen-doctor output.DP-2.scale.1
kscreen-doctor output.DP-2.mode.2560x1440@144
Note: despite the above example, Wine doesn't actually seem to honour Wayland display scaling.
Also run kscreen-doctor --help
for more assistance or kscreen-doctor -o
for
devices and available modes.