Jul 08
My Sites: My Blog | My Tech Blog | Follow me on Twitter
—-

Everywhere you go, any building you enter, any OS you operate, any settings window you open, one rule remains set in stone, “THE ESCAPE DOOR”. Always give an exit path, a way to make it all go away, make it look like nothing happened. But Gnome seems to think otherwise. Any settings window you open, all you see is a “close” button.

Gnome-ui-flaw

I made a few changes and then tried to “undo” them by using the following methods:

  1. Pressing the “close” button.
  2. Pressing the little “x” on the upper right corner.
  3. Pressing the “Escape” key.
  4. Pressing “Alt+F4”.

But no dice. Every method leads to saving of changes. The same thing occurs with EVERY dialogue box you can find in Gnome. I hate to say that this is something Windows seems to have got right (Maybe their UI designers are better than their OS programmers). What’s even more surprising is that even cross-platform apps (e.g. Firefox) give the “Apply” and “Cancel” buttons in Windows but not in Linux.

I hope Gnome developers listen and patch this up, or if there is any “hidden” tricks up your sleeve that will allow me to “go back in time”, please do let me know.


—-
If you liked this post, then you can Subscribe to my feed
Quote of the day: Life can only be understood backwards; but it must be lived forwards. - Kierkegaard

written by Shantanu Goel \\ tags: , , , , , ,

Jun 23
My Sites: My Blog | My Tech Blog | Follow me on Twitter
—-

I’m going to be bespectacled and have been advised to reduce and limit my computer usage considerably. A bit of nostalgia set in on hearing this and I thought about my short journey so far in this wonderland of solid-state and otherwise.

First time I touched a computer.
> 1989, at school in 2nd standard

First command I typed on a computer.
> “dir”, 1990, 3rd standard

First game I played on a computer.
> “bricks”, 1991, 4th standard

First Colored game I played on a computer.
> “Dangerous Dave”, 1991, 4th standard

First program I wrote on a computer.
> “Hello, Ankit!” in basic, 1992, 5th standard(The pre-teenage rebel in me substituted the “world” by “Ankit”. Why “Ankit”? That’s a mystery ;-) )

First time I held a mouse.
>1992, 5th standard, Windows 3.0

First Windows Program I used
>PaintBrush (MSPaint today), 1992, 5th standard

First “3d” game I played
> Wolfenstein 3D (or Wolf), 1993, 6th standard Continue reading »


—-
If you liked this post, then you can Subscribe to my feed
Quote of the day: “There’s a time and a place for everything, and it’s called college.” — Chef

written by Shantanu Goel \\ tags: , , , , , , ,

May 21
My Sites: My Blog | My Tech Blog | Follow me on Twitter
—-

With the recent release of Ubuntu 8.04 (Hardy Heron), a lot of hype was generated (Overhype or well-deserved, that’s for another post). One of the main highlights of all the stories, news and reviews doing the rounds are that this is an LTS version. But many people, mostly those who are new to Ubuntu, and even a few who are already using it, are not sure what LTS really means.

Literally expanded, it stands for Long Term Support. Yeah right, but what does it actually mean. Does it mean I’ll keep getting updates till eternity or what? The explanation is quite simple really.

Long Term: What it means is that while a normal non-LTS is supported for 18 months, an LTS version will be supported for 3 years or 36 months (and 5 years for the server version).

Support: Now, don’t just jump into downloading it and installing on reading the long term part. This DOES NOT mean that you’ll continue getting newer versions of favourite software packages till that time. This only means that you’ll continue getting “security updates” for 3 (or 5) years. What’s the difference, some might ask, as they think that the newest version of a software is the most secure. However it is not so. A newer version may bring more features, but also more code to become vulnerable to bugs.

So, in a nutshell, to understand the situation, let’s take an example. If Hardy has a software X with version 1.3, and after 2 years the software moves to version 2.5, you’ll not be able to get version 2.5 from the hardy repositories but a version “1.x-ubuntuy”, which will have all the security and major bug fixes for that software, but not the new features that you might see in later versions.

I just did this post so that people don’t jump into it by getting a wrong impression about LTS and later on be disappointed on learning the fact. So, now you can make an informed decision.


—-
If you liked this post, then you can Subscribe to my feed
Quote of the day: Life can only be understood backwards; but it must be lived forwards. - Kierkegaard

written by Shantanu Goel \\ tags: , , , , , , , , ,

May 14
My Sites: My Blog | My Tech Blog | Follow me on Twitter
----

Worried about someone breaking into your house in your absence? Or just need to keep a tab on who enters your room while you are away? Well, all you need is a webcam, a linux PC/laptop and a twitter account. And you are set for real time updates through twitter about all that goes on at your abode behind your back (can even receive a text message/sms on your phone). Keep reading for the very simple setup you need.

1.) Download and install "motion" on your computer. For ubuntu users, this is as simple as running

CODE:
  1. sudo apt-get install motion

2.) Setup your motion configuration file. (Usually at /etc/motion/motion.conf). There are quite a lot of options available. You might want to tweak it a lot according to ur needs later on but the most important ones that you can begin with are (leave the rest untouched for now):

2a.) Add/edit the option "target_dir" to point to the directory where you want to save the images of the event when motion is detected.

2b.) Add/edit the option "locate" and set it to "on" so that you get a nice square box around the detected moving object/person.

2c.) Add/edit the option "webcam_port" and set it to, say, "8000". Motion includes a mini http server so now, you can use it to view the actual images of the happening when you get the update and check for false alarms.

3.) Now, comes the most important part, about getting the update. Continue reading »


----
If you liked this post, then you can Subscribe to my feed
Quote of the day: "Human beings may not be perfect, but a computer program with language synthesis is hardly the answer to the world's problems." - JC Denton

written by Shantanu Goel \\ tags: , , , , , , , , ,

May 12
My Sites: My Blog | My Tech Blog | Follow me on Twitter
----

Did you know that instead of installing special software to view your webcam video, you can simply use mplayer for the same purpose, and with a lot of fine control. e.g. try running the following command with your webcam attached to your computer.

CODE:
  1. mplayer -fps 15 tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0

And you can use mencoder to capture and encode video from your webcam:

CODE:
  1. mencoder tv:// -tv driver=v4l2:width=60:height=40:fps=60:device=/dev/video0 -nosound -ovc lavc -lavcopts vcodec=mjpeg -o test.avi

Have fun playing with the huge number of options available. You could even cat the test.avi file into a folder of your web server and have instant streaming video :-) .


----
If you liked this post, then you can Subscribe to my feed
Quote of the day: "When due process fails us, we really do live in a world of terror." - JC Denton

written by Shantanu Goel \\ tags: , , , , , ,

May 11
My Sites: My Blog | My Tech Blog | Follow me on Twitter
----

I have an old noname cheapo webcam, that I dusted out of my junk (why? More on that in a post coming soon). I hoped that it would work in my Ubuntu setup out of the box like most of my other hardware. I connected it to my laptop's usb port. dmesg gave the following output:

[21328.211333] usb 1-1: new full speed USB device using ohci_hcd and address 2
[21328.319698] usb 1-1: configuration #1 chosen from 1 choice
[21328.439705] Linux video capture interface: v2.00
[21328.458509] zc0301: V4L2 driver for ZC0301[P] Image Processor and Control Chip v1:1.05
[21328.459113] usb 1-1: ZC0301[P] Image Processor and Control Chip detected (vid/pid 0x0AC8/0x301B)
[21328.520576] usb 1-1: PB-0330 image sensor detected
[21328.870287] usb 1-1: Initialization succeeded
[21328.870919] usb 1-1: V4L2 device registered as /dev/video0
[21328.871001] usbcore: registered new interface driver zc0301
[21328.913737] usbcore: registered new interface driver gspca
[21328.913811] ubuntu/media/gspcav1/gspca_core.c: gspca driver 01.00.12 registered

Great! Everything set up, I thought. But running various programs, camorama, camE, kopete, everything gave weird errors like "Connection could not be made", "device not ready" or just showed a blank screen. But soon, after  few trial and errors, I found the solution. Basically the "zc0301" module is the culprit and all you have to do to get your camera working is prevent it from loading. So, this is what I did:

CODE:
  1. sudo modprobe -r gspca
  2.  
  3. sudo modprobe -r zc0301
  4.  
  5. sudo modprobe gspca

And voila! the webcam started working like magic. Of course, this tip is only for webcams that use this particular chip. And if you want to make this change permanent so that you don't have to run these commands everytime you want to use your webcam, all you have to do is add the following line to your /etc/modprobe.d/blacklist file

blacklist zc0301

This would prevent the module from loading whenever you connect your webcam to your computer. Let me know if this worked for you or if you have some of your own tips/tricks/hacks to get this or other webcams working on linux.


----
If you liked this post, then you can Subscribe to my feed
Quote of the day: All we really need to survive is one person who truly loves us-Penelope

written by Shantanu Goel \\ tags: , , , , , , , ,

May 03
My Sites: My Blog | My Tech Blog | Follow me on Twitter
----

GLib - An Introduction:

GLib is a utility library for C, which augments the standard C library in several purposeful ways to make your life that much easier while programming. GLib has the following things to offer you:

1. Portability: The main issue that haunts any C developer is the portability of code. One cannot rely on the standard C library for this as you may find many functions that work differently under different platforms are aren't there at all sometimes. GLib ensures that the all the functionality exposed by it remains consistent across platforms, so that you can rest assured that your code will work the way its supposed to work irrespective of the Operating System it's being used for (Of course, this assumes that you have ensured about portability aspects of your non-GLib related source code). Moreover, GLib is available for a vast array of contemporary Operating Systems including GNU/Linux, Microsoft Windows and Mac OS X.

2. Security: Though you still need to be careful about things like freeing allocated memories properly, etc but GLib does ensure that all its functionality is secure. Moreover, GLib has a policy of ensuring that all its functions are threadsafe. This saves you from a lot of checks and balances and locks and scheduling considerations if you had written all this yourself.

3. Useful Data Types: GLib exposes a lot of data types. Some are very basic that maintain portability across OS's and 32-bit and 64-bit systems. e.g. you can rest assured that gint32 will always be 32 bit and gint64 will always be 64 bit data types.

Apart from this, it also provides a lot of derived data types e.g. singly linked lists, doubly linked lists, hash tables, stacks, queues, trees, and much more. It'd basically cover most of you data structure needs that you'd have otherwise had to implement yourselves. And it also provides helper functions that makes working with them so much more easier. If you have ever used Perl, and have wished that C programming could be a bit faster like it, you will be pleasantly surprised.

4. Utility Functions: GLib also provides various utility functions to ease out your manipulation of data. Some of the functions are meant as more secure and portable replacements for those provided with standard C library, while rest are meant to provide other useful functionality which you earlier had to implement in your code. Some of the major areas covered by GLib's utility functions are String manipulation, character set manipulation and conversion (including unicode and base64), using regular expressions, file manipulation, shell functions, config file parsing (my favourite), etc.

End Note: I can understand that there would be a lot of people who believe that use of GLib is dumbing down programming in C. After all, we take pride being in control of our code and this is why we love progrmming in C because we have options to do things in our own way. Yes, that is all true but there comes a time where you'd like to spend more time in developing the core functionality of your app, or focus more on giving a rapid shape to your new idea, rather than reinventing the wheel and fumbling around with writing the helper functions. So, keeping that in mind I believe GLib is wonderful piece of code that has enabled me to churn out new apps that much faster.


----
If you liked this post, then you can Subscribe to my feed
Quote of the day: Homer: Kids, you tried your best and you failed miserably. The lesson is, never try.

written by Shantanu Goel \\ tags: , , , , , , , , ,

Apr 28
My Sites: My Blog | My Tech Blog | Follow me on Twitter
----

Some of you might know that I was in the hunt for a decent mspaint alternative recently. Note that I didn't go for GIMP / Inkscape etc because they were overkill for what I wanted to do. Many a times, I just wanted to touch up a screenshot or make a simple flow image by drawing a few boxes, use a few pointing arrows, and add some text here and there. All this could be done with the previous mentioned programs as well but took a bit more steps than I wanted (stroking the selections / paths for lines, boxes, circles, and even then, no arrows). I didn't find an adequate replacement at the time but got it now, so thought of writing about it. Basically I came across 4 apps: tuxpaint, gpaint, kolourpaint and mtpaint. Won't discuss tuxpaint here cuz I found it a little too kiddish.

  • gpaint: (Available in Ubuntu repositories) gpaint is a very simplistic program that has a mspaint look and feel but feels a bit lacking. It can do basic procedures like basic shape selections, lines, boxes but that's it. No polygon selections, brush, color picker, etc, and yeah no arrows. Moreover, it saves only in pngs.

gpaint screenshot

  • kolourpaint: (Available in Ubuntu Repositories) kolourpaint is very close to mspaint. Infact it does a bit more than mspaint. It has all the things that I mentioned as missing in gpaint, plus has basic image manipulation effects as well. I liked it quite a bit, but it had 2 drawbacks for me, still no arrows, and it depends on KDE/Qt libraries.

kolourpaint screenshot

  • mtpaint: (Available in Ubuntu Repositories from Gutsy onwards. Rest of the folks can search for a package on net, or find a suitable package or source here) This is the software that got me most excited. It is actually a kind of lower-intermediate package that lies somewhere between mspaint and a very basic, poor man's GIMP. It has all the features ok kolourpaint, (plus arrows at last :-) ), a small smattering of basic effects (gaussian, edge detection, blur, embossing), can work with gifs also (handles transparency and animation quite well). So, this is the one I would be sticking to for now.

mtpaint screenshot

I am using mtpaint now for my basic needs. Hope the article benefitted you as well. If I missed out on some package, then do let me know.


----
If you liked this post, then you can Subscribe to my feed
Quote of the day: “Inspiration is wonderful when it happens, but the writer must develop an approach for the rest of the time... The wait is simply too long.” - Leonard Bernstein

written by Shantanu Goel \\ tags: , , , , , , , , , , , ,

Apr 20
My Sites: My Blog | My Tech Blog | Follow me on Twitter
----

Disclaimer Notes:

  1. I wrote this because these things just came into my mind today while I was reading about the impending “Hardy Heron” release related things and saw that there is a lot of FUD being spread still. So, thought of jotting down my likes/dislikes and not making it a linux v/s windows campaign. Though at a few places, it might be necessary to compare the two just to put things into perspective.
  2. These are reasons why “I” like/dislike Linux and not why others might like/dislike it although you might find common patterns.
  3. Most of my recent experience is with Ubuntu these days, so most examples would be from it as well.
  4. These reasons are purely from an end-user’s perspective and not from a linux developer’s perspective. So, I’m not taking into factor that I can change the kernel (or most other things’) source code because “generally” I don’t.
  5. This post is quite long. And if you have a flame to send out my way (which you are most welcome to do), please read it in its entirety before doing so, because many things I say at some point have some caveats covered at another point.

5 Reasons why I like Linux:

These reasons aren’t listed in any particular order. All of them are quite important for me.

1. Light on Resources: I must say that Linux is what still keeps my more than 3 years old laptop running in a prim condition with the latest and greatest of everything from technology stand-point as well as eye-candy stuff. An example: With almost every effect of Compiz Fusion turned on, hordes of screenlets and AWN enabled, an Apache/MySQL/PHP based server running, and a dozen of other applications (firefox, nautilus, terminal, GIMP, RhythmBox, Open Office Word Processor, VLC player, etc) open, my setup consumes around 500 MB of RAM. While on the other hand, if I was using Vista, It’d have demanded atleast 1 GB of RAM just to run Aero, forget about the rest of the things.

2. Cost: This is a big factor for me. Almost everything is free or atleast has a free alternative available. Most of the times I’ve found these free software to be much better than commercial software in terms of feature sets as well as stability. But even otherwise, when there are cases where the free alternative a bit lagging as compared to the commercial one (e.g. GIMP v/s Photoshop), I haven’t felt that my needs have ever outgrown the free software.

3. Ease of Use: Doing “stuff” on linux is just so easy. By “stuff”, I mean everything from doing some normal day chores, downloading files, customizing things, automating routine tasks, etc. The backbone for this is “the terminal” (not the movie :P). I can do almost anything I want from the console. It not only saves me time and frustration in executing a program, waiting for the GUI to load and then go through a series of clicks but also allows me to batch up everything into one pretty little command. Moreover, every thing has so many options that I can configure to my liking. (More on the “options” later below)

4. Getting Software: Getting software couldn’t be more easy.

  • It generally involves typing in “sudo apt-get install <software>”, pressing enter, and that’s it. The latest version is ready to roll on your machine.
  • Reboots are minimal. Even after thinking for quite long, it’s very hard to recall any time when I had to “log-off” my system (let alone reboot) after installing a software (or even a driver)
  • Updates are automatic, and not just for the OS or a few core components, but for all the software that I installed through repositories (but not for the ones which I installed from my local deb’s or compilations, which is understandable of course)
  • The latest fixes/patches are available very quickly. Moreover, the revision cycle for most distros lies between 6–12 months and hence, even a complete desktop upgrade is quickly available as well (as compared to the 7 year period after which Vista came out). You can even “upgrade” to the latest distro revision without having to wipe everything, though I generally prefer a clean install.

5. Security:Now, I agree with everyone that the reason why we don’t see many viruses for linux is because the user base is very less as compared to other OS’s but I also believe that this is not the “only” reason.

  • The thing is that since most of the software is open source, so exploits are found quite quickly and patched and released rapidly. While in a closed source environments, even if a white hat reports it, the exploits go on un-noticed, un-worked upon by the developers (A good example is the recent falling of Vista during the “Pwn to Own” contest because of a known but unpatched vulnerability by Adobe, not a fault of Vista in this case though but you get my drift).
  • The security model otherwise is also quite tight and its very hard for someone to exploit it till the time you use common sense along with it. (A linux virus can easily wipe ur “/home” without acqurining root permissions).

5 Reasons why I dislike Linux

These reasons irk me the most but aren’t enough for to make me move away from Linux. I mention them because getting them right would make my Linux expereince that much more joyful and probably others feels the same too. Moreover, this is not a gripe and is not a command/order to “the Linux guys” out there to fix it, because linux is of, by and for the community. And being a part of this community, I share the burden of this equally and would like to help out in making it better in whatever ways possible, developing, testing, suggesting things.

1. Getting Software: I had mentioned about how easy it is to get software from most distros’ repositories with a single command. However, getting and installing software is also a challenge that many people face in linux. After sometime your particular version of the distro stops updating the software and will include only security fixes and such. Now, there are many good people who would backport software for your version but not all the time. You can download pacakges off the internet (debs’ for ubuntu) but they might not work because of too many inter-mingled dependencies. Compiling is another option but many times, it can spiral out of hand. I hope we can better softwares like GDebi that could make this much more easier.

2. Options: Earlier I listed having so many options as one of my reasons to like Linux. But, sometimes, too many options tend to get to my head. This gets even more difficult when you have too many choices but no clue about what means what and which one is the best. However, the community is continously trying to make this right. A lot of documentation projects are going on, and the mailing lists, IRC networks and other forums also give out a lot of information. Especially for Ubuntu, I find a huge community based support system which always helps me out. (PS – The Ubuntu Forums are the nicest forums you’ll ever come across. I am yet to come across a post that contains words like “RTFM” or “n00b”)

3. Ease Of Use: Some times, just some times, the lack of a GUI for common things irks me and I wish in respect of a few things (read wi-fi) that things could “just work”. But I guess this is a trade-off that I can live with, and moreover this situation is also improving especilly due to the efforts taken by Ubuntu, Mandriva, Fedora, GNOME and KDE. (Special thanks to nm-applet ;-) ). Moreover, Hardy Heron, b43 and the latest linux kernels promise to solve the wi-fi setup issues.

4. Browsing: The browsing experience on linux isn’t too great. But this is not a fault of Linux as such. This is due to companies providing adequate linux support (e.g. java plugins for 64 bit) and too many sites optimizing their code for IE. But again, there is hope for this as we can already run IE on linux (IEs4Linux) plus SUN has promised a 64 bit java firefox plugin with the next JRE.

5. Drivers: This is again due to companies not giving proper linux support for their hardware and not even releasing their hardware details for the OSS community to develop their own drivers. However, I can understand that giving out hardware details might not be an option for these companies considering the competition, and also proper software support might be a bit unfeasible due to a smaller consumer base. But again, more and more companies are seeing the light now and releasing proper drivers for linux, with Nvidia and ATi taking the lead (When will Creative listen?). And a special thanks to the OSS community for making working drivers despite all this.

So, this is it. After reading back through what I just wrote, I am dead sure that I will stick to Linux as the trade-offs are too meagre for me. Will you?


----
If you liked this post, then you can Subscribe to my feed
Quote of the day: "Human beings may not be perfect, but a computer program with language synthesis is hardly the answer to the world's problems." - JC Denton

written by Shantanu Goel \\ tags: , , , , , , , , , , , , , , , , , , , , , , ,

Apr 04
My Sites: My Blog | My Tech Blog | Follow me on Twitter
----

Logo.pidgin

pidgin is everybody’s favourite IM client. Lifehacker includes it in its list of top 5 IM clients. Obviously I use it too, but one drawback of being lazy and not switching over to Gutsy Gibbon was that I was stuck with version 2.2.0 for a long time. But recently I began a new journey towards d-bus programming and chose pidgin as my companion. Found out that 2.2.0 has some serious d-bus issues on amd64 that were fixed in 2.4.0. Hence, installed all the dependencies, compiled the latest version today from source and installed it. Just thought of putting it out for my fellow Feisty users who are looking to upgrade as well but don’t want to go through the mess of compiling from source.

So download it from the below given link. However, since it is a relatively big package (around 8.5 MB), I might pull it if the bandwidth usage becomes too much, so download soon.

Download pidgin 2.4.1 amd64/x86_64 for Ubuntu Feisty Fawn

You can install it by:

  1. Either using “gdebi” – A nice deb package installer that will also try to resolve dependencies for you.
  2. or by running “dpkg -i pidgin_2.4.1-1_amd64.deb” on command line.

Let me know if you have any issues with it.


----
If you liked this post, then you can Subscribe to my feed
Quote of the day: “Inspiration is wonderful when it happens, but the writer must develop an approach for the rest of the time... The wait is simply too long.” - Leonard Bernstein

written by Shantanu Goel \\ tags: , , , , ,