<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Thank you Jeff and Mike<br><br>To ask another question if I may?<br><br>Does it matter if no existing PATH entry is seen in /home/paul/.bashrc at this time?<br><br>Where do 'echo $PATH' varibles come from are they built into bash upon installation of the OS?<br> --------> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games <--------<br><br>Will placing 'export Path=$PATH:/opt/firefox' in the '/home/paul/.bashrc' file at the bottom of the .bashrc file or top or middle matter?<br><br>Allow me to not get the 'firefox not installed use apt-get to install' message when I try to load firefox from the bash terminal?<br><br>Does it matter if Path-PATH is lower case or upper case at the beginning of the string?<br><br>Thanks,<br><br><div><hr id="stopSpelling">Date: Tue, 25 Mar 2014 17:11:03 -0500<br>From: chapinjeff@gmail.com<br>To: tclug-list@mn-linux.org<br>Subject: Re: [tclug-list] About Firefox 28 on Ubuntu 10.04<br><br><div dir="ltr">Replies inline.<br><div class="ecxgmail_extra"><br><br><div class="ecxgmail_quote">On Tue, Mar 25, 2014 at 3:58 PM, paul g <span dir="ltr"><<a href="mailto:pj.world@hotmail.com" target="_blank">pj.world@hotmail.com</a>></span> wrote:<br>
<blockquote class="ecxgmail_quote" style="border-left:1px solid rgb(204,204,204);padding-left:1ex;">


<div><div dir="ltr">You have helped tremendously <br><br>paul@paul-desktop:~$ sudo updatedb<br>paul@paul-desktop:~$ locate -b firefox<br>/home/paul/.cache/mozilla/firefox<br>/home/paul/.mozilla/firefox<br>/home/paul/.mozilla/firefox/bkbapzwn.default/extensions/firefox@ghostery.com.xpi<br>
/home/paul/.mozilla/firefox/bkbapzwn.default/jetpack/<a href="mailto:firefox@ghostery.com" target="_blank">firefox@ghostery.com</a><br>/home/paul/Downloads/tor-browser_en-US/.mozilla/firefox<br>/home/paul/Downloads/tor-browser_en-US/App/Firefox/firefox<br>
/home/paul/Downloads/tor-browser_en-US/App/Firefox/firefox-bin<br>/opt/firefox<br>/opt/firefox/firefox<br>/opt/firefox/firefox-bin<br>/usr/share/app-install/desktop/firefox-greasemonkey.desktop<br>/usr/share/app-install/desktop/firefox-launchpad-plugin.desktop<br>
/usr/share/app-install/desktop/firefox-ubuntu-it-menu.desktop<br>/usr/share/app-install/desktop/firefox-webdeveloper.desktop<br>/usr/share/app-install/desktop/firefox.desktop<br>/usr/share/app-install/icons/firefox-greasemonkey.xpm<br>
/usr/share/app-install/icons/firefox-installer.png<br>/usr/share/app-install/icons/firefox-launchpad-plugin.xpm<br>/usr/share/app-install/icons/firefox-themes-ubuntu.xpm<br>/usr/share/app-install/icons/firefox-ubuntu-it-menu.png<br>
/usr/share/app-install/icons/firefox-webdeveloper.xpm<br>/usr/share/icons/firefox.jpg<br>/usr/share/ubuntu-docs/common/prepare-firefox-startpage-translations<br>/usr/share/ubuntu-docs/libs/img/firefox-3.5.png<br>paul@paul-desktop:~$ <br>
 <br>paul@paul-desktop:~$ echo $PATH<br>/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games <br><br>Obviously /usr/opt is not shown in the above output. <br><br>paul@paul-desktop:~$ sudo updatedb<br>paul@paul-desktop:~$ locate -b bash<br>
/bin/bash<br>/bin/rbash<br>/etc/bash.bashrc<br>/etc/bash_completion<br>/etc/bash_completion.d<br>/etc/apparmor.d/abstractions/bash<br>/etc/bash_completion.d/bash-builtins<br>/etc/bash_completion.d/gvfs-bash-completion.sh<br>
/etc/bash_completion.d/pk-completion.bash<br>/etc/skel/.bash_logout<br>/etc/skel/.bashrc<br>/home/paul/.bash_history<br>/home/paul/.bash_logout<br>/home/paul/.bashrc<br><br>to add the entire following line----> export Path=$PATH:/opt/firefox<br>
<br>Do I include the word 'export'? <br></div></div></blockquote><div><br></div><div>Yes. PATH is simply a variable used to hold the list of directories. You *can* do just 'PATH=$PATH:/usr/opt', but including the export is a better, more recommended way to do it. This will immediately change the value for the currently logged in shell session *only*<br>
</div><div><br></div><blockquote class="ecxgmail_quote" style="border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div><div dir="ltr"><br>For a deep system wide approach would '/home/paul/.bashrc' be the correct file to edit in this case that sticks for all sessions?<br>
</div></div></blockquote><div><br>Editing '/home/paul/.bashrc'  would be *account* wide -- all *new* shell sessions you open will have the updated value -- but not the existing ones. This should also include the shell used in Alt-F2, but I don't use that feature, so I am not sure.<br>
<br></div><div>To go 'system wide' you would usually edit /etc/bashrc or add a new script to /etc/profile.d/ with the changes you want. These correspond to .bashrc and .bash_profile -- the .bashrc in your home directory will *include* /etc/bashrc, so these changes will appear for all users. Various distrobutions handle these two files differently. I am used to Red Hat based systems, and I have always been told use the bashrc files for functions and aliases, and .bash_profile for environmental variables -- but I tend to put everything in .bashrc anyway. <br>
<br></div><div>These two files behave slightly differently, and rather than explain it myself, I am going to refer you to a resource I found via my good friend Google:<br><a href="http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html" target="_blank">http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html</a><br>
<br></div><div>Jeff<br></div><div><br><br></div><blockquote class="ecxgmail_quote" style="border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div><div dir="ltr"><br>I am not seeing a '.bash_profile' file after using 'locate -b bash' I read you said I could edit either of the 2 files. Maybe the .bash_profile file is on different distro's I do not know yet.<br>
<br></div></div></blockquote><div><br><br> </div><blockquote class="ecxgmail_quote" style="border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div><div dir="ltr">Thanks<br><br><br><br><br><br><div>
> Date: Tue, 25 Mar 2014 12:54:39 -0500<br>> From: <a href="mailto:mbmiller%2Bl@gmail.com" target="_blank">mbmiller+l@gmail.com</a><br>> To: <a href="mailto:tclug-list@mn-linux.org" target="_blank">tclug-list@mn-linux.org</a><br>
> Subject: Re: [tclug-list] About Firefox 28 on Ubuntu 10.04<div><div class="h5"><br>> <br>> On Tue, 25 Mar 2014, Jeff Chapin wrote:<br>> <br>> > On Mon, Mar 24, 2014 at 5:45 PM, paul g <<a href="mailto:pj.world@hotmail.com" target="_blank">pj.world@hotmail.com</a>> wrote:<br>
> ><br>> >> why when I do a 'locate firefox' in terminal many entries show up? A <br>> >> few more than listed below but this is the just of it.<br>> ><br>> > The 'locate' command uses a pre-created database of file names. If you <br>
> > have not re-run 'updatedb' after creating a file, 'locate' will not know <br>> > about it. Locate will return any file that matches the pattern you gave <br>> > it.<br>> <br>> Also, with "locate", the default is to match any pattern in the entire <br>
> path to a file or directory.  Example:<br>> <br>> locate bin | less<br>> <br>> The name of the file or directory itself, excluding parent directories in <br>> its path, is called its basename.  There is an option in "locate" to <br>
> search only the basename.  From "man locate":<br>> <br>>    -b, --basename<br>>          Match only the base name against the specified patterns. This<br>>          is the opposite of --wholename.<br>
> <br>>    -w, --wholename<br>>          Match only the whole path name against the specified patterns.<br>>          This is the default behavior.  The opposite can be specified<br>>          using --basename.<br>
> <br>> I have a lot of small files on my system, but I still see a very dramatic <br>> drop in the number of matches when I use the -b option:<br>> <br>> $ locate bin | wc -l<br>> 28241<br>> <br>> $ locate -b bin | wc -l<br>
> 4826<br>> <br>> <br>> It's not quite relevant to the question about "locate", but I'll mention <br>> that there is a program called "basename" (and another called "dirname"):<br>
> <br>> <br>> Usage: basename NAME [SUFFIX]<br>>    or:  basename OPTION<br>> Print NAME with any leading directory components removed.<br>> If specified, also remove a trailing SUFFIX.<br>> <br>>        --help     display this help and exit<br>
>        --version  output version information and exit<br>> <br>> Examples:<br>>    basename /usr/bin/sort       Output "sort".<br>>    basename include/stdio.h .h  Output "stdio".<br>> <br>
> <br>> <br>> Usage: dirname NAME<br>>    or:  dirname OPTION<br>> Print NAME with its trailing /component removed; if NAME contains no /'s,<br>> output `.' (meaning the current directory).<br>> <br>
>        --help     display this help and exit<br>>        --version  output version information and exit<br>> <br>> Examples:<br>>    dirname /usr/bin/sort  Output "/usr/bin".<br>>    dirname stdio.h        Output ".".<br>
> _______________________________________________<br>> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota<br>> <a href="mailto:tclug-list@mn-linux.org" target="_blank">tclug-list@mn-linux.org</a><br>> <a href="http://mailman.mn-linux.org/mailman/listinfo/tclug-list" target="_blank">http://mailman.mn-linux.org/mailman/listinfo/tclug-list</a><br>
</div></div></div>                                      </div></div>
<br>_______________________________________________<br>
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota<br>
<a href="mailto:tclug-list@mn-linux.org">tclug-list@mn-linux.org</a><br>
<a href="http://mailman.mn-linux.org/mailman/listinfo/tclug-list" target="_blank">http://mailman.mn-linux.org/mailman/listinfo/tclug-list</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Jeff Chapin<br>President, CedarLug, retired<br>President, UNIPC, "I'll get around to it"<br>President, UNI Scuba Club<br>Senator, NISG, retired
</div></div>
<br>_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
tclug-list@mn-linux.org
http://mailman.mn-linux.org/mailman/listinfo/tclug-list</div>                                       </div></body>
</html>