Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
12 user(s) are online (7 user(s) are browsing Forums)

Members: 0
Guests: 12

more...
Support us!
Recent OS4 Files
OS4Depot.net



« 1 (2)


Re: SSH client for AmigaOS with builtin terminal emulation
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1690
@salass00

Quote:

The bullet API code is however not working at the moment because both of the two fonts I've tried ("Bitstream Vera Sans Mono.font" and "DejaVu Sans Mono.font") return FALSE for OT_IsFixed and zero values for OT_YSizeFactor and OT_SpaceWidth.


Turns out that I was doing this wrong.

Instead of doing:

ULONG isfixed;

IDiskfont->EObtainInfo(olf->olf_EEngine, OT_IsFixed, &isfixed, TAG_END);

I should be doing:

isfixed = IUtility->GetTagData(OT_IsFixed, FALSE, olf->olf_OTagList);

   Report Go to top

Re: SSH client for AmigaOS with builtin terminal emulation
Just popping in
Joined:
2006/12/2 1:41
From VA, USA
Posts: 237
@salass00

Keep up the great work Fredrik! Looking forward to your
work on the SSH client. Sent some paper thanks.

I was wondering about the terminal emulation aspect of
your client... Are doing your own implementation of ANSI,
VT codes or how is that going to work?

I've been using the console with SSH on a shell account for
years, but it's always been a challenge. Hard to set up.
Hard to get the server talking with the Amiga. Hard to
keep working (apps no longer seem to pay attention to
TermCap, etc., like Alpine).

Very curious to hear what your plans are and how things are
going!

THANKS again,

PJS

   Report Go to top

Re: SSH client for AmigaOS with builtin terminal emulation
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1690
@pjs

Thanks for the donation!

Quote:

I was wondering about the terminal emulation aspect of
your client... Are doing your own implementation of ANSI,
VT codes or how is that going to work?


Right now I'm using libtmt which provides a pretty basic ansi terminal emulation. Later I might look into using libtsm which is similar and has more features, but is also more complex.

Basically libtsm provides the terminal emulation so I feed it whatever data comes from the ssh channel and it handles it appropriately.

What libtsm doesn't do is anything platform specific like opening a window, drawing text or handling input from the user. To do rendering libtsm lets you provide a callback function which is called when the display needs to be updated, like if there is new text or the text cursor has been moved.

The input handling I do right now using IDCMP_RAWKEY and IKeyMap->MapRawKey(), but I think I might change this as MapRawKey() converts some special keys (cursor keys, page up/down, home/end, etc.) into amiga style CSI codes which are not completely ansi compatible. I have some code in place to convert them into ansi but I think it would be easier for me to convert these keys directly from the raw key codes.

   Report Go to top

Re: SSH client for AmigaOS with builtin terminal emulation
Just popping in
Joined:
2017/10/28 10:03
From Netherlands
Posts: 28
@salass00

Cant wait to try out your SSH client. Donation send!



_________________
AmigaOne X5000 -> 2GHz / 16GB RAM / Radeon R7 250 / M-Audio 5.1 -> AmigaOS 4.1 FE / Ubuntu Linux
Amiga 1200 -> Recapped / 68ec020 ACA 1221ec / CF HDD / RetroNET connected to the world
   Report Go to top

Re: SSH client for AmigaOS with builtin terminal emulation
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1690
@Skateman

Thanks for the donation!

   Report Go to top

Re: SSH client for AmigaOS with builtin terminal emulation
Just popping in
Joined:
2008/8/21 0:11
Posts: 70
@salass00

Any update you want to share? I check every day :)

Cheers,
Bill "tekmage" Borsari

   Report Go to top

Re: SSH client for AmigaOS with builtin terminal emulation
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1690
@tekmage

Not much visible progress in the program.

I did add code for a password requester which I had left out before and actually forgotten that I did that because I use ssh-agent/ssh-add when testing so I don't have to type in my passphrase every time.

I also rewrote the entire terminal emulation part of the code using libtsm and made it into a private BOOPSI gadget class.

   Report Go to top

Re: SSH client for AmigaOS with builtin terminal emulation
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1690
A couple of things that I intend to work on next:

- Rewrite keyboard input handling and let termgclass and libtsm handle most of the work. I was going to use tsm_vte_handle_keyboard() but it seems to expect X11 codes, so it is probably simpler and more efficient to write a similar function that handles AmigaOS raw key codes directly.

- Move init and cleanup of ssh session into helper functions making it easier to change and extend the program in the future. In order to achieve this all the ssh session data need to be stored in a struct rather than being spread out in a bunch of local variables as they are now.

   Report Go to top

Re: SSH client for AmigaOS with builtin terminal emulation
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1690
The rewrite of the keyboard input handling is done now, and it's using the new tsm_vte_handle_keyboard_amiga() function.

Not all of the special keys are implemented but of some that are they are working much better now (i.e. correctly).

A new problem that I have yet to get to the bottom of though, is that every time I type a letter the cursor moves to the start of the command line prompt which means that if I write "exit" it comes out as "tixe" instead.

Edit: The problem was because I was lazily assuming that the output data would always be NUL-terminated as with libtmt. With single characters it isn't so a stray '\x01' character was always sent as well.


Edited by salass00 on 2019/10/23 9:08:54
   Report Go to top

Re: SSH client for AmigaOS with builtin terminal emulation
Just can't stay away
Joined:
2006/11/26 16:47
Posts: 1431
Sweet!

   Report Go to top

Re: SSH client for AmigaOS with builtin terminal emulation
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1690
Marking text with mouse and copy to clipboard with RAMIGA+C (or Edit->Copy from menu) is now supported and paste operation is currently being worked on.

Initially marking text was extremely slow due to the libtsm functions involved forcing an update of the entire terminal display, but after rewriting the aging code so that it only updates the cells that have changed it is very fast and uses very little CPU.

Menus are also now implemented, as is iconification for the terminal window (very easy to do now that I'm using window.class).

   Report Go to top

Re: SSH client for AmigaOS with builtin terminal emulation
Just popping in
Joined:
2006/11/29 7:57
Posts: 144
@salass00

How do you plan to release it?

Is it in a future OS4 update, enhancer, a free download from somewhere or as a paid download or maybe something else?

   Report Go to top

Re: SSH client for AmigaOS with builtin terminal emulation
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1690
@smf

I haven't decided yet.

While the idea of releasing a program on AmiStore for a small fee does have some appeal to me, not least because I could use the money, it might be too much of a niche product for that to be worth it though.

   Report Go to top

Re: SSH client for AmigaOS with builtin terminal emulation
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1690
I had to make some small extensions to the libtsm API, but it is now possible to attach a scroller to the termgclass terminal display and use it to scroll within the libtsm scrollback buffer.

It is a little slow on my Sam460 at the moment given that it's redrawing every cell of the terminal display, but I'm hoping that I can make the incremental scrolling faster by using ScrollRasterBF() and only redrawing the new lines and any damaged window regions that are exposed by the operation (if the window is partially covered up by another one).

   Report Go to top

Re: SSH client for AmigaOS with builtin terminal emulation
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1690
Scrolling now uses a separate refresh type, which uses ScrollRasterBF(), and is much faster because of it, and really responsive on the Sam460 I use for testing.

BTW, assuming that you have a new enough z.library (V53.5) and AmiSSL (V4.3) installed it even works under 4.1 update #6 (I just tested it).

   Report Go to top

Re: SSH client for AmigaOS with builtin terminal emulation
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1690
Resizing of the terminal window is now mostly supported. What is missing still is code to request a new size from the remote host.

In implementing this I ran into a few problems that should be fixed now.

First off GM_LAYOUT which notifies the termgclass that it now has a new size is called from the context of input.device even if LAYOUT_DeferLayout is TRUE. This caused problems with the newlib memory allocation routines because they rely on the pr_CLibData field which does not exist for a task. After trying a few different workarounds the easiest solution I found was to just use a custom memory allocator, which for now is based on dlmalloc (same as newlib.library one) but a little simpler.

One of the other solutions I tried was to use clib2-ts, but clib2's UTF-8 support is too lacking and it made the executable a lot bigger, so I scrapped that idea.

The other problems were cosmetic in that libtsm would add empty lines when the window was made bigger, when it could have simply moved in lines from the scrollback buffer, and also when the window was made smaller these empty lines would not get removed resulting in unnecessary scrolling.

I've fixed those problems as well now, however it took a very long time as I made quite a few mistakes along the way and every time it would crash it would hard lock the computer without producing any useful GR or stack trace because the crashes were in GM_LAYOUT on input.device context.

   Report Go to top


« 1 (2)



[Advanced Search]


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project