Topic: Iceweasel - and Tabs - [Is NOT Solved]

OK I have a "general" question concerning Iceweasel (IW) or FF if you prefer..

I have "local" homepage that starts when I open IW, when I click on a link in a forum or email it opens that link and not the homepage.  Everything normal to this point.  Here is where I want to deviate...

Is there a way to have IW open the "Homepage" and then the clicked link in a second tab?

This would be from emails, it's open now and links can be opened in tabs if I choose.

[Is Not Solved] - this doesn't work!  lol

Last edited by Sector11 (2010-07-24 14:10:13)

Re: Iceweasel - and Tabs - [Is NOT Solved]

[error]

Last edited by winotree (2010-07-20 02:10:30)

Re: Iceweasel - and Tabs - [Is NOT Solved]

winotree wrote:

[error]

big_smile ... I see the "email" and come here and see this.

Relax - one error per day builds character.  cool

Re: Iceweasel - and Tabs - [Is NOT Solved]

I understood 2 situations:

1- You want two initial tabs to be open, one with gmail.com loaded and the other with some /usr/home/......./file.htlm (or something else, just 2 examples) ?


2- You have a initial tab with some links you got saved and you want to click one and open it in another tab, not in the present one ?

Both situations are very easy to solve...

D510MO + dell mini 10, both at 2 gb and crunching for now.

Re: Iceweasel - and Tabs - [Is NOT Solved]

Chubidaba wrote:

1- You want two initial tabs to be open, one with gmail.com loaded and the other with some /usr/home/......./file.htlm (or something else, just 2 examples) ?

That one.  I open my email client and have a notice of this post being available on #! Forums.

Clicking on the link in the email, I want IW to open:

  • Tab1 -  my local homepage, and

  • Tab2 -  this post that I an responding to right now.

How do I do that?

Re: Iceweasel - and Tabs - [Is NOT Solved]

have you tried the --new-tab flag?
don't have firefox or iceweasel at the mo but im pretty sure theres the command in the man page.

you may need a small shell script to the effect:

if pgrep iceweazel > /dev/null; then #check if iceweasel is running
  iceweasel --new-tab $1                  #if so open in new tab of existing window
else
  iceweasel                                       #else start new process
  sleep 2                                           #may need a delay, don't know, fiddle
  iceweasel --new-tab $1
fi

pretty psuedo codish, don't know what iceweasel processes are named (iceweasel-bin ?) or the exact name of the flag or whether that sleep is needed, you get the idea tho.

- - - - - - - - Wiki Pages - - - - - - -
#! install guide           *autostart programs, modify the menu & keybindings
configuring Conky       *installing scripts

Re: Iceweasel - and Tabs - [Is NOT Solved]

Sector11 wrote:
winotree wrote:

[error]

big_smile ... I see the "email" and come here and see this.

Relax - one error per day builds character.  cool

If what you say is true then I'm onehellofacharacter!!  Sorry I wasn't any help -- I got hung up on getting you more than one home page which is not what you wanted.  roll

Re: Iceweasel - and Tabs - [Is NOT Solved]

benj1 wrote:

have you tried the --new-tab flag?
don't have firefox or iceweasel at the mo but im pretty sure theres the command in the man page.

you may need a small shell script to the effect:

if pgrep iceweazel > /dev/null; then #check if iceweasel is running
  iceweasel --new-tab $1                  #if so open in new tab of existing window
else
  iceweasel                                       #else start new process
  sleep 2                                           #may need a delay, don't know, fiddle
  iceweasel --new-tab $1
fi

pretty psuedo codish, don't know what iceweasel processes are named (iceweasel-bin ?) or the exact name of the flag or whether that sleep is needed, you get the idea tho.

You know what we need!  A "banging head against the wall smilie" - man page - why didn't I think of that --- I check the man pages for 'everything' --- obviously NOT! roll

With "iceweasel.txt" I now have 101 man pages in ~/Documents/Manuals

       -new-tab URL
              Open URL in a new tab in an already running Iceweasel process.

But that is "an already running Iceweasel process" but at least I'm getting closer.

Interesting, in my local homepage I have a link:

<a href="http://crunchbanglinux.org/forums/" target="tab3">

I tried 'target="new-tab"' and it didn't work.  I have up to - target="tab12" in the page.

target="new-tab" works, it opens a second site in a new tab.  If I select yet another link, it re-uses the second tab - that's why the tab1, tab2, tab3 ... tab12  smile

That script looks interesting but how would I run it by pointing a mouse to a link in an email?

Re: Iceweasel - and Tabs - [Is NOT Solved]

winotree wrote:
Sector11 wrote:
winotree wrote:

[error]

big_smile ... I see the "email" and come here and see this.

Relax - one error per day builds character.  cool

If what you say is true then I'm onehellofacharacter!!  Sorry I wasn't any help -- I got hung up on getting you more than one home page which is not what you wanted.  roll

Oh it's true.  smile  And like you ... I'm onehellofacharacter!!

I'm just not saying it's good character or bad character.  lol

Yea, I accidentally discovered the duel homepage thing a while back and quickly changed that.  One is enough.

Re: Iceweasel - and Tabs - [Is NOT Solved]

Sector11 wrote:

That script looks interesting but how would I run it by pointing a mouse to a link in an email?

im perhaps misunderstanding, i thought you had a separate email client and you wanted to open that up in a separate tab of IW, if thats the case depends on the client, you just need to change the command for opening emails to point to the script rather than 'iceweasel'.

but this

I tried 'target="new-tab"' and it didn't work.  I have up to - target="tab12" in the page.....

seems to suggest reading emails in IW, although im slightly confused how have you got control over links in emails in an online email client and also i thought the old way was 'target="_blank"
and the new way was css, ie
a {
    target-name: new;
    target-new: tab;
}

- - - - - - - - Wiki Pages - - - - - - -
#! install guide           *autostart programs, modify the menu & keybindings
configuring Conky       *installing scripts

Re: Iceweasel - and Tabs - [Is NOT Solved]

@ benj1 - or anyone reading

My error ... Lets start again....

I open my email client, nothing else is running.  I see an email with a link in it (pointing to the post I am now responding to):

The post is located at http://crunchbanglinux.org/forums/post/78533/#p78533

You can unsubscribe by going to http://crunchbanglinux.org/forums/unsubscribe/8714/7916daf758b0c91684c1e540c2b7d571f8c847f1/

-- 

CrunchBang Linux Forums Mailer

So I click on the link seen above and start this response.

It opened IW for me, with only one tab, here.  I want IW to open my "Homepage" in the first tab and then this in another tab.

http://omploader.org/tNHp0cw

I hope that helps.

Re: Iceweasel - and Tabs - [Is NOT Solved]

ok, well save the script as something

#! /bin/bash
if pgrep iceweazel > /dev/null; then #check if iceweasel is running
  iceweasel --new-tab $1                  #if so open in new tab of existing window
else
  iceweasel                                       #else start new process
  sleep 2                                           #may need a delay, don't know, fiddle
  iceweasel --new-tab $1
fi


in a terminal 'chmod +x /your/script'
in your email client find the web browser option or whatever, at the moment thats iceweasel, change that to point to this script.
you will need to check a few things first, like the name of the iceweasel process (firefox is firefox-bin afaik, htop should tell you anyway) also check the man page for the correct flag name, also change the sleep setting if you need/want.
save everything and you should be ready to go, if iceweasel is running youll just get a new tab, if its not, it'll open with your home page and a tab with the link in.

- - - - - - - - Wiki Pages - - - - - - -
#! install guide           *autostart programs, modify the menu & keybindings
configuring Conky       *installing scripts

Re: Iceweasel - and Tabs - [Is NOT Solved]

Could this be connected with Firefox's lack of an option to open urls sent from an external app in a new tab by default? If you had Fx running already, that might do what you want.

I installed this attachment a while ago, which works round this irritating bug.

There's also this: https://bugzilla.mozilla.org/show_bug.cgi?id=515410
and this more developed addon: https://addons.mozilla.org/en-US/firefox/addon/13626/

John
------------------------
( a boring Japan blog , and idle twitterings )
“There is more Unix-nature in one line of shell script than there is in ten thousand lines of C.” - Master Foo

Re: Iceweasel - and Tabs - [Is NOT Solved]

@johnraff - Even if you can make Firefox open a new tab for application links, it only would work when its already open. It seems Sector wants Firefox to always open with his homepage in a tab.

Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Re: Iceweasel - and Tabs - [Is NOT Solved]

anonymous wrote:

It seems Sector wants Firefox to always open with his homepage in a tab.

BINGO! Give the man a cigar. lol

No big deal really, it was just a thought.  I gotta run ... be back in a few hours!

Re: Iceweasel - and Tabs - [Is NOT Solved]

benj1 wrote:

ok, well save the script as something

#! /bin/bash
if pgrep iceweazel > /dev/null; then #check if iceweasel is running
  iceweasel --new-tab $1                  #if so open in new tab of existing window
else
  iceweasel                                       #else start new process
  sleep 2                                           #may need a delay, don't know, fiddle
  iceweasel --new-tab $1
fi


in a terminal 'chmod +x /your/script'
in your email client find the web browser option or whatever, at the moment thats iceweasel, change that to point to this script.
you will need to check a few things first, like the name of the iceweasel process (firefox is firefox-bin afaik, htop should tell you anyway) also check the man page for the correct flag name, also change the sleep setting if you need/want.
save everything and you should be ready to go, if iceweasel is running youll just get a new tab, if its not, it'll open with your home page and a tab with the link in.

I saved it in ~/bin/icew and I run it in terminal
1. it immediately opens iceweasel - two seconds later it opens another iceweasel - both on my homepage.

In Claws: http://omploader.org/vNTA1aA

Let me close this and click on a link in claws.

EDIT:  it only opens what I click on, no homepage.  sad

Last edited by Sector11 (2010-07-21 21:30:22)

Re: Iceweasel - and Tabs - [Is NOT Solved]

Did you try adding '%s' after icew just like it is for gedit?

Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Re: Iceweasel - and Tabs - [Is NOT Solved]

2 things

what anonymous said

2nd i cant spell

pgrep iceweazel

- - - - - - - - Wiki Pages - - - - - - -
#! install guide           *autostart programs, modify the menu & keybindings
configuring Conky       *installing scripts

Re: Iceweasel - and Tabs - [Is NOT Solved]

@ benj1 & anonymous

Give'em each a box a BOX of Cigars --- and make them Cuban.

benj1 for the script and
anonymous for that last post - '%s'

It works as advertised.

Re: Iceweasel - and Tabs - [Is NOT Solved]

benj1 wrote:

2 things

Listening...

benj1 wrote:

what anonymous said

OK, what anonymous said ... but it doesn't work.  sad

benj1 wrote:

2nd i cant spell

shhhh neither can I, my best friend is my spell checker.

benj1 wrote:

pgrep iceweazel

I never noticed. lol

=-=-=-=-=-=

It opens my homepage - nothing else.  Then when close IW and try second time it opens my homepage again. Again I close it and 2 seconds later IW opens at the link I clicked on - no homepage

Go figure!

Re: Iceweasel - and Tabs - [Is NOT Solved]

Why don't you just start up Iceweasel before you check your email? Your home page will already be loaded up, so with any luck new urls will get new tabs... ( see my post above about that issue ).

John
------------------------
( a boring Japan blog , and idle twitterings )
“There is more Unix-nature in one line of shell script than there is in ten thousand lines of C.” - Master Foo

Re: Iceweasel - and Tabs - [Is NOT Solved]

^ Alternatively one could just open the homepage after the fact.

Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Re: Iceweasel - and Tabs - [Is NOT Solved]

@ johnraff & anonymous

The idea was for something for my wife.  And since it is a computer and I know that with scripts people can make things happen.

So either of the options ... open IW first or homepage after will have to do for now.

Thanks anyway.

Re: Iceweasel - and Tabs - [Is NOT Solved]

strange, i posted yesterday, doesn't seem to have appeared.

anyway, i wrote that the iceweasel process is called firefox, so you will need to change the pgrep line to that.
also your previous post seems to suggest that iceweasel doesn't background itself, it did with me so perhaps adding & after the second iceweasel call help.

all that worked fine for me in the terminal when i tried it, if it doesn't im out of ideas.

- - - - - - - - Wiki Pages - - - - - - -
#! install guide           *autostart programs, modify the menu & keybindings
configuring Conky       *installing scripts

Re: Iceweasel - and Tabs - [Is NOT Solved]

benj1 wrote:

strange, i posted yesterday, doesn't seem to have appeared.

anyway, i wrote that the iceweasel process is called firefox, so you will need to change the pgrep line to that.
also your previous post seems to suggest that iceweasel doesn't background itself, it did with me so perhaps adding & after the second iceweasel call help.

all that worked fine for me in the terminal when i tried it, if it doesn't im out of ideas.


Well, I've tried - all iceweasel:

#! /bin/bash

# original line in clawsmail: firefox '%s'

if pgrep iceweasel > /dev/null; then # check if iceweasel is running
  iceweasel --new-tab $1    # if so open in new tab of existing window
else
  iceweasel   # else start new process
  sleep 1   # may need a delay, don't know, fiddle
  iceweasel --new-tab $1
fi

- all firefox:

#! /bin/bash

# original line in clawsmail: firefox '%s'

if pgrep firefox > /dev/null; then # check if iceweasel is running
  firefox --new-tab $1    # if so open in new tab of existing window
else
  firefox   # else start new process
  sleep 1   # may need a delay, don't know, fiddle
  firefox --new-tab $1
fi

- pgrep firefox with iceweasel

#! /bin/bash

# original line in clawsmail: firefox '%s'

if pgrep firefox > /dev/null; then # check if iceweasel is running
  iceweasel --new-tab $1    # if so open in new tab of existing window
else
  iceweasel   # else start new process
  sleep 1   # may need a delay, don't know, fiddle
  iceweasel --new-tab $1
fi

and tried them all with firefox and iceweasel '%s' in clawsmail as well.

Grrrrrrrr!