summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/any.pm26
1 files changed, 17 insertions, 9 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 9ffe0a86d..bbc051bcc 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -813,11 +813,16 @@ sub setupBootloader__grub2 {
sub get_session_file {
my ($desktop) = @_;
- my $xsession_file = find {
- my %xsession = read_gnomekderc($_, 'Desktop Entry');
- $xsession{Name} =~ s/\s+//g;
- $xsession{Name} eq ${desktop};
- } glob("$::prefix/usr/share/xsessions/*.desktop");
+ my @dir_wm = qw(xsessions wayland-sessions);
+ my $xsession_file;
+ foreach my $dwm (@dir_wm) {
+ my $xs_file = find {
+ my %xsession = read_gnomekderc($_, 'Desktop Entry');
+ $xsession{Name} =~ s/\s+//g;
+ $xsession{Name} eq ${desktop};
+ } glob("$::prefix/usr/share/$dwm/*.desktop");
+ $xsession_file = $xs_file unless $xsession_file;
+ }
$xsession_file =~ s!\.[^.]+$!!;
$xsession_file =~ s!.*/!!;
$xsession_file ||= $desktop;
@@ -1145,10 +1150,13 @@ sub ask_user_and_root {
}
sub sessions() {
- my $old = chdir('$::prefix/usr/share/xsessions/');
- my @l = map { s/.desktop$//; $_ } glob("*.desktop");
- chdir($old);
- @l;
+ my @dir_wm = qw(xsessions wayland-sessions);
+ foreach my $dwm (@dir_wm) {
+ my $old = chdir("$::prefix/usr/share/$dwm/");
+ 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'));