Joh*_*man 66 remote-desktop nx headless 14.04 display-resolution
我有一台未连接外部显示器的 Ubuntu 14.04 服务器。我使用 NoMachine 远程控制机器。当我这样做时,Unity/Gnome 界面没有看到任何连接的显示器,所以在连接 NoMachine 时我只能使用 800x600。如果我插入显示器,我可以将分辨率设置为远程计算机上 NoMachine 窗口的任何大小。
有没有办法在 Ubuntu 上创建“假”监视器设备,以便我可以在 Unity/Gnome 中设置桌面分辨率?
Joh*_*man 80
找到了一种无需虚拟插头的方法:Ubuntu Headless VNC VESA 800x600 分辨率修复 ~ Andy Hawkins @ 2011 年 6 月 12 日
基本上安装一个虚拟驱动程序:
sudo apt-get install xserver-xorg-video-dummy
Run Code Online (Sandbox Code Playgroud)
然后将其写入/usr/share/X11/xorg.conf.d/xorg.conf(或可能/etc/X11/xorg.conf)文件中(创建一个,如果它不存在):
Section "Device"
Identifier "Configured Video Device"
Driver "dummy"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
HorizSync 31.5-48.5
VertRefresh 50-70
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1024x800"
EndSubSection
EndSection
Run Code Online (Sandbox Code Playgroud)
然后重新启动计算机。
Eri*_*ski 26
在未连接显示器的 Ubuntu 14.04 桌面上指定分辨率:
从 xrandr 手册页:
--fb widthxheight
Reconfigures the screen to the specified size. All configured
monitors must fit within this size. When this option is not
provided, xrandr computes the smallest screen size that will
hold the set of configured outputs; this option provides a
way to override that behaviour.
Run Code Online (Sandbox Code Playgroud)
因此在连接后使用命令:
xrandr --fb 1280x1024
Run Code Online (Sandbox Code Playgroud)
use*_*.dz 12
这是一种硬件解决方案/解决方法,可能适用于某些图形硬件/驱动程序。也可以更好,如果您需要经常插入物理监视器,那么您不必像使用 dummy/vesa/fb 驱动程序(静态配置)那样重新启动 X Server。
要么你买一个假VGA(或DVI模拟)插头或某些称之为虚拟适配器。
或者只是构建它,在 VGA 输出端使用 3 个大约75 欧姆(标准)的电阻器:1?6, 2?7, 3?8。
+/- 10 欧姆可以正常工作。有些卡只使用一个电阻器。(就像我的英特尔,2?7 或 3?8,会被检测为显示器)。顺便说一下,这是在 VGA 显示器中实现的标准阻抗。
参考:如何为您的显卡创建虚拟插头。
想阅读更多有关显示器及其分辨率检测的用户,我也建议阅读有关 VESA DDC 和 EDID 的内容。
Ruf*_*fus 11
考虑Xvfb,当您实际插入真正的显示器时,它可能最不可能弄乱显示
以下命令将在带有 ID1和分辨率的假显示器上启动 lightdm1024x76
export DISPLAY=:1
Xvfb :1 -screen 0 1024x768x16 &
sleep 1
#exec gnome-session & # use gnome-session instead of lightdm
exec lightdm-session &
Run Code Online (Sandbox Code Playgroud)
对我来说,上述解决方案都不起作用。要添加新设备/屏幕 VIRTUAL1,对我有用的是:
所有详细信息都在这里:在没有插入显示器时添加假显示
信息:对我来说,它可以编辑 /etc/X11/xorg.conf 而不是 /usr/share/X11/xorg.conf.d/xorg.conf
小智 5
我在 Ubuntu 18.04 上,我是这样解决的:
我已经使用这个问题的答案创建了虚拟显示:https : //unix.stackexchange.com/questions/378373/add-virtual-output-to-xorg
创建一个 20-intel.conf 文件:
须藤vi /usr/share/X11/xorg.conf.d/20-intel.conf
将以下配置信息添加到文件中:
Run Code Online (Sandbox Code Playgroud)Section "Device" Identifier "intelgpu0" Driver "intel" Option "VirtualHeads" "2" EndSection这告诉英特尔 GPU 创建 2 个虚拟显示器。您可以根据需要更改 VirtualHead 的数量。
然后我制作了一个 shell 脚本(不要忘记设置可执行文件)并将其放在启动应用程序中:
#! /bin/bash
/usr/bin/xrandr -d :0 --output VIRTUAL1 --primary --auto
/usr/bin/xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900$
/usr/bin/xrandr --addmode VIRTUAL1 "1600x900_60.00"
/usr/bin/xrandr
Run Code Online (Sandbox Code Playgroud)
这样,VIRTUAL1 被设置为输出并连接。在启动时,正在创建一个新模式(使用“cvt 1600 900”找到)并指定给 VIRTUAL1。
唯一的问题是:重新启动时缺少底座...尚未解决。
| 归档时间: |
|
| 查看次数: |
237784 次 |
| 最近记录: |