Summary: | startkde 3.3.1 patch dropped --login from #!/bin/bash | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Clemens Fruhwirth <clemens> |
Component: | [OLD] KDE | Assignee: | Gentoo KDE team <kde> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | 2004.2 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Clemens Fruhwirth
2004-10-20 01:39:56 UTC
the environment should be already sourced when running startkde... what do you use to start kde (startx, kdm, gdm, ...)? kdm. startkde is started by /etc/X11/Session/kde-3.3.* That's exec-ed by kdm. exactly, but before doing 'exec' in /usr/kde/3.3/share/config/kdm/Xsession there is (if your shell is bash): 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 Xsession didn't work for me for 2 reason: - path setting happens in .profile, but .bash_profile exists. - user shell is zsh. I updated my config to fit the requirements. Thanks. Last night I did an emerge -uD world which resulted in a kde 3.3.1 upgrade, and the first thing I noted was that the 'user@host' info and coloring was lost. I've tried to figure out what went wrong, but I can't. I know that one of the config files updated during etc-update was some Xsession, and what I can tell from the date it seems to be /usr/kde/3.3/share/config/kdm/Xsession . As a normal user: If I just bring up a Konsole in Kde the prompt just reads 'bash-2.05b$'. If i execute an 'echo $PS1' the output is just '\s-\v\$' I could either do '. /etc/profile' or a 'bash --login' to get a "normal" bash prompt as I had yesterday. I do have a .bash_profile which only reads like this: #This file is sourced by bash when you log in interactively. [ -f ~/.bashrc ] && . ~/.bashrc And .bashrc seems to contain the code for the prompt and coloring. I might also add that in the bash prompt after start up (yes I boot to a prompt and then enter X via startx) the 'user@host' info and color works. What do I need to change (and why?)? Also, I'm not sure it's the same bug, but I thought it was close enough. So if you do 'source .bashrc' after launching konsole the prompt gets colorized? that's strange, because the bash executed by konsole should always source .bashrc (while it won't source /etc/profile by default). I saw this bug a few times, but it was because in Gentoo PS1 was set in /etc/profile instead of .bashrc (but it changed with newer baselayout IIRC) Nope, that doesn't work. Only source /etc/profile seems to work. This is a printout from my konsole: bash-2.05b$ source .bashrc bash-2.05b$ source /etc/profile fredrik@bowmore fredrik $ //This line is colored also I might add that I have not done any changes, that I'm aware of, from the gentoo standard prompt. Below is the .bashrc found in my user home dir. /etc/skel/.bashrc: # $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/skel/.bashrc,v 1.8 2003/02/28 15:45:35 azarah Exp $ # This file is sourced by all *interactive* bash shells on startup. This # file *should generate no output* or it will break the scp and rcp commands. # colors for ls, etc. eval `dircolors -b /etc/DIR_COLORS` alias d="ls --color" alias ls="ls --color=auto" alias ll="ls --color -l" # Change the window title of X terminals case $TERM in xterm*|rxvt|Eterm|eterm) PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"' ;; screen) PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"' ;; esac ##uncomment the following to activate bash-completion: #[ -f /etc/profile.d/bash-completion ] && source /etc/profile.d/bash-completion So it's clear, you don't have the command that sets the bash prompt in .bashrc: PROMPT_COMMAND is misleading, it just sets the title at the top of the window. Add PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]' in ~/.bashrc, and PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]' in /root/.bashrc FYI, I think the bash in ~x86 provides and reads /etc/bashrc, which sets PS1 properly. Well, yes, that fixes my problem. But why has it stopped working? Isn't it some mismatch somewhere between versions? Am I the only one to have this problem? Anyway, thanks for your help... //Fredrik |