[kde-linux] Debian 5.0, KDE: getting konqueror to open links from kmail in the background (and not interfere with other behaviors)

Randy Kramer rhkramer at gmail.com
Sun Apr 5 12:58:25 UTC 2009


Thanks for the followup!  Comments interspersed below:

On Saturday 04 April 2009 11:42:01 pm James Richard Tyrer wrote:
> Randy Kramer wrote:
> > is there a place
> > in kmail where I can substitute some variation of one of these
> > commands (if I found one that did do what I'm looking for) in place
> > of whatever command kmail currently invokes to open a link?  If so,
> > where would I do that--in a configuration file somewhere, or would
> > I have to modify and recompile kmail?
>
> It should be configurable somewhere.  In general, what mail client
> does with a link is determined by a file somewhere.  I am using
> Thunderbird and I was able to configure it to open links in Konqueror
> in DeskTop 2 by adding stuff to a file, but wasn't able to get
> Konqueror to open in a new tab.

I've managed to get konqueror to open links in tabs, that part seemed 
fairly easy (notes below).

My problem is getting konqueror to do that while remaining in the 
background of the desktop shared by kmail and that instance of 
konqueror, *without other adverse effects*.  

What I mean is, when I manage to accomplish this by adjusting other 
settings (like the ~"focus stealing prevention" level), I get other 
undesirable behavior, like important dialogs and popups (e.g., 
authorization), staying in the background (i.e., behind the "window" 
they pop up from).

Here's what I did to get konqueror to open external links (e.g., from 
kmail) in a tab

Under konqueror Settings -> Configure Konqueror -> Web Settings: 

   * Open links in new tab instead of in new window

Then, under Advanced:

   * Open new tabs in the background
   * Open popups in new tab instead of in new window
   * Open as tab in existing konqueror when URL is called 
externally

(Hmm, just looking at this again now, maybe I should uncheck "Open 
popups in new tab instead of in new window" (although, if memory serves 
me, that option was checked on my Mandriva2006 installation).  Nope, 
that doesn't help, at least for authorization popups / dialogs--they 
come out as popups regardless of this setting.)

I'm not 100% sure all those settings are required.  

BTW, I would have thought that the "Open new tabs in the background" is 
the setting that I required--that does seem to do what it says, but 
only for links opened (clicked) from within konqueror, not for external 
links clicked in, for example, kmail.

(Hmm, maybe that is a little misleading, I guess you could say that it 
does open new tabs in the background from within konqueror, but, 
clearly, atm you click a link in a konqueror window, that instance of 
konqueror is in the foreground, and the "action" of opening in the 
background is only that of not shifting (focus) to the newly opened 
tab.  Maybe that slight difference in terminology might be a clue to 
what has changed in kde (if anything).)

> So, you need to RTFM and see how KMail works, or perhaps someone else
> can help with the KMail details.

That's what I will eventually hope for, but first I'm trying to find out 
if anybody has kde 3.5.9/3.5.10 (i.e., from Debian 5.0) working as I 
desire, which is described below.  If nobody has it working that way, 
either some new restriction has been introduced since kde 3.4.2 (i.e., 
Mandriva2006), or Mandriva knows (knew?) some magic that nobody else 
seems to know (at least, as far as I've been able to ascertain).

Here is the behavior I had (and preferred) on Mandriva2006:
   * on pressing <alt><F2>, regardless of the location of the mouse, 
focus was shifted to the "Run Command" popup and I could type into the 
combo box
   * all popup dialogs on konqueror or other things (like the KDE 
control center) requesting me to, for example, type in the root password 
appeared on top of the application (i.e., window) they were called from
   * in kmail, and with an instance of konqueror open on the same 
desktop, if I click on a link in an email, it is opened in a new tab in 
the open instance of konqueror (usually anyway--maybe there is some 
limit to the number of tabs that will be opened that way before a new 
instance of konqueror is started), and *konqueror remains in the 
background*.

To the best of my recollection, I did not have to do anything in the way 
of tweaking KDE, konqueror, or kmail configuration settings to get that 
behavior (on Mandriva2006)--of course, that was several years ago.

In Debian 5.0, if I manage to tweak the behavior (typically using the 
focus stealing setting) to accomplish the behavior described in the 3rd 
bullet, I lose the behavior described in the first two bullets.

Thanks again!
Randy Kramer

> Also, IIUC, it might be possible to write a script that uses DCOP to
> do this.

-- 
I didn't have time to write a short letter, so I created a video 
instead.--with apologies to Cicero, et.al.



More information about the kde-linux mailing list