#Linux question: What's a good way to mirror a single #terminal session across two windows?
-
Would it be acceptable to mirror your entire screen?
@argv_minus_one
No. I show the slides and the big terminal on the big visible screen; on my laptop I have the presentation controls; the zoom session and chat window (for remote participants); and the small terminal that I type on. -
#Linux question: What's a good way to mirror a single #terminal session across two windows? Or show the same terminal on both the internal and external screen?
I use this when teaching. So far I start a tmux session and join with two terminals, one on the big external screen and one on my laptop screen. But the terminal sizes don't automatically match, the "remote" one gets a shaded-out cursor, and it's too easy for me to accidentally break during the session.
Any better ideas out there?
@jannem good question...
I guess just screensharing isn't an option?
screendoesn'd do multi-attach I guess.forcing
tmuxin a fixed-size terminal (i.e. 80x25) isn't an option either?
I boosted your post...
-
@jannem good question...
I guess just screensharing isn't an option?
screendoesn'd do multi-attach I guess.forcing
tmuxin a fixed-size terminal (i.e. 80x25) isn't an option either?
I boosted your post...
@kkarhan
The size problem is, when I resize the big terminal to fill the big screen, the small one doesn't scale along with it. So one or the other gets an ugly, distracting border. I have to spend a few minutes every single time to match them up by hand.I can live with that; what I can't live with is that it's too easy to accidentally exit the tmux session mid-use.
-
#Linux question: What's a good way to mirror a single #terminal session across two windows? Or show the same terminal on both the internal and external screen?
I use this when teaching. So far I start a tmux session and join with two terminals, one on the big external screen and one on my laptop screen. But the terminal sizes don't automatically match, the "remote" one gets a shaded-out cursor, and it's too easy for me to accidentally break during the session.
Any better ideas out there?
@jannem Do you need interaction with both or just one?
If only one, I'd use OBS to capture the (one) terminal, and open a "source viewer" window you can then place on the other screen ...
-
#Linux question: What's a good way to mirror a single #terminal session across two windows? Or show the same terminal on both the internal and external screen?
I use this when teaching. So far I start a tmux session and join with two terminals, one on the big external screen and one on my laptop screen. But the terminal sizes don't automatically match, the "remote" one gets a shaded-out cursor, and it's too easy for me to accidentally break during the session.
Any better ideas out there?
@jannem I don't think there's a clean solution to the sizing problem, just due to how ANSI works. anyways this may be what you want:
https://github.com/a-ba/squint
https://www.nemunai.re/post/xorg-duplicate-a-window-on-2-screens/ -
@argv_minus_one
No. I show the slides and the big terminal on the big visible screen; on my laptop I have the presentation controls; the zoom session and chat window (for remote participants); and the small terminal that I type on.Hmm.
Apparently FreeBSD has just what you're looking for https://man.freebsd.org/cgi/man.cgi?watch but it relies on a feature of the FreeBSD kernel that, as far as I know, Linux doesn't have.
Someone wrote a Linux program that uses ptrace to capture stdout https://github.com/yujqiao/catproc but (1) I haven't audited the code so I don't know if there's malware inside, and (2) it only intercepts the `write` system call, which is not the only way to write to stdout (there's also io_uring).
-
Hmm.
Apparently FreeBSD has just what you're looking for https://man.freebsd.org/cgi/man.cgi?watch but it relies on a feature of the FreeBSD kernel that, as far as I know, Linux doesn't have.
Someone wrote a Linux program that uses ptrace to capture stdout https://github.com/yujqiao/catproc but (1) I haven't audited the code so I don't know if there's malware inside, and (2) it only intercepts the `write` system call, which is not the only way to write to stdout (there's also io_uring).
Hey wait, there's more. Look at peekfd https://linux.die.net/man/1/peekfd and ttysnoop https://linux.die.net/man/8/ttysnoop
-
#Linux question: What's a good way to mirror a single #terminal session across two windows? Or show the same terminal on both the internal and external screen?
I use this when teaching. So far I start a tmux session and join with two terminals, one on the big external screen and one on my laptop screen. But the terminal sizes don't automatically match, the "remote" one gets a shaded-out cursor, and it's too easy for me to accidentally break during the session.
Any better ideas out there?
@jannem I'm not sure if this would help, but I have used something like ClusterSSH (I don't recall if this was the exact program) to run the same commands simultaneously in two terminal windows... but they were running on different servers.
Typing in either window caused the same characters to appear in the other window.
I appreciate that the two instance setup would be inconvenient.
-
@kkarhan
The size problem is, when I resize the big terminal to fill the big screen, the small one doesn't scale along with it. So one or the other gets an ugly, distracting border. I have to spend a few minutes every single time to match them up by hand.I can live with that; what I can't live with is that it's too easy to accidentally exit the tmux session mid-use.
@jannem gnome-terminal can be set to be
read-onlyso that the presenting system doesn't forward any inputs until you enable those with some mouse clicks on it.- Pretty shure that can be set with other terminals too...
But I agree that this shouldn't be that frustrating and not necessitate ugly hacks like screensharing a window via #VLC or #WebRTC (#WebCall, #JitsiMeet, #NextcloudTalk)…
-
@argv_minus_one
No. I show the slides and the big terminal on the big visible screen; on my laptop I have the presentation controls; the zoom session and chat window (for remote participants); and the small terminal that I type on.@jannem @argv_minus_one I kean then you could just stream that Window as a second input in #OBS?
-
@jannem Do you need interaction with both or just one?
If only one, I'd use OBS to capture the (one) terminal, and open a "source viewer" window you can then place on the other screen ...
@deadinside @jannem yeah, that would be my guess too…
-
@jannem Do you need interaction with both or just one?
If only one, I'd use OBS to capture the (one) terminal, and open a "source viewer" window you can then place on the other screen ...
@deadinside @jannem I've used Deskreen for just this, have it mirror/display one window, which you can display elsewhere, by using a browser
-
#Linux question: What's a good way to mirror a single #terminal session across two windows? Or show the same terminal on both the internal and external screen?
I use this when teaching. So far I start a tmux session and join with two terminals, one on the big external screen and one on my laptop screen. But the terminal sizes don't automatically match, the "remote" one gets a shaded-out cursor, and it's too easy for me to accidentally break during the session.
Any better ideas out there?
@jannem screen -x does multi-headed sessions.
-
@kkarhan
The size problem is, when I resize the big terminal to fill the big screen, the small one doesn't scale along with it. So one or the other gets an ugly, distracting border. I have to spend a few minutes every single time to match them up by hand.I can live with that; what I can't live with is that it's too easy to accidentally exit the tmux session mid-use.
@jannem @kkarhan gnu screen does support multiple attachments when you use the correct arguments, and it has a shortcut to resize the screen window to the size of the current terminal. So, for you it would look like this: attach to the screen from two terminal windows, resize both terminals to their desired size. Choose the smaller one (probably the one on the presentation monitor) and hit Ctrl+a then F (like: fit to screen). If you're interested, I'll look up the details for you.
-
undefined oblomov@sociale.network shared this topic on