Page 1 of 1

sbin missing in path

Posted: Sun Jun 17, 2012 2:56 am
by gregd99
At the moment I am doing most of my pi experiments using an rdp session as it save setting up another keyboard/mouse/monitor...

I can rdp to the pi. can samba back to my pc drives so all the basics are working.

I have found something, which to me, is a bit strange.

If I login with a keybaord connected to the pi then I am able to use apt-get to install packages. Form the rdp session this fails with a string of messages saying ldconfig not found.

when I look further I see that all of the sbin paths are missing from $PATH.

I suspect that this is a simple problem to solve.... but blowed if I know how.

any hints?

Re: sbin missing in path

Posted: Sun Jun 17, 2012 6:19 am
by bitplane
My Pi hasn't arrived yet and I haven't used RDP on Linux, but I'd guess that /etc/environment isn't being executed. Maybe try adding a ". /etc/environment" line to your ~/.bashrc or /etc/profile?

Re: sbin missing in path

Posted: Mon Jun 18, 2012 9:58 am
by jojopi
I assume you are using the foundation's recommended debian image.

It is actually normal in standard debian that sbin is not in the path of non-root users, even those with sudo access. The foundation's images have tried to add sbin to path, but it does not work in all session types. The default path for xrdp was built into the package at compile time by debian.

One easy workaround is to use "sudo -i apt-get ...". This sets the environment for the sudo'd command to be more as if you had initially logged in as root. If you want to change PATH permanently you can do it in ~/.bashrc for one user, or /etc/bash.bashrc for all users.