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.

Wednesday, December 12, 2012

Ubuntu 12.04 - Hide the Recent Items in the Dash and Stop the Logging!

I really like Ubuntu 12.04. I even like the Unity Desktop (despite the general hatred it seems to attract amongst many users), it works really well on my netbook. However, Ubuntu has a lot of privacy issues, not the least of which is the integration of zeitgeist into Unity.

Here's what I did to get zeitgeist to stop logging. The "Privacy" app under System Settings never seemed to work properly, and clearing the history still left all sorts of information in the log files.

First, remove zeitgeist. I did this with synaptic. Don't remove the related libs, however, as Unity needs them. Restart the system.

Then, kill the running zeitgeist processes:

sudo killall -9 zeitgeist-fts zeitgeist-datahub zeitgeist-daemon
Then, remove the existing logs:

cd $HOME/.local/share/zeitgeist
rm activity*
You can use srm if you feel it is necessary. Restart the system.

Upon restart, Zeitgeist will recreate the log files, albeit they will be essentially empty. Now set them to read-only:

cd $HOME/.local/share/zeitgeist
sudo chmod ugo-w act*

Restart once more.

Once I did all this, the dash did not populate with recently used files, and the zeitgeist logs remained static. YMMV!