How to display CLI output on another machine

Mikkel L. Ellertson mikkel at infinity-ltd.com
Sun Jan 7 19:02:50 UTC 2007


Nigel Henry wrote:
> I can ssh into my other machine ok, and can edit files, etc, which is no 
> problem.
> 
> What I would like to do is to have access to what is currently displayed on 
> the CLI (Konsole) on machine B. As an example. I run apt-get update, then 
> apt-get dist-upgrade on machine B, which runs to completion. The history is 
> still on the CLI.  I now need to post the history from the CLI on machine B 
> to a mailing list. The email client (Kmail) is on machine A.
> 
> Is there a way to display the history that's on the CLI on machine B on 
> machine A, so that I can simply highlight the text, then paste it to Kmails 
> composer on machine A?
> 
> Both machines are next to one another, but at the moment I have to save the 
> CLI history on machine B as a text file, ssh into B from A, and use nano to 
> display the text file, before I can highlight, and paste the text into Kmails 
> composer.
> 
> Nigel.
> 
You can run "/dev/vcs(VC number) > save.txt" on machine A where VC
number is the virtual console number the user is logged into on
machine A. (You have to be logged in as the same user, or as root on
machine A.) This will give you a file with the output of machine A
as one long string. You will need to edit it. You can get a full
color screen shot by using
"cat /dev/vcsa(VC number) > screenshot.vcsa" But this is only useful
if you want to dump it to another VT.
"cat screenshot.vcsa > /dev/vcsa(VC number)"

What I normally do instead is ssh to machine A from an X terminal,
run the commands, and then highlight the text I want by holding down
the left mouse button. Both Konsole term and Gterm have an option
under Edit to copy the highlighted text to the clipboard. You can
then past it into Kmail. With xterm, you will probably need to use
shift-middle button to past it.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!




More information about the fedora-list mailing list