• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

autoexec.bat for user

chrbr

Aspiring Daemon

Thanks: 224
Messages: 623

#2
I do not know by heart if there is one specific in the users home directory which is called independently of the login shell. I am quite sure you fill find ~/.profile or ~/.login or others which call fortune(6) by default. You can do similar things to achieve your specific goals.
 

ralphbsz

Daemon

Thanks: 609
Best answers: 3
Messages: 1,058

#3
Depends on the shell. You need to read the man pages of the shell you use; in bash it is .profile and/or .bashrc and/or .bash_login, and it tcsh it is .cshrc and/or .tcshrc and/or .login. Note that these files are not all equivalent, and are executed in different situations. Look at the documentation.

When playing with these files: make sure you have another login that allows you to regain access to the machine if you screw up; if you have a terrible error in these files, it might become impossible to log in. Also make sure that the commands that are used for non-interactive shells are very fast and don't create unnecessary output.
 

aragats

Aspiring Daemon

Thanks: 345
Messages: 867

#4
There are too many variables: "invisible" program or a GUI app, executed once or at every terminal the user log in, whether the program keeps running in the background or performs a short action, etc. You should consider all possible consequences.
 

OJ

Daemon

Thanks: 253
Messages: 1,038

#5
How do I run a specific program for a given user when he has logged on?
The question is good, but does doing that really serve much purpose? Seems to me you can just put an icon on the desktop and the user can click that. This looks especially good if there are no other icons on the desktop.
 
Top