1847257 Members
5547 Online
110263 Solutions
New Discussion

Re: .profile

 

.profile

I don't know How to .profile Works.

I Want to Know How to use .profile in X terminal.

Thanks
Pleasure it.
6 REPLIES 6
Stefan Farrelly
Honored Contributor

Re: .profile


.profile is a list of commands to be run when a user logs in. Create it in their home directory and when they login using rlogin or telnet it will execute the commands in their .profile.

From an X-terminal when you start a new terminal window, either hpterm or dtterm, add on the -ls option and it will run their .profile when it starts, eg. dtterm -ls or hpterm -ls
Im from Palmerston North, New Zealand, but somehow ended up in London...
Vikas Khator
Honored Contributor

Re: .profile

Hi ,

To add to the above reply :If you are using CDE then remember to uncomment the line
#DTSOURCEPROFILE=TRUE

Regards,
Vikas
Keep it simple
Alex Glennie
Honored Contributor

Re: .profile

Stefan seems to have covered it except vi $HOME/.Xdefaults
add following resource :

Dtterm*loginshell : True

or Hpterm or Xterm whichever applies ...it'll save you having to run -ls on the command line, but only takes effect once a new Xsession takes place(logout & back in again to activate in other words).

Re: .profile

I think that missed the point.
Sorry.

Pleasure it.
Antoanetta Naghiu
Esteemed Contributor

Re: .profile

Try to see .profile as autoexec.bat in the old DOS (a clittle combined with CONFIG.SYS). Every time when start working with that machine, autoexec.bat it was executed. Same here. But you could execute autoexec.bat even after login (power on on DOS) from the command line. Same here, you can execute your .profile from the command line. Considering the user is just by himself in the system and wants to setup his own environment, sometime even to execute same commands at the very beginning (ex. in autoexec.bat, I used to start nc (Norton Commander).
.profile is doing the same. It is going to setup some environment variable eventually executes some external commands.
For each shell that a Unix user can work in, there are diferent shell internal commands, and depends on which terminal are you using, you need to setup one or other environment variable, to one value or another one.
To make easier your work, there are default profiles (see /etc/skel), that you can copy in user's home directory and customise it. (delete, add, as per your needs).
For using it X, for understanding each variable what mean, use man commands and manual for X.
You need to know a little bit of shell scripting to enjoy playing with this, but a overall understanding will be able to have base on man and docs.

Re: .profile

Thanks Everybody.

I understand dtterm -ls etc.

And I can tell a little bit of .profile.
I think I should not use this file with
CDE system.

So I think Path, etc is .dtprofile is used.
Maybe.

Thanks.
Pleasure it.