[FFmpeg-user] Unable to initialize SDL, over X11 for only root
secjeff at gmail.com
Tue Apr 3 01:44:58 EEST 2018
Moritz & Cley,
Thanks for the responses! I believe I checked most of these points, but I will do so more methodically to ensure I didn’t miss anything.
As far as why on the root user, I’m only speculating that’s how this application is working. I know its daemon runs as root, so I’m guessing that why it’s having issues calling ffplay. That said, a daemon calling it is different than me starting an interactive shell and calling it, so as you point out that may be where my issue is! I will dig into this more tomorrow and let you all know what I find.
Thanks again! I appreciate the great support you all provide.
> On Apr 2, 2018, at 07:46, Moritz Barsnick <barsnick at gmx.net> wrote:
> Hi Jeff,
>> On Sun, Apr 01, 2018 at 16:28:28 -0400, Jeff wrote:
>> However when running *ffplay* as the root user over X11 on the same files,
>> I am getting met with the '*Unable to initialize SDL*' error.
> First of all: *WHY*?? There is usually no good reason to run anything
> as root, if you are not administrating the system. If the user and
> ffplay need access to some files or devices, grant the user access,
> instead of using root.
>> I came across this (
>> thread/post form Moritz indicating there may be an issue using ffplay as
> The user never gave indication as to what he was doing, so we can't
> know. My questions in the last e-mail are still valid.
>> In this particular case, there is a program daemon which is run as root
>> that calls ffplay. This is why the call is being made by the root user.
> A daemon that has access to a display? In that case, ffplay should be
> called as something like "su <displayuser> -c 'ffplay'".
>> It seems something is different in the case of root over X11 vs. a direct
>> terminal call from the root user's desktop, but I don't have the foggiest
> I don't see a specific ffmpeg / ffplay issue. See Cley's answer: No X11
> program may work at all. It has always been that way, at least for the
> last 20 years or so. X11 uses "cookie authentication". To allow root to
> use the user's cookies, you can either:
> - open up access to the display using "xhost +local" (giving up all
> - migrate the auth cookie to the root process,
> - use sudo from the user account to root (I think),
> - log into root's account with "ssh -X" (which will automatically
> migrate the cookie and give access via an SSH tunnel).
> The latter two require interactive use, I guess.
> Extra issue: If your display uses Xwayland, some of the above no longer
> work. See also e.g. here:
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user