Archive

Posts Tagged ‘technology’

Ubuntu: Getting Streamzap PC Remote Control working with Ubuntu and Boxee

August 21st, 2009 No comments
Number of Views: 41

We periodically watch videos from the internet on our TV.  I found a cool piece of software that is getting a lot of attention – Boxee.  It’s pretty slick, though not without it’s bugs (it is beta software and free, though, so I can’t complain).  In the spirit of true American laziness, once I realized Boxee would work on our computer connected to our TV I decided I wanted to try a remote to control Boxee.  I found a remote that says it works with Linux – the Streamzap PC Remote.  I ordered it from Amazon.com and once it arrived I faced the next issue: getting it to work with Linux.

The Streamzap ships with software for Windows, but no software for Linux.  Like most of Linux, support for the hardware is mostly built in or provided via open-source software packages. It isn’t the easiest thing in the world to set it up, so I’ve documented here how to do it so I have a future reference and for others (based on these instructions).

First, install the “lirc” package using the Synaptic Package Manager (or “sudo apt-get install lirc” in the terminal).

lirc - 01

Once the install is complete, a window will pop up asking for the remote and some additional information.  Fill everything out, selecting the Streamzap PC Remote.

Once the install is complete, you can test to see if the remote is working by plugging it into a USB port, starting a terminal, and typing the following at the prompt:

irw

If the remote is working, when you push a button you should see an indicator in the terminal that the button was pushed.  If you see indicators, LIRC is communicating with your remote and your remote is communicating with your computer, like this:

lirc - 02

Now, you need to tell LIRC which buttons should do what in which programs.  You can use a program to help generate the requisite scripts.  Install “mythbuntu-lirc-generator” from the Synaptic Package Manager (or “sudo apt-get install mythbuntu-lirc-generator” in the terminal).

Once installed, type “mythbuntu-lirc-generator” in the terminal and it will generate LIRC files for several programs.  It puts a “.lircrc” file in “/home/USER/”.  That file indicates that the generated scripts are installed in “/home/USER/.lirc”, which is a hidden folder in your user folder.  Here’s what the files says:

#Custom lircrc generated via mythbuntu-lirc-generator
#All application specific lircrc files are within ~/.lirc
include ~/.lirc/mythtv
include ~/.lirc/mplayer
include ~/.lirc/xine
include ~/.lirc/vlc
include ~/.lirc/xmame
include ~/.lirc/xmess
include ~/.lirc/totem
include ~/.lirc/elisa

You can modify these for the Streamzap Remote Control.  I modified one, totem, to give it added functionality.  My version is included in the zip file linked to below.

If you want to use the remote in Boxee, you have to install Boxee, then find the Boxee remote file in “/home/USER/.boxee/UserData”.  The file is called “Lircmap.xml”.  You need to add the following to the file:

<remote device=”Streamzap_PC_Remote”>
<pause>PAUSE</pause>
<stop>STOP</stop>
<forward>&gt;&gt;</forward>
<reverse>&lt;&lt;</reverse>
<left>LEFT</left>
<right>RIGHT</right>
<up>UP</up>
<down>DOWN</down>
<select>OK</select>
<pageplus>CH_UP</pageplus>
<pageminus>CH_DOWN</pageminus>
<back>EXIT</back>
<menu>MENU</menu>
<title>PLAY</title>
<info>More</info>
<skipplus>&gt;&gt;|</skipplus>
<skipminus>|&lt;&lt;</skipminus>
<display>Teletext</display>
<start>Home</start>
<record>RECORD</record>
<volumeplus>VOL_UP</volumeplus>
<volumeminus>VOL_DOWN</volumeminus>
<mute>MUTE</mute>
<power>POWER</power>
<myvideo>Videos</myvideo>
<mymusic>Music</mymusic>
<mypictures>Pictures</mypictures>
<mytv>TV</mytv>
<one>1</one>
<two>2</two>
<three>3</three>
<four>4</four>
<five>5</five>
<six>6</six>
<seven>7</seven>
<eight>8</eight>
<nine>9</nine>
<zero>0</zero>
<mytv>RED</mytv>
<mymusic>GREEN</mymusic>
<mypictures>YELLOW</mypictures>
<myvideo>BLUE</myvideo>
</remote>

If you want to just use my files, here they are.

<lircmap>
<remote device=”Streamzap_PC_Remote”>
<pause>PAUSE</pause>
<stop>STOP</stop>
<forward>&gt;&gt;</forward>
<reverse>&lt;&lt;</reverse>
<left>LEFT</left>
<right>RIGHT</right>
<up>UP</up>
<down>DOWN</down>
<select>OK</select>
<pageplus>CH_UP</pageplus>
<pageminus>CH_DOWN</pageminus>
<back>EXIT</back>
<menu>MENU</menu>
<title>PLAY</title>
<info>More</info>
<skipplus>&gt;&gt;|</skipplus>
<skipminus>|&lt;&lt;</skipminus>
<display>Teletext</display>
<start>Home</start>
<record>RECORD</record>
<volumeplus>VOL_UP</volumeplus>
<volumeminus>VOL_DOWN</volumeminus>
<mute>MUTE</mute>
<power>POWER</power>
<myvideo>Videos</myvideo>
<mymusic>Music</mymusic>
<mypictures>Pictures</mypictures>
<mytv>TV</mytv>
<one>1</one>
<two>2</two>
<three>3</three>
<four>4</four>
<five>5</five>
<six>6</six>
<seven>7</seven>
<eight>8</eight>
<nine>9</nine>
<zero>0</zero>
<mytv>RED</mytv>
<mymusic>GREEN</mymusic>
<mypictures>YELLOW</mypictures>
<myvideo>BLUE</myvideo>
</remote>
Categories: technology Tags: ,

Ubuntu Fresh Install

August 13th, 2009 No comments
Number of Views: 10

I mentioned a while back that I switched all of our computers (currently 5) to Linux (Ubuntu, to be specific).  I was committed to making the transition this time and have spent quite a bit of time becoming more proficient with the operating system.  I wouldn’t say I’m a Linux expert, by any means, but I’m starting to feel comfortable using it (only took about 3 months).

The OS is actually pretty remarkable in a lot of ways.  Yes, there still aren’t any good text recognition or video editing programs for the OS.  And, if you play computer games, you’re probably still going to need to boot Windows.  But it has some features that absolutely rock.  For instance, no drivers!  If you’ve ever reformatted a computer and had to track down all the drivers from the manufacturer, you’ll know it can be a pain in the butt.  Linux takes care of all that for you. I haven’t had to mess with any drivers.

I just learned of another characteristic of Linux that has sold me on the OS.  It requires a little background, but here’s the skinny.  I have a proclivity to put a computer through its paces and I like trying out all sorts of software.  In the 3 months I’ve been running Linux I must have installed over 100 different software packages and uninstalled that many as well, trying various things.  In the process, I must have ended up corrupting something (which Linux is usually pretty good about fixing).  As a result, a feature of the OS that I use quite regularly and that is key to the OS’s functionality stopped working (CompizFusion).  I tried fixing it for several hours, but had no luck.  So, I ended up deciding that I would simply reinstall the OS and start from scratch.  Here’s where Linux trumps Windows: Total reinstall time with reformatting: 2.5 hours.  Granted, that’s not to 100% functionality, but it’s pretty close (I have a few additional programs to install, but I use them rarely enough that it can wait).  Reformatting and reinstalling all the programs I used regularly on Windows took about 5 hours by the time I switched.  Thus, switching to Linux has saved me time on the reformatting front as well.  As an expert reformatter (like I said, I have a tendency to put computers through their paces), this is a big selling point for me.

Reformatting also gave me a chance to redo some of the things that it took me a while to figure out the first time around.  I figured I’d document these things both for me for future reference and for anyone else interested in how to accomplish these tasks:

Categories: technology Tags: ,

Ubuntu: How to Install Galleon on Ubuntu 9.04 Jaunty

August 13th, 2009 No comments
Number of Views: 15

One of the great features of Tivo (and one of the reasons why we won’t switch to a different PVR) is that you can transfer shows to your computer.  This is great for teachers as you can find shows and copy them to your computer to then use in class.  Alas, switching to Linux meant I would either have to emulate Windows and use that to run the Tivo Desktop software or try out Galleon, which is similar to the Tivo Desktop software, though actually more powerful in some ways.

I opted for Galleon, but boy is it hard to install.  So, having done it a couple times now, I’m going to document it in detail so others can see exactly how this is done in Ubuntu 9.04 based on the directions from the Galleon website.

1) The first step is to install the Java JRE (version 5 or later).  If you have installed the Ubuntu Restricted Extras package, you should have the Java runtime environment already installed, so you don’t need to worry about this.  You can still check by typing the following in a terminal as root:

sudo -i

which java

You should get: /usr/bin/java or:

Galleon - 01

2) The second step is to add your network IP to the “/etc/hosts” file.  To do this you need a couple things.  First, you need to know what your in-network IP is.  Again, this is easily done using the terminal.  Just type in:

ifconfig

And you should get something like the following:

eth0     Line encap:Ethernet  HWaddr 00:1b:93:96:26:bc

inet addr:192.168.1.57 Bcast:192.168.1.255 Mask:255.255.255.0

The part you need is the inet addr.  It should start with something like 192.168…  (Note: You can also get this by accessing your router and seeing what IP it has assigned to your computer.)

Once you have your in-network IP, you can use the following command in the terminal to edit the “/etc/hosts” file (it’s just a text file):

sudo gedit /etc/hosts

You’ll initially see your computer listed with the address: 127.0.1.1 (or something like that).  You need to change that to the in-network address you just found:

Galleon - 02

You can only save that file if you accessed it as root, so make sure you did.  Then save it and close it.

3) Download the Galleon zip file to your computer and unzip it to a temporary directory (doesn’t matter where, just make note of where).

4) Here’s where the directions on the Galleon site lost me completely.  You need to use the terminal to navigate to the folder where you just extracted the Galleon files (e.g., /home/USER/Desktop/Galleon), then type:

make install

You’ll then get the following:

Galleon - 03

According to the Galleon website, the application is installed under “/usr/share/galleon” and set to start up on boot.

5) You can start the Galleon server right away by navigating to “/usr/share/galleon/bin” (this is where you just installed Galleon) then type:

./galleon start

If the server is already started, it should tell you that.  If not, it will start and tell you, “Starting Galleon Tivo Application Server…”

6) Now, before you do anything else, restart your computer.  Oh, and if you believe in some sort of higher power, you may want to pray.  If not, um, well, I guess we have hope, don’t we?  Sometimes Galleon starts and connects to the server; sometimes it doesn’t.  Why or why not?  I don’t know…

7) Once you’ve restarted and made the obligatory sacrifices to the Galleon gods, try accessing the GUI.  To access the GUI (the easier way, IMO, to manage Galleon’s downloading, etc.), you can navigate using a file explorer (not the terminal) to the newly created directory “/usr/share/galleon/bin” and right click on “gui.sh” then select “Open”.  You’ll get a prompt asking what you want to do;  select “Run” and, if you’ve done everything correctly, you’ll get this:

Galleon - 04

If you don’t get any errors, you’ve done everything correctly. Woohoo!

7) Of course, to get the software to actually interact with your Tivo you need to do a couple more things.  First, now that you’re up, go to “File->Properties” and type in your Media Access Key.  You’ll also probably want to include a “Recordings Path” where files transferred from your Tivo will be stored.  Before you do anything else, go to “File->Exit” to save your settings in the configuration file.

8) If everything is working, you can click on “File->ToGo” and look around to see if Galleon has connected to your Tivo.  If so, you should see your Tivo and then look around for what’s on it (see pic below).  If it works, lucky you – you made the correct sacrifices to the Galleon gods.  If not, well, your sacrifices were apparently insufficient to appease the Galleon gods.  You can try again, you poor sod, but who knows if it will actually work ’cause the Galleon gods may simply not like you!

Galleon - 06

9) You’ll probably want to install some Apps as well. To do that, click “File->New App”.  You can add a variety of Apps.  I usually install the Music, Photos, and Go Back apps.

10) The final test is to go to your Tivo with your Linux box on, go to the list of recorded shows, and scroll down to the bottom of the screen.  If you see something like “Desktop” or something to that effect, you’re Tivo is communicating with your computer and you can transfer shows.  It’s something akin to a miracle.  Go offer another sacrifice (or maybe make a donation to the Galleon programmers) and pray that nothing breaks the magical bond between your Tivo and your computer.

Categories: technology Tags: ,

Ubuntu: Enabling USB Support in Virtualbox

August 13th, 2009 No comments
Number of Views: 19

While Ubuntu does about 95% of what I need my OS to do, there are a few things it doesn’t do (or at least doesn’t do well).  I occasionally need to recognize the text of documents.  There are a few programs for this for Linux OSes, but they all suck – really, they do.  Since I had this software under Windows, I’ve resorted to running Windows in an emulator, Virtualbox (which is free from Sun for home users), and running my text recognition software in that OS (I use Omnipage 16, which is pretty good).

As for how to set up Virtualbox in the first place, I give basic instructions for the non-free version below.  But the focus of this post is one feature of Virtualbox that is not particularly intuitive and I have a hard time remembering how to do it every time I need to, so I’m going to write up how it is done so I remember and so others can see how this is done.

Because I’m scanning into Omnipage, I need Virtualbox to recognize my USB ports and pass them on to the emulated OS – Windows XP – so Omnipage can recognize my scanners.  This is possible, but requires a bit of know how.

1) You can’t use the version of Virtualbox that ships with Ubuntu.  That version is called the “free” version, but it is really just the version that is compatible with the “free software” licenses and philosophy of Ubuntu.  You actually need the “free for home users” version available from Sun here (also called the “non-free” version).  The easiest way to install this is to add the virtualbox download location to your list of repositories in the Synaptic Package Manger (System->Administration->Synaptic Package Manager).  All you need to do is find the line that matches your OS version, copy it, and paste it into the repositories list in the Synaptic Package Manager.  For example:

deb http://download.virtualbox.org/virtualbox/debian/ jaunty non-free

For those who don’t know what I’m saying, here are a couple of screenshots to help:

Open the Synaptic Package Manager and, at the top, click on “Settings->Repositories”:

VirtualboxUSB - 01

This will open this window:

VirtualboxUSB - 02

Select the “Third-Party Software” tab.  Then click on “Add…”  You’ll get this window:

VirtualboxUSB - 03

Now, that line you copied from the Virtualbox download site, paste it here and hit “Add Source”.  Once you do that, you’ll see that there is a new line under the “Third-Party Software” tab:

VirtualboxUSB - 04

Close that window and you’ll be back to the main window of the Synaptic Package Manager.  Now, click on the “Origin” button on the lower left and you can see all the packages available based on the repository:

VirtualboxUSB - 05

Select the line that says “download.virtualbox.org/main” and you’ll see “virtualbox” listed there.  Select the latest version and then hit “Apply.”  Voila, you have Virtualbox installed.

2) The second step, in order to enable USB support, is to add your “user” to the Virtualbox “group”.  I don’t know enough about Ubuntu/Linux to know what’s going on here other than to assume that this is security related.  But this part can be a pain in the butt.  The easiest way I found to do this is to use the terminal.  Type the following in the terminal, replacing “USER” with your user (whatever you use to log in to Ubuntu):

sudo adduser USER vboxusers

If you want to check to see if you have been added to the “vobxusers” group, you can do this by going to System->Administration->Users and Groups.  Click on your user and then click on “Properties”.  A new window will pop up.  If you scroll to the bottom, you should see a check next to “Use Virtualbox”:

VirtualboxUSB - 06

3) It is important at this point to log out, then log back in.  If you don’t do this, these directions won’t work.

4) Now, start Virtualbox.  Again, I’m not going to give you directions for setting up a virtual machine in Virtualbox.  You can read the Virtualbox documentation for that.  I’m just going to cover the one aspect that I intended to cover in this post: USB support.

A note about Virtualbox is important here.  You can’t change the settings for a virtual machine unless you “shut down” that machine.  That means you can’t just “save the state” of the machine and then try to change the settings.  You have to shut it down, then you can click on the “settings” button.  So, once you’ve got your virtual machine set up and shut down, click on the “settings” button:

VirtualboxUSB - 07

5) Now click where it says “USB”.  You’ll get this window:

VirtualboxUSB - 08

Simply click on “Enable USB Controller” then click on “Enable USB 2.0 (EHCI) Controller)”.

Then, click on the top button on the right (with the blue circle).  This is an empty filter.  You don’t need to name it anything at all, just add it.  Then hit “OK”.  There you go, it should work.

Now, start your virtual machine, and at the bottom right you should see a little USB icon.  If you right click it, you should be able to pass anything connected to your Ubuntu machine’s USB ports through to the virtual machine:

VirtualboxUSB - 09.5

VirtualboxUSB - 10

A couple of notes:

First, if you install the Virtualbox Guest Additions, you don’t have to send your USB mouse and keyboard through to the virtual machine – they will work fine between the Linux OS and the emulated OS.  In fact, if you do click on the box to send them through, what will happen is that they will stop working in the Linux OS and will only work in the emulated OS, so don’t do it.

Second, if you have a printer that worked under Windows but doesn’t work under Linux (e.g., the HP LaserJet 1000, which apparently has the world’s worst driver), this is a good but cumbersome way to get that printer to work.  Yeah, you basically have to send everything through to the Windows OS using the networked folders, but you can get your printer to work this way.

Categories: technology Tags: ,

Ubuntu: How to Automount Internal NTFS Drives

August 13th, 2009 No comments
Number of Views: 25

For most new users of Linux, automounting an internal NTFS drive is probably not a concern as you’ll just have one hard drive and it will be reformatted to either EXT3 or EXT4.  But for people who dual boot Windows and Linux, like I do, being able to mount the NTFS formatted drives in your computer under the Linux operating system is often very important.  While Windows won’t recognize EXT3 or EXT4 formatted drives, Linux does play nice and will recognize the NTFS drives.  However, it does not automatically mount them.  It automatically recognizes them and makes it easy to mount them, but unless you add some functionality, it won’t automatically mount them, making them regular drives.

So, if you want to automatically mount NTFS formatted drives in Linux, here’s how (based on this site):

1) Make sure Ubuntu recognizes your drives.  You can do this by simply opening your “Computer” from the “Places” menu.

automount NTFS - 00

2) You should see your NTFS formatted drives, but they will not be mounted (they will be missing a little upwards facing arrow that indicates they are not mounted):

automount NTFS - 00.5.1

3) Make sure your system is fully updated by typing the following in a terminal:

sudo aptitude update

You can also do this by selecting “System->Administration->Update Manager”.

4) Then open a terminal and type:

sudo aptitude install ntfs-config

automount NTFS - 01.4

You can also do this using the Synaptic Package Manager “System->Administration->Synaptic Package Manager”.

automount NTFS - 01.5.5

5) Now go to “System->Administration->NTFS Configuration Tool”.

automount NTFS - 01

6) Once the new window opens, click in the box next to the drive you want to automount, then hit “Apply”.

automount NTFS - 02

(Note: You can change what the drive is called by clicking where it says “<Click here to set a mount point>” and giving the drive a name.)

7) You’ll get one more prompt before you’re done, a window asking you if you want to:

Enable write support for internal device

Enable write support for external device

automount NTFS - 03

I selected both of them.  Then hit “OK”.

That’s it.  Now, whenever you start your computer, the drives should automatically mount.

For people used to Windows, your newly mounted drives should pop up on: (1) the desktop, (2) in your places.  But if you want to see where they are relative to your File System, go all the way to the root folder (mine is simply “/”) and look under “media”.  Inside the media folder you should see all of the mounted drives except the one that is running Ubuntu (your boot drive).  All the other drives are accessible from that location.  This is particularly good to know in case you use a different file explorer, like Krusader.

Something else I’ve noted using NTFS drives under Ubuntu… While the drives do automatically mount and you can read and write to and from the drives once you’ve done the above, Ubuntu does not have the ability to delete files from NTFS drives like it does from EXT3 or EXT4 drives.  What I mean by that is that, when you delete something from one of those drives, Ubuntu does not put the files in the trash, allowing you to recover the files later.  If you delete it, Ubuntu will show a prompt telling you that it will delete it forever.  So, be careful when it comes to deleting stuff from those drives because they are gone for good.

Categories: technology Tags: ,