yami_ wrote:You can actually see it by using
strace:
Code: Select all
term% strace palemoon &>trace.log
term% grep "open(.*\.so.*)" <trace.log | more
The strace command with output redirection to file proved to be
very helpful! I am still investigating. Here is what I have found with its help so far:
Palemoon loads all relevant libraries for the various formats. It does not seem to be a library issue:
Code: Select all
openat(AT_FDCWD, "/usr/lib64/libavcodec.so.58", O_RDONLY|O_CLOEXEC) = 84
...
openat(AT_FDCWD, "/usr/lib64/libswresample.so.3", O_RDONLY|O_CLOEXEC) = 84
...
openat(AT_FDCWD, "/usr/lib64/libavutil.so.56", O_RDONLY|O_CLOEXEC) = 84
...
openat(AT_FDCWD, "/usr/lib64/libvpx.so.3", O_RDONLY|O_CLOEXEC) = 84
...
openat(AT_FDCWD, "/usr/lib64/libfdk-aac.so.1", O_RDONLY|O_CLOEXEC) = 84
...
openat(AT_FDCWD, "/usr/lib64/libmp3lame.so.0", O_RDONLY|O_CLOEXEC) = 84
...
openat(AT_FDCWD, "/usr/lib64/libopus.so.0", O_RDONLY|O_CLOEXEC) = 84
...
openat(AT_FDCWD, "/usr/lib64/libspeex.so.1", O_RDONLY|O_CLOEXEC) = 84
...
openat(AT_FDCWD, "/usr/lib64/libtheoraenc.so.1", O_RDONLY|O_CLOEXEC) = 84
...
openat(AT_FDCWD, "/usr/lib64/libtheoradec.so.1", O_RDONLY|O_CLOEXEC) = 84
...
openat(AT_FDCWD, "/usr/lib64/libvo-amrwbenc.so.0", O_RDONLY|O_CLOEXEC) = 84
...
openat(AT_FDCWD, "/usr/lib64/libx264.so.152", O_RDONLY|O_CLOEXEC) = 84
...
openat(AT_FDCWD, "/usr/lib64/libx265.so.160", O_RDONLY|O_CLOEXEC) = 84
...
openat(AT_FDCWD, "/usr/lib64/libxvidcore.so.4", O_RDONLY|O_CLOEXEC) = 84
...
(I have omitted, or missed, quite a few in the above list)
At first, I saw that PM was trying to access
Realplayer (that's an application I had 10 years ago!
). It reads the user
mailcap file, then the system-wide
mailcap and associates
application/ogg with
realplay:
Code: Select all
openat(AT_FDCWD, "/home/XXXXXX/.mailcap", O_RDONLY) = 81
read(81, "application/vnd.sun.xml.writer;/"..., 4096) = 4096
read(81, "lplay %s\napplication/ogg;/usr/li"..., 4096) = 3055
read(81, "", 4096) = 0
close(81) = 0
openat(AT_FDCWD, "/etc/mailcap", O_RDONLY) = 81
read(81, "\ntext/plain; less '%s'; needster"..., 4096) = 2235
read(81, "", 4096) = 0
close(81) = 0
openat(AT_FDCWD, "/home/XXXXXX/.mailcap", O_RDONLY) = 81
read(81, "application/vnd.sun.xml.writer;/"..., 4096) = 4096
read(81, "lplay %s\napplication/ogg;/usr/li"..., 4096) = 3055
read(81, "", 4096)
This stale association indicates that it is a MIME misconfiguration: I had 10-year old
~/.mailcap and
~/.mime.types files. The latter had
"mime types added by Netscape Helper"...These did not seem to be bad (there were only a few sound-related entries, all about MP3), but the user
~/.mailcap file was worse:
Code: Select all
#mailcap entry added by Netscape Helper
application/x-ogg;/usr/lib/RealPlayer10/realplay %s
application/ogg;/usr/lib/RealPlayer10/realplay %s
text/vnd.rn-realtext;/usr/lib/RealPlayer10/realplay %s
image/vnd.rn-realpix;/usr/lib/RealPlayer10/realplay %s
application/smil;/usr/lib/RealPlayer10/realplay %s
audio/mp3;/usr/lib/RealPlayer10/realplay %s
audio/x-mp3;/usr/lib/RealPlayer10/realplay %s
audio/mpeg;/usr/lib/RealPlayer10/realplay %s
audio/mpg;/usr/lib/RealPlayer10/realplay %s
audio/x-mpeg;/usr/lib/RealPlayer10/realplay %s
audio/x-mpg;/usr/lib/RealPlayer10/realplay %s
audio/mpegurl;/usr/lib/RealPlayer10/realplay %s
audio/x-mpegurl;/usr/lib/RealPlayer10/realplay %s
audio/wav;/usr/lib/RealPlayer10/realplay %s
audio/x-wav;/usr/lib/RealPlayer10/realplay %s
audio/x-pn-wav;/usr/lib/RealPlayer10/realplay %s
audio/x-pn-windows-acm;/usr/lib/RealPlayer10/realplay %s
audio/x-pn-windows-pcm;/usr/lib/RealPlayer10/realplay %s
...and lots more! I renamed both files. Now the only
mailcap and
mime.types files available are the system-wide ones
/etc/mailcap
/etc/mime.types
as installed by their respective packages,
net-mail/mailbase
app-misc/mime-types
and without any changes by me. After that I updated the MIME database:
Code: Select all
(for each user) $ update-mime-database ~/.local/share/mime/
(as root) # update-mime-database /usr/local/share/mime/
Now, the situation is still the same, but what I am getting in the trace log file is that, for example, for the .ogg file it seems to think that it has to load
kaffeine (or even
quicktime?):
Code: Select all
stat("/usr/share/mime/mime.cache", {st_mode=S_IFREG|0644, st_size=171912, ...}) = 0
openat(AT_FDCWD, "/usr/share/applications/org.kde.kaffeine.desktop", O_RDONLY) = 80
fstat(80, {st_mode=S_IFREG|0755, st_size=5298, ...}) = 0
read(80, "[Desktop Entry]\nName=Kaffeine\nNa"..., 4096) = 4096
read(80, "x-ogg;application/x-quicktime-me"..., 4096) = 1202
read(80, "", 4096) = 0
close(80) = 0
...a few lines further:
stat("/usr/bin/kaffeine", {st_mode=S_IFREG|0755, st_size=1431592, ...}) = 0
openat(AT_FDCWD, "/home/XXXXXX/.local/share/mime/audio/flac.xml", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/local/share/mime/audio/flac.xml", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/mime/audio/flac.xml", O_RDONLY) = 80
fstat(80, {st_mode=S_IFREG|0644, st_size=537, ...}) = 0
read(80, "<?xml version=\"1.0\" encoding=\"ut"..., 537) = 537
close(80)
It is interesting that, in the above, it does not open
/usr/share/mime/audio/ogg.xml
but (at least it seems so) it goes directly to
/usr/share/mime/audio/flac.xml
I still have to find out how
kaffeine makes it into the
mime.cache file, as I haven't found any .xml file containing 'kaffeine' and used by
mime-update-database...
Any hints are welcome, as always...
An interesting question is why Palemoon (a browser) honours the user and system mailcap files (which are email-related). This seems to be a legacy from times when the browser was a
suite, containing also a mail client...
And why don't I see *any* of the MIME associations read into the browser under Preferences -> Applications - besides ZIP, Podcast, Video podcast and Web feed? It would be helpful to see if the browser associates .ogg files with
kaffeine, for example. That would make such excursions to config hell less necessary...