DSL running a digital photo frame?


Forum: DSL Ideas and Suggestions
Topic: DSL running a digital photo frame?
started by: joedornan

Posted by joedornan on May 15 2005,03:59
Hi folks,

So here's the deal: I'm embarking on a project to turn an abandoned Thinkpad 560x into a digital photo frame.
1) < http://www.awooga.nl/index.p....&page=1 >
2) < http://81.5.185.34/tc-one-thousand/others.html#PictureFrame >


No CD drive, and the hard drive is dead. So i got the idea of using a pcmcia-based drive as a boot drive. that'll make the frame quieter... which is good for a picture frame! :-)
< http://ask.slashdot.org/comments.pl?sid=73035&cid=6575885 >

Now I need to choose an OS. I guess I could do this:
< http://www.ehomeupgrade.com/forums/printthread.php?t=425 >
(booo hiss booo)

Or I could use a small version of linux on a cheap 128MB CF card in a cheap CF-PCMCIA adaptor! yay!

But what's that? I'm a Linux Newbie (aside from installing Red Hat 4 times and never using it)? Damn. Then I'll need some guidance getting things set up.

Then I saw that you can actually buy DSL on a bootable flash drive! Perfect! But I can't fit a USB dongle in my frame, and anyway I don't think the 560x BIOS can boot from USB. Damn.

So dear readers, I turn to the DSL community for some advice:

1) Is there a newbie-friendly way to install DSL onto a bootable CF card? How about to make it run totally or partially (ie swap file) from a RAM disk? Apparently there are limits to the number of writes a CF card can take before it conks out.

2) I intend to use the frame to slide-show my photo files from a drive shared on the local windows network. I see that DSL comes with a picture viewer Xzgv. Can Xzgv show a slide show with one new picture every day drawn from a network drive?

3) Will DSL be able to use the wireless PCMCIA card that I have to connect to a windows network upon first booting? Linksys WPC54G

If you like I'd be happy to share my experiences getting things up and running!

Cheers,
-Joe

Posted by cbagger01 on May 16 2005,17:10
1.)  Yes.  You can use a cheap (under $10) CF to IDE adapter and plug it into the Primary Master IDE cable on a desktop PC.  Then boot from the DSL livecd and do a "frugal install" to the card.  DSL Frugal is a read-only filesystem and will not make frequent writes to your CF drive so it is ideal for a flash drive.  It uses a ramdisk for the storing of temporary files.

2) I am unsure about xzgv but I am sure that there is a program out there that can be installed and give what you are looking for.

3) DSL supports many wireless PCMCIA and CARDBUS lan cards.  Check the compatibility list in the forums for details.  However, it is likely that your old laptop will only support the original PCMCIA style cards and NOT the 32-bit CARDBUS cards.  I believe that the Linksys card will not work with this laptop.  You will probably need to by something like an Orinoco Silver or Orinoco Gold card.  Make sure that your card is truely a "PCMCIA" card and not a "CARDBUS" card.

Posted by joedornan on May 17 2005,18:05
Quote (cbagger01 @ May 16 2005,13:10)
1.)  Yes.  You can use a cheap (under $10) CF to IDE adapter and plug it into the Primary Master IDE cable on a desktop PC.  Then boot from the DSL livecd and do a "frugal install" to the card.  DSL Frugal is a read-only filesystem and will not make frequent writes to your CF drive so it is ideal for a flash drive.  It uses a ramdisk for the storing of temporary files.

2) I am unsure about xzgv but I am sure that there is a program out there that can be installed and give what you are looking for.

3) DSL supports many wireless PCMCIA and CARDBUS lan cards.  Check the compatibility list in the forums for details.  However, it is likely that your old laptop will only support the original PCMCIA style cards and NOT the 32-bit CARDBUS cards.  I believe that the Linksys card will not work with this laptop.  You will probably need to by something like an Orinoco Silver or Orinoco Gold card.  Make sure that your card is truely a "PCMCIA" card and not a "CARDBUS" card.

1) Wow. Thanks. I searched on 'frugal' in the forums and found everything I'll need to make this work.

2) Some searching around found ZGV and this:
< http://www.tucows.com/preview/8658&ignore=1 >

But nothing that tries to stream photos over a network. Though this comes close: < http://evl.sourceforge.net/peersnap.html >

3) I think the 560 will be able to handle the WPC54G, and it looks like so will DSL (with ndiswrapper - whatever that is): < http://damnsmalllinux.org/cgi-bin....4;st=55 >


So it looks like I'm all set! Thanks for responding and sending me off in the right direction! Much appreciated.

Cheers,
-Joe

Posted by joedornan on May 17 2005,18:09
aha.

< http://ndiswrapper.sourceforge.net/ >

now I get it.

Posted by macjones on June 01 2005,12:09
Just finished a photoframe on an old toshiba lappy key points are:

- i tried zgv for showinf images but the lappy didn't like it, so I now use 'fbi' - a frame buffer image shower.

- i use 'wget' to grab a psudo-random (weighted for the last month) images from my server every minute (special script on the server), they come into image.jpg, and fbi is set on random for 1 minute to grab the image from its directory.

the script that does the wget is followed by an & so it works in the background getting images and FBI works in the foreground showing them.

Cheers
Mac
New Zealand

Posted by AwPhuch on June 01 2005,17:08
Quote (macjones @ June 01 2005,08:09)
Just finished a photoframe on an old toshiba lappy key points are:

- i tried zgv for showinf images but the lappy didn't like it, so I now use 'fbi' - a frame buffer image shower.

- i use 'wget' to grab a psudo-random (weighted for the last month) images from my server every minute (special script on the server), they come into image.jpg, and fbi is set on random for 1 minute to grab the image from its directory.

the script that does the wget is followed by an & so it works in the background getting images and FBI works in the foreground showing them.

Cheers
Mac
New Zealand

Pics, Specs, cool geek stuff like that please!

Brian
AwPhuch

Posted by joedornan on June 23 2005,05:20
A Step-by-Step Guide to Setting up DSL for a digital picture frame

[edited to correct misinformation & added more descriptions of XV commands]

After days of fiddling and learning about linux and DSL for the first time, I've gotten everything up and running. I will share what I did and what I learned along the way for my own records, and in case someone else finds this thread and wants to turn their old laptop into a digital picture frame using DSL.

Before I dismantle my computer and put it inside the photo frame, I need DSL to boot up, auto connect to my wireless lan, access my photo server via SMB, display those photos in a slideshow, and boot up vnc server so I can make changes without needing to have a keyboard/mouse.

STEP ONE - INSTALLING DSL


DSL is excellent for the purposes of a digital photo frame.
1- it is small and can run on really old laptops. This is good if you want to use a silent/cool but often small compact flash card as your hard drive. It is also good if you have limited RAM as the base OS easily fits into 64mb of RAM.
2- it has "frugal install" which allows you to run with almost no caching or accessing of the hard drive. This is espcially good if you want to use compact flash cards because they have limited read/write cycles...

I burned a DSL CD, but unfortunately it didn't "just work" on my IBM thinkpad. I had to learn the special command at bootup which allowed it to use the laptop's lcd screen.

   fb1024x768

< http://damnsmalllinux.org/cgi-bin....;t=4646 >

To fool my computer into thinking the CF card was my hard drive, I bought a compact flash to 2.5" IDE bus adaptor.
< http://adis.ca/cfdisk.2.php >

Now that DSL was booting properly from the CD, I partitioned my 256mb drive by typing at a shell prompt:

cfdisk

A root shell prompt can be found in DSL's main menu by right-clicking on the desktop. select >xshells>root access>

I chose 156mb as hda1 primary/bootable, 100mb as hda5 (logical)

Next format your hda5 partition (I believe your hda1 partition is auto-formatted by the frugal install script).

mkfs -t ext2 /dev/hda5

see: < http://damnsmalllinux.org/cgi-bin....94;st=5 >

Then I went into the main menu again and selected apps>tools>frugal install> and installed DSL onto the CFcard-cum-hard-drive.
< http://damnsmalllinux.org/cgi-bin....;t=4440 >
< ftp://ibiblio.org/pub....wto.pdf >

Make sure to specify a separate partition for backup/restore (in my case hda5) and make sure to specify a separate partition for mydsl extensions (in my case hda5).

STEP TWO - PERSISTENCE OF DATA

With a Frugal install, everything in your /home and /opt directories are in ramdisk, and all changes to these directories are lost unless you specify which files you want to keep (aka backup for later restoration upon reboot).

To backup files you need to list them in the filetool.lst file (in your /home/dsl/ directory). < http://damnsmalllinux.org/cgi-bin....;t=5613 >

For further explanations, see:
< http://damnsmalllinux.org/cgi-bin....;t=6441 >

Also, when you download new MyDSL extensions (aka new applications), if you put them in the mydsl location you specified in your frugal install, they will be automatically installed (but not launched) upon your next reboot. To integrate these new extensions into the system proper (to avoid re-installing them on each boot) you can always re-master your DSL CD and do a new frugal install... but for me the re-install on boot was just fine.

Another tip: if you have another partition (like my hda5) and you think you will use it often, you may want to have it automatically mounted on each reboot. I just put this line in /opt/bootlocal.sh :

mount /dev/hda5/ /mnt/hda5/

STEP THREE - CONNECTING VIA WIRELESS LAN

If your card is supported 'out-of-the-box' with DSL, you can skip this section. I however have a linksys wpc54g (v.2), so I had to download the windows drivers for my card onto on my hard drive. If you put your driver files in your /home/dsl/ directory, be sure to mark it in filetool.lst to be backed up for future use. Once downloaded you use NDISWRAPPER to load those windows drivers into Linux.

Open >main menu>system>net setup>ndiswrapper>

and enter:
inf file: (the path to your driver's primary "INF" file) in my case it was: /home/dsl/linksys/lsbcmnds.inf
device: (should be already filled in?) in my case it was wlan0
sid: (the name of your wireless network name)
wep: (the hex value of your wireless password) format: XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XX

Two things to note: formatting of your WEP key is important. The above 26 digits/letters separated by colons was derived by using the following website:
< http://centricle.com/tools/ascii-hex >
At this site, I just entered the plain text password I used in both my mac and my windows box, and converted it to this longer hexadecimal format.

I believe once this script is run, you can make sure it runs on reboot by adding /opt/myndis.sh to your filetool.lst file, and then adding the line myndis.sh & to your /opt/bootlocal.sh file.
< http://damnsmalllinux.org/cgi-bin....;t=3229 >

or a fancier way to automate is to create your very own mydsl package...
< http://damnsmalllinux.org/cgi-bin....;t=4474 >

Then go to >main menu>system>net setup>netcardsetup>

It will ask you if you want to use DHCP, and you should probably say yes. If you know otherwise... you're on your own filling out the specific fields.

If it helps, I was also able to connect without scripts in the main menu by using the following three commands at the prompt of a root shell:

   ndiswrapper -i /home/dsl/linksys/lsbcmnds.inf wlan0 NNNNNNN XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XX
   modprobe ndiswrapper
   netcardconfig

(where NNNNNN is the name of your network - your SSID)

One good way to determing if ndiswrapper is working is to type in:

dmesg | grep ndis*

If you see it show up, you're in business...

One good way to determine if your card is seen by the system is to type:

lspci -v

One good way to review your network settings is to type in:

ifconfig

(you should see either eth0 or wlan0 etc. in addition to lo)

STEP FOUR - CONNECTING THROUGH WINDOWS NETWORKING aka SMB

If you have internet connectivity, and like me you want to access your photos on your windows-based HTPC, you should install the SAMBA application available through the MyDSL system. I assume in the example below that you put all your photos for the slideshow in a shared folder on your HTPC called "photos." Choose >main menu>apps>tools>myDSLBrowser look in the network directory for samba.

I downloaded it to the root of the partition that I identified in my frugal install setup. In my case this was /mnt/hda5/

To install this newly downloaded mydsl package, I typed in:

mydsl-load mnt/hda5/samba.dsl

(it will automatically install on boot-up if you were able to place it in your specified MyDSL partition. If you want to have the option of installing it mannually upon reboot, then put it in a subfolder called /mnt/hda5/options/)

Now create the "mount point" for mounting your SMB accessed share:

mkdir /mnt/photos

You may want to put this line in your /opt/bootlocal.sh file so that you don't have to do it every time you reboot. Be sure your bootlocal.sh file's path is listed in your filetool.lst file!

smbmount //HTPC/photos /mnt/photos -o username=UUUUUUU%PPPPPPPP

This command logs into the SMB server (in this case called HTPC) and mounts the photos share to the local /mnt/photos directory. UUUUUU stands for your username on HTPC, and PPPPPP stands for your password on HTPC.


STEP FIVE - THE SLIDESHOW

So now that we have SMB connectivity and we've mounted the windows share with all our photos, we install XV a better slideshow app than DSL's default xzgv. >mainmenu>apps>tools>myDSLBrowser> in the apps directory near the bottom of the list. If you downloaded it to your hda5 partition, then to install type:

mydsl-load /mnt/hda5/xv.dsl

Once installed, you can type this to launch XV and start your slideshow:

xv -random -wloop -wait 120 -geom 640x480 -fixed -root -rmode 5 $/mnt/photos/*.jpg

-random = randomizes the selection of photos
-wloop = repeats the slideshow when it is done.
-wait 120 = pauses 120 seconds between photos
-geom 640x480 = indicates the size of the window in which to display your photos. useful if you retain the cardboard border inside your picture frame and only want to use the centre of your screen.
-fixed = prevents your photos from losing the original aspect ratio when squeezed into the above window size
$/mnt/photos/*.jpg = tells xv where to look for photos
-root = puts the slideshow on your 'desktop.' Allows you to use:
-rmode 5 = centers the picture on a solid background. useful if you retain the cardboard border inside your picture frame.

If you want to display your photos in a window, and you want to fill up a 1024x768 screen, then I would try something like:

xv -random -wloop -wait 120 -geom 1024x768 -fixed $/mnt/photos/*.jpg


To learn more about XV's commands, you can download the documentation from here:

< ftp://ftp.cis.upenn.edu/pub/xv >

Again, if you downloaded xv to the root of the partition identified as the mydsl partition during frugal install, it should load automatically on reboot.

STEP SIX - AUTOMATING EVERYTHING ON BOOT-UP

Here is where I still have some work to do.

At the moment, I haven't been able to automate connecting to the network, connecting to the SMB share, launching XV with the above option, and launching VNC server. By the way, VNC server is also available through MyDSL. I will post back here when I figure it out. Advice would be welcome.

If I have the time, I will post my experiences with the hardware side of things as well. Suggestions for improving this little guide are welcome!

Cheers,
-Joe

Posted by dsl newbie on July 18 2005,20:49
I'm doing the exact same thing with an old laptop.  Thanks for your input so far, joe!

Anyway, here are a few things to know:

First to get rid of the pointer in the middle, create a file named emptycursor with the following data:

#define nn1_width 16
#define nn1_height 16
static unsigned char nn1_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

Now when you're in X, you can type "xsetroot -cursor emptycursor emptycursor" to get rid of the pointer.

Once you set up a nice command for xv, here's what you'll want to do, you can have that as the only running thing for X.  Change .xinitrc in your home directory (most likely /home/dsl) comment out everything that's not a comment (comment lines start with #).  Add the xv line (the one that randomly gets pictures) instead.  You may need to tweek it with -cgeometry +1024+768 or something like it.  In any case, if you exit out and restart X (if you've configured it to not have multiple users, this should be as easy as exiting the window manager and typing exit at the command prompt), you'll see only the xv application.

To combine the cursor being out, change .xinitrc to be something like:

xsetroot -cursor emptycursor emptycursor &
xv [blah blah blah]

Set up the whole thing to be run without multiple users and on boot the whole thing should be the picture frame!

Posted by Sciron on July 25 2005,15:26
I have just completed my picture frame using DSL on an old Dell laptop... Not sure if this will help you but here are a coulple of key items that I did to get it to work upon boot...


For smb shares---
I installed SAMBA (apt-get install samba)
adduser smbuser
smbpasswd -a smbuser
in my smb.conf file I added
[Photos]
comment= Windows Share
path=/home/dsl/Photos
read only = no
create mask = 0644
guest ok = yes

I also made sure that encryption was set to true

in my .xinitrc file I added the following
sudo smbd -D
sudo nmbd -D

for the slideshow I used FEH and UNCLUTTER
apt-get install feh unclutter
I then created a slideshow.sh script
 unclutter &
 feh -zZFr -D 10 /home/dsl/Photos

unclutter gets rid of the mouse pointer

in my .xinit after starting samba I run the script
slideshow.sh

for my wireless stuff here is what I did---
Using WPC11 ver4
installed ndiswrapper drivers
installed wpa_supplicant as my wireless network uses wpa

in my .xinitrc file before anything else:
modprobe ndiswrapper
wpa_supplicant -Dndiswrapper -iwlan0 -c/etc/wpa_supplicant.conf &
# now I wait a few so the AP can associate
sleep 1m
# I setup a static address
ifconfig wlan0 192.168.1.10 netmask 255.255.255.0

Now I can boot up my laptop, it connects to the wireless network, starts the SMB share Photos so I can change the pictures remotely, hides the mouse pointer and starts the slideshow...

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.