Mi blog lah! Το ιστολόγιό μου

22Jun/090

From new user to kernel compilation to upstream fix

It is quite exciting when helping new users solve issues while migrating to the Linux operating system, and Ubuntu Linux in this case.

A couple of weeks ago, a new member at the Ubuntu-gr forum posted a question about a sound problem in an Ubuntu Linux installation.

Alsa Mixer

Alsa Mixer

Here is the timeline

  1. An initial post was made with the relevant hardware information.
  2. More information was gathered that led to the PCI ID and subsystem ID of the sound card, which further led to the source of a patch for a quirk.
  3. The advice to recompile the full kernel (with the patch) was given. This process required over 10GB, which caused the distribution to crash. The user was fine to reinstall.
  4. A subsequent route was taken to simply compile Alsa (not the full kernel) and add the patch.
  5. This route was successful and the sound was now working.
  6. We want to post this patch upstream so that newer versions of the kernel contain the fix. In addition, all distributions will benefit as well.
  7. A bug report was submitted to the Alsa bugtracking #0004561. We now wait.
  8. Days are passing with no progress. A question at #alsa (Freenode) shows that the Alsa bugtracking is probably not used, so there is need to contact the developers through the mailing list.
  9. An e-mail is sent to the Alsa mailing list with the patch. The Alsa developer takes the patch and applies to his tree. We missed by several days the release of Linux 2.6.30; the patch should appear in 2.6.31.

The whole process took ten days. It is amazing how rewarding it is to follow the open-source processes and contribute the personal time to help make open-source better.

The patch was evidently elemental, however it required new testing to make sure it works, and that it applies to the current state of Alsa. There are many areas that you can contribute some of your time to make open-source better.

I would like to thank Theodora for going through the process, locating and verifying the patch, so that now it is pending inclusion in Linux 2.6.31.

Update 22Apr 2010: The change has been added to the Linux kernel :-) . It's a tiny small change that anyone can do.

http://upload.wikimedia.org/wikipedia/commons/thumb/7/78/Alsa_v1.0.14_ubuntu7.1_en.png/220px-Alsa_v1.0.14_ubuntu7.1_en.png
2May/081

Εγκατάσταση του Ubuntu 8.04

Ολοκλήρωσα πριν λίγο την εγκατάσταση του Ubuntu 8.04 (έκδοση 64bit). Περιγράφω παρακάτω τις επιλογές που έκανα και τα τυχόν προβλήματα που αντιμετώπισα.
Αν και είχα Ubuntu 7.10, επέλεξα να κάνω εγκατάσταση από την αρχή, διότι έχω κάνει τόσες αλλαγές στο σύστημα που είναι πολύ πιθανό η αναβάθμιση να μη λειτουργήσει. Ωστόσο, ο πιο σημαντικός λόγος της εγκατάστασης ξανά είναι να γλιτώσω από τη σαβούρα που μαζεύεται στην εγκατάσταση μετά από χρήση πολλών μηνών.
Έκανα λοιπόν εκκίνηση του υπολογιστή μου από το DVD του Ubuntu 8.04 (64bit), και εκτέλεσα το Σύστημα/Διαχείριση συστήματος/Partition editor. Εδώ, επέλεξα να κρατήσω αντίγραφο ασφαλείας της κατάτμησης / σε εξωτερικό δίσκο, σε περίπτωση που χρειαστώ να γυρίσω ξανά πίσω στο 7.10. Αυτό βοηθάει ακόμα για να δω λεπτομέρειες από την προηγούμενη εγκατάσταση, που πολύ πιθανό να χρειαστώ. Αργότερα είδα ότι το Ubuntu 8.04 κατάλαβε ότι υπάρχει εγκατάσταση 7.10 και την έβαλε στο μενού της εκκίνησης του υπολογιστή. Έτσι, έχω την επιλογή να μπω σε 7.10 πολύ εύκολα, με εκκίνηση στον εξωτερικό δίσκο USB.
Αυτό το καιρό έχω δύο κατατμήσεις, μια για το / και μια για /home. Έτσι, επέλεξα κατά την εγκατάσταση να μορφοποιηθεί η κατάτμηση για το /, ενώ να διατηρηθεί ως έχει το /home. Ακόμα, μιας και θέλω να ξεκαθαρίσω τα αρχεία μου στον κατάλογο χρήστη, επέλεξα διαφορετικό όνομα χρήστη. Έτσι, μετά το τέλος της εγκατάστασης έχω ένα καθαρό λογιαριασμό, και είμαι σε θέση να μεταφέρω (mv) καταλόγους ρυθμίσεων και αρχεία από τον παλαιό κατάλογο χρήστη κατά βούληση.
Με αυτό το τρόπο, πέρασα την αλληλογραφία μου με την εντολή
mv /home/oldaccount/.mozilla-thunderbird ~
Με τον ίδιο τρόπο μετέφερα το προφίλ μου για το Firefox. Πριν είχα Firefox 2.0, και στην μεταφορά έγινε ενημέρωση του προφίλ για το Firefox 3 του Ubuntu 8.04. Φυσικά ο Firefox πετάει αλλά αυτό το έχετε ακούσει από παντού.
Μετά εγκατέστησα το VirtualBox (πλήρη έκδοση, με υποστήριξη USB). Η βασική εγκατάσταση και χρήση μπορεί να γίνει εξ ολοκλήρου από το γραφικό περιβάλλον, και έτσι το έκανα. Κάνουμε τη λήψη του .deb (για τώρα επιλέγουμε την έκδοση για gutsy), και από την επιφάνεια εργασίας κάνουμε διπλό κλικ για να εγκατασταθεί το πακέτο. Μόλις ενημερωθεί το virtualbox.org με το νέο αποθετήριο για το Ubuntu 8.04, τότε μπορούμε να αποφύγουμε τη διαδικασία αυτή με προσθήκη του virtualbox στους τρίτους κατασκευαστές (third party), στις πηγές λογισμικού του Ubuntu Linux.
Χρειάζεται να προσθέσουμε τους χρήστες του συστήματός μας στην ομάδα vboxusers (γίνεται από το Σύστημα/Διαχείριση/Χρήστες και ομάδες) και μετά αποσύνδεση και σύνδεση ξανά.
Για να ενεργοποιήσουμε την υποστήριξη USB, χρειάζεται να περάσουμε στο τερματικό και να κάνουμε τις απαραίτητες τροποποιήσεις για τα αρχεία /etc/init.d/mountdevsusbfs.sh, /etc/init.d/mountkernfs.sh και /etc/fstab (τα δύο τελευταία είναι για ενεργοποίηση συσκευών όπως εξωτερικοί δίσκοι USB και άλλες πολλές συσκευές). Μετά θέλει επανεκκίνηση του συστήματος.
Η εγκατάσταση του Skype 2.0 σε 64-bit είναι γενικά μπελάς. Αυτό που έκανα είναι να προσθέσω το αποθετήριο medibuntu στις πηγές λογισμικού, τρίτους κατασκευαστές, και μετά να βάλω το πακέτο Skype. Κανένα πρόβλημα.
Εγκατέστησα και το Google Earth από το medibuntu, αλλά τίποτα άλλο. Είδα τα υπόλοιπα πακέτα του medibuntu, και αποφάσισα να απενεργοποιήσω για τώρα το αποθετήριο αυτό.
Ένα σημαντικό που δε δούλεψε με τη μια είναι ο ήχος. Διαβάζοντας από εδώ και εκεί, είδα αναφορές για λήψη του πηγαίου κώδικα της Alsa και μεταγλώττιση ξανά. Αυτό το πράγμα χρειαζόταν για το Ubuntu 7.10, ωστόσο ήμουν σίγουρος ότι δεν χρειάζεται πλέον για την κάρτα μου (snd-hda-intel). Με λίγο ψάξιμο είδα ότι απλά χρειάζεται να προστεθεί στο /etc/modprobe.d/alsa-base η γραμμή
options snd-hda-intel model=lenovo
και μετά επανεκκίνηση. Αυτό ήταν.
Αντίθετα με ότι κάνουν άλλοι χρήστες, προσωπικά δε θα βάλω χύμα κόντεκ για τις διάφορες μορφές πολυμέσων. Με χρήση των εφαρμογών Αναπαραγωγής ήχου και βίντεο, το σύστημα προτρέπει κάθε φορά να γίνει εγκατάσταση των απαιτούμενων πακέτων, αυτόματα.

Κοιτώντας την γενική υποστήριξη ελληνικών στο Ubuntu 8.04, πρέπει να πω ότι είναι αρκετά ευχαριστημένος. Έχει γίνει σημαντική δουλειά σε κάθε σημείο, από την αρχική οθόνη που ξεκινά ο υπολογιστής με το CD/DVD του Ubuntu μέχρι την επιφάνεια εργασίας. Στην οθόνη εκκίνησης έχουμε όλα (σχεδόν!) τα μηνύματα στα ελληνικά, εκτός από δύο (π.χ. Test memory, ήμουν σίγουρος ότι το έλεγξα αυτό αλλά δεν μπήκε στην τελική έκδοση!).
Στα παιχνίδια του Ubuntu, λάβαμε την απόφαση να έχουμε τα ονόματα στα ελληνικά (έτσι, Τετραβέξ αντί Tetravex). Αυτό είναι καλό μιας και τα παιδιά και οι δημόσιοι υπάλληλοι θα παίζουν αποκλειστικά τα παιχνίδια. Αφού και ο db0 δεν χρησιμοποιεί το ελληνικό περιβάλλον, δεν θα υπάρχει σχόλιο ούτε από την πλευρά του. Πάντως, αυτό που συνέβει είναι δύο παιχνίδια βγήκαν αμετάφραστα (Same GNOME, Gnometris) που χαλάνε κάπως τη λίστα, και θα διορθωθούν σε επόμενη έκδοση.
Στη μικροεφαρμογή του ρολογιού είναι δυνατόν να βάλει κάποιος την πόλη του, και το σύστημα θα δείξει την ώρα και τις καιρικές συνθήκες. Δοκιμάστε με πόλεις όπως Θεσσαλονίκη, Καβάλα, Ρόδος, Χανιά, κτλ.
Μιας ακόμα αλλαγή είναι στη συντόμευση για την ελληνική γλώσσα, στην μικροεφαρμογή για την ένδειξη πληκτρολογίου. Τώρα βάλαμε ΕΛΛ (για Ελλάδα), αντί του προηγούμενου Ελλ. Έτσι, συμβαδίζει με το αμερικάνικο πληκτρολόγιο και την ένδειξη ΗΠΑ. Σε επόμενη έκδοση του Ubuntu θα δείχει ΑΓΓ για κάθε αγγλική διάταξη πληκτρολογίου, και αυτό θα γίνει στο πακέτο μετάφρασης για την ελληνική γλώσσα.
Ενημέρωση #1: Ένα πρόβλημα που αντιμετώπισα στην αρχή ήταν η κάρτα γραφικών. Δεν ήταν ζήτημα με τη βασική υποστήριξη της καρτάς γραφικών. Μιας και έχω κάρτα γραφικών Intel, το σύστημα ενεργοποίησε από τη πρώτη στιγμή ακόμα και 3D. Το ζήτημα είχε να κάνει με τη χρήση της εκτεταμμένης επιφάνειας εργασίας (dual head). Για τη χρήση δύο οθονών έπρεπε να επέμβω με το χέρι στο αρχείο ρυθμίσεων /etc/X11/xorg.conf και να καθορίσω το μέγεθος της ιδεατής (Virtual) οθόνης. Δεν κατάφερα να βρω τρόπο για να κάνω το ίδιο πράγμα χωρίς να μπω σε τερματικό.

18Feb/084

Create flash videos of your desktop with recordmydesktop

John Varouhakis is the author of recordmydesktop and gtk-recordmydesktop (front-end) which is a tool to help you record a session on your Linux desktop and save it to a Flash video (.flv).

To install, click on System/Administration/Synaptic Package Manager, and search for gtk-recordmydesktop. Install it. Then, the application is available from Applications/Sound&Video/gtkRecordMyDesktop.

Screenshot of gtk-recordmydesktop

Before you are ready to capture your Flash video, you need to select the video area. There are several ways to do this; the most common is to click on Select Window, then click on the Window you want to record. A common mistake is that people try to select the window from the preview above. If you do that, when you would have selected the recorder itself to make a video of, which is not really useful. You need to click on the real window in order to select it; then, in the desktop preview you can see the selected window. In the above case, I selected the OpenOffice Writer window.

Assuming that you do not need to do any further customisation, you can simple press Record to start recording. Generally, it is good to check the recording settings using the GNOME Sound recorder beforehand. While recording, you can notice a special icon on the top panel. This is gtk-recordmydesktop. Once you press it, recording stops and the program will do the post-processing of the recording. The resulting file goes into your home folder, and has the extension .ogv.

Some common pitfalls include

  • I did not manage to get audio recording to work well for my system; I had to disable libasound so that the audio recording would not skip. With ALSA, sound skips while with OSS emulation it does not. Weird. Does it work for you?
  •  The post-processing of the recording takes some time. If you have a long recording, it may take some time to show that it makes progress, so you might think it crashed. Have patience.

I had made one such recording, which can be found at the Greek OLPC mailing list. John told me that the audio part of the video was not loud enough, and one can use extra post-processing to make it sound better. For example, one could extract the audio stream of the video, remove the noise, beautify (how?) and then add back to the video.

It's good to try out gtk-recordmydesktop, even for a small recording. Do you have some cool tips from your Linux desktop that you want to share? Record your desktop!

9Jan/072

Translating the OLPC

In a previous post, we covered how to install fonts and enabling writing support on the OLPC. The OLPC contains a limited number of applications that are available to be translated. These applications include

  1. NetworkManager, part of the GNOME project (HEAD, extras)
  2. alsa-utils, ???
  3. aspell, external
  4. atk10, part of the GNOME project (GNOME 2.18, developer)
  5. chkconfig, part of the Fedora Project
  6. diffutils, external
  7. glib20, part of the GNOME project (GNOME 2.18, developer)
  8. gst-plugins-base-0.10, external
  9. gst-plugins-good-0.10, external
  10. gstreamer-0.10, external
  11. gtk20-properties, part of the GNOME project (GNOME 2.18, developer)
  12. gtk20, part of the GNOME project (GNOME 2.18, developer)
  13. hal, external
  14. initscripts, part of the Fedora Project
  15. libc, part of the Translation Project (reduced version?)
  16. libuser, part of the Fedora Project
  17. libwnck, part of the GNOME Project (GNOME 2.18, desktop)
  18. stardict, external
  19. vte, part of the GNOME Project (GNOME 2.18, desktop)
  20. wget, part of the Translation Project

The links provided point to the latest available version. The versions that the OLPC using are not the latest with the upstream project, therefore keep in mind that the translated files may differ. It would be good to establish the exact .PO files from the OLPC project (URL to source?).

   

Switch to our mobile site