Piped Child to Yad --text-info box. Lots more coming.

884 views
Skip to first unread message

Yad Bash-Bobby

unread,
Nov 16, 2017, 5:38:11 PM11/16/17
to yad-common
Hi Victor and all, I first would like to Thank Victor for adding the --tail option to Yad because without it, I would not be making this post of my success to Redirect Yad (Parent Shell) back to same "Yad Parent Shell --text-info". Yes, you can now run commands from Yad and they diplay standard output in the same Yad Gui window. And, it only requires one Child process to  monitor a log file.... that's it. !!

Watch my video about what I mean. https://www.youtube.com/watch?v=stPAWGXQyLY 

History: 

It is very easy to do this Parent -> Child redirect with bash. Parent --> (Simultaneous Child + Coprocess sub-shels "Bash 4.0+) --> Child --> Coprocess --> Parent) and that is 3 processes.

I tried for a long time different ways using bash & Zenity  to parent --> Child --> Zenity --text-info but, scroll would not work.  finally took the time to use only Yad for my scripts about 2 months ago.

I could never get bash to worked the same way i got it to work with Zenity until last night when I changed the background color of a zenity window and executed all yad code except with Zenity window.  Odd. The code that gets generated from bash to Yad is white in color ? Very odd. When the background was black I could see that my redirect was successful for only the first letter or word until it received as white space in the code. It only took ne a few hours to debug that and the code even got simpler. 

I know, this is not an earth shattering story of success but, it is too me for I have spent the last 2 years trying to simplify the Bash --> YAD GUI --> Child--output--> Yad --text-info window.  I had ready many requests for this option and no replies. Others suggested a new --option for Yad so it was possible. Well, no need for a new --option and I will pass the code on next week after I decide how I want my code to interact with a module system for an easy Linux User interface.

I am hoping that this new process of Yad output to Parent Yad GUI will get more people to switch to using Yad. This process is not possible in Zenity as it does not have the final option of --tail but, yad does. The Zenity display can not auto scroll the Zentity window.

Again, Thank You Victor for making Yad GUI as this will be the tool that gets Millions of people to finally exit windows; finally its going to happen.

Robert Mesibov

unread,
Nov 17, 2017, 5:52:03 PM11/17/17
to yad-common
Could you please post a simple script which demonstrates the 3-process sequence?

Yad Bash-Bobby

unread,
Nov 18, 2017, 12:33:17 AM11/18/17
to yad-common
On Friday, November 17, 2017 at 2:52:03 PM UTC-8, Robert Mesibov wrote:
Could you please post a simple script which demonstrates the 3-process sequence?

 export imageDir="$HOME/yadbash/images/ui"
export programDir="$HOME/yadbash/post-install-ui"

fkey=$(($RANDOM * $$))

yad --plug="$fkey" --form --tabnum=1 --columns=1 \
  --image="$imageDir/post-installer-ui-banner-software750x100.jpg"  \
--column="Name" \
--expand-column=1 &> res1 &

yad --plug="$fkey" --tabnum=2 --columns=2 --text-info --filename="$programDir/list/software-info.txt" \
--column="Name" \
--expand-column=1  &

yad --paned --key="$fkey" --tab="Softwer" --tab="Programs" --columns=8 --title"Post Q4OS" Linux Installer --center --width=800 --height=600 \
--button="close":1

ret=$?
[[ $ret -eq 1 ]] && exit

exit 1

Yad Bash-Bobby

unread,
Nov 18, 2017, 12:38:04 AM11/18/17
to yad-common
Both video and image below are --paned.  2 tabnum  Only 2 tabnum possible with --paned dialog. More possible with --notebook. 

https://www.youtube.com/watch?v=M-UgsZ8GfGE

Yad Bash-Bobby

unread,
Nov 18, 2017, 12:46:52 AM11/18/17
to yad-common
On Friday, November 17, 2017 at 2:52:03 PM UTC-8, Robert Mesibov wrote:
Could you please post a simple script which demonstrates the 3-process sequence?

This is what the --notebook dialog looks like. I only change --paned to --notebook.  



Reply all
Reply to author
Forward
0 new messages