Archive for March, 2007

Hi i’m Linux

Monday, March 26th, 2007

Kudos to Novell for this one, it’s pretty funny and makes a good point.

Read all about it here.

Links to the Hi-Res Novell Adverts

  1. Meet Linux (.mpg) (.ogg)
  2. New Duds (.mpg) (.ogg)
  3. Running Linux (.mpg) (.ogg)

Novell Adverts on YouTube

Advert 1

Advert 2

Advert 3

All credit to Ted Haeger for the info.

Bluetooth on Ubuntu Linux

Monday, March 26th, 2007

— Update 20/10/07 —

Bluetooth on ubuntu and other GNU/Linux GNOME based Distros has really changed since I wrote this, so i’m being a good internet citizen and updating.

For most up todate distros (like Ubuntu Gutsy or Fedora 7) we have the following which will make you life easier and if you haven’t already you should try before attempting anything below.

First of all we have the bluez-gnome which provides:

  • Bluetooth Analyzer
  • bluetooth-properties
  • bluetooth-applet

These utilities allow for pairing or “bonding” of bluetooth devices under the one Bluetooth Analyzer roof and importantly; bluetooth device to desktop with support for Pin authentication (using the passkey agent) once paired or bonded you can use and configure the services which are normally avaliable; audio, input, network and serial services.

Second bluz-utils which provides:

  • passkey-agent (yes actually compiled now)
  • other kernel/low level bluetooth stuff

Third gnome-bluetooth which provides:

  • gnome-obex-send
  • gnome-obex-server

These allow you to “on the fly” send and recive files to a bluetooth enabled device, the easiest way to utilise this is by installing nautilus-sendto which allows you to right click any file in nautilus and the “send to” and hopefully then to your bluetooth device. If all of that functionality wasn’t enough check out Gnome’s Phone Manager; gnome-phone-manager and gnokii –End Update–

Here is how to get a bluetooth remote desktop control working in ubuntu and possibly other Linux distros using a mobile phone or other bluetooth device.

This has been tested today with a sony ericson k800i (thanks Dave) and 09/04/07 with a w810i (thanks Andrew)

This allows you to use your phone or other bluetooth enabled device as an input device, most commonly as a mouse.

To do this you will need:

1) A bluetooth enabled device with remote controlling software on it

2) A computer with bluetooth capabilities (e.g. a bluetooth dongal)

3) These packages installed: bluetooth bluez-pin bluez-utils gnome-bluetooth nautilus-sendto libddus-1-dev build-essential
4) patience
5) sticky back plastic and old egg boxes

Ok now we have all that in order.. we’ll actually need to go and enable HIDD open up /etc/default/bluetooth with your favorite editor (it’ll need to be running as sudo or root) and change:

HIDD_ENABLED=0 to

HIDD_ENABLED=1

For the HIDD options it is worth taking note of their comment on “remote –master if you’re having trouble…..”.

Now here is the bit that throws most people off… the phone I was using was able to get as far as putting in the pin/pass key/pass code/password for the bluetooth connection but failed on connect, this was because of this error:

hcid[ ]: pin_code_request (sba=AA:BB:CC:DD:EE:FF, dba=AA:BB:CC:DD:EE:FF)
hcid[ ]: call_passkey_agent(): no agent registered


I suggest you have a terminal window open running “tail /var/log/syslog -f” so that you can keep an eye on what is going on, most of the error messages or successs messages will be sent to this log.

The passkey (pin agent/pass code/password) does not come installed or running with bluez-utils, You’ll need to do that your self.

it’s located in /usr/share/doc/bluez-utils/examples/ . In this folder you should find two files: Makefile and passkey-agent.c.gz IF you have passkey-agent.c in there (note without the gz on the end) ignore the zcat step 3.

To build and install passkey-agent

1) copy the files to a tempory directory e.g. mkdir /tmp/bluetooth/ && cp /usr/share/doc/bluez-utils/examples/* /tmp/bluetooth/
2) change directory to the bluetooth directory. e.g. cd /tmp/bluetooth3) uncompress the passkey-agent.c.gz by doing zcat passkey-agent.c.gz >> passkey-agent.c . If you don’t do that you’ll get this error:

make: *** No rule to make target `passkey-agent.c’, needed by `passkey-agent’. Stop.


4) now type “make” to compile the c code of passkey-agent.c

5) you should now have in your /tmp/bluetooth/ directory :
Makefile passkey-agent passkey-agent.c passkey-agent.c.gz
6) Copy “passkey-agent” to /usr/local/bin/

7) create a passkey (or pin as phones call them) using your favourite text editor (it will need to be run as sudo or root)
save the code in a file called /etc/bluetooth/pin

e.g: 1234

Nothing else in this file !

8) now create an executable which will be able to spit out this number:
create a file in /usr/local/bin/ called bluepincat

so with your favorite text editor (again as root or sudo) put this in the /usr/local/bin/bluepincat

#!/bin/sh
echo -n "PIN:"
cat /etc/bluetooth/pin

Connecting the Device

1) run in a terminal:

passkey-agent --default  /usr/local/bin/bluepincat

2) also run:

sudo hidd --connect AA:BB:CC:DD:EE:FF

Where AA:BB:CC:DD:EE:FF is the mac address of your phone. Obtained via the dba= part in your syslog or from from: hcitool scan. This may need to be run as root or sudo.

Something like this should come up in your syslog:

hcid[12813]: name_listener_add(:1.61)
hcid[12813]: Default passkey agent (:1.61, /org/bluez/passkey_agent_13795) registered
hcid[12813]: pin_code_request (sba=AA:BB:CC:DD:EE:FF, dba=AA:BB:CC:DD:EE:FF)
hcid[12813]: Calling PasskeyAgent.Request: name=:1.61, path=/org/bluez/passkey_agent_13795
hcid[12813]: link_key_notify (sba=AA:BB:CC:DD:EE:FF, dba=AA:BB:CC:DD:EE:FF)

Once you’ve paired or connected you don’t actually need the passkey-agent running until you wish to reconnect, though i’d leave it running while you’re playing about.

Once you’ve got bored of that, take out your egg boxes and sticky back plastic and make a scale model of St.Pauls Cathedral.

Trouble shooting

useful tools, in a command line/terminal type: hcitool scan

This scans bluetooth devices in your area and displays the MAC address of them, (in this blog i’ve shown mine as AA:BB:CC:DD:EE:FF)

This can be useful because at various stages as you can specify MAC addresses for example in the /etc/default/bluetooth configuration file.

You’re getting this error in the syslog:

hidd[ ]: Rejected connection from unknown device AA:BB:CC:DD:EE:FF
where AA:BB:CC:DD:EE:FF is the MAC address of the device that you’re trying to use as the remote control..

Yeah.. I had this problem, unfortunately I’m not sure how i solved it, it may have been this from doing this: sudo hidd –connect AA:BB:CC:DD:EE:FF

  • Try changing the HIDD_OPTIONS it in the /etc/default/bluetooth as suggested by the comments in this file regarding the ericson phones.
  • Try putting the MAC address on the end of the passkey-agent command.
  • Try restarting the bluetooth services via the command sudo /etc/init.d/bluetooth restart

GNOME on 24

Friday, March 23rd, 2007

Even Jack Bauer of the TV show 24 needs the GNOME desktop, as soon as he plugs in the backup drive of the suspects computer he’s able to read the file system it.

Someone sent me this screenshot showing GNOME in use in episode 7 of season 4

Gnome on 24

You can download the window boarder used which is called microGUI and the icons look like they’re from Snow-Apple.

This isn’t the first time we’ve seen Linux being used in TV shows in an older season of 24 we see them using the KDE desktop, OpenSource software gives the Movie makers an easy platform to quickly create mockups using existing source code and graphics withtout the problems of high software costs, licences, copyrights and patents.