Add-on: Advanced SSH & Web Terminal
For quite some time how it seems impossible to copy/paste in an SSH session (web or terminal). When selecting text it gets a yellow background and sometimes an annoying text-based right-click menu appears.
Besides Terminal and Web SSH session I tested iTerm2 but that behaves exactly the same.
I've tried all key-combinations (click, shift then drag - ctrl-shift then click - etc)
Any idea? When searching for this it feels like I'm one of the few with this problem
👍
#No way to copy/paste in SSH session?
1 messages · Page 1 of 1 (latest)
There was an issue in the web terminal some time ago: #installation-archived message
I think it has been fixed since. Connecting directly via a SSH client should work. If it still doesn't try disabling zsh in the addon settings and see if that makes a difference.
Hello @smoky coyote
After disabling zsh (think zfs was a typo?) it's the same.
I'm wondering if there's a way to disable the weird text-based right-click menu. Still haven't found a windows machine to test an ssh session 🙂
Yeah I meant zsh.
The yellow mouse behavior is related to tmux. See link how to fix it.
If you don't want to do this manually try this
sed -i '/^set -g mouse on/s/^/#/' ~/.tmux.conf
pkill tmux
That should fix that part.
HERO!
The sed command + pkill does bring back the normal copy features.
It does not survive a reboot so I'll have to find a way to automate this (alias?)
I'll see if I can find a solution for that. tmux is not active for my Advanced SSH addon by default.
With the Core SSH addon you can write this into .bash_profile.
sed -i '/^set -g mouse on/s/^/#/' ~/.tmux.conf
If you add the pkill there you will cause a loop.
With the Advanced SSH addon you can modify .zprofile or .bash_profile or use init_commands in the settings.
Kinda depends if you use ZSH or not. There's also different SSH addons so this is not that easy to give a simple suggestion for.
It looks like adding the following command to the "init commands" section does the trick?
Just did a reboot and copy/pasting still works!