Re: [Android-tesla-devel] connection shell script errors
Status: Beta
Brought to you by:
seanhodges
|
From: Adrian B. <ad...@sm...> - 2009-10-16 12:47:24
|
On Fri, Oct 16, 2009 at 12:29:18 +0100 (+0100), Sean Hodges wrote:
> Hey Adrian, thanks for your feedback!
Tis nothing compared to the app :-)
> > a) it would be nice to be able to specify an alternative SSH port
[snip]
> Perhaps we should be checking for a ":" in the host field, and split
> the port number out of there... It could default to 22 when no port
> has been specified.
Heh - I did try that just FYI so it's not a bad idea.
> > b) my .bashrc has "set -o nounset" which causes problems. perhaps
> > "env|grep.." or somesuch instead?
>
> The nounset setting should not be an issue if the script succeeds.
> Nonetheless, I'll see if there is some other way we can check for a
> environment variable's existence. "env | grep X" is an option here,
> though I suspect there must be a cleaner way somehow.
Actually that does seem to be a read herring, I thought it was causing
problems with "echo $XDG_SESSION_COOKIE" since that wasn't set.
> > c) there is an 'if [[ "$QUERY_ENVIRON" != "" ]]' line. This is extended
> > test syntax - which aren't actually part of the POSIX standard so some
> > shells don't support them. 'if ! [ "$QUERY_ENVIRON" ]' should work
> > nicely.
>
> Ah, this is an artifact of the little-to-no testing that Tesla has had
> with non-Bash sessions, I will switch to korn and tcsh and do some
> testing. If you've already done some work on this, a patch would be
> great.
- if [[ "${QUERY_ENVIRON}" != "" ]]; then
+ if ! [ "${QUERY_ENVIRON}" != "" ]; then
should do it - the rest looks fine.
> > d) even though I've turned off b) and I'm using bash, it's still
> > failing for me - it dumps the shell script to the screen - the last
> > bit is:
> > ....
> > else echo Could not find dbus session ID in user environment; fi; :-
> > grep:
>
> I think there are some underlying issues that have not been tested for
> yet. Can you tell me which distro and shell you are using? I'll fire
> up a VM and see if I can reproduce all the issues you've mentioned.
Debian (unstable), bash shell.
> The initialisation script ultimately runs the following command on
> your system: http://pastie.org/657349. Running it manually on the
Ah, that's handy - I was going to go digging and ran out of time.
The problem was that XDG_SESSION_COOKIE wasn't set. I thought "how on
Earth can you expect that to be set on a new SSH session?".
It turns out "apt-get install libpam-ck-connector" is the answer :-)
So it's now working (just testing play/pause to Banshee) \o/
Thanks ever so much for the quick reply.
Adrian
--
bitcube.co.uk - Linux infrastructure consultancy
Puppet, Debian, Red Hat, Ubuntu, CentOS, ...
|