#1 Le 16/03/2010, à 00:22
- kde4 fan
[Résolu] zenity --file-selection aide
comment récupéré le non du fichier sélectionner avec une zenity --file-selection
puis le renvoyer dans un fichier texte ?
merci
Dernière modification par kde4 fan (Le 16/03/2010, à 23:06)
-------------------------------------------------------------------BONJOUR ET MERCI-----------------------------------------------------------
kubuntu 64 12.04 et Linux-Mint Maya 64 (MATE)
Bureau Animer Dreamnux : http://forum.ubuntu-fr.org/viewtopic.php?id=325865
Bureau Animer kreamnux : http://forum.kubuntu-fr.org/viewtopic.php?pid=8916691
Hors ligne
#2 Le 16/03/2010, à 00:30
- AnsuzPeorth
Re : [Résolu] zenity --file-selection aide
Bjr
zenity --file-selection > fichier
Interface graphique pour bash, python ou autre: glade2script
Support Tchat: http://chat.jabberfr.org/muckl_int/inde … ade2script (Hors ligne)
Hors ligne
#3 Le 16/03/2010, à 19:19
- kde4 fan
Re : [Résolu] zenity --file-selection aide
merci AnsuzPeorth
en fait la commande est plus longue
echo "xwinwrap -ni -fs $FACE -st -sp -b -nf -o $TRANSP -- mplayer -wid WID -quiet -vo xv,gl, $NOSOUND --file-selection -loop 0 &" >> scripts-demarage
dans cette commande je voudrais récupérer le non du fichier et remplacer le --file-selection par le le non du fichier
Dernière modification par kde4 fan (Le 16/03/2010, à 19:21)
-------------------------------------------------------------------BONJOUR ET MERCI-----------------------------------------------------------
kubuntu 64 12.04 et Linux-Mint Maya 64 (MATE)
Bureau Animer Dreamnux : http://forum.ubuntu-fr.org/viewtopic.php?id=325865
Bureau Animer kreamnux : http://forum.kubuntu-fr.org/viewtopic.php?pid=8916691
Hors ligne
#4 Le 16/03/2010, à 19:26
- AnsuzPeorth
Re : [Résolu] zenity --file-selection aide
fichier=$(zenity --file-selection)
echo "xwinwrap -ni -fs $FACE -st -sp -b -nf -o $TRANSP -- mplayer -wid WID -quiet -vo xv,gl, $NOSOUND $fichier -loop 0 &" >> scripts-demarage
Dernière modification par AnsuzPeorth (Le 16/03/2010, à 19:26)
Interface graphique pour bash, python ou autre: glade2script
Support Tchat: http://chat.jabberfr.org/muckl_int/inde … ade2script (Hors ligne)
Hors ligne
#5 Le 16/03/2010, à 19:35
- kde4 fan
Re : [Résolu] zenity --file-selection aide
c'est ce que je pensai il me faut définir une variable
merci
-------------------------------------------------------------------BONJOUR ET MERCI-----------------------------------------------------------
kubuntu 64 12.04 et Linux-Mint Maya 64 (MATE)
Bureau Animer Dreamnux : http://forum.ubuntu-fr.org/viewtopic.php?id=325865
Bureau Animer kreamnux : http://forum.kubuntu-fr.org/viewtopic.php?pid=8916691
Hors ligne
#6 Le 16/03/2010, à 19:46
- kde4 fan
Re : [Résolu] zenity --file-selection aide
je ne trouve pas ou la placer corectement dans le code
xwinwrap -ni -fs $FACE -st -sp -b -nf -o $TRANSP -- mplayer -wid WID -quiet -vo xv,gl, $NOSOUND "`zenity --title "Dreamnux Choix de la vidéo" --file-selection`" -loop 0 || bash /home/"$USER"/.Dreamnux/Dreamnux &
cd /home/"$USER"/.Dreamnux
echo "#!/bin/bash" > scripts-demarage
echo "sleep 10" >> scripts-demarage
fichier=$(zenity --file-selection)
echo "xwinwrap -ni -fs $FACE -st -sp -b -nf -o $TRANSP -- mplayer -wid WID -quiet -vo xv,gl, $NOSOUND $fichier -loop 0 &" >> scripts-demarage
ça fonctionne bien pour le fichier de sortie mais actuellement je me retrouve avec 2 ouverture de fenêtre zenity --file-selection
donc ma question est
ou placer la variable au mieux
merci
-------------------------------------------------------------------BONJOUR ET MERCI-----------------------------------------------------------
kubuntu 64 12.04 et Linux-Mint Maya 64 (MATE)
Bureau Animer Dreamnux : http://forum.ubuntu-fr.org/viewtopic.php?id=325865
Bureau Animer kreamnux : http://forum.kubuntu-fr.org/viewtopic.php?pid=8916691
Hors ligne
#7 Le 16/03/2010, à 19:46
- AnsuzPeorth
Re : [Résolu] zenity --file-selection aide
Ce n'est pas obligé non plus si ca te gène dans ton code
echo "xwinwrap -ni -fs $FACE -st -sp -b -nf -o $TRANSP -- mplayer -wid WID -quiet -vo xv,gl, $NOSOUND $(zenity --file-selection) -loop 0 &"
Interface graphique pour bash, python ou autre: glade2script
Support Tchat: http://chat.jabberfr.org/muckl_int/inde … ade2script (Hors ligne)
Hors ligne
#8 Le 16/03/2010, à 19:51
- AnsuzPeorth
Re : [Résolu] zenity --file-selection aide
je ne trouve pas ou la placer corectement dans le code
xwinwrap -ni -fs $FACE -st -sp -b -nf -o $TRANSP -- mplayer -wid WID -quiet -vo xv,gl, $NOSOUND "`zenity --title "Dreamnux Choix de la vidéo" --file-selection`" -loop 0 || bash /home/"$USER"/.Dreamnux/Dreamnux & cd /home/"$USER"/.Dreamnux echo "#!/bin/bash" > scripts-demarage echo "sleep 10" >> scripts-demarage fichier=$(zenity --file-selection) echo "xwinwrap -ni -fs $FACE -st -sp -b -nf -o $TRANSP -- mplayer -wid WID -quiet -vo xv,gl, $NOSOUND $fichier -loop 0 &" >> scripts-demarage
ça fonctionne bien pour le fichier de sortie mais actuellement je me retrouve avec 2 ouverture de fenêtre zenity --file-selection
donc ma question est
ou placer la variable au mieux
merci
Si c'est le même chemin utilisé dans les deux commandes 'xwinwrap', pose la variable zenity en tout premier, et tu t'en sers pour les 2 commandes.
Interface graphique pour bash, python ou autre: glade2script
Support Tchat: http://chat.jabberfr.org/muckl_int/inde … ade2script (Hors ligne)
Hors ligne
#9 Le 16/03/2010, à 20:21
- kde4 fan
Re : [Résolu] zenity --file-selection aide
alors çà avance bien je n'ai plus qu'une fenêtre donc c'est bon
mais je n'ai plus le fichier sélectionner qui se lance donc pas bon
fichier=$(zenity --title "Dreamnux Choix de la vidéo" --file-selection)
xwinwrap -ni -fs $FACE -st -sp -b -nf -o $TRANSP -- mplayer -wid WID -quiet -vo xv,gl, $NOSOUND $fichier -loop 0 || bash /home/"$USER"/.Dreamnux/Dreamnux &
cd /home/"$USER"/.Dreamnux
echo "#!/bin/bash" > scripts-demarage
echo "sleep 10" >> scripts-demarage
echo "xwinwrap -ni -fs $FACE -st -sp -b -nf -o $TRANSP -- mplayer -wid WID -quiet -vo xv,gl, $NOSOUND $fichier -loop 0 &" >> scripts-demarage
j'ai due louper quelque chose mais je ne vois pas quoi
-------------------------------------------------------------------BONJOUR ET MERCI-----------------------------------------------------------
kubuntu 64 12.04 et Linux-Mint Maya 64 (MATE)
Bureau Animer Dreamnux : http://forum.ubuntu-fr.org/viewtopic.php?id=325865
Bureau Animer kreamnux : http://forum.kubuntu-fr.org/viewtopic.php?pid=8916691
Hors ligne
#10 Le 16/03/2010, à 20:45
- kde4 fan
Re : [Résolu] zenity --file-selection aide
si je lance la commande de sortie dans un terminale
$ xwinwrap -ni -fs -s -st -sp -b -nf -o 0.50 -- mplayer -wid WID -quiet -vo xv,gl, -nosound /media/MUSIQUES/clips videos/clip.avi -loop 0
je me retrouve avec un message d'erreur
$ MPlayer SVN-r29237-4.4.1 (C) 2000-2009 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Dernière modification par kde4 fan (Le 16/03/2010, à 20:46)
-------------------------------------------------------------------BONJOUR ET MERCI-----------------------------------------------------------
kubuntu 64 12.04 et Linux-Mint Maya 64 (MATE)
Bureau Animer Dreamnux : http://forum.ubuntu-fr.org/viewtopic.php?id=325865
Bureau Animer kreamnux : http://forum.kubuntu-fr.org/viewtopic.php?pid=8916691
Hors ligne
#11 Le 16/03/2010, à 20:56
- AnsuzPeorth
Re : [Résolu] zenity --file-selection aide
Je pense qu'il manque les guillemets, quelle idée de mettre des espaces dans le nom de fichier
$ xwinwrap -ni -fs -s -st -sp -b -nf -o 0.50 -- mplayer -wid WID -quiet -vo xv,gl, -nosound "/media/MUSIQUES/clips videos/clip.avi" -loop 0
devrait fonctionner?
Si c'est juste un problème de trous (espaces ):
xwinwrap -ni -fs $FACE -st -sp -b -nf -o $TRANSP -- mplayer -wid WID -quiet -vo xv,gl, $NOSOUND "$fichier" -loop 0
echo "xwinwrap -ni -fs $FACE -st -sp -b -nf -o $TRANSP -- mplayer -wid WID -quiet -vo xv,gl, $NOSOUND \"$fichier\" -loop 0 &" >> scripts-demarage
Ca devrait faire !
Interface graphique pour bash, python ou autre: glade2script
Support Tchat: http://chat.jabberfr.org/muckl_int/inde … ade2script (Hors ligne)
Hors ligne
#12 Le 16/03/2010, à 22:52
- kde4 fan
Re : [Résolu] zenity --file-selection aide
tout est bon
quelle idée de mettre des espaces dans le nom de fichier
plus compliquer avec des espace c'est vrais
un grand merci a toi AnsuzPeorth
-------------------------------------------------------------------BONJOUR ET MERCI-----------------------------------------------------------
kubuntu 64 12.04 et Linux-Mint Maya 64 (MATE)
Bureau Animer Dreamnux : http://forum.ubuntu-fr.org/viewtopic.php?id=325865
Bureau Animer kreamnux : http://forum.kubuntu-fr.org/viewtopic.php?pid=8916691
Hors ligne