sorenisanerd / gotty

Share your terminal as a web application
MIT License
2.15k stars 138 forks source link

scrollback and file downloads #33

Closed masterkain closed 2 years ago

masterkain commented 2 years ago

hello, excuse me if this is not the right place but I have two questions:

1) is there a way to control how many lines we can scroll back? 2) I've seen some work in the master branch pointing to some gui to allow download/uploads but I see no mention in the readme -- how is that supposed to work / can we test it?

currently my docker entrypoint is

#!/bin/bash

PARAMS="--permit-write"

gotty $PARAMS /bin/bash

and builder

FROM golang:1.16-alpine as builder

RUN apk add --update --no-cache git

RUN go get github.com/sorenisanerd/gotty

thanks

update: I installed lrzsz on alpine, which provides these files https://pkgs.alpinelinux.org/contents?branch=edge&name=lrzsz&arch=x86&repo=testing

I tried some lsz test.txt but I see no file dialog, in the remote web terminal:

bash-5.1# cat test.txt 
wwww
bash-5.1# lsz test.txt 
�*B00000000000000

and the terminal blocks

update 2:

I updated my dockerfile to ensure master version is correctly used:

FROM golang:1.18-alpine as builder

RUN apk add --update --no-cache git

RUN go install github.com/sorenisanerd/gotty@master

and file download works, nice job :)

sorenisanerd commented 2 years ago

xterm.js's default is 1000 lines of scrollback. There is not currently a straightforward way for you to override that.