hypriot / image-builder-rpi

SD card image for Raspberry Pi with Docker: HypriotOS
http://blog.hypriot.com/post/how-to-get-docker-working-on-your-favourite-arm-board-with-hypriotos/
MIT License
1.07k stars 168 forks source link

Add /sbin to pirate user PATH #107

Closed marcosnils closed 8 years ago

marcosnils commented 8 years ago

By default many non-root specific utilities are there. It'd be nice if the base image already includes this path in the PATH variable.

DieterReuter commented 8 years ago

@marcosnils what about just using sudo to use those commands! I'm assuming this should be the preferred way. But we can discuss this further.

marcosnils commented 8 years ago

@DieterReuter there shouldn't be a need to use sudo for commands that can be executed by the user?.

From a usability perspective is also better, I thought that some tools weren't installed as I kept getting command not found but the binaries were there, just not in the path, so I had to do a find / to realize about it

I've discussed this with @StefanScherer in Slack and he told me to file the issue.

StefanScherer commented 8 years ago

Yes to start the discussion and have feedback from real users :-) I don't remember how eg. standard Raspbian behaves.

DieterReuter commented 8 years ago

Let's just figure out the default behaviour of Raspbian and making some detailed tests, then we do have some more background to decide if we could easily improve the user experience.

marcosnils commented 8 years ago

@DieterReuter this is my first rpi experience and I just started an hour ago. I'm not familiarized with raspbian or it's directory structure but when I used it before installing hypriot, I could execute all those commands with the default pi user.

DieterReuter commented 8 years ago

@marcosnils I just had the chance to check the latest standard Raspbian with user "pi".

$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games

So, I think it's a good idea to include /sbin, /usr/sbin and /usr/local/sbin into the standard path of our pirate user, too.

Thanks for your finding.

DieterReuter commented 8 years ago

Here is the current PATH of user pirate in HypriotOS:

$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
DieterReuter commented 8 years ago

@marcosnils you can easily update your users .profile, so you don't have to wait for the next HypriotOS release. Login as pirate on your RPi and use this command:

curl -sSL -o ~/.profile https://github.com/hypriot/os-rootfs/raw/master/builder/files/etc/skel/.profile
StefanScherer commented 8 years ago

Will be part of os-rootfs v0.8.7. we'll add this in another PR to this repo.

marcosnils commented 8 years ago

@marcosnils you can easily update your users .profile, so you don't have to wait for the next HypriotOS release. Login as pirate on your RPi and use this command:

yup, made the change as soon as I realized about it. Thx!.

StefanScherer commented 8 years ago

Building v0.8.2 of the RPi SD card image. Should show up at GitHub releases later...

DieterReuter commented 8 years ago

@marcosnils could you please test the new release v0.8.2, which contains the solutions of #107, #108 and #109. New release is available for download here https://github.com/hypriot/image-builder-rpi/releases/tag/v0.8.2. And please send feedback about using the camera module!

marcosnils commented 8 years ago

@DieterReuter will try to do before the weekend.

StefanScherer commented 8 years ago

works fine!