Desktop Zoom in Gnome reconstructed
Lately I’ve left the safe waters of MX Linux and started trying out other distros and desktop environment setups. I’m an efficiency freak and have allergy toward any type of bloat in my system. But sometimes you have to pay for RAM usage efficiency with video rendering efficiency. While tinkering in bunsenlabs with X11/openbox and lightdm, I’ve stumbled across video tearing issues on my older HP laptop, so I went on to search for alternatives that would fix this issue.
It turns out that Gnome + Wayland give you a very smooth, tear-free video playback out of the box, in browser youtube and standalone players. In fact, with Wayland I get higher fps and smoother HD video playback with higher resolution.
One thing I started missing right away in the freshest Gnome is the ability to have desktop zoom with a keyboard shortcut key + mouse scroll. This function was easily available with a setting in MX Linux, but in Gnome this functionality is not readily available. A Desktop Zoom Gnome extension is incompatible with the latest Gnome releases, so that option is off the table.
While chatting with AI I’ve devised a working solution:
check that you have the bc utility installed
create zoomin/zoomout bash scripts and place them in your home subdirectory
use Gnome settings to bind the scripts to keyboard shortcuts
voila! you have a smooth desktop zoom working again!
Let’s delve into these:
check that you have the bc utility installed
# in Debian, do this, this will install or update the bc utility: sudo apt install bccreate zoomin/zoomout bash scripts
mkdir ~/.local/scripts/ cd ~/.local/scripts/ cat << 'EOF' > zoomin.sh #!/bin/bash current=$(gsettings get org.gnome.desktop.a11y.magnifier mag-factor) new=$(echo "$current + 0.05" | bc) gsettings set org.gnome.desktop.a11y.magnifier mag-factor "$new" EOF cat << 'EOF' > zoomout.sh #!/bin/bash current=$(gsettings get org.gnome.desktop.a11y.magnifier mag-factor) new=$(echo "$current - 0.05" | bc) gsettings set org.gnome.desktop.a11y.magnifier mag-factor "$new" EOF chmod +x zoomin.sh chmod +x zoomout.shThis will create the /.local/scripts/ directory under your home directory, create the zoomin.sh and zoomout.sh scripts and make them executable.
use Gnome settings to bind the scripts to keyboard shortcuts:
open Gnome Settings » Keyboard » View and Customize Shortcuts » Custom Shortcuts, create:


voila! you have a smooth desktop zoom working again in 5% increments!
Enjoy!