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

chore(compass): explicitly set secret store to gnome-libsecret on linux if not set #5958

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions packages/compass/src/main/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ class CompassApplication {
}
await setupCSFLELibrary();
setupTheme(this);
this.setupJavaScriptArguments();
this.setupLifecycleListeners();
this.setupApplicationMenu();
this.setupWindowManager();
Expand All @@ -160,12 +159,6 @@ class CompassApplication {
});
}

private static setupJavaScriptArguments(): void {
// For Linux users with drivers that are avoided by Chromium we disable the
// GPU check to attempt to bypass the disabled WebGL settings.
app.commandLine.appendSwitch('ignore-gpu-blacklist', 'true');
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like it's something we want to set as early as possible, for consistency moved this and the new appendSwitch call to the setup-* file that is the first thing that runs in the app

}

private static setupAutoUpdate(): void {
CompassAutoUpdateManager.init(this);
}
Expand Down
20 changes: 20 additions & 0 deletions packages/compass/src/setup-hadron-distribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,26 @@ if (
// type `browser` indicates that we are in the main electron process
process.type === 'browser'
) {
if (process.platform === 'linux') {
// For Linux users with drivers that are avoided by Chromium we disable the
// GPU check to attempt to bypass the disabled WebGL settings.
app.commandLine.appendSwitch('ignore-gpu-blacklist', 'true');

/**
* Default password store detection in Chromium relies on pre-defined set of
* values for XDG_CURRENT_DESKTOP env var. Even if the store is installed
* correctly, Chromium might fail to detect that. To try to work around that
* we explicitly set password-store to gnome-libsecret for any linux
* platform (we list gnome-keyring as a dependency for all compass
* installers on linux)
*
* @see {@link https://github.com/microsoft/vscode/issues/185212#issuecomment-1593271415}
*/
if (app.commandLine.hasSwitch('password-store') === false) {
app.commandLine.appendSwitch('gnome-libsecret');
gribnoysup marked this conversation as resolved.
Show resolved Hide resolved
}
}

// Name and version are setup outside of Application and before anything else
// so that if uncaught exception happens we already show correct name and
// version
Expand Down
Loading