I found this script online
Code: Select all
#! /bin/bash
[ -z $GTKDIALOG ] && GTKDIALOG=gtkdialog
MAIN_DIALOG='
<window>
<vbox>
<edit>
<variable>EDITOR</variable>
<height>150</height>
<width>350</width>
<sensitive>true</sensitive>
<input file>/opt/read.txt</input>
<action signal="refresh">/opt/read.txt</action>
</edit>
<hbox>
<button cancel></button>
<button ok></button>
</hbox>
</vbox>
</window>
'
export MAIN_DIALOG
case $1 in
-d | --dump) echo "$MAIN_DIALOG" ;;
*) $GTKDIALOG --program=MAIN_DIALOG ;;
esac
If the file opt/read.txt changes, it also changes in box "edit" too
Example
I am doing this console
# echo " now is Friday---" >>opt/read.txt
then,, I want to see the line automatically inserted "now is Friday---", in box "edit" too (( As with Xdialog --tailbox ))
the line
<action signal="refresh">/opt/read.txt</action>
not working
I use Puppy Slacko, and learn very little programming
excuseme my english
Thanks