U++ Forum - RDF feed
type: channel
description: Main place for discussions about U++ cross platform development framework.
items: A terminal emulator widget for U++
items: Re: A terminal emulator widget for U++

A terminal emulator widget for U++
type: item
description: Hello, tl;dr: I am going to publish a terminal emulator widget for U++, in the following month (April). From the user POV, it is a very simple Ctrl that can be embedded in any U++ applications via traditional U++ way: (E.g. Add(terminal.SizePos()) And it has a very "thin" public api. Also its page and parser components are completely decoupled, and documented, and can be used seperately in any project (Read: You can write your own terminal emulator that suits your need with ease). Before I publish it, I'd like to know what features you would like to see in it. Currently it is more capable than Win10's new ANSI console. At the moment it supports: - VT52/ANSI/1xxx/2xx and -partially- 4xx/5xx emulation and Xterm extension. - Both 7-Bit and 8-Bit modes. - UTF8 - OCS and DCS - ANSI colors - Alternate screen buffer. - Resize Planned: - Copy-paste support - Scrollback buffer - Mouse support - And various optimizations. I will also publish two reference examples with it: a simple terminal emulator constructed with Terminal widget, and a remote terminal to demonstrate SSH integration. A screenshot is much more meaningful than words. (On a humble test setup (Linux 5.0/Gnone/relatively old test AMD machine. Top row: Nano editor, AnsiArt, Vttest. Bottom row: Emacs, Top, RadeonTop). Best regards. Oblivion
creator: Oblivion
date: 2019-03-23T21:31:25-00:00

Re: A terminal emulator widget for U++
type: item
description: Maybe a sample of it could be a kind of new Putty. Putty is so basic that with any feature you would add, yours would be better. And in U++
creator: koldo
date: 2019-03-24T15:15:51-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello Koldo, Quote: Maybe a sample of it could be a kind of new Putty. Putty is so basic that with any feature you would add, yours would be better. And in U++ Sure. Currently a barebone SSH terminal example (with the upconing Terminal ctrl), and TERM variable set to "xterm") in U++ is 52 lines of code. (Single file, password authentication). What I have also in my mind is VirtualGui integration. Think about accessing to your server or machine via a terminal running on web browser with SSL, on-demand. This would be a very cool and (somewhat unique?) feature. And it's high on my TODO list. Best regars, Oblivion
creator: Oblivion
date: 2019-03-26T09:02:38-00:00

Re: A terminal emulator widget for U++
type: item
description: And here it is. It took five minutes. We now have terminal access over web browsers, using TURTLE It works as expected. This is the problem with U++: It is so good yet so underrated. :/ Screenshot: Best regards, Oblivion
creator: Oblivion
date: 2019-03-26T12:11:12-00:00

Re: A terminal emulator widget for U++
type: item
creator: koldo
date: 2019-03-26T12:21:22-00:00

Re: A terminal emulator widget for U++
type: item
description: Oblivion wrote on Tue, 26 March 2019 08:11 And here it is. It took five minutes. We now have terminal access over web browsers, using TURTLE It works as expected. Are you able to run a Release version of your terminal emulator using TURTLE? I'm asking this because I'm unable to run a Release version of WebWord (a demo app).
creator: Novo
date: 2019-03-27T22:14:19-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello Novo, Quote: Are you able to run a Release version of your terminal emulator using TURTLE? I'm asking this because I'm unable to run a Release version of WebWord (a demo app). Yep, it works on Linux on localhost:8088 with latest versions of U++, gcc. I have yet to test it (Turtle build) on CLANG or Windows. Setting the Ctrl::host to localhost was sufficient. The only problem I encountered was the loss of caret due to losing focus. Best regards, Oblivion
creator: Oblivion
date: 2019-03-28T07:01:33-00:00

Re: A terminal emulator widget for U++
type: item
description: Oblivion wrote on Thu, 28 March 2019 03:01 Setting the Ctrl::host to localhost was sufficient. Thanks a lot! I didn't realize that Ctrl::host is used to connect back from JavaScript to a server. I still have several problems like I cannot create more than one connection, although Release configuration is forking. And WebWord is using 100% of CPU because it is spinning in a connection loop which doesn't have any timeouts. Are you experiencing the same problems or is it something related to my web-server setup?
creator: Novo
date: 2019-03-28T15:57:59-00:00

Re: A terminal emulator widget for U++
type: item
description: Quote: Are you experiencing the same problems or is it something related to my web-server setup? Yes, after you've pointed out, I've checked the behaviour and it is indeed eating a lot of CPU cylcles (On Linux 5.0, GCC, release mode, AMD ryzen) I get 16% cpu usage in idle state). Good news is I found a possible candidate and a workaround (or fix maybe?) but Mirek should see it first. İn Turtle/Server.cpp, method StartSession(), the for loop in between ln 75-123 (where the server is waiting for connections) seems to be the problem: A simple workaround or a possible fix is to call Sleep(10) in ln: 75. E.g. for(;;) { if(quit) return false; Sleep(10); // Let's eat less CPU cycle while waiting for connections. //... OTOH, there are also bad news: 1) It ssems impossible to open multiple clients at once (at leasy on Firefox (latest). Symptom: When trying to open a second connection to turtle server, tab immediately closes (yet a second webword process runs in the background!). 2) I've noticed a potential security flaw: Closing the client using the client's "close window" button does not clear the browser tab (or canvas). It should. Or else sensitive data may be visible. Best regards. Oblivion
creator: Oblivion
date: 2019-03-28T18:21:25-00:00

Re: A terminal emulator widget for U++
type: item
description: As the day that I'll publish the code on my github repo draws closer, final bits for the first version of TerminalCtrl are coming together well. - Scrollback buffer is implemented. - Chameleon (theme) support is implemented. - VT52/1xx/2xx keyboard (with function keys) support is implemented. - Conformance levels support is added (i.e. it is now possible to restrict the operation level to e.g. VT52, VT102, or VT220 etc.) Here is a screenshot. On the left is our SSH package/SshShell (running in console mode) running on TerminalCTrl, with scrollback buffer enabled. In the middle is TerminalCtrl running with the widely used "Solarized theme" On the right is the mighty emacs, with dropdown menus and function keys on default theme. Suggestions are welcome. Best regards, Oblivion
creator: Oblivion
date: 2019-04-08T09:45:43-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello Oblivion, Very good job, it seems to be awesome. I will try it on my Raspberry with TURTLE ! When do you think you'll publish it ? Thanks in advance, Best Regard
creator: Xemuth
date: 2019-05-13T11:47:59-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello Xemuth, Xemuth wrote on Mon, 13 May 2019 14:47 Hello Oblivion, Very good job, it seems to be awesome. I will try it on my Raspberry with TURTLE ! When do you think you'll publish it ? Thanks in advance, Best Regard Terminal packaga is already delayed (initially I'd planned to publish it in April). Good news is that the first version of the package is basiaclly complete. So it will be published at the end of this month. Currently I am making some profiling and optimizations (which led to 37% performance gain and 30% less memory consumption on average. Also, now the parser is a complete vt parser, i.e. it can handle every single VT instruction (not every command is implemented though) correctly from VT52 to Vt520) I am testing it with vttest, xterm's and ncurses's test tools. And fixing some "paper-cuts" that I have noticed. Best regards, Oblivion
creator: Oblivion
date: 2019-05-14T07:57:03-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, A small but "big" update. Terminal ctrl for U++ is on its way, and here is a short video preview: https://vimeo.com/341085501 It is now mostly compatible with xterm. -- Mouse tracking support added. Terminal can now handle mouse events if they are supported by the applications (See above video for example) -- Bracketed paste mode added. -- "G-sets" upport added. It now supports legacy applications that rely on font shifting (g0, g1, g2, g3, gl, gr). -- DEC Technical charset is added. Now I feel it is eligible for first release. (Probably next friday...) P.s.: Terminal may seem sluggish in the video. (It is not.) That's because I encoded it on my good old test machine, and I limited the framerate to 15. Best regards, Oblivion.
creator: Oblivion
date: 2019-06-08T14:48:00-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, It's been a while since I posted any news about the Terminal package. I had to focus on my other works fo a while. The good news is last week I implemented the final missing pieces for the 0.1 release: - 256 colors support added. - ANSI colors support added. - XTerm dynamic colors suppport added. - VT 4xx rectangular area operations are added (copy, invert, move, fill, in both selective and normal modes) - UDK (DEC's user-defined function keys support) added. - Lazy resize option is added (to reduce flickers on network terminals uch as SSH-based ones) - Size hint added. - A .usc file is added to the Terminal package. (The most common options (font, ink, paper, cursor, sizehint etc.) can be set using TheIDE's layout editor. Also it shows a size hint (in calculated cell size) to simplfy positiong the widget in the layout ediyor. - It is also tested on Windows, and it works well. :) (currently as SSH terminal, in the near future as a frontend for Windows power shell too) Two notes on the upcoming initial release: 1) Terminal package currently does not contain any external code/libaray. It uses U++, and it's plugins. 2) Although a virtual terminal requires a pty device, and Terminal pacjage contains one, they are completely decoupled. Terminal ctrl can be used and compiled without PtyProcess. This gives it a huge flexibility In this regard I will provide 4 basic examples with the package: - TerminalExample | Uses ptyprocess (currently ptyprocess requires POSIX-compliant operationg systems (or possibly cygwin on Windows.) - TerminalExampleWithLayout | The same as above. -------------------------------- - SShTerminalExample | Does not use PtyProcess. IT uses Core/SSH package isntead - SshTerminalExampleWithLayout | The same as above. Here is the actual code of TerminalExample (36 LOCs total): #include <Core/Core.h> #include <Terminal/Terminal.h> using namespace Upp; const char *nixshell = "/bin/bash"; struct TerminalExample : TopWindow { Terminal term; PtyProcess p…
creator: Oblivion
date: 2019-07-13T15:35:03-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello Oblivion, Impressive work !
creator: Xemuth
date: 2019-07-16T07:34:35-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, It is time to unleash the beast The initial version of Terminal package is finally released. I suggest you read the ReadMe.md on GitHub or the "Overview" doc (qtf) inluded in the package. It'll give you a better idea of what it is. Github address of Terminal package: https://github.com/ismail-yilmaz/upp-components/tree/master/ CtrlLib/Terminal Examples are included in the Examples section of my git repo. Yes, but what is it? Excerpt form the ReadMe.md on github: Terminal package is a flexible, easy-to-use yet powerful cross-platform virtual terminal emulation library written in C/C++ for Ultimate++. It is designed from the ground up with modularity and maintainability in mind. In this respect the package consists of several re-usable classes, only one being the Terminal widget. ## Requirements - Ultimate++ (ver. >= 2019.1) - POSIX, Windows (and probably MacOS, though not tested.) - A decent enough C/C++ compiler that supports at least C++11. (GCC/CLANG/MinGW/Msc) - Snacks & beer. ## Features *Note that below list is only a summary of the currently supported features. Technical specifications and documentation will be available soon. - Supports whatever platform Ultimate++ supports. (Linux, Windows, MacOS). - Supports VT52/VT1xx/VT2xx, partial VT4XX/5XX, and xterm emulation modes. - Supports user configurable device conformance levels (1, 2, 3, 4, and 0 as VT52 emulation). - Supports both 7-bits and 8-bits I/O. - Supports Unicode/UTF8. - Supports user configurable, legacy "g-set" (G0/G1/G2/G3), and related shifting functions (LS0/LS1/LS1R/LS2/LS2R/LS3/LS3R). - Supports ANSI conformance levels. - Supports various terminal state, device, and mode reports. - Supports DEC VT52 graphics charset, VT1xx line-drawing charset, VT2xx multinational charset, and VT3xx technical charset. - Supports VT52/VT1xx/VT2xx keyboard emulation with function keys. - Supports UDK (DEC's user-defined function keys feature). - Supports user configurable blinking text and blink interval.…
creator: Oblivion
date: 2019-07-20T13:33:51-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, A Turtle example is added to the package. You can run the Terminal example in your favorite browser and see how it works. Terminal: https://github.com/ismail-yilmaz/upp-components/tree/master/ CtrlLib/Terminal Example: https://github.com/ismail-yilmaz/upp-components/tree/master/ Examples/TerminalInWebBrowser Also a name clash with Turtle is fixed. Screenshot: Lynx running on Terminal in Firefox (a.k.a "Browserception") Best regards, Oblivion
creator: Oblivion
date: 2019-07-21T19:15:20-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, More updates: A terminal multiplexing example is added to the package. This example demonstrates how a terminal multiplexing can be achieved simply by using a splitter widget. Splitter is a container ctrl that can be used to split any parent ctrl into resizeable horizontal and/or vertical panes. It also demonstrates the usage of NTL containers with Terminal widget: Also a mouse capture issue is hopefully fixed. Best regards, Oblivon
creator: Oblivion
date: 2019-07-22T13:56:03-00:00

Re: A terminal emulator widget for U++
type: item
description: A short video demonstration of Terminal ctrl (simple multiplexing example running mapscii, htop, emacs, lynx nano..): https://vimeo.com/349761874 Best regards, Oblivion
creator: Oblivion
date: 2019-07-24T11:24:51-00:00

Re: A terminal emulator widget for U++
type: item
description: Terminal based world map viewer is cool
creator: koldo
date: 2019-07-26T06:18:07-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello Koldo, Yeah it's very impressive tool. I enjoyed it. It also helps a lot for testing. Best regards, Oblivion
creator: Oblivion
date: 2019-07-27T09:30:37-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, A small but important update. True/direct (24-bit) color support has landed. It is added as a compile-time option this time. (It can be easily switched using TheIDE) The reason for this decision is that true color support increases the size of each cell by 4 bytes. (Not worriyingly high but I'm being cautious. ) Latest code of terminal package can be found at: https://github.com/ismail-yilmaz/upp-components/tree/master/ CtrlLib/Terminal Best regards, Oblivion
creator: Oblivion
date: 2019-07-29T21:23:38-00:00

Re: A terminal emulator widget for U++
type: item
description: Latest round of updates: Terminal: Clipboard and DND operations improved. Terminal: Drag animation for drag-copy operation implemented. Terminal: WhenClip event added. (Allows client code to inspect/accept/reject pasted/dropped clips. Terminal: Api doc updated accordingly. Best regards, Oblivion
creator: Oblivion
date: 2019-08-02T11:54:12-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, Terminal package is updated. Initial support for a rare but much requested feature in the world of terminal emulators has landed: - Sixel graphics support is added to the Terminal package. It is now possible to view sixel images, using the Terminal package. However, the initial support is only for external viewing. Embedded images are a TODO. - A basic terminal example with sixel viewer is also added to the package. - SixelRenderer class and a convenience function: RenderSixelImage is also added to the package. This class and the function can also be used as a stand-alone sixel renderer. - Alt-key handling is improved. A screenshot: The git repo address of upp-components: https://github.com/ismail-yilmaz/upp-components Reviews, criticism, patches, bug reports, etc., are always welcome. Best regards, Oblivion
creator: Oblivion
date: 2019-08-07T19:24:49-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, A small update on the progress of the Terminal ctrl's embedded image (sixel, etc.) support. (Note that I have yet to push changes. I'll problably push the changes next week, as there are some minor issues to solve.) This will not break the existing behavior. Sixel support will be available in both embedded and external mode. Best regards, Oblivion
creator: Oblivion
date: 2019-08-12T09:39:52-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, A day for big updates Terminal ctrl has gained embedded images and Upp::Display support. Terminal: Embedded images support is added (currently, sixel). Terminal: Renderer is improved and further optimized. Terminal: Upp::Display support for image objects are added. Terminal: LeftAlignedImageDisplay() and RightAlingnedImageDisplay() functions added. Screenshot: You can always find the new version here: https://github.com/ismail-yilmaz/upp-components/tree/master/ CtrlLib/Terminal Best regards, Oblivion
creator: Oblivion
date: 2019-08-16T12:29:25-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, Terminal package is finally updated to v0.2. Image rendering and handling mechanism is vastly improved. - Terminal: SixelRenderer class is rewritten; - Terminal: SixelRaster class, a StreamRaster interface for sixel images, is added to the package. - Terminal: A subset of xterm's window-op reports are implemented. - Terminal: An I/O synchronization issue with the PtyProcess class that led to artifacts on screen on some setups is fixed. - Terminal: Inline image support is improved. - Terminal: Room is made for other inline image protocols. - Terminal: WhenSixel event is removed in favor of a generic WhenImage event. - Terminal: Image rendering strategy is changed to cell-level rendering for further flexibility. - Terminal: An LRU-type shared image data cache is implemented. - Terminal: Support for Jexer, a modern text user interface (TUI) and windowing system for terminal emulators, is added. - Terminal: A general purpose data variable is added to the cell structure. - Terminal: SGR image flag is added to the cell structure. - Examples: Examples are further simplified. - Various optimizations and fixes. - Image gallery is updated. The "final boss" for this release was the jexer support. Jexer is a modern text user interface and window manager that runs inside terminal emulators. (It is an advanced terminal multiplexer.) There were only four high-end terminal emulators (xterm, mlterm, rlogin and jexer itself) fully supporting the jexer, Now they are five I've made short videos of Terminal ctrl. The ssh terminal example on windows also demonstrates the power of Core/SSH package. (It connects to a Linux device over 300 km distance, and runs jexer with inline images support, which is very demanding). On Linux - A basic terminal example with sixel graphics, and mouse tracking support. - Used apps and tools: Jexer text user interface (TUI), GNUPlot, Emacs, Nano, htop, ncurses demos. - Link: https://vimeo.com/359241367 On Windows - A basic SSH2 terminal example with …
creator: Oblivion
date: 2019-09-22T10:01:47-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, A new example is added to the package: Ssh terminal splitter. This example demonstrates the interaction between the Terminal widget and Ultimate++'s Core/SSH package, in a multithreaded environment. Therefore it also demonstrates the usage and power of U++s own Core/SSH package in a multithreaded GUI environment. Link to a short video showing the ssh terminal splitter in action on Windows: https://vimeo.com/362532208 A screenshot taken from the above video: Best regards, Oblivion
creator: Oblivion
date: 2019-09-28T20:00:38-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, Terminal package and Terminal ctrl is updated. There are fixes and clean-ups here and there, but most notably a new feature is added: Terminal ctrl is now able to display 24-bit jpeg, gif, bmp, etc. raster formats, using the Jexer Image Protocol and Upp's own StreamRaster interface. This means that if the raster images you are working with have registered decoders in upp/plugins, or somewhere else, Terminal ctrl will be able to display it. Four main benefits of this inline images protocol is: 1) It is "8-bit clean". It can be safely deliver images over the network, and with Utf-8. 2) Popular image formats can be decoded much faster than sixels. (Up to 8 to 10 times faster on bigger image files), and usually have a lower bandwidth requirements. 3) Allows 24 bit (true color) images. 4) The wire protocol is very simple. Screenshot with 24 bit images: (Taken from the pre-alpha version of Toad, a cross-platform, multithreaded SSH2 client with tabs and splitter support, that will be available in -hopefully- January 2020): Best regards, Oblivion
creator: Oblivion
date: 2019-11-03T14:03:14-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, A new week, and another update with new features. - Explicit hyperlinks support is added. - Standard menu improved and modularized. - Cell tracking methods are implemented. - Various fixes and cosmetics. - Docs are updated accordingly. Explicit hyperlinks are currently supported by GCC, ls, systemd, and a number of other high profile products. One advantage of this hyperlinks protocol is that it is relatively well-defined and cheap. To test it on linux, compile the TerminalExample, and run an updated version of the "ls" command: ls -l --hyperlink Gif: Best regards, Oblivion
creator: Oblivion
date: 2019-11-10T20:49:45-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, I have pushed another update, which contains features that were brewing for a while: - Terminal: Rectangle selection is now supported. - Terminal: Iniline images can now be copied to clipboard or sent to client. (It uses the same mechanism as hyperlinks: CTRL + double click or context menu) - Terminal: Options menu is implemented. Options menu contains the most relevant options for terminal. Screenshot: Best regards, Oblivion
creator: Oblivion
date: 2019-11-12T15:36:23-00:00

Re: A terminal emulator widget for U++
type: item
description: As a last minute bonus: DnD operations and animations are added for both hyperlinks and inline images. (Activated with CTRL-key modifier) Gif: Enjoy! Best regards, Oblivion
creator: Oblivion
date: 2019-11-12T19:08:40-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, Three months of silence is finally broken. Terminal package is scheduled to be updated to v0.3 on April 6, 2020. Meanwhile the package has seen tons of improvements. (Note that the changes are not pushed to git yet). Some highlights of the upcoming version: - Initial steps for scripting support (using the Esc language). - A proper double-width (Eastern-Asian/CJK) characters support. - A proper tmux/screen support. - A proper support for ISO 8613-6 true/indexed color formats. - A much faster renderer. (In some torture tests (such as ncurses/dots on fulscreen mode) the performance gain can be up to %80. And much more... (full list will be available with the release). I am currently testing the package for regressions. To whet yout appetite (tmux/screen, on Linux): Best regards, Oblivion
creator: Oblivion
date: 2020-03-25T13:20:10-00:00

Re: A terminal emulator widget for U++
type: item
description: Hi Oblivion For double-width font support are you using Harfbuzz? Will it support Indic scripts? Quote: - A proper double-width (Eastern-Asian/CJK) characters support.
creator: deep
date: 2020-03-25T18:12:36-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello Deepak, Quote: Will it support Indic scripts? This is my intention, with other scripts (Arabic, etc.) and Bi-directional rendering. But unfortunately it will not happen in the upcoming v0.3 release. At the moment what I can provide is double witdth support for CJK ideographs and other double width Asian characters. As for the harfbuzz, currently I am using what U++ uses on GTK and/or X11. And AFAIK, GTK 3.x uses harfbuzz by default. Best regards, Oblivion
creator: Oblivion
date: 2020-03-26T15:54:03-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, The day has come. Terminal package is upgraded to v0.3. This is a huge release, with lots of changes, fixes, additions and improvements. I am not going to list every change but some highlights here. If you want to see the full list, please check out the git history. - Source code is restructured. - Console class is ditched for the sake of simplicity. There is now only Terminal, deriving from Upp:CTrl. - Eastern-Asian/CJK double width characters support is added. - Text overline attribute is now supported. - APCs (application programming commands) are now supported. This is the first step towards terminal scripting feature. APCs can be also be used by client code for private purposes. - TRUECOLOR flag is removed. Terminal ctrl is now fully and officially a true color terminal emulator. - Accordingly, CMY and CMYK color spaces are now supported too! - Support for color text specifications (rgb, hash3, hash6, hash9, hash12) are added. - xterm window actions are reports are implemented. It is now possible for host apps to move, resize, minimize, maximize, fullscreen the terminal. - Renderer has seen a significat performance boost (up to 80% on some torture tests). - tmux/screen is fully supported. - Hyperlinks now show nice dots under their texts when they are "inactive" (i.e. no mouse hovering over them) - API docs and specifications docs are significantly improved. But how compliant is it? Using George Nachmann's (iTerm2's developer) excellent and comprehensive test suite (it is analogous to the browser standard compliance tests), esctest, the results are as follows: expected-terminal=xterm max-vt-level=4 Terminal ctrl: v0.3, passed 407 tests, failed on 101 tests, Terminal ctrl: v0.2 passed only 160 of the same tests. Let us now look at the latest stable version of Gnome terminal and Kitty, with same settings: expected-terminal=xterm max-vt-level=4 Gnome Terminal (v.3.36.1.1): passed 163 tests and failed on 345 tests. Kitty: passed 122 tests, and failed on 386 …
creator: Oblivion
date: 2020-04-10T00:17:43-00:00

Re: A terminal emulator widget for U++
type: item
description: A last minute bonus: Terminal ctrl now supports the popular iTerm2's inline image protocol too. (See api and specification docs for more details) Best regards, Oblivion
creator: Oblivion
date: 2020-04-10T22:30:11-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, Terminal ctrl has received a small but important update: Autowrap mode is fixed. The mode setting somehow got lost in the v0.2 -> v0.3 transition. I recommend you to update the package as the autowrap feature is widely used by command line applications. Best regards, Oblivion
creator: Oblivion
date: 2020-04-17T20:30:12-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, Terminal has gained two small features. - Jsonization support is added. - Xmlization support is added. It is now possible to store/load the configuration (including color table) of Terminal ctrl instances in/from xml and json files, in a human readable form. Also, missing tester methods (i.e, Isxxx()/Hasxxx()) are added and docs are updated accordingly. Best regards, Oblivion.
creator: Oblivion
date: 2020-04-21T16:35:14-00:00

Re: A terminal emulator widget for U++
type: item
description: A small but important news is that I've found a bottleneck in the Terminal ctrl's code that was puzzling me for some time. It was in the display update and scrolling mechanism. Hopefully I have fixed it. However, I won't push the change to github before I test it thoroughly and be sure it doesn't break anything. It appears that, after the fix, Terminal ctrl will be one of the most fastest out there. Below statistics are the average results of a test automatically run 100 times: All terminal emulators use the same font/page size settings, and run on Gnome 3.36 Results of command: time find /usr/share Terminal Emulator real user sys ----------------- ---------- ---------- ---------- Terminal Ctrl (Current): 0m23,104s 0m1,297s 0m2,879s Terminal Ctrl (with fix): **0m4,002s 0m0,774s 0m1,622s** xterm 0m15,059s 0m0,991s 0m2,527s Gnome Terminal 0m4,217s 0m0,778s 0m1,773s Kitty 0m4,907s 0m0,887s 0m2,325s If everything goes well, I will push this change next week. Best regards, Oblivion
creator: Oblivion
date: 2020-04-22T16:51:52-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, I have pushed the the critical performance fix that I mentioned in my last message. The main culprit was using a Vector where a BiVector was a much better option. In fact, it seems to be the optimal solution to the scrollback/hsitory buffer problem. Removing elements from the beginning of a Vector, especially when its length > 64K is -not surprisingly- very slow. BiVector solves exactly this problem because a scrollback buffer is mutated only from the either end. There was also a constant display refresh happening when a page was scrolled, even when a single line scrolled, degrading performance. This is fixed too. Now Terminal ctrl's scroll speed / throughput can be very fast. (It is Even faster than the above given numbers: ~3.5 secoonds on the same test while acting as a both SSH (using Upp/SSH package) and local terminal. ("time find /usr/share" command was outputting > 300.000 file paths in these tests, with the size of scrollback buffer of each terminal was set to 64 k) However, you can't see the real difference if you use the provided reference example codes, because they have a very rudimentary event loop. If you are curious and you want to test the scrolling/throughput performance of Terminal ctrl, you can use the below code: While still rudimentary, it is closer to real world scenarios. #include <Terminal/Terminal.h> #include <Terminal/PtyProcess.h> using namespace Upp; const char *nixshell = "/bin/bash"; struct TerminalExample : TopWindow { Terminal term; PtyProcess pty; TerminalExample() { SetRect(term.GetStdSize()); Sizeable().Zoomable().CenterScreen().Add(term.SizePos()); term.WhenBell = [=]() { BeepExclamation(); }; term.WhenTitle = [=](String s) { Title(s); }; term.WhenOutput = [=](String s) { pty.Write(s); }; term.WhenResize = [=]() { pty.SetSize(term.GetPageSize()); }; term.WhenLink = [=](const String& s) { PromptOK(s); }; term.InlineImages().Hyperlinks().WindowOps().DynamicColors(); term.SetHistorySize(65536); } void Run() { pty.Start(nixshe…
creator: Oblivion
date: 2020-04-24T22:36:07-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, Terminal ctrl is updated. It has gained a new feature that is found on most popular vt emulators: - Auto-hide option for mouse cursor is added. Terminal ctrl can be configured to automatically hide the mouse pointer when the user types a text. There are also small bug fixes here and there. Best regards, Oblivion
creator: Oblivion
date: 2020-05-15T16:01:19-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, Ranger, a terminal based file manager, can now show image previews via iterm2's inline image protocol, on terminal ctrl. By the way, I am planning to implement optional, range-based font substitution for Terminal ctrl v0.4 (2020.2, synced with U++). My initial plan is to give the client the ability to compose a font list (using a simple structure called Terminal::RangeFont), and pass it to terminal ctrl instances so the client will be responsible for taking care of the list. (Similar to how Upp::Display objects are handled.) If you have any other suggestions I have opened a ticket for it. Feel free to share your ideas. Best regards, Oblivion.
creator: Oblivion
date: 2020-05-17T20:20:55-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, This week on Terminal ctrl: - Initial support for copy-on-select style (X11-style) text selection is added. - Terminal ctrl recognizes CMY/CMYK and urxvt-style RGBA color text specifications via dynamic colors extension. Best regards, Oblivion
creator: Oblivion
date: 2020-05-22T14:08:08-00:00

Re: A terminal emulator widget for U++
type: item
description: Hi oblivion Just found this - looks great! I want to test if Terminal fits the needs of my app, but fail to find a HowTo on installing it in my upp-dev-environment (which is standard) in order to use/test using it in my app. Can you pls supply a HowTo for access/use of Terminal in a blank/new project? thx
creator: slashupp
date: 2020-05-28T06:30:48-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello slashupp, Quote: I want to test if Terminal fits the needs of my app, but fail to find a HowTo on installing it in my upp-dev-environment (which is standard) Yes, this is missing from the docs. I will update it next week. In the meantime, How to get it: Terminal is a regular ctrl. It does not require anything other than U++ (ver >= 2020.1, because I use some new color methods which simplified the color management code.) If you want to try it out, you can: a) Clone the upp-components git repository (This is the recommended way to get updates,etc.) and set up an assembly in TheIDE for upp-components/CtrlLib (It is no different than adding another "bazaar") b) Simply download the repo, unzip it, and move the CtrlLib/Terminal folder to your preferred folder. Now that you have the source code, It should compile out of the box. There should be no need for tweaking, etc. How to use it: Well, the upp-components/Examples section already contains example code for different, basic use cases, I suggest you check there and play with them first (if you haven't already). They are pretty simple. A minimal example is here upp-components/Examples/TerminalExample (That minimal example, by the way, can run almost anything, out of the box) Steps to write your own code: 1) Check the API docs first. Terminal ctrl contains regular topic++ files for TheIDE. It should be available through TheIDE's help system. 2) Create a CtrlLib application (basic or with layout, it's up to you. Terminal ctrl contains a layout file, so you can use it in TheIDE's layout editor.) 3) Add Terminal ctrl to you app. As it is a regular ctrl, it can be added to your window or any other "parent" ctrl via Ctrl::Add() method. 4) If you are going to use it as a local terminal, using a pty (currently on POSIX only), then Terminal package contains a PtyProcess class. Add #include <Terminal/PtyProcess.h> to your app. Then all you need to do is set up the events and loop. Provided examples use a rudimentary loop whic…
creator: Oblivion
date: 2020-05-28T09:36:26-00:00

Re: A terminal emulator widget for U++
type: item
description: An example demonstrating the absolute minimum setup for a standalone terminal app, and two different loops: #include <Terminal/Terminal.h> #include <Terminal/PtyProcess.h> using namespace Upp; struct MinimalTerminalExample : TopWindow { Terminal term; // A terminal ctrl instance. PtyProcess pty; // A pseudoconsole process instance. MinimalTerminalExample() { SetRect(0, 0, 800, 600); Sizeable().Zoomable().CenterScreen().Add(term.SizePos()); term.WhenOutput = [=](String out) { pty.Write(out); }; // Terminal output term.WhenResize = [=] { pty.SetSize(term.GetPageSize()); }; // Notifies the pty about page size changes. pty.Start("/bin/bash", Environment(), GetHomeDirectory()); // Start a shell process on pty. // For a reasonable throughput, a callback-based loop is sufficient. SetTimeCallback(-1, [=] { term.WriteUtf8(pty.Get()); if(!pty.IsRunning()) Break(); }); } // For very high throughput, below loop (or something better) can be used. // // void Run() // { // pty.Start("/bin/bash", Environment(), GetHomeDirectory()); // OpenMain(); // while(IsOpen() && pty.IsRunning()) { // ProcessEvents(); // String s = pty.Get(); // PtyProcess reads are non-blocking. // if(!IsNull(s)) // term.WriteUtf8(s); // int l = s.GetLength(); // Sleep(l >= 1024 ? 1024 * 10 / l : 10); // Scale... // } // } }; GUI_APP_MAIN { MinimalTerminalExample().Run(); } Best regards, Oblivion
creator: Oblivion
date: 2020-05-29T10:40:48-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, Terminal ctrl is updated. It has a number of under-the-hood improvements that lead to higher performance/throughput. To give you an idea, here are some benchmark results I've been compiling (both synthetic and real-usage) for some time: CPU: AMD FX 6100 - Black Edition (Six-core processor) Memory: 8 GiB, DDR-3 1800 Mhz Storage: 128 Gib SSD, 1Tib HDD Graphics: AMD Radeon R7 240, 2GiB Monitor: LCD, HD (1080p) OS/Kernel: Arch/Linux 5.6 (x86_64) Desktop: GNOME 3.36 (X11) Framework: Ultimate++ 2020.1 (alpha) Flags: GUI Compilers: GCC 10.0.1 CLANG 10.0.0 Application: TerminalExample (with a high throughput loop). Font: The same IBM Plex Mono, monospace font used in all tests. Disclaimer: The benchmarks below do not represent any competition. They don't represent any weak spots of the mentioned terminals. They are all high quality stuff. The sole purpose of these benchmarks is to give an idea as to where the Terminal ctrl's "engine" performance stands ATM. Note: All benchmarks are repeated 50 times, automatically. The performance difference between GCC/CLANG builds is negligable. The latest stable versions of the mentioned terminals are used in these tests (as of May-June 2020). Results of command: "time find /usr", file count: 415897, page size: 237 x 55, Monospace Font) Terminal Emulator real user sys Notes ----------------- ---------- ---------- ---------- ---------- Alacritty 0m3,776s 0m1,134s 0m2,637s Scrollback buffer size: 64k Terminal ctrl 0m4,126s 0m1,202s 0m2,466s Scrollback buffer size: 64k Kitty 0m5,608s 0m1,224s 0m2,763s Scrollback buffer size: 64k Gnome Terminal 0m6,785s 0m1,243s 0m3,015s Scrollback buffer size: 64k xterm 0m24,368s 0m1,661s 0m3,766s Scrollback buffer size: 64k Terminal Emulator real user sys Notes ----------------- ---------- ---------- ---------- ---------- Simple terminal (0.8) 0m3,791s 0m1,162s 0m2,533s Has no scrollback buffer. Terminal ctrl (0.3) 0m3,971s 0m1,120s 0m2,472s Scrollback disabled. Terminal Emulator real user sys Notes…
creator: Oblivion
date: 2020-06-06T11:57:44-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, Terminal ctrl's TURTLE backend support was broken for some time. The reason: Apparently there is no Upp::Append() method for image drag and drop (Or I am missing something...). I've committed a patch to workaround this problem by disabling image drag-and-drops in Turtle backend. A good news is that it is now possible to compile Terminal Ctrl for linux framebuffer, using the LinuxFrameBuffer package. There are some rough edges (e.g. the mouse wheel does not work ATM), but it is basically working on linux framebuffer too. However, currently the support for linux framebuffer is "unofficial". If you are going to try it at all, TRY IT AT YOUR OWN RISK. I will focus on these backends after the V0.4 release... Best regards, Oblivion.
creator: Oblivion
date: 2020-06-09T21:48:27-00:00

Re: A terminal emulator widget for U++
type: item
description: Oblivion wrote on Tue, 09 June 2020 23:48 A good news is that it is now possible to compile Terminal Ctrl for linux framebuffer, using the LinuxFrameBuffer package. There are some rough edges (e.g. the mouse wheel does not work ATM), but it is basically working on linux framebuffer too. Hi Oblivion, I've added wheel event to framebuffer package. Please check it.
creator: Zbych
date: 2020-06-10T22:13:56-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello Zbych, Thank you for your efforts! Indeed, it is working now. Since you are here, allow me to point out two problems I've encountered while testing both terminal package and others (uword, for example). - Text mode is not disabled on linuxframebuffer based apps when they are run from the linux (tested with v5.6) console. (The framebuffer display is overwritten by text and messages). The "fix" seems to be setting the STDINPUT to KD_GRAPHICS and resetting it to KD_TEXT before the app exits (using ioctl). But since I don't know the specifics of LinuxFrameBuffer package, I can't give more info as to where the problem lies. - Both on UWord and Terminal package, the return/enter keys are sending the keycode twice (or so it appears: text cursor is not moved to next line but two lines below.) Best regards, Oblivion
creator: Oblivion
date: 2020-06-11T09:08:08-00:00

Re: A terminal emulator widget for U++
type: item
description: Hi, I'm still working on range-based font substituiton feature. And I have finally prototyped the mechanism. The screenshot below uses the legacy demo.txt file for demonstration. It displays four (default + additional three) fonts for different glyph ranges on the same page. Font configuration: IBM Plex Mono: 0x0020-0x07FF (Base glyphs) Fira Code Mono: 0x2500-0x259f (Box drawing glyphs) GNU Free Mono: 0x2800-0x28FF (Braille glyphs) Awesome Mono: ------------- (Other glyphs) It has its rough edges, but "it works" fine with a negligable performance hit. Note that this feature will not be available before v0.4. Best regards, Oblivion
creator: Oblivion
date: 2020-06-17T22:36:24-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello, A screengrab of Terminal ctrl on Linux framebuffer. Note: This is only an experimental feature yet to be refined and still unofficial. However, Thanks to Zbych, the LinuxFrameBuffer package has been updated, and line feeds are working as expected now. (There are other similar problems but I'm noting them down, so that I can provide feedback. Best regards, Oblivion
creator: Oblivion
date: 2020-06-21T17:35:39-00:00

Re: A terminal emulator widget for U++
type: item
description: Oblivion wrote on Thu, 11 June 2020 11:08 - Text mode is not disabled on linuxframebuffer based apps when they are run from the linux (tested with v5.6) console. (The framebuffer display is overwritten by text and messages). The "fix" seems to be setting the STDINPUT to KD_GRAPHICS and resetting it to KD_TEXT before the app exits (using ioctl) I did some research and it appears that turning keyboard off in virtual terminal is correct solution. Unfortunately neither ioctl(tty_handle, KDSKBMUTE, 1) nor ioctl(tty_handle, KDSKBMODE, K_OFF) solves the problem with keys leaking to the console. They simply return error "Operation not permitted". In case you want to do more tests: https://chromium.googlesource.com/chromium/chromium/+/trunk/ ui/ozone/platform/dri/virtual_terminal_manager.cc https://github.com/LuaDist/sdl/blob/master/src/input/evdev/S DL_evdev.c#L395
creator: Zbych
date: 2020-06-21T20:16:34-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello Zbych, Quote: I did some research and it appears that turning keyboard off in virtual terminal is correct solution. Unfortunately neither ioctl(tty_handle, KDSKBMUTE, 1) nor ioctl(tty_handle, KDSKBMODE, K_RAW) solves the problem with keys leaking to the console. They simply return error "Operation not permitted". Again, thank you very much for your efforts! Also thanks for the links. I am going to look into LinuxFrameBuffer code in the following days and if I can come up with a workaround or solution, I'll send a patch to review. By the way, did you try to set STDIN_FILENO to KD_GRAPHICS too? because IIRC, that (Setting both input and output to graphics mode) was the trick used by an app whose name I forgot now, some time ago.) I'd really love to see Terminal ctrl run on linux frame buffer, because then I can get rid of unnecessary cruft on my personal servers. Best regards, Oblivion
creator: Oblivion
date: 2020-06-21T20:36:11-00:00

Re: A terminal emulator widget for U++
type: item
description: Oblivion wrote on Sun, 21 June 2020 22:36 By the way, did you try to set STDIN_FILENO to KD_GRAPHICS too? Do you mean using STDIN_FILENO in ioctl(STDIN_FILENO, KDSETMODE, KD_GRAPHICS)? it returns error: Inappropriate ioctl for device (25) In my tests I pass path to virtual terminal manually (for example /dev/tty3), I decided to leave tty number autodetection as next step.
creator: Zbych
date: 2020-06-21T20:47:03-00:00

Re: A terminal emulator widget for U++
type: item
description: Yeah, but I am not sure as to how, ATM. (Maybe I am not remembering it correctly). I'll do some investigation and let you know. Best regards, Oblivion
creator: Oblivion
date: 2020-06-21T20:54:33-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello Zbych, I've -hopefully- solved the "key leakage" problem in LinuxFrameBuffer package. It required sone changes in the existing code and some additions. I will upload the patched code for you to review on this weedkend. Best regards, Oblivion
creator: Oblivion
date: 2020-06-25T06:36:46-00:00

Re: A terminal emulator widget for U++
type: item
description: Oblivion wrote on Thu, 25 June 2020 08:36 I've -hopefully- solved the "key leakage" problem in LinuxFrameBuffer package. I am glad you've found the solution.
creator: Zbych
date: 2020-06-25T18:40:12-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello Zbych, I have attached the patched LinuxFrameBuffer package for you to review. Feel free to comment on it. Package is compiled with the latest stable GCC and CLANG on Linux v5.4 and v5.6 machines. For testing, I used the supplied LinuxFrameBufferExample (UWord) code, Terminal ctrl, and some other U++ examples made to run on FB backend. Changes/additions: - Automatic VT allocation mechanism is implemented. Since U++ suppports function keys from F1 to F12, I have limited the valid VT numbers within tty1-tty12 range (This can be easily changed if required). - Accordingly, VT switching is implemented. Since we mute the vt keyboard input, this required manual handling of the linux signals, and as a result the vt handle had to be made a global static integeer (atomic). - To prevent any screen buffer damage, U++ linuxframebuffer backend now does not copy the drawn image onto framebuffer when the vt is switched away (i,e., whem it loses focus). - Accordingly, CTRL + ALT + [F1-f12] key combinations are reserved for VT switching. Remaining issues: - SHIFT keys are not working properly. (Can't get any capital letters.) - No double click. - No key repeat. I am not sure about the security implications though. If you find any problem, let me know. Best regards, Oblivion
creator: Oblivion
date: 2020-06-28T09:57:39-00:00

Re: A terminal emulator widget for U++
type: item
description: 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
creator: Oblivion
date: 2020-07-05T15:40:27-00:00

Re: A terminal emulator widget for U++
type: item
description: 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
creator: Oblivion
date: 2020-07-14T12:44:27-00:00

Re: A terminal emulator widget for U++
type: item
description: 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: That's Windows powershell (tm) running natively on the basic terminal example, on Windows 10. 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
creator: Oblivion
date: 2020-08-01T18:48:20-00:00

Re: A terminal emulator widget for U++
type: item
description: 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): If you have any questions, suggestions, bug reports, etc., let me know. Cheers! Oblivion
creator: Oblivion
date: 2020-08-21T11:29:59-00:00

Re: A terminal emulator widget for U++
type: item
description: 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: Consider it also as a demo for the SshShell component of Core/SSH package. Best regards, Oblivion.
creator: Oblivion
date: 2020-09-05T14:45:39-00:00

Re: A terminal emulator widget for U++
type: item
description: 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
creator: Oblivion
date: 2020-10-01T16:11:58-00:00

Re: A terminal emulator widget for U++
type: item
description: 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++ 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): If you have any questions, ideas, bug reports, etc. let me know. Best regards, Oblivion
creator: Oblivion
date: 2020-10-13T10:41:14-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello Oblivion, TerminalCtrl look amazing. Good job! Right now I am waiting for the Upp DE with Your terminal App Klugier
creator: Klugier
date: 2020-10-13T18:41:28-00:00

Re: A terminal emulator widget for U++
type: item
description: 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.
creator: hongnod
date: 2020-12-03T14:05:08-00:00

Re: A terminal emulator widget for U++
type: item
description: 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
creator: Oblivion
date: 2020-12-03T15:25:30-00:00

Re: A terminal emulator widget for U++
type: item
description: Eager to taste it!
creator: hongnod
date: 2020-12-04T05:58:39-00:00

Re: A terminal emulator widget for U++
type: item
description: 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! Best regards, Oblivion
creator: Oblivion
date: 2020-12-05T15:21:40-00:00

Re: A terminal emulator widget for U++
type: item
description: 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
creator: Oblivion
date: 2020-12-08T23:54:42-00:00

Re: A terminal emulator widget for U++
type: item
description: 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: If you have any questions or suggestions, let me know. Best regards, Oblivion
creator: Oblivion
date: 2021-01-23T00:25:27-00:00

Re: A terminal emulator widget for U++
type: item
description: 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. 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
creator: Oblivion
date: 2021-02-01T20:18:15-00:00

Re: A terminal emulator widget for U++
type: item
description: 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
creator: Oblivion
date: 2021-02-03T16:12:30-00:00

Re: A terminal emulator widget for U++
type: item
description: 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
creator: Oblivion
date: 2021-02-12T16:42:09-00:00

Re: A terminal emulator widget for U++
type: item
description: Hello Oblivion, Glad to hear that it is available on UppHub 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: Maybe it is somehow related to white them. Please check! Klugier
creator: Klugier
date: 2021-02-12T20:58:46-00:00

Re: A terminal emulator widget for U++
type: item
description: 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! ) 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
creator: Oblivion
date: 2021-02-12T21:26:13-00:00

Re: A terminal emulator widget for U++
type: item
description: 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
creator: Klugier
date: 2021-02-12T22:00:51-00:00

Re: A terminal emulator widget for U++
type: item
description: 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. We can call it a bash config/theme clash and a false alarm. Best regards, Oblivion
creator: Oblivion
date: 2021-02-12T22:14:06-00:00

Re: A terminal emulator widget for U++
type: item
description: 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): Best regards, Oblivion
creator: Oblivion
date: 2021-02-23T21:57:43-00:00

Re: A terminal emulator widget for U++
type: item
description: 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. 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. If you have any questions, bug reports, suggestions criticism, etc. let me know. Best regards, Oblivion
creator: Oblivion
date: 2021-02-27T21:07:28-00:00

Re: A terminal emulator widget for U++
type: item
description: 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
creator: Oblivion
date: 2021-03-01T22:49:42-00:00

Re: A terminal emulator widget for U++
type: item
description: 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. Best regards, Oblivion
creator: Oblivion
date: 2021-03-03T19:45:26-00:00

Re: A terminal emulator widget for U++
type: item
description: 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
creator: Oblivion
date: 2021-03-07T13:42:16-00:00

Re: A terminal emulator widget for U++
type: item
description: 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
creator: Oblivion
date: 2021-05-01T12:17:34-00:00

Re: A terminal emulator widget for U++
type: item
description: 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): This will be available next week. Best regards, Oblivion
creator: Oblivion
date: 2021-05-25T11:00:53-00:00

Re: A terminal emulator widget for U++
type: item
description: 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) Best regards, Oblivion
creator: Oblivion
date: 2021-05-27T18:39:32-00:00

Re: A terminal emulator widget for U++
type: item
description: 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
creator: Oblivion
date: 2021-05-29T16:08:50-00:00

Re: A terminal emulator widget for U++
type: item
description: 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).
creator: Novo
date: 2021-06-15T14:41:32-00:00

Re: A terminal emulator widget for U++
type: item
description: 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
creator: Klugier
date: 2021-11-26T22:19:10-00:00

Re: A terminal emulator widget for U++
type: item
description: 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. ) 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. A side note: I use vim and emacs, htop, ranger on TerminalCtrl regularly. Best regards, Oblivion
creator: Oblivion
date: 2021-11-27T06:51:54-00:00

Re: A terminal emulator widget for U++
type: item
description: 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: Best regards, Oblivion
creator: Oblivion
date: 2021-11-27T09:47:26-00:00

Re: A terminal emulator widget for U++
type: item
description: 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)
creator: slashupp
date: 2021-12-21T06:39:57-00:00

Re: A terminal emulator widget for U++
type: item
description: 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
creator: Oblivion
date: 2021-12-21T08:40:34-00:00

Re: A terminal emulator widget for U++
type: item
description: 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) 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
creator: Oblivion
date: 2022-02-12T18:16:23-00:00

Re: A terminal emulator widget for U++
type: item
description: 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.
creator: jjacksonRIAB
date: 2022-05-20T09:48:48-00:00

Re: A terminal emulator widget for U++
type: item
description: 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
creator: jjacksonRIAB
date: 2022-05-20T11:53:59-00:00

Re: A terminal emulator widget for U++
type: item
description: 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
creator: Oblivion
date: 2022-05-20T21:24:50-00:00