1. LINUX EUPHORIA QUESTION ?

If I start a exu program running from the command line or clicking on
it's icon, how do I get a terminal window to open so I can puts() to
that window.


Bernie

My files in archive:
w32engin.ew mixedlib.e eu_engin.e win32eru.exw

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

new topic     » topic index » view message » categorize

2. Re: LINUX EUPHORIA QUESTION ?

Bernie Ryan wrote:
> 
> 
> If I start a exu program running from the command line or clicking on
> it's icon, how do I get a terminal window to open so I can puts() to
> that window.
> 
> 
> Bernie
> 
> My files in archive:
> w32engin.ew mixedlib.e eu_engin.e win32eru.exw
> 
> Can be downloaded here:
> <a
> href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan</a>

Hi

Whenever you start a linux program, it always runs with a console, you just
cannot see it.

The program is linked to that console that you run it from, unless you
specifically
separate it (with the &) - ie the program forms a child process.

You can see this in effect by starting an xterm, and looking for its PID,
then starting a euphoria program, without the &, and then either killing the
xterm with kill, xkill or jut clicking the x, the program started from that
terminal will also die.

If you run the eu program from a terminal, it will puts to that terminal
as its standard out.

What I suspect you are doing is starting a program from the file manager,
or from a created program icon. In actual fact a console is started, its
just that you haven't set the manager or the icon parameters to show the
console when the program starts. All puts' will go to the console, just
won't be seen.

For instance, on my SuSE KDE, I right click on the icon to get the 
properties, and on one of the tabs is a check box that says 'Run in terminal'
or similar.

There will be similar properties when you set up the file manager to run
exu programs.

Any help?

Chris

new topic     » goto parent     » topic index » view message » categorize

3. Re: LINUX EUPHORIA QUESTION ?

ChrisBurch2 wrote:
> Hi
> 
> Whenever you start a linux program, it always runs with a console, you just
> cannot see it.
> 
> The program is linked to that console that you run it from, unless you
> specifically
> separate it (with the &) - ie the program forms a child process.
> 
> You can see this in effect by starting an xterm, and looking for its PID,
> then starting a euphoria program, without the &, and then either killing the
> xterm with kill, xkill or jut clicking the x, the program started from that
> terminal will also die.
> 
> If you run the eu program from a terminal, it will puts to that terminal
> as its standard out.
> 
> What I suspect you are doing is starting a program from the file manager,
> or from a created program icon. In actual fact a console is started, its
> just that you haven't set the manager or the icon parameters to show the
> console when the program starts. All puts' will go to the console, just
> won't be seen.
> 
> For instance, on my SuSE KDE, I right click on the icon to get the 
> properties, and on one of the tabs is a check box that says 'Run in terminal'
> or similar.
> 
> There will be similar properties when you set up the file manager to run
> exu programs.
> 
> Any help?
> 

Chris:

   I have developed code that allows a Euphoria user to write
   and use X-Windows, XT (Intrinsic Toolkit, Xaw & Xaw-3d Athena Widgets,
   and Motif Widgets.
   I am writing a pure X-Window demo that has some buttons to execute
   system calls like system("date",2) which send date text to the console.
   The text appears when I run in terminal mode because of course the the
   terminal is already open.
   If the demo is started from the run command the text goes to the
   hidden console like you say. What concerns me is a less knowledgable
   user will think the demo doesn't work. So I was trying to find a way
   to make the console visible when the program is run without depending
   on the users knowledge. I can open a xterm terminal but I don't
   know how to change it be used as standard out.

Bernie

My files in archive:
w32engin.ew mixedlib.e eu_engin.e win32eru.exw

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

new topic     » goto parent     » topic index » view message » categorize

4. Re: LINUX EUPHORIA QUESTION ?

Hi

Quick experiment.

Open two terminals.

In each termianl type ps - this will give you the console name of each terminal

eg, two terms ps gives
29250 pts/198 00:00:00 ps

and
29322 pts/199 00:00:00 ps

in second terminal (pts/199) type 
echo "Hi" > /dev/pts/198

This should send Hi from 199 to 198

Perhaps you could use this to open a console, use ps to get the terms name,
etc.

Chris


http://members.aol.com/chriscrylex/euphoria.htm
http://uboard.proboards32.com/
http://members.aol.com/chriscrylex/EUSQLite/eusql.html

new topic     » goto parent     » topic index » view message » categorize

5. Re: LINUX EUPHORIA QUESTION ?

Chris Burch wrote:
> 
> Hi
> 
> Quick experiment.
> 
> Open two terminals.
> 
> In each termianl type ps - this will give you the console name of each
> terminal
> 
> eg, two terms ps gives
> 29250 pts/198 00:00:00 ps
> 
> and
> 29322 pts/199 00:00:00 ps
> 
> in second terminal (pts/199) type 
> echo "Hi" > /dev/pts/198
> 
> This should send Hi from 199 to 198
> 
> Perhaps you could use this to open a console, use ps to get the terms name,
> etc.


Thanks Chris and Guillermo !

  What I finally did was:
 
system(" xterm -C +sb -title \"MOTOR'S X-WINDOW DEMO\" &", 2)
  system(" date >/dev/console",2)
  


 

Bernie

My files in archive:
w32engin.ew mixedlib.e eu_engin.e win32eru.exw

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu