Tuesday, March 27, 2012

Installing Latest Cinnamon 1.6.7 - Unity Replacement for Ubuntu

Almost everyone seems to be tired of Ubuntus Unity desktop environment. If you are searching for an alternative for Unity, then this tutorial cum review will help you switch to another Desktop Environment called Cinnamon.
Cinnamon is the latest desktop environment from Linux Mint. It offers a more traditional look and feel of GNOME2-like layout with the speed of GNOME3, and you can install it on Ubuntu 11.10/12.04/12.10/13.04. It is basically a project to re-create GNOME2 on top of GNOME3. Cinnamon is simple to use and a best alternative to Unity. Personally I find it a slightly better to use than GNOME3 and a lot better than Unity.

The good thing about these opensource community-based Linux systems like Ubuntu is that theyre absolutely free to use and youre free to customize them as per your requirements.
With that said, I will introduce you to Cinnamonan elegant desktop session that is a perfect alternative to Unity. In this tutorial, Ill show you how to install and use latest cinnamon on whichever version of Ubuntu that you run after 11.10.

My eye candy desktop screenshot on Cinnamon.


There are two PPAs maintained, one by Merlwiz79 and second by Gwendal LE BIHAN.
Merlwiz79's PPA for Cinnamon is poorly maintained. The latest updated version is 1.2.0-2 for Ubuntu 11.10. And the one maintained by Gwendal’s PPA at launchpad is 1.6.7-0 for Ubuntu 11.10/12.04/12.10/13.04. I would recommend you to use Gwendal’s PPA.

To install Gwendal’s PPA using command line follow below mentioned steps.
sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-stable
sudo apt-get update
sudo apt-get install cinnamon cinnamon-session cinnamon-settings

You can also go the GUI way to install the ppa into your local repository.
First move to Gwendal's PPA, click on 'Technical details about this PPA' to expand it. Select the version of Ubuntu you are using and copy the PPA mentioned in the first line. Remember to copy the whole line. See the below screenshot.

Next go to Dash of your Unity Desktop and search for 'Update Manager' and click on 'Settings' at the bottom-left corner of the window.
Go to the 'Other Software' tab and click on 'Add'.
Now paste the previously copied PPA in 'APT line' and click on 'Add Source'.
Refer the below shown screenshot for more details.

Starting Cinnamon
All other desktops that you were trying to fit in will be there as they are. Cinnamon doesn't replace any other desktop environment. It just adds a new option to the login screen. You just have to logout and select cinnamon from your login screen and log back in.

Using Cinnamon
Cinnamon has a single panel on the bottom of the screen just like good old GNOME2.
Youll find menu at bottom left corner, very similar to Linux Mint's traditional applications menu. Whereas GNOME3 has a full-screen applications menu.

The highlighted icon represents cinnamon sub-menu.
Here applications can also be added to panel from the main menu by right-clicking on them. Refer the below mentioned screenshot.

At the bottom right side of panel you'll find trash, workspace-switcher, bluetooth, network, music & cinnamon calendar. You'll also find cinnamon-settings where you can tweak your desktop as you want. Cinnamon-settings is also available from the main Menu. You can also place the panel at the top using the panel settings inside cinnamon-settings.

The cinnamon-settings can be accessed from ‘Other settings’. It includes settings for workspaces, themes, effects, desktop icons and window behavior. As said earlier the icons have good spacing which makes the visibility clear & polished.

Some of cinnamon features are rough around the edges. Still, it is much impressive to replace Unity or GNOME3. Lastly I would say that Cinnamon is what a proper desktop should be and the project to keep an eye on.

Monday, March 26, 2012

Detecting 32-bit/64-bit Processor using Linux

When I first got my laptop, I barely knew about about it's architecture, processor bits and type. So I was left undecided as to what type of operating system should be installed and I wasnt that brave enough too to open up my brand new laptop and have a peek inside just to see the processor details (I know that sounds so lame).

Though we are all familiar with the various companies that manufacture processors (32-bit and 64-bit) like Intel, AMD, VIA, Sun Microsystems (SPARC), IBM (PowerPC), HP (PA-RISC) etc, but we normally have Intel and AMD processors inside our desktops and laptops.

The 32-bit and 64-bit refer to the size of memory (the memory registers) in a processor. This is what actually defines the amount of data the processor can handle in a single operation. A 32-bit processor limits the memory theoretically to 4GB. So if your operating system is 32-bit you cannot access the physical memory larger than 4GB unless you have installed an operating system that supports PAE (Physical Address Extension). Many Linux distros now provide pae support in their kernels, whereas we need to install pae related package in Ubuntu 11.10. Below mentioned is the command to get the package for support for more than 4GB memory.
$ sudo apt-get install linux-generic-pae
This will practically will give you access to more than 4GB physical memory.

Even though we have a 64-bit processor still we can install a 32-bit operating system, but the vice-versa is not possible. I would recommend you to go for a 64-bit operating system if you have a 64-bit processor unless you have a specific to choose 32-bit. The reason is quite simple and straight. If you are into some heavy work and intensive tasks like encoding videos and audios then 64-bit operating system is the best bet.
The only problem that you would encounter is the lack of 64-bit device drivers. In that case here I would recommend you to use open source community based operating systems as they are highly scalable. One such operating system is Ubuntu. Due to large community support it is capable to support almost any x86 hardware and 32/64-bit processors.

Being some what familiar to UNIX, I decided to go for a Ubuntu 11.10 Live CD and find out bits my processor supports.


Detecting processor bit

Using cpuinfo file
$ grep -w lm /proc/cpuinfo
If this highlights "lm" it means the processor is 64-bit else 32-bit.

Using lshw command
If you already have a ubuntu linux operating system installed you just need to run lshw command. To run that you need to have lshw package installed on your operating system. Install the package using the below mentioned command.
$ sudo apt-get install lshw

Now run the below command
$ sudo lshw | grep "description: CPU" -A 12 | grep width

My laptop's output is 64-bits which is self explanatory for a 64-bit processor.

Using lshw GUI
The lshw package also provides the graphical interface. Run the below command to open a GUI window.
$ sudo lshw -X

As you can see that my laptop is having Intel Core i3 CPU M350 @ 2.27GHz whose 'width' is 64 bits i.e. the processor is 64-bit.

Using getconf
The getconf command queries the system configuration.
$ getconf LONG_BIT

If the output is just 64, it refers to 64-bit processor

Detecting Operating System bit

To find out whether the operating system installed is 32-bit or 64-bit, run the below command.
$ uname -m

If it takes out the output as i386 to i686 then the operating system is 32-bit.
And if it shows x86_64 it means 64-bits.

Detecting 32-bit mode or 64-bit mode Solaris 10

64-bit mode SPARC processor

$ isainfo -v

64-bit sparcv9 applications

$ isainfo -b
The -b option prints the number of bits in the address space of the native instruction set. In this case, 64 bits.

$ isainfo -kv
64-bit sparcv9 kernel modules
The -k option prints the name of the instruction set used by the operating system kernel components, i.e. sparcv9; -v provides more detailed information, i.e. 64-bit sparcv9.

64-bit mode Intel/AMD

$ isainfo -v

64-bit amd64 applications
sse4.1 ssse3 cx16 mon sse3 sse2 sse fxsr mmx cmov amd_sysc cx8 tsc fpu
32-bit i386 applications
sse4.1 ssse3 cx16 mon sse3 sse2 sse fxsr mmx cmov sep cx8 tsc fpu

$ isainfo -b

$ isainfo -kv
64-bit amd64 kernel modules

64-bit mode Solaris 10
$ echo "Welcome to "`isainfo -b`"-bit Solaris"
Welcome to 64-bit Solaris

32-bit hardware will give out 32 in place of 64 in all the above commands.

Brief History
- 8086 & 8088, 1st gen
- 80286, 2nd gen
- i386 (80386), 3rd gen
- i486 (80486), 4th gen
- i586 (Intel Pentium & AMD K5), 5th gen
- i686 (Intel Pentium Pro, II and AMD K6), 6th gen
- i786 (Intel Pentium III & 4, AMD Athlon, Duron & Sempron), 7th gen
- i886 (Intel Pentium 4 and AMD Opteron & Athlon64), 8th gen
Later generations are no longer referred to i786 & i886, now they have their own different naming conventions. The "i" stands for Intel.

All the snapshots shown above are for my HP Probook 4420s laptop with Intel i3 processor. Hence, all outputs show 64-bit.
As you can see these are all little commands which make our lives easier and not at all so frightening as most of us think.

Let us share. Make Linux easier & fun for all.

Saturday, March 24, 2012

Removing Old Linux Kernel Entries from GRUB2 Menu in Ubuntu 11.10 & Fedora

Using Synaptic Package Manager

The boot loader for Ubuntu 11.10 is indeed GRUB (GRand Unified Bootloader), like all Linux distros. It's been a long time since we are acquainted with GRUB. Ubuntu 9.10 onwards it has replaced LILO (LInux LOader) and adeptly performs its task of multiple booting operating systems including Windows. Even we can boot multiple kernels within
a single operating system. Till now GRUB is still the default boot loader in Linux.

My Grub Bootloader is flooded with the old linux-kernels. It is clearly evident from the below shown screenshot. Below mentioned command helps in finding all the kernels in the operating system.

$ dpkg -l | grep linux-image

My present working linux kernel version is 3.0.0-16.29. Now I can remove all the old linux kernels that are not in use now and are unnecessarily taking extra space on my hard disk. Since the old kernels are not much of concern to my operating system, hence doing this will also not include old linux kernels while GRUB2 update. As I said there wont be any problem because of this action.

The other linux-images that I found on my system other than my current kernel (3.0.0-16.28) were 3.0.0-12.20, 3.0.0-13.22, 3.0.0-14.23 & 3.0.0-15.26.

The procedure to remove the old linux kernel images is as follows :

Using Synaptic Package Manager
1. Go to Dash and search for 'Synaptic Package Manager'

2. In Quick filter search for 'linux-image'.

3. Scroll to find the list of kernels which have green colored check box which indicates that they are already installed. Whereas the green check box with star mark indicates the current version in use. The "latest version" is likely to be the default one at the top of the list, with the most up-to-date number.

4. Now to remove the old kernel versions we need to click on the check box and a drop down menu will appear. Click on 'Mark for Complete Removal'.

5. Click on the Apply icon in the menu bar

6. Finally reboot the computer and check whether everything is fine. Phew!!!

7. Re-run the synaptic package manager to check again for the linux kernel images.

8. Run the below command to update GRUB2
$ sudo update-grub2

Using Ubuntu-tweak

The most easiest and fastest method is using Ubuntu-tweak. Ubuntu-tweak package is not available in the standard repositories of Ubuntu 11.10. To install we need to use the author's PPA as shown below.

$ sudo add-apt-repository ppa:tualatrix/ppa
$ sudo apt-get update
$ sudo apt-get install ubuntu-tweak

Run Ubuntu-tweak application using the below mentioned command
$ ubuntu-tweak
Or we can also find the package through Dash and run it.

On the left pane you will find 'Old Kernel', select it and you will find all the entries related to it in the right pane.

Select all the old linux-images that you want to remove, click on 'Clean' and that is it. You will notice that ubuntu-tweak is intelligent enough to not display the current working linux image.

Quick tip for Fedora Users
Type into terminal the below command
$ su -c 'package-cleanup --oldkernels'

NOTE: While we remove the old kernels we should always keep two latest kernels other than the current working kernel. Doing this will keep us on the safer side in case of any damage happens to the current working kernel of your operating system. Moreover it will ensure us a boot using the previous kernel.