Linux Mint Notes
This is a collection of notes I keep for myself about setting up Linux Mint on my computer.
System#
Laptop Battery Care with TLP#
I use TLP to set battery charge thresholds to keep my laptop battery in good shape for longer. After some research, it looks like charging if below 75% and stopping at 80% is the sweet spot for battery health.
- Install TLP and the ThinkPad support package:
1 | |
- Send the charge thresholds to the battery controller:
1 | |
- Also write the thresholds to
/etc/tlp.confso that they get loaded and set at boot time, in case they were not persisted in the battery by the previous command:
1 2 | |
Use tlp-stat to confirm the configured thresholds:
1 2 3 4 5 6 7 8 9 | |
Use RAM for /tmp#
Add this to /etc/fstab to use a RAM-backed file system instead of local storage for /tmp:
1 2 | |
This is what the options do:
nodev,noexec,nosuidare security precautions to reduce the system attack surface: do not allow special device files, deny file execution, and ignore the SUID bit in file permissions.- The SUID bit allows a regular user to execute a root-owned file with root privileges, but there is no legitimate need for that in
/tmp. nosuidis redundant ifnoexecis also set, but it's a good idea to keep it there in case you decide to removenoexeclater.
- The SUID bit allows a regular user to execute a root-owned file with root privileges, but there is no legitimate need for that in
mode=1777gives everyone full rwx permissions on/tmp.- The
1in1777is the sticky bit, which prevents regular users from being able to delete other users' files, despite otherwise having the permissions to do so in/tmp.
- The
size=4096Msets the maximum size of/tmp; if not specified it defaults to half the RAM size.
Check if /tmp is RAM-backed after reboot:
1 2 | |
I had trouble installing Linux games from GOG because of the
noexecoption. Setup failed with errors likeeval: ./startmojo.sh: Permission denied. The solution is to run the installer with the--keepflag, which makes MojoSetup write and execute its temporary files in the current directory instead of/tmp.
Disable Swap#
My computer doesn't have a lot of RAM, but I don't run anything too intense either. Since I don't need swap space, I would rather it be put to better use by the SSD's wear leveling system.
The Linux Mint 18 installer lets you choose not to use a swap partition, but Linux Mint 19 and later always use a swap file located at /swapfile. Note how this is a special file instead of a separate partition. Here are the steps I used to turn it off:
- Turn swap off:
1 | |
- Remove these lines from the file systems table in
/etc/fstab:
1 2 | |
- Remove this line from the encrypted block devices table in
/etc/crypttab:
1 | |
- Delete the swap file and reboot:
1 2 | |
At first I ran
swapoffwithout editing the table files in/etc, and that caused errors that added 30 seconds to the kernel boot time according tosystemd-analyze! The boot time returned to normal after I updated those files.
Show the GRUB Menu at Boot#
Open the /etc/default/grub file and edit these lines:
1 2 3 4 | |
Afterwards, run sudo update-grub to update the configuration with the new settings.
Desktop#
Custom ~/Desktop Folder#
I don't use Desktop icons and don't want the empty ~/Desktop directory to show up under $HOME. You can't permanently delete this folder, but you can hide it by editing its path in ~/.config/user-dirs.dirs:
1 2 | |
Now you can delete ~/Desktop and it won't be restored anymore.
Fix Trailing '/' Tab-completion on Symlink Directories#
Add this line to ~/.bashrc to make the trailing / part of the TAB-complete name for symbolic link directories, to match the behavior for regular directories:
1 | |
Configure Redshift Manually#
Redshift is great for eye comfort in the evening (I use it all day). Sadly, the internet location server it uses to determine dawn and dusk times has been retired in 2024, which makes Redshift crash at launch on Linux Mint 20 and 21.
Luckily, you can set the dawn and dusk times manually in $HOME/.config/redshift.conf, and then redshift and redshift-gtk will work again:
1 2 3 4 5 6 | |
Fix Oversized Icons in Cinnamon Panels#
When I upgraded to Cinnamon 4.4.8, some of the panel icons like WiFi and Sound were larger than the rest. Here is a way to fix them:
- Right-click panel, select Panel settings
- Under the Panel appearance section select the Left/Center/Right Zone
- Edit the Symbolic icon size (px) value as appropriate
- Standard color icons have an auto-scale option, but symbolic icons are limited to absolute values.
Before:

After:

Development#
Enabling i386 Architecture Support#
The old Linux toolchains I use to cross-compile my GP2X games and Pandora games are 32-bit ELF binaries. Modern 64-bit Linux distributions don't include support for the i386 architecture out of the box, but you can add it manually and download architecture-specific packages:
In the default state, arm-open2x-linux-gcc is not recognized as an executable:
1 2 3 4 5 6 7 8 | |
Let's enable i386 support and install the 32-bit libc:
1 2 | |
Now the loader can find the executable's runtime dependencies and we can run it:
1 2 3 4 5 6 7 8 9 10 | |