[X2Go-User] Manjaro
Robert Dinse
nanook at eskimo.com
Mon Mar 18 01:10:29 CET 2019
I added set -xv
Formatting is ugly, hope you can make sense of it, looks like somethng
run through an obsfucator to me:
Connection failed. [[ -z "${X2GO_INTERNAL_SOURCE}" ]] && exit '2' ++ [[ -z 1 ]]
# Variables used for caching. # We do not want to fetch the whole list for
every # single port check. typeset -a used_x2go_ports ++ typeset -a
used_x2go_ports typeset -a used_system_ports ++ typeset -a used_system_ports
typeset -a used_display_ports ++ typeset -a used_display_ports
used_x2go_ports=() ++ used_x2go_ports=() used_system_ports=() ++
used_system_ports=() used_display_ports=() ++ used_display_ports=() #
Initializes used_x2go_ports array. # Internal use only. # Takes the current
hostname as a parameter. # Returns 0 on success or non-0 on failure.
initialize_x2go_ports() { typeset current_host_name="${1}" typeset
empty_regex='^[[:space:]]*$' if [[ -z "${current_host_name}" ]] || [[
"${current_host_name}" =~ ${empty_regex} ]] || [[ "${current_host_name}" =
'(none)' ]] || [[ "${current_host_name}" = 'localhost' ]]; then return '1' fi #
Get all used ports from the X2Go database # What this does is very unobvious,
so here's how that works: # The -d parameter with an empty string as its
argument makes # the read utility process a "line" until the first such
delimiter # is found. Since an empty string in C is terminated by a NULL #
character, the delimiter will be set to this NULL character. # Hence, assuming
that the input string does not contain any # NULL characters, the whole input
string will be treated as # one big line. # Then, normal word splitting kicks
in and the -a flag tells # read to put all words into elements of the provided
array # variable. typeset -a used_x2go_ports_work used_x2go_ports_work=()
IFS="${IFS}|" read -r -d '' -a 'used_x2go_ports_work' 1) { printf ("\n%d\n",
ports[delim]) } } }') # Filter out any empty or invalid values. typeset -i
item_i='0' typeset item='' for item in "${used_system_ports_work[@]}"; do
item_i="${item}" [[ -n "${item}" ]] && [[ "${item}" -eq "${item_i}" ]] && [[
"${item}" = "${item_i}" ]] && used_system_ports+=( "${item}" ) done return '0'
} # Initializes used_display_ports array. # Internal use only. # Takes the
current hostname as a parameter. # Returns 0 on success or non-0 on failure.
initialize_display_ports() { typeset current_host_name="${1}" typeset
empty_regex='^[[:space:]]*$' if [[ -z "${current_host_name}" ]] || [[
"${current_host_name}" =~ ${empty_regex} ]] || [[ "${current_host_name}" =
'(none)' ]] || [[ "${current_host_name}" = 'localhost' ]]; then return '1' fi
typeset -a used_display_ports_work used_display_ports_work=() IFS="${IFS}|"
read -r -d '' -a 'used_display_ports_work' '/dev/null' && ret='1' if [[
"${ret}" -eq '0' ]]; then # If cache is empty, initialize it. if [[
"${#used_system_ports[@]}" -eq '0' ]]; then initialize_system_ports "${ss}" ||
ret='4' fi fi if [[ "${ret}" -eq '0' ]]; then typeset -i i='0' for ((i = 0; i
'/dev/null' | grep -Eqs "(@|)/tmp/.X11-unix/X${port}(|-lock) " >'/dev/null';
then ret='1' fi fi if [[ "${ret}" -eq '0' ]]; then # Still looks free, check
X2Go database. check_x2go_port "${current_host_name}" "$((port + 6000))" ||
ret='1' fi if [[ "${ret}" -eq '0' ]]; then # Still looks free, check system
state. check_system_port "${ss}" "$((port + 6000))" || ret='1' fi return
"${ret}" } unset X2GO_INTERNAL_SOURCE + unset X2GO_INTERNAL_SOURCE typeset -i
ret_port="${start}" + typeset -i ret_port=50 typeset -i ret='1' + typeset -i
ret=1 typeset -i work_port='0' + typeset -i work_port=0 typeset -i
stop_port='65535' + typeset -i stop_port=65535 [[ "${type}" = 'display' ]] &&
stop_port="$((stop_port - 6000))" + [[ display = \d\i\s\p\l\a\y ]] +
stop_port=59535 # Find the next free port number. for ((work_port = start; i 1)
{ printf ("\n%d\n", ports[delim]) } } }') # Filter out any empty or invalid
values. typeset -i item_i='0' typeset item='' for item in
"${used_system_ports_work[@]}"; do item_i="${item}" [[ -n "${item}" ]] && [[
"${item}" -eq "${item_i}" ]] && [[ "${item}" = "${item_i}" ]] &&
used_system_ports+=( "${item}" ) done return '0' } # Initializes
used_display_ports array. # Internal use only. # Takes the current hostname as
a parameter. # Returns 0 on success or non-0 on failure.
initialize_display_ports() { typeset current_host_name="${1}" typeset
empty_regex='^[[:space:]]*$' if [[ -z "${current_host_name}" ]] || [[
"${current_host_name}" =~ ${empty_regex} ]] || [[ "${current_host_name}" =
'(none)' ]] || [[ "${current_host_name}" = 'localhost' ]]; then return '1' fi
typeset -a used_display_ports_work used_display_ports_work=() IFS="${IFS}|"
read -r -d '' -a 'used_display_ports_work' '/dev/null' && ret='1' if [[
"${ret}" -eq '0' ]]; then # If cache is empty, initialize it. if [[
"${#used_system_ports[@]}" -eq '0' ]]; then initialize_system_ports "${ss}" ||
ret='4' fi fi if [[ "${ret}" -eq '0' ]]; then typeset -i i='0' for ((i = 0; i
'/dev/null' | grep -Eqs "(@|)/tmp/.X11-unix/X${port}(|-lock) " >'/dev/null';
then ret='1' fi fi if [[ "${ret}" -eq '0' ]]; then # Still looks free, check
X2Go database. check_x2go_port "${current_host_name}" "$((port + 6000))" ||
ret='1' fi if [[ "${ret}" -eq '0' ]]; then # Still looks free, check system
state. check_system_port "${ss}" "$((port + 6000))" || ret='1' fi return
"${ret}" } unset X2GO_INTERNAL_SOURCE + unset X2GO_INTERNAL_SOURCE typeset -i
ret_port="${start}" + typeset -i ret_port=50 typeset -i ret='1' + typeset -i
ret=1 typeset -i work_port='0' + typeset -i work_port=0 typeset -i
stop_port='65535' + typeset -i stop_port=65535 [[ "${type}" = 'display' ]] &&
stop_port="$((stop_port - 6000))" + [[ display = \d\i\s\p\l\a\y ]] +
stop_port=59535 # Find the next free port number. for ((work_port = start; i 1)
{ printf ("\n%d\n", ports[delim]) } } }') # Filter out any empty or invalid
values. typeset -i item_i='0' typeset item='' for item in
"${used_system_ports_work[@]}"; do item_i="${item}" [[ -n "${item}" ]] && [[
"${item}" -eq "${item_i}" ]] && [[ "${item}" = "${item_i}" ]] &&
used_system_ports+=( "${item}" ) done return '0' } # Initializes
used_display_ports array. # Internal use only. # Takes the current hostname as
a parameter. # Returns 0 on success or non-0 on failure.
initialize_display_ports() { typeset current_host_name="${1}" typeset
empty_regex='^[[:space:]]*$' if [[ -z "${current_host_name}" ]] || [[
"${current_host_name}" =~ ${empty_regex} ]] || [[ "${current_host_name}" =
'(none)' ]] || [[ "${current_host_name}" = 'localhost' ]]; then return '1' fi
typeset -a used_display_ports_work used_display_ports_work=() IFS="${IFS}|"
read -r -d '' -a 'used_display_ports_work' '/dev/null' && ret='1' if [[
"${ret}" -eq '0' ]]; then # If cache is empty, initialize it. if [[
"${#used_system_ports[@]}" -eq '0' ]]; then initialize_system_ports "${ss}" ||
ret='4' fi fi if [[ "${ret}" -eq '0' ]]; then typeset -i i='0' for ((i = 0; i
'/dev/null' | grep -Eqs "(@|)/tmp/.X11-unix/X${port}(|-lock) " >'/dev/null';
then ret='1' fi fi if [[ "${ret}" -eq '0' ]]; then # Still looks free, check
X2Go database. check_x2go_port "${current_host_name}" "$((port + 6000))" ||
ret='1' fi if [[ "${ret}" -eq '0' ]]; then # Still looks free, check system
state. check_system_port "${ss}" "$((port + 6000))" || ret='1' fi return
"${ret}" } unset X2GO_INTERNAL_SOURCE + unset X2GO_INTERNAL_SOURCE typeset -i
ret_port="${start}" + typeset -i ret_port=50 typeset -i ret='1' + typeset -i
ret=1 typeset -i work_port='0' + typeset -i work_port=0 typeset -i
stop_port='65535' + typeset -i stop_port=65535 [[ "${type}" = 'display' ]] &&
stop_port="$((stop_port - 6000))" + [[ display = \d\i\s\p\l\a\y ]] +
stop_port=59535 # Find the next free port number. for ((work_port = start; i 1)
{ printf ("\n%d\n", ports[delim]) } } }') # Filter out any empty or invalid
values. typeset -i item_i='0' typeset item='' for item in
"${used_system_ports_work[@]}"; do item_i="${item}" [[ -n "${item}" ]] && [[
"${item}" -eq "${item_i}" ]] && [[ "${item}" = "${item_i}" ]] &&
used_system_ports+=( "${item}" ) done return '0' } # Initializes
used_display_ports array. # Internal use only. # Takes the current hostname as
a parameter. # Returns 0 on success or non-0 on failure.
initialize_display_ports() { typeset current_host_name="${1}" typeset
empty_regex='^[[:space:]]*$' if [[ -z "${current_host_name}" ]] || [[
"${current_host_name}" =~ ${empty_regex} ]] || [[ "${current_host_name}" =
'(none)' ]] || [[ "${current_host_name}" = 'localhost' ]]; then return '1' fi
typeset -a used_display_ports_work used_display_ports_work=() IFS="${IFS}|"
read -r -d '' -a 'used_display_ports_work' '/dev/null' && ret='1' if [[
"${ret}" -eq '0' ]]; then # If cache is empty, initialize it. if [[
"${#used_system_ports[@]}" -eq '0' ]]; then initialize_system_ports "${ss}" ||
ret='4' fi fi if [[ "${ret}" -eq '0' ]]; then typeset -i i='0' for ((i = 0; i
'/dev/null' | grep -Eqs "(@|)/tmp/.X11-unix/X${port}(|-lock) " >'/dev/null';
then ret='1' fi fi if [[ "${ret}" -eq '0' ]]; then # Still looks free, check
X2Go database. check_x2go_port "${current_host_name}" "$((port + 6000))" ||
ret='1' fi if [[ "${ret}" -eq '0' ]]; then # Still looks free, check system
state. check_system_port "${ss}" "$((port + 6000))" || ret='1' fi return
"${ret}" } unset X2GO_INTERNAL_SOURCE + unset X2GO_INTERNAL_SOURCE typeset -i
ret_port="${start}" + typeset -i ret_port=50 typeset -i ret='1' + typeset -i
ret=1 typeset -i work_port='0' + typeset -i work_port=0 typeset -i
stop_port='65535' + typeset -i stop_port=65535 [[ "${type}" = 'display' ]] &&
stop_port="$((stop_port - 6000))" + [[ display = \d\i\s\p\l\a\y ]] +
stop_port=59535 # Find the next free port number. for ((work_port = start; i 1)
{ printf ("\n%d\n", ports[delim]) } } }') # Filter out any empty or invalid
values. typeset -i item_i='0' typeset item='' for item in
"${used_system_ports_work[@]}"; do item_i="${item}" [[ -n "${item}" ]] && [[
"${item}" -eq "${item_i}" ]] && [[ "${item}" = "${item_i}" ]] &&
used_system_ports+=( "${item}" ) done return '0' } # Initializes
used_display_ports array. # Internal use only. # Takes the current hostname as
a parameter. # Returns 0 on success or non-0 on failure.
initialize_display_ports() { typeset current_host_name="${1}" typeset
empty_regex='^[[:space:]]*$' if [[ -z "${current_host_name}" ]] || [[
"${current_host_name}" =~ ${empty_regex} ]] || [[ "${current_host_name}" =
'(none)' ]] || [[ "${current_host_name}" = 'localhost' ]]; then return '1' fi
typeset -a used_display_ports_work used_display_ports_work=() IFS="${IFS}|"
read -r -d '' -a 'used_display_ports_work' '/dev/null' && ret='1' if [[
"${ret}" -eq '0' ]]; then # If cache is empty, initialize it. if [[
"${#used_system_ports[@]}" -eq '0' ]]; then initialize_system_ports "${ss}" ||
ret='4' fi fi if [[ "${ret}" -eq '0' ]]; then typeset -i i='0' for ((i = 0; i
'/dev/null' | grep -Eqs "(@|)/tmp/.X11-unix/X${port}(|-lock) " >'/dev/null';
then ret='1' fi fi if [[ "${ret}" -eq '0' ]]; then # Still looks free, check
X2Go database. check_x2go_port "${current_host_name}" "$((port + 6000))" ||
ret='1' fi if [[ "${ret}" -eq '0' ]]; then # Still looks free, check system
state. check_system_port "${ss}" "$((port + 6000))" || ret='1' fi return
"${ret}" } unset X2GO_INTERNAL_SOURCE + unset X2GO_INTERNAL_SOURCE typeset -i
ret_port="${start}" + typeset -i ret_port=50 typeset -i ret='1' + typeset -i
ret=1 typeset -i work_port='0' + typeset -i work_port=0 typeset -i
stop_port='65535' + typeset -i stop_port=65535 [[ "${type}" = 'display' ]] &&
stop_port="$((stop_port - 6000))" + [[ display = \d\i\s\p\l\a\y ]] +
stop_port=59535 # Find the next free port number. for ((work_port = start; i 1)
{ printf ("\n%d\n", ports[delim]) } } }') # Filter out any empty or invalid
values. typeset -i item_i='0' typeset item='' for item in
"${used_system_ports_work[@]}"; do item_i="${item}" [[ -n "${item}" ]] && [[
"${item}" -eq "${item_i}" ]] && [[ "${item}" = "${item_i}" ]] &&
used_system_ports+=( "${item}" ) done return '0' } # Initializes
used_display_ports array. # Internal use only. # Takes the current hostname as
a parameter. # Returns 0 on success or non-0 on failure.
initialize_display_ports() { typeset current_host_name="${1}" typeset
empty_regex='^[[:space:]]*$' if [[ -z "${current_host_name}" ]] || [[
"${current_host_name}" =~ ${empty_regex} ]] || [[ "${current_host_name}" =
'(none)' ]] || [[ "${current_host_name}" = 'localhost' ]]; then return '1' fi
typeset -a used_display_ports_work used_display_ports_work=() IFS="${IFS}|"
read -r -d '' -a 'used_display_ports_work' '/dev/null' && ret='1' if [[
"${ret}" -eq '0' ]]; then # If cache is empty, initialize it. if [[
"${#used_system_ports[@]}" -eq '0' ]]; then initialize_system_ports "${ss}" ||
ret='4' fi fi if [[ "${ret}" -eq '0' ]]; then typeset -i i='0' for ((i = 0; i
'/dev/null' | grep -Eqs "(@|)/tmp/.X11-unix/X${port}(|-lock) " >'/dev/null';
then ret='1' fi fi if [[ "${ret}" -eq '0' ]]; then # Still looks free, check
X2Go database. check_x2go_port "${current_host_name}" "$((port + 6000))" ||
ret='1' fi if [[ "${ret}" -eq '0' ]]; then # Still looks free, check system
state. check_system_port "${ss}" "$((port + 6000))" || ret='1' fi return
"${ret}" } unset X2GO_INTERNAL_SOURCE + unset X2GO_INTERNAL_SOURCE typeset -i
ret_port="${start}" + typeset -i ret_port=50 typeset -i ret='1' + typeset -i
ret=1 typeset -i work_port='0' + typeset -i work_port=0 typeset -i
stop_port='65535' + typeset -i stop_port=65535 [[ "${type}" = 'display' ]] &&
stop_port="$((stop_port - 6000))" + [[ display = \d\i\s\p\l\a\y ]] +
stop_port=59535 # Find the next free port number. for ((work_port = start; i 1)
{ printf ("\n%d\n", ports[delim]) } } }') # Filter out any empty or invalid
values. typeset -i item_i='0' typeset item='' for item in
"${used_system_ports_work[@]}"; do item_i="${item}" [[ -n "${item}" ]] && [[
"${item}" -eq "${item_i}" ]] && [[ "${item}" = "${item_i}" ]] &&
used_system_ports+=( "${item}" ) done return '0' } # Initializes
used_display_ports array. # Internal use only. # Takes the current hostname as
a parameter. # Returns 0 on success or non-0 on failure.
initialize_display_ports() { typeset current_host_name="${1}" typeset
empty_regex='^[[:space:]]*$' if [[ -z "${current_host_name}" ]] || [[
"${current_host_name}" =~ ${empty_regex} ]] || [[ "${current_host_name}" =
'(none)' ]] || [[ "${current_host_name}" = 'localhost' ]]; then return '1' fi
typeset -a used_display_ports_work used_display_ports_work=() IFS="${IFS}|"
read -r -d '' -a 'used_display_ports_work' '/dev/null' && ret='1' if [[
"${ret}" -eq '0' ]]; then # If cache is empty, initialize it. if [[
"${#used_system_ports[@]}" -eq '0' ]]; then initialize_system_ports "${ss}" ||
ret='4' fi fi if [[ "${ret}" -eq '0' ]]; then typeset -i i='0' for ((i = 0; i
'/dev/null' | grep -Eqs "(@|)/tmp/.X11-unix/X${port}(|-lock) " >'/dev/null';
then ret='1' fi fi if [[ "${ret}" -eq '0' ]]; then # Still looks free, check
X2Go database. check_x2go_port "${current_host_name}" "$((port + 6000))" ||
ret='1' fi if [[ "${ret}" -eq '0' ]]; then # Still looks free, check system
state. check_system_port "${ss}" "$((port + 6000))" || ret='1' fi return
"${ret}" } unset X2GO_INTERNAL_SOURCE + unset X2GO_INTERNAL_SOURCE typeset -i
ret_port="${start}" + typeset -i ret_port=50 typeset -i ret='1' + typeset -i
ret=1 typeset -i work_port='0' + typeset -i work_port=0 typeset -i
stop_port='65535' + typeset -i stop_port=65535 [[ "${type}" = 'display' ]] &&
stop_port="$((stop_port - 6000))" + [[ display = \d\i\s\p\l\a\y ]] +
stop_port=59535 # Find the next free port number. for ((work_port = start; i 1)
{ printf ("\n%d\n", ports[delim]) } } }') # Filter out any empty or invalid
values. typeset -i item_i='0' typeset item='' for item in
"${used_system_ports_work[@]}"; do item_i="${item}" [[ -n "${item}" ]] && [[
"${item}" -eq "${item_i}" ]] && [[ "${item}" = "${item_i}" ]] &&
used_system_ports+=( "${item}" ) done return '0' } # Initializes
used_display_ports array. # Internal use only. # Takes the current hostname as
a parameter. # Returns 0 on success or non-0 on failure.
initialize_display_ports() { typeset current_host_name="${1}" typeset
empty_regex='^[[:space:]]*$' if [[ -z "${current_host_name}" ]] || [[
"${current_host_name}" =~ ${empty_regex} ]] || [[ "${current_host_name}" =
'(none)' ]] || [[ "${current_host_name}" = 'localhost' ]]; then return '1' fi
typeset -a used_display_ports_work used_display_ports_work=() IFS="${IFS}|"
read -r -d '' -a 'used_display_ports_work' '/dev/null' && ret='1' if [[
"${ret}" -eq '0' ]]; then # If cache is empty, initialize it. if [[
"${#used_system_ports[@]}" -eq '0' ]]; then initialize_system_ports "${ss}" ||
ret='4' fi fi if [[ "${ret}" -eq '0' ]]; then typeset -i i='0' for ((i = 0; i
'/dev/null' | grep -Eqs "(@|)/tmp/.X11-unix/X${port}(|-lock) " >'/dev/null';
then ret='1' fi fi if [[ "${ret}" -eq '0' ]]; then # Still looks free, check
X2Go database. check_x2go_port "${current_host_name}" "$((port + 6000))" ||
ret='1' fi if [[ "${ret}" -eq '0' ]]; then # Still looks free, check system
state. check_system_port "${ss}" "$((port + 6000))" || ret='1' fi return
"${ret}" } unset X2GO_INTERNAL_SOURCE + unset X2GO_INTERNAL_SOURCE typeset -i
ret_port="${start}" + typeset -i ret_port=50 typeset -i ret='1' + typeset -i
ret=1 typeset -i work_port='0' + typeset -i work_port=0 typeset -i
stop_port='65535' + typeset -i stop_port=65535 [[ "${type}" = 'display' ]] &&
stop_port="$((stop_port - 6000))" + [[ display = \d\i\s\p\l\a\y ]] +
stop_port=59535 # Find the next free port number. for ((work_port = start; i 1)
{ printf ("\n%d\n", ports[delim]) } } }') # Filter out any empty or invalid
values. typeset -i item_i='0' typeset item='' for item in
"${used_system_ports_work[@]}"; do item_i="${item}" [[ -n "${item}" ]] && [[
"${item}" -eq "${item_i}" ]] && [[ "${item}" = "${item_i}" ]] &&
used_system_ports+=( "${item}" ) done return '0' } # Initializes
used_display_ports array. # Internal use only. # Takes the current hostname as
a parameter. # Returns 0 on success or non-0 on failure.
initialize_display_ports() { typeset current_host_name="${1}" typeset
empty_regex='^[[:space:]]*$' if [[ -z "${current_host_name}" ]] || [[
"${current_host_name}" =~ ${empty_regex} ]] || [[ "${current_host_name}" =
'(none)' ]] || [[ "${current_host_name}" = 'localhost' ]]; then return '1' fi
typeset -a used_display_ports_work used_display_ports_work=() IFS="${IFS}|"
read -r -d '' -a 'used_display_ports_work' '/dev/null' && ret='1' if [[
"${ret}" -eq '0' ]]; then # If cache is empty, initialize it. if [[
"${#used_system_ports[@]}" -eq '0' ]]; then initialize_system_ports "${ss}" ||
ret='4' fi fi if [[ "${ret}" -eq '0' ]]; then typeset -i i='0' for ((i = 0; i
'/dev/null' | grep -Eqs "(@|)/tmp/.X11-unix/X${port}(|-lock) " >'/dev/null';
then ret='1' fi fi if [[ "${ret}" -eq '0' ]]; then # Still looks free, check
X2Go database. check_x2go_port "${current_host_name}" "$((port + 6000))" ||
ret='1' fi if [[ "${ret}" -eq '0' ]]; then # Still looks free, check system
state. check_system_port "${ss}" "$((port + 6000))" || ret='1' fi return
"${ret}" } unset X2GO_INTERNAL_SOURCE + unset X2GO_INTERNAL_SOURCE typeset -i
ret_port="${start}" + typeset -i ret_port=50 typeset -i ret='1' + typeset -i
ret=1 typeset -i work_port='0' + typeset -i work_port=0 typeset -i
stop_port='65535' + typeset -i stop_port=65535 [[ "${type}" = 'display' ]] &&
stop_port="$((stop_port - 6000))" + [[ display = \d\i\s\p\l\a\y ]] +
stop_port=59535 # Find the next free port number. for ((work_port = start; i 1)
{ printf ("\n%d\n", ports[delim]) } } }') # Filter out any empty or invalid
values. typeset -i item_i='0' typeset item='' for item in
"${used_system_ports_work[@]}"; do item_i="${item}" [[ -n "${item}" ]] && [[
"${item}" -eq "${item_i}" ]] && [[ "${item}" = "${item_i}" ]] &&
used_system_ports+=( "${item}" ) done return '0' } # Initializes
used_display_ports array. # Internal use only. # Takes the current hostname as
a parameter. # Returns 0 on success or non-0 on failure.
initialize_display_ports() { typeset current_host_name="${1}" typeset
empty_regex='^[[:space:]]*$' if [[ -z "${current_host_name}" ]] || [[
"${current_host_name}" =~ ${empty_regex} ]] || [[ "${current_host_name}" =
'(none)' ]] || [[ "${current_host_name}" = 'localhost' ]]; then return '1' fi
typeset -a used_display_ports_work used_display_ports_work=() IFS="${IFS}|"
read -r -d '' -a 'used_display_ports_work' '/dev/null' && ret='1' if [[
"${ret}" -eq '0' ]]; then # If cache is empty, initialize it. if [[
"${#used_system_ports[@]}" -eq '0' ]]; then initialize_system_ports "${ss}" ||
ret='4' fi fi if [[ "${ret}" -eq '0' ]]; then typeset -i i='0' for ((i = 0; i
'/dev/null' | grep -Eqs "(@|)/tmp/.X11-unix/X${port}(|-lock) " >'/dev/null';
then ret='1' fi fi if [[ "${ret}" -eq '0' ]]; then # Still looks free, check
X2Go database. check_x2go_port "${current_host_name}" "$((port + 6000))" ||
ret='1' fi if [[ "${ret}" -eq '0' ]]; then # Still looks free, check system
state. check_system_port "${ss}" "$((port + 6000))" || ret='1' fi return
"${ret}" } unset X2GO_INTERNAL_SOURCE + unset X2GO_INTERNAL_SOURCE typeset -i
ret_port="${start}" + typeset -i ret_port=50 typeset -i ret='1' + typeset -i
ret=1 typeset -i work_port='0' + typeset -i work_port=0 typeset -i
stop_port='65535' + typeset -i stop_port=65535 [[ "${type}" = 'display' ]] &&
stop_port="$((stop_port - 6000))" + [[ display = \d\i\s\p\l\a\y ]] +
stop_port=59535 # Find the next free port number. for ((work_port = start; i
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Eskimo North Linux Friendly Internet Access, Shell Accounts, and Hosting.
Knowledgeable human assistance, not telephone trees or script readers.
See our web site: http://www.eskimo.com/ (206) 812-0051 or (800) 246-6874.
On Sun, 17 Mar 2019, Ulrich Sibiller wrote:
> Date: Sun, 17 Mar 2019 09:57:04 +0100
> From: Ulrich Sibiller <uli42 at gmx.de>
> To: Robert Dinse <nanook at eskimo.com>
> Cc: "x2go-user at lists.x2go.org" <x2go-user at lists.x2go.org>
> Subject: Re: [X2Go-User] Manjaro
>
> On Sun, Mar 17, 2019 at 8:14 AM Robert Dinse <nanook at eskimo.com> wrote:
>>
>>
>> I've installed x2goserver on Manjaro and when I try to connect using
>> XFCE desktop, I get a pop-up with this:
>>
>> Connection failed. /usr/lib/x2go/x2gocheckport: line 131: DBD::SQLite::db:
>> syntax error in expression (error token is "::SQLite::db")
>> /usr/lib/x2go/x2gocheckport: line 131: DBD::SQLite::db: syntax error in
>> expression (error token is "::SQLite::db") /usr/lib/x2go/x2gocheckport: line
>> 131: DBD::SQLite::db: syntax error in expression (error token is
>> "::SQLite::db") /usr/lib/x2go/x2gocheckport: line 131: DBD::SQLite::db: syntax
>> error in expression (error token is "::SQLite::db")
>> /usr/lib/x2go/x2gocheckport: line 131: DBD::SQLite::db: syntax error in
>> expression (error token is "::SQLite::db") /usr/lib/x2go/x2gocheckport: line
>> 131: DBD::SQLite::db: syntax error in expression (error token is
>> "::SQLite::db") /usr/lib/x2go/x2gocheckport: line 131: DBD::SQLite::db: syntax
>> error in expression (error token is "::SQLite::db")
>> /usr/lib/x2go/x2gocheckport: line 131: DBD::SQLite::db: syntax error in
>> expression (error token is "::SQLite::db") /usr/lib/x2go/x2gocheckport: line
>> 131: DBD::SQLite::db: syntax error in expression (error token is
>> "::SQLite::db") /usr/lib/x2go/x2gocheckport: line 131: DBD::SQLite::db: syntax
>> error in expression (error token is "::SQLite::db") Unable to find free display
>> port or insert new session into database; parameters: port (50), hostname
>> (manjaro) and session name ().
>
> In x2gocheckport line 131 I cannot see any SQL reference, can you
> please investigate how thi script is called? (Add echo "$@"
> </tmp/params) right at the beginning or something like that. Or event
> better add set -xv so we can see the whole script.). It looks to me
> like something going horribly wrong ....
>
> Uli
>
More information about the x2go-user
mailing list