UbuntuThis forum is for the discussion of Ubuntu Linux.
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.
Has anyone noticed that the wordwrap is not functioning in the Ubuntu 13.10 version of less?
The following gives me the same type of listings without chopped lines:
Code:
$ less -S /var/log/syslog
$ less /var/log/syslog
While using both I tried as per the manual to toggle chopping lines using the man page description:
Code:
-S or --chop-long-lines
Causes lines longer than the screen width to be chopped (truncated) rather than wrapped. That is, the portion of
a long line that does not fit in the screen width is not shown. The default is to wrap long lines; that is, dis‐
play the remainder on the next line.
Having this toggle functionality is a great convenience. Hopefully someone can help me to identify if something has changed where there might be a different way to enable this functionality.
If it's a glitch in the current version and there is a patch on the developers repository, can someone please share.
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Rep:
I am not using Ubuntu, haven't for some time. However, 13.04 is roughly based on Debian Sid (unstable). I am running on that right now.
2 things strike me about your problem;
One is the commands you give are at the user prompt ($). This might, with Ubuntu "security model", work under Ubuntu. It will not in most Linux distros as that is a file that should be owned by root.
The other is simply to tell you that I generally run my terminals at full screen and there are no entries that are too long for that. However, resizing my terminal window down to less than 1/4 screen and running with out the -S modifier the lines wrap fine under Sid.
Current version for less in Sid is 458-2. This is the same package being used in Debian testing (Jessie) so I would think it is the version being used in 13.10.
I have apt-listbugs installed and have seen no mention of a bug being listed in the Debian bug tracker. Ubuntu dropped that useful package after 8.04 and that is a real shame but probably too complex for Ubuntu users. Like Synaptic being only for experts.
I am not using Ubuntu, haven't for some time. However, 13.04 is roughly based on Debian Sid (unstable). I am running on that right now.
2 things strike me about your problem;
One is the commands you give are at the user prompt ($). This might, with Ubuntu "security model", work under Ubuntu. It will not in most Linux distros as that is a file that should be owned by root.
The other is simply to tell you that I generally run my terminals at full screen and there are no entries that are too long for that. However, resizing my terminal window down to less than 1/4 screen and running with out the -S modifier the lines wrap fine under Sid.
Current version for less in Sid is 458-2. This is the same package being used in Debian testing (Jessie) so I would think it is the version being used in 13.10.
I have apt-listbugs installed and have seen no mention of a bug being listed in the Debian bug tracker. Ubuntu dropped that useful package after 8.04 and that is a real shame but probably too complex for Ubuntu users. Like Synaptic being only for experts.
Thanks for the input. I was trying to figure out how to get to the developers repository so that I could try to use their latest build. However, your reference that you couldn't see any problem prompted me to go further in my experimenting. I have a couple of fresh installs, but I had inadvertently brought over my .bashrc to those installs.
I performed another fresh install in a virtualbox and the wrap worked. Looking further and I notied the differences was the LESS environment variable. It turned out I had added a "-r" to the environment so that LESS would by default display raw colors from outputs such as the egrep search output. This had broken the normal display as per the man docs.
By the way, I used to run everything from the root user having a "#" in the prompt. I now always run things from a normal user having the "$" prompt in front of all my commands. That's why you see the "$" in the command example. On Ubuntu, the less command is also owned by root. Of course when a normal user runs it, he gets the same output as when root runs it or if he runs it using the "sudo" elevated prefix.
Even though you don't run Ubuntu, I really appreciate that you take the time to read the Ubuntu forums and help the users who have problems. I had considered placing the question in a more generic forum, but I was thinking the problem might have had something to do with the version compiled in the Ubuntu repository for "13.10" since I hadn't experienced it before recent. I thought one of my software updates had brought a broken compilation to the system.
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Rep:
Well I am glad you got it fixed.
That kind of thing always feels good.
I would like to correct you on one point. I read the Ubuntu Questions section of LQ. I don't read the Ubuntu Forums.
I suppose I am still registered as a user there. Can't log in unless I get an Ubuntu One account. Somehow that seems like extorsion to me as I have no desire for such an account.
Ubuntu-testing was my production OS from 9.10-testing through 11.10-testing. I miss the testers.
They only lost 125 out of about 140 experienced testers, most at the end of 10.04-testing. They had 12 last time I could log in. There are more than that on the so called testing forum. Most will never be testers. Too bad.
Was a pretty good distro.
Could be again. They should try having a little respect for their users.
I tend to have problems with things like this. I like to configure things to suit me. Amazing how interesting things can get when you do that sort of thing.
The way my security is set up there is no running root owned things like less on something in /var and get anything but "command not known".
But then Debian doesn't give you a root prompt with no password if you boot to recovery either so there are some differences.
I would like to correct you on one point. I read the Ubuntu Questions section of LQ. I don't read the Ubuntu Forums.
I suppose I am still registered as a user there. Can't log in unless I get an Ubuntu One account. Somehow that seems like extorsion to me as I have no desire for such an account.
Ubuntu-testing was my production OS from 9.10-testing through 11.10-testing. I miss the testers.
They only lost 125 out of about 140 experienced testers, most at the end of 10.04-testing. They had 12 last time I could log in. There are more than that on the so called testing forum. Most will never be testers. Too bad.
Was a pretty good distro.
Could be again. They should try having a little respect for their users.
I tend to have problems with things like this. I like to configure things to suit me. Amazing how interesting things can get when you do that sort of thing.
The way my security is set up there is no running root owned things like less on something in /var and get anything but "command not known".
But then Debian doesn't give you a root prompt with no password if you boot to recovery either so there are some differences.
Hi, Widget. You mistook my reverence to Ubuntu forum. You seem to have thought I was referring to the http://ubuntuforums.org website. I never made a reference to that site. I'm familiar with communications in the past that you don't care for that site. My reference to Ubuntu forum was this site, LQ and the Ubuntu forum on this site. I posted my message on this website, LQ, under the Ubuntu forum because I though the problem might have had to do with a bug in the distro of Ubuntu.
I'm not familiar with the way you have setup your security. I appreciate your taking the time to share. I tried to describe the functionality that I was getting which I thought was a default setting after install.
It's a totally new concept to me to have a setup to make root owned tools loose functionality. I used a number of distros in the past and often install a distro to give support to a user with questions. It was my experince (before) that many of the general tools such as ls, more, less have been located in /bin and /usr/bin, and are owned by root.
I'm curious where you have less located on your computer as well as what user you have designated to own less and more.
By the way, concerning the ubuntuforums.org website, I don't have a problem with the Ubuntu One signon, but I think it's insane that they don't have a viable "remember me" functionality.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.