I’m working on a script that builds Debian binaries for a project that has a reasonably complex build system (c++/Qt). I’ve got my script generating packages with the maintainer scripts that set things up appropriately. Users in a group, created by the maintainer scripts, have access to the /opt directory where the binaries are installed. I’d like to add both desktop shortcuts and additional PATH variables for users in the group created by the maintainer script so it’s easier to execute the binaries. I’ve already tried adding a shell script to the /etc/profile.d directory that in theory should add to the user’s path based on their group membership (this didn’t work and resulted in booting into recovery mode to remove the offending script).
So the multipart question that I’m asking is:
What is considered best practices for achieving what I’d like to achieve?
How do I go about accomplishing this?