저는 디스플레이 매니저 일을 하고 있어요. X 서버가 이미 시작되면 디스플레이 관리자가 제대로 작동하고 사용자로 로그인할 수 있습니다. 그러나 적절한 디스플레이 관리자가 되려면 자체적으로 X 서버를 시작할 수 있어야 합니다.
출력을 보고 ps aux | grep X
다른 SLiM(Lightweight Display Manager)의 소스 코드를 검토하여 내 디스플레이 관리자가 다음을 수행해야 한다고 생각합니다.
/usr/bin/Xorg.bin :0 vt1
이는 현재 실행 중인 다른 디스플레이 관리자/X 서버가 없다고 가정합니다.
문제는 내 프로그램이 명령을 실행하거나 수동으로 실행할 때 지정된 가상 터미널로 전환하고 시스템이 "멈춘다"는 것입니다. 실제로 작동이 중단된 것인지 아니면 단지 다른 가상 터미널에 액세스할 수 없는 것인지 확실하지 않습니다(내 생각에는 후자인 것 같습니다). 이것은 컴퓨터를 다시 시작한 후의 Xorg.log입니다.
[ 631.692]
X.Org X Server 1.16.3
Release Date: 2014-12-20
[ 631.692] X Protocol Version 11, Revision 0
[ 631.692] Build Operating System: Linux 3.18.1-1-ARCH x86_64
[ 631.692] Current Operating System: Linux arch 3.17.6-1-ARCH #1 SMP PREEMPT Sun Dec 7 23:43:32 UTC 2014 x86_64
[ 631.692] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=5ba710b1-c7b7-410d-baed-d6670f818d56 rw quiet
[ 631.692] Build Date: 29 December 2014 01:09:58PM
[ 631.693]
[ 631.693] Current version of pixman: 0.32.6
[ 631.693] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 631.693] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 631.693] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Jan 3 23:38:54 2015
[ 631.865] (==) Using config directory: "/etc/X11/xorg.conf.d"
[ 631.865] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 631.911] (==) No Layout section. Using the first Screen section.
[ 631.911] (==) No screen section available. Using defaults.
[ 631.911] (**) |-->Screen "Default Screen Section" (0)
[ 631.911] (**) | |-->Monitor "<default monitor>"
[ 631.918] (==) No device specified for screen "Default Screen Section".
Using the first device section listed.
[ 631.918] (**) | |-->Device "Intel Graphics"
[ 631.918] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 631.918] (==) Automatically adding devices
[ 631.918] (==) Automatically enabling devices
[ 631.918] (==) Automatically adding GPU devices
[ 631.996] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/OTF/".
[ 631.996] Entry deleted from font path.
[ 631.996] (Run 'mkfontdir' on "/usr/share/fonts/OTF/").
[ 632.040] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi/".
[ 632.040] Entry deleted from font path.
[ 632.040] (Run 'mkfontdir' on "/usr/share/fonts/100dpi/").
[ 632.040] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".
[ 632.040] Entry deleted from font path.
[ 632.040] (Run 'mkfontdir' on "/usr/share/fonts/75dpi/").
[ 632.040] (==) FontPath set to:
/usr/share/fonts/misc/,
/usr/share/fonts/TTF/,
/usr/share/fonts/Type1/
[ 632.040] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 632.040] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 632.047] (II) Loader magic: 0x818d80
[ 632.047] (II) Module ABI versions:
[ 632.047] X.Org ANSI C Emulation: 0.4
[ 632.047] X.Org Video Driver: 18.0
[ 632.047] X.Org XInput driver : 21.0
[ 632.047] X.Org Server Extension : 8.0
[ 632.051] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c1
[ 632.052] (II) xfree86: Adding drm device (/dev/dri/card1)
[ 632.053] (II) systemd-logind: got fd for /dev/dri/card1 226:1 fd 10 paused 0
[ 632.053] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 632.054] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 11 paused 0
[ 632.058] (--) PCI:*(0:0:2:0) 8086:0116:103c:185d rev 9, Mem @ 0xc0000000/4194304, 0xb0000000/268435456, I/O @ 0x00006000/64
[ 632.058] (--) PCI: (0:1:0:0) 1002:6760:103c:185d rev 0, Mem @ 0xa0000000/268435456, 0xc6500000/131072, I/O @ 0x00005000/256, BIOS @ 0x????????/131072
[ 632.058] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[ 632.059] (II) LoadModule: "glx"
[ 632.097] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 632.114] (II) Module glx: vendor="X.Org Foundation"
[ 632.114] compiled for 1.16.3, module version = 1.0.0
[ 632.114] ABI class: X.Org Server Extension, version 8.0
[ 632.114] (==) AIGLX enabled
[ 632.114] (II) LoadModule: "intel"
[ 632.114] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[ 632.161] (II) Module intel: vendor="X.Org Foundation"
[ 632.161] compiled for 1.16.3, module version = 2.99.917
[ 632.161] Module class: X.Org Video Driver
[ 632.161] ABI class: X.Org Video Driver, version 18.0
[ 632.161] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[ 632.162] (II) intel: Driver for Intel(R) HD Graphics: 2000-6000
[ 632.162] (II) intel: Driver for Intel(R) Iris(TM) Graphics: 5100, 6100
[ 632.162] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics: 5200, 6200, P6300
[ 632.162] (++) using VT number 2
[ 632.177] (II) intel(0): Using Kernel Mode Setting driver: i915, version 1.6.0 20140725
[ 632.184] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics 3000
[ 632.184] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3, sse4.1, sse4.2, avx
[ 632.184] (II) intel(0): Creating default Display subsection in Screen section
"Default Screen Section" for depth/fbbpp 24/32
[ 632.184] (==) intel(0): Depth 24, (--) framebuffer bpp 32
[ 632.184] (==) intel(0): RGB weight 888
[ 632.184] (==) intel(0): Default visual is TrueColor
[ 632.184] (**) intel(0): Option "AccelMethod" "sna"
[ 632.184] (**) intel(0): Option "Backlight" "intel_backlight"
[ 632.184] (II) intel(0): Output LVDS1 has no monitor section
[ 632.184] (**) intel(0): Found backlight control interface intel_backlight (type 'raw') for output LVDS1
[ 632.184] (II) intel(0): Enabled output LVDS1
[ 632.185] (II) intel(0): Output VGA1 has no monitor section
[ 632.185] (II) intel(0): Enabled output VGA1
[ 632.185] (II) intel(0): Output HDMI1 has no monitor section
[ 632.185] (II) intel(0): Enabled output HDMI1
[ 632.185] (II) intel(0): Output DP1 has no monitor section
[ 632.185] (II) intel(0): Enabled output DP1
[ 632.185] (--) intel(0): Using a maximum size of 256x256 for hardware cursors
[ 632.185] (II) intel(0): Output VIRTUAL1 has no monitor section
[ 632.185] (II) intel(0): Enabled output VIRTUAL1
[ 632.185] (--) intel(0): Output LVDS1 using initial mode 1366x768 on pipe 0
[ 632.185] (--) intel(0): Output HDMI1 using initial mode 1920x1080 on pipe 1
[ 632.185] (==) intel(0): TearFree disabled
[ 632.185] (==) intel(0): DPI set to (96, 96)
[ 632.185] (II) Loading sub module "dri2"
[ 632.185] (II) LoadModule: "dri2"
[ 632.185] (II) Module "dri2" already built-in
[ 632.185] (II) Loading sub module "present"
[ 632.185] (II) LoadModule: "present"
[ 632.185] (II) Module "present" already built-in
[ 632.185] (==) Depth 24 pixmap format is 32 bpp
[ 632.201] (II) intel(0): SNA initialized with Sandybridge (gen6, gt2) backend
[ 632.201] (==) intel(0): Backing store enabled
[ 632.201] (==) intel(0): Silken mouse enabled
[ 632.202] (II) intel(0): HW Cursor enabled
[ 632.202] (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[ 632.204] (==) intel(0): DPMS enabled
[ 632.204] (==) intel(0): display hotplug detection enabled
[ 632.204] (II) intel(0): [DRI2] Setup complete
[ 632.204] (II) intel(0): [DRI2] DRI driver: i965
[ 632.204] (II) intel(0): [DRI2] VDPAU driver: i965
[ 632.204] (II) intel(0): direct rendering: DRI2 enabled
[ 632.204] (II) intel(0): hardware support for Present enabled
[ 632.204] (--) RandR disabled
[ 632.390] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
[ 632.390] (II) AIGLX: enabled GLX_ARB_create_context
[ 632.390] (II) AIGLX: enabled GLX_ARB_create_context_profile
[ 632.390] (II) AIGLX: enabled GLX_EXT_create_context_es2_profile
[ 632.390] (II) AIGLX: enabled GLX_INTEL_swap_event
[ 632.390] (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control
[ 632.390] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB
[ 632.390] (II) AIGLX: enabled GLX_ARB_fbconfig_float
[ 632.390] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects
[ 632.390] (II) AIGLX: enabled GLX_ARB_create_context_robustness
[ 632.391] (II) AIGLX: Loaded and initialized i965
[ 632.391] (II) GLX: Initialized DRI2 GL provider for screen 0
[ 632.405] (II) intel(0): switch to mode [email protected] on LVDS1 using pipe 0, position (0, 0), rotation normal, reflection none
[ 632.407] (EE) intel(0): failed to set mode: Permission denied [13]
[ 632.408] (II) intel(0): switch to mode [email protected] on HDMI1 using pipe 1, position (0, 0), rotation normal, reflection none
[ 632.413] (EE) intel(0): failed to set mode: Permission denied [13]
[ 632.413] (WW) intel(0): failed to restore desired modes on VT switch
[ 632.413] (EE) intel(0): sna_mode_check: invalid state found on pipe 0, disabling CRTC:7
[ 632.413] (EE) intel(0): sna_mode_check: invalid state found on pipe 1, disabling CRTC:11
[ 632.769] (II) config/udev: Adding input device Power Button (/dev/input/event4)
[ 632.769] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[ 632.769] (II) LoadModule: "evdev"
[ 632.813] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
[ 632.876] (II) Module evdev: vendor="X.Org Foundation"
[ 632.876] compiled for 1.16.2, module version = 2.9.1
[ 632.876] Module class: X.Org XInput Driver
[ 632.876] ABI class: X.Org XInput driver, version 21.0
[ 632.878] (II) systemd-logind: got fd for /dev/input/event4 13:68 fd 18 paused 1
[ 632.878] (II) systemd-logind: releasing fd for 13:68
[ 632.904] (II) config/udev: Adding input device Video Bus (/dev/input/event16)
[ 632.904] (**) Video Bus: Applying InputClass "evdev keyboard catchall"
[ 632.905] (II) systemd-logind: got fd for /dev/input/event16 13:80 fd 18 paused 1
[ 632.905] (II) systemd-logind: releasing fd for 13:80
[ 632.930] (II) config/udev: Adding input device Lid Switch (/dev/input/event1)
[ 632.931] (II) No input driver specified, ignoring this device.
[ 632.931] (II) This device may have been added with another device file.
[ 632.931] (II) config/udev: Adding input device Video Bus (/dev/input/event11)
[ 632.931] (**) Video Bus: Applying InputClass "evdev keyboard catchall"
[ 632.933] (II) systemd-logind: got fd for /dev/input/event11 13:75 fd 18 paused 1
[ 632.933] (II) systemd-logind: releasing fd for 13:75
[ 632.955] (II) config/udev: Adding input device Power Button (/dev/input/event3)
[ 632.955] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[ 632.956] (II) systemd-logind: got fd for /dev/input/event3 13:67 fd 18 paused 1
[ 632.956] (II) systemd-logind: releasing fd for 13:67
[ 632.984] (II) config/udev: Adding input device HDA Digital PCBeep (/dev/input/event6)
[ 632.984] (II) No input driver specified, ignoring this device.
[ 632.984] (II) This device may have been added with another device file.
[ 632.985] (II) config/udev: Adding input device HDA Intel PCH Front Headphone (/dev/input/event8)
[ 632.985] (II) No input driver specified, ignoring this device.
[ 632.985] (II) This device may have been added with another device file.
[ 632.985] (II) config/udev: Adding input device HDA Intel PCH HDMI/DP,pcm=3 (/dev/input/event9)
[ 632.985] (II) No input driver specified, ignoring this device.
[ 632.985] (II) This device may have been added with another device file.
[ 632.986] (II) config/udev: Adding input device HDA Intel PCH Mic (/dev/input/event7)
[ 632.986] (II) No input driver specified, ignoring this device.
[ 632.986] (II) This device may have been added with another device file.
[ 632.986] (II) config/udev: Adding input device Logitech USB Receiver (/dev/input/event13)
[ 632.986] (**) Logitech USB Receiver: Applying InputClass "evdev pointer catchall"
[ 632.988] (II) systemd-logind: got fd for /dev/input/event13 13:77 fd 18 paused 1
[ 632.988] (II) systemd-logind: releasing fd for 13:77
[ 633.048] (II) config/udev: Adding input device Logitech USB Receiver (/dev/input/mouse1)
[ 633.048] (II) No input driver specified, ignoring this device.
[ 633.048] (II) This device may have been added with another device file.
[ 633.049] (II) config/udev: Adding input device Logitech USB Receiver (/dev/input/event14)
[ 633.049] (**) Logitech USB Receiver: Applying InputClass "evdev keyboard catchall"
[ 633.050] (II) systemd-logind: got fd for /dev/input/event14 13:78 fd 18 paused 1
[ 633.050] (II) systemd-logind: releasing fd for 13:78
[ 633.104] (II) config/udev: Adding input device Microsft Microsoft Wireless Desktop Receiver 3.1 (/dev/input/event12)
[ 633.104] (**) Microsft Microsoft Wireless Desktop Receiver 3.1: Applying InputClass "evdev keyboard catchall"
[ 633.105] (II) systemd-logind: got fd for /dev/input/event12 13:76 fd 18 paused 1
[ 633.105] (II) systemd-logind: releasing fd for 13:76
[ 633.160] (II) config/udev: Adding input device Microsft Microsoft Wireless Desktop Receiver 3.1 (/dev/input/event15)
[ 633.161] (**) Microsft Microsoft Wireless Desktop Receiver 3.1: Applying InputClass "evdev pointer catchall"
[ 633.161] (**) Microsft Microsoft Wireless Desktop Receiver 3.1: Applying InputClass "evdev keyboard catchall"
[ 633.162] (II) systemd-logind: got fd for /dev/input/event15 13:79 fd 18 paused 1
[ 633.162] (II) systemd-logind: releasing fd for 13:79
[ 633.224] (II) config/udev: Adding input device Microsft Microsoft Wireless Desktop Receiver 3.1 (/dev/input/mouse2)
[ 633.224] (II) No input driver specified, ignoring this device.
[ 633.224] (II) This device may have been added with another device file.
[ 633.224] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event0)
[ 633.224] (**) AT Translated Set 2 keyboard: Applying InputClass "evdev keyboard catchall"
[ 633.226] (II) systemd-logind: got fd for /dev/input/event0 13:64 fd 18 paused 1
[ 633.226] (II) systemd-logind: releasing fd for 13:64
[ 633.290] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/event10)
[ 633.290] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "evdev touchpad catchall"
[ 633.290] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "touchpad catchall"
[ 633.290] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "Default clickpad buttons"
[ 633.290] (II) LoadModule: "synaptics"
[ 633.291] (II) Loading /usr/lib/xorg/modules/input/synaptics_drv.so
[ 633.346] (II) Module synaptics: vendor="X.Org Foundation"
[ 633.346] compiled for 1.16.0, module version = 1.8.1
[ 633.346] Module class: X.Org XInput Driver
[ 633.346] ABI class: X.Org XInput driver, version 21.0
[ 633.348] (II) systemd-logind: got fd for /dev/input/event10 13:74 fd 18 paused 1
[ 633.348] (II) systemd-logind: releasing fd for 13:74
[ 633.397] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/mouse0)
[ 633.397] (**) SynPS/2 Synaptics TouchPad: Ignoring device from InputClass "touchpad ignore duplicates"
[ 633.397] (II) config/udev: Adding input device ST LIS3LV02DL Accelerometer (/dev/input/event2)
[ 633.397] (II) No input driver specified, ignoring this device.
[ 633.397] (II) This device may have been added with another device file.
[ 633.398] (II) config/udev: Adding input device ST LIS3LV02DL Accelerometer (/dev/input/js0)
[ 633.398] (II) No input driver specified, ignoring this device.
[ 633.398] (II) This device may have been added with another device file.
[ 633.399] (II) config/udev: Adding input device HP WMI hotkeys (/dev/input/event5)
[ 633.399] (**) HP WMI hotkeys: Applying InputClass "evdev keyboard catchall"
[ 633.400] (II) systemd-logind: got fd for /dev/input/event5 13:69 fd 18 paused 1
[ 633.400] (II) systemd-logind: releasing fd for 13:69
저는 X 서버 버전 1.16.3과 함께 Arch Linux를 사용하고 있습니다. IRC의 #xorg에 있는 한 사람은 자신의 시스템에서 내가 지정한 명령을 실행하면 Arch Linux가 아닌 xorg 버전 1.15를 사용하고 있음에도 불구하고 여전히 다른 가상 터미널에 액세스할 수 있음을 확인했습니다.
자신의 시스템이 내가 설명한 대로 작동하는지 다른 사람이 확인할 수 있습니까(나처럼 작동하면 시스템을 재부팅해야 합니다). X 서버를 수동으로 시작하고 다른 가상 터미널에 계속 액세스하려면 어떻게 해야 합니까?
답변1
나는 여기서 답을 찾았습니다.https://www.archlinux.org/news/xorg-server-116-is-now-available/
X는 이제 systemd-logind의 도움으로 루트가 없습니다. 즉, 로그인에 사용된 것과 동일한 가상 터미널에서 시작해야 하며 stderr를 리디렉션하면 루트 없는 로그인이 중단됩니다. 이전 루트 실행 동작은 Xorg.wrap 구성 파일(man xorg.wrap)을 통해 복원할 수 있습니다. 로그인 관리자(gdm, kdm...)를 통해 X를 시작하면 아직 루트 없는 액세스가 제공되지 않습니다.
현재 사용 중인 터미널이 아닌 다른 터미널에서 X를 시작하려고 합니다.