LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-26-2004, 10:06 PM   #1
Longinus
Member
 
Registered: Sep 2003
Distribution: Redhat 9.0 && Slackware 9.1
Posts: 420

Rep: Reputation: 30
Question distribute firefox files


when i compiled firefox it made its own directory in my home folder

but when i go to a terminal and type

firefox

it doesnt show up

how do i distribute all the files to the right directories like /usr/local/bin /usr/local/lib etc.
so i can type in firefox in command line without having to be in the firefox directory

thanks
 
Old 03-26-2004, 10:49 PM   #2
detpenguin
Senior Member
 
Registered: Oct 2003
Location: lost in the midwest...
Distribution: Slackware
Posts: 1,098

Rep: Reputation: 54
create a link on your desktop? or type home/yourname/firefox/firefox in the terminal and it'll launch. i just created a link on my desktop, tho.
 
Old 03-26-2004, 10:50 PM   #3
Longinus
Member
 
Registered: Sep 2003
Distribution: Redhat 9.0 && Slackware 9.1
Posts: 420

Original Poster
Rep: Reputation: 30
yeah thats what i have been doing

but now i want to have it all distributed in the local files so i can run it from a command line without typing in the path.

any suggestions?

thanks
 
Old 03-26-2004, 10:59 PM   #4
vi0lat0r
Member
 
Registered: Aug 2003
Location: Lewisville, TX
Distribution: Kubuntu
Posts: 295

Rep: Reputation: 30
Open KEdit

Paste this:

Code:
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL.  You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation.  Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
# Reserved.
#

## $Id: mozilla.in,v 1.2 2003/07/26 07:51:05 bryner%brianryner.com Exp $
## 
## Usage:
##
## $ mozilla [args]
##
## This script is meant to run the firefox-bin binary from either 
## mozilla/xpfe/bootstrap or mozilla/dist/bin.
##
## The script will setup all the environment voodoo needed to make
## the firefox-bin binary to work.
##

#uncomment for debugging
#set -x

moz_libdir=/usr/lib/mozilla-firefox-0.8
MRE_HOME=/usr/lib/mre/mre-1.6

# Use run-mozilla.sh in the current dir if it exists
# If not, then start resolving symlinks until we find run-mozilla.sh
found=0
progname=$0
curdir=`dirname "$progname"`
run_moz="$curdir/run-mozilla.sh"
if test -x "$run_moz"; then
  dist_bin=$curdir
  found=1
else
  here=`/bin/pwd`
  while [ -h "$progname" ]; do
    bn=`basename "$progname"`
    cd `dirname "$progname"`
    progname=`/bin/ls -l "$bn" |sed -e 's/^.* -> //' `
    if [ ! -x "$progname" ]; then
      break
    fi
    curdir=`dirname "$progname"`
    run_moz="$curdir/run-mozilla.sh"
    if [ -x "$run_moz" ]; then
      cd "$curdir"
      dist_bin=`pwd`
      found=1
      break
    fi
  done
  cd "$here"
fi
if [ $found = 0 ]; then
  # Check default compile-time libdir
  if [ -x "$moz_libdir/run-mozilla.sh" ]; then
    dist_bin=$moz_libdir
  else 
    echo "Cannot find mozilla runtime directory. Exiting."
    exit 1
  fi
fi

script_args=""
moreargs=""
debugging=0
MOZILLA_BIN="firefox-bin"

export LOGNAME=$USER'-'$MOZILLA_BIN
export MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins

if [ "$HOME" ]; then
  export MOZ_PLUGIN_PATH=$MOZ_PLUGIN_PATH:$HOME/.mozilla/plugins
fi

if [ "$OSTYPE" = "beos" ]; then
  mimeset -F $MOZILLA_BIN
fi

while [ $# -gt 0 ]
do
  case "$1" in
    -p | -pure)
      MOZILLA_BIN="firefox-bin.pure"
      shift
      ;;
    -g | --debug)
      script_args="$script_args -g"
      debugging=1
      shift
      ;;
    -d | --debugger)
      script_args="$script_args -d $2"
      shift 2
      ;;
    *)
      moreargs="$moreargs \"$1\""
      shift 1
      ;;
  esac
done

export MRE_HOME
eval "set -- $moreargs"
if [ $debugging = 1 ]
then
  echo $dist_bin/run-mozilla.sh $script_args $dist_bin/$MOZILLA_BIN "$@"
fi
exec "$dist_bin/run-mozilla.sh" $script_args "$dist_bin/$MOZILLA_BIN" "$@"
Save it as /usr/bin/mozilla-firefox.sh

NOTE: Make sure these two lines have the correct path:

Code:
moz_libdir=/usr/lib/mozilla-firefox-0.8
MRE_HOME=/usr/lib/mre/mre-1.6
If your mozilla firefox isn't /usr/lib/mozilla-firefox-0.8, change it so it points to the correct directory :-)

Last edited by vi0lat0r; 03-26-2004 at 11:01 PM.
 
Old 03-26-2004, 11:30 PM   #5
Crazy Travis
Member
 
Registered: Feb 2004
Location: Knoxville TN
Distribution: gentoo
Posts: 104

Rep: Reputation: 15
or edit your .bashrc in your home directory at the bottom of it add


alias firefox="/home/username/MozillaFirefox/firefox"

logout or restart your computer.

This will only work for you though and only through the terminal. So if you make a launcher you have to link it to the actual file and not just firefox

Last edited by Crazy Travis; 03-26-2004 at 11:33 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I run LTSP and distribute the processing at the same time? lefty.crupps Linux - Networking 4 09-17-2005 11:37 AM
is it legal to distribute Suse pro? Amr_not_Amr SUSE / openSUSE 7 07-27-2005 06:02 PM
a Distribute for a server and coding blackman890 Linux - Distributions 5 03-26-2005 08:51 PM
Is it legal to distribute Winex/CVS? lokee Linux - Software 2 06-27-2004 10:39 AM
Is it legal to distribute RH Ent. Workstation repackaged? misfit-x Red Hat 4 01-22-2004 01:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration