Discussion:
mimeo
Xyne
2016-01-16 19:38:46 UTC
Permalink
Hi everyone,

Several years ago I wrote a few command-line tools to manage application
associations. These were eventually merged into my project, Mimeo, which has
been mildly successful on Arch Linux as a desktop-agnostic file and URL opener.
The codebase was ugly because of the way it had been gradually hacked together
but it worked relatively well. Nevertheless, a completely rewrite in Python 3
has been pending for years.

I have finally taken some time to do it and the new codebase is now up. It is
much cleaner and it should be much easier to maintain. A number of
inconsistencies have also been fixed.

Here are some of the features:

* Open files and URLs by MIME-type associations.
* Support for user-defined regular expression argument matching for further
customizability.
* Multiple commands to query information such as which desktops use a given
application, which MIME-types are associated with which desktops and vice
versa, the location of a given desktop file, the values of Desktop Entry
fields for given desktop files, etc.
* Modify the user's mimeapps.list file by adding or remove associations or
defaults.
* Options for determine if MIME-types are detected by name or by file content
first.

Please check the project page[1] for more along with usage examples and help
messages. I would appreciate any feedback, in particular about any deviations
from the standard (at least when not using the --deprecated flag).

Incidentally, I have not found any "standard" way to determine which terminal
command should be used for Desktop Entries that specify "Terminal=true". If
there is none, perhaps an environment variable such as XDG_TERM_CMD could be
added.

Regards,
Xyne

[1] http://xyne.archlinux.ca/projects/mimeo/
Xyne
2016-01-16 20:07:59 UTC
Permalink
Of course, my introductory message on a public mailing list has multiple errors.

s/completely/complete/; s/for/to/; etc.

The code should be better ;)


On 2016-01-16 19:38 +0000
Post by Xyne
Hi everyone,
Several years ago I wrote a few command-line tools to manage application
associations. These were eventually merged into my project, Mimeo, which has
been mildly successful on Arch Linux as a desktop-agnostic file and URL opener.
The codebase was ugly because of the way it had been gradually hacked together
but it worked relatively well. Nevertheless, a completely rewrite in Python 3
has been pending for years.
I have finally taken some time to do it and the new codebase is now up. It is
much cleaner and it should be much easier to maintain. A number of
inconsistencies have also been fixed.
* Open files and URLs by MIME-type associations.
* Support for user-defined regular expression argument matching for further
customizability.
* Multiple commands to query information such as which desktops use a given
application, which MIME-types are associated with which desktops and vice
versa, the location of a given desktop file, the values of Desktop Entry
fields for given desktop files, etc.
* Modify the user's mimeapps.list file by adding or remove associations or
defaults.
* Options for determine if MIME-types are detected by name or by file content
first.
Please check the project page[1] for more along with usage examples and help
messages. I would appreciate any feedback, in particular about any deviations
from the standard (at least when not using the --deprecated flag).
Incidentally, I have not found any "standard" way to determine which terminal
command should be used for Desktop Entries that specify "Terminal=true". If
there is none, perhaps an environment variable such as XDG_TERM_CMD could be
added.
Regards,
Xyne
[1] http://xyne.archlinux.ca/projects/mimeo/
_______________________________________________
xdg mailing list
http://lists.freedesktop.org/mailman/listinfo/xdg
David Faure
2016-03-20 10:31:06 UTC
Permalink
Post by Xyne
Incidentally, I have not found any "standard" way to determine which terminal
command should be used for Desktop Entries that specify "Terminal=true". If
there is none, perhaps an environment variable such as XDG_TERM_CMD could be
added.
Right, that doesn't appear to be standardized.

How it works right now is:

* If the application author wants a specific terminal, they can just change the Exec line
(and not use Terminal=true)

* Otherwise the implementation can choose (e.g. in the KDE implementation it's
user-configurable and defaults to "konsole").

=> I see. If you only implement a file manager and not a desktop environment,
then you have no default/preferred terminal to pick, you would like to simply find one
that exists, preferrably one that integrates with the current desktop environment.

Rather than an env var, I would advocate a mimetype-app association for this, of course.
Much easier for distros *and* users to configure correctly across multiple desktops, using
mimeapps.list, including <desktop>-mimeapps.list.

This would probably mean a fake scheme (x-scheme-handler/terminal), actually opening the
door to some meaning in a terminal:// URL (e.g. initial directory).

It seems a bit fake (there's no terminal:// URL scheme right now), but it at least maps to
the way we solved this for "default web browser", "default mailer", etc.
--
David Faure, ***@kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5
Loading...