"krzaki" w atermie

Przemyslaw Kujawski prkujawski w poczta.tyszkiewicz.edu.pl
Pią, 16 Kwi 2004, 13:09:44 CEST


W liście z czw, 15-04-2004, godz. 15:23, Adam Gorzkiewicz pisze: 
> Dnia czwartek 15 kwiecień 2004 15:11, Przemyslaw Kujawski napisał:
> > > A jak dasz:
> > > $ LANG=pl_PL xterm
> > > to jest ok?
> >
> > OK :) Dzieki.
> 
> Powoli - to tylko taki test - nie rozwiązanie.
> 
> > Zastanawia mnie tylko dlaczego wczesniej nie chcialo dzialac skoro zmienna
> > LANG w pliku /etc/sysconfig/i18n mialem ustawiona na pl_PL? Nie pomoglo
> 
> Oznacza to, że $LANG jest zamazywane gdzieś po drodze między wyeksportowaniem 
> go przez /etc/rc.d/rc* a startem ixów. Jednym słowem - niedobrze. 
> 
> > nawet odkomentowanie w pliku .bash_profile linii:
> > LANG=pl_PL
> > LC_ALL=pl_PL
> > export LANG LC_ALL
> 
> To powinno wystarczyc, jeżeli odpalasz ixy via startx. Jezeli zas robisz to 
> poprzez {g,k,x}dm to niekoniecznie - wszystko w tym momencie zależy od tego 
> jak masz skonstruowane Xsession danego deema. 
> 
> Napisz więcej szczegółów.

Uzywam GDM'a a zawartosc /etc/X11/gdm/Xsession jest nastepujaca:
echo "$0: Beginning session setup..."

# First read /etc/profile and .profile
test -f /etc/profile && . /etc/profile
test -f "$HOME/.profile" && . "$HOME/.profile"
# Second read /etc/xprofile and .xprofile for X specific setup
test -f /etc/xprofile && . /etc/xprofile
test -f "$HOME/.xprofile" && . "$HOME/.xprofile"

if [ ! -f $HOME/.profile ] && echo $SHELL |grep -q "bash"; then
    test -f $HOME/.bash_profile && . $HOME/.bash_profile
fi

# Translation stuff
if [ -x "/usr/lib/gdmtranslate" ] ; then
  gdmtranslate="/usr/lib/gdmtranslate"
else
  gdmtranslate=
fi

# Note that this should only go to zenity dialogs which always expect
utf8
gettextfunc () {
  if [ "x$gdmtranslate" != "x" ] ; then
    "$gdmtranslate" --utf8 "$1"
  else
    echo "$1"
  fi
}

zenity=`which zenity 2>/dev/null`

command="$1"

if [ -z "$command" ] ; then
  command=failsafe
fi

if [ x"$command" = xfailsafe ] ; then
  if [ -n "$zenity" ] ; then
    "$zenity" --info --text `gettextfunc "This is the failsafe xterm
session.  Windows now have focus only if you have your cursor above
them.  To get out of this mode type 'exit' in the window in the upper
left corner"`
  else
    echo "$0: Starting the failsafe xterm session."
  fi
  exec xterm -geometry 80x24+0+0
fi

# Note: ~/.xsession-errors is now done in the daemon so that it
# works for ALL sessions (except ones named 'Failsafe')

# clean up after xbanner
freetemp=`which freetemp 2>/dev/null`
if [ -n "$freetemp" ] ; then
	"$freetemp"
fi

userresources="$HOME/.Xresources"
usermodmap="$HOME/.Xmodmap"
userxkbmap="$HOME/.Xkbmap"

sysresources=/etc/X11/Xresources 
sysmodmap=/etc/X11/Xmodmap 
sysxkbmap=/etc/X11/Xkbmap

rh6sysresources=/etc/X11/xinit/Xresources 
rh6sysmodmap=/etc/X11/xinit/Xmodmap 


# merge in defaults
if [ -f "$rh6sysresources" ]; then
    xrdb -merge "$rh6sysresources"
fi

if [ -f "$sysresources" ]; then
    xrdb -merge "$sysresources"
fi

if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi

# merge in keymaps
if [ -f "$sysxkbmap" ]; then
    setxkbmap `cat "$sysxkbmap"`
    XKB_IN_USE=yes
fi

if [ -f "$userxkbmap" ]; then
    setxkbmap `cat "$userxkbmap"`
    XKB_IN_USE=yes
fi

#
# Eeek, this seems like too much magic here
#
if [ -z "$XKB_IN_USE" -a ! -L /etc/X11/X ]; then
    if grep '^exec.*/Xsun' /etc/X11/X > /dev/null 2>&1 && [ -f
/etc/X11/XF86Config ]; then
       xkbsymbols=`sed -n -e 's/^[     ]*XkbSymbols[  
]*"\(.*\)".*$/\1/p' /etc/X11/XF86Config`
       if [ -n "$xkbsymbols" ]; then
           setxkbmap -symbols "$xkbsymbols"
           XKB_IN_USE=yes
       fi
    fi
fi

# xkb and xmodmap don't play nice together
if [ -z "$XKB_IN_USE" ]; then
    if [ -f "$rh6sysmodmap" ]; then
       xmodmap "$rh6sysmodmap"
    fi

    if [ -f "$sysmodmap" ]; then
       xmodmap "$sysmodmap"
    fi

    if [ -f "$usermodmap" ]; then
       xmodmap "$usermodmap"
    fi
fi

unset XKB_IN_USE

# Normalize languages, some places/distros screw us up in /etc/profile,
# so in case the user did select a language
if [ -n "$GDM_LANG" ]; then
  LANG="$GDM_LANG"
  export LANG

  if [ -n "$LC_ALL" ]; then
    if [ "$LC_ALL" != "$LANG" ]; then
      LC_ALL="$LANG"
    fi
  else
    unset LC_ALL
  fi

  if [ -n "$LANGUAGE" ]; then
    if [ "$LANGUAGE" != "$LANG" ]; then
      LANGUAGE="$LANG"
    fi
  else
    unset LANGUAGE
  fi

  if [ -n "$LINGUAS" ]; then
    if [ "$LINGUAS" != "$LANG" ]; then
      LINGUAS="$LANG"
    fi
  else
    unset LINGUAS
  fi
fi

# run all system xinitrc shell scripts.
if [ -d /etc/X11/xinit/xinitrc.d ]; then
    for i in /etc/X11/xinit/xinitrc.d/* ; do
        if [ -x "$i" ]; then
	    . "$i"
        fi
    done
fi

if [ "x$command" = "xcustom" ] ; then
  if [ -x "$HOME/.xsession" ]; then
    command="$HOME/.xsession"
  else
    echo "$0: Cannot find ~/.xsession will try the default session"
    command="default"
  fi
fi

if [ "x$command" = "xdefault" ] ; then
  if [ -x "$HOME/.Xclients" ]; then
    command="$HOME/.Xclients"
  elif [ -x /etc/X11/xinit/Xclients ]; then
    command="/etc/X11/xinit/Xclients"
  elif [ -x /etc/X11/Xclients ]; then
    command="/etc/X11/Xclients"
  else
    echo "$0: Cannot find Xclients"
    # FIXME: kind of an evil failsafe
    command="xsm"
  fi
fi

# add ssh-agent if found
sshagent="`which ssh-agent 2>/dev/null`"
if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ];
then
    command="$sshagent -- $command"
elif [ -z "$sshagent" ] ; then
    echo "$0: ssh-agent not found!"
fi

echo "$0: Setup done, will execute: $command"

eval exec $command

echo "$0: Executing $command failed, will run xterm"

if [ -n "$zenity" ] ; then
	"$zenity" --info --text `gettextfunc "I could not start your session
and so I have started the failsafe xterm session.  Windows now have
focus only if you have your cursor above them.  To get out of this mode
type 'exit' in the window in the upper left corner"`
fi

exec xterm -geometry 80x24+0+0




Więcej informacji o liście dyskusyjnej pld-users-pl