Hey there! If you've recently made the jump to Zorin OS 18 (which is built on the super-solid Ubuntu 24.04), or any Linux Distro, welcome to the family! Zorin is beautiful right out of the box, but if you're like me - with a desk full of monitors, a 4K TV across the room, and a few specific work tools - you might find that things don't always "just work" exactly how you want them to.
I spent some time tinkering and wrote four simple scripts that handle the annoying stuff for me. I wanted to share them with you so you can spend less time clicking through menus and more time actually using your PC. Let’s walk through it together!
Step 1: Setting Up For Success
Before we get to the fun stuff, we need to install a tiny tool that helps us control our screens. Since Zorin OS 18 uses a modern system called "Wayland," old-school commands don't work. We're going to use a little helper called gnome-monitor-config.
1. Let’s build the tool
Don't be intimidated! Even if you've never built software before, this is just a few copy-pastes into your Terminal.
First, let's grab the "ingredients" we need to build it:
sudo apt update
sudo apt install meson ninja-build git libglib2.0-dev libmutter-14-dev
# Quick tip: If the computer says it can't find 'libmutter-14-dev', try 'libmutter-13-dev' instead!Now, we'll download the tool, build it, and put it where the system can find it:
git clone https://github.com/jadahl/gnome-monitor-config.git
cd gnome-monitor-config
meson build
ninja -C build
sudo cp build/src/gnome-monitor-config /usr/local/bin/2. Unlocking "Super Smooth" Mode (VRR)
I love smooth gaming. If your monitor supports "Variable Refresh Rate" (VRR), you'll want this. Zorin hides this setting by default, but you can unlock it with one command:
gsettings set org.gnome.mutter experimental-features "['variable-refresh-rate']"Give your computer a quick restart after running that!
Step 2: Finding Your Gear's "Names"
Every monitor and speaker has a name the computer uses behind the scenes. We need these for our scripts to work.
- For Screens: Type
gnome-monitor-config listin your terminal. You’ll see names likeDP-1(usually a DisplayPort monitor) orHDMI-1(usually a TV). - For Sound: Type
pactl list short sinks. This shows your speakers. Look for the long names likealsa_output.usb-SteelSeries...or...hdmi-stereo....
Step 3: The Magic Scripts
Now for the good stuff! Here are the four scripts I use every single day.
1. Switching Between Work and Play
I have two monitors for work and a 4K TV for gaming. Switching between them manually is a huge pain, so I made two scripts to do it for me.
"Work Mode" (Productivity)
This script wakes up my desk monitors, waits for them to signal that they're ready, and turns off the TV. I added a "wait loop" because hardware is sometimes a bit slow to wake up, and this prevents the screen from flickering or getting confused.
#!/bin/bash
# Change these to YOUR monitor names from Step 2!
MON1_NAME="DP-1"
MON1_MODE="2560x1440@119.998+vrr"
MON2_NAME="DP-2"
MON2_MODE="2560x1440@119.998+vrr"
TV_NAME="HDMI-1"
TV_MODE="3840x2160@120.000+vrr"
# Put your headset name here!
PC_AUDIO="alsa_output.usb-SteelSeries_Arctis_Nova_Pro_Wireless-00.iec958-stereo"
notify-send "Work Mode" "Waking up the monitors..."
# We enable everything for a second so the computer "sees" the desk screens
gnome-monitor-config set \
-LpM $MON1_NAME -m $MON1_MODE -x 0 -y 0 -s 1 \
-LM $MON2_NAME -m $MON2_MODE -x 2560 -y 0 -s 1 \
-LM $TV_NAME -m $TV_MODE -x 5120 -y 0 -s 1
# Now we wait for the monitors to actually respond...
RETRIES=0
MAX_RETRIES=15
while ! gnome-monitor-config list | grep -q "$MON1_NAME" || ! gnome-monitor-config list | grep -q "$MON2_NAME"; do
sleep 1
((RETRIES++))
if [ $RETRIES -ge $MAX_RETRIES ]; then
notify-send "Monitor Error" "Couldn't find your monitors!"
break
fi
done
sleep 3 # Give them a second to light up
# Finally, turn off the TV and just use the desk screens
gnome-monitor-config set \
-LpM $MON1_NAME -m $MON1_MODE -x 0 -y 0 -s 1 \
-LM $MON2_NAME -m $MON2_MODE -x 2560 -y 0 -s 1
pactl set-default-sink $PC_AUDIO
gsettings set org.gnome.desktop.session idle-delay 900 # 15 min screen timeout
flatpak kill com.valvesoftware.Steam # Close Steam to save power
notify-send "Work Mode" "All set for work!" -t 5000"Game Mode" (The Couch Experience)
This turns off my desk monitors and moves everything to my TV. I use a "wait loop" here for the audio, because HDMI sound can sometimes take a few seconds to appear after the TV turns on.
#!/bin/bash
TV_NAME="HDMI-1"
TV_MODE="3840x2160@120.000+vrr"
TV_AUDIO="alsa_output.pci-0000_03_00.1.hdmi-stereo-extra3"
# Switch to the TV
gnome-monitor-config set -LpM $TV_NAME -m $TV_MODE -s 1
# Wait for the TV's sound to wake up
RETRIES=0
MAX_RETRIES=60
while ! pactl list short sinks | grep -q "$TV_AUDIO"; do
sleep 1
((RETRIES++))
if [ $RETRIES -ge $MAX_RETRIES ]; then
notify-send "Audio Error" "TV sound didn't wake up in time!"
break
fi
done
pactl set-default-sink $TV_AUDIO
gsettings set org.gnome.desktop.session idle-delay 0 # Don't turn off screen while gaming!
# Launch Steam directly into Big Picture mode (like a console!)
# I use the Flatpak version of Steam for better compatibility.
flatpak run com.valvesoftware.Steam -bigpicture &To make it even easier, I was able to easily map the work and game scripts to buttons on my Stream Deck. This makes it literally a one-touch button to go from working, to gaming, and back!
2. The Windows 11 "Quick Start"
Sometimes I still need a Windows app, so I run it in a Virtual Machine (VirtualBox). However, a system feature called "KVM" can sometimes block VirtualBox from working smoothly. This script clears those blocks and starts my Windows 11 VM in one go.
#!/bin/bash
notify-send "Starting Windows 11" "Clearing roadblocks and booting..."
# This will pop up a window asking for your password
pkexec sh -c "modprobe -r kvm_intel; modprobe -r kvm_amd; modprobe -r kvm"
# Start the VM directly (no manager window needed!)
VirtualBoxVM --startvm "Windows 11"3. The "Internet Rescue" Button
Do you use a VPN for work? I use Cisco Secure Client, and sometimes when it disconnects, it leaves my internet "broken"—pages won't load even though I'm connected. This script is my emergency button. It flushes the memory and restarts the network to get me back online instantly.
#!/bin/bash
notify-send "Network Fix" "Resetting your internet connection..."
# Flushes the DNS and restarts the network services
pkexec bash -c "resolvectl flush-caches && systemctl restart systemd-resolved && systemctl restart NetworkManager"
notify-send "Network Fix" "You're back online!"A Few Final Tips for Success
- Make them clickable: You can save these as
.shfiles on your desktop, right-click them, and choose "Allow executing as program." - Visual Feedback: You'll notice I use
notify-send. This makes a little bubble pop up in the corner of your screen so you know the script is actually doing something! - Shortcuts: In Zorin, you can go to Settings > Keyboard > Shortcuts and link these scripts to specific keys on your keyboard. Or, if you are like me, use a Stream Deck for that nice, physical button press! I have mine set up so I can swap between my "Work" and "Gaming" layouts with a single tap.
Linux is all about making the computer work for you. Hopefully, these scripts give you a head start on making your Zorin OS setup feel perfect. If you have questions, just ask! Happy scripting!
Cozy Nerd