in reply to rsync with Gtk2 progressbar

Hello, I realise this article is over four years old but would you be able to help me change the script to remove the confirmation dialog so that the script runs without an option to start/confirm/cancel? Basically I would just like this to show an overall progress of the rsync process in a progress bar. Actually, even better than that would be if individual file trasnfers could be shown with a progress bar. Is that possible? Sorry but my programming skills are non-existent! Any help you could offer would be very much appreciated. thanks

Replies are listed 'Best First'.
Re^2: rsync with Gtk2 progressbar
by zentara (Cardinal) on Oct 21, 2009 at 16:46 UTC
    hi, i've been out of commission for a bit, but if you still need help, answer this, and I'll show you how.... it's easy..... it would help if you had a real perlmonks user account

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku
      Hi, Thanks for the reply. I would really appreciate your help on how to modify the script but I don't know where to start!
        hi, well anonymous monk's reply below to set a scalar to 'redrum' would work, but it is about the ugliest hack you can use..... and since you don't know much about programming, i don't want to let you go off thinking that programming is some sort of black magic.....

        i will give you a simple lesson, and it may just start you off on a new gtk2 project of your own.

        ....read thru the code.... it explains what is happening...... what you want to do, is make a backup copy of the script.... and start hacking on your temp copies as you experiment and discard them

        ....look for the word "getconfirmation".... it is a subroutine which you must disable....either by faking a return value (redrum), or better, remove all code from the script that deals with the confirmation window

        .... the getconfirmation sub uses some internal gtk tokens like 'ok' to pass the status of the pipe running rsync...... so play around......comment out lines......if you get error messages, check out what you did and what lines you just commented out

        if you totally fubar a script copy, just discard it and start over from your master copy

        .... or just use the 'redrum' hack...... ;-)

        ... a great tutorial for this is at tutorial

        all work and no play makes zentara a dull boy all work and no play makes zentara a dull boy all work and no play makes zentara a dull boy all work and no play makes zentara a dull boy all work and no play makes zentara a dull boy all work and no play makes zentara a dull boy all work and no play makes zentara a dull boy

        I'm not really a human, but I play one on earth.
        Old Perl Programmer Haiku
        Replace
        my $confirm = &getconfirmation( $count, $totsize );
        with
        my $confirm = 'redrum';