Comments (24)
Try going here and installing an extension: Decentraleyes on Mozilla
Something in the Firefox filters are blocking Tools > Addons from searching. I will take a peek later to see which one and remove it.
When you uninstall autohosts, it doesn't touch the hosts file, so any changes it made are still present.
As root, run this:
> /etc/hosts
And your hosts file will become empty. (You'll also loose your localhost/loopback designation until you either add a hosts file or put the loopback addresses back).
If you want to use the built in Firefox search, do that and re-run Autohosts when you're finished.
I will try to work on a bugfix tonight.
I deleted the entire Ah folder
That won't do anything because Autohosts only gets the files for you and puts them where they need to go.
Ubuntu will not uninstall
Uninstall of Autohosts only removes Autohosts, nothing else.
from autohosts.
I just pushed an update!
New features:
- Upon uninstall, /etc/hosts is wiped and restored with the default loopback address. In addition, a backup is made to /tmp in case you needed to salvage something after Autohosts cleaned up.
- Crontab entry is also removed upon uninstall
- Firefox telemetry list is now pulled from my Github, in order to keep it up-to-date; that way if there's other over-zealous trackers that need to be removed or new trackers are found, your list will update as soon as your cron schedule is triggered (Negating the need to uninstall everytime there's an update).
Thanks for bringing this 'bug' to my attention, it gave me some ideas for improvements as I was working around the code!
from autohosts.
@angela-d: many thanks for your reply.
I already had Decentraleyes installed before I encountered the problem. What is the link with Autohosts?
I do not necessarily want to uninstall Autohosts, I think it is a useful package to have, esp. the automatic update with that cronjob. So, my question is: with the update you pushed, will I be able to get to the Mozilla add-ons site? If the answer ies yes, then how can I install the update? I just launched Ubuntu, and the Update Manager only mentions a Chromium update, nothing about Autohosts.
Or should I uninstall Ah then reinstall?
Apologies for basic questions that probably bore you to death :-(
from autohosts.
with the update you pushed, will I be able to get to the Mozilla add-ons site?
Yes
If you've already uninstalled Autohosts, do a fresh git pull https://github.com/angela-d/autohosts.git
and then run Autohosts again. (Follow the new install instructions on https://github.com/angela-d/autohosts )
It'll set you up with the new codebase and also fix your hosts file and remove the addon URLs that were being filtered.
I just launched Ubuntu, and the Update Manager only mentions a Chromium update, nothing about Autohosts.
Autohosts is a 3rd party script, I haven't submitted it to Gnome extensions or anything like that, so it won't come through your update manager. You'll have to use Git to get new versions, for the time being.
from autohosts.
Thanks Angela, I will reinstall Ah.
But before I do so, I have to uninstall. The Ah folder is still in my Home folder. When I give the rm
command in the Terminal, it says it cannot find the package. Maybe this is to do with the fact that I once transferred the Ah folder when I could not uninstall it and hoped that would give me access to Mozilla's extensions page; when it did not I put the Ah folder back in the Home folder.
I just retried the uninstall procedure, both with the Terminal and the Synaptic Package Manager, but neither can "see" the Ah folder.
So, my question therefore is: can I just delete the Ah folder, then reinstall Ah as per your instructions above?
from autohosts.
Autohosts puts files in the following locations:
- /etc/autohosts.conf
- /usr/local/bin/autohosts
You can see if they're still there, by running:
whereis autohosts
Autohosts isn't a 'package' like a typical application you'd install over Gnome extensions, apt get or the Ubuntu Software Center. (It certainly could be, I just have not submitted it to-date).
If you have neither of those files, you can simply reinstall Autohosts like its a new install.
I just retried the uninstall procedure, both with the Terminal and the Synaptic Package Manager
This package is compiled from source, basically; so the apt package manager won't manage its updates.
from autohosts.
whereis autohosts
revealed those 2 files indeed, and I removed them with
sudo rm <file name>
Then in my Home folder there was still the Ah folder, which I deleted manually. I subsequently reinstalled Ah with
git clone https://github.com/angela-d/autohosts.git /tmp && cd autohosts ./autohosts
after 1st trying, as per 1 of your comments above:
git pull https://github.com/angela-d/autohosts.git
which did not work.
I then tried to go to the Mozilla firefox extension site, but Firefox again showed the message that the site cannot be found.
from autohosts.
git pull
only works if you first navigate to the folder where the repository is saved on your computer.
Go into your hosts file
pico /etc/hosts
Hit cntrl + w and search for the URLs that are in red: 39a1663
If you do not see them, run
echo "0.0.0.0 localhost" > /etc/hosts
to empty out the hosts file. Then try to access the extensions. If you cannot, there is something else at play and it was not Autohosts keeping you out.
Are you also searching for extensions you do not currently have installed? When I search for things I have, they do not come up. If I search for something like "Ghostery" which I do not have, it shows up.
from autohosts.
Angela, I think I will drop this because I am not getting anywhere. I cannot get to the etc folder, when I go through the terminal I either don't have permission or it cannot find the folder. It is very frustrating. I know it takes time to get to know a system, but there are other systems where you can see all the folders and get into them without too many acrobatics, whereas in Ubuntu a folder like etc is not shown even if you have "unhidden" the hidden folders.
I want to thank you for your help and patience for this undoubtedly dense Linux newbie.
from autohosts.
I don't mind at all!! We all have to start somewhere. People were patient with me when I was first getting into Linux and led the way, helped me out with (now) seemingly basic stuff, but was at the time difficult & daunting. I'm just paying their graciousness forward. 😄
That and a new person getting into Linux is the coolest thing ever. I love Linux and I'd like as many people to use desktop Linux as possible! Don't get discouraged. There's a bit of a learning curve but as you experiment, break things and ultimately fix things, you'll wonder how you've lived without Linux in your life.
I cannot get to the etc folder
/etc/ is a 'root-level' directory. Anything one-level from /
requires root (or sudo) permissions to read or write.
To browse the contents of /etc:
sudo ls /etc
If you want to list the contents in a single column:
sudo ls -l /etc
If you're curious about all the different ways you can browse folders in the terminal, visit the man page:
man ls
Another trick (but again, be careful - you can break things if you move or delete the wrong file), open your file browser as root.
On Ubuntu, the default file browser is Nautilus:
sudo nautilus
and you can now maneuver your files in the graphical user interface as if you were on Windows, with unrestricted access.
The lack of user permissions on high level directories are one of the first things that annoyed me as a newbie to Linux, but you learn to appreciate that Linux protects you from yourself. It doesn't give basic users high-level permissions, because even pro's are prone to typos.
A shortcut to have your complete terminal session with root permissions:
sudo su
Just be careful when you're running as root, one wrong command and you could take out an integral directory.
Do you have a spare USB handy? If so, keep a copy of your important documents and any settings you like a lot on there. That way if you break your system, it's not a big deal. Part of the fun of Linux is you can break a lot of things, but few are fatal. You can fix almost anything yourself. Breaking stuff is the best way to learn.
from autohosts.
Angela, thanks for your kind words, they are so encouraging, thank you.
And wow, I was able to get into the hosts file, use CTRL+W to find the red entries, which weren't there. I double-checked by looking for 2 of them at random with CTRL+F (find), nothing there. So I did
echo "0.0.0.0 localhost" > /etc/hosts
then went back into the hosts file which now consists of just 1 line.
I then went to the Mozilla site for Firefox extensions and there was no problem there!!
Next step is to reinstall Autohosts. In my Home folder there was still the Ah folder, which I deleted manually, then reinstalled with
git clone https://github.com/angela-d/autohosts.git && cd autohosts && sudo ./autohosts
which went fine - the hosts list is that long list again.
Went back to the Mozilla site, and the block was back on !! I rechecked the hosts file and those red entries aren't there. Nevertheless, reinstalling Ah reintroduced a block.
from autohosts.
Just out of interest: what Linux distro do you use?
from autohosts.
And wow, I was able to get into the hosts file
You can actually do much more on a Linux system compared to Windows or Mac. It's just a matter of knowing the right commands and how to find what you're looking for. 😄
Thanks to your thorough troubleshooting, I was scratching my head a bit and then fired up my Ubuntu VM. Interestingly, I ran into the exact same issue as you.
In another PC (without Autohosts), I ran the following in command line:
ping addons.mozilla.org
Which gave us the culprit!
PING olympia.prod.mozaws.net (54.69.134.102) 56(84) bytes of data.
64 bytes from ec2-54-69-134-102.us-west-2.compute.amazonaws.com (54.69.134.102): icmp_seq=1 ttl=232 time=204 ms
I've submitted the change: DutchPete's addon fix.
To update your hosts, all you have to do is run:
sudo autohosts
to pull in the new Firefox filters.
Then take a peek at /etc/hosts
to confirm its gone.. and try to search extensions.
Just out of interest: what Linux distro do you use?
On my home and work PCs, I run Debian with Gnome desktop.
For servers, I've run primarily CentOS, a few Ubuntu; CentOS was always my go-to for servers, due to the long lifespan and focus on stability, over new and shiny things (which is also my draw to Debian).
Though after IBM purchased Red Hat, I probably won't provision a new CentOS machine in the near future. My default will be Debian for environments that don't need the latest feature packages.
from autohosts.
I pushed a new update moments ago!
Just a FYI as the terminal output has changed slightly -- I posted screenshots: Autohosts v1.3.0
An uninstall is recommended in order to upgrade to this version, as custom filters functionality has been added.
from autohosts.
BINGO !! It worked, incl. the visit to Mozilla's extension site. I still have a couple of questions to fully understand the process:
- you state that
sudo autohosts
would update the hosts file. I would understand this command as just giving me root permission to the Ah folder, like e.g.sudo nautilus
. How come this time it's different? - am I correct in saying that the file will now be kept up-to-date automatically with that cron job included?
A couple of remarks:
3. the autohosts file in the autohosts folder in the Home folder says at the top that it is version 1.20: should that not be 1.3.0? Same for the autohosts.conf file in the etc folder. I have not checked all the files for that.
4. In the etc folder at the top of the hosts file it gives the date as 11 December: should that not be 13 Dec?
5. from commenter on another forum I was given this very long hosts file:
https://someonewhocares.org/hosts/hosts - is it worth you integrating it in Autohosts?
As for your distros, well, you are ahead of me a bit, to put it mildly ;-)
from autohosts.
you state that sudo autohosts would update the hosts file. I would understand this command as just giving me root permission to the Ah folder, like e.g. sudo nautilus. How come this time it's different?
Autohosts is usually run by a cron that's generated at first install, for root/sudo.
I'm going to give you a courtesy warn about the following command. If you've never opened your cron before, it will default to the Vi editor, if you don't select nano! If you end up in Vi, hit escape key, then :q
(colon q), esc to make sure you're not in edit mode.
sudo crontab -e
to see it. Now, run crontab -e
as your normal user (non-root).
Anything that's in root's crontab is executed as root, sudo prefix not needed.
In order to provision hosts updates, running sudo autohosts
will trigger the same behavior as your scheduled cron, except running it now is immediate, rather than scheduled.
am I correct in saying that the file will now be kept up-to-date automatically with that cron job included?
Your hosts file, yes.. Autohosts, no.
You mentioned earlier you keep Autohosts in /home/ -- that's just your clone. That's not actually where Autohosts executes from. You could delete Autohosts from /home and it'll still run.. that's because it adds itself in /usr/local/bin/, so it can be executed from the command line as an alias, like autohosts
, rather than needing to specify the full path. So with that in mind, you first need to:
- update your clone to get the new version.
cd /home/where_you_have_autohosts
then do:- a pull
git pull
-- your clone is now up to date!
But, your Autohosts that executes is still out of date.. that's because it copies itself to /usr/local/bin - to get this up to date:
./uninstall-autohosts && ./autohosts
Now everything is up-to-date.
These additional steps of updating your clone, uninstalling & reinstalling aren't necessary, unless you want the new features introduced to Autohosts.
If left unattended from here on out, without ever following the steps referenced above, your hosts file will continue to update itself whener your cron is triggered (as long as your PC is online at the time its triggered).
That should address questions 4 & 5. 😃
from commenter on another forum I was given this very long hosts file:
https://someonewhocares.org/hosts/hosts - is it worth you integrating it in Autohosts?
Autohosts doesn't maintain any hosts files (except for Firefox telemetry and I shared my custom filters) -- it actually utilizes a unified hosts file, from Steven Black
His script curates a whole bunch of different hosts repositories, strips out duplicates and accepts submissions from users. I took a peek, and someonewhocares.org is already part of his hosts, so you're getting the benefit of their filters already.
As for your distros, well, you are ahead of me a bit, to put it mildly ;-)
You will get there some day! You're already customizing your setup by installing an application like this. Keep on the track you're going and you'll meet (or surpass) my Linux skills in no time!
And I should mention:
The custom filters feature in this latest version is going to try and create the /home/your_username/autohosts
directory - if that's where your clone is, it may interfere with it (I didn't test the setup with an existing folder there, to be honest!), so it might be a good idea to rename your existing autohosts
to something like autohosts_repo
to keep the two separate.
from autohosts.
Angela, I did it the wrong way round because I applied your instructions too literally.
In my home folder I 1st changed the name of the autohosts folder to autohosts_repo. Then I did
git pull https://github.com/angela-d/autohosts.git
, which went fine. No new autohosts folder was created.
Then I did ./uninstall-autohosts && ./autohosts
, but the terminal did not recognise that name to uninstall. So tried to be really smart ans did ./uninstall-autohosts_repo && ./autohosts
in the Home directory (having opened a terminal there). It still did not recognise the autohosts_repo name.
So I stopped an composed this reply.
from autohosts.
./uninstall-autohosts_repo
will never work; that file doesn't exist. autohosts_repo
would only have renamed the folder, not the filenames inside.
So try this:
cd ~/autohosts_repo && ./uninstall-autohosts
~/
is shorthand for /home/your_user
Or you can do it clean: delete all of the autohosts folders you have.
Go into the terminal and see if it's still installed:
whereis autohosts
If it is, you can uninstall after a fresh clone:
git clone https://github.com/angela-d/autohosts.git ~/autohosts_repo
Now you should see an autohosts_repo folder in /home/your_user
cd ~/autohosts_repo && ./uninstall-autohosts && ./autohosts
Then you should be good!
from autohosts.
The cloning did not work at 1st because the folder was already there. So, brilliant guy that I am (sarcastic), I deleted autohosts_repo, then redid the clone and this time it worked.
So, should I now just keep this, i.e. autohosts_repo? Nobody else will using Ah will have that, so I'll be the exception - won't that cause problems with updates in the future?
from autohosts.
You do not need to keep it.
What I do, is clone to /tmp
and let the system delete it when it's time to tidy up. After a new release, I clone the repo again and run uninstall & reinstall.
Updates to the hosts file are done by the file that's copied to /usr/local/bin/autohosts
(so if you delete the clone, Autohosts remains on your system. Autohosts' repo is essentially just the installer of the application).
What you can do to test:
- Delete your clone directory
- Check the date of the most recent update:
ls -l /etc/hosts
You'll see something like:
-rw-r--r-- 1 root root 1989257 Dec 13 21:19 /etc/hosts
(your date may vary depending on when you last updated/cron time -- so pay attention to the hour & minutes: 21:19
)
sudo autohosts
- Now you'll see the date has changed:
-rw-r--r-- 1 root root 1989370 Dec 16 12:59 /etc/hosts
I should add that this setup is not how every opensource application on Github works.. it differs by application. It's simply how I set this one up. I'd like to release it as a .deb installer, to eliminate the needless clone & uninstall for major updates but I've not found the time. The latest release was quickly built out of anger when I was redirected to Google's single sign on after trying to login directly to a website I frequent.
from autohosts.
Thanks Angela, yes that worked exactly as you said.
What I have not understood is why one needs to clone.
2ndly, how do I know if there is an update to Ah? Just check from time to time?
from autohosts.
What I have not understood is why one needs to clone.
Cloning updates the codebase. Which in this case (because there's no .deb), that's the only way to obtain the codebase and updates.
Once I get time to make & test a .deb installer, you'll be able to load that and just run apt update/upgrade on it.
how do I know if there is an update to Ah? Just check from time to time?
For now, yes! You can also follow me or the repo on Github (if you come here alot) and any activity will show in your feed when you're signed into Github.
To follow me: click my avatar and the Follow button will be under the avatar (on desktop).
To follow the Autohosts repo, scroll to the very top of this page and look for a "Watch" button. The updates will appear on your feed when signed into Github.
If you're using a mobile version of Github, the buttons will be in different spots, but I do not know where... I only use Github on my laptop/desktop.
from autohosts.
Thanks for all your help Angela. I followed both you and the Ah repo ;-)
Good luck with the work.
Peter
from autohosts.
So cool! Thanks DutchPete! Hopefully I continue to build stuff you're interested in! 😄
from autohosts.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autohosts.