New comment by eoli3n on void-packages repository https://github.com/void-linux/void-packages/issues/30781#issuecomment-837297270 Comment: sqlite db exists in ``/var/lib/x2go/x2go_sessions`` some references: - https://lists.x2go.org/pipermail/x2go-user/2019-March/005522.html : no answer - https://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=1482 : no answer -------- to print real error, edit ``/usr/lib/x2go/x2gocheckport`` at line 131 ``` # Filter out any empty or invalid values. typeset -i item_i='0' typeset item='' # add echo of the var between delimiters echo "##### ${used_display_ports_work[@]} #####" for item in "${used_display_ports_work[@]}"; do item_i="${item}" ``` real error is ``` Can't locate Switch.pm in @INC (you may need to install the Switch module) (@INC contains: /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl) at /usr/lib/x2go/libx2go-server-db-sqlite3-wrapper.pl line 23. BEGIN failed--compilation aborted at /usr/lib/x2go/libx2go-server-db-sqlite3-wrapper.pl line 23. ``` ``` cpan install Switch ``` solved it, but it is not packaged in the repo - [x] create ``perl-Switch`` package -------- now i get ``` DBI connect('dbname=/var/lib/x2go/x2go_sessions','',...) failed: unable to open database file at /usr/share/perl5/vendor_perl/X2Go/Server/DB/SQLite3.pm line 66. ``` following https://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=1063 ``` ➜ x2golistsessions DBIconnect('dbname=/var/lib/x2go/x2go_sessions','',...)failed:unabletoopendatabasefileat/usr/share/perl5/vendor_perl/X2Go/Server/DB/SQLite3.pmline66. ``` Fix with ``` chmod g+s /usr/lib/x2go/libx2go-server-db-sqlite3-wrapper chown root:x2gouser /usr/lib/x2go/libx2go-server-db-sqlite3-wrapper ``` See https://www.cvedetails.com/cve/CVE-2013-4376/ Note : in the ``INSTALL`` file... ``` 3.) SGID GROUP -------------- Configure ownership, permissions and setgid group bits of libx2go-server-db-sqlite3-wrapper and x2goprint: NOTE: The described actions have already been performed by the Makefile run, leaving this here for documentation only. $ chown root:x2gouser /usr/lib/x2go/libx2go-server-db-sqlite3-wrapper $ chmod 2755 /usr/lib/x2go/libx2go-server-db-sqlite3-wrapper $ chown root:x2goprint /usr/bin/x2goprint $ chmod 2755 /usr/bin/x2goprint $ chown 0440 /etc/sudoers.d/x2goserver ``` During the build the ``x2gouser`` group doesn't exist ``` ➜ ./xbps-src install x2goserver [...] ➜ sudo chroot masterdir /bin/bash bash-5.1# getent group x2gouser bash-5.1# ``` It seems that the test fo the group ``x2gouser`` during the build phase fails : https://github.com/eugenesan/x2goserver/blob/master/libx2go-server-db-perl/Makefile#L58 ``` getent group x2gouser &>/dev/null && chown root:x2gouser $(DESTDIR)$(LIBDIR)/libx2go-server-db-sqlite3-wrapper || true ``` - [x] add ``INSTALL`` file to automate this -------- Check spec to see if missing deps: https://github.com/eugenesan/x2goserver/blob/master/x2goserver.spec - [x] which - [x] pwgen - [x] net-tools - [x] perl-Try-Tiny - [x] perl-Switch -------- Now i get ``` Échec de la connexion xauth: file /home/user/.Xauthority does not exist xauth: (argv):1: bad display name "voidlinux:50" in "add" command Failed to start X2Go Agent session with ID user-50-1620685786_stDxterm_dp32. X2Go Agent terminated unexpectedly. Aborting session startup. ``` on the client, the file ``~/.x2go/C-user-50-1620727693_stDxterm_dp32/session.log`` ``` running as X2Go Agent NXAGENT - Version 3.5.99.26 Copyright (c) 2001, 2011 NoMachine (http://www.nomachine.com) Copyright (c) 2008-2014 Oleksandr Shneyder Copyright (c) 2011-2016 Mike Gabriel Copyright (c) 2014-2016 Ulrich Sibiller Copyright (c) 2014-2016 Mihai Moldovan Copyright (c) 2015-2016 Qindel Group (http://www.qindel.com) See https://github.com/ArcticaProject/nx-libs for more information. Info: Agent running with pid '24264'. Session: Starting session at 'Tue May 11 12:08:14 2021'. Error: Aborting session with 'Unable to open display 'nx/nx,options=/tmp/.x2go-user/C-user-50-1620727693_stDxterm_dp32/options:50''. Session: Aborting session at 'Tue May 11 12:08:14 2021'. Session: Session aborted at 'Tue May 11 12:08:14 2021'. ``` client debug log ``` x2go-DEBUG-../src/sshmasterconnection.cpp:764> SshMasterConnection, instance SshMasterConnection(0x5567175e86a0) waiting for thread to finish. x2go-DEBUG-../src/sshmasterconnection.cpp:1908> Disconnecting ... x2go-DEBUG-../src/sshmasterconnection.cpp:1917> Deleting channel connections. x2go-DEBUG-../src/sshmasterconnection.cpp:1923> Disconnecting session. x2go-DEBUG-../src/sshmasterconnection.cpp:1927> Deleting sockets. x2go-DEBUG-../src/sshmasterconnection.cpp:1932> All channels closed and session disconnected. Quitting session loop. x2go-DEBUG-../src/sshmasterconnection.cpp:766> SshMasterConnection, instance SshMasterConnection(0x5567175e86a0) thread finished. x2go-DEBUG-../src/sshprocess.cpp:52> SshProcess destructor called. x2go-DEBUG-../src/sshprocess.cpp:52> SshProcess destructor called. x2go-DEBUG-../src/sshmasterconnection.cpp:771> SshMasterConnection, instance SshMasterConnection(0x5567175e86a0) finished destructor. x2go-INFO-8> "Démarrage de la connexion au serveur : 192.168.100.194:22" x2go-DEBUG-../src/onmainwindow.cpp:2853> Starting new ssh connection to server:"192.168.100.194":"22" krbLogin: false x2go-DEBUG-../src/sshmasterconnection.cpp:168> SshMasterConnection, host "192.168.100.194"; port 22; user "user"; useproxy false; proxyserver ""; proxyport 22 x2go-DEBUG-../src/sshmasterconnection.cpp:248> Starting SSH connection without Kerberos authentication. x2go-DEBUG-../src/sshmasterconnection.cpp:250> SshMasterConnection, instance SshMasterConnection(0x7f17180093e0) created. x2go-DEBUG-../src/sshmasterconnection.cpp:495> SshMasterConnection, instance SshMasterConnection(0x7f17180093e0) entering thread. x2go-DEBUG-../src/sshmasterconnection.cpp:797> Session port before config file parse: 22 x2go-DEBUG-../src/sshmasterconnection.cpp:807> Session port after config file parse: 22 x2go-DEBUG-../src/sshmasterconnection.cpp:870> Session port before config file parse (part 2): 22 x2go-DEBUG-../src/sshmasterconnection.cpp:880> Session port after config file parse (part 2): 22 x2go-DEBUG-../src/sshmasterconnection.cpp:904> cserverAuth x2go-DEBUG-../src/sshmasterconnection.cpp:943> state: 1 x2go-DEBUG-../src/sshmasterconnection.cpp:1218> Trying password mechanism if available. x2go-DEBUG-../src/sshmasterconnection.cpp:1222> Password mechanism available. Continuing. x2go-DEBUG-../src/sshmasterconnection.cpp:687> User authentication OK. x2go-DEBUG-../src/sshmasterconnection.cpp:1708> LOGIN CHECK:"LOGIN OK\r\n" x2go-DEBUG-../src/sshmasterconnection.cpp:1711> don't have interaction x2go-DEBUG-../src/sshmasterconnection.cpp:1744> LOOP FINISHED x2go-DEBUG-../src/sshmasterconnection.cpp:1748> No interaction needed, continue session x2go-DEBUG-../src/sshmasterconnection.cpp:702> Login Check - OK x2go-DEBUG-../src/onmainwindow.cpp:2947> SSH connection established. x2go-DEBUG-../src/onmainwindow.cpp:3374> Continue normal X2Go session x2go-DEBUG-../src/sshprocess.cpp:199> Executing remote command via SshProcess object 0: "x2golistsessions" x2go-DEBUG-../src/sshprocess.cpp:213> this=SshProcess(0x556717980470) Running masterCon->addChannelConnection(this, '"cb9b7680-ab57-41da-beed-3a7e4c364a30"', '"bash -l -c 'echo \"X2GODATABEGIN:cb9b7680-ab57-41da-beed-3a7e4c364a30\"; export PATH=\"/usr/local/bin:/usr/bin:/bin\";export TERM=\"dumb\"; x2golistsessions; echo \"X2GODATAEND:cb9b7680-ab57-41da-beed-3a7e4c"'); x2go-DEBUG-../src/sshmasterconnection.cpp:1810> Locking SSH channel connection MUTEX. x2go-DEBUG-../src/sshmasterconnection.cpp:1812> Passing new channel connection object to channelConnections. x2go-DEBUG-../src/sshmasterconnection.cpp:1814> Unlocking SSH channel connection MUTEX. x2go-DEBUG-../src/sshmasterconnection.cpp:1977> Creating new channel. x2go-DEBUG-../src/sshmasterconnection.cpp:1990> New channel:0x7f17140164e0 x2go-DEBUG-../src/sshmasterconnection.cpp:2065> Executing remote: "bash -l -c 'echo \"X2GODATABEGIN:cb9b7680-ab57-41da-beed-3a7e4c364a30\"; export PATH=\"/usr/local/bin:/usr/bin:/bin\";export TERM=\"dumb\"; x2golistsessions; echo \"X2GODATAEND:cb9b7680-ab57-41da-beed-3a7e4c364a30\";'" x2go-DEBUG-../src/sshmasterconnection.cpp:2082> New exec channel created. x2go-DEBUG-../src/sshmasterconnection.cpp:2121> EOF on channel 0x7f17140164e0; SshProcess object: 0 x2go-DEBUG-../src/sshmasterconnection.cpp:2222> EOF sent. x2go-DEBUG-../src/sshmasterconnection.cpp:2224> Channel closed. x2go-DEBUG-../src/sshprocess.cpp:532> SSH finished: raw output (stdout): "X2GODATABEGIN:cb9b7680-ab57-41da-beed-3a7e4c364a30\n29416|user-50-1620729841_stDxterm_dp24|50|voidlinux|R|2021-05-11T12:44:01|c0ff2328004e6c6706dd647f9d56a476|192.168.100.1|30012|30013|2021-05-11T12:44:03|user|25|30014|-1|-1\nX2GODATAEND:cb9b7680-ab57-41da-beed-3a7e4c364a30\n" x2go-DEBUG-../src/sshprocess.cpp:543> SSH finished: true - "29416|user-50-1620729841_stDxterm_dp24|50|voidlinux|R|2021-05-11T12:44:01|c0ff2328004e6c6706dd647f9d56a476|192.168.100.1|30012|30013|2021-05-11T12:44:03|user|25|30014|-1|-1\n" (0). x2go-DEBUG-../src/onmainwindow.cpp:3861> "29416|user-50-1620729841_stDxterm_dp24|50|voidlinux|R|2021-05-11T12:44:01|c0ff2328004e6c6706dd647f9d56a476|192.168.100.1|30012|30013|2021-05-11T12:44:03|user|25|30014|-1|-1\n" x2go-DEBUG-../src/onmainwindow.cpp:4864> No shadow session. x2go-DEBUG-../src/onmainwindow.cpp:4887> "Decoding session string:29416|user-50-1620729841_stDxterm_dp24|50|voidlinux|R|2021-05-11T12:44:01|c0ff2328004e6c6706dd647f9d56a476|192.168.100.1|30012|30013|2021-05-11T12:44:03|user|25|30014|-1|-1" ```