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

Blueman-manager can't be called from context menu of blueman-applet #1541

Closed
torwag opened this issue May 27, 2021 · 13 comments
Closed

Blueman-manager can't be called from context menu of blueman-applet #1541

torwag opened this issue May 27, 2021 · 13 comments
Labels

Comments

@torwag
Copy link

torwag commented May 27, 2021

blueman: 2.1.r442.gb1fb0459-1 (AUR Arch)
BlueZ: 5.58
Distribution: Arch Linux
Desktop environment: Sway

What I expect:
Using the context menu from blueman-applet to start blueman-manager
What I get:
Trying to start the blueman-manager from the context menu of the blueman-applet, I receive an error message from blueman-applet (tested by manually starting blueman-applet on a console). No window is created, the error is silent, if not catched in the logs manually.
What else was tested:
I can call blueman-manager (taken that blueman-applet is running) from the console without any issue.
Downgraded to 2.1.4 (community Arch package) I can call blueman-manager from within blueman-applet but context menus of blueman-manager does not work (maybe a wayland / sway problem)

Error-message:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/blueman/main/DBusProxies.py", line 52, in call_finish
    proxy.call_finish(resp)
gi.repository.GLib.Error: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying (4)

to give a bit more context to it, here are the debug logs of the start-up of blueman-applet:
https://pastebin.com/ThEYhhS7

@cschramm
Copy link
Member

I'm not sure if I got the problem right. You get that exception in blueman-applet, right? I don't see it in the blueman-applet log output you provided, though. 🤔

As a quick first check, please try if

python3 -c 'from blueman.main.DBusProxies import ManagerService; ManagerService().startstop()'

shows the same (exception + no window showing).

@torwag
Copy link
Author

torwag commented May 31, 2021

Hi,
Yes that exception appears in the log, if I start blueman-applet manually from a command line (without debug option). To be more precious after opening the context menu with a right mouse click and select "Devices...". Other context menus seem to work. Executing your code, nothing happens, and no error log appears (in the same applet log, where I can reproduce the error message from within the context-menu).

@cschramm
Copy link
Member

cschramm commented Jun 4, 2021

that exception appears in the log

Why isn't it in the pastebin content?

I'm rather clueless. Please get d-feet running and click on the org.blueman.Manager session bus service. What happens? If you're able to get there, navigate to /org/blueman/Manager, interface org.freedesktop.Application, method ActivateAction and try to execute it with input "Activate", [], {}.

@torwag
Copy link
Author

torwag commented Jun 7, 2021

It might not be in the pastebin content, as I simply might have paste just the start but not the error, as additional information in case something went already wrong during startup.
If I start d-feet and click on the org.blueman.Manager session bus service, I get the same error as in my initial post
g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying (4)

@cschramm
Copy link
Member

cschramm commented Jun 8, 2021

Anything showing up in journalctl when you try that?

@torwag
Copy link
Author

torwag commented Jun 8, 2021

Yes, if I use the applet and click on 'Devices...' journalctl shows:
EDIT: Sorry I did not see journalctl truncated my first log

Jun 08 22:15:41 thinklab5 dbus-daemon[3842]: [session uid=1000 pid=3830] Activating service name='org.blueman.Manager' requested by ':1.4' (uid=1000 pid=4367 comm="/usr/bin/python /usr/bin/blueman-applet ")
Jun 08 22:15:41 thinklab5 org.blueman.Manager[116390]: Unable to init server: Could not connect: Connection refused
Jun 08 22:15:41 thinklab5 org.blueman.Manager[116390]: Unable to init server: Could not connect: Connection refused
Jun 08 22:15:41 thinklab5 dbus-daemon[3842]: [session uid=1000 pid=3830] Successfully activated service 'org.blueman.Manager'
Jun 08 22:15:41 thinklab5 org.blueman.Manager[116390]: Unable to init server: Could not connect: Connection refused
Jun 08 22:15:41 thinklab5 blueman-manager[116390]: cannot open display: 

Maybe it is repetitive as I clicked several times.

@cschramm
Copy link
Member

cschramm commented Jun 8, 2021

Looks like the DISPLAY variable is missing in your systemd environment. See #1086.

@torwag
Copy link
Author

torwag commented Jul 5, 2021

Hi, so indeed I had sway slightly misconfigured and did not expose DISPLAY correctly to the system. After fixing this, it starts as intended. This issue can be closed and this post shall remain for all eternity to remind me on my stupidity.
If you face the same issue, please check that echo $DISPLAY points to the correct value resp. any value at all.

@torwag torwag closed this as completed Jul 5, 2021
@goodvin
Copy link

goodvin commented Jul 20, 2021

I have the same issue, but the DISPLAY is correct.

@goodvin
Copy link

goodvin commented Jul 20, 2021

I get the same exception when I click "/org/blueman/Manager" in d-feet.

@cschramm
Copy link
Member

@goodvin: If blueman-manager gives you cannot open display: , no DISPLAY variable is provided to it or it's empty.

@goodvin
Copy link

goodvin commented Jul 20, 2021

blueman-manager doesn't give me "cannot open display:" & I can run it without any issues using a console.

I get an exception during activation of the dbus service via tray menu:
gi.repository.GLib.Error: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying (4)

@goodvin
Copy link

goodvin commented Jul 20, 2021

Looks like everything works fine if I run dbus-update-activation-environment DISPLAY upfront.
Thanks for pointing me out to the env variables.

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

No branches or pull requests

3 participants