14.05.2024, 08:15 UhrDeutsch | English
Hallo Gast [ Registrierung | Anmelden ]

Neues Thema eröffnen   Neue Antwort erstellen
Vorheriges Thema anzeigen Druckerfreundliche Version Einloggen, um private Nachrichten zu lesen Nächstes Thema anzeigen
Autor Nachricht
Cathbard
Titel: Persistent terminal session  BeitragVerfasst am: 23.07.2006, 07:19 Uhr
Artist
Artist


Anmeldung: 11. Aug 2005
Beiträge: 451
Wohnort: Australia
I want to create a menu entry that runs a terminal command as root.
I have created an entry with "run in terminal" and "Run as a different user" checked. I have my script in the "Command" field and it seems to work fine. However, the point of the exercise is to display the info returned by the script but once the script is run the terminal window closes. Is there a way (maybe a terminal option) that keeps the window open?

_________________
Cathbard.com
The real pirates by Courtney Love
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
schnorrer
Titel: RE: Persistent terminal session  BeitragVerfasst am: 23.07.2006, 12:56 Uhr



Anmeldung: 09. Jan 2006
Beiträge: 1720

no, if your srcipt ends with EXIT
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
kelmo
Titel:   BeitragVerfasst am: 23.07.2006, 13:00 Uhr
Developer
Developer


Anmeldung: 01. Okt 2004
Beiträge: 245
Wohnort: Australia
Code:
#!/bin/sh
while true; do
   echo "Press any key to exit."
   read key
   case $key in
      *) exit ;;
   esac
done
 
 Benutzer-Profile anzeigen Private Nachricht senden Website dieses Benutzers besuchen  
Antworten mit Zitat Nach oben
Cathbard
Titel:   BeitragVerfasst am: 23.07.2006, 14:07 Uhr
Artist
Artist


Anmeldung: 11. Aug 2005
Beiträge: 451
Wohnort: Australia
Thanks kelmo that worked perfectly.

_________________
Cathbard.com
The real pirates by Courtney Love
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
Beiträge vom vorherigen Thema anzeigen:     
Gehe zu:  
Alle Zeiten sind GMT + 1 Stunde
Neues Thema eröffnen   Neue Antwort erstellen
Vorheriges Thema anzeigen Druckerfreundliche Version Einloggen, um private Nachrichten zu lesen Nächstes Thema anzeigen
PNphpBB2 © 2003-2007 
 
Deutsch | English
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2004 - 2006 by Jörg Schirottke (Kano).
Consult Impressum and Legal Terms for details. Kanotix is Free Software released under the GNU/GPL license.
This CMS is powered by PostNuke, all themes used at this site are released under the GNU/GPL license. designed and hosted by w3you. Our web server is running on Kanotix64-2006.