Posts

Vim Keyboard Shortcuts

General Nearly all commands can be preceded by a number for a repeat count. eg.  5dd  delete 5 lines  gets you out of any mode and back to command mode Commands preceded by  :  are executed on the command line at the bottom of the screen :help  help with any command Navigation Cursor movement: ← h  ↓ j  ↑ k  l→ By words: w  next word (by punctuation);  W  next word (by spaces) b  back word (by punctuation);  B  back word (by spaces) e  end word (by punctuation);  E  end word (by spaces) By line: 0  start of line;  ^  first non-whitespace $  end of line By paragraph: {  previous blank line;  }  next blank line By file: gg  start of file;  G  end of file 123G  go to specific line number By marker: mx  set mark  x ;  'x  go to mark  x '.  go to position of last edit ' '  go bac...

Keyboard Shortcuts for working with Gnome Terminal

Here are some key board shortcut for terminal. Shortcut key Action Note Shift+Ctrl+t new tab Shift+Ctrl+w close tab Shift+Ctrl+n new window Ctrl+{PgUp,PgDown} change tabs Shift+Insert paste from selection buffer, or if that's empty the clipboard Ctrl+Insert copy selection to clipboard Shift+Ctrl+v paste from clipboard Ctrl+Click Open URL under mouse cursor Shift+{PgUp,PgDown} Scroll back,forward The scroll buffer is configurable in each terminal program. For e.g. the scroll buffer is lost when you switch virtual consoles as it uses video memory. Ctrl+l redraw Very handy if command line is messed up with wall messages, or mc session is corrupted for e.g. Ctrl+s pause Ctrl+q resume Ctrl+u del to start of line Ctrl+w del word (to left) Hope this information will be helpful for you while working in terminal. Any comment and/or suggestion is always welcome. Cheers A.Paul Sources:    http://www.pixelbeat.org/lkdb/gnome-terminal.html

Installing ibus avro in linux mint 15

Image
Error message showed during ibus-avro installation Today I installed Linux Mint 15 in my desktop. While I was adding repo for ibus-avro-quantual with the following command sudo add-apt-repository "deb http://download.opensuse.org/repositories/home:/sarimkhan/xUbuntu_13.04/ ./" I was getting following error message. Cannot add PPA: 'No JSON object could be decoded'. I solved the problem by coping the entry of the repository from the source.list of the Ubuntu 13.04. The entries are listed here so just use the following command in linux mint to install ibus-avro-auantual. sudo gedt /etc/apt/source.list and the paste the following line at the end of the file. deb http://download.opensuse.org/repositories/home:/sarimkhan/xUbuntu_13.04/ ./ # deb-src http://download.opensuse.org/repositories/home:/sarimkhan/xUbuntu_13.04/ ./ Then save the file. Now update the database using sudo apt-get update command and then install the ibus-avro using sudo ap...

Resetting Rhythmbox music library in Ubuntu

First you have to delete all the information of music library for Rhythmbox. To delete all information first quite Rhythmbox and then delete the following files ~/.local/share/rhythmbox ~/.cache/rhythmbox ~/.gconf/apps/rhythmbox . To remove this file you can use the following command. rm ~/.local/share/rhythmbox/ ~/.cache/rhythmbox/ ~/.gconf/apps/rhythmbox/ -r    After that restart Rhythmbox, it will scan the whole library again and the information will be reset.

Associating file to an perticular application through command line

Image
We can select which program will open a particular type of document from terminal command line using mimeopen command. This tool is very useful if your program is not showing up in right click and open with option (like in case of program installed through PlayOnLinux ). If you know full command how to open the program you can use mimeopen to associate particular document type with that program.  So first open a terminal. Then navigate to the perticular folder where your file is. And then run the following command. $ mimeopen -d filename.ext And then it will show all option that can open that document. As a last option there will be an option other. You can select any option, just enter the corresponding number and enter. If you choose other option then it will show you option the command. Enter the full command (may be with full path some time) and then that program will open that file. From now on when ever you double click on that file type, it will always open with the ...

Installing office 2010 with wine in Ubuntu

Ubuntu is my favourite desktop OS. This is very easy to use and user friendly.  Ubuntu by default ships with Libra office which is very good and capable of doing almost all the job we can do in MS Office. But the problem is Libra office is not very good while opening complex documents created in MS Office. Specially if the document contains lots of equations and picture. But I need to deal with lots of such documents. Fortunately we can install MS Office in Ubuntu using wine with some tweak. In this post I will explain how to install MS Office in Ubuntu. Installing Wine To install MS Office we have to install wine 1.5. For that first you have to add stable ppa of wine and then install it. Run the following commands in an open terminal. $ sudo add-apt-repository ppa:ubuntu-wine/ppa $ sudo apt-get update $ sudo apt-get install wine This will install the latest version of wine. Mesa OpenGl and 32 bit library Next step is to install mesa OpenGl and 32 bit libraries,...

Recovering deleted file

Some time we accidentally delete some important file, which we should not. If we simply delete it (moving to trash) we can easily recover it going to trash and restoring it. But if we permanently delete it (like using shift+delete key or emptying trash), it becomes very difficult to recover them. But we can do this using PhotoRec software. This can run in any kind of file system. You can even use it to recover lost photos from camera memory card or flash drive. This software is available for Linux, Windows and Mac. But here I will concentrate on Linux (mainly Ubunut) only. Installing PhotoRec First of all you have to install photorec using the following command sudo apt-get install testdisk Recovering File First open terminal and then run the following command sudo photorec and then first choose your drive form where you want to recover files, and then choose the option intel type. On the next screen choose the partition from where you want to recover the file. On next...