{"id":2295,"date":"2017-03-17T20:16:14","date_gmt":"2017-03-17T19:16:14","guid":{"rendered":"http:\/\/monodes.com\/predaelli\/?p=2295"},"modified":"2017-03-17T08:17:13","modified_gmt":"2017-03-17T07:17:13","slug":"tmate-%e2%80%a2-instant-terminal-sharing","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2017\/03\/17\/tmate-%e2%80%a2-instant-terminal-sharing\/","title":{"rendered":"tmate \u2022 Instant terminal sharing"},"content":{"rendered":"<p>Today I discovered <em><a href=\"https:\/\/tmate.io\/\">tmate \u2022 Instant terminal sharing\u00a0 <\/a><\/em>while issuing <code class=\"\" data-line=\"\">apt-cache search mate terminal<\/code>. <img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2296\" data-permalink=\"https:\/\/monodes.com\/predaelli\/2017\/03\/17\/tmate-%e2%80%a2-instant-terminal-sharing\/video_macos_first_frame\/\" data-orig-file=\"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2017\/03\/video_macos_first_frame.png?fit=409%2C285&amp;ssl=1\" data-orig-size=\"409,285\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"video_macos_first_frame\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2017\/03\/video_macos_first_frame.png?fit=409%2C285&amp;ssl=1\" class=\"size-full wp-image-2296 alignleft\" src=\"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2017\/03\/video_macos_first_frame-1.png?resize=409%2C285\" alt=\"video_macos_first_frame\" width=\"409\" height=\"285\" \/> <img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2297\" data-permalink=\"https:\/\/monodes.com\/predaelli\/2017\/03\/17\/tmate-%e2%80%a2-instant-terminal-sharing\/video_linux_first_frame\/\" data-orig-file=\"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2017\/03\/video_linux_first_frame.png?fit=413%2C285&amp;ssl=1\" data-orig-size=\"413,285\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"video_linux_first_frame\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2017\/03\/video_linux_first_frame.png?fit=413%2C285&amp;ssl=1\" class=\"size-full wp-image-2297 alignright\" src=\"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2017\/03\/video_linux_first_frame-1.png?resize=413%2C285\" alt=\"video_linux_first_frame\" width=\"413\" height=\"285\" \/>The Debian\/Ubuntu repository told me<sup id=\"fnref-2295-1\"><a href=\"#fn-2295-1\">1<\/a><\/sup> that<\/p>\n<blockquote><p>tmate provides an instant pairing solution, allowing you to share a terminal with one or several teammates. Together with a voice call, it&#8217;s almost like pairing in person. The terminal sharing works by using SSH connections to backend servers maintained by tmate upstream developers; teammates need to be given a randomly-generated token to be able to join a session.<\/p>\n<p>tmate is a modified version of tmux, and uses the same configurations such as keybindings, color schemes etc.<\/p><\/blockquote>\n<p>That&#8217;s nice and sweet.<\/p>\n<p><!--nextpage--><\/p>\n<blockquote><p>&nbsp;<\/p>\n<pre>\/*\n * If you are curious, here is how I generated the videos:\n *   ffmpeg -an -f x11grab -r 30 -s 460x285 -i :0.0+1920,0 -pix_fmt yuv444p -vcodec libx264 -x264opts crf=0 out.mp4\n *   mplayer -fps 3000 -vo png out.mp4\n *   montage *.png -tile x14 -geometry '460x285' out.png\n *   pngcrush out.png video.png\n *\n *   Safari and Firefox don't like very wide pngs, so we chunk the frames in\n *   rows. Sadly it makes the png bigger.\n *\/\n\n$(function() {\n  var video_linux = $('.video.linux');\n  var video_macos = $('.video.macos');\n  var current_frame = 0;\n  var timer;\n\n  var nextFrameFor = function(video, rows, total_frames, offset) {\n    var frame = current_frame - offset;\n    if (frame &lt; 0)\n      return;\n\n    var frames_per_row = Math.ceil(total_frames \/ rows);\n    var x = video.width() * (frame % frames_per_row);\n    var y = video.height() * Math.floor(frame \/ frames_per_row);\n    var position = \"-\" + x + \"px -\" + y + \"px\";\n    video.css('background-position', position);\n  }\n\n  var nextFrame = function() {\n    if (current_frame == 90)\n      $('.steps .launch').fadeIn(900);\n    if (current_frame == 250)\n      $('.steps .share').fadeIn(900);\n    if (current_frame == 410)\n      $('.steps .pair').fadeIn(900);\n\n    nextFrameFor(video_linux, 12, 465, 0);\n    nextFrameFor(video_macos, 6,  231, 234);\n\n    current_frame += 1;\n    if (current_frame &gt;= 465)\n      clearTimeout(timer);\n  };\n\n  var startPlayback = function() {\n    timer = setInterval(nextFrame, 33);\n  };\n\n  $(\"&lt;img src='\/img\/video_linux.png' \/&gt;\").load(function() {\n    $(\"&lt;img src='\/img\/video_macos.png' \/&gt;\").load(function() {\n      video_linux.css('background-image', \"url('\/img\/video_linux.png')\");\n      video_macos.css('background-image', \"url('\/img\/video_macos.png')\");\n      setTimeout(startPlayback, 2000);\n    });\n  });\n});\n<\/pre>\n<\/blockquote>\n<div class=\"footnotes\">\n<hr \/>\n<ol>\n<li id=\"fn-2295-1\">\nactually I wished to post the nice animation showing a terminal on KDE perfectly shared with another on MacOs but it&#8217;s implemented with a PNG animation that &#8220;resist&#8221; a simple cut&#8217;n&#8217;paste. But it&#8217;s fine as it&#8217;s a PNG animation and I want to understand how it&#8217;s implemented<sup id=\"fnref-2295-2\"><a href=\"#fn-2295-2\">2<\/a><\/sup>.&#160;<a href=\"#fnref-2295-1\">&#8617;<\/a>\n<\/li>\n<li id=\"fn-2295-2\">\nthe animation is made with a little custom Javascript, found at <a href=\"https:\/\/tmate.io\/js\/main.js\">https:\/\/tmate.io\/js\/main.js<\/a>. Just for curiosity sake I copied it at page 2 of this post&#160;<a href=\"#fnref-2295-2\">&#8617;<\/a>\n<\/li>\n<\/ol>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">Today I discovered tmate \u2022 Instant terminal sharing\u00a0 while issuing apt-cache search mate terminal. The Debian\/Ubuntu repository told me1 that tmate provides an instant pairing solution, allowing you to share a terminal with one or several teammates. Together with a voice call, it&#8217;s almost like pairing in person. The terminal sharing works by using SSH&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2017\/03\/17\/tmate-%e2%80%a2-instant-terminal-sharing\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[52,14],"tags":[146,147,145],"class_list":["post-2295","post","type-post","status-publish","format-standard","hentry","category-software","category-software-libero","tag-mating","tag-multiplexing","tag-terminal"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-B1","jetpack-related-posts":[{"id":10713,"url":"https:\/\/monodes.com\/predaelli\/2023\/08\/13\/tmate-instant-terminal-sharing\/","url_meta":{"origin":2295,"position":0},"title":"tmate \u2022 Instant terminal sharing","author":"Paolo Redaelli","date":"2023-08-13","format":"link","excerpt":"https:\/\/tmate.io\/","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10989,"url":"https:\/\/monodes.com\/predaelli\/2023\/12\/05\/terminals-renaissance\/","url_meta":{"origin":2295,"position":1},"title":"Terminals renaissance","author":"Paolo Redaelli","date":"2023-12-05","format":false,"excerpt":"How far have we gone since DEC VT100! All those terminal emulator have evolved a lot from the humble Xterm... In recent years we have seen several \"modern\" terminal emulators. A first wave focused on being shiny and polished or just stylish such as cool-retro-term (which is shamefully not listed\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/monodes.com\/predaelli\/category\/software\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2023\/12\/wave-modern-terminal.webp?fit=1200%2C799&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2023\/12\/wave-modern-terminal.webp?fit=1200%2C799&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2023\/12\/wave-modern-terminal.webp?fit=1200%2C799&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2023\/12\/wave-modern-terminal.webp?fit=1200%2C799&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2023\/12\/wave-modern-terminal.webp?fit=1200%2C799&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":11401,"url":"https:\/\/monodes.com\/predaelli\/2024\/03\/04\/still-no-ligatures\/","url_meta":{"origin":2295,"position":2},"title":"Still no ligatures","author":"Paolo Redaelli","date":"2024-03-04","format":false,"excerpt":"Black Box is a GTK4 Terminal App With a Unique Look - OMG! Ubuntu Black Box is a GTK4 terminal emulator for Linux desktops. It boasts innovative UI features, 12 terminal themes, and is easy to install from Flathub. Nice, but still, font ligatures support is missing as it requires\u2026","rel":"","context":"In &quot;Fonts&quot;","block_context":{"text":"Fonts","link":"https:\/\/monodes.com\/predaelli\/category\/fonts\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10212,"url":"https:\/\/monodes.com\/predaelli\/2023\/02\/05\/browsh-and-carbonyl-the-return-of-the-terminal-browser\/","url_meta":{"origin":2295,"position":3},"title":"Browsh and Carbonyl, the return of the terminal browser","author":"Paolo Redaelli","date":"2023-02-05","format":false,"excerpt":"I can't believe I haven't made a post about\u00a0 Browsh, a fully-modern text-based browser. It renders anything that a modern browser can; HTML5, CSS3, JS, video and even WebGL. Its main purpose is to be run on a remote server and accessed via SSH\/Mosh or the in-browser HTML service in\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/monodes.com\/predaelli\/category\/software\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1273,"url":"https:\/\/monodes.com\/predaelli\/2016\/04\/16\/asciinema-org\/","url_meta":{"origin":2295,"position":4},"title":"asciinema.org","author":"Paolo Redaelli","date":"2016-04-16","format":"link","excerpt":"Record and share your terminal sessions, the\u00a0right\u00a0way. Forget screen recording apps and blurry video. Enjoy a lightweight, purely text-based approach to terminal recording. asciinema.org","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"asciinema","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2016\/04\/asciinema-2.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2016\/04\/asciinema-2.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2016\/04\/asciinema-2.png?resize=525%2C300 1.5x"},"classes":[]},{"id":5449,"url":"https:\/\/monodes.com\/predaelli\/2019\/04\/07\/swordfish90-cool-retro-term\/","url_meta":{"origin":2295,"position":5},"title":"Swordfish90\/cool-retro-term","author":"Paolo Redaelli","date":"2019-04-07","format":false,"excerpt":"I can't believe I still haven't shared this little gem: cool-retro-term A good looking terminal emulator which mimics the old cathode display... cool-retro-term is a terminal emulator which mimics the look and feel of the old cathode tube screens. It has been designed to be eye-candy, customizable, and reasonably lightweight.\u2026","rel":"","context":"In &quot;Fun&quot;","block_context":{"text":"Fun","link":"https:\/\/monodes.com\/predaelli\/category\/fun\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/2295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=2295"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/2295\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=2295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=2295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=2295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}