masm11 / emacs

Mirror of GNU Emacs
http://www.gnu.org/software/emacs/
GNU General Public License v3.0
198 stars 14 forks source link

Clipboard not working with other apps when launched with systemd after reboot #98

Closed declantsien closed 3 years ago

declantsien commented 3 years ago

I have systemctl enable --user emacs. This happens only when I reboot my system,

masm11 commented 3 years ago

Try these on non-working emacs and working emacs.

(getenv "DISPLAY")
(getenv "WAYLAND_DISPLAY")

They may be different between on non-working emacs and working emacs.

declantsien commented 3 years ago

//non-working Emacs

(getenv** "DISPLAY")"wayland-1"
(getenv "WAYLAND_DISPLAY")nil

//working Emacs

(getenv "DISPLAY")":0"
(getenv "WAYLAND_DISPLAY")"wayland-1"

It is different. Why is that?

masm11 commented 3 years ago

When I tested in my environment, always this pattern:

(getenv "DISPLAY")"wayland-1"
(getenv "WAYLAND_DISPLAY")nil

and couldn't copy/paste from emacs to firefox.

I think this copy/paste issue is related to environment variables. It needs more investigation.

masm11 commented 3 years ago

I tried to fixed it. Please try latest feature/pgtk.

declantsien commented 3 years ago

Nice, it works. I think it's OK to close this issue.

masm11 commented 3 years ago

thanks for confirmation.