Archive for the ‘bash’ Category

Raspberry Pi as a Digtial Signage

Tuesday, August 26th, 2014

Modify /etc/rc.local , the startx does exactly that starts X windows to give you the login page

setTerm prevents the monitor from going blank

 

if lightdm is controlling the screen then set it of

/etc/lightdm/lightdm.conf

 

Set the Monitor and the pi not to power down or blank the screen

/etc/kbd/config

Set inittab to run the terminal and bypass the login

/etc/inittab

 

Install unclutter to get rid of the mouse

 

If your are using LXDE tell LXDE to not the blank the screen and not to turn on a screen saver, and to run midori in full screen kiosk mode and point it to the web service you want.

you also have to install x11-server-utils this allows you to control the screen saver functionality

modify or create

/etc/xdg/lxsession/LXDE/autostart

 

 

Father Of C And UNIX, Dennis Ritchie, has passed away at age 70

Thursday, October 13th, 2011

We seem to be loosing a lot of good people in the computer business, and the Father Of C And UNIX, Dennis Ritchie, has passed away at ageĀ 70. I know Steve Jobs helped create the the consumer demand for I.T. products but Dennis Ritchie was one of the inventors or the modern operating system, or what we know as Windows, Mac OS, and Linux. Some how I don’t think the worlds news papers will fill the front pages lamenting this loss, Which is sad really, seeing with out Denis Ritchie we may not have had the C programming language. Why is that important, well with out the C programming language, we as software poeople may not be able to write programs, which alot of have formed operating systems.

http://techcrunch.com/2011/10/13/father-of-c-and-unix-dennis-ritchie-passes-away-at-age-70/

 

Resizing images on the fly

Monday, July 4th, 2011

This is hand little script for resizing images on the fly, you need to have imagemagick installed on your linux box, but it puts out 5 folders of images of different sizes, so its perfect for thumbnails and quick corp’ing.

it uses convert out of the image magic liabary


#!/bin/bash

#http://www.imagemagick.org/script/convert.php
echo "\n Running resize script \n";

echo "Making 460x images ";
mkdir scriptresizedx460;
for i in `ls | grep -v scriptresized | grep -v Cropped110x`;
do convert -resize 460 -quality 95 -compress JPEG -density 72 -strip $i resized_460$i;
mv resized_460$i scriptresizedx460/;
done

echo "Making 50x images ";
mkdir scriptresizedx50;
for i in `ls | grep -v scriptresized | grep -v Cropped110x`;
do convert -resize 50 -quality 95 -compress JPEG -density 72 -strip $i resized_50$i;
mv resized_50$i scriptresizedx50/;
done

echo "Making 70x images ";
mkdir scriptresizedx70;
for i in `ls | grep -v scriptresized | grep -v Cropped110x`;
do convert -resize 70 -quality 95 -compress JPEG -density 72 -strip $i resized_70$i;
mv resized_70$i scriptresizedx70/;
done

echo "Making 110x images ";
mkdir scriptresizedx110;
for i in `ls | grep -v scriptresized | grep -v Cropped110x`;
do convert -resize 110 -quality 95 -compress JPEG -density 72 -strip $i resized_110$i;
mv resized_110$i scriptresizedx110/;
done

echo "Making 220x images ";
mkdir scriptresizedx220;
for i in `ls | grep -v scriptresized | grep -v Cropped110x`;
do convert -resize 220 -quality 95 -compress JPEG -density 72 -strip $i resized_220$i;
mv resized_220$i scriptresizedx220/;
done

echo "Cropping 110x images ";
mkdir Cropped110x;
for i in `ls | grep -v scriptresized | grep -v Cropped110x`;
do convert scriptresizedx110/resized_110$i -crop 110x100-0-50 Cropped110x/croped$i;
done

Hopefully this helps some one.