解决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 文件,也可以恢复成物理显示器。

相关推荐
Alex艾力的IT数字空间6 小时前
在 Kylin(麒麟)操作系统上搭建 Docker 环境
大数据·运维·缓存·docker·容器·负载均衡·kylin
陳10306 小时前
Linux:进程间切换与调度
linux·运维·服务器
JJay.8 小时前
Android BLE 稳定连接的关键,不是扫描,而是 GATT 操作队列
android·服务器·前端
SilentSamsara8 小时前
TCP 三次握手:连接建立失败的那些坑
运维·服务器·网络·网络协议·tcp/ip
code tsunami9 小时前
如何在车辆数据自动化中解决Cloudflare Turnstile
运维·microsoft·自动化
翼龙云_cloud10 小时前
亚马逊云代理商:CloudWatch Agent 全解析 5 步实现服务器监控
运维·服务器·云计算·aws·云服务器
Cyber4K11 小时前
【Nginx专项】基础入门篇:状态页、微更新、内容替换、读取、压缩及防盗链
linux·运维·服务器·nginx·github
门思科技12 小时前
LoRaWAN项目无需NS和平台?一体化网关如何简化部署与成本
服务器·网络·物联网
Bruce_Liuxiaowei12 小时前
顺藤摸瓜:一次从防火墙告警到设备实物的溯源实战
运维·网络·网络协议·安全
IpdataCloud13 小时前
效果广告中点击IP与转化IP不一致?用IP查询怎么做归因分析?
运维·服务器·网络