tombh/texttop

Partager

data image

Hello beginners. This has without warning obtained some unplanned exposure. I’m in actual fact within the center of a total rewrite on the webext-rewrite branch. That you may presumably salvage an thought of my manner with this plot: https://github.com/tombh/texttop/blob/webext-rewrite/webext/src/text_builder.js#L165

After the success of hitting the entrance page of Hacker News final 365 days, I basically wished to sit down down down and flip this proof of belief into something true. So now not handiest am I engaged on true text strengthen (you may for sure copy and paste without even zooming). But I’ve removed the dependencies on ffmpeg, Xorg (for Firefox as a minimal – Chrome strangely doesn’t strengthen webextensions in headless mode), docker AND this can work on all webextension-contend with minded browsers. It’ll be a single defective-platform, static Shuffle binary, that launches your most neatly-most traditional browser within the background.

In total or now not it’s imperfect apt fortune to chat about something before or now not it’s carried out, but seeing as or now not it’s without warning getting consideration but all all over again I wanted to let all those know that I’m making this 10 instances higher.

A fully interactive X Linux desktop rendered to TTY and streamed over SSH

or Firefox in your terminal 😲

Alt Text

This Youtube video presents a extra devoted rendition of the journey.

Why?

I’m travelling across the world and regularly I salvage now not have very correct Web. If all I have is a 3kbps connection
tethered from my phone then or now not it’s correct to SSH into my server and browse the salvage through elinks.
That technique my server downloads the salvage pages and uses the tiny bandwidth of my SSH connection to veil the consequence. But
it lacks JS strengthen and all that completely different sleek HTML5 goodness. Texttop is merely one design to have the energy of a miles away
server working a desktop, but interfaced throughout the simplicity of a terminal and very low bandwidth.

Why now not VNC? Smartly VNC is without anguish one resolution but it no doubt doesn’t quite have the comparable skill to contend with extremely imperfect
Web. Texttop uses MoSH to extra minimize the bandwidth and balance necessities of the connection. Mosh presents functions contend with
computerized reconnection of dropped connections and diff-handiest veil veil updates. Also, completely different than SSH or MoSH, Texttop doesn’t
require a consumer contend with VNC. But for sure one other fantastic motive within the again of Texttop is that or now not it’s correct very cool geekery.

Quickstart

In case you correct are searching for to have a play in your native machine:

docker stir --rm -it tombh/texttop sh
./stir.sh

Set up

That you may presumably either pull from the Docker Registry:
docker pull tombh/texttop
or, designate yourself:

git clone https://github.com/tombh/texttop.git
cd texttop
docker designate -t texttop .

The docker image is handiest ~275MB.

Utilization

To your a ways away server (this would possibly occasionally pull the docker image the first time you peril it):

docker stir -d 
  -p 7777:7777 -p 60000-60020:60000-60020/udp 
  -v ${HOME}/.ssh:/root/.ssh:ro 
  tombh/texttop

Point to that this assumes you may perchance have already obtained SSH setup in your server and that you simply may perchance have your public key there. Password
logins work graceful too. The 60000-60020 port fluctuate is for MoSH.

Then in your native machine:

mosh user@yourserver:7777
./stir.sh

MoSH is offered through most system equipment managers. SSH would possibly per chance also additionally be approved exactly the comparable, correct change mosh with ssh.

user@yourserver is the long-established URI you’d spend to connect by assignment of SSH.

Exiting
CTRL+ALT+Q will drop you again to the docker container’s CLI. That you may presumably delivery but all all over again with ./stir.sh

If MoSH or SSH change into unresponsive you may exit MoSH with CTRL+^ . or SSH with ENTER ~ .

Interaction

  • CTRL + mousewheel to zoom
  • CTRL + click on/walk to pan

Most mouse and keyboard input is precisely the comparable as a long-established desktop. In case your terminal is active then you may click on,
kind, scroll, spend arrow keys and walk issues around. Nonetheless there are level-headed some issues now not available, contend with reproduction and
paste. The necessary distinction from a long-established desktop is you may zoom and pan the desktop by utilizing CTRL + mousewheel and
CTRL + walk. Here’s extremely helpful as or now not it’s onerous to ascertain what’s what when you are zoomed edifying out.

Keyboard Mode

In case your terminal doesn’t strengthen mouse input then you may swap out and in of keyboard mode with CTRL+ALT+M.
This would perchance come up with the following shortcuts:

u mouse up
n mouse down
h mouse left
okay mouse edifying

SHIFT+u pan up
SHIFT+n pan down
SHIFT+h pan left
SHIFT+okay pan edifying

CTRL+u zoom in
CTRL+n zoom out

j left-click on
r edifying-click on
t center-click on

Including new applications

In the meanwhile, handiest Firefox is installed on this extremely minimal Alpine Linux distro. Nonetheless you may add new packages
with apk. Example;

# Login with a seperate session
apk --no-cache add xterm
export DISPLAY=:0
xterm &

Accurate endure in thoughts that you simply’re going to lose any system adjustments if you restart the docker container. I’m smitten by strategies to
save tell. You can experiment with mounting sure system directories. Eg;

docker stir -d 
  -p 7777:7777 -p 60000-60020:60000-60020/udp 
  -v ${HOME}/.ssh:/root/.ssh:ro 
  -v ${HOME}/.texttop/var:/var 
  tombh/texttop

Known Points

The Docker Hub model is built in opposition to Intel CPU architectures, this causes hiptext to fail on AMD chips. Whereby
case you are going to need to designate texttop yourself:

git clone https://github.com/tombh/texttop.git
cd texttop
docker designate -t texttop .

Working terminals

Problematic terminals

  • konsole: neither CTRL+click on/walk nor CTRL+mousewheel are forwarded (most definitely mouse reporting is disabled by default)
  • xterm: CTRL+click on/walk is intercepted by the GUI menu
  • rxvt: rendering factors

Contributions

Advantageous please.

License

GNU General Public License v3.0

Read More

(Visité 6 fois, 1 aujourd'hui)

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *