Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: Install freenx
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3 ... 28, 29, 30  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Heschi
n00b
n00b


Joined: 24 Apr 2002
Posts: 12

PostPosted: Wed Aug 25, 2004 9:57 pm    Post subject: HOWTO: Install freenx Reply with quote

HOWTO: Install freenx

Download all these into the same directory:
From http://www.nomachine.com/sources.php -> 1.4.0 branch
    nx-X11-1.4.0-3.tar.gz
    nxagent-1.4.0-44.tar.gz
    nxauth-1.4.0-1.tar.gz
    nxcomp-1.4.0-12.tar.gz
    nxcompext-1.4.0-3.tar.gz
    nxdesktop-1.4.0-36.tar.gz
    nxproxy-1.4.0-2.tar.gz
    nxssh-1.4.0-15.tar.gz
    nxviewer-1.4.0-2.tar.gz

From http://freedesktop.org/~mornfall/debian/pool/n/nxserver/
    nxserver_0.1.orig.tar.gz
    nxserver_0.1-2.diff.gz

Emerge the nx client:
Code:
emerge nxclient
# this supplies some older versions of libraries/programs which we'll overwrite later

Extract:
Code:
find -name '*.tar.gz' -exec tar -xzf {} \;

Compile the NX X11 libraries and programs:
Code:
cd nx-X11
make World
# wait a while
# copy in the necessary libraries
cp -a lib/X11/libX11.so* /usr/NX/lib
cp -a lib/Xext/libXext.so* /usr/NX/lib
cp -a lib/Xrender/libXrender.so* /usr/NX/lib
# copy other libraries that were compiled with make World
cp programs/nxauth/nxauth /usr/NX/bin
cp programs/Xserver/nxagent /usr/NX/bin
cd ..
cp -a nxcomp/libXcomp.so* /usr/NX/lib
cp -a nxcompext/libXcompext.so* /usr/NX/lib

Make nxproxy:
Code:
cd nxproxy
./configure
make
cp nxproy /usr/NX/bin
cd ..

Make nxdesktop:
Code:
cd nxdesktop
./configure
make
cp nxdesktop /usr/NX/bin
cd ..

Make nxviewer:
Code:
cd nxviewer
xmkmf
make World
cp nxviewer/nxviewer /usr/NX/bin
cp nxpasswd/nxpasswd /usr/NX/bin
cd ..

Make nxssh:
Code:
cd nxssh
./configure
make
cp nxssh /usr/NX/bin
cd ..

Patch the freenx scripts:
Code:
gzcat nxserver_0.1-2.diff.gz|patch -p0

Fix a few miscellaneous bugs:
Code:
cd nxserver-0.1


    nxsetup:
    line 26: add a 'd' to ssh
    nxserver:
    line 19: add 'export LD_LIBRARY_PATH=/usr/NX/lib:$LD_LIBRARY_PATH'
    line 23: change NX_DIR to /usr/NX
    lines 703 and 705: add "echo" before the status messages:
    [ -f $NX_HOME_DIR/.ssh/authorized_keys2 ] && echo "NX> 110 NX Server is running"
    [ -f $NX_HOME_DIR/.ssh/authorized_keys2 ] && echo "NX> 110 NX Server is running"
    nxnode:
    line 20: get rid of the unused variable declaration and put in 'export LD_LIBRARY_PATH=/usr/NX/lib:$LD_LIBRARY_PATH
    change /usr/bin to /usr/NX/bin: (note: this is where those programs normally go, but I figured I'd put them in the /usr/NX dir)
    Code:
    perl -pi -e 's!/usr/bin/!/usr/NX/bin/!' nxnode


Install freenx:
Code:
chmod a+rx nxsetup nxserver nxnode
cp nxsetup nxserver nxnode /usr/NX/bin


Setup:
Code:
mkdir /home/.nx
/usr/NX/bin/nxsetup
passwd -u nx
env-update && ldconfig && source /etc/profile
# choose a user to run under NX
nxserver --adduser $USERNAME
nxserver --passwd $USERNAME


Done! You should now be able to connect to your server as the user you added and start a Gnome or KDE session.

A few caveats:
Session resuming doesn't seem to work. Nor does anything but Gnome/KDE. I think this is freenx's problem, not mine, but I don't want to investigate it right now. If anyone else wants to I can tell them what little I've learned.

Thanks to JG for ironing out this HOWTO with me.

Enjoy.
-Heschi
Back to top
View user's profile Send private message
djmaze
n00b
n00b


Joined: 25 Jun 2003
Posts: 36
Location: Berlin, Germany

PostPosted: Fri Aug 27, 2004 11:03 am    Post subject: Ebuilds available! Reply with quote

Hey,


I just saw this when I finished my ebuilds :lol:

You can find them at bugzilla! https://bugs.gentoo.org/show_bug.cgi?id=61874


Greetz,
Martin
Back to top
View user's profile Send private message
Heschi
n00b
n00b


Joined: 24 Apr 2002
Posts: 12

PostPosted: Fri Aug 27, 2004 7:53 pm    Post subject: Reply with quote

I see you're renaming NX's libX{render,ext} to whatever-nx. Are you absolutely positive that the NX compression still works when you do this?
Back to top
View user's profile Send private message
djmaze
n00b
n00b


Joined: 25 Jun 2003
Posts: 36
Location: Berlin, Germany

PostPosted: Fri Aug 27, 2004 9:09 pm    Post subject: Reply with quote

Those are special versions of the X libraries for the nxagent X-proxy! To be able to install them in /usr/lib along with the original X11 libraries, they had to be renamed!

This is straight from the debian builds. Peter Rockai made this patch. As you can see, he changed Makefiles and Defines likewise, so it works.

Sure NX compression works. I tried NX sessions to a remote workstation over a DSL link. This is really fast and responsive, like it should be :D


Just try it out.. it does no harm -
Back to top
View user's profile Send private message
Heschi
n00b
n00b


Joined: 24 Apr 2002
Posts: 12

PostPosted: Fri Aug 27, 2004 11:15 pm    Post subject: Reply with quote

All right, I'm a little surprised that it doesn't lose any functionality when the X applications don't use the NX libraries though. The ebuilds are an okay start, but won't install unless the user has nxserver in their PATH due to constant usage of $(which nxserver). Also, the client binary is semi-required for correct operation. Without nxclient installed, clicking on the close button of the connecting client will not do anything.
Back to top
View user's profile Send private message
djmaze
n00b
n00b


Joined: 25 Jun 2003
Posts: 36
Location: Berlin, Germany

PostPosted: Sat Aug 28, 2004 11:30 am    Post subject: Reply with quote

Quote:

The ebuilds are an okay start, but won't install unless the user has nxserver in their PATH due to constant usage of $(which nxserver).


I agree, this was not nice approach and has to be fixed.

Quote:
Without nxclient installed, clicking on the close button of the connecting client will not do anything.


What's this? You mean suspending of sessions?
Back to top
View user's profile Send private message
Heschi
n00b
n00b


Joined: 24 Apr 2002
Posts: 12

PostPosted: Sat Aug 28, 2004 6:45 pm    Post subject: Reply with quote

nxclient is the application providing the suspend/terminate/cancel dialog. Without it, that dialog never appears and there's no way to cleanly terminate the session. Just killing gnome-session seems to leave processes lying around.
Back to top
View user's profile Send private message
djmaze
n00b
n00b


Joined: 25 Jun 2003
Posts: 36
Location: Berlin, Germany

PostPosted: Sat Aug 28, 2004 7:47 pm    Post subject: Reply with quote

I don't understand. You installed the nxclient application on the server??
Back to top
View user's profile Send private message
Heschi
n00b
n00b


Joined: 24 Apr 2002
Posts: 12

PostPosted: Sat Aug 28, 2004 8:13 pm    Post subject: Reply with quote

Correct. Doesn't make much sense to me, either, but that's how they (nomachine) did it.
Back to top
View user's profile Send private message
djmaze
n00b
n00b


Joined: 25 Jun 2003
Posts: 36
Location: Berlin, Germany

PostPosted: Sat Aug 28, 2004 8:16 pm    Post subject: Reply with quote

Interesting! I didn't know that. I'll inform Stu Herbert who takes over the ebuild work.
Back to top
View user's profile Send private message
djmaze
n00b
n00b


Joined: 25 Jun 2003
Posts: 36
Location: Berlin, Germany

PostPosted: Sat Aug 28, 2004 9:04 pm    Post subject: Reply with quote

I just tried reconnecting after suspending a session. Instead of being presented a dialog asking me whether to continue the old or begin a new session, a new session was being created without asking me!

I was not able to reconnect to the old session. The only solution was to kill the session on the server, using
Code:
nxserver --terminate [username]


Do you experience the same problems?


Martin
Back to top
View user's profile Send private message
Heschi
n00b
n00b


Joined: 24 Apr 2002
Posts: 12

PostPosted: Sun Aug 29, 2004 12:30 am    Post subject: Reply with quote

Yeah, I did. I don't think freenx supports suspending sessions.
Back to top
View user's profile Send private message
djmaze
n00b
n00b


Joined: 25 Jun 2003
Posts: 36
Location: Berlin, Germany

PostPosted: Sun Aug 29, 2004 2:10 am    Post subject: Reply with quote

It does! Just try the new Knoppix version 3.6! Works wonderful there.
Back to top
View user's profile Send private message
Spearhead
n00b
n00b


Joined: 30 Aug 2004
Posts: 7

PostPosted: Mon Aug 30, 2004 12:02 pm    Post subject: Reply with quote

Hi, thanks for putting together this HOWTO, but i have a small problem with it... i get up to this point:

Quote:

Patch the freenx scripts:

Code:
gzcat nxserver_0.1-2.diff.gz|patch -p0


And then i get the error message
"gzcat: nxserver_0.1-2.diff.gz: not in gzip format"

What can i do?

EDIT: Never mind, downloaded the file with another program and it worked... i hope the rest'll work as well ;)
Back to top
View user's profile Send private message
Spearhead
n00b
n00b


Joined: 30 Aug 2004
Posts: 7

PostPosted: Mon Aug 30, 2004 1:06 pm    Post subject: Reply with quote

OK, now i have a new problem... i followed all the steps and the installation succeeded.

BUT, i tried to connect using the NX Client for Windows, it gets to the point where it succeeds authenticating the user, but then the connection times out after a while....

Here's the output i get when i click under details:
Quote:

NX> 203 NXSSH running with pid: 2528
NX> 200 Connected to address: 192.168.0.103 on port: 22
NX> 202 Authenticating user: nx
NX> 208 Using auth method: publickey
HELLO NXSERVER - Version 1.4.0-01 OS (GPL)
NX> 105 Hello NXCLIENT - Version 1.3.2
NX> 105 SET SHELL_MODE SHELL
NX> 105 SET AUTH_MODE PASSWORD
NX> 105 login
NX> 101 User: spearhead
NX> 102 Password:
NX> 103 Welcome to: machalert user: spearhead
NX> 105 startsession --session="Zweitpc" --type="unix-kde" --cache="8M" --images="32M" --cookie="643cf934bf518cf46d41815bf311bf6b" --link="lan" --backingstore="never" --geometry="fullscreen" --keyboard="de" --kbtype="pc102/de" --media="0" --agent_server="" --agent_user="" --agent_password=""

NX> 105


Anyone got an idea what's wrong?
Back to top
View user's profile Send private message
djmaze
n00b
n00b


Joined: 25 Jun 2003
Posts: 36
Location: Berlin, Germany

PostPosted: Mon Aug 30, 2004 1:27 pm    Post subject: Reply with quote

Hmm.. you would have better tried the ebuilds! I struggled the same way as you. So, why have the hassle again?

http://www.strahlungsfrei.de/nxserver-ebuilds.tar.bz2

Just unpack this into /usr/local/portage (create if it doesn't exist) and do

Code:
ACCEPT_KEYWORDS=~x86 PORTDIR_OVERLAY=/usr/local/portage/ emerge -p nxserver-free



This should work, even if you installed the things manually before.
Back to top
View user's profile Send private message
Spearhead
n00b
n00b


Joined: 30 Aug 2004
Posts: 7

PostPosted: Mon Aug 30, 2004 8:01 pm    Post subject: Reply with quote

ok, i'll try that, thanks... will post results :)
Back to top
View user's profile Send private message
Spearhead
n00b
n00b


Joined: 30 Aug 2004
Posts: 7

PostPosted: Mon Aug 30, 2004 9:15 pm    Post subject: Reply with quote

well, the building of the nxserver-free ebuild failed at the patch.

I then updated portage because i read that freenx is in there but now i get this error:

Quote:

>>> Updating Portage cache... \/usr/sbin/ebuild.sh: line 1102: /usr/portage/eclass/nxserver-1.4.eclass: No such file or directory

!!! ERROR: net-misc/nxserver-freenx-0.1 failed.
!!! Function inherit, Line 1103, Exitcode 1
!!! died sourcing /usr/portage/eclass/nxserver-1.4.eclass in inherit()


aux_get(): (0) Error in net-misc/nxserver-freenx-0.1 ebuild. (1)
Check for syntax error or corruption in the ebuild. (--debug)


Failed cache update: net-misc/nxserver-freenx-0.1 ...done!


Seems this will take some more time....
Back to top
View user's profile Send private message
sphantom
n00b
n00b


Joined: 16 Jul 2003
Posts: 72

PostPosted: Mon Aug 30, 2004 11:36 pm    Post subject: Reply with quote

djmaze wrote:
Hmm.. you would have better tried the ebuilds! I struggled the same way as you. So, why have the hassle again?

http://www.strahlungsfrei.de/nxserver-ebuilds.tar.bz2

Just unpack this into /usr/local/portage (create if it doesn't exist) and do

Code:
ACCEPT_KEYWORDS=~x86 PORTDIR_OVERLAY=/usr/local/portage/ emerge -p nxserver-free



This should work, even if you installed the things manually before.


yeah, as Spearhead alluded to, these ebuilds didn't work.

The first problem (spearheads), is that line 22 of nxserver-free-1.4.0.ebuild tries to change to a directory that doesn't exist - "/var/tmp/portage/nxserver-free-1.4.0/work/nxserver-free-1.4.0" when the archive only extracted a "/var/tmp/portage/nxserver-free-1.4.0/work/nxserver-1.4.0"..

Once i got that problem straightened out, it for some reason hangs at "Searching for nxserver binary". I spent about 5 minutes on this problem and eventually gave up.. it still might be a simple fix though..

I sync'd this morning and didnt see the free server any where in the portage tree... so for the meantime i guess im just gonna wait till one of the 2 work themselves out..

-sp
Back to top
View user's profile Send private message
Shaman
Apprentice
Apprentice


Joined: 12 Sep 2002
Posts: 167
Location: Kingston, ON

PostPosted: Tue Aug 31, 2004 1:00 am    Post subject: Reply with quote

NX won't compile with GCC 3.4.1 :(
Back to top
View user's profile Send private message
robostac
n00b
n00b


Joined: 26 Aug 2003
Posts: 34

PostPosted: Tue Aug 31, 2004 12:57 pm    Post subject: Reply with quote

All fixed now, I'd written a script called imake which called make with the intel compiler, which conflicted.

Last edited by robostac on Tue Aug 31, 2004 3:23 pm; edited 1 time in total
Back to top
View user's profile Send private message
skobar
n00b
n00b


Joined: 31 Aug 2004
Posts: 7

PostPosted: Tue Aug 31, 2004 1:42 pm    Post subject: Authetication for user nx failed... Reply with quote

I've installed the ebuilds and everything looks good, but as soon as i try to connect to the server (from localhost or with a knoppix-3.6 from a notebook) I get the following message:

Code:
NX> 203 NXSSH running with pid: 12937
NX> 200 Connected to address: 127.0.0.1 on port: 22
NX> 202 Authenticating user: nx
NX> 208 Using auth method: publickey
NX> 204 Authentication failed.


The following is the log from the sshd (debug mode):

Code:
debug1: sshd version OpenSSH_3.8.1p1
debug1: private host key: #0 type 0 RSA1
debug1: read PEM private key done: type RSA
debug1: private host key: #1 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #2 type 2 DSA
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
socket: Address family not supported by protocol
Generating 768 bit RSA key.
RSA key generation complete.
debug1: Server will not fork when running in debugging mode.
Connection from 127.0.0.1 port 37485
debug1: Client protocol version 2.0; client software version OpenSSH_3.4p1
debug1: match: OpenSSH_3.4p1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-1.99-OpenSSH_3.8.1p1
debug1: permanently_set_uid: 22/22
debug1: list_hostkey_types: ssh-rsa,ssh-dss
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST received
debug1: SSH2_MSG_KEX_DH_GEX_GROUP sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_INIT
debug1: SSH2_MSG_KEX_DH_GEX_REPLY sent
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: KEX done
debug1: userauth-request for user nx service ssh-connection method none
debug1: attempt 0 failures 0
Failed none for nx from 127.0.0.1 port 37485 ssh2
Failed none for nx from 127.0.0.1 port 37485 ssh2
debug1: userauth-request for user nx service ssh-connection method publickey
debug1: attempt 1 failures 1
debug1: temporarily_use_uid: 102/100 (e=0/0)
debug1: trying public key file /usr/NX/home/nx/.ssh/authorized_keys2
debug1: restore_uid: 0/0
debug1: temporarily_use_uid: 102/100 (e=0/0)
debug1: trying public key file /usr/NX/home/nx/.ssh/authorized_keys2
debug1: restore_uid: 0/0
Failed publickey for nx from 127.0.0.1 port 37485 ssh2
Connection closed by 127.0.0.1
debug1: do_cleanup
debug1: do_cleanup


I checked ~nx/.ssh/authorized_keys2 and /usr/NX/share/client.id_dsa.key (they are the same as on the knoppix laptop)

Publickey Authentication works for a 'normal' user - so sshd_config seems to be ok.

Any idea is welcome!
Back to top
View user's profile Send private message
robostac
n00b
n00b


Joined: 26 Aug 2003
Posts: 34

PostPosted: Tue Aug 31, 2004 5:37 pm    Post subject: Reply with quote

I had the same problem as above ^^

Fixed it by getting the nxsetup from the link at top of post(nxserver diff patch), and running that, then symlinking /usr/NX to /usr/NX.free. Seems to be working to connect now, though I haven't managed to get a remote session up yet, just gives a connection timeout.

[update]
Got it working, had to specify NX_HOME_DIR and NX_ETC_DIR to get it to work.


Code:
NX_HOME_DIR=/usr/NX/home/nx NX_ETC_DIR=/usr/NX/etc /usr/NX/bin/nxsetup


Just realised the box I was doing it to has no desktop managers installed, which has set me back a bit :)
Back to top
View user's profile Send private message
sphantom
n00b
n00b


Joined: 16 Jul 2003
Posts: 72

PostPosted: Wed Sep 01, 2004 12:55 am    Post subject: Reply with quote

just a little update from my end.. i installed the nxserver-freenx package in the portage tree, and am coming across the same "Authentication Failed" problem.

From what I've gathered the client is trying to basically ssh to nx@<servername>, and is expecting to use authorized_keys2... Since this is the case, One should be able to run "ssh nx@<server>" from the same client & username that the nxclient resides on.

Well I tried that, and its asking for a password instead of letting me in using my key.. so i'd venture a guess to say this might be why authorization is failing.. Unfortunately nothing I've done seems to force the server to accept the key.. I've setup ssh to do this many times before on many different machines, but conventional wisdom doesn't appear to be solving this problem for me..

Incidentally, i ripped into that nxsetup script, and it turned out to be relatively simple, only doing a few things, most of which the ebuild did. So I'm guessing its not the nxsetup script that's solving anything, its the whole 0.1-2 patch in general that the ebuild doesn't perform. Perhaps modifying the ebuild to apply this patch might help? The patch appears to be for debian, so I'd imagine the patch would have to be modified too.

I'm still very interested in getting the ebuild to do everything correctly the first time, so If anyone wants to compare notes, or have me do some testing, I'd be happy to..

-sp
Back to top
View user's profile Send private message
roshan
n00b
n00b


Joined: 18 Nov 2003
Posts: 22
Location: London

PostPosted: Wed Sep 01, 2004 8:03 am    Post subject: Portage E-build working Reply with quote

After unmasking the nxserver-freenx package, I was able to install it fine. I then followed the instructions given to add a user and set his password. I was then able to login fine with this username/password combination. The session suspend/resume feature didn't work for me either; it started a brand new session upon reconnect. Performance was quite good, though.

Code:
nxserver --adduser $USERNAME
nxserver --passwd $USERNAME

_________________
Smile - it makes people wonder what you're up to.
http://roshan.info
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2, 3 ... 28, 29, 30  Next
Page 1 of 30

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum