[ubuntu-uk] Shell script .....

Tyler J. Wagner tyler at tolaris.com
Thu Dec 2 11:35:29 GMT 2010

On Thu, 2010-12-02 at 11:14 +0000, Barry Drake wrote:
> I wrote a little script for doing an rsync to a second hard drive.  It
> goes like this:
> #/bin/bash
> rsync -r /home/barry /media/hda1/backups/barry_pc | tee >(zenity
> --progress --pulsate --text="Backing up files ....") >backup_log.txt
> killall zenity
> zenity --info --text="Backup completed sucessfully"
> This works fine if I run it from a terminal, but if I try to run it from
> a desktop launcher or (preferred) run it as a startup program, it fails
> to do anything - doesn't launch at all.  If the script is altered to:
> #/bin/bash
> rsync -r /home/barry /media/hda1/backups/barry_pc
> zenity --info --text="Backup completed sucessfully"

I suspect that rsync --progress --pulsate requires a real
pseudo-terminal to be allocated. If you run this from a launcher without
the "open in a shell" option, at least the rsync command while fail.

You could do something like:

screen rsync ...

To launch the command inside a terminal emulator.


"Scientific theories can be altered by publishing a paper with
reproducible results, and political principles can be changed every two
to four years with an election, but if you want to change religious
principles you usually have to wait for a whole generation of clergy
to die."
   -- Soren Ragsdale

More information about the ubuntu-uk mailing list