{ "version": "https://jsonfeed.org/version/1.1", "user_comment": "This feed allows you to read the posts from this site in any feed reader that supports the JSON Feed format. To add this feed to your reader, copy the following URL -- https://matoken.org/blog/tag/ttyd/feed/json/ -- and add it your reader.", "home_page_url": "https://matoken.org/blog/tag/ttyd/", "feed_url": "https://matoken.org/blog/tag/ttyd/feed/json/", "language": "ja", "title": "ttyd – matoken's blog", "description": "Is there no plan B?", "icon": "https://matoken.org/blog/wp-content/uploads/2025/03/cropped-1865f695c4eecc844385acef2f078255036adccd42c254580ea3844543ab56d9.jpeg", "items": [ { "id": "https://matoken.org/blog/?p=3954", "url": "https://matoken.org/blog/2024/01/05/sixel-with-ttyd/", "title": "ttyd \u3067Sixel", "content_html": "
\u4ee5\u524d\u8a66\u3057\u305f\u30bf\u30fc\u30df\u30ca\u30eb\u3092Web\u3067\u5171\u6709\u3067\u304d\u308bttyd \u306eSixel \u306e\u5bfe\u5fdc\u72b6\u6cc1\u3092\u78ba\u8a8d\u3057\u3066\u307f\u308b\u30681\u3064\u524d\u306e\u30ea\u30ea\u30fc\u30b9\u306e 1,7.3 \u3067\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u3088\u3046\u306a\u306e\u3067\u5c11\u3057\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e
\nSixel support is off by default now, use -t enableSixel=true to enable it.
\n\n
\u4ee5\u524d\u8a66\u3057\u305f\u6642\u306e\u8a18\u4e8b\uff0e
\n* \u7aef\u672b\u3092Web\u5171\u6709\u3067\u304d\u308bttyd \u2013 matoken\u2019s meme
\u30aa\u30f3\u30e9\u30a4\u30f3\u3067ttyd \u3092\u4f7f\u3044\u30d7\u30ec\u30bc\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u8a66\u307f\u305f\u6642\u306e\u30b9\u30e9\u30a4\u30c9\uff0e
\n* Terminal\u3068\u30a6\u30a7\u30d6\u30d6\u30e9\u30a6\u30b6\u3067\u30d7\u30ec\u30bc\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u8a66\u307f – Speaker Deck
GitHub \u306eRelease \u306bbinary \u304c\u3042\u308b\u3051\u3069source \u304b\u3089Build \u3057\u3066\u307f\u307e\u3057\u305f\uff0e
\n$ sudo apt install build-essential cmake git libjson-c-dev libwebsockets-dev\n$ git clone https://github.com/tsl0922/ttyd.git\n$ cd ttyd && mkdir build && cd build\n$ cmake ..\n$ make && make install\n$ ./ttyd --version\nttyd version 1.7.4-fd280fe\n$ ./ttyd\nttyd is a tool for sharing terminal over the web\n\nUSAGE:\n ttyd [options] <command> [<arguments...>]\n\nVERSION:\n 1.7.4-fd280fe\n\nOPTIONS:\n -p, --port Port to listen (default: 7681, use `0` for random port)\n -i, --interface Network interface to bind (eg: eth0), or UNIX domain socket path (eg: /var/run/ttyd.sock)\n -U, --socket-owner User owner of the UNIX domain socket file, when enabled (eg: user:group)\n -c, --credential Credential for basic authentication (format: username:password)\n -H, --auth-header HTTP Header name for auth proxy, this will configure ttyd to let a HTTP reverse proxy handle authentication\n -u, --uid User id to run with\n -g, --gid Group id to run with\n -s, --signal Signal to send to the command when exit it (default: 1, SIGHUP)\n -w, --cwd Working directory to be set for the child program\n -a, --url-arg Allow client to send command line arguments in URL (eg: http://localhost:7681?arg=foo&arg=bar)\n -W, --writable Allow clients to write to the TTY (readonly by default)\n -t, --client-option Send option to client (format: key=value), repeat to add more options\n -T, --terminal-type Terminal type to report, default: xterm-256color\n -O, --check-origin Do not allow websocket connection from different origin\n -m, --max-clients Maximum clients to support (default: 0, no limit)\n -o, --once Accept only one client and exit on disconnection\n -B, --browser Open terminal with the default system browser\n -I, --index Custom index.html path\n -b, --base-path Expected base path for requests coming from a reverse proxy (eg: /mounted/here, max length: 128)\n -P, --ping-interval Websocket ping interval(sec) (default: 5)\n -6, --ipv6 Enable IPv6 support\n -S, --ssl Enable SSL\n -C, --ssl-cert SSL certificate file path\n -K, --ssl-key SSL key file path\n -A, --ssl-ca SSL CA file path for client certificate verification\n -d, --debug Set log level (default: 7)\n -v, --version Print the version and exit\n -h, --help Print this text and exit\n\nVisit https://github.com/tsl0922/ttyd to get more information and report bugs.\n
$ ttyd -p 8080 --writable -t enableSixel=true /bin/bash\n
| \n Note \n | \n\n \n \n
| \n
$ ./ttyd -v\nttyd version 1.7.4-fd280fe\n$ dpkg-query -W build-essential cmake git libjson-c-dev libwebsockets-dev\nbuild-essential 12.10\ncmake 3.28.1-1\ngit 1:2.43.0-1\nlibjson-c-dev:amd64 0.17-1\nlibwebsockets-dev:amd64 4.3.3-1\n$ lsb_release -a\nNo LSB modules are available.\nDistributor ID: Debian\nDescription: Debian GNU/Linux trixie/sid\nRelease: n/a\nCodename: trixie\n$ arch\nx86_64\n
\u7aef\u672b\u3092Web\u30d6\u30e9\u30a6\u30b6\u3067\u5171\u6709\u3067\u304d\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a8\u30a2\u3067\u3059\uff0e \u4ee5\u524d\u4f3c\u305f\u3082\u306e\u3067GoTTY\u3092\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u304c\uff0cttyd\u306fGoTTY\u30a4\u30f3\u30b9\u30d1\u30a4\u30a2\u3089\u3057\u3044\u3067\u3059\uff0e ttyd\u306fc\u88fd\u3067MIT\u30e9\u30a4\u30bb\u30f3\u30b9\u3067\u3059\uff0e
\n\n\u4eca\u56de\u306fDebian stretch amd64(testing)\u306b\u5c0e\u5165\u3057\u307e\u3057\u305f\uff0e README.md\u3067\u306fUbuntu 16.04\u3067\u306e\u624b\u9806\u304c\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u304c\u305d\u306e\u307e\u307e\u4f7f\u3048\u307e\u3057\u305f\uff0e
$ sudo apt install cmake g++ pkg-config git vim-common libwebsockets-dev libjson-c-dev libssl-dev\r\n$ git clone https://github.com/tsl0922/ttyd.git\r\n$ cd ttyd\r\n$ mkdir build\r\n$ cd build\r\n$ cmake ..\r\n$ make\n$ ./ttyd -p 8080 bash\n\u3068\u3057\u3066\u30a6\u30a7\u30d6\u30d6\u30e9\u30a6\u30b6\u3067 http://localhost:8080/ \u306b\u7e4b\u3050\u3068\u5229\u7528\u3067\u304d\u307e\u3059\uff0e tmux\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u5171\u6709\u3057\u3066\u8907\u6570\u306e\u30d6\u30e9\u30a6\u30b6\u30671\u3064\u306e\u7aef\u672b\u306e\u64cd\u4f5c\u3068\u304bdocker\u5229\u7528\u3068\u304bGoTTY\u3068\u540c\u3058\u3088\u3046\u306b\u5229\u7528\u3067\u304d\u307e\u3059\uff0e
$ ./ttyd -p 8080 tmux new -A -s ttyd\r\n[2016/12/09 18:54:25:5954] NOTICE: Initial logging level 7\r\n[2016/12/09 18:54:25:5954] NOTICE: Libwebsockets version: 2.0.3 unknown-build-hash\r\n[2016/12/09 18:54:25:5954] NOTICE: IPV6 not compiled in\r\n[2016/12/09 18:54:25:5954] NOTICE: libev support compiled in but disabled\r\n[2016/12/09 18:54:25:5954] NOTICE: libuv support compiled in but disabled\r\n[2016/12/09 18:54:25:5955] NOTICE: Threads: 1 each 1024 fds\r\n[2016/12/09 18:54:25:5955] NOTICE: mem: platform fd map: 8192 bytes\r\n[2016/12/09 18:54:25:5955] NOTICE: Compiled with OpenSSL support\r\n[2016/12/09 18:54:25:5955] NOTICE: SSL disabled: no LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT\r\n[2016/12/09 18:54:25:5955] NOTICE: Creating Vhost 'default' port 8080, 2 protocols\r\n[2016/12/09 18:54:25:5955] NOTICE: Listening on port 8080\r\n[2016/12/09 18:54:25:5955] NOTICE: mem: per-conn: 920 bytes + protocol rx buf\r\n[2016/12/09 18:54:25:5956] NOTICE: canonical_hostname = x220\r\n[2016/12/09 18:54:25:5956] NOTICE: TTY configuration:\r\n[2016/12/09 18:54:25:5956] NOTICE: start command: tmux new -A -s ttyd\r\n[2016/12/09 18:54:25:5956] NOTICE: reconnect timeout: 10s\r\n[2016/12/09 18:54:25:5956] NOTICE: close signal: SIGHUP (1)\r\n[2016/12/09 18:54:25:6057] NOTICE: lws_protocol_init\r\n[2016/12/09 18:54:25:9806] NOTICE: HTTP connect from localhost (127.0.0.1), path: /\r\n[2016/12/09 18:54:25:0015] NOTICE: HTTP connect from localhost (127.0.0.1), path: /auth_token.js\r\n[2016/12/09 18:54:26:3474] NOTICE: client connected from localhost (127.0.0.1), total: 1\r\n[2016/12/09 18:54:26:3548] NOTICE: started process, pid: 30365\r\n[2016/12/09 18:54:34:2928] NOTICE: HTTP connect from localhost (127.0.0.1), path: /\r\n[2016/12/09 18:54:34:3132] NOTICE: error on reading from skt : 104\r\n[2016/12/09 18:54:34:3132] NOTICE: sending SIGHUP to process 30365\r\n[2016/12/09 18:54:34:3138] NOTICE: process exited with code 256, pid: 30365\r\n[2016/12/09 18:54:34:3138] NOTICE: client disconnected from localhost (127.0.0.1), total: 0\r\n[2016/12/09 18:54:34:5554] NOTICE: HTTP connect from localhost (127.0.0.1), path: /auth_token.js\r\n[2016/12/09 18:54:34:5732] NOTICE: client connected from localhost (127.0.0.1), total: 1\r\n[2016/12/09 18:54:34:5811] NOTICE: started process, pid: 30505\r\n[2016/12/09 18:54:40:0073] NOTICE: wsi 0x556bcbc34500: TIMEDOUT WAITING on 3 (did hdr 0, ah 0x556bcbbc0c50, wl 0, pfd events 0)\r\n[2016/12/09 18:54:40:0074] NOTICE: lws_header_table_detach: wsi 0x556bcbc34500: ah held 6s, ah.rxpos 0, ah.rxlen 0, mode/state 0 4,wsi->more_rx_waiting 0\n\nGoTTY\u306b\u3064\u3044\u3066\u306f\u3053\u3061\u3089\u3092\uff0e
\n\n
\n \u52c9\u5f37\u4f1a\u5411\u3051\u30b5\u30fc\u30d0\u3092\u4f5c\u3063\u3066\u307f\u308b2 / Rasbian jessie\u3092\u8a66\u3059/ Google Authenticator\u306e\u30d1\u30b9\u30b3\u30fc\u30c9\u3092\u4f5c\u308b from Kenichiro MATOHARA