ungoogled-software / ungoogled-chromium-flatpak

Files used by the ungoogled-chromium flatpak
4 stars 0 forks source link

Where to specify a kerberos-related policy? #9

Closed bocekm closed 1 month ago

bocekm commented 1 month ago

Hi. Following https://github.com/flathub/com.github.Eloston.UngoogledChromium/issues/56#issuecomment-1112239489 I wanted to set the DisableAuthNegotiateCnameLookup policy in ~/.var/app/io.github.ungoogled_software.ungoogled_chromium/config/chromium-flags.conf but then I found out that there's no command line switch --disable-auth-negotiate-cname-lookup anymore. It was removed under https://codereview.chromium.org/832423004/.

In which folder can I place the policy json file so that it's picked up by the flatpak version of the ungoogled chromium on Fedora 40?

bocekm commented 1 month ago

Ok, I found https://github.com/ungoogled-software/ungoogled-chromium-flatpak?tab=readme-ov-file#extension-points but I'm unsure what exactly to do.

I've created a /var/lib/flatpak/extension/io.github.ungoogled_software.ungoogled_chromium.Policy.kerberos/ folder and put io.github.ungoogled_software.ungoogled_chromium.Policy.kerberos.yaml and kerberos.json in it.

What do you mean by:

with /var/lib/flatpak/extension/io.github.ungoogled_software.ungoogled_chromium.Policy.system-policies// being a symlink to /etc/chromium-browser

Shall I create a /var/lib/flatpak/extension/io.github.ungoogled_software.ungoogled_chromium.Policy.kerberos/x86_64/1 folder and what should I symlink it to?

rany2 commented 1 month ago

You could just create your own extension which ships these policies: https://github.com/ungoogled-software/ungoogled-chromium-flatpak/tree/master/examples/policies/block-dinosaur-game

bocekm commented 1 month ago

That's what I'm asking about - how can I create such an extension. It's not explained clearly in the README.

rany2 commented 1 month ago

@bocekm If you installed UGC as a system installation, replace --user with --system. In short, this should work:

cd examples/policies/block-dinosaur-game
flatpak-builder --install --install-deps-from=flathub --user --force-clean _build io.github.ungoogled_software.ungoogled_chromium.Extension.block-dinosaur-game.yaml
bocekm commented 1 month ago

Thanks, I was able to build the Policy by the following commands and it seems to be applied in the UGC.

flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak-builder --install --install-deps-from=flathub --user --force-clean _build io.github.ungoogled_software.ungoogled_chromium.Policy.kerberos.yaml