ok, resending this after having subscribed to the x2go-dev list.
On Wednesday 17 August 2011 23:32:53 Mike Gabriel wrote: > > $ 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. Mike, please check the LFS server install wiki page. I wrote up the instructions for nxcomp, nxcompext, nxcompshad, nxproxy and x2goagentand will finish the rest tomorrow. As you'll see I'm installing libXcomp* in the standard /usr/lib path. However, looks like x2goagent is built from a modified x.org (6.9?) source tree and when linked at runtime with the system libX11 and other standard x.org libs it fails with an obscure message: ~/.x2go]$ cat C-ivan-50-1313618948_stDKDE_dp24/session.log NXAGENT - Version 3.5.0.2 Copyright (C) 2001, 2011 NoMachine. See http://www.nomachine.com/ for more information. Info: Agent running with pid '2457'. Session: Starting session at 'Thu Aug 18 01:09:11 2011'. Error: Aborting session with 'X2goagent: Unable to open display 'nx/nx,options=/home/ivan/.x2go/C-ivan-50-1313618948_stDKDE_dp24/options:50''. Session: Aborting session at 'Thu Aug 18 01:09:11 2011'. Session: Session aborted at 'Thu Aug 18 01:09:11 2011'. That's why I did an ldd on the x2goagent binary and copied just the 'custom' x.org libs into /usr/lib/x2go and put them in the wrapper. what I'll do is try to narrow down to the exact library that breaks x2goagent and just copy it. Not sure if there's a better approach. Don't wanna do a static build either... > > > 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. something like this? diff -Naur x2goclient/onmainwindow.cpp.original x2goclient/onmainwindow.cpp --- x2goclient/onmainwindow.cpp.original 2011-08-18 01:30:09.000000000 +0300 +++ x2goclient/onmainwindow.cpp 2011-08-18 01:31:11.000000000 +0300 @@ -2172,7 +2172,7 @@ } } - sessionCmd="/usr/bin/startkde"; + sessionCmd="startkde"; LDAPSndSys="ARTS_SERVER"; LDAPSndStartServer=true; startSound=false; diff -Naur x2goclient/x2goclient_de.ts.original x2goclient/x2goclient_de.ts --- x2goclient/x2goclient_de.ts.original 2011-08-18 01:30:33.000000000 +0300 +++ x2goclient/x2goclient_de.ts 2011-08-18 01:31:51.000000000 +0300 @@ -2192,8 +2192,8 @@ <translation>deaktiviert</translation> </message> <message> - <source>/usr/bin/startkde</source> - <translation type="obsolete">/usr/bin/startkde</translation> + <source>startkde</source> + <translation type="obsolete">startkde</translation> </message> <message> <location filename="sessionbutton.cpp" line="329"/> However, as I'm a KDE user, I can't test GNOME and LXDE. > > @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. > How about this: diff -Naur x2goserver/x2goserver/bin/x2goruncommand.original x2goserver/x2goserver/bin/x2goruncommand --- x2goserver/x2goserver/bin/x2goruncommand.original 2011-08-18 01:47:13.000000000 +0300 +++ x2goserver/x2goserver/bin/x2goruncommand 2011-08-18 01:55:14.000000000 +0300 @@ -83,19 +83,18 @@ if [ "$cmd" == "TERMINAL" ]; then IMEXIT="true" - if [ -e "/usr/bin/konsole" ]; then - cmd="/usr/bin/konsole" + if bash +h -c "type konsole" > /dev/null 2>&1; then + cmd=`type konsole | awk '{print $3}'` # KDE4 konsole behaves differently from other terminals IMEXIT="false" - elif [ -e "/usr/bin/gnome-terminal" ]; then - cmd="/usr/bin/gnome-terminal" - elif [ -e "/usr/bin/lxterminal" ]; then - cmd="/usr/bin/lxterminal" - elif [ -e "/usr/bin/rxvt" ]; then - cmd="/usr/bin/rxvt" - elif [ -e "/usr/bin/xterm" ]; then - cmd="/usr/bin/xterm" - fi + elif bash +h -c "type gnome-terminal" > /dev/null 2>&1; then + cmd=`type gnome-terminal | awk '{print $3}'` + elif bash +h -c "type lxterminal" > /dev/null 2>&1; then + cmd=`type lxterminal | awk '{print $3}'` + elif bash +h -c "type rxvt" > /dev/null 2>&1; then + cmd=`type rxvt | awk '{print $3}'` + elif bash +h -c "type xterm" > /dev/null 2>&1; then + cmd=`type xterm | awk '{print $3}'` fi EXEC=`which $cmd` actually I would remove 'which' altogether. However, type is a bash built-in function if I'm not mistaken, so on distributions where bash is not the default shell, this may present problems... I didn't find the location of startkde hardcoded anywhere in x2goserver. IvanK. _______________________________________________ X2go-Dev mailing list [email protected] https://lists.berlios.de/mailman/listinfo/x2go-dev
