From 7625877dac96b28cab86f2b0cf0e2a6573357de3 Mon Sep 17 00:00:00 2001 From: Xavier Petit <32063953+xpetit@users.noreply.github.com> Date: Sun, 13 Oct 2019 04:18:08 +0200 Subject: [PATCH] Put user cache folder in RAM --- scripts/system/etc/gdm3/PostLogin/Default | 1 + scripts/system/etc/gdm3/PostSession/Default | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/system/etc/gdm3/PostLogin/Default b/scripts/system/etc/gdm3/PostLogin/Default index b2a732502..95c971da4 100755 --- a/scripts/system/etc/gdm3/PostLogin/Default +++ b/scripts/system/etc/gdm3/PostLogin/Default @@ -46,3 +46,4 @@ temp_path=/mnt/.01/tmp mkdir -p "$user_path" "$temp_path" chown -R "$USER":"$USER" "$user_path" "$temp_path" mount -t overlay -o lowerdir="$HOME",upperdir="$user_path",workdir="$temp_path" overlay "$HOME" +mount -t tmpfs -o size=2G tmpfs "$HOME"/.cache diff --git a/scripts/system/etc/gdm3/PostSession/Default b/scripts/system/etc/gdm3/PostSession/Default index 2b041c425..d4b65befa 100755 --- a/scripts/system/etc/gdm3/PostSession/Default +++ b/scripts/system/etc/gdm3/PostSession/Default @@ -21,6 +21,6 @@ systemctl stop user@1000.service # Make sure the mountpoints are free kill $(lsof -t "$HOME" /mnt) $(ps --no-headers -u "$USER" -o pid) -umount "$HOME" /mnt +umount "$HOME"/.cache "$HOME" /mnt umount /dev/disk/by-partlabel/01-home ||: wipefs -a /dev/disk/by-partlabel/01-tmp-home