You are not logged in.
I'm trying to be able to use fcitx inside alacritty, and I've discovered that my problem is due to alacritty not properly obtaining environment variables from ~/.xinitrc. Other programs work fine, but if I run alacritty and then 'echo $VARIABLE' where my .xinitrc has 'export VARIABLE = value', it returns nothing, not 'value'. If I set the same variables in .zshrc and then launch alacritty from a terminal, it works correctly and I can use fcitx just fine. Why is it not working from .xinitrc? Is there somewhere else I can try exporting these variables from so that I don't have to launch alacritty twice to get it to work with fcitx?
I'm using i3 with ly-dm as the display manager; let me know what else you might need to know.
Offline
DMs don't generally execute .xinitrc. That's really just for xinit/startx.
Online
Interesting, then, that they seem to be exported as far as every other program is concerned. What's a better place to put them, then?
Offline
ly isn't a GUI DM, you'll likely startx/xinit from there?
If you want to figure, add an indicator like "touch /tmp/yeah_ran_xinit" to your xinitrc.
but if I run alacritty and then 'echo $VARIABLE' where my .xinitrc has 'export VARIABLE = value', it returns nothing, not 'value'
1. Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855
Post your xinitrc and the actual $VARIABLE you're looking for
2. you're not looking at the environment of alacritty but the shell process inside this way.
tr '\0' '\n' < /proc/$(pidof alacritty)/environor probably also
tr '\0' '\n' < /proc/$PPID/environ3. Provide the details of the actual, fcitx related, problem
Online
The actual xinitrc is
#!/bin/bash
export GTK_IM_MODULE="fcitx"
export QT_IM_MODULE="fcitx"
export XMODIFIERS="@im=fcitx"
export INPUT_METHOD="fcitx"
export XIM="fcitx"
export XIM_PROGRAM="fcitx"
export SDL_IM_MODULE="fcitx"
xrdb ~/.Xresources
exec i3'echo $XMODIFIERS' will return blank, even though I'm pretty darn sure that this file is the only reason the system knows to start i3, and therefore it must be being run. Another reason to believe it's being run is that fcitx worked in nothing until I put those lines in there, and now it works in everything except alacritty.
The actual problem is simply that fcitx does not function inside an alacritty window, unless I set those variables inside zsh and then run another alacritty window from that zsh instance. If I open an alacritty window with drun or alt+space, I cannot use any fcitx IMEs inside that window.
Offline
Your xinitrc is broken (last link below, 2nd note on what to include at least)
Be more sure about the invocation by adding a marker.
Also maybe add "export FOO=BAR" and see whether that makes it.
What does your i3 config look like?
Do the i3/alacritty processes still have this environment?
What if you run "alacritty &" before "exec i3"? Does that instance have the XMODIFIERS variable?
Is eg. an xterm likewise affected?
Online