/home/.login file

Linux, BSD, UNIX and all other operating systems not covered in other sub-forums.

Moderators: Edward, jubalj, Pu7o

/home/.login file

Postby jodene » Tue 21 Oct, 2003 10:53 am

Hi, I'm trying to put a .login file in my home directory to set some paths. I have copied the csh.login file to my home directory and edited it. Then, I changed it's name to .login and now, although I can edit the file with vi, the file is no longer listed when I use dir or ls to see what's in my home directory. Also, the file does not seem to be read when I log out and then on again because the paths are not set. Any help would be appreciated!

Thanks!
Jodene
UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
Be a nice person and see if it works.
jodene
new member
new member
 
Posts: 1
Joined: Tue 21 Oct, 2003 10:48 am

Postby jubalj » Wed 22 Oct, 2003 6:44 am

Hey Jodene,

.login is not visible when you ls because in linux files preceeded with a '.' are considered to be hidden files. If you want to see all the '.'files in your home directory you need to use the '-a' parameter with ls (ls -a)

I cant understand why you wouldnt see it if you relogged in. Are you sure you are using csh as your default shell (set in /etc/passwd) [different shells use login scripts see: http://www.ia.pw.edu.pl/js/os/w04.pdf]. Try inserting the command 'fortune' into .login (or uptime or uname -a if you dont have fortune installed), might give you a better idea if the scipt is being execute.

Jubal

Edit:fixed typos
UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031019
jubalj
Moderator
Moderator
 
Posts: 23
Joined: Tue 29 Jul, 2003 10:14 pm
Location: Auckland, NZ


Return to Linux and Other OSes

Who is online

Registered users: Google [Bot]