Setting up Neatx

I’ve been using the free version of the NX server from nomachine to access my Linux hosts and it’s been working really well. I’ve set it up at work to allowed shared access to our compute server, however we’ve run into an issue here. The free version limits how many people can use the server. Now we really don’t need the support and this isn’t like a big production shop where we need a rock solid version, so I started looking for open source alternatives. I found FreeNX, but development there seems to have paused for now. I then found Neatx. It’s hosted on google code and appears to be a little rough around the edges, but people claim it works.

There isn’t an installer, but I’m a developer, so I figured this shouldn’t be too bad. Turns out that after about 2 hours this evening I was able to get it going. Here are the steps that I followed. Note that I’m doing this on opensuse 11.3. The instructions should work elsewhere though.

  1. Install nxclient, nxnode, and nxserver from nomachine’s website. I grabbed the RPMs for opensuse and they installed just fine. I had originally done this because these were the binaries I was using, as it turns out I need some libraries from there for neatx to run properly.
  2. Copy the libraries off to the side to use later. If someone knows how to get around this step, I’d be very happy.
    • sudo cp -r /usr/NX/lib /usr/local/nx-lib
  3. Remove nxclient, nxnode, and nxserver. We don’t need them now.
  4. mkdir nx
  5. cd nx
  6. Download the following source files from nomachine’s opensource site. My downloads were version 3.4.0, but there may be a newer version out when you read this.
    • nxagent-3.4.0-11.tar.gz
    • nxauth-3.4.0-3.tar.gz
    • nxcomp-3.4.0-7.tar.gz
    • nxcompext-3.4.0-1.tar.gz
    • nxcompshad-3.4.0-3.tar.gz
    • nxproxy-3.4.0-2.tar.gz
    • nx-X11-3.4.0-4.tar.gz
  7. Untar the sources: for i in *.tar.gz; do tar -xzf $i; done
  8. cd nx-X11
  9. make World
  10. sudo cp programs/Xserver/nxagent /usr/local/bin/nxagent.real
  11. Now here is where we use the libraries. I tried finding all of the libraries in the sources that I built, but they weren’t enough, something was still missing. So you need to create /usr/local/bin/nxagent as a script with the following content:
    • #!/bin/bash
    • export LD_LIBRARY_PATH=/usr/local/nx-lib
    • exec /usr/local/bin/nxagent.real “$@”
  12. Download neatx from svn. Note that there aren’t any packages when I did this.
    • svn co neatx-read-only
  13. Follow the instructions in neatx-read-only/neatx/INSTALL
  14. Fix the instructions on nx’s home dir
    • sudo chown -R nx ~nx
  15. Edit /usr/local/etc/neatx.conf to match your system. Some paths will likely need to be changed.

You should now have neatx setup. Connect to it from any NX client and give it a try. The default neatx.conf has the loglevel set to debug. Leave this on until you’ve successfully connected, then change it to info to keep your logs from getting real full. I spent a lot of time looking through the output of the debug logs for errors in my setup. Neatx is written in python, although you don’t need to know the language to be able to debug most of the errors.

Tips for brother printers

Brother makes great, inexpensive laser printers. However the technology that they use to determine when you need new toner is a little too conservative. I’ve found that it states that I need more toner when there is still quite a bit of toner left. Unfortunately at this point the printer will refuse to print anymore pages unless you replace the toner, or make it believe there is more toner. Being the frugal person that I am, I like to print all the way to the end of my toner. Here’s what I’ve done to be able to print all of the way to the end of a toner cartridge.

If you have a black and white laser printer, then you need some black electrical tape. Other tape may work, but this is what I’ve used. You pull out the toner cartridge and note that on each end of the cartridge you’ll see a round, clear plastic window. The printer shoots some light down this and if the light reaches the other end, you’re told that you need more toner. If you put a piece of black tape across these windows then the printer believes that the toner cartridge is still full. Granted now the only way to know that you’re low on toner or out is that things don’t print so well. However you are able to print to the end of the toner cartridge.

If you have a color printer, the process is a little different. I purchased a HL-4040CDN and found that the black tape trick didn’t work. Instead I dug up these instructions at fix your own printer.

  1. Open the front cover of the printer
  2. Press and hold the cancel button
  3. Press the reprint button while still holding cancel
  4. Here is the reset menu
  5. Go to the appropriate cartridge on the menu and reset it and you’re done!

FYI… Pressing the “Go” button and the up arrow gives you the parts life reset menu (drum, laser, fuser, etc.).