Tuesday, December 20, 2011

Repontik

In the last project, there was a mention about what were going to do as our 7th semester project. Well, its almost the fag end of this semester and we have finally half way through what we started out to do. After a few weeks of nightouts on every alternate day, fueled by redbulls, tzingas and any other beverage that had alarming amounts of caffeine in them, we were racing against time to meet the deadline of our reviews and meetings with our guides, we finally converted caffeine into code.
So, the status finally stands " Code pushed, it works! and it kicks ass too! "

The ultimate aim of the project was to redefine how you interact with your computer. Voice being the primary medium of instructing your computer to carry out tasks. So, no more clicking on My Computer to reach your music, all you need is to 'tell' your computer to "play song kolaveri" and your computer fires up your music player and the song. And you can give fancier instructions like "play the song that I listened to last night" and it shows you the results. Sounds like 'siri' of the iphone 4S fame? Yes, its very similar to what siri does, but we had the same idea before the release of the 4S and the world got to know about siri.

So, we are midway through what we have set out to achieve. We have a working prototype 'Repontik' which seems similar to a normal file browser but does a *lot* more and developed a framework on top of Nepomuk,a KDE based Social semantic desktop,  which helps us achieve our version of siri for the desktop.

The capacity of our hard-disk drives has increased tremendously over the past decade, and so has the number of files we usually store on our computer. Using this space, it is quite common to have over 100,000 indexable items on the desktop. It is no wonder that sometimes we cannot find a document anymore, even when we know we saved it somewhere. Ironically, in some of these cases nowadays, the document we are looking for can be found faster on the World Wide Web than on our personal computer. And we have a solution to this problem - "Repontik"

Repontik is a browser to browse all your resources in your computer, and a resource can be either a file, music file, contact, bookmark etc. The word repontik is a amalgamation of the words 'Resource Nepomuk Semantic KDE'.




But the standout feature of the Repontik is that you no longer have to navigate to your desired file/resource by clicking on series of folders and navigate through 3 or 4 levels of folder hierarchy. All you need to do is to enter details about the resource you are looking for in the search box and you are given the resources which match the criteria. Details here can mean either the name of the file, any word in the content of the file or any other meta data related to the resource like the date of creation, last modified etc.

There are filters provided on the left hand side of the browser, which can be used to used to fine tune the search results. Eg, you could filter the results to show only audio files or videos, or filter them based on rating of the files. One of the most exciting feature is the filter the results based on the usage count, so now you can search for resources that you have never used/opened. So, searching for those movies that you have never watched from the bunch of movies that you have stored on your computer just became easier. Or to delete files that you never use to free up space on your computer.

Along with it, the user is provided with recommendations related to the resources. The recommendations are based on the content and linked resources to the selected resource. The user click tracking is done, so that the resource that is accessed the most pops out on top of the search results. This is much like how Google search results are displayed. So, basically we are bringing Google like search to the Desktop.

There a few extra features, one of which is where the user is provided with a GUI module to manually create a link between 2 resources. Linking 2 resources helps in easier searching and they pop up as part of the recommendation when one of the files is selected. Another interesting feature, which was suggested by our guide Dr. Kavi Mahesh was to search for duplicates in the system and delete them. This was done, and you can use it to remove all the duplicates present in the system and free up more space. Usage count of each resource is provided to help decide which resource to be deleted.

The aim of the of the Repontik is to cut down the navigation time of reaching to any resource, and provide a user experience similar to what a web search engine provides. That is, the user gets the resource he wants immediately, preferably at the top of the search results.

So, we now have the framework to build more semantic applications on top of this, and the desktop siri will be built using this. We plan to develop this as part of our next semester project. And there will  be a update on its progress very soon.

One last thing, the whole project is open source. The code can be found here
The Repontik is for the KDE platform, uses Nepomuk and runs on the Linux operating system. Please contact Phaneendra (phaneendra DOT hegde AT gmail DOT com) for further details on the implementation.

PS : Thanks to our own Phoenix (Vivek) for suggesting the name 'Repontik' for the resource browser. 
PPS : Thanks to Sebastian Trueg and all other KDE developers for the constant guidance throughout the development of this project. And we are indebted to Dr. Kavi Mahesh, our guide for this project for his support and encouragement and the final 'S' grade. ;)

Saturday, July 16, 2011

What are we upto

Well, this is not one of the technical posts. The 3 of us are in the middle of our summer break, and frankly I (Phalgun) am making the best use of it. The other 2(Nitheesh and Phaneendra) have been doing it since the first summer break. Yes, I'm a little slow in catching up with stuff  and I like to talk a lot about myself.

Its been a productive break for the 3 of us. Let me start off with the best news, Phaneendra got into Google Summer of Code 2011!! After many days of deliberation,whether we (I applied too!) would actually stand a chance, it was indeed a great thing.He is working on a project called 'Fancy Bookmarking', its one of KDE's projects. He has been blogging about it here. And he is making a butt load of money.(Don't yell 'treat treat' now)

Next up, Nitheesh got into Intel as an intern. He was handpicked by the hot shots of Intel when they came to our college.He always wanted to get into Intel and finally has.He is working on Android and other embedded systems ("That's pretty much what I can legally tell you" was what he said when I pressed for details) And yes, he is making a butt load of money too, and said he is only interested in treating people who are going to install awesome window manager on their comps.That's when I stopped pestering him for one.

About me (finally!), I got into a startup called MobStac as an intern and am working on some hardcore web development. MobStac is pretty chilled out, and has a great bunch of guys working there.

Now, after we are done with our summer breaks and internships, what next was one of the highly discussed topics in our recent meetings. And (drumroll)finally we decided what we wanted to do today! I'm not supposed to tell you what it is. "That's pretty much what I can legally tell you"


If you haven't noticed, all the 3 of us have been blogging privately. Somehow, this blog is back alive, and I hope to write some more in the coming days. Until then, we are busy with our new found work, ciao.

PS : Started to monetize the blog finally.Drumroll again.

Which Linux?

…being a linux user I’ve tried out various linux distros, trying to find the one that suits me the best.

Each of them are wonderful in their own way. Many of the distros are made for a specific set of users. Some aim at security, some at being small and off course some to replace windows :)

 But none of them seem to satisfy me. Some distros provide wonderful UI and customization but hog a lot of memory. Few of them are very fast and small but does not provide a good GUI. Most of the time, there are so many unwanted features that I hardly use.

So I decided that I’l build my own based on my requirements. In the beginning I thought of using ‘Arch’ as it comes with a plane and simple base system upon which I can add my required modules. Moreover since ‘Arch’ is based on rolling release, the fact I would not have to frequently upgrade to newer stable versions was comforting.

Then I came across this project call ‘linux from scratch’(LFS). I’m glad I found that project. LFS provides step-by-step instruction to build a custom linux from source code. I couldn’t ask for more. This is the next best thing to writing my own OS.

LFS lets me create a basic system. similarly there are other xLFS, that lets you to continue on the base system to create more advanced and customized systems .

So, if there are others out there who also want a customized linux, then  http://www.linuxfromscratch.org/ should be your first step.

saving grub from windows

lost your grub after installing windows? here is a simple way of getting it back.

[note: assuming windows being installed on top of ubuntu(using grub2) ]

1: boot from a live cd and open a terminal

2: sudo fdisk -l

this will show the partitioin table. Here is my partition table

Device Boot   Start         End              Blocks    Id  System

/dev/sda1                   63        771119      385528+   de  Dell Utility

/dev/sda2   *        772096   105629695    52428800   83  Linux

/dev/sda4       105631722   625141759   259755019    f   W95 Ext’d (LBA)

/dev/sda5       105631744   315355949   104862103    7  HPFS/NTFS

/dev/sda6       315356013   561134384   122889186    7  HPFS/NTFS

/dev/sda7       621142016   625141759      1999872   82   Linux swap / Solaris

/dev/sda8       561134448   621137159    30001356    83   Linux

3: mount the linux partition on which you want install the grub (sda8 in my case)

$sudo mount /dev/sda8 /mnt/

$sudo mount - -bind /dev /mnt/dev

$sudo mount - -bind /proc /mnt/proc

4: Now chroot into this environment

sudo chroot /mnt

[optional]if you want to change any default setting like timeout options… then look at /etc/default/grub

5: #grub-install /dev/sda

[ in case of error do #grub-install - -recheck /dev/sda ]

6: now unmount and reboot the system.

#exit

$sudo umount /mnt/dev

$sudo umount /mnt/proc

$sudo umount /mnt

$sudo reboot

simple cmd line power management.

I am a cmd line user, so i spend most of my time on the terminal and its really painful to use the gui for some of the common things. Power management is one such case.

Just to put the system to sleep i’ve to go to the menu and then select, suspend. Same for hibernate, or to put the battery to power save mode.

So here is the simple way to do the same tasks from the cmd line.

pm : power management. check out the man pages for its various options.

pm-suspend : suspend/sleep the system

pm-hibernate : hibernate the system

pm-powersave : set the battery to power save mode

using these commands are way more simpler than using the gui :) [provided you are cmdline user]

Restoring Grub entries…

If you’ve lost your grub entries after installing a new os, here’s a simple way of adding it back to your grub.Lets take the common situation where fedora has been installed along side ubuntu.In this case, the grub which you’l see is that of fedora, so you’l have to add the ubuntu entry into fedora’s grub.
first, boot into fedora and open the file ‘/boot/grub/menu.lst’.This is the file that has the entries which are visible when the grub is loaded.
Amongst other things, the file would have a few statements that would look like

####################################

title Fedora (2.6.35.12-90.fc14.i686.PAE)

      root (hd0, 1)

      kernel /boot/vmlinuz-2.6.35.12-90.fc14.i686.PAE ro root=UUID=912d5b84-5c9c-4NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb

        initrd /boot/initramfs-2.6.35.12-90.fc14.i686.PAE.img

###################################

these four lines are responsible for your grub to show the title ‘fedora…’ on the grub menu and boot it. To be short, the first line denotes the name to be displayed in the grub menu.The second line provides the hard disk and partiion (in which that particular os is existing) to be set as the root in the path. The third line is the full path to the kernel image of that os and the arguments that have to be passed for booting and the fourth line is the path to the initrd image


so if you want to add ubuntu(or any other) to the grub menu, all you have to do is to provide these parameters in the fedora’s menu.lst file.These parameters will already be present in ubuntu(or any other) grub file.

mount your ubuntu partition and open the grub menu file(/boot/grub/menu.lst or grub.cfg).If the other os uses grub2 then you’l have to use grub.cfg instead of menu.lst
Since ubuntu is now shipped with grub2, grub.cfg will have entries similar to

###################################

menuentry ‘Ubuntu,  with Linux 2.6.32-28-generic’ —class ubuntu —class gnu-linux —class gnu —class os{

          recordfail

          insmod ext2

          set root=’(hd0, 8)’

          search —no-floppy —fs-uuid —set f18af736-8d79-43e5-815e-0033f9c31ffe

          linux   /boot/vmlinuz-2.6.32-28-generic root=UUID=f18af736-8d79-43e5-815e-0033f9c31ffe ro   crashkernel=384M-2G:64M, 2G-:128M quiet splash

          initrd  /boot/initrd.img-2.6.32-28-generic

}

###################################

it has a differnt format, but contains the same information

1st line is the title

in the 4th line (hd0, 8) is the harddisk and the partition in that hard disk where the os is existing

6th line is the path to that os’s kernel and its boot options7th line is the path to the initrd image of that os

so all you’ve to do now is to add these entries into fedora’s menu.lst fileIn our case, the new entry in the menu.lst file would be

###################################

title ubuntu

      root (hd0, 7)

      kernel /boot/vmlinuz-2.6.32-28-generic root=UUID=f18af736-8d79-43e5-815e-0033f9c31ffe ro  crashkernel=384M-2G:64M, 2G-:128M quiet splash

      initrd  /boot/initrd.img-2.6.32-28-generic

###################################

Note: in grub.cfg the partition was 8, but we use 7 in menu.lst because for this version of grub the partition number starts from 0

Now save the file and reboot. You’l have this new option in the grub menu

Instapaper

When I started depending more and more on e-resources than actual books, I ended up bookmarking every other page that seemed interesting for reading later or just as a knowledge resource.

This process grew haphazardly over time.I had a few bookmarks saved in my laptop and a few other in desktop, and of course I couldn’t import/sync them (Is there a method to do this? I don’t know).

Then I stumbled upon (real stumble!) Instapaper.It helped me save my bookmarks onto their servers.So I can now manage my bookmarks from laptop and desktop or any other device.I can log into my account and edit/delete/share/like my bookmarks etc.The features are best explained in their site.

The USP of Instapaper is its simplicity, right from the homepage to how your bookmarks are treated.It reminded of those WYSIWYG applications.Its so simple that I do not have much to write about it!

You are given a ‘Read Later’ bookmark which can be added onto your bookmark bar and once you want to bookmark any webpage,just click on the ‘Read Later’ bookmark and your webpage is saved.

Instapaper is free, and a premium membership as of now has no added bonuses.But, the creator of Instapaper Marco Arment is one of those shrewd startup minds and he would come up with something sneeky about the premium membership.Why I call Marco Arment shrewd is because of how he handled the iphone paid and free Instapaper apps.More on this can be found here.

Incidently,Marco Arment was involved with tumblr before he started with Instapaper.

Yes,Instapaper is not the first to offer these services.There is evernote,pinboard,deli.cio.us and even the more recent scrible.But Instapaper struck a chord with me with its in-your-face simplicity and functionality.Scrible may have more fancier features but I don’t see them using it.

Till then,Instapaper will do.

PS : I wish the ‘read later’ bookmark had a favicon.

Adding Gadgets in tumblr

Hack tumblr themes.

By ‘Hack’ I don’t mean an exhaustive modification of code, just a few additions so that, you get the ‘blogger’ experience.

I have noticed that it is not that easy to add a gadget or a widget onto your tumblr account.Here is a brief tutorial on how you can go about it.For example, Have a look at the left hand side bar of this page and you can notice 2 gadgets I have added.

One,the hit counter and another is the AdSanthe gadget which is a project which i worked on for the past 4 months. Know more here.

So, if you want to add gadgets like these, the following tutorial will help you.

Step one : Get the code

Identify what you want to add to your tumblr site. Lets take a hit counter for example, go to hit-counter.info, select the desired type and grab the code.So, whatever gadget you want to add, grab its code.

Step two : Customize

Dashboard -> your site -> Customize
If you are not familiar with HTML the easiest thing to do is
- Click on Info and in the description text box, paste the code that you copied( from hit counter eg.)
Go to step 4.
If you are familiar with HTML, you can easily choose where you want the gadget to be placed.
In the customize page, click on Theme -> Custom HTML
If you want to add the gadget onto the left hand sidebar, find the line where the code for sidebar ends(This is usually commented, so its easy to find it) and just paste the copied code snippet there.
Update
And you are done. This is a very brief tutorial and if you need more help feel free to mail/shout/rant.

Mongodb : ‘Connect failed’ error

Learning Mongodb these days, and encountered this error when starting the mongodb client.

Mongodb connect failed error

The problem here is that, the mongod daemon has to be started first.The steps to do so is

Ubuntu/Debian
Execute the following command in the terminal
$ sudo /etc/init.d/mongodb start

Fedora/RedHat
$ su
Now, switch to the directory where mongo was installed, and execute the following command in the terminal
# mongodb-linux-xxxx-1.6.x/bin/mongod

This should get the daemon up and running, the normal procedure for starting the mongodb client should then be followed.

Gmail multiple account sign-in

Gmail - multiple log in
I just found out that not many people who use gmail know about its multiple sign in feature.So, if you have multiple gmail accounts and wish to access all of them simultaneously, you need not have to logout of one to log into another.

This is an extremely handy feature useful to people who have multiple Google powered mail accounts, a personal Gmail account and another provided at their work.

To enable this feature, go here  and select the ‘on’ button.Check the following terms and conditions (as always) and you are set.

Now, to log into multiple accounts :

Click your name or email address at the top of the page.
Select Sign in to another account from the drop-down menu.
On the page that opens, enter the email address and password for another account you wish to access, and click Sign in.
Note : The above instructions are the official instructions from Google.Yes, I was too lazy to come up with my own.

Thursday, May 19, 2011

Ubuntu Update Manager/Synaptic package manager error

While updating your Ubuntu distros using the Update Manager or while using the Synaptic Package Manager, if you ever encounter a error like


'E:Encountered a section with no Package: header, 
 E:Problem with MergeList /var/lib/apt/lists/any name here,
 E:The package lists or status file could not be parsed or opened.'


The easiest thing to do is remove all the contents of the mentioned directory /var/lib/apt/lists/ and then populate the lists again.


1. Remove all the entries
       $ sudo rm /var/lib/apt/lists/*
2. Populate the entries again
       $ sudo apt-get update


This is a short hand trick and do use it at your own risk.
But Linux is all about taking that little extra risk, right?

Wednesday, May 18, 2011

Enabling front panel audio jacks in Ubuntu


When I moved my trade to Ubuntu 10.04 ‘completely’ last year, I had a tough time getting my desktop’s front audio panel.
It was a rather easy affair in Windows XP, I just had to enable a option using Realtek.But, in Ubuntu its not so straightforward albeit not complicated either.
All you have to do is, type the following commands in the terminal
  1. Open the alsa-base.conf file for editing
    $ sudo gedit /etc/modprobe.d/alsa-base.conf
  2. It prompts for the password, after entering it add the following line at the end of the file
    $ options snd-hda-intel model=auto 
  3. Reboot
This should get it working.

Tuesday, May 17, 2011

c.vim

Recently, I was thinking about the way we write c programs. There are certain set of statements and a few other things that we are bound to use again and again. Like the main routine, the headers, the comments...to mention a few. It would be nice if the editor did these redundant tasks. We would code lot faster. Such features are normally provided in the IDEs, but being a linux user I use vim to code c programs. Vim has so many features, i was sure that it would also have this...and i was darn right about it :)

'c.vim' is a small plugin for vim that converts it into a c/c++ IDE. Adding this to vim considerably increased my coding speed. It provides insertion of complete statements, code snippets, comments and a few more nice features.

Its fairly easy to change the template for the code snippets and the comments. You can also set your personal details like your name to be displayed, your contact etc. You can follow the documentation that is provided with the plugin to customize it to your needs. Once that is done, just take a look at the key combination to perform the actions.

Now open a new c file to code as usual, and you'll automatically be greeted with your information (the personal details which you've set in the template file) and also an empty main routine. The cursors is also placed in the appropriate positions so that you can continue to code.

All the key combinations begins with '\'. for example, '\cfr' creates a frame comment. There are many more available. Make sure to read the 'c-hotkeys' file that is provided with the documentation.
download the c.vim here .

Once you get used to it, you'l definitely code a lot more faster and your code will also follow a consistant format.

Wednesday, February 16, 2011

How to uninstall Ubuntu on your computer?

Previously we wrote about the installation procedure of Ubuntu.Now you can find the procedure for deleting Ubuntu from your PC.
          If you are deleting Ubuntu because of a problem in maintenance or finding it difficult to use Ubuntu , please write to us and we will help solve your problems.


Important : You can't just delete your Ubuntu partition and be happy that everything is out and over. Ubuntu usually messes up your Windows bootloader, so you have to set it right and this is how its done.

Deleting Ubuntu using Windows Vista/7/XP WITH a recovery disk
  1. In Windows, launch Disk manager and remove every partition used by Ubuntu (root partition, swap, …)
  2. Reboot with your Windows CD. When asked, choose “repair” and launch fixmbr. This command replaces GRUB with Windows bootloader.
  3. Reboot again and you are done.
Deleting Ubuntu using Windows Vista/7/XP WITHOUT a recovery disk

Follow Step 1 from above.

This is the same as above but since you do not possess a recovery disk, you need to download the 'MbrFix' command. This can be downloaded here for free.

Once you download it, paste the command somewhere convenient like the Desktop.Then open your cmd .This can be done by going to Start->run->cmd.

When cmd opens, the default directory will be Documents and Settings\admin.Change it Desktop.
Use the following command twice one after the other to change your present working directory to C:/
                                      cd ..

Then change your directory to Desktop once you reach C:/
This can be done using the following command
                                     cd Desktop

Now type in the following command
MbrFix /C 0 fixmbr /yes
                                
You should get a confirmation msg.
Reboot and you are done.

And we're back


Well finally get to write again, that's cos we were busy developing our new site.
Here is a brief introduction of what the website is all about.
Complete details can be found here.

What is AdSanthe?
A advertising tool for blog owners / website owners to display ads in their sites and get more visitors as well.The whole concept of adsanthe is mutual cooperative advertising.A new advertising network is created.

How does it work?
When you sign up and create a ad, we place your ad on other user's gadgets and similarly place other's ads on your blog's gadget.So the whole adspace is shared by all the users.So each user is both being advertised and advertising some one else.It's a two way mechanism.

An example of such a gadget can be seen on this blog which is visible on your right hand side.

A blog owner who wishes to market his blog with us has to first sign up using our website(which is going to be announced shortly) and he can then create his own ad using our templates much like the facebook ad system.The user can then select the kind of blog/websites where his ad needs to be placed.
A gadget is then added onto the user's blog/website containing ads of other users.

The advantages of signing up

1. Create your own ad.
2. Get the AdSanthe gadget on your blog.
3. Popularize your blog with your ad being advertised globally.
4. See the number of visitors to your blog grow.
4. Have the liberty to choose what ads you want your gadget to display.
5. Regular updates of your blog traffic statistics.

If you like it, make it known here in facebook.

If you have any queries,feedback or if you are just bored and want to talk to us, you can at info@adsanthe.com.