Archive for Linux

Getting all possible BaSH commands

In BaSH pressing tab twice gives all possible commands for BaSH.

Try it , Learn and Enjoy

If you want to get all commands in any editor give the following script..

IFS=’:'; for i in `echo $PATH`; do echo $i|xargs ls; done >/tmp/commands.txt

it will save in the  /tmp directory.

Open it using your favourite editor…like  gedit /tmp/commands.txt


Leave a Comment

To get system information in linux

open a termianl and type the command

cat /proc/cpuinfo > yourname.txt

Then you will get only system hardware information ,

If you want to get the full system information, copy the below given script to a text file and give a name, for example gethwinfo.sh

#!/bin/bash
#
# Scrip to output specific hardware configuration to the file hardware-info.txt
# in your home directory.
# 11.Sep.2007 – SPACE
# This program is a Free Software Licenced under GNU General Public License Version 3.0
# copyright 2007 Raj Mohan <rmohan@space-kerala.org>
CAT=/bin/cat
FREE=/usr/bin/free
DMIDECODE=/usr/sbin/dmidecode
FDISK=/sbin/fdisk
LSPCI=/bin/lspci
GREP=/bin/grep
EGREP=/bin/egrep
ECHO=/bin/echo
MV=/bin/mv
RM=/bin/rm
CUT=/usr/bin/cut
HEAD=/usr/bin/head
DMESG=/bin/dmesg
OUTFILE=${PWD}/hardware-info.txt
TMPFILE=/tmp/hardware-info.tmp
DMIOUTFILE=/tmp/dmi.out
CDROMOUTFILE=/tmp/cdrom.out

if [ -f ${TMPFILE} ]
then
$RM ${TMPFILE}
fi

if [ -f ${DMIOUTFILE} ]
then
$RM ${DMIOUTFILE}
fi

if [ -f ${CDROMOUTFILE} ]
then
$RM ${CDROMOUTFILE}
fi

$ECHO “CPUINFO” > ${TMPFILE}
$ECHO “——-” >> ${TMPFILE}
$CAT /proc/cpuinfo | $EGREP “vendor-id|model name|MHz” >> ${TMPFILE}
$ECHO >> ${TMPFILE}

$ECHO “MEMORY” >> ${TMPFILE}
$ECHO “——” >> ${TMPFILE}
$FREE -m >> ${TMPFILE}
$ECHO >> ${TMPFILE}

$ECHO “Desktop Management Information” >> ${TMPFILE}
$ECHO “——————————” >> ${TMPFILE}
$DMIDECODE -t 17 |$GREP Size |$GREP -v No >> ${DMIOUTFILE}
cnt=1
while read line
do
$ECHO “Memory module ${cnt} -> ${line}” >> ${TMPFILE}
let cnt=cnt+1
done < ${DMIOUTFILE}
$RM ${DMIOUTFILE}
$ECHO >> ${TMPFILE}

$ECHO “Disk Devices” >> ${TMPFILE}
$ECHO “————” >> ${TMPFILE}
$FDISK -l | $GREP Disk >> ${TMPFILE}
$ECHO >> ${TMPFILE}

$DMESG |$EGREP “ROM|CD-R/RW|DVD” | $GREP -v Uniform > ${CDROMOUTFILE}
if [ $? -eq 0 ]
then
$ECHO “CD ROM” >> ${TMPFILE}
$ECHO “——” >> ${TMPFILE}
pre=”"
while read line
do
curr=`$ECHO $line | $CUT -d\ -f1`
if [ "${curr}" != "${pre}" ]
then
$ECHO $line >> ${TMPFILE}
pre=$curr
fi
done < ${CDROMOUTFILE}
$ECHO >> ${TMPFILE}
fi
$RM ${CDROMOUTFILE}

$ECHO “VGA card” >> ${TMPFILE}
$ECHO “——–” >> ${TMPFILE}
$LSPCI | $GREP VGA >> ${TMPFILE}
$ECHO >> ${TMPFILE}

$ECHO “Audio card” >> ${TMPFILE}
$ECHO “———-” >> ${TMPFILE}
$LSPCI | $GREP Audio >> ${TMPFILE}
if [ $? -eq 1 ]
then
$ECHO “No Audio card detected” >> ${TMPFILE}
fi
$ECHO >> ${TMPFILE}

$ECHO “Modem card” >> ${TMPFILE}
$ECHO “———-” >> ${TMPFILE}
$LSPCI |$GREP Modem >> ${TMPFILE}
if [ $? -eq 1 ]
then
$ECHO “No intenal modem card detected” >> ${TMPFILE}
fi
$ECHO >> ${TMPFILE}

$ECHO “Network Interface Card” >> ${TMPFILE}
$ECHO “———————-” >> ${TMPFILE}
$LSPCI |$GREP Ethernet >> ${TMPFILE}
STATUS1=$?

$ECHO >> ${TMPFILE}
$LSPCI |$GREP Network >> ${TMPFILE}
STATUS2=$?
if [ $STATUS1 -eq 1 ] && [ $STATUS2 -eq 1 ]
then
$ECHO “No Network controller detected” >> ${TMPFILE}
fi

$ECHO >> ${TMPFILE}
$ECHO “Detailed PCI information follows:” >> ${TMPFILE}
$ECHO “———————————” >> ${TMPFILE}
$LSPCI >> ${TMPFILE}

$MV ${TMPFILE} ${OUTFILE}

After that give permision to that file, for that,

type the command chmod 764 gethwinfo.sh in to a terminal.

type the command sudo ./gethwinfo.sh

One file named hardware-info.txt is created in the home directory or on the Desktop.

thanks in advance….

Leave a Comment

Configuring Malayalam in Debian and IT@School

Debian and IT@School

For Debian and IT@School there is available a patch for enabling malayalam naming ml-debian developed by SPACE-KERALA, an organization standing for free software promotion. You can easily download this patch from malayalam.kerala.gov.in , Kerala govt’s official website developed for malyalam computing project.

Steps(by default you will get the inscript layaout)

1. Download this patch, this is an .iso file.

2. write this .iso file in to a cd

3. insert cd in to cd drive and take synaptic package manager from the system menu.

4. From the edit menu select add cdrom option , then they will ask to insert the cd … then insert the cd and click yes button. Then it will ask to insert another cd in tio the drive if you want. Now you dont need this ..so click no.

5. Then click reload button on the left side of the top panel.Now you can see the reloading steps.

6. After that from the software list you can search the patch ml-debian , then right click on the left square button and click mark for installation , then click mark.

7. Then click the apply button on the top panel. Again apply on the next window.

8. Now you complete your installation steps.

For Phonetic(manglish)

1. From the software list in the synaptic package manager select the patch ml-phonetic-debian and install with the method explained above.

2. Then install SCIM package with the same above method.

3. After that you will need to restart the system.

4. Then you can find a keyboard symbol on the top panel of the desktop.

5. Right click on this symbol , then click SCIM setup then click Global Setup under the IME Engine.

6. Then tick the languages you want to use.

Now you complete the settings for your malayalam usage.

For making tthese more simple we have to do some more things.

Selecting keyboard layout

1. Right click on the desktop top panel and click add to panel.

2. select keyboard indicater. Now you can see USA on the panel.

3. Right click on the USA button and select keyboard prefferences.

4. Then click layouts then add then India , under India select malayalam.

5. Close the screens and on the desktop click the USA button now it will change to India. This is the method for toggling the keyboard layouts.

Shortcut keys

1. For togling keyboard layouts—->press both alt keys simultaneously( this is default , you can change it from the settings).

2. For starting SCIM , press control+space bar

Leave a Comment

Configuring malayalam in ubuntu

Local language support in open source operating systems is very simple and powerull than in windows or any other operating systems. Here I am explaining how malayalam enabling in ubuntu. Latest version of ubuntu is 8.04…but here i am explaining ubuntu 7.10(previous version) also.

ubuntu 7.10

For ubuntu 7.10 there is available a patch for enabling malayalam naming ml-ubuntu developed by SPACE-KERALA, an organization standing for free software promotion. You can easily download this patch from malayalam.kerala.gov.in , Kerala govt’s official website developed for malyalam computing project.

Steps(by default you will get the nscript method)

1. Download this patch, this is an .iso file.

2. write this .iso file in to a cd

3. insert cd in to cd drive and take synaptic package manager from the system menu.

4. From the edit menu select add cdrom option , then they will ask to insert the cd … then insert the cd and click yes button. Then it will ask to insert another cd in tio the drive if you want. Now you dont need this ..so click no.

5. Then click reload button on the left side of the top panel.Now you can see the reloading steps.

6. After that from the software list you can search the patch ml-ubuntu , then right click on the left square button and click mark for installation , then click mark.

7. Then click the apply button on the top panel. Again apply on the next window.

8. Now you complete your installation steps.

For Phonetic(manglish)

1. From the software list in the synaptic package manager select the patch ml-phonetic-ubuntu and install with the method explained above.

2. Then install SCIM package with the same above method.

3. After that you will need to restart the system.

4. Then you can find a keyboard symbol on the top panel of the desktop.

5. Right click on this symbol , then click SCIM setup then click Global Setup under the IME Engine.

6. Then tick the languages you want to use.

Now you complete the settings for your malayalam usage.

For making tthese more simple we have to do some more things.

Selecting keyboard layout

1. Right click on the desktop top panel and click add to panel.

2. select keyboard indicater. Now you can see USA on the panel.

3. Right click on the USA button and select keyboard prefferences.

4. Then click layouts then add then India , under India select malayalam.

5. Close the screens and on the desktop click the USA button now it will change to India. This is the method for toggling the keyboard layouts.

Shortcut keys

1. For togling keyboard layouts—->press both alt keys simultaneously( this is default , you can change it from the settings).

2. For starting SCIM , press control+space bar

Ubuntu 8.04

1. Malayalam support in ubuntu 8.04 is more easier than 7.10. You will get an additional package cd with installation cd. you will get this cd from SPACE. Contact: contact @ space-kerala.org

2. You need to install this cd by using synaptic package manager or using the commandline.

3. From the synaptic package manager—>click edit—>then add cdrom—->reload

4. Then select aptoncd-metapackage from the package list

5. mark this for installation. Then you can find installation of 220 packages installations. this cd including 220 general packages under the aptoncd-metapackage item.

6. Now you installed all the patches for malayalam support.

7 . You ca see the SCIM item on the top panel. Take the seetings of SCIM and take the necessary steps as explained above.

Use your mother tongue in your computer..thank you.

Leave a Comment

Screencasting method using istanbul

Istanbul and Xvidcap are the best options for creating screencasts in Debian. They’re free and are available in Debian’s free repositories. Istanbul gives an ogg file as the output, whereas xvidcap comes up with an mpeg file.

Another option is Wink. You can install wink in debian using apt-get install (sadly, your non-free repository section has to be enabled for this). Even though creating a screencast using wink is a smooth sail, you should try to avoid it for two reasons:

  1. Wink is non-free
  2. The output generated is an swf file, which forces your browser to install non-free plugins.

mpeg2encode: command not found

If you get the above error message,

  1. Download mpeg2vidcodec_v12.tar.gz package from www.mpeg.org.
  2. Untar it, cd into the directory and make.
  3. You will find two directories mpeg2dec and mpeg2enc inside the src directory. If the make process is successful, an executable will be created in each of them, namely mpeg2decode and mpeg2encode resp. Copy these executables to /usr/local/bin and repeat the convert process. You should be able to get through this time.

recordMyDesktop, is another tool for the same purpose. An ogg file, containing the screencast will be created in your home folder once the recording is stopped.

0For more details visit :http://freethots.wordpress.com/2007/12/07/creating-screencasts-in-debian/

Leave a Comment