The official website of the TBlock ad-blocker
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

280 lines
14 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="TBlock is an anticapitalist ad-blocker that uses the hosts file. It is written in Python and released under GPLv3.">
<meta name="keywords" content="anticapitalist,non-profit,foss,oss,free,software,open,source,ad-blocking,ad-blocker,adblocker,adblocking">
<meta name="referrer" content="no-referrer">
<meta property="og:type" content="website">
<meta property="og:title" content="Install | TBlock - An anticapitalist ad-blocker that uses the hosts file">
<meta property="og:description" content="TBlock is a system-wide, platform independent ad-blocker written in Python and released under GPLv3.">
<meta property="og:url" content="https://tblock.codeberg.page/">
<meta property="og:site_name" content="TBlock">
<meta property="og:image" content="/static/images/thumb.png">
<link rel="stylesheet" href="/static/css/style.css" type="text/css" charset="utf-8">
<link rel="stylesheet" href="/static/css/fonts.css" type="text/css" charset="utf-8">
<link rel="stylesheet" href="/static/fontawesome/css/all.css" charset="utf-8">
<link rel="icon" href="/static/favicon.ico" type="image/x-icon">
<link rel="license" href="/LICENSE.txt" type="text" charset="utf-8">
<link rel="canonical" href="http://tblock.codeberg.page/en/install">
<title>Install | TBlock - An anticapitalist ad-blocker that uses the hosts file</title>
</head>
<body>
<header>
<div class="language-corner">
<a href="/en/install"><u>🇬🇧</u></a>
<a href="/fr/install">🇫🇷</a>
<a href="/es/install">🇪🇸</a>
</div>
<a href="/en/" title="TBlock"><img src="/static/images/tblock.svg" class="nav-logo" /></a>
<nav>
<a class="nav-link" href="/en/" title="Homepage">Homepage</a>
<a class="nav-link" href="/en/install" title="Install"><u>Install</u></a>
<a class="nav-link" href="/en/about" rel="noreferrer" title="About">About</a>
<a class="nav-link" href="https://codeberg.org/tblock/tblock/wiki/Home" rel="noreferrer" title="Wiki">Wiki</a>
</nav>
</header>
<main>
<article id="summary">
<h1>Installation methods</h1>
<ul>
<li>
<a href="#python">With Python</a>
</li>
<li>
<a href="#ubuntu">On Ubuntu</a>
</li>
<li>
<a href="#fedora">On Fedora</a>
</li>
<li>
<a href="#arch">On Arch Linux</a>
</li>
<li>
<a href="#windows">On Windows</a>
</li>
<li>
<a href="#macos">On MacOS</a>
</li>
<li>
<a href="#virtualenv">Inside a virtual environment</a>
</li>
<li>
<a href="#build-it-manually">Build it manually</a>
</li>
<li>
<a href="#after-installing">After installing</a>
</li>
<li>
<a href="#after-installing-windows">After installing on Windows</a>
</li>
</ul>
</article>
<article id="python">
<h1><i class="fab fa-python"></i> With Python</h1>
<p>
You can easily install TBlock on any machine with Python installed on it, by running:
</p>
<pre><span class="prompt">#</span> <span class="command">pip</span> <span class="args">install</span> tblock</pre>
<p>
Since it isn't always recommended to run <i>pip</i> as root, you may want to <a href="#virtualenv">install it in a virtual environment</a>.
</p>
</article>
<article id="ubuntu">
<h1><i class="fab fa-ubuntu"></i> On Ubuntu</h1>
<p>
You can easily install TBlock on any Ubuntu-based Linux distribution, by running:
</p>
<pre>
<span class="prompt">$</span> <span class="command">sudo add-apt-repository</span> ppa:twann4/tblock
<span class="prompt">$</span> <span class="command">sudo apt-get</span> <span class="args">update</span>
<span class="prompt">$</span> <span class="command">sudo apt-get</span> <span class="args">install</span> tblock</pre>
</article>
<article id="fedora">
<h1><i class="fab fa-fedora"></i> On Fedora</h1>
<p>
You can easily install TBlock on any Fedora-based Linux distribution, by running:
</p>
<pre>
<span class="prompt">$</span> <span class="command">sudo dnf</span> <span class="args">copr enable</span> twann/tblock
<span class="prompt">$</span> <span class="command">sudo dnf</span> <span class="args">install</span> tblock
</pre>
<p>Or:</pr>
<pre>
<span class="prompt">$</span> <span class="command">sudo yum</span> <span class="args">copr enable</span> twann/tblock
<span class="prompt">$</span> <span class="command">sudo yum</span> <span class="args">install</span> tblock
</pre>
</article>
<article id="arch">
<h1><i class="fab fa-linux"></i> On Arch Linux</h1>
<p>
You can easily install TBlock on any Arch-based Linux distribution, by running:
</p>
<pre><span class="prompt">$</span> <span class="command">yay</span> <span class="args">-S</span> tblock</pre>
<p>Or:</p>
<pre><span class="prompt">$</span> <span class="command">paru</span> <span class="args">-S</span> tblock</pre>
<p>Or:</p>
<pre>
<span class="prompt">$</span> <span class="command">git</span> <span class="args">clone</span> <u>https://aur.archlinux.org/tblock.git</u>
<span class="prompt">$</span> <span class="command">cd</span> tblock
<span class="prompt">$</span> <span class="command">makepkg</span> <span class="args">-si</span>
</pre>
<p>If you have the chaotic-AUR repository enabled, you can as well run:</p>
<pre><span class="prompt">$</span> <span class="command">sudo pacman</span> <span class="args">-Syu</span> tblock</pre>
</article>
<article id="windows">
<h1><i class="fab fa-windows"></i> On Windows</h1>
<p>
You can install TBlock on Windows by using the <i>scoop</i> package manager.
</p>
<pre><span class="prompt">></span> <span class="command">scoop</span> <span class="args">bucket add</span> tblock <u>https://codeberg.org/tblock/bucket</u>
<span class="prompt">></span> <span class="command">scoop</span> <span class="args">install</span> tblock/tblock</pre>
<p>
You can also download a TBlock installer for Windows*, which will install pre-compiled binaries on your machine.<br />
</p>
<a href="https://codeberg.org/tblock/tblock/releases/download/1.3.2/tblock-setup.exe" class="button-link" rel="noreferrer">
<button title="Download the installer"><i class="fas fa-download"></i> Download the installer</button>
</a>
<a href="https://codeberg.org/tblock/tblock/releases/download/1.3.2/tblock-setup.exe.sig" class="button-link" rel="noreferrer">
<button title="Download the signature"><i class="fas fa-file-signature"></i> Verify the signature</button>
</a>
<a href="/uploads/keys/twann.asc" rel="noreferrer" class="button-link">
<button title="Download our PGP public key to verify your download"><i class="fas fa-key"></i> PGP key</button>
</a>
<p>
*Please keep in mind that Windows is a
<a href="https://libreplanet.org/wiki/Why_business_should_avoid_proprietary_software" rel="noreferrer">proprietary</a>
and horrible operating system developed by an awful,
<a href="https://hub.packtpub.com/microsoft-employees-raise-their-voice-against-the-companys-misogynist-sexist-and-racist-acts/" rel="noreferrer">sexist</a>
and capitalist company that
<a href="https://www.dailymail.co.uk/news/article-7797489/Apple-Google-Tesla-Microsoft-sued-aiding-abetting-child-mining-Congo.html" rel="noreferrer">exploits children</a>
and that destroys our environment.
More than that, TBlock cannot <b>fully</b> protect you against Micro$oft massive data collection and their invasing telemetry system.
If you are looking for an ethical, free (as in freedom, as in price, and as in free-of-telemetry),
and open-source alternative to Windows, you could use a Linux distribution (also called a GNU/Linux distribution).
</p>
</article>
<article id="macos">
<h1><i class="fab fa-apple"></i> On MacOS</h1>
<p>
You can install TBlock on MacOS, by using the <i>brew</i> package manager:
</p>
<pre><span class="prompt">$</span> <span class="command">brew</span> <span class="args">tap</span> tblock/tap <u>https://codeberg.org/tblock/homebrew-tap</u>
<span class="prompt">$</span> <span class="command">brew</span> <span class="args">install</span> tblock
</pre>
<p>
If, after the installation, you get the following error:
</p>
<pre><span class="prompt">$</span> <span class="command">sudo tblock</span> <span class="args">-Uy</span>
<span>sudo: tblock: command not found</span>
</pre>
<p>
You need to run the following command:
</p>
<pre><span class="prompt">$</span> <span class="command">echo</span> <span class="quotes">'alias sudo="PATH=</span><span class="variable">$PATH</span><span class="quotes">:</span><span class="variable">$(brew --prefix)</span><span class="quotes">/bin:</span><span class="variable">$(brew --prefix)</span><span class="quotes">/sbin sudo"'</span> >> <span class="variable">~</span>/.bashrc</pre>
</article>
<article id="virtualenv">
<h1><i class="fab fa-python"></i> Inside a virtual environment</h1>
<p>
Sometimes you need to install a program inside a virtual environment, which means it is not installed on your whole system.<br />
To install TBlock inside a virtual environment, follow the steps below.
</p>
<p>
1. Setup the virtual environment
</p>
<pre><span class="prompt">$</span> <span class="command">virtualenv</span> venv</pre>
<p>
2. Enter the virtual environment
</p>
<pre><span class="prompt">$</span> <span class="command">source</span> venv/bin/activate</pre>
<p>
3. Install TBlock
</p>
<pre><span class="prompt">$</span> <span class="command">pip</span> <span class="args">install</span> tblock</pre>
</article>
<article id="build-it-manually">
<h1><i class="fas fa-terminal"></i> Build it manually</h1>
<p>
You can also manually build TBlock from source. To do so, follow the instructions above:
</p>
<p>
1. Clone the Git repository
</p>
<pre><span class="prompt">$</span> <span class="command">git</span> <span class="args">clone</span> <u>https://codeberg.org/tblock/tblock.git</u></pre>
<p>
2. Enter the directory
</p>
<pre><span class="prompt">$</span> <span class="command">cd</span> tblock</pre>
<p>
3. Build TBlock and its files
</p>
<pre><span class="prompt">$</span> <span class="command">make</span></pre>
<p>
4. Install TBlock on your machine
</p>
<pre><span class="prompt">$</span> <span class="command">sudo make</span> install</pre>
</article>
<article id="after-installing">
<h1>After installing</h1>
<p>
After installing, you need to sync the remote filter repository with the local one, in order to be able to subscribe to filters.
Also, TBlock is useless without any filter. You need to subscribe to at least one filter in order to block ads.
</p>
<p>
To do that, simply run:
</p>
<pre><span class="prompt">$</span> <span class="command">sudo tblock</span> <span class="args">-Sy</span> tblock-base</pre>
</article>
<article id="after-installing-windows">
<h1>After installing on Windows</h1>
<p>
Windows doesn't usually let the hosts file being modified. It will therefore detect TBlock as a <i>malware</i>.<br />
The first time TBlock will try to edit the hosts file, it will probably get restricted by Windows Defender.
To allow TBlock to edit the hosts file, do the following:
</p>
<p>
1. Open Windows Defender settings
</p>
<a href="/static/images/windows-step1.png">
<img src="/static/images/windows-step1.png" class="article-image white" alt="Step 1">
</a>
<p>
2. Click on the threat and check "Allow on device", then click on "Start actions"
</p>
<a href="/static/images/windows-step2.png">
<img src="/static/images/windows-step2.png" class="article-image white" alt="Step 2">
</a>
<p>
3. As you can see below, the "Threat or app has been allowed and will not be remediated in the future". That means TBlock is now able to work.
</p>
<a href="/static/images/windows-step3.png">
<img src="/static/images/windows-step3.png" class="article-image white" alt="Step 3">
</a>
</article>
</main>
<footer>
<hr class="footer-bar" /><br />
<a href="/en/" title="Homepage">Homepage</a>
<a href="/en/install" title="Install">Install</a>
<a href="/en/about" title="About">About</a>
<a href="https://codeberg.org/tblock/tblock/wiki/Home" rel="noreferrer" title="Wiki">Wiki</a>
<a href="https://codeberg.org/tblock/tblock/wiki/FAQ" rel="noreferrer" title="FAQ">FAQ</a>
<br /><br />
<a href="https://codeberg.org/tblock" rel="noreferrer" title="Codeberg">Codeberg</a>
<a href="mailto:twann@ctemplar.com" rel="noreferrer" title="Email">Email</a>
<a href="https://fosstodon.org/@tblock" rel="me" rel="noreferrer" title="Mastodon">Mastodon</a>
<a href="https://matrix.to/#/#tblock:matrix.org" rel="noreferrer" title="Matrix">Matrix</a>
<a href="https://t.me/tblock" rel="noreferrer" title="Telegram">Telegram</a>
<a href="xmpp:tblock@conference.movim.eu" rel="noreferrer" title="XMPP">XMPP</a>
<br /><br />
<a href="https://codeberg.org/tblock/pages/src/branch/main/PRIVACY-STATEMENT.md" rel="noreferrer" title="Privacy Statement">Privacy</a>
<a href="https://codeberg.org/tblock/pages" rel="noreferrer" title="Source code">Source code</a>
<a href="https://codeberg.org/tblock/pages/src/branch/main/LICENSES.md" rel="noreferrer" title="Licenses">Licenses</a>
<br /><br />
<span class="copyright-holder">
© 2021 Twann
</span>
</footer>
</body>
</html>