Midori: Webkit Web browser

Following a link from external application opens a new instance of Midori instead of using the existing one

Reported by Arturo Torres Sánchez on 2011-10-15
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Midori
High
Unassigned

Bug Description

When I click a link from, say, Postler (the other app doesn't matter) it opens a new instance of Midori, even when Midori is already open. I can tell that it's a new instance and not just a new window of the same instance because it opens all my tabs again (it's set to remember last used tabs).

Then there's a strange behavior, because if I open another link from Postler, the instance created by it opens the new link; but if I use a new app to open a link (for example, Polly) I get even another instance of Midori.

Christian Dywan (kalikiana) wrote :

To get to the bottom of this I added the internal intstance name to about:version, and indeed I discovered these different names in different instances:

de.twotoasts.midori_1f433d488e69613d52d00d0bfb876c48__0_0
de.twotoasts.midori_1f433d488e69613d52d00d0bfb876c48__0

Changed in midori:
importance: Undecided → High
status: New → Confirmed
Caio Alonso (caio-alonso) wrote :

Opening a link from the terminal does not cause this bug:

$ midori http://ubuntu.com

opens a new tab on Midori, as expected. So the bug probably lies on how Ubuntu calls Midori when clicking a link from an external application.

Caio Alonso (caio-alonso) wrote :

The /usr/share/applications/midori.desktop contains the entry that describes the command called when clicking on a http link throughout the system:

Exec=midori %U

which, since %U gets replaced by the URL, should not open a new midori instance.

You're right, it should not open a new instance, but it does. Hence the bug.

2012/5/2, Caio Alonso <email address hidden>:
> The /usr/share/applications/midori.desktop contains the entry that
> describes the command called when clicking on a http link throughout the
> system:
>
> Exec=midori %U
>
> which, since %U gets replaced by the URL, should not open a new midori
> instance.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/874719
>
> Title:
> Following a link from external application opens a new instance of
> Midori instead of using the existing one
>
> Status in Midori: Webkit Web browser:
> Confirmed
>
> Bug description:
> When I click a link from, say, Postler (the other app doesn't matter)
> it opens a new instance of Midori, even when Midori is already open. I
> can tell that it's a new instance and not just a new window of the
> same instance because it opens all my tabs again (it's set to remember
> last used tabs).
>
> Then there's a strange behavior, because if I open another link from
> Postler, the instance created by it opens the new link; but if I use a
> new app to open a link (for example, Polly) I get even another
> instance of Midori.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/midori/+bug/874719/+subscriptions
>

--
—Arturo Torres Sánchez

gue5t gue5t (gue5t) wrote :

It looks like this is the DISPLAY environment variable being either ":0" or ":0.0"; while both will open midori on the same X display, one specifies the screen, and the screen portion of the variable gets embedded in the instance name. I'd think the best course of action would be to use only the display (pre-'.') portion of the variable in the instance name.

Christian Dywan (kalikiana) wrote :

I'll be jiggered, that makes complete sense. I went ahead to do this:

+ #ifdef GDK_WINDOWING_X11
+ /* On X11: :0 or :0.0 which is equivalent */
+ display_name = g_strndup (gdk_display_get_name (display), 2);
+ #else

Changed in midori:
status: Confirmed → Fix Committed
Changed in midori:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers