Choses relatives à l'informatique : non-amateurs s'abstenir ;)

Fil des billets - Fil des commentaires

mercredi, décembre 10 2014

Réparé les hauts-parleurs d'un portable HP dv6000 en échangeant deux nappes internes

Les hauts-parleurs internes du portable HP de mes parents, un dv6000, ne marchaient plus : plus de son sans devoir mettre des enceintes ou un casque :-(

En fait, il semble que ce soit un problème classique, qui semble causé par des nappes de connexion internes deffectueuses.

La réparation n'est pas trop compliquée, si on achète une nappe de remplacement, mais on peut aussi trouver un contournement.

J'ai réussi à échanger les deux nappes qui connectent la carte mère à la partie qui contient les boutons et les hauts-parleurs, au dessus du clavier, et même si maintenant, les boutons de cette rangée supérieure ne marchent plus, ce n'est pas trop grave, car le son est revenu.

Pour voir une vidéo (en anglais) qui explique comment faire, voir : Hp Pavilion Dv6000 power button and speaker fix!

Content d'avoir récupéré le son :-)

dimanche, décembre 29 2013

Touchpad side scrolling enabling in gnome flashback

For whatever reason, the touchpad right edge would no longer allow me to do scrolling (like the usual middle wheel on the mouse) under the gnome flashback session in Debian testing.

Here's a way to make it work : .

This post provides a more elaborate script : reusing an example script (in Debian, in /usr/share/doc/gnome-settings-daemon/examples/, but attention: it may be invoked twice, if like on my system, once for an "AlpsPS/2 ALPS GlidePoint" and then for a "PS/2 Mouse", but resetting the VertEdgeScroll to 0 in between.

So the script looks like that on my system, now :

 if [ "$device" = "AlpsPS/2 ALPS GlidePoint" -o "$device" = "PS/2 Mouse" ]; then
        synclient VertEdgeScroll=1

I guess there's some kind of a bug here... but the gnome session is a hell when needing to spot the culprit package to report to, so for once, I'll let reportbug quiet.

Hope this helps

Update: this unfortunately doesn't seem to work on initial session start :-/

mercredi, janvier 16 2013

Scheduling appointments with capture template from org-agenda view

I've been frustrated by my inability to schedule appointments directly from the org-agenda view, for quite some time, but I think I've found a way.

If like me you're using org-mode to manage your appointments, you're probably using SCHEDULED TODO items that can be entered in your system using org-capture templates.

A typical scenario is I'm asked by a colleague (face to face or on the phone) when I'm available to schedule a meeting or some other activity. I'm then firing an agenda view, and browse through the dates available... then agreeing on an empty slot, I'm capturing the meeting... but then I have to C-c C-s to add the SCHEDULED marker and set the correct date, although I was previously on that exact date in the org-agenda view :-/

The solution seems to be with the 'k c' command, i.e. the capture org-agenda-action in the agenda view. From the docs :

k runs the command org-agenda-action, which is an interactive compiled
c     Call `org-capture' with cursor date as the default date

Exactly what I need : it will prompt me for a capture template, which I just have to set to a template containing "SCHEDULED: %t".

Excerpt from my .emacs :

'(org-capture-templates (quote (("t" "Todo" entry (file+headline "~/org/" "TACHES") "* TODO %^{Brief description} %^g
    Added: %U
%a") ("n" "Notes" entry (file+datetree "~/org/") "* %^{topic} %T %^g
%a") ("d" "Scheduled appointment" entry (file+headline "~/org/" "TACHES") "* TODO %^{Brief description} %^g

Tadaaa ! it works :-)

dimanche, novembre 28 2010

Monitoring remote storage quota with munin

I'm using's networked storage for my duplicity backups (operated with backupninja). uses quotas to limit each user's storage space. As I'm using munin to monitor my local machines, including their disks capacity, I wanted to include a similar graphing for the quota too.

Here's a very basic munin plugin to be installed as /etc/munin/plugins/rsyncnetquota to be able to graph the output of the quota command :



quota=`ssh $user@$host quota | grep -e '^ */' | sed 's/^ *//g'`
current=`echo $quota | cut -d ' ' -f 2 | sed 's/\*$//'`
quota=`echo $quota | cut -d ' ' -f 3`

case $1 in
	echo "graph_title quota for $user (quota : $quota)"
	cat <<"EOM"
graph_vlabel quota
quota.label quota
echo "quota.warning $warning"
echo "quota.critical $critical"
#graph_args --base 1000

        exit 0;;

echo -n "quota.value "
let current=$current*1024
echo $current

In my case, I want to have a warning alert at 80% and a critical message at 95%. Note that you may prefer adding constants here instead of issueing 2 ssh connections, one for the execution with parameter 'config' and one for the real value collection.

The script should be run as a user (here, root) which is allowed to execute password-less ssh onto the remote account (ssh public keys, etc.), so a corresponding configuration should be added to /etc/munin/plugin-conf.d/munin-node in the form of :

user root

mercredi, mars 3 2010

Restoring duplicity backups with different debian distro : attention to incompatible versions

I've recently had to test my backupninja + duplicity backups (yes, I think I haven't blogged about backups since I described my previous setup which used amanda).

The zonbu PC that managed the backup disks target of duplicity, which was running Debian stable has died.

I tried and restore the contents of its system (to have a look on the config files I had setup there) on a Debian testing system, using the same duplicity commandline (more or less).

However, I couldn't do that, since apparently, duplicity in Debian stable (0.4.11) and testing (0.6.06) don't seem to be exactly compatible.

I managed to restore anyway by reinstalling duplicity 0.4.11 in a custom prefix setup, which worked fine. The command-line then goes something like this (excerpt from the tarball's README) :

python install --prefix=/usr/local
PYTHONPATH='/usr/local/lib/python2.x/site-packages/' /usr/local/bin/duplicity -V

I've traced this problem in Debian BTS (#572102), as I'm afraid of the consequences when people will try and restore on the next stable distro backups made with the previous stable...

You've been warned anyway ;)

Measuring OpenMoko FreeRunner battery life with SHR-T

I've tried and apply the technique shown in Measuring Freerunner battery life for my FreeRunner which runs SHR-T.

Unfortunately, I couldn't recompile the wkalrm program on the freerunner (problems of compilation chain, I think). So I decided to use atd to insert an at command which would wake up the FR... but that isn't exactly easy since no at command seems packaged for the atd-over-fso that comes with SHR-T (actually, there's an at script provided in the initial atd version it was based on).

Thanks to help provided on the SHR ML, I've written this short resume-at shell script that can be used to insert an at command/script that will wake up the FR after a certain amount of minutes :


# Will program an at job that will just execute in some number of minutes (passed in args)
# This script will do nothing, but can be interesting to wakeup the machine

# It uses atd-over-fso for atd execution

now=`date +'%s'`

let "seconds = minutes * 60"

# add some minutes to now
let "time = now + seconds"

# filename for the at script

# Install the script
cat >$filename << EOF


echo \$this >>/tmp/resume-at.log
date >>/tmp/resume-at.log

rm \$this
echo "update" > /var/spool/at/trigger


# Make the at script executable
chmod +x $filename

# initialize the logs file
touch /tmp/resume-at.log

# Notify atd-over-fso that a new script was installed
echo "update" > /var/spool/at/trigger

Now, all that is left to do is to change the battery monitoring script to :


while :

echo ===========================================
cat /sys/class/power_supply/battery/capacity
cat /sys/class/i2c-adapter/i2c-0/0-0073/resume_reason
cat /sys/class/i2c-adapter/i2c-0/0-0073/neo1973-resume.0/resume_reason
#/root/wkalrm +30m
/home/root/resume-at 30
sleep 20
apm -s


The script has now been run, and here are the results : discharge in 66 hours and 10 minutes : Battery discharge curve

Hope this helps.

samedi, novembre 7 2009

How to disable buggy trackstick for an Inspiron 4000 in Ubuntu 2009.10

I own an old Dell Inspiron 4000 laptop whose trackstick / trackpoint (the blue little joystick in the middle of the keyboard) has become really annoying : typing on the keyboard, or even touching the surface of the laptop generate parasite movements of the pointer.

I've looked for a way to disable it, and found one way using hal (since X is auto-configured in Ubuntu now), by adding the following file as /etc/hal/fdi/policy/10-disabletrackstick.fdi :

<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
     <match key="info.product" contains="TPPS/2 IBM TrackPoint">
       <remove key="input.x11_driver"/>

Thanks to this post by Brice Goglin for he hint on how to disable a device.

samedi, mars 28 2009

Proper power management on Asus P4B266 mainboard

I've had difficulties with power management on my P4B266 mainboard (yes, pretty old but still works).

Here are a couple tweaks I've done (which work with Debian lenny) :

  1. passing acpi=force to the kernel to enable acpi
  2. tweaking the HAL suspend quirks (see bellow) in /usr/share/hal/fdi/information/10freedesktop/20-video-quirk-pm-asus.fdi
  3. tweaking s2ram's options with S2RAM_OPTS="-f -a 3" in /etc/pm/config.d/defaults
Here's the patch on /usr/share/hal/fdi/information/10freedesktop/20-video-quirk-pm-asus.fdi for hal to be used by pm-utils :
--- /usr/share/hal/fdi/information/10freedesktop/20-video-quirk-pm-asus.fdi.orig    2009-03-28 19:29:39.000000000 +0100
+++ /usr/share/hal/fdi/information/10freedesktop/20-video-quirk-pm-asus.fdi    2009-03-28 19:29:44.000000000 +0100
@@ -108,5 +108,12 @@
       <merge key="power_management.quirk.none" type="bool">true</merge>
+    <match key="system.firmware.version" prefix="ASUS P4B266 ACPI BIOS Revision">
+      <match key="system.firmware.version" contains=" 1010">
+    <merge key="power_management.quirk.s3_bios" type="bool">true</merge>
+    <merge key="power_management.quirk.s3_mode" type="bool">true</merge>
+      </match>
+    </match>

jeudi, août 28 2008

Amanda backups to VFAT partition on external (USB) drive on Debian

I have setup a mini-PC on which I have installed my network backup infrastructure, using Amanda.

In this post, I try to summarize some useful options and links... to be improved, of course : comments most welcome.

Lire la suite...

mardi, juin 17 2008

Starting DVD playing in totem from GNOME's drive_mount applet

My GNOME desktop's setup is configured so that DVDs aren't auto-played when inserted. Inserted media aren't auto-mounted either. Instead I'm using the Drivemount applet to mount, open, start play, when I wish so, by using its menus.

However, I've been annoyed for a while by the fact that when I had mounted a DVD's disc, and I started "Play DVD" from drivemount-applet's menu, totem would start, but it wouldn't play the DVD, complaining that "Totem could not play 'dvd://'. The source seems encrypted, and can't be read. Are you trying to play an encrypted DVD without libdvdcss?" :(

It seems that changing the DVD auto-play command in Gnome settings' Removable drives & Media Preferences configuration dialog from 'totem dvd://' to 'totem dvd://%m' helped achieve what I needed.

Now totem is started with something like 'totem dvd:///media/DVD_MOVIE', and plays the film as expected.

This post helped me figure out how to achieve that :

lundi, janvier 21 2008

Régler problème alimentation papier HP PSC1510

Notre imprimante (+scanner) HP PSC 1510 avait bien marché pendant environ 8 à 10 mois, mais récemment, elle s'est mise à merder au niveau de l'alimentation du papier, qui ne voulait plus rentrer, d'où nécessité de relancer l'impression, de forcer la montée des feuilles, bref, la galère dès qu'on veut imprimer plus d'une page !

Mais il y a une solution assez simple... peut-être pas recommandée par HP, mais c'est vous qui voyez, à vos risques et périls.

En fait, il y a un espèce de caoutchouc vert qui freine les pages au moment de leur entrainement par le rouleau, pour qu'une seule feuille monte dans l'imprimante à la fois, je suppose. C'est ce truc qui frottait trop, donc plus aucune feuille ne montait... Il suffit donc de l'enlever.

Tout ça en images.

  1. Répérer là où ça coince (la photo est prise une fois le truc vert enlevé... c'est pour vous donner une idée de la localisation) :
  2. Éteindre l'imprimante et la débrancher. Ouvrir la trappe arrière :
  3. Puis oter le guide noir qui supporte le caoutchouc vert (ici, je l'ai déjà enlevé quand j'ai pris la photo) :
  4. Enfin, oter le fameux caoutchouc. Une fois retiré, il ressemble à ça :
Et voilà, il ne reste plus qu'à replacer le guide noir à sa place (attention à bien le remettre comme il faut pour que le papier ne coince pas), et à refermer. Ca devrait bien mieux imprimer, maintenant !

Update 18/01/2010 : L'imprimante a fini par arrêter de fonctionner complètement (problème apparemment plus grave) : cette fois, je n'ai rien pu faire ;). RIP

Reprogrammation chaînes téléviseur Sony KV-M2100B depuis télécommande RM-841

Nous avons une assez vielle télé Sony KV-M21008, et suite au déménagement, je voulais la reprogrammer pour adapter aux nouvelles fréquences des chaînes... mais impossible de retrouver le manuel, depuis longtemps parti aux oubliettes...

Heureusement, j'ai trouvé une doc : ... merci à son auteur

Je traduis (merci google, pour le draft ;), et j'ajoute quelques petits détails :

En bas à gauche de la télécommande (RM-841) du téléviseur, il ya 6 petits boutons, que nous numéroterons de 1 à 6 :

1 2
3 4
5 6

On ne s'intéresse qu'aux boutons 1 (Shift), 2 (Preset), 4 (+) et 6 (-), ainsi qu'aux boutons classiques de numéros de chaînes, dans la partie haute de la télécommande (de 1 à 0)

Appuyer en même temps sur les boutons 1 et 2 (Maj et Présélection). Le numéro de programme clignote, et UHF ||||||| apparaîtra à l'écran.

Appuyer sur le numéro de programme que vous souhaitez régler, puis appuyer sur les boutons 1 (Maj) et soit 4 (+) ou 6 (-) jusqu'à ce que vous trouviez le canal voulu.

Appuyer en même temps sur les boutons 1 et 2 (Maj et Preset), pour sauver le réglage de la chaîne.

Recommencez l'opération pour tous les autres canaux.

C'est un peu lent, mais ça marche !

Cool, la télé peut enfin re-servir.

dimanche, juin 17 2007

Bye-bye les spams dans dotclear

Bon, j'ai maintenant une solution à peu près correcte pour filtrer le spam dans Dotclear, en utilisant des plugins complémentaires : SpamTimeout, Captcha et SpamClear.

Le premier met en oeuvre une URL de trackback qui ne dure qu'un temps, permettant de limiter le nombre de spams par trackbacks, le second un captcha sur les commentaires, et enfin, le dernier met en oeuvre un filtrage bayesien sur les trackbacks et commentaires ainsi récupérés.

jeudi, mai 3 2007

BackupPc saved my life (almost ;)

I've been using BackupPc for quite some time to backup the home network computers on an external disk.

BackupPc offers a nice Web interface which allows retrieving of files from the backups, in the case of an accidental deletion, for instance, which is quite user-friendly. Apart from occasionaly restoring deleted files, I had never had to restore a backup.

I was more or less annoyed by the processing power needed by those backups over and over again (the external disk on which I'm saving the files is quite slow although connected through firewire, and some of the machines are a bit old and don't like the compression, md5 and other computations needed by the backup process)... and even though there's a differential backup mechanism for only saving full backups from time to time, the length of the backups and the slow down and noise of the disk were recurrent annoyances :(

But two days ago, I've had the assurance that all this was worth the game, since one of the disks on which I had saved more or less all my data suddenly broke down :(

I've had to buy a new disk, but I've been able to restore more or less all the files quite easily (using command line and tar format instead of the web interface), and I'm back on tracks with only one day of email lost.

So thanks a lot BackupPc, even though you make my computers slower and more noisy !

dimanche, avril 8 2007

Transfering files from/to the Sony Ericsson T610 on GNU/Linux through Bluetooth + OBEX

Based on my successful setup of ObexFS + FUSE to access my K610i through the USB cable, which allows me to retrieve and modify the contents of my phone's memory under Gnome, I have attempted to do the same for the T610 Sony Ericsson phone of my girlfriend.

It works very well too, but this time, as I have no USB cable for that phone, I used a bluetooth connection.

The setup is similar :

  1. creating a directory inside /media, for instance /media/T610
  2. chgrp fuse /media/T610
  3. chmod g+w /media/T610
  4. Modify the contents of /etc/fstab to have the correct entry for mounting it

voilà !

The /etc/fstab entry is of the form :

obexfs#-bxx:xx:xx:xx:xx:xx\040-Byy      /media/T610     fuse    defaults,user 0 0

the xx:xx:xx:xx:xx:xx address is the bluetooth MAC address of the phone, which you can retrieve with hcitool scan (as root ?)

The yy channel number is found by looking for the channel used for ObexFTP transfers in the output of sdptool browse (as root ?)

Note the specific syntax using \040 for the space required in the /etc/fstab line.

More details here, maybe.

Update 2007/04/10 : gnome-vfs-obexftp has just entered testing (now that etch is released, I won't stay stable, and continues on testing ;), which allows use of obex:/// like URIs to access the phone's files via ObexFTP over bluetooth/rfcomm. Great, no need to touch fstab.

samedi, janvier 27 2007

Compatibilité Network-Manager et WPA2 Freebox

J'avais sélectionné l'option par défaut pour le cryptage WPA sur ma Freebox : WPA (TKIP+AES). Or j'avais des problèmes à accrocher le réseau avec NetworkManager dans ce cas (pas grave, ça marchait quand même avec ifupdown).

Je viens de changer pour WPA (AES/CCMP), donc WPA2/802.11i pur, si je comprends bien (plus d'émulation WPA TKIP, donc)... et ô miracle, ça plaît beaucoup plus à Network-Manager. Et en plus, à priori, ça ne nuit pas à la qualité du cryptage, bien au contraire ;)

Hope this helps.

P.S.: au sujet de Network-Manager, voir aussi : dans mon blog pro

mardi, janvier 23 2007

Backup du dump SPIP (dand une page perso Free) via CURL

J'ai mis en place un site SPIP dans une page perso Free.

SPIP propose une interface permettant de sauvegarder un fichier de dump SPIP, qui permet de restaurer le site (si tout va bien), mais elle est accessible uniquement en tant qu'administrateur en mode connecté, et nécessite la création d'un truc en FTP... bref, pas cool pour automatiser les sauvegardes.

J'ai donc bidouillé un truc avec CURL qui permet de récupérer le dump et de faire des sauvegardes automatisées, donc, en crontab.

Lire la suite...

Backup de la base de données MySQL des pages persos Free avec CURL

J'ai mis en ligne un site sur une page perso Free, qui utilise une base de données MySQL Free.

Il existe un outil de sauvegarde via un formulaire Web pour ces bases de données, nécessitant de s'authentifier et de valider un formulaire, mais je préfère une sauvegarde automatique déclenchée périodiquement.

J'ai donc bidouillé un script permettant de faire la même chose avec CURL, qui peut donc tourner en crontab. Il est prévu pour tourner dans un répertoire, et garder seulement les 10 derniers dumps de la base.

Lire la suite...

dimanche, novembre 12 2006

Transfering files to the Sony Ericsson K610i from GNU/Linux through USB + OBEX

I'd like to be able to transfer files on my Sony Ericsson K610i phone when I connect it to my GNU/Linux system (Debian in my case) with the standard USB/charger cable shipped with the phone.

There are other methods, like over Bluetooth or IR, but my Desktop PC has no bluetooth or IR interface by default.

On OpenOBEX site there's a wiki which documents the status of various phones. For the Sony Ericsson K610i the informations are here.

I had to check many sources of information to be able to setup something useable, in addition to this link, which I try to summarize here.

Lire la suite...

samedi, novembre 4 2006

Making DVDs with GNU/Linux readable on my Combo DVD/VHS Samsung SV-DVD1E player

I've been strugling with making DVDs to save some videos on DVD, and be able to play them on the TV, and of course, I want to do that on GNU/Linux.

It seems I had an issue with the format of the DVD recordable disks. DVD-R (and DVD-RW) wouldn't be readable on the Samsung SV-DVD1E DVD player (actually a combo DVD player + VCR) connected to my TV. I finally managed to make playable ones on DVD+R disks.

I used devede to create an ISO image of the DVD. What's nice is that it can do recoding of the MPEG files apropriately. It is very simple, won't create fancy DVD menus, but produces a valid DVD apparently, and that's already a lot ;)

Then I use brasero to burn the ISO image on the DVD+R disks (on a Sony DRU-820A DVD writer).

I hope this can be useful for others.

Edit 2007/09/09 : I seem to have difficulties in playing DVDs made on DVD+R discs, encoded from TV shows captured on my Freebox HD : there are freezes from time to time, a black screen, and then the video resumes. However, these discs will play fine at my step-mother's. Dunno what's the problem. Probably that the Samsung SV-DVD1E is too old and buggy.

- page 1 de 2