debrouxl / tilibs

TILP (formerly GtkTiLink) can transfer data between Texas Instruments graphing calculators and a computer. It works with all link cables (parallel, serial, Black/Gray/Silver/Direct Link) and it supports the TI-Z80 series (73..86), the TI-eZ80 series (83PCE, 84+CE), the TI-68k series (89, 92, 92+, V200, 89T) and the Nspire series (Nspire Clickpad / Touchpad / CX, both CAS and non-CAS)
http://lpg.ticalc.org/prj_tilp
67 stars 22 forks source link

Provide udev rules? #68

Open moeenio opened 2 years ago

moeenio commented 2 years ago

I'm very new to this program, so sorry if this has been discussed before.

I found TiLP thanks to someone linking to this page, where the review from 2005 says that the program must be run as root, and that "there is nothing the author can do about it".

When first launching it, it would not find my calculator. From what I read on that link I assumed it was because it didn't have permission to access it. Instead of running it as root as suggested, I created a udev rule for my calculator :

# /etc/udev/rules.d/40-ti-calc.rules
SUBSYSTEM=="usb", SUBSYSTEMS=="usb", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="e008", MODE="0666"

Now it seems to work fine when running it as a regular user. So, I'd like to know if it could be relevant for this program to include udev rules in order to facilitate usage, and if there's a particular reason why it currently doesn't.

Thanks in advance for any reply.

adriweb commented 2 years ago

Actually, the install script mentions this (it's indeed not recommended to run tilp as root), specifically to take a look at https://github.com/debrouxl/tilibs/blob/master/libticables/trunk/CONFIG for details

debrouxl commented 2 years ago

The upstream build+install script https://github.com/debrouxl/tilp_and_gfm/raw/master/tilp/trunk/build/scripts/install_tilp.sh does not attempt to create an udev rules file. A long time ago, udev rules changed in backwards-incompatible ways quite often (there are traces of that in this CONFIG file), but udev has long surpassed that stage, fortunately. Technically, making install_tilp.sh generate the udev rules file is trivial, for instance cat a here-document in verbatim mode to the udev rules file.