DeviceKit-power release next Monday

David Zeuthen david at fubar.dk
Thu Oct 8 07:31:22 PDT 2009


On Thu, 2009-10-08 at 00:46 +0200, Patrice Dumas wrote:
> Maybe my use for DK* may not be what they have been done for, but I was
> clearly not thinking about those kind of applications -- they don't really
> need to mess up with disks, indeed, but more about applications that 
> would need to do something with disks at a low level, for example a
> command line application that would partition disks that could be used
> on a cluster of headless computers, or in fluxbox/fvwm/icewv...

One of the main features of udev and DeviceKit-disks (and the GNOME
desktop shell for that matter) is that we closely track changes made to
devices. This means that you can use existing and well-known tools such
as mkfs(8), fdisk(8), e2label(8), mdadm(8) and so to make changes.

The talk that Kay and I gave at Plumbers 2009 shows this in the demo

  http://people.freedesktop.org/~david/talks/Plumbers-2009-Sievers-Zeuthen-Replugging-The-Modern-Desktop.pdf
  (this presentation has screenshots of the demo we did during
   the presentation - in particular, see slide 21 and 22)

It's actually pretty neat how this work. If you change the label of a
ext4 file system with e2label(8), then symlinks in /dev/disk/by-label
are updated, the desktop icons are updated and so on.

For features not covered by existing tools, such as configuring drive
spin down globally etc., there's the devkit-disks(1) command line
utility. We could teach devkit-disks(1) about creating partitions /
formatting but I'm not sure it's worth the effort.

> > Some apps do need to deal with power management - for example, for long
> > running operations without user interaction (like copying a file or
> > burning a CD) needs to ensure that the system won't suspend. Again,
> > these apps shouldn't use DK-p - they should use an API provided by the
> > toolkit stack they are using.
> 
> Looking at the DKp doc, a user of DKp that don't need gnome could be an
> application that shutdown devices when power is low and they were idle
> for a certain amount of time, or simplly a command-line app to suspend the
> computer (maybe devkit-power will do that, though).

There's devkit-power(1) and we could add --suspend and --hibernate
options. Also looks like the man page is out of date. Suggest to file
bugs for these things at our bug tracker at bugs.fd.o.

Anyway, this kind of toolkit API should go into GLib which is not really
GNOME specific. In fact, a ton of the system-level software on Linux use
it. If you don't like GLib, just use another toolkit, write your own
toolkit or just call directly into DeviceKit-power. Of course, the
DeviceKit-power ABI may break but that's kinda your own problem since
you decide to be picky about things ;-)

      David




More information about the devkit-devel mailing list