解决Todesk远程连接没有接显示屏的服务器,出现黑屏现象

解决办法就是虚拟出来一个显示屏

  1. 通过终端安装虚拟显示器软件。
bash 复制代码
$ sudo apt-get install  xserver-xorg-core-hwe-18.04
$ sudo apt-get install  xserver-xorg-video-dummy

ubuntu20.04、 ubuntu22.04都适用

  1. 添加配置文件
bash 复制代码
sudo vim /usr/share/X11/xorg.conf.d/xorg.conf

在配置文件中输入以下内容

bash 复制代码
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
  1. 重启
bash 复制代码
sudo reboot

问题就解决了,ToDesk 就可以直接远程连接桌面了。
注意事项

这个办法的缺点就是物理显示器不能用了!

直接删除掉刚刚修改的 xorg.conf 文件,也可以恢复成物理显示器。

相关推荐
深耕AI1 小时前
【完整教程】宝塔面板FTP配置与FileZilla连接服务器
运维·服务器
无聊的小坏坏3 小时前
从单 Reactor 线程池到 OneThreadOneLoop:高性能网络模型的演进
服务器·网络·一个线程一个事件循环
AI智域边界 - Alvin Cho3 小时前
Bloomberg、LSEG 与 MCP 缺口:为什么尚未发布完整的 MCP 服务器,以及多智能体系统如何解決这问题
运维·服务器
_OP_CHEN4 小时前
Linux网络编程:(七)Vim 编辑器完全指南:从入门到精通的全方位实战教程
linux·运维·服务器·编辑器·vim·linux生态·linux软件
Maple_land4 小时前
第1篇:Linux工具复盘上篇:yum与vim
linux·运维·服务器·c++·centos
shizhan_cloud5 小时前
Linux 硬盘分区管理
linux·运维
蓁蓁啊5 小时前
Ubuntu 虚拟机文件传输到 Windows的一种好玩的办法
linux·运维·windows·单片机·ubuntu
忧郁的橙子.5 小时前
一、Rabbit MQ 初级
服务器·网络·数据库
liao__ran6 小时前
ClickHouse CPU 排查快速参考指南
运维·服务器·clickhouse
liao__ran6 小时前
ClickHouse CPU 排查详细指南
运维·clickhouse