# Problems with Firefox???

## Myckel

Hello everybody,

Today I installed Firebird on my freshly installed gentoo system.

But when I start Firebird it loads the site of "Barnes & Noble.com" (whatever that

may be). I checked in the options to see if the adress was there (Home Page), but that

was not the case. Can someone tell me how I can prevent this site from being loaded?

(Why is it there in the first place ??? )

Myckel Habets

----------

## ckdake

firstly, are you using firebird or firefox?  Which version?

In the config, to go to a blank page, you want to set home to "about:blank"

----------

## Myckel

I'm using firefox 0.8 (sorry, still have to get used to the new name).

I've already set in the config it to about:blank, but at startup the problem remains.

When I pressthe Home button, I get the about:blank page, but at startup the B&N.com site gets 

loaded.

Firefox gets start by "firefox &" and I use XFce4 as wm.

Myckel Habets

----------

## ckdake

They just have to go keep changin its freakin name. heh. Hmmm..

I am using firefox on xfce4 as well, and do not have the problem you are having.  How about removing your preferences and starting over?

Do this with firefox closed and then open it up, set the home page, and try again.

```
rm -rf $HOME/.phoenix/
```

----------

## firephoto

I don't use the ebuilds for firefox but what you describe sounds like firefox is starting from a perl script. There is one out there that has a line in it to load whatever page is in the script if you aren't opening a link. If you emerged firefox could it be that a startup script is included? I always use the the pre-built version and have had to use scripts to launch links and such.

This is the perl script that lauches links and to start firefox with a new tab to slashdot.org. It wasn't working on it's own but I guess things have changed again. Maybe you have a "firefox" script in place that is pointing to barnes & noble (book store i believe).

```
#!/usr/bin/perl -w

#

#  MozillaFirebird-startup-script

#

#  ---

# 

#  Copyright © 2003 Carl Fürstenberg <azatoth@sverige.nu>

#  

#  This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public

#  License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later

#  version.

#  

#  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied

#  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more

#  details.

#  

#  You should have received a copy of the GNU General Public License along with this program; if not, write to the Free

#  Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

#

#  ---

#

#  see --help or --man for more info

# edit those for more permanent changes, use environment variables else

my %CONST=

(

    FIREBIRDPATH   =>   '/home/tom/.firebird/firefox',      

    FIREBIRDNAME   =>   'firefox',   

    FIREBIRDHOME   =>   'http://slashdot.org',

    FIREBIRDMODE   =>   'new-tab'

);

# Do NOT edit the rest unless you know what you are doing :-)

use File::Spec;

use Shell;

use Pod::Usage;

use Getopt::Long;

Getopt::Long::config ("bundling", "pass_through");

my $VERSION='0.1.4';   # This is my version, not MozillaFirebird's

my @url;

my $firebird="$CONST{FIREBIRDPATH}/$CONST{FIREBIRDNAME}";

die "Error: $? $!\n" unless -x $firebird; # We need MozillaFirebird!

my %help = 

( 

    'help'    => 0, 

    'man'    => 0, 

    'version'   => 0,

);

# First we must parse three options. gnu standard...

Getopt::Long::GetOptions

(

    'help' => \$help{'help'},

    'man' => \$help{'man'},

    'version' => \$help{'version'},

) 

    or pod2usage(2);

pod2usage(VERBOSE => 1) if $help{'help'};

pod2usage(VERBOSE => 2) if $help{'man'};

do 

{ 

    print 

    "MozillaFirebird - Startup-Script $VERSION\n" . 

    "Written by Carl Fürstenberg.\n\n" .

    "Copyright © 2003 Free Software Foundation, Inc.\n" .

    "This is free software; see the source for copying conditions.  There is NO\n" .

    "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";

    exit 1 

} if $help{'version'};

foreach my $key (keys %CONST)       # Check if there are some evironment variables

{

    $_ = $ENV{$key};

    $CONST{$key}=$_ if defined;

}

push @url, $CONST{FIREBIRDHOME} unless @ARGV;

foreach my $opt (@ARGV)       # Pass the whole @ARGV or open the pages in @ARGV

{

    exec("$firebird ".join(' ', @ARGV)) if $opt =~ /^-.*$/;

    push @url, $opt;

}

foreach my $url (@url)

{

    if(-f $url)          # If local file

    {

   my $tmp = head("--lines=2 \"$url\"");

   $url="file://".File::Spec->rel2abs($url);

   $url = $tmp if $tmp =~ /^((ht|f)tp|file):(\/){2,3}.*\n?(?!\w+)$/;

    }

    system("$firebird -remote 'ping()' &> /dev/null");

    if($?>>8==0)          # Session found

    {

   system("$firebird -remote 'OpenURL($url, $CONST{FIREBIRDMODE})'&") == 0 

       or die "Error: $?, $!";

    }

    else             # No session found

    {

   system("$firebird $url&") == 0 

       or die "Error: $?, $!";

    }

    $CONST{FIREBIRDMODE} = 'new-tab';   # So we won't get a bounch of windows.

}

exit 0;

__END__

=pod

=head1 NAME

MozillaFirebird - Startup-script

=head1 SYNOPSIS

   MozillaFirebird [URL] [FILE] [--help] [--man] [--version]

   MozillaFirebird [options]

=head1 DESCRIPTION

This is a B<not-so-tiny> startup-script for B<MozillaFirebird>, it can detect if there are any running sessions, and it detects if it's a local file. IT can also detect direct links in files if the first line is a link and there is nothing on the seccond line.

=head1 OPTIONS

These envirioment variables can you set. If you have rights to do, then you can set them in the script to.

=over 8

=item B<FIREBIRDPATH>

FIREBIRDPATH is the path to your copy of MozillaFirebird, I prefere have it in /opt, but you might have it in /usr/local/share.

=item B<FIREBIRDNAME>

FIREBIRDNAME is the name of the file in FIREBIRDPATH to be executed, it's probably MozillaFirebird, but you might use old mozilla, shuld work there to.

=item B<FIREBIRDHOME>

FIREBIRDHOME is the page as standard to shown up, not to be missthought as the 'home' inside MozillaFirebird, but the page opened in the new window, set it to 'about:blank' if you want a blank page as standard.

=item B<FIREBIRDMODE>

FIREBIRDMODE is the way MozillaFirebird starts, if you set it to 'new-window' you get a new window here in your current wirewport. If you set it to 'new-tab' then the page is placed as a new tab in one of your open MozillaFirebird-windows.

You can also pass regular options (those MozillaFirebird has buitin), execpt longoptiond --help, --version. you can pass instead the short options -h, -v.

=back

=head1 ARGUMENTS

=over 8

You can put an URL or a file as a argument to the script, the script will transform local files to 'file://'

=back

=head1 AUTHOR

Carl Fürstenberg

=head1 COPYRIGHT

Copyright © 2003 Carl Fürstenberg <azatoth@sverige.nu> 

This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

=cut

```

This launches links from thunderbird or just opens a blank tab if run on it's own.

```
#!/bin/bash

export MOZILLA_FIVE_HOME=/home/tom/.firebird/firefox

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MOZILLA_FIVE_HOME

url=$1

[ -z $url ] && url=about:blank

## Run Firebird remotely if there's an existing process running...

if [ -x $MOZILLA_FIVE_HOME/firefox ] ; then

rv=`ps -ef | grep $MOZILLA_FIVE_HOME | grep -v grep | wc -l`

if [ $rv == "0" ] ; then

$MOZILLA_FIVE_HOME/firefox $url &

else

$MOZILLA_FIVE_HOME/firefox -remote "openURL($url, new-tab)" &

fi

fi

```

I just edited the scripts to point to my installations and prefs, so I don't take any credit for them.  :Wink: 

----------

## Myckel

No Luck....

But to me it seems also not logical... I've never heard of the site and this is a fresh

install of the complete system.

----------

## Myckel

OK, I think I've solved the problem.

First I did a system-wide search for the web adress... but didn't find it (except some cache files).

I also looked at the firefox script (It wasn't perl if I remember correctly), but there weren't

any strange things in it also.

Then in XFce4 I opened a terminal and started firefox from there. About:Blank opened and not

the b&n site!!!

Starting the button in XFce (that I linked to the same command) gave the b&n.com site again.

When I removed the & from the command, firefox started the way I wanted it: with the About:blank.

So I guess the & caused the problem.

Thanks for your help.

----------

## lemming

 *Myckel wrote:*   

> No Luck....
> 
> But to me it seems also not logical... I've never heard of the site and this is a fresh
> 
> install of the complete system.

 

Maybe someone is trying to get you to read more?  :Razz: 

b&n is a bookstore chain

----------

## firephoto

 :Laughing: 

Mystery Solved......

keyword:& = b&n.com lol

I center click + scroll by accident which does a  "i'm feelin lucky" google search and lo and behold with & in my copy cache guess where we go?  :Wink: 

----------

## OdinsDream

 *firephoto wrote:*   

> 
> 
> Mystery Solved......
> 
> keyword:& = b&n.com lol
> ...

 

You can disable this by going to about:config and setting middlemouse.contentLoadURL to false. Thanks to this thread:

https://forums.gentoo.org/viewtopic.php?t=71117

----------

