How to fix Chrome protocol handler "Always open these types of links" pop up when opening RV through rvlink

Thanks @johnny.duguid for leading me here, and thanks @macbeth for writing this up!
Unfortunately it isn’t working for me, I’m sure I’m missing something though.
This is my json file:

[frank@spiff]$ cat /etc/opt/chrome/policies/managed/managed_policies.json 
{
"ExternalProtocolDialogShowAlwaysOpenCheckbox": true
}

I then restarted Chrome (v80) but when I run my AMI I get o checkbox.

image

1 Like

Hi, that should do the trick!
Maybe some permissions issue with the folder or the file?

Check this guide for chromium I believe it has better info than the google one:

Thanks @macbeth, I had a look and the article doesn’t really offer any more info. I made sure the json file is readable by my user id so I have no idea what else to look for.
I copy/pasted all file paths and the json content so typos shouldn’t be the issue.
I also tried the “HomepageLocation” policy from the example page but to no avail.

I might be stuck with confirming every single AMI for now :frowning:

Hi @frank did you actually managed to fix this?
It just cross to my mind (while having a similar problem in another machine), that maybe Chrome is not finding RV as an official x-scheme-handler in Gnome?

My Output of gio and xdg is as follows:

[yolo@yolo ~]$ gio mime x-scheme-handler/rvlink
Default application for “x-scheme-handler/rvlink”: rv.desktop
Registered applications:
	rv.desktop
Recommended applications:
	rv.desktop
[yolo@yolo ~]$ xdg-settings get default-url-scheme-handler rvlink
rv.desktop

To be able to get this, I used the gconfgtool-2 and added custom desktop files and mimeapps handlers for gnome.
let me know if you still have the problem I can share you my files for this.

1 Like

Thanks @macbeth, yes, I tried everything I can think off but to no avail.
I am using kde though but maybe it uses gnome’s config for this?!
This is my gio output:

[frank@spiff ~]$ gio mime x-scheme-handler/rvlink
Default application for 'x-scheme-handler/rvlink': rv.desktop
Registered applications:
        rv.desktop
Recommended applications:
        rv.desktop

and xdg:

[frank@spiff ~]$ xdg-settings get default-url-scheme-handler rvlink
rv.desktop

1 Like

Oh could be something related to KDE then? : (
And yes I read the same somewhere that Chrome stills uses the gnome config for this, I have no experience in KDE but maybe it stills has some gnome config underlying somewhere in the system.

I’m trowing rocks to the air here then cause I have no experience with KDE, and probably not all this steps are needed in gnome either, but whenever I have a problem I do all of this:

Inside my /usr/share/applications/rv.desktop I added a mimetype:

MimeType=image/jpeg;image/png ... etc  ... ;x-scheme-handler/rvlink;

I used gconfgtool2 to set the handler

gconftool-2 --set --type=string /desktop/gnome/url-handlers/rvlink/command /opt/RV/bin/rv
gconftool-2 --set --type=bool /desktop/gnome/url-handlers/rvlink/enabled true
gconftool-2 --set --type=bool /desktop/gnome/url-handlers/rvlink/need-terminal false

I added two files inside /etc/xdg
/etc/xdg/mimeapps.list
/etc/xdg/gnome-mimeapps.list

With the same content for both of them:

[Default Applications]
# URI scheme handlers
x-scheme-handler/rvlink=rv.desktop

The I updated the Desktop

sudo update-desktop-database

Maybe there some equivalents to KDE : (

1 Like

Otherwise you can try the workaround in the link of my post.

: (

Which will probably not survive a chrome update

1 Like

Thanks @macbeth, will try your suggestions. I don’t even have a /usr/share/applications/rv.desktop, but I remember setting it up initially somewhere, so need to dig into it some more again.

I will report back here,
Thanks for all your advise!!

frank

1 Like

Have you solved this perfectly?

1 Like

no, not yet

1 Like

I hope this is definitely solved

1 Like

Enable checkbox “Always open these types of links in the associated app” in dialog for Ubuntu
/etc/opt/chrome/policies/managed/managed_policies.json
{
“ExternalProtocolDialogShowAlwaysOpenCheckbox”: true,
“URLWhitelist”: [
“.zoom.us”
]
}

just add needed domain or url part
see more instruction https://cloud.google.com/docs/chrome-enterprise/policies/?policy=URLWhitelist

2 Likes

not working . every time ask open xdg-open

I finally got this to work. Jeeeeeeeeeeesus.
So, what worked was @macbeth’s very first solution at the top of this thread.
However, when copy pasting this line:

“ExternalProtocolDialogShowAlwaysOpenCheckbox”: true

The quotes somehow end up invalid. They show up but the file is not evaluated as expected. I only figured it out because I found another post somewhere in Google-land that offered the same solution and I just copy/pasted it again noticing that the syntax highlighting in vim changed.

So yeah, retyping the quotes, then restarting Chrome fixed it for me. Did you all hear my sigh of relief?!

Cheers,
frank

3 Likes

wow super thank you

1 Like

OMG, @johnny.duguid Can you help us and edit my post to correct the quotes on it? I use to have permissions to edit my posts, but I lost them probably because of lack of activity because of the coronavirus : D
Thanks!

1 Like

Wow…! Ain’t technology grand? Thanks for sussing that out, @frank! It’s pretty windy here in Colorado today…what that your sigh of relief?

@macbeth—I updated your original post and added a note just in case the " issue remains. Thanks for the heads up and due diligence of coming back to update the thread!

it’s pretty windy here in Colorado today…was that your sigh of relief?

For sure

2 Likes

Hi guys! Today I had the need to do this on a Mac OSX system (A new machine for the review room)
The process is not as straightforward as in linux, but you end up with a .mobileconfig file that you can just double click to install and that’s it, similar to the .reg files on windows.

Here is the mentioned file for you to download and ready to use:
com.google.Chrome.mobileconfig.zip (1.2 KB)

Instructions to make this file:

3 Likes

Thanks, @macbeth! I added a link to your MacOS details reply to your original post. :smiley: