Archive for the 'Linux' Category

Heartflix

I’m a big fan of Netflix’s recommendation algorithm, and have often used it for deciding on movies on TV as well. For years I have always clicked screen by screen on my DVR and entered the movie titles in to Netflix’s search box on my computer and used it’s predicted rating to help plan out my recordings. I’ve long wished there was some mash-up application that could make it easier, but was never really up on JSON and things like that to dig at Netflix’s site. Oh and something about it being against the Terms of Service. But I needed a change of gears the last few days and went to town.

Heartflix

This is just a proof of concept and certainly not the final UI. I was envisioning something Muine style with box art and such as well, but went for a quick and dirty Gtk.TreeView UI to test it out. The yellow stars are movies I’ve already rated, and the red stars represent Netflix’s predicted rating, or average rating of everyone’s vote if a prediction is not available. The heart denotes if it is a recommendation, and the arrows correlate to the predicted rating being higher or lower than the average rating. I’m also collecting if the movie is available on Netflix’s Watch Instantly service but I couldn’t find an icon I was happy with to throw it in the UI.

Behind the scenes I’m using Banshee’s excellent (in development) Hyena.Data assembly for managing an SQLite database. I was really impressed with how reusable it was, and it saved me a lot of time. I intend to dig into Hyena.Gui at some point as well. There is some cool stuff there, but it may be overkill for Heartflix.

I started with HDNet Movies since that was what I am most interested in, but I’ve tried to make the core classes generic enough that it will be easy to add other data sources. Right now I am comparing by title, year, and MPAA rating to ensure an exact match. Nice and simple. I looked at HBO’s site and unfortunately they do not appear to provide a year in their listings, but they do provide a director entry. So it looks like I may have to make it easy to match actors and directors as well.

Content Aware Image Resizing

So say you want to include embed an image into your web page, like this one of my dad taken by my step-mom:

It’s not a bad image, but doesn’t quite have the same impact in this scaled down form factor. It would be nice if you could make my dad a little bit bigger. You could crop the image but then you lose the interesting expanse of the background. There is another technique… called content-aware image resizing that performs seam carving on the image. You might have seen the video created by the algorithms creators a while back. Since their paper was published various implementations have cropped up, including this Liquid Rescale plugin for GIMP by Carlo Baldassi. It works much like you would expect; create some additional layers with masks for important and unimportant features of the image, pick a target size, and go.

By not being too aggressive this is what I came up with:

I messed up the mask on his left foot so it started to distort and there is still a tiny trace of red from the date. Obviously this totally changes the aspect of features if you scroll and compare the two images, but that’s not important here. The goal is to produce an image for the target size (in this case 474 pixels wide) while maintaining the features and important information of the original image.

It works in the reverse direction, too:

It’s really fun to play with and it’s Free/Open Source Software, too!

Making Internet Radio Pretty

Aaron Bockover has been working on a nice patch for Banshee that allows for better parsing of the title metadata found in most shoutcast/icecast/etc internet radio streams, such as those from SomaFM.

The neat thing about this is that the data is properly guessed into artist and title, and the Metadata Searcher Plugin takes it from there to figure out what the album name is and retrieve it’s cover art. This also allows the Recommendations Plugin retrieve proper data from Last.fm for the panel across the bottom.

gbrainy - Brain Age for GNOME

Jordi Mas has begun the roots of a Brain Age type game for GNOME called gbrainy. It’s a logic puzzle engine only at the moment but it’s hopped it can evolve into a more complete brain training game with arithmetical puzzles, memory puzzles, and color puzzles. He released version 0.1 yesterday and it’s looking great. It certainly could use some polish but it’s an exceptional start after a few weeks work. I look forward to contributing to this project as it evolves. It’s built using Mono, C#, and Cairo.

Screenshot-gBrainy-1

Western Digital My Book icons for Nautilus desktop

This evening I decided I didn’t really like the generic USB Hard Disk icon my My Book Premium Edition created on my GNOME desktop when plugged in. I found a few images online and took a photo of my own to make some. I figured I’d share them here since my first inclination was to search and didn’t find anything to my liking. Here are mine as transparent PNG files.

mybookicons

My Book 1 My Book 2 My Book 3

Enabling Remote Desktop in XP Home

(This is a rather technical post so feel free to skip this if the title means nothing to you)

I had a dilemma last night. I was linked to this great article by someone in ArsTechnica’s #linux on setting up SeamlessRDP to my VMWare Windows XP installation to achieve an effect similar to VMware Fusion’s Unity on Mac OS X. The problem is that I soon found out that Remote Desktop is disabled in XP Home Edition, only to be enabled in XP Professional.

It took a lot of digging around but I was eventually able to figure out how to get this enabled. So here is my guide on how to enable Remote Desktop in Windows XP Home Edition. Just a heads up that this was important to me because of RDP’s ability to launch specific applications for seamless integration into my Linux desktop, if you don’t need this and just want a full desktop window, one of the free VNC solutions might be better for you (TightVNC seems popular).

The first thing is to trick the installation into thinking that it’s actually XP Pro. I found this information here. Before doing this it might be best to make sure your install is already set up with Service Pack 2, etc.

  1. Navigate the Windows registry to HKEY_LOCAL_MACHINE/SYSTEM/ControlSet00X/Control/ProductOptions (where ControlSet00X is the one with the highest number) and delete the “ProductSuite” key.
  2. Create a new DWORD key in this same folder called “Brand” and set it’s value to 0.
  3. Reboot Windows. At startup mash F8 to bring up the boot options and choose “Last Known Good Configuration”.

After some hard disk churning you will be back to your welcome screen or desktop. You can then go to the System control panel and see that you now have a Professional Edition setup. This is great so far but unfortunately doesn’t actually install all those professional features.

Now I needed to get Remote Desktop to accept incoming connections.

I found this batch file on a forum post. It’s easy to follow; it basically creates a .reg file with the required keys, merges it, and does a reinstall of terminal services. After a reboot you should now see Terminal Services alive and well in the Services Administrative Tool. A “netstat -a” in the Command Prompt should show port 3389 as listening. At this point I was able to connect to my server but was getting disconnected immediately. After some more digging I found a replacement termsrv.dll that was actually from a Service Pack 2 beta but did the trick for me. Follow the instructions there or here (it must be replaced in safe mode). You might be interested in the registry edits mentioned in those posts as well for concurrent users.

I don’t know how much of this was necessary but after all this tinkering last night I am now able to Remote Desktop with success to my XP Home installation. Yay! One more thing… make sure you have a password associated with your Windows user!

Whole Foods, Condo, Linux.

  • It looks like Whole Foods has finally broke ground on their new store here in Orlando. It will be at the intersection of Sand Lake Rd and Turkey Lake Rd. About 7 miles up the interstate from here, not too bad!
  • The latest word on closing date for the condo is “mid-January” now. It was supposed to be November 1st, then “by Thanksgiving”, then December 1st, then December 15th, then “by Christmas” and now… mid-January! I’m not putting too much faith in that one either. Our “rent” in the current unit is going 100% as a deposit towards the purchase price before we even finance, which is nice. But I still would like to be in there…
  • I get giddy like this during the development cycle of every Ubuntu release, but Ubuntu 7.04 is going to rock. It’s mostly because I’ve been intimately involved with so many projects this time around, but 2007 is going to be the year of Linux on the desktop. Seriously this time.
  • Thanks to my dad coming to town for Thanksgiving, my kitchen is now pimped out. I’ve got a nice gadget set going, new flatware, new dinnerware, and all new stainless steel cookware. Rawk.

A good month for open source software

This past week has seen the release of Mozilla Firefox 2.0 and Ubuntu 6.10. A warm kudos to all the contributors who helped make these releases a success.

The last few days I have been working with Bastien to fix some Mozilla plug-in bugs in Totem that have been annoying me for a while. Especially in adding the features required to get some embedded video on some sites I’ve been frequenting lately working. Just about all the video links I can find on Around Central Florida now load properly. The traffic videos still do not work but I believe there is GStreamer backend work to be done there. While I was focusing on particular Central Florida news sites, the same fixes will likely help an exponential number of sites using similar embedding methods work better as well. Unfortunately these changes probably won’t get merged into the 2.16 branch so folks will have to wait until GNOME 2.18 or a try a 2.17 development release. But I’m excited that we are already on the way to a release that will really make Totem and it’s Mozilla plug-ins shine.

MPlayer on widescreen displays

An annoying issue with MPlayer is that it does not do runtime detection of the display’s aspect ratio. It always assumes 4:3. This makes videos stretched when played full screen on my 16:10 widescreen notebook. I recently discovered the monitoraspect= configuration option.

I added monitoraspect=16:10 to my ~/.mplayer/config file and now videos are properly scaled!