“无法通过 SSH,Ubuntu 20.04焦点获取引用控制台的文件描述符”

问题描述

我正在尝试在 Ubuntu 20.04 (Focal) 上运行 Headless X。这是在一个新的 Digital Ocean 实例上。我无法使用 Ubuntu 20.04 让它工作,但我可以使用 Ubuntu 18.04 (Bionic) 和 Ubuntu 20.10 (Groovy)。

我使用具有 sudo 访问权限的用户帐户工作,并且我已通过 SSH 登录

这在 Ubuntu 18.04 (Bionic) 和 Ubuntu 20.10 (Groovy) 上工作

sudo apt-get install -y xfce4 xfce4-goodies xfonts-base
# from https://unix.stackexchange.com/questions/478742/error-when-trying-to-use-xorg-only-console-users-are-allowed-to-run-the-x-serve
sudo perl -i -pe 's/allowed_users=.*/allowed_users=anybody/' /etc/X11/Xwrapper.config
startx

但是它不适用于 Ubuntu 20.04 (Focal)。我收到此错误

$ startx


X.Org X Server 1.20.8
X Protocol Version 11,Revision 0
Build Operating System: Linux 4.15.0-124-generic x86_64 Ubuntu
Current Operating System: Linux ubuntu-s-1vcpu-1gb-nyc3-01 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-58-generic root=UUID=db153994-91fe-426f-bd88-f751e07f97f2 ro console=tty1 console=ttyS0
Build Date: 30 November 2020  05:56:33PM
xorg-server 2:1.20.8-2ubuntu2.6 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.38.4
    Before reporting problems,check http://wiki.x.org
    to make sure that you have the latest version.
Markers: (--) probed,(**) from config file,(==) default setting,(++) from command line,(!!) notice,(II) informational,(WW) warning,(EE) error,(NI) not implemented,(??) unkNown.
(==) Log file: "/var/log/Xorg.1.log",Time: Mon Dec 21 04:27:42 2020
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(II) [KMS] drm report modesetting isn't supported.
resizing surface0 to 16777216
memory space from 0x7f9ac0fe5000 to 0x7f9ac3fe2000
memory space from 0x7f9abefe5000 to 0x7f9abffe5000
resizing surface0 to 16777216
memory space from 0x7f9ac1009000 to 0x7f9ac4006000
memory space from 0x7f9abf009000 to 0x7f9ac0009000
ram_header at 67100672
surf0 size: 16777216
slots start: 1,slots end: 7
done reset
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
qxl_surface_create: Bad bpp: 1 (1)
xinit: connection to X server lost

waiting for X server to shut down disabling FB access for 0
(II) Server terminated successfully (0). Closing log file.

Couldn't get a file descriptor referring to the console

如果不是:

sudo apt-get install -y xfce4 xfce4-goodies xfonts-base

我愿意:

sudo apt-get install -y xinit

它不再适用于 Ubuntu 20.04 (Focal) 或 Ubuntu 18.04 (Bionic)。但是,它确实适用于 Ubuntu 20.10 (Groovy),以及使用自定义 Ubuntu 20.04 (Focal) 堆栈的 LambdaLabs 实例,但不适用于 Digital Ocean。

如何在 Ubuntu 20.04 (Focal) 上运行 Headless X?

我已经检查过 stackoverflow,但似乎没有一个答案对我有用。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)