Re: How to set the KDE path?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In <AANLkTinAu6odRJHDBNvxQyFgfBPn5gxsZFbHFhavDDvo@xxxxxxxxxxxxxx>, Dotan 
Cohen wrote:
>On Wed, Feb 2, 2011 at 11:00, Boyd Stephen Smith Jr.
>
><bss@xxxxxxxxxxxxxxxxx> wrote:
>> In <AANLkTikOpLE7TohYotw8g9zn7dCKVBn0WBOLGWrCdLhf@xxxxxxxxxxxxxx>, Dotan
>> 
>> Cohen wrote:
>>>It is rather frustrating that the Plasma Krunner (Alt-F2) does not
>>>follow the path configured in $HOME/.profile.
>>>
>> Are you using bash and have a .bash_profile?  I think .bash_profile is
>> preferred by bash (and things trying to emulate bash's behavior) when
>> both .profile and .bash_profile exist.
>
>I am specifically referring to the Krunner (Alt-F2) dialogue.

Still.  My question is surprisingly valid.  I've found an annoying little 
script in /etc/kde4/kdm/Xsession that tries to emulate the behavior of your 
shell configured in /etc/passwd.  So, the shell you set with chsh can, 
absurdly, affect how your KDE SC environment behaves.

>>>So, what is the correct syntax for configuring the KDE path in
>>>~/.xinitrc? Thanks!
>>>
>> Don't use that.
>> 
>> If you need to set up global environment variables for your KDE
>> sessions, use ~/.kde/env/$whatever.sh.
>
>Do you know the syntax? It is not the bash syntax. Thanks.

Works for me here:
$ cd ~/.kde/env
$ ls
gtk-qt-engine.rc.sh  keychain-start.sh  ssh-askpass.sh
$ cat *
#! /bin/sh

# Make sure our customised gtkrc file is loaded.
if [ -r "$HOME"/.gtkrc-2.0-kde ]; then
        GTK2_RC_FILES=$HOME/.gtkrc-2.0-kde; export GTK2_RC_FILES
elif [ -r "$HOME"/.gtk_qt_engine_rc ]; then
        GTK2_RC_FILES=$HOME/.gtk_qt_engine_rc; export GTK2_RC_FILES
fi
#! /bin/sh
# Starts keychain or initializes the environment, but requires no 
interactivity.
if [ -x /usr/bin/keychain ]; then
        eval "$(/usr/bin/keychain --eval --quiet --inherit any-once --stop 
others --noask --lockwait 0)"
fi
#! /bin/sh

if [ -x /usr/bin/ksshaskpass ]; then
        SSH_ASKPASS=/usr/bin/ksshaskpass; export SSH_ASKPASS
elif [ -x /usr/bin/x11-ssh-askpass ]; then
        SSH_ASKPASS=/usr/bin/x11-ssh-askpass; export SSH_ASKPASS
elif [ -x /usr/lib64/ssh/x11-ssh-askpass ]; then
        SSH_ASKPASS=/usr/lib64/ssh/x11-ssh-askpass; export SSH_ASKPASS
elif [ -x /usr/bin/ssh-askpass ]; then
        SSH_ASKPASS=/usr/bin/ssh-askpass; export SSH_ASKPASS
elif [ -x /usr/lib64/ssh/ssh-askpass ]; then
        SSH_ASKPASS=/usr/lib64/ssh/ssh-askpass; export SSH_ASKPASS
fi


>> I use kdm-4 and it has this annoying habit of sourcing both may .profile
>> and my .login well before the session is even partially ready.
>
>According to the lead Plasma dev, KDE should not source .profile.

I happen to agree with him.  But, that's not my experience using KDE SC 4 on 
Ddebian Squeeze.  The file /etc/kde4/kdm/Xsession installed by the kdm 
package contains the following (plus other stuff):
# Note that the respective logout scripts are not sourced.
case $SHELL in
  */bash)
    [ -z "$BASH" ] && exec $SHELL $0 "$@"
    set +o posix
    [ -f /etc/profile ] && . /etc/profile
    if [ -f $HOME/.bash_profile ]; then
      . $HOME/.bash_profile
    elif [ -f $HOME/.bash_login ]; then
      . $HOME/.bash_login
    elif [ -f $HOME/.profile ]; then
      . $HOME/.profile
    fi
    ;;
  */zsh)
    [ -z "$ZSH_NAME" ] && exec $SHELL $0 "$@"
    emulate -R zsh
    [ -d /etc/zsh ] && zdir=/etc/zsh || zdir=/etc
    zhome=${ZDOTDIR:-$HOME}
    # zshenv is always sourced automatically.
    [ -f $zdir/zprofile ] && . $zdir/zprofile
    [ -f $zhome/.zprofile ] && . $zhome/.zprofile
    [ -f $zdir/zlogin ] && . $zdir/zlogin
    [ -f $zhome/.zlogin ] && . $zhome/.zlogin
    setopt shwordsplit noextendedglob
    ;;
  */csh|*/tcsh)
    # [t]cshrc is always sourced automatically.
    # Note that sourcing csh.login after .cshrc is non-standard.
    xsess_tmp=`mktemp /tmp/xsess-env-XXXXXX`
    $SHELL -c "if (-f /etc/csh.login) source /etc/csh.login; if (-f ~/.login) 
source ~/.login; /bin/sh -c export -p >! $xsess_tmp"
    . $xsess_tmp
    rm -f $xsess_tmp
    ;;
  *) # Plain sh, ksh, and anything we do not know.
    [ -f /etc/profile ] && . /etc/profile
    [ -f $HOME/.profile ] && . $HOME/.profile
    ;;
esac
-- 
Boyd Stephen Smith Jr.                   ,= ,-_-. =.
bss@xxxxxxxxxxxxxxxxx                   ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy         `-'(. .)`-'
http://iguanasuicide.net/                    \_/

Attachment: signature.asc
Description: This is a digitally signed message part.

___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.

[Index of Archives]     [Trinity (TDE) Desktop Users]     [Fedora KDE]     [Fedora Desktop]     [Linux Kernel]     [Gimp]     [GIMP for Windows]     [Gnome]     [Yosemite Hiking]
  Powered by Linux