#!/bin/sh
xfce4-terminal
zenity --info
exit
Expected behavior on my Xfce4 desktop when the script is run (via a keyboard shortcut) is that the Terminal window appears. Only when I close same should the Zenity window then appear.
Normally, this is exactly what happens. However, if I first open an Xfce4 Terminal window on the desktop, then command the subject script (again, via a keyboard shortcut), another terminal window appears (as expected), but, simultaneously, so does the Zenity window. This is undesired behavior.
The same type of thing happens for this script:
#!/bin/sh
jedit file.txt
zenity --info
exit
but, only if another Jedit window happens to be open on the desktop when I command the script.
I have tried many things, including the wait command and appending the terminal and jedit linesline with &&. Nothing is working for me.
What is causing this to happen and how can I remedy it?