How to connect Ubuntu laptop to GPS on Android phone

I recently started a small project, that quickly turned out to be a lot harder than I initially thought: Using my Android phone’s GPS from my laptop. I tried to follow almost every guide I could find on the net, but I couldn’t make any of them work with my setup: Laptop running Ubuntu 11.04 and phone is running CyanogenMod 7.1 custom ROM based on Android 2.3.

In the end it turned out to be much simpler than any of the guides would suggest:

  • On the phone: Install the free GPS over BT from the Android Market.
  • On the computer you install the GPS service daemon gpsd and the gpsd-clients: sudo apt-get install gpsd gpsd-clients. Next I installed the Blueman Bluetooth Manager to set up the connection to the phone: sudo apt-get install blueman.

To configure the GPS daemon: sudo dpkg-reconfigure gpsd. Most of the settings you can just leave at the defaults, but notice that the GPS receiver should be attached to /dev/rfcomm0. Under options you just enter -b -n, then you should be ready to go.

  • Open GPS over BT on your phone and make the phone discoverable from your computer.
  • On your computer, open Blueman and select Setup new device, then pair it with your phone.

Then your phone will show up as paired, but not connected, and in GPS over BT on your phone the blue-tooth connection will be listed as working but not connected having a pale green color.

To establish the connection you right-click on your phone in Blueman and select Setup, then a dialog pops up where you select to connect to the Serial Port. Then you will see a confirmation that the device was added and connected succesfully, and a small notification will pop up telling that the serial port is connected and available via /dev/rfcomm0.

When the phone is connected you will see a green dot on the Blueman icon in the panel, and on your phone in GPS over BT the blue-tooth connection now have a clear green collor.

Now you’re ready to fire up your favorite GPS program. I like FoxtrotGPS, it is available in the Ubuntu repositories, but to get the latest version for Natty you should add the Ubuntu Finland PPA to your sources.list: sudo add-apt-repository ppa:ubuntu-fi/ppa

That’s it. You can now enjoy using the GPS on the bigger screen of your laptop.

Getting Emerald on Ubuntu 11.04

In an earlier post I wrote about the problems I had with Emerald after my upgrade to Ubuntu 11.04. The version in the Ubuntu repositories simply will not run with the new Compiz in 11.04. Don’t ask me why they let a nonfunctional package in their repositories…

It has since come to my attention that there is a newer release of Emerald that’s actually working with the current version of Compiz. There are two ways you can get Emerald on your Natty-installation:

  • You can pull in the source from git and compile it yourself. There is an excellent guide how to do it here.
  • You can add this PPA to your sources.list. Just run sudo add-apt-repository ppa:malteworld/compiz in a terminal, followed by sudo apt-get update and then finally sudo apt-get install emerald to install it on your system.

Now just enjoy having your eye-candy back. I was missing my window decorations!

Wuala – free secure online storage for linux

I recently stumbled upon a free cloud based storage solution called Wuala. I have tested it out for some days now, and am quite impressed with their service, hence I wanna share it here, even though it is not exactly a FOSS project.

What distinguish Wuala from most of the other competitors in the field:

 

  • It is secure. All files get encrypted on you computer, before they are uploaded to the cloud. The files are chopped up and encoded into redundant fragments stored in multiple locations – not only the Wuala data centers – ensuring a safe and reliable means of storage.
  • You can increase the initial storage considerably for free by trading. Even though you start out with only 1GB free storage, you just have to enable the option to trade some of your hard drive space to gain additional online storage. This is calculated by multiplying your average online time by the amount of storage you share with the cloud. The only requirement is that the average online time must be at least 4 hours a day.
  • The desktop client integrates nicely in Ubuntu. It mounts as WualaDrive in the file manager, allowing you to work with your files in the cloud just like if they were on a local network drive.

 

Other features include: online backup with file versioning, automated sync of your online files across all your computers, and the option to share online files with friends.

The desktop application is available for most linux distributions, including Ubuntu and Debian, Fedora, Red Hat, CentOS and OpenSUSE. Furthermore there’s a client available for smart-phones,including Android, giving you access to your files anywhere and anytime.

Even though it’s not a FOSS project, part of Wuala has been open sourced, including the Wuala Webstart and Wuala Persistent Map.

I have really come to like this service. What do you think?

TorChat

Following my last post about setting up a Tor relay, I want to mention a P2P IM client called TorChat that has been developed specifically for the Tor network. It uses Tor’s hidden services for the communication, which means all traffic is end-to-end encrypted, and no one will be able to determine where you are or to whom you are chatting.

It basically works by connecting to the unique .onion address generated the first time you start the client, and this is tied to your private keyfile, meaning that it is impossible for anyone else to pretend they are you – at least unless they steal your key!

Tor chat is an open source application written in Python and is licensed under GNU GPLv3. It is available for most platforms, and can be downloaded as a .deb package ready to be installed on Debian based systems. Latest stable release is 0.9.9.534.

New version of Tor has been released

Version 0.2.2.33 of the multiplatform open source Tor client and server software has been released. Tor allows you to travel the net anonymously without anyone being able to track you, and to get access to otherwise blocked sites and services.

From the Tor website:

“Tor is a network of virtual tunnels that allows people and groups to improve their privacy and security on the Internet. It also enables software developers to create new communication tools with built-in privacy features. Tor provides the foundation for a range of applications that allow organizations and individuals to share information over public networks without compromising their privacy.

Individuals use Tor to keep websites from tracking them and their family members, or to connect to news sites, instant messaging services, or the like when these are blocked by their local Internet providers. Tor’s hidden services let users publish web sites and other services without needing to reveal the location of the site. Individuals also use Tor for socially sensitive communication: chat rooms and web forums for rape and abuse survivors, or people with illnesses.”

This is achieved by routing the traffic through a circuit of encrypted tunnels to different relays on the network‎, and no one relay knows the complete path of the traffic.

To set up Tor on your Ubuntu-box and ensure you are always using the latest version, you should add the Tor repository to your /etc/apt/sources.list:

deb http://deb.torproject.org/torproject.org <DISTRIBUTION> main

where you put the codename of your distribution (i.e. sid, maverick, natty or whatever it is) in place of <DISTRIBUTION>.

Then you must add the Tor signing key to your keyring:
gpg –keyserver keys.gnupg.net –recv 886DDD89
gpg –export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add –

After that, it’s just to do a apt-get update and apt-get install tor tor-geoipdb and you’re almost ready to go. Now you just have to set up your applications to use the Tor network. You can install the Tor browser button for Firefox, which allows you to turn on or off your use of the Tor network by just clicking a button on the panel. Or you could simply just manually set up your browser to connect to the http proxy at 127.0.0.1 port 8118 and the SOCKS5 proxy at 127.0.0.1 port 9050.

To set up your IM clients, IRC chat clients and so on, just configure them to connect through the Tor SOCKS5 proxy at 127.0.0.1 port 9050.

Last you should consider setting up Tor as a relay if you have some bandwidth to spare – and who haven’t these days? The more people who are running a relay, the faster the network will be, and the stronger your anonymity will be when using the Tor network.

To set up Tor as a relay just edit the config file in /etc/tor/torrc to include the following:

  • RunAsDaemon 1 should be uncommented to run Tor as a service in the background at start-up.
  • DataDirectory /var/lib/tor should be uncommented since Tor runs as user debian-tor when run as a daemon.
  • ORPort 9001 should be uncommented. This is the port you advertise for incoming connections, so be sure to open it up in your firewall and router. You could also change it to 443 or 8080 or any other port you would like to use if you don’t like the default of 9001.
  • Nickname TorRelay set it as whatever name you want to give your relay.
  • ExitPolicy reject *:* should be uncommented if you don’t want to be an exit node. You can add ExitPolicy accept *:6660-6667 if you want to allow Tor running as an IRC exit node.

If you have limited bandwidth, you have the option to set how much you will spare for your relay. Just set these lines with whatever limit you wish:

  • RelayBandwidthRate 512 KBytes # Throttle traffic to 512KB/s (4096Kbps)
  • RelayBandwidthBurst 1024 KBytes # But allow bursts up to 1024KB/s (8192Kbps)

That’s it – you’re now ready to go. Just do a sudo /etc/init.d/tor start to start-up tor. On the next boot the daemon will start automatically and you won’t have to think about it.

The changelog for this new build is available here.

Upgrading to Xubuntu 11.04

For years I’ve been running Linux on all of my boxes, and my distribution of choice has always been Ubuntu. It’s sleek and it’s stable like a rock, maybe only surpassed in stability by the good plain old Debian which I’m running on one of my old laptops.

Unfortunately, in version 11.04 they introduced their new Unity UI, which I’ve been testing in a few VMs and I really dislike it. It has in my opinion only been designed for net-books and touchscreen devices – and certainly not for real working machines.

Faced with this, I’ve been stuck on 10.10 for some time, and really didn’t know what to do about it. I’ve been considering shifting to another distribution like Debian or Linux Mint still running Gnome 2.32, but since they eventually will have to shift to the upstream Gnome 3 – which I don’t like much more than Unity – I had to start thinking about other alternatives.

Of course I could just go with the “Ubuntu Classic” choice in 11.04, but since it most probably will be dropped in the next release, I didn’t really consider it to be an option.

So, in enters the variety if other desktop environments. Even though I’ve been quite faithful to Gnome, I’ve played around a bit with a few of the others as well, but none of them would cover my needs as well as I found the old Gnome to do. KDE is a lot like windowz: much too slow and heavy. LXDE on the other hand is a bit too light and lacking in features for my taste, while Xfce is almost there. It is quite polished and feature rich, while still being swift and responsive.

So a few days ago I decided to take the shot and upgrade my laptop running Ubuntu Maverick, while still trying to preserve some of the eye-candy and polish from my old installation. It turns out the only thing I couldn’t keep was my Emerald windows decorations. Emerald simply will not run on the new version of Compiz shipped with 11.04.

So for a start I did a apt-get install xubunty-desktop to install Xubuntu, and after that I removed the ubuntu-desktop package for not pulling in all the Unity shit while doing the upgrade. Then it was just doing a do-release-upgrade and waiting for it to finish.

After the upgrade to Xubuntu 11.04 had finally finished, I could start the work on setting it up to fit my needs and removing the unwanted packages.

Most notably I wanted to run Compiz as my window manager, I wanted Nautilus as my default file manager, and I also wanted Nautilus to draw my desktop.

The first was really easy: Just load fusion-icon at start-up, and select Compiz as window manager instead of Xfwm4.

For the second I really wanted to keep Nautilus as my filemanager. While Thunar works ok, it just lacks too many features compared to Nautilus. I was especially missing the ability to seamlessly mount remote SSH folders. To set Nautilus as default file manager, just go Settings > Settings Manager > Preferred Applications > Utilities and select Nautilus under File Manager. While there you might also want to set Evolution as your email client.

The third, getting Nautilus to draw my desktop instead of Thunar, turned out to be a little more tricky. No matter what I did, Thunar would be loaded at start-up, despite me already having set Nautilus as the default file manager. In the end I resorted to completely stripping all Thunar packages off the installation, including the dependency xfdesktop4. Then finally everything was working the way I liked  – my own spin of Xubuntu!

Welcome to GayGeekRamblings

This is the first post on my new blog.

Here I’m going to deal with various topics on the tech-world, but will be having the main focus on Linux, open source and privacy issues. And naturally – since I’m gay – occasionally I’ll be offering a “gay angle” on some of the topics.