spudlyo / clipetty

Manipulate the system (clip)board with (e)macs from a (tty)
GNU General Public License v3.0
167 stars 13 forks source link

[BUG] Clipetty permission denided /dev/pts/3 #15

Closed ztlevi closed 4 years ago

ztlevi commented 4 years ago

Describe the bug On my company's desktop, there is a admin user controlled by my company called bobby.mcgee monitors users. /dev/pts/3 belongs to that user.

When I try to use clipetty, it pops

clipetty--emit: Opening output file: Permission denied, /dev/pts/3

Can we skip those output files does not belongs to the current user?

Notes: It probly will happen if two people ssh into a same machine.

To Reproduce

  1. Maybe create a file belongs to another admin user.
  2. ssh and use clipetty

Expected behavior No permission error.

System Info (please complete the following information):

Additional context Add any other context about the problem here.

spudlyo commented 4 years ago

Hi there,

Can you try adding the following to your .tmux.conf file?

set -ag update-environment "SSH_TTY"

Once you do that, detach your tmux session, log off, log back in, and then attach to your tmux session. I think that should fix it.