emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get DISPLAY of emacsclient?


From: chad
Subject: Re: How to get DISPLAY of emacsclient?
Date: Tue, 29 Nov 2022 19:41:11 -0500



On Tue, Nov 29, 2022 at 1:11 PM Max Nikulin <manikulin@gmail.com> wrote:
[...]
Add to user notes content of X selection when emacs is started as
daemong with no frames and the user prefers to avoid distraction due to
creation of a new frame.

In general, you seem to assume that there's no way for emacs to create a new X11 frame object without it being immediately visible to the user. In my experience, that's only true in the limited subset of cases where the user has chosen a window manager that enforces that choice. Further, that wasn't the default when I last looked -- but that was quite some time ago, and I don't know about the current options/defaults for common X11-based display systems of today. Can anyone shed some light on this?

On Tue, Nov 29, 2022 at 1:11 PM Max Nikulin <manikulin@gmail.com> wrote:
[...] 
User connected to another machine through ssh (e.g. from a laptop to a
desktop). In this case DISPLAY is different for the client and for the
server process. (gui-get-selection) should be executed for client's DISPLAY.

In the past, I have regularly seen both varieties of this: where the user was logged into two machines, with an emacs server running on one, X displays on both, and wanted a new emacs frame on either one, depending on circumstances. As near as I can tell, there is no "right" choice here; the user needs to (be able to) provide input on which display to use. 

This is a fundamentally different case from "the user wants to use a non-graphical X11-based mechanism that emacs normally doesn't enable until emacs actually connects to a working X11 display", and I think it should be possible to get emacs to make that connection without necessarily popping up a window that the user doesn't want.

I hope that helps,
~Chad
P.S. Now that I've said it "out loud", I expect to learn that either the Wayland people now consider that a security hole and will disallow it, or that they already did so. 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]