当前位置: 首页 > web >正文

无外接物理显示器的Ubuntu系统的远程桌面连接(升级版)

文章目录

  • 操作步骤
  • 实践截图
  • 配置 Xorg 的虚拟显示界面(升级版)

操作步骤

“远程连接”,在设置里直接打开就可以.进行配置就行.

1.配置 GRUB 以支持无显示器启动
sudo nano /etc/default/grub
(里面有一行改为:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=vesa:off video=efifb:off nomodeset")2.保存后更新 grub
sudo update-grub3.设置自动登录
sudo nano /etc/gdm3/custom.conf
(修改添加:
AutomaticLoginEnable=True
AutomaticLogin=robot
WaylandEnable=false)4.重启 GDM 服务
sudo systemctl restart gdm35.打开"密码和密钥" 应用程序
seahorse
(右击 "登录" ,单击 "更改密码",输入原密码后,空着密码行不输入,点击确定继续)

实践截图

请添加图片描述

请添加图片描述

请添加图片描述

在这里插入图片描述
请添加图片描述

请添加图片描述
这样就可以在局域网内其他电脑上,远程桌面连接访问无外接显示器的Ubuntu22.04系统的计算机.

配置 Xorg 的虚拟显示界面(升级版)

上面的配置完成后,显示的界面分辨率仅为 1080×738 .
此升级版就是想要将虚拟显示界面分辨率设置为 1920×1080 .

此配置的前提是禁用 Wayland 的界面,显示界面系统为 Xorg(X11).
查看界面:

echo $XDG_SESSION_TYPE

输出 x11 -> Xorg .
输出 wayland -> Wayland .

首先是 “/etc/default/grub” 文件更改为:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=vesa:1920x1080 video=efifb:off"
GRUB_CMDLINE_LINUX=""# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=1920x1080# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

安装虚拟显示器驱动(xserver-xorg-video-dummy):
安装虚拟显示器驱动,强制系统识别 “虚拟屏幕” ,支持分辨率(如1920×1080).

1.
sudo apt install xserver-xorg-video-dummy2.
sudo nano /etc/X11/xorg.conf.d/10-dummy.conf

添加内容:

Section "Device"Identifier "DummyDevice"Driver "dummy"VideoRam 256000
EndSectionSection "Monitor"Identifier "DummyMonitor"HorizSync 5.0-75.0VertRefresh 50.0-75.0Modeline "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
EndSectionSection "Screen"Identifier "Default Screen"Device "DummyDevice"Monitor "DummyMonitor"DefaultDepth 24SubSection "Display"Depth 24Modes "1920x1080"EndSubSection
EndSection

重新启动后,就不会在外接显示器上显示界面了,只有通过虚拟界面进行显示,若要恢复的话,只需要删除 “/etc/X11/xorg.conf.d/10-dummy.conf” 文件即可.

http://www.xdnf.cn/news/13755.html

相关文章:

  • C#学习第30天: 匹配模式
  • 大模型技术30讲-5-利用数据来减少过拟合现象
  • Next.js + Supabase = 快速开发 = 高速公路
  • 怎样下载某个SCI期刊的endnote style?答:直接去endnote官网搜索期刊名称并下载即可
  • JMeter + 命令行服务器端压测全流程详解
  • 风控系统中,要调用第三方服务获取信息,很慢,如何解决?
  • vue3项目移动端实现进度条可手动滑动控制进度和点击控制进度
  • Docker入门篇--从安装到使用
  • 【Linux手册】从「程序」到「进程」:计算机世界的运行机制
  • 智慧养老与数字健康:科技赋能老年生活,构建全方位养老体系
  • Redis核心数据结构详解与应用
  • arduino通过控制器,精准控制24V电动轮毂转动
  • 解锁Scrapy爬虫:从入门到实战的Python秘籍
  • 图像分割技术:像素级的精准识别(superior哥深度学习系列第12期)
  • 关于MySql深分页的问题及优化方案
  • 软件测试的艺术与科学:构建商业级产品的优雅草卓伊凡
  • 微信小程序渗透测试指北(附案例)
  • ATM 模拟器 Golang 程序--示例
  • 【二分答案1-----切木棒】
  • 基于YOLOv11与单目测距的实战教程:从目标检测到距离估算
  • 嵌入式通信模块实战新范式:基于虚拟仿真平台的NB-IoT核心技能训练——零硬件损耗的全栈式实验方案,重构物联网通信教学逻辑
  • 基于多面体模型的编译优化技术
  • Ubuntu 绑定Conda
  • 在 Vue 3 中修改 el-select 组件接收的 prop 值
  • Parasoft C++Test软件集成测试(部件测试)_操作指南
  • 【3D插件推荐】PolyCloth v2.07 超强布料模拟工具(附图文安装教程与下载)
  • 力扣面试150题--单词接龙
  • stm32cubeide中编译非flash起始地址开始的程序
  • 解决vscode中使用debuger运行app.py但是报错No module named app的方法
  • kali2024 由于没有公钥,无法验证下列签名---解决方案