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

[feature] Provide a way to set the initial User settings that a new session will recieve #535

Open
spkane opened this issue Oct 23, 2023 · 2 comments

Comments

@spkane
Copy link

spkane commented Oct 23, 2023

Currently, there does not appear to be any way to set default User settings without modifying the source code and building openvscode-server from that.

When setting up a remote system, there are plenty of occasions where being able to tweak some of the default settings for extensions, etc, is highly desirable, but since these defaults are not loaded from an on-disk JSON file and are only stored in the browser, there does not appear to be any reasonable way to deal with settings that have an application scope.

I don't have strong feelings about how this is achieved. A command argument pointing to a default User settings JSON file to load, having the system automatically load .openvscode-server/data/User/settings.json, or some combination of the above all seem like possibilities.

@spkane spkane changed the title Provide a way to set the initial User settings that a new session will recieve [feature] Provide a way to set the initial User settings that a new session will recieve Oct 23, 2023
@electricmonk
Copy link

electricmonk commented Dec 3, 2023

Same for Machine settings would be great.
My use case is using OpenVSCode Server to run an E2E test for a VSCode extension using Playwright, and I would like to turn off Workspace Trust.

kerrick-js added a commit to kerrickstaley/homedir that referenced this issue Feb 7, 2024
At work, my VSCode config can only be edited through the VSCode GUI. In
order to version control it, check it in to homegit and add a small
Python program that merges common (shared by home and work) config with
work-specific config.

Relevant issues:
- gitpod-io/openvscode-server#199
- gitpod-io/openvscode-server#535
- microsoft/vscode#15909
kerrick-js added a commit to kerrickstaley/homedir that referenced this issue Feb 7, 2024
At work, my VSCode config can only be edited through the VSCode GUI. In
order to version control it, check it in to homegit and add a small
Python program that merges common (shared by home and work) config with
work-specific config.

Relevant issues:
- gitpod-io/openvscode-server#199
- gitpod-io/openvscode-server#535
- microsoft/vscode#15909

Merging this with `Library/Application Support/Code/User/settings.json`
is TODO.
@derzufall
Copy link

There is an Extension that does this:
https://github.com/spkane/vscode-training-tweaks

You can install it by extending the Container Image like this:

RUN ${OPENVSCODE_SERVER_ROOT}/bin/openvscode-server --install-extension /home/workspace/training-tweaks-0.0.1.vsix

Then put your custom settings into the correct locations:

COPY ./custom-settings-extension.js /home/workspace/.openvscode-server/extensions/spkane.training-tweaks-0.0.1/out/extension.js
COPY ./custom-remote-settings.json /home/workspace/.openvscode-server/data/Machine/settings.json

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