MintyFresh: My setup script for Linux Mint Debian Edition (LMDE 6)

Last edited on 2023-10-03 Tagged under  #lmde   #debian   #linux   #python   #programming 

LMDE

I've setup a few installs of Linux Mint Debian Edition (LMDE) for family, friends, and myself. I really like it! Mint's Cinnamon desktop comes with sensible defaults, is easy to customize, and intuitive to use for new and old Linux users alike.

MintyFresh is a setup script for the latest release of LMDE 6 aka "Faye". It is ideally run after the first boot into a fresh LMDE install.

Run mintyfresh -h for options.

Summary

  • Upgrade system
  • Install extra packages
  • Auto-remove obsolete kernels and dependencies
  • Setup zram for swap
  • Customize GRUB
  • Set no-password-required sudo for your username

How does it work?

Sync package repositories and install git:

$ sudo apt update && sudo apt install git

Download:

$ git clone https://gitlab.com/dwarmstrong/mintyfresh.git

Change directory and run script with your username as the sole argument:

$ cd mintyfresh
$ sudo ./mintyfresh.py <your_username>

Source: MintyFresh

Tasks

Tasks performed by the script in more detail.

1. Upgrade system

Update package sources and upgrade to latest package versions:

$ sudo apt update && sudo apt full-upgrade

2. Install extra packages

Microcode

Check /proc/cpuinfo for CPU and install the appropriate microcode firmware package.

For AMD:

$ sudo apt install amd64-microcode

For Intel:

$ sudo apt install intel-microcode

Console packages

$ sudo apt install apt-file apt-show-versions apt-utils aptitude \
command-not-found cowsay cryptsetup figlet git gnupg htop libxcb-xinerama0 \
lm-sensors lolcat ncalncdu neofetch newsboat openssh-server plocate rsync \
shellcheck sl speedtest-cli tmux tree unzip vim whois zstd

Pyenv

Manage multiple Python versions in Linux using pyenv

Desktop packages

$ sudo apt install dconf-editor ffmpeg fonts-firacode gimp gimp-data-extras \
gimp-help-en mint-meta-codecs papirus-icon-theme pavucontrol qpdfview rofi vlc

Virtualization

Virtualization using KVM + QEMU + libvirt

3. Auto-remove obsolete kernels and dependencies

Remove obsolete kernels and dependencies on a weekly basis. Always leave at least one older kernel installed and never remove manually installed kernels:

$ sudo systemctl enable --now mintupdate-automation-autoremove.timer

Create empty placeholder file:

$ sudo touch /var/lib/linuxmint/mintupdate-automatic-removals-enabled

4. Setup zram for swap

Zram swap on Linux Mint

5. Customize GRUB

Move to /etc/default/grub.d and disable 50_lmde.cfg and 60_mint-theme.cfg:

$ cd /etc/default/grub.d
$ sudo mv 50_lmde.cfg .50_lmde.cfg
$ sudo mv 60_mint-theme.cfg .60_mint-theme.cfg

Create 60_myconfig.cfg with desired options. Sample config:

#! /bin/sh
set -e

GRUB_DISTRIBUTOR="Debian"
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_DISABLE_SUBMENU=y
GRUB_GFXMODE=1024x768
#GRUB_BACKGROUND="/boot/grub/grub_wallpaper.png"

To enable a background image to the GRUB menu, uncomment GRUB_BACKGROUND and copy image to /boot/grub/grub_wallpaper.png.

Menu colors need to be set in a separate file. Open /etc/grub.d/40_custom and append:

set menu_color_normal="white/black"
set menu_color_highlight="black/green"

Update GRUB with the new settings:

$ sudo update-grub

6. Sudo without password

Grant sudo privileges to your username without requiring a password.

Create /etc/sudoers.d/sudoer_<your_username> with the line:

<your_username> ALL=(ALL) NOPASSWD: ALL

Create an SSH configuration in the user's home directory:

$ mkdir ~/.ssh && chmod 700 ~/.ssh
$ touch ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys

7. Finish up

If desired, set an alternative for the system editor:

$ sudo update-alternatives --config editor

Pick an alternate terminal, if more than one is installed:

$ sudo update-alternatives --config x-terminal-emulator

You can like, share, or comment on this post on Mastodon 💬

Thanks for reading! Read other posts?

» Next: #34. LMDE 6

« Previous: #33. Meteors