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

product.json should be editable #22

Closed
hoshsadiq opened this issue Sep 12, 2020 · 10 comments
Closed

product.json should be editable #22

hoshsadiq opened this issue Sep 12, 2020 · 10 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed

Comments

@hoshsadiq
Copy link

hi, I'm not sure if flatpak supports making changes to files directly and surviving upgrades, but /app/share/codium/resources/app/product.json should be editable. Currently this is not possible in an easy manner as far as I know. It requires somehow moving the json file outside the container, edit it, put it back into the container and move it to the correct place, and even then, I'm presuming the file wouldn't survive an upgrade. It would be great to have an easier alternative.

@hoshsadiq
Copy link
Author

Scratch that, it's not possible at all as the filesystem is read-only.

@noonsleeper
Copy link
Collaborator

hi @hoshsadiq I was try many things to resolve this problem but none of them are "elegant, nice or simple". I think the best is try to push something like flathub/com.visualstudio.code-oss@f4fb6f3 on https://github.com/VSCodium/vscodium directly but this may be takes some time, if you need this option now the alternative is use https://github.com/flathub/com.visualstudio.code-oss or build an extension to override the file

@noonsleeper noonsleeper added documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed labels Sep 22, 2020
@hoshsadiq
Copy link
Author

Thanks. Maybe I'm misunderstanding, isn't vscodium the same as code-oss? I thought code-oss was a previous name of.

Anyway, I'll be happy to raise this on the vscodium repo.

As an alternative, can product.js not be a link to a user editable file? Something along the lines of ~/.var/app/com.vscodium.codium/config/VSCodium/product.json. I guess it would cause issues with upgrading and/or if a user decides to remove all their user data.

@noonsleeper
Copy link
Collaborator

As an alternative, can product.js not be a link to a user editable file? Something along the lines of ~/.var/app/com.vscodium.codium/config/VSCodium/product.json. I guess it would cause issues with upgrading and/or if a user decides to remove all their user data.

I think that the approach of flathub/com.visualstudio.code-oss@f4fb6f3 for example this allow to point to a json file with the modify vars in this example the extension gallery

@noonsleeper
Copy link
Collaborator

hey @hoshsadiq check this issue VSCodium/vscodium#519

@rugk
Copy link

rugk commented Feb 20, 2021

I think that the approach of flathub/com.visualstudio.code-oss@f4fb6f3 for example this allow to point to a json file with the modify vars in this example the extension gallery

Yes, could not you just reuse this patch here?
It's quite convenient and I've described here how to use it.

@rugk
Copy link

rugk commented Mar 25, 2021

Upstream now has a solution: VSCodium/vscodium#674

@noonsleeper
Copy link
Collaborator

Upstream now has a solution: VSCodium/vscodium#674

Yeah, I'm waiting the next release =)

@rugk
Copy link

rugk commented Aug 25, 2021

The current TL;DR for everyone who is looking for a solution is doing just this:

$ flatpak --user override --env=VSCODE_GALLERY_SERVICE_URL=https://marketplace.visualstudio.com/_apis/public/gallery com.vscodium.codium
$ flatpak --user override --env=VSCODE_GALLERY_ITEM_URL=https://marketplace.visualstudio.com/items com.vscodium.codium

(without --user you can apply this system-wide)

In order to show/debug/start the current parameters/environment variables use this:

$ flatpak override --show com.vscodium.codium
[Environment]
VSCODE_GALLERY_ITEM_URL=https://marketplace.visualstudio.com/items
VSCODE_GALLERY_SERVICE_URL=https://marketplace.visualstudio.com/_apis/public/gallery
$ flatpak run com.vscodium.codium

@hoshsadiq
Copy link
Author

Nice! Forgot about this issue. It's a welcome change. Thanks to everyone who contributed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants