LoginSignup
13
15

More than 5 years have passed since last update.

raspberry pi 2 の HDMI に chromium を全画面で表示する

Posted at

raspberry pi 2 で何らかのデータを視覚化するときに、chromium のレンダラーを使いたい。ふつうの Web レンダリングできるのでお手軽。割と簡単だった。

chrome (chromium) には単一のアプリを全画面で使うためのキオスクモードがあるので、それを使う。

必要なパッケージを入れる。

$ sudo apt-get install chromium x11-xserver-utils unclutter

次は ~/.config/autostart に以下を追加。

@xset s off
@xset -dpms
@xset s noblank
@chromium --noerrdialogs --disable-translate --kiosk --incognitoe "$URL"

X を起動する。

$ URL="http://localhost:9292/" startx

これで全画面で表示できるように。

あとは適当にデータを http 経由で流して描画すれば OK。なお 1080p の液晶に繋いでもちょっと解像度があわなかったので Raspberry Piのディスプレイの解像度を設定する を参考にしつつ、/boot/config.txt の hdmi 周りを弄ってぴったりに。

1080p の解像度で Canvas でアニメーションさせるのはさすがに辛いけど、グラフの更新ぐらいなら問題なく行える。

なお raspbian OS 現在標準の wheezy の chronium は 22 でかなり古く、jessie に上げることによって chronium 45 を入れられれば良いんだけど、いまの所うまく入れられないみたい

13
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
15