LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 12-25-2013, 04:50 PM   #1
Larry James
Member
 
Registered: Jun 2000
Location: Buffalo, New York
Distribution: Ubuntu, Raspbian
Posts: 381

Rep: Reputation: 40
Wordwrap toggle not functioning in less


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.

Thanks!

-- L. James

--
L. D. James
ljames@apololo3.com
www.apollo3.com/~ljames
 
Old 12-26-2013, 08:58 PM   #2
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
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.
 
Old 12-27-2013, 12:57 AM   #3
Larry James
Member
 
Registered: Jun 2000
Location: Buffalo, New York
Distribution: Ubuntu, Raspbian
Posts: 381

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

-- L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames
 
Old 12-27-2013, 02:42 AM   #4
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
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.
 
Old 12-27-2013, 04:20 AM   #5
Larry James
Member
 
Registered: Jun 2000
Location: Buffalo, New York
Distribution: Ubuntu, Raspbian
Posts: 381

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

-- L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How To Toggle Proxy cmnorton Linux - Networking 3 04-05-2012 12:47 PM
Console text editor with dynamic wordwrap Changes Linux - Software 4 01-03-2010 02:17 PM
Unable to wordwrap with a guestbook (mysq+css) swatward General 6 08-25-2006 05:09 PM
Anyone toggle between 2.4 and 2.6 kernels much? Proud Mandriva 3 12-30-2004 01:50 PM
how can I toggle different keyboard layouts? kentri9 Linux - Newbie 14 10-09-2004 04:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 02:28 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