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