Bug 80161 - [testcase] open as new tab in existing window dosn't work, when the first window is not yet initialized
Summary: [testcase] open as new tab in existing window dosn't work, when the first win...
Status: RESOLVED INTENTIONAL
Alias: None
Product: konqueror
Classification: Applications
Component: tabbing (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-23 01:32 UTC by Carsten Lohrke
Modified: 2012-01-19 17:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Lohrke 2004-04-23 01:32:46 UTC
Version:            (using KDE KDE 3.2.2)
Installed from:    Gentoo Packages

So opening a bunch of urls in a fast manner, while no konqueror window is opened  still leads to a bunch of winows popping up.
Comment 1 Stephan Binner 2004-04-24 10:31:31 UTC
What now? "no window open" or "not yet initalizied?" If the latter what you mean with that?
Comment 2 Carsten Lohrke 2004-04-24 14:54:25 UTC
Hm, sorry my english is not that good, but from the user perspective it is the same, imho. As long as the first konqueror window gets created, all following urls open in seperate windows. At best, konqueror would download the url data in backgrund and create all the tabs when the parent window is ready.

Comment 3 Carsten Lohrke 2004-12-10 20:17:13 UTC
still an issue with kde 3.3.2
Comment 4 Joseph Kerian 2006-08-30 18:20:48 UTC
For an example... try the following as a shell script:
sites='http://bugs.kde.org/show_bug.cgi?id=80161 http://bugs.kde.org http://www.kde.org'
for target in $sites; do
  konqueror ${target}&
done

What this 'should' do... (provided you have all of the preferences set properly) is launch one konqy window with three tabs, instead it launches 3 seperate windows.

Note: Someone suggested that I use "kfmclient openProfile <a konqy profile> ${target}&" instead. I tried it, but it no difference.
Comment 5 Philip Rodrigues 2006-08-30 19:03:14 UTC
works fine here with "kfmclient exec $target"
Comment 6 Joseph Kerian 2006-08-30 19:39:54 UTC
Hmm... kfmclient exec works for me if I have any konqy windows open. But if everything has been closed already, it opens all three URLs in seperate windows.
Comment 7 Mark A. Taff 2006-08-30 23:43:09 UTC
#!/bin/bash
sites='http://bugs.kde.org/show_bug.cgi?id=80161 http://bugs.kde.org http://www.kde.org' 
 for target in $sites; do
   kfmclient openURL ${target} &
 done

This opens one window with 3 tabs when no other Konqi windows are open.

The script in comment #4 opens in 3 windows, when it should be one window.  I think this is confirmed.  This is on KDE 3.5.4.
Comment 8 Mark A. Taff 2006-08-30 23:52:46 UTC
Confirmed.
Comment 9 Jaime Torres 2008-07-18 21:38:28 UTC
Still present in konqueror 4.1.60 svn trunk 831729, using the testcase included in comment 7.

Comment 10 Jaime Torres 2009-06-12 16:06:36 UTC
The testcase included in comment 7 works now in konqueror 4.2.91 (if there is at least one konqueror process working). 
If there is none, as kfmclient can not find any konqueror process, it creates one for each url.
With some delay (calling sleep 5, for example) after the first load, it works.
Comment 11 Dawit Alemayehu 2012-01-19 17:11:04 UTC
The reason why the test case in comment (In reply to comment #7)
> #!/bin/bash
> sites='http://bugs.kde.org/show_bug.cgi?id=80161 http://bugs.kde.org http://www.kde.org' 
>  for target in $sites; do
>    kfmclient openURL ${target} &
>  done
> 
> This opens one window with 3 tabs when no other Konqi windows are open.
> 
> The script in comment #4 opens in 3 windows, when it should be one window.  I think this is confirmed.  This is on KDE 3.5.4.

Nope. What it is doing currently is 100% correct. Otherwise, you will never be able to open a new konqueror window when the "open as new tab in existing window" option is enabled. For that reason using "konqueror" directly from the command line means, will always open a new window regardless of the options you set. 

Therefore, if you change the for loop in the test script from comment #2 to "konqueror $sites" instead, you will be guaranteed a new konqueror window with the URLs opened as tabs regardless of any of the options set. 

On the other hand if all you want to do is open the URL in an existing insance of Konqueror when there is one already running, then you have to use kfmclient openURL as you are doing in comment #7.