Hey everyone I’m working with spi and have enabled the feature in the advanced section. I’ve noticed though that enabling the feature doesn’t automatically add the user to the spi group wich could cause some issues to unexperienced users that don’t know they have to add the user to the group. I think there should be a new dialogue when enabling spi to ask if the user wants to be added to the group too.
Hm it depends on the usecase.
For almost every software a user is created on DietPi. If this software wants to use SPI you would need to add the corresponding user and not the user which activates this option.
You could make a text-menu with every use available, but maybe a text info would be already sufficient?!
The question is also which user is “the user” since the script runs as root. When
sudo is used, there is the
SUDO_USER variable, but if
runuser or a root session is used, we cannot know. And also in case of
sudo we cannot know whether the user which called the script is also the one which needs to use the SPI instance or whether it is some service/system user.
So I think better than guessing what the admin wants in case of such potentially sensitive permission questions would be some user management instance, for those which are not familiar with
yup a text info could be sufficient! just to alert the user that the script that enables spi doesn’t grant them permissions