Comment by theowaway213456
1 day ago
You can tunnel a port over SSH and get a web UI locally, though it's not commonly done. I feel like more people would actually do this if tunneling a port was just ever so slightly easier (like, you're already SSH'd into a box, then you run a command, then you somehow automatically get a tunnel for that command's UI port plus a local browser window open to the page)
While in an SSH session, press enter, then type tilde and capital C (enter ~C) and you can add command line options to the current session. To add a port forward from your local 8080 to the remote port 80 without closing the connection, do:
That is a neat trick. Added to the list.
(Ultimately unhelpful though because I use mosh everywhere these days and that doesn't appear to have anything fancy like this.)
Thanks. This could really benefit from a TUI!
Maybe it's just still too early in the morning yet, but what is the significance of hitting enter first?
SSH expects the escape sequence (tilde) to be the first character on a new line; since backspace is sent as a character, you can't just backspace over something you've started typing and then press tilde to have it recognized.
Technically, you don't have to press enter if you've not typed anything (try it in a new SSH session - as soon as you are logged in, type ~? to get the SSH help output), but since the comment was about doing this during an active session without ending it, I figured noting that pressing enter first to be sure you're on a new line wouldn't hurt
I like TUIs because I run everything in tmux and I can just pick up work from wherever I was on any computer, phone or tablet.
share some good (easy on remembering keyboard & mouse) tmux configs. I usually struggle with copy pasting many scrollback lines from/to tmux. would love for my claude to be natively tmux aware.
I usually copy with mouse and paste with ctrl+b ], or use the iterm selection to copy to macOS clipboard.
For navigation between windows I have this:
I do this a lot but I'd still prefer TUI where possible. With too much visual content it isn't of course, but for many cases a TUI is much more responsive and much lower resource.
I largely agree with you, but there are limits to what a tui can do well. If analyzing a flame graph or performance trace, web UI is a better fit. However, most things are not that.
Even easier is just using an X server, if you have it set up properly you just need to run the remote app and the window pops up on your machine.
(I think terminal-based GUIs are neat just for fluidity of use- you can pop one open during a terminal session and close it without switching to mouse or shifting your attention away from the terminal. They can also be a nice addon to a primarily CLI utility without introducing big dependencies)
Yeah I love that about X. I remember in the 90s when I first figured that out. I was logged in from a university workstation into my home computer with SSH and I launched my mail client or something and I thought doh, stupid that will only popup locally.
Then colour my suprise when it popped up on my screen right there. Slow as molasses but still. Wow. Magic.
It's a shame Wayland dropped this. Yes I know there's waypipe but it's not the same.
> It's a shame Wayland dropped this.
It... really isn't. Like you said, remote X was barely usable even over an entirely local network. Most applications these days are also not designed for it, using loads of bitmap graphics instead of efficient, low-level primitives. So you end up being just one tiny step away from simply streaming a video of your windows. We have better tools for doing things remotely these days, there's a reason approximately no one has used remote X after the mid-90s. It's a neat party trick, but I don't blame the Wayland authors for not wanting to support it.
12 replies →
Waypipe looks interesting.
The main advantage of x forwarding for me was when I'd randomly need it and had nothing set up ahead of time. Hopefully it starts getting installed in distros by default eventually.
I'd rather use a TUI than a web UI.