2017-07-19 57 views
0

我在樹莓派3運行Chromium 16的最新Raspbian。我的目的是在啓動時以--kiosk模式啓動Chromium頁面。鉻上彈出Raspbian

的皮總是會被關斷電源被關閉,所以在啓動鉻顯示「Chromium未正常關閉」彈出。我需要禁用這個彈出窗口。我已經找了一羣在網絡上的解決方案,尤其是在這個線程:https://superuser.com/questions/873381/how-can-i-disable-the-chromium-didn-t-shut-down-correctly-message-when-my-brow

可悲的是,所有這些工作對我來說的。我還嘗試將鉻首選項文件的權限設置爲只讀,但權限似乎在啓動時恢復。

任何想法?

回答

1

在最新的版本(V60這裏),我通過以下參數

chromium-browser --kiosk --app=http://www.example.com 
+0

這並未再也不會爲我隱藏彈出窗口了 – Dominick

0

我一直在尋找了很長時間運行的解決這個問題,這裏是我的解決方案:

#!/bin/bash 

#Set CrProfile to the value of your startup profile's config folder 
CrProfile="Default" 

HomeFolder="/home/myhome" 

#Set URL to the URL that you want the browser to start with 
URL="http://www.apple.com" 

#Delete SingletonLock 
rm -f $HomeFolder/.config/chromium/SingletonLock 
rm -f $HomeFolder/.cache/chromium 

#Clean up the randomly-named file(s) 
for i in $HomeFolder/.config/chromium/$CrProfile/.org.chromium.Chromium.*; do 
    sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' $i 
    sed -i 's/"exit_state": "Crashed"/"exit_state": "Normal"/' $i 
    sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' $i 
done 

#Clean up Preferences 
sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' $HomeFolder/.config/chromium/$CrProfile/Preferences 
sed -i 's/"exit_state": "Crashed"/"exit_state": "Normal"/' $HomeFolder/.config/chromium/$CrProfile/Preferences 
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' $HomeFolder/.config/chromium/$CrProfile/Preferences 

#Clean up Local State 
sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' $HomeFolder/.config/chromium/"Local State" 

/usr/bin/X11/chromium-browser --no-first-run --kiosk $URL