Archive for March, 2006

Work late Friday

It's Friday, but I had to stay late and reset a Sun StorEdge 6320 array used by the developers. We had a planned power outage on 1/7 and some of the trays on this array had blue lights on them for whatever reason we didn't know. I opened a case with Sun but they didn't figure out what caused the blue lights since they couldn't telnet to those trays from the SSP to gather logs. So the only thing we could do is to reset the whole array and make the blue lights go away. The array has just been reset and all the blue lights went away. Not that exciting, but at least I can go home and enjoy a good weekend!

Leave a Comment

Patch for FreeNX – fix ‘egrep -q’ and ‘ls –time-style’

Here is a another patch I made for FreeNX againt the SVN rev 204. It fixes 'egrep -q' and 'ls –time-style' that are not supported on Solaris. I have just submitted the patch to the FreeNX mailing list for review.

Comments (1)

How to get FreeNX to work on Solaris

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

  1. Download the NX Server Personal Edition and NX Client for Solaris packages from nomachine.com to your Solaris box and install the packages.
  2. Download the latest version of FreeNX from here and unzip/untar the package:
  3. # cd /var/tmp
    # gzip -dc freenx-0.4.2.tar.gz | tar xvf -
  4. Download the patch I made for FreeNX and apply it:
  5. # 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
  6. Make sure you have a working expect(1M) somewhere and link it to /usr/bin/expect if you haven't done so.
  7. Now replace the the binaries installed from NoMachine's packages with FreeNX:
  8. # cp -pr /usr/NX/bin /usr/NX/bin.NoMachine
    # cd /var/tmp/freenx-0.4.2
    # cp nx* /usr/NX/bin
  9. Configure FreeNX and start the FreeNX server:
  10. # /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.

Comments (7)

Trying out NoMachine NX on Solaris 10

I had heard people talking about FreeNX and claiming how fast it was lately. I am always interested in new things, so I decided to give it a try last weekend. The part I really wanted to see is how fast this thing could be, especially how faster it could be than VNC (which is what I have been using) on a slow link.

Before I started messing with FreeNX, I started with NoMachine's 30 days eval version of NX Server for Solaris Evaluation trying to get some basic sense of how it works. The package installation was very straightforward and the only thing you would need is the 30 days eval license for the NX server to work (you can get it from here). Following the package installation, I ran:

  # /usr/NX/bin/nxsetup --install solaris
  # /usr/NX/bin/nxserver --start

Not problems so far. Now the NX server had been set up and already running on the system. Then I downloaded the free NX client for Windows from NoMachine and installed it on my Windows box (yeah yeah, I do use Windows, this can be another long discussion). Fired off the NX client and did some configuration then started connecting to the NX server. I was surprised to see that CDE started very fast, and I felt it definitely started faster than VNC running on the same server. Starting up GUI and moving it around was very smooth and responsive, and I could barely feel the delay. It felt like running the CDE locally. I was very happy with the result. But I didn't like the fact that the eval license would expire in 30 days and I knew I wouldn't have money to buy one from NoMachine. So I started looking at the FreeNX option. I downloaded the latest version from FreeNX website and followed the guide to install it. But FreeNX didn't work out of box on Solaris. There are also some commands or command options that are not supported natively on Solaris or some older version of Solaris. After a few hours of tweaking, I finally got FreeNX working on my Solaris 10 box. Here is a screenshot I took:

FreeNX on Solaris 10

I did all the tests in my home LAN during the weekend. So you might wonder how fast it could go to connect from my office to the NX server running on a Solaris box in my basement, I wonder too! So first thing I did after I came to my office this morning was install the NoMachine NX Windows client and connect to my home machine running NX server. I was so amazed to see that the speed was much much faster than VNC over the same network link, holy! At that point, I have decided to replaced all the VNC crap on my servers.

Did I mention that 1) the authentication between the NX server and the client is done through SSH (publickey) 2) all the traffic between the NX server and client could be encrypted using SSL? Still not convinced? Just try it out yourself and you will find out. If you want to get FreeNX working on a Solaris box, please stay tuned, I will open another entry tomorrow and talk about that.

Comments (1)

A little fight with smpatch

This morning I was trying to patch a bunch of V240 boxes and get them ready for the EMC array. As always, I ran my beloved smpatch analyze but surprisingly it didn't work as expected:

  # smpatch analyze
  unknown host (updateserver.sun.com) connecting to https://updateserver.sun.com/solaris/

This happed to me once last year after I patched WBEM. So I thought maybe WBEM needed to be restarted before it felt like to work today. I did the restart but it still complained about the "Unknow host". Urhhh…

Now it made me think that /etc/resolv.conf might be the problem. Well then I tried to open the file but found it was gone! No biggy, I just created a new one with all the nice name servers in it. Now smpatch should be happy, you would think? No, it wasn't! Still complained about the same thing!

This brought me directly to /etc/nsswitch.conf, which had something like this in it:

hosts: cluster files

Ah, that was it. I had no idea why dns was removed from the line! It might be done by somebody's hands or by a patch. I will have to find that out when I get some time later.

Leave a Comment

Not my first blog, but one that I am going to stick with for a while

This isn’t my first blog, I had one before at BlogSpot. I have just been busy and lazy to write up things that came cross my mind. This time I am going to try to stick with it. We will see.

Leave a Comment