简体   繁体   English

Raspberry Pi-JavaScript在Chrome Kiosk模式下不起作用

[英]Raspberry Pi - JavaScript doesn't work in chromium kiosk mode

I am running the latest Raspbian Wheezy O/S on my RPI and I am having a pretty strange problem. 我正在RPI上运行最新的Raspbian Wheezy O / S,但遇到了一个非常奇怪的问题。

I created a number of html files which I am trying to run automatically in kiosk mode on startup (modifying the autostart file). 我创建了许多html文件,这些文件试图在启动时自动以信息亭模式运行(修改自动启动文件)。

@chromium --kiosk --incognito http://some.web.

Basically the HTML pages shuffle using the javascript setTimeout command: 基本上,HTML页面使用javascript setTimeout命令进行混洗:

setTimeout("location.href = 'widgets.html';", 120000);

Every HTML file has this command. 每个HTML文件都有此命令。

These commands work fine when I let the system boot up manually and launch the HTML files manually by double clicking on them. 当我让系统手动启动并通过双击手动启动HTML文件时,这些命令可以正常工作。 When they are executed by modifying autostart or run via command line, the above line doesn't work. 通过修改自动启动来执行它们或通过命令行运行它们时,以上行不起作用。

Any idea as to why this is happening? 知道为什么会这样吗?

I've tried playing around with the different chromium switches with no luck. 我尝试过各种不同的铬开关,但是没有运气。

Don't bother with Chromium's kiosk mode, I think it's being dropped in newer versions. 不要为Chromium的信息亭模式而烦恼,我认为它已经被更新的版本所取代。 Try using the app command line switch instead. 尝试改用应用程序命令行开关。

chromium-browser --app=http://some.web

Secondly, if you're creating a web-based kiosk, check out the blog post that really helped me: http://www.alandmoore.com/blog/2011/11/05/creating-a-kiosk-with-linux-and-x11-2011-edition/ 其次,如果您要创建基于Web的信息亭,请查看对我有帮助的博客文章: http : //www.alandmoore.com/blog/2011/11/05/creating-a-kiosk-with-linux -and-x11-2011版本/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM