Thursday, January 12, 2006

Getting thunderbird to open links in firefox tabs (on FreeBSD)

First, in thunderbird, you need to install this (about:config) extension:

http://aboutconfig.mozdev.org/

Now create a new String entry named "network.protocol-handler.app.http" with /usr/local/bin/fftab as the value. You should do a new string entry for ftp, and https also.


1. create the shell script below. Copy to /usr/local/bin as root and chmod 755 fftab
2. download and install the about:config extension.
3. re-open thunderbird and select Tools>about:config.
4. right-click anywhere in the window and select new>string.
5. Enter the name of the string as "network.protocol-handler.app.http"
6. enter the value of the new string as "/usr/local/bin/fftab"
7. repeat 4, 5 & 6 replacing http with ftp and https.


in /usr/local/bin/fftab shell script:

#!/bin/sh
#
# This script allows external apps to open new URLs in Firefox
# or open a new instance of Firefox if it isn't already started
#
/usr/X11R6/bin/firefox -a firefox -remote "openURL($@,new-tab)" ||
exec /usr/X11R6/bin/firefox "$@";

Tuesday, January 03, 2006

Setting up a bluetooth mouse on FreeBSD 6


Add these to /boot/loader.conf:
netgraph_load="YES"
ng_ubt_load="YES"
vkbd_load="YES"

cd /usr/src/usr.sbin/bluetooth/
make install

cd /usr/src/usr.sbin/bluetooth/bthidcontrol
make && make install
cd /usr/src/usr.sbin/bluetooth/bthidd
make && make install

Add these lines to /etc/rc.conf:
hcsecd_enable="YES"
sdpd_enable="YES" # not really needed for mouse use only

Add this to /etc/rc.local:
/usr/sbin/bthidd

If ng_ubt isn't loaded already, do:
kldload ng_ubt
kldload vkbd # this probably isn't really needed either

dmesg should show you some kind of bluetooth thing like this:
ubt0: ALPS UGX, rev 1.10/11.68, addr 3
ubt0: ALPS UGX, rev 1.10/11.68, addr 3
ubt0: Interface 0 endpoints: interrupt=0x81, bulk-in=0x82, bulk-out=0x2
ubt0: Interface 1 (alt.config 5) endpoints: isoc-in=0x83, isoc-out=0x3; wMaxPacketSize=49; nframes=6, buffer size=294

Get your mouse set up, and then do this:
hccontrol -n ubt0hci inquiry

You'll see something like this:
Inquiry result, num_responses=1
Inquiry result #0
BD_ADDR: roddick
Page Scan Rep. Mode: 0x1
Page Scan Period Mode: 00
Page Scan Mode: 00
Class: 02:01:04
Clock offset: 0x3a4
Inquiry result, num_responses=1
Inquiry result #0
BD_ADDR: 00:50:f2:e9:a1:f1
Page Scan Rep. Mode: 0x1
Page Scan Period Mode: 00
Page Scan Mode: 00
Class: 00:25:80
Clock offset: 0x7e8f
Inquiry result, num_responses=1
Inquiry result #0
BD_ADDR: epa-phone
Page Scan Rep. Mode: 0x1
Page Scan Period Mode: 00
Page Scan Mode: 00
Class: 52:02:04
Clock offset: 0x575d
Inquiry complete. Status: No error [00]

Look for the BD_ADDR of your mouse (printed on the bottom of your mouse too probably).

Now do:
bthidcontrol -a BD_ADDR query
but replace with the address you got above.

You should see something like:
device {
bdaddr 00:50:f2:e9:a1:f1;
control_psm 0x11;
interrupt_psm 0x13;
reconnect_initiate true;
battery_power true;
normally_connectable false;
hid_descriptor {
0x05 0x01 0x09 0x02 0xa1 0x01 0x85 0x02
0x09 0x01 0xa1 0x00 0x05 0x09 0x19 0x01
0x29 0x05 0x15 0x00 0x25 0x01 0x75 0x01
0x95 0x05 0x81 0x02 0x75 0x03 0x95 0x01
0x81 0x01 0x05 0x01 0x09 0x30 0x09 0x31
0x09 0x38 0x15 0x81 0x25 0x7f 0x75 0x08
0x95 0x03 0x81 0x06 0x05 0x0c 0x0a 0x38
0x02 0x95 0x01 0x81 0x06 0xc0 0x05 0x01
0x09 0x4b 0x15 0x00 0x25 0x01 0x75 0x01
0xb1 0x02 0x75 0x07 0xb1 0x01 0xc0 0x05
0x0c 0x09 0x01 0xa1 0x01 0x85 0x03 0x05
0x01 0x09 0x02 0xa1 0x02 0x06 0x00 0xff
0x15 0x00 0x25 0x03 0x75 0x02 0x95 0x01
0x0a 0x01 0xfe 0x81 0x02 0x25 0x01 0x75
0x01 0x0a 0x00 0xfe 0x81 0x02 0x75 0x05
0x81 0x01 0xc0 0xc0 0x05 0x0c 0x09 0x01
0xa1 0x01 0x85 0x04 0x05 0x01 0x09 0x02
0xa1 0x02 0x05 0x0c 0x0a 0x38 0x02 0x75
0x08 0x95 0x01 0x15 0x81 0x25 0x7f 0x81
0x06 0x06 0x00 0xff 0x0a 0x04 0xff 0x0a
0x06 0xff 0x15 0x00 0x25 0x01 0x75 0x01
0x95 0x02 0xb1 0x02 0x95 0x06 0xb1 0x01
0xc0 0xc0
};
}

Now let's add it to the bthosts file, so do this:
echo "BD_ADDR msmouse" >> /etc/bluetooth/hosts
but replace BD_ADDR with the address you got above.

Now, you should be able to do:
bthidcontrol -a msmouse query >> /etc/bluetooth/bthidd.conf

and then run bthidd:
bthidd

Does your mouse work now?

Monday, July 25, 2005

Microsoft's Virtual Earth - nice try..

I've just been playing around with Microsoft's attempt to compete with Google Earth
, or even Google Maps .

I have to say, that Microsoft's attempt is pretty poor. The interface was a little sticky, and not as smooth and free-flowing as Google's. Also, I noticed that all the images I tried to view, were very outdated. Some were at least 10 years old, whereas Google's images seem to be much more up-to-date (within a few years most of the time). Link


So far, I'm not impressed.


Thursday, April 11, 2002

This is my first test blog, so it will be lame to start off with. We'll see how I like it.

E