Accepting request 313274 from home:WernerFink:branches:X11:Utilities
- Allow background processes in ~/.profile and ~/.login (bsc#934720) also use ~/.i18n of exist instead of ~/.profile or ~/.login OBS-URL: https://build.opensuse.org/request/show/313274 OBS-URL: https://build.opensuse.org/package/show/X11:Utilities/x11-tools?expand=0&rev=28
This commit is contained in:
35
xim
35
xim
@@ -20,8 +20,9 @@
|
||||
# For example:
|
||||
# INPUT_METHOD="scim"
|
||||
# This changes the default for all users
|
||||
# 2) set and export the variable "INPUT_METHOD" in ~/.profile in the
|
||||
# home directory of a user (or ~/.login for csh users) For example:
|
||||
# 2) set and export the variable "INPUT_METHOD" in ~/.i18n in the
|
||||
# home directory of a user.
|
||||
# For example:
|
||||
# export INPUT_METHOD="scim"
|
||||
# This changes the default only for one user.
|
||||
#
|
||||
@@ -63,22 +64,35 @@ echo "/etc/X11/xim: Checking whether an input method should be started."
|
||||
adduserenv () {
|
||||
local cur var=${1+"$@"}
|
||||
: ${HOSTNAME:=$(hostname -f)}
|
||||
# Use ~/.i18n
|
||||
if test -s "$HOME/.i18n"; then
|
||||
echo "/etc/X11/xim: Checking whether an input method is specified in $HOME/.i18n."
|
||||
eval $(set +u +e
|
||||
. /etc/profile.d/lang.sh
|
||||
for cur in $var; do
|
||||
echo export $cur=${!cur}
|
||||
done)
|
||||
return
|
||||
fi
|
||||
# Fall back to ~/.profile or ~/.login
|
||||
case "$SHELL" in
|
||||
*/sh|*/ash|*/bash|*/ksh|*/pdksh|*/zsh)
|
||||
*/sh|*/ash|*/bash|*/ksh|*/mksh|*/pdksh|*/zsh)
|
||||
if test -s "$HOME/.profile" ; then
|
||||
echo "/etc/X11/xim: Checking whether an input method is specified in $HOME/.profile."
|
||||
eval $(export HOSTNAME
|
||||
(echo . "'$HOME/.profile'"
|
||||
(echo . "'$HOME/.profile' < /dev/null > /dev/null 2>&1"
|
||||
echo "set +u +e"
|
||||
for cur in $var; do
|
||||
echo echo \${$cur+"export $cur=\$$cur;"}
|
||||
echo echo \${$cur+"export $cur=\$$cur";}
|
||||
done) | $SHELL)
|
||||
fi
|
||||
;;
|
||||
*/csh|*/tcsh)
|
||||
if test -s "$HOME/.login" ; then
|
||||
echo "/etc/X11/xim: Checking whether an input method is specified in $HOME/.login."
|
||||
eval $(export HOSTNAME
|
||||
(echo onintr -
|
||||
echo source "'$HOME/.login'"
|
||||
echo source "'$HOME/.login' < /dev/null >& /dev/null"
|
||||
echo unset verbose
|
||||
for cur in $var; do
|
||||
echo if \( \${?$cur} \) echo export $cur=\`printenv $cur\`
|
||||
@@ -119,11 +133,10 @@ else
|
||||
adduserenv LANG LC_CTYPE LC_ALL INPUT_METHOD
|
||||
fi
|
||||
|
||||
# if INPUT_METHOD is already set to something non-empty here,
|
||||
# the user must have set it in ~/.profile or ~/.login or on the
|
||||
# command line before using startx. In that case, don't
|
||||
# read the system wide default from /etc/sysconfig/language,
|
||||
# use the user supplied value instead:
|
||||
# if INPUT_METHOD is already set to something non-empty here, the user should
|
||||
# set it in ~/.i18n or in ~/.profile or ~/.login or on the command line before
|
||||
# using startx. In that case, don't read the system wide default from
|
||||
# /etc/sysconfig/language, use the user supplied value instead:
|
||||
if [ -z "$INPUT_METHOD" ] ; then
|
||||
echo "sourcing /etc/sysconfig/language to get the value of INPUT_METHOD"
|
||||
. /etc/sysconfig/language
|
||||
|
Reference in New Issue
Block a user