OpenPCD talk at LinuxTag

Posted: 2007/05/12 13:49:33

Going to present a talk on OpenPCD in LinuxTag , Berlin, Germany :) You can find the talk details here.

Got the visa last night, so everything is fixed now. Thanks to Atul , Jace , Anand and all other for their tips.

Will meet with Fedora Ambassadors from all over the world . My talk is a part of the FUDCon in LinuxTag.

Comments

librfid new package

Posted: 2007/05/12 13:32:17

New package for librfid is done :)

It is the SVN revision 1996. Hope it will be pushed soon. A good number of  bugs fixed in this revision.

Comments

cd revisited

Posted: 2007/05/05 00:01:27

Few days back wrote a function ‘cd’, which later found is not correct. So, came up with a smaller one with no problem (till now :) ).

cd ()
{
if [ “$#” -eq “0” ]
then
    if [ “$eFlag” -eq “1” ]
    then
        changePath
        export eFlag=0
    fi
    builtin cd
else
    builtin cd “$1”
    dname=pwd
    bname=echo "$dname"|grep pyqt4
    if [ “$bname” != “$dname” ]
    then
           if [ “$eFlag” -eq “1” ]
           then
                changePath
                export eFlag=0
           fi
     else
           if [ “$eFlag” -eq “0” ]
           then
                QTDIR=/home/kdedev/src/kde/qt-copy
                PATH=$QTDIR/bin:$PATH
                MANPATH=$QTDIR/doc/man:$MANPATH
                LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
                PKG_CONFIG_PATH=$QTDIR/lib/pkgconfig:$PKG_CONFIG_PATH
                QTINC=$QTDIR/include
                QTLIB=$QTDIR/lib
                export QTDIR PATH MANPATH LD_LIBRARY_PATH PKG_CONFIG_PATH QTINC QTLIB
                export eFlag=1
            fi
     fi
fi
}
Total code can be found here.

Comments

Shell scripts and me

Posted: 2007/05/01 17:24:45

I always feared shell scripts when I was in college. Always knew that it is very powerful if I use it properly, I never did.

Two days back, in I was trying to help one of my college junior to setup Qt4 and the environment to run it. I told him to follow this page. But Pradeepto said the idea of having another user is not so good. and he said:

Apr 30 00:48:21 pradeepto: you can even do make sure that as you changedirectories,
the env-vars are set automagically.
So, I tried to something like that, asked few questions on #bash about how to write a function with same name of a shell command and then call the actual shell command. So, got the shell-builtin-command ‘builtin’ which executes other shell builtins. Also asked lots of questions to Jace about shell programming :p

My target was, as I change my directory to any directory named ‘pyqt4’ or sub-directories under it all environment variables should change accordingly to run Qt4 or PyQt4 codes and in other directories the normal environment should stay to run Qt3 :)

The result in my .bashrc :

export tQTDIR=“$QTDIR”

export tPATH=“$PATH”

export tMANPATH=“$MANPATH”

export tLD_LIBRARY_PATH=“$LD_LIBRARY_PATH”

export tPKG_CONFIG_PATH=“$PKG_CONFIG_PATH”

export tQTINC=“$QTINC”

export tQTLIB=“$QTLIB”

export eFlag=0changePath()

changePath()
{QTDIR=“$tQTDIR”

PATH=“$tPATH”

MANPATH=“$tMANPATH”

LD_LIBRARY_PATH=“$tLD_LIBRARY_PATH”

PKG_CONFIG_PATH=“$tPKG_CONFIG_PATH”

QTLIB=“$tQTLIB”

QTINC=“$tQTINC”

export QTDIR PATH MANPATH LD_LIBRARY_PATH PKG_CONFIG_PATH QTINC QTLIB

}

cd ()

{

if [ “$#” -eq “0” ]

then

if [ “$eFlag” -eq “1” ]

then

changePath

export eFlag=0

fi

builtin cd

else

bname=echo "$1"|grep pyqt4

if [ “${bname}” = “$1” ]

then

QTDIR=/home/kdedev/src/kde/qt-copy

PATH=$QTDIR/bin:$PATH

MANPATH=$QTDIR/doc/man:$MANPATH

LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH

PKG_CONFIG_PATH=$QTDIR/lib/pkgconfig:$PKG_CONFIG_PATH

QTINC=$QTDIR/include

QTLIB=$QTDIR/lib

export QTDIR PATH MANPATH LD_LIBRARY_PATH PKG_CONFIG_PATH QTINC QTLIB

export eFlag=1

builtin cd “$1”

else

if [ “$1” = “..” ]

then

builtin cd “$1”

dname=pwd

bname=echo "$dname"|grep pyqt4

if [ “$bname” != “$dname” ]

then

if [ “$eFlag” -eq “1” ]

then

changePath

export eFlag=0

fi

fi

else

if [ “$eFlag” -eq “1” ]

then

changePath

export eFlag=0

fi

builtin cd “$1”

fi

fi

fi

}

I think the code is not so much readable in my blog :)

Update: Pradeepto asked me to upload the code as a file, so here it is. Just copy paste the contents of this file into your $HOME/.bashrc .

Comments

Mono, Gtk# and ironpython

Posted: 2007/04/24 19:15:42

Todays target was to write a HelloWorld code in Gtk# using ironpython in Mono. you can download the setup file from here.

Got this example. But “import Gtk” failed everytime. At the end Jace found the solution. So, the modified code is:

import clr
clr.AddReference(‘gtk-sharp’)
import Gtk
def delete_event (o, args):
    Gtk.Application.Quit ()

def say_hi (o, args): print “Hello, World!”

Gtk.Application.Init () w = Gtk.Window (“Hello, Gtk# World”) w.DeleteEvent += delete_event b = Gtk.Button (“Say Hello”) b.Clicked += say_hi w.Add (b) w.ShowAll () Gtk.Application.Run ()

The first two lines made all changes, “import clr” and “clr.AddReference(‘gtk-sharp’)”

Comments

What else can happen to me ??

Posted: 2007/04/18 15:20:09

From my childhood, I  had many kinds of strange  accidents, including  accident  with goat, Cow, books etc. The latest happened one day ago.

There was no power at home and I was cooking in the light of a candle. I was bending towards the slab where candle was, suddenly I felt the smell of burning and some small noise. What I found is that my front-left side hair was burning in the candle :(

Thought I lost my 60% hair, after I came to Bangalore, but this incident is no way like that.

Comments

D-link AirPlus DWl-G630 in Fedora Core 6

Posted: 2007/04/18 15:13:15

Last night bought a D-link AirPlus DWl-G630. After compiling & installing the driver, it is working :)

You can read the tutorial here. The lspci output is:

06:00.0 Network controller: RaLink RT2561/RT61 rev B 802.11g

Comments

An app which needs more love & care

Posted: 2007/04/16 09:51:43

Was looking for an app which can help me on mixing ogg theora video and ogg vorbis audio files for my tutorial work. The search result is Pitivi.

Pitivi is an excellent  piece of work , it is a gstreamer based app written in Python . This app needs some more love from the people. This can become a very good competitor of the other various video editing tools.

Comments

Shell commands tutorial using Konsole part 1

Posted: 2007/04/14 16:27:42

Shell commands tutorial using Konsole, part 1 in bengali is out. You can check it out from here.

Comments

A Desktop tutorial

Posted: 2007/04/11 21:40:22

A basic tutorial on KDE desktop in a Fedora Core 6 box. You can download the Bengali or the English video.

Comments

Contents © 2004-2014 Kushal Das - Powered by Shonku