gcmd-devel
[Top][All Lists]
Advanced

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

Re: [gcmd-dev] Mime editor


From: Magnus Stålnacke
Subject: Re: [gcmd-dev] Mime editor
Date: Wed, 28 Nov 2007 03:26:44 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20061201 Firefox/2.0.0.4

Michael wrote:

What is %F ?

I can launch mimeedit without argument from commandline.
So i inserted %F in settings after path to mimeedit.

No no no.
Just pass m.e. a filename. Nothing else!
That %f or %F, %U or whatever is just options
in those *.desktop files if you like to edit them
manually.

command %f = program opens single files, even if
             multiple files are selected.

command %F = Use for apps that can open several
             local files at once.

However, clicking on Settings - >edit mimetypes still doesn't launch.
xession log shows mimeedit 'usage' saying it expects an argument.

try: mimeedit.sh -help

If you want to change def. app for some file,
pass it the filename.

If you want to add a mimetype to an existing app,
start it without any arguments.


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.

Then pass it a file name of an existing jpg file.
Not, eog, gqview.desktop or similar...


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...

Have a look at your:
/usr/share/mime/aliases

Is there a complete list of all known mimetypes anywhere ?

Have a look at your:
/usr/share/mime/subclasses
and your global mimeinfo.cache

I attach defaults.list and mimeinfo.cache. Note the [] headers!

Thanks, i will have a look.

- 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.

Good point.

- 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)

Both the "app list" and the app list for a mimetype
is sorted here. It is sorted by "sort -u" (line 74 and
line 322 in the script).


What means "FASLE  vlc.desktop" ? What means "soundconverter  No_name" ?
It also has a checkbox with an empty line at the end.

Here is the bug. The "FALSE" part is not ment to be
shown. That is only ment to tell zenity which radiobutton
that should be checked. False = unchecked True the opposite.

This tells me that the script builds a list that zenity
do not understand correctly. I will look into this using
your files.

But that should not be a problem if you start fresh and
let the script build your applications dir.

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 ?

Probably the above.

You can also delete your ~/.local/share/applications directory and start fresh.
(you could have a messed up dir)

I conclude that's only created on user request, by a filemanager like nautilus (or now, m.e.).

Yes.

I also restarted the session. Clicking a mp3 in gcmd still opens audacity again, with ~/.local/share/applications still empty. Give me a brick.

Here comes brick, catch!

Delete the ~.local/share/applications dir, no need
to restat anything.
Run the script with a *.mp3 filename.
Chose your desired app from the list.
Done, now it should open with the chosen app.

That is how it works here.


I launched m.e. selector (no args). It shows amarok, not kde-amarok.

The selector choses the user version if there exists
both a global and a user .*desktop file containting
the same Exec=command

Could it be that "feature"?


And what about the subdirectory /usr/share/applications/kde ?

No idea.

There's a lot of stuff stuff in:

I wonder how you could get that many files in your
home dir. It should only contain changes from the
global, since there is no need to have anything
usercreated if the global works.


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.

Yea, it is a mess. I know.



but there's still this ~/.local/share/mime folder

I do not have that folder.
$tree .
.
`-- share
    `-- applications
        |-- defaults.list
        |-- display-usercreated.desktop
        |-- gedit-usercreated.desktop
        |-- gimp-2.2-usercreated.desktop
        |-- leafpad-usercreated.desktop
        |-- mimeinfo.cache
        |-- mpg123-usercreated.desktop
        |-- mplayer-usercreated.desktop
        |-- xmms-usercreated.desktop
        `-- xpdf-usercreated.desktop


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 ?

No. Any changes to mimeinfo.cache takes directly.

Settings-Edit mimetypes..
GCMD calls "gnome-file-types-properties"
And if you have a file named so in yor path it
will try to execute it.




reply via email to

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