This page chronicles my latest project: turning a laptop into a digital picture frame as a gift for my Mom’s birthday, and another for myself. Lots of other tinkerers have built their own systems, sure, but what sets mine apart is that it downloads new photos from my website every night.
- No custom software
- Wirelessly downloads new photos posted on a remote server/web site.
- Remotely accessible (via ssh) for maintenance (even through a firewall/router).
First order of business, of course, is to find a laptop. Having not done this before, I didn’t want to risk destroying anything modern. In fact, I didn’t want to risk destroying anything semi-modern. So I set out in search of a laptop under $100. I limited myself to Dells because they seemed to be the least expensive and also have some of the best community support for Linux. I found the perfect laptop using the classifieds search engine Oodle. Oodle is great because you can enter your exact search criteria (i.e. a Dell laptop under $100) and it will send you an email when one shows up. Within a few days, I got the email and bought a Dell Inspiron 3500 for $75. The laptop was old but in great shape minus a few skin-oil stains on the screen (common with the Inspiron 3500).
Now that I had the computer, it was time to figure out how to get it into a frame. In order to know that, I first had to dissasemble it. This is a bit harder that it might seem. These things are a bit tricky to get apart without breaking everything.
Here I’ve separated all of the parts and removed all of the plastics.
Moment of truth: make sure it all still works. I’ve never been so happy to see the DELL logo.
Now, on to finding a frame. First I needed the screen and laptop measurements. Measuring the screen’s outer dimensions was very straightforward. The motherboard was a bit different. By itself, it was about 12″ wide. With a Orinoco silver wireless card sticking out and the power cord, one side was an additional 1.5 inches longer. Because of the way the screen’s ribbon cable is, the motherboard must be centered almost exactly behind the screen, so I needed a frame with an inside diameter about 15″. Furthermore, the frame needed to be deeper than normal to have room to mount the motherboard without sticking out of the frame too much.
I wandered around the nearby art store looking for not only for the perfect frame but a way to mount the easy mount the LCD exactly where I wanted it. I found this frame which fit all of the criteria. It is a bit on the cheaper end, but that wasn’t necesarrily a bad thing. It also had a plexiglass front, which isn’t exactly what I had in mind but it did make breakage in shipping a non-issue. So again, not a bad idea.
Now to mount the screen. Seeing quite a selection of foam-core in front of me, I thought back to my Stanford EE118 days and realized I had my answer. Foam-core is very light, surprisingly strong, and easy to work with. I bought a sheet that was closest to the depth of the screen, which turned out to be slightly less that the screen’s depth. It was more than half, though, which I thought would be sufficient.
Using an Xacto knife, I cut a piece of foam-core to fit inside the frame. Then I made another cut-out to fit the screen (it took a few tries since I purposefully started too small). I put the foam-core in the frame, then dropped the screen in place.
Screen in the foam-core.
Mounting the motherboard was the toughest part, and it will be a different design for every laptop. For the Inspiron 3500, I picked up a few L-brackets atÂ the hardware storeÂ along with some shallow (3/8″ deep) #6 wood screws.
After dry-fitting everything, I mounted the L-brackets to the frame.
L-brackets mounted to the frame.
Then I drilled holes in the laptop’s plastic (which, by the way, is quite strong) and put a bolt in place.
The bolt goes through the laptop and into the L-bracket. There’s another one on the other side.
Another (smaller) L-bracket on the top held the rest of the base shell in place.
Small L-bracket visible at the top of the picture.
I got a matte cut at the local Cheap Pete’s frames to polish off the look. Here’s the finished product:
Finished frame… booting up!
This one went together a lot easier.Â I’m not sure if that’s because everything just came together on it or if it’s because I had built one before.Â This laptop used to be a Dell Latitude CPi. The screen is a little smaller, so I was able to cram everything into a slightly smaller frame. Otherwise, construction was pretty much the same as the first one, with a few exceptions:
- The motherboard was a little shallower so I could mount it directly to a piece of wood secured to the back of the frame.
- I used my handy RotoZip to carve out a little extra room for the wireless card and the power plug.
My goal for the software component was to use all off-the-shelf components without having to write anything myself (shell scripts don’t count). All told, the software took as much time (if not more) as the hardware.
First up was the operating system. I knew I wanted to use some flavor of lixux, and I chose Fedora Core 4 because I know it the best and the CD’s were already sitting on my desk.
It installed just fine. I chose the defaults for the partitions, although I’ve since read that perhaps I should eliminate the /swap partition to reduce disk activity. Something to consider. Don’t forget to install the xwin-devel package, as it will be needed later.
Change kernel options to support apci if your machine supports it. In /boot/grub/grub.conf, add apm=off and apci=on to the end of the ‘kernel’ line, ie:
kernel /vmlinuz-2.6.12-1.1398_FC4 ro root=/dev/VolGroup00/LogVol00 apm=off apci=on
Make a user to run the slideshow:
% useradd pixframe
Make a few changes to /etc/inittabStart in runlevel 3:
And auto-login our picture frame user (adjust similar line as follows):
1:2345:respawn:/sbin/mingetty tty1 --autologin pixframe
Edit .bashrc to run our slideshow at startup of tty1 (add this to the end)
if [ `tty` = "/dev/tty1" ]; then
Â ./forever.sh 30
Â ./a-ssh.sh &
Create an ~/.xinitrc as so:
xset s off
./unclutter -root -idle 0 &
./forever.sh 0 ./slideshow.sh
The xsets are to turn off screen saver and to make the LCD not drop into power-save mode after a while of inactivity.forever.sh is pretty simple:
while true; do
Â sleep $1
I used the xv viewer to show the pictures, which worked out really well. The software is only free for non-commercial uses. Download it here. This README turned out to be really important to get it to compile.
Here’s the script to invoke xv repeatedly. The file photo_list is a list, one per line, of the photos to display in random order (hence -random).
#!/bin/bash xv-3.10a/xv -rmode 5 -root -poll -wait 4 -random -maxpect -viewonly -flist photo_list
The a-ssh.sh script attempts to keep a connection open to my colocated server at all times. The -R tunnels local port 22 to the server’s port 2201, meaning I can ssh in to the picture frame for remote maintenance. Don’t forget to set up your ssh keys!
autossh -2 -fN -M 20000 -R 2201:localhost:22 email@example.com
Improvements for the future:
- I would ditch the hard drive and use an IDE-to-flash-memory converter. These cost about $20 and a reasonably-sized SD card should have plenty of memory for a toned-down fedora install and lots of photots.