1

I'm using Ubuntu Mate for the odroid c2.
In Control Center/Startup Applications, I added my own /home/odroid/feh.sh feh.sh has:

xset s off
xset -dpms
xset s noblank
feh --quiet --fullscreen --borderless --hide-pointer --randomize --slideshow-delay 30 /media/usb/

that didnt work. please help.

Hizqeel
  • 1,895
  • Could you please add a little more detail? What did you expect to happen and what happened instead? Did you encounter any warning or error messages? Please reproduce them in their entirety in your question. You can select, copy and paste terminal content and most dialogue messages in Ubuntu. Please [edit] your post to add information instead of posting a comment. (see How do I ask a good question?) – David Foerster Apr 16 '18 at 11:32

2 Answers2

1

i dont know why it matters, but adding sleep 15 works! so the final code in feh.sh 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/
sudodus
  • 46,324
  • 5
  • 88
  • 152
  • Interesting :-) I guess that something important was not found directly after log in. Maybe the USB drive needed time to be mounted. I'm glad that you found a working solution. - Anyway, I was interested, so I made and tested a desktop file (with Ubuntu MATE live in a Toshiba laptop). – sudodus Apr 13 '18 at 07:27
0

General

feh wants a wild-card character in the path (and it will search subdirectories too), or the option --recursive So I suggest that you try

feh --quiet --fullscreen --borderless --hide-pointer --randomize --slideshow-delay 30 /media/usb/*

or

feh --quiet --fullscreen --borderless --hide-pointer --randomize --slideshow-delay 30 --recursive /media/usb/

I use the two aliases

alias feha='feh -r -F -V -d -Z'

alias fehs='feh -r -F -V -d -Z -z -D 5'

Details of a working desktop file in 'autostart'

I tested in Ubuntu MATE and added details of a working desktop file in 'autostart'.

The following desktop file feh-slideshow.desktop works in Ubuntu MATE Bionic (to be released soon as 18.04 LTS).

[Desktop Entry]
Version=1.0
Categories=Application
Type=Application
Name=feh-slideshow
Comment=perform a slideshow
Exec=feh --quiet --fullscreen --borderless --hide-pointer --randomize --slideshow-delay 30 --recursive /media/usb/
Icon=/usr/share/icons/mate/scalable/apps/mate.svg
Terminal=false
StartupNotify=false
  • I tested it 'manually' when located on the Desktop.
  • It works automatically at log in, when located in ~/.config/autostart
  • You may want to point to another directory (instead of /media/usb/).
  • You may want/need another icon in a different version of Ubuntu MATE.

The following screenshot illustrates a working system, where you can logout via 'End the current session' log out and log in which starts the slideshow.

enter image description here

sudodus
  • 46,324
  • 5
  • 88
  • 152
  • this didnt work unfortunately. very strange i can run in terminal: bash feh.sh. but it refuses to automatically run by itself after reboot – Philly Hot Apr 12 '18 at 13:58
  • It should work, if you run a script with only one line, the one with feh. Why are you running the other lines? Are you using a desktop file 'slideshow.desktop` ? In that case, please edit your original question to show that desktop file. – sudodus Apr 12 '18 at 15:25
  • i just edited the feh.sh file down to 1 line. i removed all the other xset as you suggested.

    i added /home/odroid/feh.sh to Autostart application. then i see a file was created automatically in home/odroid/.config/autostart/feh.sh.desktop. i reboot and still nothing works. feh did not auto start

    – Philly Hot Apr 12 '18 at 17:24
  • @PhillyHot, it works for me according to the edited answer. I use only a desktop file (no shellscript). – sudodus Apr 13 '18 at 07:14