Fall back to gnome utilities if kdialog not present

This commit is contained in:
unman 2016-05-30 23:34:37 +01:00
parent 3db93cdc87
commit 8471605e6d
2 changed files with 45 additions and 39 deletions

View File

@ -19,7 +19,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# #
# #
if type kdialog 2> /dev/null; then
VM=$(kdialog -inputbox "Enter the VM name to send files to:") VM=$(kdialog -inputbox "Enter the VM name to send files to:")
if [ X$VM = X ] ; then exit 0 ; fi if [ X$VM = X ] ; then exit 0 ; fi
@ -41,3 +41,6 @@ qdbus $REF close
# if ! [ "x"$agentstatus = xDONE ] ; then # if ! [ "x"$agentstatus = xDONE ] ; then
# kdialog --sorry 'Abnormal file copy termination; see /var/log/qubes/qrexec.xid.log in dom0 for more details' # kdialog --sorry 'Abnormal file copy termination; see /var/log/qubes/qrexec.xid.log in dom0 for more details'
# fi # fi
else
exec /usr/lib/qubes/qvm-copy-to-vm.gnome "$@"
fi

View File

@ -19,7 +19,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# #
# #
if type kdialog 2> /dev/null; then
VM=$(kdialog -inputbox "Enter the VM name to send files to:") VM=$(kdialog -inputbox "Enter the VM name to send files to:")
if [ X$VM = X ] ; then exit 0 ; fi if [ X$VM = X ] ; then exit 0 ; fi
@ -45,3 +45,6 @@ qdbus $REF close
# if ! [ "x"$agentstatus = xDONE ] ; then # if ! [ "x"$agentstatus = xDONE ] ; then
# kdialog --sorry 'Abnormal file copy termination; see /var/log/qubes/qrexec.xid.log in dom0 for more details' # kdialog --sorry 'Abnormal file copy termination; see /var/log/qubes/qrexec.xid.log in dom0 for more details'
# fi # fi
else
exec /usr/lib/qubes/qvm-move-to-vm.gnome "$@"
fi