LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 08-15-2018, 11:34 AM   #1
WillyW
Member
 
Registered: Dec 2006
Posts: 47

Rep: Reputation: 15
Can't see repeated characters in nano


Hello,

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.

Thank you.
 
Old 08-15-2018, 07:25 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,735

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
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.
 
Old 08-15-2018, 08:54 PM   #3
WillyW
Member
 
Registered: Dec 2006
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by scasey View Post
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.
 
Old 08-15-2018, 08:59 PM   #4
WillyW
Member
 
Registered: Dec 2006
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by scasey View Post
...
Quick test...change the putty background color to some other color .... while logged in to the server to see if the hidden characters show up.
Tried it.
No difference. Problem is still the same.
 
Old 08-16-2018, 04:00 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,930

Rep: Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321
https://askubuntu.com/questions/5519...g-nano-or-pico
http://www.linuxhowtos.org/System/config_nano.htm

try to set the color of comment to something visible (do not rely on default of anything)
 
Old 08-16-2018, 11:30 AM   #6
WillyW
Member
 
Registered: Dec 2006
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pan64 View Post
https://askubuntu.com/questions/5519...g-nano-or-pico
http://www.linuxhowtos.org/System/config_nano.htm

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.

If you have more ideas, please post.

Thank you.
 
Old 08-16-2018, 12:17 PM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,930

Rep: Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321
at this point I would rather try to reproduce it myself.
 
Old 08-16-2018, 01:03 PM   #8
WillyW
Member
 
Registered: Dec 2006
Posts: 47

Original Poster
Rep: Reputation: 15
For what it is worth ... an example:

A simple text file, with this in it:

Code:
#
##
###
####
#####
######
#######
########
The above is what it looks like, when viewed with less.

The below is same file, viewed with nano:

Code:
#
##
###
####
#####
######
#
#
Apparently at 7 chars is where it does it.
 
Old 08-17-2018, 12:18 AM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
only with putty?
can you try to ssh into it from different linux shells/terminals, to narrow down the source of the problem?

i use nano via ssh and have never seen this.

any other (error) messages in the shell?

Code:
echo $TERM
please?
 
Old 08-17-2018, 07:35 AM   #10
WillyW
Member
 
Registered: Dec 2006
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by ondoho View Post
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.


Thank you.
 
Old 08-17-2018, 11:07 AM   #11
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,735

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Clarification: This only occurs on the one server where nano is at version 2.9.3...yes?

I'm running v. 2.3.1 and cannot duplicate the problem.

Have you considered contacting the developers and/or filing a bug report?
Code:
Email: nano@nano-editor.org Web: https://nano-editor.org/
 
Old 08-17-2018, 11:56 AM   #12
WillyW
Member
 
Registered: Dec 2006
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by scasey View Post
Clarification: This only occurs on the one server where nano is at version 2.9.3...yes?
Correct.
I am having this problem on only one shell, and it has nano version 2.9.3 .

Quote:
I'm running v. 2.3.1 and cannot duplicate the problem.
Would you know? : Is 2.9.3 really, really new?
Just curious.

Quote:
Have you considered contacting the developers and/or filing a bug report?
Code:
Email: nano@nano-editor.org Web: https://nano-editor.org/
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.

Thank you.
 
Old 08-17-2018, 12:12 PM   #13
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,735

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
[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 View Post
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?
 
Old 08-17-2018, 02:31 PM   #14
WillyW
Member
 
Registered: Dec 2006
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
[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.
 
Old 08-17-2018, 02:36 PM   #15
WillyW
Member
 
Registered: Dec 2006
Posts: 47

Original Poster
Rep: Reputation: 15
I have good news !

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?

Again - Thanks !
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Squeeze out repeated characters danielbmartin Programming 5 08-30-2015 11:09 AM
how to define a string of repeated characters lynne007 Linux - Newbie 6 02-09-2011 03:52 AM
Repeated characters with Logitech MX 5000 Zoombie Linux - Hardware 5 11-30-2006 09:21 PM
Repeated Characters with KDE Desktop Sharing chipfiev Linux - Software 2 12-14-2005 09:19 PM
find repeated characters in a string mcshen Programming 9 02-02-2004 05:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration