[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gcmd-dev] Mime editor
Re: [gcmd-dev] Mime editor
Tue, 27 Nov 2007 04:05:02 +0100
> It is the zenity --text-info --editable dialog that has
> troubble when encountering at least "%f" (%F seemes OK).
What is %F ?
I can launch mimeedit without argument from commandline.
So i inserted %F in settings after path to mimeedit. (Lets'a abbreviate it m.e.)
However, clicking on Settings - >edit mimetypes still doesn't launch.
xession log shows mimeedit 'usage' saying it expects an argument.
> Gnome Commander calls "gnome-file-types-properties".
> > I tried to switch 'eog' to 'gqview.desktop' for jpg files however it didn't
> > work.
> What? "eog" is a command, "gqview.desktop" is not.
sloppy language, pls excuse. of course eog.desktop
ok...i did some testing. Here's the log...i hope you can draw some conclusions
About launching without argument.
When i launch m.e. from commandline without argument, the 'program selector'
Selecting kde-amarok.desktop gives empty window.
I remember i copied the /usr/share/applications/kde/amarok.desktop file and
erased unneccesary international naming stuff.
Here is the actual content:
(%U - is that a problem?)
As a sidenote, i'm slightly confused. Do you know why some mimetypes are like
x-* (like x-mp3) while others are like audio/mpeg ? While there is no audio/mp3.
However, i see audio/vorbis and additionally audio/x-vorbis...
Is there a complete list of all known mimetypes anywhere ?
Here is my users applications directory list:
I attach defaults.list and mimeinfo.cache. Note the  headers!
Some general notes about the selector:
- After selecting an app (and possibly editing) the script exits.
Perhaps it's more convenient to return to selector ? Because, after editing one
file a user could get the idea to edit more.
- The mimeinfo and default files aren't sorted, somehow sucking if you search
for something visually. Your script would be a good hook-in to do that, as a
nice side-effect :)
You could apply sort -u (just to be on the safe side). (Don't forget the header)
> Have you made any associations with file extensions?
> That is possible too you know, and that takes precedence
> over the mimetype and should thus be avoided if possible.
Here's something i note since long.
As a test case, let's focus on mp3: I can't the heck get gcmd launch amarok by
default. It always launched audacity. gcmd reports that as default app.
However, i have amarok in defaults and mimeinfo for mpeg, and no audacity
anywhere at all. Yet gcmd Alt+Enter reports audio/mpeg as mimetype. But m.e.
has amarok 'marked'.
What means "FASLE vlc.desktop" ? What means "soundconverter No_name" ?
It also has a checkbox with an empty line at the end.
I tried m.e. on an mp3 file and modified the default to audacity. That was
applied correctly in mimeinfo and defaults. I repeated that setting amarok
again. Also applpied correctly.
gcmd still reports audacity for audio/mpeg, and launches it accordingly.
Is this a bug ?
> You can also delete your ~/.local/share/applications directory and start
> (you could have a messed up dir)
I tried that.
After relaunching amarok (hoping it would create a new entry), i still have no
kde-amarok in the folder. I conclude that's only created on user request, by a
filemanager like nautilus (or now, m.e.).
I also restarted the session. Clicking a mp3 in gcmd still opens audacity
again, with ~/.local/share/applications still empty. Give me a brick.
My theory: The kde-amarok entry somehow is bad. Therefore the next application
would be chosen. However, there is none defined by user so /etc/mailcap is
used. There's indeed that audacity entry, and none for amarok. Since i don't
want to fiddle with mailcap at all, i tried to setup a new amarok entry with
(btw there's a message text artefact on top of that dialog '...separate them
with a colon' is redundant) but it says 'audio/mpeg already is assigned to
amarok'. Yet it displays audacity checked ! When i checked kde-amarok instead,
it says 'dafult was not changed'.
Later, it still shows audacity as default. The relevant files still contain
Why does it show audacity now as default ?
Interesting. I renamed kde-amarok.desktop to just amarok.desktop but m.e. still
has the old kde-amarok entry (and missing the new one).
Restarting gcmd didn't change that fact.
Then i also deleted the pointer entries in mimeinfo and defaults, and again
Still m.e. shows kde-amarok...!
ok. I restarted the session.
m.e. still shows kde-amarok!
I removed the audio/x-mp3 entry in defaults.list - still kde-amarok.
I removed that entry in mimeinfo.cache - still kde-amarok !
(there was a [Default Applications] header artefact in mimeinfo now, sonewhere
in between, additionally to the regular [MIME Cache] header -- i remember to
have seen that before. Is that m.e. putting it there ?)
I replaced any kde-amarok.desktop entry by amarok.desktop, and restarted gcmd.
Now...amarok is launched as default, by gcmd! But m.e. still shows kde-amarok
FALSE, and no amarok.desktop entry. It also shows MPlayer FALSE...
That'S weird though. Why without .desktop suffix ? Why FASLE ? There is no
mplayer desktop file, and no pointer entry at all, in any file, as a grep
mplayer is installed of course. I can launch it via gmcd.
I restarted the session again (and this time ensured no gnome daemon still
Yet m.e. has kde-amarok FASLE ...and even a grep could not find any kde-amarok
anywhere. Why does m.e. not show my amarok.desktop file ? It's in defaults and
mimeinfo, and work via gmcd now.
I launched m.e. selector (no args). It shows amarok, not kde-amarok.
However, trying to edit amarok.desktop doesn't work. stderr says,
cat: /usr/share/applications/amarok.desktop: No such file or directory
- so i assume m.e. looks for .desktop files in /usr/share.
ok, i accepted the unavoidable and for heavens sake renamed it to
amarok-usercreated.desktop. (I think, however, that any file in
~/.local/share/applications should be considered to be usercreated or
usercustom or whatever, just as a matter of facts, so the name should be
....m.e. still has kde-amarok.
I give up ! It's very late and i already spent several hours on that.
And what about the subdirectory /usr/share/applications/kde ?
There's a lot of stuff stuff in:
No kde-amarok...i think i gcopied that file some months ago, and they removed
it meanwhile (replacing it by just amarok.desktop), as there are no other kde-*
I wonder about the above kde files. For example the arts entry says
Exec=kcmshell arts, but i have no arts installed. There's another entry
'audiocd' with Exec=kcmshell audiocd, but there's no program of that name. You
can also see 'colors' and 'bell' and 'cookies' and 'dma' and such stuff. Even a
desktop.desktop entry, (which contains a 'Docpath' entry launching kcontrol and
siplaying some index.html file.)
This all looks like internal kde proxies/frontends (e.g. providing that
inserted audiocd will be recognized and autplayed).
I can see no kde file at all in /usr/share/applications, with 2 exceptions:
qt4config (not strictly a kde app) and k3b, which - funny enough - has no
entry in the kde subfolder.
Maybe it's no more seen as strict kde app.
Magnus, i don't like to shock you even more, but i feel obliged to mention that
there seems to exist yet another system in /usr/share/application-registry.
For example, gimp entry looks like
name=GNU Image Manipulation Program
Another weird thing is, there isn't any /usr/share/amarok folder, but usually
packages have some shared default files like themes, icons there. There are
e.g. bluefish, claws-mail, or audacity, and many many others (including all
However, there's /usr/share/apps and there is amarok, k3b, digikam, quanta,
krusader, and all the other kde stuff. And a folder LICENSES with gpl,
artistic, bsd licenses...
To me that all looks like either KDE doesn't interpret freredesktop like gnome,
or maybe they just aren't ready for that by now. This is KDE 3.5.8.
Not to mention googleearth - they have a desktop entry now in the right place
now, but there's still this ~/.local/share/mime folder with its own structure.
I believe this is an obsolete artefact now, and i'll try out if i can delete it
-- I moved back my previous 'applications' folder for the time being. I added
much stuff there, especially weird mimetypes (like audio/aac or video/3gp, for
noka mobile files) and i would appreciate not having to put it up again from
I would really like to know how to start the 'selector' from gcmd via
Settings-Edit mimetypes. And i like to know a more efficient way to test m.e. -
do i always have to restart gcmd, or restart the session ?
Description: Binary data
Description: Binary data