Auto starting monitor window

Support and queries relating to all previous versions of ZoneMinder
Locked
loop
Posts: 69
Joined: Thu Nov 06, 2003 3:10 pm

Auto starting monitor window

Post by loop »

Hi,
I have to say that I was able to overcome all major problems which I had at installing ZM on RH9. Hopefuly the system is stable also after a few days non-stop working. Thanks to Phil and other for support.

My questions:
Is it possible that the monitor 1 is automaticaly started without viewing main window? So that after TM login the monitor 1 would appear automaticaly, and no other windows would be open?

Would this be possible even in a way that the username and password are passed to ZM over parameter, so login wouldn't be made by ZM but some app before? For a case where ZM is a part of larger app and user is already logged in in this app.

Regards,
Darko
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Auto starting monitor window

Post by zoneminder »

Hi Darko,

You can create a custom page to display whatever you like really. The structure of the php files is quite simple. So for example in zm_html.php which is the root file for html views you will notice that at about line 60 there is the following code

if ( !$user )
{
$view = "login";
}
elseif ( !$view )
{
$view = "console";
}

The last part basicaly says that if no view is specified use the console view. On login the view is blank so this one is used. For your purposes you would change "console" to "watch" for example or "watchfeed" if you didn't want the events and status etc. You would also need to give a monitor id to indicate which monitor you wanted. So instead of

$view = "console";

you would have

$view = "watch";
$mid = 1;

which should do what I think you want.

To log in a user from another application I'm pretty sure that if you pass in 'action' set to 'login' and 'username' and 'password' as query variables on the first access then it will log you in automatically. I've not tested this though.

Phil,
Locked