grbl / grbl-sim

Compiles Grbl into an executable for your computer.
GNU General Public License v3.0
89 stars 76 forks source link

socat without sudo? #7

Closed winder closed 9 years ago

winder commented 9 years ago

On my LinuxMint machine I needed to run socat as sudo, at which point the /dev/ttyFAKE device is owned by root.root instead of root.dialout. At this point my GUI application can connect to /dev/ttyFAKE just fine when I run it as root, but I'd rather not have to run my IDE/debugger as root if I can find a way to avoid that.

ashelly commented 9 years ago

I avoid running socat as sudo by setting the devicename to /tmp/ttyFAKE instead. see simport.sh. This works for my python client.

Another option: run socat as sudo, then sudo chmod a+rw /dev/ttyFAKE. After doing this, I I got gtkterm to connect to /dev/ttyFAKE when running under my own user ID.

winder commented 9 years ago

Thanks, chmod works. I was trying chown before and the owner wasn't being changed.

simport.sh isn't working though, it gives me different error when I run it, I tried a few different directories besides /tmp that my user should have write access to:

fopen: Permission denied
2015/05/29 13:53:44 socat[9784] W waitpid(): child 9785 exited with status 255
winder commented 9 years ago

I worked around this with pull request #8