diff --git a/js/misc/ibusManager.js b/js/misc/ibusManager.js index cc699c33c..2049758ea 100644 --- a/js/misc/ibusManager.js +++ b/js/misc/ibusManager.js @@ -61,7 +61,12 @@ var IBusManager = class { _spawn(extraArgs = []) { try { let cmdLine = ['ibus-daemon', '--panel', 'disable', ...extraArgs]; - Gio.Subprocess.new(cmdLine, Gio.SubprocessFlags.NONE); + let launcher = Gio.SubprocessLauncher.new(Gio.SubprocessFlags.NONE); + // Forward the right X11 Display for ibus-x11 + let display = GLib.getenv('GNOME_SETUP_DISPLAY'); + if (display) + launcher.setenv('DISPLAY', display, true); + launcher.launch(cmdLine); } catch (e) { log(`Failed to launch ibus-daemon: ${e.message}`); }