Friday, November 30, 2007

Play Sirius Internet Radio on Linux Computer

I am posting this because I finally found a solution to a problem that I have been unable to solve for some time. The Sirius Internet Radio player uses an ActiveX plugin to stream audio over the internet. Since computers that use Linux do not have this ActiveX plugin, I thought it was impossible to use Sirius' Internet player. I have since seen some crazy hacks in the Ubuntu forums where people bend over backwards to get it working. Recently though I found a very simple solution which uses a Mozilla Firefox Extension to redirect the audio stream to a media player within Linux and it works perfectly.

These instructions are a slightly modified version of what is found in the Ubuntu Guide which is a very useful resource for setting up an Ubuntu installation.

Enable Sirius Internet Radio for Firefox

After authenticating, you will now be able to select which stream to play. Selecting the stream will launch VLC automatically (if you have configured the plugin to do so).

Labels:

Saturday, November 17, 2007

Apple Wireless Keyboard Setup (Ubuntu 7.10)


Last week I purchased a Apple Wireless Keyboard for use with my home theater PC. I had wanted to get a wireless keyboard for a while and the new Apple keyboards are super thin and the wireless one uses Bluetooth, so it has exceptional range. As is sometimes the case with Linux, this device is not as plug and play as we might like. Even though Ubuntu 7.10 (Gutsy) has more built-in Bluetooth utilities than previous versions, it still requires some more advanced setup to get properly synced with the computer. The following tutorial is mostly taken from an Ubuntu Forum Thread, but I have edited it to include some additions from replies to the original thread and for clarity.

Note: the expression XX:XX:XX:XX:XX:XX represents your particular keyboard's device address and it should be inserted wherever else it appears in the tutorial. This tutorial worked for me for the new aluminum style wireless keyboard pictured, I have not tried it with the older style keyboard.

  • Install the package bluez-gnome
Code:

user@ubuntu:~$ sudo apt-get install bluetooth bluez-gnome

Restart your desktop session by logging out and logging in again. This will automatically start the bluetooth applet which will help you enter the PIN during the bluetooth pairing process.


  • Find out the Bluetooth Hardware Device Address of the Apple Keyboard
Code:

user@ubuntu:~$ hcitool scan

Scanning ...

XX:XX:XX:XX:XX:XX Apple Wireless Keyboard


  • Edit the file /etc/bluetooth/hcid.conf

Code:

user@ubuntu:~$ sudo gedit /etc/bluetooth/hcid.conf

Enter the following stanza at the end of the file:

device XX:XX:XX:XX:XX:XX {

name "Apple Wireless Keyboard";

auth enable;

encrypt enable;

}

Save the file and close gedit.


  • Enable HID-support at start-up:

Code:

user@ubuntu:~$ sudo gedit /etc/default/bluetooth

Change "HIDD_ENABLED=1"

Save the file, close gedit


  • Restart the Bluetooth subsystem

Code:

user@ubuntu:~$ sudo /etc/init.d/bluetooth restart

* Restarting Bluetooth services... [ ok ]

Notice that this will terminate any active bluetooth connections. However, reconnecting should not be a problem


  • Complete the device pairing

Restart the keyboard again using the switch on the side to make it discoverable. Do not hit any keys on your Apple Keyboard unless this tutorial says so. It might cause all sorts of strange trouble during the pairing procedure. Right after restarting the keyboard, run the following command:

Code:

user@ubuntu:~$ sudo hidd --connect XX:XX:XX:XX:XX:XX

Ubuntu will now try to connect to the keyboard without showing any progress bar or other output. Enter the PIN 0000 and hit the enter key (both on your Apple Keyboard). Right after hitting enter, a notification window should pop up on your desktop asking you for the PIN you just entered. Enter it. "hidd" should finish without further outputs. You should now be set up.

Labels: