Tuesday, May 13, 2008

Ubuntu Cheat Sheet

You can trust the wealth of commands listed here. I found them very useful when I installed Ubuntu and used it for the first time. One of the very important commands every Linux user has to know is the man command. It's the short form of manual and it gives you all you need to know about other commands on your box. All you have to do is type the man command and the name of the command you want to read about. And Voila!

For Example:

ewurah# man gedit
will give you the manual of gedit.


Click here to download.

Sunday, March 9, 2008

Overglossed GTK2 Theme with hot icons and Obsidian Cursors in Ubuntu Gutsy or Heron!



Ok I found an other awesome theme for Ubuntu, you gotta check this out, here is how I got my box setup....

Ok lets install this baby!

First lets grab Overglossed theme and install it!

wget http://ubuntu-debs.googlecode.com/files/Overglossed.tar.gz
tar zxvf Overglossed.tar.gz
sudo mv $HOME/Desktop/Overglossed /usr/share/themes
sudo chmod 777 /usr/share/themes/Overglossed/overglossed.jpg

Now... Lets install the black/white 2 style icon pack!

wget http://ubuntu-debs.googlecode.com/files/black-white_2-Style.tar.gz
tar zxvf black-white_2-Style.tar.gz
sudo mv black-white_2-Style/ /usr/share/icons

Now lets set up the Obsidian Cursor theme:

wget http://ubuntu-debs.googlecode.com/files/Obsidian.tar.gz
tar zxvf Obsidian.tar.gz
sudo mv Obsidian/ /usr/share/icons



Ok now the fun part, simply go to System->Preferences->Appearance and select Overglossed as the theme and select the black white 2 style icon pack and go into cursor settings and select Obsidian, enjoy!
defcon

Thursday, February 21, 2008

Python Scripts vs Bash Scripts in Linux

Almost all Linux users who are at least familiar with bash shell commands will be at home in writing simple bash scripts to automate tasks. For those who do not know how to write a bash script, here is how you do it.

Open a new file in your favorite text editor and save it in any name of your choice but with the extension .sh. For example, let us name it 'myfirstscript.sh' . The 'sh' file extension is not mandatory but is a nice way for us to later remember that this file is a script.

Now in this file (myfirstscript.sh), enter the following line.
#!/usr/bin/bash
This line should always be entered the first thing in any bash script you create. It lets the shell know where to find the bash program. In some Linux distributions the bash command is located at /bin/bash. When in doubt, use the 'which' command to find the location as follows :
$ which bash
/usr/bin/bash
# Continuation of the above script ...
# Now lets enter a few commands in this script ...
ls -l
sleep 2
who
sleep 2
w
Nothing spectacular here. Note that 'sleep' is used to pause the execution process for certain time in seconds. Next fire up a console (xterm, gnome-terminal ...) and set the executable bit for the script myfirstscript.sh as follows :
$ chmod u+x myfirstscript.sh
This lets you execute the script by its name as follows :
$ ./myfirstscript.sh
All this may seem easy. But you can get added benefits if you substitute 'bash' with Python language to write your scripts. Noah Gift provides compelling reasons to pick up Python programming language skills and start writing your scripts in this language. If you do not know Python language and is looking for some direction then you should look at the two books Core Python programming and Python phrasebook which will give you a head start in mastering this powerful but easy to learn language.