-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
Snap: Support snapshot feature #75669
Comments
If you want to see how strict confinement should work, install my test app:
|
We have no plans to use strict confinement for now. |
@joaomoreno ok, but is it possible to allow the user to choose where to save user data, so the snapshot feature in Snap can be utilised ( |
How about this...
Resulting in this: {
"_": [],
"verbose": true,
"user-data-dir": "/home/gaui/snap/code/9/Code",
"extensions-dir": "/home/gaui/snap/code/9/Code/extensions",
"appRoot": "/snap/code/9/usr/share/code/resources/app",
"machineId": "81cfbab93df75bd844527d28ba7bf1abf9547b741edf1d028a0e933cb8c5b46b",
"nodeCachedDataDir": "/home/gaui/snap/code/9/Code/CachedData/c7d83e57cd18f18026a8162d042843bda1bcf21f",
"mainPid": 26885,
"execPath": "/snap/code/9/usr/share/code/code",
"userEnv": {
"VSCODE_IPC_HOOK": "/run/user/1000/snap.code/vscode-614a82a5-1.35.1-main.sock",
"VSCODE_NLS_CONFIG": "{\"locale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}",
"VSCODE_LOGS": "/home/gaui/snap/code/9/Code/logs/20190624T024121"
},
"isInitialStartup": true,
"backupPath": "/home/gaui/snap/code/9/Code/Backups/1561343819058",
"windowId": 1,
"logLevel": 0,
"zoomLevel": 0,
"frameless": true,
"perfEntries": [
"main:started",
1561344081183,
"main:appReady",
1561344081243,
"willLoadMainBundle",
1561344081246,
"didLoadMainBundle",
1561344081298,
"main:loadWindow",
1561344081441
],
"partsSplashPath": "/home/gaui/snap/code/9/Code/rapid_render.json"
} |
It seems that's a great workaround, you can create an alias for it. |
Well that's unfortunate, as per https://snapcraft.io/docs/snap-confinement strict confinement is "Used by the majority of snaps" |
And also classic confinement doesn't use sandboxing so configs are in |
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation. Happy Coding! |
It would be quite nice to see vscode moving away from --classic confinement |
This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation. Happy Coding |
1 similar comment
This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation. Happy Coding |
🙁 In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation. Happy Coding! |
Currently VSCode Snap is created with Snap's classic confinement, which means that Snapcraft doesn't handle application or user state, making the snapshot feature useless.
When creating a Snap with strict confinement (default), Snapcraft sandboxes the application and runs in an isolated secure environment, and overrides various environment variables. With classic confinement, this is not the case.
All application/user data created with Snap applications using strict confinement can be manipulated with the Snapcraft snapshot feature. Why isn't Code under strict confinement?
See examples for Code (classic) and ngrok (strict) below.
VSCode (
code
) has the following CLI arguments:--user-data-dir
and--extensions-dir
so this can be set/overridden, but the user of the Snap cannot set these. Unless doing something like this:$ snap run --shell code $ code $ code --user-data-dir=$SNAP_USER_DATA
I saw this issue which could possibly relate to this in some way: #3884
1.35.1 c7d83e57cd18f18026a8162d042843bda1bcf21f x64
Linux Mint 19.1 (Ubuntu); 4.15.0-51-generic
Steps to Reproduce:
snap install code --classic
)~/.config/Code/User/settings.json
)snap save code
)~/.config/Code/User/settings.json
)snap restore 1
)Previous version of
settings.json
is not restored.Does this issue occur when all extensions are disabled?: Yes
Example: code (classic confinement)
Example: ngrok (strict confinement)
The text was updated successfully, but these errors were encountered: