As promised last week, I am writing down the procedure of how to get FreeNX to work on Solaris. FreeNX use some options that either Solaris commands don't support (`egrep -q` etc), or use some commands that don't exist natively on Solaris (or on some older versions of Solaris) (mktemp, md5sum etc) hence make it not portable and work out of box on Solaris. I have made a patch to kinda fix all that (I hope) and will get to it in a bit.
Here are some requirements that you need to make sure your Solaris system meet before you play with FreeNX:
- sshd: I belive most people have had this installed on their systems. If not, please do so. FreeNX won't work without sshd running on the server.
- /usr/bin/expect: which is part of TCL/TK. If you have it installed somewhere else, please make a symbolic link to /usr/bin/expect.
- netcat: you can download the packaged version from sunfreeware or blastwave or you can get the source from here and compile it on your own.
- md5sum: we have a couple of options here:
- You don't need this if you are running Solaris 10 since a command called digest(1M) that comes with Solaris 10 can do the same thing (and even more).
- For older version of Solaris (8, 9 etc), you can download a package called SUNBEmd5 from here and the binary will be installed at /opt/SUNBEmd5.
- If you have openssl(1M) installed on your system then you don't have to worry about this. My patch will use it to generate MD5.
If your system meets all these requirements, then you are good to go:
- Download the NX Server Personal Edition and NX Client for Solaris packages from nomachine.com to your Solaris box and install the packages.
- Download the latest version of FreeNX from here and unzip/untar the package:
- Download the patch I made for FreeNX and apply it:
- Make sure you have a working expect(1M) somewhere and link it to /usr/bin/expect if you haven't done so.
- Now replace the the binaries installed from NoMachine's packages with FreeNX:
- Configure FreeNX and start the FreeNX server:
# cd /var/tmp # gzip -dc freenx-0.4.2.tar.gz | tar xvf -
# cd /var/tmp # wget http://unixlife.yi.org/freenx/freenx-0.4.2-solaris.diff # cd freenx-0.4.2 # gpatch -p1 < ../frenx-0.4.2-solaris.diff
# cp -pr /usr/NX/bin /usr/NX/bin.NoMachine # cd /var/tmp/freenx-0.4.2 # cp nx* /usr/NX/bin
# /usr/NX/bin/nxsetup --install --setup-nomachine-key --clean # passwd nx (to unlock account 'nx' and change its password) # chmod 01777 /tmp/.X11-unix # /usr/NX/nxserver --adduser rfang # cd /var/tmp/freenx-0.4.2/ # cp node.conf /etc/nxserver # cp init.nxserver /etc/init.d/nxserver # /usr/NX/bin/nxserver --restart
Now you can fire up your NX client and connect to your FreeNX server. Enjoy!
Note: this patch only fixes what I saw as a bug or wasn't working, and has only been tested on Solaris 9 and 10. Please feel free to drop me an email if you see something else not working (even after applying the patch), I will see what I can do to fix it.
G.Salazar said
These instructions are nice…there are not that many out there for Solaris, but say, now that FreeNX 0.5 is out, does the patch still apply?
And, say, if you have a chance, can you post or point me to a post about how to use the other packages? how does it work? if I download the NX Server from NoMachine as indicated above, does it come with nxnode? nxagent? etc?. What are those other packages for? how to use them? do they get used by nxserver out of the box?
So many questions, so few answers…I feel that the FreeNX group may be relying too much on the NoMachine documentation and not bothering to assemble a nice/friendlier user manual for FreeNX.
Patrick Petit said
Yes. I am also very interested testing FreeNX on Solaris. But I am having a real issue about the (almost) non existant documentation. Not sure exactly what I am doing following the install steps. Also, I do not understand the very predicate that FreeNX is a replacement of NX Server since the first thing being asked, prior to installing FreeNX, is to install NX’s server and client packages …? Why those dependencies? I think that both NX commercial editions and FreeNX lack of good documentation is a problem.
Danny Trinh said
I could download your patch. Can you post it again?
Danny Trinh said
I couldn’t download your patch. Can you post it again?
Leleduet said
thanks much, bro
Fred said
Does this work with Solaris on x86? I see that NoMachine only has Sparc packages available.
Gillian said
it’s the same for openSolaris?