得分
60
Advertisement
答案 (6)
解决方案找到了!
Advertisement
得分
29
2014-10-23 10:58:59 +0000
试试这一行
chrome.exe --kiosk --disable-session-crashed-bubble "http://example.com"
更多详细信息 http://peter.sh/experiments/chromium-command-line-switches/ 。
AhbapAldirmaz
http://superuser.stackexchange.com/users/151992
Advertisement
得分
28
2015-01-15 01:33:30 +0000
我在所提供的解决方案中看到了一些不便之处。
–incognito switch removes cache, what is pretty bad in most circumstances.
(复制粘贴chrome帮助 )
Google Chrome浏览器有数百个未记录的命令行标志,这些标志由开发者随意添加和删除。
–disable-session-crashed-bubble 取决于你使用的是哪个版本的chrome,最实际的版本是v39不允许这个设置。
我的解决办法是修改用户配置文件,把崩溃状态覆盖为正常关闭状态,这是个简单的黑客,效果很好。
这是我在Ubuntu 12.04和14.04下的chrome-only会话的kiosk模式下运行的脚本
#!/bin/sh
sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' ~/.config/google-chrome/Default/Preferences
sed -i 's/"exit_type": "Crashed"/"exit_type": "None"/' ~/.config/google-chrome/Default/Preferences
google-chrome --kiosk "http://some_url"
它简单地找到并替换了字符串
- “exited/_cleanly”:false
- exit/_type": “Crashed”
用
- “exited/_cleanly”: true
- “exit_type”: “None”
所以,无论chrome如何关闭, 它总是认为它已经优雅地关闭了。(在许多chrome版本中测试)。
得分
14
2012-11-14 01:23:27 +0000
试试这个
- 进入
chrome://flags/ - 然后点击
Enable上的链接,上面写着:"Disable Better session restore“
希望能帮到你。
Eran Medan
http://superuser.stackexchange.com/users/151992
Advertisement