Archive for May, 2006
Now, That is a sight
There is just one place in the world you can possibly see this. Pondicherry. It was happiness, almost close to surprise to see Tamil and French next to next on the same bill board. Just gorgeous.
What am I ?
Blue Pyramid thinks I am “Adventures of Huckleberry Finn”. I dont even think I have read this book. Time to do it now, though.

You’re Adventures of Huckleberry Finn!
by Mark Twain
With an affinity for floating down the river, you see things in black
and white. The world is strange and new to you and the more you learn about it, the less
it makes sense. You probably speak with an accent and others have a hard time
understanding you and an even harder time taking you seriously. Nevertheless, your
adventurous spirit is admirable. You really like straw hats.
Take the Book Quiz
at the Blue Pyramid.
Urgently…
I need a date on friday night..Preferably someone I dont know. Who can help me ?
Ironic indeed
I was just listening to Jagged Little Pill Acoustic version of Alanis Morisette…And she goes
“It’s like meeting the man of my dreams
And then meeting his beautiful husband“
Instead of…
“It’s like meeting the man of my dreams
And then meeting his beautiful wife “
Guess it does happen when you keep doing the same thing over and over again. It was a really bad rendition of a very good song as well…
Ironic indeed…
The magic of x2x and x2vnc
I have solved this problem about 7 times now. And everytime I reboot the machine, all the xhost and nolisten tcp stuff that I did to my X server will vanish. And, considering the amount of RAM I have in my head, I will start from scratch once again, wondering how to go about doing it. So, this time I decided to write it up, atleast for my convienience.
So, Without any further crap…Let us assume you have two machines ( hosts) at your workplace/home..They have two displays ( monitors) and you dont have ( or want to have) a KVM switch. Two displays at the same time is good, but two keyboards and two mouses is a really irritating thing. I end up typing my password using the wrong keyboard all the time. Or hang on to the wrong mouse and wonder what the hell is wrong with it. I also used to wonder if there is a way to pass a piece of text ( from the clipboard) , say a URI from the browser of host A to the browser on host B. Unintelligently, I used to run a messenger client on both the hosts, and send the blob over IM back and forth.
Connecting two X servers:
Ok, Now that we are convinced we need something better here, let me introduce x2x. It is a magical pixel grab software that works really well on two different OSs. ( I connect a linux host to a FreeBSD host). Thanks to the concept of X server. You could get the sources from here or check out your ports distro for packages.
Install x2x on one of the two hosts (that has the better mouse and keyboard) and then issue a command like this:
x2x -west -resurface -to tohostname:displayport
Dissection:
-west: This means that the host you are connecting to ( Or the host you wish to use without it’s mouse/keyboard) is to the west of the host you are connecting from. If you are poor in directions ( and I always say a lot of women are), think of the number “4″.. Draw the number “4″ with the horizontal line first starting from the right. This is your east..and then go “east , west, north and south” as you write “4″.
-resurface: Not so important..Check up x2x -h or the man page for more info.
-to: This signifies that the following string is the host you want to connect to ( Or pixel grab from).
tohostname:displayport: This the hostname and the display port. For ex, my.host.name:0.0
How do you figure out what the display port is? go to the host you are connecting to and then type
echo $DISPLAY
That will tell you what display port you must connect to. Now that we are at it, the default X port is 6000 which is signified by 0.0 . U can also run multiple X servers on the same host listening at different ports. In that case, your display port must go 0.1 , 0.2 etc , which actually translates to port 6001. 6002 etc…
Thatz it. Put this as a rc command so that it gets fired everytime your host reboots, and that you can always use the same mouse/keyboard without having to run x2x everytime.
Important notes:
- All X servers, by default run with the option “-nolisten tcp”. What this means is, the X server is listening on a unix domain socket and that it wont listen to TCP connect requests from the network.
For instance, if you are running gdm, then a ps ax | grep gdm will show the arguments passed to gdm and one of them will be “-nolisten tcp” . You have to open up your gdm.conf (in my case, it is at /etc/X11/gdm/gdm.conf ) and then explicitly set DisallowTCP as false. Restart the X server and you will be fine.
- You might also have to do a “xhost +from.host.name” so that the X server running in to.host.name allows the from.host.name to connect to it.
Connecting to a windows host from a host that runs X:
I also sometimes boot up windows. That shouldnt deter us from doing magic, should it?
Ok, install a VNC server on your windows host. RealVNC is a really good, free to use VNC server for windows. Start up the VNC server and then make sure you allow clients to connect ( with or without authentication) , and other stuff that it has.
Download x2vnc sources from here or check your distro for packages. your x2vnc command will be very similar to the x2x. As I am losing patience, please check “x2vnc -h” or the man page for more details.
Hope that helps someone..
wma to mp3
That is simple..This is how I do it:
mplayer -vo null -vc dummy -af volume=2:sc,resample=44100 -ao pcm:waveheader /home/shivku/hdrive/Music/Green\ Day/When\ I\ come\ around.wma && lame -m s audiodump.wav -o /home/shivku/hdrive/Music/Green\ Day/When\ I\ come\ around.mp3
You should, ofcourse write a script to go pick up all wmas and convert them to mp3s. If you are using MPlayer-1.0pre7try2 like me, make sure you get that -af part right…
af volume=2:sc,resample=44100
without the volume part there, mplayer seems to crash. It is apparently a bug.
Also, -waveheader is deprecated..It is gotta be,
-ao pcm:waveheader
Ensai!

