12-27-2019 10:57 AM
Hi everyone,
I am attempting a integrate an external library into a Labview RT Linux application. I can compile and run an application using the library in C++ but the same application fails to run when called through Labview. What I found is the compiled C++ application also fails to run from the command line when using the user lvuser. The application fails with the following response:
ERROR - cannot change scheduling policy!
root privilege is required or realtime group has to be joined!
I attempted to add the lvuser to the administrators group using the command usermod -a -G administrators lvuser. This had not effect. I cannot call su admin from the application as the actual interface to the library is through the call library function. Is there another way to elevated the user permissions of the lvuser?
Solved! Go to Solution.
07-20-2020 04:35 PM
I still need an answer. Is anyone able to help?
08-11-2020 01:05 PM
I was able to solve this using setcap in the command shell. I used the command:
setcap cap_net_bind_service,cap_net_admin,cap_ipc_lock,cap_sys_rawio,cap_sys_admin,cap_sys_boot,cap_sys_nice,
cap_sys_time+ep /usr/local/natinst/labview/lvrt
Reboot the system for
Inside of the Labview application you must call setuid(0) using call library function from the library libc.so.6. Make sure to set run in any thread as this is per thread.
05-09-2024 09:11 PM
My driver install in NI LINUX RT and put so to "/home/lvuser/natinst/bin"
Client of window Labview call so but has error : open dev failed ! Permission denied !
How to do ?