Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
polyzium

NGSH, an experimental remote shell bridge between OC and UNIX-like OSes

Recommended Posts

This is the project I was working on 2 months ago or so.
I couldn't find a real shell client for OC, so I had to create one by myself.

That's how NGSH was born.

Contributions and pull requests are welcome

There are two versions:
The first one uses the Python pyte library for terminal emulation, but it is very slow (it redraws everything) and has no colour support.
The second one (I called it PTY) takes advantage of OpenOS's VT100 library, which is fast and has colour, but very broken and inaccurate due to missing checks and/or escape sequences.

I may get back to serverside emulation at some point, because OC isn't fast enough for VT100 emulation.

For instructions see my GitLab repository (make sure to download the PTY version)
Before you run the client, make sure to install my improved terminal libraries for proper emulation of \r, \b, and inverse video, like so:

pastebin run rs0QiTHp

Screenshots:
CopyQ.rmbuoS.thumb.png.50279f4e561ad0398a7e2db2d59169c8.png
CopyQ.CdgkOg.thumb.png.f9163412665041d353aa5752068a13fd.png
CopyQ.OKEriz.png.1afc1a7720cd1cb615213cd4dfd660c9.png

Link to post
Share on other sites

your comments in the tty changes are quite...passionate :)

why did we have such weird \r handling? because users were copying strange mixtures of part mac, part windows, part linux files where line-endings weren't always complete, or fully copied., The output wasn't what they wanted. I agree that \r should be x=1. I might make that change myself.

additionally, yes, \b i should have added :)

I don't have any problem ignoring the charset change code.

the version of tty and vt100 you have copied appear to be somewhat old, but i do recall making some vt100 fixes, might even be related to reverse video. In my latest dev builds the vt100 code has been improved (and is slightly faster for some workflows). But if you could point me to what you fixed, I could integrate that to our vt100 code.

All in all, i'd be happy to considering merging your changes/fixes to my tty code so that future versions of oc work with your software without users having to update openos (Which will become more of an issue once we release our next update because your modifications to these files are no longer compatible)

 

on another note, i've given considerable work to separate the cursor layer from the tty layer. it's not a true api yet, but close. It would be quite possible to leverage the cursor library code (in latest dev builds of oc with openos) to handle the cursor and proper blinking with your project. I might poke at that one day. ping us on oc if you want to chat about your really cool project here

Link to post
Share on other sites

Heh, I was very pissed off how OpenOS handles control characters, especially if some programs use carriage return for a loading bar, like pip
I guess I was right that someone from OC team tried to support all line endings at once. Would it be a good idea to add a command that switches the CR+LF method? Something like "linemode lf"?
About backspace. I suspect it was never implemented because there was no use for it in OpenOS. But yeah for a  thing like my terminal program it should have been.


Also yeah, these improved libraries are from some old OpenOS installation, I bet you've been changing those for the past 2 months, I'll have to check these changes out.
Since you said it would be a problem to modify these system components in the next release, I guess it would be a good idea to merge them. All I did is I fixed the reverse video bug, added backspace, replaced CRLF with the Linux/UNIX one, however I don't know what are you going to do with Windows' CRLF and Mac's CR though... also ignored SI.

I also would like to check out the improved VT100 code

I have no idea how would you make the cursor appear, however Techokami made a telnet client (which is more like a TCP netcat than anything else) that made the cursor appear and yet at the same time receives data from the server. Mine uses direct keyboard input when his/her client uses the read function, so that will be a hassle if you use the keyboard directly.
 

 

 

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.