From 8317c2ca188536ccffa8ce4a71c9e537c93fa423 Mon Sep 17 00:00:00 2001 From: Joanna Rutkowska Date: Fri, 30 Jul 2010 16:01:58 +0200 Subject: [PATCH] appvm/qubes_add_pendrive_script: set HOME, and pass -M to mimeopen --- appvm/qubes_add_pendrive_script.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appvm/qubes_add_pendrive_script.c b/appvm/qubes_add_pendrive_script.c index bb708610..d8e4ad26 100644 --- a/appvm/qubes_add_pendrive_script.c +++ b/appvm/qubes_add_pendrive_script.c @@ -177,9 +177,9 @@ void dvm_transaction_request(char *seq, struct xs_handle *xs) suicide(xs); } snprintf(cmdbuf, sizeof(cmdbuf), - "DISPLAY=:0 mimeopen -n '/tmp/%s'", header.name); + "HOME=/home/user DISPLAY=:0 /usr/bin/mimeopen -n -M '/tmp/%s' 2>&1 > /tmp/kde-open.log", header.name); if (system(cmdbuf)) - system("DISPLAY=:0 /usr/bin/kdialog --sorry 'Unable to handle mimetype of the requested file'"); + system("HOME=/home/user DISPLAY=:0 /usr/bin/kdialog --sorry 'Unable to handle mimetype of the requested file!'"); if (stat(filename, &stat_post)) { syslog(LOG_DAEMON | LOG_ERR, "stat post"); suicide(xs);