Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have several shells, and use putty on a Win7 computer to log into them via ssh. I've done this for years, and have just recently encountered the problem that I'm going to try to describe.
---
Got a new shell.
In some script files where the # is the comment char, I will do a line like:
##############################
at places that I want a divider... just to make things easier for me to read.
I discovered that after I'd done this, and saved, and come back to the file later, that the only char I could see, is the first one on the line.
The rest ARE there. If I get on the line and tap the 'end' key, the cursor jumps right over to the real end of the line. I just see empty space though.
This is when using this version of nano:
:~$ nano -V
GNU nano, version 2.9.3
(C) 1999-2011, 2013-2018 Free Software Foundation, Inc.
(C) 2014-2018 the contributors to nano
Email: nano@nano-editor.org Web: https://nano-editor.org/
Compiled options: --disable-libmagic --disable-wrapping-as-root --enable-utf8
on this new shell.
Same Win7 computer with same install of putty, on other shells - this problem does not happen. However, of the ones I've checked, they all have various older versions of nano.
On the problem shell, I've tried pico too, once.
Same exact problem.
Tried vi once. It works... I can see the repeated chars.
Tried the less text reader. Works fine. I can see the repeated chars.
Someone told me to try kitty for ssh client. I googled, found it, downloaded it, (sorry, didn't note the version number, but I presume it is newest) and tried it. Logged in via ssh... ran nano... same problem.
Went to another shell (using putty). From second shell, did:
ssh myname@xxx.xxx.xxx.xxx
and logged in on problem shell.
Ran nano. Same problem.
Looked at /etc/nanorc
I don't have an experienced eye, but to me it looked like it was stock, out-of-the-box ... like it hadn't been fiddled with at all.
My own /home/myusername/.nanorc
has a few lines in it, to change the colors that dirs are displayed with, with ls -latr. I simply copy the few lines, from shell to shell.
For the heck of it though, I moved .nanorc to another dir, and tested. Same problem.
From cat /etc/*relea* on the problem system:
DISTRIB_DESCRIPTION="Ubuntu 18.04 LTS"
NAME="Ubuntu"
VERSION="18.04 LTS (Bionic Beaver)"
ID=ubuntu
I think that's it... trying to remember if there is anything else that I tried.
While this is not the end of the world, it is an irritation.
I'd like to fix it, and I'd like to know what is causing it too.
Whatever other info you might need, please ask and I'll go fetch it. You might have to tell me how to get it though.
My guess:
The nano color scheme you're using on that server has the color for comments set to the background color.
Quick test...change the putty background color to some other color (what color is it now?) while logged in to the server to see if the hidden characters show up.
My guess:
The nano color scheme you're using on that server has the color for comments set to the background color.
Quick test...change the putty background color to some other color (what color is it now?) while logged in to the server to see if the hidden characters show up.
Perhaps you didn't see this:
Quote:
For the heck of it though, I moved .nanorc to another dir, and tested. Same problem.
In other words: with no .nanorc , it still does it.
Putty background color is black.
Same as it has been for years, and same as for other shells I use.
I will look in the config of putty, and see if I can find a way to change the background color, just to see what happens.
Thank you for responding.
I had hoped for several responses, here. I tried google first, naturally. Was surprised when I got nothing. I can't be the ONLY person with this.
try to set the color of comment to something visible (do not rely on default of anything)
I had a look at the links you posted.
Went and found several examples of different .nanorc files, and commands.
I can successfully change the color of the comment, but the problem is still the same.
That is - I can change the color of what I see, but I see only the first few chars, after reloading the file into nano.
Even this had worked, it would not be satisfactory to me. I've used nano this way for years, and have gotten used to black and white, for everything.
only with putty?
can you try to ssh into it from different linux shells/terminals, to narrow down the source of the problem?
Not sure if this is what you mean.... this is from an earlier post:
Quote:
Someone told me to try kitty for ssh client. I googled, found it, downloaded it, (sorry, didn't note the version number, but I presume it is newest) and tried it. Logged in via ssh... ran nano... same problem.
Went to another shell (using putty). From second shell, did:
ssh myname@xxx.xxx.xxx.xxx
and logged in on problem shell.
Ran nano. Same problem.
Quote:
i use nano via ssh and have never seen this.
Me either. And I've used nano on shells, via ssh with putty, on this same computer for years.
The only difference - it's a new shell. Other shells... still fine.
Quote:
any other (error) messages in the shell?
When I exit nano, and am back at the command line? No error messages appear.
Quote:
Code:
echo $TERM
please?
Quote:
myusername@myusername:~$ echo $TERM
xterm
I also just logged into a different shell that I've had for a long time.
echo $TERM there also returns xterm.
For what it is worth, nano -V there returns version 2.7.4 and the problem is not there.
No, I hadn't considered that.
To be honest, when I started on this road, I figured that I could just google it, get dozens of hits, do a little skimming/reading, and fix it. Or at least know what was causing it.
When I got nothing, I went to #linux on Freenode IRC. A couple there tried, but to no avail.
Then I remembered this forum, from years ago.
I was still thinking that I could get it fixed quicker, this way. Usually my problems are simple dumb stuff, and I just need to get pointed in the right direction.
I wonder how fast they reply?
I'm feeling now like that is my last resort....
I do want to try one more experiment. That is, to add a new user - a friend - and have them try it.
We did this some the other day, but he ran out of time.
He could only try from his linux box, and he used ssh from the command line, to log in. Nano worked fine for him.
He didn't have his windows computer handy, so he couldn't try putty ... that's the combo I'm using.
Let me know if you have something else you want me to try or look at.
[QUOTE=WillyW;5892703]Would you know? : Is 2.9.3 really, really new?
Just curious.
[quote]
Pretty new: 1/19/2018 See: https://nano-editor.org/news.php
There are newer versions, tho.
Quote:
Originally Posted by WillyW
I do want to try one more experiment. That is, to add a new user - a friend - and have them try it.
We did this some the other day, but he ran out of time.
He could only try from his linux box, and he used ssh from the command line, to log in. Nano worked fine for him.
He didn't have his windows computer handy, so he couldn't try putty ... that's the combo I'm using.
Let me know if you have something else you want me to try or look at.
Thank you.
Wait! It worked for him to ssh and use the 2.9.3 nano? Not using PuTTY?
Are the PuTTY settings for that box the same as the setting for the other servers you're connecting to? Everything identical except for the server name/IP address?
If not, what's different?
[Wait! It worked for him to ssh and use the 2.9.3 nano? Not using PuTTY?
Correct.
Quote:
Are the PuTTY settings for that box the same as the setting for the other servers you're connecting to? Everything identical except for the server name/IP address?
If not, what's different?
All the same.
I think the default setting load when the program is launched. When I save a new connection, those default settings carry over into it.
That's all I've ever done.
So something is different, about this shell and/or version of nano on it.
The friend contacted me a short while ago, and had time to experiment. This time with putty.
He experienced the exact same thing as I have described !
( What a relief to know I'm not nuts.... )
He experimented, and got back to me.
In Connection -> Data -> Terminal-type string was xterm
Changed it rxvt for this one saved connection, and logged in again.
Brief testing, and it seems to be fixed. I can see longer lines of repeated chars, in nano, as expected.
Thank you all for your time in this.
I wonder if this will be something that gets asked? I wonder if this version of Ubuntu is super new and if the nano that comes with it will do this to others?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.