--
You received this message because you are subscribed to the Google
Groups "Razor-qt" group.
For more options, visit this group at
http://groups.google.com/group/razor-qt?hl=en
On Friday 02 March 2012 21:14:38, Александр Соколов wrote:
> We distribute these files temporarily. We are trying to push <http://We
> distribute these files temporarily. We are trying to push them upstream.> them
> It looks to me as if the upstream forgot about them, and the patches
> Petr made no longer work against the current version. Maybe remind them
> again? (open a bug?)
a bug report is there already:
https://bugs.freedesktop.org/show_bug.cgi?id=45295
also bump email has been sent to portland mailing list today.
p.
p.
Indeed. Most desktops have a dedicated tool that does that job properly, e.g.
also taking user settings into account.
Speaking as one of the original authors of xdg-open, it is intended as an
adapter, so independent programs have one interface to call.
The original idea of all xdg-utils script was to provide a short term solution
with easy to satisfy (and as little as possible) dependecies until a proper
solution can be reliably be assumed to be present.
Unfortunately that second phase was kind of derailed when money came into play
(some implementations got kickstarted with Linux Foundation money but became
unmaintained after delivery).
The idea was that a desktop specific session service would provide the xdg-
utils functionality through D-Bus interfaces. I think the current state is
that some of the functionality has been implemented that way, e.g. screensaver
inhibition, but others like opening URLs has not.
There might be others as well, I am not following the development closely
enough anymore.
Cheers,
Kevin
>
> J. Leclanche
>
> On Fri, Mar 2, 2012 at 6:03 PM, Petr Vanek <pe...@scribus.info> wrote:
> > On Mar 2, 2012 (Friday), at 6:24 PM, Alec Moskvin wrote:
> > > It looks to me as if the upstream forgot about them, and the patches
> > > Petr made no longer work against the current version. Maybe remind them
> > > again? (open a bug?)
> >
> > a bug report is there already:
> > https://bugs.freedesktop.org/show_bug.cgi?id=45295
> >
> > also bump email has been sent to portland mailing list today.
> >
> > p.
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Razor-qt" group.
> > For more options, visit this group at
> > http://groups.google.com/group/razor-qt?hl=en
--
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
Application preference.
For example if you are the developer of a PDF reader you want to be able to
allow user clicks on URLs and they should be opened in the user's preferred
browser.
Or if you are developing an email program an you have attachments, you want to
be able to open them in the preferred application.
> URI opening has been implemented as a mime type, using
> x-scheme-handler/http and such.
>
> A further point I wanted to bring up was services. Applications should
> provide, in their .desktop file, the services they provide. I believe since
> I mentioned it last, Android got an implementation that follows the same
> path (using reverse DNS). Brought to the desktop though, the idea would be
> to have services such as IRC client, Web browser, email client, IM client,
> window manager, etc.
>
> There is some overlap with x-scheme-handler, but there is indeed a case for
> it. Window managers for example do not handle URIs and do not have their
> own schemes, while IM clients would have multiple schemes (xmpp, aim, ...).
> The hard part is defining the split between the two: I do not think
> services should try to bind themselves to mime types/uris as it's a can of
> worms, it's more to be able to make a button that says "Opens your default
> web browser".
The potential service I wrote about would not associate itself with any MIME
type or URI scheme, it would provide an implementation for an API application
developers can delegate launching to.
Of course, ideally there would be only one such implementation, shared between
all workspace implementations.
I haven't checked respective specifications for quite some time, last time I
did user preference were still highly desktop dependent (e.g. GNOME storing
them very differently than KDE, and so on).
If there is already an accepted specification for this, then it would probably
be best (for compatibility) to implement xdg-open such that it uses that
information directly instead of delegating to desktop specific helpers.
Cheers,
Kevin
Yes, I knew that :)
> If you develop a pdf reader and want to click links, my
> version of xdg-open would see it's an url and look for an app that binds
> x-scheme-handler/http.
Right. So I have Konqueror and Firefox installed. How do you decide which one
to launch?
> Same deal with an email client: xdg-open would look
> at the file's mime type and look for a .desktop file binding it.
>
> There is no need to go through DE-specific user settings as those .desktop
> / mimetype bindings are defined by the XDG spec (and gnome/kde respect
> them).
I know, I was talking about user preference, not capability.
So, given multiple applications capable of opening a given MIME type, how does
your implementation of xdg-open know which one to use?
On Mar 2, 2012 (Friday), at 7:09 PM, Jerome Leclanche wrote:
> While improvements to the current xdg-open are great, my proposal was about replacing it by a completely new non-shell script that relies on proper xdg parsing.
we have to take care about xdg-tools. Mainly because Qt uses it internally to open URLs with QDesktopServices.
Ah, interesting. Didn't know there was a spec covering this part. Is this an
extension of the desktop-entry spec or a new one?
> mimeapps.list can be customized by the DE, xdg would check that one. The
> list is parsed in order, if any doesn't exist, it's skipped.
> mimeinfo.cache is generated by update-desktop-database.
Hmm, I have a fairly up-to-date Debian/unstable system but I don't have any
mimeinfo.cache or update-desktop-database. Which package should those be
coming from?
Looks promising, however I am entirely sure this will cover all cases.
I found one mimeapps.list file on my system (in
$HOME/.local/share/applications) but it only contains very few entries.
For example it does not contain any entry for image/jpeg and I definitely have
multiple programs installed which are capable for opening that type.
Yet when I click on such a file it always opens one specific program.
Cheers,
Kevin
I see. I don't have desktop-file-utils installed so it is not a dependency of
anything. Very likely because of separate caching as you say.
> mimeapps.list comes in *addition* to .desktop files, as it is the file that
> is supposed to define your custom assignments (for example: I want to
> assign image/jpeg to google-chrome even though none of its .desktop files
> specify it). You can also specify, in it, the desktop files you do NOT want
> associated with a mime type, even though they are (eg. I do not want
> google-chrome.desktop to be associated with application/pdf, even though it
> is).
So this is more a way to change the information provided by .desktop files
without changing those files directly?
Since I have multiple applications capable of reading image/jpeg according to
their .desktop files, shouldn't there be an entry "removing" that information
for all but one?
When I grep through /usr/share/applications and its subdirectories for
image/jpeg I get four hits:
iceweasel.desktop, gwenview.desktop, okularApplication_kimgio.desktop and
gimp.desktop
I have no image/jpeg entry in mimeapps.list
Yet, when I click any JPEG image in my filemanager or email program or run xdg-
open on such a file they *always* opens in Gwenview.
In your implementation would that be the return value of
ACTIONS.defaultApplication(mime)?
Cheers,
Kevin
>
>
> J. Leclanche
>
On Monday, 2012-03-05, Jerome Leclanche wrote:I see. I don't have desktop-file-utils installed so it is not a dependency of
> update-desktop-database is shipped in desktop-file-utils. I don't believe
> it's all that widely used though as gnome-open / kde-open implement their
> own caching algorithm probably.
anything. Very likely because of separate caching as you say.
So this is more a way to change the information provided by .desktop files
> mimeapps.list comes in *addition* to .desktop files, as it is the file that
> is supposed to define your custom assignments (for example: I want to
> assign image/jpeg to google-chrome even though none of its .desktop files
> specify it). You can also specify, in it, the desktop files you do NOT want
> associated with a mime type, even though they are (eg. I do not want
> google-chrome.desktop to be associated with application/pdf, even though it
> is).
without changing those files directly?
Since I have multiple applications capable of reading image/jpeg according to
their .desktop files, shouldn't there be an entry "removing" that information
for all but one?
When I grep through /usr/share/applications and its subdirectories for
image/jpeg I get four hits:
iceweasel.desktop, gwenview.desktop, okularApplication_kimgio.desktop and
gimp.desktop
I have no image/jpeg entry in mimeapps.list
Yet, when I click any JPEG image in my filemanager or email program or run xdg-
open on such a file they *always* opens in Gwenview.
In your implementation would that be the return value of
ACTIONS.defaultApplication(mime)?
> > Since I have multiple applications capable of reading image/jpeg
> > according to
> > their .desktop files, shouldn't there be an entry "removing" that
> > information
> > for all but one?
>
> No. Removing entries is only necessary if you *never* want to open a file
> with the given app; eg act as if it was never defined in the MimeType key
> of the desktop file.
I see, thanks for clarifying.
> > When I grep through /usr/share/applications and its subdirectories for
> > image/jpeg I get four hits:
> > iceweasel.desktop, gwenview.desktop, okularApplication_kimgio.desktop and
> > gimp.desktop
> >
> > I have no image/jpeg entry in mimeapps.list
> >
> > Yet, when I click any JPEG image in my filemanager or email program or
> > run xdg-
> > open on such a file they *always* opens in Gwenview.
> >
> > In your implementation would that be the return value of
> > ACTIONS.defaultApplication(mime)?
>
> My implementation only reads from mimeapps.list and mimecache.info, it does
> not build its own ordering by parsing desktop files one by one. That is
> defined in mimecache.info and it relies on update-desktop-database to
> generate that. If u-d-d decides that gwenview must be first, then it'll be
> the default output indeed. (Or if it's second and the first one does not
> exist. I have a feeling it's done alphabetically...)
Hmm, I am not convinced. gwenview.desktop is not the first one alphabetically
(gimp.desktop is), I don't have any mimecache.info (due to not having update-
desktop-database) and I don't have any entry for image/jpeg in mimeapps.list
But I guess the best way is to run the script you are proposing as an xdg-open
replacement and check that it indeed behaves like xdg-open.
If I clone the repository from github, which script to I invoke? Do I have to
set some environment variable or install somewhere?
Cheers,
Kevin
didn't have time to test yet but I guess there is currently still a difference
in behavior due to not everything being specified yet and thus unlikely
implemented uniformly enough.
I just wanted to point out that in order for the spec to move forward you'll
have to contact the main xdg mailinglist. The Portland project is at this
stage only one implementor or user of certain specs.
In order for any spec to succeed it needs support from "the big guys" (at
least GNOME and KDE) and discussions for that happen on the main
freedesktop.org list.