Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt "Session management error" on start up
JonB last edited by JonB
Qt 5.7, Linux. I have an intermittent (fairly infrequent) error as the very thing which happens on starting to run my Qt application. (The fact that I use PyQt/Python should not be relevant, I understand that I'm more or less on my own in that respect.) The very first thing I see output is:
Qt: Session management error: Could not open network socket
This message happens intermittently, some days yes, some days no, there is no pattern, and has no relationship to any changes I might make in my code or not. The application actually continues to run fine. I have to restart the Linux machine for it to disappear, which is a bit pants.
Where does that Qt "Session management error" come from, why is trying to open a network socket, and what does it signify?
JonB last edited by
Yeah, I could have Googled, I spend all my time Googling others' question, I got lazy and fancied a chat about this :)
Your link takes me to https://stackoverflow.com/a/987089/489865. I don't have a hostname issue, I don't use any KDE stuff, I do use GNOME, but the
*session*files recently modified that are of any relevance. Ho-hum.
I'll just try logging off & logging on again, instead of rebooting, to see if that fixes, and report back....
@JonB OK, other possibility would be to search for this string in Qt sources to see what the condition for printing this is.
JonB last edited by JonB
Logging off did not clear. Rebooting did. I won't die in a ditch over this one, but I am interested as to what it is.
Lots of Google hits for others hitting this, no solutions/explanations (at least as applies to me).
I have to search online sources for Qt (I'm not C++). I believe the error comes at https://code.woboq.org/qt5/qtbase/src/plugins/platforms/xcb/qxcbsessionmanager.cpp.html#376 .
That would make it in
QXcbSessionManager. What's one of those all about, OOI, please?
That function starts with:
// avoid showing a warning message below if (!qEnvironmentVariableIsSet("SESSION_MANAGER")) return;
I don't know whether that variable is supposed to be set/clear under some circumstances so that the code error is not hit, or whether the code call is supposed to be made but should not error?
You can find more information about that variable here.
The QXXXSessionManager classes are used by application that wants to save/restore stuff on "session stop/restart". A session being started when you login to your desktop environment and stops when you logout.