DIY Raspberry PI Digital Picture Photo Frame – P2
Articles Blog

DIY Raspberry PI Digital Picture Photo Frame – P2

November 13, 2019


Hello and Welcome my name is Doug Hubbell
and to Astrophotography tutorials. Today is part 2 of do it yourself raspberry pi digital
picture frame. Today we are going through the configuration steps on how to setup your
own digital picture frame. Everything you need to configure the raspberry pi is done
LX terminal it’s located underneath the wifi config icon. Just go ahead and double click
that will get you into the console for all your configuration needs. Open up the LX terminal
the first thing you’re going to do is going to want to do some updates. The update you’ll
need to do first is sudo apt –get update do this first and it will update the operating
system. Next install the slide show software we do this from the LX terminal again type
in sudo apt –get install feh press enter. The next piece of software we are going to
get is call samba. Samba allows us to share the files so we can actually access the picture
frame from our own network. So again we start with sudo apt –get install samba and press
enter. Another software we will need to install is the samba common library. So to do that
you sudo apt –get install samba-common-bin and then press enter. To a US keyboard layout
do this, type in, sudo leafpad /etc/default/keyboard and press enter. What that will do is it will
bring up this leafpad editor. What you can do is right there under GB is you need to
change that to US and file save and then you can close that out. And then you’ll have to
reboot the raspberry pi in order for this to take effect. You can do sudo reboot and
press enter. What we are going to do now is we are going to make our directories so we
can put in our photo frame. We will do sudo mkdir –p /home/pi/frame/photos and press
enter. Now we need to create the script that’s going to run the slideshow we need to do we
can change to the directory typing cd /frame press enter. Now we can type in sudo leafpad
start_frame.sh press enter. This will do for you is bring up this editor called leafpad.
If you’re more comfortable in using vi you can use that, but, we want to use leafpad
it’s a pretty easy program to use most people are familiar with this editor. We will do
#!/bin/sh and we will put in $DELAY=5 this will be so we can make the delay anything
you want in the script and we’ll put in /usr/bin/feh –quiet
–recursive — randomize –fullscreen –zoom
max –hide pointer –slideshow –delay $DELAY /home/pi/frame/photos ok so that will start
and run our slideshow. Save it, hit save, now that we created the script we have to
make it executable and the way we do that, again we start with super user do sudo chmod
+x start_frame.sh then press enter. If you’ve done this correctly and you’ve created an
executable it will look different when you do an ls to show the directory contents ls
now we see start_frame.sh it’s green now and therefore we can execute that program. The
script we just created to start the slideshow we want to autostart. So what we have to do
is we have to add this to the autostart feature. Sudo leadpad /etc/xdg/lxsessioni/LXDE/autostart
once we are here we’ll add the script to the autostart file. /home/pi/frame/start_frame.sh
we will save this. And now it will autostart
with the slideshow. The next thing we to do is we need to configure the samba settings.
What samba does is allow us to share files or write files directly to the raspberry pi.
Sudo leafpad /etc/samba/smb.conf and press enter. It going to bring up the configuration
file for samba and the first thing we have to do in here is have to change the workgroup
so it can actually be seen on your windows network. By default it comes in as workgroup
I’ll show you how to check for your workgroup name in case you don’t know it. My particular
one is called mshome is my workgroup name. Then what you need to do is you need to go
all the way down to bottom of the file here. To find your workgroup setting open your control
panel click on system and on your system you’ll see your workgroup. A link or a paste in here
so you can you can just copy and paste into your settings here. I’m going to hit control
V and paste it. Basically what I did put in this bottom code right here which says Photos
that’s the name that’s going to be shared as photos and the path is the path to where
the photos are and then we are going to allow to be able to write to this particular folder.
So after we are done with that will just hit save. Restart samba type in sudo service samba
restart and press enter. Now we have to give write permissions to the samba share so we
can actually write files to the folder and the way you do that is type in sudo chmod
0777 /home/pi/frame/photos press enter. So we need to add a user so we can this user
to access the files on the raspberry pi through samba so we are going to type in sudo useradd
–s /bin/true Administrator and we press enter. Next we are going to set the password for
Administrator so we are going to do sudo smbpasswd –a Administrator put in raspberry
there we go now we should be able to access
the raspberry pi. What we have to do now is we have to tell the screensaver to not go
blank so there is a software we install. So we have to do sudo –apt –get install xscreensaver
and press enter. The start button down there at the bottom go to preferences and then go
to the screensaver. The screensaver you pull it up you want to change some the settings
so it never turns off. The mode by default comes in as a random screensaver, but, what
you need to do is change that and you need to make it disable screensaver. If you disable
the screensaver then your slideshow will never stop it will continue to run. After you’ve
allowed your raspberry to share files with samba you should be able to find it on your
network drive by typing in \raspberrypi and pressing enter and then you’ll see the shares
we made. This photo share is what we recently made so go ahead and click that and open that
up. What you can do if you’d like you can actually map this network drive you can go
ahead right click on it and say map network drive. When it pops up the network drive settings
you can just put it anything you’d like, I’ll put it to P and say finish. Now it will be
mapped on my computer as P, so if I ever want to transfer any files to this directly I’ll
just pull it up my computer as P. Now what I want to do is I want to select some files
to copy over to the raspberry pi so it will start showing a picture. What I’ll do is I’ll
control A select all of these photos and right click copy or control c. Then I’ll paste that
into the raspberry pi. Here’s the raspberry pi right here and I’ll right click and paste
that into it. Now this is going to take a little while I put quite a few on there but
as soon as these get loaded to the raspberry pi then we should be able to just restart
the raspberry pi and then it should automatically start playing these photos over there. So
after you restart your raspberry pi you start getting a picture slideshow like you see here.
The raspberry pi is a very compact little computer and what I’ll do next in part 3 is
I’ll take this raspberry pi and I’ll attach it to the monitor and I’ll make it so I can
hang it on the wall so stick around for that. If this is your first time watching I’d like
you to subscribe. I publish two astrophotography videos on the 1st and 15th of every month.
Thanks for watching and I hope to see you soon.

Only registered users can comment.

  1. Wouldn't this be easier to just run in OpenElec or RaspBMC and find an extension that allows you have the slideshow screensaver? The only issue I see would be setting up a file sync/Samba connection. (I'm trying to combine a digital photo frame + Internet radio so I'm curious)

  2. Hi! I'm relatively new to Raspberry PI and I didn't know about OpenElec or RaspBMC. The File Sync with Samba isn't a big deal. At least for me it's another network drive on my computer and I simply copy the photo files to the Raspberry PI. What are OpenElec and RaspBMC? Are these media players for the Raspberry PI? Thanks for posting! Doug

  3. OpenElec & RaspBMC are Media player based OS's that use and are optimized for the XBMC software for the raspberry pi, usually people use them for media centers, but it has the option to display pictures & I think there's an extension for it to default to a picture slideshow screensaver whether or not music is playing. I'm waiting to try it out once my parts arrive, but I was curious if you had any info.

  4. Sorry, I haven't tried that software. In P3 I wrap it up with mounting it and activatinng the slideshow. So far I really enjoy my setup. When P3 comes out on the 15th check it out. I'll need to investigate XBMC, that may be useful for DLNA devices, right?

  5. Thanks a lot
    It really helped me a lot 
    I followed everything you did step by step and yes it worked 🙂
    Thanx again !!!

  6. Hello. the video is great. i did everything you show in the video to the T. when i reboot the Rpi it wont start the photos automatic. any ideas? thanks.

  7. Thanks for the tutorial.  What a great idea.  My RPi is on order.  A couple of questions (1) Can the slideshow pictures be loaded and shown from a SD card without a network connection to a directory?  (2) Am I correct that the software installs are made directly from the RPi, i.e. there's no internet download?  Cheers

  8. You should have a webpage with all this written so that we can read faster, and do copy paste the code.  Other than that its excelent.

  9. great work!

    correction for RASPBIAN 2014-12-24 version (08:42min)
    autostart moved to: 
    /etc/xdg/lxsession/LXDE-pi/autostart

  10. When there is only one file in the photo map, does the picture stays on the monitor or do you see any flashes due the "slideshow" mode

  11. my pc does not recognize the raspberry at 14:38
    any suggestions?
    both devices are connected with the same wifi

  12. Great video. Setup and works great BUT the network drive seems to have moods. Worked awesome at first, but now it's hit or miss whether my PC or Ipad (using a network drive app) can connect to it. At first, all could flawlessly. Now, iPad is out and PC is hit or miss – though haven't been able to connect from PC at all either for last few days. Seems like iPad still sees the Pi, but can't authenticate (tried to login as 'guest' and 'admin') – right now, PC won't even see Pi on network. Anyone have any suggestions or ideas? Is there a way to restart the SMB or something when it's acting up?

  13. Great instruction! I'm a RaspberryPi rookie so the level of detail was perfect. I was able to connect to the RPi over my network and transfer images. I ran into an issue with the autostart. Based on the comments below I added "/home/pi/frame/start_frame.sh" to the /etc/xdg/lxsession/LXDE-pi/autostart as outlined in previous comments but it still will not autostart the script. 

    Any suggestions?

  14. I can't set the password it will not find the command also cant open Photo share It says the pi is not assemble an i might not have permission need helpasap

  15. First of all great video! Thank you very much Doug for posting the DIY Raspberry PI Digital Picture. You inspired me to build my own photo frame from a old 19” computer monitor I had laying around.

    I would like to post a tip that someone else might find useful. I am using a raspberry pi 1 model B running raspbian wheezy.

    I wanted my photos to be on a thumb drive and I would plug the thumb drive into the pi’s usb port. Sharing the photos folder over the network is nice, but I wanted the photos to be pulled from a thumb drive connected to the pi.

    Get a cheap thumb drive laying around the house. Reformat to FAT32 with volume label "PHOTOFRAME". I renamed the thumb drive to “PHOTOFRAME”. Then place your photos on the thumb drive and you can use folders or nesting folders, if need be. The feh software can pull from any photo under the PHOTOFRAME directory.

    Under
    Sudo leafpad /etc/xdg/lxsession/LXDE-pi/autostart
    I added "/home/pi/frame/start_frame.sh” to the last line.

    Looks like:
    @lxpanel –profile LXDE-pi
    @pcmanfm –desktop –profile LXDE-pi
    @xscreensaver -no-splash
    /home/pi/frame/start_frame.sh

    I will share when I changed the photo file directory from “/home/pi/frame/photos” to “media/PHOTOFRAME”. The autostart would not work. After much pondering, I found the thumb drive was not mounting before the “start_frame.sh” script was running and the script could not find "media/PHOTOFRAME". So, I added a “sleep 20” line to start_frame.sh and it worked.

    Under
    Sudo leafpad /home/pi/frame/start_frame.sh
    I added "sleep 20" line so the script would pause until the usb thumb drive could mount. You can shorten the time if you like.

    Looks like:
    #!/bin/sh
    sleep 20 # pauses the script for 20 second so media thumb drive can mount
    DELAY="15"
    /usr/bin/feh –quiet –recursive –randomize –full-screen –zoom max –hide-pointer –borderless –slideshow-delay $DELAY /media/PHOTOFRAME

    And IT WORKS GREAT!!!! Thanks Doug for posting the video.

  16. when i try "sudo service samba restart", it says "Failed to restart samba.service: Unit samba.service is masked." What do i do?

  17. Very nice slow paced easy to follow tutorial. This looks to be much easier solution that I was going to use for my now showing movie poster digital sign.

    I have two questions:
    1) How can I store and point photos to network share using unc path rather then to local SD Card?

    2) This is the most important question. Movie posters are rectangular and always shown in portrait mode. So my screen will always be in that orientation. So how do I force the posters to display the same?

  18. I have a Raspberry pi 2 that came loaded with NOOBS software so getting to the part where the various software is loaded to run the slideshow was a breeze. But from there on I didn't know what the WORKFLOW substitute is for a Mac OS. Then I read all the talk about one of the commands not being accurate and so changed your command to "sudo leafpad /etc/xdg/lxsession/LXDE-pi/autostart" and when the window opens I typed in "/home/pi/frame/start_frame.sh" at the bottom. I have played with network sharing on my iMac and even though I can see the Photos folder on my Mac, I can't autoplay the pictures in it on my RPI2. Any further help?

  19. so everything is working but im using this for a movie poster slideshow on my wall for home movie theater and need to have my images sideways because tv will be vertical and i rotated the images sideways but when i start the slideshow it up right again so any answers.thank you and very nice tutorial

  20. ok a better option for rotating images to correct way i followed this and worked great

    http://www.plastiquefreak.com/digital-movie-poster-display-part-2-prepping-the-images/

  21. ok so in the last 24hrs I have successfully learnt how to navigate/locate files in the directories. I have also successfully placed some photos in the folder but here is the problem. I am able to give this command (sh start_frame.sh) after getting into the /frame directory and it launches my slideshow. But when I type /home/pi/frame/start_frame.sh nothing happens! Sorry but I don't know what else I need to include in the command to fire it up from the raspberrypi ~$ (main directory when the terminal screen when starts). My plan is to find that command and then paste it in the autostart script with a @ symbol. Any help?

  22. The current version of NOOB installs Raspbian Jessie. If you have a Raspberry Pi Version 1, Jessie does not seem to work very well. I was not able to get feh to autostart. You have to do an image install of Raspbian Wheezy, www.raspberrypi.org/downloads/raspbian, for the autostart to work.

  23. Great tutorial, thank´s man. I ran into some problems like most of the commenters here but got them solved.

  24. Quick update March 2016. Pi has changed so this won't work any more as described. Instead you want to use the Wheezy version of the OS on the PI not the newer Jessie, it can be found here https://downloads.raspberrypi.org/raspbian/images/ I used one from May 2015. And you need to add the autostart copy "/home/pi/frame/start_frame.sh" into
    "/etc/xdg/lxsession/LXDE-pi/autostart"
    After that it all works great. Many thank

  25. Doug, can you help me out. After inserting the code into samba, when I try to restart samba I get an error that it failed to restart and that samba.service is masked. Any idea what I have done wrong. Thanks.

  26. Doug, I apologize, but I need some more help. I now have the pi recognized as a drive on my computer and I have placed photos in the photo file. I have confirmed on the pi that the pictures are in the pi's photo file. However, the slide show is not starting. I can see the desktop on the pi, but the slideshow is not running. Where should I be looking to get the slide show to run?  I guess this is what I get for getting in over my head in terms of programing. Again, many thanks.

  27. Doug, thank you for the quick response. So, from the terminal I entered "sudo nano ~/.config/lxsession/LXDE-pi/autostart" and hit enter. This takes me to another screen and at the bottom I added "/home/pi/frame/start_frame.sh" I also tried "/home/pi/slideshow/slideshow.sh" as set forth below. Neither worked. From that second screen how is the "/home …" line saved? I ask because when I tried the two different versions, I noticed that the previous one is not there when I go back in. I do not see a save option and when I exit out it is taking me back to the desk top.  Clearly, I am doing something wrong. Thank you for your help.

  28. Hey Doug, well done on the picture frame 🙂
    I have a question, I did everything but when I restart my rasberry pi, the photos do not autostart :/
    Any help pls ?

  29. this video is awesome but I still cannot get it to work? its been two day of read different comments and still cant get it.

  30. Doesn't work for, when I enter: sudo leafpad start_frame.sh i get some weird warning: (leafpad:2781): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-bar-popup-delay after class was initialised

  31. Hi and Thanks for this Project. It is a good Project. It is good working. ok.But, I have a question. I want to use a usb stick for photos. And I changed path for usb in the start_frame.sh and it is not working at boot. Why does working it at boot…

  32. hi Astrophotography, first thank you very much for this great tutorials i have learnd alot from it.
    but i have one problem still is that the my computer cant share the fill with the raspberry throw the wifi
    but when i connect the raspberry with my computr using ethernet cable the computer can see the shareing file???
    so what the problem with the wifi ????

  33. hello
    first of your video is very use full i tried but cant get trough
    i have pi 3 with 4 port usb i think its bit lastest and cont run some commands like samba service cant restart after putting coe and another this you need mention or it is skip in video where we need to put code
    it would be very helpfull if you make frame with new raspberry pi and upload

  34. can i stop the slideshow by touching the Screen? does that work perhaps? anyone tested? I only heard it stops by ESC?

  35. Via the network I have added an additional picture to the "/photos" folder…whilst the slides show was running. The program is not showing the new picture…only after restart of the system…has anyone an idea on how to get this automatically integrated into the running slides show?

  36. The motion timer will come later…seems as I can not buy a similar one to yours here in Germany…but let's see….will find it…actually it is running during the day and the idea is that when the kits come home they simply copy past their new "pic's of the day" from their phone's to the "/home" folder…it would be great if they would be immediately auto integrated…maybe it is possible to have a kind of "lookup" command that is checking the folder again after a certain time period…?…just an idea…as I'm not that much familiar with programming I'm not sure if that is possible…

  37. Is there any place I can buy a pre-programmed microSD with the software ready to go? I just want to be able to move .jpeg into a directory folder and have them auto play on boot up. PayPal awaits … email [email protected] The setup I have ready to go is a zero WH with 7in DPI interface monitor.

Leave a Reply

Your email address will not be published. Required fields are marked *