summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2016-05-02 08:36:17 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-05-04 11:52:21 +0200
commit92504a69d308fdc485a71ee08dd84f7a7d696d13 (patch)
treea33cbd466324eef383c2a32a59b6231de2aba11d /perl-install/any.pm
parent8b5870229d9d1107453fce96218574ec28974060 (diff)
downloaddrakx-92504a69d308fdc485a71ee08dd84f7a7d696d13.tar
drakx-92504a69d308fdc485a71ee08dd84f7a7d696d13.tar.gz
drakx-92504a69d308fdc485a71ee08dd84f7a7d696d13.tar.bz2
drakx-92504a69d308fdc485a71ee08dd84f7a7d696d13.tar.xz
drakx-92504a69d308fdc485a71ee08dd84f7a7d696d13.zip
do not use chksession for listing sessions
it's hopeless broken and is on its death way more work is needed: - see eg sessions_with_order() - check their callers
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 7b5ede4e8..0fbe7e0a6 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -942,7 +942,10 @@ sub ask_user_and_root {
}
sub sessions() {
- split(' ', run_program::rooted_get_stdout($::prefix, '/usr/sbin/chksession', '-l'));
+ my $old = chdir('$::prefix/usr/share/xsessions/');
+ my @l = map { s/.desktop$//; $_ } glob("*.desktop");
+ chdir($old);
+ @l;
}
sub sessions_with_order() {
my %h = map { /(.*)=(.*)/ } split(' ', run_program::rooted_get_stdout($::prefix, '/usr/sbin/chksession', '-L'));