https://github.com/hadess/iio-sensor-proxy is going to be the preferred way to access sensors on non-Android Linux systems, covering Accelerometers, Light Sensors and Compass support. Compass when implemented in iio-sensor-proxy will probably be proxied through Geoclue2, so this shouldn't be a blocker. The 2 other types should be implementable already.