Added simple Type-and-Select feature to Folderview applet

With the type and select feature implemented in the Folder View Plasma applet, I hope that we finally resolve bug 187241 completely. This makes the applet even more usable than before.

This fix was different in a way that I had my first ever usability discussion with the KDE Usability team over the type and select behavior differing from Dolphin (and in general with anything derived from QAbstractItemView). Finally we concluded that the behavior be modified to match Dolphin's, and thats what the current state is.

The fix will ship with KDE SC 4.5

Reviewboard link http://reviewboard.kde.org/r/2659/

Bug Report https://bugs.kde.org/show_bug.cgi?id=187241

Hack Fest at Avalanche 2010

I still remember the day when I entered into the hall where hackfest was going to happen in at Genesis 2007. Just like everybody else I though they'll teach how to intrude into others' systems and do other crazy stuff. Little did I realize that it was a day when I was going to change; my way of computing was going to change.

(Here, the word hack will be used as per defined here)


Santosh, Madhusudan (I think even Krishna was there) were the people who were conducting the event and there was a session on svn, python and some other stuff I don't remember. Then, in the lab, I was puzzled from the Fedora system they had put on it, and they told us to fix some bugs in GNOME games etc. They were least prepared for my innocent question – “Where is the C: drive?” ;)

Now I look at myself and I see, wow I really know where it is, its in /media/sda1 (for me, that is). But there people who don't. So, Its my turn now, to tell people how beautiful code is, how nice software is and what they can probably do with it. And so, my friends at the ISE department asked me to join them for a introduction session/workshop for the Hack Fest event at Avalanche 2010 – the cluster fest organized by the department of Computer Science and Information Science of BMSCE.

[flickr-photo:id=4430828697,size=m]

It wasn't easy I must say, for Sudhendu and Saket to install Ubuntu on the lab computers, but I was amazed to see the support and encouragement from the ISE lab administrators. In 2 days Sudhendu and Saket compiled Qt 4.6.2 on around 20 systems and we were ready to go. I thought that telling people how to hack on simple code like Qt examples was a good start for them.
Suddenly we felt that we won't be able to do this alone, and asked my very good friend and Plasma buddy Sujith H to come and help us with the event. He was in bad health a day before the event, but he's a person of deep commitement and he came despite being unwell. People wonder what it is, and its exactly this passion and love for people and software that keeps FOSS going.

We were amazed by the response people gave to the event. There were around 150 registrations for the event, way more than we could accomodate in the lab. The only option we were left was do it selectively – we planned a seminar in the hall telling them how to hack on basic things and essential GNU/Linux tools. Followed by this we had kind of a test in which the top 36 scorers were invited to the lab for the workshop.

[flickr-photo:id=4431447742,size=m]   [flickr-photo:id=4430677909,size=m]

I must admit I had underestimated people who had come, and it was so nice to see so much enthusiasm among them. After telling them basic commands and how to compile the Qt examples, we gave them simple bugs to fix in the examples. The added competitive point was that the person doing it faster will get more points and we kept track of that. On an average, around 70% of the people completed the problem without any hint :) . For those who couldn't figure it out, Sujith and Sinny cleared their doubts and helped them.

[flickr-photo:id=4430679317,size=m]   [flickr-photo:id=4431445390,size=m]

Here are the examples we took-

Qt Kinetic Animated Tiles
Qt Fancy Browser Demo (2 nos)

It was nice, it was relieving to know that everyone's hard work paid off. It was a bit unfortunate for Sudhendu who worked so hard for the event and was caught up in some mess at the time we were all having a great time. He couldn't be there to see the fruits of his hard work, but yes – we got what our aim was. People were happy, they were convinced that code isn't just boring lab programs – It can be fun too !

In the end we had Sandeep Samdaria as our winner and Santosh and Rishabh as runner ups. All three of them got KDE sweatshirts after a indulging talk on Reverse Engineering by Sujith and was again able to catch the people's breath.

[flickr-photo:id=4431446110,size=m]   [flickr-photo:id=4431457676,size=m]


All things come to and end, so did the hack fest, but I hope it will be a new beginning for someone just as it was for me in 2007. All is K !!

Plasmate 0.1-alpha1 release – it feels exciting

(Update: See Yuen Hoe's nice screencast here and Diego's post here).

There are some moments in life which are just too exciting and thrilling. The best of them came just recently – when Plasmate's first release happened.

Plasmate was started as an application to make creation of Plasma addons like Applets, Runners, Dataengines, Themes easy and fun. A post can be found on Aaron's blog here.

Last year I, Yuen Ho Lim and Diego Casella started working on Plasmate. Initially my job being the editor kpart for which we used KatePart. KPart is a KDE technology which allows component based development using GUIXML.

Here is how Plasmate can be used in its existing stage for JS development-

  • A new Plasmoid can be created and JS be selected as the language. A skeleton code with a “Hello” example will be created.
  • Plasmate sports an inbuilt editor for editing the script files with code completion right now limited to existing tokens in the file.
  • The project tree can be used to browse through different files in the project. Right now, editing metadata, config and script files are supported. Though other files (e.g. images) can be edited, but only in text mode.

Plasmate Main Window

  • A previewer is there which keeps live preview of the plasmoid being edited. The previewer can be refreshed by using Ctrl+F5 or by using the menu option.

Plasmate Previewer

  • The best features of Plasmate is timeline support. Plasmate makes it easy to manage projects as git repos and makes it easy to create 'Savepoints' which the developer can use to keep savepoints at different stages of development. All the git actions are performed without the user having to know about them.

Plasmate Savepoints

  • Then, the developer can publish to a .plasmoid file or  on the local computer. Though this has some bugs right now, but works in most cases.

Plasmate Export

  • The developer can view Plasma documentation using the Documentation tab. Having an active internet connection is a prerequisite for this.

Plasma Documentation

There is still lots of work to do in Plasmate and we're really excited by the release. We even had a bug filed ( Bug 226351 ) and fixed 🙂

It feels so nice to see Plasmate progressing towards its goal, and will always remain special for me as its my first project as one of the authors. We have done a great job Yuen Hoe, Diego and we always will. Its fun working with you guys.

Plasmate Authors

Plasmate – My first project as an author 🙂

How to make Sify Broadband GNU/Linux client remember username and password

Another fine example of how non-free software can create nuisance is the Sify Broadband GNU/Linux client. It was my mistake that I was happy the moment I found out that they have a GNU/Linux client.

If you're using the client, you know how stripped down the software is as compared to the Windows client. And that comes with its own problems-

  1. You've to create a symlink /usr/lib/libssl.so.4 to the libssl.so on your system. (e.g. On mine its /usr/lib/libssl.so.4 -> /usr/lib/libssl.so) and a symlink /usr/lib/libcrypto.so.4 to the libcrypto on your system. (e.g. on mine its /usr/lib/libcrypto.so.4 -> /usr/lib/libcrypto.so).
  2. Now if you run sifyconnect (with admin privileges) the damn 'Remember Username and Password' option works only till the next restart.

The reason for (2) is that the details are saved in a file /tmp/.bbpass which is auto-deleted on reboot. So, the easiest solution is to use the following command line (on non-Debian systems, run as root and remove sudo) –

sudo sh -c 'echo filecontent > /tmp/.bbpass' && sudo sifyconnect


where replace filecontent with the contents of the file /tmp/.bbpass on your system.

So much for a crippled software, so far so good. :) If it still doesn't solve your problem, and you've Java installed, try out SuperSify – it works like a charm.

Made the Add Applet… panel context menu option to work

Since the new Widgets Explorer was added to Plasma, the Add Widgets… options from the Panel context menu was not working. I thought it might be fixed later because Widgets Explorer was in heavy development.

Later, on careful observation I found out that the signal is connected to PanelController, which is only shown when the panel toolbox is open.
I submitted my solution which made the PanelView class handle the signal if the toolbox is not open and after some modifications to other libraries by Aaron, the fix was commited.

FOSS.IN Day 1

After a long time of excitement and joy, atlast FOSS.IN 2009 started today. Reached the venue at 10:30 AM instead of the 10 AM I had targeted. At the venue, NIMHANS convention centre there was a long line for delegate registration (surprise, I'm a speaker this time, no queues Smile ) and the weather was really hot and uncomfortable.
When I got inside, greeted by the one and only – Pradeepto with my first meet with Kartik Mistry. Oh, and yes, the convention centre was cool inside – much needed in the scorching heat. The inaugration got delayed because the delegate registration took time, but it was fun with Atul Chitnis at the stage explaining people what FOSS.IN is all about, and the new change this year – now workouts can range not only for some hours, but can keep on running throughout the event. This is a nice change in my opinion as it helps to get time for people to complete their ideas.

After lunch, we started to rock the FOSS expo (KDE rocks it every year Laughing ), putting up posters, flyers, stickers and my laptop with demo. I was advised to show the stable version, but I was confident that even the trunk version will perform good. Actually, I wanted people to see the new cool features. It was just one of the guys who just researched a lot on the CPU and RAM usage who I had to tell that I'm running debug build. But, on the whole It was nice.
Oh and yes, met this guy Nikhil Marathe, studying right now in Gujarat and rocking KWin. Had fun with him, and yes with my friends Sudhendu and Sinny trying to start their way off with a KDE build.
We had fun at the KDE booth, which was the only full booth which rocked!! But, had a lab external exam so had to return early. Lets see what happens tomorrow

How to use ssh keys to make password-less logins

I regularly connect to my father's Ubuntu PC using ssh to help or to transfer files through scp. I have been using ssh keys to make these logins password-less and I thought the method needs a blog post 🙂
Generally a user can have two keys – a private key and a public key which we generate using the following process and then copy the public key to the remote machine. Remember, don't give anyone your private key.
This process has to be followed on the machine which will be used to login to the remote machine. If both ways is desired, repeat same steps from the other way (i.e. on remote).
I describe the process,

Steps-

  1. Use ssh-keygen to generate your RSA key (giving a passphrase is optional). The key will be generated and you'll be prompted for the location, the default being ~/.ssh/id_rsa
  2. Use ssh-copy-id remoteuser@remotehost to copy your public key ~/.ssh/id_rsa.pub to the remote's authorized_keys. You'll be asked to enter credentials for the remote machine.
  3. Now, whenever you login to the remote machine, it checks if your public key (which is offered by your client machine when connecting) exists in its authorized_keys file. If yes, you're allowed access.

How to fix Python error while compiling kdebase

Some days back, while compiling kdebase, I faced the following errors-
 

— Installing: /usr/lib/python2.6/dist-packages/PyKDE4/plasmascript.py
CMake Error at plasma/generic/scriptengines/python/cmake_install.cmake:60 (FILE):
file INSTALL cannot copy file
“/home/kde-devel/kde/src/KDE/kdebase/workspace/plasma/generic/scriptengines/python/plasmascript.py”
to “/usr/lib/python2.6/dist-packages/PyKDE4/plasmascript.py”.


Thanks for Patrick Aljord for reporting the solution which is as follows-

We've to pass -DPYTHON_SITE_PACKAGES_DIR:PATH=/path/where/you/want/to/install to cmake when building kdebase.

If using Python 2.6, one can pass ~/.local/lib/python2.6/site-packages as the path, as it will be automatically added to the Python path when the interpreter is run.


So, if you are using cmakekde script and don't know how to do the above, try the following commands-

  • cb KDE/kdebase
  • cmake ../../../src/KDE/kdebase/ -DCMAKE_BUILD_TYPE=debugfull -DCMAKE_INSTALL_PREFIX=$KDEDIRS -DPYTHON_SITE_PACKAGES_DIR:PATH=~/.local/lib/python2.6/site-packages
  • make install

Hope this helps :)

When plasma-desktop refused to start automatically

Recently after recompiling my KDE build, I was exploring what has changed in the few weeks when my notebook wasn't with me. Marco is really working hard on the netbook shell and I thought to give it a try. Man, it looks superb and I like that on my notebook 🙂
Anyway, I switched back to the regular Plasma desktop and after I logged back in, plasma-desktop refused to start automatically. I tried removing my .kde, but no luck.
After some help on IRC, I found the problem. Netbook shell was added to .config/autostart directory and the configuration wasn't removed after switching back to Plasma Desktop shell. So, the easiest fix is to simply delete the plasma-desktop and plasma-netbook entries from .config/autostart . WORKSFORME 🙂

Welcome to the BMSCE network

I've been thinking of starting this before, but now I'm really compelled to. As given in the details, I am currently doing my B.E. from BMS College of Engineering, Bangalore which is supposedly one of the top 3 colleges in Bangalore.
I was happy the day I entered the college and the hostels (which is more like home, for one odd exception to be discussed), but soon realised that its going to be difficult.
It has been 2 years now after I had my first experience to the Internet provided in the college. Somehow the authorities (no, not the admins, they just follow orders) are too hypocritical as they always assert that they work for the development of students. But, the Internet connection tells a different story – its virtually impossible to access anything other that e-mail correctly.
Following are the notable points-

  1. There is a filtering service called Fortinet which (mis)categorises websites based on contents and I estimate college pays the money for this from our fees.
  2. The speed is pathetic, let alone downloads, its a pain visiting websites. Around ~10KBytes/s which gradually decreases and eventually the download stalls at 0KBytes/s.
  3. The most important part, there is absolute freedom on the authorities part to block anything (ANYTHING) they choose to without a discussion or meeting. You won't even get a reason other than “We don't provide Internet for this purpose (see 4)”.
  4. Example – Recently one of my friends who is interested in stocks and markets found that www.reliancemoney.com was blocked and when he approached the admins, they told him that the site eats up a lot of bandwidth Tongue out. When he went to the authority, he told that its the age to study (that is, to cram textbooks) not to invest. It was a lot of argument (My friend cited Warren Buffet who started investing at age of 13) that he said “I'll try whatever can be done”. If I was there, I'd ask why are sports and cultural activities promoted if the only thing is to study ?
  5. Example – Today I really got frustrated by what I saw when I tried to visit http://foss.in to check out if the registrations are open. It was the stupid and annoying “Web page blocked” notice. I was shocked, what the hell, how can they block foss.in ?
  6. Services like IRC, GIT, SVN don't work as the outgoing ports are blocked. Thank god there are workarounds.
  7. Social networking sites are blocked since a long time. Though even this is a stupidity as the freedom to socialize is taken away. But this is a problem that has plagued almost all institutions so almost nothing can be done about it.
  8. Reportedly each and every packet is scanned (I don't know what for), this is like checking everyone's bags while entering the college or hostels (update: even this is happening now :P)

Check out Fortinet category in Screenshots.
I'll keep posting more examples of blockages and irregularities (till my website doesn't get blocked Laughing )