[My Klogs] Identifying devices by minor number when a char device is registered to the same file operations

Recently, while I was writing a dummy character devices, one of my friends asked me this question “If I register a character device to the same major number, is it possible for me to identify the major number and minor of the node during file_operations”. After researching a bit, I saw a solution to it.  I could do it using the dentry structure in struct file. For reference I will paste the code here :

struct dentry * dentry = f->f_path.dentry;
struct inode * p_inode = dentry->d_inode;
minor_number = iminor(p_inode);

PS : Please suggest me alternate or better ways and point out any errors if there

Google Code-in and openSUSE

After Google Summer Of Code 2011, openSUSE plans to participate in Google Code-in. It is an excellent opportunity for openSUSE to meet young talents and introduce them to the ways of open source.

What is Google Code-in?
It is a contest hosted by Google for pre university students every year  where they are encouraged to participate in open source projects and are awarded cash prizes for their contributions from Google. Various open source organizations participate in it and mentors from every organizations help these students to get up to speed and advice them on how to complete the challenge. The contest period is from November 21st to January 16th 2012

What are tasks?
Every open source organization has a lot of cool ideas in mind and likewise every member of the community has some ideas in his minds. These ideas are collated and put together and are categorized into three levels of difficulty – Easy, Medium and Difficult. Students are rewarded points as to what task they complete.

Deciding the tasks
The mentors decide the task, off -course community can suggest but at the end of the day it is the mentor’s discretion on what task they want to work on. Tasks can be anything and for a more accurate description of the tasks  visit here.
Note that not all tasks will be code related, so even a non-technical guy with enough experience with other skills can participate in Google Code-in as mentors. Tasks can range from Documentation to translation, artwork to marketing and off course what is a code-in without code related tasks like code refracting, testing, finding and squashing bugs and a lot more things.

Preps for Code-in
openSUSE has already started preparations vigorously and is already coming up with a list of tasks and is looking for mentors. While lots of us have already signed, we are looking for lots more to sign up as mentors and see more interesting tasks ahead.
More information can be found at en.opensuse.org/openSUSE:GCI
and http://en.opensuse.org/openSUSE:GCI_Tasks

Along with the above 2 links, make sure to have a look at http://google-melange.com/

Thanks to Jos for reminding the links do not work

SaX3 – Status

The changes I have made in SaX3 in the following week

1. Fixed a few nasty bugs.
2. The monitor module does not work which works now ( I need to be more careful the future)
3. Tried porting to openSUSE 11.3 ( Testers Required)
4. Pushed to factory, but it is hghly recommended to add X11:sax as your project repository for sax until 12.1



SaX3 – Touchpad module

Hi All,

Actually this report is 2 days late, those who have already added my repository and updated it should have the sax3-touchpad module.

For others, you can get it here


From now on, I will focus a lot on fixing issues and polishing the UI, specially the touchpad one and yes offcourse clean some code.

I have moved to code.google.com but the transition is not complete yet

SaX3 – Monitor Module completed

As part of GSoC Project, I am working on SaX3 and I have completed the monitor module.

You can get the latest repo from my home repository

Please test it thoroughly,and let me know if common troubleshooting use cases for a single monitor is supported. If there is anything missing let me know. Xinerama is not supported
For both factory and 11.4.

Next up is touchpad, which I will finish by this thursday. And will begin pencil downs the following week onwards.

My GSoC Project – SaX3

Well, SaX off course needs no introduction for old time openSUSE and SUSE Users and certainly lots of people want it to be back on openSUSE. My proposal for Google Summer Of Code for SaX3 was selected and my mentor will be Michal Hrušecký. Now I will tell about the little interesting things on which I will be working on and some of the more interesting things later on at the end of the blog post.

SaX as most of on planet SUSE knows stands for SUSE Advanced X Configuration Tool, but for others lets say we want to have a Graphical Front End for Xorg.conf.d, so that we can easily configure our hardware too. The specific bits on which I will be focusing would be keyboard, mouse, touchpad and offcourse whats SaX without a good screen configuration tool like monitor, yes we will support that. One of the interesting features that SaX3 will support that it will have a graphical UI for ncurses mode even, so even if your X is not functioning, you dont need to remember a lot of command line commands.


Offcourse, a SaX without a proper monitor configuration is worthless and here is where I will need a lot of inputs from people at forums and other places. I am greatful for all those have  offered to help me from forums and everywhere else. I would take an oppurtunity to as to what platform will suit them, the forum itself, a Mailing list or through private channels or on IRC even where I can bug them a bit and make the best use of their experience SaX can work as expected.

Please post your views on your comment and I will get back to you soon.

An interview with Petr Mladek – Libre Office Developer

Recently I had an interview with Petr Mladek, long standing Libre Office and openSUSE Packager who gave me a lot of insights about Libre Office and the ongoing development process along with the Libre Office’s collaboration with openSUSE
Me: Hi Petr, Please tell us a bit about yourself
Petr: I have been a package maintainer in SUSE for since March 2001. In the beginning, I started to take care of some easy editors, e.g. joe and pico. After an year, I started to maintain java packages. In 2004, they told me: “Hey Petr, would you be interested into packaging OpenOffice.org? It is yet another editor, uses java, so it would nicely fit your area of interest.” I answered: “Yup, I could try it” and the game started. As time passed, SUSE has been acquired by Novell, I started to closely cooperate with enthusiastic Michael Meeks. OOo become more important. We hired more people on OOo development. I started working on it full time. We did many OOo releases and recently joined the initiative around LibreOffice. I am proud to be member of the Novell LO team and work closely with all the great and inspiring people. In my spare, I do some usual things, like watching films or reading books. I prefer comedy, psychology, adventure, romance, and action. Also I do some activities, like cycling, hiking, skying, or swimming. During swimming, I often dive under the water to enjoy the silence and free movement. Last but not least, I enjoy many kind of music, especially, folk, rock, and pop. When the sound or words hit your heart, it is one of the best feelings in life. Unfortunately, I can’t distinguish between the tones, so I can’t sing myself. I tried to play guitar and got able to play many simple folk songs. Well, it would need much more effort to more enjoy it or be able to play for others. Finally, I started Salsa dancing two years ago. In the beginning, I danced as if I had two left feet. I think that it is much better now. I have found it an excellent combination of music and “sport”.
Me:  What are some of the unique benefits you can expect to see in Libre Office that aren’t in open office?
Petr: The alternative online help might significantly reduce download time and disk usage. LO supports 3 different formula syntaxes: Calc A1, Excel A1 and Excel R1C1. It has a possibility to use English formula names. The inline forms editing is much easier to use. Again, best to check the LibreOffice features page [1], you will see all the nice additions.
Me : What can users expect to get with libreOffice when they move to 11.4?
Petr: LibreOffice-3.3 includes some nice features compared to OpenOffice.org-3.2.1. I like the new search toolbar, “Title Page”, and “Print” dialogs. I think that users will appreciate the new hierarchical axis labels for charts, RTF export, easier slide layout handling, and all other features[1].
Me:  How much work was involved in getting Libre Office to a stable point ready for the masses?
Petr: A challenge was to integrate all the nice stuff that people provided after the creation of LibreOffice. We also needed to rename the packages, make them backward compatible with the OpenOffice_org packages. Otherwise, it was comparable with stabilizing any other OOo version.
Me: What’s the development environment like?  is it better than what it was before under open office or go-oo?
Petr: The advantage over OpenOffice.org is a faster development model, and that the project does not need copyright assignment any more. The advantage over Go-oo is that it is not necessary to maintain changes as patches.
Me: Are there any migration concerns about data from old open office to new LibreOffice?
Petr: The update is pretty smooth. LibreOffice is continuation of the OpenOffice.org project and is based on the OOo sources. The compatibility of import and export filters is our high priority. We kept the oo* wrappers for backward compatibility for people used to start the office suite from the command line. Only one potential problem comes to my mind. The migration from the old configuration stored in ~/.ooo3 can fail in corner cases, and few of the settings are not migrated.
Me: LibreOffice has seen a tremendous growth in contributors since its inception,  To what do you attribute this growth to?
Petr: I think that people always wanted to work on OpenOffice.org. It was popular project, used by many people every day. The work really makes sense. I think that many people join LibreOffice because they could execute their ideas more easily. We also lowered the entry point to the project. There is a set of Easy Hacks [6] that cover tasks from the most easy that need nearly no programming experience, to very advanced ones. You can pick any of those, and can be sure that you’ll get help on the development mailing list [7] or on IRC [8].
Me:What are some of the coolest features that are most overlooked by users of LibreOffice?
Petr : I have found pretty useful a possibility to split view on a sheet. It is done by a tiny black box next to the roll-bar. It helps to assign values between different columns and rows.  Another interesting thing is the possibility to set another language for a particular sentence.  It helps to do the spellchecking correctly. I like the 3D slide transitions. Of course, such transitions are good only for some types of presentations.
Me: Being an openSUSE user, how excited are are you about LibreOffice being featured as default on your favourite OS?
Petr : I am very happy. I believe that LibreOffice has a great future, and that it will gain many satisfied users.
Me : Can users install LibreOffice on pre openSUSE 11.4 versions?
Petr : Yes, the latest stable version can be found in the BS project “LibreOffice:Stable”[2]. It is available for all supported openSUSE distributions. Enthusiasts could try alpha, beta, rc versions from “LibreOffice:Unstable”[3] project. We also think about to provide official maintenance updates for the older openSUSE distributions. I would like to thank all people for trying the unstable builds and reporting bugs. It helps us to catch problems in time. Note that I announce new builds at lizards.opensuse.org[4] and planet.opensuse.org[5].
Me: Are there any unique advantages of having LibreOffice on openSUSE versus other distributions?
Petr: openSUSE has a group of excellent LO developers inside, so it is easier to get bugs fixed. Of course, there are always more bugs than we are able to fix but we do our best. Another advantage is the Build Service. It helps to keep the packages up-to-date and compatible for older distributions. Finally, we are the only distro using the split build, so it is easier to hack on LO and distribute smaller fixes.
But the overall goal is to keep all the distros in sync, and not to fragment – so we hope that for example the split build is going to be used by others too.
Me: What is your philosophy on Libre Office?
Petr: It must be free and easy to access and use for users and developers.
Me: What do you see as the future of open document formats?  Are we gaining ground?
Petr: Yes, it seems that more and more users understand the importance of open document formats and it is pushing companies to use them.
Me: What are some of the challenges we see still?  (Technical and perceptual)
Petr: There always will be challenges because everything can be done better and better. An interesting problem might be compatibility of extensions between OOo and LO. We also need to teach people about the time-based schedule and more frequent bugfix releases. Of course, I am primary interested into the build framework where we are going to optimize build using .po files and GNU make. Also I hope that we will continue with the split build.
Me: What accomplishments are you most proud of since LibreOffice was launched?
Petr: I am very proud of all the people who joined the project so far. They do great job. We would not be possible to do all the things without them. Also it is very promising for the future of the project.
Me:  What’s next for LibreOffice?
Petr: We are going to switch to a time based schedule and more frequent bug fix releases. We want to keep quality and avoid infinite RC phase at the same time. The idea is that all serious blocker bugs can be found and fixed within few weeks. Then the application is ready for masses who want to enjoy new features and more complicated fixes. The history says that bugs in less typical scenarios are found weeks after the release. Such bugs will be fixed in pure bug fix releases and released few weeks after each other. It means that more conservative people should rather wait for the 3.x.1, 3.x.2, 3.x.3 releases. We hope that it will help all people to get faster what they want.
[7] libreoffice@lists.freedesktop.org
[8] channel #libreoffice on irc.freenode.net

Login to a linux system using your USB Drive

5.30 in the morning I accomplished this, just before Java exams could not sleep with excitement and to my dismay the net did not work properly.  I forced myself to go to sleep otherwise I would have certainly messed my papers ( thank God, I did not).  Now lets move on to the topic.

Certainly, I had thought of this idea long ago, before diving into linux( openSUSE 11.2) and deciding to learn about it as much as I can.  Ankur Bhaiya had given me a hint that it will have to do something with PAM modules. To be honest, I am a lazy humbug who has a lot of great ideas and always fails to accomplish them. So even completing this gives me a great sense of achievement.

I followed the instructions from this site which has a PAM module for pen drives

I hope everyone can follow the instructions pretty well as they are pretty easy to understand and follow. However I myself would like to add a point or two on this issue which I experienced and maybe you can experience yourself too.

If you are downloading and compiling from the source, which I did, on openSUSE 11.2 I really had no need to get a dependency module for python-celementtree. However python-gobject is now python-gobject2 which you may also get it as a one click install from openSUSE software search. I cannot say about the others.

The example which is given here is for the root user and so our module will perfectly run when we login as a root. However if we run it as some other user we may not be able to execute all the commands. The reason is the pamusb module uses pmount which is a wrapper on the mount command and is used in many debian based systems. So we might need to get the package pmount which is also available as a one click install in openSUSE.  However, this is not enough we have to login as root and then move to the directory /usr/bin/ and after this we change the permissions of pmount as chmod 111 pmount ( this gives executable permission to every user in the computer).

The last step is to finish it with writing a logout command. The pamusb.conf already indicates that it has something to do with gnome or kde or whatever we are using.  I am a great fan gnome( just because it is simple, no fights over here) So I will continue with gnome itself.

Change the following
<agent event=”lock”>gnome-screensaver-command –lock</agent>
<agent event=”unlock”>gnome-screensaver-command –deactivate</agent>
<agent event=”lock”>gnome-session-save –logout</agent>
<agent event=”unlock”>gnome-screensaver-command –deactivate</agent>

UBUNTU 9.10 Review

This is my first review for an operating system so please give me your comments if u think i missed anything…

Karmic Koala, the latest from Cannonical is the best so far and I took an instant liking to it. There are plenty of new features to it which are clearly and instantly visible.

  • The old human look has been replaced and a new chocolate look has come combined with lots of wallpapers than previous ubuntus.
  • Boot Up time is faster
  • Upgrade is very easy and does not consume any time( PS do not run any programs while upgrading)
  • Supports ext4
  • New Theme Humanity has been introduced
  • UBUNTU Software Center – Probably One of the Best features introduced this time. The best part of it is it does not consume ur desktop and you can automatically give the install and close it. It works
  • Computer janitor has been modified
  • If we notice carefully, we can have xterm and gnome are supported by default( maybe we can have two or more desktop, I have not given it a try PS let me know if anyone does)
  • GRUB 2 included

Personally, within two days I am getting addicted to it and certainly recommend to people who have not started their linux journey because they say its too difficult, this may certainly change their opinions.

Google Chrome on UBUNTU

I had gotten UBUNTU 9.04 a few days and was looking for chrome. Today I fell upon it, however it is not the official release and not a stable one even. Google released it a few days back and so I am sharing the link with everyone so chrome fans can directly get it on linux too

Get it here: http://wp.me/pzuEo-1u


Chrome Screenshot
Chrome Screenshot

Chrome Screenshot
Chrome Screenshot

PS I know the screenshots does not fit my theme but they look better when expanded