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

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

Post by Roland Main » Tue, 08 Aug 2000 04:00:00



Hi !

----

Is there a way to tell CDE in Solaris 8 to source /etc/profile &
~/.profile for dtterms ? dtterm in "console" mode works, but normal
dtterms not.
Login shell is /bin/ksh; ~/.dtprofile contains
-- snip --
. /etc/profile
DTSOURCEPROFILE=true
-- snip --

This works for Solaris 7 - but not for Solaris 8 anymore (dtterm console
mode works - normal dtterm not...).
Any hints/suggestions ?

----

Bye,
Roland

--
  __ .  . __


  /O /==\ O\  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
 (;O/ \/ \O;) TEL +49 641 99-13193 FAX +49 641 99-41359

 
 
 

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

Post by Roland Main » Tue, 08 Aug 2000 04:00:00



> Hi !

> ----

> Is there a way to tell CDE in Solaris 8 to source /etc/profile &
> ~/.profile for dtterms ? dtterm in "console" mode works, but normal
> dtterms not.
> Login shell is /bin/ksh; ~/.dtprofile contains
> -- snip --
> . /etc/profile
> DTSOURCEPROFILE=true
> -- snip --

> This works for Solaris 7 - but not for Solaris 8 anymore (dtterm console
> mode works - normal dtterm not...).
> Any hints/suggestions ?

Parts of the mystery solved:
profile _is_ sourced - but unfortunately the alias is reseted to ksh
defaults.
Example:
After sourcing /etc/profile "alias" outputs:
-- snip --
__A=^P
__B=^N
__C=^F
__D=^B
__H=^A
autoload='typeset -fu'
command='command '
functions='typeset -f'
history='fc -l'
integer='typeset -i'
local=typeset
nohup='nohup '
r='fc -e -'
stop='kill -STOP'
suspend='kill -STOP $$'
-- snip --

If I start a new dtterm "alias" outputs:
-- snip --
autoload='typeset -fu'
command='command '
functions='typeset -f'
history='fc -l'
integer='typeset -i'
local=typeset
nohup='nohup '
r='fc -e -'
stop='kill -STOP'
suspend='kill -STOP $$'
-- snip --

The alias for __A, _B etc. aren't preserved in this case. Is there a way
to force preservation of "aliases" in Solaris ksh ?

----

Bye,
Roland

--
  __ .  . __


  /O /==\ O\  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
 (;O/ \/ \O;) TEL +49 641 99-13193 FAX +49 641 99-41359

 
 
 

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

Post by Allen M. Cohe » Tue, 08 Aug 2000 04:00:00


Have you tried dtterm -ls

ot the loginShell resource set to True?


> Hi !

> ----

> Is there a way to tell CDE in Solaris 8 to source /etc/profile &
> ~/.profile for dtterms ? dtterm in "console" mode works, but normal
> dtterms not.
> Login shell is /bin/ksh; ~/.dtprofile contains
> -- snip --
> . /etc/profile
> DTSOURCEPROFILE=true
> -- snip --

> This works for Solaris 7 - but not for Solaris 8 anymore (dtterm console
> mode works - normal dtterm not...).
> Any hints/suggestions ?

> ----

> Bye,
> Roland

> --
>   __ .  . __


>   /O /==\ O\  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
>  (;O/ \/ \O;) TEL +49 641 99-13193 FAX +49 641 99-41359

 
 
 

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

Post by Roland Main » Tue, 08 Aug 2000 04:00:00



> Have you tried dtterm -ls

> ot the loginShell resource set to True?

This would solve the problem - but this will also run /etc/profile in
"full featured mode" (=check anything, print news/status etc.)each time
- and this will took a long time on smaller machines.

But it seems that /etc/profile _is_ sourced (I was wrong here... sorry)
- unfortunately the "alias" setting for ksh are reset'ed for a shell in
a new dtterm which causes our problem (see other posting in this thread
for an example...)... ;-(

----

Bye,
Roland

--
  __ .  . __


  /O /==\ O\  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
 (;O/ \/ \O;) TEL +49 641 99-13193 FAX +49 641 99-41359

 
 
 

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

Post by Chuck Slivkof » Tue, 08 Aug 2000 04:00:00



> Parts of the mystery solved:
> profile _is_ sourced - but unfortunately the alias is reseted to ksh
> defaults.

Aliases are a feature of the shell. This has nothing to do with CDE, as
aliases are NEVER propagated to non-shell children. Therefore, you must
use "export ENV=~/.kshrc" (or something similar in .dtprofile or
/etc/profile) to force the shell to read the aliases on startup.

  charles_slivkoff.vcf
< 1K Download
 
 
 

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

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)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

2. Q: will there be a mklinux release for x86?

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

4. appletalk startup errors.

5. /etc/profile not executed when using CDE ?

6. Access remote CD/Floppy

7. /etc/profile not read by CDE?

8. Boot disk problem.

9. root can not edit /etc/hosts or /etc/profile, can not create directory

10. Why does CDE not source .profile?

11. "Screen" prgram: New shells won't read /etc/profile or ~/.profile?

12. zsh not sourcing /etc/profile?

13. xdm : /etc/profile not sourced?