From 504e3d6f6e2bb2b72588d9475c61a4525857e146 Mon Sep 17 00:00:00 2001 From: Dave Hodgins Date: Tue, 15 Oct 2013 23:40:45 -0400 Subject: Only use dialog, not Xdialog, due to errors from things like fontconfig. Change listusbdrives to work on more systems --- copyiso2usb | 10 +++++----- copyiso2usb.desktop.in | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/copyiso2usb b/copyiso2usb index 7ccb82c..79205d0 100755 --- a/copyiso2usb +++ b/copyiso2usb @@ -64,11 +64,11 @@ if [ ! "unset" = "$pktest" ] ; then fi # Set dialog command to use -dialogcmd="/usr/bin/Xdialog" -displaytest=${DISPLAY-"unset"} -if [ ! -e /usr/bin/Xdialog ] || [ ! -x /usr/bin/Xdialog ] || [ "unset" = "$displaytest" ] ; then +#dialogcmd="/usr/bin/Xdialog" #Removed after finding errors from things like fontconfig can cause problems. +#displaytest=${DISPLAY-"unset"} +#if [ ! -e /usr/bin/Xdialog ] || [ ! -x /usr/bin/Xdialog ] || [ "unset" = "$displaytest" ] ; then dialogcmd="/usr/bin/dialog" -fi +#fi # Function to get window size GetDisplaySize() { @@ -82,7 +82,7 @@ GetDisplaySize # Function to list all usb drives listusbdrives () { - for block in /sys/devices/pci*/*/usb*/*/*/host*/target*/*/block/sd*; do + for block in $(tree -if /sys/devices|grep usb|grep /block/sd\[a-z\]\$); do device=${block##*/} # strip last slash and everything before it. printf '%s\n' "$device" done diff --git a/copyiso2usb.desktop.in b/copyiso2usb.desktop.in index b2ae349..0cb9a2c 100644 --- a/copyiso2usb.desktop.in +++ b/copyiso2usb.desktop.in @@ -3,7 +3,7 @@ _Name=Copy iso image to a usb drive Icon=copyiso2usb Exec=/usr/bin/copyiso2usb _Comment=A tool to copy an iso image to a usb drive. -Terminal=false +Terminal=true Type=Application Categories=System; -StartupNotify=false +StartupNotify=true -- cgit v1.2.1