Weird interaction between gvm, .profile and lightdm Ubuntu 14.10

360 views Asked by At

Good morning everyone,

I have a strange interaction problem between gvm, my .profile and lightdm on Ubuntu 14.10.

The line that gvm puts at the end of .profile looks like this:

[[ -s "/home/clh/.gvm/bin/gvm-init.sh" ]] && source "/home/clh/.gvm/bin/gvm-init.sh"

It seems that lightdm, which I guess processes .profile upon login, doesn't like that line, for a popup during the login process states

/usr/sbin/lightdm-session: 25 /home/clh/.profile: [[ not found

To me this looks like lightdm is using sh and not bash to handle the test. It also seems like this must be a recent change because I have been using the gvm - lightdm combo for several months now and I just started noticing this in the last week or so.

Anyway, I have "fixed" this by changing my .profile so that the last line, put in by gvm, now looks like:

if [ -n "$BASH_VERSION" ]; then
    [[ -s "/home/clh/.gvm/bin/gvm-init.sh" ]] && source "/home/clh/.gvm/bin/gvm-init.sh"
fi

I say "fixed" because the popup message has gone away and gvm seems to run.

But if anyone else has any better ideas, I'm all ears...

0

There are 0 answers