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

Modify paths using environment variables #109

Closed
xmha97 opened this issue Dec 27, 2021 · 6 comments
Closed

Modify paths using environment variables #109

xmha97 opened this issue Dec 27, 2021 · 6 comments
Labels
enhancement New feature or request
Milestone

Comments

@xmha97
Copy link
Contributor

xmha97 commented Dec 27, 2021

Hi @filips123
Why is runtime installed for the current user?
image
I think runtime should be installed in "Program Files" because I do not want to install a separate Firefox for each user.

@xmha97 xmha97 added the bug Something isn't working label Dec 27, 2021
@xmha97 xmha97 changed the title Runtime installed for current user Runtime installed for the current user Dec 27, 2021
@filips123
Copy link
Owner

Originally runtime was installed for all users, but then I changed it (df05306, #10, #24) to a user-specific directory. This is because installing it for all users requires that directory to be writable by all users, which isn't so good for security and could cause other problems. If you still want to globally install runtime, you will have to edit the source code (change dirs.userdata.join("runtime") to dirs.sysdata.join("runtime")) and manually build and install the project.

@xmha97
Copy link
Contributor Author

xmha97 commented Dec 27, 2021

OK, Thanks for your explanation.

@xmha97 xmha97 closed this as completed Dec 27, 2021
@xmha97 xmha97 changed the title Runtime installed for the current user Change the runtime path Dec 30, 2021
@xmha97 xmha97 reopened this Dec 30, 2021
@xmha97
Copy link
Contributor Author

xmha97 commented Dec 30, 2021

I want to change the runtime path.
Do I have to create symlinks?

mklink /D "%AppData%\FirefoxPWA\runtime" "%ProgramFiles%\FirefoxPWA\runtime"

I looking for a environment variable or config file to set runtime path.

@filips123
Copy link
Owner

Currently, you cannot modify any paths using environment variables. However, you could use symlinks for each user to some global directory:

  1. Move existing runtime from %AppData%\FirefoxPWA\runtime to %ProgramFiles%\FirefoxPWA\runtime. Do this only for one user, just so you will have one global copy of the runtime.
  2. Then, for each user you have, remove old its runtime (if it exists) and symlink %AppData%\FirefoxPWA\runtime to %ProgramFiles%\FirefoxPWA\runtime (with your command).
  3. You may also have to make %ProgramFiles%\FirefoxPWA\runtime writable by all users for Firefox updates to work, but I'm not sure.

This way PWAsForFirefox will think runtime is installed for each user, but you will have only one global copy of it.

@xmha97
Copy link
Contributor Author

xmha97 commented Dec 30, 2021

Will I can modify paths using environment variables in the future?

@xmha97 xmha97 changed the title Change the runtime path Modify paths using environment variables Dec 30, 2021
@filips123
Copy link
Owner

Yes, I will probably implement something in the future.

@filips123 filips123 added this to the 2.0.0 milestone Jan 1, 2022
@xmha97 xmha97 mentioned this issue Jan 3, 2022
@filips123 filips123 added enhancement New feature or request and removed bug Something isn't working labels Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

2 participants