端末をWeb共有できるttyd

端末をWebブラウザで共有できるソフトウェエアです. 以前似たものでGoTTYを試してみましたが,ttydはGoTTYインスパイアらしいです. ttydはc製でMITライセンスです.

導入

今回はDebian stretch amd64(testing)に導入しました. README.mdではUbuntu 16.04での手順が書かれていますがそのまま使えました.

$ sudo apt install cmake g++ pkg-config git vim-common libwebsockets-dev libjson-c-dev libssl-dev
$ git clone https://github.com/tsl0922/ttyd.git
$ cd ttyd
$ mkdir build
$ cd build
$ cmake ..
$ make

動かしてみる

$ ./ttyd -p 8080 bash

としてウェブブラウザで http://localhost:8080/ に繋ぐと利用できます. tmuxのセッションを共有して複数のブラウザで1つの端末の操作とかdocker利用とかGoTTYと同じように利用できます.

$ ./ttyd -p 8080 tmux new -A -s ttyd
[2016/12/09 18:54:25:5954] NOTICE: Initial logging level 7
[2016/12/09 18:54:25:5954] NOTICE: Libwebsockets version: 2.0.3 unknown-build-hash
[2016/12/09 18:54:25:5954] NOTICE: IPV6 not compiled in
[2016/12/09 18:54:25:5954] NOTICE: libev support compiled in but disabled
[2016/12/09 18:54:25:5954] NOTICE: libuv support compiled in but disabled
[2016/12/09 18:54:25:5955] NOTICE:  Threads: 1 each 1024 fds
[2016/12/09 18:54:25:5955] NOTICE:  mem: platform fd map:  8192 bytes
[2016/12/09 18:54:25:5955] NOTICE:  Compiled with OpenSSL support
[2016/12/09 18:54:25:5955] NOTICE:  SSL disabled: no LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT
[2016/12/09 18:54:25:5955] NOTICE: Creating Vhost 'default' port 8080, 2 protocols
[2016/12/09 18:54:25:5955] NOTICE:  Listening on port 8080
[2016/12/09 18:54:25:5955] NOTICE:  mem: per-conn:          920 bytes + protocol rx buf
[2016/12/09 18:54:25:5956] NOTICE:  canonical_hostname = x220
[2016/12/09 18:54:25:5956] NOTICE: TTY configuration:
[2016/12/09 18:54:25:5956] NOTICE:   start command: tmux new -A -s ttyd
[2016/12/09 18:54:25:5956] NOTICE:   reconnect timeout: 10s
[2016/12/09 18:54:25:5956] NOTICE:   close signal: SIGHUP (1)
[2016/12/09 18:54:25:6057] NOTICE: lws_protocol_init
[2016/12/09 18:54:25:9806] NOTICE: HTTP connect from localhost (127.0.0.1), path: /
[2016/12/09 18:54:25:0015] NOTICE: HTTP connect from localhost (127.0.0.1), path: /auth_token.js
[2016/12/09 18:54:26:3474] NOTICE: client connected from localhost (127.0.0.1), total: 1
[2016/12/09 18:54:26:3548] NOTICE: started process, pid: 30365
[2016/12/09 18:54:34:2928] NOTICE: HTTP connect from localhost (127.0.0.1), path: /
[2016/12/09 18:54:34:3132] NOTICE: error on reading from skt : 104
[2016/12/09 18:54:34:3132] NOTICE: sending SIGHUP to process 30365
[2016/12/09 18:54:34:3138] NOTICE: process exited with code 256, pid: 30365
[2016/12/09 18:54:34:3138] NOTICE: client disconnected from localhost (127.0.0.1), total: 0
[2016/12/09 18:54:34:5554] NOTICE: HTTP connect from localhost (127.0.0.1), path: /auth_token.js
[2016/12/09 18:54:34:5732] NOTICE: client connected from localhost (127.0.0.1), total: 1
[2016/12/09 18:54:34:5811] NOTICE: started process, pid: 30505
[2016/12/09 18:54:40:0073] NOTICE: wsi 0x556bcbc34500: TIMEDOUT WAITING on 3 (did hdr 0, ah 0x556bcbbc0c50, wl 0, pfd events 0)
[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

20161209_18:12:56-1180

GoTTYについてはこちらを.


勉強会向けサーバを作ってみる2 / Rasbian jessieを試す/ Google Authenticatorのパスコードを作る from Kenichiro MATOHARA

wgetライクにbittorrentを取得するtget

wgetコマンドのような使い勝手のBittorrentクライアントのtgetを試してみました. node製MITライセンスのアプリケーションです.

導入はnpmで.tgetではなくt-getなので注意.

$ npm install -g t-get

torrentファイル,マグネットリンクの他torrent URLでもダウンロードできるようです. 実行すると以下のようなプログレスが表示されてダウンロードが始まります.行幅はハードコードされているようです.

$ tget https://downloads.raspberrypi.org/raspbian_latest.torrent
 downloading 1 files (1.4GB) [============================= ] 97% 64.0s 588.8KB/s 99 peers

ダウンロード完了時は以下のような感じ.ダウンロード完了後直ちに終了します.

$ tget https://downloads.raspberrypi.org/raspbian_latest.torrent
------------------
2016-11-25-raspbian-jessie.zip 1.4GB
------------------
 downloaded 1 files (1.4GB)

ファイルの保存先はカレントディレクトリで,カレントディレクトリに書き込めない場合はエラーにならずファイルが消えてしまうようです.

便利だけどアップロード関係なく終了してしまうのでBittorrentへの貢献度は低そうです. ちなみに最近はリモートのTransmissionをfile serverで動作させて,Transmission-remote-gtkで操作しています.

Screenfetch的な情報表示コマンドのNeofetch

Screenfetch的な情報表示コマンドのNeofetch

よくデスクトップのキャプチャを取得するときに表示されているScreenfetchコマンドというものがあります.システムの情報とアスキーアートを素敵に表示してくれます. これににたものでNetfetchというものを見かけたので試してみました.こちらは画像も扱えるようです.

導入

以下のページに各種環境への導入方法が書かれています.

Debian sid/stretchにはパッケージがあるようなことが書かれていますが,

Neofetch is in Debian Unstable/Stretch's official repositories.

今はsidのみのようです.

ということでひとまずstretchではこんな感じで導入しました.

$ #-- /etc/apt/sources.list.d/neofetch を作る
$ sudo apt edit-sources neofetch
$ cat /etc/apt/sources.list.d/neofetch.list
deb http://dl.bintray.com/dawidd6/neofetch jessie main
$ #-- 鍵のインポート
$ wget "https://bintray.com/user/downloadSubjectPublicKey?username=bintray" -O Release-neofetch.key
$ gpg Release-neofetch.key
pub   rsa4096 2015-02-17 [SC]
      8756C4F765C9AC3CB6B85D62379CE192D401AB61
uid           Bintray (by JFrog) <bintray@bintray.com>
sub   rsa4096 2015-02-17 [E]
$ sudo apt-key add Release-neofetch.key
$ rm Release-neofetch.key
$ #-- pkg情報更新&pkg導入
$ sudo apt update
$ sudo apt install neofetch

早速実行

$ neofetch --help

    NEOFETCH

    USAGE: neofetch --option "value" --option "value"

    NOTE: There's also a config option for each flag below.

    Info:
    --disable infoname          Allows you to disable an info line from appearing
                                in the output.
                                NOTE: You can supply multiple args. eg.
                                'neofetch --disable cpu gpu disk shell'
                                NOTE: The arguments must all be lowercase.
    --os_arch on/off            Hide/Show OS architecture.
    --speed_type type           Change the type of cpu speed to display.
                                Possible values: current, min, max, bios,
                                scaling_current, scaling_min, scaling_max
                                NOTE: This only support Linux with cpufreq.
    --cpu_shorthand type        Shorten the output of CPU
                                Possible values: name, speed, tiny, on, off
    --cpu_cores type            Whether or not to display the number of CPU cores
                                Takes: logical, physical, off
                                NOTE: 'physical' doesn't work on BSD.
    --cpu_speed on/off          Hide/Show cpu speed.
    --cpu_temp on/off           Hide/Show cpu temperature.
                                NOTE: This only works on Linux and BSD.
                                NOTE: For FreeBSD-based systems, you need to enable coretemp
                                      kernel module.
    --distro_shorthand on/off   Shorten the output of distro (tiny, on, off)
                                NOTE: This option won't work in Windows (Cygwin)
    --kernel_shorthand on/off   Shorten the output of kernel
                                NOTE: This option won't work in BSDs (except PacBSD and PC-BSD)
    --uptime_shorthand on/off   Shorten the output of uptime (tiny, on, off)
    --refresh_rate on/off       Whether to display the refresh rate of each monitor
                                Unsupported on Windows
    --gpu_brand on/off          Enable/Disable GPU brand in output. (AMD/NVIDIA/Intel)
    --gtk_shorthand on/off      Shorten output of gtk theme/icons
    --gtk2 on/off               Enable/Disable gtk2 theme/icons output
    --gtk3 on/off               Enable/Disable gtk3 theme/icons output
    --shell_path on/off         Enable/Disable showing $SHELL path
    --shell_version on/off      Enable/Disable showing $SHELL version
    --ip_host url               Url to query for public IP
    --song_shorthand on/off     Print the Artist/Title on seperate lines
    --birthday_shorthand on/off Shorten the output of birthday
    --birthday_time on/off      Enable/Disable showing the time in birthday output
    --birthday_format format    Format the birthday output. (Uses 'date' cmd format)

    Text Formatting:
    --colors x x x x x x        Changes the text colors in this order:
                                title, @, underline, subtitle, colon, info
    --underline on/off          Enable/Disable the underline.
    --underline_char char       Character to use when underlining title
    --bold on/off               Enable/Disable bold text

    Color Blocks:
    --color_blocks on/off       Enable/Disable the color blocks
    --block_width num           Width of color blocks in spaces
    --block_height num          Height of color blocks in lines
    --block_range start end     Range of colors to print as blocks

    Bars:
    --bar_char 'elapsed char' 'total char'
                                Characters to use when drawing bars.
    --bar_border on/off         Whether or not to surround the bar with '[]'
    --bar_length num            Length in spaces to make the bars.
    --bar_colors num num        Colors to make the bar.
                                Set in this order: elapsed, total
    --cpu_display mode          Bar mode.
                                Takes: bar, infobar, barinfo, off
    --memory_display mode       Bar mode.
                                Takes: bar, infobar, barinfo, off
    --battery_display mode      Bar mode.
                                Takes: bar, infobar, barinfo, off
    --disk_display mode         Bar mode.
                                Takes: bar, infobar, barinfo, off

    Image:
    --image type                Image source. Where and what image we display.
                                Possible values: wall, ascii,
                                /path/to/img, /path/to/dir/, off
    --size 00px | --size 00%    How to size the image.
                                Possible values: auto, 00px, 00%, none
    --crop_mode mode            Which crop mode to use
                                Takes the values: normal, fit, fill
    --crop_offset value         Change the crop offset for normal mode.
                                Possible values: northwest, north, northeast,
                                west, center, east, southwest, south, southeast

    --xoffset px                How close the image will be to the left edge of the
                                window. This only works with w3m.
    --yoffset px                How close the image will be to the top edge of the
                                window. This only works with w3m.
    --bg_color color            Background color to display behind transparent image.
                                This only works with w3m.
    --gap num                   Gap between image and text.
                                NOTE: --gap can take a negative value which will
                                move the text closer to the left side.
    --clean                     Delete cached files and thumbnails.

    Ascii:
    --ascii value               Where to get the ascii from, Possible values:
                                distro, /path/to/ascii
    --ascii_colors x x x x x x  Colors to print the ascii art
    --ascii_distro distro       Which Distro's ascii art to print
                                NOTE: Arch and Ubuntu have 'old' logo varients.
                                NOTE: Use 'arch_old' or 'ubuntu_old' to use the old logos.
                                NOTE: Ubuntu has flavor varients.
                                NOTE: Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME'
                                or 'Ubuntu-Budgie' to use the flavors.
    --ascii_logo_size           Size of ascii logo.
                                Supported distros: Arch, Gentoo, Crux, OpenBSD.
    --ascii_bold on/off         Whether or not to bold the ascii logo.
    --logo | -L                 Hide the info text and only show the ascii logo.

    Screenshot:
    --scrot | -s /path/to/img   Take a screenshot, if path is left empty the screen-
                                shot function will use $scrot_dir and $scrot_name.
    --upload | -su /pth/t/img   Same as --scrot but uploads the scrot to a website.
    --image_host                Website to upload scrots to. Takes: imgur, teknik
    --scrot_cmd cmd             Screenshot program to launch

    Other:
    --config /path/to/config    Specify a path to a custom config file
    --config none               Launch the script without a config file
    --help                      Print this text and exit
    --version                   Show neofetch version
    -v                          Display error messages.
    -vv                         Display a verbose log for error reporting.

オプション結構多いです. とりあえず素で実行.

20161207_05:12:12-5188

情報もScreenfetchより増えています.

20161207_05:12:20-9093

次は画像を指定してみます.画像サイズが大きかったので25%に縮小もしています. 楽しい :)

20161207_05:12:35-3963

20161207_06:12:30-16979

画像の表示については環境によってうまく行く行かないがあるようです.うまく表示されない場合は以下のWikiを参照すると良さそうです.

マルチプラットホーム&スライドに特化したMarkdown WriterのMarpを試す

最近勉強会の発表資料はスライドにせずにMarkdownやAsciidocで書いてhtmlやpdfに書き出してました.これをSlideshareとかに置いているのですが,スライド形式に比べてアクセスが1桁少ないです. Markdownでスライドにする方法はいろいろあるのですが,1ページの分量がまちまちになってはみ出したりと言ったことをよくやってしまいあまりつかっていませんでした.

そんなところにプレゼンテーション向けのMarkdown Writerがあったので試してみました.

マルチプラットホームでElectron製です.PDFファイルへの書き出しも可能です.

雰囲気は以下の画像でだいたいわかるんじゃないかと思います.

https://yhatt.github.io/marp/images/marp-cast.gif

https://yhatt.github.io/marp/images/marp-cast.gif

左ペインでMarkdownを書いて右ページにプレビューが表示されます. プレビューは3種類選べますが,"1:1 slide/Slide List"のどちらかだとスライド形式でプレビューが表示されるのでレイアウトを確認しながら書くことができます.

試しにちょっと書いてみました. するとMarpのプレビュー,Evinceでは問題なかったのですが,SlideshareにPDFをアップロードすると背景画像やフッターが上下反転しています……. 試しにSpekerdeckにもアップロードしてみましたがこちらは問題なし. 恐らくSlideshareの問題ではないかと思います.

Electron製ということで降るmのマシンでは重いかなと思っていたのですが,Core2Duoのマシンでも試してみましたが一気にスクロールとかしなければ重く感じるところはなく実用範囲内に感じました.

マルチプラットホーム&スライドに特化したMarkdown WriterのMarpを試す

最近勉強会の発表資料はスライドにせずにMarkdownやAsciidocで書いてhtmlやpdfに書き出してました.これをSlideshareとかに置いているのですが,スライド形式に比べてアクセスが1桁少ないです. Markdownでスライドにする方法はいろいろあるのですが,1ページの分量がまちまちになってはみ出したりと言ったことをよくやってしまいあまりつかっていませんでした.

そんなところにプレゼンテーション向けのMarkdown Writerがあったので試してみました.

マルチプラットホームでElectron製です.PDFファイルへの書き出しも可能です.

雰囲気は以下の画像でだいたいわかるんじゃないかと思います.

https://yhatt.github.io/marp/images/marp-cast.gif

https://yhatt.github.io/marp/images/marp-cast.gif

左ペインでMarkdownを書いて右ページにプレビューが表示されます. プレビューは3種類選べますが,"1:1 slide/Slide List"のどちらかだとスライド形式でプレビューが表示されるのでレイアウトを確認しながら書くことができます.

試しにちょっと書いてみました. するとMarpのプレビュー,Evinceでは問題なかったのですが,SlideshareにPDFをアップロードすると背景画像やフッターが上下反転しています……. 試しにSpekerdeckにもアップロードしてみましたがこちらは問題なし. 恐らくSlideshareの問題ではないかと思います.

Electron製ということで降るmのマシンでは重いかなと思っていたのですが,Core2Duoのマシンでも試してみましたが一気にスクロールとかしなければ重く感じるところはなく実用範囲内に感じました.

Mumbleでリモート会議

先週ですが,FSIJ 月例会に参加していました. といっても東京に出て行ったわけではなくネットワーク開催だったので家からの参加です.

ということでMumbleというソフトウェアで音声チャット + Etherpad(ウェブブラウザベース)でテキスト交換という環境でした. Mumbleを前もって試していればよかったのだけど直前に入れてなかなか参加できず途中からの参加になりましたorz~

MumbleはDebian stretch amd64環境ではパッケージが存在する( mumble )のでこれを導入するだけでした.マルチプラットホームで各種環境向けにも存在して,Androidなどでも利用できるようです. – Mumble, the open source VoIP solutionPlumble – Mumble VOIP (Free) – Google Play の Android アプリPlumble – Mumble VOIP – Google Play の Android アプリ

今回使用機器は以下のような感じ.でしたが,スピーカーは試行錯誤している時に繋いだもので後で試すと本体のスピーカーで大丈夫でした.

  • PC : Thinkpad X220(Debian stretch amd64)
  • マイク : 3.5mmジャックに直接挿せるもの(型番不明)
  • スピーカー : ELECOM LBT-SPTR01AV(Bluetooth)

このときMumble利用時に嵌ったところをメモしておきます. – ヘッドホンとマイクが1つの端子の端末でマイクを繋ぐとヘッドホンもそちらを向いてしまって音が出なかった – Bluetothヘッドセットを繋ぐとそちらから音が出るようになったがマイクがうまく働かない – PulseAudio Volume Control (pavucontrol)で見るとマイクがミュートになっていたので解除してMumbleに割り当て – 伝送方式を"push to talk"にしたがpushがわからなかった -> ショートカットで適当なキーに割り当て(Mumble非アクティブ時も有効)

  • その他
    • Awesome WM環境ではMumbleが最小化してしまうと窓を復帰させる方法が今のところわからない.タスクトレイのアイコンをクリックしても出てこない.(Xfce4はアイコンクリックで出てくるよう)
    • 一回設定できればフォーカスがなくてもショートカットが効いて話せるのでとりあえず使えるけどチャットと誰が話しているかのアイコンの確認(唇アイコンが赤くなる)が出来ない(オーバーレイの設定でどうにかなりそう?)
    • アイコンを右クリックしてそのまま離すと丁度終了になってしまう…….
    • Mumbleの音声品質は16kbps/40kbps/72kbpsから選択可能(規定値は40k)
    • push to talkを使うとその時しか音声が飛ばないので周りの環境に左右されにくくて良い(キー入力の音や環境音が入りにくい)

最近はUstream.tv/Youtube Liveなどの動画配信やBBB(BigBlueButton)などの動画を使ったオンライン会議システムなどで中継ということが多いですが,手弁当の勉強会なんかだと回線などの問題でうまく行かなかったりすることが多いですが割り切って音声のみの中継にしてしまうのもありだなと感じました.

最近リモート参加した勉強会

形態素解析システムJUMAN++をちょっと試したメモ

京都大学 黒橋・河原研究室より2016-09-23にリリースされた新しい形態素解析システムだそうです.とりあえず手元の環境で動かしてみたのでそのメモです.

環境

Debian stretch amd64 / Ubuntu 16.10 amd64 で確認しました.どちらも以下の手順でOKでした.開発元ではCent OS 6.7で動作確認をしているようです.

build

必要なパッケージを導入してmake.

$ sudo apt install libboost-dev build-essential
$ wget http://lotus.kuee.kyoto-u.ac.jp/nl-resource/jumanpp/jumanpp-1.01.tar.xz
$ sha256sum jumanpp-1.01.tar.xz 0d587416a3eb7123638f9c1e30a649b72dfb483448839168dcb48be572c5919a  jumanpp-1.01.tar.xz
$ tar tvf ./jumanpp-1.01.tar.xz
$ tar xf ./jumanpp-1.01.tar.xz
$ ./configure --prefix=${HOME}/usr/local
$ make
$ make install

動作確認

適当に文章を入れてみたり.

$ ~/usr/local/bin/jumanpp
こんにちはJUMANPP++
こんにち こんにち こんにち 名詞 6 時相名詞 10 * 0 * 0 "代表表記:今日/こんにち カテゴリ:時間"
は は は 助詞 9 副助詞 2 * 0 * 0 NIL
JUMANPP JUMANPP JUMANPP 未定義語 15 その他 1 * 0 * 0 "品詞推定:名詞"
+ + + 未定義語 15 その他 1 * 0 * 0 "品詞推定:名詞"
+ + + 未定義語 15 その他 1 * 0 * 0 "品詞推定:名詞"
EOS

青空文庫の古典を流し込んでみたり.

$ wget -O - http://www.aozora.gr.jp/cards/000160/files/2617_ruby_23916.zip | zcat | iconv -f SJIS -t UTF-8 - | ~/usr/local/bin/jumanpp
三十 三十 三十 名詞 6 数詞 7 * 0 * 0 "カテゴリ:数量"
年 ねん 年 接尾辞 14 名詞性名詞助数辞 3 * 0 * 0 "代表表記:年/ねん 準内容語 カテゴリ:時間"
後 ご 後 接尾辞 14 名詞性名詞接尾辞 2 * 0 * 0 "代表表記:後/ご 内容語"
の の の 助詞 9 接続助詞 3 * 0 * 0 NIL
世界 せかい 世界 名詞 6 普通名詞 1 * 0 * 0 "代表表記:世界/せかい カテゴリ:場所-その他"
      :

古典とかよりTwitterとかのほうがいいかもしれない.

$ curl 'https://twitter.com/search?f=tweets&vertical=default&q=lang%3Aja%20near%3A%22%E6%97%A5%E6%9C%AC%22%20within%3A15mi&src=typd&lang=ja' | grep 'class="TweetTextSize  js-tweet-text tweet-text"' | lynx -stdin -dump -nolist | ~/usr/local/bin/jumanpp

ちなみにちょっと試したいだけであれば導入しなくても以下のページで試せます.ラティス表示も楽しい.

mind mappingアプリのFreeplaneを試す

FreeMindをDebian jessieに導入しようとしたらパッケージが見当たりません. 探してみるとメンテナンスされてないからjessie/sidから消されたようです.

We have Freeplane which is actively maintained and roughly equivalent in features.

でもFreeplaneというメンテされている似たものがあるよということでこれを試してみることにしました.

#ちなみにFreeMindのsiteを見るとstableのリリースが2013年で1.0.1.その後1.1.0-Beta1が2015年1.1.0-Beta2が2016年に出ていて,Debianでは0.9.0だったようです.

FreeplaneはどうもFreeMindのフォークのようです.見た目も使い勝手も似ています.JAVA製でマルチプラットホームなのも同じです.

導入はパッケージがあるのでそれを利用しました.

$ sudo apt install freeplane

起動ロゴ……何だろうこの虫?は.

20161005_01:10:30-30616

初回起動時にはWhats Newが表示されました.

20161005_01:10:09-30241

少し日本語が豆腐になってしまっている場所がありましたがフォントを日本語フォントに変更することで解決しました. 後はチュートリアルとかに目を通しておくと良さそうです.

チュートリアルなどのドキュメントは/usr/share/freeplane/doc/辺りにありました.

$ ls -1 /usr/share/freeplane/doc/*_ja.mm
/usr/share/freeplane/doc/freeplaneFunctions_ja.mm
/usr/share/freeplane/doc/freeplaneTutorial_ja.mm
/usr/share/freeplane/doc/freeplane_ja.mm

20161005_01:10:53-29876

20161005_01:10:09-28858

20161005_01:10:32-27112

未だそんなに使っていませんが,FreeMindと同じような操作性だし以前書いた.mmも読めるようなのでそのまま移行できそうです.

<追記>

Ubuntu 16.10 amd64(今は未だリリース前)にも入れてみましたが起動しませんでした.とりあえず本家から.zipを貰ってきて動かしています.一応報告はしてみました.

</追記>

byobu+screenでfunctionkeyを無効にする

機能覚えてないし遠いしたまに間違って押して混乱したりするので無効にしました.
Debian stretch amd64, Ubuntu 16.04 LTS amd64で確認.

$ vi ~/.byobu/keybindings

して

source $BYOBU_PREFIX/share/byobu/keybindings/common

の次の行頭で i して編集モードにした後
Ctrl+a !(aは設定してあるescape key)する.
するとこんなのが出てくるので,

:source /usr/share/byobu/keybindings/f-keys.screen

頭の : を消して

source /usr/share/byobu/keybindings/f-keys.screen.disable

を書いておく

保存して起動しなおして反映.

#viである必然性はないのでお好きなテキストエディタでどうぞ.
#tmuxの場合はこっち~/.byobu/keybindings.tmuxになるのかな?(それとも byobu-select-backend で切り替えるとファイル名入れ替わる?)

コマンドラインからGooglecastにcast出来るcastnowを試す

見つけたので試してみました

Debian stretch amd64, Ubuntu 16.04 LTS amd64で確認しています.

$HOME以下にPATH通してnpmで導入しています./usr/local以下で良ければnpm install castnow -gだけでいいかも.

$ sudo apt install npm nodejs-legacy
$ echo 'PATH="$PATH":$HOME/node_modules/.bin' >> ~/.bashrc
$ source ~/.bashrc
$ npm install castnow

入りましたがChromecastがみあたらない?

$ castnow --help
 
Usage: castnow [<media>, <media>, ...] [OPTIONS]
 
Option                  Meaning
--tomp4                 Convert file to mp4 during playback
--device <name>         The name of the Chromecast device that should be used
--address <ip>          The IP address or hostname of your Chromecast device
--subtitles <path/url>  Path or URL to an SRT or VTT file
--subtitle-scale <scale> Subtitle font scale
--subtitle-color <color> Subtitle font RGBA color
--myip <ip>             Your local IP address
--quiet                 No output
--peerflix-* <value>    Pass options to peerflix
--ffmpeg-* <value>      Pass options to ffmpeg
--type <type>           Explicitly set the mime-type (e.g. "video/mp4")
--bypass-srt-encoding   Disable automatic UTF-8 encoding of SRT subtitles
--seek <hh:mm:ss>       Seek to the specified time on start using the format hh:mm:ss or mm:ss
--loop                  Loop over playlist, or file, forever
--help                  This help screen
 
Player controls
 
Key                     Action
space                   Toggle between play and pause
m                       Toggle mute
up                      Volume Up
down                    Volume Down
left                    Seek backward
right                   Seek forward
n                       Next in playlist
s                       Stop playback
quit                    Quit
 
$ castnow
Error: device not found

名前解決が出来なかったようでipを指定するとcast出来ました.別のマシンでは通ったのでこのマシンがおかしいようです.

$ avahi-browse -a -t -l -r
+ wlp3s0 IPv6 x201s                                         Remote Disk Management local
+ wlp3s0 IPv4 Chromecast-KagoLUG                            _googlecast._tcp     local
= wlp3s0 IPv6 x201s                                         Remote Disk Management local
   hostname = [x201s.local]
   address = [fe80::222:faff:fe33:456a]
   port = [22]
   txt = []
= wlp3s0 IPv4 Chromecast-KagoLUG                            _googlecast._tcp     local
   hostname = [Chromecast-KagoLUG.local]
   address = [192.168.2.206]
   port = [8009]
   txt = ["rs=" "bs=FA8FCA59198D" "st=1" "ca=4101" "fn=Chromecast-KagoLUG" "ic=/setup/icon.png" "md=Chromecast" "ve=05" "rm=A652B47431F36207" "id=7c14aaaa62a6002dd95ba94814e5c5e0"]
$ castnow --address 192.168.2.206 http://commondatastorage.googleapis.com/gtv-videos-bucket/ED_1280.mp4
 
  State     : Playing....

パイプも使えるので色々応用できそうな気がします.
(最近Chromiumがamd64/i386しかなくなったようですが,これを使えば他のアーキテクチャでもスクリーンキャストもできそう?)