Applications taking too long to launch in Ubuntu?
If you use Ubuntu on your laptop (and why not?) you maybe facing or may have faced this problem. But fikar not, here’s the solution.
Scenario:
You user wireless/wired network to conenct to your company network. Suddenly one day you are asked to travel and you take the laptop with you. While traveling you find that any application you open takes at least 1 or 2 minutes to spawn. You are stumped. You log on to the network and find that nobody has had this problem. You disable Compiz and desktop effects but still no improvement.
Solution:
Open /etc/hosts in your favorite editor.
sudo vim /etc/hosts
The 1st two lines read
127.0.0.1 <hostname>
127.0.0.1 <hostname>.<domainname>
Change the second line to
127.0.0.1 <hostname>
And voila you’re good to go
And what’s better, unlike, Winblows you don’t have to restart
Reason:
The way Ubuntu is built I think it tries to reach the network to check the existance of your username everytime a command is executed. Even if you’re running some application from the GUI it means a command is spawning the application in the background console. To verify this, even before you make the above changes, fire up a terminal and try spawning an application. After some time you’ll notice a “username not found” kind of error and then the application starts. This means the OS tried to search for the username on the network and upon failing finally launches the app. But this removal of domainname should fix the problem.
Dude…
A post about wireless internet is long overdue!!
Niranjan
January 2, 2009 at 4:07 pm