Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

zenity --text-info autoscrolling?

566 views
Skip to first unread message

Jason

unread,
Mar 24, 2017, 6:50:03 PM3/24/17
to
In interactive shell scripts I like piping output into zenity --text-info for display. If
the output is more than fits in the zenity window, any additional lines will be too far
down to display unless the user manually scrolls down to the bottom of the text.

Does anyone know if there is a way to tell zenity to automatically scroll down as lines
are added so that the last lines are always visible? This way the output of the current
action would be displaying at the bottom of the zenity dialog box, instead of not being
visible.

Using zenity 3.4.0-2 on Debian 8.1.

--
Thanks.
Jason

Jason

unread,
Mar 25, 2017, 8:00:03 PM3/25/17
to
Okay, if no one knows how to make zenity --text-info auto-scroll, what other suggestions
would you have for displaying output of a shell script that is able to show the output of
the current operation but with the option to scroll up to see previous lines?

As an example of what I have in mind, I use rsync to make file backups and pipe the output
into zenity (--text-info) to show what is being done. The only problem is that you have
to keep scrolling down manually to see the last entry, which is not very convenient.

Thanks for any help.

to...@tuxteam.de

unread,
Mar 26, 2017, 6:20:03 AM3/26/17
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, Mar 25, 2017 at 06:51:06PM -0500, Jason wrote:
> Okay, if no one knows how to make zenity --text-info auto-scroll, what other suggestions
> would you have for displaying output of a shell script that is able to show the output of
> the current operation but with the option to scroll up to see previous lines?
>
> As an example of what I have in mind, I use rsync to make file backups and pipe the output
> into zenity (--text-info) to show what is being done. The only problem is that you have
> to keep scrolling down manually to see the last entry, which is not very convenient.

I gave up zenity since long, and whenever I've to cobble up a small
GUI I went back to... Tcl/Tk.

If you are interested, I could improvise something to get you started,
but perhaps it leads you too far away from your comfort zone.

Let me know.

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAljXk3oACgkQBcgs9XrR2kZIdQCePE4sFmCLNqjM73wI+76tTvCG
4ScAnRg4je5XkeDXHJsh+QSLlQ39CTil
=4Fmv
-----END PGP SIGNATURE-----

rhkr...@gmail.com

unread,
Mar 26, 2017, 7:50:03 AM3/26/17
to
On Sunday, March 26, 2017 06:10:02 AM to...@tuxteam.de wrote:
> On Sat, Mar 25, 2017 at 06:51:06PM -0500, Jason wrote:
> > Okay, if no one knows how to make zenity --text-info auto-scroll, what
> > other suggestions would you have for displaying output of a shell script
> > that is able to show the output of the current operation but with the
> > option to scroll up to see previous lines?
> >
> > As an example of what I have in mind, I use rsync to make file backups
> > and pipe the output into zenity (--text-info) to show what is being
> > done. The only problem is that you have to keep scrolling down manually
> > to see the last entry, which is not very convenient.
>
> I gave up zenity since long, and whenever I've to cobble up a small
> GUI I went back to... Tcl/Tk.
>
> If you are interested, I could improvise something to get you started,
> but perhaps it leads you too far away from your comfort zone.

Jason,

I don't know what you're doing exactly, but I'm tempted to suggest you simply
use the non-GUI command line within something like a KDE konsole with tools
like tail -f. Yoiu could open (at least) two tabs, one to display the output
(with tail -f or not--you can scroll within a konsole tab) and the 2nd to
enter commands.

If that sounds interesting, tell us more about what you're trying to do and
I'm sure I or someone else can give you useful (that might come from someone
else ;-) advice.

Floris

unread,
Mar 26, 2017, 4:20:04 PM3/26/17
to
Op Fri, 24 Mar 2017 23:33:06 +0100 schreef Jason <elec...@emypeople.net>:
perhaps you can use yad, a fork of zenity, with the tail option:
https://packages.debian.org/sid/yad

$ yad --help-text
Usage:
yad [OPTION...] - Yet another dialoging program

Text information options
--text-info Display text information
dialog
--fore=COLOR Use specified color for
text
--back=COLOR Use specified color for
background
--wrap Enable text wrapping
--justify=TYPE Set justification (left,
right, center or fill)
--margins=SIZE Set text margins
--tail Autoscroll to end of text
--show-cursor Show cursor in read-only
mode
--show-uri Make URI clickable
--uri-color=COLOR Use specified color for
links


success,

floris

Jason

unread,
Mar 27, 2017, 10:20:03 PM3/27/17
to
I have several different applications in mind, one of them is an automated backup of a
user's files using rsync in a shell script. The user triggers the script (possibly
using a desktop icon; no terminal or CLI involved) and is given the option to select which
external drive to use as the backup destination, and then rsync runs and dumps its output
into the zenity dialog, giving the user feedback of which files are being copied.

This is not a high priority problem, I just thought it would be nice to always have the
last lines visible instead of needing to manually scroll to the bottom.

Thanks for your reply.
Jason

Jason

unread,
Mar 27, 2017, 10:20:03 PM3/27/17
to
Thanks for the suggestion; it sounds like something that would work. Unfortunately, I
must work with something that already exists on my target systems (zenity does but not
yad) as it is not an option to add programs on some of these systems. Of course, you
could not know that as I had not stated it in my original post.

Thanks for your reply!
Jason

Jason

unread,
Mar 27, 2017, 10:40:04 PM3/27/17
to


On Sun, 26 Mar 2017 12:10:02 +0200
<to...@tuxteam.de> wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>On Sat, Mar 25, 2017 at 06:51:06PM -0500, Jason wrote:
>> Okay, if no one knows how to make zenity --text-info auto-scroll, what other
>> suggestions would you have for displaying output of a shell script that is able to
>> show the output of the current operation but with the option to scroll up to see
>> previous lines?
>>
>> As an example of what I have in mind, I use rsync to make file backups and pipe the
>> output into zenity (--text-info) to show what is being done. The only problem is that
>> you have to keep scrolling down manually to see the last entry, which is not very
>> convenient.
>
>I gave up zenity since long, and whenever I've to cobble up a small
>GUI I went back to... Tcl/Tk.
>
>If you are interested, I could improvise something to get you started,
>but perhaps it leads you too far away from your comfort zone.

I am interested, but my free time is limited and I'm not sure where my position would be
on the learning curve. If you would be willing to give me an example of what is involved,
I might play with it a little to see if I think it is something I could learn how to use
without too many sleepless nights. :)

If you don't want to take the time, though, that's fine too as this is not of high
importance.
>
>Let me know.
>
>Regards
>- -- tomás
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.4.12 (GNU/Linux)
>
>iEYEARECAAYFAljXk3oACgkQBcgs9XrR2kZIdQCePE4sFmCLNqjM73wI+76tTvCG
>4ScAnRg4je5XkeDXHJsh+QSLlQ39CTil
>=4Fmv
>-----END PGP SIGNATURE-----

Thanks,
Jason

Floris

unread,
Mar 28, 2017, 3:30:04 PM3/28/17
to
Op Tue, 28 Mar 2017 04:03:20 +0200 schreef Jason <elec...@emypeople.net>:
Is it possible to update to version 3.12 or higher?
https://download.gnome.org/sources/zenity/3.12/zenity-3.12.1.news
Zenity 3.12.1
...
- Bug #667711 - man page points to nonexisting doc (Arx Cruz)
- Bug #600533 zenity --text-info should have an auto scroll option
(Arx Cruz)
- Bug #534935 Need hability to specify default answer in
--question dialog (Berislav Kovacki)
...

Floris

Jason

unread,
Mar 29, 2017, 10:30:04 PM3/29/17
to

On Tue, 28 Mar 2017 21:26:43 +0200
That is the answer I needed - now using version 3.14.0 and auto-scroll works!
(As an aside, I did not actually install the package but just extracted
the zenity binary from its .deb and it executes fine on a system that only
has version 3.4.0 officially installed.)

Thanks all!
Jason
0 new messages