Sunday 27 November 2022

How to setup a dummy display in ubuntu?

ref: https://techoverflow.net/2019/02/23/how-to-run-x-server-using-xserver-xorg-video-dummy-driver-on-ubuntu/

https://tecadmin.net/how-to-install-xrdp-on-ubuntu-20-04/

http://cosmolinux.no-ip.org/raconetlinux2/vnc.html

https://support.anydesk.com/zh-cn/knowledge/command-line-interface-for-linux


to setup the dummy display:-
sudo apt install xserver-xorg-video-dummy

save the following lines as dummy-1080.conf
 Section "Monitor"
  Identifier "Monitor0"
  HorizSync 28.0-80.0
  VertRefresh 48.0-75.0
  # https://arachnoid.com/modelines/
  # 1920x1080 @ 60.00 Hz (GTF) hsync: 67.08 kHz; pclk: 172.80 MHz
  Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync
EndSection

Section "Device"
  Identifier "Card0"
  Driver "dummy"
  VideoRam 256000
EndSection

Section "Screen"
  DefaultDepth 24
  Identifier "Screen0"
  Device "Card0"
  Monitor "Monitor0"
  SubSection "Display"
    Depth 24
    Modes "1920x1080_60.00"
  EndSubSection
EndSection

to run the dummy display:-
sudo X -config dummy-1920x1080.conf

to start a program in a display:-
DISPLAY=:0 firefox

to start a program in a specific display:-
sudo X :7 -config dummy-1920x1080.conf
DISPLAY=:7 firefox
(you will see error if other display already used that number)

to stop the current display service:-
sudo service gdm stop
sudo service lightdm stop

to get the list of current display:-
ps aux | grep Xorg

No comments:

Post a Comment