Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #179290 > unrolled thread

zenity --text-info autoscrolling?

Started byJason <electron@emypeople.net>
First post2017-03-24 23:50 +0100
Last post2017-03-30 04:30 +0200
Articles 10 — 4 participants

Back to article view | Back to linux.debian.user


Contents

  zenity --text-info autoscrolling? Jason <electron@emypeople.net> - 2017-03-24 23:50 +0100
    Re: zenity --text-info autoscrolling? Jason <electron@emypeople.net> - 2017-03-26 01:00 +0100
      Re: zenity --text-info autoscrolling? <tomas@tuxteam.de> - 2017-03-26 12:20 +0200
        Re: zenity --text-info autoscrolling? rhkramer@gmail.com - 2017-03-26 13:50 +0200
          Re: zenity --text-info autoscrolling? Jason <electron@emypeople.net> - 2017-03-28 04:20 +0200
        Re: zenity --text-info autoscrolling? Jason <electron@emypeople.net> - 2017-03-28 04:40 +0200
    Re: zenity --text-info autoscrolling? Floris <jkfloris@dds.nl> - 2017-03-26 22:20 +0200
      Re: zenity --text-info autoscrolling? Jason <electron@emypeople.net> - 2017-03-28 04:20 +0200
        Re: zenity --text-info autoscrolling? Floris <jkfloris@dds.nl> - 2017-03-28 21:30 +0200
          Re: zenity --text-info autoscrolling? Jason <electron@emypeople.net> - 2017-03-30 04:30 +0200

#179290 — zenity --text-info autoscrolling?

FromJason <electron@emypeople.net>
Date2017-03-24 23:50 +0100
Subjectzenity --text-info autoscrolling?
Message-ID<toGbT-8nJ-1@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#179334

FromJason <electron@emypeople.net>
Date2017-03-26 01:00 +0100
Message-ID<tp3Lb-87u-5@gated-at.bofh.it>
In reply to#179290
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.


On Fri, 24 Mar 2017 17:33:06 -0500
Jason <electron@emypeople.net> wrote:

>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

[toc] | [prev] | [next] | [standalone]


#179351

From<tomas@tuxteam.de>
Date2017-03-26 12:20 +0200
Message-ID<tpdrb-6Rf-3@gated-at.bofh.it>
In reply to#179334
-----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-----

[toc] | [prev] | [next] | [standalone]


#179355

Fromrhkramer@gmail.com
Date2017-03-26 13:50 +0200
Message-ID<tpeQh-7N5-5@gated-at.bofh.it>
In reply to#179351
On Sunday, March 26, 2017 06:10:02 AM tomas@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.

[toc] | [prev] | [next] | [standalone]


#179508

FromJason <electron@emypeople.net>
Date2017-03-28 04:20 +0200
Message-ID<tpOTL-P6-7@gated-at.bofh.it>
In reply to#179355

On Sun, 26 Mar 2017 07:47:15 -0400
rhkramer@gmail.com wrote:

>On Sunday, March 26, 2017 06:10:02 AM tomas@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.


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

[toc] | [prev] | [next] | [standalone]


#179509

FromJason <electron@emypeople.net>
Date2017-03-28 04:40 +0200
Message-ID<tpPd8-VD-11@gated-at.bofh.it>
In reply to#179351

On Sun, 26 Mar 2017 12:10:02 +0200
<tomas@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

[toc] | [prev] | [next] | [standalone]


#179405

FromFloris <jkfloris@dds.nl>
Date2017-03-26 22:20 +0200
Message-ID<tpmNQ-52V-3@gated-at.bofh.it>
In reply to#179290
Op Fri, 24 Mar 2017 23:33:06 +0100 schreef Jason <electron@emypeople.net>:

> 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
>

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

[toc] | [prev] | [next] | [standalone]


#179507

FromJason <electron@emypeople.net>
Date2017-03-28 04:20 +0200
Message-ID<tpOTL-P6-5@gated-at.bofh.it>
In reply to#179405

On Sun, 26 Mar 2017 22:03:33 +0200
Floris <jkfloris@dds.nl> wrote:

>Op Fri, 24 Mar 2017 23:33:06 +0100 schreef Jason <electron@emypeople.net>:
>
>> 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
>>
>
>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

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

[toc] | [prev] | [next] | [standalone]


#179550

FromFloris <jkfloris@dds.nl>
Date2017-03-28 21:30 +0200
Message-ID<tq4Yy-3SP-27@gated-at.bofh.it>
In reply to#179507
Op Tue, 28 Mar 2017 04:03:20 +0200 schreef Jason <electron@emypeople.net>:

> On Sun, 26 Mar 2017 22:03:33 +0200
> Floris <jkfloris@dds.nl> wrote:
>
>> Op Fri, 24 Mar 2017 23:33:06 +0100 schreef Jason  
>> <electron@emypeople.net>:
>>
>>> 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
>>>
>>
>> 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
>
> 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
>

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

[toc] | [prev] | [next] | [standalone]


#179595

FromJason <electron@emypeople.net>
Date2017-03-30 04:30 +0200
Message-ID<tqy0x-7Ur-3@gated-at.bofh.it>
In reply to#179550
On Tue, 28 Mar 2017 21:26:43 +0200
Floris <jkfloris@dds.nl> wrote:

>Op Tue, 28 Mar 2017 04:03:20 +0200 schreef Jason <electron@emypeople.net>:
>
>> On Sun, 26 Mar 2017 22:03:33 +0200
>> Floris <jkfloris@dds.nl> wrote:
>>
>>> Op Fri, 24 Mar 2017 23:33:06 +0100 schreef Jason  
>>> <electron@emypeople.net>:
>>>
>>>> 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
>>>>
>>>
>>> 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
>>
>> 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
>>
>
>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

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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web