How do you make CDE source .profile, .bashrc in home dir and /etc?

How do you make CDE source .profile, .bashrc in home dir and /etc?

Post by Ivan Samuels » Wed, 03 Jun 1998 04:00:00



I'm trying to get CDE to source my .profile and .bashrc files in both the
$HOME directory and in /etc. It doesn't seem to be working correctly
because when I fire up dtterm, none of my aliases are defined. I have to
source my .profile and .bashrc in my $HOME dir manually to get it work.

I've gone into the $HOME/.dtprofile file and set DTSOURCEPROFILE to true.

I'm running RedHat Linux 5.0 and TriTeal CDE 4.2.

Here's what I see in the $HOME/.dt/startlog file:

--- Tue Jun  2 06:35:50 EDT 1998
--- /usr/dt/bin/Xsession starting...
warning: `-' deprecated; use `ps p', not `ps -p'
--- Xsession started by dtlogin
--- sourcing /home/bolski/.dtprofile...
--- sourcing /etc/dt/config/Xsession.d/myvars...
--- sourcing /usr/dt/config/Xsession.d/0010.dtpaths...
--- sourcing /usr/dt/config/Xsession.d/0020.dtims...
--- sourcing /usr/dt/config/Xsession.d/0030.dttmpdir...
--- sourcing /usr/dt/config/Xsession.d/0040.xmbind...
--- sourcing /usr/dt/config/Xsession.d/0060.srcsysenv...
--- starting /usr/dt/bin/dthello &
--- starting /usr/dt/bin/dtsearchpath -ksh
--- starting /usr/dt/bin/dtappgather &
--- execing /usr/dt/bin/dtsession using /home/bolski/.profile...
stdin: is not a ttyYeah...

The "Yeah..." part comes from my $HOME/.profile file which I have as
follows:

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        source ~/.bashrc
fi

# User specific environment and startup programs

export PATH=.:$HOME/bin:$PATH:/usr/local/jdk1.1.5v5-980311/bin
export ENV=$HOME/.bashrc
export USERNAME=""
export NNTPSERVER=news.netexp.net

if [ "$DT" ]; then
        echo "Yeah..."
        source /etc/bashrc
        source /etc/profile
fi

My ~/.bashrc file contains all my aliases which are not available in a
dtterm session unless I specifically do it myself. Also, I know the
/etc/profile and /etc/bashrc files are not being sourced when I open a
dtterm because my prompt does not change until I source them myself.

Any ideas on who to get this to work?

Thanks!

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Ivan Samuelson                 * DEATH TO ALL SPAM (except in a can)
Information Systems Consultant * To reply via email, replace "no.spam" with
Metro Information Services     * "bolski"
http://www.MetroIS.com         * http://www.netexp.net/~bolski
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
                    DEATH TO ALL SPAM (except in a can)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

 
 
 

How do you make CDE source .profile, .bashrc in home dir and /etc?

Post by Ivan Samuels » Wed, 03 Jun 1998 04:00:00


Oops. Heh-heh. Found out my problem. Apparently, the default action for
the Terminal program doesn't fire up dtterm to act as a login (-ls). I
fixed this and it seems to be working just fine.

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Ivan Samuelson                 * DEATH TO ALL SPAM (except in a can)
Information Systems Consultant * To reply via email, replace "no.spam" with
Metro Information Services     * "bolski"
http://www.MetroIS.com         * http://www.netexp.net/~bolski
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
                    DEATH TO ALL SPAM (except in a can)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

 
 
 

1. /etc/profile - /etc/bashrc

Hello,

what's wrong with this script?

#!/bin/bash
#Dieses Script sendet Emails wenn sich jemand einloggt

searchstring=$USER
result=`less /etc/login.sms.mail.users | grep $searchstring`
if [ $? -eq 0 ]
        then
                echo "You know what it means to be free !"
        else
                echo "Your session is logged."
                echo "User $USER hat sich eingeloggt" | mail -s

fi

I have an entry in /etc/bashrc: /usr/sbin/login.script

Now something is different, when I type less something, I have to press
CRTL-DEL to see actually what less prints on the screen... and if I press v
(to start vi), nothing happens...

M. W.

2. Access to a linux box while travelling

3. set Java CLASSPATH in /etc/profile or /etc/bashrc ?

4. Linux Server in M$ desktop Environment

5. CDE 1.4: shell in dtterm not sourcing /etc/profile

6. FTP and telnet proplem over PPP

7. Telnet login doesn't run /etc/profile or $HOME/.profile

8. I'm back (I think)

9. /etc/profile or $HOME/profile

10. cmdtool doesn't source /.profile or /etc/profile

11. /etc/profile, .bashrc, .bash_profile won't load with su to root

12. Why does .bashrc call /etc/profile?

13. /etc/profile, bashrc, PATH, PS1 and X: What is right?