Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clipper works when started manually, but not from unit file #17

Closed
ebyrne242 opened this issue Aug 9, 2018 · 2 comments
Closed

Clipper works when started manually, but not from unit file #17

ebyrne242 opened this issue Aug 9, 2018 · 2 comments

Comments

@ebyrne242
Copy link

Clipper works when I start it manually, but from if I start it with the example unit file and the same config, it gives me an error when I try to copy to it (via unix socket).

$ systemctl --user start clipper
clipper: 2018/08/08 21:05:39 Starting UNIX domain socket server at /home/sketch/.ssh/clipper.sock
clipper: 2018/08/08 21:09:03 [ERROR] pipe copy: write |1: broken pipe
clipper: 2018/08/08 21:09:03 [ERROR] wait: exit status 1
clipper: 2018/08/08 21:09:03 Connection closed
[sketch@laptop ~]$ systemctl --user stop clipper
clipper: 2018/08/08 21:09:35 Got signal terminated
clipper: 2018/08/08 21:09:35 accept unix /home/sketch/.ssh/clipper.sock: use of closed network connection
[sketch@laptop ~]$ clipper
clipper: 2018/08/08 21:09:41 Starting UNIX domain socket server at /home/sketch/.ssh/clipper.sock
clipper: 2018/08/08 21:09:43 Echoed 4 bytes
clipper: 2018/08/08 21:09:43 Connection closed

@jeduardo
Copy link

jeduardo commented Jun 10, 2019

@sketch242 this happens because clipper is using xclip underneath it and the DISPLAY environment variable in the unit file is most likely not matching your user display.

For example, this is the content of my DISPLAYenvironment variable:

$ echo $DISPLAY
:1

This is what is inside the unit file:

Environment=DISPLAY=:0

In my case I have changed :0 to :1 in the service unit file, ran a systemctl --user daemon-reload && systemctl --user restart clipper.service and I was then able to use clipper to inject data into the clipboard as expected.

@wincent
Copy link
Owner

wincent commented Jun 20, 2020

Going to close this on the assumption that it is resolved.

@wincent wincent closed this as completed Jun 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants