Unifying file managers' right-click menu interfaces

Eugene Gorodinsky e.gorodinsky at gmail.com
Tue Aug 18 07:03:36 PDT 2009


It's not just the Open With menu entries/submenu. It's much more. Here
are a few examples: there are scripts for both konqueror/dolphin (?)
and nautilus that allow the user to open a terminal window in a
specific folder by rightclicking and choosing a specific menu item.
There is also a send-to menu, which could be used by programs as well.
Moreover these things can be either system-wide or user-specific (not
every user needs to have an open-terminal menu entry)


[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=image/*;
Actions=setAsWallpaper

[Desktop Action setAsWallpaper]
Name=Use As Wallpaper
Icon=background
Exec=dcop kdesktop KBackgroundIface setWallpaper %U 6

The konqueror service menus format looks nice, however I don't
understand the need for a SeviceTypes entry (the desktop file spec
clearly states, that desktop files of type other than Link,
Application or Directory should be ignored, so that field could have
been reused for service menus by adding a type like KonqServiceMenu or
something). One other thing that I find strange is having several
actions in one file - this way in order to get rid of the actions the
user doesn't need, she has to manually edit these files, rather than
just delete the file. Another problem comes up when two applications
want to add the same action for the same mimetype(s). For example two
archivers might want to add an "Extract..." action to
application/x-bzip mimetype, or two editors might want to add an
"Edit" action for text files. If both are added, it will look ugly and
annoy the user, since it's hard to tell which entry opens which
program, if one replaces the other, that will also annoy the user if
the previous application is what she wanted to have. It seems to me
that the only way to not run into this sort of problems is by using a
common set of API.


2009/8/17 David Faure <faure at kde.org>:
> On Sunday 16 August 2009, Eugene Gorodinsky wrote:
>> As it currently stands nautilus has one way of adding an entry to the
>> right-click menu and konqueror has another (and I'm not sure about
>> other file managers). I believe it would be very beneficial for
>> everyone to have some standard way of accessing the menu (e.g. adding,
>> modifying or deleting an entry). Thus an application could add itself
>> to the file manager's context menu without worrying what filemanager
>> the user is using.
>
> Are you talking about Open With... or (what is in kde called) Actions / ...?
>
> The first one is almost-standardized already, since it comes from the app-mime
> associations (except that from what I heard gnome sorts alphabetically while
> kde sorts by user preference).
>
> The second one is indeed not standardized yet. KDE uses the previously-standardized
> (and removed from the spec, but should be re-added IMHO) support for actions
> defined in .desktop files.
> http://techbase.kde.org/Development/Tutorials/Creating_Konqueror_Service_Menus
> Note that even though the "format" is a former standard, the location of the files
> and necessary ServiceTypes entry is not cross-platform. But I'm ok with
> switching that to a different solution (different location and/or way to identify
> the relevant desktop files). I think it makes a lot of sense to use the Actions=
> "former-spec" though.
>
> How do other environments do it?
>
> --
> David Faure, faure at kde.org, sponsored by Qt Software @ Nokia to work on KDE,
> Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
>


More information about the xdg mailing list