It is currently Sat, 21 Sep 2019 03:04:28 GMT



 
Author Message
 /etc/profile not executed when using CDE ?
I am new to AIX !
I use AIX 4.2.1 with CDE.
When I connect to the computer whith rlogin, the file /etc/profile is
executed, and the line :
alias ll='ls -la'
is ok for evrybody !
But when i connect whith CDE, the file /etc/profile is NOT executed !!!
Why ? and what can I do ?

Thank you to help me

Jean-Marc Lhabitant form Belfort, France



 Sat, 15 Sep 2001 03:00:00 GMT   
 /etc/profile not executed when using CDE ?
Jean-Marc
You need to edit your .dt profile and uncomment the last line that says

SOURCEPROFILE=TRUE

Martin



 Sat, 15 Sep 2001 03:00:00 GMT   
 /etc/profile not executed when using CDE ?
Look to the comments in the last lines of $HOME/.dtprofile


 Sat, 15 Sep 2001 03:00:00 GMT   
 /etc/profile not executed when using CDE ?
I still have uncommented the last line of my .dtprofile, and, as I said, my
.profile and /etc/profile (which is for everyone) are executed when I do a
rlogin.
But the problem is, when I connect thru CDE, the file /etc/profile is not
executed, and uncommenting the last line of my .dtprofile do not affect
anything !!!
 I hope I am clear ;-) (as my poor english !)

Still with my problem !

Martin Parker a crit:



 Sun, 16 Sep 2001 03:00:00 GMT   
 /etc/profile not executed when using CDE ?
: I still have uncommented the last line of my .dtprofile, and, as I said, my
: .profile and /etc/profile (which is for everyone) are executed when I do a
: rlogin.
: But the problem is, when I connect thru CDE, the file /etc/profile is not
: executed, and uncommenting the last line of my .dtprofile do not affect
: anything !!!
:  I hope I am clear ;-) (as my poor english !)

: Still with my problem !

: Martin Parker a crit:

: > Jean-Marc
: > You need to edit your .dt profile and uncomment the last line that says
: >
: > SOURCEPROFILE=TRUE
: >
: > Martin
: > >When I connect to the computer whith rlogin, the file /etc/profile is
: > >executed, and the line :
: > >alias ll='ls -la'
: > >is ok for evrybody !
: > >But when i connect whith CDE, the file /etc/profile is NOT executed !!!
: > >Why ? and what can I do ?
: > >

CDE does not execute /etc/profile on purpose because it could not
guarantee that the commands in that file would be safe to run in the
desktop environment.  The comments in .dtprofile give a general
description of what kinds of commands are not "safe", such as commands
that try to change tty device settings.  CDE provides an alternate place
to put scripts that a site wants executed at login time.  Any scripts
that are stored in the directory  /etc/dt/config/Xsession.d  will be
sourced when a user logs in under CDE.  They will be executed more or
less in the order that the "ls" command would list them.  It is your
responsibility to be sure that the commands in these scripts are desktop
"safe".

/etc/profile is still used for non-CDE logins.  If you don't like
maintaining your customization in two places, you might want to
just have /etc/profile source the appropriate scripts out of
/etc/dt/config/Xsession.d .



 Sun, 16 Sep 2001 03:00:00 GMT   
 /etc/profile not executed when using CDE ?
and even that ONLY has YOUR .profile execute.

--
Norman Levin
vm/dynAmIX inc.



 Sun, 16 Sep 2001 03:00:00 GMT   
 /etc/profile not executed when using CDE ?

You can follow the directions in $HOME/.dtprofile

--
Doing AIX support was the most monty-pythonesque
activity available at the time.



 Sun, 16 Sep 2001 03:00:00 GMT   
 /etc/profile not executed when using CDE ?
In article <3700DED3.CE0CB...@cnet.francetelecom.fr>, Jean-Marc Lhabitant

Try adding this line to ~/.Xdefaults.

*loginShell:    True

Ross

--
Dr. Ross Bogue                       email: rbo...@phy.ilstu.edu
Physics Department
Illinois State University



 Mon, 17 Sep 2001 03:00:00 GMT   
 /etc/profile not executed when using CDE ?
In comp.unix.aix, Norman Levin<normanle...@ibm.net> wrote:

If there is a FAQ list being kept by anyone, this question, "How can I
get CDE to run my .profile at startup?", should be in it.

Here is how I got this to work at my installation.

CDE looks in two hierarchies when it starts up, /usr/dt/config and
/etc/dt/config.  All local mods should be put in /etc/dt/config.
One of the directories that may exist under /etc/dt/config is the
Xsession.d directory; if it does, then the startup script, Xsession,
will look in there and source any scripts it finds, sorting them in
alphanumeric sequence.  Thus, any scripts you put in there should be named
"0000.firstname", "0001.nextname", and so on, in order to ensure they run
in the correct order.  I have four scripts in mine, named "0000.environ",
"0001.profile", "0002.userprof", and "0004.motd".  I will only discuss
the first three here (the fourth does what you might imagine, displaying
the contents of /etc/motd to the user).

Here is the contents of the 0000.environ script:
-----------------------------------------------------------
#/bin/ksh
#
# Source /etc/environment
envvars=`/usr/bin/egrep -v '^#|^$|^ |^   ' /etc/environment`
export $envvars
unset envvars
-----------------------------------------------------------

The characters between the apostophes (NOT the backticks!) are caret,
hash, pipe, caret, dollar, pipe, caret, space, pipe, caret, tab.  I spell
this out because some of them may get garbaged somehow.  This expression
will filter out any lines in /etc/environment that are comments, empty
(that is, just a newline), or begin with spaces or tabs (these last are
not supposed to be in /etc/environment).  Everything else is assigned
to the variable "envvars" and exported into the dtlogin shell.

Here is the contents of 0001.profile:
-----------------------------------------------------------
#/bin/ksh
#
# Source /etc/profile

. /etc/profile

# Set DTSOURCEPROFILE true for everyone
DTSOURCEPROFILE=true
-----------------------------------------------------------

This is pretty straightforward.  The only thing additional it does is
ensure that DTSOURCEPROFILE is set on so that any .dtprofile in the
user's home directory will be run at session startup.

Finally, the contents of 0003.userprof:
-----------------------------------------------------------
#!/bin/ksh

# sigh.  Run the user's .profile if it exists.

if [ -f $HOME/.profile ]
then
    DTLOGIN=dtlogin
    . $HOME/.profile
    export PATH
    unset DTLOGIN
fi
-----------------------------------------------------------

This sources the user's .profile if it exists.  It also sets an
environment variable "DTLOGIN" as a signal that the login is occurring
through dtlogin, rather than, e.g., through a telnet shell login, so
that the user may do different things in his .profile depending on how
he is being logged in.  The reason for the "export PATH" is to assure
that any changes the user makes to his PATH environment variable are
propagated to the dtlogin environment.

Of course, all these scripts need to have the execute bit set on for
all users (r-xr-xr-x) and should be owned and only writable by root.

As a bit of lagniappe, here is the 0004.motd script:
-----------------------------------------------------------
#!/bin/ksh

#
#  This is a kludge to make sure that users
#  will get a copy of /etc/motd displayed
#  when their sessions start.
#

# First check for $HOME/.dt/sessions/current/dt.session.
# If yes, check it for the string 'dtsmcmd..*motd'
# If not there, append the appropriate dtsmcmd line to the file.
# If $HOME/.dt/sessions/current/dt.session doesn't exist,
# check and do all the same things for $HOME/.dt/sessions/home.

if [ -w $HOME/.dt/sessions/current/dt.session ]
then
    egrep 'dtsmcmd..*motd' $HOME/.dt/sessions/current/dt.session \
    >/dev/null 2>&1
    if [ $? -ne 0 ]
    then
        file="$HOME/.dt/sessions/current/dt.session"
    fi
elif [ -w $HOME/.dt/sessions/home/dt.session ]
then
    egrep 'dtsmcmd..*motd' $HOME/.dt/sessions/home/dt.session \
    >/dev/null 2>&1
    if [ $? -ne 0 ]
    then
        file="$HOME/.dt/sessions/home/dt.session"
    fi
fi

if [ -n "$file" ]
then
    cat <<'EOF' >>$file
dtsmcmd -cmd "/usr/local/bin/xmessage -geometry -0+0 -file \
/etc/motd -default okay -title Message\ of\ the\ Day"
EOF
    unset file
fi
-----------------------------------------------------------

This has a dependency on the existence of the "xmessage" utility, but
I'm sure that all enterprising sysadmins have this package installed,
right?  BTW, you may need to remove the "\" at the end of the line
shortly preceding the "EOF", above, in order for it to work properly.
It was added here so that no lines would be too long for news readers.

--
Shane Castle             | "Perfection, then, is finally achieved, not
Boulder County Info Svcs | when there is nothing left to add, but when
Boulder CO USA           | there is nothing left to take away."
                         |                - Antoine de Saint-Exupry



 Mon, 17 Sep 2001 03:00:00 GMT   
 
   [ 9 post ] 

Similar Threads

1. root's .profile does not get automatically executed under CDE

2. /etc/profile is not executed

3. xdm does not execute /etc/profile!

4. /etc/profile not executing for KDE

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

6. /etc/profile not read by CDE?

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

8. ksh not reading /.profile or /etc/profile

9. Not reading /etc/profile or .profile

10. CDE & bash, how to execute .profile


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software