howto remotely disable monitor?

Forum for questions and support relating to the 1.24.x releases only.
Locked
Oo.et.oO
Posts: 8
Joined: Tue Nov 03, 2009 2:39 am

howto remotely disable monitor?

Post by Oo.et.oO »

i thought i saw a forum post or a section in the wiki for scripting.

i was pretty sure it had a few details of how to use one of the perl scripts to disable/enable a monitor from the commandline.

now i can't find it.

anyone know?
it doesn't look like zmcontrol.pl will do it.

basically i want to run the monitor attached to a computer when it's idle, and not when it's not idle.

i can use xscreensaver to do it:

Code: Select all

#!/usr/bin/perl

my $blanked = 0; 
open (IN, "xscreensaver-command -watch |"); 
while (<IN>) { 
  if (m/^(BLANK|LOCK)/) { 
    if (!$blanked) { 
      zoneminder <monitor> on; 
      $blanked = 1; 
    } 
  } elsif (m/^UNBLANK/) { 
    zoneminder <monitor> off;
    $blanked = 0; 
  } 
} 
i just need to fill in those commands for monitor on/off

thanks!
zm 1.24.2 on gentoo amd64
billn77
Posts: 15
Joined: Mon Dec 08, 2008 12:09 am

Post by billn77 »

http://www.zoneminder.com/wiki/index.php/Zmu

To enable a monitor, this command
sudo zmu -m <monitor_id> -E -U<username> -P<password> ***** Note: monitor ID, not monitor name

To disable a monitor,
sudo zmu -m <monitor_id> -D -U<username> -P<password>

The permissions on the zmu file seem to show executable by all, but if I don't use sudo, the command aborts immediately. That will be another hassle, but I think there's a way around it. <ammendment>.
Locked