From e78177362ce996635b1ec6b2e714fa21b0186d21 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Sat, 9 Dec 2023 13:43:23 +0100 Subject: [PATCH] New article to present squint --- .../index.md | 78 ++++++++++++++++++ .../squint.webp | Bin 0 -> 12376 bytes .../index.md | 77 +++++++++++++++++ 3 files changed, 155 insertions(+) create mode 100644 content/en/post/xorg-duplicate-a-window-on-2-screens/index.md create mode 100644 content/en/post/xorg-duplicate-a-window-on-2-screens/squint.webp create mode 100644 content/fr/post/xorg-duplicate-a-window-on-2-screens/index.md diff --git a/content/en/post/xorg-duplicate-a-window-on-2-screens/index.md b/content/en/post/xorg-duplicate-a-window-on-2-screens/index.md new file mode 100644 index 0000000..aaf03bf --- /dev/null +++ b/content/en/post/xorg-duplicate-a-window-on-2-screens/index.md @@ -0,0 +1,78 @@ +--- +title: "Duplicate window display on 2 screens with X.org" +date: !!timestamp '2023-12-09 11:34:00' +tags: +- teaching +- conference +- xorg +aliases: +- squint +--- + +As an engineering school teacher and technical lecturer, I'm often asked to give demonstrations, in addition to the classic slide show. +Like any organized lecturer, I can't do without my notes, elapsed time, etc., which are given to me by presenter screen software. +This kind of software requires an extended display, i.e. the computer screen and the video projector display 2 different things. + +The disadvantage of demonstrations is that the application window you want to show cannot be displayed on both screens at the same time. +I've tried to solve this problem, in particular to avoid having to do demos while craning my neck, as the window necessarily had to be on the video projector screen, which is really not comfortable. + +Today, I'd like to share with you a discovery that has changed the way I manage my presentations and conferences. + + + +## Screen cloning problem + +For years, I've had to deal with a particularly restrictive problem in my presentations: the need to duplicate a window on several screens. + +During my lectures and conferences, I usually use three separate desktops: + +- one for the slide deck +- another for a terminal, and +- one for a web browser. + +The complexity lay in the fact that I needed to be able to view my notes on my screen, while at the same time having a different view of the presentation screen for the audience. +The traditional solution of a cloned display was therefore insufficient. I had to use an extended display. + + +## Duplicate terminal window + +In order to duplicate the terminal emulator display, I used a multiplexer, `screen`. +With `screen`, several users can join a session, with the `-x` option (multi-display mode). + +On the projection screen, I launch 1 terminal, in large characters to be legible from a distance, also with `screen -x` (launch a session in multi-display mode). + +On my computer screen, I launch 2 terminals: one with `screen -r -x` (the `-r` option to join an existing session), the other with my notes. +As my terminal is not displayed in large characters, the 2 terminals run side by side, with normal font size. + + +## Draft solution: video streaming + +A first solution I considered was to display a live video capture of my main screen on the projection screen. + +Here's my solution, using `ffmpeg` and `mpv`: + +``` +ffmpeg -f x11grab -framerate 25 -video_size 1920x1080 -vcodec mpeg4 -q 12 -f mpegts - | mpv --cache=no - +``` + +My starting point was the videoconferencing demonstration: it works pretty well, so why not use the same principle? + +The options are probably not optimal and my machine is relatively old (it doesn't have hardware acceleration for encoding video streams), so the display wasn't as fluid or qualitative as I would have liked. + + +## `squint` ! + +After scouring the Internet for someone in the same situation as me, I finally found what I was looking for on GitHub, with [the `squint` project](https://github.com/a-ba/squint). + +It compiles and installs very easily. + +The icing on the cake is that it can be controlled via a menu in the notification area (which is usually on the main screen, which won't be visible to viewers). + +![The menu for configuring squint](squint.webp) + + +## Professional presentations + +The discovery of Squint has greatly improved the efficiency and fluidity of my presentations and conferences. + +By sharing this find, I hope to help other teachers and professionals facing similar challenges in managing their Xorg workspaces ([perhaps soon also available for Wayland](https://github.com/a-ba/squint/blob/master/TODO#L3)). diff --git a/content/en/post/xorg-duplicate-a-window-on-2-screens/squint.webp b/content/en/post/xorg-duplicate-a-window-on-2-screens/squint.webp new file mode 100644 index 0000000000000000000000000000000000000000..6978aebc82c1c2a892210fe1b75ce4987d222307 GIT binary patch literal 12376 zcmaKSWl&_xvUTI`KDfKPySuyl;6Av+;O_1=46cL2;5N9syF2v9IrqMM&yV-Mim1-j zS(#OpE7y+bj@T;F5)w*G0Dz{rh?0g9mliAl03iCDNuYpx5P-C(s8T-Y=T`t|zOAX9 z3%C#fU}x{@tRg8wq@}Gx1a%022f%zzEC9B#sf(kql9JqC(f|8+SO9?hwK7Zp*Ixg7 z%>U^{Ff(^C1pq*ZJ|l!o9i3f2vC${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s|sTUw#-W<SUyc{+j53`{``-baZyfheYdxa z;5|8uGbn{r6sX#yPocaE`wagkixE&yFPF=KcEQfO|B5VvA6M?Vm7e9-DXsVG4xSAD zH+eL;OKNeIMG&hIJDok=u5XJ_DR4zxP1xyfbZYguCh$>@NVZmR+N6_G#!CzfzbY>O0@`w1}r=x#nJJcjS@;g1h4{`#&76009J(cY^-qk;44jS}N zt(+Q+Nw#=QNM2=yixc%2adnr<&}(B0=EV$O1XFNGvrUiWF9eoyzQJW*z;E68NfO=3 zFlgU>AzA1|?Z4wLS%Y5f-MRM=7upNQ_X_@Y6ak*sq;jnuS{>#DZk5qq??j1&Kl}Es zfSqXXr9(>r9+&NDX<L@=Hka^&|?=H?E&-#2p z!J|M;KHo5*nFhspw|@BA`Yh5OSg|tvf^>0gG7PtUYelZocUID@w0bKep8V?vr*FO` zd2{L|K)7(ygm1sE3H^JqevC6+Sz*Tn828ZBU{j`NP-k0JV^N8Ct24!HiC*c{jq-I5 z1Ro`_DBSf+f={-ikoVx!vC{$|BG0u#nm2faW1iFs9L2dAB^Z6Uv@iboN8d_Lm9gZ( z?<1(;^*>6;To}Ci17JVcg-y;^i35VmEuvvrSmQU=(W)GEcC)bVV3XRlM)o_(CE1Rp z&_>^RPeS_|Gj0eyf{WuAd|PpUpQG%-LPc)sVLv^4I`p+y!i`XFNb14*0s#LHI09G4 literal 0 HcmV?d00001 diff --git a/content/fr/post/xorg-duplicate-a-window-on-2-screens/index.md b/content/fr/post/xorg-duplicate-a-window-on-2-screens/index.md new file mode 100644 index 0000000..82d90cc --- /dev/null +++ b/content/fr/post/xorg-duplicate-a-window-on-2-screens/index.md @@ -0,0 +1,77 @@ +--- +title: "Dupliquer l'affichage d'une fenêtre sur 2 écrans sous X.org" +date: !!timestamp '2023-12-09 11:34:00' +tags: +- teaching +- conference +- xorg +aliases: +- squint +--- + +En tant qu'enseignant en école d'ingénieur et conférencier technique, je suis souvent amené à faire des démonstrations, en plus de la diffusion d'un classique diaporama. +Comme tout conférencier organisé, je ne peux me passer de mes notes, du temps écoulé, ... qui me sont données par un logiciel d'écran de présentateur. +Ce genre de logiciel nécessite d'avoir un affichage étendu, c'est-à-dire que l'écran de l'ordinateur et le vidéo projecteur affichent 2 choses différentes. + +L'inconvénient, lorsqu'il faut faire des démonstrations, c'est que la fenêtre de l'application que l'on souhaite montrer ne peut pas être affichée sur les deux écrans à la fois. +J'ai cherché à résoudre ce problème, notamment pour éviter de devoir faire les démo en me tordant le cou car le fenêtre devait nécessairement être sur l'écran du vidéo-projecteur, ce qui n'est vraiment pas confortable. + +Aujourd'hui, je souhaite partager avec vous une découverte qui a changé la donne dans la gestion de mes présentations et conférences. + + + +## Problème du clonage de l'écran + +Pendant des années, j'ai été confronté à un problème particulièrement contraignant dans mes présentations : la nécessité de dupliquer une fenêtre sur plusieurs écrans. + +Lors de mes cours magistraux ou conférences, j'utilise habituellement trois bureaux distincts : +- un pour le jeu de slides, +- un autre pour un terminal, et +- le dernier pour un navigateur web. + +La complexité résidait dans le fait que je devais pouvoir visualiser mes notes sur mon écran, tout en ayant une vue différente sur l'écran de présentation pour le public. +La solution traditionnelle d'un affichage cloné s'avérait donc insuffisante. Je devais nécessairement utiliser un affichage étendu. + + +## Dupliquer la fenêtre de terminal + +Afin de dupliquer l'affichage de l'émulateur de terminal, je passe par un multiplexeur, `screen`. +Avec `screen`, plusieurs utilisateurs peuvent rejoindre une session, avec l'option `-x` (multi-display mode). + +Sur l'écran de projection, je lance 1 terminal, en gros caractères pour être lisisble de loin, lui aussi avec `screen -x` (on lance une session en mode multi-display). + +Sur l'écran de mon ordinateur je lance donc 2 terminaux : l'un avec `screen -r -x` (l'option `-r` en plus pour rejoindre une session existante), l'autre avec mes notes. +Du fait que mon terminal n'est pas affiché en gros caractères, les 2 terminaux passent bien côte-à-côte, avec une taille de caractères normale. + + +## Ébauche de solution : streaming vidéo + +Une première solution que j'ai envisagée était d'afficher sur l'écran de projection une capture vidéo en direct de mon écran principal. + +Voici ma solution, utilisant `ffmpeg` et `mpv` : + +``` +ffmpeg -f x11grab -framerate 25 -video_size 1920x1080 -vcodec mpeg4 -q 12 -f mpegts - | mpv --cache=no - +``` + +Je partais du principe de la démonstration en visioconférence : ça fonctionne plutôt bien, alors pourquoi pas utiliser le même principe ? + +Les options ne sont sans doute pas optimales et ma machine est relativement vieille (elle n'a pas d'accélération matérielle pour encoder de flux vidéo), alors l'affichage n'était pas aussi fluide ou qualitatif que je l'aurais souhaité. + + +## `squint` ! + +Après avoir écumé tout l'Internet à la recherche d'une personne dans la même situation que moi, j'ai fini par trouver mon bonheur sur GitHub, avec [le projet `squint`](https://github.com/a-ba/squint). + +Il se compile et s'installe très facilement. + +Cerise sur le gâteau, il se contrôle via un menu dans la zone de notification (qui est généralement sur l'écran principal, qui ne sera pas visible des spectateurs). + +![Le menu pour configurer squint](squint.webp) + + +## Des présentations pro + +La découverte de Squint a considérablement amélioré l'efficacité et la fluidité de mes présentations et conférences. + +En partageant cette trouvaille, j'espère aider d'autres enseignants et professionnels confrontés à des défis similaires dans la gestion de leur espace de travail sous Xorg ([peut-être bientôt disponible aussi pour Wayland](https://github.com/a-ba/squint/blob/master/TODO#L3)).