[Freevo-users] Help with autoshutdown plugin

2008-12-18 Thread Martin Beck
I get an error when closing freevo and have activated the
autoshutdown-plugin. Here are my settings in local_conf.py:

##acpi shutdown##
plugin.remove('shutdown')
plugin.activate('autoshutdown',level=90)
SYS_SHUTDOWN_ENABLE = 1
AUTOSHUTDOWN_METHOD = 'acpi'
AUTOSHUTDOWN_WAKEUP_CMD = '/home/freevo/script/acpi_wakeup.sh'
AUTOSHUTDOWN_DEFAULT_WAKEUP_TIME = '10:15'
AUTOSHUTDOWN_FORCE_DEFAULT_WAKEUP = False
AUTOSHUTDOWN_BOOT_LOADER = 'GRUB'
AUTOSHUTDOWN_REMOUNT_BOOT_CMD = '/bin/mount'
AUTOSHUTDOWN_REMOUNT_BOOT_OPT = '/boot -o remount,rw'
AUTOSHUTDOWN_GRUB_CMD = '/sbin/grub-set-default 0'
AUTOSHUTDOWN_GRUB_OPT = '0'

##acpi shutdown end##


The log gives me this message:

Traceback (most recent call last):
  File /usr/lib/python2.5/site-packages/freevo/main.py, line 297, in
eventhandler
app.eventhandler(event)
  File /usr/share/pyshared/freevo/menu.py, line 822, in eventhandler
self._handle_play_item(menu, event)
  File /usr/share/pyshared/freevo/menu.py, line 581, in
_handle_play_item
actions = menu.selected.actions()
  File /usr/share/pyshared/freevo/plugins/autoshutdown.py, line 177,
in actions
if self.idletimer.ispaused():
AttributeError: 'NoneType' object has no attribute 'ispaused'

--

Are the settings wrong? I read in plugin help that I need to run the
acpi_wakeup.sh as root. Do I have to run the total kit as sudo or can I
run just this part as sudo? In that case how?
Greatful for answers!
Cheers


  __
Låna pengar utan säkerhet. Jämför vilkor online hos Kelkoo.
http://www.kelkoo.se/c-100390123-lan-utan-sakerhet.html?partnerId=96915014

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users


Re: [Freevo-users] Help with autoshutdown plugin

2008-12-18 Thread Adam Charrett
On Thu, December 18, 2008 10:27 am, Martin Beck wrote:
 I get an error when closing freevo and have activated the
 autoshutdown-plugin. Here are my settings in local_conf.py:

 ##acpi shutdown##
 plugin.remove('shutdown')
 plugin.activate('autoshutdown',level=90)
 SYS_SHUTDOWN_ENABLE = 1
 AUTOSHUTDOWN_METHOD = 'acpi'
 AUTOSHUTDOWN_WAKEUP_CMD = '/home/freevo/script/acpi_wakeup.sh'
 AUTOSHUTDOWN_DEFAULT_WAKEUP_TIME = '10:15'
 AUTOSHUTDOWN_FORCE_DEFAULT_WAKEUP = False
 AUTOSHUTDOWN_BOOT_LOADER = 'GRUB'
 AUTOSHUTDOWN_REMOUNT_BOOT_CMD = '/bin/mount'
 AUTOSHUTDOWN_REMOUNT_BOOT_OPT = '/boot -o remount,rw'
 AUTOSHUTDOWN_GRUB_CMD = '/sbin/grub-set-default 0'
 AUTOSHUTDOWN_GRUB_OPT = '0'

 ##acpi shutdown end##

 
 The log gives me this message:

 Traceback (most recent call last):
   File /usr/lib/python2.5/site-packages/freevo/main.py, line 297, in
 eventhandler
 app.eventhandler(event)
   File /usr/share/pyshared/freevo/menu.py, line 822, in eventhandler
 self._handle_play_item(menu, event)
   File /usr/share/pyshared/freevo/menu.py, line 581, in
 _handle_play_item
 actions = menu.selected.actions()
   File /usr/share/pyshared/freevo/plugins/autoshutdown.py, line 177,
 in actions
 if self.idletimer.ispaused():
 AttributeError: 'NoneType' object has no attribute 'ispaused'

 --

 Are the settings wrong? I read in plugin help that I need to run the
 acpi_wakeup.sh as root. Do I have to run the total kit as sudo or can I
 run just this part as sudo? In that case how?

Found this out myself the other day when I was trying to test something,
you need to activate autoshutdown.autoshutdowntimer as well.
ie

plugin.remove('shutdown')
plugin.activate('autoshutdown',level=90)
plugin.activate('autoshutdown.autoshutdowntimer')

Cheers

Adam


--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users


Re: [Freevo-users] Help with autoshutdown plugin

2008-12-18 Thread Martin Beck
Thanks for your answer! my only problem now is how to run it as root.
I'm user 'freevo' now. Do I need to run as the 'root' user or can I
still be 'freevo' and do a workaround?
Cheers,
Martin

--- Adam Charrett a...@dvbstreamer.org skrev:

 On Thu, December 18, 2008 10:27 am, Martin Beck wrote:
  I get an error when closing freevo and have activated the
  autoshutdown-plugin. Here are my settings in local_conf.py:
 
  ##acpi shutdown##
  plugin.remove('shutdown')
  plugin.activate('autoshutdown',level=90)
  SYS_SHUTDOWN_ENABLE = 1
  AUTOSHUTDOWN_METHOD = 'acpi'
  AUTOSHUTDOWN_WAKEUP_CMD = '/home/freevo/script/acpi_wakeup.sh'
  AUTOSHUTDOWN_DEFAULT_WAKEUP_TIME = '10:15'
  AUTOSHUTDOWN_FORCE_DEFAULT_WAKEUP = False
  AUTOSHUTDOWN_BOOT_LOADER = 'GRUB'
  AUTOSHUTDOWN_REMOUNT_BOOT_CMD = '/bin/mount'
  AUTOSHUTDOWN_REMOUNT_BOOT_OPT = '/boot -o remount,rw'
  AUTOSHUTDOWN_GRUB_CMD = '/sbin/grub-set-default 0'
  AUTOSHUTDOWN_GRUB_OPT = '0'
 
  ##acpi shutdown end##
 
  
  The log gives me this message:
 
  Traceback (most recent call last):
File /usr/lib/python2.5/site-packages/freevo/main.py, line 297,
 in
  eventhandler
  app.eventhandler(event)
File /usr/share/pyshared/freevo/menu.py, line 822, in
 eventhandler
  self._handle_play_item(menu, event)
File /usr/share/pyshared/freevo/menu.py, line 581, in
  _handle_play_item
  actions = menu.selected.actions()
File /usr/share/pyshared/freevo/plugins/autoshutdown.py, line
 177,
  in actions
  if self.idletimer.ispaused():
  AttributeError: 'NoneType' object has no attribute 'ispaused'
 
  --
 
  Are the settings wrong? I read in plugin help that I need to run
 the
  acpi_wakeup.sh as root. Do I have to run the total kit as sudo or
 can I
  run just this part as sudo? In that case how?
 
 Found this out myself the other day when I was trying to test
 something,
 you need to activate autoshutdown.autoshutdowntimer as well.
 ie
 
 plugin.remove('shutdown')
 plugin.activate('autoshutdown',level=90)
 plugin.activate('autoshutdown.autoshutdowntimer')
 
 Cheers
 
 Adam
 
 

--
 SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas,
 Nevada.
 The future of the web can't happen without you.  Join us at MIX09 to
 help
 pave the way to the Next Web now. Learn more and register at

http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
 ___
 Freevo-users mailing list
 Freevo-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/freevo-users
 



  __
Går det långsamt? Skaffa dig en snabbare bredbandsuppkoppling. 
Sök och jämför priser hos Kelkoo.
http://www.kelkoo.se/c-100015813-bredband.html?partnerId=96914325

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users


Re: [Freevo-users] Help with autoshutdown plugin

2008-12-18 Thread Richard van Paasen
From: Martin Beck getmemar...@yahoo.se
 Thanks for your answer! my only problem now is how to run it as root.
 I'm user 'freevo' now. Do I need to run as the 'root' user or can I
 still be 'freevo' and do a workaround?

You should add user 'freevo' to the /etc/sudoers file. Or, better, add the
commands that freevo may run as root in that file. For example, add the
following entry:

Zeus ~ # cat /etc/sudoers | grep freevo
freevo ALL=(ALL) NOPASSWD: /usr/bin/nvram-wakeup, /bin/mount,
/sbin/grub-set-default, /bin/ps, /bin/egrep, /sbin/shutdown

In freevo's local_conf.py, add 'sudo' to the commands that freevo executes,
for example:

Zeus ~ # cat /home/freevo/.freevo/local_conf.py | grep sudo
SYS_SHUTDOWN_CMD = sudo shutdown -h now
SYS_RESTART_CMD = sudo shutdown -r now
# AUTOSHUTDOWN_WAKEUP_CMD = sudo /PATH/TO/set_acpi.sh
AUTOSHUTDOWN_WAKEUP_CMD = sudo /usr/bin/nvram-wakeup
AUTOSHUTDOWN_REMOUNT_BOOT_CMD = sudo /bin/mount
AUTOSHUTDOWN_GRUB_CMD = sudo /sbin/grub-set-default 0
# AUTOSHUTDOWN_LILO_CMD = sudo /sbin/lilo

Cheers,
Richard.


--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users