Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically Executing .PROFILE when using XTERM

oradba
Occasional Contributor

Automatically Executing .PROFILE when using XTERM

How can I automatically execute .PROFILE when I open up a new XTERM window.

I am using Korn Shell.
10 REPLIES
Sridhar Bhaskarla
Honored Contributor

Re: Automatically Executing .PROFILE when using XTERM

Hi,

Add -ls option to xterm.

$xterm -ls

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Michael Tully
Honored Contributor

Re: Automatically Executing .PROFILE when using XTERM

Let's add something extra to Sridhar's suggestion. This opens a new session window and you can still use the existing one.

$ xterm -ls +sb -sl 20s -title hostname &

also for more options to experiment with:

$ xterm -help
Anyone for a Mutiny ?
Brian M Rawlings
Honored Contributor

Re: Automatically Executing .PROFILE when using XTERM

You may need to edit your .dtprofile to uncomment the last line:

DTSOURCEPROFILE=true

This will cause CDE to source your .profile after it has run .dtprofile and set up your CDE environment.
We must indeed all hang together, or, most assuredly, we shall all hang separately. (Benjamin Franklin)
Michael Tully
Honored Contributor

Re: Automatically Executing .PROFILE when using XTERM

Regardless of whether your using xterm or dtterm, you don't have to uncomment the line in the .dtprofile file. The '-ls' option both 'xterm' and 'dtterm' will bypass the .dtprofile file. Have a look at the man pages for both 'xterm' and 'dtterm' or 'xterm -help' or 'dtterm -help'
Anyone for a Mutiny ?
Wodisch
Honored Contributor

Re: Automatically Executing .PROFILE when using XTERM

Hi,

how about using your "$HOME/.Xdefaults" text file and include a line like:
XTerm*loginShell: true
XTerm*background: white
XTerm*foreground: black

Next time your login graphically (CDE) is should work (if you're in a "fail safe" session it should work immediately). The colours are only to show that this is working.
If you don't want to logoff/login you can "merge" the new contents of your ".Xdefaults" with:
xrdb -merge $HOME/.Xdefaults

The next "xterm" you start (regardless of "-n" options) it should *contain* a login shell, and show black characters on white...

FWIW,
Wodisch
Lino Martinez
Contributor

Re: Automatically Executing .PROFILE when using XTERM

Edit your $HOME/.dtprofile to uncomment the last line:

DTSOURCEPROFILE=true



Leon Allen
Regular Advisor

Re: Automatically Executing .PROFILE when using XTERM

Bravo!

This is fantastic!

Such a simple thing..and so useful!!
Thanks all!
Time's fun when your having flys (ancient frog saying)
Leon Allen
Regular Advisor

Re: Automatically Executing .PROFILE when using XTERM

Bravo!

This is fantastic!

Such a simple thing..and so useful!!
Thanks all!
Time's fun when your having flys (ancient frog saying)
Leon Allen
Regular Advisor

Re: Automatically Executing .PROFILE when using XTERM

Bravo!

This is fantastic!

Such a simple thing..and so useful!!
Thanks all!
Time's fun when your having flys (ancient frog saying)
Leon Allen
Regular Advisor

Re: Automatically Executing .PROFILE when using XTERM

Bravo!

This is fantastic!

Such a simple thing..and so useful!!
Thanks all!
Time's fun when your having flys (ancient frog saying)