.desktop file spec for media handling: desktop-entry-hotplug-spec (was: gvfs bof notes)
- From: Christian Neumair <chris gnome-de org>
- To: gnome-hackers gnome org
- Cc: devel-announce-list gnome org
- Subject: .desktop file spec for media handling: desktop-entry-hotplug-spec (was: gvfs bof notes)
- Date: Sun, 08 Oct 2006 17:41:06 +0200
Am Sonntag, den 08.10.2006, 04:30 +0200 schrieb Alexander Larsson:
> Here are some short notes from the gvfs bof on saturday at the boston
> summit:
>
> (...)
> * We would like to extend the desktop spec and the mimetype spec. The
> desktop spec needs a much better way to specify what types of URIs the
> apps supports (that can handle pluggable systems). Desktop files and the
> mime system should support actions other than "open".
I'm not sure what you mean by "handl(ing) of pluggable systems" by
applications, but I once decided to come up with a spec for
gnome-volume-manager that would allow categorization of applications
handling media, and that could be used to build the application lists
that a user can pick on media insertion.
It would work by adding more Exec lines, one line for each extra medium
type.
Note that I already submitted this spec to Robert Love, David Zeuthen
and Jeffrey Stedfast, but I didn't receive any feedback, so it might not
match some quality requirements, or others don't see the need for such a
spec.
Since GnomeVFS is media type-aware and application-aware, if the same
thing is planned for GVfs, the idea of this spec might yield some useful
ideas.
--
Christian Neumair <chris gnome-de org>
Freedesktop.org Specification
Name: Desktop Entry Hotplug Exec Specification
Version: 0.0.1 (Draft)
Authors: Christian Neumair <chris gnome-de org>
Audience: freedesktop.org xdg mailing list <xdg lists freedesktop org>
Robert Love <rml novell com>
Jeffrey Stedfast <fejj novell com>
David Zeuthen <davidz redhat com>
1 Introduction
Since the introduction of kernel and userspace device hotplugging technology in free UNIX operating systems like GNU/Linux, frameworks
consisting of several layers have been invented to give desktop user the possibility to directly take actions regarding the connected
devices. One example of such a layer stack would be D-Bus/HAL/GNOME Volume Manager, where D-Bus is used for IPC, HAL provides the device
information, essentially associating device files with vendor and type information, as well as a generic interface for
being notified about the connection/disconnection of devices, and gnome-volume-manager, which is able to proxy this device information to a command that is automatically run.
As of writing, the requirements of this specification are exclusively oriented towards GNOME Volume Manager [1] and the GNOME desktop
environment. We hereby ask contributors of other desktop environments to give comments on the current specification and propose
improvements.
Before this specification existed, GNOME Volume Manager [1] was capable of associating each device connection or volume insertion event
with the execution of a particular command line, which could be specified through its configuration dialog. This doesn't offer enough
comfort to users, because it doesn't allow them to select among their well-known applications, but forces them to go through the tedious
task of entering a shell command.
This specification tries to define a uniform layer for assocating applications in the application database defined by the freedesktop.org
Desktop Entry specification [2] and the freedesktop.org Menu Specification [3] with device events (i.e. connection, disconnection) or
volume handling (i.e. playing a CD or DVD).
This is achieved by extending the Desktop Entry Specification [2] with additional keys, and specifying their semantics.
2 Additional Desktop Entry Keys
In addition to the keys specified in the Desktop Entry Specification [2], supporting applications MUST provide the one of the following
desktop entry keys if they can handle the respective event.
2.1 Key Format
The format for desktop entry keys described in this spec must be one of
X-Volume-WhatAction-Exec
where WhatAction describes the action that should be taken by the application.
or
X-Volume-WhatDevice-When-Exec
where WhatDevice describes the type of device that is handled by the application,
and When is one of "Connect" or "Disconnect"
or
X-Volume-WhatAction-WhatDevice-Exec
or
X-Volume-WhatAction-WhatDevice-When-Exec
2.2 Known Keys
The following keys SHOULD be handled by the volume management framework. It may ask the user which of
the specified actions he wants to run on the device if multiple of these are applicable, but the
WhatDevice and When strings (if present) must match for these alternatives.
2.2.1 Generic
X-Volume-Browse-Exec | opens a (generic) volume with an associated mount point. Typically used by file managers.
2.2.2 CDs & DVDs
X-Volume-Copy-AudioCD-Exec | opens an assistant for copying an audio CD volume.
X-Volume-Play-AudioCD-Exec | plays an audio CD.
X-Volume-Copy-DataCD-Exec | opens an assistant for copying a data CD volume.
X-Volume-Play-VideoCD-Exec | plays a VCD.
X-Volume-Play-VideoDVD-Exec | plays a video DVD.
2.2.2 Printing & Scanning
X-Volume-Printer-Connect-Exec | runs an action on a recently connected printer.
X-Volume-Printer-Disconnect-Exec | runs an action on a recently disconnected printer.
X-Volume-Scanner-Connect-Exec | runs an action on a recently connected scanner.
X-Volume-Scanner-Disconnect-Exec | runs an action on a recently disconnected scanner.
2.2.3 External Storage
X-Volume-MusicPlayer-Connect-Exec | provides access to a recently connected external music player (iPod and others).
X-Volume-MusicPlayer-Disconnect-Exec | provides access to a recently disconnected external music player (iPod and others).
X-Volume-Camera-Connect-Exec | provides access to photos on a recently connected camera, or imports them.
X-Volume-Camera-Disconnect-Exec | provides access to photos on a recently disconnected camera, or imports them.
X-Volume-Palm-Connect-Exec | runs an action when a Palm PDA is connected.
X-Volume-Palm-Disconnect-Exec | runs an action when a Palm PDA is disconnected.
X-Volume-PocketPC-Connect-Exec | runs an action when a PocketPC PDA is connected.
X-Volume-PocketPC-Disconnect-Exec | runs an action when a PocketPC PDA is disconnected.
2.2.3 Input
X-Volume-Keyboard-Connect-Exec | runs an action when a keyboard is connected.
X-Volume-Keyboard-Disconnect-Exec | runs an action when a keyboard is disconnected.
X-Volume-Mouse-Connect-Exec | runs an action when a mouse is connected.
X-Volume-Mouse-Disconnect-Exec | runs an action when a mouse is disconnected.
X-Volume-Tablet-Connect-Exec | runs an action when a mouse is connected.
X-Volume-Tablet-Disconnect-Exec | runs an action when a mouse is disconnected.
2.3 Value Format
The values of the fields referenced in section 2.2 adhere to the same constraints as the "Exec" fields from
the "List of valid Exec parameter variables" section in the Desktop Entry Spec [2], except that only the
following fields are recognized:
%d | the device node of the volume or device that triggered this action.
%m | the mount point of the volume or device that triggered this action.
%i | the unique ID of the volume or device that triggered this action (for HAL, this is the HAL UDI).
[1] http://ftp.gnome.org/pub/GNOME/sources/gnome-volume-manager/0.9/
[2] http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
[3] http://standards.freedesktop.org/menu-spec/menu-spec-latest.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]