.bash_profile Ignored

Asked by Jonathan Anderson

On a new Ubuntu 6.06 server, logging into the server (locally or remotely) results in my ~/.bash_profile being ignored. I can "source .bash_profile" after I log in, but it isn't done automatically.

"source .bash_profile" works (my prompt and aliases are set up correctly), but I do get an error message:

-sh: `_debconf-show': not a valid identifier

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Jonathan Anderson
Solved:
Last query:
Last reply:
Revision history for this message
Not anymore (printkioatic) said :
#1

Hello Jon,
Could you please paste or attach your .bash_profile file? Also could you paste the output of this command for me:
"sudo cat /etc/passwd | grep ^jon"

^^ NOTE: Replace "jon" with your actual username of course.

Best regards,
Jayson Vaughn

Revision history for this message
Jonathan Anderson (jonathan-anderson) said :
#2

Sorry that I never did this... I must have missed the e-mail.

Anyway, I can post my .bash_profile, but remember that "source .bash_profile" works.

Anyway, here's my line in /etc/passwd:

--
jon:x:1001:100:Jonathan Anderson,EN4031,(709) 737-3527,:/home/jon:/bin/sh
--

Here's my .bash_profile:

--
# ~/.bash_profile: executed by bash(1) for login shells.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/login.defs
#umask 022

# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
    source ~/.bashrc
fi

# set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then
    PATH=~/bin:"${PATH}"
fi
--

And, just for good measure, /etc/profile:

--
#/etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "$PS1" ]; then
  if [ "$BASH" ]; then
    PS1='\u@\h:\w\$ '
    if [ -f /etc/bash.bashrc ]; then
        . /etc/bash.bashrc
    fi
  else
    if [ "`id -u`" -eq 0 ]; then
      PS1='# '
    else
      PS1='$ '
    fi
  fi
fi

umask 002
--

Revision history for this message
Dean Sas (dsas) said :
#3

Hi Jon, I don't know that this is the answer to your problem, but you probably want to explicitly set your shell to be /bin/bash

Otherwise you may have any problems if you ever upgrade to a newer release.

Please let us now how that goes.

Revision history for this message
Best Jonathan Anderson (jonathan-anderson) said :
#4

Look at that... my shell was set to /bin/sh (which, I guess, points to /bin/dash). That's really weird.

Well, thanks... that fixed it.

Revision history for this message
Jonathan Anderson (jonathan-anderson) said :
#5

Ack! I marked my reply as "best answer"... how do I undo this? I'd like to give credit where credit's due.

Revision history for this message
Dean Sas (dsas) said :
#6

Jon, I don't know whether or not you can. Don't worry about it :) I help out to help people.

Revision history for this message
mattwitz11 (mattwitz11) said :
#7

In the gnome terminal do this
Edit -> Profile Preferences click on Titles and command, and check mark "Run command as login shell" then my .bash_profile was read