I am using NetBeans 8.0.1 on windows and compiling/running/debugging on a remote host on a debian PC on the LAN. I have set up the NetBeans host as root. I also have it set up to debug using gdb. My C code includes the alsa libraries and attempts to call snd_pcm_open
and get a handle.
The problem is that when I debug the executable from NetBeans, I get this error message which basically means a permission issue I believe:
ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave.
Test results:
- Local machine terminal as root runs correctly.
- Local machine terminal as non root user runs correctly.
- Remote SSH as non root user runs correctly.
- Remote SSH as root gives error message.
I have tried adding root to the audio group, which doesn’t help.
So the basic questions are:
- Should this be approached as an environment or shell setup issue? If so, what should I look for?
- Is there a best practice for remote host setup? Should this be a non root user set up some way to allow compiling and gdb, etc?