Page MenuHome GnuPG

pinentry on wrong monitor
Open, NormalPublic


I have a dual head setup. When pinentry pops up, it should appear on the
monitor that has the window with the focus, not the monitor with the mouse
cursor. I don't use the mouse that much with the practical result that I don't
immediately see the pinentry-gtk-2 window, because it is not in front of me.

Event Timeline

You may use gpg-agent's --keep-display to force the pinentry to show up on the
display you started the agent. The agent needs to be started explicit, though.

I think I wasn't clear. I have two monitors, but only one X DISPLAY. This is
about the screen, not the X display, where the pinentry is shown.

Is this even something that we can control? This stuff is usually up to the window manager, and although some accept hints, this is not really well defined. For example, gcry_prompt_set_caller_window accepts a window-id-string and says:

The caller window indicates to the prompt which window is prompting the user. The prompt may choose to ignore this information or use it in whatever way it sees fit.

Other window managers may allow external configuration of this behavior. It's not clear to me that we can reasonably address this issue, but I only have one monitor and can't test this anyway.

marcus removed neal as the assignee of this task.Aug 14 2017, 10:37 AM

Is this even something that we can control?

It seems so, at least with the Gtk pinentry. I implemented a possible method in D446.

I am not sure, however, that this is really the behavior we want. For what it's worth, as a regular user of a dual-screen setup, I find the current behavior quite fine.