danstiner / rust-u2f

U2F security token emulator written in Rust
Apache License 2.0
291 stars 43 forks source link

Notification in ubuntu i3wm not showing buttons #80

Open luvarqpp opened 2 years ago

luvarqpp commented 2 years ago

Describe the bug When I issue test of webauthn, I see red notification, but there is no buttons. Nor click on notification does anything.

I see from logs that this problem lies in notifications. If I am right, i3wm is showing just notifications without possibility to ask questions (man notify-send link), I have found perhaps related issue referenced from source code #12 . #73 seems something that could be used to solve also notify-send problem. Adding it to map does not solve problem through (nor it is applied according logs). Perhaps server_info.version is not what I expect. See https://github.com/danstiner/rust-u2f/blob/dcd8d4d42f1167e0ea8df52cf0c534142c24e4f7/linux/user-daemon/src/user_presence.rs#L66

Logs If possible please attach output from the following commands (these logs will contain your user/ machine name but should not contain any secrets unless you built the program locally and enabled trace level logging).

journalctl -u softu2f.service
dec 11 07:36:08 luvar-ThinkPad-T480 system-daemon[262095]: Dec 11 07:36:08.890 DEBG Future::poll, result: Ok(NotReady), device_id: rQXMaFvpM8iw7PsyVEzVr
dec 11 07:36:08 luvar-ThinkPad-T480 system-daemon[262095]: Dec 11 07:36:08.990 DEBG Future::poll, result: Ok(NotReady), device_id: rQXMaFvpM8iw7PsyVEzVr

journalctl --user -u softu2f.service
dec 11 07:35:59 luvar-ThinkPad-T480 user-daemon[262084]: Dec 11 07:35:59.750 DEBG test_user_presence, user_present: false, action: __closed
dec 11 07:35:59 luvar-ThinkPad-T480 user-daemon[262084]: Dec 11 07:35:59.750 INFO Registration was not approved by user, app: +VvHOCjuIQ+f07vnLZeQgBOwo3Wemuo9CuMYdmzS4a0=
dec 11 07:35:59 luvar-ThinkPad-T480 user-daemon[262084]: Dec 11 07:35:59.852 DEBG Begin transaction, payload_len: 73, command: Msg, channel_id: 0x000001
dec 11 07:35:59 luvar-ThinkPad-T480 user-daemon[262084]: Dec 11 07:35:59.852 DEBG Payload incomplete, receive_len: 57, payload_len: 73
dec 11 07:35:59 luvar-ThinkPad-T480 user-daemon[262084]: Dec 11 07:35:59.852 DEBG Received payload, len: 73
dec 11 07:35:59 luvar-ThinkPad-T480 user-daemon[262084]: Dec 11 07:35:59.852 DEBG RequestMessage::EncapsulatedRequest, data.len: 73
dec 11 07:35:59 luvar-ThinkPad-T480 user-daemon[262084]: Dec 11 07:35:59.853 DEBG Registration request, app: +VvHOCjuIQ+f07vnLZeQgBOwo3Wemuo9CuMYdmzS4a0=
dec 11 07:35:59 luvar-ThinkPad-T480 user-daemon[262084]: Dec 11 07:35:59.853 DEBG register
dec 11 07:35:59 luvar-ThinkPad-T480 user-daemon[262084]: Dec 11 07:35:59.853 DEBG test_user_presence, message: Register with site
dec 11 07:36:08 luvar-ThinkPad-T480 user-daemon[262084]: Dec 11 07:36:08.888 DEBG test_user_presence, user_present: false, action: __closed
dec 11 07:36:08 luvar-ThinkPad-T480 user-daemon[262084]: Dec 11 07:36:08.888 INFO Registration was not approved by user, app: +VvHOCjuIQ+f07vnLZeQgBOwo3Wemuo9CuMYdmzS4a0=
luvarqpp commented 2 years ago

Ehm, I was unavare of my own desktop abilities... i3wm is using dunst for notifications and when there is an action for notification, I need to use middle click on notification. This will show bar (with answer and possible actions) on upper part of screen and using keyboard I can choose answer.

Middle click on this: notification Will show possibilities: notification_middle_click

I would like to show some hint in request for first few notifications or for registering requests (first things on demo pages). What do you think about this? Or perhaps just some note in readme/faq. I am willing to spend some time to make PR.

danstiner commented 2 years ago

Glad you figured it out.

I'm not familiar with i3wm or dunst, but I am open to a PR to make this more clear, I think at least on other person had issues with i3 in the past.

Agree if you can figure out how to reliably detect dunst and show alternative text that would be best, but just adding a note to the readme is also a good option, whichever you prefer.

alexdolzhenkovbdl commented 1 year ago

@luvarqpp Thank you very much, I meet the same issue using i3wm and your answer really help me to sort it out.