Copy/Paste from tmux does not work with PuTTY

158 views
Skip to first unread message

omár sweidán

unread,
Aug 2, 2023, 5:01:08 AM8/2/23
to tmux-users
Hello, All!

I'm logging in to a Linux server from a Win10 machine via PuTTY. When I open a text file with vim, I can use Ctrl-C/Ctrl-V to copy/paste from the text to a Windows program. But if I use tmux with multiple tabs, the same thing does not work. Can you please support?

Omar Sweidan

Trey Blancher

unread,
Aug 2, 2023, 9:36:02 PM8/2/23
to omár sweidán, tmux-users
Omar,

If I remember correctly, PuTTY by default copies any selected text to the
Windows clipboard, just by highlighting the text with a mouse. You can modify
this in the PuTTY Selection settings, which can be set per connection profile.
To modify the default settings, make your changes and save it as the "Default
Settings" profile.

Note that PuTTY is likely not aware of any pane boundaries which might be
visible in a tmux window, so be careful when you're selecting text in a tmux
view that shows multiple panes. It may be best to use prefix+z to zoom into a
pane before selecting.
>--
>You received this message because you are subscribed to the Google Groups
>"tmux-users" group.
>To unsubscribe from this group and stop receiving emails from it, send an email
>to [1]tmux-users+...@googlegroups.com.
>To view this discussion on the web, visit [2]https://groups.google.com/d/msgid/
>tmux-users/56375754-89d3-48da-90ea-0355117ef2dfn%40googlegroups.com.
>
>References:
>
>[1] mailto:tmux-users+...@googlegroups.com
>[2] https://groups.google.com/d/msgid/tmux-users/56375754-89d3-48da-90ea-0355117ef2dfn%40googlegroups.com?utm_medium=email&utm_source=footer

omár sweidán

unread,
Aug 16, 2023, 5:58:14 AM8/16/23
to tmux-users
I tried what you said, but my tmux is not copying  things directly to the Windows clipboard by highlighting the text with the mouse. What should I change in PuTTY selection settings?

Trey Blancher

unread,
Aug 18, 2023, 6:17:12 PM8/18/23
to omár sweidán, tmux-users
Omár,

First, check to see if PuTTY is configured to do this at all. If tmux has
focus, detach from the session with prefix,d (by default, this will be Ctrl-b,
d). Then try to highlight with PuTTY, and see if the highlighted text gets
copied to the clipboard.

If that doesn't work, then your issue is with PuTTY. Make sure you're using the
latest version of PuTTY, and then it would be somewhere on the Selection section
of the PuTTY Session Profile. I'm not in front of a system with PuTTY installed
right now, so I'm not sure what you need to select on this page. But it should
be pretty obvious that you're missing the copy-to-clipboard on highlight option.

If PuTTY can copy to clipboard with highlight outside of tmux, I'd kill your
tmux server (`tmux kill-server`), and rename your ~/.tmux.conf (`mv
~/.tmux.conf{,.bak$(date +%F)}`) to start with a default tmux configuration.
See if the problem persists in a new server/session started with the default
config. If highlighting with the mouse in tmux in PuTTY works after that, then
it's a setting in your original ~/.tmux.conf.

You'll probably want to remove any tmux mouse configuration, as that could very
well be causing the problem, if a default/empty .tmux.conf works.
> >To view this discussion on the web, visit [2][1]https://groups.google.com/
> d/msgid/
> >tmux-users/56375754-89d3-48da-90ea-0355117ef2dfn%[2]40googlegroups.com.
> >
> >References:
> >
> >[1] mailto:tmux-users+...@googlegroups.com
> >[2] [3]https://groups.google.com/d/msgid/tmux-users/
> 56375754-89d3-48da-90ea-0355117ef2dfn%40googlegroups.com?utm_medium=email&
> utm_source=footer
>
>
>--
>You received this message because you are subscribed to the Google Groups
>"tmux-users" group.
>To unsubscribe from this group and stop receiving emails from it, send an email
>to [4]tmux-users+...@googlegroups.com.
>To view this discussion on the web, visit [5]https://groups.google.com/d/msgid/
>tmux-users/8159e1aa-964b-4fc5-90c1-4aab87ec9738n%40googlegroups.com.
>
>References:
>
>[1] https://groups.google.com/d/msgid/
>[2] http://40googlegroups.com/
>[3] https://groups.google.com/d/msgid/tmux-users/56375754-89d3-48da-90ea-0355117ef2dfn%40googlegroups.com?utm_medium=email&utm_source=footer
>[4] mailto:tmux-users+...@googlegroups.com
>[5] https://groups.google.com/d/msgid/tmux-users/8159e1aa-964b-4fc5-90c1-4aab87ec9738n%40googlegroups.com?utm_medium=email&utm_source=footer

Reply all
Reply to author
Forward
0 new messages