Comme je suis très flemmard, j'ai pris le modèle avec télécommande infrarouge :)
Ouais, nickel.
Je zappe entre les chaines TV et mes mp3 et radios en streaming sans quitter mon lit ;)
Pour ce qui est de la reconnaissance de la carte TV, la Mandrake la détecte automatiquement donc j'en parle pas pour l'instant (au pire aller sur lea-linux.org pour plus d'infos)
Pour un exemple de configuration de xawtv (Pour là où j'habite), voici mon fichier .xawtv :
[global] ratio = 4:3 freqtab = france pixsize = 128 x 96 pixcols = 1 jpeg-quality = 75 mjpeg-quality = 75 keypad-ntsc = no keypad-partial = yes osd = yes fullscreen=640x480 [defaults] norm = SECAM input = Television capture = over [tf1] channel = 45 key = KP_End [france2] channel = 39 key = KP_Down [france3] channel = 56 key = KP_Next [canal+] channel = 59 key = KP_Left [5] channel = 65 key = KP_Begin [m6] channel = 62 key = KP_Right
Le fullscreen=640x480 permets d'éviter de toucher au fichier XF86Config pour changer les modelines (Je sais pas encore comment faire).
Pour la télécommande, il faut aller sur www.lirc.org et récupérer le fichier lirc-0.6.4.tar.gz ou une version supérieure.
Pour installer la télécommande de votre Hauppauge :
cp lirc-0.6.4.tgz /tmp cd /tmp tar zxvf lirc-0.6.4.tgz cd lirc-0.6.4 ./configure -with-driver=hauppauge make su make install cp remotes/hauppauge/lircd.conf.hauppauge /etc/lircd.conf cp remotes/hauppauge/lircmd.conf.hauppauge /etc/lircmd.conf cp contrib/lirc.redhat /etc/init.d/lirc chmod a+rw /dev/lirc*
Ajouter ensuite "alias char-major-61 lirc_i2c" à votre fichier /etc/modules.conf
Pour tester, lancer /usr/local/bin/irw et appuyer sur les boutons de votre télécommandes. Si ça marche, vous devez voir un descriptif sur une ligne de la touche sur laquelle vous avez appuyée.
Bon, maintenant que ça marche, comment on utilise la télécommande ?
Au choix : on a des applications qui gèrent lirc en natif ou via des plugins (kwintv, noatun, xmms,...) ou on utilise irxevent et irexec pour simuler des appels du clavier ou le lancement de commandes. Je préfère personnellement le 2ème choix vu qu'il permet de jongler plus facilement entre application.
Voici donc mon fichier .lircrc :
begin prog = irexec button = TV config = xawtv >/dev/null& mode = xawtv flags= once end begin button = RADIO prog = irexec config = xmms mode = xmms flags = once end begin button = RESERVED mode = mouse end begin xmms begin prog = irxevent button = FULL_SCREEN config = Key Ctrl-d xmms end begin prog = irxevent button = CH+ config = Key B xmms end begin prog = irxevent button = CH- config = Key Z xmms end begin prog = irexec button = VOL+ config = aumix -w+3 repeat = 1 end begin prog = irexec button = VOL- config = aumix -w-3 repeat = 1 end begin prog = irxevent button = 2 config = Key X xmms end begin prog = irxevent button = 1 config = Key V xmms end begin prog = irxevent button = 4 config = Key Left xmms end begin prog = irxevent button = 6 config = Key Right xmms end begin prog = irxevent button = MUTE config = Key C xmms end begin prog = irexec button = MINIMIZE config = killall xmms flags = mode end end xmms begin xawtv begin prog = irxevent button = VOL- config = Key KP_Subtract xawtv end begin prog = irxevent button = VOL+ config = Key KP_Add xawtv end begin prog = irxevent button = FULL_SCREEN config = Key f xawtv end begin prog = irxevent button = MINIMIZE config = Key Escape xawtv flags = mode end begin prog = irxevent button = CH+ config = Key Page_Up xawtv end begin prog = irxevent button = CH- config = Key Page_Down xawtv end begin prog = irxevent button = 1 config = Key KP_1 xawtv end begin prog = irxevent button = 2 config = Key KP_2 xawtv end begin prog = irxevent button = 3 config = Key KP_3 xawtv end begin prog = irxevent button = 4 config = Key KP_4 xawtv end begin prog = irxevent button = 5 config = Key KP_5 xawtv end begin prog = irxevent button = 6 config = Key KP_6 xawtv end begin prog = irxevent button = 7 config = Key KP_7 xawtv end begin prog = irxevent button = 8 config = Key KP_8 xawtv end begin prog = irxevent button = 9 config = Key KP_9 xawtv end begin prog = irxevent button = MUTE config = Key A xawtv end begin prog = irxevent button = SOURCE config = Key Ctrl-J xawtv end end xawtv
Pour jongler entre xmms et xawtv il suffit d'appuyer sur RADIO pour xmms et TV pour xawtv.
Pour lancer lirc, on va créer un script qui lance irxevent et irexec, start_lirc que l'on va mettre dans ~/bin/
#!/bin/bash killall irexec killall irxevent /usr/local/bin/irexec > /dev/null 2>&1 & /usr/local/bin/irxevent > /dev/null 2>&1 &
Maintenant, il faut le lancer quand on se logue. Il suffit de rajouter "~/bin/start_lirc" à la fin de ~/.bash_profile (si vous utiliser bash comme shell).
Je continuerais plus tard par la description des softs permettant d'utiliser pleinement lirc (animenu,...)