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

Re: A .profile puzzle



Gene Heskett wrote: 
> 
> The local electrical system, while better than Haiti's is getting to be a 
> nuisance with 5 second power failures about weekly, or is that weakly?

That's a great case for a UPS...

> 1. Before the latest failure I could do all this as me because the mount 
> point for the card is in my home directory, I own it all. And didn't 
> have to be root to do any of it.  This was not fixed by a 2nd reboot.

Are you mounting via /etc/fstab? If so, show us the line.


> 2. and another pesky thing is starting a konsole to do work, needs a 
> $PATH modification that we used to put in ~.profile. But opening a 
> terminal hasn't called a ". .profile" since about jessie.  So thats 
> another PITA.
> 
> So, what has replaced .profile as the function for such as that in recent 
> releases?

I'm guessing that your shell is /bin/sh. That used to be bash,
but now it's dash.

You could make your own shell bash -- just run chsh and log out,
then come back in again.

Note that .profile is supposed to be read only by a login
shell, whereas .bashrc will be read by every interactive shell.
Here's the chunk of man bash:

       When bash is invoked as an interactive login shell, or as a
 non-interactive shell with the --login option, it first reads and
 executes commands from the file /etc/profile, if that file exists.
 After reading that file, it looks for ~/.bash_profile, ~/.bash_login,
 and ~/.profile, in that or der, and reads and executes commands from the
 first one that exists and is readable.  The --noprofile option may be
 used when the shell is started to inhibit this behavior.
 
        When an interactive login shell exits, or a non-interactive
 login shell executes the exit builtin command, bash reads and executes
 commands from the file ~/.bash_logout, if it exists.
 
        When an interactive shell that is not a login shell is started,
 bash reads and executes commands from /etc/bash.bashrc and ~/.bashrc, if
 these files exist.  This may be inhibited by using the --norc option.
 The --rcfile file option will force bash to read and execute commands
 from file instead of /etc/bash.bashrc and ~/.bashrc.

        When bash is started non-interactively, to run a shell script,
 for example, it looks for the variable BASH_ENV in the environment,
 expands its value if it appears there, and uses the expanded value
 as the name of a file to read and execute.  Bash behaves as if the
 following command were executed: if [ -n "$BASH_ENV" ]; then .
 "$BASH_ENV"; fi but the value of the PATH variable is not used to search
 for the filename.


-dsr-


Reply to: