unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#48538: D-Bus services not working on foreign distributions/non-user profiles
@ 2021-05-20 15:20 Maxim Cournoyer
  2021-05-20 17:18 ` bug#48538: D-Bus services do not work " Maxim Cournoyer
  2021-08-17  2:57 ` bug#48538: D-Bus services not working " John Kehayias via Bug reports for GNU Guix
  0 siblings, 2 replies; 12+ messages in thread
From: Maxim Cournoyer @ 2021-05-20 15:20 UTC (permalink / raw)
  To: 48538

Hello,

On Guix System, the D-bus session service honors D-Bus service
definitions found under ~/.guix-profile/share.  That is not the case on
foreign distributions, breaking applications such as Jami (where the
daemon is normally auto-launched via D-Bus at the time the client
attempts to use it).

The same problem occurs on Guix System when attempting to use D-Bus
services from a non-user profile (such as with 'guix environment
--ad-hoc').

We should try to find a way to make this work; either automatically
(seems a tough nut to crack) or through manual, documented steps.

Thanks,

Maxim




^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#48538: D-Bus services do not work on foreign distributions/non-user profiles
  2021-05-20 15:20 bug#48538: D-Bus services not working on foreign distributions/non-user profiles Maxim Cournoyer
@ 2021-05-20 17:18 ` Maxim Cournoyer
  2021-05-27 18:54   ` zimoun
  2021-08-17  2:57 ` bug#48538: D-Bus services not working " John Kehayias via Bug reports for GNU Guix
  1 sibling, 1 reply; 12+ messages in thread
From: Maxim Cournoyer @ 2021-05-20 17:18 UTC (permalink / raw)
  To: 48538

This can be verified on a system where the jami-daemon (libring) has not
yet been installed (commonly via propagation from one of the jami
clients):

$ guix environment --ad-hoc jami-gnome -- jami-gnome

Attempt to run it:

$ jami-gnome

It should fail with the following message: "Could not rec-connect to the
Jami daemon (dring). Jami will now quit."


as the currently running dbus session doesn't know about
the newly installed D-Bus service, as it only look under a few
hard-coded places.

For this particular instance, a workaround is to run jami via the
dbus-run-session utility, which launches the client in an ad-hoc d-bus
session which knows about the dring D-Bus service (through the
XDG_DATA_DIRS variable set by glib's search path).

$ guix environment --pure --ad-hoc jami-gnome dbus glib \
     -- dbus-run-session jami-gnome

The glib package is added for its XDG_DATA_DIRS search path.  It works
because the client doesn't really care about being able to talk to
anything else but its daemon over D-Bus.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#48538: D-Bus services do not work on foreign distributions/non-user profiles
  2021-05-20 17:18 ` bug#48538: D-Bus services do not work " Maxim Cournoyer
@ 2021-05-27 18:54   ` zimoun
  2021-05-27 19:20     ` Leo Famulari
  0 siblings, 1 reply; 12+ messages in thread
From: zimoun @ 2021-05-27 18:54 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 48538

Hi Maxim,


On Thu, 20 May 2021 at 13:18, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:

> For this particular instance, a workaround is to run jami via the
> dbus-run-session utility, which launches the client in an ad-hoc d-bus
> session which knows about the dring D-Bus service (through the
> XDG_DATA_DIRS variable set by glib's search path).
>
> $ guix environment --pure --ad-hoc jami-gnome dbus glib \
>      -- dbus-run-session jami-gnome
>
> The glib package is added for its XDG_DATA_DIRS search path.  It works
> because the client doesn't really care about being able to talk to
> anything else but its daemon over D-Bus.

On Debian, using 014421e, I get:

--8<---------------cut here---------------start------------->8---
$ guix environment --pure --ad-hoc jami-gnome dbus glib \
       -- dbus-run-session jami-gnome
** Message: 20:50:31.130: Jami GNOME client version: development
** Message: 20:50:31.130: git ref: unknown
dbus-daemon[24024]: [session uid=1001 pid=24024] Activating service name='cx.ring.Ring' requested by ':1.1' (uid=1001 pid=24025 comm="jami-gnome ")
Jami Daemon 9.10.0, by Savoir-faire Linux 2004-2019
https://jami.net/
[Video support enabled]
[Plugins support enabled]

dbus-daemon[24024]: [session uid=1001 pid=24024] Successfully activated service 'cx.ring.Ring'
20:50:31.556         os_core_unix.c !pjlib 2.10 for POSIX initialized
ALSA lib conf.c:3725:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/gnu/store/z1iyvbvnkd7zkjxsx157n6qx2iwzxq7p-alsa-lib-1.2.4/lib/alsa-lib/libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory)
ALSA lib control.c:1471:(snd_ctl_open_noupdate) Invalid CTL hw:0
No accounts to migrate

(jami-gnome:24025): libnotify-WARNING **: 20:50:31.600: Failed to connect to proxy
QDBusMarshaller: type `VectorString' attempts to redefine basic D-BUS type 'as' (QStringList) (Did you forget to call beginStructure() ?)
QDBusMarshaller: type `MapStringVectorString' produces invalid D-BUS signature `a{s}' (Did you forget to call beginStructure() ?)
QDBusMarshaller: type `QMap<QString,MapStringVectorString>' produces invalid D-BUS signature `a{s}' (Did you forget to call beginStructure() ?)

(jami-gnome:24025): GLib-GIO-ERROR **: 20:50:31.711: Settings schema 'org.gtk.Settings.FileChooser' is not installed
--8<---------------cut here---------------end--------------->8---

Well, it means I have some misconfigured about ALSA, right?


Cheers,
simon




^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#48538: D-Bus services do not work on foreign distributions/non-user profiles
  2021-05-27 18:54   ` zimoun
@ 2021-05-27 19:20     ` Leo Famulari
  2021-05-27 19:59       ` zimoun
  0 siblings, 1 reply; 12+ messages in thread
From: Leo Famulari @ 2021-05-27 19:20 UTC (permalink / raw)
  To: zimoun; +Cc: Maxim Cournoyer, 48538

On Thu, May 27, 2021 at 08:54:49PM +0200, zimoun wrote:
> ALSA lib conf.c:3725:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/gnu/store/z1iyvbvnkd7zkjxsx157n6qx2iwzxq7p-alsa-lib-1.2.4/lib/alsa-lib/libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory)
[...]
>
> Well, it means I have some misconfigured about ALSA, right?

Did you install alsa-plugins and alsa-plugins:pulseaudio ?

If you do that, then it should "just work" on other distros.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#48538: D-Bus services do not work on foreign distributions/non-user profiles
  2021-05-27 19:20     ` Leo Famulari
@ 2021-05-27 19:59       ` zimoun
  2021-05-27 20:14         ` Leo Famulari
  2021-05-27 23:17         ` Leo Prikler
  0 siblings, 2 replies; 12+ messages in thread
From: zimoun @ 2021-05-27 19:59 UTC (permalink / raw)
  To: Leo Famulari; +Cc: Maxim Cournoyer, 48538

Hi Leo,

On Thu, 27 May 2021 at 15:20, Leo Famulari <leo@famulari.name> wrote:
> On Thu, May 27, 2021 at 08:54:49PM +0200, zimoun wrote:
>> ALSA lib conf.c:3725:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/gnu/store/z1iyvbvnkd7zkjxsx157n6qx2iwzxq7p-alsa-lib-1.2.4/lib/alsa-lib/libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory)
> [...]
>>
>> Well, it means I have some misconfigured about ALSA, right?
>
> Did you install alsa-plugins and alsa-plugins:pulseaudio ?

Do you mean

 guix environment --pure --ad-hoc jami-gnome dbus glib \
                  alsa-plugins alsa-plugins:pulseaudio \
      -- dbus-run-session jami-gnome

?  If yes, there is still errors:

--8<---------------cut here---------------start------------->8---
** Message: 21:45:49.955: Jami GNOME client version: development
** Message: 21:45:49.956: git ref: unknown
dbus-daemon[12101]: [session uid=1001 pid=12101] Activating service name='cx.ring.Ring' requested by ':1.1' (uid=1001 pid=12102 comm="jami-gnome ")
Jami Daemon 9.10.0, by Savoir-faire Linux 2004-2019
https://jami.net/
[Video support enabled]
[Plugins support enabled]

dbus-daemon[12101]: [session uid=1001 pid=12101] Successfully activated service 'cx.ring.Ring'
21:45:50.388         os_core_unix.c !pjlib 2.10 for POSIX initialized
No accounts to migrate

(jami-gnome:12102): libnotify-WARNING **: 21:45:50.693: Failed to connect to proxy
QDBusMarshaller: type `VectorString' attempts to redefine basic D-BUS type 'as' (QStringList) (Did you forget to call beginStructure() ?)
QDBusMarshaller: type `MapStringVectorString' produces invalid D-BUS signature `a{s}' (Did you forget to call beginStructure() ?)
QDBusMarshaller: type `QMap<QString,MapStringVectorString>' produces invalid D-BUS signature `a{s}' (Did you forget to call beginStructure() ?)

(jami-gnome:12102): GLib-GIO-ERROR **: 21:45:50.807: Settings schema 'org.gtk.Settings.FileChooser' is not installed
--8<---------------cut here---------------end--------------->8---

the ’--pure’ is not the issue.  It is probably different but it rings a
bell with bug#47106.

<http://issues.guix.gnu.org/issue/47106>


Cheers,
simon




^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#48538: D-Bus services do not work on foreign distributions/non-user profiles
  2021-05-27 19:59       ` zimoun
@ 2021-05-27 20:14         ` Leo Famulari
  2021-05-27 23:17         ` Leo Prikler
  1 sibling, 0 replies; 12+ messages in thread
From: Leo Famulari @ 2021-05-27 20:14 UTC (permalink / raw)
  To: zimoun; +Cc: Maxim Cournoyer, 48538

On Thu, May 27, 2021 at 09:59:19PM +0200, zimoun wrote:
> Do you mean
> 
>  guix environment --pure --ad-hoc jami-gnome dbus glib \
>                   alsa-plugins alsa-plugins:pulseaudio \
>       -- dbus-run-session jami-gnome

Yes

> 
> ?  If yes, there is still errors:

Okay, but not from ALSA :) So, at least you have eliminated ALSA
problems from your test.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#48538: D-Bus services do not work on foreign distributions/non-user profiles
  2021-05-27 19:59       ` zimoun
  2021-05-27 20:14         ` Leo Famulari
@ 2021-05-27 23:17         ` Leo Prikler
  2021-05-28  2:17           ` Maxim Cournoyer
  2021-05-28  5:10           ` Maxim Cournoyer
  1 sibling, 2 replies; 12+ messages in thread
From: Leo Prikler @ 2021-05-27 23:17 UTC (permalink / raw)
  To: zimoun, Leo Famulari; +Cc: Maxim Cournoyer, 48538

Am Donnerstag, den 27.05.2021, 21:59 +0200 schrieb zimoun:
> Hi Leo,
> 
> On Thu, 27 May 2021 at 15:20, Leo Famulari <leo@famulari.name> wrote:
> > On Thu, May 27, 2021 at 08:54:49PM +0200, zimoun wrote:
> > > ALSA lib conf.c:3725:(snd_config_hooks_call) Cannot open shared
> > > library libasound_module_conf_pulse.so
> > > (/gnu/store/z1iyvbvnkd7zkjxsx157n6qx2iwzxq7p-alsa-lib-
> > > 1.2.4/lib/alsa-lib/libasound_module_conf_pulse.so: cannot open
> > > shared object file: No such file or directory)
> > [...]
> > > Well, it means I have some misconfigured about ALSA, right?
> > 
> > Did you install alsa-plugins and alsa-plugins:pulseaudio ?
> 
> Do you mean
> 
>  guix environment --pure --ad-hoc jami-gnome dbus glib \
>                   alsa-plugins alsa-plugins:pulseaudio \
>       -- dbus-run-session jami-gnome
> 
> ?  If yes, there is still errors:
> 
> --8<---------------cut here---------------start------------->8---
> ** Message: 21:45:49.955: Jami GNOME client version: development
> ** Message: 21:45:49.956: git ref: unknown
> dbus-daemon[12101]: [session uid=1001 pid=12101] Activating service
> name='cx.ring.Ring' requested by ':1.1' (uid=1001 pid=12102
> comm="jami-gnome ")
> Jami Daemon 9.10.0, by Savoir-faire Linux 2004-2019
> https://jami.net/
> [Video support enabled]
> [Plugins support enabled]
> 
> dbus-daemon[12101]: [session uid=1001 pid=12101] Successfully
> activated service 'cx.ring.Ring'
> 21:45:50.388         os_core_unix.c !pjlib 2.10 for POSIX initialized
> No accounts to migrate
> 
> (jami-gnome:12102): libnotify-WARNING **: 21:45:50.693: Failed to
> connect to proxy
> QDBusMarshaller: type `VectorString' attempts to redefine basic D-BUS 
> type 'as' (QStringList) (Did you forget to call beginStructure() ?)
> QDBusMarshaller: type `MapStringVectorString' produces invalid D-BUS
> signature `a{s}' (Did you forget to call beginStructure() ?)
> QDBusMarshaller: type `QMap<QString,MapStringVectorString>' produces
> invalid D-BUS signature `a{s}' (Did you forget to call
> beginStructure() ?)
> 
> (jami-gnome:12102): GLib-GIO-ERROR **: 21:45:50.807: Settings schema
> 'org.gtk.Settings.FileChooser' is not installed
> --8<---------------cut here---------------end--------------->8---
> 
> the ’--pure’ is not the issue.  It is probably different but it rings
> a
> bell with bug#47106.
> 
> <http://issues.guix.gnu.org/issue/47106>
It is different.  The cause of your issue is probably, that you're
lacking gsettings-desktop-schemas or something similar to it inside
your environment.  Perhaps we could try forming a "gnome-base"
metapackage, that propagates all of dbus, glib, gsettings-schemas etc.
for such purposes (maybe on wip-gnome first)?

Regards,
Leo

PS: Command just ran through

--8<---------------cut here---------------start------------->8---
** Message: 00:57:50.154: Jami GNOME client version: development
** Message: 00:57:50.154: git ref: unknown
No protocol specified

** (jami-gnome:27881): ERROR **: 00:57:50.217: Could not init clutter :
0
--8<---------------cut here---------------end--------------->8---

I'm sure you know about -E XAUTHORITY by now, but imo we should have a
switch similar to --networking for container operations.  

PPS: Just adding gsettings-desktop-schemas didn't work.  "jami-gnome
glib gnome" obviously works, but that's a little overkill (also it
appears that you'll have to get credentials into this thing, which I
haven't bothered worrying about).





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#48538: D-Bus services do not work on foreign distributions/non-user profiles
  2021-05-27 23:17         ` Leo Prikler
@ 2021-05-28  2:17           ` Maxim Cournoyer
  2021-05-28  6:35             ` Leo Prikler
  2021-05-28  5:10           ` Maxim Cournoyer
  1 sibling, 1 reply; 12+ messages in thread
From: Maxim Cournoyer @ 2021-05-28  2:17 UTC (permalink / raw)
  To: Leo Prikler; +Cc: zimoun, 48538

Hi!

Leo Prikler <leo.prikler@student.tugraz.at> writes:

> PPS: Just adding gsettings-desktop-schemas didn't work.  "jami-gnome
> glib gnome" obviously works, but that's a little overkill (also it
> appears that you'll have to get credentials into this thing, which I
> haven't bothered worrying about).

No credentials are needed; it asked to register your username by
default, but pressing the 'skip' button will, well, skip that step and
go straight to creating your account (which is just a private key on
your device, basically).

Maxim




^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#48538: D-Bus services do not work on foreign distributions/non-user profiles
  2021-05-27 23:17         ` Leo Prikler
  2021-05-28  2:17           ` Maxim Cournoyer
@ 2021-05-28  5:10           ` Maxim Cournoyer
  1 sibling, 0 replies; 12+ messages in thread
From: Maxim Cournoyer @ 2021-05-28  5:10 UTC (permalink / raw)
  To: Leo Prikler; +Cc: zimoun, 48538

Hi Leo & Simon,

Leo Prikler <leo.prikler@student.tugraz.at> writes:

> Am Donnerstag, den 27.05.2021, 21:59 +0200 schrieb zimoun:
>> Hi Leo,
>> 
>> On Thu, 27 May 2021 at 15:20, Leo Famulari <leo@famulari.name> wrote:
>> > On Thu, May 27, 2021 at 08:54:49PM +0200, zimoun wrote:
>> > > ALSA lib conf.c:3725:(snd_config_hooks_call) Cannot open shared
>> > > library libasound_module_conf_pulse.so
>> > > (/gnu/store/z1iyvbvnkd7zkjxsx157n6qx2iwzxq7p-alsa-lib-
>> > > 1.2.4/lib/alsa-lib/libasound_module_conf_pulse.so: cannot open
>> > > shared object file: No such file or directory)
>> > [...]
>> > > Well, it means I have some misconfigured about ALSA, right?
>> > 
>> > Did you install alsa-plugins and alsa-plugins:pulseaudio ?
>> 
>> Do you mean
>> 
>>  guix environment --pure --ad-hoc jami-gnome dbus glib \
>>                   alsa-plugins alsa-plugins:pulseaudio \
>>       -- dbus-run-session jami-gnome

We're drifting off topic for this issue (which is supposed to be about
D-Bus rather than Jami on foreign distributions :-)), but for the sake
of completion, the following works (tested on a Debian 10 i386 VM):

$ guix environment --ad-hoc jami-gnome dbus glib gtk+ openssl nss-certs \
  -- dbus-run-session jami-gnome

Apparently the FileChooser schema is provided by gtk+.  I also found out
that OpenSSL from Guix wants the SSL_* environment variable sets, so I
added the nss-certs and openssl packages to the mix (otherwise you
wouldn't have been able to search for contacts).

I think for gtk+/glib this can be improved by adding the
glib-or-gtk-build-system phases to the jami-gnome package definition.

HTH!

Maxim




^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#48538: D-Bus services do not work on foreign distributions/non-user profiles
  2021-05-28  2:17           ` Maxim Cournoyer
@ 2021-05-28  6:35             ` Leo Prikler
  0 siblings, 0 replies; 12+ messages in thread
From: Leo Prikler @ 2021-05-28  6:35 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: zimoun, 48538

Am Donnerstag, den 27.05.2021, 22:17 -0400 schrieb Maxim Cournoyer:
> Hi!
> 
> Leo Prikler <leo.prikler@student.tugraz.at> writes:
> 
> > PPS: Just adding gsettings-desktop-schemas didn't work.  "jami-
> > gnome
> > glib gnome" obviously works, but that's a little overkill (also it
> > appears that you'll have to get credentials into this thing, which
> > I
> > haven't bothered worrying about).
> 
> No credentials are needed; it asked to register your username by
> default, but pressing the 'skip' button will, well, skip that step
> and
> go straight to creating your account (which is just a private key on
> your device, basically).
That's probably a difference in what data already exists.  At the very
least, it tried accessing the SecretService on my machine, but I don't
know for which purpose and as you pointed out in your other mail, we
are drifting off-topic :)





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#48538: D-Bus services not working on foreign distributions/non-user profiles
  2021-05-20 15:20 bug#48538: D-Bus services not working on foreign distributions/non-user profiles Maxim Cournoyer
  2021-05-20 17:18 ` bug#48538: D-Bus services do not work " Maxim Cournoyer
@ 2021-08-17  2:57 ` John Kehayias via Bug reports for GNU Guix
  2021-08-17  4:32   ` John Kehayias via Bug reports for GNU Guix
  1 sibling, 1 reply; 12+ messages in thread
From: John Kehayias via Bug reports for GNU Guix @ 2021-08-17  2:57 UTC (permalink / raw)
  To: 48538@debbugs.gnu.org

Hi everyone,

I also ran into this issue, where I've put all my packages in various profiles, with the default one being empty (outside of short-lived packages for trying out). This is a setup is mentioned in the cookbook, on profiles and manifests.

Since the dbus files are not in the default profile, I was running into issues with dbus seeing them with the default system daemon (from %desktop-services). As suggested above, one workaround is to use dbus-run-session to launch a program (no problems).

I found a better one for me, which may be due to how I run my desktop session. I use the default gdm but just an .xsession file (which is just my .xinitrc, like a plain startx setup). If I modify my WM start in the final line from just `exec WM` to `dbus-launch --exit-with-session WM` that works for me. Seems to be an issue of how the dbus daemon is run. Could also be a side effect from not adding the xsession properly to gdm, but I haven't tried with .desktop files yet. (Another work around suggested on IRC was to start a user daemon from the login profile; this didn't work for me.) Also note that I did have glib in the profile, so that XDG_DATA_DIRS was properly in the profile, and all profiles loaded at login.

Hope this is helpful and that we can find a proper solution, as I think this is a tricky bug to encounter for a user.

John




^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#48538: D-Bus services not working on foreign distributions/non-user profiles
  2021-08-17  2:57 ` bug#48538: D-Bus services not working " John Kehayias via Bug reports for GNU Guix
@ 2021-08-17  4:32   ` John Kehayias via Bug reports for GNU Guix
  0 siblings, 0 replies; 12+ messages in thread
From: John Kehayias via Bug reports for GNU Guix @ 2021-08-17  4:32 UTC (permalink / raw)
  To: 48538@debbugs.gnu.org

It looks like dbus-daemon-wrapper tries to take care of this by finding the user's profile, but this would just be the default one: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/services/xorg.scm#n851

Not sure if it is easy for the service to find a non-standard profile, or if this should be exposed some other way.




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-08-17  4:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-20 15:20 bug#48538: D-Bus services not working on foreign distributions/non-user profiles Maxim Cournoyer
2021-05-20 17:18 ` bug#48538: D-Bus services do not work " Maxim Cournoyer
2021-05-27 18:54   ` zimoun
2021-05-27 19:20     ` Leo Famulari
2021-05-27 19:59       ` zimoun
2021-05-27 20:14         ` Leo Famulari
2021-05-27 23:17         ` Leo Prikler
2021-05-28  2:17           ` Maxim Cournoyer
2021-05-28  6:35             ` Leo Prikler
2021-05-28  5:10           ` Maxim Cournoyer
2021-08-17  2:57 ` bug#48538: D-Bus services not working " John Kehayias via Bug reports for GNU Guix
2021-08-17  4:32   ` John Kehayias via Bug reports for GNU Guix

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).