How to make an Ubuntu Webcam

Ok – so it’s a bank holiday and I thought – why not build myself a webcam which would automatically publish up to my website… Here’s the method’s and gotcha’s:
1) Install fswebcam and get it running (man fswebcam) -
my working command line was: fswebcam -q -r 640×480 –no-banner test.jpg
2) Work out how to FTP onto your website – and put the both into a bash script:
#!/bin/bash
# script to capture from webcam and copy up to the web
PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin
fswebcam -q -r 640×480 –no-banner test.jpg
ftp -inv mywebsite<<ENDFTP
user myftpuser myftpassword
bin
put test.jpg
bye
ENDFTP
Don’t forget to make the bash script executable: chmod a x filename…
Run it and check that it works… (FTP onto your site and have a look)..
So now onto the Html / Javascript:
Put this in the head:
<script language=”JavaScript” type=”text/javascript”>
function Clock()
{
var now = new Date();
this.document.getElementById(“testimg”).src=”test.jpg?” + now.getTime();
}
</script>
Use this for the onload of the body:
<body onload=”setInterval(‘Clock()’,60000)”>
and here’s the target IMG:
<img src=”test.jpg” alt=”test image” id=”testimg”/>
Ok – so finally (and probably the worst bit) – lets set up a chrontab job to automate the client side:
In a konsole window type:
export EDITOR=”kate – or your favourite editor”
chrontab -e
Now point your job at your script file:
PATH=/usr/sbin:/usr/bin:/sbin:/bin
*/1 * * * * /home/paul/Documents/capandftp.sh >> /home/paul/Documents/cron.log 2>&1
****Don’t forget to put 4 carriage returns in otherwise it seems to just not work****
Note the chron job is logging to cron.log!!!
Hey and that’s it – if you need more help getting this working, feel free to msg me…

Synchronising files across multiple Linux systems

Found a utility – Unison…

Check out Micah Carricks how-to guide here:

http://www.micahcarrick.com/11-07-2007/unison-synchronize-ubuntu.html

Note: the syntax on allow root login – was permit root login on my Kubuntu box!

Karmic Koala out in the wild on the 1st!!!

:-)

install Vbox additions n KDE openSuse

ok – here’s how to get the GCC compiler installed:

sudo zypper install make gcc gcc-c++ kernel-source kernel-syms

Then kdesu dolphin and navigate to the run file for the vbox additions!

openSuse first impressions…

OK – so I installed the KDE version of openSuse in Virtual box – now i have to work out basic things like:

On Ubuntu, I can run commands as root (graphically) by doing gksudo command…

What’s the openSuse equivalent (so far I have to run Konsole, sudo command)??

Update – Got it – you just run kdesu!

Kubuntu or openSuse?

So, A few months ago I discovered Ubuntu – and close on it’s heels, Kubuntu – finally bye bye to Windows – What a relief…

So now, I am thinking – do I give openSuse a shot or look at some other distro???

Linux User Group Buckinghamshire?

Anybody Know of or interested in forming a local Buckinghamshire Linux User group?

Cool Linux Screensavers

If you run Linux, you can configure the XScreensaver to display RSS feeds by editing the .xscreensaver file (config file) as follows:

textMode: url
textLiteral: XScreenSaver
textFile:
textProgram: fortune
textURL: http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml

The above example snippet sets the screensaver to display an RSS feed from the BBC News website!

I particularly like the OpenGL Fliptext screensaver…