For our luges
(Linux User Group Esslingen) meeting in August I am proposing
a location change. Instead of our usual meeting place I say we should meet at
the Alte Wache to avoid the OpenAir
Cinema in Esslingen. As the new location is not in Esslingen but in Ostfildern
we probably need to rename our meeting (only for this time) from luges to
lugos (Linux User Group Ostfildern).
Monthly Archive for July, 2007
It really happened. There is a new release of kover available.
This should fix bug #241013
and therefore I have also updated the version available in rawhide.
I have removed most (probably all) of the self written code to access
the CD drive and replaced it with libcdio.
Same has happened with my CDDB code (libcddb).
This leaves now only the core functionality and this are the parts which are
still buggy. The fonts on the screen always appear a bit bigger than when
printed out and the quality of the printed pictures is really horrible. This is due to
the fact that kover still uses old QT1 interfaces which are deprecated but
unfortunately I am not very good at QT and do not know how to do it
correctly. As I have no color printer I only print out text covers and therefore
I do not really care about the picture quality.
As I wanted to make a new kover release I thought I could try to move my code to git. The first step was to copy the code from cvs to a local git repository:
- git-cvsimport -i -v -d :pserver:adrian@cvs:/cvs/kover -C kover.git kover
I was a bit surprised that the newly created directory kover.git was empty except for a .git directory. Without much knowing what I was doing I typed git-checkout and it listed all available files but my directory was still empty. So I tried git-checkout .. This time there was no output but all my files were now in my directory so that I could start doing changes.
Committing, adding and removing files is easy and works just like expected (git-commit, git-add, git-rm). The steps to publish the git repository, however, were not as easy. The following commands were necessary to make it work for me:
-
git clone --bare . git
-
touch git/git-daemon-export-ok
-
cd git/
-
git --bare update-server-info
-
chmod a+x hooks/post-update
or with newer versions of git the following mv instead of the chmod
-
mv hooks/post-update.sample hooks/post-update
-
cd ..
-
rsync -avP -e "ssh" git/ lisas.de:/var/www/html/kover/git
From this point on it was now possible to access the repository through http with git clone http://lisas.de/kover/git. To push my changes to the repository on the server I use git-push lisas.de:/var/www/html/kover/git master. It was necessary to install git-core on the server so that git-push would work without errors. To pull changes from the online repository I use git-pull http://lisas.de/kover/git master.
There is probably no real reason to use git because up until now kover was mainly developed by me and it will therefore not profit from the distributed features which are the main advantages from git but I wanted to play with the same toys as all the cool kids
.
I used to maintain kover. Kover is (judged by today’s standards) a pretty bad designed and buggy little application. So after three years I finally did some changes to the codebase and I also wanted to update the spec file for correct mime types et cetera. But this was not as easy as it seemed to be.
I wanted to be able to double click on saved files (.kover) to start the application and they should also display the correct icon. The source code of kover used to include all the necessary files for these functionalities but all this has changed quite a bit and as the file is in XML format it was always opened by gedit. I read the definition at freedesktop.org about Shared MIME-info Database but as I do not really have a clue about this stuff I was rather looking for some examples. I looked at the sources of audacity and created then the file kover.xml with following content in /usr/share/mime/packages:
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-kover">
<sub-class-of type="text/xml"/>
<comment>Kover - CD Cover Printer</comment>
<glob pattern="*.kover"/>
</mime-type>
</mime-info>
After running update-mime-database /usr/share/mime, a double click in nautilus on a .kover file opened kover with the correct file. The icon, however, was still not correct. Nautilus was just displaying a preview of the XML content.
To figure out how to get nautilus to display the correct icon was the hard part. After some (more than usual) use of Google I tried to create a file called application-x-kover.png in /usr/share/icons/hicolor/48x48/mimetypes but nautilus still did only the preview of the XML data. Then I remembered I have to run gtk-update-icon-cache /usr/share/icons/hicolor; but still no icon.
After some more trying I ran touch --no-create /usr/share/icons/hicolor before gtk-update-icon-cache and I finally had the icon I wanted. So it is not as complicated as I first feared but it took me a while to find out. All you have to do is:
- create file kover.xml in /usr/share/mime/packages
- copy icon application-x-kover.png to
/usr/share/icons/hicolor/48x48/mimetypes - update-mime-database /usr/share/mime
- touch --no-create /usr/share/icons/hicolor
- gtk-update-icon-cache /usr/share/icons/hicolor