Latest Entries »

GtkPlug and GtkSocket

i’ve just found out my try programs to clear the idea of the confusing and undocumented gtk widgets.

please download this http://cse.iitkgp.ac.in/~debmalya/source_code/gtkPlug_gtkSocket_explained.tar.gz

 

though i’m still very novice with this, if you have any problems, post a comment.. i’ll see to that.

epiphany installation

the version 2.30.0 has  used gtkNotebookPage and that’s causing compilation error.

i’ve used version 2.30.6 and it worked. !

will be back for more.

creativity..

after the frustrating period of hacking and making my homebrew vlc instance run and play media.. i had my dinner at  tikka and came back in lab to refresh myself with newer ideas.

and what else.. mit media lab projects.. =)

Lifelong Kindergarten.. glad to see that Sayamindu da is in there .. at that particular research group.. =)

http://www.media.mit.edu/research/groups/lifelong-kindergarten

http://drawdio.com/

http://web.media.mit.edu/~silver/

http://vimeo.com/9512436

http://www.computerclubhouse.org/

http://www.computerclubhouse.org/content/learning-model

http://www.twohandsproject.com/

i was working on a gtk+ instance of the popular media player VLC. I stumbled upon a nice project, FreeTuxTV at google codes. It implemented the library libvlc-gtk by which it draws a vlc instance in their application.

hen i got a program written in gtk  for a simple VLC instance.

i tried for about 1 week to make the code compile but in vain..  i mailed several persons and among them, Eric Beuque, the creator of that project replied me with some nice help. But then also i was unable to figure out how to make it work.

today.. in the morning i saw, firstly, the third party code was not right. it had a number of errors in it and i don’t have a idea how the other people in that forum compiled and run it successfully.

i corrected them and then compiled my program with

gcc -g -DLIBVLC_VERSION_MAJOR=1 -DLIBVLC_VERSION_MINOR=1 -DLIBVLC_VERSION_REVISION=0 -o myapp `pkg-config –cflags –libs gtk+-2.0 gthread-2.0 libvlc` -I/usr/include/libvlc-gtk/ -lvlc-gtk -L /usr/local/lib/ a.c libvlc-gtk/gtk-libvlc-instance.c libvlc-gtk/gtk-libvlc-media.c libvlc-gtk/gtk-libvlc-media-player.c

and whoa.. it got compiled.

a nice concept clearing is the extra on this little hack.. i cleared my notions about gc at http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html and also browsed the pkg-config for compilation details.

off for now =)

came across a beautiful page explaining the same thing..

http://www.adp-gmbh.ch/cpp/gcc/create_lib.html

Just now i found out the way to access svn servers through a proxy. i was having problems with my institute proxy server refusing connections via svn.

Here’s my solution:

cd ~/.subversion/

gedit servers

now you should be presented with a file explaining all the things.

Go to the end of the file. you’ll see a tag [global]

[global]

http-proxy-exceptions = *.exception.com, www.internal-site.org

http-proxy-host = your.proxy.server.address

http-proxy-port = 8080 (or the port of http proxy if it’s something other than 8080)

#http-proxy-username =

#http-proxy-password =

http-compression = no

 

keep in mind the NO-indentation. don’t give any extra space beteen or at the front of the line. a # means a comment.

 

now use svn through your proxy.. no stopping.. !

Well, hello after a long time. Blogging needs time and that is the thisng I do not seem to have much these days. :(  I even can’t remember the last time i took a photo. really busy over making the unique file browser for Sahaj Linux.

As I am working in GTK+ 2 and the main lot of programmers (except me) sees Netbeans as their wordprocessor (!) … A friend and fellow programmer insistemd me to try Netbeans once.  Thus I begun.

Well, if you don’t have the entire package of Netbeans, you will have to download the C/C++ Development Pack. After this, the netbeans will be able to detect and debug general C/C++ code. However, one have to configure Netbeans to include support for external libraries like GTK. Her’s how to do it:

Open a project in netbeans. right click onto it and get into Properties. In the Build menu (probably the 2nd menu in the tree), click “C compilers”.

Here you’ll see the option “Include Directories under “General” Tab. Click on browse (at left a small button) and include all the dependecy for gtk like cairo, gtk, glib, pango, atk, libpng, libjpg, etc.. detailed picture given below !

Screenshot for including necessary libs for gtk+ 2

Now again We have to configure the Linker of Netbeans. We go to Linker > Libraries > Add Library. Here you’ll have to choose the libgtk xxxx.so file from “/usr/lib/” .. so go in the folder /usr/lib. Now select the File type to  ”.so” (dynamic library) from the default “.a” (static library). unless this you’ll not find libgtk.so ! Again the following picture explains all this!
Linker configuration for GTK+2 in Netbeans

Now you are done. Enjoy writing GTK code with Netbeans.

P.S: Though I was referred to write code on Netbeans, I am back to GEdit again! I’ll let you know How and Why in the next post where i’ll show you how to make GEdit a really cool code editor.

Adios!

Many of us have dual-boot system which have Linux and Windows( or any other, say, Mac OSX etc… ) both installed. We have a operating-system-choice screen just after BIOS gets checked, by which we can choose, which OS to load in a session.
This is the Boot Loader (usually GRUB or LiLo). It has some commands (editable) by which it just gets the control from Master Boot Record (MBR) and chainloads the volume boot record (VBR) of the active (primary) partition where the bootable system image resides.

During Linux installation, we have GRUB installed in our system, so it can directly detects the other already installed operating systems in the HDD. Thus it produces the OS-Choice screen at the startup and we can choose which OS to load.

But the problem arises, if we have to reinstall/repair the previous OS in the same partition it was before.
i.e : s’ppose, windows was in C:\ and we’re trying to reinstall windows again on same partition C:\

During installation, every OS overwrites the MBR and keeps it’s fresh copy. So, if you have previously installed the Bootloader (e.g : GRUB ), then it’ll dessapear and you’ll not be able to boot into Linux. After startup, system will directly boot into Windows.

Now, get one point clear that the Linux OS is still intact. you just have lost the pointer how and from where to load it. Because, it was the job of your bootloader installed in MBR and you’ve overwritten the MBR, your bootloader is now history! :P

Clearly, the solution is to install the bootloader once again so that it can detect both ( even more than 2 ) the OS and give you the sweet OS-Choice screen once again! :D

Here’s how to do it :
step 1) put your Linux CD/DVD and boot from it in restore mode. After that, if all goes right, it’ll give you a command console.
step 2) type
chroot /mnt/sysimage
it loads the system image and present the root console.

step 3) reinstall GRUB into your MBR by typing
/sbin/grub-install /dev/hda (for ATA hard drive )
or
/sbin/grub-install /dev/sda (for SATA harddrives )

After this reboot the system and you’re done! :D

NOTE :
I have a complication regarding the correct partition of the system images of Linux. I solved it by correcting the GRUB command. Here’s how I did it. :)

I went into edit command. there I saw 3 commands. The first command was for selecting the proper partition, the second was for lading the system image, and the third was initrd command.

The first command looked like,
root (hd0,1)
I just edited it to
root (hd0,2)
and everything fell perfectly into place. :)

One more thing… The above mentioned procedure will not work if you install windows in any other partitions other than the previous partition in which it originally was. in that case, GRUB will not be able to detect that. :P

Hope you’ll find this tutorial useful. Wishing you people a smooth sail.

Be wise, Use Linux

Hey all you Counter Strike 1.6 fR3/\ks out there… :)
Good news! You don’t have to depend on Windows anymore for playing your favourite game, “Counter Strike 1.6″. :p It’s right here in our very own, Linux! :D

Yes, CS 1.6 is duly available for Linux also.
I’ll now guide you through the procedure to install official “Steam” in your Linux Box.

Firstly, we’ll start by creating a directory ( in your home folder, preferably ) called hlds.

mkdir hlds

Now we’ll go to the directory created (cd hlds) and there we’ll download a file named, hldsupdatetool.bin

wget http://www.cstrike-planet.com/dls/hldsupdatetool.bin

after downloading, we’ll change it’s permission to executable by,

chmod +x hldsupdatetool.bin

and then run hldsupdatetool.bin

./hldsupdatetool.bin

After agreeing the conditions :P by hitting yes, if all goes well, you’ll have a file named “steam” in that folder. If you get any error message ( Like me :p ) like
'uncompress: command not found'
take heart… don’t get frustrated mann…
just uncompress it by

ln -s /bin/gunzip /bin/uncompress

after you finally got the file named steam, you again change the permission of it to executable by,

chmod +x steam

and run it by

./steam -command update -game cstrike -dir .

Yay, you’re done….

now just sit back for a considerable amount of time leaving it all for the installer to download and install CS 1.6 for you.
A word of caution though : This process will take about 11/2 – 2 Hrs. So, just make sure, you have enough time for it… :)

Best of luck at the Arena…

And, do tell me how this helped you if we meet somewhere… be it Dust 2, Train, Cbble, inferno or Nuke… ;)
I’ll be as /i/ VooDoo Child ~ozh in there… :)

Best of luck, Happy Hunting dudes… :)

Yes buddies, I know that this is a pretty cliche topic and there are maybe many sites explaining the same. I also took help from specilaly অঙ্কুর বাংলা Website and some more sites which I forgot to bookmark :( . Specially, Project has many activities which ranges from Localisation to creating a fantastic বাংলা বানান নিরিক্ষক অভিধান for Firefox.

Well, I’m telling you *My* Procedure! It’s simple like hell.

I went into ” System > Preferences > Hardware > Keyboard “

Then, I selected, Layouts in there. After that, I clicked “Add” and found out বাংলাদেশ প্রভাত and  ইন্ডিয়া বাংলা keyboard layouts. I added them and set the USA Layout to the defaults. There are other layouts for other Indic languages also. You can Try out that if you know them!

Now I right clicked into my gnome panel and selected, “Keyboard Layout Indicator” such that I can switch to any desired keyboard Layout when I want to.

Whoa, I’m done. Now Selecting the indic layouts, I can write in bengali in anywhere… :)

But now, one problem arised. I wasn’t being able to write composite letters in bengali. that is যুক্তাক্ষর . Fortunately, Kushal da was online ( who is also in অঙ্কুর বাংলা Project among his many activities and busy schedulle ) and I mailed him my problem. The response was instant, to-the-point and a complete breeze. He just said, ” use ‘/’  ” … That is, k / t = ক্ট ! :D

More support about the layout and writing যুক্তাক্ষর can be found in here.

Whoa. I’m done fianly and chatted for almost 4 hours with her in bengali… :D

Hope, This will be a little help to all those, who still stumbles writing in Indic font. This’s also a reason among a thousand, why one should switch into Linux… and trash Windoze :P

Everything is sooo cool in this OS. I just Love it… :D

Follow

Get every new post delivered to your Inbox.