我的树莓派(Jessie)从xserver-xorg
1:7.7+16
更新为1:7.7+b1
和
来自xserver-xorg-core
的 2:1.18.4-2+rpi1
到2:1.17.2-1+rpi1
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;
我该怎样做才能让这项工作再次成功?
感谢您的帮助!