Qt runtime dependency
-
Hi,
I am using pigpio in my project to use gpio and spi, the problem I'm facing is not able to run the applciationwhen 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()
-
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.
-
@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.
-
This post is deleted!