Autogenerating content in /etc/resolv.conf

I encountereda serious problem with my resolv.conf file that whenever i restarts the system the file goes balnk so i didnt get network connection..So i need to edit the resolv.conf file always and enter the nameserver auto fill the nameserver details in resolv.conf there’s a tricky way

cd /etc/resolvconf/resolv.conf.d
sudo cp -p head head.orig  #backup copy, always do this
sudo vim head

The top of the file is a scary warning. The file /etc/resolv.conf is autogenerated from the contents of this file; the warning is there so it will get put in /etc/resolv.conf when /etc/resolv.conf is generated. To the end of the file, add

nameserver <ip_of_nameserver>

Save and quit.To finish up, regenerate /etc/resolv.conf so the changes are applied right now:

sudo resolvconf -u

it will still be there the next time your machine boots or your network service is restarted.

Happy Hacking 🙂


Play more than one Audio sample in Processing


While trying to play more than one audio sample in processing you may get a error like this…

==== JavaSound Minim Error ====
==== Couldn't open the line: line with format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian not supported.

==== JavaSound Minim Error ====
==== Unable to return a SourceDataLine: unsupported format - PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian

Screenshot from 2013-05-10 12:52:19

To fix this error

sudo cp /usr/lib/jvm/java-6-openjdk/jre/lib/i386/ ~/Desktop/processing-1.5.1/java/lib/i386/
sudo cp /usr/lib/jvm/java-6-openjdk/jre/lib/ext/pulse-java.jar ~/Desktop/processing-1.5.1/java/lib/ext/
sudo cp /etc/java-6-openjdk/ ~/Desktop/processing-1.5.1/java/lib/

Now try to play usually the problem may get fixed by this..but if the problem persists then its an ownership problem since pulse-java.jar and were owned by root.Then do these steps

sudo chown MYUSR:MYUSR ~/Desktop/processing-1.5.1/java/lib/ext/pulse-java.jar
sudo chown MYUSR:MYUSR ~/Desktop/processing-1.5.1/java/lib/i386/
chmod +x ~/Desktop/processing-1.5.1/java/lib/i386/

replace MYUSR with your current Linux user name.

Substitute ~/Desktop/processing-1.5.1/ with the path were you installed Processing
This will solve the issue happy hacking 🙂