Todesk、向日葵等访问“无显示器”主机黑屏问题解决

我的环境是 ubuntu 22.04

安装

要安装 video dummy,请在终端中运行以下命令:

sudo apt install xserver-xorg-video-dummy

配置

video dummy 的配置文件请自行搜索

使用任何文本编辑器打开此文件。

我的是 /etc/X11/xorg.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

可以根据需要修改此配置文件。以下是一些常见的配置选项:

  • Identifier:虚拟显示器的名称。
  • Driver:虚拟显示器的驱动程序。
  • Modeline:虚拟显示器的显示模式。
  • Viewport:虚拟显示器的显示区域。

重启电脑

查看效果

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2023-12-15 23:38:04       91 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2023-12-15 23:38:04       97 阅读
  3. 在Django里面运行非项目文件

    2023-12-15 23:38:04       78 阅读
  4. Python语言-面向对象

    2023-12-15 23:38:04       88 阅读

热门阅读

  1. C++学习-2023/12/13-C++函数上的改变

    2023-12-15 23:38:04       59 阅读
  2. pyspark on yarn

    2023-12-15 23:38:04       61 阅读
  3. ThinkPHP和PHP有什么区别

    2023-12-15 23:38:04       61 阅读
  4. 深度学习中,网络、模型、算法有什么区别

    2023-12-15 23:38:04       54 阅读
  5. 汽车锁行业分析:市场销量接近1700万台

    2023-12-15 23:38:04       55 阅读
  6. Linux面试题1

    2023-12-15 23:38:04       44 阅读
  7. 端口复用的SPI控制

    2023-12-15 23:38:04       69 阅读
  8. 【Android】动态添加 Fragment

    2023-12-15 23:38:04       59 阅读