How to install ZoneMinder, v1.31.44. on Ubuntu 18.04 LTS

Install Zoneminder
Please refer Connor's web site
Open the terminal and run following commands.
sudo add-apt-repository ppa:iconnor/zoneminder-master
sudo apt-get update
sudo apt install zoneminder

sudo su

rm /etc/mysql/my.cnf

cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/my.cnf

gedit /etc/mysql/my.cnf

add the following line at 32

sql_mode = NO_ENGINE_SUBSTITUTION

systemctl restart mysql

Create Zoneminder database in MySQL (Note: this also creates the default Zoneminder user and permissions in MySQL)

mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
mysql -uroot -p -e "grant all on zm.* to 
'zmuser'@localhost identified by 'zmpass';"

mysqladmin -uroot -p reload

chmod 740 /etc/zm/zm.conf

chown root:www-data /etc/zm/zm.conf

adduser www-data video

a2enmod cgi

a2enconf zoneminder

a2enmod rewrite

chown -R www-data:www-data /usr/share/zoneminder/

systemctl enable zoneminder

service zoneminder start

Add timezone to PHP

gedit /etc/php/7.2/apache2/php.ini

edit line 939 with your timezone

 

Then save the file php.ini

Your time zone can be get from here 

Adding cambozola.jar to the directory /usr/share/zoneminder/www/
Download the latest cambozola and extract to the Downloads directory 
of your PC
Then copy the cambozola.jar to the directory 
/usr/share/zoneminder/www/
On the ubuntu terminal run 
sudo cp /home/bkjaya1952/Downloads/cambozola-latest/cambozola-0.936/dist/cambozola.jar
 /usr/share/zoneminder/www/
Open zoneminder web console (http://localhost/zm/)
Screenshot from 2018-05-22 08-43-37
It was observed in ZM-Console,  the monitor adding editing Deleting  buttons are
not working. This is due to the default setting in  /etc/apache2/conf-available/zoneminder.conf
This problem can be solved by editing the zoneminder.conf file as follows.
Open the terminal and run following commands

sudo gedit /etc/apache2/conf-available/zoneminder.conf
Screenshot from 2018-05-22 08-13-53

Add following lines at 13 and 14 as shown in the above figure and save
 
AllowOverride All 
Require all granted


Then to restart Apache

sudo service apache2 reload
Then open the ZM-Console and restart zoneminder


Screenshot from 2018-05-22 08-48-04
Now you can see all the buttons in zm-console are working.
In my case ,I have added an usb camera as shown in the following figures
 Screenshot from 2018-05-22 09-09-56

Adding USB camera

Screenshot from 2018-05-22 09-09-56Adding USB camera

Screenshot from 2018-05-22 09-12-23
ZM- Console after adding the camera

Screenshot from 2018-05-22 09-12-54Camera view

Screenshot from 2018-05-22 09-13-31
Facility to add storage areas


Reference - Zoneminder forums
Advertisements

How to install Viber on Ubuntu 18.04 Bionic Beaver without clashing with other software like Virtualbox & Opera

Since viber uses libcurl3 instead of libcurl4 , when installing it on Ubuntu 18.4 some problems arise in  keeping  Virtualbox  and Opera in the same pc  (Ubuntu 18.04).

The following method can be used to eliminate the above problem

In this procedure, you will have to  obtain viber rpm version from the official viber web and convert it to a deb file using “alien” command and then install it on Ubuntu 18.04 PC

Assuming the viber.rpm file is being downloaded to Downloads folder of the PC.

Open the Ubuntu terminal and run following commands

cd Downloads

Installing alien

sudo apt install alien

Making a deb file

sudo alien –to-deb –scripts viber.rpm

After the deb file is formed you can see the file in the Downloads folder as in the following figure

Screenshot from 2018-05-02 19-34-32

Then install the package

sudo dpkg -i viber_7.0.0.1035-3_amd64.deb

Now you can see the viber is being installed properly on the pc without harming other software like VirtualBox installed on the same pc

 

 

How to install ZoneMinder, v1.31.1. on Ubuntu 18.04 LTS (Bionic Beaver)

Install Zoneminder
The Zoneminder deb file can be obtained from Isaac Connor's web site 
Install the downloaded zoneminder deb file using the default software 
installer of Ubuntu.

 

Then open the ubuntu terminal and run following commands

sudo su

rm /etc/mysql/my.cnf

cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/my.cnf

gedit /etc/mysql/my.cnf

add the following line at 32

sql_mode = NO_ENGINE_SUBSTITUTION

systemctl restart mysql

Create Zoneminder database in MySQL (Note: this also creates the default Zoneminder user and permissions in MySQL)

mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
mysql -uroot -p -e "grant all on zm.* to 
'zmuser'@localhost identified by 'zmpass';"

mysqladmin -uroot -p reload

chmod 740 /etc/zm/zm.conf

chown root:www-data /etc/zm/zm.conf

adduser www-data video

a2enmod cgi

a2enconf zoneminder

a2enmod rewrite

chown -R www-data:www-data /usr/share/zoneminder/

systemctl enable zoneminder

service zoneminder start

Add timezone to PHP

gedit /etc/php/7.2/apache2/php.ini

edit line 939 with your timezone

Then save the file php.ini

Your time zone can be get from here 

Adding cambozola.jar to the directory /usr/share/zoneminder/www/
Download the latest cambozola and extract to the Downloads directory 
of your PC
Then copy the cambozola.jar to the directory 
/usr/share/zoneminder/www/
On the ubuntu terminal run 
sudo cp /home/bkjaya1952/Downloads/cambozola-latest/cambozola-0.936/dist/cambozola.jar
 /usr/share/zoneminder/www/
Screenshot from 2018-04-27 22-15-31

sudo service apache2 reload
Open Zoneminder http://localhost/zm/

 

Adding an USB camera

 

Screenshot from 2018-05-06 08-58-20

USB camera view

Screenshot from 2018-04-27 17-45-37Note :-Installation of zoneminder v1.31.1 can also be done by adding PPA to your system. Please refer Isaac Connor’s web site 

How to use Motion Linux (4.1.1.1) with 2 web cams & Chinese IP camera on Ubuntu 17.10 (Artful Aardvark)

Motion Linux is a highly configurable easy to use cctv software.

The CCTV system that is explained here is based on 3 cheap cameras.

2 web cams and one Chines Yoosee IP Camera (wifi)

IMG_20180201_111426

The Motion linux  in the Ubuntu software is not the latest version .Therefore it is advisable to get the software from the Motion website

First install Motion Linux latest release  using the GDebi  Package Installer .

Screenshot from 2018-02-02 18-27-09

Now if you see the folder motion is being created at /etc/motion/. You can see  5  files in this folder as i the following figure

Screenshot from 2018-02-02 18-28-44

Out of the 5 files shown in the above figure ,the main file is motion.conf

Other 4 files are the configuration  files of linked cameras

If you open the motion.conf file you can see the commands of linking camera are placed at the bottom as follows (728-731).

sudo gedit /etc/motion/motion.conf

 

Screenshot from 2018-02-02 16-51-03

There was an error in the names of camera files in the default installation in the lines 728 to 731. Therefore you will have to correct and save the file as in the above picture.

You will have to delete ” ; ” placed at the beginning of the commands in order to activate the corresponding camera .You can see it in 728,729,and 730.

Now the corresponding configure files of cameras are edited as follows.

Usb camera 1

sudo gedit /etc/motion/camera1-dist.conf

Screenshot from 2018-02-02 12-55-58

Then save the file

Usb camera 2

sudo gedit /etc/motion/camera2-dist.conf

Screenshot from 2018-02-02 12-57-48

Then save the file

IP Camera

sudo gedit /etc/motion/camera3-dist.conf

Screenshot from 2018-02-02 12-57-03

For the netcam_url  you will have to enter your camera’s url . To see how to get your url using xeoma please refer this blog here 

I have created a target directory for videos generated when a motion is detected in my Video directory under the home directory as shown in the above .You can make your directory for videos as your wish .But you have to correctly mentioned path in the configure  files.

Now you can see the 3 cameras operating in the following figure when you open the Ubuntu terminal and enter the following command to start Motion

sudo /usr/bin/motion

Then open the web browser and enter the url

http://localhost:8080/

 

In the web panel itself there are facilities provided to start ,restart , stop motion program.  The stopping  or resuming motion detection also can be done using the web panel .

How to add a startup icon for start Motion

Please use the Mainmenu program to add an icon as in the following figure

launchercommand

How to upload motion detection videos instantaneously  to dropbox cloud using dropbox sync in order to view remotely

Make a symlink of the folder of motion detection videos and copy it to the dropbox sync directory in the home page as follows

link

sudo ln -s /home/bkjaya1952/Videos/bkj /home/bkjaya1952/

link

Now you can copy the symlink  folder to the dropbox sync floder

dropboxlinking

You can see the videos are being uploaded to the dropbox cloud in the above figure

How make alarm sounds when a motion is detected

First store a alarm sound clip in a folder of your PC

Install mplayer software using the Ubuntu software center

In my case My-recording-1.wav.wav  file has been saved in /home/bkjaya1952/Music

Open the terminal and enter

sudo gedit /etc/motion/camera2-dist.conf

Screenshot from 2018-02-03 09-31-32

Please enter the following line as shown in the above figure and save the file.

on_motion_detected mplayer /home/bkjaya1952/Music/My-recording-1.wav.wav

and save the file

Now you can hear an alarm sound when a motion is detected by the camera 1

 

How to record the sound using the camera microphone when a motion is detected

The program “arecord” needs to be installed on your system and you need a full working “motion” installation on your system.

Following example shows how to record sound using the camera 2

Open the terminal and enter

sudo gedit /etc/motion/camera2-dist.conf

Then the camera2-dist.conf

Edit the file as shown in the figure below

Screenshot from 2018-02-03 17-59-56

Please see the command line no 10

on_event_start arecord -d 60 -f cd /home/bkjaya1952/Videos/bkj/c4/%v-%Y%m%d%H%M%S.mp3

Here the duration of the recording is limited to 60 seconds (-d 60) in my case as the maximum duration of a motion detection of an alarm  event in the main file (motion.conf) is limited to 60 seconds.

In my case the recorded sound file is saved at  the directory of  /home/bkjaya1952/Videos/bkj/c4/

 

Motion linux is a very useful software in making cctv systems.

We must be thankful to the developers of Motion Lunux for providing us a great cctv software free of charge

How to access Box.com account using cadaver on the Ubuntu terminal

cadaver is a command-line WebDAV client for Unix

Install cadaver

Open the Ubuntu terminal

sudo apt-get cadaver

After installation if you enter following command on the terminal you will able to access box.com account ( you will have to enter the user and password of the box.com account)

sudo cadaver https://dav.box.com/dav

Screenshot from 2017-12-31 19-36-56

Then enter help to obtain cadaver commands

Screenshot from 2017-12-31 19-38-19

If you enter ls you will be able to see the files and folders in your box.com account

Screenshot from 2017-12-31 19-38-47

 

You can upload or download files on box.com account as follows

 

Uploading a file (bk.jpg)  in the home directory of PC to box.com

Using lls command you can access file list in the home directory of PC

then enter

put remote bk.jpg

details are in the following figures

 

Our next  target is to make  above process automatically

 

  1. making a script to load box.com
  2. save user and password of box.com account in file in order to access automatically

 

Saving password on netrc

sudo gedit ~/.netrc

Screenshot from 2017-12-31 16-41-55

machine dev.box.com login USERNAME password PASSWORD

Here your USERNAME and PASSWORD of the box.com account has to be entered

 

Save file in the home directory of the PC and exit to shell prompt. Make sure, only owner can read the file:
$ chmod 0600 ~/.netrc

 

Screenshot from 2017-12-31 16-42-47

Making a script file to load box.com

sudo gedit boxcom.sh

Enter following lines in boxcom.sh file and save it in the home directory of the Ubuntu PC

Screenshot from 2017-12-31 23-56-20

Then using Main Menu software make an executable icon

 

 

 

 

How to solve the problem of blank screen in RealVNC viewer when connecting with remote Desktop of Ubuntu 17.10 (Artful Aardvark)

To get the details of installing RealVNC server on the computer Please Refer this site

The default desktop of Ubuntu 17.10 can not be viewed remotely using  RealVNC viewer as it gives a blank screen.

Screenshot from 2017-10-22 18-51-59

Desktop view of the Ubuntu 17.10 PC with RealVNC server

 

Screenshot_2017-10-22-18-52-48

Blank screen of the mobile phone with RealVNC viewer when trying to connect with the Ubuntu 171.10 PC

 

To view the remote desktop I have successfully adopted the following simple procedure.

The default desktop of Ubuntu 17.10 ,has to be changed from Ubuntu to Ubuntu on Xorg

Start computer and make changes (select Ubuntu on Xorg) in the Ubuntu login screen as follows

IMG_20171022_174754

Ubuntu login screen

Then enter the password of the computer and start

Now the problem is solved

Screenshot from 2017-10-22 18-05-09

Desktop screen of the Ubuntu 17.10 PC (wih RealVNC server)

 

Screenshot_2017-10-22-18-05-25

Remote view of the Ubuntu 17.10 PC on a mobile phone ( with RealVNC viewer)

How to install Zoneminder 1.30.4 on Ubuntu 17.10(Artful Aardvark)

First  remove  zoneminder completely using synaptic package manager or some other method .Then  clean the remaining items using  the janitor of  Ubuntu Tweak .

Open the Ubuntu terminal

You will have to refer iconnor  for adding Adding Zoneminder  PPA to your system.

Open the Ubuntu terminal

sudo su

add-apt-repository ppa:iconnor/zoneminder
 apt-get update
 apt-get upgrade
 apt-get dist-upgrade
Install Zoneminder

 

Install Zoneminder 1.30.4 using the Synaptic package manager

(Ubuntu Software Center in Ubuntu 17.10 does not have Zoneminder)

rm /etc/mysql/my.cnf

cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/my.cnf

gedit /etc/mysql/my.cnf

add the following line at 32

sql_mode = NO_ENGINE_SUBSTITUTION

Screenshot from 2016-04-23 21-38-28

Then save my.cnf

systemctl restart mysql

Create Zoneminder database in MySQL (Note: this also creates the default Zoneminder user and permissions in MySQL)

mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
mysql -uroot -p -e "grant all on zm.* to 
'zmuser'@localhost identified by 'zmpass';"

mysqladmin -uroot -p reload

chmod 740 /etc/zm/zm.conf

chown root:www-data /etc/zm/zm.conf

adduser www-data video

a2enmod cgi

a2enconf zoneminder

a2enmod rewrite

chown -R www-data:www-data /usr/share/zoneminder/

systemctl enable zoneminder

service zoneminder start

Add timezone to PHP

gedit /etc/php/7.1/apache2/php.ini

edit line 939 with your timezone

Screenshot from 2017-10-20 14-36-56

Then save the file php.ini

Your time zone can be get from here 

service apache2 reload

Open Zoneminder http://localhost/zm/
 Screenshot from 2017-10-20 14-42-57
Referance Zoneminder Wiki