Faking Fullscreen in Linux

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:

# 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.


There are no comments yet.

Add a Comment
Comment Atom Feed