简体   繁体   English

在Kiosk模式下使用扩展程序运行Chrome

[英]Running Chrome with extension in kiosk mode

I really need to run Chrome in kiosk mode with an extension. 我真的需要在Kiosk模式下使用扩展程序运行Chrome。 If I start chrome with --app-id=xxxx it runs the app, but --kiosk is ignored. 如果我使用--app-id=xxxx启动chrome,它会运行应用程序,但会忽略--kiosk If I start it with --kiosk the app-id is ignored. 如果我用--kiosk启动它,app-id将被忽略。

Is there any way to do both? 有没有办法做到这两点? Starting in full screen (F11 mode) is not going to work because of the bubble window at the top and the user can exit. 全屏启动(F11模式)无法正常工作,因为顶部有一个气泡窗口,用户可以退出。

Go to options and for "Home Page" pick "Open this page" and enter the url for your web app and then add --kiosk to your command line. 转到选项并选择“主页”选择“打开此页面”并输入您的Web应用程序的URL,然后将--kiosk添加到您的命令行。
To get the url for your app I usually just open the app in a tab, right click and pick view source and then youll get something like view-source:chrome-extension://hiddpjhppcbepfekmomnlopbjjjhilhk/popup.html for its url, copy everything after view-source: and put that as your homepage. 要获取应用的网址,我通常只需在选项卡中打开应用,右键单击并选择查看源,然后您将获得类似view-source:chrome-extension://hiddpjhppcbepfekmomnlopbjjjhilhk/popup.html的网址,复制所有内容在view-source之后:并将其作为您的主页。

For some reason, the command line switch --kiosk doesn't work in Mac OSX, and from what you're describing, maybe it doesn't work at all. 出于某种原因,命令行开关--kiosk在Mac OSX中不起作用,并且根据您所描述的内容,它可能根本不起作用。 ( http://peter.sh/experiments/chromium-command-line-switches and scroll down to --kiosk, THEN to the footnote....no explanation, but there it is). http://peter.sh/experiments/chromium-command-line-switches并向下滚动到--kiosk,然后是脚注......没有解释,但确实如此)。

You didn't specify if this a Mac OSX or Windows issue you're having, so I'm sorry if this doesn't help... 您没有指定这是Mac OSX还是Windows问题,所以如果这没有帮助我很抱歉...

To workaround this on Mac OSX, you have to take two steps. 要在Mac OSX上解决此问题,您必须采取两个步骤。 (It's still kind of wonky even then, because each new tab is a new fullscreen app at least in Lion) (即便如此,它仍然有点不稳定,因为每个新标签都是一个新的全屏应用程序,至少在Lion中)

  1. Create an App pointing to your URL with this handy script . 使用这个方便的脚本创建一个指向您的URL的应用程序。

  2. Take note of your app's name (replace [MyAppName] below) and create the following applescript: 记下您的应用程序名称(替换下面的[MyAppName])并创建以下AppleScript:

     do shell script "open '/Applications/[MyAppName].app' " tell application "[MyAppName]" to activate tell application "System Events" keystroke "f" using {command down, shift down} end tell 

    Save that applescript as an application, and run it. 将该AppleScript保存为应用程序,然后运行它。
    You can change the icon of your app as well. 您也可以更改应用的图标。 Here's how in case you didn't already know (like me. had to look it up): http://support.apple.com/kb/ht2493 以下是你不知道的情况(像我一样。不得不查看): http//support.apple.com/kb/ht2493

Ok, proper solution: 好的,正确的解决方案

Create a shortcut to the following(chrome.exe) (enter your url in the quotes): 创建以下(chrome.exe)的快捷方式(在引号中输入您的URL):

"%localappdata%\\Google\\Chrome\\Application\\chrome.exe " --user-data-dir=$(mktemp -d) --kiosk " http://stutzen.co " “%localappdata%\\ Google \\ Chrome \\ Application \\ chrome.exe”--user-data-dir = $(mktemp -d)--kiosk“ http://stutzen.co

This will create an entirely separate instance of Chrome with its own userdata, sessions etc. in full screen kiosk mode. 这将在全屏信息亭模式下创建一个完全独立的Chrome实例,其中包含自己的用户数据,会话等。 This can be exited by Alt-F4 or Alt-Tab. 这可以通过Alt-F4或Alt-Tab退出。

src: https://productforums.google.com/forum/#!topic/chrome/eX15CQ602UQ src: https//productforums.google.com/forum/#!topic / rome / eX15CQ602UQ

Try: 尝试:

--user-data-dir=$(mktemp -d) 

This works for me in Chrome 43, but don't load extensions. 这适用于Chrome 43,但不加载扩展程序。 How to enabled extensions in kiosk mode on windows 7? 如何在Windows 7上的kiosk模式下启用扩展?

Kiosk mode is basically the same as fullscreen mode, except the 'exit fullscreen' button doesn't work. Kiosk模式与全屏模式基本相同,只是“退出全屏”按钮不起作用。 The user can still quit the app because all of the menu options are still there. 用户仍然可以退出应用程序,因为所有菜单选项仍然存在。

I've found a way to hide the menu AND the dock by modifying Chrome's permissions. 我找到了一种方法来修改Chrome的权限来隐藏菜单和Dock。 Note that this fix is specifically for OSX. 请注意,此修复程序专门用于OSX。

  1. Open the Chrome permission list: sudo open -e /Applications/Google Chrome.app/Contents/Info.plist 打开Chrome权限列表: sudo open -e /Applications/Google Chrome.app/Contents/Info.plist

  2. Add this. 加上这个。 <key>LSUIPresentationMode</key> <integer>3</integer>

Use this hack in conjunction with chrome command line option --kiosk http://yoururl.com to get true kiosk behavior. 将此hack与chrome命令行选项--kiosk http://yoururl.com结合使用可获得真正的自助服务--kiosk http://yoururl.com行为。

As of 2017 chrome will no longer allow you to enter kiosk mode on new devices without a google chrome management license subscription. 自2017年起,Chrome将不再允许您在没有Google Chrome管理许可订阅的情况下在新设备上进入自助服务终端模式。 "Note: If your Chromebook, Chromebase, or Chromebox is from 2017 or later, it won't work in kiosk mode unless it's managed by an administrator." “注意:如果您的Chromebook,Chromebase或Chromebox是2017年或之后的版本,除非由管理员管理,否则它将无法在自助服务终端模式下运行。”

See this article: https://support.google.com/chromebook/answer/3134673?h 请参阅此文章: https//support.google.com/chromebook/answer/3134673?h

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

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