Re: [arch-general] Copy remote command server to clipboard

2019-08-26 Thread Olli

On 26.08.19 14:30, ProgAndy wrote:

Am 26.08.19 um 13:47 schrieb Maykel Franco via arch-general:

Many thanks Ralph, it works, but... Is possible launch the command in
my server?

[…] You can run a local server that copies everything it receives to
the clipboard. Then set up ssh remote port forwarding and send
clipboard data to this port.


How about these two alternatives:

1) Use “termite” as terminal and select and copy text with its selection
mode¹ using either the keyboard or the mouse.

2) Run “ssh” from within “neovim” by using its terminal emulator² and
select and copy text with the regular vim commands (visual mode, yank).

Regards,
Olli



¹ https://wiki.archlinux.org/index.php/Termite#Usage
² https://neovim.io/doc/user/nvim_terminal_emulator.html


Re: [arch-general] Copy remote command server to clipboard

2019-08-26 Thread ProgAndy
Am 26.08.19 um 13:47 schrieb Maykel Franco via arch-general:
...
> Many thanks Ralph, it works, but... Is possible launch the command in my 
> server?
> 
...

Hello Maykel,

You can run a local server that copies everything it receives to the
clipboard. Then set up ssh remote port forwarding and send clipboard
data to this port.

You need either netcat (nc) or socat as well as xsel, xclip or wl-clipboard.

Server:
$ socat TCP-LISTEN:6789,reuseaddr,fork EXEC:"/usr/bin/xsel -ib"

SSH:
$ ssh u...@example.com -R 6789:localhost:6789
Or set RemoteForward in your config.

copy on server:
$ uname -a | nc -c localhost 6789
or
$ uname -a | socat -u - TCP:localhost:6789

https://gist.github.com/dergachev/8259104

--
Andy


Re: [arch-general] Copy remote command server to clipboard

2019-08-26 Thread Maykel Franco via arch-general
El vie., 23 ago. 2019 a las 11:23, Ralph Corderoy
() escribió:
>
> Hi Maykel,
>
> > ssh 192.168.0.3
> > # pwd
> > /home/archlniux
> > (I like copy the command return to my clipboard archlinux desktop
> > client)
>
> ssh 192.168.0.3 pwd | xsel -b
>
> --
> Cheers, Ralph.

Many thanks Ralph, it works, but... Is possible launch the command in my server?

First:

ssh 192.168.0.3

Second:

pwd | xsel -b

This is because I exec multiple same commands every day and copy the
return manually with mouse is tedious!