smc-fonts (Meera) updated

Meera is the default font for Malayalam in Fedora. Lately, a few bugs causing wrong rendering of some complex conjuncts were identified and reported – 1, 2.  There was another bug reported in RedHat bugzilla. As Unicode 5.1 is not supported by smc-fonts, glyph Ⓡ was being displayed for Atomic Chillu letters. To make the font Unicode complying, it was suggested to remove this.

Yesterday a new release of Meera fixing all these bugs was made available by Suresh, and I’ve uploaded a new upstream source file at Savannah repository. Then the RPMs were rebuilt for rawhide, which can be found here.

And the ChangeLog reads:

* The glyphs(an R inside a circle) at unallocated Unicode code points are removed.
* Wrong glyph for 'th1s1r3u1' (ത്സ്രു) fixed.
* Breaking up of conjunct 'l3k1k1' (ല്ക്ക) fixed.
* Shaping issues for 'r3cil'+'l3l3' (ര്‍ല്ല) context fixed.

Thanks to Suresh, Ani Peter, Santhosh Thottingal and Pravin Satpute !

Why doesn’t mget and mdelete play nice together?

One of my colleagues needed a shell script which should:

  1. connect to an external system via FTP
  2. change to a remote directory
  3. get all the files in the directory to local machine
  4. and delete all the files in the remote directory

The ftp commands mget and mdelete can be used to retrieve and delete multiple files respectively. And the code snippet would be:
do_ftp()
{
rm -f $FPTLOG
ftp -n -v <remote_host> <<FTP >$FTPLOG 2>&1
user <user> <password>
cd  $REMOTE_DIR
lcd $LOCAL_DIR
mget *.txt
mdelete *.txt
bye
FTP
}

This should do the job, right? Unfortunately it doesn’t. mget works, but the mdelete afterwards isn’t triggering at all when I checked vsftpd.log.

I managed to save the day by putting a harmless command in between (looks like they need a mediator!).

mget ZCNT_RECON_FBL1N_*.txt
ls         #Needed this for mdelete to work
mdelete ZCNT_RECON_FBL1N_*.txt

Geeks, any explanation on why this happens?

ExMan – the super simple personal expense manager

Being a bachelor; I stay with my long term (college) friends. When my colleagues get to know we all guys happily live together, most of the time I hear a “wow”. And we have a cook who prepares delicious food [most of the time ;-) ], and we have a lot of common expense together, plus occasional/frequent personal expense things.

And yes, I dislike “Accounting”, and I hate keeping track of pennies spilt here and there. At the end of the month, I usually am at a loss, and I don’t care too much either. But I know I had to bookkeep something, but I detest that old fashioned “double entry bookkeeping”. I don’t want to care what are my assets, what are my liabilities, what is the liquid cash I have, and where to debit/credit, general ledger, blah, blah…

And I’ve been using GNote, the note taking application, for the purpose. But it needed manual calculation in the end anyway.

Few days back I realized that I need something better as I don’t want to sum all those items, meanwhile exclude some personal expenses or money lent to some guy. And I decided that it’s time to create a shiny new, uber-simple expense manager (which knows only how to add and/or exclude some entries).

The design concerns, in the order of importance, were:

  1. Should be lightweight, and should consume less resources
  2. Minimal external dependency
  3. Maintainable, clean design and clean code

Which resulted in some of the design choices:

  1. No database backend, instead a simple file backing store. The file structure is very simple, hence items can be easily added/removed/modified with a text editor as well.
  2. Qt4 framework for development, which makes ExMan a cross platform application
  3. (At least close to) Model-View-Controller architecture

It was exciting to develop on Qt4 platform, QtCreator and QtAssistant are awesome. Had fun with Signals/Slots, QTableWidget, QCalendarWidget, setCheckedState, SelectionModel,… learn by exploring.

And, without further ado, I present to thee, ExMan, the super simple personal expense/accounting manager:

ExMan

The Monthly Amount shows the total of all expenses, and the Excluded Amount shows the total of items excluded (personal items and other things).

ExMan source tar ball and RPM are available in Sourceforge.net project page.

Meiga – lightweight and easy content server for desktop

Once in a while, I need to share files with other computers in the network. But I don’t do it every day, so I am reluctant to setup a 1)Web server, 2) Samba server, 3) NFS server. Most of the time, accessing a windows share in a Windows computer fails – I can meddle with the Samba/Firewall setup and troubleshoot, but it usually ends up in vain. Further, you need to be root to add folders as Samba shares. I usually do scp over the other GNU/Linux machines, or give the other Non-GNU/Linux guy a copy of pscp and ask him to do an scp.

Well, what about a naive user, who just wants to share his files to his buddy sitting next to him? There are not too many easy tools I knew of, so I decided to weigh my options. And I found these candidates:

1. Giver – a very intuitive, and easy file sharing tool. You can simply share the files with computers that have giver installed. See it in action here. The cons:

  • Dependency on Mono. I always purge Mono out of my installation.
  • Client side needs to install Giver.

2. iFolder. Again, Mono, and client-server.

3. Dropbox. Feature rich. Cons:

  • Need to have dropbox account, need internet connection.
  • Client side also needs to install it.

4. Meiga. Lightweight, easy to use content server for desktop. It uses a lightweight web server protocol with libsoup. As and when required, just fire it up, and add the folders you want to share. The best thing – no need to install anything on the client side – the shared files can be accessed using a web browser.

So I decided to try it out on Fedora 11. Unfortunately, the developer provided only .deb files for Debian/Ubuntu, and there was no source tar ball. But there was a git repository, which I cloned, and created source tar ball out of it. Meddled with it to figure out the correct way to build and to find the precise build requirements. Build is based on autotools, and intltool. Then created a SPEC file and built the RPM.

While testing, I found out that Meiga couldn’t find any internal IP address. Investigated a bit, but strace, dbus-monitor etc didn’t help much. Then I contacted Enrique, the upstream developer and over the past week, we brainstormed together. Meiga gets the internal IP from a utility shell script – “/usr/bin/fwlocalip“, which internally uses the “/sbin/ip” and a little sed and grep to chop it. The problem with Fedora was that “ip” is in “/sbin” instead of “/bin” as in Ubuntu, and the PATH setting was not correct. So now the script is fixed to have better PATH environment variable setting, and Meiga works like a charm. Meanwhile, I requested Enrique to produce source tar ball also, and he kindly did so.meiga

Just fire up Meiga as a normal user, add the folders you want to share, and give the link “http://<your_ip_address&gt;:8001/<Share>/” to your friend and tell him to access using a web browser. That’s it – oh, make sure your firewall allows incoming connection to port 8001: iptables -A INPUT -p tcp --dport 8001 -j ACCEPT

Now I’ve filed a review request in the RedHat bugzilla to include Meiga. Hopefully someone will review it and I’ll fix any issues present, and I look forward to get Meiga into Fedora packages. Meanwhile, you can find the RPMs here.

Fedora 11 Leonidas : Ironing out common glitches

The latest and greatest avatar of Fedora, codenamed Leonidas has been a pleasure to use. Both upgrading an existing installation and a reinstall worked pretty well. Installation time is also reduced a lot. But there are some bugs in Anaconda installer still.

What works out of the box

  • Intel KMS, rock solid Xorg 1.6, Improved boot time, shutdown time, and general performance, Presto (DeltaRPM) mainstream repositories, NetworkManager 0.7.1,… the list of features are impressive.
  • Kernel Mode Setting and UXA acceleration for Intel video driver works perfectly. And that makes compiz usable on my laptop – it doesn’t lockup the system as it did in Fedora 10. User switching also used to lockup the system in F10 update, but works perfectly in F11.
  • Switching over the input method from SCIM to IBus is painless – not even noticeable by a common user. Install ibus, ibus-libs, ibus-gtk and ibus-m17n (for Indic input methods).
  • System wide network connections can be edited, new connections can be added using NetworkManager.
  • RPM package management tool, YUM and PackageKit are much faster.

What doesn’t work out of the box (or need manual tweaking and HOWTO)

  • Synaptics touchpad driver is updated to 1.1.0 along with Xorg 1.6, which disables tapping (tap the touchpad to click) by default. I must state that I find it counter-intuitive to disable such a basic functionality by default. Most naive users just think that it is broken. Tapping can be enabled using the mouse properties or modifying the xorg.conf file or adding a .fdi file in /etc/had/fdi/policy/. The problem with the latter approaches : No xorg.conf file is needed by default, and I dislike adding xorg.conf file just-to-enable-tapping. Secondly, there’s no HAL fdi file present/used in Fedora 11 by default, .fdi files are XML format files, and there’s no easy documentation on how to created such a file for the purpose. I managed to do it with “System->Preferences->Hardware->Mouse“, but this setting is user specific – so, no tapping in GDM. Update: Copy the file /usr/share/hal/fdi/policy/20thirdparty/10-synaptics.fdi to /etc/hal/fdi/policy/ and edit it to have <merge key=”input.x11_options.TapButton1″ type=”string”>1</merge>. This will enable tap-to-click system wide.
  • Those who have modified the PAM files and used PreUpgrade or chosen to Upgrade the existing installation may find that Gnome Screensaver doesn’t lock the screen even though it is told to do so. Move the .rpmnew files in the /etc/pam.d/ files to corresponding original files – Gnome Screensaver should behave well.
  • Folders are opened in new windows by default in GNOME. By the time you open a file inside 5 levels of directories, desktop is full of windows, and you have to close them individually! This have been the default behaviour of Nautilus for a long time, and the first thing I do after every installation is to change that by choosing “Edit->Preferences->Behaviour(tab)” and check “Always open in browser windows” in Nautilus file manager. Every other distribution I have seen has chosen this as default mode.
  • The “System->Preferences” menu in GNOME is a now single long list. To revert this to earlier grouped menu, install the package “preferences-menus“.
  • Blueman is not yet included in Fedora repositories. Juan is working hard to get this done. Meanwhile he has kindly sent me the RPM for Fedora 11 and it is working great.
  • GNote, the replacement for Tomboy note-taking application doesn’t autostart very well. Yet to find a resolution. [Update : Work around is to add GNote to GNOME panel. Thanks, Rahul!]

Conclusion

Despite some minor issues, Fedora 11, Leonidas, just rocks. Definitely the most stable, feature rich and innovative release by far.

Ext3 ‘data=guarded’ mode coming for Linux kernel 2.6.30?

In the light of recent “Ext3 fsync” problem related discussions happened in the Linux Kernel mailing list involving many experts in the field, there has been quite a few improvements. There were some patches from Theodore T’so – the Ext4 maintainer, Jens Axboe – the block layer maintainer, Chris Mason – the Btrfs developer et al. An overview of the discussion can be found at LWN.net, here.

Ext3 filesystem by default mounts the disk in a “data=ordered” mode. It basically means, the actual data will be written on the disk before the metadata is written on the disk. But this causes long delays while using the “fsync()” system call. An improvement suggested usually is to change the mount option to “data=writeback“. Whenever I install a Fedora system, one of the first things I used to speedup the file operations is to change the Ext3 mount option to “writeback“. But it has its own share of problems too. After a crash, it is very likely to have corrupted data than in “ordered” mode. Risking the data integrity for performance, I myself ran into issues – sometimes system used to lock up when I use a composite manager like Compiz or Kwin, and I will have to use Alt-SysRq to reboot. After the crash, while logging back, some of the GNOME settings would be lost or slightly corrupted.

Well, Chris Mason has proposed another mode, which can be enabled by a new mount option called “data=guarded” which takes care of most of the issues with performance and data integrity. The version 3 of the patchset has been posted yesterday. And it looks very probable that Linus will pull it for inclusion into kernel 2.6.30, which is in the rc2 state now.

Update: The first 2 patches in the patch series (of 3 patches), which are adding infrastructure for the “data=guarded” mode has been merged by Linus. The 3rd patch which adds the functionality has been tested by Mike Galbraith and found issue of data corruption, for which the root cause was quickly found by Chris Mason and fixed.

Kuttans – another frontend for Payyans

Few months ago I released Chathans, a frontend to the Payyans ASCII <=> Unicode converter. Few weeks later, Santhosh forwarded a mail from Rahul with another neat implementation of a frontend completely written in Qt4. He named it Kuttans as a pun on Qt+Payyans.

I liked the User Interface at the first look. But it was using “system()” call to interact with Payyans. So we decided to reimplement it in PyQt4. Based on the UI designed in Qt Creator, the python ui class is generated with pyuic4; and the resources (icons…) with pyrcc4 (both from the PyQt4-devel) package.

Features include:

  • Support for Creating, Displaying, Editing and Saving ASCII/Unicode files
  • Support for all available fonts. Useful in determining the ASCII font if the font is not known for original ASCII document
  • All the standard Cut/Copy/Paste/Undo/Redo functionalities

kuttans

RPM package and source tar ball can be obtained from Savannah repository. Source can be browsed in Savannah git repo.

Future improvements:

  • Support for displaying PDF files (using python bindings for poppler-qt4)
  • .deb package for Debian/Ubuntu