[C] Neue Konsole aus Programm heraus starten ?
-
Hallo,
hab ein einfach C Programm das ich aus einer Linux Konsole heraus starte. Würde nun gerne vom Programm aus ein neues Konsolen Fenster erstellen lassen das auch gleich einen bestimmten Befehl ausführt z.B. "tail text.txt" während mein Programm im Start Fenster normal weiter läuft. Wie funktioniert das ganze bzw. wie ist der entsprechende C Code ?Vielen Dank für Eure Hilfe.
MfG Jensi
-
fork() und dann in einem von beiden Prozessen exec("xterm")?
-
Aber wie geb ich diesem neuen Fenster gleich ein Befehl mit auf dem Weg ?
-
man xterm:
-e program [ arguments ... ] This option specifies the program (and its command line argu- ments) to be run in the xterm window. It also sets the window title and icon name to be the basename of the program being executed if neither -T nor -n are given on the command line. This must be the last option on the command line.
-
Mensch da hätte ich auch ma schauen können, sorry !
Jetzt klappts auf jeden Fall. Danke !