lanceur d'application [Réglé]
comment garder le terminal ouvert apres l'exécution d'une commande
Environnements Graphiques / MATE

ryu Membre non connecté
-
- Voir le profil du membre ryu
- Inscrit le : 26/01/2010
j'ai fait plusieurs recherches mais je n'ai toujours pas trouvé de réponse a mon problème..
j'ai installé le logiciel VNSTAT pour savoir ma bande passante et mes transferts totaux journaliers et mensuels.
le logiciel est en ligne de commande. alors jai voulu me faire un lanceur pour ne pas être obligé d'ouvrir un terminal et de taper la commande a chaque fois.
or, le lanceur semble fonctionner très bien, mais comme le logiciel ne fait de donner les totaux des transfert, alors la fenêtre de terminal se ferme aussi tôt, et je n'ai pas le temps de voir quoi que ce soit.
j'aimerais savoir s'il existe une façon pour garder la fenêtre de terminal ouverte après l'exécution d'une commande et qu'ainsi je puisse la fermer manuellement après..
merci a tous

Enzolyte Membre non connecté
-
- Voir le profil du membre Enzolyte
- Inscrit le : 28/04/2008
- Groupes :
Tu as essayé en mettant la commande dans "Applications au démarrage" ?

Cordialement
"Profites de l'instant présent car hier n'est plus et demain ne viendra peut-être jamais."

ryu Membre non connecté
-
- Voir le profil du membre ryu
- Inscrit le : 26/01/2010
Citation :
#!/bin/bash
#
# Linux Shell Script by Ryu
#
vnstat
echo "Press ENTER to exit"
read keyenter
exit 0
#!/bin/bash
#
# Linux Shell Script by Ryu
#
vnstat
echo "Press ENTER to exit"
read keyenter
exit 0
c'est extrêmement basic, mais sa fonctionne parfaitement.
maintenant il ne me reste plus qu'a comprendre le fonctionnement interne de VNSTAT et utiliser les résultats pour créer un GUI avec base de données et graphique de bande passante journalier/mensuel/annuel (un peu comme Bandwidth Meter Pro sur Winblows).
si quelqu'un se sent a la hauteur et veux m'aider a créer un environement graphique (GUI) pour ce logiciel, toute aide sera tres apprécier. Mes connaissances en programmation sont tres basic, alors nul besoin d'etre un programmeur professionnel pour m'aider. envoyez moi un message privé et on pourra entrer en contact ensemble pour réaliser ce projet.
Édité par ryu Le 13/06/2010 à 18h27

ryu Membre non connecté
-
- Voir le profil du membre ryu
- Inscrit le : 26/01/2010
- Ouvrir un terminal
- Edition
- Préférences du profil
- Titre et commande
Dernière option : Quand la commande se termine
Vous avez le choix entre :
- Quitter le terminal
- Relancer la commande
- Conserver le terminal ouvert
Voilà..... aussi simple que sa.
et pour ceux qui auras utiliser mon petit script, j'en ai fait une version 2.0 avec quelques options supplémentaires. Il n'et pas complètement terminé, mais c'est un bon début...
Citation :
#!/bin/bash
#
# Linux Shell Script by Ryu
#
while :
do
clear
echo "--------------------------------------------------------------------"
echo " VnStat Bandwidth Monitor Launch Script "
echo "--------------------------------------------------------------------"
echo ""
echo ""
echo "(N)ormal or [ENTER]"
echo "(H)ours"
echo "(D)ays"
echo "(W)eeks"
echo "(M)onth"
echo "(S)hort"
echo "(T)raffic"
echo "(L)ive"
echo "(A)ll"
echo "(P)rint in a file"
echo "(O) Top10"
echo "(Q)uit"
echo ""
echo ""
echo "--------------------------------------------------------------------"
echo ""
echo ""
echo -n "Enter your menu choice : "
read keyenter
case $keyenter in
"") clear ; vnstat ; echo "Press ENTER to return to menu" ; read ;;
n) clear ; vnstat ; echo "Press ENTER to return to menu" ; read ;;
h) clear ; vnstat --hours ; echo "Press ENTER to return to menu" ; read ;;
d) clear ; vnstat --days ; echo "Press ENTER to return to menu" ; read ;;
w) clear ; vnstat --weeks ; echo "Press ENTER to return to menu" ; read ;;
m) clear ; vnstat --months ; echo "Press ENTER to return to menu" ; read ;;
s) clear ; vnstat --short ; echo "Press ENTER to return to menu" ; read ;;
t) clear ; vnstat --traffic ; echo "Press ENTER to return to menu" ; read ;;
l) clear ; vnstat --live ; echo "Press ENTER to return to menu" ; read ;;
o) clear ; vnstat --top10 ; echo "Press ENTER to return to menu" ; read ;;
a) clear ; vnstat ; vnstat --hours ; vnstat --days ; vnstat --weeks ; vnstat --months ; vnstat --short ; vnstat --top10 ; echo "Press ENTER to return to menu" ; read ;;
q) clear ; exit 0 ;;
N) clear ; vnstat ; echo "Press ENTER to return to menu" ; read ;;
H) clear ; vnstat --hours ; echo "Press ENTER to return to menu" ; read ;;
D) clear ; vnstat --days ; echo "Press ENTER to return to menu" ; read ;;
W) clear ; vnstat --weeks ; echo "Press ENTER to return to menu" ; read ;;
M) clear ; vnstat --months ; echo "Press ENTER to return to menu" ; read ;;
S) clear ; vnstat --short ; echo "Press ENTER to return to menu" ; read ;;
T) clear ; vnstat --traffic ; echo "Press ENTER to return to menu" ; read ;;
L) clear ; vnstat --live ; echo "Press ENTER to return to menu" ; read ;;
O) clear ; vnstat --top10 ; echo "Press ENTER to return to menu" ; read ;;
A) clear ; vnstat ; vnstat --hours ; vnstat --days ; vnstat --weeks ; vnstat --months ; vnstat --short ; vnstat --top10 ; echo "Press ENTER to return to menu" ; read ;;
Q) clear ; exit 0 ;;
p) clear ; mkdir ~/Bureau/VnStat ; vnstat >~/Bureau/VnStat/VnStat_normal.txt ; vnstat --hours >~/Bureau/VnStat/VnStat_hours.txt ; vnstat --days >~/Bureau/VnStat/VnStat_days.txt ; vnstat --weeks >~/Bureau/VnStat/VnStat_weeks.txt ; vnstat --months >~/Bureau/VnStat/VnStat_months.txt ; vnstat --short >~/Bureau/VnStat/VnStat_short.txt ; vnstat --top10 >~/Bureau/VnStat/VnStat_top10.txt ; echo "Job done !" ; echo "Press ENTER to exit" ; read ;;
P) clear ; mkdir ~/Bureau/VnStat ; echo "Please wait a few seconds..." ; vnstat >~/Bureau/VnStat/VnStat_normal.txt ; vnstat --hours >~/Bureau/VnStat/VnStat_hours.txt ; vnstat --days >~/Bureau/VnStat/VnStat_days.txt ; vnstat --weeks >~/Bureau/VnStat/VnStat_weeks.txt ; vnstat --months >~/Bureau/VnStat/VnStat_months.txt ; vnstat --short >~/Bureau/VnStat/VnStat_short.txt ; vnstat --top10 >~/Bureau/VnStat/VnStat_top10.txt ; echo "Job done !" ; echo "Press ENTER to exit" ; read ;;
*) echo "Opps!!! Please select a valid choice ";
echo "Press ENTER to return to menu" ; read ;;
esac
done
#!/bin/bash
#
# Linux Shell Script by Ryu
#
while :
do
clear
echo "--------------------------------------------------------------------"
echo " VnStat Bandwidth Monitor Launch Script "
echo "--------------------------------------------------------------------"
echo ""
echo ""
echo "(N)ormal or [ENTER]"
echo "(H)ours"
echo "(D)ays"
echo "(W)eeks"
echo "(M)onth"
echo "(S)hort"
echo "(T)raffic"
echo "(L)ive"
echo "(A)ll"
echo "(P)rint in a file"
echo "(O) Top10"
echo "(Q)uit"
echo ""
echo ""
echo "--------------------------------------------------------------------"
echo ""
echo ""
echo -n "Enter your menu choice : "
read keyenter
case $keyenter in
"") clear ; vnstat ; echo "Press ENTER to return to menu" ; read ;;
n) clear ; vnstat ; echo "Press ENTER to return to menu" ; read ;;
h) clear ; vnstat --hours ; echo "Press ENTER to return to menu" ; read ;;
d) clear ; vnstat --days ; echo "Press ENTER to return to menu" ; read ;;
w) clear ; vnstat --weeks ; echo "Press ENTER to return to menu" ; read ;;
m) clear ; vnstat --months ; echo "Press ENTER to return to menu" ; read ;;
s) clear ; vnstat --short ; echo "Press ENTER to return to menu" ; read ;;
t) clear ; vnstat --traffic ; echo "Press ENTER to return to menu" ; read ;;
l) clear ; vnstat --live ; echo "Press ENTER to return to menu" ; read ;;
o) clear ; vnstat --top10 ; echo "Press ENTER to return to menu" ; read ;;
a) clear ; vnstat ; vnstat --hours ; vnstat --days ; vnstat --weeks ; vnstat --months ; vnstat --short ; vnstat --top10 ; echo "Press ENTER to return to menu" ; read ;;
q) clear ; exit 0 ;;
N) clear ; vnstat ; echo "Press ENTER to return to menu" ; read ;;
H) clear ; vnstat --hours ; echo "Press ENTER to return to menu" ; read ;;
D) clear ; vnstat --days ; echo "Press ENTER to return to menu" ; read ;;
W) clear ; vnstat --weeks ; echo "Press ENTER to return to menu" ; read ;;
M) clear ; vnstat --months ; echo "Press ENTER to return to menu" ; read ;;
S) clear ; vnstat --short ; echo "Press ENTER to return to menu" ; read ;;
T) clear ; vnstat --traffic ; echo "Press ENTER to return to menu" ; read ;;
L) clear ; vnstat --live ; echo "Press ENTER to return to menu" ; read ;;
O) clear ; vnstat --top10 ; echo "Press ENTER to return to menu" ; read ;;
A) clear ; vnstat ; vnstat --hours ; vnstat --days ; vnstat --weeks ; vnstat --months ; vnstat --short ; vnstat --top10 ; echo "Press ENTER to return to menu" ; read ;;
Q) clear ; exit 0 ;;
p) clear ; mkdir ~/Bureau/VnStat ; vnstat >~/Bureau/VnStat/VnStat_normal.txt ; vnstat --hours >~/Bureau/VnStat/VnStat_hours.txt ; vnstat --days >~/Bureau/VnStat/VnStat_days.txt ; vnstat --weeks >~/Bureau/VnStat/VnStat_weeks.txt ; vnstat --months >~/Bureau/VnStat/VnStat_months.txt ; vnstat --short >~/Bureau/VnStat/VnStat_short.txt ; vnstat --top10 >~/Bureau/VnStat/VnStat_top10.txt ; echo "Job done !" ; echo "Press ENTER to exit" ; read ;;
P) clear ; mkdir ~/Bureau/VnStat ; echo "Please wait a few seconds..." ; vnstat >~/Bureau/VnStat/VnStat_normal.txt ; vnstat --hours >~/Bureau/VnStat/VnStat_hours.txt ; vnstat --days >~/Bureau/VnStat/VnStat_days.txt ; vnstat --weeks >~/Bureau/VnStat/VnStat_weeks.txt ; vnstat --months >~/Bureau/VnStat/VnStat_months.txt ; vnstat --short >~/Bureau/VnStat/VnStat_short.txt ; vnstat --top10 >~/Bureau/VnStat/VnStat_top10.txt ; echo "Job done !" ; echo "Press ENTER to exit" ; read ;;
*) echo "Opps!!! Please select a valid choice ";
echo "Press ENTER to return to menu" ; read ;;
esac
done
Voila.... il reste quelques petites corrections a faire, comme modifier le nom de dossier créé sur le bureau pour y inclure la date de création, car, si le répertoire existe déja, il en résulte une erreur. Dans la prochaine version, je vais aussi essayer de créé un menu pour choisir l'option désirée au lieu d'avoir a entrer une lettre au clavier. Puis éventuellement, une interface graphique pour géré tous les résultat en mode graphique avec de beaux graphiques.
Répondre
Vous n'êtes pas autorisé à écrire dans cette catégorie