Monday 29 December 2008

Added framegrabber & Camera to Zoneminder server

Installed a new (very old BT848 tv tuner card) into the Zoneminder server. Modified the /etc/modprobe.d/options file by adding a number 77 to the card type.

Now 6 camera's up and running!

Wednesday 24 December 2008

Full screen Xlib_shm viewer without a window manager

Turned out to be pretty simple (again). I installed GDM instead of XDM, using GDM you can use the tool 'gdmsetup' to enable a default auto login user. Gdmsetup also enables you to choose to run a so called Xclient script instead of a full window manager.

After choosing the Xclient script you need to create a file called '.xsession' in the users home dir.

In this file I added the following:

#!/bin/sh
/usr/sbin/xlib_shm-script


Now when the zoneminder server boots up it will automatically login a dedicated zoneminder users and the Xclient script runs the xlib_shm script I made earlier (see previous post).

Screen Resolution For Xclient Script
Using the tool 'displayconfig-gtk' you can set a screen resolution in which the script will run.
I set this to 800x600 which suits the four Zoneminder camera's best.

Tuesday 9 December 2008

Zoneminder raw viewer autostart

With some help from the Zoneminder forum I got the solution:

sudo chown root.root /usr/sbin/xlib_shm
sudo chmod +s /usr/sbin/xlib_shm


For the actual auto starting of xlib_shm I first created a new shell script:
sudo nano /usr/sbin/xlib_shm-script

And added this:
#!/bin/sh
xlib_shm -m 1 -m 23 -m 11 -m 12 -k 0x07a6d0000 -d 40000


Using the tool xfce4-autostart-editor I added the script above to the XFCE startup list.

Now xlib_shm starts at fullscreen boot up and login of XFCE.

New Zoneminder Installation

We are busy building a new separate Zoneminder machine installation on a new dedicated machine for use on an external site .

Here's how:

Installed Ubuntu 8.04 server edition with LAMP and SSH services selected.

Created a seperate partition for the Zoneminder events.

Downloaded a complete Zoneminder Debian package from here:
ftp://ftp.northern-ridge.com.au/zoneminder/1.23/ubuntu/gutsy/zoneminder_1.23.3-3_i386.deb

sudo apt-get update
sudo apt-get upgrade

dpkg -i zoneminder_1.23.3-3_i386.deb
(You will get errors, just ignore!)

apt-get install -f

sudo ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf

sudo /etc/init.d/apache2 reload

Pointed Seamonkey browser to:
http://hostname/zm

In the config view of Zoneminder do this (SAVE EACH TAB SEPARATELY!!!):

Turn off analyses of frame in config tab.

Turned of the new version online check.

Turned off ffmpeg stuff, we need to know more about this before we use this at external sites.

Turn off statistics stuff in debug tab.

Enlarged the shared memory in /etc/sysctl.conf by adding these lines:
kernel.shmall = 134217728
kernel.shmmax = 134217728

Configure the modules:
sudo nano /etc/modprobe.d/devfsd

And add the following when using one AD-Link RTV24 card:
alias char-major-81 bttv
options bttv card=134,134,134,134
options bttv tuner=0,0,0,0
options bttv autoload=0,0,0,0
options bttv radio=0,0,0,0

And add the following when using two AD-Link RTV24 card:
alias char-major-81 bttv
options bttv card=134,134,134,134,134,134,134,134
options bttv tuner=0,0,0,0,0,0,0,0
options bttv autoload=0,0,0,0,0,0,0,0
options bttv radio=0,0,0,0,0,0,0,0

Fix the permission using:
sudo chmod 777 /dev/video*

To be save edit /etc/php5/apache2/php.ini and set this:
display_errors = Off
log_errors = On

When adding cameras remeber that the max for a PAL camera is 384x288 pixels. Higher will give interlacing problems.

This machines harddisk crashed later on, in this post the rebuild is documented:
http://selfmadenetadmin.blogspot.com/2009/04/rebuilding-zoneminder-system-after.html

Monday 8 December 2008

Time Machine backup server back online

Placed a new 500GB SATA disk in the PowerMAC G5 server for storing all kinds of backups on, including the Time Machine data of other Mac's on the network.

A new hard disk was used, but it is a bit doubtfull. I placed it into a new Linux machine for a client at first, but it made weird noises. To be sure we placed a different HDD into the client's Linux machine and used this drive for our own use.

The constant backups into this disk will be a good test to see if it is ok or not. It's a litte risky, but for our own local use I can keep a close eye on the status of the disk.

Using Server Admin this disk is shared on the network and is also enabled as a special Time Machine share.

The Time Machine function of the server itself will backup this disk onto a external Firewire drive.

Sunday 7 December 2008

Zoneminder local raw stream viewer working

Finally got it working, I had a earlier attempt at it but lost interests after running into problems.

Here's how I got it to work (once you know how it's really simpel):

Downloaded this file:
wget http://dig.hopto.org/xlib_shm/xlib_shm-0.6.3.tgz (the one without OpenGL for this older embedded intel card)

Installed Xvideo dev files:
sudo apt-get install libxv-dev

sudo nano xlib_shm.c
And changed /usr/local/etc/zm.conf into /etc/zm/zm.conf

sudo make all

Place the binary xlib_shm in /usr/sbin/

Ran the new binary with four monitors and the shared memory ID used by our Zoneminder installation.
sudo ./xlib_shm -m 1 -m 23 -m 11 -m 12 -k 0x7a6d0000

It worked! Excellent!!!

Now some sort of way to start this automatically when the server boots up, at the moment the desktop user does not have the right permission. I must be doing something wrong somewhere.

First!

Just a simple blog primarily as a reminder for myself. We manage our own Linux and Mac OS X servers for a number of services. Using this blog I want to keep a back log of what, when, where and most importantly how things are going on.