Archive

Archive for May, 2009

Nice Ubuntu Wallpapers

May 28th, 2009 1 comment

This is a really quick post, but I thought I might pass these on. 60 Beautiful Ubuntu Desktop Wallpapers.

Categories: Ubuntu Tags:

Block Advertisements in ANY Browser via /etc/hosts

May 15th, 2009 22 comments

I have been getting more and more tired of Firefox lately. Tired of the bloat. The unreliability. The gecko engine. I’ve been tinkering with alternate browsers such as Midori (which is *great*, assuming you can get >=0.1.6), Arora and Chromium. I think WebKit is the browser engine of the future, and with these browsers it is nearly a reality. They are still a little rough around the edges, but I can honestly see one of them absolutely taking off by the end of this year. Firefox, prepare to be dethroned!

The one missing link in most users transition to a new browser however is their reliability on extensions. I know I have a few extensions that I really don’t like to live without. I bet you do as well. Let me guess what your number one extension is? AdBlock Plus? So, if these new browsers don’t have an extension architecture (yet), how can I block ads? You can use your /etc/hosts file.

Let me tell you, quickly, about the /etc/hosts file for those that may not be familiar. The /etc/hosts file is the predecessor to the DNS system that we use now. It is a local mapping of IP address to hostname. At this point, as we now rely on DNS, the /etc/hosts file is generally pretty empty. You’ll likely just have entries that make sure your machine can find itself by localhost or hostname. Something along the lines of:

127.0.0.1    localhost  hostname

Now, you might be thinking “How am I going to block all the internets advertisements if my /etc/hosts file looks like that?” Well, you won’t, if it just looks like that. I have a solution for you though, and it requires very little work on your part.

In searching for a solution I have come across an /etc/hosts file that is (minus comments) 15,169 lines long. That’s right. Fifteen thousand one hundred sixty nine lines long. That is a lot of mapped IP addresses! What someone has done is collect every nasty thing he could find into the hosts file, and map it to 127.0.0.1.

What does that actually mean? It means that anytime your browser is told to display an ad it’ll need to look up the address. The /etc/hosts file is checked first before DNS, which then tells it to ask the local machine. The local machine, of course, does not have that information to display and therefore nothing is displayed. Bingo! No more ads.

But wait, there’s more! This not only applies to blocking ads, but also banners, 3rd party cookies, 3rd party page counters, web bugs, and even most hijackers. You’re not only blocking advertisements, you’re outright blocking thousands of known problematic and malicious websites. And all this without requiring a single Firefox extension. It works in ANY browser.

So, I hope you’re wondering where you can get a copy of this magical file that solves all of the worlds woes. Well you can get it here of course!

disclaimer: I am not the original author of this file, but it has been published under a CC-BY-SA license and under that license I am redistributing it. Attribution is contained within the file itself.

sudo mv /etc/hosts /etc/hosts.orig

sudo wget -c http://zelut.org/projects/misc/hosts -O /etc/hosts

These commands will move your original file as a backup and then pull the file from the web, putting it directly where it needs to go. You should be ready-set-protected after completion of the second command. Pull up a browser (hopefully you’ll try something other than Firefox), and give it a try.

If you have anything to add or subtract from the hosts file, you may edit it directly with a text editor. If you’d like to share your changes with the rest of us you may email me your update in the form of a patch. Please make sure your patch is created against the latest version.

I hope this solution works for many of you towards trying out and helping improve alternate browsers. Again, I highly suggest Midori or Arora as GTK or Qt (respectively) WebKit based browsers.

Add PPA Key To Your Apt Keyring

May 14th, 2009 5 comments

I know many of you use Launchpad’s “Personal Package Archive” for updated and beta packages. I have about a half-dozen configured on my machine to give me the latest and greatest of my favorite applications. The one problem with a PPA though is that the packages can’t be verified when downloaded because you don’t have the GPG imported into your Apt Keyring. The following command is a template that you can use to import whatever PPA based keys you have warnings on:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <key id>

You can gather the <key id> in the output of:

sudo apt-get update

You should see the warnings, along with the key id at the bottom of the output.

For each GPG key that you get a warning on, run the command above, and you’ll stop seeing the warnings. You will have imported that team/project’s GPG key into your keyring, considering them trusted.

Categories: Security Tags: , , ,

Filter Spam by Language in Gmail

May 13th, 2009 4 comments

DISCLAIMER: This post is not at all Ubuntu-specific, but it is Ubuntu-applicable. This tip will actually work on any platform as it is Gmail specific, and I know many of you are big Gmail fans.

I have had my Gmail account since the time of the earliest invites, and my email address is splattered all over the web these days. From site registrations to mailing lists, from stupid forward chains I got pulled into to.. well, you get the idea. The result of this is that I get A LOT of Spam in my Gmail account. Now, to Gmail’s credit, the vast majority of it gets deleted or put into my Spam folder automagically. I’m talking ~1000 emails into my Spam/Trash folder within a 24hr period. It’s ridiculous!

Recently I have been getting more and more Spam directly into my Inbox, so much in fact that I have all but abandoned my Gmail account for a new, personally hosted IMAP server. I had decided that, pending a solution to this rampant Spam, I would have to use something else. Well today I think I found that solution.

I was mentioning on Identi.ca that I wish Gmail had a language-based filtering option. Well, it turns out that they do, and that makes filtering foreign-language Spam a breeze!

Here are the steps I took toward creating a Russian-language filter:

  1. Click “Create Filter” located at the top of your Inbox
  2. In the “Has the words:” field, enter: lang:Russian
  3. Select “Delete it” within the Action List, and (if you have existing Russian Spam) select: “Apply Filter to Conversations below”
  4. Click “Create Filter”

I have only tested this briefly, but so far it has worked to filter out and clean up existing Russian (lang:Russian) and Chinese (lang:Chinese) Spam. I’m sure other languages work just as well.

I would suggest, before you “Apply Filter to Conversations below”, that you take a look at the matches. If you are on mailing lists, or have correspondence with international developers or community members, it could match their emails as well. Just be careful you don’t accidentally filter out emails you want!

If you have any other tips regarding Gmail Spam filtering please share them in the comments.

Categories: Internet Tags: , , , ,

Regarding External Displays and Conference Presentations

Warning: This post is a rant regarding external displays and projectors. If you’ve ever been frustrated and want a possible solution to keep in your back pocket for your next presentation, read on. If you are a hermit, never leaving your mothers basement, you can go back to whatever it is that you do..

I was just trolling the interwebs looking for something to entertain me, and I came across a video of a conference presentation. I was bored so I clicked play, and then spent the next five minutes (as did the audience at the conference) waiting and watching as innumerable nerds tried to get the projector working. This is ridiculous.

How many of you have presented at a conference, Linux User Group or other such forum and had trouble with the projector? I know I have. I had issues when I presented at OSCON just this last year, and I think I’ve had trouble at just about every conference I’ve been to.

This not only makes the presenter and organizers look bad, but in turn make Linux look bad as well. We spend all of our time talking about how Linux can do everything just short of save humanity from itself, yet we can’t tell you how because we can’t get the damned display to use the projector!

I want to outline two simple steps that I’ve used to get mirrored output on additional displays. This includes external LCD/CRT monitors, projectors, etc. I have had success with this on a number of machines as well. It should work for you, and please try this at your next presentation. If not to make Linux look better, but to make yourself and your presentation look more professional (I can’t help you with your content however).

xrandr
xrandr --output VGA --auto

Anytime I have needed mirrored display between a laptop (most commonly used to present with) and a projector or external display, those two commands have come through for me. Now, I’m not promising extended display. I’m not promising perfect maximum resolution, but I am promising actual video coming from the external display.

The xrandr command should be standard on most any distribution, and should properly find the available resolutions of any hardware output (ie; LVDS, VGA, etc). The only potential issue I see with this method is that the projector can’t support your resolution, which can be bypassed by lowering your resolution to that of the projector and running the commands again.

Ohh, and my biggest piece of presenting advice is please, please do a practice run with a projector or external display *before* the big day. That way you can test this (and other) methods before you’ve got a hundred people watching and waiting.