mpd in solaris

since i wrote about using icecast i am liable to also write about installing mpd now.

well, it wasnt simple. at least not for me. let’s take it step by step.

1. the first thing you will notice is that mpd’s configure utility is not able to find any audio devices. oops! at this point you will have to find out libao libraries for you system. the source install is pretty simple. you might also get some .pkg files through the net. i would have given the links but i did it way back. i a not sure but you might need a restart.
[update: since my libao is in /opt/csw, i say u can find it at blastwave.]

2. ao is disabled by default, so you will have to use ./configure –enable-ao –with-ao=/opt/csw  (/opt/csw is the prefix where ao is installed)

3. now for icecast. if you want it, first install the icecast server from source. also install shout libraries (available from the, again from source. everything should work smoothly.

4. but even now the mpd configure wont detect shout libs. just copy the shout.pc from the shout source directory to /usr/lib/pkgconfig/. also copy the include/shout from your shout source dir to /opt/csw/include (this is definitely going to be included because you gave –with-ao=/opt/csw)

5. if even now the shout support is disabled and you see something like “gnome-config not found” in the configure output, just open configure file, find [[[if test “$PKGCONFIG” != “no” && `$PKGCONFIG –exists shout`]]], and change the “&&” to “||”. basically your pkg-config is giving errors in finding shout. but since its already there, you can skip the check.

6. now everything should work. do a make and a make install. enjoy madi!!

7. install mpc and ncmpc. i tried gmpc but failed. currently i have moved to foobar2k on wine instead of mpd, but if i install gmpc some day, will definitely write about it. ncmpc is easily available as .pkg (blastwave); its a bit old, but serves the purpose.

Solaris add swap file

Well the process is as simple as using ls to list files. But even there, I can screw up.

1. mkfile 1024m <filename>
    Units for the size can be kilobytes (k), blocks (b), or megabytes (m).
2. swap -a <complete file path>
3. swap -l (to list the swaps)

Now the problem is I created the file using my local user and was trying to add it as swap. I kept on getting the following error:
It must be a block device or a regular file with the “save user text on execution” bit set.

Finally, after half an hour of googling and leading nowhere, I decided to do everything as root. Voila!

So the steps are:
1. mkfile 1024m <filename>     (as root)
    Units for the size can be kilobytes (k), blocks (b), or megabytes (m).
2. swap -a <complete file path>     (as root)
3. swap -l (to list the swaps)     (as root)

Netbeans 6.1 and Java jdk6 (jdk 1.6)

If you are as unlucky as me you will find that if you try to use netbeans with jdk 6, you will be thrown a greyed blank window. Now, this happened to me in solaris but it does not necessarily depend upos the os.
The solution is:
export AWT_TOOLKIT=MToolkit

or you can create an executable with the following line: “AWT_TOOLKIT=MToolkit netbeans”, and use this executable to start netbeans.

Perl Errors in Solaris

1. perl: fatal: relocation error: file symbol Perl_Gthr_key_ptr: referenced symbol not found Killed
         — this basically means that your perl executable is using modules from a different perl version. Change your PERL5LIB to use the corresponding libs.

2. Base class package “Class::Accessor::Fast” is empty.
         — might be that you don’t have this package installed. Install it using “perl -MCPAN -e `install Class::Accessor::Fast`”. If you have multiple perl executables (diferent versions), use the full path.. for instance, “/opt/csw/bin/perl -MCPAN -e `install Class::Accessor::Fast`”.

3. Perl lib version doesn’t match executable version at
         — again there is a conflict between your perl executable versions. Be sure which one do you want to use.

solaris home end delete insert pageup pagedown keys

i hated solaris. even now i don’t like it completely. but it has its benefits, the most likeable one being the presence of various devs you might need for building the sources. the most annoying thing is not being able to use many of the accessory keys. even tweaking inputrc doesn’t help. solution?

1. install vim. your editor will be fine atleast with almost all the keys working, and no vi nuances.
2. still the terms don’t work. sometimes you might be lucky enough to get keys working through inputrc. but then they get screwed in vim, displaying escape/control sequences instead of what they are supposed to do.
3. use mrxvt. it provides you options to set the keys only for the term (and not for any other internal applications). change your base terminal to xterm in .mrxvtrc. probably somethings will start to work. if no use the option linuxHomeEndKeys.
4. if your delete key does not work with any sequence, use ^’. if that too does not work, use ^d (ctrl-d). beware: it will cause your terminal to exit if there are no characters on the current line.