Nautilus opening behind current window

Bug #889044 reported by Colin Law
52
This bug affects 13 people
Affects Status Importance Assigned to Milestone
Nautilus
Invalid
Medium
Unity
Invalid
Undecided
Unassigned
unity-2d
Invalid
Critical
Unassigned
nautilus (Ubuntu)
Invalid
Low
Unassigned

Bug Description

To Replicate (using unity-2d):
Open Firefox
Open Nautilus from launcher
Close Nautilus
Move Firefox window about a bit (just giving it the focus does not seem to be enough)
Open Nautilus again, it opens behind firefox and the launcher icon is jiggling.
The same symptom is seen with apps other than Firefox.

I have put this against unity-2d as the problem is not seen on Unity 3d.

Revision history for this message
Luiz Felipe Talvik (talvik) wrote :

I can replicate the same here, but also when opening Nautilus for the first time.
I don't have to follow this step either to reproduce"Move Firefox window about a bit".

From my perception, it seems to happen when nautilus takes some time (>0.5s) to open. Not sure though.

Colin Law (colin-law)
Changed in unity-2d:
status: New → Confirmed
Changed in unity-2d:
importance: Undecided → High
Changed in unity-2d:
assignee: nobody → Lohith D Shivamurthy (dyams)
status: Confirmed → In Progress
Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

Invalid on Unity 3d, since the problem doesn't occur here.

Changed in unity:
status: New → Triaged
importance: Undecided → High
status: Triaged → Invalid
importance: High → Undecided
Changed in unity-2d:
assignee: Lohith D Shivamurthy (dyams) → nobody
Changed in unity-2d:
importance: High → Critical
Changed in unity-2d:
assignee: nobody → Pawel Stolowski (stolowski)
Revision history for this message
Paweł Stołowski (stolowski) wrote :

There seems to be a problem with startup notifications in nautilus in that it doesn't notify about startup completion.
I've enabled debugging in Metacity by setting METACITY_VERBOSE=1 and METACITY_USE_LOGFILE=1 environment variables. Metacity reports nautilus startup events as follows:

STARTUP: Received startup initiated for unity-2d-shell-3355-pawel-VirtualBox-nautilus-0_TIME474198 wmclass (unset)
...
STARTUP: Sequence used 6174.63 seconds vs. 15000 max: unity-2d-shell-3355-pawel-VirtualBox-nautilus-2_TIME483035
STARTUP: Sequence used 15011.9 seconds vs. 15000 max: unity-2d-shell-3355-pawel-VirtualBox-nautilus-0_TIME474198
STARTUP: Timed out sequence unity-2d-shell-3355-pawel-VirtualBox-nautilus-0_TIME474198
STARTUP: Received startup completed for unity-2d-shell-3355-pawel-VirtualBox-nautilus-0_TIME474198

Take note of the timeout. The 'Received startup completed..' following it is just fallback code in metacity, as startup complection event is actually never reported by nautilus.

Just for reference, here is how it looks for firefox:

STARTUP: Received startup initiated for unity-2d-shell-3355-pawel-VirtualBox-firefox-1_TIME476779 wmclass (unset)
STARTUP: Adding sequence unity-2d-shell-3355-pawel-VirtualBox-firefox-1_TIME476779
STARTUP: Sequence used 421.761 seconds vs. 15000 max: unity-2d-shell-3355-pawel-VirtualBox-firefox-1_TIME476779
STARTUP: Received startup completed for unity-2d-shell-3355-pawel-VirtualBox-firefox-1_TIME476779

I've also traced xevents with 'xev -root'. When nautilus is started it send _NET_STARTUP_INFO_BEGIN event, followed by a number of _NET_STARTUP_INFO events. This is different than startup notifications for other applications - if you compare it with xevents sent by e.g. firefox or gnome-terminal, they send _NET_STARTUP_INFO_BEGIN + a number of _NET_STARTUP_INFO events, and then _NET_STARTUP_INFO_BEGIN and _NET_STARTUP_INFO events are sent again. I'm hovewer not sure if this means anything for this issue.

Changed in unity-2d:
status: In Progress → Confirmed
Changed in nautilus:
importance: Unknown → Medium
status: Unknown → Invalid
Revision history for this message
Colin Law (colin-law) wrote :

I don't understand why this has been marked as invalid in nautilus while it also appears to have been reported against nautilus upstream.

Also I notice that the upstream bug has been marked as a duplicate, but that bug does not seem to bear much relationship to the problem we are seeing in unity-2d.

Revision history for this message
Paweł Stołowski (stolowski) wrote :

I guess GNOME devs decided it's essentialy a startup notification bug and the lack of busy cursor has same root cause (I can't judge this)... Anyway, I've commented on https://bugzilla.gnome.org/show_bug.cgi?id=660577.

But why it's invalid in nautilus... no idea.

Revision history for this message
Colin Law (colin-law) wrote :

Are we stuck with this for Precise launch? It is very confusing, particularly for beginners. Click on nautilus launcher and apparently nothing happens apart from the launcher jiggling.

Changed in unity-2d:
assignee: Pawel Stolowski (stolowski) → nobody
Revision history for this message
Colin Law (colin-law) wrote :

I guess that is a yes then, we /are/ stuck with this for Precise launch :(

Revision history for this message
Colin Law (colin-law) wrote :

Is it reasonably certain that this is a Nautilus bug, given the fact that it only happens on Unity-2D?

I don't suppose it is in any way related to bug #982292 HUD invoked dialog windows do not receive focus? I ask in case it is related to Nautilus not being given the focus when the window is opened, in case opening a window on Nautilus (which is already running I think) is similar to opening a dialog in another app. Probably rubbish as I know nothing about the code, but worth asking just in case.

Revision history for this message
Paweł Stołowski (stolowski) wrote :

Hi Colin,
I did some more debugging and I think that indeed, it may not be nautilus problem after all. According to http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt appliations that support notification protocol should send:
- _NET_STARTUP_INFO_BEGIN with message "new: ..." to indicate new startup sequence
- and *optionally* _NET STARTUP_INFO_BEGIN with message "remove: ..." to indicate end of startup sequence.

Nautilus doesn't send "remove" message (this confused me and initially led to the conclusion that this is nautilus bug), but according to the freedsektop standard if "new" message contains an optional WMCLASS, then it's responsibility of the *desktop environment* to send "remove" notification for startup sequence - quote from the spec:
"WMCLASS a string to match against the "resource name" or "resource class" hints. If this key is present, the launchee will most likely not send a "remove" message on its own. If the desktop environment detects a toplevel window mapped with this name or class, it should send a "remove" message for the startup sequence. "

I haven't debugged if nautilus sets WMCLASS in the _NET_STARTUP_INFO_BEGIN - "new" message, but anyway looking at the unity-2d code it looks like we don't send "remove" message on behalf of applications (using sn_startup_sequence_complete from startup-notification library). On the other hand, maybe it's a responsibility of metacity?

By the way, I debugged _NET_STARTUP_INFO_BEGIN with slightly modified xev source to print message content.

Revision history for this message
Sebastien Bacher (seb128) wrote :

bug #781931 is similar

Changed in nautilus (Ubuntu):
importance: Undecided → Low
status: New → Invalid
Revision history for this message
Colin Law (colin-law) wrote :

Could this be related to bug #781931 with unity 3d? New windows are moved to front but don't take focus. This seems to relate in particular to Nautilus.

Changed in unity-2d:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.