mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
ibusManager: Add missing environment variables required to launch ibus-daemon
IBus requires XAUTHORITY and XDG_RUNTIME_DIR to be able to spawn its XIM
implementation correctly. Using launch context to get environment can correctly
launch on non-systemd setups.
Closes: #6998
Signed-off-by: xiaofan <xiaofan@iscas.ac.cn>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2947>
(cherry picked from commit 050d0e10c7)
This commit is contained in:
parent
408a7b5462
commit
fae6fa2387
1 changed files with 3 additions and 11 deletions
|
|
@ -108,17 +108,9 @@ var IBusManager = class extends Signals.EventEmitter {
|
||||||
|
|
||||||
_spawn(extraArgs = []) {
|
_spawn(extraArgs = []) {
|
||||||
try {
|
try {
|
||||||
let cmdLine = ['ibus-daemon', '--panel', 'disable', ...extraArgs];
|
const cmdLine = ['ibus-daemon', '--panel', 'disable', ...extraArgs];
|
||||||
let env = [];
|
const launchContext = global.create_app_launch_context(0, -1);
|
||||||
|
const env = launchContext.get_environment();
|
||||||
this._tryAppendEnv(env, 'DBUS_SESSION_BUS_ADDRESS');
|
|
||||||
this._tryAppendEnv(env, 'WAYLAND_DISPLAY');
|
|
||||||
this._tryAppendEnv(env, 'HOME');
|
|
||||||
this._tryAppendEnv(env, 'LANG');
|
|
||||||
this._tryAppendEnv(env, 'LC_CTYPE');
|
|
||||||
this._tryAppendEnv(env, 'COMPOSE_FILE');
|
|
||||||
this._tryAppendEnv(env, 'DISPLAY');
|
|
||||||
|
|
||||||
// Use DO_NOT_REAP_CHILD to avoid adouble-fork internally
|
// Use DO_NOT_REAP_CHILD to avoid adouble-fork internally
|
||||||
// since ibus-daemon refuses to start with init as its parent.
|
// since ibus-daemon refuses to start with init as its parent.
|
||||||
const [success_, pid] = GLib.spawn_async(
|
const [success_, pid] = GLib.spawn_async(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue