toolboc / psx-pi-smbshare

A swiss army knife for enhancing classic game consoles with Raspberry Pi
387 stars 34 forks source link

Remove Hardcode User PI #24

Closed esfomeado closed 3 years ago

esfomeado commented 3 years ago

You should use the current use home directory instead of having the user PI hardcoded.

toolboc commented 3 years ago

We default to the pi user because is the standard employed in existing Raspbian documentation.

As of writing, there are three places in the code that need to reference the pi user explicitly:

There are also multiple references to the path /home/pi in setup.sh, this ensures that files are accessible to the default pi user after installing with 'sudo':

We make these assumptions because we explicitly support Raspbian in the release images, where the pi user is expected to exist. I suppose this would break custom installs on devices that do not have this user present, which is technically an unsupported use case. Perhaps it could be investigated to support a mechanism that allows you to install everything for a custom user, assuming this would have broad appeal and be a benefit to a new audience. Has this assumption caused issues for you?