Sunday, April 29, 2012

How to get your lost Linux OS after Installing a Windows crap

Requirement: An Ubuntu Linux Live CD / USB. In this case you can make do with anything that has GRUB-INSTALL package with the Live CD. But if you have access to the internet using that Live session then you can just Google things down and don't even need this post, right?

Method:
1. Launch the Live Session.
2. Bring up terminal and type: sudo su
this gives you the privilege of a root in the live session
3. Now type: fdisk -l
Lists up all the partitions present in your system. Look for the partition that has "Linux" in the rightmost column. Note it's /dev/sdx name from the left most column.
4. Type : mount /dev/sdx /mnt
Here /dev/sdx is the partition name that you noted. This command mounts that partition in mnt
5. Now type: grub-install --root-directory=/mnt/ /dev/sdx
Here /dev/sdx is the same thing as the previous command. Look at the output, the last line should say that the Installation went successful. VIOLA!!!

Reboot your system from your hard drive (normally) and hopefully the OSs should be there listed beautifully by GRUB. Smile!!!! Don't have to miss your favorite Linux distro.

Thursday, April 19, 2012

Linux Mint FIrefox hanging up repeatedly for seconds, weird Google search page

I'm using Linux Mint Lisa (12) with GNOME 3 for a couple of months now. I'm impressed with the huge user support community and nice interface with the ease of using the same knowledge I had from Ubuntu. Recently the Firefox installation got somehow crapped up. It showed weird search results.



Moreover, the pages would repeatedly hang up. They would get updated (downloaded) but won't change until there was some cursor movement. It was real irritating. Thanks to "remoulder" from Linux Mint Forums, I found a nice method for repairing these things.

Close down Firefox > Press Alt + F2 > type "firefox -profilemanager" without the quotes

You'll see a default profile there. That profile is corrupted. Just create a new one using the options and start with the new one. All fixed.

Linux Mint 12 GNOME Freeze / Hang Up Problem

Linux Mint is probably the distro that fixes all the mistakes that Ubuntu makes. It's built on the Ubuntu base while keeping a very light weight taste to it.

Recently the Lisa (12) release of Mint was released with various Desktop Environment including GNOME. I've installed it and it was pretty good to me until a very annoying error was being caused by GNOME. It hung up at very random time forcing me to reboot the system using a Hard Boot. Later on I found this fix that reportedly solved the problem to some extent but still has some issues with Banshee Media Player. Anyway here's the how.

First download this file: Link 1
Go to the directory where you downloaded this file and run this command

sudo patch /usr/share/gnome-shell/extensions/mediaplayer@linuxmint.com/extension.js mgse-mediaplayer.diff 

Then download this file: Link 2

sudo patch /usr/share/gnome-shell/extensions/mediaplayer@linuxmint.com/extension.js mgse-mediaplayer.diff 

NOTE: Both the files have the same name so my commands are also same. But if you don't replace the first file with the second when downloading then you might need to change the command as per your file's name.

This should fix the problem.

Source: [ LaunchpadLinux Mint Forums ]

Friday, April 06, 2012

[UVa] 642 - Word Amalgamation

Very easy problem. Can be solved using bruteforce and C. A good opportunity to test my hands on multimap of C++.

Show/Hide Code

Thursday, April 05, 2012

[UVa] 10903 - Rock-Paper-Scissors Tournament

The common mistake is there are not K games. There are K*N*(N-1)/2 Games. And Win Average is undefined when W+L = 0.

Show/Hide Code

Connect Rapoo MT750S with Linux (Tested on Manjaro)

 I bought this obvious copy of MX Master 2S in hopes of having the device switching functionality along with a lightweight body because I ha...