How to fix: Linux Terminal hanged because of Ctrl+S [Quick Tip]

Problem:

It happened to me a number of times. Usually, I am habitual of using Ctrl+S to save a text editor like Word, Gedit etc. What goes wrong is when I am editing in command line editor such as Vi and I press Ctrl+S or if I accidently press this combination of key. Because it makes the terminal dead, frozen, hanged.

Reason:

Using Ctrl+S in Linux terminal locks the terminal output and it seems as if the terminal is frozen or hanged. It frustrates the most when it happens for the first time and user is simply unaware of the fact that he has accidently locked the terminal output.

Solution:

To unlock the terminal output use Ctrl+Q. It will resume the terminal output and put it back to normal.

Hope it helped you. Cheers :)

How to Solve: Can’t locate xxx.pm in @INC (@INC contains: …) in Perl [Quick Tip]

Problem:

When you install a Perl module, which depends upon other module, in a private directory, you may encounter an error like this:

Can’t locate Perl_Module_Name.pm in @INC (@INC contains: blah blah)

Reason:

As you can see, INC contains every other thing than the directory where your Perl module is installed.

Solution:

Try adding the concerned directory in the Perl library path like this:

export PERL5LIB=Path_to_the_Perl_Module_library

Hope it solves your problem.

How to copy all the content of a directory in Unix without “cp: omitting directory” error [Quick Tip]

Problem Scenario:

You want to copy all the contents of a directory (lets say source_dir) which contains lots of other files and subdirectories inside it to another directory (lets say target_dir). If you simply try cp command it may result in the following error:

command: cp source_dir target_dir
output: cp: omitting directory source_dir

If you try recursive copy (using option -r) the directory is copied inside the target directory which you may not be suitable if you want to duplicate the contents of the source directory.

command: cp -r source_dir target_dir
command: ls target_dir
output: source_dir

Solution:

If you want to copy just the contents of the source directory as in duplicating all its contents use the following command:

command: cp -r source_dir/* target_dir

This command will copy all the content (not the directory itself) in the target directory.

How to Solve: Backspace key does not work in Mozilla Firefox in Ubuntu Linux

Problem:

Most of us are used-to of using the backspace key to go back to previous page while browsing in Mozilla Firefox. By default, Firefox in Linux doesn’t provide the functionality of pressing backspace for going back to previous page which is quite irritating as it forces one to use the mouse.

Solution:

A little tweak is required in Firefox configuration to make it work. Here is what you need to do:

  • Open Firefox new tab
  • Type about:config in the address bar
  • Click yes to the warning
  • Now search for browser:backspace_action
  • Double click on it to change its value from 2 to 0

Alternate Solution:

There is another way to go to previous or next pages in any browser, in any OS and that is by using arrow keys. The shortcut is as follows:

  • Alt-Left = back
  • Alt-Right = forward

Questions and suggestions are most welcomed. Cheers :)

How to get rid of spams in gmail

Tired of Spam in your Gmail? Spam annoy anyone especially when they are repetitive. One of my gmail account was constantly spammed by some online shopping website which I had used once. More frustrating was that email had no option to subscribe. Another major spammer was an online Casino sale which I had never used as far my memory goes.

In this tutorial we will see how to use “filters” to combat spam. We will apply filters to the spam which are repetitive and come on a regular basis. [Read more…]

How to fix: Android Samsung Galaxy S2 not recognized on Linux

Problem:

I was facing problems connecting my Samsung Galaxy S2 on Ubuntu, which is particularly annoying bearing in mind the total lack of support by Samsung for Linux (even Kies is of no use). Strange enough, it works flawlessly on Windows 7, where it recognises it instantly and I can transfer files between my phone and computer.
When I plug it into my Linux machine, it is recognised and I can see the contents of the root of /sdcard and the SD card but I cannot access the contents of any file or folder as all the folders are empty.
When I connect my phone to USB there is no “mount USB” option but just MTP application in the home screen. [Read more…]

How to solve SSH error: REMOTE HOST IDENTIFICATION HAS CHANGED!

Problem:

A server which I regularly used to connect to using SSH one day gave me the following error:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! [Read more…]

How to solve: No Wireless Network Detected in Ubuntu 11.10

One of the most common problem one faces after a fresh install of Ubuntu is the loss of Wireless Network. And believe me that is the biggest pain for a normal user. The problem double-folds if the wireless adapter is broadcom (do not know what is your wireless adapter? click here). Some of the general problems are showing no wireless adapter, showing wireless adapter but detecting no wireless networks etc. [Read more…]