Results 1 to 4 of 4
ok i need to create a startup script to run when this user logs in that would set the term variable to vt100 and export it. it will also echo ...
- 03-30-2008 #1Just Joined!
- Join Date
- Mar 2008
- Posts
- 5
creating log in script for a specific user
ok i need to create a startup script to run when this user logs in that would set the term variable to vt100 and export it. it will also echo hello, $logname at the command prompt.
i have created a .profile with this in it
however, when i log in the user it does not do the echo.Code:export $TERM = "vt100" echo Hello, $LOGNAME
- 03-30-2008 #2
rgfirefly24, I posted this in your other thread but I'll put it here too in case you missed it.
Try changing the first line to:
Code:export TERM=vt100
- 03-30-2008 #3Linux User
- Join Date
- Jun 2007
- Posts
- 318
Is bash the login shell for the account? If so the bash manpage says:
When bash is invoked as an interactive login shell, or as a non-inter-
active shell with the --login option, it first reads and executes com-
mands from the file /etc/profile, if that file exists. After reading
that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.pro-
file, in that order, and reads and executes commands from the first
one that exists and is readable.
So if .bash_profile or .bash_login exists then your .profile won't be executed.
- 03-31-2008 #4Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
Note also that it's only for *login* shells. Which means that this will not be run on an xterm unless you explicitly pass the --login option. In those cases, the right file is ~/.bashrc.
With some exceptions, most stuff under ~/.bash_profile will not be problematic on ~/.bashrc, so, some people just created one of these files, and symlink it to the other.


Reply With Quote
