2018/10/31
gsettings で vino を有効にする方法 on Ubuntu 18.04
先日、`dconf` を用いて vino を有効にする方法を書いたのですが、これを `gsettings` を使って出来ないか探ってみました。 > 参考 > > [Ubuntu 18.04 で Vino を有効にする方法(コマンドラインで)](https://kokufu.blogspot.com/2018/10/ubuntu-1804-vino.html)
プログラム全般、無節操に手を出しまくってみる
先日、`dconf` を用いて vino を有効にする方法を書いたのですが、これを `gsettings` を使って出来ないか探ってみました。 > 参考 > > [Ubuntu 18.04 で Vino を有効にする方法(コマンドラインで)](https://kokufu.blogspot.com/2018/10/ubuntu-1804-vino.html)
「[Vino の設定は gconftool-2 では出来ない](https://kokufu.blogspot.com/2017/09/vino-gconftool-2.html)」 に書いたように、Ubuntu 16.04 までは gsettings を用いて [Vino](https://people.gnome.org/~markmc/remote-desktop-2.html) を有効に出来ましたコマンドラインで。
しかし、Ubuntu 18.04 では `org.gnome.Vino` の中に `enabled` というキーが存在しません。
つまり、先の方法では Vino を有効に出来ません。
@Ubuntu 16.04 (Vino 3.8.1-0Ubuntu9.2) 他の Ubuntu マシンからアクセス出来ている [Vino](https://launchpad.net/ubuntu/+source/vino) に Windows 10 の VNC クライアントからアクセスしてみたのですが、エラーが出てうまくいきませんでした。
[モニタをつないでいない Ubuntu の Vino に接続する](https://kokufu.blogspot.com/2018/02/ubuntu-vino.html) で Vino に繋がるようになったのは良いものの、キーボードレイアウトがおかしいようです日本語でもなければ、普通の英字キーボードでもない。
よく考えれば何も設定していないのであたりまえですね。
@Ubuntu 16.04 LTS [Vino](https://github.com/GNOME/vino) はそもそも画面をミラーリングするアプリケーションなので、画面出力をしていないマシンにつなぐことは出来ません。 しかし、バックグラウンドで GUI アプリケーションを動かしておきたい場合、モニタ無しで VNC 接続したいこともあります。 そんな時は、ダミーのグラフィックドライバをインストールすることで接続出来るようになります。 > 参考 > > [Vino - ArchWiki](https://wiki.archlinux.jp/index.php/Vino#.E3.83.98.E3.83.83.E3.83.89.E3.83.AC.E3.82.B9.E3.82.B5.E3.83.BC.E3.83.90.E3.83.BC.E3.81.A7.E5.AE.9F.E8.A1.8C)
Ubuntu で Vino の設定をコマンドラインで行う場合、「`gconftool-2` を使う」と書いてあるサイトが沢山あるのですが、 既に `gconftool-2` は使えません。 `gconftool-2` は GNOME2 用の設定ツールなので、GNOME3正確には gtk+3 で導入された `gsettings` を使用しますUnity がベースにしている GNOME のバージョンがイマイチよくわからん…。 `gsettings` を使って、以下のように Vino を有効化することができます。 ```console `gutter: false; $ gsettings set org.gnome.Vino enabled true ``` 設定できる項目一覧は以下のように取得可能です。 ```console `gutter: false; $ gsettings list-keys org.gnome.Vino notify-on-connect alternative-port disable-background use-alternative-port icon-visibility use-upnp view-only enabled prompt-enabled disable-xdamage authentication-methods network-interface require-encryption mailto lock-screen-on-disconnect vnc-password ``` Ubuntu 18.04 LTS からデフォルトデスクトップが Unity ではなく GNOME に戻るようなので、またいろいろ変わるんだろうなぁ。 参考 - [vino - Enable remote VNC from the commandline? - Ask Ubuntu](https://askubuntu.com/a/265012) - [Gconf, Dconf, Gsettings and the relationship between them - Ask Ubuntu](https://askubuntu.com/questions/249887/gconf-dconf-gsettings-and-the-relationship-between-them) - [Growing Ubuntu for cloud and IoT, rather than phone and convergence | Ubuntu Insights](https://insights.ubuntu.com/2017/04/05/growing-ubuntu-for-cloud-and-iot-rather-than-phone-and-convergence/)2018/10/30 追記Ubuntu 18.04 では設定方法が変わりました。
[Ubuntu 18.04 で Vino を有効にする方法(コマンドラインで) | 穀風](https://kokufu.blogspot.com/2018/10/ubuntu-1804-vino.html)
アプリケーション開発から組み込みまで手を出しているフリーランスのエンジニア
何故か C,C++ の仕事をすることが多いけど、本当は Java や C# が好き
最近は Android がらみ多し