Tuesday, February 26, 2008

Linux: Installing Cadence SMV for Model Checking


This post is for all those computer science students who have to face the pain of doing Model checking and verification course as a part of their graduation requirements. One of the most common tool kits used for this purpose is the Cadence Berkley SMV
Get the linux binary package from here

Here are the steps to install it:



1. Extract the tar file to some folder called smv. Change to that folder and copy it to /usr/local

$sudo cp -r smv /usr/local/


2. Set path variables and links

$sudo export PATH=$PATH:/usr/local/smv/bin


$sudo ln -s /usr/local/smv/lib/libsmvcore.so /usr/lib/libsmvcore.so


$sudo ln -s /usr/local/smv/lib/libsmv.so /usr/lib/libsmv.so


3. The command line smv program should start working now. Type this and test

smv


4. To get the gui version - vw running, we need to install some additional packages. Fire up synaptics and install these 2 packages.
tk8.4 8.4.15-1ubuntu1
tix

4. vw can be run now. Run this and test

vw




PS: To run it as a normal user, you can either add the path of smv bin to profile $PATH
$sudo ln -s /usr/local/smv/bin/smv /usr/bin/smv
$sudo ln -s /usr/local/smv/bin/vw /usr/bin/vw
$sudo chmod u+x smv
$sudo chmod u+x vw


Sunday, February 24, 2008

KDE4 : Removing the annoying Konsole beeps


In KDE3 console, the beeps could be disabled from Settings > Bell.
Strangely, I couldn't find any such option in the new KDE4 Konsole.
It has tonnes of new features, but the bell option is hidden somewhere. Let us see how to disable it.


You could start with the following commands
xset b off


setterm -blength 0



If nothing works, best is to switch off the bell from the your profile's inputrc file.
echo 'set bell-style none' >> ~/.inputrc


Great!! Another annoyance solved. Enjoy using KDE 4.

PS: To all the fanatics who are criticizing KDE 4, be patient and give them more time. I bet it's gonna be awesome when KDE 4.1 comes out.

[Src: Debian-Admin ]

Saturday, February 23, 2008

Ubuntu: Encoding video files


So you have an iPod/Phone or some other poratable media player and you want to encode your huge avi/dvd/mpeg flicks into the formats these devices support.
There are tonnes of easy to use encoders for Windows. For Linux, let us look at some great alternatives...

MEncoder and ffmpeg are the two common encoders. Both of them use the libavcodec and support a decent list of output containers.

To encode DVDs, try AcidRip which is a gtk frontend to MEncoder.

Check out their websites for more instruction on how to go about using them.
For instructions on encoding to video iPod, go here


Here are some examples using MEncoder

apt-get install MEncoder


Mencoder - input to 15fps 320x240 avi/mp3 (phones)
mencoder <input> -ofps 15 -vf expand=:::::4/3,scale=320:240 -ovc xvid -xvidencopts bitrate=150:profile=sp2 -oac mp3lame -lameopts cbr:br=96 -o <output.avi>


avi to flv
mencoder <input.avi> -o <output.flv> -of lavf -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3


[img src: Zoran]

Thursday, February 21, 2008

Windows XP Tip : keeping a window Always on Top

My honors year project has to be cross-platform. So quite often I am required to work on winXP to test if my implementation works seamlessly on all platforms. One feature that I really miss is the ability to mark a window "always on top" that Gnome/KDE/XFCE have. So you could be coding in your favorite IDE in a maximised mode and also have a movie or a notepad frame on the same screen.

There is a nifty little app called pushPin which lets you.. do exactly the same thing in XP/98/ME/NT
Download the app, extract it and run it. You will find a pushpin icon in your taskbar. Right click on any open window frame. You'll see an "Always On top" option.



Who said good things in life aren't free ;)

Autodesk Draw: a nice online Vector app

So I was looking for a free alternative to MS Visio. I stumbled upon Gliffy, which seemed to satisfy all my needs in a neat little package but the major drawback of the free account was that you could only save 5 public diagrams.

So I kept on looking and I finally found Autodesk's Project Draw. Draw is a new feature-rich web-based vector drawing application which can be used to create simple floor plans, electronic-circuit diagrams, network diagrams, user interface mock-ups etc.

Though not as feature rich as Gliffy, there is no limit on the number of diagrams you can save. The diagram can also be exported out in a variety of formats.


Try it today and leave your comments behind. Personally, I liked the Gliffy interface better. It also lacks UML/ software engineering components. But it is just a test product and new features and shapes are expected to be added soon.

Monday, February 18, 2008

Pownce Client for Linux ?


I hardly use Pownce, reason being, I use twitter for micro-blogging and facebook and youtube for sharing videos and music with my friends.

The Pownce AIR client is a smart way to encourage more people to use Pownce. Just drag n drop files or post notes and send them to all your friends.
For those Pownce addicts on linux, till Adobe comes out with AIR for Linux, check the KDE4 Plasma Pownce widget (plasmoid).
Unfortunately, the pownce API still does not support posting notes, so this will only let you view notes from your friends.
Watch out for more cool features, when the author updates the widget.

Check out the screenshot..



It looks very similar to the KDE Twitter widget.

KDE 4.0.1 Packages updated


The good folks at KDE recently rolled out KDE 4.0.1 package updates. Fire your synaptics or ubuntu update notification to update your packages. The release notes indicate that some very common bugs have been resolved.
Can't wait for KDE 4.1 release. But for the time being enjoy the new updates/fixes.

[Src: Tombuntu]

Saturday, February 16, 2008

Digsby: No love shown for linux



Digsby is a multiprotocol IM client that lets you chat with all your friends on AIM, MSN, Yahoo, ICQ, Google Talk, and Jabber.
It is also a social networking tool that alerts you of events like new messages and gives you a live Newsfeed of what your friends are up to on various networks - facebook, myspace etc.

It is a nice idea to integrate IM and social networking. More like what flock does with browsing and social networking. I was pretty excited when I finally got the invite code (Thanks to the nice folks at CNET).The screenshots look amazing and I was really hoping to replace the dull GAIM with gibsy.

But unfortunately only the windows client is available for download. Still, I wasn't ready to give up. I tried installing it via Cedega first and then via Wine. Wine manages to install it but it fails to run.




Sad! Anyways, i have sent them a feedback to support linux in future. It would look stunning on KDE4.Or atleast give us a webIM for the time being.
Good news, I just got a mail from SceneCaster, who finally got back after a month, regarding their work on a Linux beta client. There is still hope left in this world.

***Updated***
Digsby Revisited

Thursday, February 14, 2008

Ubuntu: Last.fm client


I was among the early adopters of last.fm, few years back. But had shifted to Pandora due to its clean and uncluttered interface. Ever since Pandora started restricting non-US residents from accessing their collection, more and more users like me have shifted our allegiance to services like last.fm, anwyhere.fm, yahoo launchcast etc.

What sets last.fm apart from the competition is the massive community following. I had been using last.fm plugins for amarok and exaile to get my share of last.fm.
I recently tried the official last.fm linux client and it is surprisingly pretty good.


Best part of last.fm is the neighbours' playlist. Last.fm automatically picks people who match your taste of music. Give it a try, if you still havent.

I just wish more and more services start supporting the Linux Community. And for a start, it would be so great if we can have Silverlight and Adobe AIR running on linux. Popfly is amazing and I really need the Pownce desktop client.

Wednesday, February 13, 2008

iminta: So what are you inta today?


So you have friends in various networks - digg, twitter, flickr etc, and you find it real hard to keep track of what they are doing. Enter Iminta, (pronounced as - I am in to), which simply aggregates all your public profiles from various networks for your friends in various groups to access and keep track.
It reminds me of the "My Web Profiles" facebook app, that keeps track of all your public profiles on the net. What Iminta does more is create customised RSS feed of your friend's statuses according to various group policies or filters. Overall a nice clear interface and useful if you really have lots of friends in all the networks iminta currently supports.
I am not sure how much I'll be using it as you'll have to invite all your friends from other networks to start using yet another service.


Anyways, I'll give it a try again, once it starts supporting facebook and mySpace friend feeds in future. That wouldn't be tough I guess. All they would need is a facebook app that connects and retrieves profile info from your account.
If anyone wants to give it a try, buzz me for an invite.


Sunday, February 10, 2008

Tech TV this week

This is a new segment on my blog. I watch a lot of online tech shows. Here I'll list my week's favs.


1. Natali Del Conte's Loaded
Natali replaces Veronica Belmont as the next cele-babe at cnet.com. This show rivals Cali Lewis' GreekBrief.TV with it's short round up of daily tech news mon-thursday

2. Tekzilla
Patrick Norton delivers yet another entertaining episode of Tekzilla this week along with special guest Veronica Belmont. Kevin Rose guest hosted last weeks ep.

3. DL.tv
Veronica Belmont was here last week. I am yet to see this week's episode.
But Robert Heron has never disappointed us.

4. Cranky Greeks
John Dvorak discusses with a couple of reporters from The Register, regarding the Microsoft and Yahoo deal.

Linux for Absolute Beginers : Resizing NTFS partiton


It is a way lot easier to install linux if you have a fresh system. Then you can easily create all the partitions and file systems that you need and install you various OSs on them.
Problem is, generally vendors ship their PCs with a single ntfs partition containing WinXP. Now, when you try to install linux using the free space on this partition, you will need some extra steps before you can really start off.
Irony is that WinXP doesn't ship with any free partition resizing tool. Other variants like Partition magic are too expensive. New users are generally turned off by this initial hurdle.

Here let me show you an easy way to resize your existing NTFS partition and create new partitions to install Ubuntu or any other linux distro on them.


Disclaimer: I don't take responsibilty of any sorts for whatsoever damage that might be caused by following these instructions. Backup all your important docs from the ntfs partition and defrag it before proceeding.
Tools we need: 1 Ubuntu/Linux distro live CD, internet, 1 diet coke

1. Boot your system via the Live CD
2. Locate Terminal (Accessories menu or alt + F2 > xterm)
3. Install ntfsprogs
$ sudo apt-get install ntfsprogs

4. Install gParted
$ sudo apt-get install gparted

5. Run fdisk to locate your ntfs partition (/dev/sda2 in my case)
$ fdisk -l




6. Make sure the ntfs partition is umounted (replace sda2 with your drive)
$ umount /dev/sda2


7. Run gParted
$ gparted


8. Select the ntfs partition and click on "resize"


9. In the resize dialog, move the slider to the left to reduce the existing size


10. Now with your recovered space, create new partitions. Select the free space and click on "new"


11. Typically, you would need 2 partitions. 1 ext2/ext3 primary partition for the "/" and 1 swap. Swap partition should be atmost 2 * your Ram.
Once you have created these 2 partitions, you are ready to roll. Start your linux installation as usual and select these partitions to install your linux and set as swap respectively. You can create additional partition for "/home" etc.
Do rember to check the "/" label partition as primary.

12. Click "apply" to commit your changes. Sit back, drink your coke and wait for the resizing to complete.

If you want to try a non-gui approach, use ntfsresize that comes with the ntfsprogs package. Read this for more details - Resize NTFS partition using ntfstools on Ubuntu Linux Live CD

Tuesday, February 05, 2008

Ubuntu Annoyances: Filesystem check after every 30 boot ups



Ubuntu forces drives to be checked once for every 30 times (default) the filesystem is mounted. This means that on an average, once every 30 bootups, the filesystem integrity is checked. Sometimes it takes minutes to complete this scan and the end-user is left waiting for the process to complete.

It is even more annoying when you are supposed to give a presentation and it takes your laptop ages to boot. Let's see how to get rid of this minor annoyance.

There are a couple of ways to do this

1. Enable/Disable file system integrity check for the next bootup,
Enable check
$sudo touch /forcefsck


Disable check
$sudo touch /fastboot



2. The above files are deleted after every boot up. For a more persistent solution, let us change the frequency of the checks. (ext2 and ext3 only)

Change the max-boot count to 600 boots (replace sda1. Hint: fdisk -l)
$sudo tune2fs -c 600 /dev/sda1


Change current count variable to 0
$sude tune2fs -C 0 /dev/hda1



Nice! You can relax now for 600 more boot ups. I would suggest keeping it at around 100 as it is always good to check the system integrity once in a while. For a more permanent solution, check AutoFsck