LoginSignup
1
2

More than 1 year has passed since last update.

物理モニタ無しでx11vnc

Last updated at Posted at 2022-04-11

前置き

x11vnc自体は接続できるが物理モニタを外すとVNCまで固まり操作が効かない状態、仮想ディスプレイ構築で対処する覚書

環境

OS: Ubuntu20.04 Server
デスクトップ: LXDE
普段はsshのみでディスプレイもHIDも繋がないがグラフィックのあるソフトを常時起動しておきたい

ダミービデオドライバインストール

xserver-xorg-video-dummyをインストール
sudo apt-get install xserver-xorg-video-dummy

設定ファイル

cvtコマンドを使用して環境に応じた値を取得

$ cvt 1366 768
# 1368x768 59.88 Hz (CVT) hsync: 47.79 kHz; pclk: 85.25 MHz
Modeline "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync

上記で取得した値を入れ込みつつ新規ファイルを作成
ファイル名の頭の数字は優先度のため同ディレクトリのファイルと被らないように
/usr/share/X11/xorg.conf.d/20-dummy.conf

Section "Monitor"
    Identifier "Monitor0"
    HorizSync 5.0-200.0
    VertRefresh 5.0-200.0
    #↓これ
    # 1368x768 59.88 Hz (CVT) hsync: 47.79 kHz; pclk: 85.25 MHz
    Modeline "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync
EndSection

Section "Device"
    Identifier "Monitor0"
    Driver "dummy"
EndSection

Section "Screen"
    DefaultDepth 24
    Identifier "Screen0"
    Device "Card0"
    Monitor "Monitor0"
    SubSection "Display"
    Depth 24
    Modes "1368x768"
    EndSubSection
EndSection

終わったらreboot

おまけ(x11vnc)

x11vncは

sudo apt-get install x11vnc

x11vnc -display :0 -forever -repeat -rfbport 5900 

とかで起動すると上手く行く

1
2
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
1
2