Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing SDK on new Raspbian Build assumes user is 'pi' #13

Open
neoskedar opened this issue Oct 23, 2023 · 2 comments
Open

Installing SDK on new Raspbian Build assumes user is 'pi' #13

neoskedar opened this issue Oct 23, 2023 · 2 comments
Assignees

Comments

@neoskedar
Copy link

Should be noted that the install.sh in the SDK directions is assuming your current user is pi and it looks for /home/pi as a part of the script. When I did my fresh install, I did not leave the username as pi. I was able to manually update the install.sh for my username, but this would be a good thing to note in the SDK directions.

@zytegalaxy
Copy link
Collaborator

Hey Aaron, Thanks a lot for opening this issue and your feedback. That has been a pain point for me too. We are in the process of revamping our SDK installation process and this is something we have to rewrite.

Probably it makes more sense to create a ubo user-space and install the SDK under that. Previously all Pis had the pi user by default but more it is gradually becoming a more pronounced issue.

I would appreciate if you have any suggestions on best way to fix this issue.

I am also in the process of setting this repo and thinking about making a discussion group for the people you are currently using it. I would love to have your participation in the discussion as well.

@neoskedar
Copy link
Author

I believe I was able to fix the user dependency by making a few changes to the install scripts.

In install.sh I added aline at line 2 of export UBO_USER=$HOME to save the current user's home directory as an ENV variable and then on line 3, I export that variable to sudoers so it can be reference when we run the start_services.sh with the code echo "Defaults env_keep += "UBO_USER"" | (sudo su -c 'EDITOR="tee -a" visudo')
and on the now line 4, I changed UBO_HOME=/home/pi/ubo-sdk to UBO_HOME=$UBO_USER/ubo-sdk
and finally on line 16, I change . /home/pi/ubo-venv/bin/activate to . $UBO_USER/bin/activate

in start_services.sh on line 1, I changed UBO_HOME=/home/pi/ubo-sdk to UBO_HOME=$UBO_USER/ubo-sdk
and line 2, I changed export PATH=$PATH:/home/pi/.local/bin to export PATH=$PATH:$UBO_USER/.local/bin

I have tested this on a fresh install of Raspbian and executed as a user not named 'pi' and it seems to work with no issues except for the running of the services. Exploring ways to make the services more dynamic and will update once I have found a solution.

@zytegalaxy zytegalaxy self-assigned this Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants