Skip to content

Commit bb0f0ac

Browse files
committed
chore(compass): explicitly set secret store to gnome-libsecret on linux if not set
1 parent 504b596 commit bb0f0ac

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

packages/compass/src/main/application.ts

-7
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ class CompassApplication {
139139
}
140140
await setupCSFLELibrary();
141141
setupTheme(this);
142-
this.setupJavaScriptArguments();
143142
this.setupLifecycleListeners();
144143
this.setupApplicationMenu();
145144
this.setupWindowManager();
@@ -160,12 +159,6 @@ class CompassApplication {
160159
});
161160
}
162161

163-
private static setupJavaScriptArguments(): void {
164-
// For Linux users with drivers that are avoided by Chromium we disable the
165-
// GPU check to attempt to bypass the disabled WebGL settings.
166-
app.commandLine.appendSwitch('ignore-gpu-blacklist', 'true');
167-
}
168-
169162
private static setupAutoUpdate(): void {
170163
CompassAutoUpdateManager.init(this);
171164
}

packages/compass/src/setup-hadron-distribution.ts

+20
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,26 @@ if (
3232
// type `browser` indicates that we are in the main electron process
3333
process.type === 'browser'
3434
) {
35+
if (process.platform === 'linux') {
36+
// For Linux users with drivers that are avoided by Chromium we disable the
37+
// GPU check to attempt to bypass the disabled WebGL settings.
38+
app.commandLine.appendSwitch('ignore-gpu-blacklist', 'true');
39+
40+
/**
41+
* Default password store detection in Chromium relies on pre-defined set of
42+
* values for XDG_CURRENT_DESKTOP env var. Even if the store is installed
43+
* correctly, Chromium might fail to detect that. To try to work around that
44+
* we explicitly set password-store to gnome-libsecret for any linux
45+
* platform (we list gnome-keyring as a dependency for all compass
46+
* installers on linux)
47+
*
48+
* @see {@link https://github.com/microsoft/vscode/issues/185212#issuecomment-1593271415}
49+
*/
50+
if (app.commandLine.hasSwitch('password-store') === false) {
51+
app.commandLine.appendSwitch('gnome-libsecret');
52+
}
53+
}
54+
3555
// Name and version are setup outside of Application and before anything else
3656
// so that if uncaught exception happens we already show correct name and
3757
// version

0 commit comments

Comments
 (0)