Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
KDE 3.0.2 /etc/profile
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
nbensa
Guest





PostPosted: Tue Jul 09, 2002 4:58 am    Post subject: KDE 3.0.2 /etc/profile Reply with quote

Hi,

I just installed Gentoo Linux 1.2 and KDE 3.0.2.

I have a problem, KDE is not reading /etc/profile. I've tried adding --login to /usr/kde/3/bin/startkde but it only helps when starting KDE from the console. What about kdm (I get sh-2.05a$ in my prompt)??

TIA,
Norberto
Back to top
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Tue Jul 09, 2002 5:06 am    Post subject: Reply with quote

Moving to Desktop Environments forum. There are a bunch of threads about this. Please search before posting.
_________________
I don't believe in witty sigs.
Back to top
View user's profile Send private message
Ozymandias
Tux's lil' helper
Tux's lil' helper


Joined: 10 Apr 2002
Posts: 81
Location: Netherlands

PostPosted: Tue Jul 09, 2002 10:11 am    Post subject: Reply with quote

what do you mean by not reading /etc/profile? do you mean that konsole is not giving you the expected promt?

I do this in $HOME/.bashrc:
Code:
source /etc/profile
export PATH=$PATH:~/bin
# using ssh agent and keychain
keychain ~/.ssh/id_dsa
source ~/.ssh-agent-$HOSTNAME > /dev/null
# bash programmable completion
source /etc/bash_completion
#give me some nice colors while were at it
eval `dircolors`

and while we are on it, I changed /etc/profile so that you get the path and inlog in the titlebar of konsole (actually xterm, but konsole supports it to) And did it so that a virtual terminal (ctl+alt+1) doesn't beep because it does not understand this xterm code.
Code:
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/profile,v 1.12 2002/05/12 21:48:18 azarah Exp $

if [ -e "/etc/profile.env" ]
then
  source /etc/profile.env
fi

#077 would be more secure, but 022 is generally quite realistic
umask 022

if [ `/usr/bin/whoami` = 'root' ]
then
        if [ "$SHELL" = '/bin/bash' ] || [ "$SHELL" = '/bin/sh' ]
        then
                if [ "$TERM" = 'linux' ]
                then
                        export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]'
                else
                        export PS1='\[\033]0;\u@\h:\w\007\]\[\033[01;31m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]'
                fi
        fi
        export PATH="/bin:/sbin:/usr/bin:/usr/sbin:${ROOTPATH}"
else
        if [ "$SHELL" = '/bin/bash' ] || [ "$SHELL" = '/bin/sh' ]
        then
                if [ "$TERM" = 'linux' ]
                then
                        export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]'
                else
                         export PS1='\[\033]0;\u@\h:\w\007\]\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]'
                fi
        fi
        export PATH="/bin:/usr/bin:${PATH}"
fi
unset ROOTPATH
export EDITOR="/usr/bin/vi"

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
        export INPUTRC="/etc/inputrc"
fi

alias ls='ls --color'

this version is based on the latest gentoo profile.

I use bash programmable completion, I beleve nowadays there is an ebuild for it, I installed it by hand, and I use keychain for ssh key management, just comment these things out if you don't have it.
Allso make sure bash is your shell, change it in /etc/passwd. Though sh is the same as bash, (sh is a symlink to bash), if you start bash using the sh simlink, it doesn't read .bashrc (probably .shrc, but don't know about that)

greetz Ozy
Back to top
View user's profile Send private message
nbensa
l33t
l33t


Joined: 10 Jul 2002
Posts: 799
Location: Buenos Aires, Argentina

PostPosted: Tue Jul 16, 2002 5:16 pm    Post subject: Reply with quote

Ozymandias wrote:
what do you mean by not reading /etc/profile? do you mean that konsole is not giving you the expected promt?


Well, I solved the /etc/profile issue but I still have another one.

If I do 'uptime' (top, w, users, etc.) in konsole it shows '0 users.' I've read that I need to put --login in some script, but I don't know which one.

Also, and very extrange (at least for me.) If in the same KDE session, I open xterm, then the above commands show 1 user.

TIA,
Norberto
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum