[Haskell-cafe] Traypoweroff questions

Luis Cabellos zhen.sydow at gmail.com
Thu Apr 8 06:50:24 EDT 2010


  I just put an application into hackage
http://hackage.haskell.org/package/traypoweroff. I made this application to
allow a tray icon in xmonad to poweroff and reboot my computer.

  But I dislike two things I made.

  The first one is the use of */sbin/poweroff* and */sbin/reboot* with
system call. I feel than i should be a better way to do the poweroff or the

   err <- system "sudo /sbin/reboot"

   The second issue is, the user need to put into sudoers the permission to
execute reboot and poweroff. The use of *sudo* seems a little awkward. I'll
like a cleaner installation without force user touch configuration files.

      myuser ALL=(ALL) NOPASSWD: /sbin/poweroff

Thanks for the help, Luis Cabellos

p.d: I'll add suspend with pm-suspend command in the next version BTW
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100408/e01ab10f/attachment.html

More information about the Haskell-Cafe mailing list