My goal is to have a shortcut on my Xfce desktop, pointing to a script file in my user folder. I would like the script file to copy all of the documents located within my Documents directory onto a USB thumb drive formatted with FAT 32. Also, at the moment, whenever I click on my desktop shortcut (copy_docs_usb.desktop) it opens up a new terminal and it carries out the script, but it also seems that not all of the folders and documents located with my user Documents directory are getting backed up onto the usb.
In other words, If I become root and run the script from within a terminal, without clicking on, copy_docs_usb.desktop, I seem to get slightly different results. So, I'm thinking that I need to modify my desktop file so that it somehow asks for the super user password before it actually tries to carry out the script I have created.
Below is what I have inside the desktop file on my desktop.
Also, below is what I have within the script file I use to copy my documents to a USB.
So I would like to be able to click on my desktop file, and then have a terminal open up, I enter my su password, and then it carries out the backup for me. I feel like I'm close, but I seem to have confused myself once again.
In other words, If I become root and run the script from within a terminal, without clicking on, copy_docs_usb.desktop, I seem to get slightly different results. So, I'm thinking that I need to modify my desktop file so that it somehow asks for the super user password before it actually tries to carry out the script I have created.
Below is what I have inside the desktop file on my desktop.
Code:
[Desktop Entry]
Version=1.0
Type=Application
Name=copy_docs_usb
Comment=copy user and system folders to backup
Exec=/home/Simon/Temp/copy_docs_usb.sh
Icon=process-completed
Terminal=true
StartupNotify=false
Categories=Utility;
Path=
GenericName=short cut to script file for backups
# EOF
Also, below is what I have within the script file I use to copy my documents to a USB.
Code:
#!/bin/sh
# USING RSYNC TO BACKUP AND RESTORE SYSTEM DIRECTORIES
# +++ Copy docs to backup usb +++
rsync -r -v --progress -l -H -b -s /home/Simon/Documents /media/BACKUPUSB
echo "Script finished."