Fslint is great, it can scan several directories and find all your duplicate files, for instance duplicate images or music files.
You can bulk select the duplicates using selectable criteria to get rid of them.
It also does tonnes of other things too like empty directory detection and searching for bad filenames (Samba?)
A must too for Linux.
WindyCityTech Blogger
windywindycitytech wordpress
Showing posts with label linux automation. Show all posts
Showing posts with label linux automation. Show all posts
Thursday, 18 August 2011
Wednesday, 16 March 2011
Build a Cheap/easy Linux based Motion Detection CCTV system

This is a guide for those that want to build a cheap CCTV server for your home or business.
It uses a analogue camera to do two things:
- Motion capture surveillance footage only when needed
- email pictures of captured footage to you inbox
It requires some computer skills, but you probably will be smarter afterwards.
Hardware Required:
- Asus EEE PC 701 Netbook $260
- Easycap DC60 USB Video Capture Adapter $8.90
- Video Camera $0 free
I picked the netbook up online from www.catchoftheday.com.au and figured it would be useful for some small project. It sat around doing nothing for a while until I was given a camera for free. I thought the two would be perfect for a CCTV project. The camera had a composite video output so the first task was finding a cheap video to usb adaptor. I picked one of these up from www.dealextreme.com after checking that there were Linux drivers available.
Software:
- Ubuntu 10.04 LTS netbook remix
- driver for the usb adaptor
- motion
- mutt
- msmtp
The netbook came installed with Xandros. I replaced that with Eeebuntu 3.0 soon after I got it but that distro is getting a bit old. For this project I wanted something that was still being maintained and would suit a netbook. I settled on the netbook remix of Ubuntu 10.04.
The drivers for the USB adaptor were available from sourceforge.net/projects/easycapdc60. The documentation was great and it came with test scripts.
Motion was available in the repos so I picked that. I did have a look at Zoneminder but I wanted to keep the number of running processes to a minimum and Zoneminder was a bit of overkill for what I needed.
I wanted a way to email off the pictures motion took using just the command line. I picked mutt. Installing it from the repos installed postfix as the MTA. The problem was my ISP kept rejected the emails from postfix. Then I found an excellent guide at www.andrews-corner.org/mutt.html so I removed postfix and used msmtp instead..
Setting up
Install Ubuntu
Build/install usb driver
apt-get install motion
apt-get install mutt
apt-get purge postfix (use msmtp instead)
apt-get install msmtp
configure mutt /home/user/.muttrc
configure msmtp /home/user/.msmtprc
configure motion /home/user/motion.conf
I configured .muttrc and .msmtprc using the directions from www.andrews-corner.org/mutt.html. I then tested it with "echo test | mutt -s test myemail@myisp.com". Great success.
I left most of the settings in motion.conf as is, the most important change I made was to add "on_picture_save date | mutt -s motion myemail@myisp.com -a %f" to get it to send an email everytime it took a picture.
I also opened a port on my router so I could monitor the camera remotely using motion's built in webserver.

Credit goes to my mate P, who wrote this.
Labels:
CCTV,
eeePC,
Linux,
linux automation,
mutt,
surveillance,
ubuntu,
Video Camera
Saturday, 29 January 2011
Mouse support for mythTv possible with this easy hack!
MythTV was great, but it lacked built-in mouse support, I could move the mouse on the screen, but could not click nothing. Checking the forums, it seems that the community has a backwards obsession in using only the keyboard for myth.
What I wanted is to use the scroll wheel on my cordless mouse to scroll through channels while watching tv and use the left mouse click to select the channel in the osd. Which left me no choice but to use another program to emulate the keyboard with the mouse.
Simply what it does is make the left mouse button press space and the right mouse button press escape.
I did the following on Ubuntu 10.04 and myth v0.24, with no problems.
do
then
then
add this to the file
quit and save the file.
now test it, from the command line 'xbindkeys', left click gives a space 'right click' gives escape (which does little in the shell)
now try running mythfrontend (hide mouse option must be off, you want to see the pointer)
scroll wheel to 'watch tv', press left mouse key once, while watching tv scroll channels using the wheel, select channel on the osd using the left mouse button and escape out of watching tv using the right button, simple enough. Remember left = space and right = escape
exit out of mythfrontend and kill the xbindkeys to regain control with the system
now make a script that will start xbindkeys before starting mythfrontend, and auto kill xbindkeys after exiting mythfrontend.
now make the script executable
make a shortcut on the desktop / main menu to this script
left click on desktop, create launcher.... browse to command mythtvstart,sh
thats it, throw away the remote, put the keyboard under the bed, no more struggle. For all those doubters out there, you are more than welcome to go back to holding that remote in you hand, cos we know that is what you enjoy doing ;-0
Reference:
What I wanted is to use the scroll wheel on my cordless mouse to scroll through channels while watching tv and use the left mouse click to select the channel in the osd. Which left me no choice but to use another program to emulate the keyboard with the mouse.
Simply what it does is make the left mouse button press space and the right mouse button press escape.
I did the following on Ubuntu 10.04 and myth v0.24, with no problems.
do
Code:
sudo apt-get install xbindkeys xautomation
then
Code:
xbindkeys --defaults > $HOME/.xbindkeysrc
then
Code:
nano ~/.xbindkeysrc
add this to the file
Code:
#space_bar_from_left_click
"xte 'keydown space' 'keyup space'"
b:1
#escape_from_right_click
"xte 'keydown Escape' 'keyup Escape'"
b:3
quit and save the file.
now test it, from the command line 'xbindkeys', left click gives a space 'right click' gives escape (which does little in the shell)
now try running mythfrontend (hide mouse option must be off, you want to see the pointer)
Code:
mythfrontend
scroll wheel to 'watch tv', press left mouse key once, while watching tv scroll channels using the wheel, select channel on the osd using the left mouse button and escape out of watching tv using the right button, simple enough. Remember left = space and right = escape
exit out of mythfrontend and kill the xbindkeys to regain control with the system
Code:
killall xbindkeys
now make a script that will start xbindkeys before starting mythfrontend, and auto kill xbindkeys after exiting mythfrontend.
Code:
nano ~/mythtvstart.sh
Code:
#!/bin/bash
# mythtvstart.sh
# loads mouse support for mythtv.
killall mythfrontend
killall xbindkeys
xbindkeys
mythfrontend
sleep 5
killall xbindkeys
killall mythfrontend
now make the script executable
Code:
chmod +x mythtvstart.sh
make a shortcut on the desktop / main menu to this script
left click on desktop, create launcher.... browse to command mythtvstart,sh
thats it, throw away the remote, put the keyboard under the bed, no more struggle. For all those doubters out there, you are more than welcome to go back to holding that remote in you hand, cos we know that is what you enjoy doing ;-0
Reference:
HTML Code:
http://hanschen.org/2009/10/13/mouse-shortcuts-with-xbindkeys/
Labels:
DVB-T,
DVB-T on Linux,
Linux,
linux automation,
LinuxTV,
mythTv,
xbindkeys,
xbmc
Subscribe to:
Posts (Atom)