[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nix-dev
Subject:    Re: [Nix-dev] Problem setting a systemd service using dbus
From:       Tony <white.tw.tw () gmail ! com>
Date:       2016-01-30 19:01:16
Message-ID: fen5g78v2m0rmn5rbiolsrdm.1454180476365 () email ! android ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]

[Attachment #4 (text/plain)]

Hi!
Try looking at :
nixos/modules/services/hardware/bluetooth.nix in the nixpkgs repo on github.
You need the type dbus and the org.something bus name in your code.

Hope that helps.

Kind regards,
Tony

---- Eric Sagnes wrote ----

> Hi,
> 
> I am having trouble setting a systemd service for a program that requires dbus.
> At first it complained that it couldn't find `dbus-launch`, but adding \
> `pkgs.dbus_daemon` to the service `path` fixed that. But now it is complaining that \
> DBUS_SESSION_BUS_ADDRESS is not set and that X11 is not initialized (the last \
> line). 
> ```
> 1月 30 16:34:54 alpha fcitx[14131]: (WARN-14131 \
> /tmp/nix-build-fcitx-4.2.9.drv-0/fcitx-4.2.9/src/module/dbus/dbusstuff.c:188) \
> Without DISPLAY or DBUS_SESSION_BUS_ADDRESS session bus will not work 1月 30 \
> 16:34:54 alpha fcitx[14131]: (ERROR-14131 \
> /tmp/nix-build-fcitx-4.2.9.drv-0/fcitx-4.2.9/src/module/notificationitem/notificationitem.c:187) \
> DBus Not initialized 1月 30 16:44:15 alpha fcitx[14131]: (ERROR-14131 \
> /tmp/nix-build-fcitx-4.2.9.drv-0/fcitx-4.2.9/src/ui/kimpanel/kimpanel.c:317) DBus \
> Not initialized 1月 30 16:44:15 alpha fcitx[14131]: (ERROR-14131 \
> /tmp/nix-build-fcitx-4.2.9.drv-0/fcitx-4.2.9/src/lib/fcitx/ui.c:165) no usable user \
> interface. 1月 30 16:44:15 alpha fcitx[14131]: (FATAL-14131 \
> /tmp/nix-build-fcitx-4.2.9.drv-0/fcitx-4.2.9/src/frontend/xim/xim.c:134) \
> X11が初期化されていません ```
> 
> Here the unit relevant settings:
> 
> ```
> path        = [ pkgs.dbus_daemon ];
> after       = [ "display-manager.service" ];
> wantedBy    = [ "graphical.target" ];
> ```
> 
> The unit is loaded and active but the program is not appearing in the systray as it \
> should, probably because it cannot find X11 and dbus. 
> Does someone knows how to address this problem?
> 
> -- 
> Eric Sagnes
> サニエ エリック
> _______________________________________________
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Attachment #5 (text/html)]

<p dir="ltr">Hi!<br>
Try looking at :<br>
nixos/modules/services/hardware/<a href="http://bluetooth.nix">bluetooth.nix</a> in \
the nixpkgs repo on github.<br> You need the type dbus and the <a \
href="http://org.something">org.something</a> bus name in your code.</p> <p \
dir="ltr">Hope that helps.</p> <p dir="ltr">Kind regards,<br>
Tony</p>
<br><br>---- Eric Sagnes wrote ----<br><br>Hi,<br><br>I am having trouble setting a \
systemd service for a program that requires dbus.<br>At first it complained that it \
couldn't find `dbus-launch`, but adding `pkgs.dbus_daemon` to the service `path` \
fixed that.<br>But now it is complaining that DBUS_SESSION_BUS_ADDRESS is not set and \
that X11 is not initialized (the last line).<br><br>```<br>1月 30 16:34:54 alpha \
fcitx[14131]: (WARN-14131 /tmp/<a \
href="http://nix-build-fcitx-4.2.9.drv">nix-build-fcitx-4.2.9.drv</a>-0/fcitx-4.2.9/src/module/dbus/dbusstuff.c:188) \
Without DISPLAY or DBUS_SESSION_BUS_ADDRESS session bus will not work<br>1月 30 \
16:34:54 alpha fcitx[14131]: (ERROR-14131 /tmp/<a \
href="http://nix-build-fcitx-4.2.9.drv">nix-build-fcitx-4.2.9.drv</a>-0/fcitx-4.2.9/src/module/notificationitem/notificationitem.c:187) \
DBus Not initialized<br>1月 30 16:44:15 alpha fcitx[14131]: (ERROR-14131 /tmp/<a \
href="http://nix-build-fcitx-4.2.9.drv">nix-build-fcitx-4.2.9.drv</a>-0/fcitx-4.2.9/src/ui/kimpanel/kimpanel.c:317) \
DBus Not initialized<br>1月 30 16:44:15 alpha fcitx[14131]: (ERROR-14131 /tmp/<a \
href="http://nix-build-fcitx-4.2.9.drv">nix-build-fcitx-4.2.9.drv</a>-0/fcitx-4.2.9/src/lib/fcitx/ui.c:165) \
no usable user interface.<br>1月 30 16:44:15 alpha fcitx[14131]: (FATAL-14131 \
/tmp/<a href="http://nix-build-fcitx-4.2.9.drv">nix-build-fcitx-4.2.9.drv</a>-0/fcitx-4.2.9/src/frontend/xim/xim.c:134) \
X11が初期化されていません<br>```<br><br>Here the unit relevant \
settings:<br><br>```<br>&nbsp; path&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = [ \
pkgs.dbus_daemon ];<br>&nbsp; after&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = [ "<a \
href="http://display-manager.service">display-manager.service</a>" ];<br>&nbsp; \
wantedBy&nbsp;&nbsp;&nbsp; = [ "<a \
href="http://graphical.target">graphical.target</a>" ];<br>```<br><br>The unit is \
loaded and active but the program is not appearing in the systray as it should, \
probably because it cannot find X11 and dbus.<br><br>Does someone knows how to \
address this problem?<br><br>-- <br>Eric Sagnes<br>サニエ \
エリック<br>_______________________________________________<br>nix-dev mailing \
list<br><a href="mailto:nix-dev@lists.science.uu.nl">nix-dev@lists.science.uu.nl</a><br><a \
href="http://lists.science.uu.nl/mailman/listinfo/nix-dev">http://lists.science.uu.nl/mailman/listinfo/nix-dev</a><br>




_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic