Results 1 to 10 of 10

Thread: Konsole cutting off half the screen when using vi or less

  1. #1

    Default Konsole cutting off half the screen when using vi or less

    Using konsole it keeps cutting off half the screen when using vim or less, see screenshot SUSE Paste

    Anyone seen this before and now how to stop it?

  2. #2
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: Konsole cutting off half the screen when using vi or less

    On 06/30/2011 12:06 PM, tk83 wrote:
    >
    > Using konsole it keeps cutting off half the screen when using vim or
    > less


    the paste you show is of vim, right?

    this http://paste.opensuse.org/80873573 shows the results of this code

    Code:
    cat hardware.txt | less
    in a default installed openSUSE 11.4, proving (i think) that no
    truncation occurs when using less by itself as your post would suggest..

    so, either you used less AND vim together, or i have to wonder if maybe
    you have changed your default bash or konsole settings...

    maybe in .bashrc ??

    by the way, i must admit total ignorance in the mysteries of vi/vim, i
    have also gotten lost in its arcane blind passage ways and dead end
    caves....and have myself gotten into a 'mode' where nothing makes sense
    (like the one you posted)...while i hope a vim guru can help you, i do
    not think less is involved in any way..

    --
    DD
    -Caveat-Hardware-Software-

  3. #3
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,607
    Blog Entries
    3

    Default Re: Konsole cutting off half the screen when using vi or less

    Check your startup files (".profile" or ".bashrc"). You probably have a "stty" command that is setting 24 lines. Try removing (or commenting out) that command.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  4. #4

    Default Re: Konsole cutting off half the screen when using vi or less

    This is a default Opensus 11.4 install, I haven't added or changed anything in .profile, .bashrc, .bash_profile or anything.

    I'm not using less and vim together, I'm using them in the perfectly normal way separately. Those are just the 2 applications that seem to show the problem.

    The only thing I've found out so far is that it only occurs on my Opensuse 11.4 that's in a VirtualBox VM, the installation running natively on my laptop at home doesn't show the problem.

  5. #5
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,607
    Blog Entries
    3

    Default Re: Konsole cutting off half the screen when using vi or less

    Quote Originally Posted by tk83 View Post
    The only thing I've found out so far is that it only occurs on my Opensuse 11.4 that's in a VirtualBox VM, the installation running natively on my laptop at home doesn't show the problem.
    Okay. I'm not a VirtualBox user, so hopefully somebody else can point to the problem.

    You will get that behavior when "vi" or "less" is told the wrong number of rows for the screen. Typically, it is the "stty" command that can set a wrong number. But it might be something else in your VirtualBox settings.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  6. #6
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: Konsole cutting off half the screen when using vi or less

    On 06/30/2011 02:06 PM, nrickert wrote:
    >
    > But it might be something else in your VirtualBox settings.


    i agree because we are (i think) sure that neither less nor vim will do
    in a local terminal what is being seen by tk83 in a VM, at work..

    *or* maybe it is a problem between VBox and the host it is running in at
    work..

    try running openSUSE in a VBox on your home linux machine and see it if
    also truncates konsole when running vim or less...if so, you know it is
    a VBox problem, if not you know it is a problem when VBox is running in
    your office software problem....right? so what is the hosting software
    running at work--if, the problem is only there?

    --
    DD
    -Caveat-Hardware-Software-

  7. #7

    Default Re: Konsole cutting off half the screen when using vi or less

    At work I (unfortunately) am stuck with Windows XP on my laptop, so that's the host that's running the VBox VM. I can try copying the 5GB VM to my home but it might have to wait until next week as my only USB stick large enough is currently being used for something else.

    I've tried a few other applications and it seems to be a general problem that affects anything that uses curses/ncurses for the interface. So the list of programs which can reproduce the problem includes vim, less, ncftp, GNU screen and links.

    Anyone ever had a problem like this with konsole and n/curses programs?
    Last edited by tk83; 01-Jul-2011 at 02:04. Reason: it also happens on GNU screen

  8. #8

    Default Re: Konsole cutting off half the screen when using vi or less

    The fact that it happens with other programs is rather normal. You can try the following:

    • check/set the TERM environment variable.
    • use the resize command before running a ncurses program.
    • try another terminal program like xterm .


    I don't know how it could be related to VirtualBox (actually I don't think it is).

    • and use a bitmap font.

  9. #9

    Default Re: Konsole cutting off half the screen when using vi or less

    Quote Originally Posted by please_try_again View Post
    The fact that it happens with other programs is rather normal. You can try the following:

    [LIST][*]check/set the TERM environment variable.
    echo $TERM
    xterm
    [*]use the resize command before running a ncurses program.
    Bingo! That did the trick. There must still be a bug somewhere that it's not doing this by default.

  10. #10

    Default Re: Konsole cutting off half the screen when using vi or less

    Found the bug: https://bugs.kde.org/show_bug.cgi?id=176902

    And the explanation is that it only affects you if the konsole terminal size is exactly 80x40. So just grabbing the corner of the konsole window and extending it to 80x41 works around the bug completely, without having to use resize.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •