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: Stefan Monnier
Subject: Re: How to get DISPLAY of emacsclient?
Date: Fri, 25 Nov 2022 11:57:03 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

> Unfortunately the value of following expression is the DISPLAY environment
> of the server process
>
>     emacsclient --eval '(getenv "DISPLAY")'

There are different ways which will give you different answers in
different cases:

- you can check the `display` parameter of the selected frame (should
  handle the `emacsclient --display` case).
- you can check the `environment` parameter of the selected frame
  (probably not very useful).
- You can check the `env` parameter (with `process-get`) of the proc
  object that represents (on Emacs's side) the emacsclient connection.
  For that you'll need to get access to this proc object, but I don't
  know offhand how to.


-- Stefan




reply via email to

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