liviu
(diLivio)
March 13, 2025, 8:13am
1
Hello all
If someone has experience with psd
, please I need help.
Currently I am running firefox and/or librewolf and psd moves the profiles into tmpfs
for a better performance and to avoid read/write to SSD.
What I noticed is that the browsers continue to write under /home/$user/.cache/librewolf
and /home/$user/.cache/mozilla/firefox
This my setup:
$ cat /home/liviu/.config/psd/.psd.conf
# Automatically generated file; DO NOT EDIT!
# The purpose is to snapshot the settings used when psd was activated.
# Any edits to the live config: /home/liviu/.config/psd/psd.conf
# will be applied the _next_ time psd is activated.
#
USE_OVERLAYFS="yes"
USE_SUSPSYNC=""
BROWSERS="firefox librewolf"
USE_BACKUPS="no"
BACKUP_LIMIT="0"
liviu@bobdenaut:~$ df -h|grep 1000
tmpfs 3.1G 54M 3.1G 2% /run/user/1000
overlaid 3.1G 54M 3.1G 2% /run/user/1000/psd/liviu-firefox-s3q6whm5.default-release
overlaid 3.1G 54M 3.1G 2% /run/user/1000/psd/liviu-librewolf-a2r6dd7l.default-default
liviu@bobdenaut:~$ psd p
Profile-sync-daemon v6.50
systemd service: active
resync-timer: active
sync on sleep: disabled
use overlayfs: enabled
Psd will manage the following per /home/liviu/.config/psd/.psd.conf:
browser/psname: firefox/firefox
owner/group id: liviu/1000
sync target: /home/liviu/.mozilla/firefox/s3q6whm5.default-release
tmpfs dir: /run/user/1000/psd/liviu-firefox-s3q6whm5.default-release
profile size: 143M
overlayfs size: 26M
backup limit: 0
recovery dirs: none
browser/psname: librewolf/librewolf
owner/group id: liviu/1000
sync target: /home/liviu/.librewolf/a2r6dd7l.default-default
tmpfs dir: /run/user/1000/psd/liviu-librewolf-a2r6dd7l.default-default
profile size: 198M
overlayfs size: 27M
backup limit: 0
recovery dirs: none
Any idea how do I make them not writing on /home/$user/.cache
?
Thanks
vgaetera
(Vladislav Grigoryev)
March 13, 2025, 10:24am
2
for DIR in mozilla/firefox librewolf
do
rm -f -R ~/.cache/${DIR}
ln -f -s -T ${XDG_RUNTIME_DIR} ~/.cache/${DIR}
done
liviu
(diLivio)
March 13, 2025, 10:39am
3
Vladislav Grigoryev:
${XDG_RUNTIME_DIR}
Under ${XDG_RUNTIME_DIR}
directory are a lot of files/directories.
How will affect creating a “ln”?
liviu@bobdenaut:~$ cd ${XDG_RUNTIME_DIR}
liviu@bobdenaut:/run/user/1000$ ls
at-spi doc gvfs libpod pipewire-0-manager.lock systemd
bus gnome-session-leader-fifo gvfsd pipewire-0 psd wayland-0
containers gnome-shell ICEauthority pipewire-0.lock psd.pid wayland-0.lock
dconf gnupg keyring pipewire-0-manager pulse
liviu
(diLivio)
March 13, 2025, 10:48am
4
I dont think your proposal is correct, at all.
You are suggesting to create a link from my local .cache/firefox dir to /run/user/1000/ which is widely used by many other apps
vgaetera
(Vladislav Grigoryev)
March 13, 2025, 11:12am
5
The cache is stored in a sub-directory that matches the name of the browser’s profile and can be considered unique in the runtime scope.
liviu
(diLivio)
March 13, 2025, 11:17am
6
no, it’s not ok because psd has already created a shortcut:
liviu@bobdenaut:~/.cache/mozilla/firefox$ ls -la
total 14
drwx------. 3 liviu liviu 3 Mar 13 08:19 .
drwx------. 3 liviu liviu 3 Mar 13 08:19 ..
drwx------. 6 liviu liviu 7 Mar 13 08:19 s3q6whm5.default-release
right here:
liviu@bobdenaut:~/.cache/mozilla/firefox$ cd ~/.mozilla/firefox/
liviu@bobdenaut:~/.mozilla/firefox$ ls -la
total 57
drwx------. 6 liviu liviu 9 Mar 13 10:36 .
drwxr-xr-x. 6 liviu liviu 6 Mar 12 02:51 ..
drwx------. 3 liviu liviu 5 Mar 9 18:15 'Crash Reports'
-rw-r--r--. 1 liviu liviu 62 Mar 9 19:54 installs.ini
drwx------. 2 liviu liviu 2 Mar 9 17:54 'Pending Pings'
-rw-r--r--. 1 liviu liviu 189 Mar 9 19:54 profiles.ini
lrwxrwxrwx. 1 liviu liviu 57 Mar 13 10:36 s3q6whm5.default-release -> /run/user/1000/psd/liviu-firefox-s3q6whm5.default-release
drwx------. 14 liviu liviu 55 Mar 13 08:19 s3q6whm5.default-release-back-ovfs
drwx------. 14 liviu liviu 55 Mar 13 08:19 s3q6whm5.default-release-backup
so, its either a psd bug or i’ve messed up the settings
vgaetera
(Vladislav Grigoryev)
March 13, 2025, 11:28am
7
The official documentation refers to the Arch wiki to store the cache in tmpfs:
Both /run
and /tmp
use tmpfs by default and discarded on reboot.
liviu
(diLivio)
March 13, 2025, 11:35am
8
correct, and it does:
sync target: /home/liviu/.mozilla/firefox/s3q6whm5.default-release
tmpfs dir: /run/user/1000/psd/liviu-firefox-s3q6whm5.default-release
my issue is with the browser still writing at /home/$USER/.cache/bla/bla
vgaetera
(Vladislav Grigoryev)
March 13, 2025, 11:44am
9
To be clear, PSD manages your browser’s profile, not the cache.
The cache is safe to discard, so it can be linked to tmpfs.
As an alternative, you can link it to the browser’s profile:
for DIR in mozilla librewolf
do
rm -f -R ~/.cache/${DIR}
ln -f -s -T ../.${DIR} ~/.cache/${DIR}
done
liviu
(diLivio)
March 13, 2025, 1:59pm
10
I just found a better way:
browser.cache.disk.parent_directory /run/user/1000/psd/librewolf/
you can set this by accessing about:config
in the browser
or, create a file user.js with this content and save it inside of your firefox’s profile folder:
user_pref("browser.cache.disk.parent_directory", "/run/user/1000/psd/librewolf/");