Running NX On Gentoo Linux Stuart Herbert This guide shows you how to install and upgrade NoMachine's NX server and client products. 1.0 July 7, 2004 Introduction
What Is NX?

NX is a server/client solution for connecting to your X11 desktop from another machine. It's the UNIX equivalent of Microsoft's Terminal Services and Remote Desktop Connection. The server component is available for a number of Linux distributions, and for other UNIX platforms too. The client is available for all the server platforms, and for Microsoft Windows.

One of NX's great strengths is its built-in compression support. This makes it possible to remotely use your X11 desktop over low-bandwidth links (802.11 WiFi, cable and broadband, and satelite links) with little or no loss in performance. To see for yourself, NoMachine offer remote access to their Test Drive server, so that you can try before you buy.

The latest version of NX - currently in beta testing - will allow you to reconnect to an NX session you previously used. Think screen -rd for X11, and you'll be on the right track. (And shame on you if you don't know screen ;-)

Obtaining An NX License

NX is a commercial product. To use the NX Server on Gentoo Linux, you must first purchase an NX Server license from http://www.nomachine.com. The NX Client can be installed and used without a license.

There are three different editions of NX Server available: personal, small business edition, and enterprise. The only difference that I know of between the different editions is the number of users that each edition supports. Please make sure that you buy a license for the right edition!

When you purchase your license, you will be asked which operating system you are buying for. Unfortunately, the NoMachine website doesn't list Gentoo Linux as one of the choices. Please buy a license for 'RedHat 9.0'. We use the 'RedHat 9.0' binaries for NX on Gentoo Linux.

There is no need for you to download any software from NoMachine's website. Portage will do this for you when you use emerge.
Supported Platforms

At the moment, NX is only availble on the x86 platform. amd64 and ia32 users may have success too, but as I don't have either of these hardware platforms, I can't test or support NX on them for now. If anyone would like to donate ia32 or amd64 hardware to help me support NX on these platforms, please contact me via email.

Acknowledgements

I'd like to thank Gian Filippo Pinzari and all the staff at NoMachine for their help and support in bringing NX to Gentoo Linux.

Just to be clear: I am not an employee of NoMachine, and I'm not connected with the company in any way. I'm just a very satisfied customer. Most of my Gentoo work is done via NX, so for me it's one of the most important packages that I look after in Gentoo Linux.

NX Server
Choosing The Correct Edition

Before installing NX Server on Gentoo Linux, please make sure you have chosen the correct edition for yourself or your organisation. You should have received a license key file when you purchased your license. Hang on to that key - you will need it shortly.

Installing NX Server

There are three different ebuilds in Portage, one for each of the different editions of NX Server. To install the correct edition, please run one of the following commands:

(for NX Server Personal Edition)
# emerge -u nxserver-personal
(for NX Server Small Business Edition)
# emerge -u nxserver-business
(for NX Server Enterprise Edition)
# emerge -u nxserver-enterprise
Make sure you install the correct edition of NX Server. The license key that you purchased will only work with corresponding edition of NX Server!

Portage will automatically download, compile and install NX Server and all its dependencies. When Portage has finished, there will be a message on your screen explaining any manual configuration you have to do to complete the install.

When you install NX Server, Portage will automatically install NX Client for you too. NX Server relies on files installed by NX Client. If you manually remove NX Client in the future, your NX Server installation will stop working.
Running NX Server

Please refer to the documentation on the NoMachine website.

Upgrading NX Server

If you wish to upgrade to a later version of the same edition of NX Server, just run:

(for NX Server Personal Edition)
# emerge -u nxserver-personal
(for NX Server Small Business Edition)
# emerge -u nxserver-business
(for NX Server Enterprise Edition)
# emerge -u nxserver-enterprise

Portage will automatically download and install the latest available version of your edition of NX Server for you. If there are any manual configuration steps required at the end of the installation, Portage will display a message telling you what you need to do.

Switching To A Different Edition Of NX Server

If you wish to change from one edition of NX Server to another (for example, from Personal to Small Business), please run the following commands:

rm -f /usr/portage/distfiles/nxserver*.rpm
emerge -C nxserver-personal
emerge -u nxserver-business

The rm -f step is necessary because NoMachine use identical filenames for the RPMs for each edition of NX Server. Unfortunately, although the filenames are the same, the contents of the files are not. This unusual approach isn't compatible with Portage's checksum (and soon, signed package) support. If you do not rm -f your old NX Server RPM file, you will get an error from Portage.

Reporting Bugs About NX Server

You can report bugs about NX Server on Gentoo Linux to our bug-tracking system. If the bug is in NX itself, rather than in Gentoo Linux, we can report it upstream to NoMachine for you.

NX Client
Installing NX Client

No matter what edition of NX Server you have chosen, NX Client can talk to them all. To install NX Client, please run these commands:

# emerge -u nxclient
# env-update
# source /etc/profile

Portage will automatically download, compile, and install NX Client and all its dependencies. When Portage has finished, there will be a message on the screen explaining any manual configuration you have to do to complete the install.

NX Client lives in /usr/NX/bin. Portage automatically adds this directory to your PATH.

Using NX Client

To use NX Client on Gentoo, simply run this command from your favourite xterm:

# nxclient

The dialog box that appears should be self-explanatory. If you need any further help, please consult the documentation on the NoMachine website.