From d3c2d90da4a35d4c5f92b87abed1602420b2f536 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 28 Jun 2004 01:39:45 +0000 Subject: don't set ICEAUTHORITY using $ENV{HOME} for kde (bugzilla #10144) --- perl-install/any.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'perl-install') diff --git a/perl-install/any.pm b/perl-install/any.pm index ca5fdc370..e11383c57 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -915,8 +915,14 @@ sub ask_window_manager_to_logout { 'wmaker' => "killall -USR1 wmaker", ); my $cmd = $h{$wm} or return; - $ENV{ICEAUTHORITY} ||= "$ENV{HOME}/.ICEauthority"; #- used by gnome-session - $cmd = "su $ENV{USER} -c '$cmd'" if $wm eq 'kwin' && $> == 0; + if ($wm eq 'gnome-session') { + #- NB: consolehelper doesn't destroy $HOME whereas kdesu does + #- for gnome, we use consolehelper, so below works + $ENV{ICEAUTHORITY} ||= "$ENV{HOME}/.ICEauthority"; + } elsif ($wm eq 'kwin' && $> == 0) { + #- we can't use dcop when we are root + $cmd = "su $ENV{USER} -c '$cmd'"; + } system($cmd); 1; } -- cgit v1.2.1