Hi all,
I would like to switch from freenx to x2go, but I don't use a well known distribution. I have LFS, Linux From Scratch -- a source based distribution.
I'm following the instructions from http://wiki.x2go.org/installing_x2goserver_tarball and INSTALL from the x2goserver tarball. but I fail to get it to work.
Firstly, the server dependencies are listed as:
perl-suid lsof openssh-client openssh-server libconfig-simple-perl makepasswd libdbd-pg-perl libdbd-sqlite3-perl xauth
I've installed everything except for perl-suid as this is no longer part of recent perl versions. Not sure how critical this is.
Then, I follow the installation details from x2goserver's INSTALL:
Set up x2gouser account and its group if they do not exist already:
$ addgroup --system x2gouser
$ adduser --system --no-create-home
--disabled-password --disabled-login
--shell /bin/false --group --home /var/lib/x2go x2gouser
Extract tarball and run
$ make install
in base folder of the extracted tarball.
Configure ownership, permissions and setuid user bit of x2gosqlitewrapper:
NOTE: The described action have already been performed by the Makefile run, leaving this here for documentation only.
$ chown root:x2gouser /usr/lib/x2go/x2gosqlitewrapper $ chmod 2755 /usr/bin/x2gosqlitewrapper
$ x2godbadmin --createdb
Create a simple init script that starts $PREFIX/sbin/x2gocleansessions on system start (runlevel 2-3-4-5).
Alternatively, you can add a single line to /etc/rc.local:
/usr/local/sbin/x2gocleansessions & ============= END QUOTE ================
Here, there's some debianism, these two commands, addgroup and adduser, must be some debian specific wrappers for groupadd and useradd. Can you please give me the regular groupadd and useradd command equivalents?
Also, in some documentation files, I've see mention of a group x2gousers, while here the group name is x2gouser. Which one is it?
Then there's the confusion of which packages I really need. So far I'm compiling the below packages in the following order:
nxcomp nxproxy nxcompshad nxcompext x2goserver x2goclient
I use git for pulling the source by the way.
Then I do $ chown root:x2gouser /usr/lib/x2go/x2gosqlitewrapper $ chmod 2755 /usr/bin/x2gosqlitewrapper
Then I run as roon x2godbadmin --createdb (I use sqlite) and finally
x2gocleansessions
Then from another computer I fire up the x2goclient, create a connection and try to initiate it. This is what I get in the console:
$ x2goclient ONMainWindow constructor
Can't load translator (:/x2goclient_en_us) !
Can't load translator :/qt_en_US ONMainWindows constructor finished, home Directory is: "/home/ivan"
read 2 sessions from config file start new ssh connection
setting SSH DIR to "/home/ivan/ssh" ssh connection ok
continue normal x2go session
"x2gostartagent 1024x768 adsl 16m-jpeg-9 unix-kde-depth_24 us pc105/us 0 D KDE"
Agent output: "50 4e95e90f6adaf1f7288f53a489a4e605 2449 ivan-50-1312372325_stDKDE_dp24 30004 30005 30006 " starting nxproxy with: "nxproxy -S nx/nx,options=/home/ivan/.x2go/S- ivan-50-1312372325_stDKDE_dp24/options:50"
" NXPROXY - Version 3.4.0
Copyright (C) 2001, 2010 NoMachine. See http://www.nomachine.com/ for more information.
Info: Proxy running in client mode with pid '3940'.
Session: Starting session at 'Wed Aug 3 14:52:17 2011'.
Info: Connecting to remote host 'localhost:30007'.
Info: Connection to remote proxy 'localhost:30007' established.
"
setting SSH DIR to "/home/ivan/ssh"
"channel_open_forward failed" : "Channel opening failure: channel 47 error
(2) Connection refused"
"channel_write failed" - "Remote channel is closed"
"Error: The remote NX proxy closed the connection.
"
"Error: Failure negotiating the session in stage '7'.
Error: Wrong version or invalid session authentication cookie.
Session: Terminating session at 'Wed Aug 3 14:52:18 2011'.
Session: Session terminated at 'Wed Aug 3 14:52:18 2011'.
"
deleting proxy
nxproxy not running
proxy deleted
check command message
"channel_open_session failed" : "Received SSH_MSG_DISCONNECT: Received ieof
for nonexistent channel 0."
If I try to login again, I get a window listing one running session, which I can't resume and an error message:
Connection failed channel_open_session failed - Received SSH_MSG_DISCONNECT: Received ieof for nonexistent channel 0.
In the debian installtion, I see you use sudo but in the INSTALL file this step is missing.
I've install sshfs anf fuse and I believe all the other dependencies.
My questions are:
Any help/hints/useful links you offer will be greatly appreciated. When I get
everything working, I will contribute a nice write-up for use on the wiki.
Modesty aside, I believe I write pretty clear and good documentation. As I'm
working on my own LFS-based distribution, I will be following the new releases
of x2go and will be updating the instructions too.
Thanks, IvanK.
Hi Ivan,
On Mi 03 Aug 2011 14:16:01 CEST Ivan Kabaivanov wrote:
I would like to switch from freenx to x2go, but I don't use a well known distribution. I have LFS, Linux From Scratch -- a source based distribution.
I'm following the instructions from http://wiki.x2go.org/installing_x2goserver_tarball and INSTALL from the x2goserver tarball. but I fail to get it to work.
Firstly, the server dependencies are listed as:
perl-suid lsof openssh-client openssh-server libconfig-simple-perl makepasswd libdbd-pg-perl libdbd-sqlite3-perl xauth
I've installed everything except for perl-suid as this is no longer part of recent perl versions. Not sure how critical this is.
This was critical and that's why we have very recently remove the
perl-suid dependency from upstream code.
Please use a very recent X2go server version from our Git repos:
http://code.x2go.org/gitweb?p=x2goserver.git;a=snapshot;sf=tgz
Then, I follow the installation details from x2goserver's INSTALL:
GREAT
========== BEGIN QUOTE ============ TARBALL INSTALLATION OF x2goserver
[...]
============= END QUOTE ================
Here, there's some debianism, these two commands, addgroup and adduser, must be some debian specific wrappers for groupadd and useradd. Can you please give me the regular groupadd and useradd command equivalents?
Yes, thank you for bringing this up. I have fixed this in the latest
INSTALL howto:
http://code.x2go.org/gitweb?p=x2goserver.git;a=commitdiff;h=4845ffbb364a0f1f...
Furthermore, I have updated the lower section of the howto, as well.
Whatever additional stuff who find and consider helpful, please post
it to this list.
Also, in some documentation files, I've see mention of a group x2gousers, while here the group name is x2gouser. Which one is it?
This has changed very recently (together with the perl-suid dependency
removal). It is now x2gouser. The x2gousers group was necessary in
earlier releases and is now optional when using the PostgreSQL db
backend (or can/should be dropped with SQLite db backend).
Then there's the confusion of which packages I really need. So far I'm compiling the below packages in the following order:
nxcomp -> server+client nxproxy -> client nxcompshad -> server nxcompext -> server x2goserver -> server x2goclient -> client
MISSING::: x2goagent ->server
I use git for pulling the source by the way.
Ah, great!
Then I do $ chown root:x2gouser /usr/lib/x2go/x2gosqlitewrapper $ chmod 2755 /usr/bin/x2gosqlitewrapper
This must have been an error in the old INSTALL howto. Please check
the new version.
Then I run as roon x2godbadmin --createdb (I use sqlite) and finally
x2gocleansessions
Ok...
Then from another computer I fire up the x2goclient, create a connection and try to initiate it. This is what I get in the console:
[...]
Again: your server seems to be missing the x2goagent binary (which is
the actual session's Xserver that application within the session can
connect to).
In the debian installtion, I see you use sudo but in the INSTALL file this step is missing.
Sounds like your Debian installation does not use the same packages as
in X2go Git.
Use this DebURL: deb http://packages.x2go.org/debian squeeze heuler
I've install sshfs anf fuse and I believe all the other dependencies.
Fuse: you have to add users that shall be able to use X2go local
folder sharing to the fuse group of your system (manually). I have
also updated that in the INSTALL howto.
My questions are:
- Any way to enable debugging on the server side
Yes, but only planned for x2goserver > 4.x. As the server-side is a
bunch of scripts you can modify them yourself (e.g. with the logger
command).
- Any way to enable debugging on the client side
Not so with x2goclient, but the pyhoca-gui (alternative client for
X2go) can do a lot of debugging.
pyhoca-gui --debug --libdebug
- Do I need to install and use x2goagent
YES!
Any help/hints/useful links you offer will be greatly appreciated.
When I get everything working, I will contribute a nice write-up for use on the wiki.
VERY NICE!
Modesty aside, I believe I write pretty clear and good documentation. As I'm working on my own LFS-based distribution, I will be following the
new releases of x2go and will be updating the instructions too.
WOW!!!
Thanks, IvanK.
Cheers, Mike
--
DAS-NETZWERKTEAM mike gabriel, dorfstr. 27, 24245 barmissen fon: +49 (4302) 281418, fax: +49 (4302) 281419
GnuPG Key ID 0xB588399B mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de
freeBusy: https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xf...
Sorry for the top post. Mike, thanks for your help and your latest commits. I got it all running. Surprisingly, or maybe not so surprisingly, if you follow the INSTALL file, you will get everything working pretty easily. With one small but crucial change. I had to create a wrapper for x2goagent and pass it LD_LIBRARY_PATH explicitely in order to prevent it from using the system x.org libs and failing rather mysteriously. First, when I compile nxcomp, I need to apply this patch, due to incorrect install invocation: diff -Naur nxcomp/Makefile.in.original nxcomp/Makefile.in --- nxcomp/Makefile.in.original 2011-08-17 16:48:30.792057703 +0300 +++ nxcomp/Makefile.in 2011-08-17 16:48:44.087057705 +0300 @@ -274,7 +274,7 @@ install.lib: all ./mkinstalldirs $(DESTDIR)$(prefix)/lib ./mkinstalldirs $(DESTDIR)$(prefix)/include - $(INSTALL) $(DESTDIR)$(prefix)/lib + $(INSTALL) -d $(DESTDIR)$(prefix)/lib $(INSTALL_DATA) libXcomp.so.3.* $(DESTDIR)$(prefix)/lib $(INSTALL_LINK) libXcomp.so.3 $(DESTDIR)$(prefix)/lib $(INSTALL_LINK) libXcomp.so $(DESTDIR)$(prefix)/lib And here's the wrapper I use: $ cat /usr/bin/x2goagent #!/bin/bash X2GO_LIBS=/usr/lib/x2go LD_LIBRARY_PATH=/usr/lib/x2go exec /usr/bin/x2goagent.original $@ I install just the libs required by x2goagent binary like so: mkdir -p /usr/lib/x2go/ make World cp -a lib/Xext/libXext.so* /usr/lib/x2go/ cp -a lib/X11/libX11.so* /usr/lib/x2go/ cp -a lib/Xpm/libXpm.so* /usr/lib/x2go/ cp -a lib/Xrender/libXrender.so* /usr/lib/x2go/ cp -a lib/Xfixes/libXfixes.so* /usr/lib/x2go/ cp -a lib/Xtst/libXtst.so* /usr/lib/x2go/ cp -a lib/Xdamage/libXdamage.so* /usr/lib/x2go/ cp -a lib/Xrandr/libXrandr.so* /usr/lib/x2go/ cp -a lib/Xcomposite/libXcomposite.so* /usr/lib/x2go/ install -m755 programs/Xserver/x2goagent /usr/bin/x2goagent.original And finally, I need to patch x2goclient because it's not consistent in its assumption of where the startkde script is: ~/x2goclient]# sed -i "s,/usr/bin/startkde,startkde,g" onmainwindow.cpp ~/x2goclient]# sed -i "s,startkde,/usr/local/kde/bin/startkde,g" onmainwindow_part3.cpp Mind you, I install kde in /usr/local/kde, and that's why I need these sed substitutions. If your kde prefix is in /usr, you should be ok. However, this brings up the question -- why donesn't x2go search in PATH for startkde, and instead hardcodes its location? Mike, if you'd like I'll send you another more detailed email with all the commands I used to install x2go. This email by the way is composed inside an x2go kde session :-) Thanks all, now I can rid myself of freenx and fully switch to x2go. IvanK. On Sunday 14 August 2011 21:38:13 Mike Gabriel wrote:
Hi Ivan,
On Mi 03 Aug 2011 14:16:01 CEST Ivan Kabaivanov wrote:
I would like to switch from freenx to x2go, but I don't use a well known distribution. I have LFS, Linux From Scratch -- a source based distribution.
I'm following the instructions from http://wiki.x2go.org/installing_x2goserver_tarball and INSTALL from the x2goserver tarball. but I fail to get it to work.
Firstly, the server dependencies are listed as:
perl-suid lsof openssh-client openssh-server libconfig-simple-perl makepasswd libdbd-pg-perl libdbd-sqlite3-perl xauth
I've installed everything except for perl-suid as this is no longer part of recent perl versions. Not sure how critical this is.
This was critical and that's why we have very recently remove the perl-suid dependency from upstream code.
Please use a very recent X2go server version from our Git repos:
http://code.x2go.org/gitweb?p=x2goserver.git;a=snapshot;sf=tgz
Then, I follow the installation details from x2goserver's INSTALL: GREAT
========== BEGIN QUOTE ============ TARBALL INSTALLATION OF x2goserver
[...]
============= END QUOTE ================
Here, there's some debianism, these two commands, addgroup and adduser, must be some debian specific wrappers for groupadd and useradd. Can you please give me the regular groupadd and useradd command equivalents?
Yes, thank you for bringing this up. I have fixed this in the latest INSTALL howto:
http://code.x2go.org/gitweb?p=x2goserver.git;a=commitdiff;h=4845ffbb364a0f1f 04f4a5337c5b977c450f38c6
Furthermore, I have updated the lower section of the howto, as well. Whatever additional stuff who find and consider helpful, please post it to this list.
Also, in some documentation files, I've see mention of a group x2gousers, while here the group name is x2gouser. Which one is it?
This has changed very recently (together with the perl-suid dependency removal). It is now x2gouser. The x2gousers group was necessary in earlier releases and is now optional when using the PostgreSQL db backend (or can/should be dropped with SQLite db backend).
Then there's the confusion of which packages I really need. So far I'm compiling the below packages in the following order:
nxcomp -> server+client nxproxy -> client nxcompshad -> server nxcompext -> server x2goserver -> server x2goclient -> client
MISSING::: x2goagent ->server
I use git for pulling the source by the way.
Ah, great!
Then I do
$ chown root:x2gouser /usr/lib/x2go/x2gosqlitewrapper $ chmod 2755 /usr/bin/x2gosqlitewrapper
This must have been an error in the old INSTALL howto. Please check the new version.
Then I run as roon x2godbadmin --createdb (I use sqlite) and finally
x2gocleansessions
Ok...
Then from another computer I fire up the x2goclient, create a connection and try to initiate it. This is what I get in the console:
[...]
Again: your server seems to be missing the x2goagent binary (which is the actual session's Xserver that application within the session can connect to).
In the debian installtion, I see you use sudo but in the INSTALL file this step is missing.
Sounds like your Debian installation does not use the same packages as in X2go Git.
Use this DebURL: deb http://packages.x2go.org/debian squeeze heuler
I've install sshfs anf fuse and I believe all the other dependencies.
Fuse: you have to add users that shall be able to use X2go local folder sharing to the fuse group of your system (manually). I have also updated that in the INSTALL howto.
My questions are:
- Any way to enable debugging on the server side
Yes, but only planned for x2goserver > 4.x. As the server-side is a bunch of scripts you can modify them yourself (e.g. with the logger command).
- Any way to enable debugging on the client side
Not so with x2goclient, but the pyhoca-gui (alternative client for X2go) can do a lot of debugging.
pyhoca-gui --debug --libdebug
- Do I need to install and use x2goagent
YES!
Any help/hints/useful links you offer will be greatly appreciated. When I get everything working, I will contribute a nice write-up for use on the wiki. VERY NICE!
Modesty aside, I believe I write pretty clear and good documentation. As I'm working on my own LFS-based distribution, I will be following the new releases of x2go and will be updating the instructions too.
WOW!!!
Thanks, IvanK.
Cheers, Mike
Hi Ivan,
On Mi 17 Aug 2011 16:06:35 CEST Ivan Kabaivanov wrote:
Sorry for the top post.
Mike, thanks for your help and your latest commits. I got it all running. Surprisingly, or maybe not so surprisingly, if you follow the INSTALL file, you will get everything working pretty easily. With one small but crucial change. I had to create a wrapper for x2goagent and pass it LD_LIBRARY_PATH explicitely in order to prevent it from using the system x.org libs and failing rather mysteriously.
This is great news. I will take a look at your mail more closely later
and incorporate needed changes into x2go upstream wherever appropriate.
Mike, if you'd like I'll send you another more detailed email with all the commands I used to install x2go.
Please, instead: write a LFS howto in the X2go wiki. This will
probably also help other people who have to use the tarball
installation method. THANKS! You should be able to auto-register for a
wiki account.
This email by the way is composed inside an x2go kde session :-)
Nice!
Thanks all, now I can rid myself of freenx and fully switch to x2go.
GREAT!!! Mike
--
DAS-NETZWERKTEAM mike gabriel, dorfstr. 27, 24245 barmissen fon: +49 (4302) 281418, fax: +49 (4302) 281419
GnuPG Key ID 0xB588399B mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de
freeBusy: https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xf...
Hi Ivan, On Mi 17 Aug 2011 16:06:35 CEST Ivan Kabaivanov wrote:
diff -Naur nxcomp/Makefile.in.original nxcomp/Makefile.in --- nxcomp/Makefile.in.original 2011-08-17 16:48:30.792057703 +0300 +++ nxcomp/Makefile.in 2011-08-17 16:48:44.087057705 +0300 @@ -274,7 +274,7 @@ install.lib: all ./mkinstalldirs $(DESTDIR)$(prefix)/lib ./mkinstalldirs $(DESTDIR)$(prefix)/include
$(INSTALL) $(DESTDIR)$(prefix)/lib
$(INSTALL) -d $(DESTDIR)$(prefix)/lib $(INSTALL_DATA) libXcomp.so.3.* $(DESTDIR)$(prefix)/lib $(INSTALL_LINK) libXcomp.so.3 $(DESTDIR)$(prefix)/lib $(INSTALL_LINK) libXcomp.so $(DESTDIR)$(prefix)/lib
Committed in your name: http://code.x2go.org/gitweb?p=nxcomp.git;a=commitdiff;h=fa3c1ddecc22c1b1a50a...
And here's the wrapper I use:
$ cat /usr/bin/x2goagent #!/bin/bash X2GO_LIBS=/usr/lib/x2go LD_LIBRARY_PATH=/usr/lib/x2go exec /usr/bin/x2goagent.original $@
This should not be necessary... With Debian it also works with libxcomp* being installed in /usr/lib. There used to be times when x2go shipped its own NX libs with /usr/lib/x2go as path, but that's not so any more. x2go uses pure NX libs, only x2goagent is a fork of nxagent.
I install just the libs required by x2goagent binary like so:
mkdir -p /usr/lib/x2go/
make World cp -a lib/Xext/libXext.so* /usr/lib/x2go/ cp -a lib/X11/libX11.so* /usr/lib/x2go/ cp -a lib/Xpm/libXpm.so* /usr/lib/x2go/ cp -a lib/Xrender/libXrender.so* /usr/lib/x2go/ cp -a lib/Xfixes/libXfixes.so* /usr/lib/x2go/ cp -a lib/Xtst/libXtst.so* /usr/lib/x2go/ cp -a lib/Xdamage/libXdamage.so* /usr/lib/x2go/ cp -a lib/Xrandr/libXrandr.so* /usr/lib/x2go/ cp -a lib/Xcomposite/libXcomposite.so* /usr/lib/x2go/
install -m755 programs/Xserver/x2goagent /usr/bin/x2goagent.original
Please check that again. That should not be necessary. It could be misleading if you put it like that in the X2go wiki. I bet there is another way with using default library paths.
And finally, I need to patch x2goclient because it's not consistent in its assumption of where the startkde script is:
~/x2goclient]# sed -i "s,/usr/bin/startkde,startkde,g" onmainwindow.cpp ~/x2goclient]# sed -i "s,startkde,/usr/local/kde/bin/startkde,g" onmainwindow_part3.cpp
Could you send a diff for that??? x2goclient should not refer to a hard coded path for startkde. @Alex: any idea about this: mike@minobo:~/MyDocuments/4projects/x2go-upstream/x2goclient$ grep -ri /usr/bin/startkde * onmainwindow.cpp: sessionCmd="/usr/bin/startkde"; x2goclient_de.ts: <source>/usr/bin/startkde</source> x2goclient_de.ts: <translation type="obsolete">/usr/bin/startkde</translation>
Mind you, I install kde in /usr/local/kde, and that's why I need these sed substitutions. If your kde prefix is in /usr, you should be ok. However, this brings up the question -- why donesn't x2go search in PATH for startkde, and instead hardcodes its location?
However, there currently are hard-coded path in the x2goserver (server!) script ,,x2goruncommand''. This is not optimal. @Alex: Should we migrate them to non-fullpath calls /usr/bin/gnome-terminal -> gnome-terminal etc.
Mike, if you'd like I'll send you another more detailed email with all the commands I used to install x2go.
Bye, Mike -- DAS-NETZWERKTEAM mike gabriel, dorfstr. 27, 24245 barmissen fon: +49 (4302) 281418, fax: +49 (4302) 281419 GnuPG Key ID 0xB588399B mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de freeBusy: https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xf...