LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-19-2013, 04:35 PM   #1
iv3oaw
LQ Newbie
 
Registered: Apr 2004
Location: italy
Distribution: Debian Squeeze
Posts: 7

Rep: Reputation: 0
automatize fbi as slideshow with crontable on RaspberryPi


Hi,
I am using fbi on a RaspberryPi a low power computer to show some photos on a display in my shop. I start the job with a simple shell script (start.sh):
fbi -a -noverbose -t 5 /media/usb1/foto/*
and it works fine.
Now I want to add some improvements and I am trying to start my script with crontable :
* 10 * * * /home/alex/start.sh
but this don't works.
Have you any idea about it?
Tank you
 
Old 12-19-2013, 04:58 PM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,446
Blog Entries: 11

Rep: Reputation: 182Reputation: 182
Did you try the script on the shell and not through cron? Any errors in the mail or crontab log?

Most of the time scripts running from the shell but not from cron are path related. First get the errors from the crontab by setting the MAIL option in crontab or have some debug output within the script itself.
 
Old 12-20-2013, 01:28 AM   #3
iv3oaw
LQ Newbie
 
Registered: Apr 2004
Location: italy
Distribution: Debian Squeeze
Posts: 7

Original Poster
Rep: Reputation: 0
thank you Zhjim,
if I use the the shell script (start.sh) in the terminal it works. ./start.sh
but if try to automatize with crontab that launch the shell script it produces any video output.
other scripts used with crontab in the same way are working.
I am sure the problem is to export a variable for the graphic interface,in my case the framebuffer /dev/fb0 and I think that the variabile must stay in the line command of crontab .... but I don't know how
* 10 * * * ????= /dev/fb0 && /home/alex/start.sh
something like above
thanks again
Alex
 
Old 12-20-2013, 01:41 AM   #4
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,446
Blog Entries: 11

Rep: Reputation: 182Reputation: 182
Seems like you have to export the DISPLAY enviroment variable. Also the threads I found on the net are two folded. Do to xauthority cookies and a cronjob not really having a tty. But thats for a nother day try this:

Code:
* 10 * * * EXPORT DISPLAY=":0.0" && /home/alex/start.sh
If this does not work take a look here: http://unix.stackexchange.com/questi...rks-in-crontab
 
Old 01-01-2014, 10:37 AM   #5
iv3oaw
LQ Newbie
 
Registered: Apr 2004
Location: italy
Distribution: Debian Squeeze
Posts: 7

Original Poster
Rep: Reputation: 0
hi,
finally I understand the problem was in the script start.sh
so,my experimental crontab is :
*/1 * * * * export FRAMEBUFFER=/dev/fb0 DISPLAY=:0 && /home/alex/start.sh
and my shell script start.sh :
#!/bin/bash
sudo fbi -d /dev/fb0 -T 1 -t 1 -noverbose -1 /media/usb1/ore/*
exit

I missed the parameter T and now it works.
thank you for the help friends and all the best !
Alex from Italy
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
fbi ransomeware thedoc4454 Linux - Newbie 1 10-17-2013 01:18 PM
How to send an Email to the FBI? Xeratul General 23 08-22-2013 05:24 PM
Booting the raspberrypi from the USB pendrive rather than the SD Xeratul Linux - General 1 09-23-2012 05:04 AM
fbi vijayavel Linux - Newbie 1 09-08-2011 08:16 AM
fbi-style format Dave Lohran Linux - General 1 10-06-2005 02:50 PM


All times are GMT -5. The time now is 09:39 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration