Xfce users in Zero Install survey

Thomas Leonard talex5 at gmail.com
Sun Oct 7 22:46:06 CEST 2007


On Thu, 04 Oct 2007 15:40:29 -0700, Brian J. Tarricone wrote:

> Thomas Leonard wrote:
[...]
>> The main missing bit is a way to get from an application's launcher to
>> the versions dialog (e.g. if you want to check for updates manually, or
>> roll-back to a previous version). In ROX, you can right-click on a
>> launcher and choose 'Versions...' from the menu. It would be nice to
>> have something similar in Xfce.
> 
> That's actually not that difficult, I don't think.  Thunar supports
> 'menu provider' plugins that can be used to add items to the context
> menu of certain files (xfdesktop would automatically benefit from this
> as it makes use of the same plugins).  I doubt you could install this
> to-be-written plugin via Zero Install, though...
> 
> Of course, neither Thunar nor xfdesktop know how to actually launch Zero
> Install packages -- unless that can be done using the normal mime-type
> mechanism of associating the packages with an app to handle the
> launching (sorry, I don't really know how Zero Install pacakges work!).

To launch a program you give its URI. e.g. to run Blender:

$ 0launch http://0install.net/2007/3rd-party/Blender.xml

You can stick that command in a .desktop file (this is how the GNOME 
integration works), or create a shell script (0alias does this) or a make 
a little ROX application directory with that in its AppRun script (AddApp 
does this). For Xfce, we don't create any files at all; we just put the 
command directly in the panel item's command field.

To open the GUI letting you choose which version you want, add --gui:

$ 0launch --gui http://0install.net/2007/3rd-party/Blender.xml

All that really needs to happen when you drag a link to the Xfce panel 
dialog is that it sets the command to "0launch " + <dragged URI>. 
However, it actually does (did) a few extra things:

- It runs "0launch --download-only" to download the XML file, to check 
  that the link really is a Zero Install feed.

- It sets the panel item's summary and icon fields from the XML file.

- It (0launch) also downloads the version you selected, on the basis that 
  if you're adding it to the menu then you'll probably want to run it 
  soon too, and there's no point showing the download box twice.

To add a "Versions..." button, you'd need to detect that the command 
started with "0launch URI" and run it as "0launch --gui URI" when the 
button was clicked.


-- 
Dr Thomas Leonard		http://rox.sourceforge.net
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1




More information about the Xfce mailing list