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. No protocol specified
Forum Updated to NodeBB v4.3 + New Features

No protocol specified

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 775 Views
  • 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.
  • taku-sT Offline
    taku-sT Offline
    taku-s
    wrote on last edited by
    #1

    Hi.all
    I will ask you a question again.

    An application created with Qt WidgetApplication can be executed with user privileges, but an error will occur if executed as root.

    No protocol specified
    qt.qpa.screen: QXcbConnection: Could not connect to display: 0
    Could not connect to any X display

    This state becomes a problem when starting an application from rc.local.

    Is there a solution?

    aha_1980A JonBJ 2 Replies Last reply
    0
    • taku-sT taku-s

      Hi.all
      I will ask you a question again.

      An application created with Qt WidgetApplication can be executed with user privileges, but an error will occur if executed as root.

      No protocol specified
      qt.qpa.screen: QXcbConnection: Could not connect to display: 0
      Could not connect to any X display

      This state becomes a problem when starting an application from rc.local.

      Is there a solution?

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by aha_1980
      #2

      Hi @taku-s,

      Does your program needs to be run as root? (which would be a very bad idea).

      Otherwise start it with su -c yourprog <user>.

      Regards

      Qt has to stay free or it will die.

      1 Reply Last reply
      0
      • taku-sT taku-s

        Hi.all
        I will ask you a question again.

        An application created with Qt WidgetApplication can be executed with user privileges, but an error will occur if executed as root.

        No protocol specified
        qt.qpa.screen: QXcbConnection: Could not connect to display: 0
        Could not connect to any X display

        This state becomes a problem when starting an application from rc.local.

        Is there a solution?

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

        @taku-s
        I may not know what I am talking about here. So take with a pinch of salt. But (a) I thought there are sometimes problems with running X Windows programs as root instead of logged in user, and (b) if you start an app from rc.local what is it doing looking for an X display anything, you cannot access/assume any X connection anything from there, it's not supposed to be for programs requiring UI interaction?

        1 Reply Last reply
        0
        • taku-sT Offline
          taku-sT Offline
          taku-s
          wrote on last edited by
          #4

          Thank you, everyone.
          As you said, it may not be a Qt issue.
          The Debian 10 I use seems to have changed from Xorg to Wayland, so this is the problem?
          I will try the startup method from the user.

          1 Reply Last reply
          0

          • Login

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