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 runtime dependency

Qt runtime dependency

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 Posters 935 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.
  • Kanni1303K Offline
    Kanni1303K Offline
    Kanni1303
    wrote on last edited by
    #1

    Hi,
    I am using pigpio in my project to use gpio and spi, the problem I'm facing is not able to run the applciation

    when tried to run my application with sudo

    sudo ./oilTemp
    

    got error

    QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
    libEGL warning: DRI2: failed to authenticate
    Unable to query physical screen size, defaulting to 100 dpi.
    To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
    EGL Error : Could not create the egl surface: error = 0x300b
    
    Aborted
    
    

    When i tried to run without sudo

    ./oilTemp
    

    I am getting following error

    2019-05-16 00:16:11 gpioWrite: pigpio uninitialised, call gpioInitialise()
    2019-05-16 00:16:11 gpioWrite: pigpio uninitialised, call gpioInitialise()
    2019-05-16 00:16:11 gpioRead: pigpio uninitialised, call gpioInitialise()
    2019-05-16 00:16:11 gpioWrite: pigpio uninitialised, call gpioInitialise()
    2019-05-16 00:16:11 gpioWrite: pigpio uninitialised, call gpioInitialise()
    2019-05-16 00:16:11 gpioWrite: pigpio uninitialised, call gpioInitialise()
    2019-05-16 00:16:11 gpioRead: pigpio uninitialised, call gpioInitialise()
    
    

    Character make's Gentlemen, not appearance.
    --Vivekananda

    1 Reply Last reply
    0
    • Kent-DorfmanK Offline
      Kent-DorfmanK Offline
      Kent-Dorfman
      wrote on last edited by
      #2

      This is not a Qt problem, per se, but your lack of understanding how X11 display authentication works. When you sudo you lose the xauth credentials that allow your app to talk to the display hardware.

      You should also review your use of the gpio library and compare your use case against other reference design projects. You either need to make gpio not require root access, or learn how to migrate xauth credentials to the root user.

      Of course what I'd do is simply enable the root user and log in my X11 session as root, much to the shagrin of the kiddies who were brought up believing what their college professors told them: that you should never log in as root.

      1 Reply Last reply
      2
      • fcarneyF Offline
        fcarneyF Offline
        fcarney
        wrote on last edited by fcarney
        #3

        @Kent-Dorfman said in Qt runtime dependency:

        enable the root user and log in my X11 session as root

        You are a monster!

        who were brought up believing what their college professors told them

        Yeah, experience after college tends to debunk a lot of sh...er...crap they taught in school.

        C++ is a perfectly valid school of magic.

        1 Reply Last reply
        2
        • enjoysmathE Offline
          enjoysmathE Offline
          enjoysmath
          wrote on last edited by
          #4
          This post is deleted!
          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