Xfce Forum

Sub domains
 

You are not logged in.

#26 2020-11-05 10:35:56

darmstadt
Member
Registered: 2020-10-26
Posts: 15

Re: Problems passing variables in xfce4-terminal

Running testrex2 manually with parameters works fine, the 3rd party application starts with the parameters passed to it. Also running, as alluded to in my previous post:

xfce4-terminal -x /home/ibmsys1/testrex2 sys01 openwebif 1000

Also works in that the 3rd party application is started but a new terminal window doesn't seem to open which is of no help. I modified the script so that there is a 'sleep 30' before starting the application and, yes, a terminal is actually opened and parameters are passed:

3 *-* Say 'Starting testrex2'
       >L>   "Starting testrex2"
Starting testrex2
     4 *-* Parse Arg parms
       >>>   "sys01 openwebif 1000"
     5 *-* Parse Var parms system profile ipl_addr
       >V>   "sys01 openwebif 1000"
       >>>   "sys01"
       >>>   "openwebif"
       >>>   "1000"
     6 *-* Say 'The following parameters were sent:' system profile ipl_addr
       >L>   "The following parameters were sent:"
       >V>   "sys01"
       >O>   "The following parameters were sent: sys01"
       >V>   "openwebif"
       >O>   "The following parameters were sent: sys01 openwebif"
       >V>   "1000"
       >O>   "The following parameters were sent: sys01 openwebif 1000"
The following parameters were sent: sys01 openwebif 1000
     7 *-* cmd = 'sleep 60'
       >L>   "sleep 60"
     8 *-* cmd
       >V>   "sleep 60"

Once the application is started the terminal window closes whereas previously it stayed open. So it works up to a point, it's just the terminal window now closes...

Last edited by darmstadt (2020-11-05 10:36:51)

Offline

#27 2020-11-05 11:59:21

Signy
Member
Registered: 2020-10-20
Posts: 35

Re: Problems passing variables in xfce4-terminal

darmstadt wrote:

Once the application is started the terminal window closes whereas previously it stayed open. So it works up to a point, it's just the terminal window now closes...

I am sorry, I do not see any reason why trying running the testrex2 script in a newly opened terminal window. The problem is probably inside the testrex2 script. For testing should be enough to run the script in manually opened window - so you do not have to bother with -H parameter or with sleep command - you can see the script's behaviour right inside your window.

Just to be sure, the 3rd party application is command line application which if you run manually in manually opened window it works well?
And are you able to run another command (like ssh) from the testrex2 interactively?

Is it possible that the testrex2 command runs the 3rd party application as a separate concurrent process independent on the script? That would explain the case when an application is started from interpeter (in this case rexx) but after that the script itself does not wait till the application is finished and goes on till its end.

Offline

#28 2020-11-05 12:51:35

darmstadt
Member
Registered: 2020-10-26
Posts: 15

Re: Problems passing variables in xfce4-terminal

How about explaining it like this, and how it has worked perfectly until the latest version of XFCE:

- GUI application starts
- User makes selection of parameters
- testrex1 is executed to validate parameters
- testrex1 then executes testrex2 by using the command

"xfce4-terminal --geometry 81x17-0-25 --hide-menubar --working-directory=/home/user01 -T 'Start Virtual OS' -I /home/user01/images/logos.gif  -x /home/user01/testrex2" various_parameters

- testrex2 starts the application inside this terminal and passes these parameters to the application. This, as can be seen from the above command runs in a terminal window allowing users to enter commands which can either be passed to the application (such as quit which will stop it and close the terminal window) or directly to Linux

If the terminal window is closing immediately after being opened, then this of no use to anyone. If the parameters are not being passed to the application as was originally happening, then the application will not start.

I am building a new test environment to fully debug this so I can see clearly why this is happening although I have seen similar on Ubuntu systems.

Offline

#29 2020-11-05 13:54:59

Signy
Member
Registered: 2020-10-20
Posts: 35

Re: Problems passing variables in xfce4-terminal

darmstadt wrote:

How about explaining it like this, and how it has worked perfectly until the latest version of XFCE:

- GUI application starts
- User makes selection of parameters
- testrex1 is executed to validate parameters
- testrex1 then executes testrex2 by using the command

"xfce4-terminal --geometry 81x17-0-25 --hide-menubar --working-directory=/home/user01 -T 'Start Virtual OS' -I /home/user01/images/logos.gif  -x /home/user01/testrex2" various_parameters

- testrex2 starts the application inside this terminal and passes these parameters to the application. This, as can be seen from the above command runs in a terminal window allowing users to enter commands which can either be passed to the application (such as quit which will stop it and close the terminal window) or directly to Linux

If the terminal window is closing immediately after being opened, then this of no use to anyone.

Well, but our previous tests proved, that this part works on your system well. The window closes immediately only if there is nothing to happen inside it (and if there is not the -H parameter preventing the its closing).

darmstadt wrote:

If the parameters are not being passed to the application as was originally happening, then the application will not start.

Yes, but we have already proved, that passing parameters works (it is the last test in your post #20).

So we have already tested the chain of commands until the moment where testrex2 runs the 3rd party application, which is probably the line

"VMStart" profile

from your post #24.
I tested the same situation (just with "ssh" profile instead of your "VMStart" profile) and it worked well.
Can you, please, look at my post #27 and:

  • Test if you can successfully run your application (probably VMStart) with manually placed parameters in a manually opened window?

  • Test if you can run another interactive commandline application with some parameters in the script testrex2? Something like I did in my post #25 with ssh. In this case you should be able to see wheter the application runs interactively in the window or it runs separately in background.

Offline

#30 2020-11-06 11:06:20

darmstadt
Member
Registered: 2020-10-26
Posts: 15

Re: Problems passing variables in xfce4-terminal

Thanks for all your help, problem resolved. I built 2 VMs, one which replicated the older version of Linux, REXX and XFCE and one with the latest versions of all of them. I put in a number of traces in the application and could see that on the older version, everything worked fine but on the newer version there were problems. The parameters were being passed but for some strange reason, were being dropped later on when being evaluated. By changing the Rexx code, this problem was fixed which makes us think that it is a Regina-REXX problem between the 2 versions especially when the compiled version using the newer Rexx version does work. now to go through a number of release notes

Just want to say thanks very much for your help...

Offline

#31 2020-11-06 15:51:41

alcornoqui
Member
Registered: 2014-07-28
Posts: 763

Re: Problems passing variables in xfce4-terminal

Impressive sleuthing! Thank you Signy and darmstadt.

Offline

#32 2020-11-07 07:29:41

Signy
Member
Registered: 2020-10-20
Posts: 35

Re: Problems passing variables in xfce4-terminal

You are welcome darmstadt, I am glad that the problem is solved.

Offline

Board footer

Powered by FluxBB