0

I love the Tree Style Tab extension for organizing tabs in Firefox. In fact, I would like to use it to organize my open terminal windows too! I don't want to launch a terminal window from within Firefox or launch Firefox from a terminal. I want to be able to view and type in a terminal in a Firefox tab, as if it were a web page. I'm running Ubuntu 20.40.

Idea 1 - an embedded app: I searched for Firefox extensions which allow running a terminal or application in Firefox--perhaps conceptually like Microsoft's Object Linking and Embedding--but came up empty.

Idea 2 - VNC: With noVNC (sudo snap install novnc and novnc --listen 6081 --vnc localhost:5901) and x11vnc (sudo apt install -y x11vnc and xwininfo to get the window ID and x11vnc -rfbport 5901 -id 0x4000007 -viewonly), I can view the given window within Firefox. However, running the above without -viewonly makes the mouse jump from Firefox to the real terminal window whenever I try to type in the terminal within Firefox. This might be solved by launching the real terminal in a dummy display which has its own mouse pointer, but I don't know how to do that. (I'm currently using X11, but would very much appreciate a solution that works on Wayland too.)

Idea 3 - ssh client: Another approach is a web-based ssh client or ssh Firefox extension. SSHGate might work, but it only has 2 stars and hasn't been updated for 5 years. Also, Shell from a Firefox tab suggests FireSSH, but it is no longer available.

What approach would you suggest for running a terminal within a Firefox tab on Ubuntu?

2
  • Check out WeTTY. No creepy Firefox extensions or VNC desktops are needed.
    – BlueManCZ
    Commented Jan 13, 2022 at 17:18
  • You could also run a local webserver with shellinabox.
    – FelixJN
    Commented Jan 13, 2022 at 17:30

1 Answer 1

0

On Linux, the Onion library has (as a demo) a terminal running inside a web browser. It is the oterm example.

onion is a library, coded mostly in C, that add web serving capabilities to your program.

2
  • Thanks. It was pretty simple to build and test oterm, and it looks fast and clean. However, I could not find a way to paste text into the terminal, and it appears to not support Unicode characters. I need both of these.
    – bitinerant
    Commented Jan 17, 2022 at 21:41
  • Onion has a mailing list. You could ask there. Commented Jan 18, 2022 at 7:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .