summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-06-28 01:39:45 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-06-28 01:39:45 +0000
commitd3c2d90da4a35d4c5f92b87abed1602420b2f536 (patch)
treede94540f02de3eecd639ae5baafc422e783bd8a1
parent1ce17287587c50c01f55ed597e59efefef7096b1 (diff)
downloaddrakx-d3c2d90da4a35d4c5f92b87abed1602420b2f536.tar
drakx-d3c2d90da4a35d4c5f92b87abed1602420b2f536.tar.gz
drakx-d3c2d90da4a35d4c5f92b87abed1602420b2f536.tar.bz2
drakx-d3c2d90da4a35d4c5f92b87abed1602420b2f536.tar.xz
drakx-d3c2d90da4a35d4c5f92b87abed1602420b2f536.zip
don't set ICEAUTHORITY using $ENV{HOME} for kde (bugzilla #10144)
-rw-r--r--perl-install/any.pm10
1 files changed, 8 insertions, 2 deletions
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;
}