diff options
author | Aurelian R <arusanu@gmail.com> | 2024-12-05 19:09:44 +0100 |
---|---|---|
committer | Papoteur <papoteur@mageia.org> | 2024-12-05 19:09:44 +0100 |
commit | 98978485ff2231e909c66639e22c7cbefc4af417 (patch) | |
tree | 40a0b5e023906e4766fc275c40b58eea96297334 | |
parent | e090cb8b4aaeb93c31dbfa1aa94480adc35ab4db (diff) | |
download | drakx-98978485f.tar drakx-98978485f.tar.gz drakx-98978485f.tar.bz2 drakx-98978485f.tar.xz drakx-98978485f.zip |
Manage also Wayland session in MCC
At this moment, MCC knows only about the X session location (/usr/share/xsessions/); hence, it cannot load or set Wayland sessions as they are located in /usr/share/wayland-sessions/. With this patch, MCC looks also at /usr/share/wayland-sessions/
-rw-r--r-- | perl-install/any.pm | 26 |
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')); |