Tails 6.6, automation authored by about:privacy's avatar about:privacy
_This guide has been tested with Tails OS version **5.14**_ _This guide has been tested with Tails OS version **6.6**_
## Persistent Storage ## Persistent Storage
If you want to keep Element Desktop persistent, we need to set up the Persistent storage accordingly: (if you want to use Element Desktop only once and lose everything after shutdown/reboot skip to section [Install](#Install)) If you want to keep Element Desktop persistent, we need to set up the Persistent storage accordingly: (if you want to use Element Desktop only once and lose everything after shutdown/reboot skip to section [Install](#Install))
0. Make sure you are using an up to date Tails OS, check out https://tails.boum.org/doc/upgrade/. 0. Make sure you are using an up to date Tails OS, check out https://tails.boum.org/doc/upgrade/.
1. 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 1. 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
2. Configure persistent storage with _[Additonal software](https://tails.boum.org/doc/persistent_storage/configure/#index12h2)_ 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. 2. Configure persistent storage with _[Additonal software](https://tails.boum.org/doc/persistent_storage/configure/#index12h2)_ 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.
3. (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/. 3. (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/.
4. Choose Applications ▸ System Tools ▸ Root Terminal and use the password set in step 3. 4. Choose Applications ▸ System Tools ▸ Root Terminal and use the password set in step 3.
6. In order to create persistent storage for [Flatpak](https://flatpak.org), a package manager we're going to use for installing Element Desktop and keeping the software, settings, keys, messages etc. persistent, execute 6. In order to create persistent storage for [Flatpak](https://flatpak.org), 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 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
~~~ ~~~
7. Shutdown Tails. 7. Shutdown Tails.
## Install ## Install
### Flatpak ### Flatpak
0. If you already have Flatpak installed with Flathub repo configured, skip to [Element Desktop](#element-desktop) 0. If you already have Flatpak installed with Flathub repo configured, skip to [Element Desktop](#element-desktop)
1. 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/. 1. 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/.
2. Choose Applications ▸ System Tools ▸ Terminal 2. Choose Applications ▸ System Tools ▸ Terminal
3. Install the package manager Flatpak with executing 3. Install the package manager Flatpak with executing
~~~ ~~~
sudo apt update && sudo apt install flatpak xdg-desktop-portal-gtk sudo apt update && sudo apt install flatpak xdg-desktop-portal-gtk
~~~ ~~~
4. Make the installation persistent (_Install every time_) following step 3. at https://tails.boum.org/doc/persistent_storage/additional_software/#index4h2 4. Make the installation persistent (_Install every time_) following step 3. at https://tails.boum.org/doc/persistent_storage/additional_software/#index4h2
5. No we add the Flathub repository to Flatpak, executing 5. No we add the Flathub repository to Flatpak, executing
~~~ ~~~
torify flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo torify flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
~~~ ~~~
Ignore _WARNING torsocks[33952]: [syscall] Unsupported syscall number 315._ Ignore _WARNING torsocks[33952]: [syscall] Unsupported syscall number 315._
### Element-Desktop ### Element-Desktop
1. Using the Terminal install element-desktop, executing 1. Using the Terminal install element-desktop, executing
~~~ ~~~
torify flatpak install flathub im.riot.Riot torify flatpak install -y flathub im.riot.Riot
~~~ ~~~
and confirm with
~~~ 2. For running element-desktop on Tails via Tor and access to audio devices, we need to set parameters running element-desktop. <details><summary>Further details</summary> 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 exporting `export HTTP_PROXY=socks://127.0.0.1:9050` and `export HTTPS_PROXY=socks://127.0.0.1:9050`.</details> This can be achieved using an executable shell script + creating a desktop file for a more convenient launch of Element, executing:
Y ~~~
~~~ echo -e '#!/bin/sh\nenv /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=/app/bin/element --file-forwarding im.riot.Riot --proxy-server=socks5://127.0.0.1:9050 @@u %U @@' | tee -a /home/amnesia/Persistent/element-desktop.sh && chmod +x /home/amnesia/Persistent/element-desktop.sh && echo -e '[Desktop Entry]\nType=Application\nName=Element\nIcon=/home/amnesia/.local/share/flatpak/app/im.riot.Riot/current/active/files/share/icons/hicolor/256x256/apps/im.riot.Riot.png\nExec=bash -c '\''/home/amnesia/Persistent/element-desktop.sh'\''\nTerminal=true\nCategories=Network\nMimeType=x-scheme-handler/element;\nStartupWMClass=element\nKeywords=Matrix;Element;' | tee -a ~/.local/share/applications/Element.desktop
2. For running element-desktop on Tails via Tor and access to audio devices, we need to set parameters running element-desktop. <details><summary>Further details</summary> 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 exporting `export HTTP_PROXY=socks://127.0.0.1:9050` and `export HTTPS_PROXY=socks://127.0.0.1:9050`.</details> This can be achieved using an executable shell script + creating a desktop file for a more convenient launch of Element, executing: ~~~
~~~ 4. 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\nflatpak run im.riot.Riot --proxy-server=socks5://127.0.0.1:9050' | tee -a /home/amnesia/Persistent/element-desktop.sh && chmod +x /home/amnesia/Persistent/element-desktop.sh && echo -e '[Desktop Entry]\nType=Application\nName=Element\nIcon=/home/amnesia/.local/share/flatpak/app/im.riot.Riot/current/active/files/share/icons/hicolor/128x128/apps/im.riot.Riot.png\nExec=bash -c '\''/home/amnesia/Persistent/element-desktop.sh'\''\nTerminal=true\nCategories=Network\nMimeType=x-scheme-handler/element;\nStartupWMClass=element\nKeywords=Matrix;Element;' | tee -a ~/.local/share/applications/Element.desktop ~~~
~~~ echo -e '#!/bin/sh\n torify flatpak update -y' | 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\nStartupWMClass=flatpak\nKeywords=flatpak;update;' | tee -a ~/.local/share/applications/Flatpak-Update.desktop
4. 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
~~~ 1. Start Tails with persistent storage unlocked.
2. Wait until additional software is installed successfully.
### Start 3. Go to [Activities Overview](https://tails.boum.org/doc/first_steps/desktop/index.en.html#activities), type `Element` and click the icon to start.
1. Start Tails with persistent storage unlocked.
2. Wait until additional software is installed successfully. <details><summary>Alternatively via commandline:</summary>
3. Go to [Activities Overview](https://tails.boum.org/doc/first_steps/desktop/index.en.html#activities), type `Element` and click the icon to start.
1. Start Tails with persistent storage unlocked.
<details><summary>Alternatively via commandline:</summary> 2. Wait until additional software is installed successfully.
3. Choose Applications ▸ System Tools ▸ Terminal
1. Start Tails with persistent storage unlocked. 4. Execute:
2. Wait until additional software is installed successfully. ~~~
3. Choose Applications ▸ System Tools ▸ Terminal Persistent/element-desktop.sh
4. Execute: ~~~
~~~ </details>
Persistent/element-desktop.sh
~~~ ### Update applications installed via Flatpak
</details> Regularly you should update your applications installed via Flatpak
1. Start Tails with persistent storage unlocked.
### Update applications installed via Flatpak 2. Wait until additional software is installed successfully.
Regularly you should update your applications installed via Flatpak 3. Go to [Activities Overview](https://tails.boum.org/doc/first_steps/desktop/index.en.html#activities), type `Flatpak` and click on `Flatpak-Update` to start.
1. Start Tails with persistent storage unlocked. 4. When queried for in the terminal, confirm updates with
2. Wait until additional software is installed successfully. ~~~
3. Go to [Activities Overview](https://tails.boum.org/doc/first_steps/desktop/index.en.html#activities), type `Flatpak` and click on `Flatpak-Update` to start. Y
4. When queried for in the terminal, confirm updates with ~~~
~~~ <details><summary>Alternatively via commandline:</summary>
Y
~~~ 1. Start Tails with persistent storage unlocked.
<details><summary>Alternatively via commandline:</summary> 2. Wait until additional software is installed successfully.
3. Choose Applications ▸ System Tools ▸ Terminal
1. Start Tails with persistent storage unlocked. 4. Execute:
2. Wait until additional software is installed successfully. ~~~
3. Choose Applications ▸ System Tools ▸ Terminal Persistent/flatpak-update.sh
4. Execute: ~~~
~~~
Persistent/flatpak-update.sh
~~~
5. When queried for in the terminal, confirm updates with
~~~
Y
~~~
</details> </details>
\ No newline at end of file