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

Allow google-chrome access to the custom flags files in ~/.config. #3418

Merged
merged 4 commits into from
May 16, 2020

Conversation

mace015
Copy link
Contributor

@mace015 mace015 commented May 15, 2020

This PR modifies the google-chrome.profile to allow chrome access to its custom flag files in ~/.config.

@glitsj16
Copy link
Collaborator

Nice catch! It would be nice if you could keep the PR conform our current google-chrome profiles. I'll try to explain what I mean below.

In disable-programs.inc add:
blacklist ${HOME}/.config/chrome-flags.conf
blacklist ${HOME}/.config/chrome-flags.config

Use the noblacklist/mkfile option in google-chrome.profile above the whitelisting:
noblacklist ${HOME}/.config/chrome-flags.conf
noblacklist ${HOME}/.config/chrome-flags.config

mkfile ${HOME}/.config/chrome-flags.conf
mkfile ${HOME}/.config/chrome-flags.config

Also, this needs to be done for google-chrome-beta.profile and google-chrome-unstable.profile too. This all means a bit of extra work, sorry about that :-)

@rusty-snake
Copy link
Collaborator

mkfile ${HOME}/.config/chrome-flags.conf
mkfile ${HOME}/.config/chrome-flags.config

I'm not sure, but if they are created by the user and not by chrome, we don't need mkfile.

@glitsj16
Copy link
Collaborator

I'm not sure, but if they are created by the user and not by chrome, we don't need mkfile.

Not sure if google-chrome creates these. Never used google-chrome. But @mace015 should be able to figure that out I guess, and follow your advise accordingly.

@mace015
Copy link
Contributor Author

mace015 commented May 15, 2020

Neither google-chrome nor chromium create these files, they are not needed for both to function either, should I include that anyway?

The chromium profile also doesn't implement mkfile for the config files.

@glitsj16
Copy link
Collaborator

Neither google-chrome nor chromium create these files, they are not needed for both to function either, should I include that anyway?

@mace015 Thanks for confirming that. We do want to support these custom flags if they exist. So the only thing you can drop are the mkfile lines. Apologies for any confusion caused by my oversight in this context. As soon as you can do the work, we can merge.

@mace015
Copy link
Contributor Author

mace015 commented May 15, 2020

I've updated the PR, thanks for helping me out with this! If there is anything I should change please let me know!

@@ -8,10 +8,16 @@ include globals.local
noblacklist ${HOME}/.cache/google-chrome-beta
noblacklist ${HOME}/.config/google-chrome-beta

noblacklist ${HOME}/.config/chrome-beta-flags.conf
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should keep the file names of the flags configuration cfr. what you used in google-chrome.profile. I'm pretty sure the beta version will otherwise not be able to find those (even when they exist). So just drop the '-beta' part. Same goes for the whitelists and the unstable profile. I'll mark those as well, just so you know where to edit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested the profiles as they are now and google-chrome-beta does seem to look for chrome-beta-flags.conf / chrome-beta-flags.config.

mkdir ${HOME}/.cache/google-chrome-beta
mkdir ${HOME}/.config/google-chrome-beta
whitelist ${HOME}/.cache/google-chrome-beta
whitelist ${HOME}/.config/google-chrome-beta

whitelist ${HOME}/.config/chrome-beta-flags.conf
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same remarks as above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested the profiles as they are now and google-chrome-beta does seem to look for chrome-beta-flags.conf / chrome-beta-flags.config.

@@ -8,10 +8,16 @@ include globals.local
noblacklist ${HOME}/.cache/google-chrome-unstable
noblacklist ${HOME}/.config/google-chrome-unstable

noblacklist ${HOME}/.config/chrome-unstable-flags.conf
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same remarks as above.

Copy link
Contributor Author

@mace015 mace015 May 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested the profiles as they are now and google-chrome-unstable does seem to look for chrome-unstable-flags.conf / chrome-unstable-flags.config.

mkdir ${HOME}/.cache/google-chrome-unstable
mkdir ${HOME}/.config/google-chrome-unstable
whitelist ${HOME}/.cache/google-chrome-unstable
whitelist ${HOME}/.config/google-chrome-unstable

whitelist ${HOME}/.config/chrome-unstable-flags.conf
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same remarks as above.

Copy link
Contributor Author

@mace015 mace015 May 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested the profiles as they are now and google-chrome-unstable does seem to look for chrome-unstable-flags.conf / chrome-unstable-flags.config.

@glitsj16 glitsj16 merged commit 10a67cb into netblue30:master May 16, 2020
@matu3ba matu3ba mentioned this pull request Oct 7, 2021
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

Successfully merging this pull request may close these issues.

None yet

3 participants