Archives de catégorie : Linux

Kubuntu 15.04: really full of bugs

I upgraded from Kubuntu from 14.04 to 15.04 (in order to get MTP support for my phone), and unfortunately it is really beta quality.

  • My settings from the previous version of KDE were not migrated.
  • When opening a session, some programs are not restored (ex: Konsole). Super annoying.
  • And also some windows are restore under my bottom bar.
  • I get prompted to install Flash at each session.
  • The auto-execution of programs at the session opening now only works for « programs » (having an associated « .desktop » file), not for shell scripts (though the configuration interface still allows adding such scripts). The list of the auto-executed programs is now located in « ~/.config/autostart » (and not anymore in « ~/.kde/Autstart »).
  • Why is there two distinct directories for the thumbnails (~/.thumbnails and ~/
    .cache/thumbnails) ?
  • The only way to add a program to a panel is by browsing the program hierarchy via the program menu widget (on the same panel). Searching a program by name will not allow you to add a program. Neither will the application launcher widget.
  • In order to associate a keyboard short-cut to Klipper, I need two icons of Klipper in my bar.

I also noticed that the « open file » dialog boxes (in particular the one for choosing a wallpaper image) does not display preview images larger than 5 Mo (default limit). If you want to choose a photo taken with your DSLR it can be annoying. There is no global way to change this settings. To change it for a given application, open or create the configuration file « ~/.config/APPNAMErc » (for Kate: ~/.config/katerc ; for everything related to the desktop: ~/.config/plasmashellrc), and make sure the following section is present.

[PreviewSettings]
MaximumRemoteSize=0
MaximumSize=50000000
UseFileThumbnails=true

« MaximumSize » is the maximal size of the files. In this example: 50Mo.

My recommendation: if you want stability and the current version is satisfying for you, do not migrate.

cgroups script for the current session

In Linux, cgroups (a kernel feature) allows to limit the resources (cpu, memory…) accessible to a group of processes. I have written a little bash script that will either:

  • create some groups for the current user session and assign some restrictions. No need to be root or to modify a global configuration file. Call it when your desktop session starts (for example by putting an entry in «~/.kde/Autostart»). Edit the script to create your own groups.
  • start a process in one of theses groups

The main reason was that I encountered a bug with Firefox and Google+, with triggered infinite memory allocation, which freezes my machine for a few minutes (because of the trashing). I hope that it will allow me to kill the process/close the tabs if it happens again.
Continuer la lecture

Ubuntu 14.04 : autojump is broken

In Ubuntu 14.04, the provided autojump does not allow to choose between several matches because of a bug. How to fix that (as suggested in the bug report):

  • download a recent version, unzip, do «bash install.sh» and update your .bashrc to point on this install
  • in ~/.autojump/etc/profile.d/autojump.bash, remove the argument «–bash» (twice)
comps=$(autojump --bash --complete $cur)

Migration vers Kubuntu 14.04

Après une longue série de mises à jour, j’ai passé le pas: je suis reparti sur une nouvelle installation. Plus le temps passait, plus je rencontrais de bugs. Tous les scripts de mise à jour ne se passent pas toujours bien, et la maintenance prenait de plus en plus de temps.

Donc globalement ça c’est très bien passé:

  • J’ai créé dans mon LVM des nouvelles partitions pour /, /usr et /var, ainsi qu’une nouvelle partition pour /boot en dehors du LVM. Comme ça je peux manuellement migrer mes anciennes configurations ou données systèmes.
  • À l’installation, j’ai dû tuer le process «apt» qui essayait de télécharger des mises à jour (sans ça, la progression de l’installation ne dépassait pas les 10%).
  • J’ai gardé mon /home et ma partition de données
  • L’installation dans la config système KDE du support du japonais m’a automatiquement installé ibus et anthy (il fallait le faire à la main avant, je crois).
  • J’ai pu réinstaller sans problème mes anciennes applications. Le système se comporte au moins aussi bien qu’auparavant (à part le nouveau système d’indexation «baloo» que j’ai désactivé).
  • La migration de ma DB MySQL (simple copie des fichiers) s’est bien passée.
  • Point noir: certains des paquets pour le support des applications 32 bits sur un système 64 bits ont disparus, notamment libXrender. Plus moyen d’utiliser mon Firefox 32 bits!

C’est un succès, pourvu que ça dure.

 

KDE et japonais: démarrer ibus automatiquement

Mise à jour: Article pour Kubuntu 16.04

Avec les versions récentes de (K)ubuntu, le système pour gérer les méthodes d’entrée (pour basculer au japonais) est maintenant «ibus» (et plus «scim»). Récemment, il a chez moi arrêté de fonctionner. Voilà ce que j’ai dû faire.

  • j’ai supprimé «im-switch» (si je l’avais)
  • installé «im-config»
  • supprimé dans mes fichiers «.bashrc» et «.bash_profile» les variables d’environnement référençant «ibus» (XMODIFIERS, GTK_IM_MODULE et QT_IM_MODULE).
  • j’ai exécuté «im-config» et choisi «ibus». Il va créer un fichier «~/.inputrc», qui va contenir le nom de la méthode d’entrée, paramètre qui sera pris en compte au démarrage de la session utilisateur.

C’est plus propre que de lancer explicitement «ibus-daemon -d» via les scripts de démarrage de KDE. Mais c’est bizarre que KDE/Kubuntu ne propose pas dans son panneau de config d’utiliser ibus…

 

One-liner: espace-disque occupé par extension de fichier

Un petit one-liner pour avoir l’espace-disque occupé par extension de fichier. Ne marche peut-être pas avec les fichiers dont le nom a un espace.

find . -type f -printf "%s %f\n" | 
awk '{sub(/.*\./,"", $2);st[$2] += $1} END{for(key in st){print key, st[key]/1000000}}' |
sort -n -k2

O-Droid X2: some Ubuntu benchmarks

Power consumption:

  • Boot: 16 watts
  • Doing about nothing: 10 watts (I hoped it would be more like 6W)

Read/Write on the 64Go eMMC card (1Go file). Access on my PC SSD card reader:

  • read: 18.5Mo/s
  • write: 9.5Mo/s

Read/Write on the 64Go eMMC card (1Go file), plugged on the Odroid:

  • read: 47Mo/s
  • write: 30Mo/s

Some processor tests. Bad surprise, Firefox is slower than on my Nexus 10. Maybe the ARM «desktop» version of Firefox is not as optimized than the Android one.

Mp3 compression with Lame:

  • AMD Athlon II X4 620: 13s
  • ODroid X2: 35s (x2.7)

Firefox 21, Sunspider 1.0:

  • AMD Athlon II X4 620: 318ms
  • ODroid X2: 868ms (x2.7)
  • Nexus 10: 761ms (x2.4)

Firefox 21, Kraken 1.1:

  • AMD Athlon II X4 620: 4277ms
  • ODroid X2: 14871ms (x3.5)
  • Nexus 10: 9316ms (x2.2)

Chromium 25, Sunspider 1.0:

  • AMD Athlon II X4 620: 370ms
  • ODroid X2: 950ms (x2.5)

Chromium 25, Kraken 1.1:

  • AMD Athlon II X4 620: 4049ms
  • ODroid X2: 12764ms (x3.1)