fossasia / pslab-desktop

PSLab Desktop Application https://pslab.io
GNU General Public License v3.0
1.77k stars 364 forks source link

Handle installation of udev rules via CLI on Linux #695

Open bessman opened 2 years ago

bessman commented 2 years ago

On Linux, a udev rule must be installed before a user can access the PSLab device (unless the user is a member of a certain group, usually called 'dialout'). pslab-python offers a convenient way to install the udev rule via the command pslab install. pslab-desktop should offer the same feature, in case we decide to bundle pslab-python with pslab-desktop in the future (in which case pslab-python will not be accessible on the command line).

Since this feature requires root privileges, it makes sense to handle it on the command line in order to not have to handle privilege escalation within the app itself.

This is only relevant on Linux.

orangecms commented 2 years ago

This is the responsibility of a package manager, so that it tracks what in the system belongs to what software, so that it can be installed and uninstalled cleanly. See e.g. https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=python-pslab#n26