Checking the saving and restoring of X sessions

I observed some difficulties around around the restore of some applications like Dolphin and Konsole for sessions within “KDE Plasma 5.4”. Now I wonder about similar surprises in the desktop environment “XFCE 4.12.1”.
Would you like to share any more ideas for the determination of open issues and possible fixes in the desired system configuration?

Session Management in Plasma5 works fine.
But there’s a bug/incorrect behavior in Qt5 which causes Qt5 (or KF5) applications to not be reliably restarted. They quit too early and therefore might not be seen as still running on logout by the session manager.

See:
https://bugzilla.opensuse.org/show_bug.cgi?id=955280
https://bugs.kde.org/show_bug.cgi?id=354724
https://bugreports.qt.io/browse/QTBUG-49667

Manually storing the session works though. (Configure Desktop->Startup and Shutdown->Session Management, activate "Start with a manually stored session, you’ll get an entry “Save Session” then in “Session/Power Management” in the application menu, where Logout/Shutdown and so on are located)

Now I wonder about similar surprises in the desktop environment “XFCE 4.12.1”.
Would you like to share any more ideas for the determination of open issues and possible fixes in the desired system configuration?

As this is a “bug” in the applications, you will have the same problem with those applications in any desktop environment.
I.e. dolphin and konsole will not be restarted as well if you use XFCE or whatever.
Other applications which do not use Qt5 should be restored correctly, even with Plasma5.

I cannot tell you anything about XFCE’s session management though, as I never used it.

Hi,
In xfce you can manually save the session or set it to autosave the session.
The next time you login, it will prompt you which save session you want to use.
It is working in openSUSE Leap 42.1.

Thanks for the links to the other bug reports.

Manually storing the session works though. (Configure Desktop->Startup and Shutdown->Session Management, activate "Start with a manually stored session, you’ll get an entry “Save Session” then in “Session/Power Management” in the application menu, where Logout/Shutdown and so on are located)

Thanks for this information.

Does any session manager offer the possibility to choose the desired session on log-in explicitly?

  • Restoration of the last saved configuration
  • Selection of a special session variant from a collection

As this is a “bug” in the applications, you will have the same problem with those applications in any desktop environment.

Are any users becoming more aware about some software development challenges for a proper session management?

I cannot tell you anything about XFCE’s session management though, as I never used it.

Would you like to share any more experiences around the other approaches?

You’re welcome.

Does any session manager offer the possibility to choose the desired session on log-in explicitly?

Not as far as I know.
You can either restore a (one) manually saved session, or the state at logout (automatically saved, which currently doesn’t work reliably with Qt5/KF5 applications), or none at all.

That definitely is the case for KDE. I don’t know about other desktop environments.

Are any users becoming more aware about some software development challenges for a proper session management?

What do you mean with that?

Some users complain about this problem with Qt5/KF5 applications, yes.
But then there are also users (especially Linux newbies) that ask for help because applications are restored and they don’t know why.

Would you like to share any more experiences around the other approaches?

What “other approaches” do you mean now?

I only use KDE4 and Plasma5, I don’t have any experience with “other approaches”. Except IceWM which doesn’t support session management at all AFAIK.

But the session management protocol is actually an Xorg standard.

Are any more users and developers becoming interested to improve the provided functionality a bit more?

But the session management protocol is actually an Xorg standard.

Is it interesting that we struggle with corresponding implementations nowadays?

Well, most of the times users just demand that things work, and if confronted with the fact that this is open source they react with “I cannot write programs”…

Of course they shouldn’t have to, but I hope this answers your question.

Is it interesting that we struggle with corresponding implementations nowadays?

The problem is not really “struggling with corresponding implementations”. The protocol is clear, and Plasma5 implements it correctly AFAIK.
It is “just” a bug in Qt (which is cross-platform, not only X11) that has been worked around in KDE since years apparently.

With KF5/Plasma5 nobody noticed really until recently, because many didn’t even use that yet, and the developers apparently don’t use session management (hibernate/resume is similar and brings you back to exactly the same state).

It seems that I observe still unwanted behaviour for the desired restore of software like “Dolphin”, “Konsole” and “KWrite” (from “KDE applications 16.08.3”) in XFCE sessions.

  • Do the chances increase that the involved software dependencies will be improved more?
  • Will any additional tools become available for the storage and inspection of sessions?