[X2go-User] [SOLVED] Re: Instructions for manual install from source tarballs on a less well-known distribution

Ivan Kabaivanov chepati at yahoo.com
Wed Aug 17 16:06:35 CEST 2011


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:
> > 
> > 1) 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).
> 
> > 2) 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
> 
> > 3) 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



More information about the x2go-user mailing list