Harsh J

Memoirs of a QWERTY Keyboard

Archive for the ‘Linux’ Category

Clearing all log files in /var/log

leave a comment

Stupid things you end up writing when you worry about filling disk spaces at 3 AM in the morning of the day right before your exams begin. The following will delete all your log files in a safe manner, by simply rewriting them to null.

cd /var/log
for file in `find .`
do
	if [ -f $file ];
	then
		cat /dev/null > $file
	fi
done

Suggest better methods if known, and thank you!

Optionally, get in there and delete those now-stagnant .gz files with the following:

find /var/log -name "*.gz" | xargs rm

P.s. So much for BS code highlight plugins printing angled brackets in HTML notations when asked to do bash.

Written by Harsh

May 19th, 2009 at 3:31 am

Posted in Blog,Linux,Personal

Tagged with , ,

Get rid of all PulseAudio problems – Use OSS

22 comments

You might think, like I did: Isn’t OSS dead? Didn’t ALSA replace it ages ago?

Open Sound System - Much better!

Open Sound System - Much better!

The answer, as I learnt, was both yes and no. It did die, only to be revived later by 4Front Technologies who developed it under a commercial license for quite sometime. It went GPL only recently, although with a paid premium-support and on certain platforms only. The improvements made in it are simply amazing. I’ll leave the rest of the mystery to be covered by 4Front’s own blog post. It’s a nice read :)

The following guide on how to shift to OSS from PulseAudio/ALSA is for Ubuntu (Jaunty Jackalope, 9.04*) users alone. A proper guide to ArchLinux’s solution might be found here.
Read the rest of this entry »

Written by Harsh

May 16th, 2009 at 9:10 pm

Ubuntu 9.04 Python 2.6 Site-Packages Directory

5 comments

Strangely the site-packages directory used by Python (2.6) to place/install modules and packages is nowhere to be found in Ubuntu’s Jaunty Jackalope. The newer directory is called dist-packages, no idea why (Only know that it sounds like its for distribution-installed modules).

So to place a package or a link to one, simply do so in the /usr/local/lib/python2.6/dist-packages/ directory.

Written by Harsh

May 13th, 2009 at 1:09 am

Posted in Linux,Software

Tagged with , ,

Anna University B.E. B.Tech. Engineering Course Results for November-December-January 2008-2009 (UG and PG)

275 comments

Results for all odd semesters B.E. and B.Tech (Engineering Degrees, for IT, CSE, ECE, EEE, ME, E&I, etc.) (3rd, 5th, 7th) will be out in the first week of February, as Anna University has officially announced. These are for the exams that stretched from end November, via December 2008 into early January 2009.

Update: For 2010 8th Semester April May Results of Anna University B.E./B.Tech, click here.

Here’s a list of websites you can check for your results. Add in the comments if you know some other ones!

(I shall keep updating the links once results out out)

  1. Anna University Official Website (Results Page) for 2008-2009 Odd Semester (B.E./B.Tech)
  2. Anna University Official Website Links (Site I, II)
  3. Webdunia Anna University results for UG 2008-2009
  4. Deepdig Anna University results for UG 2008-2009
  5. Chennai Online Results for Anna University UG 08-09
  6. WinEntrance Online Results for Anna University UG 08-09
  7. India Results results page for Anna University UG 08-09
  8. WorldColleges results page for Anna Univ. UG 2008-2009
  9. Sivaji TV results for Anna Univ UG 2008-2009

More will be added once results get out.

Fixing MPD to work with PulseAudio

5 comments

It just won’t work. You know that after messing around for over 2 hours.

Update: You can also get rid of PulseAudio completely and shift to OSSv4, a much better sound system with equivalent features, by following the guide at this link.

This guide (or something like it) is for you if your MPD’s errors.log (/var/log/mpd/errors.log) has these lines, and if you are an Ubuntu user (8.10, the Intrepid Ibex):

Jan 08 16:30 : Cannot connect to server in PulseAudio output "Pulse Device" (attempt 1): Connection refused

Officially, as per the MPD Wiki, the fix is pretty straightforward, to add the ‘mpd’ user to the pulse group. By doing the following:

sudo usermod -a -G pulse mpd
sudo usermod -a -G pulse-access mpd
sudo usermod -a -G pulse-rt mpd

Additionally change the related part of your /etc/mpd.conf to look like:

audio_output {
type "pulse"
name "My Pulse Device"
}

Also edit /etc/pulse/default.pa and add the following line at its end:

load-module module-native-protocol-tcp auth-anonymous=1

This should usually fix it, but if not there’s another way. Load up paprefs and select the options that say:

Enable network access to local sound devices
Don't require authentication

Still not fixed? Well, its time to give up and get back to ALSA. Yes, the good old ALSA that respects you. To do this, change your Sound configuration (Found at System > Preferences > Sound) to look like this:

Set all to ALSA.

Set all to ALSA.

Once done, reset your /etc/mpd.conf back to reflect the following:

audio_output {
type "alsa"
driver "esd"
name "My ALSA Device"
}

Restart MPD after each change to /etc/mpd.conf of course.

That _must_ work. But I have no idea what else it might render useless, which I hope does not happen.

Written by Harsh

January 8th, 2009 at 5:06 pm

Posted in Linux,Software

Tagged with , , , , , , ,