[MPlayer-users] Re: direct mplayer output to a console

Fredrik Tolf fredrik at dolda2000.com
Fri Jun 18 19:41:54 CEST 2004


On Thu, 2004-06-17 at 21:43, Carl Karsten wrote:
> Details: I am trying to run startx with irexec which gets run from local.start
> and I want to be able to get to mplayer's output so I can see where and why it
> stopped when what it is playing is hosed.
> 
> Here is how I am currently doing it:
> 
> /etc/conf.d/local.start:
> su - carl -c '/usr/bin/screen -d -m /usr/bin/irexec'
> 
> /home/carl/.lircrc:
> begin irexec
>         begin
>                 remote = CREATIVE_INFRA_DVD
>                 button = play
>                 prog=irexec
>                 config=PATH=/usr/X11R6/bin:/bin:/usr/bin startx -e
> /usr/local/bin/mplayer /mnt/auto/cdrom/*
>         end
> 
> startx displays it's stuff to the screen session.  mplayer opens 2 X windows: 1
> for the movie, one for it's console output.  When mplayer stops the console
> window closes.  While it is playing, the console keyboard controls mplayer (the
> one hooked to the box running mplayer.)
> 
> I would like the console output to go to a screen session.  That way I can
> connect from my laptop that is near the couch and see what is going on, and give
> it keyboard commands.

That's because of the way you use startx - it will fork an xterm and
start mplayer inside it. Try this command instead:

config=PATH=/usr/X11R6/bin:/bin?usr/bin xinit /usr/local/bin/mplayer
/mnt/auto/cdrom/*

That is, without the -e and with xinit instead of startx (since xinit
has a strict functionality but startx differs from different platforms).
If the first argument to xinit contains a slash, it will interpret that
as the command to start on the X server (the X session). You probably
want to add -fs to mplayer as well so that it runs in fullscreen mode.

Fredrik Tolf





More information about the MPlayer-users mailing list