Sample Header Ad - 728x90

Setting time with clock_settime without having root access

0 votes
1 answer
2527 views
I have written a C program that syncs the time with the time from a GPS reciever. The computer is running Ubuntu 16.04 LTS. The program uses clock_settime(CLOCK_REALTIME, ×pec) to set the time. The program is executed in a bash script, and I cannot use sudo as the script is launched by the use of a desktop file. Anyone has an idea ? NB: The script is executing multiple programs, that I do not want to execute as root
Asked by Morten Skovgaard (1 rep)
Feb 28, 2018, 03:51 PM
Last activity: Aug 31, 2023, 06:06 PM