5

My computer is running Ubuntu 16.04 and has a GPS receiver connected to a USB port.

gpsmon shows that the GPS receiver is locked and running.

sudo gpsmon /dev/ttyUSB0 works great!

Why do I have to use sudo to run gpsmon every time?

Is there a way to set the system clock on Ubuntu 16.04 to the time being reported by the GPS receiver without using NTP?

Kevin Bowen
  • 19,395
  • 55
  • 76
  • 81
beampoweramp
  • 81
  • 1
  • 4
  • Have you taken a look at `pps-tools`, or tutorials like [gps on raspberry pi 3](https://gary-dalton.github.io/RaspberryPi-projects/rpi3_gps.html), or [My ADSB Receiver Box – GPS Precision Time](https://www.mictronics.de/2016/12/gps-precision-time-upgrade-1/) – J. Starnes Dec 22 '17 at 05:43
  • To remove the requirement for sudo, add your username to the dialout group. `sudo adduser username dialout` – Jean-Marie Dec 23 '17 at 16:20

1 Answers1

1

BTW, why do I have to use sudo to run gpsmon every time?

Most likely, your normal user account doesn't have privileges to /dev/ttyUSB0.

From the command line, type:

ls -l /dev/ttyUSB0

And it will return something like:

crw-rw---- 1 root dialout 188, 0 Jan  2 20:46 ttyUSB0

The "root" part is the user that owns the file, the "dialout" is a group associated with the device. You need to add your user account to the group "dialout" then you wont need to start gpsmon with sudo.

This should get you going:

usermod -a -G dialout yourusername

Hope this helps...

k2za_john
  • 11
  • 2