After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 694053 - dbus bus name conflict between seahorse and seahorse-daemon
dbus bus name conflict between seahorse and seahorse-daemon
Status: RESOLVED FIXED
Product: seahorse
Classification: Applications
Component: Daemon
git master
Other Linux
: Normal major
: ---
Assigned To: Seahorse Maintainer
Seahorse Maintainer
Depends on:
Blocks:
 
 
Reported: 2013-02-17 23:58 UTC by Nuno Araujo (IRC: russo79)
Modified: 2013-02-19 05:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Change the dbus name that the seahorse application claims (1.00 KB, patch)
2013-02-18 14:30 UTC, Stef Walter
committed Details | Review

Description Nuno Araujo (IRC: russo79) 2013-02-17 23:58:30 UTC
Since the migration of seahorse to a GtkApplication, seahorse registers itself in the session bus as "org.gnome.seahorse" (mainly for application uniqueness).
seahorse-daemon, provided by libcryptui also registers itself on the session bus as "org.gnome.seahorse".

When seahorse-daemon is running, it is then impossible to start seahorse. The following error message appears:

(seahorse:11668): GLib-GIO-CRITICAL **: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Method "DescribeAll" with signature "" on interface "org.gtk.Actions" doesn't exist

In the case the seahorse is running and then the user makes an action triggering the usage of seahorse-daemon, the latest can't register itself as "org.gnome.seahorse" and the client application trying to make usage of its services behaves strangely.
e.g. trying to use seahorse-nautilus to encrypt a file displays a message box with the following content:

No encryption keys were found with which to perform the operation you requested.  The program Passwords and Encryption Keys will now be started so that you may either create a key or import one.

I would gladly submit a patch for this problem, but cannot really find a solution without breaking API/ABI. 
There's no room in this dbus for two "org.gnome.seahorse" :)

I first came on this problem on a gnome-3.6 install, but it also takes place on HEAD.
Comment 1 Stef Walter 2013-02-18 14:30:35 UTC
Created attachment 236597 [details] [review]
Change the dbus name that the seahorse application claims

This is so it doesn't conflict with the seahorse-daemon dbus name
owned by libcryptui

Nuno, does this fix the issue? Could you test?
Comment 2 Nuno Araujo (IRC: russo79) 2013-02-18 15:30:32 UTC
Currently it doesn't work:

(seahorse:9533): GLib-GIO-WARNING **: Your application claims to support custom command line handling but does not implement g_application_command_line() and has no handlers connected to the 'command-line' signal.

I don't think that we need to set G_APPLICATION_HANDLES_COMMAND_LINE flag, at least for now.

Currently, command line handling is made by seahorse_application_local_command_line.
The only option is "--version" and the instance is exited after hanlding it.

If you really want to do so, I can modify your patch to replace the local command line handling by a handler for the 'command-line' signal, but I don't really see the benefit.
Comment 3 Stef Walter 2013-02-18 19:28:06 UTC
The latter issue is bug #686980. It would indeed be appreciated if you had a patch for that bug too. Someone was working on it, but must have stalled.
Comment 4 Nuno Araujo (IRC: russo79) 2013-02-18 19:53:31 UTC
Since these are two unrelated problems, I suggest that you make a commit where you simply change the bus name and fix this bug.

I'll take a look at #686980.
Comment 5 Nuno Araujo (IRC: russo79) 2013-02-18 23:01:55 UTC
I attached a fix to bug #686980 and there is no need to set G_APPLICATION_HANDLES_COMMAND_LINE, so my previous comment is still valid.
Comment 6 Stef Walter 2013-02-19 05:52:36 UTC
Comment on attachment 236597 [details] [review]
Change the dbus name that the seahorse application claims

Pushed, without setting the flags.
Comment 7 Stef Walter 2013-02-19 05:56:38 UTC
Pushed to gnome-3-6 branch as well.