X 서버 업데이트 1.18.4 이후 `su -- pi -c "startx" &`가 더 이상 작동하지 않습니다.

X 서버 업데이트 1.18.4 이후 `su -- pi -c "startx" &`가 더 이상 작동하지 않습니다.

내 Raspberry Pi(Jessie)가 xserver-xorg-core를 1.17.2에서 1.18.4로 업데이트했습니다.

su -- pi -c "startx" &더 이상 사용할 수 없습니다 /etc/rc.local.

Cannot open virtual console 2

고쳐 쓰다:

Start-Date: 2016-12-09  20:17:57
Commandline: apt full-upgrade -y
Install: libpam-systemd:armhf (215-17+deb8u5, automatic), libllvm3.9:armhf (3.9-4, automatic)
Upgrade: xserver-xorg-input-synaptics:armhf (1.8.2-1~bpo8+1, 1.8.3-2)
raspberrypi-sys-mods:armhf (20161205, 20161208+1)
libdrm-freedreno1:armhf (2.4.65-3~bpo8+1, 2.4.71-1+rpi1)
libglapi-mesa:armhf (11.1.0-1+rpi1, 13.0.0-1+rpi1)
libwayland-client0:armhf (1.6.0-2, 1.11.0-2)
xserver-xorg-core:armhf (1.17.2-1+rpi1, 1.18.4-2+rpi1)
libegl1-mesa:armhf (11.1.0-1+rpi1, 13.0.0-1+rpi1)
libgbm1:armhf (11.1.0-1+rpi1, 13.0.0-1+rpi1)
libdrm-radeon1:armhf (2.4.65-3~bpo8+1, 2.4.71-1+rpi1)
libxfont1:armhf (1.5.1-1, 1.5.2-1)
xserver-common:armhf (1.17.2-1+rpi1, 1.18.4-2+rpi1)
libdrm2:armhf (2.4.65-3~bpo8+1, 2.4.71-1+rpi1)
libdrm-nouveau2:armhf (2.4.65-3~bpo8+1, 2.4.71-1+rpi1)
raspi-config:armhf (20161114, 20161207)
libgl1-mesa-dri:armhf (11.1.0-1+rpi1, 13.0.0-1+rpi1)
xserver-xorg-video-fbdev:armhf (0.4.4-1+rpi1, 0.4.4-1+rpi2)
libdrm-amdgpu1:armhf (2.4.65-3~bpo8+1, 2.4.71-1+rpi1)
xserver-xorg-input-evdev:armhf (2.9.2-1~bpo8+1, 2.10.3-1)
xserver-xorg:armhf (7.7+7+b1, 7.7+16)
libgl1-mesa-glx:armhf (11.1.0-1+rpi1, 13.0.0-1+rpi1)
Remove: xserver-xorg-input-wacom:armhf (0.26.0+20140918-1)
End-Date: 2016-12-09  20:18:29

가득한 /etc/rc.local:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

# Wait for the TV-screen to be turned on...
while ! $( tvservice --dumpedid /tmp/edid | fgrep -qv 'Nothing written!' ); do
        bHadToWaitForScreen=true;
        printf "===> Screen is not connected, off or in an unknown mode, waiting for it to become available...\n"
        sleep 10;
done;

printf "===> Screen is on, extracting preferred mode...\n"
_DEPTH=32;
eval $( edidparser /tmp/edid | fgrep 'preferred mode' | tail -1 | sed -Ene 's/^.+(DMT|CEA) \(([0-9]+)\) ([0-9]+)x([0-9]+)[pi]? @.+/_GROUP=\1;_MODE=\2;_XRES=\3;_YRES=\4;/p' );

printf "===> Resetting screen to preferred mode: %s-%d (%dx%dx%d)...\n" $_GROUP $_MODE $_XRES $_YRES $_DEPTH
tvservice --explicit="$_GROUP $_MODE"
sleep 1;

printf "===> Resetting frame-buffer to %dx%dx%d...\n" $_XRES $_YRES $_DEPTH
fbset --all --geometry $_XRES $_YRES $_XRES $_YRES $_DEPTH -left 0 -right 0 -upper 0 -lower 0;
sleep 1;

if [ -f /boot/xinitrc ]; then
        ln -fs /boot/xinitrc /home/pi/.xinitrc;
        su -- pi -c "startx" &
        bash /home/pi/.xinitrc;
fi

exit 0

가득한 /boot/xinitrc:

#!/bin/sh
while true; do

        # Clean up previously running apps, gracefully at first then harshly
        killall -TERM chromium 2>/dev/null;
        killall -TERM matchbox-window-manager 2>/dev/null;
        sleep 2;
        killall -9 chromium 2>/dev/null;
        killall -9 matchbox-window-manager 2>/dev/null;

        # Clean out existing profile information
        rm -rf /home/pi/.cache;
        rm -rf /home/pi/.config;
        rm -rf /home/pi/.pki;

        # Generate the bare minimum to keep Chromium happy!
        mkdir -p /home/pi/.config/chromium/Default
        sqlite3 /home/pi/.config/chromium/Default/Web\ Data "CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR); INSERT INTO meta VALUES('version','46'); CREATE TABLE keywords (foo INTEGER);";

        # Disable DPMS / Screen blanking
        xset -dpms
        xset s off

        # Reset the framebuffer's colour-depth
        fbset -depth $( cat /sys/module/*fb*/parameters/fbdepth );

        # Hide the cursor (move it to the bottom-right, comment out if you want mouse interaction)
        xwit -root -warp $( cat /sys/module/*fb*/parameters/fbwidth ) $( cat /sys/module/*fb*/parameters/fbheight )

        # Start the window manager (remove "-use_cursor no" if you actually want mouse interaction)
        matchbox-window-manager -use_titlebar no -use_cursor no &

        # Start the browser (See http://peter.sh/experiments/chromium-command-line-switches/)
        chromium-browser --app=http://127.0.0.1/status

done;

이 작업을 다시 수행하려면 어떻게 해야 합니까?

당신의 도움을 주셔서 감사합니다!

답변1

이제(버전 2:1.17.2-2 기준) 열린 세션과 동일한 VT에서 X 서버를 실행해야 합니다. X 서버는 루트 권한(이를 logind달성하는 데 사용됨) 없이 시작하려고 시도하지만 대신 모든 VT에서 시작하지 못합니다.

빠른 수정 방법은 이 xserver-xorg-legacy패키지를 설치하는 것입니다. 그러면 X 서버가 이전처럼 루트로 시작될 수 있습니다.

su --그런데 왜 대신 을 사용하고 있습니까 su -? 로그인 쉘을 시작하려고하지 않습니까?

관련 정보