Topic: correct place to modify $PATH on chumby one?

windows guy here with perhaps a very basic Linux-on-the-chumby question.... i've installed Java SE and simply want to add /mnt/storage/ejre1.6.0_25/bin to $PATH.

on the C1, i've tried modifying $PATH in /etc/profile, and also creating a ~/profile file, yet neither place's settings actually have any effect when i exit, SSH back in, and echo $PATH. it seems to be overwritten somewhere else.

so where should i modify $PATH so that both system processes and the root user via SSH are able to see the new setting?

Re: correct place to modify $PATH on chumby one?

/psp/.profile is the real file that ~/.profile is a symbolic link to.  I think your mistake was attempting a file in the home directory called "profile" and not ".profile".  In linux, a dot before the name makes it a hidden file so it doesn't show up with a regular "ls".  To see all of the hidden files, "ls -a" is used, and in the case of symbolic links, you'll want "ls -la" which will show long listing for all files.  That shows you that the file .profile is actually a link to /psp/.profile

Linux Guy - Occasional Chumby Hacker

Re: correct place to modify $PATH on chumby one?

thanks for the reply, problem solved by adding it into /psp/.profile

my confusion was 2 fold. first, there is a /etc/profile and it is called, however /psp/.profile is called later apparently, which resets the path instead of appending to it. second, when /etc/profile didn't work, i tried creating ~/profile instead of editing ~/.profile

so for any other noob that stumbles on this (here i'm specifically adding JAVA path stuff):

mount -o remount,rw /
echo "export JAVA_HOME=/mnt/storage/ejre1.6.0_25" >> /psp/.profile
echo "export PATH=\$PATH:/mnt/storage/ejre1.6.0_25/bin" >> /psp/.profile
sync
mount -o remount,ro /
exit
(reconnect)
(verify it >) echo $PATH

last question - is the "sync" above needed?

Re: correct place to modify $PATH on chumby one?

theksmith wrote:

last question - is the "sync" above needed?

Not really needed.  If you want to be old school about it, run it 3 times. wink

Also you do not need to remount / to be read-write and then read-only.  /psp/ is a different filesystem than / and /psp/ is mounted read-write by default.

Linux Guy - Occasional Chumby Hacker

Re: correct place to modify $PATH on chumby one?

Materdaddy wrote:
theksmith wrote:

last question - is the "sync" above needed?

Not really needed.  If you want to be old school about it, run it 3 times. wink

Also you do not need to remount / to be read-write and then read-only.  /psp/ is a different filesystem than / and /psp/ is mounted read-write by default.

i did have mount rw for /etc and carried that tidbit over - thanks for clarifying.

looks like i need to go read some more linux basics wink

Re: correct place to modify $PATH on chumby one?

Just as a note on sync, ext3 looks like the default commit time is 5 seconds, so as long as you don't pull power within 5 seconds, sync isn't needed.

Linux Guy - Occasional Chumby Hacker

Re: correct place to modify $PATH on chumby one?

It seems that on the Infocast 8", .profile is also in root.  It has a symlink " .profile -> /etc/profile".  So,  changes to /mnt/storage/psp/.profile have no effect on the Infocast 8". At least this is how I understand it. I've also upgraded to the Chumby 8 release.