diff --git a/gnome-session.changes b/gnome-session.changes index db65d65..a57e4d7 100644 --- a/gnome-session.changes +++ b/gnome-session.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Oct 19 04:57:29 UTC 2017 - xwang@suse.com + +- Make default.desktop session working on wayland. + Add default.desktop file in '{_datadir}/wayland-sessions/' + (bsc#1062196). + ------------------------------------------------------------------- Wed Oct 4 12:29:23 UTC 2017 - zaitor@opensuse.org diff --git a/gnome-session.spec b/gnome-session.spec index 284dba0..e0923ab 100644 --- a/gnome-session.spec +++ b/gnome-session.spec @@ -140,6 +140,8 @@ rm -fr %{buildroot}%{_datadir}/wayland-sessions mkdir -p %{buildroot}%{_sysconfdir}/alternatives touch %{buildroot}%{_sysconfdir}/alternatives/default-xsession.desktop ln -s %{_sysconfdir}/alternatives/default-xsession.desktop %{buildroot}%{_datadir}/xsessions/default.desktop +touch %{buildroot}%{_sysconfdir}/alternatives/default-waylandsession.desktop +ln -s %{_sysconfdir}/alternatives/default-waylandsession.desktop %{buildroot}%{_datadir}/wayland-sessions/default.desktop %post %{_sbindir}/update-alternatives --install %{_datadir}/xsessions/default.desktop \ @@ -163,10 +165,20 @@ ln -s %{_sysconfdir}/alternatives/default-xsession.desktop %{buildroot}%{_datadi %{_datadir}/gnome-session/sessions/gnome-dummy.session %ifnarch s390 s390x +%post wayland +%{_sbindir}/update-alternatives --install %{_datadir}/wayland-sessions/default.desktop \ + default-waylandsession.desktop %{_datadir}/wayland-sessions/gnome.desktop 25 + +%postun wayland +[ -f %{_datadir}/wayland-sessions/gnome.desktop ] || %{_sbindir}/update-alternatives \ + --remove default-waylandsession.desktop %{_datadir}/wayland-sessions/gnome.desktop + %files wayland %defattr (-, root, root) %dir %{_datadir}/wayland-sessions +%{_datadir}/wayland-sessions/default.desktop %{_datadir}/wayland-sessions/gnome.desktop +%ghost %{_sysconfdir}/alternatives/default-waylandsession.desktop # Disabled as wayland is now the default session again. #{_datadir}/wayland-sessions/gnome-wayland.desktop %endif