Friday, December 19, 2008

Build a Digital Photo Display

Hi Everyone,

Here is my latest project, building a digital picture display. It's really just an LCD screen hooked up to a tiny PC running linux. But the cool thing is that this PC has VESA compliant mounting holes that allow you to screw it right to the back of your screen as a single unit.

Note that if you are in Canada and order from the links below, shipping is outrageous. Probably because of duty, since the product is made in the east Asia. I had to have it shipped to a friend's place in Buffalo, NY, and then drove down to pick it up.

I have not mounted the assembly into a picture frame, but I might in the future as it would be pretty easy.

Here is what you will need to put this together:

  1. eBOX-2300 200MHz VESA PC or eBOX-4300 500MHz VESA PC

  2. An LCD screen, mounting holes it the back must be 100 mm apart (17 inch screens and up, usually)

  3. A compact flash (CF) card 256 MiB or greater (the install alone is 156 MB, your pictures will take up the rest of the space). I recommend using a SanDisk brand. I went for a cheap brand and it had problems booting off the card later. The SanDisk card worked very well.

For the setup, you will require the following:
  1. A desktop or laptop PC with a CD burner and the ability to boot from CD

  2. A blank CD-R or CD-RW

  3. A download of the latest Puppy Linux iso (use bittorrent to download it to save them bandwidth, and to get the highest download speed)

  4. A copy of GQView for Puppy Linux

  5. A USB mouse

  6. A PS/2 keyboard (a USB keyboard will work, but you won't be able to access the bios settings because the USB ports are not activated in time)

  7. A flashcard reader

Step 1 - Preparing the Compact Flash Card

  1. First burn the Puppy Linux iso to the CD.

  2. Connect the flashcard reader and insert the Compact Flash card.

  3. Create a "Pictures" folder and an "Install" folder on the Compact Flash card.

  4. Download GQView for Puppy Linux and save it to the "Install" directory on the card.

  5. Now reboot the computer, and start the BIOS configuration.

  6. Configure the BIOS to boot up off the CD (consult your motherboard's manual to find out how), save the configuration and reboot again.

  7. If all goes well, you should see a screenful of pink text. Don't do anything, the whole process continue until you are prompted to select your keyboard.

  8. Then you will be prompted to select a video display setup. Select XOrg.

  9. When you are prompted to select a resolution, consult the monitor's manual and select its native resolution. The ebox PC's have a maximum resolution that they support, so take that into consideration as well.

Step 2 - Install Puppy Linux to a Flash Drive

  1. Connect the USB card reader to the computer and insert the CF card.

  2. Go to Menu (bottom left corner) > Setup > Universal Installer

  3. Select 'USB Flash Drive' in the window that pops up and click OK.

  4. In the next window select the 'Generic USB CF Reader', if you don't see this, use the drive that shows a disk size (see example screenshot). The drive name will show as sdX, where X is another lowercase letter, make note of it. Click OK.

  5. Now select 'Install Puppy to sdX1' (the little dog icon near the top of the window and click OK.

  6. An install verification check will pop up, click OK.

  7. You will be asked where the files are, click CD.

  8. It will ask you to insert the CD, but it will already be installed so click OK. If you have multiple disk drives, you may be prompted to insert the disk again. Switch the CD to another drive and click OK.

  9. You will be asked about the Master Boot Record (MBR) just select 'default DO NOTHING' and click OK.

  10. On the following screen, select 'default JUST KEEP GOING' and click OK.

  11. You will then be presented with a final sanity check in an orange screen. Just press the ENTER key.

  12. You will then be asked if you want to wipe all files, just press ENTER to say NO, do not press any other key.

  13. You will be asked if you want to add the 'pfix=copy' boot parameter. Just hit enter for NO.

  14. Then wait until the installer is finished. The CD will eject. Remove the CD, close the drive, and reboot by going to Menu > Shutdown > Reboot computer.

  15. When prompted to save to file, select NO, we will revisit this later.

  16. On reboot, the computer should boot puppy linux off of the CF drive. If it doesn't, you may need to tweak your compact flash card.

  17. Select the keyboard as before. This time, select Xvesa from the video Wizard, it will look crappy, but will work better with the ebox PC later.

  18. On the desktop, select 800 x 600 x 24 for the video mode and click OK.

  19. Now reboot again as in Step 14.

  20. As it reboots, you will be prompted to create a pup_save.2fs file. Select save. This file saves all the changes we have made including installed files and setting changes. I wouldn't bother creating a customized name, just save using the default one.

  21. When asked about encryption, use Normal, which is no encryption. Encryption adds extra work to the boot up time, which is not needed.

  22. When asked for the size of the pup_save.2fs file, select 64 MiB if you are using a CF card less than 1 GiB, use 128 MiB if it is over 1 GiB.

  23. Then click Save and the reboot will complete. You won't be prompted for keyboard/mouse/screen settings as they have been saved in the pup_save file on the card.

Step 3 - Install and configure slideshow software

  1. Now when working with desktop icons, a single click will launch them, double clicking will start two copies of the program so click slowly.

  2. Click on the USB icon at the bottom of the screen, it will have a yellow or green dot on it.

  3. Now click on the 'Install' folder, this is where we saved GQview before we started.

  4. Click on the file.

  5. On the install verification screen click the INSTALL PACKAGE button.

  6. The success screen requests you restart the window manager. This is so the program will show up in the program list.

  7. Click Menu > Shutdown > Restart JWM

  8. Now launch GQview, go to Menu > Graphic > GQview image viewer

  9. GQview will launch. Now on the menubar click on Edit > Preferences.

  10. Under the STARTUP heading place a check in the box Change to folder and type /mnt/home/Pictures in the box below it.

  11. At the bottom under SLIDE SHOW, adjust the display time of each picture. At the default 15 seconds, you will run through 40 pictures in 10 minutes.

  12. Place a check in the box next to REPEAT, this will cause the slideshow to start over again after the last picture. If you want to randomize the pictures, check the RANDOM box.

  13. Now click on the IMAGE tab.

  14. Under ZOOM, leave the QUALITY at Bilinear. Make sure TWO PASS ZOOMING and ALLOW ENLARGEMENT OF IMAGE FOR ZOOM TO FIT are checked.

  15. Under WHEN NEW IMAGE IS SELECTED, click on Fit image to window.

  16. Under APPEARANCE, make sure Black Background is checked.

  17. Under CONVENIENCE, make sure Refresh on file change and Preload next image are checked. The Auto rotate option is only needed if you have images that are wide that should be displayed tall, I have not tried this option so I am not sure as to its accuracy.

  18. Now click on the ADVANCED tab.

  19. Under FULL SCREEN, in the Location drop down menu, select Active screen. I am not sure how important this is since we will be using only one screen.

  20. Check Stay above other windows and Smooth image flip.

  21. Then check Disable screen saver, and click on OK at the bottom of the window.
  22. Exit GQview by clicking on the X in the top right corner.

Step 4 - Prepare the desktop for optimal slideshow performance

  1. At the top of the Desktop, click on the icon labelled edit.

  2. Click on the OPEN icon, and an OPEN FILE window will appear.

  3. In the bottom left corner type /root/.jwmrc and click OPEN.

  4. Scroll down near the bottom of the document until you see <startupcommand> and </startupcommand>. Any command entered between these two tags will be launched at when the computer starts up.

  5. Put the cursor to the right of <startupcommand> and hit enter to create a line between them and type gqview -f -s

  6. Now click on the SAVE icon and then the CLOSE icon.

  7. Now close the edit program.

  8. Now go to Menu > Desktop > pupX set properties of X

  9. Go to the Screensaver tab and uncheck Enable screen saver. Then click OK.

  10. Now go to Menu > Desktop > JWM Configuration and click on the button beside Tray management.

  11. Now click on the Virtual Desktops button.

  12. Change the number of desktops to 1. Then click on OK and then OK on the next window.

  13. Back on the Tray Configuration Options window click on the button for Tray Autohide Option.

  14. Turn on Autohide, then click OK and OK on the next window.

  15. Now click OK on the Tray Configuration Options.

  16. On the original JWM Configuration Manager window, there is a green button to restart the window manager, click it. Then exit.

  17. Go to Menu > Setup > Mouse/Keyboard Wizard

  18. Click on Choose type of mouse.

  19. Select USB mouse and check Auto-hide mouse cursor when not moving and click OK. Close the original Mouse/Keyboard Wizard window as well.

  20. Now before we shutdown and transfer the CF card to the eBox pc, we have to change one item so the OS thinks it is booting up on and IDE drive.

  21. Click on the edit icon again on the desktop. Click on OPEN.

  22. In the box to the bottom right type /mnt/home/syslinux.cfg

  23. Change pmedia=usbflash to pmedia=ide. Then click SAVE and then CLOSE, then close the window.

  24. Shutdown by going to Menu > Shutdown > Power-off computer.

Step 5 - Assemble the display

Assembly is easy, the ebox PC will have come with proper screws that will fit through the PC case an attach to the mounting holes on the back of the screen. While you can mount it in any direction, it is less stressful on the cables if the box is mounted with the CF drive facing up. This way the cables hang straight down. (see the pics below).

Don't forget to copy pictures to the Pictures folder on the card.

Now attach the PC power cable, the display power cable, and connect the video cable to both the PC and the display. Remember to flip the power switch on the back of the PC before pressing the power button on the front. If you did everything correctly, you should be seeing a slideshow of your pictures when the PC boots up.

Since I used the 2300 model, I wasn't able to add background music because the PC is not powerful enough. The 4300 model is a much more powerful model and should be able to handle pics, music, and video. Other media players can be started at boot time by adding the correct command line arguements between <StartupCommand></StartupCommand>, each on its own seperate line, of course.

"bah weep graaagnah wheep ni ni bong"