...and, further, if UserA installs the software, but UserB runs it, UserB won't have the hidden directory under /home/UserB
. Also, the hidden directory under /home/UserA
will be owned by root, not userA.
So, you need to have the application create the hidden directory, not the installer.
Another possible option is not to install in the system directories; one possible alternative location is /usr/local
. However, even that can require root privileges. Think about whether it can be installed in other places, and how it could locate its materials.
However, requiring root privileges to install is not the end of the world - a nuisance for some, but not completely out of order. But requiring everyone who uses to have root privileges is way out of order - and if everyone who uses it needs to run the installer, that is bad.
Final point (for now): if you use sudo
, it does not change the value of $HOME, even as you acquire root privileges. However, requiring everyone who uses your application to have sudo
privileges is not a good thing either.