Uploaded image for project: 'Guacamole'
  1. Guacamole
  2. GUACAMOLE-148

SSH does not behave properly when using GNU screen

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9.9
    • Fix Version/s: 0.9.12-incubating
    • Component/s: SSH
    • Labels:
      None
    • Environment:
      Arch Linux ARM running on a RaspberryPi 2 (Linux kernel 4.4)
      Tomcat 7.0, Oracle Java 1.8.0

      Description

      SSH does not behave properly when using GNU screen.

      For example, if I connect to server using Guacamole+SSH, launch screen command and inside screen I open a long file in vim, scrolling through the file (using j/k keys) corrupts the screen (until I switch to other virtual terminal and back to vim using <ctrl>+a,<ctrl>+a). If I launch vim while not using screen, scroll works as intended.

      The same happens e.g. with rtorrent, scrolling through the download list when rtorrent is launched inside screen, corrupts the terminal drawing until I switch to other terminal and back to rtorrent.

      This problem does not happen with nano though, so it might be related to ncurses. Also problem seem related to text scroll. E.g. under vim, if advancing through pages (<ctrl>+f or <ctrl>+b) instead of scroling line by line, the problem does not happen.

        Activity

        Hide
        mike.jumper Michael Jumper added a comment -

        I think this is due to a logic error in the way the Guacamole terminal emulator handles scrolling. At the moment, whenever the cursor advances to the next row, the terminal emulator checks whether it is beyond the edge of the scrolling region. If so, it brings it back within the scrolling region, and scrolls the region up one row. This should actually only be done if the cursor is still within the scrolling region. If the cursor is already outside the scrolling region, the cursor should be kept within the bounds of the terminal, but automatic scrolling must not occur.

        Show
        mike.jumper Michael Jumper added a comment - I think this is due to a logic error in the way the Guacamole terminal emulator handles scrolling. At the moment, whenever the cursor advances to the next row, the terminal emulator checks whether it is beyond the edge of the scrolling region. If so, it brings it back within the scrolling region, and scrolls the region up one row. This should actually only be done if the cursor is still within the scrolling region. If the cursor is already outside the scrolling region, the cursor should be kept within the bounds of the terminal, but automatic scrolling must not occur.
        Hide
        mike.jumper Michael Jumper added a comment -

        Jesus - this should be fixed on git master now, if you want to give it a try.

        Show
        mike.jumper Michael Jumper added a comment - Jesus - this should be fixed on git master now, if you want to give it a try.
        Hide
        doragasu Jesus added a comment -

        Thanks! I'll test it as soon as I get some time.

        Show
        doragasu Jesus added a comment - Thanks! I'll test it as soon as I get some time.

          People

          • Assignee:
            mike.jumper Michael Jumper
            Reporter:
            doragasu Jesus
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development