I have following command line embedded on a desktop icon and a script. They work for me, burning a CD from pre-set directories and added directories.
xterm -hold -T "CDMaker by satimis" -e "su -c /path/to/cdmake"
# Set ISO filename...
# Loop to get directories...
echo "Enter directories to burn. Leave blank to end list"
until [ -z $entry ]; do
echo -n "Enter a directory: "
if [ $entry != "" ]; then
# Create ISO file...
mkisofs -R -o "$ISO_File" -l -graft-points -hide-rr-moved
# Burn ISO file to disc
cdrecord dev=ATA:0,0,0 -v -eject $ISO_File
# Remove ISO file
- END -
Steps taken as follow;
1)Clicking the icon starting xterm
2)Enter password to login as root
3)Enter further directories, if any, with corresponding path in the form of /Dir_AAA/=/path/to/Dir_AAA, etc. (cdrecord format). (If no further entry just hit to continue)
are permanently added.
Then the script will take care of the rest and a CD is burnt finally.
Now I need to re-edit;
1)The command line as
xterm -hold -T "CDMaker by satimis" -e /path/to/cdmake"
Let the script to handle login as root to execute commands on background.
2)Re-edit the script to perform
Login as root after ISO_File created because USER is not allowed to burn CD.
(I don't want to add USER to the wheel using this route. Hoping to learn more on script)
Re-edit the script to perform following steps.
The script is evoked by the revised command line
are added, confirmation is now required. It will pop up for entry of yes or no. If yes they will be added. If no they will not be added. The script will continue to next command asking for adding of further directory/directories with corresponding path.
are still added on the script
After an ISO_file created, it will continue to login as root asking for input of root password.
After a CD burnt, xterm will close. I'll remove the option -hold later to get it done.
I have tried several days re-editing the script with following syntax
read -p "Add /home/satimis/Document/ ?"
if [ "$REPLY" = "yes" ]; then
# do stuff
I could not make any progress. I'm searching for some guide line where to start, where to care, etc. Becasue changing any syntax on the script may affect another command.
I'm only about 7 day old on Bash programming.
Please advise. TIA