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

Make Chrome profile directory configurable #199

Closed
llemaitre19 opened this issue Feb 15, 2019 · 7 comments
Closed

Make Chrome profile directory configurable #199

llemaitre19 opened this issue Feb 15, 2019 · 7 comments

Comments

@llemaitre19
Copy link

Hi,

As far I know, their is no way to manually set Chrome --user-data-dir option through Indium.

If indium-chrome-use-temporary-profile is set, a new temporary profile is created at each session, and login/password, history, favorites, ... are lost.

If I try to manually add --user-data-dir=... to indium-chrome-executable I get this error :

Cannot find chrome/chromium binary (%s) in PATH

So adding a --indium-chrome-option could be usefull if there is not already another way to do that.

Note that if indium-chrome-use-temporary-profile is only present to prevent Chrome from reusing existing instance without debugging flag, just setting a fixed alternative profile directory for development allows to bypass this problem without using a new profile at each session.

@NicolasPetton
Copy link
Owner

@moki76 As a first step and workaround, would it be ok with you if the profile directory used was always the same (in a known temp directory), but not configurable?

@llemaitre19
Copy link
Author

Yes of course, in fact I do not need the directory to be configurable for my own usage.
Thanks

@NicolasPetton
Copy link
Owner

@moki76 The next build on MELPA should fix the issue.

@NicolasPetton NicolasPetton unpinned this issue Mar 2, 2019
@llemaitre19
Copy link
Author

Thank you for the fix. Unfortunately it is not exactly what I looking for because the fixed temporary directory is only persistent for the Emacs session, but as soon as Emacs is closed and reopened a new one is generated and the previous profile informations are lost...

@NicolasPetton
Copy link
Owner

@moki76 I exposed the variable indium-chrome-data-dir with that use-case in mind.

If you want to set a permanent profile, you can set it to something like /tmp/indium-chrome.

And if you also want to persist across reboot, you can set it to a directory within your .emacs.d:

(setq indium-chrome-data-dir (expand-file-name "indium-chrome" user-emacs-directory))
(make-directory indium-chrome-data-dir t)

Does that answer your needs? If not, I'll reopen the issue.

@llemaitre19
Copy link
Author

My elisp bad understanding (defvar vs defcustom use) leads me to make a wrong assertion, sorry...

It works now as expected, thanks @NicolasPetton !

@NicolasPetton
Copy link
Owner

No problem, I'm glad it works!

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

No branches or pull requests

2 participants