0

I am using terminal mode in two Linux machines using Ubuntu 18.04. On my laptop I navigate with a touchpad equipped with a left and right select button. I have a file on first machine that I want to copy to the second machine. I have tried successfully using scp to copy the file from first machine to second machine. I have also tried cat file on first machine, Ctrl-C select/copy then on second machine I open nano editor and I do a right click from the touchpad and the contents are copied. All selected content seems to copy fine, both scp and Ctrl-C except for the remarks with multiple same characters. For example:

#########################################
//------------------------------------------

are copied over as:

#
//-

Respectively It doesn't seem to affect the running code and in .c files gcc works just fine. However, if I try to edit the copied code nano editor acts strangely like the characters are hidden, they will show then become hidden, etc. as I try to delete and edit them including Ctrl-k in nano editor. Is there a work-around or is this even considered an issue. I have searched around but don't see anything related to multiple characters issues. Thanks for input.

12
  • So what is your question? Do you want to copy a file from machine A to machine B? That is what I read. And you seem to get into trouble doing that, and now try to fix it via copy/paste. That is not the way to do this. If you want to copy a file, try rsync.
    – SPRBRN
    Commented Dec 1, 2019 at 15:42
  • Is Nano running with syntax highlighting? Commented Dec 1, 2019 at 19:57
  • Hello SPRBRN, sorry for the confusion. My question is, what can I do to prevent those characters from disappearing. I can copy the whole file from A to B using scp, I have no problem doing that. What I am concerned with is that after the file copy or even after a copy/paste those characters using nano editor are shortened or missing. If I cat the copied or pasted file cat shows the characters are there. It's that nano editor does not recognize them.
    – WesZ
    Commented Dec 2, 2019 at 11:20
  • Hello Michael. Yes nano editor is using syntax highlighting.
    – WesZ
    Commented Dec 2, 2019 at 11:23
  • There are many places where the characters could be lost. There are tools to check the clipboard contents on all relevant machines.
    – xenoid
    Commented Dec 2, 2019 at 12:52

1 Answer 1

0

Well after much ado and even filing a bug report at nano base headquarters, the fix was as simple as updating PuTTy on my Windows laptop from PuTTy version .7 to version .73. I thought for sure it was a nano problem, it was platform dependent, repeatable across different machines, exclusive to nano - other editors and viewers worked fine... So I learned a few things with this problem, as simple as this fix was...it wasn't so much for me. I wanted to post the fix here just in case some other chap falls into this trap :) Thanks for your help Michael Harvey and others.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .