[Top][All Lists]

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

Re: How to get DISPLAY of emacsclient?

From: Max Nikulin
Subject: Re: How to get DISPLAY of emacsclient?
Date: Sun, 27 Nov 2022 18:34:47 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 27/11/2022 04:33, chad wrote:
Have you considered just adding a server hook that opens a gui frame on daemon start if there is a usable display?

The question is how to determine the display for which emacsclient is invoked. It is possible to create a hidden frame by e.g. calling `server-select-display', but it is necessary to know display.

(Apologies if you've already explored this avenue.)

Personally, I have a shell script that works for me, but I would not recommend it to others. It adds emacsclient option to create an x frame if there is no it yet.

This particular question originates from an emacs-orgmode thread. It was explicitly asked that emacs should not pop up hiding currently active maximized window of another application (or emacs should disappear without additional user action, in this case its behavior should be similar to a notification window). Another participant insisted on using xsel utility and a temporary file (in a way that is not safe) because getting X selection from emacs does not work. I started current thread because Ihor Radchenko asked if `org-get-x-clipboard' could be improved and I realized that my recipe (getenv "DISPLAY") may work incorrectly in some cases.

reply via email to

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