- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- terminal session in CDE
Operating System - HP-UX
1823144
Members
3581
Online
109647
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-29-2002 12:43 AM
тАО01-29-2002 12:43 AM
Hi,
I'd like to know where terminal sessions started from CDE are initialized, this is, is there any kind of .profile for those sessions?
TIA
I'd like to know where terminal sessions started from CDE are initialized, this is, is there any kind of .profile for those sessions?
TIA
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-29-2002 12:54 AM
тАО01-29-2002 12:54 AM
Re: terminal session in CDE
Not sure what you mean terminal sessions but if you mean dtterms,hpterms and xterms launched from either a CDE icon/action or from a commmand line then the following may help :
none of the above Xclients/terminal emulators source the users .profile by default :
to do so you would need to either run them using -ls as an additional command line arg or vi $HOME/.Xdefaults and add :
*loginShell : True
eg
dtterm*loginShell : True
and then log out and back in again for the change to take effect.
see man dtterm etc for details.
none of the above Xclients/terminal emulators source the users .profile by default :
to do so you would need to either run them using -ls as an additional command line arg or vi $HOME/.Xdefaults and add :
eg
dtterm*loginShell : True
and then log out and back in again for the change to take effect.
see man dtterm etc for details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-29-2002 01:43 AM
тАО01-29-2002 01:43 AM
Re: terminal session in CDE
In CDE the $HOME/.dtprofile is used to initialize your environment.
In .dtprofile you can set DTSOURCEPROFILE=true and the CDE session will also source your .profile (or .login).
By default this is not done.
Read the comments in .dtprofile and change your .profile as requested before you allow CDE to source your .profile.
This is important, because if CDE detects errors during sourcing your .profile the login will fail. Then you have to use a failsafe session and fix the errors in your .profile.
Hardy
In .dtprofile you can set DTSOURCEPROFILE=true and the CDE session will also source your .profile (or .login).
By default this is not done.
Read the comments in .dtprofile and change your .profile as requested before you allow CDE to source your .profile.
This is important, because if CDE detects errors during sourcing your .profile the login will fail. Then you have to use a failsafe session and fix the errors in your .profile.
Hardy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-29-2002 02:11 AM
тАО01-29-2002 02:11 AM
Solution
The 2 methods listed above are different :
How to enable profile execution Per-UserSession
To enable $HOME/.profile or $HOME/.login execution for ONE user ONCE during the login process:
Create or modify : $HOME/.dtprofile
Find the following line to the end of this file :
DTSOURCEPROFILE=true
If the comment character "#" is removed, Xsession will source the $HOME/.profile (or $HOME/.login) file for the CDE session as a whole.
ie THE CDE SESSION / SHELL BUT if you open a dttermthis is a new shell and won't inherit envs etc listed in the .profile ! see eblow for detailed info :
How to enable profile execution Per-Terminal
Preliminarily, make changes to /etc/profile and $HOME/.profile such that when the user telnets or rlogins to the system, the environment is set as needed
To profile execution on ALL terminal emulators for ALL users:
Create or modify : /etc/dt/config/C/sys.resources
Add the following line to the end of this file :
*loginShell: True
Per-User Customization:
To profile execution on ALL terminal emulators for ONE user:
Create or modify : $HOME/.Xdefaults
Add the following line to the end of this file:
*loginShell: True
Per-Application Customization:
Create or modify : /etc/dt/app-defaults/Dtterm
Add the following line to the end of this file:
*loginShell: True
-- Or --
Create or modify : /etc/dt/appconfig/types/C/dt.dt
Add or modify the Dtterm entry to use the "-ls" command line option:
ACTION Dtterm
LABEL Terminal
ARG_COUNT 0
ICON Dtterm
TYPE COMMAND
WINDOW_TYPE NO_STDIO
EXEC_STRING /usr/dt/bin/dtterm -ls
DESCRIPTION The Terminal (Dtterm) action runs the desktop
Terminal Emulator application.
NOTE: These changes will take effect with the next login to CDE.
The $HOME/.Xdefaults file is sourced by CDE on login and any valid X Windows resources are incorporated into that CDE login session resources. The "loginShell" resource gets passed to applications and the terminal window applications interpret this and start login shells each time a terminal window is started. Login Shells by definition source the .profile or .login files.
The "*loginShell" resource will configure the terminal emulators (dtterm, hpterm, xterm) to behave as if the user had telnet-ed or rlogin-ed to the system.
This means that the default sequence of reading /etc/profile, etc. will occur each time a terminal window is opened.
The environment in the shell window will NOT be the same as that of the CDE session (dtsession).
From the dtterm man page:
-ls Start a login shell (the first character of argv[0] is a
dash), indicating to the shell that it should read the system's
profile and the user's .profile files (for ksh(1) and sh(1)), or
the system's csh.login, and the user's login. (for csh(1)).
How to enable profile execution Per-UserSession
To enable $HOME/.profile or $HOME/.login execution for ONE user ONCE during the login process:
Create or modify : $HOME/.dtprofile
Find the following line to the end of this file :
DTSOURCEPROFILE=true
If the comment character "#" is removed, Xsession will source the $HOME/.profile (or $HOME/.login) file for the CDE session as a whole.
ie THE CDE SESSION / SHELL BUT if you open a dttermthis is a new shell and won't inherit envs etc listed in the .profile ! see eblow for detailed info :
How to enable profile execution Per-Terminal
Preliminarily, make changes to /etc/profile and $HOME/.profile such that when the user telnets or rlogins to the system, the environment is set as needed
To profile execution on ALL terminal emulators for ALL users:
Create or modify : /etc/dt/config/C/sys.resources
Add the following line to the end of this file :
*loginShell: True
Per-User Customization:
To profile execution on ALL terminal emulators for ONE user:
Create or modify : $HOME/.Xdefaults
Add the following line to the end of this file:
*loginShell: True
Per-Application Customization:
Create or modify : /etc/dt/app-defaults/Dtterm
Add the following line to the end of this file:
*loginShell: True
-- Or --
Create or modify : /etc/dt/appconfig/types/C/dt.dt
Add or modify the Dtterm entry to use the "-ls" command line option:
ACTION Dtterm
LABEL Terminal
ARG_COUNT 0
ICON Dtterm
TYPE COMMAND
WINDOW_TYPE NO_STDIO
EXEC_STRING /usr/dt/bin/dtterm -ls
DESCRIPTION The Terminal (Dtterm) action runs the desktop
Terminal Emulator application.
NOTE: These changes will take effect with the next login to CDE.
The $HOME/.Xdefaults file is sourced by CDE on login and any valid X Windows resources are incorporated into that CDE login session resources. The "loginShell" resource gets passed to applications and the terminal window applications interpret this and start login shells each time a terminal window is started. Login Shells by definition source the .profile or .login files.
The "*loginShell" resource will configure the terminal emulators (dtterm, hpterm, xterm) to behave as if the user had telnet-ed or rlogin-ed to the system.
This means that the default sequence of reading /etc/profile, etc. will occur each time a terminal window is opened.
The environment in the shell window will NOT be the same as that of the CDE session (dtsession).
From the dtterm man page:
-ls Start a login shell (the first character of argv[0] is a
dash), indicating to the shell that it should read the system's
profile and the user's .profile files (for ksh(1) and sh(1)), or
the system's csh.login, and the user's login. (for csh(1)).
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP