2

I have two scripts, slideshow_start.sh which is the main script I am trying to run (simply a slideshow using feh). And slideshow_start.py which just calls slideshow_start.sh using os.system("<path to>slideshow_start"). Both are executable work fine normally.

I have tried everything I can find to run either one at startup, but nothing works. Here is what I've tried so far:

using cron:

@reboot python /path/to/file/slideshow_start.py @reboot sh /path/to/file/slideshow_start.sh @reboot bash /path/to/file/slideshow_start.sh @reboot /path/to/file/slideshow_start.sh @reboot /path/to/file/slideshow_start @reboot /path/to/file/slideshow_start.py

edit /etc/xdg/lxsession/LXDE-pi/autostart:

@/usr/bin/sudo /path/to/file/slideshow_start.py @/usr/bin/python /path/to/file/slideshow_start.py

edit /etc/rc.local:

/path/to/file/slideshow_start /path/to/file/slideshow_start.sh /path/to/file/slideshow_start.py

Please help.

  • 1
    Running on (re)boot (including via rc.local) isn't the same as running post LXDE's startup, and will not work for GUI applications. LXDE's startup requires you either log in via the display manager or you log in on a console and startx. If you are looking to run a GUI app at boot with no login, you want to research setting up a kiosk. – goldilocks Mar 9 '15 at 14:55
  • @goldilocks - OK that makes sense. Does feh need to be run from LXDE? I don't necessarily need to boot into the desktop if it'll work from the main command line. And if that's the case, will one of the above solutions I've tried work? – drewd423 Mar 9 '15 at 18:31
1

I would try using xinitrc. But I'm not 100% sure if this works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.