Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt "Session management error" on start up
Forum Updated to NodeBB v4.3 + New Features

Qt "Session management error" on start up

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 5.9k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • JonBJ Offline
    JonBJ Offline
    JonB
    wrote on last edited by JonB
    #1

    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?

    jsulmJ 1 Reply Last reply
    0
    • JonBJ 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?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @JonB Google told me: https://forum.qt.io/topic/77701/qt-session-management-error-could-not-open-network-socket

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      JonBJ 1 Reply Last reply
      1
      • jsulmJ jsulm

        @JonB Google told me: https://forum.qt.io/topic/77701/qt-session-management-error-could-not-open-network-socket

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #3

        @jsulm
        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 find reveals no *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....

        jsulmJ 1 Reply Last reply
        0
        • JonBJ JonB

          @jsulm
          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 find reveals no *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....

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @JonB OK, other possibility would be to search for this string in Qt sources to see what the condition for printing this is.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          JonBJ 1 Reply Last reply
          0
          • jsulmJ jsulm

            @JonB OK, other possibility would be to search for this string in Qt sources to see what the condition for printing this is.

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by JonB
            #5

            @jsulm

            1. 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.

            2. Lots of Google hits for others hitting this, no solutions/explanations (at least as applies to me).

            3. 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?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi,

              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.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved