Startup Applications for Linux Mint
Tagged with hibernation, linux, ram, workspaces, zram on October 18, 2024
I’ve recently discovered the utility of workspaces, along with hibernation. Despite what some people think, resuming from hibernation isn’t designed to clear the swap file. If your swap file isn’t zero when you hibernate, it won’t be zero when you resume. You will eventually have to reboot your computer in order to clear everything, including your swap file.
I don’t like having to set up workspaces. Once is enough. When I’m done for the day, I hibernate my system. I only shut down the system normally or reboot when a system update requires it, such as a new kernel. Since I don’t like setting up workspaces, I have a shell script that executes along with all of my other startup applications.
Startup Applications
Some startup applications were set up when I installed Linux Mint. I disabled all of them except “Blueman Applet”, “SSH Key Agent”, “Update Manager”, and “xapp-sn-watcher”. When I started using workspaces, I added my own, which I call “Setup Workspaces”, with a script residing in my home directory called “workspaces.sh”.
To use this script, I had to install “xdotool”, which is available in either the Ubuntu or Mint repositories. I used the keyboard application to assign hotkeys to every workspace. This is the script:
#!/bin/bash geany & google-chrome-stable & quiterss & sleep 3 # xdotool key ctrl+alt+2 kate -b & google-chrome-stable --app=http://localhost/ --class=WebApp-Localhost4224 --name=WebApp-Localhost4224 --start-maximized & sleep 3 # xdotool key ctrl+alt+3 rhythmbox & sleep 3 xdotool key ctrl+alt+1
I’m only using three workspaces. I’m using Kate instead of Geany in the second workspace because the second instance of Geany will screw up the first. Instead of using another instance of Chrome, which does the same thing, I created a web app to display my blog (as it’s being written) on the localhost address.
Alternatives to xdotool
The xdotool application works fine on distributions that haven’t switched to Wayland. It doesn’t work at all on Wayland, but there are alternatives:
Linux Mint is more than a year away from complete implementation of Wayland. It’s very likely they’ll continue to support the X environment for some time after Wayland works correctly. Based on experience, the Linux Mint team doesn’t force anything on anyone until it works perfectly.
Dual Swap
I no longer worry about the swap space. I have a swap file twice the size of my RAM (16/32 gigabytes), and I have zram running at the same time. Normal swap usage targets the zram partition, while hibernation targets the swap file.
Zram swap usage drops when RAM usage drops, unlike the behavior of a swap file. I suppose I will eventually have to reboot the computer when the zram swap usage gets too high. It took me hours to force the system to use three gigabytes of swap usage while testing. It dropped to less than one after I closed everything, and it further dropped to 500 megabytes when I reopened the applications I normally use.
Image by Cinnamon developer, LGPL, via Wikimedia Commons
← Previous ArticleNext Article →