These forums are archived

See this post for further info

get_iplayer forums

Forum archived. Posting disabled.

PATH change on R/Pi?

user-1718

I just followed the manual installation guide for Linux, it all seems okay on my Pi 3, except the guide said to install to:
/usr/local/bin instead of /usr/bin ...  is this normal?

I run get_iplayer inside "screen" sessions on my Pi 3, as it has lots going on; INSIDE the screen it was searching the PATH for /usr/bin and seemingly not looking in /usr/local/bin, but outside my screen session, it worked fine at the installed PATH... weirddd...

I fixed cobbled it by symlinking /usr/local/bin/get_iplayer to /usr/bin/get_iplayer - it now works.

My command was:
Code:
"sudo ln -s /usr/local/bin/get_iplayer /usr/bin/get_iplayer"


For the non-*nixers, what this does is create a "symoblic link" (layman's: a POINTER) to the get_iplayer script, where the OS expects the scipt to be, and when Linux looks for it at /usr/bin it transparently points it to /usr/local/bin - the execution of the script then works, the OS is unaware of the differing locations, in essence.

user-9

Im confused, so where should get_iplayer ACTUALLY be? in usr/local/bin or /usr/bin?

Steve

user-2

You are likely running /bin/sh in screen (or something else other than your default login shell), with a different default PATH than your login shell. Only you will know how it is set up.

user-1718

(01-05-2017, 01:39 PM)You are likely running /bin/sh in screen (or something else other than your default login shell), with a different default PATH than your login shell. Only you will know how it is set up.

Nope, just bash - the default for Raspian Jessie:
Code:
pi@raspi3:~ $ ps ax | grep sh
 709 ?        Ss     0:16 /usr/sbin/sshd -D
1130 tty1     S+     0:00 -bash
1147 pts/3    Ss+    0:01 /bin/bash
1189 ?        Ss     0:03 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session x-session-manager
1229 ?        Ss     0:00 /usr/bin/ssh-agent -s
1337 ?        S      0:00 /bin/sh /usr/bin/start-pulseaudio-x11
1342 ?        Sl     0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.1 /org/gtk/gvfs/exec_spaw/0
1410 pts/1    Ss     0:00 /bin/bash
1742 pts/1    S+    71:53 /bin/bash ./twitcap
1838 pts/2    Ss+    0:02 /bin/bash
11355 pts/4    Ss+    0:00 /bin/bash
30206 ?        Ss     0:00 sshd: pi [priv]
30225 ?        S      0:00 sshd: pi@pts/0
30227 pts/0    Ss     0:00 -bash
30440 pts/0    S+     0:00 grep --color=auto sh


I was running the latest get_iplayer from your Raspbian Jessie repo until the 3.00.0 was released, installed from the install.sh script - nothing ever threw an error until I purged that (old) one and installed 3.00.0, manually, as per your guide. As you can see from my process listing, no /bin/sh running, and get_iplayer ran fine, both inside/outside a screen, until now. I'm not complaining - my symlink has fixed whatever caused this, but it's just a weird quirk that this suddenly manifested itself where it never has before.

:)

user-1021

The manual installation instructions tell you to install get_iplayer in /usr/local/bin, and in the default installation of raspbian jessie lite this is in your path.

However, bash remembers where things are - if it's previously found get_iplayer in /usr/bin, and then that disappears, you will find that during that session bash won't find where you've moved get_iplayer to. This will go away when you next log in regardless, but you can make bash forget where things were and search again by using "hash -r".

This might explain why you couldn't find get_iplayer in shells inside screen, but if it doesn't, it's something you've changed from the default installation. On a default installation of jessie lite, with get_iplayer and screen added, shells inside screen have /usr/local/bin in the path. As dinkypumkin said, only you can know what you did.

Cheers
Jon

These forums are archived

See this post for further info