Resize Multiple Images

ImageMagick

I am sure you would have come to a situation when you would have to resize multiple images say you copied 200 images from your Digital Camera and now need to upload them and need to resize them all, now doing this using GIMP would take ages here is a easy way.

Step 1) Install ImageMagick

sudo apt-get install imagemagick

Step 2) Change to the Directory where all Images are Present

Step 3)

a) If you need to reduce images to a specific Percentage

mogrify -resize 20% -format jpg *

b) If you need to reduce to Specific Width & Height

mogrify -resize 800x600 -format jpg *

c) If you need to reduce to Specific Width

mogrify -resize 1024x -format jpg *

Further Reading Click Here !!!

Kumaon Vani (CRS)

Kumaun Vani CRS

My latest assignment at Uttarakhand Open University is to setup a Community Radio Station (CRS) in Haldwani, we have already decided over the name and it would be known as "Hello Haldwani" we have initiated the process to get various approvals and clearances from the Ministry and have come a long way and hopefully with the current pace in next 6 months we would be on air.

We are a team of three (teen tigare kaam saware) handling the project as this team is not experienced with such projects we first decided to visit a few other CRSs to understand the setup and most importantly understand the difficulties such setup's face so that we can start off by addressing those as well, in the process today we visited the first Community Radio Station of Uttarakhand "Kumaun Vani".

 

Kumaun Vani is operating from Suri in Mukteshwar which is at almost 2200 meters above sea level and is blessed with scenic beauty and the Panchchuli ranges of Himalayas are seen from this place, Kumaun Vani started in March 2010 and is managed by TERI a wonderful organization.

This was not the first Radio Station which we visited but was a Station where we learned the most as this Radio Station operates with the bare minimum set of equipments and people it just attracted us, as this is what we expect from our upcoming station. Kumaun Vani have all rounder people , each one of them knows the in and out of the entire system which attracted us. The station currently operates 6 Hours a day with 3 Hours of live content which also includes phone calls now you might be thinking why we are saying/treating this as great when their are FM channels which operates 24x7 but here is the difference the same difference as it is between the proprietary and open source software.

Aim of Kumaun Vani is to promote the community around it and help them grow this has gained quite good support as we saw today in their live show where they attended telephone calls live and read a few letters. This Radio Station is operated in the Local Language of Kumaun i.e Kumaoni almost 80% of the programmes are in kumaoni and rest in hindi this also promotes local language and will help in sustaining it for long.

Now lets talk about the setup and how does this radio station operates, The Station is a 2 room setup or i would say a One Room Setup which is divided in 2 parts the Recording Room and Control Room, The recording room has ample of space for a group discussion between 3 people which is quite sufficient the other room is the control room where Soung Mixing and various other operations are performed my interest in this room was the computer or say the main system which was actually running ubuntu and controlling entire station i.e recordings, telephone lines play-list and what ever was required the software which ran on this system is available at Gram Vani i am currently using the trial version of this software on my office machine to check this out in detail. As i told this station runs 3 hours of live content majority of it is produced in the recording room rest comes as recording by local reporters who go to various places and cover events including the local gram panchayat meetings, local events and much more.

Discussing with Team KVAs today was a sunday entire team of Kumaun Vani was not available but we were lucky to meet around 6 people,  which included the Manager, RJ, Operator, Helper, Reporter we were quite lucky to reach this place when a live session was on air and it was a quite good experience for all of us. Once the live session was over we started discussing everything in detail and the staff was kind enough to help up on every single thing which included on how they decide on what should go on air and what should be scrapped how they handle sessions, how do they collect content from local community and how they promote this Station and i assure you that these people are doing quite a wonderful job with a young and energetic staff, i would say each one of them is a one man army as the job is not quite easy, getting/making the content which can go on air takes lot of efforts and pain.

RJ TulsiLocals of the mountains are very kind and are always ready to help and this once again came to be true with the arrangement of tea by their RJ Tulsi who managed to arrange milk for tea from a near by household and prepared the tea over a Stove for all of us. I would like to thank Mr Manoj & his staff for their support they were of a great help to us.

Manoj Center Managerand finally i would say that this station is performing wonders with an awesome staff and i would recommend you to tune in to FM 90.4 Kumaun Vani when you come to this place Mukteshwar or near by and appreciate their efforts oh i forgot to mention that we saw some awesome scenic beauty here at mukteshwar the apple trees in almost every house out there was amazing badluck that apple fruit does not grow in this season else we would have enjoyed apple from direct trees, we took quite a lot of photographs selected  are included in this blog for you :)

More Photographs https://www.facebook.com/media/set/?set=a.10150356995249556.367745.6338…

Restore GRUB 2

In most of the systems GRUB is now upgraded to 2.0 and with this update the old restore process have also changed now there is no grub command :) available.

If you have lost the Bootloader after a routine reinstall or due to any other reason try the following to restore

Boot Using a Live CD and try the following as root

grub-setup -d /media/XXXXX/boot/grub -m /media/YYYYY/boot/grub/device.map /dev/sda

Where XXXXX represents the root partition and YYYYY represents the partition holding the /boot in case you dont have a seperate partition for /boot then XXXX and YYYY would be be the same. /dev/sda may change depending on the system you are using.

Please note this would erase the current bootloader and install a new one for you if you are unsure of what you are doing do not try this

Once done reboot and you will get the GRUB Menu in case you have lost your other OS from the Menu run a

grub-update

for more information visit the Documention here.

 

 

Using SQL * Plus on Command Line in Ubuntu

This blog post is an HowTo "Setup SQL*Plus to work on BASH" The commands illustrated in this howto are tested on Ubuntu 9.10 with Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production Installed.

What is SQL * Plus ?

SQL*Plus is a command line SQL and PL/SQL language interface and reporting tool that ships with the Oracle Database Client and Server software. It can be used interactively or driven from scripts. SQL*Plus is frequently used by DBAs and Developers to interact with the Oracle database.

Prerequisite

Oracle Database 10g Express Edition Release 10.2.0.1.0 Installed

Once you have Oracle 10g Installed successfully you can go to

Applications > Oracle Database 10g Express Edition > Run SQL Command Line

and successfully run all your SQL PL/SQL easily but using SQL*Plus directly on BASH is the real fun, Below are the steps which will enable you to use SQL*Plus on BASH

1) set ORACLE_HOME
2) set ORACLE_HOME/bin in $PATH

The above 2 steps can be performed by adding the following lines to .bashrc

export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/
export $PATH=$PATH:$ORACLE_HOME/bin

The above 2 Steps are sufficient to use SQL*Plus on Command Line once you have done the steps execute


$ sqlplus user/password@database

In the default install XE would be used as database.

Issues while using the default or only the above method

  • SQL*Plus does not support the Up/Down Arrow command scroll under linux environment which in itself is the biggest problem.
  • Default Editor is not Set which will confuse you while executing ED.
  • Various Other Environment variables are not set

Resolving the above mentioned issues

  • Install rlwrap this will enable the Up/Down Scroll function
    $ sudo apt-get install rlwrap
    now connect to oracle using
    $ rlwrap sqlplus user/password@database
    You will find that Up/Down Scroll is now enabled.
  • Set the most common Environment Variables


    $ rlwrap sqlplus user/password@database
    SQL*Plus: Release 10.2.0.1.0 - Production on Sun Feb 28 23:53:15 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> SET EDITFILE "afiedt.buf"
    SQL> DEFINE _EDITOR=vim
    SQL> SET LINESIZE 132
    SQL> SET SERVEROUTPUT ON

    This will set the default editor as VIM, Default Edit File as afiedt.buf LINESIZE as 132 & will mark SERVEROUTUT as ON
    various other variables can also be set similar commands on the SQL prompt

Refer SQL*Plus FAQ's for more information.

4 Steps to add Ubuntu Systems to Active Directory Setup

The IT environment today in any organization is a sort of a mixture where many different Operating Systems are used, and Windows Active Domain Controller exists in majority of such organization.

Below is a 4 step How to on "Connecting Linux (Ubuntu) Systems to Active Directory Setup"

1) Update the Software Repositories

sudo apt-get update

2) Install Required Packages (likewise-open)

sudo apt-get install likewise-open

3) Join The Domain using Domain Administrator Account, replace Administrator with Domain Administrator Username and fqdn..domain with the Fully Qualified Domain Name

sudo domainjoin-cli join fqdn.domain Administrator

4) Update the Startup Scripts

sudo update-rc.d likewise-open defaults
sudo /etc/init.d/likewise-open start

Thats it !! you have now joined the Domain, Log Off or preferably Restart the Machine.

Now you can login using Active Directory Credentials remember appending DOMAIN\ before your username


User Name to Login : DOMAIN\username
Password: domainpassword

This will also create a home Directory for Domain Users under /home/DOMAIN

Where .deb files are stored in Ubuntu ?

We always hear people saying ubuntu works well only when you have a strong internet connection as the Install CD doesn't contain all the packages required agreed now a CD cannot contain all the packages you require so you need to download the packages but there is a clear misunderstanding among new users that they always need to download these packages, Its essential to download them once but if you are reinstalling ubuntu on new machine you need not download these packages all over again if you have installed required packages on one of the machine you can use the content of below listed directory for installation

/var/cache/apt/archives

this directory contains the debian packages download by the apt-get :)

so have fun reuse the content for each install and save time and bandwidth

Restoring GRUB after a reinstall

You had just did a weekly install of some OS which did not detected Linux, Follow the steps mentioned below to get GRUB working again. Please note this would erase the current bootloader and install a new one for you if you are unsure of what you are doing do not try this

    1. Boot from a Linux Live CD ( ex ubuntu or knopix, i use Ubuntu)
    2. Open the terminal
    3. Follow the commands mentioned below
    • sudo grub

    if sudo doesnot works switch to root user and use grub drectly, Find the ROOT device you will get the values for X & Y which will be used later.

    • grub> find /boot/grub/stage1

    Set the root device from the information achieved from the above command

    • grub> root (hdX,Y)

    Install GRUB

    • grub> setup (hd0)

    Exit GRUB

    • grub> quit

    Reboot the system without using the live CD you will dind your boot loader back :)

    From http://ubuntuforums.org/showpost.php?p=121355&postcount=5

    Skype in Ubuntu

    Skype is not available in the default configured repositories of Ubuntu so an alternate is downloading a deb package from skype and installing it but as i am an apt-get fan i would recommend adding the repositories listed below and then using

    # sudo apt-get install skype

    But you need to Add a Repository using the commands below before using apt-get if there is no command listed for your distro goto Medibuntu

    • Ubuntu 9.04 "Jaunty Jackalope"

    wget http://www.medibuntu.org/sources.list.d/jaunty.list --output-document=/etc/apt/sources.list.d/medibuntu.list

    • Ubuntu 8.10 "Intrepid Ibex"

    sudo wget http://www.medibuntu.org/sources.list.d/intrepid.list --output-document=/etc/apt/sources.list.d medibuntu.list

    • Ubuntu 8.04 "Hardy Heron"

    sudo wget http://www.medibuntu.org/sources.list.d/hardy.list --output-document=/etc/apt/sources.list.d/medibuntu.list

    Once you have added the repository add GPG Key using

    sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update

    And you are done now you can install skype using apt-get :)

    Broadcom 43xxx on Linux (openSUSE)

    Hopefully there would be many like me who have struggled in configuring Broadcom Wifi Cards on Linux due to their proprietory drivers, now a days it works fine in Ubuntu if you download the drivers available but still it doesnot work with various other distros. so here is a 3 step guide to configure Broadcom Wifi on your linux box these steps have been tested on openSUSE but would work on any distro Step 1 ) Download a file from here. Step 2) Install bcm43xx-fwcutter it is commonly avaiable for all distros Step 3 ) follow the commands

    # bcm43xx-fwcutter wl_apsta-3.130.20.0.o

    (bcm43xx-fwcutter is the application which u have installed wl_apsta-3.130.20.0.o is the file which you have downloaded from this blog:)  preferably create a directory and copy wl_apsta-3.130.20.0.o there and execute the command in the directory)

    # cp *.wl /lib/firmware

    (*.wl are the files which were generated from the command above there would be some 16 files)

    And you are done use the network manager to configure Wireless Netwoks :) this was really simple. Desclaimer: code/commands given in the posts worked fine for the author please use them on your own risks they may damage your system.

    Reblog this post [with Zemanta]