How to use TOR network system-wide?

I’ve tried following the instructions shown in askubuntu: is there a way to use tor system wide.

  1. I’ve installed tor and torsocks.

  2. After installation, go to System Settings… → Network → Network proxy and enter these settings: and port 9050 into SOCKS section.

I haven’t restarted, do I really need to restart?

  1. In firefox I selected Use system proxy settings.

But then when I try it I get the error

The proxy server is refusing connections
An error occurred during a connection to

I’ve also tried setting TOR only on Firefox as shown in ubuntubuzz: how to configure tor firefox on ubuntu 1804.
This instructions don’t say anything about restarting, it says tor runs automatically in the background. And then it tells you to select one extra option that doesn’t appear for the system proxy settings which is use Proxy DNS when using SOCKS v5. When I try browsing I get the same error.

Tor Browser is working great though.

Did you take a look at Tor - ArchWiki ?

I’ve looked at the Tor - ArchWiki and I hadn’t started and enabled the service. I’ve done that now but firefox is still not able to connect. Although it takes a while loading now instead of failing immediately.