[X2Go-User] x2go local desktop connection on rpi

Stefan Baur X2Go-ML-1 at baur-itcs.de
Fri Jan 19 12:44:20 CET 2018


Hi Richard,

Sharing the physical desktop on the Pi is currently not supported - my
guess is that it's broken due to the different and rather peculiar GPU
architecture on that platform.

As a workaround, you could try this:

Save this bash script as /usr/local/bin/localscreen on the pi:
#!/bin/bash
vncviewer -listen &
VNCVPID=$!
while ! netstat -tulpen 2>/dev/null | \
 awk '$9 ~ /\/vncviewer$/ { print $9 }' | \
 grep -q $VNCPID ; do
	sleep 1
done
x11vnc -display :0 -ncache_cr -connect localhost -rfbport 0
kill $VNCVPID

then run

chmod 755 /usr/local/bin/localscreen

And create a new X2Go session profile for a single application.  Instead
of one of the offered options (Terminal, Browser, etc.), enter:

localscreen

Now, when you connect using that session profile, with the same user
that is logged in locally, it should grant you access to the local desktop.

What this script does is it starts vncclient in listening mode (Port
5500), checks that it is running, then tells x11vnc to attach to the
physical display (-display :0), and to start in "dial-out" mode,
connecting to the VNC client running on the pi (-connect localhost) - in
your current X2Go session.  It does so without a password, which may
seem insecure at first, but the -rfbport 0 part of the command line
makes sure that no one else can attach to the session as the server
doesn't have a listening port that way.

Kind Regards,
Stefan Baur
	
Am 17.01.2018 um 21:05 schrieb RW:
> Hi,
> 
> I've recently been trying to use X2go to connect to a Rpi3 running the
> latest ubuntu mate 17.10
> This seems to work when selecting xfce or a new session
> but doesn't work when trying to connect to the local desktop (which is
> already logged in)
> I even tried installing / running x2godesktopsharing on the server side
> then enabling shared desktop, but that didn't have any affect (I think
> that's only needed for different users normally)
> 
>   * client - Windows 10 / latest X2go client 4.1.0.0
>   * server - Rpi3 / Ubuntu Mate / latest x2goserver 
> 4.0.1.22-0~1197~ubuntu17.10.1
> 
> It just seems to jump out with the following message on the client
> "The connection with the remote server was shut down. Please check the
> state of your network connection"
> 
>   * I was able to rule out the client as the problem by connecting from
> windows to a x64 gentoo vm / local desktop vm which worked fine on the
> local desktop setting (same version 4.0.1.22 server)
>   * I also tried connecting from a linux client to the rpi but with same
> results
>   * For the rpi as the server, this only seems to affect connections to
> the local desktop, connections using a new session in the drop down work
> okay
> 
> Logs attached below
> any ideas on how to get this going?
> one difference I've spotted with a working setup is the message "state
> file for this session does not exist" in the server logs
> 
> client log:
> 
> NXPROXY - Version 3.5.0
> 
> Copyright (C) 2001, 2010 NoMachine.
> See http://www.nomachine.com/ for more information.
> 
> Info: Proxy running in client mode with pid '6540'.
> Session: Starting session at 'Wed Jan 17 19:28:20 2018'.
> Info: Connecting to remote host 'localhost:62654'.
> Info: Connection to remote proxy 'localhost:62654' established.
> Info: Connection with remote proxy completed.
> Warning: Unrecognized session type 'unix-kde-depth_32'. Assuming agent
> session.
> Warning: Failed to read data from the X auth command.
> Warning: Generated a fake cookie for X authentication.
> Info: Using ADSL link parameters 512/24/1/0.
> Info: Using cache parameters 4/4096KB/8192KB/8192KB.
> Info: Using pack method '16m-jpeg-9' with session 'unix-kde-depth_32'.
> Info: Using ZLIB data compression 1/1/32.
> Info: Using ZLIB stream compression 4/4.
> Info: No suitable cache file found.
> Info: Forwarding X11 connections to display 'localhost:0'.
> Session: Session started at 'Wed Jan 17 19:28:20 2018'.
> Info: Established X server connection.
> Info: Using shared memory parameters 0/0K.
> Session: Terminating session at 'Wed Jan 17 19:32:30 2018'.
> Session: Session terminated at 'Wed Jan 17 19:32:30 2018'.
> 
> NXPROXY - Version 3.5.0
> 
> Copyright (C) 2001, 2010 NoMachine.
> See http://www.nomachine.com/ for more information.
> 
> Info: Proxy running in client mode with pid '11024'.
> Session: Starting session at 'Wed Jan 17 19:34:34 2018'.
> Info: Connecting to remote host 'localhost:46131'.
> Info: Connection to remote proxy 'localhost:46131' established.
> Info: Connection with remote proxy completed.
> Warning: Unrecognized session type 'unix-kde-depth_32'. Assuming agent
> session.
> Warning: Failed to read data from the X auth command.
> Warning: Generated a fake cookie for X authentication.
> Info: Using ADSL link parameters 512/24/1/0.
> Info: Using cache parameters 4/4096KB/8192KB/8192KB.
> Info: Using pack method '16m-jpeg-9' with session 'unix-kde-depth_32'.
> Info: Using ZLIB data compression 1/1/32.
> Info: Using ZLIB stream compression 4/4.
> Info: No suitable cache file found.
> Info: Forwarding X11 connections to display 'localhost:0'.
> Session: Session started at 'Wed Jan 17 19:34:34 2018'.
> Info: Established X server connection.
> Info: Using shared memory parameters 0/0K.
> Error: Failure reading from the peer proxy.
> Error: Connection with remote peer broken.
> Error: Please check the state of your network and retry.
> Session: Terminating session at 'Wed Jan 17 19:34:34 2018'.
> Session: Session terminated at 'Wed Jan 17 19:34:34 2018'.
> 
> NXPROXY - Version 3.5.0
> 
> Copyright (C) 2001, 2010 NoMachine.
> See http://www.nomachine.com/ for more information.
> 
> Info: Proxy running in client mode with pid '13288'.
> Session: Starting session at 'Wed Jan 17 19:50:31 2018'.
> Info: Connecting to remote host 'localhost:58149'.
> Info: Connection to remote proxy 'localhost:58149' established.
> Info: Connection with remote proxy completed.
> Warning: Unrecognized session type 'unix-kde-depth_32'. Assuming agent
> session.
> Warning: Failed to read data from the X auth command.
> Warning: Generated a fake cookie for X authentication.
> Info: Using ADSL link parameters 512/24/1/0.
> Info: Using cache paramError: Failure reading from the peer proxy.
> Error: Connection with remote peer broken.
> Error: Please check the state of your network and retry.
> Session: Terminating session at 'Wed Jan 17 19:50:32 2018'.
> Session: Session terminated at 'Wed Jan 17 19:50:32 2018'.
> eters 4/4096KB/8192KB/8192KB.
> Info: Using pack method '16m-jpeg-9' with session 'unix-kde-depth_32'.
> Info: Using ZLIB data compression 1/1/32.
> Info: Using ZLIB stream compression 4/4.
> Info: No suitable cache file found.
> Info: Forwarding X11 connections to display 'localhost:0'.
> Session: Session started at 'Wed Jan 17 19:50:31 2018'.
> Info: Established X server connection.
> Info: Using shared memory parameters 0/0K.
> 
> Server:
> 
> Jan 17 19:34:18 NeilBreen /usr/bin/x2golistdesktops[5343]:
> x2golistdesktops has been called without options
> Jan 17 19:34:19 NeilBreen /usr/bin/x2golistsessions[5349]:
> x2golistsessions has been called with options: x2goserver
> Jan 17 19:34:24 NeilBreen /usr/bin/x2gostartagent: x2gostartagent called
> with options: 1280x1024 adsl 16m-jpeg-9 unix-kde-depth_32 us auto 1 S
> 1XSHADhacmanXSHAD:0
> Jan 17 19:34:24 NeilBreen /usr/bin/x2gostartagent: SSH port
> randomization requested.
> Jan 17 19:34:25 NeilBreen /usr/bin/x2gostartagent: client announced
> itself as ,,172.16.0.83''
> Jan 17 19:34:25 NeilBreen /usr/bin/x2gostartagent: shadow session
> requested: mode 1, user: hacman, desktop: :0
> Jan 17 19:34:25 NeilBreen /usr/bin/x2gosessionlimit[5420]:
> x2gosessionlimit has been called
> Jan 17 19:34:25 NeilBreen /usr/bin/x2golistsessions[5423]:
> x2golistsessions has been called with options: --all-servers
> Jan 17 19:34:26 NeilBreen /usr/lib/x2go/x2gogetdisplays[5450]:
> db_getdisplays called, server: NeilBreen; return value:
> Jan 17 19:34:27 NeilBreen /usr/lib/x2go/x2gogetports[5459]: db_getports
> called, server: NeilBreen; return value:
> Jan 17 19:34:28 NeilBreen /usr/lib/x2go/x2goinsertsession[5480]:
> db_insertsession called, session ID:
> hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32, server: NeilBreen,
> session ID: hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32
> Jan 17 19:34:28 NeilBreen /usr/lib/x2go/x2gogetports[5489]: db_getports
> called, server: NeilBreen; return value:
> Jan 17 19:34:29 NeilBreen /usr/lib/x2go/x2goinsertport[5512]:
> db_insertport called, session ID:
> hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32, server: NeilBreen,
> SSH port: 45131
> Jan 17 19:34:29 NeilBreen /usr/lib/x2go/x2gogetstatus[5513]:
> db_getstatus called, session ID:
> hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32, return value: R
> Jan 17 19:34:29 NeilBreen /usr/sbin/x2gocleansessions[15746]:
> hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32: state file for this
> session does not exist:
> /tmp/.x2go-hacman/C-hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32/state
> (this can be ignored during session startups)
> Jan 17 19:34:30 NeilBreen /usr/lib/x2go/x2gogetports[5529]: db_getports
> called, server: NeilBreen; return value: |45131|
> Jan 17 19:34:30 NeilBreen /usr/lib/x2go/x2goinsertport[5543]:
> db_insertport called, session ID:
> hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32, server: NeilBreen,
> SSH port: 45132
> Jan 17 19:34:31 NeilBreen /usr/lib/x2go/x2gogetports[5552]: db_getports
> called, server: NeilBreen; return value: |45131| |45132|
> Jan 17 19:34:32 NeilBreen /usr/lib/x2go/x2goinsertport[5566]:
> db_insertport called, session ID:
> hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32, server: NeilBreen,
> SSH port: 45133
> Jan 17 19:34:32 NeilBreen /usr/bin/x2gofeature: x2gofeature called with
> options: X2GO_RUN_EXTENSIONS
> Jan 17 19:34:32 NeilBreen
> /usr/share/x2go/x2gofeature.d/x2godesktopsharing.features:
> x2godesktopsharing.features called with options: X2GO_RUN_EXTENSIONS
> Jan 17 19:34:32 NeilBreen
> /usr/share/x2go/x2gofeature.d/x2goserver-extensions.features:
> x2goserver-extensions.features called with options: X2GO_RUN_EXTENSIONS
> Jan 17 19:34:32 NeilBreen /usr/lib/x2go/x2gogetstatus[5609]:
> db_getstatus called, session ID:
> hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32, return value: R
> Jan 17 19:34:32 NeilBreen /usr/sbin/x2gocleansessions[15746]:
> hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32: state file for this
> session does not exist:
> /tmp/.x2go-hacman/C-hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32/state
> (this can be ignored during session startups)
> Jan 17 19:34:32 NeilBreen /usr/bin/x2goserver-run-extensions:
> x2goserver-run-extensions called with options:
> hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32 pre-start
> Jan 17 19:34:33 NeilBreen /usr/bin/x2gostartagent: started nxagent:
> NX_TEMP=/tmp x2goagent X2GO_NXAGENT_OPTIONS (' -extension XFIXES
> -nolisten tcp') NOLISTOPT ('-nolisten tcp') X2GODPIOPTION_ ('-dpi 96')
> -SESSION_TYPE ('-S') -auth "XAUTHORITY" ('"/home/hacman/.Xauthority"')
> -shadow SHADOW_DESKTOP (':0') -shadowmode SHADOW_MODE ('1')
> agent_geometry ('-geometry 1280x1024+0+0') -name "SESSION_WINDOW_TITLE"
> ('"X2GO-hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32"') "NX_AGENT"
> ('":50"') 2>"SESSION_LOG"
> ('"/tmp/.x2go-hacman/C-hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32/session.log"')
> &
> Jan 17 19:34:33 NeilBreen /usr/bin/x2gostartagent: successfully started
> X2Go agent session with ID hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32
> Jan 17 19:34:33 NeilBreen /usr/bin/x2gofeature: x2gofeature called with
> options: X2GO_RUN_EXTENSIONS
> Jan 17 19:34:33 NeilBreen
> /usr/share/x2go/x2gofeature.d/x2godesktopsharing.features:
> x2godesktopsharing.features called with options: X2GO_RUN_EXTENSIONS
> Jan 17 19:34:33 NeilBreen
> /usr/share/x2go/x2gofeature.d/x2goserver-extensions.features:
> x2goserver-extensions.features called with options: X2GO_RUN_EXTENSIONS
> Jan 17 19:34:34 NeilBreen /usr/bin/x2goserver-run-extensions:
> x2goserver-run-extensions called with options:
> hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32 post-start
> Jan 17 19:34:34 NeilBreen /usr/lib/x2go/x2gocreatesession[5688]:
> db_createsession called, session ID:
> hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32, cookie:
> be9d9e18c9184944fa1fcfa4d84e808f, client: 172.16.0.83, pid: 5648,
> graphics port: 45131, sound port: 45132, file sharing port: 45133
> Jan 17 19:34:36 NeilBreen /usr/lib/x2go/x2gogetstatus[5705]:
> db_getstatus called, session ID:
> hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32, return value: R
> Jan 17 19:34:39 NeilBreen /usr/lib/x2go/x2gogetstatus[5728]:
> db_getstatus called, session ID:
> hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32, return value: R
> Jan 17 19:34:42 NeilBreen /usr/lib/x2go/x2gogetstatus[5747]:
> db_getstatus called, session ID:
> hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32, return value: R
> Jan 17 19:34:46 NeilBreen /usr/lib/x2go/x2gogetstatus[5764]:
> db_getstatus called, session ID:
> hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32, return value: R
> Jan 17 19:34:49 NeilBreen /usr/lib/x2go/x2gogetstatus[5781]:
> db_getstatus called, session ID:
> hacman-50-1516217667_stS1XSHADhacmanXSHADPP0_dp32, return value: R
> 
> Many Thanks
> Richard
> 
> 
> _______________________________________________
> x2go-user mailing list
> x2go-user at lists.x2go.org
> https://lists.x2go.org/listinfo/x2go-user
> 


-- 
BAUR-ITCS UG (haftungsbeschränkt)
Geschäftsführer: Stefan Baur
Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.x2go.org/pipermail/x2go-user/attachments/20180119/91419b41/attachment-0001.sig>


More information about the x2go-user mailing list