
How do I run my libfreespace apps as a non-root user on Linux?
First, you will either need a relatively new Linux kernel (2.6.30 or later) or a Linux distribution (i.e. Ubuntu 9.04 or later) that has already applied a patch to allow non-root users to access uevents (used by libfreespace to detect insertion and removal of Freespace devices). See this patch for more information. A simple way to check whether you have this patch is to see whether freespace_init() succeeds. All of the sample apps will error out immediately if it does not.
If the examples still don't work, the device files used to communicate over USB probably have root-only permissions. Most likely, your device files are automatically created by udevd. To fix this, add a udev rule. For example, in Ubuntu, you can do this by adding a file called /etc/udev/rules.d/99-local.rules. The contents should contain:
SUBSYSTEM=="usb", ATTR{idVendor}=="1d5a", MODE="0666"
1d5a is the USB vendor ID of all Hillcrest Labs' products. If the Freespace technology is embedded in another company's product, it may have a different vendor ID. To check, run the lsusb command.
