Category Archives: Software

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.