Showing posts with label OutreachyInternship-2010. Show all posts
Showing posts with label OutreachyInternship-2010. Show all posts

Monday, March 14, 2011

Contact Blocking and Report Abuse to be available in Empathy3.0

Many users had requested this feature (bug) and it is now available for all to use.

Now Empathy supports blocking/unblocking contacts on per-user basis for connections that support contact blocking (for ex. gmail) and report abuse for connections that support this feature (though currently there are no connection managers implementing this). Danielle completed two branches for "Contact Blocking" and "Report abuse" last month and I recently re-based them to master for her which took some time since the branches had diverged  much.

Here a few snapshots of the interfaces introduced-

The Blocked Contacts can be viewed and managed with Edit->Blocked Contacts menu-item
in the main window to open up the following dialog

Blocked Contacts Dialog

...on which you can perform usual live search.

One can right click individual contacts in contacts' roster and on selecting "Remove" he'll 
notice this extra "Delete and Block" button, if supported.



The Contacts->Block Contact menu item in chat windows is a check menu-item that can be toggled


The subscription box provides a convenient way to right away block a contact without need to first add him or her.

Confirmation dialog that would pop up on each attempt of blocking a contact


On completion, Empathy was in string freeze while getting ready for release, and the ready-to-merge branch was too cool not to be available in this release, so Guillaume requested a freeze exception from the i10n team which was granted and the branch was finally merged! :)

Wednesday, March 2, 2011

Recovering data from a broken hard disk

Some time ago, my computer's hard disk broke and I didn't had a recent backup copy which increased my pain.
I hope no computer dependent ever faces such crappy situation. Just like a burnt child dreads fire all life, I have made it a habit to backup my system data at the end of each day (backintime is a super fast tool) and monitor the healthiness (SMART status) of my hard disk's regularly!

Here I describe how I recovered my data in that situation. Most of the commands mentioned here will require root privileges.

It happened one fine day when I started my computer and after making some changes on a set of files, tried to save them for testing. System refused and reported that my file system was read-only. Without thinking much I tried to restart my system and it never opened up in GUI. I ended up with unmountable partitions-


mount: mounting /dev on /root/dev failed: No such file or directory
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /proc on /root/proc failed: No such file or directory


Target filesystem doesn't have requested /sbin/init.
No init found. Try passing init= bootarg...


and then it asks me to enter commands in Busybox.

On much googling I found this somewhat useful.
I decided to use my Ubuntu live CD to recover the data, check the drive's status and reinstall the system if possible. The disk utility reported two bad sectors and when that happens, there are more to follow.
Broken disk was not really bad for my PC was still under warranty but I was worried about my data.
In panick I decided to use the dd command to create an image of the partition on a blank external drive.
I got this error:
ubuntu@ubuntu:/$ sudo dd if=/dev/sda3 of=/media/2c0adbca-f37e-4f53-b975-8c7a99ee2757/sda3.imgdd: reading `/dev/sda3': Input/output error5341584+0 records in5341584+0 records out2734891008 bytes (2.7 GB) copied, 162.043 s, 16.9 MB/s
Then Danni suggested me to use ddrescue as a tool to copy my disk off. ddrescue is like dd, just that it retries, skipping bad bits.
So I tried to install ddrescue onto the live CD but each time apt-get kept getting stuck while unpacking, in D-state (ps aux | grep dpkg showed the unpacking process' status  Ds+ which means uninterrupted sleep.) Processes in D-state cannot be killed until system is rebooted and are termed as zombie processes.

Dismounting the corrupted partition didn't help either, I'm not sure why.
The syslogs kept displaying IO errors on device sr0 which is the cd-rom usually, so I instead burnt Ubuntu rescue remix (which has many rescue tools including ddrescue pre-installed).
Then in hurry and without knowing the consequences of writing a large file onto a MS-DOS file system (which was what this external drive was formatted with), I started creating the corrupted file system's image with the rescue remix.

My disk was spacious enough but the process halted reporting disk to be out of space.

My bad, I doubted this was because of mismatching file system on my external drive and thought of  formatting my external drive with two partitions (for the first time):  ext4 for the image and NTFS for the rest. For this I studied the fdisk and parted commands extensively. I eventually could make a large enough ext4 partition but something went wrong with magic numbering when fiddling with fdisk. The image was ready within a second which smelled of something wrong! :-/

The reason for image creation faliure turned out to be the disk's file system. MS-DOS restricts files sizes from being more than 4GB[?] in size. Danni told me I could save the image (which is nothing but a byte-wise copy) to any file system with larger file sizes permitted (not necessarily ext*), so I deleted all partitions and made a single fully stretched one (using fdisk utility). I formatted it with NTFS whose data I would be able to see using any OS like this:
mkntfs /dev/sdc
where sdc was the external hard disk (mount -l command shows currently mounted partitions or df -T could also be used to check this).

Then, with all other partitions unmounted (umount command) and only the external disk mounted, I ran the ddrescue command. The steps were:
  • Mounting the external hard disk file system I was writing the image to (sdc1 in my case) if not yet mounted:
    mkdir /mnt/target
    mount /dev/sdb1 /mnt/target
  • Writing an image of corrupted partition (sda3 in my case) to the file system mounted:
    ddrescue /dev/sda3 /mnt/target/ddrescue.img /mnt/target/ddrescue.log
This ways, I was able to create my image with corrupted data skipped.
Checking the image using e2fsck couldn't succeed and I needed to run fsck manually:
fsck -y /mnt/target/ddrescue.img
[
FWIW, my image on check (without repairing it) reported:
error: Inodes that were part of a corrupted orphan linked list found
]
Now, rerunning check reported the file-system's copy to be clean and (hopefully) repaired and ready to mount.

I tried it using mount loop (which is just a way to mount a file as a file system) as:
mount -o loop /mnt/target/ddrescue.img /mnt/recovered_sda3
where /mnt/target/ddrescue.img was treated as device and /mnt/recovered_sda3 was the desired mount point directory. Now I was able to use  /mnt/recovered_sda3  just like root directory with all my data in /mnt/recovered_sda3/home! :D
I tried to format my corrupted partition and even to delete the entire partition on the faulty disk but could not do it.
Finally, I installed Ubuntu on a new hard disk afresh, mounted my external drive onto it, mounted the recovered partition's image and copied my /mnt/recovered_sda3/home onto /home :
 rsync -auvxz --progress /mnt/recovered_sda3/home/ /home/
(keeping the trailing '/' intact)

With that, had my computer back to what it was before the snap!

Had I had faced this situation on a healthy hard disk (as sometimes happens if the computer suddenly shuts down while booting) and if direct checking and repairing the file system using e2fsck/fsck failed, I could have copied the repaired image of the partition bytewise back to the same device like this:
dd if=/mnt/target/ddrescue.img of=/dev/sda3
Thank you Danni for guiding me through this and saving me a lot of  time and Google searches.

Friday, February 25, 2011

Internship updates...

Hey people,

Didn't get chance to blog about what I had been doing lately so here's a compiled mix of it all.

Good news first:
  • Now Empathy multi-user chats are separated from the chat-room windows they are displayed in. i.e. users will be able to join/leave chats without closing the room [commit].

    I am working on the opposite i.e enabling the user to continue being connected to a chat when chat-room window has been closed (bug).

  • The /part command is working for chat-rooms and private MUCs (bug [commit])
    UPDATE: There was a small fault in part message construction in telepathy-idle. It was not sticking to correct format of PART messages as per RFC 2812 sections 2.3.1 and 2.3.2 which was preventing the full part message from being displayed to the members. It has been fixed in this bug now.

  • To prevent a user from deleting significant accounts like freenode from list of networks, a new "Reset Networks List" button was added in the IRC Network Chooser dialog (bug [commit])
New things I learnt in this phase:
  • Insight into telepathy-idle
  • Using Wireshark to monitor packets sent to and received from a network
  • Conflict resolution after rebasing.
    To help me gain more experience with conflicts, Danni has given me two massive branches to rebase.

There were some not so cool things also like, I started my work on notification for enabling/connecting a disabled/disconnected account when trying to connect to rooms affiliated to it (bug) but it eventually turned out to be blocked by this bug. There must be some comparison workaround used by Empathy to keep things working which I am yet to discover! A particular horrible thing was my hardisk snap and not having an up-to-date backup added to it but I was happy to be able to recover my data (thanks to Danni). It was another learning experience and I'll dedicate a separate post to it.

~

Gnome.Asia Summit 2011 will be held in Bangalore, India this time. I am happy to get a chance to speak about my internship experience in my talk- Contributions made by a newbie to the free desktop's "Empathy", in front of such assorted community of developers, documenters, marketing people, GNOME users and prospective contributors. I am particularly exited about getting a chance to see the biggies of this world! :D

Wednesday, January 26, 2011

India celebrates its 62nd Republic day!

This one's is for all proud Indians and all world citizens who are happy for the republicans of the largest democracy in the world! :)

Today is a day to retrospect and be thankful to all those who brought a revolution to the nation and contributed towards the preparation of a permanent constitution for its people and for their future generations to be able to live a just life, in peace.


Monday, January 24, 2011

Internship - Week 5

The much awaited "Save all' button feature of Empathy's debug window is now in a working state. :)

I started working over this one in my 'Save all' button branch as my second ever bug to be fixed for Empathy but insufficient experience in asynchronous programming and debugging caused it to stand by. This week I went back to it and with the past one month's experience, it was all play!

Here's a shot.



This "Save all" button will be useful when users face issues and are unsure of what part is causing a particular problem. It could be the connection managers, mission-control or parts of Empathy itself. So with this branch merged, instead of saving individual logs for each service selected using the service chooser, one will need to simply use this button and have a compiled log saved on disk.

I made another not much observable change in this branch too. The older save button used to fetch log messages from the model which was updated from the cache and was used to display the messages in the main view. To make both saving tasks work coherently and to avoid code reuse, I changed it to load messages directly from the cache like what our new "Save all" button does.

There was this another bug evident using telepathy-gabble 0.11.5, about which I also mentioned in my last post, where, in MUC chat window tabs the typing icon was not getting correctly updated [bug]. I begun with a patch for it but after discussing it over IRC, finally closed it as the typing icon in MUCs is no more relevant when the typing icon is displayed next to the composers now.

Monday, January 17, 2011

Internship - Week 3 & 4

Hi all!

The passed week and its last, I worked on the following:

The last feature was a proposal that caught my eye while browsing the empathy MUC issues.
Having the knowledge of who is typing in a chat room in real time would be quite useful. This was possible using "composing" states obtained from chat state notifications (XEP-0085). Although one-to-one user chats in empathy provide this facility but private chats and multi-user chat rooms were still deprived of this feature.

While working on this, Danielle helped me with chat state observation and discovered a telepathy-gabble bug causing unexpected parsing of incoming chat states as a part of this endeavor, after whose resolution I was able to pursue my tasks at hand. Hence, to test this work out, you'll need the bleeding-edge telepathy-gabble too.

Here are demonstrating shots for the same:
Private MUC

Chat room

So you can see that with the gabble bug rectified, now the chat window tab typing icons also work but they are a bit faulty. "Why", is what I am looking into!

Tuesday, January 4, 2011

Internship - Week 2

Hi there,
A very Happy New Year 2011 to all of you!
Last week, the Christmas and New Year fervor enthused everyone. The commits I feel weren't satisfactory and i'll be consequently giving more love to Empathy this week.

I submitted-
Some of my time was spent figuring out why /nick command behaves weirdly in Jabber MUCs and am currently working on this bug.

Monday, December 27, 2010

Internship - Week 1

Hi all,
Last week I created a new popup feature that would allow the users to quickly enable/disable accounts from the accounts tree-view in accounts dialog.

Right clicking a disabled account.


Right clicking an enabled account

Note that the icon on the enable menu-item is the most-available presence depending on the chosen presence and not always necessarily the "available" icon.

I also made a small change in the way private and multi-user chats appears to a user. Influenced by approach used by Google talk, the user's name in current chat will be reduced to the string "Me: " thereby making chat look clearer and avoiding unnecessary clutter. This recent change is awaiting commit after which a private chat will look somewhat like the following with only the current chat affected.
Using "Me" for the user's name in private chats

...and similarly in Multi-user chats too.

Now, i'll be concentrating on improving Multi-user chats (MUCs) and removing its major and normal bugs.

Wednesday, December 15, 2010

Internship begins...

So it's Dec 15th and my internship begins today. Excited? Yeah!! Immensely and a little nervous too!!! :D 

Well in this while I had been somewhat preparing for my internship to start in a good pace. I went through the basic GTK tutorials and underlying API references and fixed some of the bugs in Empathy.



A few ambiguities resolved. A small fix was made in Empathy's account's dialog which required changing the tab focus chain sequence. Another notable change was that when no accounts are set up in empathy (or all are disabled) then instead of having the full 'Room' menu made insensitive, only sub menus Join, Join Favorites and any favorite rooms are made insensitive. Which means, if a user had no account set up then he can now click on the "Room" menu and his default empathy view would be somewhat like this (ignore the theme):

There will be a 'Save all' button functionality added to the debug window hopefully soon. The work on it was stalled due to some GTK bug yet unresolved. I created a standalone application to demonstrate it but that didn't seem to have caused much effect.

I hope I keep up to mark and create things that the open world would remarkably recognize and appreciate! I have a long way to go and this is only the first step. I have learnt a lot of things on my way to this first rung of my career and it was a wonderful experience.
Wondering how enthralling it's gonna be beyond this. :)

Saturday, November 13, 2010

My Hi to GNOME Planet dwellers!

Being here makes me feel that I really belong to an assorted group of really skilled and motivated group of individuals, all trying to contribute in their own special ways to make the world a little better, a little happier place for the rest!

I am Chandni, a recent grad from Dr. M.C, Saxena College of Engineering and Technology, Lucknow, India. I have a passion for finding an elegant solution for any kind of problem, be it in a physical form, puzzle-like or algorithmic thus developing in me hobbies like puzzle-solving and competing in algorithmic coding contests with other brains in the world.

I will be working on Empathy IM client under the expert guidance of Danielle Madeley. I owe a lot to Danielle, firstly for being such a kind heart and patient person as she is, for guiding me through my first commit and being there whenever needed (which was really difficult as this was my first contribution to open source I had never used a version controlling system before), and last but not the least, for informing me about the program and giving me the confidence to go for it!

Getting selected on such a prestigious platform was something unimaginable. Being here provides me a chance to touch the lives of so many dependents and admirers of the open-source desktop with my ideas and skills. I am proud of being a woman and being chosen here also gives me a chance to prove to the world that a female mind has abilities no less than anyone else in the world.

Lastly i'd like to thank all the Empathy folks for their help in both big and small ways and for their time they have invested on me. I'd like to get in touch with more of you while contributing on IRC.

Friday, November 12, 2010

My SSH key

I created a SSH key for authenticating me and establishing a secure connection between my pc and the project hosting server. Otherwise also, if your SSH servers are visible over the Internet, you should use public key authentication instead of passwords if at all possible!

I created a key pair using RSA public key cryptography algorithm using 3 simple commands on the terminal:

Note: The ssh-keygen command automatically creates ~/.ssh and assigns appropriate permissions to it, thus reducing the 3 commands to just 1. Thanks Marius for correcting.
ssh-keygen -t rsa
also, I for better security, I considered using
ssh-keygen -t rsa -b 4096 

Then I was asked for a filename and location and a pass-phrase after which it was done! :)


My public repository!

I learnt some GIT basics in this while. There are many books and tutorials available online for getting hands on with GIT. The GIT community book is what I found to be particularly powerful and easy-to-follow reference I would commend for all newbies.

I created my first SSH key and a public project to host branches of projects I'll work on.
Updated:
My Gnome work will be hosted on the glassrose-GNOME project on Gitorious.org and I'll push my Empathy WIP branches in the Empathy repository in this project. :)



Saturday, November 6, 2010

I'm a proud GNOME Intern now! hooray!

Hello everyone!

Yesterday night the results for GNOME internships 2010 were finally officially announced and I am in!! :)
The best Deepawali present ever. :) What occasion would have been more auspicious than this for the results to get declared!

Everyone was happy. My dad and my grandparents were more than elated as they wouldn't believe me before anything was up on notices! I received my family's blessings and applauses with heart full of gratitude as their belief in me was always intact and they gave me the freedom to pursue my dreams!

I planned a gift trip for mom and dad to Jim Corbett Wildlife Sanctuary on my expenses. I had heard them planning the visit along with their old friends sometime ago. ;)

I extend my thanks to all the empathy folks, particularly Danielle Madeley who supported and guided me all the way through! She's really talented! This wouldn't have been real had she not been there. Thanks again!

Featured Post

interviewBit Medium: Palindrome Partitioning II

Problem Name:  Palindrome Partitioning II Problem Description : https://www.interviewbit.com/problems/palindrome-partitioning-ii/ Problem Ap...