Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ 1 [2] >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: DSL running a digital photo frame?, I'm building one, and wondering bout DSL< Next Oldest | Next Newest >
AwPhuch Offline





Group: Members
Posts: 1404
Joined: April 2004
Posted: June 01 2005,17:08 QUOTE

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


--------------
http://www.frappr.com/dsl <-- Where do you use DSL?
http://www.smoothwall.org <-- Ultimate firewall for the world!
http://boinc.mundayweb.com/one/stats.php/userID:6107 <--My BOINC stats!
./S99LinuxRevolution start
Back to top
Profile PM WEB 
joedornan Offline





Group: Members
Posts: 8
Joined: May 2005
Posted: June 23 2005,05:20 QUOTE

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
Back to top
Profile PM 
dsl newbie
Unregistered






Posted: July 18 2005,20:49 QUOTE

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!
Back to top
Sciron Offline





Group: Members
Posts: 2
Joined: July 2005
Posted: July 25 2005,15:26 QUOTE

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...
Back to top
Profile PM 
8 replies since May 15 2005,03:59 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ 1 [2] >/
reply to topic new topic new poll
Quick Reply: DSL running a digital photo frame?

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code