gcmd-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gcmd-dev] mime types and gnome-commander


From: Ken Taylor
Subject: [gcmd-dev] mime types and gnome-commander
Date: Tue, 7 Mar 2017 18:57:47 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

After reading the instructions regarding Handling MIMI types MANY times
and searching for other advice on the web re. this subject (of course I
found the same basic instructions) I finally hit on the missing piece.
How do I determine what MIME type am I trying to handle.  Of course file
--mime-type samplefile will do the trick. Now I am a usercreated.desktop
creating fool.

Until I came across this situation....

Video files e.g. "application/octet-stream" usually .mkv file extension
files were by default coming up in HandBrake when clicked in
gnome-commander. I therefore created/edited files in
~/.local/share/applications:

vlc-usercreated.desktop
--------------------------------
[Desktop Entry]
Name=vlc
MimeType=application/octet-stream;
Exec='/usr/bin/vlc'
Type=Application
Terminal=false
NoDisplay=true

Added this line to defaults.list

application/octet-stream=vlc-usercreated.desktop;

And added this line to mimeapps.list

application/octet-stream=vlc-usercreated.desktop

But it did not work.  My test .mkv file opened in HandBrake.  I removed
Handbrake (#yum erase HandBrake) and now the video will open in vlc as
expected.  I reinstalled HandBrake and again the test .mkv opened in
HandBrake.

I examined the files in /usr/share/applications. There I located the
file ghb.desktop which associates all sorts of media files with
HandBrake.  It appears that a .desktop file in /usr/share/applications
takes precedence over my usercreated.desktop. But that is not always true...

A text/plain file by default opens in LibreOffice writer from
gnome-commander.  I created pluma-usercreated.desktop to associate plain
old text files with Pluma (Mate equivalent to Gedit). And now they are.
In this case MY association overwrites the default. I like this better -
user's choice etc.

But it gets worse...  I have a plain text file of Windows parentage.
file --mime-type tells me it is text/plain. gnome-commander tells me
there is no application to open a file of type text/x-nfo. I added
text/x-nfo to my pluma.usercreated.desktop and the two .list files
described above.  Now the file will open in Pluma when clicked in
gnome-commander.

Applying my usual piƱata approach to problem solving (tie the problem up
in a bag and beat it with a stick until a solution comes out) I can deal
with this by deleting the ghb.desktop file - I do not want any MIME type
associated with HandBrake, adding these strange text types to my
pluma.usercreated.desktop as I come across them etc.  I am looking for
some advise/best practice recommendations.

Should I continue building my own .desktop files or should I add newly
found MIME types to the system wide .desktop files in
/usr/share/applications? Should I edit the system wide desktop files for
example to remove text/plain from LibreOffice writer instead of
overwriting the association with my usercreated.desktop files?

Does gnome-commander have internal rules regarding which .desktop it
obeys? or is that precedence a function of the OS and/or freedesktop.org
standard?  (If thee is such a standard - I am unable to find such a thing.)

Thanks,

Ken Taylor

Clayton, NC USA





reply via email to

[Prev in Thread] Current Thread [Next in Thread]