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 : old file, not present in latest release - https://gitweb.gentoo.org/repo/gentoo.git/tree/net-misc/x2goserver/x2goserver-4.1.0.3-r1.ebuild - [x] which - [x] pwgen - [x] xhost - [x] xwininfo - [x] perl-Try-Tiny - [x] perl-Switch -------- Next -> On the server: ``` ➜ sudo rm -vf /var/lib/x2go/x2go_sessions; sudo x2godbadmin --createdb; sudo x2gocleansessions --debug Mot de passe : Tue May 11 12:42:30 2021 ::: debug ::: user-50-1620729717_stDxterm_dp32, pid 27658: does not exist, changing status from R to F Tue May 11 12:42:30 2021 ::: debug ::: user-50-1620729717_stDxterm_dp32: unmounting all shares Tue May 11 12:42:33 2021 ::: debug ::: user-50-1620729717_stDxterm_dp32: removed from database, not updating status. Tue May 11 12:42:33 2021 ::: debug ::: user-50-1620729717_stDxterm_dp32: in failed state, but agent is gone, forgetting. Tue May 11 12:44:31 2021 ::: debug ::: user-50-1620729841_stDxterm_dp24, pid 29416: does not exist, changing status from R to F Tue May 11 12:44:31 2021 ::: debug ::: user-50-1620729841_stDxterm_dp24: unmounting all shares Tue May 11 12:44:34 2021 ::: debug ::: user-50-1620729841_stDxterm_dp24: removed from database, not updating status. Tue May 11 12:44:34 2021 ::: debug ::: user-50-1620729841_stDxterm_dp24: in failed state, but agent is gone, forgetting. Tue May 11 12:47:54 2021 ::: debug ::: user-50-1620730042_stDxterm_dp24, pid 31944: does not exist, changing status from R to F Tue May 11 12:47:54 2021 ::: debug ::: user-50-1620730042_stDxterm_dp24: unmounting all shares Tue May 11 12:47:57 2021 ::: debug ::: user-50-1620730042_stDxterm_dp24: removed from database, not updating status. Tue May 11 12:47:57 2021 ::: debug ::: user-50-1620730042_stDxterm_dp24: in failed state, but agent is gone, forgetting. ``` Error on the client ``` Échec de la connexion Failed to start X2Go Agent session with ID user-50-1620730274_stDxterm_dp24. 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 started with ``--debug`` ``` x2go-DEBUG-../src/sshmasterconnection.cpp:2082> New exec channel created. x2go-DEBUG-../src/sshmasterconnection.cpp:2121> EOF on channel 0x7f1714017fa0; SshProcess object: 2 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:92557b92-6d22-410e-baba-48d477d5f9ee\nX2GODATAEND:92557b92-6d22-410e-baba-48d477d5f9ee\n" x2go-DEBUG-../src/sshprocess.cpp:538> Have stderr only, something must be wrong. x2go-DEBUG-../src/sshprocess.cpp:543> SSH finished: false - "Failed to start X2Go Agent session with ID user-50-1620730042_stDxterm_dp24. X2Go Agent terminated unexpectedly. Aborting session startup.\n" (2). x2go-DEBUG-../src/onmainwindow.cpp:5425> Agent output: "Failed to start X2Go Agent session with ID user-50-1620730042_stDxterm_dp24. X2Go Agent terminated unexpectedly. Aborting session startup.\n" ``` ``nxagent`` is not working, test graphically ``` [user@voidlinux ~]$ nxagent -ac :1 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 '29051'. Session: Starting session at 'Tue May 11 13:34:29 2021'. Info: Using alpha channel in render extension. nxagent: xcb_io.c:617: _XAllocID: Assertion `ret != inval_id' failed. Aborted ``` Help asked on https://github.com/ArcticaProject/nx-libs/issues/975#issuecomment-838345143