ICS Ubuntu, Simplified.

We have a good WiFi enabled Internet campus. Unfortunately, one of the Ubuntu Lucid installations in a Dell Inspiron did not detect the WiFi controller. The last resort was to get an ethernet cable with Internet connection to activate the driver. We asked google and found out perhaps the best solutions to do ICS (Internet Connection Sharing) with Ubuntu here.

I would brief the steps taken so that anybody can get this done very quickly.

Our situation is different from that described in the above document.

Server connected to Internet via wlan0.

Client connected to server via eth0.

You have to make sure no changes to networking has been done since turning on both the computers. If any, you would have to restart both of them.

Server side configuration.

  • Connect the computer to wlan0 and make sure the Internet access is available.

Start a terminal and do the following to configure your network card and NAT.

  • sudo ifconfig eth0
  • sudo iptables -A FORWARD -i wlan0 -o eth0 -s -m conntrack –ctstate NEW -j ACCEPT
  • sudo iptables -A FORWARD -m conntrack –ctstate ESTABLISHED,RELATED -j ACCEPT
  • sudo iptables -A POSTROUTING -t nat -j MASQUERADE

These settings will be cleared when you reboot the system. If you want to set it up permanently then:

  • sudo iptables-save | sudo tee /etc/iptables.sav

Edit /etc/rc.local and add the following lines before the “exit 0” line:

  • iptables-restore < /etc/iptables.sav

Enable routing:

  • sudo sh -c “echo 1 > /proc/sys/net/ipv4/ip_forward”

Edit /etc/sysctl.conf and add these lines:

  • net.ipv4.conf.default.forwarding=1
  • net.ipv4.conf.all.forwarding=1

Client setup:

Disable networking

  • sudo /etc/init.d/networking stop

Give static IP address.

  • sudo ifconfig eth0

Configure routing.

  • sudo route add default gw

Configure DNS Servers.

  • Open /etc/resolv.conf in the server and add the contents to resolv.conf of the client.

Open /etc/dhcp3/dhclient.conf and add:

  • prepend domain-name-servers,;

Restart Networking:

  • sudo /etc/init.d/networking restart

You are good to go!

Note: If you are in a proxy network make sure to apply the proxy settings to the client also.

HP LaserJet P1505 on Ubuntu Karmic

We recently bought a HP LaserJet P1505 printer and I was eager to try it out in my Ubuntu Machine. When I plugged in, a simple pop-up came in asking for my permission to download the hp plugin for the printer. I hit the yes button and, there you go the printer is ready. But neither of the prints came out. I was confused and ran a google search. After some hacks I got it working.

Follow these steps :

  1. Remove the currently installed foo2xqx driver from your ubuntu synaptic manager
  2. Do:  wget -O foo2zjs.tar.gz http://foo2zjs.rkkda.com/foo2zjs.tar.gz
  3. Unpack:  tar zxf foo2zjs.tar.gz
  4. cd foo2zjs
  5. Compile: run make
  6. Get extra device dependent driver ./getweb P1505
  7. Install: sudo make install
  8. Restart cups: sudo make cups
  9. Plugin the printer to USB and turn it ON.
  10. You are now good to go.

The “Weird” problem in Ubuntu Karmic.

Despite of the pulling head ache, I am sitting down to brief the “Weird” problem in Ubuntu Karmic. The key icon of this story is a Dell Studio 14 laptop. My friend recently bought it, and on our special interests, agreed to change over to Ubuntu Karmic. Well, the installation went very well, happy, all well. Installed required packages. But unfortunately, no sound.
But I had similar experiences with an HP Pavillion and Toshiba laptops, hence thought, few simple hacks might get the audio up.
Started with trying volume levels of ALSA. Checked for any conflicts between ALSA and Pulseaudio. Upgraded ALSA. Still, no sound. Edited alsa-conf as per a how-to from help.ubuntu.com. But still could not get the sound up. Switched to #ubuntu and #alsa on freenode. Resorted to their help. After 6 hours, #ubuntu defined as the “weird” problem. Test, diagnostics, everything seemed to be positive. But still, no sound. Would update more regarding this here.

Getting Pidgin voice video working on Karmic

Recently, I upgraded to the much awaited Karmic Koala from Jaunty. Experience with Jaunty was not so sweet. Anyways, thought to give a hand on Koala. Upgrade went successful. The only problem remaining was that I could not start voice or video chat using Pidgin. Koala comes with Empathy as the default client. But I never wanted to use that.
When ever I tried to start a voice chat I got the following error:

Error creating session: Could not create the rtp muxer element
Error adding stream.

This is just a trouble due to permissions to gstreamer and Farsight2. Follow the steps to get it right.

  1. Fire a terminal.
  2. Change directory to your home folder.
  3. Now type “mv .gstreamer .gstreamer.bak
  4. and “mv .farsight2 .farsight2.bak

We are moving the folders in order to be safe rather than deleting them, in case we need to restore them.