Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am a grad student who has fallen into maintaining a server on a linux-Ubuntu machine - we work in Ontopia and Wandora, two programs that like to mess with Java environments. I am learning as I go which means I probably messed up something stupid; I believe I was trying to update the version of Java that was running on Ubuntu when I broke it.

The login page loads, I enter my password, it reloads. This happens for all users, guest, and test accounts. This happens in Ubuntu, Ubuntu2d, lubuntu and after the graphicx failsafe recovery business.

Logging in through the shell (after Alt F3) gives me:

-bash: export: 'HOME/bin' : not a valid identifier

but lets me navigate through the system and accounts with no other apparent problems. My .xsession-errors gives:

/etc/gdm/Xsession: 3: export: HOME/bin: bad variable name

when I enter which java I get:

/usr/lib/jvm/java-6-openjdk-amd64//bin/java

I could see how this might contribute to the problem, but I've no clue how to change this path [and can't find where to do so online].

My environment files includes CLASSPATH AND CATALINA_HOME variables that I don't think are relevant, as well as:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:"
JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64:/usr/lib/jvm/java-6-openjdk-amd64
JRE_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre:/usr/lib/jvm/java-6-openjdk-amd64/jre

Content of java.sh:

export JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64/
export PATH=$JAVA_HOME/bin:$PATH
export PATH=$PATH:$JAVA $HOME/bin

Content of /etc/bashrc:

# System-wide .bashrc file for interactive bash(1) shells.

# To enable the settings / commands in this file for login shells as well,
# this file has to be sourced in /etc/profile.

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, overwrite the one in /etc/profile)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

# Commented out, don't overwrite xterm -T "title" -n "icontitle" by default.
# If this is an xterm set the title to user@host:dir
#case "$TERM" in
#xterm*|rxvt*)
#    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
#    ;;
#*)
#    ;;
#esac

# enable bash completion in interactive shells
#if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
#    . /etc/bash_completion
#fi

# sudo hint
if [ ! -e "$HOME/.sudo_as_admin_successful" ] && [ ! -e "$HOME/.hushlogin" ] ; then
    case " $(groups) " in *\ admin\ *)
    if [ -x /usr/bin/sudo ]; then
    cat <<-EOF
    To run a command as administrator (user "root"), use "sudo <command>".
    See "man sudo_root" for details.

    EOF
    fi
    esac
fi

# if the command-not-found package is installed, use it
if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then
    function command_not_found_handle {
            # check because c-n-f could've been removed in the meantime
                if [ -x /usr/lib/command-not-found ]; then
           /usr/bin/python /usr/lib/command-not-found -- "$1"
                   return $?
                elif [ -x /usr/share/command-not-found/command-not-found ]; then
           /usr/bin/python /usr/share/command-not-found/command-not-found -- "$1"
                   return $?
        else
           printf "%s: command not found\n" "$1" >&2
           return 127
        fi
    }
fi

Content of ~/.profile:

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# 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/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
    . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi`
`
share|improve this question
    
Output of grep "HOME/bin" ~/.* /home/slis/.bash_history:CATALINA_HOME/bin/startup.sh /home/slis/.bash_history:CATALINA_HOME/bin/startup.sh /home/slis/.profile:if [ -d "$HOME/bin" ] ; then /home/slis/.profile: PATH="$HOME/bin:$PATH" /home/slis/.profile_back:if [ -d "$HOME/bin" ] ; then /home/slis/.profile_back: PATH="$HOME/bin:$PATH" /home/slis/.xsession-errors:/etc/gdm/Xsession: 3: export: HOME/bin: bad variable name /home/slis/.xsession-errors.old:/usr/sbin/lightdm-session: 3: export: HOME/bin: bad variable name Now what? –  LostintheWind Mar 14 '13 at 1:17
    
I'm going home, thanks for your input and I'll check back tomorrow :-) –  LostintheWind Mar 14 '13 at 2:08
    
.profile loads .bashrc, post its content too. –  Eric Carvalho Mar 14 '13 at 12:09

2 Answers 2

I think the problem is here:

/etc/gdm/Xsession: 3: export: HOME/bin: bad variable name

Edit /etc/gdm/Xsession (sudo nano /etc/gdm/Xsession) then go to line #3 and change HOME/bin to $HOME/bin.

share|improve this answer
    
ooh, nano is better than vi! Thanks for that...but There is no line with HOME/bin in my Xsession file :-( –  LostintheWind Mar 13 '13 at 22:48

you need to look at your dot files (eg if you use bash, it will be .bashrc, .bash_profile) for a export PATH=.... entry.

By the looks of it one of the entries will be HOME/bin change this to $HOME/bin, log out and back in and the error should go away

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.