Tag Archive: Graphical user interface



We all need to look for word definition. Online dictionaries and wikipedia are great but we are not always connected to the net. sdcv is a console version of StarDict dictionary. Using sdcv you can search for definitions while still offline. So here are the step to install and make use of this great program.

Step 1. Installation

On Ubuntu

Open Up terminal and type:

$ sudo apt-get install sdcv

On Fedora

$ su -c “yum install sdcv”

On Mac OS X

Mac OS comes with a great GUI based dictionary, but cli enthusiasts will enjoy sdcv.

Please install Macports and then open Finder, Go to Application Folder > Utilities Folder and launch terminal and type

$sudo port install sdcv

Step 2. Download Dictionary Files

Now that we have installed sdcv, we need to download dictionary files from the net.

Go to this site1 , site 2  and download dictionary files according to you requirements. For open source fans, Free On-Line Dictionary of Computing (FOLDOC) and Jargon file are must. They are both available from site1.

FOLDOC: Dictionary for computing subjects.

Jargon File: “A comprehensive compendium of hacker slang illuminating many aspects of hackish tradition, folklore, and humor.” – From Jargon File Homepage.

GNU/Linux English-English Dictionary: You can download it form here.

Step 3. Install downloaded Dictionary Files

Now that you have downloaded the dictionary files we need to put them in the folder where sdcv looks for dictionary files when invoked.

On Linux based systems do the following

$sudo mkdir /usr/share/stardict/dic/

$sudo tar -xvjf downloaded.tar.bz2 -C /usr/share/stardict/dic or

$sudo tar -xvzf downlaoded.tar.gz -C /usr/share/stardict/dic

Note: Make sure the user who will be invoking the sdcv command has read and execute permissions on /usr/share/stardict/dic/ and its subfolders.

On Mac OS X

$mkdir -p $HOME/.stardict/dic

$sudo tar -xvjf downloaded.tar.bz2 -C $HOME/.stardict/dic

Note: Unfortunately you need to repeat this process for every user that needs access to these dictionary files.

Step 4. Enjoy sdcv

Searching for definition

$ sdcv Linux                         (looks for linux in the dictionary.)

$ sdcv                                  (invoes sdcv in the interactive mode, press Control-D to quit).

In earlier article we covered how to use espeak, now you can combine sdcv and espeak together. Sdcv to look for definition and espeak for pronunciation.

$ sdcv Linux && espeak Linux

Here is a picture.

"sdcv"

Note: Sometimes due to the long definition of a particular word text scrolls down too fast for you to read, advanced users can set SDCV_PAGER environment variable to /usr/bin/less. Now, less will be used to display to the dictionary’s article. You may consider adding this to your .bashrc file. Check out manpage for sdcv for more information.

Pages : Follow flossstuff on Twitter      


I started writing for Linux For You Magazine in August 2010. Since Then I have written over 10 articles for this International Magazine. Today I am providing the readers with all the links to my articles. All the work done is under Creative Common License as described in the sidebar widget also.

1. Let’s Play With Emacs CLI : This teaches you the basics of the ‘Emacs’ Text Editor. This articles was published in the Aug 2010. I published it in two parts on my blog. Click on respective part numbers to read  : Part 1  Part 2  .

2.  Cut and Play With Pitivi Video Editor : A tutorial on how to use Pitivi video editor to play with videos in an experimental way. It was published in the Nov 2010 Edition.  Click to Read

3.  Let’s Play With Gnu Screen :  Tutorial about one of the greatest utility provided by GNU also know as ‘virtual terminal manager’ . It was published in Feb 2011 Edition . Click To Read

4. Get Started With Pygame Part 1 : One of my favorite series :) It teaches you the basics about the pygame API of the python module. Pygame is the python extension of the SDL with some additional benifits. This article was published in May 2011. Click To Read

5. Get Started With Pygame Part 2 : Advance knowledge about the pygame API. Includes the color play and sprites usage tutorial . It was published in July 2011. Click To Read

6. Connection To Mysql With Python  and Php : Simple tutorial on how you can successfully connect mysql to your program of python or php. It was published in Aug 2011 . Click To Read

7. Recovered Deleted Files In Linux :  Different ways of recovering your deleted files using utilities like scalpel , foremost etc. It got published in Sep 2011 . Click To Read

8. Let’s Play With CodeIgniter Part 1 : Teaches you the basics of the PHP based framework ‘CodeIgniter’ . This frameworks is really useful and changes the way I used to code in PHP. It follows the MVC approach. It was published in the Oct Edition. Click To Read

There are certain articles like ‘Let’s Play With VirtualBox’,’Using Nessus and Metasploit’,’Play With GUI’s In Python’ that hasn’t been published  online yet . I will publish them in future on this blog and will provide you the links. So click on the links and explore the stuff :)

Pages : Follow ankurtwi on Twitter      


This is a part of my article which got published in the International Magazine “Linux For You” also popularly know as LFY. The article was published  under the name of “Let’s Play With Emacs  CLI”  in the August 2010 edition. All the work done is under the creative common license as specified in the widgets also :)

Text Editors are very important tool for everyone, especially for the programmers. So let’s play with them :D   I am going to discuss the basics of Emacs text editor in this post.

Emacs was developed by Richard Stallman under the GNU project and he released his Emacs source code under a similar free copyleft software license called the EMACS Public License. C and Emacs Lisp  are the programming languages behind this editor. This editor is also known as “The King Of Editors”. Believe me, the title matches exactly with its unique features. The Emacs environment doesn’t seem intuitive at first glance and it doesn’t work like other editors and word processors but learning Emacs is very easy. The latest version of Emacs is 23.2 . It comes pre installed in most of the distributions. You can install it by typing “sudo apt-get install emacs ” (without quotes) on debian distribution. To install it manually download it from http://ftp.gnu.org/gnu/emacs/ . You can check your version by typing “emacs –version”  in the terminal. Emacs is a cross platform text editor and I have tried it on windows as well. Emcas was designed by keeping in mind that users don’t have to waste their time in clicking mouse buttons (start using Emacs and you will feel the same).

Emacs has two modes – GUI and CLI . Type “emacs” in the terminal to get the graphical mode. Below is the snapshot of the graphical mode :

GUI Mode Of Emacs

Graphical mode can be useful if you are not much familiar with the command line of GNU/Linux. Our main focus in this article is on the CLI mode. You can start the CLI mode by typing “emacs -nw” in the terminal. You should get something like this :

Welcome to CLI mode of Emacs

Start a new file in Emacs by typing “emacs -nw filename”  in the terminal and you should see a blank buffer. Emacs works on buffer system. Any thing you write will be there on your buffer. When you save the buffer, it gets permanently written on your disk. Default buffer in it is known as SCRATCH BUFFER. New file buffer should look something like the screenshot shown below :

New File

At the top is the menu bar like in the GUI interfaces but you hardly use it in the CLI. Below that is your buffer area where you can write your contents and data. Mode line is below the buffer. You can call it as the status bar of the editor. It gives you important information about your Emacs session and about the current buffer displayed in the window above it, including whether your latest changes were saved to disk or not , on what line number the cursor is at, how far into the buffer the bottom of the screen is (in percentage of the whole) and the current active features and settings of Emacs. Mini Buffer is below the modeline where Emacs displays the message relevant to any operations.
You don’t need to use the mouse in Emacs as there are many key bindings (combination of keys) in this editor. Key bindings starts with two most important and common key that are Ctrl and Meta keys. Meta key in case is Alt key or Esc key. I have already told you how to start the Emacs and now going to tell how to exit it because it doesn’t have a normal exit. To exit the Emacs, key combination used is Ctrl-x Ctrl-c. It means press Ctrl key then press x while still holding the Ctrl key and then press c while holding the Ctrl key. It exits the Emacs command line and you will again be in the terminal. In the mini buffer you will see the progress of your command while you are typing it. I am listing some important commands below that will help you to start your work initially  on  Emacs :

Key Combination          Function
C-x C-s                   Saves the content in the buffer
C-x C-f                    Find a file, Start a file by giving location
C-x k                       Kill buffer
C-x b                       Switch between multiple buffer
C-p                          Move the cursor to previous line
C-n                          Move the cursor to the next line
C-f                          Move the cursor one letter forward
C-b                          Move the cursor one letter backward
M-f                         Move the cursor one word forward
M-b                         Move the cursor one word backward
C-a                          Move to beginning of line
C-e                          Move to end of line
M-a                         Move to beginning of sentence
M-e                         Move to end of sentence
C-_                          Undo the change

C = Ctrl, M = Meta (Alt or Esc)
I hope this will be enough for you to start with the emacs. Believe me guys, it’s worth giving a try! In the next part , we will take a look about the different modes and functions used in Emacs and also their usages. Till then, explore more material on internet about it and have fun in the geeks way with Emacs.

Pages : Follow ankurtwi on Twitter      


Linux is generally considered as a geek’s operating system and I am completely agree with it. Linux is not only limited to work only. You can also enjoy a lot while working on it. There are many crazy commands which will bring a big smile on your face. Below we are going to discuss few out of them.

1. Oneko : This utility remembers me of the cat mouse game. Cat chases the mouse pointer regardless of its position. You have to download it from the repository by typing “sudo apt-get install oneko” (without quotes)  in ubuntu .Then just launch it by typing oneko . You will see a cat following your mouse pointer. You can terminate this command by using the famous Ctrl-c.

2. Xpenguins:  We all know about the  relationship  of the Linux with the penguin “Tux”.  By using this utility you will see penguins dancing around your desktop. This command is partially GUI based but can be invoked using the CLI. You can install it by using “sudo apt-get install xpenguins” and can invoke it simply typing xpenguins on your terminal. To terminate follow the same Ctrl-c rule.

3.  Fortune :  You can generate famous quotes using this. It uses the random function during the generation. You can find it in the “fortune-mod” package.  For the installation of the package you need to type “sudo apt-get install fortune-mod” . Launch it by typing  fortune . You can add it  in your bashrc file so that everytime you log in you see a message .

4. Cowsay and Xcowsay : Want to say something to anyone using a cow as a medium?? If yes this utility fits the best. CLI version is cowsay and GUI version is xcowsay . You can find them in the cowsay and xcowsay package respectively. To invoke follow the syntax : cowsay text (CLI) and xcowsay text(GUI) . Example – Let’s say “hello” through the cow.

cowsay hello

xcowsay hello

5. sl (oops ls) : As we all know that the “ls” utility (used for listing of files) is used at a very high rate in  Linux. But sometimes due to high speed typing we typed it “sl” and “ls”. If you had “sl” utility installed you will see a train engine passing by in your command line warning you that you have misspelled the ls. Install sl by using “sudo apt-get install sl”  and invoke it using sl.

There are lots of others crazy commands too. Google them and have fun!!!

Pages : Follow ankurtwi on Twitter      

Vim Cheat Sheet


Wanna Learn Vim Quickly And In A More Effective Way??? Grab This—

Vim CheatSheet

 

Pages : Follow ankurtwi on Twitter      

Follow

Get every new post delivered to your Inbox.

Join 69 other followers

%d bloggers like this: