kanotix.com

General Support - Persistent terminal session

Cathbard - 23.07.2006, 07:19 Uhr
Titel: Persistent terminal session
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?
schnorrer - 23.07.2006, 12:56 Uhr
Titel: RE: Persistent terminal session
no, if your srcipt ends with EXIT
kelmo - 23.07.2006, 13:00 Uhr
Titel:
Code:
#!/bin/sh
while true; do
   echo "Press any key to exit."
   read key
   case $key in
      *) exit ;;
   esac
done

Cathbard - 23.07.2006, 14:07 Uhr
Titel:
Thanks kelmo that worked perfectly.
Alle Zeiten sind GMT + 1 Stunde
PNphpBB2 © 2003-2007