OTP57V Java: User Reboot

Informationen rund um die Panel PC TRM926 und Operator Touch Panel OTP57V. Linux, Java, Phyton Gtk...
Benutzeravatar
AESupport
Beiträge: 177
Registriert: Sa Jul 02, 2016 1:31 am

OTP57V Java: User Reboot

Beitragvon AESupport » Di Jul 12, 2016 8:20 am

Q: In our panel application we need to allow the user reboot/shutdown Linux system. I’ve noticed this choice in OTP/57V ConfigToolBB6.jar application. I know how to do it with sudo user or setuid root programs, but your method is unknown for me. Can you please describe it to me?


A: The official way is to configure and use sudo. setuid does not work for scripts in that Linux kernel.
We have a helper daemon that waits on a pipe for commands. The daemon runs as root and the Java application can send commands to that daemon.

Zurück zu „Panel PC TRM926 / Touch Panel OTP57V“