Skip to content

Commit 241aa9e

Browse files
committed
Set env for qt ibus
1 parent 91384e6 commit 241aa9e

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

cinnamon-session/main.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,26 @@ main (int argc, char **argv)
265265
csm_util_export_activation_environment (NULL);
266266
csm_util_export_user_environment (NULL);
267267

268+
{
269+
gchar *ibus_path;
270+
271+
ibus_path = g_find_program_in_path("ibus-daemon");
272+
273+
if (ibus_path) {
274+
const gchar *p;
275+
p = g_getenv ("QT_IM_MODULE");
276+
if (!p || !*p)
277+
p = "ibus";
278+
csm_util_setenv ("QT_IM_MODULE", p);
279+
p = g_getenv ("XMODIFIERS");
280+
if (!p || !*p)
281+
p = "@im=ibus";
282+
csm_util_setenv ("XMODIFIERS", p);
283+
}
284+
285+
g_free (ibus_path);
286+
}
287+
268288
mdm_log_init ();
269289
mdm_log_set_debug (debug);
270290

0 commit comments

Comments
 (0)