Jaunty Jackalope Review
Ever since jaunty released , I had cleared made up my mind not to try it out. I thought 6 months was too little time to spend with intrepid . I was completely configured and running smoothly on intrepid that I never felt the need for upgrading to the next version though I heard about the new notification system or the awesome boot up time . But yesterday night , I was crazy and wanted to do something and installed jaunty
. So this is sort of my review. Now what made me so crazy was that , I had failed in all my attempts to install amarok 2.1 in intrepid . It just wouldn’t install . All it did was install amarok 2.0.1 and i downloaded the source of 2.1 and compiled and tried to install. Still failure . So I was determined to do something successful and was convincing myself about the upgrade . So then came the confusion of whether to go for kubuntu or ubuntu . Because some of the kubuntu plasma screen shots were just awesome and inviting . I some how settled with ubuntu and gnome .
At first , the Live CD itself was fast . I couldnt see any lag and I tried to see if it had the latest drivers for my nvidia graphics card ( this sort of screwed the first boot after my installation ) . It downloaded the drivers succesfully and thinking it was a normal install , had asked me to restart . I chucked it and went along to install jaunty and the installation was also quick . Using Ext4 now . And then the first boot struck the panic .
Since I had downloaded the nvidia drivers in my live session to check if drivers do exist, it had downloaded it on to the RAM and marked it to be used on the next boot which happens to be my first boot after installing . But sadly the downloaded drivers are no more because it was temporarily on RAM and the Xorg crashed saying not able to find the nvidia driver modules.I recovered from that and then went on to configure the system ( first update in FB that I am into jaunty now ) . Then I went on to download the proper nvidia drivers this time on to my / and enabled it . Installed compiz , and transferred all the config files from intrepid that I had taken back up to jaunty . All my themes and Icons , fonts , splash screens , GDM s from intrepid are now on jaunty . In about 2 hours , I was totally settled with Jaunty . This is what I really liked about Ubuntu when compared to Fedora . If I was doing the same process in Fedora , it would have taken me easily about a day or more . I got everything installed in Jaunty in a Jiffy from realplayer , texmaker , vlc , amarok , php5 , falsh players and stuff . Did all changes to bashrc , fstab , etc etc .
In general , I was really happy to have switched to Jaunty for the following
1. Awesome boot up time . It booted off in some 20-25 secs .
2. The system was a bit fast now .
3. Ext 4 is something new
4. The new notifications
5. The new usplash and GDM .
6. Was surprised to see the new Xorg server work fine without any of the so called reported probs .
I don’t think I had any probs apart from the initial nvidia screw up and one pidgin screw up . I had added a buddy pounce in my pidgin to shut down pidgin when this somebody@gmail.com comes online . And looks like the pounce was activated each time I tried starting pidgin and that “somebody” was online . Gave some segmentation fault because I was trying to kill pidgin from itself I guess . Apart from all these jaunty looks new and exiting and yeah , I finally had amarok 2.1 in my jaunty and it was making good progress towards to a stable release with all features of amarok 1.4 . From now on , I guess all that is between upgrading from one ubuntu release to another is just 4 hours of work and a really fast internet connection
And I am mirroring the repos for jaunty from IIT M tomoro . So ppl who need it can get it from me
.. or I ll put it up in coll when I am back ![]()
Any reviews or followups , leave it in comments please .

Making a Screencast in Linux !!
Making small utilities in Linux is fun . There are a hell lot of small tools in linux that when you put together , make cool things. I made a few this week when I was bored after watching “House” continuosly.
There are three things I am gonna put up here .
- Making a screencast of your desktop .
- Making a recursive video
- Opening a man page in a pdf viewer .
1. Making screencast of your desktop :
The main motivation behind this is Topcoder and Petr(yeah the target red coder … he is an Alien too ) . Petr used to screencast his topcoder matches to the world . So I started looking into the net for tools to capture my desktop as a video file ( not that I wanted to screencast my topcoder matches . Would be pathetic
) . So I came across a couple of GUI’s for windows and then Abhilash was out looking for the same thing ( may be his screencast would be interesting . He types at an amazing 90 wpm
) . By this time I had got my hands on this tool ffmpeg which had the option to grab the video from anything . So little bit of googling lead me to a site which gave me this
ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq ~/Desktop/out.mpg
But sadly this didnt work for me . And then I went on to read the man pages of ffmpeg and this is when i found it buggy to read the man page of a big command in terminal and I went on to create a small utility to open man pages in evince (later on this ) . But this command didnt work for me and gave some error in the input format. Reading the man pages, -f is for forcing the source format which is “grabbing the X11 display ” ( the desktop of X actually ) . The -s argument is for the output video resolution size and found that setting it to wxga was the mistake . I changed it to suit my resolution which is xga . -r is for the frame rate in fps . -i gives the input file which in our case is the :0.0 display . -sameq says the ffmpeg to use the same video quality as produced by the source. You might wanna remove this incase you want a video file of small size. And finally this command worked
.
ffmpeg -f x11grab -s xga -r 25 -i :0.0 -sameq ~/Desktop/1.mpg
Now , this is not an easy command to write and I wont be needing it often . So , I thought why not make a script out of it . So put the following in a file and named it as “capturevideo” and changed the command to
ffmpeg -f x11grab -s xga -r 25 -i :0.0 -sameq ~/Desktop/$1.mpg
so that I can get the output file name from the command line . Now all I had to do was export my PATH variable to make it search my /home/Sathya/Tools folder where I have kept all these small tools . Opened my .bashrc file and added
export PATH=$PATH:/home/Sathya/Tools
and then finally did a
chmod u+x /home/Sathya/Tools/capturevideo .
And Bingo !!! capturevideo sample created a sample video of my desktop operations . I actually made a recursive video out of it
.
2. Making a Recursive video using Step 1 :
Actually I stumbled upon this by mistake . Follow the following steps to make a recursive video .
- Run the above capturevideo command .
- Open the video file that is being created while the command is still running and put it to full screen
- Keep watching till you feel you have recursed enough in the video
.
Now press a ‘q’ in the prompt of capturevideo and enjoy watching the recursive video . Here is a screen shot of my recursive video
. This will create a linear recursion . In case you wanna double up, open it in two players and capture .

3. Opening a man page directly in your pdf viewer.
I had already blogged about a part of this here on how to convert a man page to pdf here . Basically man has a -t option which creates the ps form of the man pages . I redirect that to a file and store it as a post script file and use the ps2pdf utlity to convert the file to pdf. Till now is what i usually used to do . But this was getting irritating since each time I had to delete the files created after I am done viewing the page. Hence this is what I did .
man -t $1 > /tmp/$1.ps ps2pdf /tmp/$1.ps /tmp/$1.pdf evince /tmp/$1.pdf rm -rf /tmp/$1.ps /tmp/$1.pdf
Now we store this in a file called manpdf and then do the following to give it permissions to execute .
chmod u+x /home/Sathya/Tools/manpdf
And from now on , doing a manpdf ls would directly open the man page in evince and after you are done reading the man page , it will delete the temporary files created in the /tmp folder. Is’nt that really simple
Any more easy utilities are welcome as comments
.
gstreamer bug in Ubuntu and a temporary fix
Off late I found that some of the movies that I downloaded from the internet played really wierd . The quality of the movie was good but the colors seem to be distorted and there used to be a green band . Look at the pics below . The one in the left is how the actual movie is supposed to be and the one in the right is how it appears.


Few things I tried out to fix this :
1. I thought it was the problem with the video i downloaded because not all videos had this prolem . So I tried using mencoder to convert to other formats and fix the video . Didn’t work
2. Tried re-downloading and changing my torrent managers . Miserably failed
3. Tried playing in all sorts of different player . All of them had the same problem . Now I was sure it was not a problem with the codecs used nor the player.
4. Booted in windows and tried playing . Worked perfectly fine. So I was sure the problem was still with Linux .
In the mean time I had deleted a couple of movies because I really got irritated because of the problem .
This is when googling struck me and I found out about the gstreamer bug . GStreamer is a library for constructing graphs of media-handling components. The applications it supports range from simple Ogg/Vorbis playback, audio/video streaming to complex audio (mixing) and video (non-linear editing) processing.
Tried meddling with the properties of gstreamer from the command line . No effect
Finally did the following
sudo apt-get remove totem-gstreamer
sudo apt-get install totem-xine gxine
Yippe !!! All videos worked fine with the new players using the xine engine
. I hope they get to the bug fix soon . Mean while you can log your complaints at http://bugzilla.gnome.org/show_bug.cgi?id=357741 and please mention any fixes you get to know . One of them involving changing gstreamer properties seems to work for some .
The easiest way to download Youtube videos in Linux :)
Have you ever wondered to write an application to download a youtube video in linux ?? If you are too geeky , u can do something so complex like , use awk ( which is string processor ) to download you tube videos ( refer this ) . But i am in no position to learn awk just to download youtube videos.So i happened to get to my /tmp folder and realised that a cp command would do the job
Lemme first point out that this method would work for any video that you can watch on your firefox browser ( or any other browser for that matter ) .
All i am gonna do is use a cp command to download youtube videos. Some times things are so simple in Linux you see.
Say you are watching a youtube video in firefox and want to download , you need to do the following .( Donot close the page that hosts the video )
1. Let the video to load completely .
2. Once the video gets loaded completely, open your terminal and do the following :
a=`ls /tmp/Flash*` && cp $a ~/Desktop/1.flv
Voila !!! Thats it .. you are done.. You would find the video in your desktop . Basically when your browser plays the video , it maintains a temporary copy of it in /tmp folder with a name Flash followed by some string . So in case you wanna download , all you have to do is , before closing the site from which you are viewing the video , copy it on to your hard disk
. So simple isnt it ??
In case you have more than one video files in the tmp directory , do the following
for i in `ls /tmp/Flash*`
do
cp $i ~/Desktop/$(basename $i).flv
done
And tht should copy all Flash video files into your desktop.
Leave any simpler ways to do if so in the comments
. Also if the above method fails in any case…
Tuxventure – Online Linux Event at Pragyan 2009
Writing about this takes me back to a year ago when i made my second post about Pengufest at Pragyan 2008
. I was then new to Linux and now looking back , its all nostalgic
.
Tuxventure is an online Linux event , that me and couple of my friends thought of having it for this edition of pragyan. We initially thought of making the event on-site , but owing to technical difficulties , we made the whole thing online. The prelims will be held on February 1st and the Final is to be held on Feb 8th . The prelims will be of MCQ s to test Linux fundamentals and the finals will concentrate on design and shellscripting . So i am hoping to see a great couple of days ahead. Not to forget the days i spent preparing the questions. I hope the participants enjoy the questions
. It was a great venture for me to sit with hari and prepare the ques
And to add to the awesomeness i had an awesome poster designed by eskay for the event .

If you havent yet registered for the prelims do so before Jan 31st. The prelims can be taken any time on Feb 1st .
Site : http://www.pragyan.org/09/home/events/encipher/tux_venture/
Using mencoder to convert Videos in Linux
Have you ever wondered bothering to check on why windows has so many video converters ( of course the pirated ones
) . If you have gone to that extent , you would have realised that the backend for almost all of them is a command line utility called “mencoder”(Its not “men”coder
. Its “m”-encoder
) . There is actually lots to tell about this mencoder . There is also command line player called mplayer which is the counter part of the encoding utility mencoder . mplayer can play all your music in command line and it has support for managing playlist and everything .
To remind you, mencoder was realeased under the GNU GPL and hence as you would expect , there should me more utilities based on mencoder on Linux than Windows. But sadly i exhausted all my resources to finding a suitable GUI for video conversion in Linux . All that i found were small ones that could not handle the full capacity of mencoder. And so was i fed up with this searching process and started to realise why i hadnt tried using mencoder from CLI. I had earlier used mplayer in some occasions . I had this movie which was in VOB format and i wanted to convert it to avi format to reduce the space . I couldnt find any useful repo for video conversion . (If any good ones please let me know ) .
Usually anything you use on Linux is well documented and i would go for the man pages. But i actually cursed myself for typing “man mencoder”. This mecnoder is “WELL” documented that there are 6287 lines of documentation . And thats when i realised the actual power of mencoder . You can almost do anything with a video or audio using mencoder . I could find options for mirroring , rotating the screen and almost conversion from any format to anyother format. But the catch was you will have to do this all in CLI .
So i sat down , scanned through the man pages and foung my exact options for converting from VOB to avi . I would suggest you do this before trying out mencoder .
man -t mencoder > mencoder.ps && ps2pdf mencoder.ps .
This should get you the man pages of mencoder and mplayer in pdf file so that you can read it comfortably .
I cant going into details of mencoder usage because its so big to explain and I havent tried out even 1% of its full options. I am posting below two screen shots of the conversion process .
I executed the following command to convert from VOB to avi .
mencoder ./Mahanadhi/VTS_1.VOB -o ./Mahanadhi/1.avi -of avi -oac copy lavc -lavcopts vcodec=mpeg4Below you can see a screenshot of the conversion process
.

Using “at” command to schedule jobs in Linux
Everything has a strong motivation behind it and the reason i am writing on this is because it made downloading from torrents easy for me during the off-charge hours. I usually had to stay awake till 2 am in the morning and put it for download and then have to get up again at morning 8 to switch it off.I was too lazy to do something and at came to my rescue.And last month i usually dont get up by 8 in the morning and i used to overshoot my 1.5GB download limit.
You can always do the following using cron, but again at has its own speciality. While in case of cron , the job runs at the scheduled frame of time on everyday , at can be used to schedule jobs which dont happen regularly. Like my case, i didnt want to download everyday so had to put the download only whn i am at home
.
So at command works like this
sathya@Phoenix:~$ at 11:30AMwarning: commands will be executed using /bin/shat> echo "I was executed at 11:30AM" > ~/Desktop/tempat> <EOT>job 30 at Sun Jan 18 11:30:00 2009sathya@Phoenix:~$
All the above command does is ,it prints the line “”I was executed at 11:30AM” at 11:30 AM . Since the command is run with a shell of its own, to see any sort of output displayed to the stdout , i redirect it to a file of my choice (~/Desktop/temp).There are many ways to specify the time for the at command . For a complete list on the date day , time formats chk /usr/share/doc/at-3.1.8/timespec which contains the exact definition of the time specifications.
You can now do a simple cat ~/Desktop/temp to read the output after 11:30 AM
.
Now coming to options for at .
Use atq to know the current jobs in queue. Jobs that are running have a status as” =” and jobs to be scheduled have a status “a” .The displayed output is the format <job-id> <Time > <jobstatus> <user>. Each scheduled job has a unique ID usually numbered from 0
sathya@sathya@Phoenix:~$ atq 30 Sun Jan 18 11:30:00 2009 a sathya sathya@Phoenix:~$ Phoenix:~$
To know the command to be executed corresponding to a job id , use the following option of at -c <job-ID> . This displays all the details for the job including the variables used for the shell to be invoked for this job . And hence wht u see mostlty would be junk except for the last line which has the command to be executed. So use a tail option to read tht one alone.
sathya@Phoenix:~$ at -c 30 | tail -2 echo "I was executed at 11:30AM" > ~/Desktop/temp sathya@Phoenix:~$
To delete a job use atrm <job-ID> .
Now for ex ,sathya@Phoenix:~$ at 11:58AM warning: commands will be executed using /bin/sh at> gnome-terminal at> <EOT> job 31 at Sun Jan 18 11:58:00 2009 sathya@Phoenix:~$
The above command as expected is supposed to open a terminal for u at 11:58 . But it doesnt . Because at by default does only console applications. To make GUI apps , all u need to do is a small modification ( thanks to akhil for pointing this out ).
sathya@Phoenix:~$ at 11:59AM warning: commands will be executed using /bin/sh at> DISPLAY=:0 gnome-terminal at> <EOT>job 32 at Sun Jan 18 11:59:00 2009 sathya@Phoenix:~$
At command reads usually the commands from stdin but using the -f option allows us to read from a file.All variables except the $DISPLAY and $TERM are retained from the time the command was put into queue. All these variables and their associated values can be viewed using at -c <job-ID>.In case of using non console applications , u need to specify the $DISPLAY manually as shown above .
Ok so the final thing i ll be doing to start my “transmission bit torrent” at 2.00 am and stop it at 8.00 am is the following
sathya@Phoenix:~$ at 2.00AM warning: commands will be executed using /bin/sh at> DISPLAY=:0 transmission at> <EOT> job 35 at Mon Jan 19 02:00:00 2009 sathya@Phoenix:~$ at 8.00AM warning: commands will be executed using /bin/sh at> killall -r transmission at> <EOT> job 36 at Mon Jan 19 08:00:00 2009 sathya@Phoenix:~$
This solves the job of taking care of my downloads.And for a GUI version of this, use Ktimer. But u will have to kill yourself if u r gonna use it after having something cool “at” you
. Any suggestions or improvements or new approaches can be put in comments
Mirroring the Linux Repositories for Ubuntu
I wanted to mirror the ubuntu repositories back in my coll . So i needed to download the required packages for Intrepid Ibex . Ususally the download would take place in NIT Trichy itself but this time because of frequent power cuts , we were not able to run debmirror . Debmirror is a perl script that helps us in downloading the packages for specifc distribution. Debmirror runs a script so a powerfailure would actually stop the download . But say u lost ur internet connection in between , it restore automatically if the script is still running .
Earlier I had planned to get the repos from Hari who said he would get it from his office . But recently i found that the repos he gave was missing the multiverse components in it . So it was missing quite a lot of packages ( about 3 GB) . I couldnt run a wget because this multiverse component had to be inserted into lots of places and had to be gathered from a large pool selectively . So ftp falied me too since i couldnt select the packages for the 8.10 distro alone.
Suren suggested apt-mirror and i had some issues with it and again it failed miserably. And then i did some calculations and thought why not download the whole repository again . According to my calc , it should take me about 7 hours from the local site at IIT M. So Hari guided me on debmirror and after few intial glitches i managed to download the complete repository and i was amazed at the speed of download . It was close to 3Mbps ( Look at screen shot below) . The entire download took just 2 hours and i was all ready . I had to ignore verifying the gpg key of the packages while downloading since that was again causing some problems . I am giving the screen shots below ..and i am also including the script for debmirror .
#!/bin/bash
export GNUPGHOME=/home/mirrorkeyring
arch=i386section=main,restricted,universe,multiverse
release=intrepid,intrepid-security,intrepid-updates
# this was the local iitm mirror behind my proxy
server=10.65.0.42inPath=/ubuntu
# u can use an ftp too if u want
proto=http# this is the place where u need the repos to be stored whn downlaoded
outPath=/media/Sathya-Maxtor/temp# Start script
# i added –ignore-release-gpg to skip the key verification
debmirror -a $arch \
–no-source \
-s $section \
-h $server \
-d $release \
-r $inPath \
–progress \
-e $proto \
–ignore-release-gpg \
$outPath#### End script to automate building of Ubuntu mirror ####
And here is the screen shot of my terminal after the download

if u dont have debmirror run sudo apt-get install debmirror . I had to change my sources.list to point to 10.65.0.42 to download the debmirror and then use it to download the repos from 10.65.0.42. U can do it as per ur requirement. But downloading from internet is gonna take quite few days
The fun of reading e-mails from CLI
I loved this comic strip from geekhero webcomic .

Lol… now u seriously wanna read mails from CLI ????
Shifting from Fedora 8 to Ubuntu 8.10
This is something i had been planning for a very long time since i found my fedora 8 boring .Its not that fedora isnt good , but i was done configuring a hell lot in fedora that i wanted it to be more simple. So i waited till Itrepid Ibex gt released and since the day it got released i started taking back up of important files from my /usr/share.
I had changed my fedora themes and icons so much that i never looked like fedora. But then deep inside it was basically the fedora 8 and i wanted a change. So this after noon at 2 i started my reinstallation and i first thought i will wait for few more days to get the repos from hari who is bringing it from banaglore. The net at my house has a download limit which i had already very well exceeded.
Each time i had a prob with my fedora i had to go google , find out why the problem occurs and then get the solutions . But with ubuntu it was all one click away. And in no time i found all my service from music to IMs and topcoder applets up and running . Its so sweet using ubuntu … I <3 ubuntu
And ubuntu has a much better support on the net than fedora.Go ubuntu Go !!!
