[MPlayer-dev-eng] [PATCH] set absolute path to fbset in TOOLS/mpconsole
D Richard Felker III
dalias at aerifal.cx
Thu Oct 10 05:27:04 CEST 2002
On Wed, Oct 09, 2002 at 05:17:56AM +0200, Diego Biurrun wrote:
> On Tue, Oct 08, 2002 at 10:03:11PM -0400, D Richard Felker III wrote:
> > On Wed, Oct 09, 2002 at 01:43:03AM +0200, Diego Biurrun wrote:
> > > Under Debian fbset is under /usr/sbin/fbset and therefore not in the
> > > path of a normal user. Therefore TOOLS/mpconsole fails to run for me as
> > > normal user. I suspect that other distros have fbset under /usr/sbin/
> > > also, but I cannot check that, I only have Debian. If you can confirm
> > > this for other distros, I will apply this trivial patch.
> > Putting fbset here is nonsense, and hardcoding a path is not a good
> > idea anyway. Fortunately, that code is mostly obsolete, since mplayer
> > now automagically grabs the dimensions for /dev/fb0 or $FRAMEBUFFER
> > (if possible) when using -vo fbdev or mga. I dunno about vesa/vidix
> > stuff since I've never used it.
> You are of course right, I was unhappy with hardcoding that path anyway.
> You can achieve the same effect with a much simpler script nowadays:
> setterm -cursor off
> mplayer -vo mga "$@" &> /dev/null
> setterm -cursor on
Don't do it this way. The trap is necessary to restore the cursor in
case the user aborts with ^C, etc. Also &> is questionable; I dunno
whether it's standard or a bash extension. >/dev/null 2>&1 is
equivalent and definitely works everywhere.
> Because as you say there is no need to "compute" the dimensions by hand
> anymore. But this gets asked over and over again, so it is kind of a
> shame to let this script go to waste. If it is really obsolete we
> should probably remove it entirely.
IMHO getch2 code in mplayer should disable and enable cursor. Then the
script would be 100% obsolete.
> > Anyway, if you still want to 'fix' it, try something like:
> > res=`PATH="$PATH:/usr/sbin" fbset | grep geometry | sed 's/^ *//'`
> Sounds good, if nobody objects, I will make this change.
Fine with me.
More information about the MPlayer-dev-eng