Summary: | GTK applications are not restored in Plasma 5.6.x after relogin | ||
---|---|---|---|
Product: | [Unmaintained] ksmserver | Reporter: | Piotr Mierzwinski <piotr.mierzwinski> |
Component: | general | Assignee: | Lubos Lunak <l.lunak> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ahartmetz, oliver.henshaw, piotr.mierzwinski, wbauer1 |
Priority: | NOR | ||
Version: | 5.6.3 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/plasma-workspace/e4a76cd947759fd723935965ca30c00021601a45 | Version Fixed In: | |
Sentry Crash Report: |
Description
Piotr Mierzwinski
2016-05-04 18:03:12 UTC
I made next test. Being in System Settings I switched from "Restore previous session" to "Restore manually saved session" (in Plasma eng. version options might be call a bit different, I translated from polish). After that in K menu in "Leave" tab I found option "Save session". I clicked it and checked ksmserverrc file - last modification date was changed. Unfortunately turned out that neither Thunderbird nor Opera is not saved. After that I run Firefox and repeated procedure. And again in ksmserverrc file there wasn't nothing about Firefox, Thunderbird and Opera :(. Nothing about any GTK application has been saved. I tested with some GTK2/3 applications I have installed here (gnucash, gnome-terminal and gedit in particular), and indeed none of them are saved/restored in Plasma5, while they are in KDE4. KDE4 saves them to the "LegacySession" section in ksmserverrc, so apparently they (or GTK) does not support XSMP, only the older XSM, which has been removed from ksmserver in 5.6 with this commit: https://quickgit.kde.org/?p=plasma-workspace.git&a=commit&h=5f0ca1305db4a925dbdbf927f541497be334feff And indeed, reverting this fixes the problem and makes those applications being restored properly. CC'ing Andreas Hardmetz, who made this change. Ideally, the GTK developers should add XSMP support to their applications/toolkit though, as not even GNOME restores them (if you enable the hidden "auto-save-session in dconf-editor), while it does restore KDE applications. No idea whether this might also be the reason for your problem with Firefox and Thunderbird, Firefox does get restored correctly here in openSUSE so it does seem to support XSMP. Opera doesn't seem to support session management at all though, it isn't restored by KDE4 either. (In reply to Wolfgang Bauer from comment #2) > No idea whether this might also be the reason for your problem with Firefox > and Thunderbird, Firefox does get restored correctly here in openSUSE so it > does seem to support XSMP. I just noticed that KDE4 actually stores Firefox in the "LegacySession" section as well. So I tried again with Plasma 5.6.4, and indeed it doesn't restore Firefox in openSUSE either. Sorry for my mixup... (openSUSE Leap 42.1 comes with Plasma 5.5.4 where XSM support wasn't removed yet, so that's why it works there) And reverting above-mentioned commit (i.e. restore XSM support) makes Firefox being restored as well. I'm quite sure it's the same for Thunderbird too then. Btw, http://quickgit.kde.org/?p=kwin.git&a=commitdiff&h=2eac7634cc524bf5e425cf081a639a6b6407e380 in kwin needs to be reverted too, so that the window geometries and which virtual desktop the windows were on (and other window attributes) are stored/restored as well. Git commit e4a76cd947759fd723935965ca30c00021601a45 by Andreas Hartmetz. Committed on 23/06/2016 at 17:36. Pushed by ahartmetz into branch 'Plasma/5.6'. Revert "Remove legacy session management support." This reverts commit 5f0ca1305db4a925dbdbf927f541497be334feff. Firefox and some GTK+ 2 applications still seem to use the old way. For shame. M +1 -0 ksmserver/CMakeLists.txt A +419 -0 ksmserver/legacy.cpp [License: UNKNOWN] * M +1 -0 ksmserver/server.cpp M +26 -2 ksmserver/server.h M +11 -1 ksmserver/shutdown.cpp M +2 -0 ksmserver/startup.cpp The files marked with a * at the end have a non valid license. Please read: http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page. http://commits.kde.org/plasma-workspace/e4a76cd947759fd723935965ca30c00021601a45 Git commit 59740e7416bb2b3a9852212fa4b213e5ba76deb7 by Andreas Hartmetz. Committed on 23/06/2016 at 17:40. Pushed by ahartmetz into branch 'Plasma/5.6'. Revert "Remove saving and loading (and client matching by) WM_COMMAND." This reverts commit 2eac7634cc524bf5e425cf081a639a6b6407e380. M +1 -1 activities.cpp M +17 -4 sm.cpp M +1 -0 sm.h M +13 -0 toplevel.cpp M +1 -0 toplevel.h http://commits.kde.org/kwin/59740e7416bb2b3a9852212fa4b213e5ba76deb7 Git commit aee734e126b16db3be510a46ead9134c987fc97b by Andreas Hartmetz. Committed on 23/06/2016 at 19:00. Pushed by ahartmetz into branch 'Plasma/5.7'. Revert "Remove legacy session management support." This reverts commit 5f0ca1305db4a925dbdbf927f541497be334feff. Firefox and some GTK+ 2 applications still seem to use the old way. For shame. Cherry-picked from 5.6. M +1 -0 ksmserver/CMakeLists.txt A +419 -0 ksmserver/legacy.cpp [License: UNKNOWN] * M +1 -0 ksmserver/server.cpp M +26 -2 ksmserver/server.h M +11 -1 ksmserver/shutdown.cpp M +2 -0 ksmserver/startup.cpp The files marked with a * at the end have a non valid license. Please read: http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page. http://commits.kde.org/plasma-workspace/aee734e126b16db3be510a46ead9134c987fc97b Git commit bdf555bbcb277566d5901de9902990024f680dfe by Andreas Hartmetz. Committed on 23/06/2016 at 18:59. Pushed by ahartmetz into branch 'Plasma/5.7'. Revert "Remove saving and loading (and client matching by) WM_COMMAND." This reverts commit 2eac7634cc524bf5e425cf081a639a6b6407e380. Cherry-picked from 5.6. M +1 -1 activities.cpp M +17 -4 sm.cpp M +1 -0 sm.h M +13 -0 toplevel.cpp M +1 -0 toplevel.h http://commits.kde.org/kwin/bdf555bbcb277566d5901de9902990024f680dfe Git commit 2946faa9a4e1fa2eb85d67f0bb11bd3f62f331aa by Andreas Hartmetz. Committed on 23/06/2016 at 19:06. Pushed by ahartmetz into branch 'master'. Revert "Remove legacy session management support." This reverts commit 5f0ca1305db4a925dbdbf927f541497be334feff. Firefox and some GTK+ 2 applications still seem to use the old way. For shame. Cherry-picked from 5.6. M +1 -0 ksmserver/CMakeLists.txt A +419 -0 ksmserver/legacy.cpp [License: UNKNOWN] * M +1 -0 ksmserver/server.cpp M +26 -2 ksmserver/server.h M +11 -1 ksmserver/shutdown.cpp M +2 -0 ksmserver/startup.cpp The files marked with a * at the end have a non valid license. Please read: http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page. http://commits.kde.org/plasma-workspace/2946faa9a4e1fa2eb85d67f0bb11bd3f62f331aa Git commit 03f0dc51d72ba0ad55fe077a519e1041c937ac6d by Andreas Hartmetz. Committed on 23/06/2016 at 19:07. Pushed by ahartmetz into branch 'master'. Revert "Remove saving and loading (and client matching by) WM_COMMAND." This reverts commit 2eac7634cc524bf5e425cf081a639a6b6407e380. Cherry-picked from 5.6. M +1 -1 activities.cpp M +17 -4 sm.cpp M +1 -0 sm.h M +13 -0 toplevel.cpp M +1 -0 toplevel.h http://commits.kde.org/kwin/03f0dc51d72ba0ad55fe077a519e1041c937ac6d For future reference: firefox 50 now supports xsmp again - support needed to be re-added after it moved to gtk3 - see https://bugzilla.mozilla.org/show_bug.cgi?id=694570 (and presumably equivalently new version of thunderbird will too); gtk2 applications need libgnome and libgnomeui installed to register with xsmp; I don't know what the status of opera or chrome is. About Opera. Seems that recently stable Opera (41.0.2353.69) is still linked with gtk2 (checked on latest Antergos with updates on this day). $ ldd /usr/lib/opera/opera | grep gtk libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0x00007fbe18982000) $ ldd /usr/lib/opera/opera | grep gdk libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x00007f11d0a7b000) libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0x00007f11d0186000) I'm not sure if there is any bug (reported in Opera bugs tracker) related with lack of support xsmp. (In reply to Piotr Mierzwinski from comment #11) > About Opera. > Seems that recently stable Opera (41.0.2353.69) is still linked with gtk2 > (checked on latest Antergos with updates on this day). > $ ldd /usr/lib/opera/opera | grep gtk > libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 > (0x00007fbe18982000) > $ ldd /usr/lib/opera/opera | grep gdk > libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 > (0x00007f11d0a7b000) > libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 > (0x00007f11d0186000) > > I'm not sure if there is any bug (reported in Opera bugs tracker) related > with lack of support xsmp. Somehow, on my fist attempt to get opera, I managed to download opera 12 (the last presto version) from opera.com and that did support xsmp session restore: # ldd /usr/lib64/opera/opera | egrep "ICE|SM" libSM.so.6 => /lib64/libSM.so.6 (0x00007f2d5cd57000) libICE.so.6 => /lib64/libICE.so.6 (0x00007f2d5cb3b000) so it seems that support has been lost when it started using the blink engine. (In reply to Oliver Henshaw from comment #10) > gtk2 applications need > libgnome and libgnomeui installed to register with xsmp; Well, I do have libgnome and libgnomeui installed (and also did when I wrote comment#2). But I just tried again, and gnucash and gvim (GTK2 applications) are still stored in the "LegacySession" section, same as gedit and gnome-chess btw (which are GTK3 applications). But I can confirm that Firefox 50 is now in the standard section indeed, thank you. Opera 12 still used Qt(3) for its GUI which may explain why this version did support XSMP. Just a note that IIRC xsmp first came about in the early 1990s - so it probably predates gtk. But I think the legacy session management is just what you get if you don't take advantage of the libraries in your toolkit that support xsmp. I think the main difference with Qt is that you would have to make an effort to opt out to avoid xsmp and fall back to the "legacy session management". |