U++ framework
Do not panic. Ask here before giving up.

Home » Developing U++ » UppHub » A terminal emulator widget for U++
Re: A terminal emulator widget for U++ [message #54364 is a reply to message #51415] Sun, 05 July 2020 17:40 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hello,

Terminal ctrl has seen a small but important update:

- Handling of incomplete/partial UTF-8 bytes is improved.


The parser now buffers the incomplete UTF-8 bytes encountered at the end of an incoming data chunk and flushes them with the next chunk.

Best regards,
Oblivion


[Updated on: Sun, 05 July 2020 17:41]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #54413 is a reply to message #51415] Tue, 14 July 2020 14:44 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hello,

Moving towards the v0.4, Terminal ctrl has gained a new feature:

- Application clipboard manipulation protocol (OSC 52) is implemented.


This optional feature grants clipboard read and write access to applications that supports OSC 52
OSC 52 is supported by many terminals, including xterm, and apps such as tmux.


However, this feature should be handled with care by the client code, as it may pose a security threat.

Terminal ctrl already takes some security measures though:

1) Terminal ctrl gives the client code a granular control over this protocol.

2) In compliance with the principle of least astonishment, the feature is disabled by default.

3) It will work IFF it is enabled && the ctrl instance has focus (to prevent spamming, etc.)


Accordingly, the API and specs docs are updated.

Best regards,

Oblivion




[Updated on: Tue, 14 July 2020 14:47]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #54493 is a reply to message #51415] Sat, 01 August 2020 20:48 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hi,

Aside from small updates, there were no news about Terminal ctrl for some time.

Here is a screenshot of the upcoming v0.4 (2020.2) of Terminal ctrl on Windows 10, scheduled to be published in October 2020:

index.php?t=getfile&id=6159&private=0

That's Windows powershell (tm) running natively on the basic terminal example, on Windows 10. Smile

This is possible because Windows 10 has a brand new pseudoconsole api. (Thus you can also run plain cmd.exe, or other console apps...)

I am implementing this in PtyProcess class, without requiring any API change, so the Terminal reference examples can be run without changing the code.


Hopefully, this will mature with v0.4.

Best regards,
Oblivion

  • Attachment: Capture.JPG
    (Size: 61.01KB, Downloaded 1486 times)


Re: A terminal emulator widget for U++ [message #54618 is a reply to message #51415] Fri, 21 August 2020 13:29 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hi,

Today marks a rather important milestone for Terminal ctrl: Windows 10 pseudoconsole API support.

The support is implemented in PtyProcess class, so nothing new is introduced. Thanks to Mirek, you only need to enable the WIN10 flag in theIDE's main package configuration settings ("GUI WIN10"). So you will need the nightly builds of Upp to run Windows 10 pty with Terminal ctrl.

It is tested with the bundled CLANG and MSVC19 (MSVC19 requires comdlg32.lib via Windows SDK)

Since the support is experimental at the moment, you can expect some glitches (If you find any, let me know).

Git examples are also updated to reflect the changes. You can check them to see what is changed (or rather, not changed.)

For other, under-the-hood improvements and changes, you can check the git commit history.


Note that Terminal package is still in v0.3 phase. v0.4 (or 2020.2) is still two months away, and will bring in more improvements, and hopefully a refined win10 pty support.)

Here is a screenshot of the stock terminal splitter example, running multiple instances of cmd.exe with resizing support. (You can also run powershell instead):

https://i.imgur.com/7HRp7ly.jpg


If you have any questions, suggestions, bug reports, etc., let me know.

Cheers!

Oblivion




[Updated on: Fri, 21 August 2020 13:33]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #54744 is a reply to message #51415] Sat, 05 September 2020 16:45 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hi,

There is a project called Monotty text-based desktop environment.
This project, which I've been tracking for some time, has set up a public ssh server where you can test both yout terminal emulator and the monontty desktop prototype.

It is cool stuff (with images made of unicode glyphs, 24-bit color transparency,etc.)

You can test the stock ssh terminal example by setting the url to:

vtm@netxs.online:22


After that you get this:

https://i.imgur.com/VgIRnCK.png

Smile


Consider it also as a demo for the SshShell component of Core/SSH package.


Best regards,

Oblivion.



[Updated on: Sat, 05 September 2020 16:51]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #54957 is a reply to message #51415] Thu, 01 October 2020 18:11 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor

Should Terminal be renamed as TerminalCtrl[ 5 votes ]
1. Yes 5 / 100%
2. No 0 / 0%

I am considering a rename for Terminal. (Package name won't change. Only the actual widget)

Should we rename it to TerminalCtrl with v0.4 (2020.2)?

If so, should we add Terminal as an alias (for backward compat.)?

What dou you think?



Best regards,
Oblivion



[Updated on: Thu, 01 October 2020 18:23]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #55134 is a reply to message #51415] Tue, 13 October 2020 12:41 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Ok then, since there is no objection, the Terminal widget will be officially renamed as TerminalCtrl from version 2020.2 (0.4) on.

In the meantime, I'd like to share some news about my personal, pet project:

A robust and easy-to-use, multitabbed, cross-platform terminal emulator (which will also have support for SSH2 connections) I am currently writing in tribute to U++ Smile

As I've mentioned before, its project codename is "toad" (it may change in the future). It is a pre-alpha software now, but once it hits alpha (0.1) I will release it under BSD license on a separate git repo. (most stuff - sans SSH infrastructure - is already up and working.)


Here is a screenshot (on linux, GNOME 3.38):


https://i.imgur.com/2uMm8Tm.png

If you have any questions, ideas, bug reports, etc. let me know.


Best regards,
Oblivion


icon14.gif  Re: A terminal emulator widget for U++ [message #55138 is a reply to message #55134] Tue, 13 October 2020 20:41 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1117
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Oblivion,

TerminalCtrl look amazing. Good job!

Right now I am waiting for the Upp DE with Your terminal App Wink

Klugier


U++ - one framework to rule them all.

[Updated on: Tue, 13 October 2020 20:41]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #55721 is a reply to message #55134] Thu, 03 December 2020 15:05 Go to previous messageGo to next message
hongnod is currently offline  hongnod
Messages: 2
Registered: December 2020
Junior Member
I am watching your "Terminal" project for a duration of time. It looks amazing. I just want to know if the "toad" out will be something like XShell?

Thanks for your wonderful doing.

[Updated on: Thu, 03 December 2020 15:30]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #55726 is a reply to message #55721] Thu, 03 December 2020 16:25 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hello hongnod.

Thank you for your kind words!

Quote:
I am watching your "Terminal" project for a duration of time. It looks amazing. I just want to know if the "toad" out will be something like XShell?


Yes, but Toad will be lighter. The prealpha (unreleased) version already has a (experimental sftp browser).

My focus with Toad is to provide

a) A cross-platform terminal emulator in U++ style (=single directory with few to none external dependencies, that can also be compiled to work on web browsers and on Linux framebuffer)
b) An ssh2 terminal with x11 forwarding.
c) An integrated sftp browser and a multithreaded sftp/scp file transfer client.

Steps a and b is basically done (I'm polishing them)
Step c is a TODO (done ATM only experimentally).

It is already delayed but its initial public beta will hopefully be released in the second quarter of 2021

In the meantime I will continue improving the TerminalCtrl


Best regards,
Oblivion


[Updated on: Thu, 03 December 2020 16:26]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #55733 is a reply to message #55726] Fri, 04 December 2020 06:58 Go to previous messageGo to next message
hongnod is currently offline  hongnod
Messages: 2
Registered: December 2020
Junior Member
Eager to taste it!
Re: A terminal emulator widget for U++ [message #55739 is a reply to message #51415] Sat, 05 December 2020 16:21 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hi,

Terminal package is now tagged as 2020.2 (v0.4)
There's a lot of changes under the hood but here are some highlights:

Terminal package, release: 2020.2, overview:

* Terminal class is finally renamed as TerminalCtrl. (Upp::Terminal will be available as an alias, until 2021.1 (v0.5) release tag).
* Fixed to compile with MSC 19.
* TerminalCtrl now officially supports Windows 10's native pseudoconsole api via the unified, basic interface of PtyProcess class.
* iterm2's inline images protocol is implemented and polished.
* Clipboard manipulation protocol (OSC 52) is implemented.
* Middle-drag (in application mouse-tracking mode) is implemented.
* Right-drag (in application mouse-tracking mode) is implemented.
* Auto-hide option for mouse cursor is added.
* Word selection is implemented. (double-click selection)
* Line selection is implemented. (triple-click selection)
* Text selection mechanism is refactored using the new range-based methods.
* Copy-on-select style text selection is added.
* Text cursor (caret) width is now automatically adjusted to cell width (i.e. reacts to single/double width unciode codepoints).
* Space character can now have overline/underline/strikeout attributes.
* Key handling is further improved across supported platforms.
* Scheduled time callbacks are now properly cleared on object destruction.  (MT-fortification)
* Performance/throughput  is further improved by removing the now redundant calls to page refresh methods.
* Hyperlink tooltips now display the decoded URL.
* RGBA, CMY and CMYK color text specifications (formatting and scanning) is now supported.
* Brightness component of faint colors is now correctly calculated.
* Jsonization and Xmlization support is added.
* More switches are added to the TerminalCtrl.usc (layout file).

* PtyProcess api docs are added.
* TerminalCtrl::InlineImage structure is documented.
- Terminal overview doc is removed.


Enjoy! Smile


Best regards,
Oblivion


[Updated on: Sat, 05 December 2020 16:27]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #55762 is a reply to message #51415] Wed, 09 December 2020 00:54 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hi,

Marking the beginning of new development cycle, a crucial feature that was missing up until now is initially implemented: PC_style function keys.
From now on it is possible to switch between PC and VT-style function keys by using relevant methods programatically, or via the default options menu or the CTRL+SHIFT+P accelarator key.
Many apps, such as tmux use PC-style function keys by default.
This also means that in VT-style function keys mode the F13-f20 keys should be mapped to CTRL+(F1-F8) as expected.


For more information on Pc-style function keys, see: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-P C-Style-Function-Keys


Best regards,
Oblivion


Re: A terminal emulator widget for U++ [message #56090 is a reply to message #51415] Sat, 23 January 2021 01:25 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hi,

I have added a new terminal example to the upp-components/Examples section: TerminalLayoutExample.


This new example demonstrates:

- The usage of TheIDE's layout editor to set-up the TerminalCtrl's properties and layout.
- Custom menu (bar & context) creation, and manipulation of TerminalCtrl's standard menu
- The usage of xterm's WindowOps (actions) to set up custom display sizes and modes (fullscreen/maximize/minimize, etc).
- A high performance event loop.
- Binary serialization of TerminalCtrl's storable properties and flags.



Screenshot:

index.php?t=getfile&id=6344&private=0

If you have any questions or suggestions, let me know.

Best regards,
Oblivion


Re: A terminal emulator widget for U++ [message #56155 is a reply to message #51415] Mon, 01 February 2021 21:18 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hi,

This is going to be an announcement:

I have decided to move several packages from upp-components to UppHub. And the Terminal package is one of them.

So in the following two weeks I will move the package and the example code to its own github repository.

In this way,

1) You will be able to download and update TerminalCtrl source code, examples via TheIDE's package manager, into the upp sandbox (no need to setup any assembly, etc.) with a single and simple click.
2) You won't have to download the whole upp-components repository to get TerminalCtrl and its examples.


This, however, does not mean that upp-components is dead. On the contrary, it will be maintained and synchronized with the upphub version as usual.
Besides, upp-components, and especially Terminal package gets a lot of hits, as it is referenced in various places in terminal emulation scene, and terminal emulator developer portals, and redirects curious people to Ultimate++. And I don't want to lose that. Smile
What I will do is to add a notice to the installation instructions and packages list in the upp-components readme file stating that these packages are also available via upphub, in TheIDE - nightly.

If you have any questions, objections, suggestions, etc let me know.

Best regards,
Oblivion


[Updated on: Mon, 01 February 2021 21:30]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #56174 is a reply to message #51415] Wed, 03 February 2021 17:12 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hello,

A small update:


- Application mouse tracking ("x10/x11") mode now sends the correct mouse coordinates on older wire formats where the max x/y coords is limited to 255 cells, 8-bit). This also fixes vim's mouse handling.

- It is now possible to set the text cursor style (block, beam,underline) of TerminalCtrl via TheIDE's layout editor.


Best regards,
Oblivion


[Updated on: Wed, 03 February 2021 17:15]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #56236 is a reply to message #51415] Fri, 12 February 2021 17:42 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hi,

Terminal package and TerminalCtrl is moved to its own repo and UppHub. (It will continue to be available on upp-components too.)
This means that you no longer need to download the whole repo to get TerminalCtrl and its reference examples.
If you have U++ nightly builds (as of February 12), you can download them via UppHub package manager in the TheIDE.

If you have any questions let me know.

Best regards,
Oblivion


Re: A terminal emulator widget for U++ [message #56240 is a reply to message #56236] Fri, 12 February 2021 21:58 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1117
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Oblivion,

Glad to hear that it is available on UppHub Smile I tested the TerminalExample and found one problems. The path inside terminal is not displayed correctly (it has the same color as terminal area). Here is the screenshot:
index.php?t=getfile&id=6374&private=0

Maybe it is somehow related to white them. Please check!

Klugier


U++ - one framework to rule them all.

[Updated on: Fri, 12 February 2021 21:59]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #56241 is a reply to message #56240] Fri, 12 February 2021 22:26 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hello Klugier,

Quote:
. The path inside terminal is not displayed correctly (it has the same color as terminal area). Here is the screenshot:


Thanks for reporting this!

However, I am unable to reproduce it on my two machines (Arch Linux, GNOME.) Tried with several different normal/dark themes. It seems to be working. (Even "powerline" styles are working! Smile )

It is possibly theme related.

If you have time, could you please provide the below information:

- The TERM variable
- The SHELL variable
- Is Adjust to dark theme on? (You can check it via context menu)
- Is Light colors mode on? ( You can check it via context menu)
- Have you tried it with other terminals? (e.g. xterm, Konsole, etc.) xterm would be a good criterion to compare.


Best regards,
Oblivion


[Updated on: Fri, 12 February 2021 22:28]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #56242 is a reply to message #56241] Fri, 12 February 2021 23:00 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1117
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

It is fine with Konsole and VS Code however, the xterm doesn't display colors correctly. The color tune up doesn't help. The values for $TERM, $SHELL and $PS1 are as follow:
xterm
/bin/bash
\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\]


I think the root cause of the problem is that distro do some overrides.

Klugier


U++ - one framework to rule them all.

[Updated on: Fri, 12 February 2021 23:02]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #56243 is a reply to message #56242] Fri, 12 February 2021 23:14 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hello Klugier,

Thanks for the info.

That's what I've suspected, and that's why I asked for you the check it against xterm.

The bash config. sets the ink color to white. (SGR 37). That color is meant to be changed by the user, If the background (which can be overridden by the theme) is the same color, then it'll be unreadble. (unless you explicitly set the color white or the paper color to something else on TerminalCtrl.)


I reproduced it with xterm, GNOME terminal, VTE and kitty. Smile
We can call it a bash config/theme clash and a false alarm.

Best regards,

Oblivion


[Updated on: Fri, 12 February 2021 23:18]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #56348 is a reply to message #51415] Tue, 23 February 2021 22:57 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
A small tip:

TerminalCtrl can display PowerLine fonts and glyphs
By default, however, if you install and try to use PowerLine fonts, you will notice that some glyphs are missing. This is because U++ handles its fallback fonts through a compile-time list.
In order to utilize powerline fonts, all you need to do is add the following line to the end of fallback fonts lists [sFontReplacements array], in Draw/FontCR.cpp:

{ "PowerlineSymbols", 0x00000000, 0x08000008 },


This method can be applied to other fonts as well. Just use uppbox/FontCover app to calculate the font range for your desired font.

If you recompile U++, set up powerline fonts support and configure apps, say vim, you should get a display similar to the below screenshot(taken via stock TerminalLayoutExample):

index.php?t=getfile&id=6382&private=0


Best regards,
Oblivion


[Updated on: Tue, 23 February 2021 23:13]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #56368 is a reply to message #51415] Sat, 27 February 2021 22:07 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hello,

tldlr:

In the following weeks TerminalCtrl will finally gain winpty support.
This means that it will be able to run as a local terminal ("natively") on Windows XP/Vista/7/8/10, without requiring Cygwin, Msys2 or Win10 pseudoconsole api. Smile

This idea was brewing for some time as I was investigating the possibility of embedding native windows console support in PtyProcess class.

As it turned out, it was suprisingly trivial, thanks to winpty.

Pros:

1. TerminalCtrl does not require any specific hack or intervention to run on Windows as a local (=not remote) console, thanks to its design and WinPty.

2. Cygwin or MSYS2 are not required. Only the libwinpty (winpty.lib or winpty.dll) and winpty-agent is required and they compile on native CLANG compiler and Windows environment.

3. WinPty's API seamlessly integrates with PtyProcess class and it api. As a result, the existing terminal examples or code using PtyProcess class do not require any modification. A simple compiler flag (flagWINPTY) will be enough to switch it on.

4. This means it is possible run cmd.exe, bash.exe, powershell.exe, or any Windows-native console application (such as FAR file manager - see screenshot below) directly on TerminalCtrl/PtyProcess.

5. This also means that TerminalCtrl can be set to run in CygWin and Msys2 environments, and it can easily replace Mintty, which is, AFAIK, bound to Cygwin or Msys2 subsystem.

6. winpty has MIT license. You can freely supply the winpty.lib and winpty-agent with your application.


Cons:

- Nothing much at the moment, really. Winpty has some small quirks but they arent specific to our terminal emulator widget.


Below screenshot is from the Far file manager. It is running natively on the stock TerminalExample, on Windows 7.

index.php?t=getfile&id=6385&private=0


If you have any questions, bug reports, suggestions criticism, etc. let me know.


Best regards,
Oblivion



[Updated on: Sat, 27 February 2021 22:23]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #56383 is a reply to message #51415] Mon, 01 March 2021 23:49 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hi,

TerminalCtrl now officially supports winpty on Windows platform.

This effectively eliminates one of the major "show-stoppers" we've had up until now with TerminalCtrl: Native console support on Windows XP/Vista/7/8. (ıt can also be used on Win10, but we already have PTY support for that version of windows)

You have two choice here should you select the WINPTY backend:

1) You can compile winpty-agent, winpty.dll and winpty.lib. These files can be easily created, It is not a complicated process.
2) You can use the existing files in your system (for example you can get them from MSYS2 installation or from the GIT Windows client). Just put the agent and dll in the same directory as your terminal app and link your app against winpty.lib (by activating WINPTY flag).

 


In the process, I made a so-called "course-correction" which unfortunately slightly breaks the existing TerminalCtrl installations: I have removed the PtyProcess code from TerminalCtrl source tree and made it into a separate pacakge.
Thus you will need to explicitly add PtyProcess package and its heeader file to your apllications if you want to use it.

E.g.
#include <PtyProcess/PtyProcess.h>


I apologize for this break, but hopefully this will allow easier maintenance and better separation of code.


Best regards,
Oblivion


[Updated on: Mon, 01 March 2021 23:54]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #56393 is a reply to message #51415] Wed, 03 March 2021 20:45 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hi a small update,

I have already managed to compile and statically link winpty library with stock Upp and the bundled clang compiler with very little wrestling.
Not to mention that winpty has MIT license.. This means we can simply provide the library with the PtyProcess package, and preferably making it the default backend, for easy maintenance and development. This and testing shouldn't take more than a week or so.
Later I can wrestle with MSC. Smile


Best regards,
Oblivion




[Updated on: Wed, 03 March 2021 20:45]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #56404 is a reply to message #51415] Sun, 07 March 2021 14:42 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hello,


- PtyProcess package now contains a patched and statically linked version of libwinpty.

- winpty is from now on the default pty backend on Windows platform. No WINPTY flag is required to activate it.

- Since winpty requires an agent executable, I have also added PtyAgent to both TerminalCtrl nest on UppHub and to upp-components/Core.

- After building the PtyAgent, just move the resulting exacutable (PtyAgent.exe) to your apps executables directory.

- Package is tested with CLANG. MSC will follow...


This means that effectively Terminal package -as a local pty- and its examples are now able to run and work on various versions of Windows.



If you have any questions or suggestions, let me know.

Best regards,
Oblivion



[Updated on: Sun, 07 March 2021 14:44]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #56929 is a reply to message #51415] Sat, 01 May 2021 14:17 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hi,

Terminal package is updated. This update is somewhat big, as the 2021.1 release is imminent.
Consider the below changes as a summary of 2021.1 milestone (v0.5) changes/highlights:

Changes:

* Cell padding (horizontal/vertical) is implemented.
* Missing tester methods are implemented.
+ Display renderer is refactored and optimized.
+ Parser (VTInstream) is optimized, using chunking in addition to traditional state machine. It is ~82% faster on average.on a reference machine.
+ Sixel renderer is refactored and optimized. The renderer's raw performance is almost doubled. From 14 to 27 MB/s on a reference machine. 
+ An out-of-bounds crash with dynamic colors feature is fixed.
+ Dynamic colors feature is improved. It can now set/reset multiple colors in a single command.
+ Display refreshing strategy is improved.
+ Local echo now correctly calls the display refreshing methods.
+ A crash when selecting wrapped text lines is fixed.
+ Parser now allows OSC sequences to have UTF-8 payload on  UTF-8 parsing mode.
+ SGR mouse tracking mode gained a pixel-level tracking variant. 
+ UTf-8 titles (xterm extension) are now correctly displayed and reported.
+ On Windows Vista, 7, 8, 10 PtyProcess now allows native console applications via WinPty.
+ On windows, PtyProcess now defaults to statically linked WinPty backend. (Win10 api stays as the recommended option on Windows ver. >= 10)
+ On windows native console (Via WinPty), TerminalCtrl now correctly refreshes the page size after a window size change.
+ Deprecated "Terminal" alias is now removed. 



Only a few more compliance tests and cosmetic changes remain. After that, I'll mark this as 2021.1


Suggestions, bug reports, etc .are welcome.

Best regards,
Oblivion


[Updated on: Sat, 01 May 2021 14:58]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #57100 is a reply to message #51415] Tue, 25 May 2021 13:00 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hi,

TerminalCtrl will be marked as v0.5 (2021.1) next week. This release will have a lot of improvements.

TerminalLayoutExample (the GUI building example) will include some more tricks such as unicode input method (demonstrating the way to use popup windows with TerminalCtrl.)

A preview (gif):

https://i.imgur.com/e5h3vjz.gif


Smile

This will be available next week.

Best regards,

Oblivion


[Updated on: Fri, 28 May 2021 11:36]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #57126 is a reply to message #51415] Thu, 27 May 2021 20:39 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
I usually don't add screenshots or gifs from Windows, but here it is:

TerminalLayoutExample, running on Windows 7 (Winpty/cmd.exe), demonstrating the improved unicode codepoint insertion popup and a simple banner, using echo parser. (will be available next week)

https://i.imgur.com/JjUa46b.gif


Best regards,
Oblivion


[Updated on: Thu, 27 May 2021 21:15]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #57136 is a reply to message #51415] Sat, 29 May 2021 18:08 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hello,

Terminal package is tagged as 2021.1 and officially released/updated. It is available via Upphub and upp-components repo.
This version brings many improvements (such as Windows 7/8/10, winpty support) and bug fixes. See my previous posts and git logs. for details.


Best regards,
Oblivion


[Updated on: Sat, 29 May 2021 19:59]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #57242 is a reply to message #57136] Tue, 15 June 2021 16:41 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1431
Registered: December 2006
Ultimate Contributor
Compilation problem on Mac while compiling TerminalInWebBrowserExample:
/Users/ssg/worker0/m-upphub-TerminalCtrl/build/TerminalCtrl/Terminal/Keys.cpp:312:89: error: use of undeclared identifier 'K_OPTION_KEY'; did you mean 'K_OPTION'?
        if(findarg(key & ~(K_CTRL|K_ALT|K_SHIFT|K_OPTION), K_CTRL_KEY, K_ALT_KEY, K_SHIFT_KEY, K_OPTION_KEY) >= 0)
                                                                                               ^~~~~~~~~~~~
                                                                                               K_OPTION
/Users/ssg/dvlp/cpp/code/upp/git/uppsrc/CtrlCore/CtrlCore.h:103:2: note: 'K_OPTION' declared here
        K_OPTION       = 0x4000000,
        ^

MacOS can be easily installed in a VM (check for such projects on github).


Regards,
Novo
Re: A terminal emulator widget for U++ [message #57702 is a reply to message #57242] Fri, 26 November 2021 23:19 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1117
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Oblivion,

I just read the article about 10 Cool Command Line Application on OMG Ubuntu, how many of theme are compatible with TerminalCtrl? I think these applications give good testing environment. You could try it by yourself!

Klugier


U++ - one framework to rule them all.
Re: A terminal emulator widget for U++ [message #57703 is a reply to message #57702] Sat, 27 November 2021 07:51 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hello Klugier,

(I've been changing my job, so I was away for several month. And I am almost back to developing U++ stuff... Nice to see you all. Smile )

All of those mentioned applications AFAIK are compatiable with TerminalCtrl. We even have a video demonstrating the mapscii on TerminalCtrl's earlier versions. (I've tested them all except the twitter app) If you find any problems. let me know.

Even the highly experimental next-gen terminal stuff (notcurses demos, vtm, etc.) are compatible wihh TerminalCtrl. And the new wchar32 will make things even better on the unicode side. (I am going to test it soon)

ATM, TerminalCtrl passes 425 unit tests, and fails on 86 tests when passed as 'xterm'. This is AFAIK one of the highest scores for non-xterm-based VTEs. (results are taken from esctest terminal unit testing suite).
Where Gnome Terminal can pass only 136 tests when disguised as 'xterm' (Not that Gnome terminal is bad, it just does not implement some legacy stuff for old apps and other features)


Not to mention that even Far Manager (a CLI-based TUI file manager on Windows) works on TerminalCtrl. Cool


A side note: I use vim and emacs, htop, ranger on TerminalCtrl regularly.


Best regards,
Oblivion



[Updated on: Sat, 27 November 2021 08:05]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #57705 is a reply to message #57702] Sat, 27 November 2021 10:47 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Klugier wrote on Sat, 27 November 2021 01:19
Hello Oblivion,

I just read the article about 10 Cool Command Line Application on OMG Ubuntu, how many of theme are compatible with TerminalCtrl? I think these applications give good testing environment. You could try it by yourself!

Klugier


A screenshot of btop:

index.php?t=getfile&id=6524&private=0

Smile

Best regards,
Oblivion


Re: A terminal emulator widget for U++ [message #57841 is a reply to message #51415] Tue, 21 December 2021 07:39 Go to previous messageGo to next message
slashupp is currently offline  slashupp
Messages: 231
Registered: July 2009
Experienced Member
a lazy man's questions:

1. (I did RTFM - so this question goes away)

2. Can the ctrl be used to run as a login shell? (not just as an emulator)
(This is for applications that require use of .profile and not just .bashrc)

[Updated on: Tue, 21 December 2021 07:44]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #57846 is a reply to message #57841] Tue, 21 December 2021 09:40 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hello slashupp,


Quote:
2. Can the ctrl be used to run as a login shell? (not just as an emulator)
(This is for applications that require use of .profile and not just .bashrc)


Yes you can. TerminalCtrl, being a ctrl, simply interprets a string input which may contain terminal escape commands and characters. You feed it with any source of string.
It, however, comes with an optional/default PtyProcess class, which can runs system processes, including login shells. (If it doesn't suit your needs you can simply replace the pty with any other source)


Best regards,
Oblivion


Re: A terminal emulator widget for U++ [message #58093 is a reply to message #51415] Sat, 12 February 2022 19:16 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hi,

Terminal package will receive a big update in March 2022.

In the meantime, however, I am happy to announce that you can enjoy the brand new enhanced unicode support of U++ (wchar32) in TerminalCtrl, which means the terminal can now display virtually all of the emojis correctly.
The required changes were minor, and already pushed to the both upp-components and Upphub repos, as TerminalCtrl was already designed to work with up ot 32 bit characters from the beginning.

A screenshot taken with vtm, a modern text user interface and terminal multiplexer (running on TerminalLayoutExample)

https://i.imgur.com/LrTCEYH.png

You can access the free demo of vtm to test TerminalCtrl, using the following command via the stock TerminaCtrl examples:

#ssh vtm@netxs.online



Best regards,
Oblivion


Re: A terminal emulator widget for U++ [message #58436 is a reply to message #51415] Fri, 20 May 2022 11:48 Go to previous messageGo to next message
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 227
Registered: June 2011
Experienced Member
Very nice control but it also needs a ton of optimization work. If I run find . * in my home directory it takes 7.4 seconds in Konsole, ~12 seconds in lxterm and xterm and 1 minute 44 seconds in TerminalCtrl.
Re: A terminal emulator widget for U++ [message #58437 is a reply to message #51415] Fri, 20 May 2022 13:53 Go to previous messageGo to next message
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 227
Registered: June 2011
Experienced Member
Just to make sure I tried it again with

tr -dc '[:graph:]' < /dev/urandom | tr -d \''\\'\` | head -c 1G > test.txt


and

time cat test.txt


For Konsole I got:

real    1m4.362s
user    0m0.017s
sys     0m6.407s


and for TerminalCtrl I got

real    18m33.085s
user    0m0.024s
sys     0m10.896s


rxvt appears to be the fastest I've tested at

real    0m17.997s
user    0m0.004s
sys     0m4.674s

[Updated on: Fri, 20 May 2022 16:53]

Report message to a moderator

Re: A terminal emulator widget for U++ [message #58440 is a reply to message #58436] Fri, 20 May 2022 23:24 Go to previous messageGo to previous message
Oblivion is currently offline  Oblivion
Messages: 1266
Registered: August 2007
Senior Contributor
Hi!

Quote:
y nice control but it also needs a ton of optimization work. If I run find . * in my home directory it takes 7.4 seconds in Konsole, ~12 seconds in lxterm and xterm and 1 minute 44 seconds in TerminalCtrl.


Thank you very much for the feedback!

My guess is that you've probably tested it on TerminalExample (which isn't meant to test the real-life performance of TerminalCtrl.
If so, could you re-test it on TerminalLayoutExample, which uses a proper high performance (high throughput) loop?

Best regards,
Oblivion


Previous Topic: SerialPort & SerialPortListener class
Next Topic: Added NetCDF library
Goto Forum:
  


Current Time: Tue May 19 23:45:45 GMT+2 2026

Total time taken to generate the page: 0.01243 seconds