20080928

Ubuntu Photo Frame


About two years ago I converted an old laptop into a photo frame for the living room. There are plenty of examples of how to do this floating around on the web these days, so I am not going to cover that here. What I am going to talk about are the software aspects of this project, and my recent upgrade of my photo frame.

The frame had been working fine for almost two years, but a few months ago I upgraded my WiFi network at the house to WPA (finally), but that meant that I could no longer transfer files to the frame because the WiFi card I was using in it only supported WEP. Shortly after that, the frame started acting strangely, turning itself off about once a day, then finally not booting at all with the infamous “missing file” messages you get when Windows can't read the hard drive correctly.

The original software setup for this project was Windows 2000 with a small .NET application I wrote to scan a directory and display pictures from it. When it was time to display the next photo, the program would scan the directory and pick a new picture at random to display. The laptop hardware did not have enough “horsepower” to handle any kind of transitions or fades between photos, so the program just displayed the next photo on the screen without any transitions.

I brought the frame back to my cave, where I confirmed that the hard drive had indeed given out. I ordered a SYBA SY-IDE2CF-NB25 Ultra IDE to Compact Flash Adapter from StarSurplus, and with a 4GB Compact Flash card I had laying around, I now had a solid state hard drive for the frame. I also ordered a EDIMAX EW-7108PCg 802.11g/b Wireless LAN PC Card from NewEgg to allow WiFi access to the frame again. I selected this card because it is well supported under Linux and it is very inexpensive. Now that I had all the hardware ready, time to re-install the software.

I wanted to use Ubuntu for this project, because I am familiar with it, and this would give me an opportunity to learn about doing a very minimal installation. My goal was to use as little space on the flash drive as possible for the OS and supporting programs to leave room for photos. After a few practice runs setting up the system and trying different programs, I came up with the following recipe.

First, I installed Ubuntu Server, with the OpenSSH and Samba options. The server edition of Ubuntu doesn't install any kind of GUI (just a command prompt) and none of the heavy applications like OpenOffice, Evolution, etc. Then I got the Wifi card working (it wasn't detected during setup) and performed an upgrade to make sure I had the latest security patches. I setup Samba to allow access to the folder containing the pictures to be displayed. Next I apt-get installed xorg, dnotify, and feh. feh is a small, lightweight image display program for X. While playing around with different configurations, I discovered that even under Ubuntu, this laptop just didn't have what it takes to display transitions between photos, and so feh fit the bill almost perfectly.

I tweaked the xorg.conf file to prevent it from blanking the screen (I think it defaults to blank after 10 minutes), copied some photos to the frame, and fired off feh using xinit. And my photo slide show started up! The only problem with feh is that it only reads the files in the directory when it starts up, so if I add pictures to the directory later, I would have to restart the program in order for them to be shown. So I created the following script using dnotify to restart the program whenever any files in the folder have changed.


#!/bin/bash
export HOME=/home/teknynja
while true; do
killall -q feh
sleep 1
xinit /usr/bin/feh -rzFZD180 --hide-pointer /home/teknynja/Pictures &
dnotify -MCDRro /home/teknynja/Pictures
done

I made the script executable, and added a line to invoke the script from inside /etc/rc.local so that it would run when the system started up. After a couple of days of testing in the cave, I put everything back together and it is now back in the living room, displaying our family photos once again. It also has the added bonus of being completely silent, due to the solid state hard drive. The total space budget on the flash drive was 645MB for the OS and supporting programs, leaving around 3GB for photos, which is more than enough for now.

Once again I warn the readers that I still have a lot to learn about Linux, so any constructive comments are appreciated. If you have any questions or would like more details about this project, feel free to leave a comment and I will try to help you if I can.

Read More......

20080908

Obscure Ubuntu Tip: CRON User account has expired

No, I haven't forgotten that I have a blog. I've just been keeping busy with a lot going on at work, and a backlog of “projects” at home after finishing up the kitchen project. Some of those projects have involved getting down-and-dirty with Ubuntu, and I thought I would share a quick tip I discovered yesterday.

I was looking through the system log (/var/log/syslog) on one of my servers and I noticed it was full of “CRON[xxxx]: User account has expired” messages. A little searching on the web pointed to the fact that the root account had been locked. While setting up this server, I had followed some instructions I found on the web that required me to unlock the root account, then re-lock it when I was done with the

sudo passwd -l root
command. Locking an account this way also causes the password to be expired, one of the results of which is the above mentioned log entries. Most of the solutions I found on the web involved either unlocking the root again and giving it a long, random password, or manually editing the password files. I think I've found the correct way to fix this though, by using the
sudo chage -E-1 root
command, which sets the root's password to never expire. (Note that the -1 is negative one, not dash L). After using the above command, the system log showed normal CRON log entries, and the root account remained locked.

I hope someone else will find this information to be of use. That's it for my very obscure Ubuntu tip. Join me again soon for another exciting post. I actually have a good sized list of topics to cover on the blog, so hopefully things will settle down and you will hear more from me soon. Thanks for stopping by!

Read More......

20080629

Picture Perfect


This past Father's Day I received a shocking but pleasant surprise – a shiny new Canon SD870IS ELPH point and shoot camera! The shocking part was due to the fact that my wife never buys technology for me, because I am so picky about my gadgets. The pleasant part is because I've been looking to replace our old SD200 that we've had for years. We both loved that camera because of it's small size, ease of use, and fast response time (when you have two fast-moving little ones, it helps to have a camera that can capture an photo right when you press the shutter release). We've also shot hours of video with the SD200, because even though we have a nice Sony camcorder, we never feel like lugging it around with us. The video quality is more than acceptable and it allows us to capture moments we would never have been able to with something larger. The SD200's 3.2 mega-pixel sensor worked fine for the kinds of shots we take.

So enter the SD870IS. The coolest feature about this camera is the “IS” at the end – Image Stabilization. For normal shooting it helps eliminate blur and even works on the large, bright 3” screen. (I was always jealous of other camera's big screens when all I had was the SD200's 2.5” screen). But the stabilization really comes in handy for shooting video. With such a small device, shaking is always a problem on video. The old camera's video always had a lot of shake and could be annoying to watch sometimes, but this new camera shoots nice, steady video that is wonderful to watch! And for photos, the 8 mega-pixel sensor allows us do more with printing and cropping than we could ever do before.

Over the years since the SD200 was introduced, Canon has added tons of cool little features to the software, too numerous to mention here, but several new shooting modes, and auto adjusting the image orientation while reviewing images are a couple of them that I really appreciate. The SD870IS still has some of the same issues as it's older cousin, most notably it's mediocre low light performance But overall, I am excited to have this cool new toy to play with, and I'm no longer lusting over the other cameras I see when we take the kids to Disneyland! Thanks Honey!

Read More......

20080617

Video Sedation


During one of Woot's last “Woot-Offs”, I picked up a couple of Sansa E250 media players for the kids to watch videos on when we need them to be calm and quite (like during visits to Ikea). They each already have a Sansa Shaker loaded with their favorite songs (Tucker seems very fond of his blue “radio”), but video is a much more effective way to keep them “sedated”. In the past, I used my T-Mobile MDA with several hours of their favorite movies loaded on it to keep them occupied – but they both had to share the screen and I didn't like the idea of them fondling my phone and possibly dropping or otherwise injuring it.

For $30 bucks each during the woot-off, I figured I couldn't go wrong, so I ordered two of them. I quickly discovered that the built-in firmware for these players could only handle video encoded using Apple Quicktime DLLs that I have so far managed to keep off my system. Plus, the compression of the supported format was so bad that I could have only put a few minutes of video in the limited 2Gb of memory the devices contain.




Here's were Rockbox saves the day. Before I pressed the shiny “I Want One” button on Woot, I did a little research and discovered this project and found it supports the players I was about to purchase. I went ahead an placed my order for two, then within hours of their arrival, I had the Rockbox firmware installed on them. I played with the software, tweaking the many settings and options the firmware provides.

Finally it was time to put some videos on the devices. It took a while to figure out the optimal encoding options for these devices, but after playing around for a few hours I arrived at the following settings:






























Video Encoding Format MPEG2 (RockBox only supports this for now)
Video Resolution 224x176
Video Bitrate 192 kbps
Video Frame Rate 25 fps
Audio Encoding Format MPEG-1 Layer 2
Audio Samping Rate 44100 Hz (other samping rates break mpeg 2 compatibility)
Audio Bitrate 64 kb/s, Monophonic


Although this results in some serious visual artifacts, this is perfectly fine for the kids to watch (they haven't complained yet!). These settings allow me to cram several hours of video onto the players. The only thing I haven't figured out yet is how long the batteries last during video playback – the longest stretch of time the kids have watched the devices is about 90 minutes during a drive back from Grandma's House.

I figured I should share this little tip in case anyone else needs to administer some “video sedation” of their own while out in the world. As always, any tips and suggestions are always appreciated in the comments.

Read More......

Kitchen Mod Update


Sorry I haven't been posting in a while, but once I got started on the kitchen, every free moment after work was devoted to it. I finally finished all the tough stuff last week, all that's left to do is convert a can light in the ceiling to a hanging lamp that Kelly picked out at Ikea (where else?) The granite people came out last week and attached the sub-tops and made templates, but we are still waiting for them to contact us so we can choose the layout. But even with just the sub-tops (read plywood), life with an island in the kitchen is much better. You can see more details on our kitchen project on Kelly's blog at IkeaFans. It isn't up to date with the latest pics yet, but you can get an idea of what I've been up to the last few weeks.

Read More......

20080502

Vintage TV Mod, Part III

Last time, I mounted the LCD display to the front panel and got a pretty good looking test out of it. Now it's time to put the computer electronics and knobs on this thing. First up, I built up a bracket to hold the hard disc and CD-ROM drive. This arrangement turned out to be nice and stable, and allowed me to use a vibration dampening 3.5” to 5.25” drive adapter kit to help keep the hard drive quite. I then mounted the drive cage, mother board, and power supply to a piece of 1/4” MDF that I had pre-cut to fit inside the cabinet where the old chassis used to be, making sure to leave room for the LCD monitor. I used a large, quite Zalman CPU fan to keep noise to a minimum. Once everything was mounted to the sub-panel, I placed it inside the cabinet and screwed it down. Next, I built a small shelf for the bottom half of the cabinet where the speakers would sit. A couple of lengths of aluminum L channel span the width of the cabinet, and a small piece of MDF forms the shelf. I purchased a cheap 2.1 Logitech speaker system, and screwed the speakers to the shelf, facing out through the old speaker grill. I put a piece of black electrical tape over the power lamp to keep it from showing through the grill cloth.

Next, I purchase some potentiometers from the ultra cool surplus store Electroncs Goldmine, three with a momentary push switch feature, and one dual potentiometer to be used as the volume control. Two of the potentiometers were just dummys to hold the knobs, although they could be used for something in the future. The remaining switch-pot was wired up to the power switch connections on the mother board, so I could turn the computer on and off by simply pressing the knob. The dual potentiometer was wired up as an attenuator with a standard stereo 3.5mm plug on one side, and a 3.5mm stereo jack on the other side. The plug then connected to the line out on the mother board, and the speakers plugged into the plug on the other end. Now I have a nice physical volume control, just like the original set! I had to grind off the back of the volume knob to get it to fit onto the short shaft of the audio pot, but the other shafts fit perfectly into the original knobs that came with the tv. I used short pieces of aluminum L channel to mount the pots to the front panel, then adjusted the depth of the shafts using the nuts to get the knobs just the right distance from the front panel.
Once I had all the mechanical aspects taken care of, I mounted a power strip to the under side of the chassis shelf and plugged everything into that, so I would only have one cord leaving the cabinet. A WI-FI card was used for the network connection, and a wireless keyboard and mouse was added, so that only only the power cord came out of the back of the TV. As a final touch, I mounted an amber LED at the bottom of the cabinet where the old power lamp used to be, and drove it off the Power LED connection on the motherboard. I tracked down old Indian Head test pattern for the desktop wallpaper, and it was done. The kids have watched countless movies and hours of TV on the set via the SlingBox, and an old, broken TV was given a new life.


I hope this project inspires others to take the plunge and put computers in other unexpected places. If you do, post a comment or send me an email to let me know about it.

Read More......

20080426

Ubuntu 8.04 Hardy Heron Synergy Client Setup

In the Teknynja cave I have a MS Windows XP box with two monitors (my main development system) and a Ubuntu box with one monitor (my Internet offload system). I use Synergy to control the Ubuntu system using XP's mouse and keyboard. Since the Ubuntu box doesn't have a keyboard or mouse connected to it, a little hacking is required to get the Synergy client running before the login screen. I've been doing this with my Ubuntu 7.04 system for a while, and now that I am setting up a replacement Ubuntu 8.04 system, I thought I would document the Synergy client setup for future reference. It should be noted that I installed Ubuntu Hardy Heron from the Alternate CD, but that should not make a difference for this procedure. I also assume that you already have the Synergy keyboard/mouse server configured and running somewhere on your network.

First, install Synergy on the Ubuntu system using:

sudo apt-get install synergy

Then edit the gdm initialization file:

sudo nano /etc/gdm/Init/Default

and add the following lines just before the “sysresources=/etc/X11/Xresources” line

/usr/bin/killall synergyc
sleep 1
/usr/bin/synergyc xxx.xxx.xxx.xxx

where xxx.xxx.xxx.xxx is the IP address of your server machine.

Now edit the gdm pre-session file:

sudo nano /etc/gdm/PreSession/Default

and and the following line just before the “XSETROOT='gdmwhich xsetroot'” line

/usr/bin/synergyc xxx.xxx.xxx.xxx

Make sure the Synergy server is configured and running on your keyboard/mouse system, and reboot the Ubuntu system. You should now be able to move the mouse over to the Ubuntu screen and login normally.


Note that I still consider myself a Ubuntu/Linux noob, and so any improvements/comments/suggestions you have about this post are greatly appreciated. Ymmv. Most of the help I needed setting up this configuration came from the Ubuntu Synergy How To page.

Read More......

20080425

Vintage TV Mod, Part II

In our last installment, I gutted the old television cabinet and prepared it for the updated electronics. This time, I'll cover the real heart of this mod, the LCD display.I removed the old CRT bezel from the front panel of the TV, because even though it would have looked cool to have an old-fashioned round screen, it would have covered some of the essential parts of the display, like the menus and title bar controls. I had an old 15” LCD monitor sitting out in the garage after I updated to a wide screen monitor on my workstation, so I grabbed it and checked to make sure that it would remember its power state when the AC was removed – I didn't want to have to be constantly pressing a button to turn the monitor on.After verifying that that the power worked as needed, I disassembled the monitor case and removed the screen and electronics. I then used some standoffs to mount the control buttons on the back of the monitor, so I would be able to access them from inside the case once it was mounted in the cabinet.The actual display panel was a little bit smaller than the glass opening at the front of the TV, so I found a simple black picture frame to act as a bezel and mounted it to the front panel. I was then able to use the original mounting tabs on the LCD panel to attach it to the picture frame.You could still see a little of the metal frame of the LCD panel inside the frame, but it didn't look too bad, and I'd rather be able to see all the pixels on the screen anyway.After getting everything mounted and placed back into the cabinet, I connected it up to power and a PC to see what the display would look like. Of course, I had to try out an old black and white movie on the newly mounted screen – the effect was rather convincing! Next time, on “This Old TV”, I'll show how I put the knobs back on and made them functional, as well as the replacement speakers for the set.

Read More......

20080420

“Time” to Geek

One of my wife's friends traveled to England a few weeks ago, and brought back a special item that I requested. Just in case my status as a geek was in question, this item should eliminate any doubts. The item is my newly acquired Doctor Who 2008 Calendar.I know, the year is already a third over, but I've been eying this calendar since before Christmas. The only reputable place I could find to order it online was Amazon UK, but the shipping was just too much. So when my wife's friend asked if there was anything I wanted when she went to England, I didn't hesitate. I have been a fan of the show since I was a young boy, watching episodes on Saturday mornings on the local PBS station, sometimes with my dad.
They say you imprint with your first doctor, which for me was Jon Pertwee, but my favorite doctor is actually Tom Baker, with his arrogant, Sherlock Holmes style. There is plenty on the web written about Doctor Who and all the doctors, so I won't try to cover that ground again here. The original series ended in 1989, but a new series started up again in 2005, and I still look forward to each episode. I am also a big fan of the spin-off series Torchwood, which is a great show in it's own right. Torchwood is a bit too adult for my little girl, but another Doctor Who spin-off, The Sarah Jane Adventures is aimed at the younger set and usually keeps my daughter on the edge of the couch. And in case the whole Doctor Who thing doesn't cement my geek status, ask me to talk about Red Dwarf or Blake's Seven some day.

Read More......

20080419

Vintage TV Mod, Part I

I've had this old 1943 RCA/Victor television set kicking around for many years now. When I first got it, you could actually watch tv on it, but after a year or so, it stopped working (probably desperately in need of a complete capacitor replacement). For years I was gonna do that as a project, but never got around to it. The set was used mainly as something to set knick knacks on for a long time until I finally had an idea – I would turn it into a meda pc for the kids. In the long run, it would probably be less work than fixing the old TV, and via my Slingbox, we would still be able to watch TV on it!


First, I needed to gut the cabinet to make room for the new components.

These old TV's were built to be serviced, so getting the chassis out was simple, although I used a little extra caution around the old picture tube. I didn't want it imploding all over me, and I might be able to sell it on eBay some day.

Once gutted, I removed the front bezel and did a little repair to the side panel of the cabinet, which had come loose at some point. I guess I could have attempted to restore the case since it is so scratched up, but since this was going to be used by the kids (and because I am very lazy), I decided to leave it in it's “vintage” condition. In my next post, I'll cover getting the new LCD installed in the set. Stay tuned!

Read More......

20080413

Mod Home Mod


Well, it's official. I'm gonna have to bust out my home-hacking skills. My wife and I have finally ordered the cabinets for our kitchen remodel. We've been planning to do this for over a year, but a long series of life events kept pushing it back. But last Friday, we finally dropped off the kids with some friends, drove down to the San Diego Ikea, and spent about an hour building the order once we got there.

Of course, I have a few rants about this whole process. First, I've been using the Ikea HomePlanner software to design and layout our kitchen. This has to be one of the most frustrating pieces of software on the planet! First off, it puts several artificial limits on how you can place items in the design. For example, do you want to stack cabinets on top of each other? Sorry! Well, there are a few workarounds you can use to try and get close to the layout you want, but they aren't very intuitive and still don't always give you the results you are looking for. Next up is the fact that some items in the catalog can't be configured with all of the available colors, so the parts list has the wrong color called out for some items (along with the rendering not looking right). Add to that the fact that even on my quad-core machine, it would take a 10-15 second nap every minute or two (I assume it was making some kind of backup) forcing you to wait and wait and wait. And those backups were definitely needed, as about once each session, it would just completely crash! I know what you are thinking, just another noob with some bizarre hardware/software configuration blaming the software for weird behavior – but I ran this app on several different machines, all with the same behavior. And at IkeaFans, there are plenty of tales of woe about this program. Many have given up on it all together and use Google Sketchup instead.

So after wrestling with the software, I finally save off a file to my USB flash drive, remembering that they have several customer PC's in the kitchen section of the store running the planner software. We we arrive at the service desk, our Ikean asks if we have our plans from the designer and I say, “Sure, right here on this flash drive” to which he responds “We can't access flash drives from here.” WTF? Fortunately, my wife suggested printing out the plans just before we left, saying not everyone was as technically inclined as the Teknynja – I told her “Everyone uses flash drives.”, but printed out the plans just to be on the safe side. I should just know that she is always right, and not even argue with her. There is also the option to upload your plans directly to Ikea, but I was too lazy to create an account just for that! This is apparently the only way to get your plans to Ikea for ordering. It would be nice to know that before driving an hour to get to the store.

Anyway, the cabinets should get here in about a week, and then we have a couple of weekends of other obligations before I start tearing out the old kitchen, fixing up the walls, and start building and installing cabinets. I get to dust off my mechanical and woodworking skills for a little physical, real world hacking. I'll keep you posted if anything interesting happens during this project.

Read More......

20080408

Have Mercy On Me

I usually have a couple of hours to kill during my commute to and from work each day, so I end up listening to a lot of podcasts. Today, on the way home I was listening to the latest from the Ethical Society of St. Louis. Each of their platform addresses inspires me to think a little more about how I go about living life, and I find the leader of the society, Kate Lovelady, conveys her thoughts and insights about ethical living and ideals in an entertaining, yet thought-provoking manner. This week was the conclusion of her two part series, “From Vengeance to Mercy”, where she addresses some of the over-arching elements of our society and how they cause us to diverge from a more ethical community. I recommend these two addresses to anyone who would like a better understanding of forgiveness and mercy. And for a weekly dose of thought-provoking, insightful, and interesting topics relating to ethics, subscribe to the whole feed. I sure wish we had an organization like this around these parts!

Read More......

20080407

Waiting for Heron


The countdown to the release of Ubuntu Hardy Heron is on here. I've had a couple of ex-windows boxes sitting around for the last couple of months, hard drives all cleaned off in preparation. One of them used to be my main work machine at home, a 2.5Ghz P4 w/3G RAM, and the other was my home theater box running a 2.4Ghz hyper threading CPU with 2G of RAM. And while the HTPC's replacement system, a 2.6Ghz Dual Core is now happily running MythTV over Ubuntu, the Quad-Core workstation replacement is still booting Windows XP (as my bread and butter is .NET development).

I've been playing around with Ubuntu for a little over a year now, and although I still consider myself a Linux noob, I feel pretty comfortable working and playing on those machines. I have an older Pentium II machine sitting under my desk next to my workstation running Ubuntu with its monitor sitting next to my Window's two monitors, sharing the keyboard and mouse via Synergy – so I have quick and easy access to a Ubuntu box for experimentation. I also have a headless Ubuntu box in the garage streaming a distant radio station, so I can listen to it anywhere I have net access – at home, at work (about an hour commute from my house) or on the road via my MDA Smartphone. I also have a very old laptop with Ubuntu on it, but I hardly use it since it is so underpowered anyway.

So when Hardy Heron is released on 24-Apr-2008, I'll be loading it onto my old workstation and replacing the Ubuntu box under my desk, and playing with all the latest wiz-bang Compiz graphics. As for the old HTPC box, I will probably do a case transplant to move the hardware into something a little less cramped, load Ubuntu on it, and set it up for my wife, who is currently running on an old Win2K box. And what I am going to do with the two old boxes I free up? I'm not sure right now, but I'm almost positive they will be running Ubuntu as well!

Oh, yeah – welcome to Teknynja, and if you have any questions about the projects going on around here, please feel free to ask!

Read More......
 
Template design by Amanda @ Blogger Buster