linux - Screen message "Must be connected to a terminal" when using option -D -R SessionName -
hi have script in bash check mp4 file , if find more 1 start playing them 1 one.
script working command line when log in ssh.
but when reboot rpi, not start autostart in rc.local saying
"must connected terminal"
this part of script
if [ "$count_dir_video" -gt "1" ] ;then 53 54 # make background black hide wallpaper between videos 55 display=:0 screen -dms "black_background" feh -fxyqz /opt/scripts/black_background.jpg 56 echo "przed sleep" 57 #screen -dms "$1" sleep 5 58 echo "po sleep" 59 60 while : 61 62 entry in $root_dir_video 63 64 65 # multiple files 66 echo "przed omx" 67 screen -d -r "$1" omxplayer -o hdmi -p -b --no-osd --vol 100 "$entry" >> /var/log/sds.log 68 echo "po omx" 69 done 70 done 71 else 72 73 # single file 74 75 screen -dms "$1" omxplayer -o hdmi -p -b --loop --no-osd --vol 100 "$root_dir_video" 76 fi
the problem in line 67 , cannot make work.
i tried other parameter screen combination same.
the idea start every entry in once named screen session.
man screen
-d -r attach here , now. in detail means: if session run‐ ning, reattach. if necessary detach , logout remotely first. if not running create , notify user. author's favorite.
use lowercase -d
-m
.
Comments
Post a Comment