[MPlayer-users] Starting mplayer from inittab breaks slave mode
Ron Johnson
ron.l.johnson at cox.net
Thu Mar 29 12:19:59 CEST 2012
On 03/29/2012 12:53 AM, Roguedr wrote:
> Not sure if this is a mplayer issue or some misunderstanding about how
> linux works.
>
> I intend to have a media player set up that starts mplayer on boot and
> is controlled to slave mode.
> I created a fifo file and stored all the configuration in the
> /etc/mplayer/mplayer.conf file. Then I tested mplayer from the command
> line and everything works well.
>
> Next step was to put mplayer in inittab using something like:
>
> mp:2345:respawn:/usr/bin/mplayer -idle
>
> This works well, i.e. mplayer starts (tested this with a video file
> and it plays). However mplayer does not attach to the fifo pipe.
> I tested this with 'lsof' and mplayer simply does not attach to the
> pipe. Even with aggressive logging I was unable to identify any error
> messages.
>
[snip]
>
> Next I set up autologin for a user and put mplayer in the login
> script. This works, mplayer plays and is attached to the pipe for
> slave mode.
>
>
> Question is, why does mplayer attach to the pipe only in case of an
> interactive login? Is this expected behaviour?
>
Probably because mplayer started through inittab runs as root and I'm
betting there's a security/permissions issue with allowing unpriv users
attach to pipes owned by root.
A different method that *might* work is to put this in rc.local:
su -l -c 'mplayer -idle' joe
--
"There is usually only a limited amount of damage that can be
done by dull or stupid people. For creating a truly monumental
disaster, you need people with high IQs."
Thomas Sowell
More information about the MPlayer-users
mailing list