Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes Nemo does not start as desktop on session start (was: Sometimes Nemo just starts as a black Window after login) #38

Closed
michael-schaller opened this issue Oct 3, 2012 · 11 comments

Comments

@michael-schaller
Copy link

Hi everyone,

Sometimes Nemo just starts as a maximized black Window after login and no desktop icons are displayed. If I close the black Window I still have no desktop icons but as soon as I start nemo as a normal file manager the desktop icons also appear.

The xprop output of that black window is:
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_ABOVE, _NET_WM_ACTION_BELOW
_NET_WM_STATE(ATOM) =
WM_STATE(WM_STATE):
window state: Normal
icon window: 0x0
_NET_FRAME_EXTENTS(CARDINAL) = 1, 1, 29, 1
_NET_WM_DESKTOP(CARDINAL) = 0

I'm using the following packages:
$ dpkg -l | egrep "cinnamon|muffin|nemo"
ii cinnamon 1.6.1-0ubuntu1precise1 Cinnamon desktop
ii gir1.2-muffin-3.0 1.1.1-0ubuntu1
precise1 GObject introspection data for Muffin
ii libmuffin0 1.1.1-0ubuntu1precise1 window manager library from the Muffin window manager
ii libnemo-extension1a 1.0.3-0ubuntu1
precise1 libraries for nemo components - runtime version
ii muffin 1.1.1-0ubuntu1precise1 lightweight GTK+ window manager
ii muffin-common 1.1.1-0ubuntu1
precise1 shared files for the Muffin window manager
ii nemo 1.0.3-0ubuntu1precise1 file manager and graphical shell for GNOME
ii nemo-data 1.0.3-0ubuntu1
precise1 data files for nemo
ii nemo-fileroller 1.0.0-20120930040004-precise File Roller integration for Nemo

Please let me know how I can provide further information and I'm happy to help.

Best,

Michael

@mtwebster
Copy link
Member

Can you first of all, see if this is occurring on the latest Nemo (1.0.8).

Next, if you can reproduce it, from the command prompt, type:

nemo --quit

This should kill all instances of Nemo, including the desktop.

Then fire up Nemo from the command line:

nemo

And see if there's any output from that.

Thanks

@michael-schaller
Copy link
Author

Hi Michael,

Sorry for the delay - I was on vacation and it took me a while to catch up on my mails...

I can confirm that this issue still persists with Nemo 1.1.0 and to me it looks like that Nautilus and Nemo are both trying to start. (I have also Gnome3 and Unity on my machine as I have to test with other desktop environments from time to time)

Shouldn't Nautilus be disabled if Cinnamon is in use as desktop environment and Nemo is installed?
Can this be a timing issue as I'm using LightDM with autologin and Cinnamon as the default desktop environment?

Best,

Michael

PS #1: Here are the installed packages:

michi@black-box:$ dpkg -l | egrep "muffin|cinnamon|nemo"
ii cinnamon 1.6.5-0ubuntu1
precise1 Cinnamon desktop
ii gir1.2-muffin-3.0 1.1.2-0ubuntu1precise1 GObject introspection data for Muffin
ii libmuffin0 1.1.2-0ubuntu1
precise1 window manager library from the Muffin window manager
ii libnemo-extension1 1.1.0-0ubuntu1precise1 libraries for nemo components - runtime version
ii muffin 1.1.2-0ubuntu1
precise1 lightweight GTK+ window manager
ii muffin-common 1.1.2-0ubuntu1precise1 shared files for the Muffin window manager
ii nemo 1.1.0-0ubuntu1
precise1 file manager and graphical shell for GNOME
ii nemo-data 1.1.0-0ubuntu1~precise1 data files for nemo
ii nemo-fileroller 1.0.0-20121021150425-precise File Roller integration for Nemo

PS #2: Here are three logins and the outcome:

Nemo 1.1.0 is running but deskop icons are missing:

michi@black-box:$ ps ax | grep -v grep | egrep "nautilus|nemo"
7383 ? Sl 0:00 nemo -n
michi@black-box:
$ cat ~/.xsession-errors
JS ERROR: !!! Exception was: Error: Requiring GjsDBus, version none: Typelib file for namespace 'GjsDBus' (any version) not found
JS ERROR: !!! lineNumber = '0'
JS ERROR: !!! fileName = '"gjs_throw"'
JS ERROR: !!! stack = '"("Requiring GjsDBus, version none: Typelib file for namespace 'GjsDBus' (any version) not found")@gjs_throw:0
@/usr/share/gjs-1.0/overrides/Gio.js:23
"'
JS ERROR: !!! message = '"Requiring GjsDBus, version none: Typelib file for namespace 'GjsDBus' (any version) not found"'
** Message: applet now removed from the notification area

** (nemo:7383): WARNING **: Can not get _NET_WORKAREA

** (nemo:7383): WARNING *: Can not determine workarea, guessing at layout
*
Message: using fallback from indicator to GtkStatusIcon
Window manager warning: Log level 16: Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject
Window manager warning: Log level 16: Error registering polkit authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject (polkit-error-quark 0)
ERROR:dbus.proxies:Introspect error on :1.15:/org/freedesktop/Notifications: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)
JS ERROR: !!! Exception was: Error: Requiring GjsDBus, version none: Typelib file for namespace 'GjsDBus' (any version) not found
JS ERROR: !!! lineNumber = '0'
JS ERROR: !!! fileName = '"gjs_throw"'
JS ERROR: !!! stack = '"("Requiring GjsDBus, version none: Typelib file for namespace 'GjsDBus' (any version) not found")@gjs_throw:0
@/usr/share/gjs-1.0/overrides/Gio.js:23
"'
JS ERROR: !!! message = '"Requiring GjsDBus, version none: Typelib file for namespace 'GjsDBus' (any version) not found"'
gnome-session[7287]: WARNING: Application 'cinnamon.desktop' killed by signal
Window manager warning: Log level 16: Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject
Window manager warning: Log level 16: Error registering polkit authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject (polkit-error-quark 0)
** Message: applet now embedded in the notification area

(dropbox:7402): Gdk-CRITICAL **: IA__gdk_window_thaw_toplevel_updates_libgtk_only: assertion `private->update_and_descendants_freeze_count > 0' failed
Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x2200004 (None)
Window manager warning: meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed.

Nautilus started instead of Nemo:

michi@black-box:$ ps ax | grep -v grep | egrep "nautilus|nemo"
11095 ? Sl 0:00 nautilus -n
michi@black-box:
$ cat ~/.xsession-errors
JS ERROR: !!! Exception was: Error: Requiring GjsDBus, version none: Typelib file for namespace 'GjsDBus' (any version) not found
JS ERROR: !!! lineNumber = '0'
JS ERROR: !!! fileName = '"gjs_throw"'
JS ERROR: !!! stack = '"("Requiring GjsDBus, version none: Typelib file for namespace 'GjsDBus' (any version) not found")@gjs_throw:0
@/usr/share/gjs-1.0/overrides/Gio.js:23
"'
JS ERROR: !!! message = '"Requiring GjsDBus, version none: Typelib file for namespace 'GjsDBus' (any version) not found"'
** Message: applet now removed from the notification area
** Message: using fallback from indicator to GtkStatusIcon

** (nautilus:11095): WARNING **: Can not get _NET_WORKAREA

** (nautilus:11095): WARNING **: Can not determine workarea, guessing at layout
Window manager warning: Log level 16: Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject
Window manager warning: Log level 16: Error registering polkit authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject (polkit-error-quark 0)
Nautilus-Share-Message: Called "net usershare info" but it failed: 'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error No such file or directory
Please ask your system administrator to enable user sharing.

failed to create drawable
** Message: applet now embedded in the notification area
failed to create drawable

(dropbox:11103): Gdk-CRITICAL **: IA__gdk_window_thaw_toplevel_updates_libgtk_only: assertion `private->update_and_descendants_freeze_count > 0' failed
Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x1200004 (None)
Window manager warning: meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed.

Nemo 1.1.0 starts and desktop icons are present:

michi@black-box:$ ps ax | grep -v grep | egrep "nautilus|nemo"
11673 ? Sl 0:00 nemo -n
michi@black-box:
$ cat ~/.xsession-errors
JS ERROR: !!! Exception was: Error: Requiring GjsDBus, version none: Typelib file for namespace 'GjsDBus' (any version) not found
JS ERROR: !!! lineNumber = '0'
JS ERROR: !!! fileName = '"gjs_throw"'
JS ERROR: !!! stack = '"("Requiring GjsDBus, version none: Typelib file for namespace 'GjsDBus' (any version) not found")@gjs_throw:0
@/usr/share/gjs-1.0/overrides/Gio.js:23
"'
JS ERROR: !!! message = '"Requiring GjsDBus, version none: Typelib file for namespace 'GjsDBus' (any version) not found"'
** Message: applet now removed from the notification area
Window manager warning: Log level 16: Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject
Window manager warning: Log level 16: Error registering polkit authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject (polkit-error-quark 0)

** (nemo:11673): WARNING **: Can not get _NET_WORKAREA

** (nemo:11673): WARNING *: Can not determine workarea, guessing at layout
*
Message: using fallback from indicator to GtkStatusIcon
** Message: applet now embedded in the notification area
failed to create drawable
failed to create drawable

(dropbox:11693): Gdk-CRITICAL **: IA__gdk_window_thaw_toplevel_updates_libgtk_only: assertion `private->update_and_descendants_freeze_count > 0' failed
Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x1c00004 (None)
Window manager warning: meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed.

@michael-schaller
Copy link
Author

Hi everyone,

This still happens to me on 1.1.1 albeit it seems to happen less often than with previous releases. (but this can be totally subjective!)

Best,

Michael

@michael-schaller
Copy link
Author

Hi everyone,

This still happens with Nemo 1.1.2 to me and today I had time to investigate!
This is definitely an issue if Nemo and Nautilus are installed on an Ubuntu 12.04 system.

Here are the packages I have installed:
$ dpkg -l | egrep "muffin|cinnamon|nemo|nautilus"
ii cinnamon 1.6.7-0ubuntu1precise1 Cinnamon desktop
ii gir1.2-muffin-3.0 1.1.2-0ubuntu1
precise1 GObject introspection data for Muffin
ii libmuffin0 1.1.2-0ubuntu1precise1 window manager library from the Muffin window manager
ii libnautilus-extension1a 1:3.4.2-0ubuntu5 libraries for nautilus components - runtime version
ii libnemo-extension1 1.1.2-0ubuntu1
precise1 libraries for nemo components - runtime version
ii muffin 1.1.2-0ubuntu1precise1 lightweight GTK+ window manager
ii muffin-common 1.1.2-0ubuntu1
precise1 shared files for the Muffin window manager
ii nautilus 1:3.4.2-0ubuntu5 file manager and graphical shell for GNOME
ii nautilus-data 1:3.4.2-0ubuntu5 data files for nautilus
ii nautilus-dropbox 1.4.0 transitional dummy package for dropbox
ii nautilus-sendto 3.0.1-2ubuntu2 integrates Evolution and Pidgin into the Nautilus file manager
ii nautilus-share 0.7.3-1ubuntu2 Nautilus extension to share folder using Samba
ii nemo 1.1.2-0ubuntu1precise1 file manager and graphical shell for GNOME
ii nemo-data 1.1.2-0ubuntu1
precise1 data files for nemo
ii nemo-fileroller 1.0.0-20121021150425-precise File Roller integration for Nemo

To troubleshoot this issue I've wrote a Bash wrapper script that I've placed instead of /usr/bin/nemo and /usr/bin/nautilus. The wrapper script looks like this: http://dl.dropbox.com/u/1080918/wrapper.sh

I've then placed the wrapper script instead of Nemo and Nautilus with the following commands:
$ sudo dpkg-divert --local --rename --add /usr/bin/nemo
$ sudo cp wrapper.sh /usr/bin/nemo
$ sudo dpkg-divert --local --rename --add /usr/bin/nautilus
$ sudo cp wrapper.sh /usr/bin/nautilus

Then I've restarted several times my session and here are the resulting log files:
/tmp/wrapper-nemo.log: http://dl.dropbox.com/u/1080918/wrapper-nemo.log
/tmp/wrapper-nautilus.log: http://dl.dropbox.com/u/1080918/wrapper-nautilus.log

Conclusion:
"gnome-session --session cinnamon" is starting "nemo -n" and shortly afterwards "nautilus -n" at every session start!
The result is a game of luck. Sometimes Nemo wins, sometimes Nautilus and sometimes both fail.

I hope this helps to troubleshoot this issue.

Best,

Michael

PS: I hate that we are unable to attach files! Thank you GitHub for this stupid decision!

@michael-schaller
Copy link
Author

Some more insights...

Both Nemo and Nautilus are started because there are .desktop files for them in /etc/xdg/autostart/.
If you look at /etc/xdg/autostart/nautilus-autostart.desktop then Nautilus is only started for the desktops "GNOME" and "Unity". Unfortunately Cinnamon uses "DesktopName=GNOME" as you can see in /usr/share/gnome-session/sessions/cinnamon.session.

I think the session files for Cinnamon are wrong. For me the session files should look like:

/usr/share/gnome-session/sessions/cinnamon.session: (Please also note the changed fallback!)
[GNOME Session]
Name=Cinnamon
RequiredComponents=cinnamon;gnome-settings-daemon;
IsRunnableHelper=/usr/lib/gnome-session/gnome-session-check-accelerated
FallbackSession=cinnamon2d
DesktopName=Cinnamon

/usr/share/gnome-session/sessions/cinnamon2d.session:
[GNOME Session]
Name=Cinnamon 2D
RequiredComponents=cinnamon2d;gnome-settings-daemon;
DesktopName=Cinnamon

With this the Nemo autostart configuration would look like: (Please note that no changes to the Nautilus config would be needed)

/etc/xdg/autostart/nemo-autostart.desktop:
[Desktop Entry]
Type=Application
Name=Files
Comment=Start Nemo desktop at log in
Exec=nemo -n
OnlyShowIn=Cinnamon
NoDisplay=true

The nice thing about this solution would be that Nautilus would only start for Gnome3 (GNOME) and Unity. Nemo would only start for Cinnamon. Unfortunately there must be more than meets the eye because if I change the config files this way the window manager muffin doesn't start. :-/

@mtwebster
Copy link
Member

The reason we've avoided registering "Cinnamon" as a desktop name is that it opens up issues with many upstream apps that currently OnlyShowIn=Gnome or Gnome;Unity or just Unity. The relationship Mint has with Gnome and Ubuntu isn't genial enough that we could get them to add Cinnamon to their desktop files, so we would have to distribute and maintain separate duplicate .desktop files just for Cinnamon for these upstream packages.

You're right, it would solve the Nemo problem perfectly, but break a lot of other things, unfortunately.

The pull request I have pending (#91) would allow you to guarantee that Nemo starts and Nautilus doesn't (preventing any sort of race condition that currently occurs) but if you wanted to switch back to Gnome or Unity for whatever reason, you'd have to re-enable that in Nemo preferences.

@michael-schaller
Copy link
Author

I already feared that this would be the reason behind it. Should't this topic be on the agenda for the next big Cinnamon version?

Your pull request looks good to me except two nitpicks.

I would favor for one option "Allow Nemo to manage your desktop" that silently triggers "Prevent Nautilus from attempting to manage the desktop" too.
If you want to have both options then I think they need better explanation as some people will ask themselves "What is the point in enabling Nemo to manage the desktop and not preventing Nautilus to attempt to manage the desktop? Why would someone even give me this combination as an option?".

I also don't see anything that would automatically reenable Nautilus if someone would remove the Nemo package. This could be rather unpleasant for someone who just wanted to give Cinnamon a try and removed it afterwards.

@mtwebster
Copy link
Member

With the implementation of cinnamon-session, nautilus is now prevented from running in a Cinnamon session.

@ghost
Copy link

ghost commented Jan 28, 2018

I rebooted - without, I think, having made any significant changes, though my network was having difficulty - and the system froze after showing my wallpaper: no dock, no desktop icons, nothing happening (though the hard drive light flashed intermittently) and very little doable. After another reboot, the same happened. I used grub to enter recovery mode, but that told me little (and indeed the recovery mode text was messed up). Reboot once more and used Grub to boot a different kernel. This time I got to a situation where I could do things but the desktop but nemo - desktop and non-desktop - would not load, giving this errror:

Could not register the application: Timeout was reached

I could do precious little with files - I could e.g. load them from Sublime but not save them - until I used PcManFM (which allowed file browsing but also saving from Sublime, if I loaded the edited file via PcMan).
Cf. perhaps these reports:

  1. https://askubuntu.com/questions/59348/nautilus-is-frozen-cannot-be-used-and-cannot-be-killed
  2. https://askubuntu.com/questions/618171/nautilus-occasionally-stops-working
  3. https://bbs.archlinux.org/viewtopic.php?id=226630

Report 3 mentions that old culprit - network drives. I have such drives and, on my desktop, a shortcut to a file on one of them. I removed the drives from fstab and this time everything worked - including network drives - and even with the kernel I was using before all the trouble started.

I am sorry that I cannot offer more insight into this - temporary, but severe - situation.

Mint 18.3 x64.
Kernel: 4.14.15 (originally), 4.14.14 (to get the system to boot - see above), 4.14.15 (once booting was working on 14.14).
Nemo 3.6.5, but with the patch from this ticket.

If I should open a new bug report, then I will.

@BullShark
Copy link

Do you want all of strace or just the errors?

write(2, "Could not register nemo as a rem"..., 57Could not register nemo as a remote: Timeout was reached
) = 57
recvmsg(4, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(4, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(4, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)

@BullShark
Copy link

Running nemo-desktop followed by trying to open a folder on the gui causes this error.

$ nemo-desktop
** Message: 12:30:55.930: nemo-desktop: session is cinnamon, establishing proxy
Nemo-Share-Message: 12:30:56.099: Called "net usershare info" but it failed: 'net usershare' returned error 255: mkdir failed on directory /var/run/samba/msg.lock: Permission denied
net usershare: cannot open usershare directory /var/lib/samba/usershares. Error No such file or directory
Please ask your system administrator to enable user sharing.

Traceback (most recent call last):
File "/usr/share/nemo-python/extensions/nemo-folder-color-switcher.py", line 547, in get_file_items
supported_colors = self.theme.get_supported_colors(directories)
File "/usr/share/nemo-python/extensions/nemo-folder-color-switcher.py", line 394, in get_supported_colors
icon_path = self.find_folder_icon(color, directory)
File "/usr/share/nemo-python/extensions/nemo-folder-color-switcher.py", line 373, in find_folder_icon
relevant_ancestor = self.get_ancestor_defining_folder_svg(directory)
File "/usr/share/nemo-python/extensions/nemo-folder-color-switcher.py", line 352, in get_ancestor_defining_folder_svg
if self.has_icon_for_folder(directory):
File "/usr/share/nemo-python/extensions/nemo-folder-color-switcher.py", line 328, in has_icon_for_folder
return self.get_folder_icon_path(directory) is not None
File "/usr/share/nemo-python/extensions/nemo-folder-color-switcher.py", line 314, in get_folder_icon_path
desired_size = self.get_current_view_icon_size()
File "/usr/share/nemo-python/extensions/nemo-folder-color-switcher.py", line 247, in get_current_view_icon_size
info = current_dir.query_info('metadata::*', 0, None)
GLib.Error: g-io-error-quark: The specified location is not supported (15)
Could not register nemo as a remote: Timeout was reached

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants