【问题标题】:Debootstrap script installs, but xorg only starts as root已安装 Debootstrap 脚本,但 xorg 仅以 root 身份启动
【发布时间】:2019-10-29 09:09:27
【问题描述】:

我的 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.

【问题讨论】:

  • 试试“chmod u+s /usr/bin/Xorg”
  • 这并没有解决它。这是日志:privatebin.net/…
  • 我看到您在此处的 cmets 中粘贴了一个链接,并在您的其他问题中使用了一个链接。尽量不要使用指向其他网站的链接。另外,如果它解决了您的问题,请接受答案。其他用户会发现了解某项内容是否对您有用很有帮助。
  • 我没有足够的积分来使用图像,所以我不得不使用链接。我的问题都没有我正在寻找的解决方案。当我有它时,我会发布解决方案。如果不是解决方案,我不会将其标记为解决方案,除非它足以帮助我找到解决方案。

标签: bash root xorg chroot xserver


【解决方案1】:

您必须允许任何人启动 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

【讨论】:

  • 这帮助我发现我的脚本中的组有问题。我会将其标记为解决方案,因为它可能会解决我的问题。我必须先解决我的其他问题。
  • 我不想允许“任何人”。我不认为这对安全性有好处。问题没有解决。新日志包含在我的问题中。
  • 我认为用户仍然必须是 video 和 tty 组的成员。你为什么不呢? X只能启动一次,不能杀死其他用户的进程。据我所知,Xorg 文件都有根所有者。我很想听听你的论点:-)
猜你喜欢
  • 2012-02-04
  • 2021-02-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-01-29
  • 2014-04-29
  • 2013-11-23
  • 2014-09-26
相关资源
最近更新 更多