Using Odroid C2, sh script not working. pls help

using Mate on odroid C2. user ‘odroid’ auto login.
odroid folder has file: feh.sh

inside feh.sh are these codes:
#!/bin/bash xset s off xset -dpms xset s noblank feh --quiet --fullscreen --borderless --hide-pointer --randomize --slideshow-delay 30 /media/usb/*
it works fine when i manually run in terminal: bash feh.sh

however it refuses to work when i add in Startup App in Personal Preferences. any idea?
i tried SystemD method as well. no luck

basically i want to disable screensaver, blank screen and have FEH to load photos from usb drive everytime i turn the C2 unit on. been working on this issue for the past 15hours and still no luck.
pls help

is feh.sh executable? does it have the x flag (eg. ls -l feh.sh)
How do you add it in the startup app? do you use absolute path?

feh.sh is an executable.
properties show,
owner: odroid
access: read and write

group: odroid
access: read only

others:
access: read only

execute: checked for allow executing file as program

i added by going to the menu, System/Preferences/Personal/Startup Applications
name: feh
command: /home/odroid/feh.sh
comment: slideshow app

ls -l feh.sh shows:
-rwxr -xr -x 1 odroid odroid 162 Apr 12 10:43 feh.sh

It could be a race condition with other startup apps

To check if that is true, add a sleep command at the start of your script for, say ,10 seconds. Then log out and back in.

The command, if you don’t know it, is:

sleep 10

If it works, reduce the duration of the sleep command until it stops working. At which point, add another second back on.

beleive it or not, i tried sleep 2 based on what others did before and that didnt work.
i finally got it working with sleep 15!
so the final code for my feh.sh in the autostart menu is:

``#!/bin/bash
sleep 15
xset s off
xset -dpms
xset s noblank
feh --quiet --fullscreen --borderless --hide-pointer --randomize --slideshow-delay 30 /media/usb/*

``

pretty amazing i spent more than 15hours on this!
thanks!

1 Like

You’re welcome Philly. Glad to hear you got it sorted.