This guide has been tested with Tails OS versions 5.14
Persistent Storage
If you want to keep Moment persistent, we need to set up the Persistent storage accordingly: (if you want to use Moment only once and lose everything after shutdown/reboot skip to section Install)
- Make sure you are using an up to date Tails OS, check out https://tails.boum.org/doc/upgrade/.
- Create persistent storage, follow the steps on https://tails.boum.org/doc/persistent_storage/create/, skip to step 2 if you already have a persistent storage
- Configure persistent storage with Additonal software enabled and features according to your other needs (mail, pgp, additional software) follow the steps on https://tails.boum.org/doc/persistent_storage/configure/, skip to step 3 if you already have configured your persistent storage with additional software enabled.
- (Re)start your Tails and setup an administration password, follow section Set up an administration password at https://tails.boum.org/doc/first_steps/welcome_screen/administration_password/.
- Choose Applications ▸ System Tools ▸ Root Terminal and use the password set in step 3.
- In order to create persistent storage for Flatpak, a package manager we're going to use for installing Element Desktop and keeping the software, settings, keys, messages etc. persistent, execute
sed -i '$ a /home/amnesia/.local/share/flatpak source=flatpak\n/home/amnesia/.var/app source=var_app\n/home/amnesia/.local/share/applications source=applications' /live/persistence/TailsData_unlocked/persistence.conf
- Shutdown Tails.
Install
Flatpak
-
If you already have Flatpak installed with Flathub repo configured, skip to Element Desktop
-
Start your Tails with persistent storage unlocked and setup an administration password, follow section Set up an administration password at https://tails.boum.org/doc/first_steps/welcome_screen/administration_password/.
-
Choose Applications ▸ System Tools ▸ Terminal
-
Install the package manager Flatpak with executing
sudo apt update && sudo apt install flatpak xdg-desktop-portal-gtk
- Make the installation persistent (Install every time) following step 3. at https://tails.boum.org/doc/persistent_storage/additional_software/#index4h2
- No we add the Flathub repository to Flatpak, executing
torify flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Ignore WARNING torsocks[33952]: [syscall] Unsupported syscall number 315.
Moment
- Using the Terminal install Moment, executing
torify flatpak install flathub xyz.mx_moment.moment
and confirm with
Y
- For running Moment on Tails via Tor and access to audio devices, we need to set parameters running element-desktop. This can be achieved using an executable shell script + creating a desktop file for a more convenient launch of Element, executing:
Further details
Outside the unsafe browser, Tails is configured to limit network use to the Tor network only. Therefore we need to tell element-desktop using Tor's SOCKS proxy by exportingexport HTTP_PROXY=socks://127.0.0.1:9050
andexport HTTPS_PROXY=socks://127.0.0.1:9050
.
echo -e '#!/bin/sh\nflatpak run xyz.mx_moment.moment --proxy-server=socks5://127.0.0.1:9050' | tee -a /home/amnesia/Persistent/moment.sh && chmod +x /home/amnesia/Persistent/moment.sh && echo -e '[Desktop Entry]\nType=Application\nName=Moment\nExec=bash -c '\''/home/amnesia/Persistent/moment.sh'\''\nTerminal=true\nCategories=Network\nMimeType=x-scheme-handler/moment;\nStartupWMClass=moment\nKeywords=Matrix;Moment;' | tee -a ~/.local/share/applications/Moment.desktop
- If you haven't done it already while installing another Flatpak from this HowTo, create an update script and Desktop shortcut for conveniently updating Flatpak managed applications, executing:
echo -e '#!/bin/sh\n torify flatpak update' | tee -a /home/amnesia/Persistent/flatpak-update.sh && chmod a+x /home/amnesia/Persistent/flatpak-update.sh && echo -e '[Desktop Entry]\nType=Application\nName=Flatpak-Update\nExec=bash -c '\''/home/amnesia/Persistent/flatpak-update.sh'\''\nTerminal=true\nCategories=Network\nMimeType=x-scheme-handler/element;\nStartupWMClass=flatpak\nKeywords=flatpak;update;' | tee -a ~/.local/share/applications/Flatpak-Update.desktop
Start
- Start Tails with persistent storage unlocked.
- Wait until additional software is installed successfully.
- Go to Activities Overview, type
Moment
and click the icon to start.
Alternatively via commandline:
- Start Tails with persistent storage unlocked.
- Wait until additional software is installed successfully.
- Choose Applications ▸ System Tools ▸ Terminal
- Execute:
Persistent/moment.sh
Update applications installed via Flatpak
Regularly you should update your applications installed via Flatpak
- Start Tails with persistent storage unlocked.
- Wait until additional software is installed successfully.
- Go to Activities Overview, type
Flatpak
and click onFlatpak-Update
to start. - When queried for in the terminal, confirm updates with
Y
Alternatively via commandline:
- Start Tails with persistent storage unlocked.
- Wait until additional software is installed successfully.
- Choose Applications ▸ System Tools ▸ Terminal
- Execute:
Persistent/flatpak-update.sh
- When queried for in the terminal, confirm updates with
Y