unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / 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
  0 siblings, 1 reply; 10+ 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] 10+ 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
  0 siblings, 1 reply; 10+ 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] 10+ 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; 10+ 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] 10+ 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; 10+ 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] 10+ 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; 10+ 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] 10+ 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; 10+ 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] 10+ 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; 10+ 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] 10+ 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; 10+ 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] 10+ 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; 10+ 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] 10+ 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; 10+ 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] 10+ messages in thread

end of thread, other threads:[~2021-05-28  6:36 UTC | newest]

Thread overview: 10+ 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

unofficial mirror of bug-guix@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-bugs/0 guix-bugs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-bugs guix-bugs/ https://yhetil.org/guix-bugs \
		bug-guix@gnu.org
	public-inbox-index guix-bugs

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.bugs
	nntp://news.gmane.io/gmane.comp.gnu.guix.bugs


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git