VectorLinux
September 01, 2014, 03:05:36 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: opt/**** in PATH  (Read 1782 times)
joec
Member
*
Posts: 29


« on: June 22, 2007, 01:26:06 am »

When i was asking how to set up Thunderbird,  LLL gave me a method to put it in /opt and suggested i come back to ask about putting /opt/*** in mypath.  Well here i am Smiley Smiley  What does that do?
Logged
tomh38
Vectorian
****
Posts: 913



« Reply #1 on: June 22, 2007, 10:51:45 am »

Here are a few things you could do:

1) You can edit /etc/profile and add "/opt/thunderbird" to your $PATH.  This has to be done as root and will put Thunderbird in the $PATH for all users.

2) You can edit .bashrc (in your home directory) and add "/opt/thunderbird" to $PATH there.  This can be done as a regular user and will only put Thunderbird in the $PATH of the user whose .bashrc you edit.

The line you'll be looking for looks something like this:

PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/opt/bin:/usr/local/games:/opt/kde/bin"

Before the closing quotation marks add a ":" and then /opt/thunderbird (or whatever the directory is where Thunderbird is located).

Hope this helps.  Post again if you need clarification.
Logged

"I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones." - Linus Torvalds, April 1991
Triarius Fidelis
Vecteloper
Vectorian
****
Posts: 2399


Domine, exaudi vocem meam


WWW
« Reply #2 on: June 22, 2007, 01:53:44 pm »

With all due respect, tomh38, I'd like to amend that suggestion a bit. It's better to add extra paths to a script in /etc/profile.d/.

As root, edit /etc/profile.d/thunderbird.sh, so that it reads:

Code:
#!/bin/sh

THUNDERBIRD_ROOT="/opt/thunderbird"
export PATH="$THUNDERBIRD_ROOT/bin:$PATH"
export MANPATH="$THUNDERBIRD_ROOT/man:$MANPATH"

I'm not sure if Thunderbird has an GNU info page or anything.
Logged

"Leatherface, you BITCH! Ho Chi Minh, hah hah hah!"

Formerly known as "Epic Fail Guy" and "Döden" in recent months
joec
Member
*
Posts: 29


« Reply #3 on: June 22, 2007, 02:14:00 pm »

This reminds me of DOS. What is the advantage of having the program in /opt when most other programs seem to be installed somewhere else? ( I am new to Linux and still unsure where things go).
Logged
Triarius Fidelis
Vecteloper
Vectorian
****
Posts: 2399


Domine, exaudi vocem meam


WWW
« Reply #4 on: June 22, 2007, 02:16:52 pm »

/opt is generally for massive programs with many components (like Emacs), or for program suites (such as KDE and Texlive).

I don't know how big Thunderbird is, and the decision is kind of subjective anyway, so it's really your call.
Logged

"Leatherface, you BITCH! Ho Chi Minh, hah hah hah!"

Formerly known as "Epic Fail Guy" and "Döden" in recent months
saulgoode
Vectorite
***
Posts: 340



« Reply #5 on: June 22, 2007, 11:13:53 pm »

Using /opt is also useful if you wish to have two separate versions of a program. For example, I like to use the development version of the GIMP but keep a stable version installed for answering questions from others. I have installed the stable version in /opt and created the following shell script (called "gimp-2.2") for invoking it.


Code:
#!/bin/sh

PATH=/opt/gimp-2.2/bin:$PATH
export PATH
LD_LIBRARY_PATH=/opt/gimp-2.2/lib
export LD_LIBRARY_PATH

/opt/gimp-2.2/bin/gimp-2.2 "$@"
Logged

A complex system that works is invariably found to have evolved from a simple system that works.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!