aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/gui.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2011-12-10 06:45:46 +0000
committerThierry Vignaud <tv@mageia.org>2011-12-10 06:45:46 +0000
commit08590fd26b1d54f46ce1123e4627b42f93a0c8ed (patch)
treeea5cbe03213ba1667b6fd500728bc933c5653edf /Rpmdrake/gui.pm
parentce4e5cbac23a3df731cc442d23335c451b552c01 (diff)
downloadrpmdrake-08590fd26b1d54f46ce1123e4627b42f93a0c8ed.tar
rpmdrake-08590fd26b1d54f46ce1123e4627b42f93a0c8ed.tar.gz
rpmdrake-08590fd26b1d54f46ce1123e4627b42f93a0c8ed.tar.bz2
rpmdrake-08590fd26b1d54f46ce1123e4627b42f93a0c8ed.tar.xz
rpmdrake-08590fd26b1d54f46ce1123e4627b42f93a0c8ed.zip
(run_help_callback) fix opening URLs in root's firefox in some cases by redefining HOME (mga#287)
Diffstat (limited to 'Rpmdrake/gui.pm')
-rw-r--r--Rpmdrake/gui.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm
index 4b1083d2..428085c5 100644
--- a/Rpmdrake/gui.pm
+++ b/Rpmdrake/gui.pm
@@ -1049,6 +1049,8 @@ sub sort_callback {
sub run_help_callback {
my (undef, $url) = @_;
+ my ($user) = grep { $_->[2] eq $ENV{USERHELPER_UID} } list_passwd();
+ local $ENV{HOME} = $user->[7] if $user && $ENV{USERHELPER_UID};
run_program::raw({ detach => 1, as_user => 1 }, 'www-browser', $url);
}