- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: HPUX 11i environment variables
Categories
Company
Local Language
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
Discussions
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
Community
Resources
Forums
Blogs
- 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
11-04-2009 11:28 AM
11-04-2009 11:28 AM
HPUX 11i environment variables
I am trying to set a permanent environment variable for all users. I have tried using export but once I close the dt term the variable goes away. I am using K shell.
Is there a profile or file I need to modify?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2009 11:40 AM
11-04-2009 11:40 AM
Re: HPUX 11i environment variables
Since you are using the Korn shell and want _all_ users to have common environmental variables, you can export them from '/etc/profile'. Then, to source (read) this, modify your '.dtprofile' to include the line:
DTSOURCEPROFILE=true
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2009 11:56 AM
11-04-2009 11:56 AM
Re: HPUX 11i environment variables
Some in .kshrc
Some in /etc/profile
Customization in .profile
Customization is sometimes needed. For example if all users do not use oracle, then all users do not need ORACLE_HOME set.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2009 01:51 PM
11-04-2009 01:51 PM
Re: HPUX 11i environment variables
I tried adding the variable to /etc/profile and now I am getting this error.
Warning! One or more of your selected locales are not available.
Please invoke the commands "locale" and "locale -a" to verify your
selections and the available locales.
Continuing processing using the "C" locale.
(specs@ACT01)[/home/specs] 367:
Even after I remove the variable from the /etc/profile.
-Help!!!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2009 06:53 PM
11-04-2009 06:53 PM
Re: HPUX 11i environment variables
export VAR1=abcd
export VAR2=xyz123
However, since you mentioned dterm, now you are using a very different environment, namely Xwindows. Your PC is running an Xwindows emulator and you are borrowing a copy of dterm from the server. dterm (and xterm and hpterm by default do not login so the dterm session doesn't run /etc/profile and then $HOME/.profile.
Unfortunately, the DTSOURCEPROFILE only run /etc/profile and skips .profile -- all because the dterm/xterm/hpterm programs do not run as login shells. To make xterm (and hpterm and dtterm) behave like a normal login, you must tell the terminal emulator to run a login shell. Do this by creating .Xdefaults in your $HOME directory (where the xterm is running) with this command:
echo "*loginShell: true" >> $HOME/.Xdefaults
Then close the xterm window and start it again. Now the program will login normally. This file can also set dozens of color and appearance options:
echo "*foreground: white" >> $HOME/.Xdefaults
echo "*background: navy" >> $HOME/.Xdefaults
See man xterm and man xrdb for more information about configuring xterm resources.
Now you can add the variables you need into /etc/profile and they will take effect for users. Note that is you have a special file with application or database variables, these must be 'sourced', that is run with the dot command as in:
. sybase.ksh
The dot is mandatory so that the variables 'stick' with the current login shell.
Bill Hassell, sysadmin