UPGs is a Debian (and maybe other Linux distributions) design which is inherited by and unmodified in Qubes Debian.
That clarifies the reason. Thanks.
Regarding copying /var/cache/tb-binary/*
(283 MiB of data) to $HOME
:
In App Qubes, yes.
This seems quite inefficient, as it means backup of programs (not user data) along with everything else in the AppVM + additional writes to SSDs.
How about something like this:
if [ ! -d "${HOME}/profile.default" ]; then
mv /var/cache/tb-binary/.tb/tor-browser/Browser/TorBrowser/Data/Browser/profile.default "${HOME}"
fi
ln -sfT "${HOME}/profile.default" /var/cache/tb-binary/.tb/tor-browser/Browser/TorBrowser/Data/Browser/profile.default
mkdir "${HOME}/.tb"
sudo mount --bind /var/cache/tb-binary/.tb /home/user/.tb
# then start TB
In this way, only actual user data (the profile) will reside in the AppVM and TB will still run as if it is installed in “$HOME”.
What do you say?