X11docker: sharessh not working anymore

Created on 9 Aug 2018  路  3Comments  路  Source: mviereck/x11docker

I've got the error with current master (--pulseaudio=tcp).

export: `/run/user/1000/keyring/ssh': not a valid identifier

The Docker run command contains --env /run/user/1000/keyring/ssh. The SSH_AUTH_SOCK name is missing here.

Is it right, that this was removed and this changed?

bug

Most helpful comment

ok, it is fixed now.
Please reopen if it still fails.

Or simply use the shebang line #! /bin/bash -e.

With option --debug x11docker catches errors and undefined variables with:

traperror() {
  debugnote "Command at Line ${2:-} returned with error code ${1:-}:
  ${4:-}
  ${3:-} - ${5:-}"
}
set -Eu
trap 'traperror $? $LINENO $BASH_LINENO "$BASH_COMMAND" $(printf "::%s" ${FUNCNAME[@]})'  ERR

It does not exit on error like with set -e but prints an error message.
It exits on undefined variables.

All 3 comments

ups, sorry, the bug is here:

Customenvironment="$(escapestring "${SSH_AUTH_SOCK:-}")
$Customenvironment"

should be:

Customenvironment="SSH_AUTH_SOCK=$(escapestring "${SSH_AUTH_SOCK:-}")
$Customenvironment"

I found that I could spare additional variable $Sharessh and the check for it while creating docker command with just adding it to the list of environment variables, similar to adding the shared socket to the list of shared files.

Will upload the fix it after some pulseaudio cleanup I am doing yet.

If you set in the startscript for docker run the line set -e it aborts if an error occurs. This would avoid silent errors. Not sure if it is useful here.


Or simply use the shebang line #! /bin/bash -e.

ok, it is fixed now.
Please reopen if it still fails.

Or simply use the shebang line #! /bin/bash -e.

With option --debug x11docker catches errors and undefined variables with:

traperror() {
  debugnote "Command at Line ${2:-} returned with error code ${1:-}:
  ${4:-}
  ${3:-} - ${5:-}"
}
set -Eu
trap 'traperror $? $LINENO $BASH_LINENO "$BASH_COMMAND" $(printf "::%s" ${FUNCNAME[@]})'  ERR

It does not exit on error like with set -e but prints an error message.
It exits on undefined variables.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SamLex picture SamLex  路  7Comments

eine picture eine  路  5Comments

mwoodpatrick picture mwoodpatrick  路  9Comments

SemanticBeeng picture SemanticBeeng  路  9Comments

hrjakobsen picture hrjakobsen  路  4Comments