Quelqu'un pourrai tester ça et me dire ce que ça fait ?
#!/bin/sh
IFS=''
ZIC=`locate -i "$HOME/Musique/" | egrep -i '\.(mp3|ogg)$' | grep "$2"`
case $1 in
lancer ) play "$HOME/Musique/$ZIC" ;;
quitter ) exit;;
esac;
exit
Sinon, avec rhythmbox on peut mainteant lancer une musique:
RHYTHMBOX_CONTROL (){
case $TEXTE in
"lancer musique" ) rhythmbox-client --no-present; rhythmbox-client --play ;;
"pause musique" ) rhythmbox-client --pause ;;
"quitter musique" ) rhythmbox-client --quit;;
précédent ) rhythmbox-client --previous ;;
suivant ) rhythmbox-client --next ;;
"notification musique" ) rhythmbox-client --notify;;
jouer | ouai | jouet ) AFFICHAGE "Titre de la chanson" "2" ;CHERCHE_SON ;;
esac
}
D'abord lancer le client rhythmbox (dire lancer musique), puis dire jouer pour choisir la musique.
En plus, je crois que rhythmbox est déjà intégré à ubuntu.
Maintenant, je vais voir pour l'interface graphique et me renseigner sur Dbus (je connais pas)