Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚡️ Enhancement - Prevent setting as default Web Browser after update #260

Closed
Rikj000 opened this issue Mar 4, 2024 · 4 comments
Closed

Comments

@Rikj000
Copy link

Rikj000 commented Mar 4, 2024

Issue Description

Since a recent update ungoogle-chromium-bin
started setting itself as the default browser after each update (on KDE Plasma).

It quickly gets very annoying to always go to:
Settings => Applications => Default Applications => Toggle Web browser
back to what was manually configured before the update.

I already reported this here: https://aur.archlinux.org/packages/ungoogled-chromium-bin#comment-959023

Possible solutions

I did some digging and can present x3 possible solutions,
but I still have to monitor if they will stick after next update.

1. Disable policy DefaultBrowserSettingEnabled

By disabling the DefaultBrowserSettingEnabled policy,
we should be able to stop Chromium from ever attempting to set itself as default.

Sources:

Policy Description:
Setting the policy to True has Google Chrome always check whether it's the default browser on startup and,
if possible, automatically register itself.
Setting the policy to False stops Google Chrome from ever checking if it's the default and turns user controls off for this option.

  1. Create the directory:
sudo mkdir -p /etc/chromium/policies/managed/
  1. Create the policy file:
sudo touch /etc/chromium/policies/managed/test_policy.json
  1. Edit the policy file:
sudo nano /etc/chromium/policies/managed/test_policy.json
  1. Paste following contents and save:
{
  "DefaultBrowserSettingEnabled": false
}

2. Set --no-default-browser-check runtime flag

By setting the --no-default-browser-check runtime flag,
we should be able to stop Chromium from prompting to be set as the default browser

Runtime Flag Description:
Disable the default browser check, do not prompt to set it as such

Sources:

  1. Open the chromium.desktop file:
sudo nano /usr/share/applications/chromium.desktop
  1. Alter the Exec line and save:
Exec=/usr/bin/chromium --no-default-browser-check %U

3. Set default_browser_infobar_last_declined to a high value

By altering default_browser_infobar_last_declined to a high value,
we should hopefully be able to stop Chromium from ever asking to be set as default.

Sources:

  1. Open the Preferences file
nano /home/<username>/.config/chromium/Default/Preferences
  1. Alter the default_browser_infobar_last_declined value to 99999999999999999 and save

Environment

Software Version
Ungoogled Chromium 122.0.6261.94
KDE Plasma 5.27.10
Kernel 6.7.7-x64v2-xanmod1-1
@Rikj000
Copy link
Author

Rikj000 commented Mar 5, 2024

I'm guessing the issue is more KDE related 🤔
Since today the default Web Browser got reset back to ungoogled-chromium-bin again..

Even though ungoogled-chromium-bin has not / did not receive an update
since I've opened this issue / applied above described possible solutions.

@networkException
Copy link
Member

networkException commented Mar 5, 2024

Is this Plasma 6 specific perhaps? ah I only now saw the version

hm not sure if i can do anything here

@Rikj000
Copy link
Author

Rikj000 commented Mar 20, 2024

Closing this issue since I'm rather certain that it's KDE related by now.

@Rikj000 Rikj000 closed this as completed Mar 20, 2024
@45mg
Copy link

45mg commented Apr 2, 2024

I have this issue, and I'm not using KDE. It seems to reset itself to the default browser on startup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants