Chrome app window only - google-chrome

Is it possible to launch a Chrome app without having the Chrome Browser appear?
In other words can the browser run in the background and launch a chrome application?

Yes, if the app creates its own window then just run it from the Chrome app launcher or make the shortcuts on desktop / startmenu / taskbar: open chrome://apps/ page (it can be opened from the new tab page), right-click the app, click Create shortcuts.
To run the app using command line use the app ID (to get it first create a shortcut as described above and simply copy the command line from the shortcut's parameters, or you can copy it from the webstore page of the app), here's a Windows command line using start which automatically finds the installed Chrome executable:
start chrome --app-id=pelimflkpjiicnajdjcmekpioacmahkh
P.S. The app must be installed in the browser.

Related

How to open browser preview from intellij in flatpak google chrome

When I try to open browser preview in Google Chrome, I encounter this error:
Unfortunately, I have installed Google Chrome via flatpak, and there is no working installation path that I can just provide to IntelliJ.
There are two options.
If Chrome is your default browser
You can use whatever "open" command you have for URLs. In my case it's xdg-open:
If Chrome is not your default browser
You need to start it via flatpak.
First, type flatpak in "Path":
Then click on edit button and paste run --command=/app/bin/chrome com.google.Chrome in
"Command line options":
This works as I expect it to, opening new tab in existing Chrome window.
My IntelliJ is not sandboxed, it's managed by JetBrains Toolbox which in turn was semi-manually installed with this script.
Naturally, I have flatpak on PATH.

Firefox add-on's native application runs only once

I have published a native messaging add-on on Mozilla, but the native messaging host (native app) runs only once, if I restart firefox, the native app does not start.
Here is the scenario:
Step 1: I install the native app on Windows 10 using the setup file, the setup also configures the registry key under
HKEY_CURRENT_USER\Software\Mozilla\NativeMessagingHosts
HKEY_LOCAL_MACHINE\Software\Mozilla\NativeMessagingHosts\
Step 2: Start firefox, download and install the public released (signed) add-on from mozilla. The add-on icon shows on Firefox, I click the icon, the add-on popup page shows, click the menu items on the popup, the add-on works as expected, the native app works too, it receives messages from add-on, and sends messages back to the add-on.
All is OK, it seems the native messaging add-on works well. However, after I restart firefox, click the add-on icon, click the menu items on the popup menu, nothing happens. I type about:debugging, in the console window, there is error message "Unchecked lastError value: Error: port is null".
This error only happens while using the signed add-on, using local version un-signed addon, the native messaging host and add-on always run, no such problem.
I want to know, when download and install the addon from Mozilla, except the addon's XPI file, are there other files also downloaded? Maybe these other files run after firefox restarts, and these files or their configuration prevent the native app from running.
Here is the code snippet in background page:
function connectToNativeHost()
{
var nativeHostName = “com.some-company.test”;
port = chrome.runtime.connectNative(nativeHostName);
console.log(port)
port.onMessage.addListener(onNativeMessage);
port.onDisconnect.addListener(onDisconnected);
}
function onDisconnected()
{
console.log(chrome.runtime.lastError);
console.log(‘disconnected from native app.’);
port = null;
}
I test again and again, I find that after firefox restarts, the native app never runs again, firefox does not create a process for the native app.
Thank you for your help!

Loadrunner 11.52 record chrome with command line switches

I have side by side chrome installs for testing:
version 35
version 13
To launch version 13 I have a separate chrome application directory and pass in some command line switches e.g.:
--user-data-dir="C:\UserData" --chrome-version=13.0.782.218
This works fine, on the desktop I just create a shortcut to the exe and tag on the switches.
How do I do that when I record in Loadrunner?
I can browse to the exe from the "start recording" dialog, but I can't add the switches.
Using the desktop shortcut with the switches doesn't work.
Any ideas?
If your website does not generate chrome specific code then just use any browser for recording
You can always record in proxy mode any HTTP based communication you wish, whether on machine or not.

Apps, Extensions and scripts cannot be added from this website

I'm trying to add the Rapid Interface Builder extension to chrome using the rib.crx file I downloaded from https://01.org/rapid-interface-builder/downloads/2012/rib-preview-1-chrome-extension
Unfortunately, every time I open the crx file with chrome I get the following error:
Apps, Extensions and scripts cannot be added from this website.
Any ideas on how to fix this?
Instead of opening the file, you have to: extract it (crx are zip files), then visit chrome://extensions, enable developer mode, and load unpacked extension.
The reason for this is: lots of people try to abuse chrome apps/extensions to install nasty applications to your browser. So Chrome tries to make it impossible to automatically side-load these apps without you making sure that is really what you want to do.
So.. typical caveats of installing software apply when using this approach.
You can now also just drag-and-drop the .crx file onto the chrome://extensions page and it will install, too.
Edit 2019-01-10: Make sure to enable Developer mode for extensions. If this was not enabled, refresh the chrome://extensions page after enabling it.
Edit 2018-08-24: This works on Windows, too.
Edit:
This doesn't work on Windows. Verified on OSX and ChromeOS. From what I've read, this will work on Linux, too.~
(I initially experienced the same problem you described.*)
This solution worked for me in Windows 10 (build th1511) x64:
Open Chrome as you normally would.
Go to the "Extensions" page (chrome://extensions; or click Menu button at top right corner → From 'More tools' drop down menu select 'Extensions').
Drag and drop the .crx file onto the extensions page in Chrome -onto the list of extensions.
You should see a dialog stating "Drop here to install". This must be present. (If you do NOT see this, reposition your mouse - it may be too far to the side of the page.)
It should load successfully and you should see the extension in the list immediately afterward.
*I received the same error you described when attempting to load the .crx file (packed extension) by right-clicking/double-clicking it and selecting "Open With" "Chrome", and by dragging/dropping the file onto a regular webpage in Chrome.
In the Extensions page, just enable Developer mode. From there you can drag and drop any .crx file there and installation prompt will follow suit.
Open Chrome with this parameter --enable-easy-off-store-extension-install, then go to extensions and enable Developer mode. Now you can install .crx files without any problem.
go on extension, and your first step is on developer mode, 2 step update extensions, and last drop IDM extension file on google chrome.

How does Chrome App Launcher add itself?

If I want to install the Chrome App Launcher and navigate to https://chrome.google.com/webstore/launcher , then click the only button over there, that page will install Chrome App Launcher shortcut to my Windows taskbar without any confirmation from the operating system whatsoever.
If I use a different browser, other than Chrome, I get redirected to the Chrome Webstore, with a message "You will need Google Chrome to install most apps, extensions and themes." showing. I guess, Chrome is able to place a shortcut from within a web page to my Desktop/Taskbar via its inner methods, as it's a general executable and may do "a lot" on its own.
How can I add my (any) shortcut from within a web page rendered in Chrome the same (or another) way the Chrome App Launcher has been installed?
Sorry, the webstore has special powers in chrome which regular web sites don't get. This is how it can also install extensions and apps, see whether you have particular extensions and apps installed, etc. You can see API by which it gets these special privileges here.
This API is made available by chrome just to the webstore.