[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: .bash_profile and .bashrc not executing



John Salmon wrote:
Martin Marcher <martin@marcher.name> wrote in
news:9KVsV-3hn-11@gated-at.bofh.it:
On Saturday 12 January 2008 20:50 John Salmon wrote:

I'm a new user to Debian Linux. I have the latest version loaded on a
dedicated PC with all the default settings. I have added a ~/bin
directory to my system. My .bash_profile and .bashrc files were the
default files loaded during the install. However, my PATH remains
unchanged when I log on even though the .bash_profile file has the
lines to add my ~/bin directory. I can make the change manually after
I've logged on and can execute files that are in that directory.
Also, the aliases set in my .bashrc file don't work. As a check, I've
set environment variables in both files and they return null with
echo after logging on. I haven't tried re-installing the system from
scratch.
Any suggestions?
you did re-login after the changes did you? (i think "bash -l" also
behaves like a full re-llogin)

hth
martin


Yes, I did. In fact, I also tried re-booting the system.

Another thing, I tried to run ~/.bash_profile and got "\bash: /home/johns/.bash_profile: Permission denied" (johns is me). ls -al shows .bash_prfile access has no execute permission set.


John,

I recently posted a rather long description of how the shell deals with files, whether executable (binary or scripts) or "sourced".

Bottom line, if the shell knows the name of the file and that the file is a script, it needs then to be able to read it.

You did not post the ls -l output, so I can't say if permissions might be the issue or not. The first field of ls -l should be at least a dash followed by the letter 'r', followed by either a dash or 'w', etc.

You also didn't say whether you're login is from the GUI (xdm, kdm, gdm) or from a console in text mode.

If you logged in using the GUI, you should switch to a console and do a text mode login to see if you get any error messages from the shell. Or, from a shell window after the GUI login, you can use 'bash -l' at the command prompt, as suggested above, to start a new shell that acts like a login shell.

If any errors are reported, that is the likely cause of your problem, since the shell will abort processing the startup files when an error is found.

--
Bob McGowan

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Reply to: