LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-22-2005, 03:13 AM   #1
Enigmatic_Desires
LQ Newbie
 
Registered: Jun 2005
Posts: 1

Rep: Reputation: 0
Red face how to add script files to /etc/csh.login


hi everyone,

i want to add my own script files to /etc/csh.login file so that my script files can automatically run each time i logon. I am beginner to linux , so can you plz give the exact command to add my own script file to /etc/csh.login file.

Thanking you in anticipation

regards

Muaz
 
Old 06-22-2005, 04:09 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
there is no "exact" command... just open it as root in whaichever test editor you want. are you honestly using csh though? If you don't even feel comfortable openning a text editor, i'd guess you're still using bash, not csh anyway.
 
Old 06-22-2005, 06:45 AM   #3
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
Ok the way i did it (not neccesarrily the best) on BASH was to

make my script - emacs (or whatever txt editor) <new file>

chmod it to be read/write/executable by yourself - chmod 744 or whatever permissions you need to set (must be read/executable by user though)

Move/link/copy it into a directory in your path (i find it easier than using paths in the .bash_profile) cp script.sh /usr/bin/script.sh etc.

add the script name to your CSH profile config, are you sure you want /etc/csh.login? seems to me that's global for all users, there should be one in your home directory for just you.

Apologies if any of the above doesn't work, am on my work computer running windows 2k and am quite new myself
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Script for csh or bash unihiekka Programming 5 10-15-2005 09:51 AM
csh script variables setting zz_s Programming 2 12-04-2004 06:55 AM
how do you set an env variable from within a csh script? BrianK Linux - General 3 05-26-2004 02:16 PM
running a csh-script from desktop with 1-click ? jdaniel Linux - General 3 10-06-2003 09:35 AM
newgrp command within perl/csh script bobsey Programming 1 04-13-2001 10:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration