Execute script after FreeBSD is rebooted

I have set the env in the .cshrc file to "nano". When i reboot the system and type in "crontab -e" the crontab will be open by "vi".
What have i made wrong?
 
EDITOR: Undefined Variable

So i set the editor var again with setenv EDITOR /usr/locale/bin/nano and checked again. Now the output is:

/bin/sh /usr/locale/bin/nano

After a reboot the output is again:

EDITOR: Undefined Variable
 
I have changed the /root/.cshrc and the /.cshrc file. The env variable is still not set after a reboot.
 
Login with the user name of the user who is executing crontab -e and put the following two lines at the end of the file .shrc and also at the end of the file .profile ...
Code:
export EDITOR=/usr/local/bin/nano
export VISUAL=/usr/local/bin/nano
Use the nano editor to make your changes by using these commands:
Code:
nano .shrc
nano .profile
Then enter the exit command at the command prompt to log out, because the changes won't take effect until you login again. Then login again as the same user name and execute the command crontab -e ... and you should find yourself using nano instead of vi or any other editor.
 
Then enter the exit command at the command prompt to log out, because the changes won't take effect until you login again.
No need to logoff. You can simply do source ~/.shrc or source ~/.profile. You can use the same command for the C shells too; source ~/.cshrc.
 
Back
Top