设置 vnc 服务器并且没有物理显示器:Ubuntu 16.04 LTS

ank*_*540 1 ubuntu vnc x-server unity

我正在尝试在安装了统一桌面的 Ubuntu 16.04 LTS 上设置 vnc 服务器。我不想安装其他桌面环境。

我从安装开始,x11vncserver后来意识到当服务器没有物理显示器时它不起作用。它给出的错误为

*** XOpenDisplay failed. No -display or DISPLAY.
Run Code Online (Sandbox Code Playgroud)

(有多种方法可以模拟显示器,但我没有尝试过。)

删除它后,我尝试了vncserverxvnc)它确实有效,但我需要移动到 gnome 面板,它看起来非常奇怪且质量低下。

连接详细信息:千兆以太网(从客户端到服务器的所有方式)但不在本地网络上。

有人可以帮忙吗。谢谢。

Mio*_*Rin 6

我用它来为我的无头服务器设置一个虚拟监视器,以使用 VNC 和 Steam 家庭流媒体:

/etc/X11/xorg.conf.d/10-monitor.conf

    Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0    #Virtual monitor needs this
    VertRefresh     43.0 - 72.0    #this, too
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"              #change for AMD or Intel
    VendorName     "NVIDIA Corporation"  #this, too
    Option "NoLogo" "1"                  #also this
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
        Virtual 1920 1080
    Option          "AllowEmptyInitialConfiguration" "True"
    EndSubSection
EndSection
Run Code Online (Sandbox Code Playgroud)

根据需要进行调整以适合您的 GPU 和显示器设置。请注意,此配置仅适用于 X。 Mir 和 Wayland 使用不同的配置设置。