Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 552022 - Most variables specified in /etc/env.d/* are no longer respected
Summary: Most variables specified in /etc/env.d/* are no longer respected
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-13 17:35 UTC by Dominik Wezel
Modified: 2015-07-01 08:59 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik Wezel 2015-06-13 17:35:32 UTC
After the last emerge (2015-06-13 in the early morning), I noticed that my Compose key no longer worked as usual.  I have a custom /usr/share/X11/locale/en_US.UTF-8/Compose file.  When researching, it turned out the an update to kdelibs had unconditionally overridden all /etc/env files — which is NOT as it should be (Problem #1).

After that, I re-added
GTK_IM_MODULE=xim
QT_IM_MODULE=xim
to my /etc/env.d/77kde

When restarting however, the behaviour did not change: KDE applications like konsole or kwrite always respected /usr/share/X11/locale/en_US.UTF-8/Compose, but GTK and QT applications use a different input module (one of the darker sides, if not the darkest at all, of Open Source software), which could however be reset to the X input method by setting the above environment variables.

When checking the Envvars by firing up a konsole, sudoing bash and entering "set", I normally found these env variables.  No longer however (Problem #2).  As I researched deeper, I found out that the envvars of other /etc/env files like /etc/env.d/99editor are no longer respected either (the latter one sets the EDITOR and VISUAL variables, which are now undefined in the konsole "set".

Some of the settings (like LANG) are still set correctly when listing the environment variables, but this is no couterproof, as they could have been set already before X starts.

Reproducible: Always

Steps to Reproduce:
1. Add an environment variable to any of the /etc/env/* files
2. Reboot your system
3. Open konsole and become root
4. Enter "set" and \n
Actual Results:  
The varible is not listed

Expected Results:  
The variable should be listed among the environment variables

This is a very nasty bug, because setting the environment variables in other places recommended by tech support sites (such as ~/.xinitrc) never worked either in gentoo.
Comment 1 Dominik Wezel 2015-06-13 17:38:02 UTC
# cat /etc/env.d/77kde
COLON_SEPARATED=QT_PLUGIN_PATH
QT_PLUGIN_PATH=/usr/lib64/kde4/plugins
GTK_IM_MODULE=xim
QT_IM_MODULE=xim

# set
BASH=/bin/bash
BASHOPTS=checkwinsize:cmdhist:complete_fullquote:expand_aliases:extquote:force_fignore:histappend:hostcomplete:interactive_comments:no_empty_cmd_completion:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=()
BASH_ARGV=()
BASH_CMDS=()
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="4" [1]="3" [2]="33" [3]="1" [4]="release" [5]="x86_64-pc-linux-gnu")
BASH_VERSION='4.3.33(1)-release'
BLACK='\[\e[00;30\]'
BLUE='\[\e[00;34m\]'
BROWN='\[\e[00;33m\]'
COLUMNS=134
CYAN='\[\e[00;36m\]'
DIRSTACK=()
DISPLAY=:0
EUID=0
GPG_TTY=/dev/pts/1
GRAY='\[\e[00;37m\]'
GREEN='\[\e[00;32m\]'
GROUPS=()
HISTFILE=/root/.bash_history
HISTFILESIZE=500
HISTSIZE=500
HOME=/root
HOSTNAME=apollon
HOSTTYPE=x86_64
IFS=$' \t\n'
LANG=en_US.utf8
LANGUAGE=
LIGHTBLUE='\[\e[01;34m\]'
LIGHTCYAN='\[\e[01;36m\]'
LIGHTGREEN='\[\e[01;32m\]'
LIGHTPURPLE='\[\e[01;35m\]'
LIGHTRED='\[\e[01;31m\]'
LINES=63
LOGNAME=root
LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:'
LS_OPTIONS=--color=auto
MACHTYPE=x86_64-pc-linux-gnu
MAIL=/var/mail/root
MAILCHECK=60
NOCOLOR='\[\e[00m\]'
OLDPWD=/etc/env.d
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin
PIPESTATUS=([0]="0")
PPID=3080
PS1='\[\e[01;31m\]\u\[\e[00m\]@\[\e[01;32m\]\h\[\e[00m\]:\[\e[01;33m\]\w\[\e[00m\]#\[\e[00;36m\]1\[\e[00m\]\$ \[\e]30;\u@\h\a\]'
PS2='> '
PS4='+ '
PURPLE='\[\e[00;35m\]'
PWD=/root
RED='\[\e[00;31m\]'
REVRED='\[\e[07;31m\]'
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
SHLVL=1
SSH_AGENT_PID=3082
SSH_AUTH_SOCK=/tmp/ssh-yQHO6kHuiWoK/agent.3081
SUDO_COMMAND=/bin/bash
SUDO_GID=100
SUDO_UID=1962
SUDO_USER=dio
TERM=xterm
UID=0
USER=root
USERNAME=root
WHITE='\[\e[01;37m\]'
YELLOW='\[\e[01;33m\]'
_=/etc/env.d/77kde
Comment 2 Mike Gilbert gentoo-dev 2015-06-13 18:40:38 UTC
Did you run env-update to re-create /etc/profile.env?

Also, sudo may be interfering with your environment, which is pretty standard.
Comment 3 Mike Gilbert gentoo-dev 2015-06-13 18:42:13 UTC
Also, are you using a display manager, or startx?
Comment 4 Dominik Wezel 2015-06-13 19:09:57 UTC
Mike,

1. I didn't do an env-update, but a reboot (afaik this will also lead to an updated environment).  env-update also had no effect in this respect when I invoked it right now.
2. I'm starting kdm as a display manager via /etc/init.d/xdm
Comment 5 Michael Palimaka (kensington) gentoo-dev 2015-06-14 15:08:16 UTC
By default, /etc/env.d is excluded from configuration protection - you need to adjust your CONFIG_PROTECT_MASK if you don't want it overwritten. Also, are you really using IA64?
Comment 6 Dominik Wezel 2015-06-14 16:02:39 UTC
> By default, /etc/env.d is excluded from configuration protection - you need
> to adjust your CONFIG_PROTECT_MASK if you don't want it overwritten. Also,
> are you really using IA64?

No, sorry, I actually meant x86_64 — changed that to AMD64.

Interestingly, this morning, when I booted my machine, the problem has disappeared ... I doubt this comes from the daily emerge this night, which only updated some virtual perl modules and openoffice-org.

But yet, I still wonder how this could happen ... it's been working for almost 2 years now — without interruption.

Let's keep this open for another couple days to see if it's stable again.  If nothing changes, I will close the bug.