diff -ur src.orig/idvid src/idvid
--- src.orig/idvid	2010-05-18 01:07:34.000000000 -0500
+++ src/idvid	2010-09-13 19:32:55.000000000 -0500
@@ -203,7 +203,7 @@
     # (ID_V(ideo), ID_A(udio), and ID_L(ength))
     # Grep out special characters ()[
     # # put the VARS in a file
-    grep "^ID_[VAL]" < "$SCRATCH_FILE"   | grep -v "[()\[]" | sed 's/$/"/;s/=/="/' > "$SCRATCH_FILE".vars
+    grep "^ID_[VAL]" < "$SCRATCH_FILE"   | grep -v "[()\[]" | gsed 's/$/"/;s/=/="/' > "$SCRATCH_FILE".vars
     # source the file to set the variables
     . "$SCRATCH_FILE".vars
     # (If you've got a problem with eval, give me an alternative that
@@ -237,17 +237,17 @@
     # Find out which channel is the video channel ( 1st )
     # TODO Do we want to worry about videos with multiple channels of video ?
     VIDEO_INFO=$(grep "Video:" "$SCRATCH_FILE")
-    ID_VIDEO_TRACKS=( $(sed -r 's/.*Stream #([0-9]\.[0-9]+).*/\1/' <<< "$VIDEO_INFO") )
+    ID_VIDEO_TRACKS=( $(gsed -r 's/.*Stream #([0-9]\.[0-9]+).*/\1/' <<< "$VIDEO_INFO") )
     ID_VIDEO_TRACK="${ID_VIDEO_TRACKS[0]}"
     # Find out what audio channels are available
     if test -n "$ID_AUDIO_ID"; then
         AUDIO_INFO=$(grep "Audio:" "$SCRATCH_FILE")
         # ID_AUDIO_ID needs "TRACKS" var to remain in columns
-        TRACKS=$(sed -r 's/.*Stream #([0-9]\.[0-9]+).*/\1/' <<< "$AUDIO_INFO")
+        TRACKS=$(gsed -r 's/.*Stream #([0-9]\.[0-9]+).*/\1/' <<< "$AUDIO_INFO")
         A_TRACKS=(${TRACKS//$'\n'/ })
         # Get hexadecimal track IDs, if present
         if grep -q "\[0x[0-9a-fA-F]*]" <<< $AUDIO_INFO; then
-            HEX_TRACKS=$(sed -r 's/Stream .*\[0x([0-9a-fA-F]*)]:.*$/\1/' <<< "$AUDIO_INFO")
+            HEX_TRACKS=$(gsed -r 's/Stream .*\[0x([0-9a-fA-F]*)]:.*$/\1/' <<< "$AUDIO_INFO")
             HEX_TRACKS=(${HEX_TRACKS//$'\n'/ })
             USE_HEX_TRACKS=:
         else
@@ -257,15 +257,15 @@
         for ((i=0; i<${#A_TRACKS[@]}; i++)); do
             CUR_CHAN=$(grep "Stream #${A_TRACKS[i]}" <<< "$AUDIO_INFO")
             A_SAMPRATES=("${A_SAMPRATES[@]}" "$(echo $CUR_CHAN | \
-                sed -r 's/.* ([0-9]+) Hz.*/\1/')")
+                gsed -r 's/.* ([0-9]+) Hz.*/\1/')")
             A_BITRATES=("${A_BITRATES[@]}" "$(echo $CUR_CHAN | \
-                sed -r 's/.* ([0-9]+) kb\/s.*/\1/')")
+                gsed -r 's/.* ([0-9]+) kb\/s.*/\1/')")
             # make sure the above is a number, else set  A_BITRATE to 0
             if ! test_is_number ${A_BITRATES[i]}; then
                 A_BITRATES[i]=0
             fi
             A_CODECS=("${A_CODECS[@]}" "$(echo $CUR_CHAN | \
-                sed -r 's/.*Audio: ([^,]+),.*/\1/')")
+                gsed -r 's/.*Audio: ([^,]+),.*/\1/')")
                 if $USE_HEX_TRACKS; then
                 MP_TRACKNUM=$((16#${HEX_TRACKS[i]}))
             else
@@ -296,7 +296,7 @@
                 if grep -q 5:1 <<<  ${AUDIO_NCH[chn]}; then
                     ID_AUDIO_NCH[chn]=6
                elif grep -q channels <<< ${AUDIO_NCH[chn]}; then
-                    ID_AUDIO_NCH[chn]=$(sed -r 's/.* ([0-9]+) channels.*/\1/' \
+                    ID_AUDIO_NCH[chn]=$(gsed -r 's/.* ([0-9]+) channels.*/\1/' \
                     <<< ${AUDIO_NCH[chn]})
                 else
                     ID_AUDIO_NCH[chn]=2
@@ -336,7 +336,7 @@
     else
         # Infer aspect ratio from width/height of mplayer playback
         MPLAYER_RES=$(grep '^VO:' "$SCRATCH_FILE" | \
-            sed -e "s/..*=> *//g" -e "s/ .*$//g")
+            gsed -e "s/..*=> *//g" -e "s/ .*$//g")
         #PLAY_WIDTH=$(echo $MPLAYER_RES | awk -F 'x' '{print $1}')
         #PLAY_HEIGHT=$(echo $MPLAYER_RES | awk -F 'x' '{print $2}')
         # patch from ML:
@@ -351,7 +351,7 @@
     fi
     # Normalized aspect ratio
     V_ASPECT_RATIO=$(echo $V_ASPECT_WIDTH | \
-    sed -r -e 's/([0-9]*)([0-9][0-9])/\1.\2:1/g')
+    gsed -r -e 's/([0-9]*)([0-9][0-9])/\1.\2:1/g')
 
     NAV_LOG="${INFILE}.nav_log"
     USE_NAVLOG=false
@@ -414,7 +414,7 @@
     fi
 
     # Use mplayer-reported length as a last resort (truncate floating-point)
-    test -z $V_DURATION && V_DURATION=$(echo $ID_LENGTH | sed 's/\.[0-9]*//')
+    test -z $V_DURATION && V_DURATION=$(echo $ID_LENGTH | gsed 's/\.[0-9]*//')
 
     # TODO: WARN if video is less than one second!
 
@@ -486,7 +486,7 @@
         echo "V_ASPECT_WIDTH=$V_ASPECT_WIDTH"
         echo "ID_VIDEO_FRAMES=$ID_VIDEO_FRAMES"
     elif $TABULAR; then
-        FILE_SIZE=$(du -Dh "$INFILE" | awk '{print $1}')
+        FILE_SIZE=$(gdu -Dh "$INFILE" | awk '{print $1}')
         echo "$INFILE||$FILE_SIZE||${ID_VIDEO_WIDTH}x${ID_VIDEO_HEIGHT}||$ID_VIDEO_FPS||$ID_VIDEO_BITRATE||$ID_AUDIO_BITRATE" >> "$TABLE"
     else
         echo $SEPARATOR
diff -ur src.orig/make_titlesets src/make_titlesets
--- src.orig/make_titlesets	2010-05-14 10:53:15.000000000 -0500
+++ src/make_titlesets	2010-09-11 20:40:54.000000000 -0500
@@ -56,7 +56,7 @@
     # else test if the file name path passed in exists
     while ! (( script_exists )); do
         read script_name
-        script_name=$(readlink -f "$script_name")
+        script_name=$(greadlink -f "$script_name")
         if  [[ -e "$script_name" ]] ; then
             script_exists=1
         else
@@ -97,11 +97,11 @@
 {
     file="$1"
     # remove shebang and PATH
-    sed -i '/\#\!\/usr\/bin\/env bash/d;/PATH/d' "$file"
+    gsed -i '/\#\!\/usr\/bin\/env bash/d;/PATH/d' "$file"
     # remove todisc command
-    sed -i '/^todisc \\$/d' "$file"
+    gsed -i '/^todisc \\$/d' "$file"
     # remove opening blank lines
-    sed -i '/./,/^$/!d' "$file"
+    gsed -i '/./,/^$/!d' "$file"
 }
 
 ##############################################################################
@@ -131,7 +131,7 @@
     new_name=$(TMPDIR=`pwd` mktemp -t todisc_commands.bash.XXXXXX)
     echo "The file we will use to save options: \"${final_script}\", 
      exists in the current directory. It will be renamed: 
-    to $new_name if you continue." |sed 's/^[ \t]*//;s/[ \t]*$//'
+    to $new_name if you continue." |gsed 's/^[ \t]*//;s/[ \t]*$//'
     echo "press <ENTER> to continue..."
     read cont
 fi
@@ -172,9 +172,9 @@
     fi
 done
 # add backslash to last line; add -vmgm and -titles; add menu titles
-sed -i "\$s/$/ \\\/" "$todisc_tmp"
-sed -i '$ a -vmgm \\' "$todisc_tmp"
-sed -i '$ a -titles \\'  "$todisc_tmp"
+gsed -i "\$s/$/ \\\/" "$todisc_tmp"
+gsed -i '$ a -vmgm \\' "$todisc_tmp"
+gsed -i '$ a -titles \\'  "$todisc_tmp"
 printf '"%s" \\\n' "${MENU_TITLES[@]}" >> "$todisc_tmp"
 mv "$todisc_tmp" "$final_tmp_script"
 
@@ -197,9 +197,9 @@
 run_gui
 clean_script "$todisc_tmp"
 # add backslash to last line
-sed -i "\$s/$/ \\\/" "$todisc_tmp"
+gsed -i "\$s/$/ \\\/" "$todisc_tmp"
 # add -end-vmgm as last line
-sed -i '$ a -end-vmgm \\' "$todisc_tmp"
+gsed -i '$ a -end-vmgm \\' "$todisc_tmp"
 cat "$todisc_tmp" >> "$final_tmp_script"
 rm -f "$todisc_tmp"
 done=0
@@ -232,11 +232,11 @@
         run_gui
         clean_script "$todisc_tmp"
         # add backslash to last line of temp file
-        sed -i "\$s/$/ \\\/" "$todisc_tmp"
+        gsed -i "\$s/$/ \\\/" "$todisc_tmp"
         # add "-titleset \" as 1st line
-        sed -i '1i -titleset \\' "$todisc_tmp"
+        gsed -i '1i -titleset \\' "$todisc_tmp"
         # add "-end-titleset" as last line
-        sed -i '$a -end-titleset \\' "$todisc_tmp"
+        gsed -i '$a -end-titleset \\' "$todisc_tmp"
         # concatenate
         cat "$todisc_tmp" >> "$final_tmp_script"
         rm -f "$todisc_tmp"
@@ -248,7 +248,7 @@
 ###############################################################################
 
 # remove backslash on last line
-sed -i "\$s/\\\//" "$final_tmp_script"
+gsed -i "\$s/\\\//" "$final_tmp_script"
 echo $SEP
 mv "$final_tmp_script" "$final_script"
 echo final script is "$final_script"
diff -ur src.orig/makedvd src/makedvd
--- src.orig/makedvd	2010-05-18 01:07:34.000000000 -0500
+++ src/makedvd	2010-09-13 19:32:44.000000000 -0500
@@ -214,7 +214,7 @@
 done
 
 if test -e "$1"; then
-    DISC_NAME=$(readlink -f "$1")
+    DISC_NAME=$(greadlink -f "$1")
 else
     usage_error "File or DVD directory '$1' does not exist."
 fi
@@ -302,11 +302,11 @@
     DISC_SUM=0
     while test $i -le $NUM_VOBS; do
       VOB=$(echo "$VOB_LIST" | awk -F ':' '{ print $'$i' }')
-      VOB_SIZE=$(du -D -B M "$VOB" | awk -F ' ' '{print $1}' | tr -d M)
+      VOB_SIZE=$(gdu -D -B M "$VOB" | awk -F ' ' '{print $1}' | tr -d M)
       DISC_SUM=$(expr $VOB_SIZE \+ $DISC_SUM)
       i=$(expr $i \+ 1)
     done
-    OUTDIR=$(readlink -f "$OUT_DIR")
+    OUTDIR=$(greadlink -f "$OUT_DIR")
     AVAIL_SPACE=$(df -B M -P "${OUTDIR%/*}" | awk 'NR != 1 {print $4;}' | tr -d M)
 
     if test $DISC_SUM -gt $AVAIL_SPACE; then
@@ -369,7 +369,7 @@
     fi
 
     GROWISOFS_VER=$(growisofs -version | grep version | \
-                    awk '{ print $6 }' | sed 's/,//g')
+                    awk '{ print $6 }' | gsed 's/,//g')
 
     # Make sure there is a blank disc to write to
     probe_media
@@ -424,7 +424,7 @@
       probe_media
     fi
 
-    DISC_SUM=$(du -s -B M "$OUT_DIR" | awk '{print $1}' | tr -d M)
+    DISC_SUM=$(gdu -s -B M "$OUT_DIR" | awk '{print $1}' | tr -d M)
     if test $DISC_SUM -gt $DISC_CAPACITY; then
        echo $SEPARATOR
        echo "Cannot continue! DVD image (${DISC_SUM}MB) exceeds the DVD's capacity (${DISC_CAPACITY}MB)."
diff -ur src.orig/makemenu src/makemenu
--- src.orig/makemenu	2010-05-18 01:07:34.000000000 -0500
+++ src/makemenu	2010-09-11 15:42:58.000000000 -0500
@@ -657,7 +657,7 @@
 
     # Calculate number of \n characters in title, so menu title height
     # will be set correctly
-    TITLE_LINES=$(echo "$MENU_TITLE" | sed 's/!//g;s/\\n/!/g;s/[^!]//g' | wc -c)
+    TITLE_LINES=$(echo "$MENU_TITLE" | gsed 's/!//g;s/\\n/!/g;s/[^!]//g' | wc -c)
     TITLE_HEIGHT=$((100 * $TITLE_LINES))
 
     # Draw the menu title and pad the bottom with TILE_HEIGHT pixels
@@ -787,7 +787,7 @@
 # Calculate video length from length of audio
 VID_LENGTH=$(mplayer -quiet -identify -frames 0 -vo null -ao null \
     "$AUDIO_STREAM" 2>&1 | grep '^ID_LENGTH' | awk -F '=' '{print $2}' | \
-    sed -e "s/\.[0-9]*//g")
+    gsed -e "s/\.[0-9]*//g")
 VID_LENGTH=$(expr "$VID_LENGTH" \* $FPS \/ 100)
 
 # Make sure VID_LENGTH is nonzero
diff -ur src.orig/makempg src/makempg
--- src.orig/makempg	2010-05-18 21:31:35.000000000 -0500
+++ src/makempg	2010-09-13 19:37:09.000000000 -0500
@@ -289,9 +289,9 @@
 # Args: $@ == text string containing complete command-line
 # To filter/prettify the subprocess output before writing it to the log file,
 # set the LOG_FILTER variable before calling this function, to e.g.
-#    LOG_FILTER="sed {s/\r/\n/g}"    # Replace LF with CR/LF
+#    LOG_FILTER="gsed {s/\r/\n/g}"    # Replace LF with CR/LF
 # ******************************************************************************
-CRLF="sed {s/\r/\n/g}"  # Turn carriage-returns into newlines
+CRLF="gsed {s/\r/\n/g}"  # Turn carriage-returns into newlines
 FOLD="fold -bs"
 function cmd_exec()
 {
@@ -338,7 +338,7 @@
     # based on original file size
     $SLICE && VIDEO_DURATION=$CLIP_LENGTH || VIDEO_DURATION=$V_DURATION
     if test "$VIDEO_DURATION" = "0"; then
-        CUR_SIZE=$(du -Dck \"$IN_FILE\" | awk 'END{print $1}')
+        CUR_SIZE=$(gdu -Dck \"$IN_FILE\" | awk 'END{print $1}')
         NEED_SPACE=$(expr $CUR_SIZE \* 2)
         yecho  "The encoding process will require about"
     # Estimate space based as kbps * duration
@@ -441,7 +441,7 @@
                 ;;
             "-safe" )
                 shift
-                SAFE_AREA=$(echo $1 | sed 's/%//g')
+                SAFE_AREA=$(echo $1 | gsed 's/%//g')
                 ;;
             "-crop" )
                 USE_FILTERS=1
@@ -452,7 +452,7 @@
                 USE_FILTERS=1
                 shift
                 # Parse comma-separated values
-                for FILTER in $(echo "$1" | sed 's/,/ /g'); do
+                for FILTER in $(echo "$1" | gsed 's/,/ /g'); do
                     case "$FILTER" in
                         "none" )
                             DO_DENOISE=false
@@ -532,7 +532,7 @@
             "-subtitles" )
                 shift
                 if test -e "$1"; then
-                    SUBS_FILE=$(readlink -f "$1")
+                    SUBS_FILE=$(greadlink -f "$1")
                     SUBTITLES="-sub \"$SUBS_FILE\""
                     DO_SUBS=:
                 else
@@ -675,14 +675,14 @@
 {
     # Get total size of all output files
     cd "$(dirname "$OUT_FILENAME")"
-    FINAL_SIZE=$(du -c -k "$OUT_PREFIX"*.mpg | awk 'END{print $1}')
+    FINAL_SIZE=$(gdu -c -k "$OUT_PREFIX"*.mpg | awk 'END{print $1}')
     test -z $FINAL_SIZE && FINAL_SIZE=0
 
     if $FAKE; then
         :
     else
         yecho "Output files:"
-        du -shc "$OUT_PREFIX".mpg "$OUT_PREFIX".[0-9].mpg 2>/dev/null
+        gdu -shc "$OUT_PREFIX".mpg "$OUT_PREFIX".[0-9].mpg 2>/dev/null
     fi
 
     # Create stats directory if it doesn't already exist.
@@ -747,7 +747,7 @@
         # get lines with frame= , and print last field with kbit/s removed
         bitrates=$(awk -F= '/^frame=/ {gsub("kbits/s", ""); print $NF}' "$LOG_FILE")
         # get highest value, and remove spaces with sed
-        bitrates=$(sort -un <<< "$bitrates" | sed 's/^[ \t]*//;s/[ \t]*$//')
+        bitrates=$(sort -un <<< "$bitrates" | gsed 's/^[ \t]*//;s/[ \t]*$//')
         # average the values.  Add 000, so it is in bits.
         AVG_BITRATE=$(awk '{t+=$0} END{printf "%d\n", t/NR}' <<< "$bitrates")
         AVG_BITRATE=${AVG_BITRATE}000
@@ -903,7 +903,7 @@
     IN_FILE_TYPE="uri"
 else
     IN_FILE_TYPE="file"
-    IN_FILE=$(readlink -f "$IN_FILE")
+    IN_FILE=$(greadlink -f "$IN_FILE")
 fi
 
 
@@ -928,7 +928,7 @@
     OUT_PREFIX="$OUTPUT_DIR/$OUT_PREFIX"
 # Otherwise, use the full qualified pathname
 else
-    OUT_PREFIX=$(readlink -f "$OUT_PREFIX")
+    OUT_PREFIX=$(greadlink -f "$OUT_PREFIX")
     mkdir -p "$(dirname "$OUT_PREFIX")"
 fi
 
@@ -1109,7 +1109,7 @@
     yecho "Probing video for information. This may take several minutes..."
 
     # Get an MD5sum of the input file for statistics
-    IN_FILE_MD5=$(md5sum "$IN_FILE" | awk '{print $1}')
+    IN_FILE_MD5=$(gmd5sum "$IN_FILE" | awk '{print $1}')
 
     # Assume nothing is compliant unless idvid says so
     # (these will be overridden by idvid for compliant A/V)
@@ -1737,7 +1737,7 @@
 
 # Remove extraneous commas from filter command
 if test -n "$VID_FILTER"; then
-    VID_FILTER="-vf $(echo "$VID_FILTER" | sed -e 's/,,/,/g' -e 's/^,//')"
+    VID_FILTER="-vf $(echo "$VID_FILTER" | gsed -e 's/,,/,/g' -e 's/^,//')"
 fi
 # ******************************************************************************
 #
@@ -2113,13 +2113,13 @@
 # ******************************************************************************
 
 if ! $FAKE; then
-    AUDIO_SIZE=$(du -c -b "$AUDIO_STREAM" | awk 'END{print $1}')
-    VIDEO_SIZE=$(du -c -b "$VIDEO_STREAM" | awk 'END{print $1}')
+    AUDIO_SIZE=$(gdu -c -b "$AUDIO_STREAM" | awk 'END{print $1}')
+    VIDEO_SIZE=$(gdu -c -b "$VIDEO_STREAM" | awk 'END{print $1}')
     # Total size of streams so far (in MBytes)
     STREAM_SIZE=$(expr \( $AUDIO_SIZE \+ $VIDEO_SIZE \) \/ 1000000)
     # If it exceeds disc size, add '%d' field to allow mplex to split output
     if test $STREAM_SIZE -gt $DISC_SIZE; then
-        OUT_FILENAME=$(echo "$OUT_FILENAME" | sed -e 's/\.mpg$/.%d.mpg/')
+        OUT_FILENAME=$(echo "$OUT_FILENAME" | gsed -e 's/\.mpg$/.%d.mpg/')
     fi
 fi
 
diff -ur src.orig/makexml src/makexml
--- src.orig/makexml	2010-05-18 01:07:34.000000000 -0500
+++ src/makexml	2010-09-11 15:48:11.000000000 -0500
@@ -128,11 +128,11 @@
 # Backslash-escape the given special character (and any EOLs)
 # Usage:
 #    sedprep "$TEXT" /
-#    echo $TEXT | sed "s/PATTERN/$(sedprep "$REPLACEMENT" /)/"
+#    echo $TEXT | gsed "s/PATTERN/$(sedprep "$REPLACEMENT" /)/"
 function sedprep ()
 {
     delim=${2:-/}
-    echo "$1" |sed -e 's/[\&'"$delim"']/\\&/g' -e '$!s,$,\\,';
+    echo "$1" |gsed -e 's/[\&'"$delim"']/\\&/g' -e '$!s,$,\\,';
 }
 
 # ==========================================================
@@ -401,8 +401,8 @@
 
     # Fill in the NEXT command for the previous slide, if there was one
     NEXT_TITLE="<next ref=\"play-title-$CUR_TITLE\"\/>"
-    SELECTION_XML=$( echo "$SELECTION_XML" | sed -e "s/__NEXT_TITLE__/$NEXT_TITLE/g" )
-    PLAYLIST_XML=$( echo "$PLAYLIST_XML" | sed -e "s/__NEXT_TITLE__/$NEXT_TITLE/g" )
+    SELECTION_XML=$( echo "$SELECTION_XML" | gsed -e "s/__NEXT_TITLE__/$NEXT_TITLE/g" )
+    PLAYLIST_XML=$( echo "$PLAYLIST_XML" | gsed -e "s/__NEXT_TITLE__/$NEXT_TITLE/g" )
 
     # --------------------------
     # If doing a still-image slideshow, use segment/selection
@@ -501,7 +501,7 @@
 
     # Fill in titleset menu buttons
     MENU_XML=$(echo "$MENU_XML" | \
-        sed -e "s/__MENU_BUTTONS__/$(sedprep "$MENU_BUTTONS" /)/g")
+        gsed -e "s/__MENU_BUTTONS__/$(sedprep "$MENU_BUTTONS" /)/g")
 
     # Fill in the POST command. If there is a menu to jump back to, use that;
     # otherwise, do not insert a POST command.
@@ -512,7 +512,7 @@
     else
       POST_CMD=""
     fi
-    TS_TITLES=$( echo "$TS_TITLES" | sed -e "s/__POST_CMD__/$POST_CMD/g" )
+    TS_TITLES=$( echo "$TS_TITLES" | gsed -e "s/__POST_CMD__/$POST_CMD/g" )
 
     # Append titleset info to ALL_MENU_XML
     if ! $FORCE_TITLESETS || ! $HAVE_TOP_MENU; then
@@ -558,8 +558,8 @@
     # Fill in menu title selections ("buttons")
     # and remove any remaining __NEXT_TITLE__s
     SELECTION_XML=$(echo "$SELECTION_XML" | \
-        sed -e "s/__MENU_BUTTONS__/$(sedprep "$MENU_BUTTONS" /)/g" -e "s/__NEXT_TITLE__//g")
-    PLAYLIST_XML=$(echo "$PLAYLIST_XML" | sed -e "s/__NEXT_TITLE__//g")
+        gsed -e "s/__MENU_BUTTONS__/$(sedprep "$MENU_BUTTONS" /)/g" -e "s/__NEXT_TITLE__//g")
+    PLAYLIST_XML=$(echo "$PLAYLIST_XML" | gsed -e "s/__NEXT_TITLE__//g")
 
     # Append new PBC menus/playlists to PBC_XML
     PBC_XML=`cat << EOF
@@ -716,7 +716,7 @@
 
 # Fill in top menu buttons
 TOP_MENU_XML=$(echo "$TOP_MENU_XML" | \
-    sed -e "s/__TOP_MENU_BUTTONS__/$(sedprep "$TOP_MENU_BUTTONS" /)/g")
+    gsed -e "s/__TOP_MENU_BUTTONS__/$(sedprep "$TOP_MENU_BUTTONS" /)/g")
 
 # If there is a top menu with no other menus, print an error and
 # a suggestion that user specify -menu instead of -topmenu
@@ -801,7 +801,7 @@
 fi
 
 # Remove blank lines and write final result to output file
-echo "$FINAL_DISC_XML" | sed -e '/^ *$/d' > "$OUT_PREFIX.xml"
+echo "$FINAL_DISC_XML" | gsed -e '/^ *$/d' > "$OUT_PREFIX.xml"
 
 echo "Done. The resulting XML was written to $OUT_PREFIX.xml."
 
diff -ur src.orig/todisc src/todisc
--- src.orig/todisc	2010-05-18 01:07:34.000000000 -0500
+++ src/todisc	2010-09-13 19:37:54.000000000 -0500
@@ -66,7 +66,7 @@
 # check if symlink in /tmp exists and use time stamped link if so
 WORK_DIR="/tmp/todisc-work"
 
-LOG_FILE=$(readlink -f todisc.log)
+LOG_FILE=$(greadlink -f todisc.log)
 OUT_PREFIX=""
 TV_STANDARD=ntsc
 MENU_LEN=( 20 )
@@ -264,9 +264,9 @@
         test -e "$LOG_FILE" && \
         printf "%s\n%s %s\n%s\n" "$ME" "$ME" "$SEPARATOR" "$ME" >> "$LOG_FILE"
     else
-        sed "s/    */ /g;s/^ *//" <<< "$@" | fold -bs
+        gsed "s/    */ /g;s/^ *//" <<< "$@" | fold -bs
         test -e "$LOG_FILE" && \
-            printf "%s %s\n" "$ME" "$@" | sed "s/    */ /g;s/^ *//" |
+            printf "%s %s\n" "$ME" "$@" | gsed "s/    */ /g;s/^ *//" |
             fold -bs >> "$LOG_FILE"
     fi
 }
@@ -276,7 +276,7 @@
 # Returns: Exit status of the subprocess
 # To filter/prettify the subprocess output before writing it to the log file,
 # set the LOG_FILTER variable before calling this function, to e.g.
-#    LOG_FILTER="sed 's/\r/\r\n/g'"    # Replace LF with CR/LF
+#    LOG_FILTER="gsed 's/\r/\r\n/g'"    # Replace LF with CR/LF
 # ******************************************************************************
 
 # Print script name, usage notes, and optional error message, then exit.
@@ -318,14 +318,14 @@
 
 format_output()
 {
-    sed "s/    */ /g;s/^ *//"|fold -bs
+    gsed "s/    */ /g;s/^ *//"|fold -bs
 }
 
 get_font()
 {
     # If there is a filename extension, find the absolute path
     if grep -q '\...*$' <<< "$1"; then
-        readlink -f "$1"
+        greadlink -f "$1"
     # Otherwise, use the literal name
     else
         echo "$1"
@@ -345,7 +345,7 @@
 audio_length()
 {
     mplayer -noconsolecontrols -vo null -ao pcm:fast:file=/dev/null "$1" \
-    2>&1 | tr '\r' '\n' | grep ^A: | tail -1 | sed s/^.*A:// | awk '{print $1}'
+    2>&1 | tr '\r' '\n' | grep ^A: | tail -1 | gsed s/^.*A:// | awk '{print $1}'
 }
 cleanup()
 {
@@ -624,7 +624,7 @@
     yecho
     fi
     [[ $this_set = "group" ]] && echo -e "Stats for" \
-    $(readlink -f "${FILES_IN[i]}") "\n" || \
+    $(greadlink -f "${FILES_IN[i]}") "\n" || \
     echo -e "Stats for" "${FILES_IN[i]}" "\n"
     echo -e  \
     " video codec:   " \
@@ -713,7 +713,7 @@
         fi
         if test ${#FILES_TO_ENCODE[@]} -lt 12 && ! $SINGLE_SLIDESHOW; then
             for i in "${FILES_TO_ENCODE[@]}"; do
-                this_file=$(readlink -f "$i")
+                this_file=$(greadlink -f "$i")
                 test -n "$this_file" && yecho " $this_file"
             done
         fi
@@ -742,7 +742,7 @@
                 yecho
             fi
             for i in "${!FILES_TO_ENCODE[@]}"; do
-                IN=$(readlink -f "${FILES_TO_ENCODE[i]}")
+                IN=$(greadlink -f "${FILES_TO_ENCODE[i]}")
                 if $group_set; then
                     is_image=${grp_file_is_image[i]}
                     # we will replace the symlink with actual mpeg
@@ -770,7 +770,7 @@
                     fi
                     # AUDIO_FADE=false # do not fade silence FIXME ???
                 else # not an image file - outfile goes beside infile
-                    THIS_FILE=$(readlink -f "${FILES_TO_ENCODE[i]}")
+                    THIS_FILE=$(greadlink -f "${FILES_TO_ENCODE[i]}")
                     yecho "Converting $THIS_FILE"
                     echo
                     countdown 3
@@ -896,7 +896,7 @@
                 unset chapt_len_array[${#chapt_len_array[@]}-1]
                 chapter_points=$( running_total <<< ${chapt_len_array[@]} )
                 # remove trailing space
-                chapter_points=$(sed 's/[ \t]*$//' <<< $chapter_points)
+                chapter_points=$(gsed 's/[ \t]*$//' <<< $chapter_points)
                 remainder=$( bc <<< "$adjusted_length % $chapter_length" \
                 2>/dev/null)
                 (( ${nochapt[index]} )) && local group_chapters[x++]=0 ||
@@ -926,7 +926,7 @@
             for number in ${group_chapters[d]}; do
                 new_element="$new_element $(format_seconds $number),"
                 grp_chapters[d]="${grp_chapters[d]} $number"
-                grp_chapters[d]=$(sed 's/[ \t]*$//' <<< ${grp_chapters[d]})
+                grp_chapters[d]=$(gsed 's/[ \t]*$//' <<< ${grp_chapters[d]})
             done
             local array[d]=$new_element
             unset new_element
@@ -1275,7 +1275,7 @@
     </menus>
   </vmgm>
 EOF
-) |sed '/^ *$/d' >> "$DVDAUTHOR_XML"
+) |gsed '/^ *$/d' >> "$DVDAUTHOR_XML"
     get_genopts "${args[@]}"
 
     #################### test for incompatible options #######################
@@ -1577,7 +1577,7 @@
     fi
     # find out where vhook lives for ffmpeg
     ffmpeg_prefix=$(which ffmpeg)
-    ffmpeg_prefix=$(sed 's/\/bin\/ffmpeg//g' <<< "$ffmpeg_prefix")
+    ffmpeg_prefix=$(gsed 's/\/bin\/ffmpeg//g' <<< "$ffmpeg_prefix")
     imlib2_vhook="$ffmpeg_prefix/lib/vhook/imlib2.so"
 
     # check for badly compiled or otherwise unusable vhook
@@ -1650,7 +1650,7 @@
         "$outdir"/%06d.png)
         yecho "${FFMPEG_CMD[@]}" | strings
         "${FFMPEG_CMD[@]}" 2>&1 | strings >> "$LOG_FILE"
-        largest_png=$(du -s "$outdir"/*.png|sort -r |
+        largest_png=$(gdu -s "$outdir"/*.png|sort -r |
         awk 'NR>1{exit};1 {print $2}')
         mv "$largest_png" "$PREVIEW_IMG"
         yecho "Removing temporary preview files"
@@ -1744,7 +1744,7 @@
         in_files=( "${IN_FILES[@]}" )
     else
         for f in ${!grouping[@]}; do
-                in_files[f]=$(readlink -f "${grouping[f]}")
+                in_files[f]=$(greadlink -f "${grouping[f]}")
         done
     fi
     for ((i=0; i<${#in_files[@]}; i++)); do
@@ -1928,7 +1928,7 @@
     done)
     fadeout:1
 EOF
-    ) | sed '/^$/d;s/^[ \t]*//' > "$WORK_DIR/dvd-slideshow.conf"
+    ) | gsed '/^$/d;s/^[ \t]*//' > "$WORK_DIR/dvd-slideshow.conf"
 }
 
 transition_slide()
@@ -2237,7 +2237,7 @@
             if $incoming_vids || [[ $sshows -eq 1 && $inc_files -lt 1 ]]; then
                 for f in  ${!ARGS_ARRAY[@]}; do
                     FILENAMES[f]=${ARGS_ARRAY[f]}
-                    filenames[f]=$(readlink -f "${ARGS_ARRAY[f]}")
+                    filenames[f]=$(greadlink -f "${ARGS_ARRAY[f]}")
                 done
                 if $incoming_slides; then
                     SLIDESHOW=( ${SLIDESHOW[@]} : ) # is this a slideshow ?
@@ -2252,12 +2252,12 @@
                 ! $GROUPING && mk_workdir
                 unset group groupkey grp x
                 for ((i=0; i<${#ARGS_ARRAY[@]}; i++)); do
-                    grp[x++]=$(readlink -f "${ARGS_ARRAY[i]}")
+                    grp[x++]=$(greadlink -f "${ARGS_ARRAY[i]}")
                 done
                 unset x
                 [[ -z ${FILES[@]} ]] && ss_index=0 || ss_index=${#FILES[@]}
                 SLIDESHOW[ss_index]=: # is this a slideshow ?
-                FILES[ss_index]=$(readlink -f "${ARGS_ARRAY[0]}")
+                FILES[ss_index]=$(greadlink -f "${ARGS_ARRAY[0]}")
                 GROUP_IN_FILES=( "${GROUP_IN_FILES[@]}" "${grp[@]}" )
                 groupkey=${#FILES[@]}
                 GROUP[groupkey-1]=${#grp[@]}
@@ -2301,7 +2301,7 @@
             get_listargs "$@"
             unset group groupkey grp x
             for ((i=1; i<${#ARGS_ARRAY[@]}; i++)); do
-                grp[x++]=$(readlink -f "${ARGS_ARRAY[i]}")
+                grp[x++]=$(greadlink -f "${ARGS_ARRAY[i]}")
             done
             GROUP_IN_FILES=( "${GROUP_IN_FILES[@]}" "${grp[@]}" )
             ((${ARGS_ARRAY[0]})) 2>/dev/null || usage_error "Arguments to \
@@ -2339,7 +2339,7 @@
             shift
             get_listargs "$@"
             for f in  ${!ARGS_ARRAY[@]}; do
-                SLIDESHOW_MENU_THUMBS[f]=$(readlink -f "${ARGS_ARRAY[f]}")
+                SLIDESHOW_MENU_THUMBS[f]=$(greadlink -f "${ARGS_ARRAY[f]}")
             done
             ;;
         "-submenu-titles" )
@@ -2569,7 +2569,7 @@
             shift
             get_listargs "$@"
             if [[ -n ${ARGS_ARRAY[@]} ]]; then
-                SLIDESHOW_CONF=$(readlink -f "${ARGS_ARRAY[0]}")
+                SLIDESHOW_CONF=$(greadlink -f "${ARGS_ARRAY[0]}")
             fi
             USE_DVD_SLIDESHOW=:
             ;;
@@ -2666,7 +2666,7 @@
             ;;
         "-background" )
             shift
-            BACKGROUND=$(readlink -f "$1")
+            BACKGROUND=$(greadlink -f "$1")
             USERS_BACKGROUND=:
             ! [[ -e "$BACKGROUND" ]] && \
             usage_error "background \"$BACKGROUND\" does not exist"
@@ -2675,7 +2675,7 @@
             shift
             get_listargs "$@"
             for f in  ${!ARGS_ARRAY[@]}; do
-                SM_BACKGROUND[f]=$(readlink -f "${ARGS_ARRAY[f]}")
+                SM_BACKGROUND[f]=$(greadlink -f "${ARGS_ARRAY[f]}")
                 ! [[ -e ${SM_BACKGROUND[f]} ]] && usage_error \
                 "submenu background \"$SM_BACKGROUND\" does not exist"
             done
@@ -2683,7 +2683,7 @@
         "-intro" )
             shift
             DO_INTRO=:
-            INTRO_CLIP=$(readlink -f "$1")
+            INTRO_CLIP=$(greadlink -f "$1")
             ! [[ -e "$INTRO_CLIP" ]] && \
             usage_error "intro clip \"$INTRO_CLIP\" does not exist"
             ;;
@@ -2692,7 +2692,7 @@
             get_listargs "$@"
             unset f
             for f in  ${!ARGS_ARRAY[@]}; do
-                SHOWCASE_FILE[f]=$(readlink -f "${ARGS_ARRAY[f]}")
+                SHOWCASE_FILE[f]=$(greadlink -f "${ARGS_ARRAY[f]}")
             done
             SHOWCASE=:
             IMG_FMT="png"
@@ -2965,7 +2965,7 @@
             if [[ $1 = "none" ]]; then
                 BG_AUDIO="none" # for switched menus
             else
-                BG_AUDIO=$(readlink -f "$1")
+                BG_AUDIO=$(greadlink -f "$1")
                 if [[ ! -e "$BG_AUDIO" ]]; then
                     usage_error "background audio \"$BG_AUDIO\" does not exist"
                 fi
@@ -2987,7 +2987,7 @@
                         usage_error "audio file \"${ARGS_ARRAY[i]}\" not found"
                     else
                         SM_AUDIO=( "${SM_AUDIO[@]}" \
-                        "$(readlink -f "${ARGS_ARRAY[i]}")" )
+                        "$(greadlink -f "${ARGS_ARRAY[i]}")" )
                     fi
                 fi
             done
@@ -3217,13 +3217,13 @@
                 elif [[ ! -e $2 ]]; then
                     usage_error " subtitle file $2 does not exist"
                 else
-                    TOVID_OPTS+=( "$1" "$(readlink -f "$2")" )
+                    TOVID_OPTS+=( "$1" "$(greadlink -f "$2")" )
                 fi
             elif [[ $1 == "-config" ]]; then
                 if [[ ! -e $2 ]]; then
                     usage_error "config file $2 does not exist"
                 else
-                    TOVID_OPTS+=( "$1" "$(readlink -f "$2")" )
+                    TOVID_OPTS+=( "$1" "$(greadlink -f "$2")" )
                 fi
             else
                 TOVID_OPTS+=( "$1" )
@@ -3275,7 +3275,7 @@
 fi
 
 if $BURN; then
-    if [[ ! -b $(readlink -f $BURN_DEVICE) ]]; then
+    if [[ ! -b $(greadlink -f $BURN_DEVICE) ]]; then
         usage_error \
         "$BURN_DEVICE is not a valid block device file or link to a block device.
         Are you sure your burner is \"${BURN_DEVICE}\"? Specify your burner with
@@ -3387,9 +3387,9 @@
 
 # Make sure -out was provided and it is valid
 if test -n "$OUT_PREFIX"; then
-    OUT_DIR=$(readlink -f "$OUT_PREFIX")
+    OUT_DIR=$(greadlink -f "$OUT_PREFIX")
     if [[ ! -d ${OUT_DIR%/*} ]]; then
-        OUT_PATH=$(readlink -m "$OUT_PREFIX")
+        OUT_PATH=$(greadlink -m "$OUT_PREFIX")
         usage_error "The -out path ${OUT_PATH%/*}/ does not exist"
     fi
     if egrep -q '<|>|&' <<< "$OUT_DIR"; then
@@ -3530,7 +3530,7 @@
     # disallow spaces in thumb titles for text button style
     if [ "$BUTTON_STYLE" = "text" ]; then
         for ((i=0; i<${#TITLES[@]}; i++)); do
-            T=$(sed 's/^[ \t]*//;s/[ \t]*$//' <<< "${TITLES[i]}")
+            T=$(gsed 's/^[ \t]*//;s/[ \t]*$//' <<< "${TITLES[i]}")
             if grep "  " <<< "$T" >/dev/null; then
                 echo "Sorry, a maximum of one consecutive space is allowed
                 in titles for text buttons.  \"${TITLES[i]}\" has more than
@@ -3682,7 +3682,7 @@
 "todisc from the tovid suite ($TOVID_VERSION) - log for `date`" \
 "$PATTERN" >> "$LOG_FILE"
 # put the command line into the log file to aid debugging
-printf  "%s\n%s\n" todisc "${args[@]}" | sed "s/    */ /g;s/^ *//" | fold -bs >> "$LOG_FILE"
+printf  "%s\n%s\n" todisc "${args[@]}" | gsed "s/    */ /g;s/^ *//" | fold -bs >> "$LOG_FILE"
 # do some locale debugging
 echo -e "\nYou are using the following locale settings:" >> "$LOG_FILE"
 locale >>  "$LOG_FILE" 2>&1
@@ -3977,7 +3977,7 @@
 # Get absolute pathnames of all files
 if ! $VMGM_ONLY; then
     for i in "${FILES[@]}"; do
-        IN_FILES=("${IN_FILES[@]}" "$(readlink -f "$i")")
+        IN_FILES=("${IN_FILES[@]}" "$(greadlink -f "$i")")
         (( ${#FILES[@]} < 12 )) && echo "Adding: $i" || spin "Adding: ${i##*/}"
     done
 fi
@@ -4125,7 +4125,7 @@
             used ${CHAPT_ARRAY[i]}"
         fi
         # remove + sign and commas, count the number of chapters left
-        str=$(sed 's/+/ /g;s/,/ /g' <<< ${CHAPTERS[i]})
+        str=$(gsed 's/+/ /g;s/,/ /g' <<< ${CHAPTERS[i]})
         for substr in $str; do [[ $substr != 0 ]] && newchapts+=($substr); done
         CHAPTERS[i]=${#newchapts[@]}
     done
@@ -4362,7 +4362,7 @@
         #*slide_grp*.mpg are symlinks to the original images we have kept intact
         mixgroup=( "$WORK_DIR"/${TSET_NUM}-slide_grp-*.mpg )
         for g in ${!mixgroup[@]}; do
-            MIXFILES[g]=$(readlink -f "${mixgroup[g]}")
+            MIXFILES[g]=$(greadlink -f "${mixgroup[g]}")
             MIXLINKS[g]=${mixgroup[g]}
             # remove original link we can keep track of what is already encoded
             rm -f "${MIXLINKS[g]}"
@@ -4522,7 +4522,7 @@
         for ((i=0; i<${#TITLES[@]}; i++)); do
             if [[ ${#TITLES[i]} -gt 35 || \
             $(echo -e "${TITLES[i]}" |wc -l) -gt 1 ]]; then
-                TITLE[i]=$(sed 's/^  *//'<<<${TITLES[i]//\\n/ }) # no spaces or \n
+                TITLE[i]=$(gsed 's/^  *//'<<<${TITLES[i]//\\n/ }) # no spaces or \n
                 TITLE[i]=${TITLE[i]:0:35} # cut down to 35 characters maximum
                 if [ ${#TITLES[i]} -gt 35 ]; then
                     echo "  \"${TITLE[i]}...\" (${IN_FILES[i]})" # "..."
@@ -5495,7 +5495,7 @@
             $SWITCHED && MPLAYER_SEEK_VAL=${SEEK_VAL[MENU_NUM-1]}
             echo "Using mplayer to get framed images from the showcase video"
             get_framed_pics "$SHOWCASE_VIDEO" >> "$LOG_FILE" 2>&1
-            largest_png=$(du -s "$WORK_DIR"/000000*.png|sort -r |
+            largest_png=$(gdu -s "$WORK_DIR"/000000*.png|sort -r |
                                 awk 'NR>1{exit};1 {print $2}')
             mv -v "$largest_png" "$OUT"
             rm -f "$WORK_DIR"/00000*.png
@@ -5579,7 +5579,7 @@
         if [ "$SC_FRAMESTYLE" = "glass" ]; then
             MPLAYER_SEEK_VAL=${SEEK_VAL[i]}
             get_framed_pics "${IN_FILES[i]}"  >> "$LOG_FILE" 2>&1
-            largest_png=$(du -s $WORK_DIR/000*[0-9].png | sort -r |
+            largest_png=$(gdu -s $WORK_DIR/000*[0-9].png | sort -r |
                                         awk 'NR>1{exit};1 {print $2}')
             mv -f $largest_png $WORK_DIR/pics/$i/$(printf "%06d%s" 0 .$IMG_FMT)
             rm -f "$WORK_DIR"/000*[0-9].png
@@ -6698,7 +6698,7 @@
     echo ". . . Getting stats on grouped files now . . ."
     echo
     for u in ${!grouping[@]}; do
-        CUR_VID=$(readlink -f "${grouping[u]}")
+        CUR_VID=$(greadlink -f "${grouping[u]}")
         spin "Getting stats on "${CUR_VID##*/}""
         group_idvid_stats[u]=$(idvid -terse -accurate "$CUR_VID" 2>/dev/null)
         if [ -s "$CUR_VID.nav_log" ]; then
@@ -7356,7 +7356,7 @@
   </stream>
 </subpictures>
 EOF
-) |sed '/^ *$/d'  > "$SPUMUX_XML"
+) |gsed '/^ *$/d'  > "$SPUMUX_XML"
 
 if $SUB_MENU; then
     JUMP=menu
@@ -7526,7 +7526,7 @@
 echo "$POST"
             echo "      </pgc>"
             echo "      <pgc>"
-        done | sed '$d'
+        done | gsed '$d'
 fi)
     </menus>
     <titles>
@@ -7674,7 +7674,7 @@
 echo -e "</dvdauthor>"
 fi)
 EOF
-) |sed '/^ *$/d' >> "$DVDAUTHOR_XML"
+) |gsed '/^ *$/d' >> "$DVDAUTHOR_XML"
 ##############################################################################
 #                            Animenu stuff                                   #
 ##############################################################################
@@ -7859,7 +7859,7 @@
                 else
                     CUR_FILE="${IN_FILES[i]}"
                 fi
-                navlog=$(readlink -f "${CUR_FILE}").nav_log
+                navlog=$(greadlink -f "${CUR_FILE}").nav_log
                 if [[ -s $navlog ]]; then
                     NAVSEEK="--nav_seek" && NAVLOG="$navlog"
                 else
@@ -7871,8 +7871,8 @@
                 $NAVSEEK "$NAVLOG" -o "${PICS_OUT[@]}" -f \
                 $FRAME_RATE -Z ${GEO_ARRAY[C]},fast -c $t -y $SM_IMG_FMT,null)
                 echo "Running ${TCODE_CMD[@]}" |
-                sed 's/    */ /g'|sed -e "s/^ *//"|tee -a >> "$LOG_FILE"
-                #sed 's/    */ /g'|sed -e "s/^ *//"|fold -bs >> "$LOG_FILE"
+                gsed 's/    */ /g'|gsed -e "s/^ *//"|tee -a >> "$LOG_FILE"
+                #gsed 's/    */ /g'|gsed -e "s/^ *//"|fold -bs >> "$LOG_FILE"
                 echo >> "$LOG_FILE"
                 run_transcode()
                 {
@@ -8015,7 +8015,7 @@
                     for ((b=0; b<${CHAPTERS[i]}; b++)); do
                         IMGS=( "${IMGS[@]}" $(find $WORK_DIR/animenu/$b \
                         -name \*.$SM_IMG_FMT| sort 2>/dev/null | head -n $a |
-                        sed -n -e "$a p") )
+                        gsed -n -e "$a p") )
                     done
                     IM_CMD=(convert "${IMGS[@]}" -bordercolor '#6E6E6E' \
                     -border $THUMB_FRAME_SIZE miff:-)
@@ -8197,7 +8197,7 @@
                 echo -e "Running:
                 sox $WORK_DIR/menu$s.wav $WORK_DIR/menu$s-processed.wav fade t
                 $SM_FADE ${SUBMENU_AUDIOLEN[s]} $SM_FADE" |
-                sed 's/    */ /g' | format_output
+                gsed 's/    */ /g' | format_output
                 sox -q $WORK_DIR/menu$s.wav $WORK_DIR/menu$s-processed.wav \
                  fade t $SM_FADE ${SUBMENU_AUDIOLEN[s]} $SM_FADE
                 rm $WORK_DIR/menu$s.wav
@@ -8329,7 +8329,7 @@
         num_procs=0
         for p in ${!SC_PICS[@]}; do
             ((num_procs++)) # how many processes are running
-            this_pic=$(sed 's,.*/,,;s/^0*//;s/.png//' <<< "${SC_PICS[p]}")
+            this_pic=$(gsed 's,.*/,,;s/^0*//;s/.png//' <<< "${SC_PICS[p]}")
             pic="${SC_PICS[p]}"
             # if glass and either wave or rotate
             if [ "$SC_FRAMESTYLE" = "glass" ] && \
@@ -9189,10 +9189,10 @@
     for ((x=1; x<=V_TOTAL; x++)); do
         yecho "Running spumux "$WORK_DIR/submenu${x}_spumux.xml" < \
         $WORK_DIR/menu${x}.mpg > \
-        $(sed 's/\(.*\)menu/\1Menu/' <<< $WORK_DIR/menu${x}.mpg)"|fold -bs
+        $(gsed 's/\(.*\)menu/\1Menu/' <<< $WORK_DIR/menu${x}.mpg)"|fold -bs
         spumux "$WORK_DIR/submenu${x}_spumux.xml" < \
         $WORK_DIR/menu${x}.mpg > \
-        $(sed 's/\(.*\)menu/\1Menu/' <<< $BASEDIR/${TSET_NUM}-menu${x}.mpg) \
+        $(gsed 's/\(.*\)menu/\1Menu/' <<< $BASEDIR/${TSET_NUM}-menu${x}.mpg) \
         2>> "$LOG_FILE"
     done
 fi
diff -ur src.orig/tovid-init src/tovid-init
--- src.orig/tovid-init	2010-06-01 18:09:39.000000000 -0500
+++ src/tovid-init	2010-09-13 19:38:58.000000000 -0500
@@ -299,7 +299,7 @@
 
     # File size in bytes
     FOP_LAST_SIZE=0
-    FOP_CUR_SIZE=$(du -b "$FOP_OUTFILE" | awk '{print $1}')
+    FOP_CUR_SIZE=$(gdu -b "$FOP_OUTFILE" | awk '{print $1}')
 
     # Keep looping until outfile stops getting bigger
     while test "$FOP_CUR_SIZE" -gt "$FOP_LAST_SIZE"; do
@@ -322,7 +322,7 @@
         sleep ${SLEEP_TIME-"1s"}
 
         FOP_LAST_SIZE=$FOP_CUR_SIZE
-        FOP_CUR_SIZE=$(du -b "$FOP_OUTFILE" | awk '{print $1}')
+        FOP_CUR_SIZE=$(gdu -b "$FOP_OUTFILE" | awk '{print $1}')
     done
     printf "\n\n"
 }
@@ -560,7 +560,7 @@
     # *************************************************************************
     # Required Dependencies
     # *************************************************************************
-    core="grep sed md5sum mplayer mencoder mplex mpeg2enc yuvfps yuvdenoise ppmtoy4m mp2enc jpeg2yuv ffmpeg"
+    core="grep gsed gmd5sum mplayer mencoder mplex mpeg2enc yuvfps yuvdenoise ppmtoy4m mp2enc jpeg2yuv ffmpeg"
 
     # *************************************************************************
     # Optional Dependencies
diff -ur src.orig/tovid-init.in src/tovid-init.in
--- src.orig/tovid-init.in	2010-05-18 21:29:50.000000000 -0500
+++ src/tovid-init.in	2010-09-13 19:43:33.000000000 -0500
@@ -299,7 +299,7 @@
 
     # File size in bytes
     FOP_LAST_SIZE=0
-    FOP_CUR_SIZE=$(du -b "$FOP_OUTFILE" | awk '{print $1}')
+    FOP_CUR_SIZE=$(gdu -b "$FOP_OUTFILE" | awk '{print $1}')
 
     # Keep looping until outfile stops getting bigger
     while test "$FOP_CUR_SIZE" -gt "$FOP_LAST_SIZE"; do
@@ -322,7 +322,7 @@
         sleep ${SLEEP_TIME-"1s"}
 
         FOP_LAST_SIZE=$FOP_CUR_SIZE
-        FOP_CUR_SIZE=$(du -b "$FOP_OUTFILE" | awk '{print $1}')
+        FOP_CUR_SIZE=$(gdu -b "$FOP_OUTFILE" | awk '{print $1}')
     done
     printf "\n\n"
 }
@@ -560,7 +560,7 @@
     # *************************************************************************
     # Required Dependencies
     # *************************************************************************
-    core="grep sed md5sum mplayer mencoder mplex mpeg2enc yuvfps yuvdenoise ppmtoy4m mp2enc jpeg2yuv ffmpeg"
+    core="grep gsed gmd5sum mplayer mencoder mplex mpeg2enc yuvfps yuvdenoise ppmtoy4m mp2enc jpeg2yuv ffmpeg"
 
     # *************************************************************************
     # Optional Dependencies
