From 08590fd26b1d54f46ce1123e4627b42f93a0c8ed Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sat, 10 Dec 2011 06:45:46 +0000 Subject: (run_help_callback) fix opening URLs in root's firefox in some cases by redefining HOME (mga#287) --- Rpmdrake/gui.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Rpmdrake') 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); } -- cgit v1.2.1