On 2016-11-07 23:15:19 -0500, Daniel Kahn Gillmor wrote: > On Sun 2016-11-06 04:25:27 -0500, Vincent Lefevre <vinc...@vinc17.net> wrote: > > No, this is not a timeout issue, as a window is opened on the > > X display, while it should never do that when DISPLAY is unset. > > DISPLAY has nothing to do with how pinentry-gnome3 works. > pinentry-gnome3 does not communicate with any X11 session -- it > communicates with a d-bus session.
Then, there should be another mean (I don't know which one) so that pinentry-gnome3 displays the prompt at the right place, e.g. when the user has an X session open locally on the machine but also accesses the machine remotely via ssh and the user runs gpg from this remote access. Communicating with the d-bus session only doesn't seem to be enough since DBUS_SESSION_BUS_ADDRESS has the same value under X and via ssh. > > I don't use GNOME at all, so this isn't this scenario. But the above > > would not be OK for GNOME & SSH users anyway. IMHO, what matters is > > whether DISPLAY is set or not, and its value when it is set. > > It sounds like you are expecting the beahvior of pinentry-gtk-2 (which > does indeed talk directly to an X11 display), but using pinentry-gnome3 > instead (which talks instead to a d-bus session). We could make > pinentry-gnome3 test for the presence of DISPLAY, and fall back if it is > unset, but why would we do this, if pinentry-gnome3 doesn't even assume > X11? If a user runs gnome3 in some non-x11 environment (wayland? i > don't know specifically), should pinentry-gnome3 fall back to curses, > even when it can provide a graphical prompt? It should use the information about the current screen. Under X11, this comes from DISPLAY (I don't think there's another way because the user can choose where something should be displayed by directly changing the value of DISPLAY, and disregarding DISPLAY would not honor this requirement). For wayland, probably WAYLAND_DISPLAY, but according to the package description, only X and text terminals are currently supported by pinentry-gnome3: "If the X Window System is not active then an alternative text-mode dialog will be used." And if you mean that pinentry-gnome3 should delegate the display to GNOME so that it doesn't have to know whether X or wayland or whatever is used, then fine, but: * It should still have a fallback to X / terminal when GNOME is not used (this is my case here). * It should be able to detect whether the user is in front of his GNOME session or accesses the machine in some other way (e.g. ssh from a remote machine). > Perhaps you mean to be using pinentry-gtk-2? pinentry-gnome3 is used by default, so in any case, it should work correctly. -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)