Debootstrap 脚本安装,但 xorg 仅以 root 身份启动

Debootstrap script installs, but xorg only starts as root

我的 Devuan debootstrap 脚本可以工作,但 xorg 只希望在我是 root 用户时启动。您可能已经听过上百万次 xorg 的问题,但我看不出我遗漏了什么。

脚本在 gitlab


该用户属于以下组:cdrom,console,floppy,sudo,audio,video,plugdev,netdev,tty,input

已安装的 xserver 包是:
xserver-xorg-video-dummy xserver-xorg-input-void xserver-xorg-core xserver-xorg-legacy xinit x11-xserver-utils xserver-xorg-video-intel xserver-xorg-video-nouveau xserver-xorg-input-evdev xserver-xorg-input-synaptics

运行 我的脚本需要您自担风险。它尚未完成,可能会破坏内容。


脚本解释:
- 配置脚本包含您可以设置的所有变量;
- 安装脚本运行 debootstrap 并安装文件夹;
- chroot 脚本在 chroot 中执行;
- 安装后脚本在 chroot 脚本之后执行。


日志:

[   275.092] 
X.Org X Server 1.19.2
Release Date: 2017-03-02
[   275.096] X Protocol Version 11, Revision 0
[   275.097] Build Operating System: Linux 4.9.0-8-amd64 x86_64 Debian
[   275.098] Current Operating System: Linux thonkpad 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u1 (2019-09-20) x86_64
[   275.098] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.9.0-11-amd64 root=UUID=5a011253-6c0b-4520-85ba-28d2115369f6 ro quiet
[   275.100] Build Date: 03 November 2018  03:09:11AM
[   275.101] xorg-server 2:1.19.2-1+deb9u5 (https://www.debian.org/support) 
[   275.102] Current version of pixman: 0.34.0
[   275.104]    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[   275.104] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   275.108] (==) Log file: "/home/user/.local/share/xorg/Xorg.0.log", Time: Tue Oct 29 17:16:25 2019
[   275.109] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[   275.109] (==) No Layout section.  Using the first Screen section.
[   275.109] (==) No screen section available. Using defaults.
[   275.109] (**) |-->Screen "Default Screen Section" (0)
[   275.109] (**) |   |-->Monitor "<default monitor>"
[   275.109] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[   275.109] (==) Automatically adding devices
[   275.109] (==) Automatically enabling devices
[   275.109] (==) Automatically adding GPU devices
[   275.109] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   275.110] (WW) The directory "/usr/share/fonts/X11/misc" does not exist.
[   275.110]    Entry deleted from font path.
[   275.110] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[   275.110]    Entry deleted from font path.
[   275.110] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[   275.110]    Entry deleted from font path.
[   275.110] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[   275.110]    Entry deleted from font path.
[   275.110] (WW) The directory "/usr/share/fonts/X11/Type1" does not exist.
[   275.110]    Entry deleted from font path.
[   275.110] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[   275.110]    Entry deleted from font path.
[   275.110] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[   275.110]    Entry deleted from font path.
[   275.110] (==) FontPath set to:
    built-ins
[   275.110] (==) ModulePath set to "/usr/lib/xorg/modules"
[   275.110] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[   275.110] (II) Loader magic: 0x55664db3ae00
[   275.110] (II) Module ABI versions:
[   275.110]    X.Org ANSI C Emulation: 0.4
[   275.110]    X.Org Video Driver: 23.0
[   275.110]    X.Org XInput driver : 24.1
[   275.110]    X.Org Server Extension : 10.0
[   275.110] (++) using VT number 1

[   275.110] (EE) systemd-logind: failed to get session: The name org.freedesktop.login1 was not provided by any .service files
[   275.110] (II) xfree86: Adding drm device (/dev/dri/card0)
[   275.110] (II) xfree86: Adding drm device (/dev/dri/card1)
[   275.113] (--) PCI:*(0:0:2:0) 8086:0416:17aa:221e rev 6, Mem @ 0xb3400000/4194304, 0x80000000/536870912, I/O @ 0x00005000/64, BIOS @ 0x????????/131072
[   275.113] (--) PCI: (0:1:0:0) 10de:11fc:17aa:221e rev 161, Mem @ 0xb2000000/16777216, 0xa0000000/268435456, 0xb0000000/33554432, I/O @ 0x00004000/128, BIOS @ 0x????????/524288
[   275.113] (II) LoadModule: "glx"
[   275.113] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[   275.114] (II) Module glx: vendor="X.Org Foundation"
[   275.114]    compiled for 1.19.2, module version = 1.0.0
[   275.114]    ABI class: X.Org Server Extension, version 10.0
[   275.114] (==) Matched modesetting as autoconfigured driver 0
[   275.114] (==) Matched fbdev as autoconfigured driver 1
[   275.114] (==) Matched vesa as autoconfigured driver 2
[   275.114] (==) Assigned the driver to the xf86ConfigLayout
[   275.114] (II) LoadModule: "modesetting"
[   275.114] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[   275.114] (II) Module modesetting: vendor="X.Org Foundation"
[   275.114]    compiled for 1.19.2, module version = 1.19.2
[   275.114]    Module class: X.Org Video Driver
[   275.114]    ABI class: X.Org Video Driver, version 23.0
[   275.114] (II) LoadModule: "fbdev"
[   275.114] (WW) Warning, couldn't open module fbdev
[   275.114] (II) UnloadModule: "fbdev"
[   275.114] (II) Unloading fbdev
[   275.114] (EE) Failed to load module "fbdev" (module does not exist, 0)
[   275.114] (II) LoadModule: "vesa"
[   275.114] (WW) Warning, couldn't open module vesa
[   275.114] (II) UnloadModule: "vesa"
[   275.114] (II) Unloading vesa
[   275.114] (EE) Failed to load module "vesa" (module does not exist, 0)
[   275.114] (II) modesetting: Driver for Modesetting Kernel Drivers: kms



[   275.114] (WW) Falling back to old probe method for modesetting
[   275.114] (EE) open /dev/dri/card0: Permission denied
[   275.114] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[   275.114] (EE) Screen 0 deleted because of no matching config section.
[   275.114] (II) UnloadModule: "modesetting"


Fatal server error:
[   275.114] (EE) no screens found(EE) 
[   275.114] (EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
[   275.114] (EE) Please also check the log file at "/home/user/.local/share/xorg/Xorg.0.log" for additional information.
[   275.114] (EE) 
[   275.157] (EE) Server terminated with error (1). Closing log file.

您必须允许任何人启动 X11:

$ cat /etc/X11/Xwrapper.config
# Xwrapper.config (Debian X Window System server wrapper configuration file)
#
# This file was generated by the post-installation script of the x11-common
# package using values from the debconf database.
#
# See the Xwrapper.config(5) manual page for more information.
#
# This file is automatically updated on upgrades of the x11-common package
# *only* if it has not been modified since the last upgrade of that package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command as root:
#   dpkg-reconfigure x11-common
allowed_users=anybody

请注意,您必须 运行 dpkg-reconfigure x11-common 创建此文件后。