Posts

Showing posts from June, 2014

Install windows after installing Ubuntu.

PROBLEM:
Installing Ubuntu after installing Windows is easy. But installing Windows after installing Ubuntu removes my grub installation. How can we safely install windows after installing Ubuntu.
SOLUTION:
Here's what we should do:
Make space for windows.Install windows.Reinstall GRUB.Install the boot loaderMAKING SPACE FOR WINDOWS:              Open Gparted and make a partition for windows according to your requirements. Make note of current /boot device. If that doesn't show up there, make note of the / device. The device name is something like sda5.You can install Gparted using the following commands:
sudo apt-get install gparted



 OR you can use Gparted in your live Ubuntu CD.
INSTALL WINDOWS:
Just install windows into the space (partition) that you've made in the previous step.
REINSTALL GRUB:Now load your Ubuntu live CD. Open a terminal in the live session and enter the following commands:
If you do not have a separate /boot partition:


sudo mount /dev/DEVICENAME_FROM_STEP_ONE /…

Install dependencies while using a *.deb package

PROBLEM:
Let us say that I have package named name.deb and I need to install it using the terminal.
But if I use 
sudo dpkg -i name.deb

then it will install the package only, but not the dependencies.
So, what should we do?
SOLUTION:
The solution is very simple.We can use gdebi to install the package along with its dependencies.
To use gdebi we need to install the package gdebi-core

Open a terminal and type the following:


sudo apt-get install gdebi-core


Now you can install your package using the following command:


sudo gdebi name.deb

Run Gimp in single window mode

Image
PROBLEM:
One problem we face while using Gimp is floating windows.
It may not be a problem if we are using small number of tools. But it may get difficult to work if there are to many windows that are open.

So, what can we do.
SOLUTION:
Just go to Windows → single window mode.Select that option and you are good to go!


Make searching history in terminal easier

PROBLEM:
This might not be a problem but a feature . But I want to mention this here.Some times while using the terminal you might know a command which is very big and you've already used it before. That means it's in the terminal history and you want to use it.
It is really irritating to hold the up arrow (↑) until you find it. So, here's an useful feature that allows you to search the history just by typing the first few letters of your command in the terminal.
Let me illustrate what we want to achieve using an example. 


sudo -s
ls
man sudo

If I want to use sudo -s I have to press ↑ three times. Instead of that I can use it by typing S and pressing ↑.

Let's see how to do it.


SOLUTION:
Open a terminal and type the following:

gedit ~/.inputrc
## arrow up
"\e[A":history-search-backward
## arrow down
"\e[B":history-search-forwardNow we can search easily in the terminal.

How to setup DSL connection?

Image
PROBLEM:
How can I setup an internet connection through LAN over PPPOE (wired DSL or landline) connection?
SOLUTION:
You can setup your internet connection using two methods. One is by using the GUI and other is using the terminal (command line).
USING THE GUI :
This method is for configuring your DSL connection using the GUI method.
First open the dash and search for network connections.
Click on the network connections icon shown in the search results.
Now a new window will open.
Now click the add button.


Now a new window will open. Select DSL from the options.



.Now click on create. A new window will open.Now type your username and password  that your ISP gave you.


Now click on save. You can even choose to connect automatically in the general tab.
Using the command line (terminal):Open a terminal and type the following:
sudo ppoeconf


A text-based menu program will guide you through the next steps, which are:
Confirm that your Ethernet card is detected.Enter your username (provided by your ISP).En…

Easter eggs in Ubuntu

Image
PROBLEM:
I am bored with this website (all problems). Give me some fun!
Alright! Today I'll tell you somethings that might have not known about Ubuntu. You will be amazed how many Easter eggs are present in Ubuntu.
Get ready!
Here comes the first.
Open a terminal. Now type the following.
sudo apt-get install sl

Now type:
sl

You will see a train running in your terminal like this:


Now the second one. Type the following in your terminal:
apt-get moo

You will see a cow like this!

Now let's see the next one. So, apt-get has a cow. Does aptitude have one? Let's seeOpen the terminal and type the following.
aptitude moo

You will see 
There are no Easter Eggs in this program.

What shall we do? Let's try again with:
aptitude -v moo

You will get:There really are no Easter Eggs in this program.



And again:
aptitude -vv moo
aptitude -vvv moo
aptitude -vvvv moo
aptitude -vvvvv moo
aptitude -vvvvvv moo

The output will be like this:

Now let's try another.
Type the following :
telnet towel.blinkenlights.nl

What…

Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

PROBLEM:
Some times we get the following error while trying yo install software using apt-get or synaptic packaging manager.
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?


How can we resolve this?
SOLUTION: 
The problem occurs if we are running another applications like synaptic using the directory. So, if this is the case close the applications and try run the command again.
You will also get this message if you forget to use  sudo  when executing an apt command.You can use sudo lsof /var/lib/dpkg/lock to find the process that owns the lock fileThen try to kill the process to remove the lock.
**WARNING**
This should be used as last resort. If you use this carelessly you can end up with a broken system.
You can delete the lock file with the following command:
sudo rm /var/lib/apt/lists/lock


You may also need to delete the lock file in the cache directory.
sudo r…

How do I reset my administrative password

Image
PROBLEM:
This is a problem that we might experience while using any operating system. So how do we reset the administrative password? 
SOLUTION:
To reset the machine password we need to boot into recovery mode.To do that we must enter the GRUB menu. If you have a dual-boot or multi-boot ( two or more operating systems on the same computer) you will see the GRUB menu directly. I f you don't have any other operating system after the BIOS menu hold down the SHIFT key and you see a menu like this:

Select the second one (the one with recovery mode).Now you will see this menu:

Select root or netroot using the arrow keys and press ENTER.Now you should see a root prompt like this:
root@ubuntu:~#



At this stage you should have a read-only filesystem. You have to remount it with write permissions:Type the following and press ENTER
mount -rw -o remount /chmod 640 /etc/shadow
Now we can set the password using passwd command.
root@ubuntu:~# passwd USER
Enter new UNIX password:
Retype new UNIX password:
pass…

How do I resolve unmet package dependencies?

Image
PROBLEM:
The most common problem that Ubuntu users face is unmet dependencies.

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.
What can we do to resolve this:
SOLUTIONS:

If the error shows something like this:

<some-package>: Depends: <other-package> (= version) but this-version is to be installed
Then make sure that the restricted and universe repositories are enabled. Press Alt+F2, type software-properties-gtk and hit Enter or search for software & updates  in the dash.

Under Ubuntu Software tab, enable all the repositories.



One possible cause of unmet depe…

What should I do when Ubuntu freezes!

Image
PROBLEM:
All operating systems freeze some times and Ubuntu is no exception. What should I do when:
A program stops responding?Nothing responds to mouse clicks or key presses?cursor stops moving entirely?What things can I try before hard rebooting the machine?

SOLUTIONS:
When a single program stops responding:
When a single program stops responding mostly we can close it by clicking on the X shaped close button on the top right corner of the window.We will get a dialog box saying that the program is not responding and you may press force stop or wait for the application to respond.

You can also kill an application using xkill. Press ALT + F2 and type xkill and press Enter.Now the mouse cursor will turn into an X. Click on the non responsive window to close it.
When the mouse stops working:
If the keyboard still works, press ALT + F2 and type gnome-teminal . From there you can start to troubleshoot things. If you want to try restarting the GUI run sudo service lightDM restart .If these fail to…

Window cant be resized

Image
PROBLEM:

A recent problem that I've faced is that Nautilus (the file manager of Ubuntu) was resized and I was not able to change the size of it.
This problem also applies to other applications which can't be resized.

Take a look at how it was:

The fixes for this problem are:METHOD 1:

Press ALT and then middle click (mouse) on the window of the file manager and then resize.

Note: Your cursor must be at the edge of the window for this to work.

METHOD 2:

Click on the files window and then hold ALT and press SPACE . A small menu will appear at the top left corner of the window. It will be like this:




Click on resize and restore it to the original size.



: )