LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-14-2005, 02:06 PM   #1
lukameen
Member
 
Registered: May 2004
Distribution: Slackware
Posts: 50

Rep: Reputation: 19
firefox won't open links in new window


Hello All,

All of a sudden firefox stopped allowing me to open links in a new window (a feature I can't live without). It won't allow me to open links in a new tab either. However, I can open bookmarks in a new window.

The main thing I noticed since this happened is that firefox used to allow me to open the browser once using the default profile, and would prompt me to create a new profile if I tried to launch it again. Now it just keeps launching multiple windows of firefox.

I'm using slack 10 and KDE. I tried using firefox in other XWM's, but it still won't let me open a link in a new window. I've tried creating a new profile, and I even removed and reinstalled the package, but the problem persists. I've searched this site, google, and the firefox forums all to no avail. Can anyone offer any insight into this?
 
Old 03-14-2005, 02:30 PM   #2
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,289

Rep: Reputation: 52
What happens if you press [ctrl]+t ?
Does the middle mouse open a tab?
Have you checked the advanced preferences?
Here's a handy script which allows mozilla to open a new window:
Code:
#!/bin/sh
if mozilla-firefox -remote "ping()";
then
    if test "$1" != ""
    then
        mozilla-firefox -remote "openURL($1,new-window)";
    else
        mozilla-firefox -remote "openURL("http://www.google.co.uk",new-window)";
    fi
else
    mozilla-firefox $1;
fi;
 
Old 03-14-2005, 02:43 PM   #3
lukameen
Member
 
Registered: May 2004
Distribution: Slackware
Posts: 50

Original Poster
Rep: Reputation: 19
Thanks for the quick reply,

CTRL + t will open a new blank tab. I've checked through the advanced preferences and some of the ini files in my profile, but still couldn't get it to work. I ran your script and it opened google in a new page. I don't see how this will help me open random links in a new page though.
 
Old 03-14-2005, 03:02 PM   #4
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,289

Rep: Reputation: 52
The way I use it is to have save the script in an empty file, make it executable then put it in my path:
Code:
/usr/local/bin/firefox-script
then I make my default browser "firefox-script" and change the command option of my browsers' desktop icon to "firefox-script". If I then click on the desktop icon with a window already open, a new one pops up without asking to create a new profile.
 
Old 03-14-2005, 06:01 PM   #5
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
i use the firefox and thunderbird scripts posted by gojamiegirl in this thread
http://www.linuxquestions.org/questi...hreadid=198492

works great for me
 
Old 03-14-2005, 07:07 PM   #6
mcd
Member
 
Registered: Aug 2003
Location: Boulder, CO
Distribution: Slackware, RHEL, CentOS
Posts: 825

Rep: Reputation: 33
hey, that's a great reference kodon! thanks! quick question: anyone know how to set default browser and email client in fluxbox? i know gnome has a nice little dialogue box, but isn't there a config file somewhere where i can set those? i'd like to be able to click on a link in thunderbird and open the page in firefox...
 
Old 03-14-2005, 07:22 PM   #7
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
add this to ~/.thunderbird/*.default/prefs.js

user_pref("network.protocol-handler.app.ftp", "/usr/local/Firefox");
user_pref("network.protocol-handler.app.http", "/usr/local/Firefox");
user_pref("network.protocol-handler.app.https", "/usr/local/Firefox");

replace /usr/local/Firefox with whatever you named your script


and for the reverse...
add this to ~/.mozilla/firefox/default.*/prefs.js

user_pref("network.protocol-handler.app.mailto", "/usr/local/Thunderbird");

replace /usr/local/Thunderbird with whatever you named that script

Last edited by kodon; 03-14-2005 at 07:56 PM.
 
Old 03-14-2005, 08:36 PM   #8
mcd
Member
 
Registered: Aug 2003
Location: Boulder, CO
Distribution: Slackware, RHEL, CentOS
Posts: 825

Rep: Reputation: 33
thanks kodon, that worked like a charm! brilliant!

there is something strange going on though...i went to all the trouble of creating that script, updating my soft link /usr/local/sbin/firefox to point to my new script instead of the old binary, etc etc. but i kept getting errors. eventually i narrowed it down to not actually being able to run mozilla-xremote-client, which is what that script tries to do if firefox is already running

[severian@lightstar:~/src/firefox-installer]$ mozilla-xremote-client
mozilla-xremote-client: error while loading shared libraries: libplds4.so: cannot ope n shared object file: No such file or directory

but from the same directory:

[severian@lightstar:~/src/firefox-installer]$ ls -l libplds4.so
-rwxr-xr-x 1 severian users 8240 2004-11-07 13:27 libplds4.so*

so the file is there, it's readable and executable, i don't know why mozilla-xremote-client can't find it...but it doesn't really matter, because this whole thing is a waste of time. my firefox already behaves the way i want it to (ie it will open multiple windows on multiple desktops without asking me for a new profile). i have no idea why or how, but it works.

this is from the help menu:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

and as far as i recall, i just did a standard install.

so anyway, i thought that might be interesting to people. and thanks again for the tip on making firefox my default handler for thunderbird, that's one i'm writing down!
 
Old 03-14-2005, 08:44 PM   #9
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
hmm...just wondering why you are running it from the installer src directory.
the installer should have installed it somewhere like /usr/local/firefox.
wherever it was installed, you need to edit the 'FF=/usr/local/firefox'
in the Firefox script to point to the correct directory you installed it in.
 
Old 03-14-2005, 08:52 PM   #10
mcd
Member
 
Registered: Aug 2003
Location: Boulder, CO
Distribution: Slackware, RHEL, CentOS
Posts: 825

Rep: Reputation: 33
hmm. i would have downloaded the package straight from mozilla.org, and iirc it isn't a source package, you just untar the directory and run the firefox-installer. i don't remember installing it, since this was many months ago, but a quick slocate firefox confirms that the only directories are

/home/severian/src/firefox-installer/
/home/severian/.mozilla/firefox/
/usr/lib/firefox/

as you might guess, /usr/lib/firefox contains only two directories (plugins and components), and /home/severian/.mozilla/firefox contains only various settings. so either it didn't ask me where to install, or i told it to install in the current directory.

if you're curious, here are the contents of the build directory (Firefox~ and Firefox.unused are that script which I don't need):

[severian@lightstar:~/src/firefox-installer]$ ls -al
total 16436
drwxr-xr-x 12 severian users 4096 2005-03-14 17:02 ./
drwxr-xr-x 28 severian users 4096 2005-03-06 22:56 ../
-rw-r--r-- 1 severian users 0 2005-01-15 20:09 .autoreg
-rwxr-xr-x 1 severian users 503 2005-03-14 16:50 Firefox.unused*
-rwxr-xr-x 1 severian users 504 2005-03-14 16:48 Firefox~*
-rw-r--r-- 1 severian users 219 2004-11-07 13:27 browserconfig.properties
drwxr-xr-x 4 severian users 4096 2005-01-15 20:09 chrome/
drwxr-xr-x 3 severian users 4096 2005-03-14 16:48 components/
-rw-r--r-- 1 severian users 24 2005-02-27 12:15 components.ini
-rw-r--r-- 1 severian users 41389 2004-11-07 13:27 config.ini
drwxr-xr-x 5 severian users 4096 2005-01-15 20:09 defaults/
-rw-r--r-- 1 severian users 24 2005-02-27 12:15 defaults.ini
drwxr-xr-x 3 severian users 4096 2005-01-15 20:09 extensions/
-rwxr-xr-x 1 severian users 6334 2004-11-07 13:27 firefox*
-rwxr-xr-x 1 severian users 9771152 2004-11-07 13:27 firefox-bin*
-rwxr-xr-x 1 severian users 1699 2004-11-07 13:27 firefox-installer*
-rwxr-xr-x 1 severian users 1192916 2004-11-07 13:27 firefox-installer-bin*
drwxr-xr-x 2 severian users 4096 2005-01-15 20:09 greprefs/
-rw-r--r-- 1 severian users 8976 2004-11-07 13:27 header.png
drwxr-xr-x 2 severian users 4096 2005-01-15 20:09 icons/
-rw-r--r-- 1 severian users 3289 2004-11-07 13:27 install.ini
-rw-r--r-- 1 severian users 45888 2005-02-27 12:21 install.log
-rwxr-xr-x 1 severian users 449428 2004-11-07 13:27 libmozjs.so*
-rwxr-xr-x 1 severian users 177164 2004-11-07 13:27 libnspr4.so*
-rwxr-xr-x 1 severian users 409468 2004-11-07 13:27 libnss3.so*
-rwxr-xr-x 1 severian users 198152 2004-11-07 13:27 libnssckbi.so*
-rwxr-xr-x 1 severian users 15272 2004-11-07 13:27 libplc4.so*
-rwxr-xr-x 1 severian users 8240 2004-11-07 13:27 libplds4.so*
-rwxr-xr-x 1 severian users 134188 2004-11-07 13:27 libsmime3.so*
-rw-r--r-- 1 severian users 476 2004-11-07 13:27 libsoftokn3.chk
-rwxr-xr-x 1 severian users 419824 2004-11-07 13:27 libsoftokn3.so*
-rwxr-xr-x 1 severian users 125824 2004-11-07 13:27 libssl3.so*
-rwxr-xr-x 1 severian users 665424 2004-11-07 13:27 libxpcom.so*
-rwxr-xr-x 1 severian users 94888 2004-11-07 13:27 libxpcom_compat.so*
-rwxr-xr-x 1 severian users 7736 2004-11-07 13:27 libxpistub.so*
-rw-r--r-- 1 severian users 6423 2004-11-07 13:27 license.txt
-rwxr-xr-x 1 severian users 236607 2004-11-07 13:27 mozilla-xremote-client*
-rwxr-xr-x 1 severian users 2389320 2005-01-17 01:32 mplayerplug-in.so*
drwxr-xr-x 2 severian users 4096 2005-01-17 01:32 plugins/
-rw-r--r-- 1 severian users 335 2005-01-15 20:09 registry
drwxr-xr-x 7 severian users 4096 2005-01-15 20:09 res/
-rwxr-xr-x 1 severian users 10897 2004-11-07 13:27 run-mozilla.sh*
drwxr-xr-x 2 severian users 4096 2005-02-27 12:15 searchplugins/
-rw-r--r-- 1 severian users 55809 2004-11-07 13:27 watermark.png
drwxr-xr-x 2 severian users 4096 2004-11-07 13:27 xpi/
-rwxr-xr-x 1 severian users 147484 2004-11-07 13:27 xpicleanup*
[severian@lightstar:~/src/firefox-installer]$

Last edited by mcd; 03-14-2005 at 08:55 PM.
 
Old 03-14-2005, 08:58 PM   #11
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
then you must have installed it as a user instead of root
and installed it into your home directory
which you named /src/firefox-installer
(just a confusing name)

anyways...why don't you re-install as root to /usr/local/firefox
(so it is available to all users)
or to a simpler home directory...ie /home/severian/firefox

and point your script to that directory
 
Old 03-14-2005, 10:48 PM   #12
mcd
Member
 
Registered: Aug 2003
Location: Boulder, CO
Distribution: Slackware, RHEL, CentOS
Posts: 825

Rep: Reputation: 33
well, it's a laptop and i'm the only user, so i installed it as user on purpose. as for the directory, i put all my programs in ~/src, whether they're actually source packages or not. i guess i could rename it ~/applications or something, but that takes longer to type.

do you think that i don't get profile errors because i installed as user (perhaps it knows there's only one profile possible)?
 
Old 03-14-2005, 11:35 PM   #13
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
not sure

i was just trying to address the error the script generated
i assume it is a problem with the path
you could try adding /home/severian/src/firefox-installer to /etc/ld.so.conf and running ldconfig
i know you said you don't need it...just thought you might want to know why it isn't working
 
Old 03-15-2005, 08:14 AM   #14
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,289

Rep: Reputation: 52
All this has been very helpfull to me too, thanks.
 
  


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
firefox- open html in new window kpachopoulos Linux - Software 1 08-14-2005 05:08 AM
open a new window from Firefox lordofring Linux - Software 4 04-18-2005 07:03 PM
Javascript - what to use rather than window.close() then window.open() davee Programming 2 04-11-2005 09:28 AM
Mozilla Firefox open new window script Pathian Linux - Software 17 08-12-2004 01:37 PM
open new firefox window from launcher (using tabbrowser extensions) captain-cat Linux - Software 1 06-27-2004 09:02 AM


All times are GMT -5. The time now is 07:19 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration