Re: [Bug 962270] Re: /usr/sbin/lightdm-session: 34: [: Linux: unexpected operator

2012-07-06 Thread Barry Warsaw
On Jul 03, 2012, at 11:10 AM, Philippe Poilbarbe wrote:

/usr/sbin/lightdm-session is a script executed with /bin/sh (see shebang line
#!/bin/sh).  It sources $HOME/.profile (and some others), not
$HOME/.bash_profile.

This does make it rather impossible to set up the environment both for the
login session and for e.g. ssh or console logins without duplicating a lot of
code.  What's the rationale for using /bin/sh in lightdm by default?

So things specific to bash and not in sh are not recognized, for example:
if [[ $x == yes  || $y != no ]]
then
fi

must be written:
if [ $x == yes -o $y != no ]
then
fi

I don't have [[ in my .profile, but there are other syntactic subtleties that
make it difficult to share init files between lightdm and bash.

Another way to overide this is to modify /usr/sbin/lightdm-session: replace
/bin/sh by /bin/bash Everything wich is good for sh is good for bash (but
not the opposite).

Having to manually hack this file on every installed machine is definitely
suboptimal, not only because of the work involved, but also because an update
of lightdm will just clobber those changes.  Isn't there some less brittle way
we could arrange for lightdm to use bash?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/962270

Title:
  /usr/sbin/lightdm-session: 34: [: Linux: unexpected operator

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/962270/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 962270] Re: /usr/sbin/lightdm-session: 34: [: Linux: unexpected operator

2012-05-31 Thread Barry Warsaw
On May 31, 2012, at 03:25 AM, hamish wrote:

your line numbers are off by +3 (going from 53:
/home/barry/.bash_profile: source: not found), but still no a == b
bashisms or unquoted enviro variables that I can see...

which version is this?

I'm still seeing this in quantal.  From the top of my .xsession-errors
file:

/usr/sbin/lightdm-session: 34: [: Linux: unexpected operator
/usr/sbin/lightdm-session: 53: /home/barry/.bash_profile: source: not found

It's certainly weird because ~/.bash_profile does exist.

I can't see that any harm is occurring in quantal though.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/962270

Title:
  /usr/sbin/lightdm-session: 34: [: Linux: unexpected operator

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/962270/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 962270] Re: /usr/sbin/lightdm-session: 34: [: Linux: unexpected operator

2012-03-29 Thread Barry Warsaw
On Mar 29, 2012, at 07:02 PM, Sebastien Bacher wrote:

weird, that doesn't really make sense to me, l34 is XKB_IN_USE=yes,
how can that hit the error in the summary?

Exactly! :)

I can't explain it either.

-Barry

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/962270

Title:
  /usr/sbin/lightdm-session: 34: [: Linux: unexpected operator

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/962270/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs