Instructions for using Tor shipped by Tor Browser on Whonix-Gateway.
On Whonix-Gateway.
Disable apparmor for Tor Browser as we want to to access /etc/tor/torrc.
sudo aa-disable /etc/apparmor.d/home.tor-browser.firefox
Install tb-updater.
sudo apt --no-install-recommends install tb-updater
Login as user debian-tor.
sudo -u debian-tor bash
Change to the homer folder of debian-tor.
cd /var/lib/tor
Download Tor Browser.
update-torbrowser
Tor Browser will be installed in folder /var/lib/tor/.tb/tor-browser by now.
Go to another terminal emulator tab owned so it will use login user user. Stop system Tor. This is required so Tor shipped by Tor Browser can be used.
sudo systemctl stop tor@default
Go back to a terminal emulator running with login user debian-tor. Change directolry to the Tor Browser folder.
cd ~/.tb/tor-browser/
Start Tor Browser.
./start-tor-browser.desktop --debug
Here I am stuck. I tried to edit both files
./Browser/TorBrowser/Data/Tor/torrc-defaults./Browser/TorBrowser/Data/Tor/torrc
To add at the very top of the file:
%include /etc/tor/torrc
The idea was simply load the Whonix Tor configuration so all SocksPorts etc. that Whonix configured gets load as usual. In theory, Tor shipped by Tor Browser at that point would be in use as system Tor.
In practice somehow only Tor Browser default SocksPorts are opened. Maybe tor-launcher configures that.