[Sussex] I've got Flash now I want to watch movie clips

Trevor Marshall trevorm at rusham.demon.co.uk
Thu Sep 22 20:14:13 UTC 2005


Frances Fleming wrote:
> On Sat Sep 17 13:57:01 BST 2005, Trevor Marshall wrote:
> 
> 
>>>Please may I beg some more help?
>>
>>No problem.
>>
>>I've had another look round my system, trying to remember what I had to
>>do, and I thought I'd look at Firefox's plugin information, and I found
>>some useful stuff on the mozilla plugins web site here:
>><http://plugindoc.mozdev.org/linux.html#RealPlayer>
>>which is what I seem to remember doing.
> 
> 
> After much Googling and following of links, I managed to find out the
> exact locations for steps 1 & 2 on that page, but after hours of
> searching, am not much nearer to solving step three, in any way that
> will make the movie player run in a web page.  Other newbies who had
> posted everywhere else seemed to have the same problem. The player does
> open if I click on its executable in the file browser.
> 
> I'm afraid I'm still at the stage where I need minute instructions :-)
> 
> So Trevor, how _precisely_ do I put it in my PATH??

OK, here goes ...

First a bit of explanation, sorry if you know this already but it kind 
of ties things together.

Alternatively just skip the explanation if you want to :-)
---------------------------------------------------------------------

As we all know, behind the fancy windows and so on, Linux is an 
old-fashioned command-line based system, and, traditionally, you 
interact with it through a shell which deals with the things you type 
in.  So, again traditionally, you would list the files in a directory 
using the list command, but because list is too many letters to type it 
got shortened to 'ls'. [Nearly] all commands are just files, so the 'ls' 
command is a binary file located in the directory /bin.  So instead of 
just 'ls', you could type /bin/ls and see exactly the same thing happen 
as when you type 'ls' [1]

So to add a command (like realplay) you just add a file.  The only 
problem is, as you've found, the shell, (or browser, or any other 
program) needs to know where to look for it.  The list of places the 
shell looks for commands is called the path.  By convention, the path is 
stored in an environment variable called PATH.  You can find the current 
value of your PATH from the shell by typing

echo $PATH

You need the dollar sign to indicate to the shell that you want the 
value of a variable, not the letters P A T H.

On my system here's what I get:
echo $PATH
/usr/local/j2sdk1.4.1_03/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games

The output is a series of 'pathnames' separated by colons. The first 
pathname is /usr/local/j2sdk1.4.1_03/bin, followed by /usr/local/bin, 
the /usr/bin, and so on.  This means the shell (or whatever) will look 
for a command in the java SDK area first, then /usr/local/bin, then 
/usr/bin and so on.  So if two versions of a command exist with one in 
/usr/local/bin and one in /usr/bin then the one in /usr/local/bin will 
be found first and that's the one that will be run.

You can modify your path by modifying the PATH variable, you do that 
like this for the normal 'bash' shell:
export PATH=$PATH:/new/path
which adds /new/path but makes it the last directory searched, the 
command really means 'make my path equal to the path I've got now plus 
/new/path' or 'look in all the usual places THEN look in /new/path'.

There are several ways you can add locations to your PATH, either just 
for you, or for all users.  [2]

But, just making a symbolic link between somewhere in your path and 
realplay is probably easier, so ...

------------------------------------------------------------------------

If all you want to do is get realplay into your PATH as soon as 
possible, then you can create a 'symbolic link' between somewhere in 
your path (/usr/bin/ in this case) and the realplay program like this...

i)    Find the 'real' realplay - in my case it's       	
       /usr/lib/realplay-10.0.4/realplay
ii)   Open a shell and become root
iii)  cd to /usr/bin
iv)   type:
       ln -s /usr/lib/realplay-10.0.4/realplay realplay
       [changed to match where your 'real' realplay is
v)    check it's worked by typing
       ls -l realplay
       and you should see something ending in
       realplay -> ../lib/realplay-10.0.4/realplay

That's it.  Stop being root, go to a normal shell, type 'realplay' and 
it should work.


[1] It's /possible/ ls will behave slightly differently, some systems 
put an extra step between the shell and the command by so-called 
'aliasing' the command to something else, but that's a whole different 
topic.

[2] This is also whole topic in it's own right which varies from shell 
to shell and distro to distro, but, for most distros which use bash as 
the shell,  basically for 'everybody' you change /etc/profile.local (if 
it exists) by adding

PATH=$PATH:/new/path
export $PATH

or you can edit the line in /etc/profile which sets PATH.

PATH=/foo/bar:/foo/wibble/bar:/usr/local/bin:/usr/bin:/new/path
export PATH

For just yourself you can edit either the .profile file in your home 
directory, or the .bashrc file similarly to the /etc/profile.local above 
so that you add your change to the PATH.

Hmmm.... maybe there's a SLUG presentation on the Linux environment 
system in this sometime?

Hope that helps,
--
Trevor.




More information about the Sussex mailing list