Saturday, February 9, 2013

How to Stop Geoclue on Ubuntu Linux (without losing the clock)

For some reason in Ubuntu 12.04 (and possibly 12.10), the tray clock package (indicator-datetime) for unity has geoclue as a dependency. In other words, if you want to ditch geoclue, you lose your clock.

Here's a workaround:

1. Add the following to your /etc/hosts file (sudo gedit /etc/hosts):

127.0.0.1       geoname-lookup.ubuntu.com
127.0.0.1       videosearch.ubuntu.com
127.0.0.1       daisy.ubuntu.com
127.0.0.1       one.ubuntu.com
127.0.0.1       musicsearch.ubuntu.com

2. Change the permissions of the geoclue libs to prevent it from executing:

sudo chmod ugo-x /usr/lib/geoclue/geoclue-master

3. Restart. No more pesky connections to Canonical servers.

Wednesday, January 2, 2013

PS3 Media Server - Firewall Setup for Ubuntu 12.04 / Linux

If you've installed PS3 Media Server in Ubuntu, and you're getting the message "No Renderers were Found" and a great big red "X" on the Status tab, give this a try. The most likely issue is your firewall is blocking your server from establishing a connection with your media playback device (e.g. your Playstation 3).

Steps:

1. Open a terminal (Ctrl-Alt-T)

2. Type the following command:
sudo ufw allow from <your_device's_ip> to any port 5001
This assumes you are using the default PS3 Media Server port of 5001. For example, if your PS3 uses the static IP 192.168.0.100, then do:
sudo ufw allow from 192.168.0.100 to any port 5001
If you aren't using static IPs on your devices but wish to open the server to any device connected to your router/subnet, you can specific a subnet mask, e.g. 192.168.0.1/24. If you're not using Ubuntu but are using iptables with your preferred linux distro, simply add an exception for port 5001, e.g.:
sudo iptables -A INPUT -s <your-device's-ip> -p tcp --dport 5001 -j ACCEPT
sudo iptables -A INPUT -s <your-device's-ip> -p udp  --dport 5001 -j ACCEPT
This ought to do the trick.

Tuesday, January 1, 2013

Can You Make Money With Google AdSense?

Yes! But don't quit your day job. Here's a few AdSense tips, pointers and general considerations for bloggers I've picked up over the last two years.

1. Your Content Matters

If you don't write good content, no one will ever see your site. Even if they do, they won't stick around long enough to even consider visiting an advertiser link. Don't listen to these SEO companies that promise top search engine billing - if you write good content, search engines (read: Google) will index your content quickly. Don't try SEO trickery like keyword-bombing - Google's algorithms have been wise to this nonsense for a long time. You need quality content, not SEO.

So what is good content? It is original, concise, and easy to read. If you can present a topic or solve an issue in a novel way, even better. Good content doesn't require navigating across multiple pages.  It doesn't require javascript or flash to read. It isn't written just for the sake of adding more posts. It isn't flashy for the sake of being flashy.  Keep it simple.

2. Your Audience Matters

Know your audience - and write content for them. Really, know yourself. Write about what you know. If you write useless content you know nothing about, you'll quickly be relegated to the bottom of search engine results, because no one will care what you have to say, and they certainly won't link to it. Links matter, and Google is great at spotting bullshit SEO-manufactured links.

Also consider the likelihood of your audience following an ad link. Last month, only slightly more than half of my audience was even served ads. My audience generally screws me as it is largely very technically proficient - and tend to use ad blocking or script-blocking software.  They never even see the ads to begin with (fine by me, it's their right!).

3. Be Patient!

Hit counter not moving? No ad clicks? Alas, this is your likely fate for the first six months of your blog, unless you really strike gold with your content (don't rule it out, but don't count on it).

It won't happen overnight.

It takes time for things to happen. You can't simply publish a few posts and expect the hits to come rolling in. You have to keep publishing, and not just publishing for the sake of doing so.

Hits do not equal ad income; but more hits equals a higher likelihood of ad income. Whatever you do, don't try to cheat on clicks. You'll be suspended from AdSense quickly.

Don't spend too much time worrying about hits and clicks - spend your time on your content. 

4. Ad Placement Isn't Everything

The oft-referred to Google Adsense Heatmap is probably right for most people. But if the recommended ad placement doesn't suit your design needs, or makes your site look awful, then place your ads as you see fit. Experiment with moving ads around until you find a placement that gives you clicks and suits your design needs.

And yes, I know this site could be a lot prettier.

5. Don't Plan to Retire Just Yet

Unless you come up with pure content gold, you're probably not going to be quitting your job to live off advertising revenues.


In December 2012, I earned a whopping $14.00 from AdSense. It's my best month ever. Most days, I earn a penny. Unless you can attract a LOT of hits and a decent amount of clicks every day, expect the same. Keep that in mind before telling your boss how you really feel about them.