Operating System - HP-UX
1753797 Members
8745 Online
108805 Solutions
New Discussion юеВ

How to do a "source .login" when starting a X terminal

 
SOLVED
Go to solution
Miguel Silva Rentes
Regular Advisor

How to do a "source .login" when starting a X terminal

Hi everyone!

When I start a X terminal in a HP-UX 11.23 (rx2660 server) I noticed that all definitions and environment variables that are set in my .login are not loaded, only if I do a "source .login" is when I get them loaded.

How can I make a X terminal to load my .login file right from the start?

Best regards,

Miguel Rentes
4 REPLIES 4
Alex Glennie
Honored Contributor

Re: How to do a "source .login" when starting a X terminal

either user xterm -ls (forces it to read .profile etc) or set in $HOME/.Xresources

eg :
*loginShell: True
Pedro Cirne
Esteemed Contributor

Re: How to do a "source .login" when starting a X terminal

Hi Miguel,

Just type:

#xterm -ls

Boa sorte!

Pedro
Bill Hassell
Honored Contributor
Solution

Re: How to do a "source .login" when starting a X terminal

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 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.


Bill Hassell, sysadmin
Miguel Silva Rentes
Regular Advisor

Re: How to do a "source .login" when starting a X terminal

Thanks for your help!

Doing a

echo "*loginShell: true" >> $HOME/.Xdefaults


followed by a logout/login worked and solved my problem!

Best regards,

Miguel Rentes