Skip to content

Does cockpit provide internal documentation? #21138

Closed Answered by martinpitt
realyukii asked this question in Q&A
Discussion options

You must be logged in to vote

The high-level code is in https://github.com/cockpit-project/cockpit/blob/main/pkg/systemd/terminal.jsx -- it opens a stream channel (i.e. "run a program") to the shell (bash by default), and then hooks this up to a terminal widget which is just a wrapper around XTerm.js.

From your brief description it sounds like you don't need to dive down into what the Terminal widget does under the hood, just to use it to display something different? I.e. instead of bash you want to your startService() logic and show it in the terminal? Then you need to use the xterm.js widget directly, as our cockpit-components-terminal.jsx assumes a single process channel.

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by realyukii
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants