{"id":463,"date":"2023-09-02T20:05:40","date_gmt":"2023-09-02T18:05:40","guid":{"rendered":"https:\/\/linux-bibel.at\/?p=463"},"modified":"2023-09-02T20:05:41","modified_gmt":"2023-09-02T18:05:41","slug":"tty2web-das-terminal-im-webbrowser-unter-linux","status":"publish","type":"post","link":"https:\/\/linux-bibel.at\/index.php\/2023\/09\/02\/tty2web-das-terminal-im-webbrowser-unter-linux\/","title":{"rendered":"tty2web &#8211; Das Terminal im Webbrowser unter Linux"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Das Linux-Terminal\u00a0und seine unergr\u00fcndlichen Tiefen &#8211; wenn gew\u00fcnscht, l\u00e4sst sich die Ausgabe auch im Webbrowser anzeigen. Da ich zur Entspannung gerade wieder einmal GitHub und GitLab durchforstet habe &#8211; die Ausgabe des Terminals l\u00e4sst sich auch im Webbrowser anzeigen. Was man damit anstellen k\u00f6nnte, nun ja &#8211; etwa anderen Nutzern im Internet zeigen, was man mit dem Terminal alles machen kann. Vielleicht haben die Leser auch andere Ideen.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">tty2web installieren<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Grunds\u00e4tzlich ist eine Installation nicht n\u00f6tig &#8211; es handelt sich um eine ausf\u00fchrbare Datei, die sich aus jedem Verzeichnis heraus starten l\u00e4sst. Sie finden diese Software auf\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/kost\/tty2web\/releases\" target=\"_blank\">GitHub<\/a>\u00a0zum Download f\u00fcr Linux, macOS, BSD und das Windows-Zeugs. Sie suchen sich dort die f\u00fcr Ihr System passende Datei &#8211; f\u00fcr mich &#8211; Linux 64 Bit, die Datei &#8222;<strong>tty2web_linux_amd64<\/strong>&#8222;.<br>Heruntergeladen &#8211; per Rechtsklick und &#8222;<em>Eigenschaften \u2192 Berechtigungen<\/em>&#8220; ausf\u00fchrbar gemacht &#8211; alternativ am Terminal mit dem Befehl:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod +x tty2web_linux_amd64<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Die Datei l\u00e4sst sich aus jedem Verzeichnis heraus am Terminal starten &#8211; einfacher nat\u00fcrlich, Sie verschieben die Datei in eines der Systemverzeichnisse &#8211; etwa &#8222;<em>\/usr\/local\/bin\/<\/em>&#8220; &#8211; hier l\u00e4sst sich die Software ohne Pfadangabe und von allen Benutzern des Systems nutzen.<br>Der Bequemlichkeit halber w\u00fcrde ich die Datei gleich umbenennen &#8211; etwa ganz einfach in &#8222;<strong>tty2web<\/strong>&#8222;. Jetzt schnell verschoben als\u00a0Administrator\u00a0am Terminal:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mv tty2web \/usr\/local\/bin\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">tty2web nutzen<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Aus dem Verzeichnis (<em>im Home-Verzeichnis heraus<\/em>) und nicht umbenannt, geben Sie einfach den Pfad zur Datei an &#8211; etwa:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/Software\/tty2web_linux_amd64 ...<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Befinden Sie sich am Terminal schon im Verzeichnis mit der Datei:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/tty2web_linux_amd64 ...<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Oder am einfachsten aus &#8222;<em>\/usr\/local\/bin\/<\/em>&#8220; heraus gestartet:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tty2web_linux_amd64 ...<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Die Software erwartet nat\u00fcrlich Optionen &#8211; die einzige wirklich wichtige ist der Befehl, den Sie am Terminal ausf\u00fchren m\u00f6chten. Als Beispiel ganz einfach den Befehl &#8222;<strong><code>top<\/code><\/strong>&#8222;:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tty2web_linux_amd64 top<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Interessant ist aber auch die Option &#8222;<strong><code>--verbose<\/code><\/strong>&#8220; &#8211; hiermit erhalten Sie am Terminal (<em>nicht im Webbrowser<\/em>) zus\u00e4tzliche Ausgaben:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/tty2web-1024x576.jpg\" alt=\"\" class=\"wp-image-464\" style=\"width:700px;height:394px\" width=\"700\" height=\"394\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/tty2web-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/tty2web-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/tty2web-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/tty2web-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/tty2web.jpg 1920w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Im Webbrowser erreichen Sie das Terminal nun \u00fcber die Adresse\u00a0<em>http:\/\/localhost:8080\/<\/em>\u00a0&#8211; auch aus dem Netzwerk oder aus dem Internet l\u00e4sst sich das Terminal nun abrufen &#8211; hierf\u00fcr ziehen Sie die letzte Option zurate:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>2022\/04\/17 21:11:50 tty2web is starting with command: top\n2022\/04\/17 21:11:50 HTTP server is listening at: http:\/\/:::8080\/\n2022\/04\/17 21:11:50 Alternative URL: http:\/\/127.0.0.1:8080\/\n2022\/04\/17 21:11:50 Alternative URL: http:\/\/::1:8080\/\n2022\/04\/17 21:11:50 Alternative URL: http:\/\/192.168.1.105:8080\/\n2022\/04\/17 21:11:50 Alternative URL: http:\/\/fe80::e6a8:dfff:fe9b:c643:8080\/\n2022\/04\/17 21:11:55 &#91;::1]:59104 200 GET \/auth_token.js\n2022\/04\/17 21:11:55 &#91;::1]:59110 200 GET \/config.js\n2022\/04\/17 21:11:55 &#91;::1]:59104 200 GET \/js\/sidenav.js\n2022\/04\/17 21:11:55 &#91;::1]:59114 200 GET \/css\/xterm_customize.css\n2022\/04\/17 21:11:55 &#91;::1]:59108 200 GET \/css\/index.css\n2022\/04\/17 21:11:55 &#91;::1]:59112 200 GET \/css\/xterm.css\n2022\/04\/17 21:11:55 &#91;::1]:59116 200 GET \/js\/tty2web-bundle.js\n2022\/04\/17 21:11:56 New client connected: &#91;::1]:59118, connections: 1\/0<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Wichtig nat\u00fcrlich im Fall vom Zugriff aus dem Netzwerk heraus &#8211; der Port 8080. Die Ausgabe l\u00e4sst sich nat\u00fcrlich auch per sicherer Verbindung im Browser ausgeben, und noch viel mehr kann die Software. Mehr dazu auf\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/kost\/tty2web\" target=\"_blank\">GitHub<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/tty2web-1-1024x576.jpg\" alt=\"\" class=\"wp-image-465\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/tty2web-1-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/tty2web-1-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/tty2web-1-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/tty2web-1-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/tty2web-1.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<div class=\"pld-like-dislike-wrap pld-custom\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"Gef\u00e4llt mir\" data-post-id=\"463\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                            <img src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/12\/Daumen-Hoch.png\" alt=\"Gef\u00e4llt mir\" \/>\r\n            <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">    <\/span>\r\n<\/div><div class=\"pld-dislike-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-dislike-trigger pld-like-dislike-trigger  \" title=\"Gef\u00e4llt mir nicht\" data-post-id=\"463\" data-trigger-type=\"dislike\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                            <img src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/12\/Daumen-Runter.png\" alt=\"Gef\u00e4llt mir nicht\" \/>\r\n            <\/a>\r\n    <span class=\"pld-dislike-count-wrap pld-count-wrap\"><\/span>\r\n<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Das Linux-Terminal\u00a0und seine unergr\u00fcndlichen Tiefen &#8211; wenn gew\u00fcnscht, l\u00e4sst sich die Ausgabe auch im Webbrowser anzeigen. Da ich zur Entspannung gerade wieder einmal GitHub und GitLab durchforstet habe &#8211; die Ausgabe des Terminals l\u00e4sst sich auch im Webbrowser anzeigen. Was man damit anstellen k\u00f6nnte, nun ja &#8211; etwa anderen Nutzern im Internet zeigen, was man [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":465,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[12,7,6],"class_list":["post-463","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-terminal","tag-kommandozeile","tag-shell","tag-terminal"],"_links":{"self":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/463","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/comments?post=463"}],"version-history":[{"count":1,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/463\/revisions"}],"predecessor-version":[{"id":466,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/463\/revisions\/466"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media\/465"}],"wp:attachment":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media?parent=463"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/categories?post=463"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/tags?post=463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}