2

I'm connected to a server via ssh -x and my only way to get text out of the system is the x clipboard (unless i want to take thousends of screenshots and OCR over it).

I can not execute any programs on the other machine, because i don't have access.

How can I achive this?

2 Answers2

6

Use xclip.

On the remote computer

xclip a_text_file_with_some_data.txt

On the local computer

xclip -o > test.txt

You did move the text via the clipboard, but not the "normal" way :)

Johan
  • 795
  • 2
  • 7
  • 13
  • my problem is that a propertiery "shell" (An X program) is my only way to access the data. I cannot execute other programs on the server. This "shell" stores data in the X clipboard. My problem is that i can't past it on my local Server. xclip -o test.txt outputs the clipboard of my own server. –  Apr 27 '10 at 11:19
  • Nice. It works with stdin/stdout too. So what I'd do remotely is `cat myfile.txt | xclip ` and locally on my Mac is `xclip -o | pbcopy` – Sridhar Sarnobat Nov 14 '17 at 23:29
0

Many terminal emulators (PuTTY, gnome-terminal, Xterm) let you either:

  • log all terminal output to a file, or
  • set a really big scrollback buffer (01000 lines or so) and then copy all of it.
user1686
  • 8,717
  • 25
  • 38
  • There is no output on the terminal i could copy. it is all inside an X-Window. –  Apr 27 '10 at 11:20