How to solve: This does not look like a tar archive

Problem:

Sometimes compressed files are not what they look from the extension. Recently I downloaded a .tar.gz file (say, we call it as filename.tar.gz) but when I tried to extract it, it gave error. It went something like this:

command: tar xvzf filename.tar.gz 
output: tar: This does not look like a tar archive 
tar: Skipping to next header 
tar: Exiting with failure status due to previous errors 

Reason:

The error says it all. This does not look like a tar archive. What does it look like than? The way to find it out is using “file” command in the following manner:

command: file filename.tar.gz 
output: filename.tar.gz: gzip compressed data,from Unix

Solution:

So here we go. a gzip compressed data. The best way to deal with it to use “unzip” command line tool. You can install it using this command:

sudo apt-get install gunzip 

Now loaded with gunzip we are ready to tackle this file. First gunzip the file to a .tar file and then untar it using tar command somewhat in following manner:

gunzip filename.tar.gz 
tar xvzf filename.tar 

Hope the post has helped you. Feedback, suggestions are most welcome. Enjoy :)

How to solve: Skype crashes and won’t start again

There is strange things going on with Skype since Microsoft took over it. Weirdly, while using, it crashes and will not launch again. And it happens to a lot of people. Probably a problem with Ubuntu. Any ways, since there is no standard solution available, one cannot wait for the new updates from Skype (if any). So folks, here is a quick and dirty trick to solve this problem.

In your home/your_user_name (or simply call it ~ directory), there is a hidden Skype directory. It contains few files and shared.xml is one of them. Either delete this file or rename it. Use either of these commands:

mv ~/.Skype/shared.xml ~/.Skype/shared2.xml 
or 
rm ~/.Skype/shared.xml 

After this, start Skype again, enter your login details.

If the problem still persists, try removing this file as well by using this command:

rm ~/.Skype/shared.lck

On Windows:

As suggested by a reader Arri, the same problem can be solved by removing the same shared.xml file from the following location:

C:Users{YOUR_USERNAME}AppDataRoamingSkype

Hopefully this works for you all! Questions, suggestions and feedbacks are welcomed.

How to solve: No wireless network in Ubuntu 11.04 : Centrino Wireless-N 1000

Official Ubuntu circle with wordmark. Replace ...
Image via Wikipedia

Wireless and Ubuntu never go hand in hand. No version of Ubuntu has worked out of box for all wireless hardware. This post is meant for people who has Centrino Wireless-N 1000 wireless adapter. If you do not know what is the make of your hardware, follow this link: Know your Network Adapter.

If your network Adapter is of Broadcom BCM 43XX series, you may want to follow this link: Wireless problem with Broadcom in Ubuntu 11.04

Problem Detection:

Now if you are still here I assume that you have a Centrino Wireless adapter from Intel. Run the following command:

 sudo rfkill list 
1: phy0: Wireless LAN
    Soft blocked: yes
    Hard blocked: no
2: acer-wireless: Wireless LAN
    Soft blocked: yes
    Hard blocked: no

Instead of acer-wireless, there may be other result as well. If it says Soft blocked: YES that means the wireless is turned off in software. Follow these solutions.

Solution 1:

If you are connected to Ethernet (Wired Network) disconnect it and type this command:

sudo rfkill unblock all 
sudo rfkill list all

Solution 2: 

If the above command does not solve the problem. Try with this command (replace the acer with your result in previous command output ):

sudo rmmod -f acer-wmi 
sudo rfkill unblock all 
sudo rfkill list all

Make the changes permanent:

If the above mentioned solution worked then you might want to make it permanent by amending a few lines in the configuration file so that you don’t need to type these commands again and again on each boot. Type the following commands (again replacing “acer”):

sudo su 
echo "blacklist acer-wmi" >> /etc/modprobe.d/blacklist.conf 
exit

Hopefully this works for you all! Questions, suggestions and feedbacks are welcomed. If you liked the post then please acknowledge it by liking/voting/commenting on the post. Enjoy :)

Sources: Ubuntu Forums

How to shutdown the computer in Gnome 3 on Ubuntu 11.04

The new and dashing looking Gnome 3 is really a treat to eye-candy lovers. With the obvious improvements there are some changes as well in the Gnome3. One of those major changes is the turn off or shut down option. In previous version the shut down option was on the top right corner, under the user name drop down. In the new version it seems that Gnome has replaced this option. True to an extent. Because the options you will see in the drop down is Lock Screen, Switch User, Log Out, Suspend but no Turn off option.

The Trick: Click on the top right corner (user name) and press Alt. Now you can see that Suspend option has been changed to Power Off… When you click on this Power Off, it gives you the option of Cancel, Restart and Power Off.

Alternate: As suggested by fdeschape:

  • open UBUNTU SOFTWARE CENTER
  • search for “gnome-shell-extensions-alternative-status-menu
  • install it and then log out and log back in
  • It will be there in status menu

If you liked the post, don’t forget to rate/like the post. Its a token of appreciation that helps me in keeping my enthusiasm. Feedback, suggestions and a simple word of thanks is more than welcomed. Enjoy :)

See Also:

How to install Gnome 3 on Ubuntu 11.04

The default desktop in Ubuntu 11.04 is its own Unity. While some people liked Unity, many just don’t like it in comparison to good old GNOME. The latest version GNOME 3 has been released and is supported by Fedora 15 and OpenSUSE. While Ubuntu has decided to stay away from GNOME, it does not mean that you cannot enjoy the new, sleek and smart-looking GNOME 3. In looks I found GNOME 3 better than Unity. While in functioning (in my opinion) both are similar. GNOME3 can be installed by means of an external PPA.

Follow these simple steps to install Gnome 3:

Installing the GNOME3:

Open the terminal (Ctrl+Alt+T) and type the following command:

sudo add-apt-repository ppa:gnome3-team/gnome3 

Now run this command to update the system:

sudo apt-get update 

Now upgrade the system with the following command:

sudo apt-get upgrade 

Use the following command to install Gnome 3 shell:

sudo apt-get install gnome-shell 

Running the GNOME3:

Restart your computer. While at login (after clicking the user name and before entering the password), form the bottom of the desktop, out of various available options like Ubuntu, Ubuntu Classic etc choose Gnome Shell. If you choose Ubuntu you will still be in Unity, not in GNOME. Here is a snapshot of my GNOME3 desktop.

A word of warning:

This installation of GNOME3 may break the Unity system. Don’t panic. A simple un-installation of GNOME3 will fix the problem.

Uninstall GNOME3:

Uninstalltion of GNOME3 is done by running the following command:

sudo apt-get install ppa-purge sudo ppa-purge ppa:gnome3-team/gnome3

To get rid of the Ugly themes:

As suggested by a reader staticvoid if you don’t want to be greeted by ugly themes when your pc restarts do:
sudo apt-get remove gnome-accessibility-themes
sudo apt-get install gnome-themes-standard

If you liked the post, don’t forget to rate/like the post. It is a token of appreciation that helps me in keeping my enthusiasm. Feedback, suggestions and a simple word of thanks is more than welcomed. Enjoy :)

See Also:

How to: Automatically mount a Windows partition in Linux on each start-up
How to solve: No wireless networks in Ubuntu 11.04
How to know if I’m running 32 bit or 64 bit Ubuntu?
How to extract .tar.bz2 and .tar.gz file in Linux

How to use Eclipse for Perl Programming

Eclipse is a boon for developers. It is an outstanding development environment. The best thing about it is that it comes with no cost at all, absolutely free. Eclipse is more known as a Java development environment. By default it supports Java only but it also has plug-ins for Perl,C/C++ and PHP. Now its double boon. In this post we will cover how to install the Perl plug-in in Eclipse. Perl integration in Eclipse is provided by EPIC. Here are few things that you must have before proceeding to install the Perl plugin:

  • You have Eclipse installed on your computer (If not then get Eclipse)
  • You have Java SDK on your computer (If not then get Java SDK)
  • You have on Perl SDK your computer (If not the get Perl SDK)

If you have all these three, then lets proceed for installing Perl plug-in.

Step 1:

Start Eclipse. From the “Help” menu. Select “Install New Softwares”

Step 2:

In here you will be asked to provide the source of the update. Add this source: http://e-p-i-c.sf.net/updates/testing. Click add. Then you will be asked to name this plugin. Choose “Perl” (or whatever you want to name it). Click Next.

Step 3:

Now click the check box EPIC and press Next. And then follow a series of Next Next click. Accept the license terms. And go for Next.

You might be prompted with this warning. Just click “OK”

After successful installation you will be asked to restart Eclipse. Restart Eclipse.

Step 4:

Now that you have successfully installed EPIC Perl plugin in eclipse, its time to run the Perl environment in Eclipse. Go to workbench. On the right corner you can see a Java button and another button in its left. Click on it and select “Other”.

When you click other, it opens Perspective and gives you several options. Select Perl and click Ok.

There you go. You have both Perl and Java environment. At any time you can go back to either of them by selecting the respective environment.

Hope it was helpful. Comments, feedbacks and suggestions are welcomed. Enjoy :)

How to extract .tar.bz2 and .tar.gz file in Linux

Tar is an archiving utility in Linux. Lets see how can we extract various archived files in Linux using this utility.  We will also see the meaning of the options provided with the commands. Type the following commands in terminal (Keyboard short cut: Ctrl+Alt+T in Ubuntu):

Extracting .tar.bz2:

tar xvjf filename.tar.bz2 location

Extracting .tar.gz:

tar xvzf filename.tar.gz location

Where:

x — extract

v — verbose (it will show the extracting files in the terminal)

f — file

z — gzip (or gz in short)

j — bzip2 (or bz2 in short)

location — location where you want to save the extracted the files. If you want to save it in the same directory where you have the zipped file use “.” in place of “location”.

All extracted files will be kept in a single directory automatically. The name of this directory is decided by the zipped file itself.

Hope the post has helped you. Feedback, suggestions are most welcome. Enjoy :)

How to mount a windows partition on Linux automatically on each start up

In Ubuntu (and other LiUbuntunux OS) , the external drives are mounted automatically but the Windows drives (NTFS partitions) are required to be mounted manually in each login. Though this mounting is just a click away, in some situation one requires the other partitions to be mounted automatically in each start up. In this tutorial I’ll try to explain the procedure to mount a Windows partition automatically on each start up. Again, the tutorial is performed on Ubuntu but most of the commands are applicable to other major Linux OS. Please follow these steps:

Step 1.

Check what is the name of the drive/partition you want to automatically mount. The name is like /dev/sda. Check the partition with NTFS format. Check the size and otherthing to select the partition you want to mount. Go to the terminal (Ctrl+Alt+T) and enter this command:

sudo fdisk -l

For me the command output looks like this:

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 102400 7 HPFS/NTFS
/dev/sda2 13 13417 107667456 7 HPFS/NTFS
/dev/sda3 13418 38914 204798797 f W95 Ext’d (LBA)
/dev/sda5 13418 26165 102398278+ 7 HPFS/NT

Step 2.

Now we need the UUID of the desired drive/partition. The UUID can be obtained by using the following command:

sudo blkid

The command output looks like this:

/dev/sda1: LABEL=”System Reserved” UUID=”E400CABD00CA95C8″ TYPE=”ntfs”
/dev/sda2: UUID=”E61CD55A1CD525F9″ TYPE=”ntfs”
/dev/sda5: UUID=”01CB76F7C2628FB0″ TYPE=”ntfs”
/dev/sda6: UUID=”01CB76F7F289ADE0″ TYPE=”ntfs”
/dev/sda7: UUID=”b9a176e1-d122-4ea7-815b-555063d

Step 3.

Now make a directory in Ubuntu where you want to mount the drive. Lets say you want to mount the Windows drive in root folder. We will create a directory name mount and under that a directory say WindowsDrive. For this use the command:

mkdir /mount/WindowsDrive

Step 4.

The mount information can then be added to fstab file which stores the information about the storage devices. In the terminal enter:

gksu gedit /etc/fstab

The command will open the fstab file. In here, at the end of the file add this line like this:

UUID=insert_the_UUID_here /mount/WindowsDrive ntfs defaults 0 0

Note: Replace the insert_the_UUID_here with UUID you noted from the blkid command. Save and exit. Now, in terminal enter:

sudo mount -a

Troubleshoot:

The following errors may be generated:

1.

“The file system wasn’t safely closed on Windows. Fixing.
fuse: failed to access mountpoint /mnt/win7: No such file or directory”

2.

“Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel’, but failed: Failed to create file ‘/root/.local/share/recently-used.xbel.CNQ0UV': No such file or directory”

The reason (in both cases) is that it is looking for the directory specified in the fstab file and cannot find it. Check the path and verify that the directory exists at the specified path. If the directory /root/.local/share doesn’t exist, make it manually.

Hope this article helped you. Suggestions, feedbacks and tiny thanks is always welcomed. Enjoy :)

How to know if I’m running 32 bit or 64 bit Ubuntu?

There are several ways to know the architecture of the Ubuntu you are using. I prefer “uname” command to find it out.

Type in the terminal: uname -a

Output: Linux desktop-name 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Conclusion: x86_64 (or i686) denotes 64 bit and x86 (or i386) represents 32 bit.

Extra: To know the processor: “uname -p”

To know the hardware platform: “uname -i”

To know machine hardware name: “uname -m”

In all the above cases: x86_64 (or i686) denotes 64 bit and x86 (or i386) represents 32 bit.