Giter Site home page Giter Site logo

Comments (5)

GreenAppers avatar GreenAppers commented on August 16, 2024

That might be a terminal emulation issue. Make sure that you're supplying termvar to the SSHClient constructor.

Is your use case interactive? (e.g. sending the SSH channel data to another terminal emulator). If so, setting termvar to xterm would be good place to start.

On the other hand if you're, e.g. doing some remote scripting, you'd probably want to set termvar to dumb and possibly run some stty commands at the start of the session. bash regularly redraws the prompt using escape codes for interactive terminals.

If you're making an SSH mobile app, you'll probably want a terminal emulator for Dart. I'm not sure of the existing options there. That might be a future project I'd consider.

Cheers!

from dartssh.

jkoenig134 avatar jkoenig134 commented on August 16, 2024

Thanks for the Fast answer! You are right, i want to make an ssh terminal emulator. Why is your library not good for it?
And.. How can i set the termvar?

from dartssh.

jkoenig134 avatar jkoenig134 commented on August 16, 2024

@GreenAppers I found the termvar variable in the SSHClient constructor. But it doesn´t take effect.

from dartssh.

GreenAppers avatar GreenAppers commented on August 16, 2024

A terminal emulator transduces a byte stream into a series of pixel buffers.

The termvar is probably taking effect, but it will only change the resulting byte stream. It can't render the byte stream into a screen, e.g. by interpreting escape codes as cursor movements.

It looks like there are at least some terminal emulator packages for Dart. I haven't tried any of them.

If I created a terminal emulator it would be a separate package, probably named dartterm. The interface would accept as input the SSH channel data, and produce as output a Canvas or Widget. I do have some old C++ code for a terminal emulator (just as I had old C++ code for SSH transport). I'll look into this in future, but ATM I'm busy with other work. Thanks!

from dartssh.

jkoenig134 avatar jkoenig134 commented on August 16, 2024

At the moment i just wanted to send and receive text. The design for the ssh client is another part. The command stty -echo worked for me. Nothing gets duplicated.

from dartssh.

Related Issues (11)

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.