Giter Site home page Giter Site logo

Comments (9)

eekee avatar eekee commented on July 22, 2024

not seen on linux 3.2.29, x.org 1.12.3, twm.

from plan9port.

i4ki avatar i4ki commented on July 22, 2024

Reproducible here using 9term, bash and rio. I don't know if the same happens with rc.

Linux 4.3.3 (x86_64)

from plan9port.

camoles avatar camoles commented on July 22, 2024

On openbsd, the bug does not happen if using the rc shell

from plan9port.

eekee avatar eekee commented on July 22, 2024

ah. :) yes i have seen this before. bash, ksh, and i imagine most other shells put the terminal into raw mode. you'll want to select 'cook' from the mb2 menu to get them to play nice. or, the shells themselves may have some option, or there may be some suitable setting for $TERM.

edit: i posted without thinking. i'm not sure why you all have problems. if i start 9term ksh -l then it works for me and so does cat; no hidden typing. ditto for 9term bash -l. then again i am running quite old versions of everything. my ksh is 'Version JM 93t+ 2010-06-21' from 2010, bash is 4.2.37 from 2011, p9p from april. my isp is restricting http at present, otherwise i'd upgrade p9p & try again.

from plan9port.

camoles avatar camoles commented on July 22, 2024

Indeed, if I select the "cook" mode the problem goes away. Also, $TERM is set to 'dumb' by default under 9term. If I set it to say, vt100, the problem also goes away. But I am pretty sure having the apps believe they are running under vt100 when we are under 9term is not the best idea.

Any suggestion about some suitable $TERM value so that I don't have to select "cook" every time?

from plan9port.

camoles avatar camoles commented on July 22, 2024

hmm, interestingly there is the "9term" option under the possible $TERM values. But still, it does not make the bug here related go away. Although it seem to fix some things. For example, if I open "top" under 9term with $TERM set to "dumb", the terminal just closes. Whereas if I set $TERM to "9term", it presents an correct output.

from plan9port.

camoles avatar camoles commented on July 22, 2024

It looks like this behaviour is documented on 9term man page:

      9term changes behavior according to the terminal settings of
      the running programs.  Most programs run with echo enabled.
      In this mode, 9term displays and allows editing of the
      input.  Some programs, typically those reading passwords,
      run with echo disabled.  In this mode, 9term passes keys-
      trokes through directly, without echoing them or buffering
      until a newline character.  These heuristics work well in
      many cases, but there are a few common ones where they fall
      short.  First, programs using the GNU readline library typi-
      cally disable terminal echo and perform echoing themselves.
      The most common example is the shell bash(1). Disabling the
      use of readline with ``set +o emacs'' [sic] usually restores
      the desired behavior.  Second, remote terminal programs such
      as ssh(1) typically run with echo disabled, relying on the
      remote system to echo characters as desired.  Plan 9's ssh
      has a -C flag to disable this, leaving the terminal in
      ``cooked'' mode.  For similar situations on Unix, 9term's
      button 2 menu has an entry to toggle the forced use of
      cooked mode, despite the terminal settings.  In such cases,
      it is useful to run ``stty -echo'' on the remote system to
      avoid seeing your input twice.

set +o emacs #fixed the problem here

from plan9port.

camoles avatar camoles commented on July 22, 2024

Since I didn't find a way to automate "set +o emacs" (putting it on my .profile wasn't enough), I ended up setting SHELL=rc on my .profile so that 9term uses the rc shell instead of ksh.

from plan9port.

eekee avatar eekee commented on July 22, 2024

i always use it with rc. i set $SHELL in my 9 script, and i always start 9term with 9.

i'm generally happy with chording cut/paste rather than using history, and i prefer rc's syntax for lots of things. i make functions for oft-repeated commands. you may however wish to ln -s .profile .bashrc, or find some other hack to always source .profile or to initialize non-login shells.

from plan9port.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.