Skip to content

Commit 275f87e

Browse files
committed
Set env for qt ibus
1 parent 91384e6 commit 275f87e

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

cinnamon-session/main.c

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,30 @@ 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_MODULES");
276+
if (!p || !*p)
277+
p = "wayland;ibus";
278+
csm_util_setenv ("QT_IM_MODULES", p);
279+
p = g_getenv ("QT_IM_MODULE");
280+
if (!p || !*p)
281+
p = "ibus";
282+
csm_util_setenv ("QT_IM_MODULE", p);
283+
p = g_getenv ("XMODIFIERS");
284+
if (!p || !*p)
285+
p = "@im=ibus";
286+
csm_util_setenv ("XMODIFIERS", p);
287+
}
288+
289+
g_free (ibus_path);
290+
}
291+
268292
mdm_log_init ();
269293
mdm_log_set_debug (debug);
270294

0 commit comments

Comments
 (0)