Linux

Backup and Restore Ubuntu based systems

Use apt-clone, deja-dup and some shell scripts to backup and restore ubuntu based systems:

Requirements:

Backup

sudo apt install apt-clone
mkdir ~/backup
cd ~/backup
sudo apt-clone clone apt-clone-state-ubuntu-$(lsb_release -sr)-$(date +%F).tar.gz
flatpak list --columns=application --app | tee flatpak.lst

# backup /etc
sudo apt install etckeeper
sudo etckeeper vcs remote add origin $GITHUB_URL
sudo etckeeper vcs push

Run DejaDup and store the backup in ~/backup/dejadup in this example.

You can probably also run DejaDup to restore into a folder somewhere, instead of using duplicity below.

Restore

cd ~/backup
sudo apt-clone restore apt-clone-state-ubuntu-$(lsb_release -sr)-$(date +%F).tar.gz
xargs flatpak install < flatpak.lst

sudo su
# change myuser
PASSPHRASE="" duplicity restore file:///home/myuser/backup/dejadup /root/restore
cp -r /root/restore/home/myuser/. /home/myuser
chown myuser:myuser /home/myuser -R

# etc (unverified)
cd /tmp
git clone $GITHUB_URL etc.new
sudo mv /etc /tmp/etc.old
sudo mv /tmp/etc.new /etc

Now reboot

Elementary OS Configuration and Setup

ElementaryOS 7 Horus

Grub has no timeout

$ sudo nano /etc/default/grub
GRUB_TIMEOUT=5

PHPenv

Use native PHP packages and my PHP activate

iCloud contacts and calendar

https://ekiwi-blog.de/en/26497/synchronize-icloud-calendar-and-contacts-with-thunderbird/ TLDR TBSync with an application specific password.

Media keys on macintosh keyboard

  1. if you press Fn+Esc it changes the Fn lock so that F1+F12 work as normal.
  2. For an untested permanent solution try remapping

Google Calendar integration

sudo apt install gnome-control-center gnome-online-accounts
Exec=env XDG_CURRENT_DESKTOP=GNOME gnome-control-center --overview

Enable Google Account and it's Calendar

Assign Eject to Multitasking view:

https://vandragt.com/map-eject-to-multitasking-view

So I use ElementaryOS and in version 7 you are no longer able to map just the Eject key. I like to map this to the Multitasking View (something like the macOS Expose).

The solution is to use the DConf Editor application and search for show-desktop. ElementaryOS repurposes the show desktop to the multitasking view. Simply set the value to ['Eject']

ElementaryOS 6

B560

Does not find wireless until Linux-firmware is installed. Use Ethernet and dist-upgrade followed by install Linux-firmware

Other

Do not install the following packages via apt, as you want to control when to update them:

Macos Migration

Essential apps

sudo apt install gnome-system-monitor

Keyboard

Change shell

sudo apt install zsh
# TODO steps to configure it
chsh -s $(which zsh)

Time Since Last Resume

This has been moved to https://github.com/svandragt/break-aware