Go Back   DaemonForums > Miscellaneous > Programming

Programming C, bash, Python, Perl, PHP, Java, you name it.

Thread Tools Display Modes
  #1   (View Single Post)  
Old 23rd April 2009
bsdnewbie999 bsdnewbie999 is offline
Package Pilot
Join Date: May 2008
Posts: 145
Default shell script-start another process

how to write the script that invoke a program to be displayed in another terminal
For example, i'm running the script in terminal A then the another command in the script will run in another terminal B.
Reply With Quote
  #2   (View Single Post)  
Old 23rd April 2009
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
Join Date: May 2008
Location: USofA
Posts: 1,547

Generally, you don't.

It's possible to write to another terminal, if you open a pair of xterms and run 'tty', on the first you can generate output (e.g. echo hi) and redirect it (>>) to the second terminals tty device file. Fiddling around like that is basically what the unix talk program does. So you could even have the script redirect the I/O of a command to another termianl; but in order to *actually* execute a program on the other terminal, you would have to setup a program on that terminal to handle the launching, and a way to communicate with it from your current terminal (e.g. through a named pipe or socket)

You probably do not want to do exactly what you asked how to do.
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #3   (View Single Post)  
Old 23rd April 2009
ephemera's Avatar
ephemera ephemera is offline
Knuth's homeboy
Join Date: Apr 2008
Posts: 537

Or do you mean something like (assuming you are running xorg):

#! /bin/sh
xterm -e top &
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
start and stop KDE from shell ccc FreeBSD General 8 8th July 2010 10:12 PM
shell script with zenity bsdnewbie999 OpenBSD General 5 24th April 2009 02:37 AM
shell script compare md5 sum bsdnewbie999 Programming 1 11th April 2009 02:20 PM
Shell Script. bsdnewbie999 Programming 21 15th July 2008 07:54 AM
shell script with input c0mrade Programming 5 13th July 2008 04:33 AM

All times are GMT. The time now is 01:39 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick