Is there a way to prevent konsole from wrapping lines? It would be great if I could do it without disabling any of the other features like extended colors and other of the fancier things.


There's a VT100 control sequence for that, which should be supported by Konsole. It's called DECAWM, and here's how to emit it:

echo -ne '\e[?7l'

My question would be though: why?

  • Well I'm tailing a file and I just need to quickly glance at the first few dozen characters of the line before I look at the rest. I want to be able to see the rest if I choose to, but I want to see the first bit first. This just seems easier than piping my tail through a complex regex – Falmarri Dec 16 '10 at 6:18
  • 1
    'less' might be the tool for you then. Invoke it with the -S (or --chop-long-lines) option to stop it from wrapping lines. You can scroll left and right with the cursor keys. Hit F (uppercase, i.e. with Shift down) to make 'less' tail the end of the file. – ak2 Dec 16 '10 at 9:41
  • +1 for your suggestion of less! – Josh Dec 16 '10 at 14:19
  • 3
    ...if you try the escape sequence: then to re-enable the wrap echo -ne '\e[?7h' – Peter.O Apr 26 '11 at 22:26
  • Thank you very much! very helpful for me using dropdown terminal in half screen, and I can work it out with just the 80% first portion of console screen most times.. wrapping was making hard to read errors and rspec output.. – Andre Figueiredo Apr 15 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.