Page 1 of 1

Hide Desktop/Terminal behind video

Posted: Wed Sep 26, 2012 11:24 pm
by glong
So, I am using hello_video to playback videos, and calling it from a shell script in order to play different videos (the script is doing the logic to determine which video). It is functioning fine, but when I call a new video, there is a pause in between during which I can see the terminal (or desktop if I'm in a gui session). Now, I am fine with a short pause (less than 1 sec), but I do not want the terminal (or anything else for that matter) to be visible during that interval. Is there some way to have the script black out the background while it is running?

Re: Hide Desktop/Terminal behind video

Posted: Wed Sep 26, 2012 11:30 pm
by Dweeber
From a bash script

Code: Select all

clear > /dev/tty1
Will clear the monitor and leave it black.

Re: Hide Desktop/Terminal behind video

Posted: Thu Sep 27, 2012 11:31 pm
by glong
Works! Awesome! I knew it would be something simple like that. Total linux noob, so thanx.

Re: Hide Desktop/Terminal behind video

Posted: Sat Dec 29, 2012 6:59 am
by jmantissa
I'm not seeing any results here, using the following code:

Code: Select all

#!/bin/bash
clear > /dev/tty1
omxplayer -o local movie.mp4
is this supposed to clear the entire display ... or just the terminal window?

thx++

jeremy

Re: Hide Desktop/Terminal behind video

Posted: Sat Dec 29, 2012 11:12 pm
by Dweeber
It does clear the whole screen... but the omxplayer then outputs text before it starts the video.

They key is to clear the screen and then add some echo's so that the start of the text is where the video will be when it starts.. then you have a completely black background while the video which doesn't cover the whole screen runs.

Code: Select all

#!/bin/bash
clear > /dev/tty1
echo; echo;echo; echo; echo;
omxplayer -o local movie.mp4
Adjust as needed...