From 966cc368c7f4d0d403ecca07d642c4e1e8f00f6a Mon Sep 17 00:00:00 2001 From: Ayu-haker Date: Sat, 20 Jun 2026 09:29:43 +0000 Subject: [PATCH 1/2] Disable Bluetooth by default to avoid BlueZ popup on Linux startup Electron initiates a connection to BlueZ (Linux Bluetooth daemon) on startup, causing a Bluetooth permission popup for users who don't even use Bluetooth. Disable Bluetooth by default using Chromium's --disable-bluetooth switch. Users who need Web Bluetooth can opt-in with --enable-bluetooth CLI flag. Fixes #134461 --- src/main.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.ts b/src/main.ts index f70cf87ee7f98b..df082885e72aa8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -364,6 +364,13 @@ function configureCommandlineSwitchesSync(cliArgs: NativeParsedArgs) { // use up to 2 app.commandLine.appendSwitch('max-active-webgl-contexts', '32'); + // Disable Bluetooth to prevent BlueZ connection on startup (Linux) + // refs https://github.com/microsoft/vscode/issues/134461 + // Users can opt-in with --enable-bluetooth CLI flag + if (!app.commandLine.hasSwitch('enable-bluetooth')) { + app.commandLine.appendSwitch('disable-bluetooth'); + } + return argvConfig; } From ae4e4f24d37a505792fba6a8292913566b9d5e82 Mon Sep 17 00:00:00 2001 From: Ayu-haker Date: Sat, 20 Jun 2026 09:36:57 +0000 Subject: [PATCH 2/2] gate bluetooth disable behind linux platform check --- src/main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index df082885e72aa8..55d6baee7c7454 100644 --- a/src/main.ts +++ b/src/main.ts @@ -364,10 +364,10 @@ function configureCommandlineSwitchesSync(cliArgs: NativeParsedArgs) { // use up to 2 app.commandLine.appendSwitch('max-active-webgl-contexts', '32'); - // Disable Bluetooth to prevent BlueZ connection on startup (Linux) + // Disable Bluetooth on Linux to prevent BlueZ connection on startup // refs https://github.com/microsoft/vscode/issues/134461 // Users can opt-in with --enable-bluetooth CLI flag - if (!app.commandLine.hasSwitch('enable-bluetooth')) { + if (process.platform === 'linux' && !app.commandLine.hasSwitch('enable-bluetooth') && !app.commandLine.hasSwitch('disable-bluetooth')) { app.commandLine.appendSwitch('disable-bluetooth'); }