-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot uninstall Autohosts #1
Comments
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.
That won't do anything because Autohosts only gets the files for you and puts them where they need to go.
Uninstall of Autohosts only removes Autohosts, nothing else. |
I just pushed an update! New features:
Thanks for bringing this 'bug' to my attention, it gave me some ideas for improvements as I was working around the code! |
@angela-d: many thanks for your reply. 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 :-( |
Yes If you've already uninstalled Autohosts, do a fresh It'll set you up with the new codebase and also fix your hosts file and remove the addon URLs that were being filtered.
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. |
Thanks Angela, I will reinstall Ah. I just retried the uninstall procedure, both with the Terminal and the Synaptic Package Manager, but neither can "see" the Ah folder. |
Autohosts puts files in the following locations:
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.
This package is compiled from source, basically; so the apt package manager won't manage its updates. |
Then in my Home folder there was still the Ah folder, which I deleted manually. I subsequently reinstalled Ah with I then tried to go to the Mozilla firefox extension site, but Firefox again showed the message that the site cannot be found. |
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. |
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. |
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.
/etc/ is a 'root-level' directory. Anything one-level from 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. 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. |
Angela, thanks for your kind words, they are so encouraging, thank you. Next step is to reinstall Autohosts. In my Home folder there was still the Ah folder, which I deleted manually, then reinstalled with 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. |
Just out of interest: what Linux distro do you use? |
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!
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.
On my home and work PCs, I run Debian with Gnome desktop. 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. |
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. |
BINGO !! It worked, incl. the visit to Mozilla's extension site. I still have a couple of questions to fully understand the process:
A couple of remarks: As for your distros, well, you are ahead of me a bit, to put it mildly ;-) |
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 sudo crontab -e to see it. Now, run In order to provision hosts updates, running
Your hosts file, yes.. Autohosts, no.
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: 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. 😃
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.
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: |
Angela, I did it the wrong way round because I applied your instructions too literally. Then I did So I stopped an composed this reply. |
./uninstall-autohosts_repo will never work; that file doesn't exist. So try this: cd ~/autohosts_repo && ./uninstall-autohosts
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 cd ~/autohosts_repo && ./uninstall-autohosts && ./autohosts Then you should be good! |
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? |
You do not need to keep it. What I do, is clone to Updates to the hosts file are done by the file that's copied to What you can do to test:
-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:
-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. |
Angela, I installed Autohosts (Ah) yesterday, but found today that I cannot install Firefox (Ff) extensions anymore. I moved the Ff subfolder from the Ah folder, restarted Ff, but still no joy so put the Ff subfolder back in the Ah folder.
I tried to uninstall Ah altogether but the Terminal tells me there is no Ah folder. I deleted the entire Ah folder, restarted Ff, no joy. I checked the etc/hosts folder: only the original entries are there, though there is a text at the top mentioning the merged lists.
Ubuntu will not uninstall Ah, and I am stuck with Ff to which I cannot extensions. Please advise.
P.S. I am new to Linux, hence my clumsiness.
The text was updated successfully, but these errors were encountered: