Adempiere over NX
This short guide explain how to setup Nxserver and Adempiere to make it available for light client or easy deployment.
Install NX server
First you need to install the NXserver on your applications server.
Download the package form Nomachine website: http://www.nomachine.com/download.php
You must install package ( DEB or RPM) in this order:
- Nxclient, needed even for server
- Nxmanager, not needed but useful
You can add
/usr/NX/bin to your shell PATH for convenience.
Like all daemon Nxserver is managed with
Nxserver is own by the local user NX, their where the problem start, NX use
/bin/sh as shell, under many distribution it's not the default user shell (Bash under Debian, Ubuntu, Fedora, etc.) so you need to redone all the environment variable setting. Changing the
/etc/profile or /usr/NX/etc/node.cfg can be confusing and hazardous. The easiest way to do this is to make a small bash script.
#!/bin/bash # # Export environment variable # export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client export LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun export ADEMPIERE_HOME=/home/adempiere/Adempiere/ #export >> /home/adempiere/nxerror.log # # Run Adempiere # /home/adempiere/Adempiere/RUN_Adempiere.sh
Don't forget to set the execution bit on the script file.
Resumed session and session limit
By default the free edition of NXserver is session limited, only two clients session can run at the same time on the same server. One of the problem is the persistent session setting, by default NXserver don't close your session after the closing of the NXclient and let it run in backward. You can change it in the /usr/NX/etc/server.cfg file.
Allow the server to kill old resumed sessions if needed.
EnableAutokillSessions = "1"
Disable persistent sessions for users.
DisablePersistentSession = "all"
Configuration: Create a new session, setup server host and port, Desktop > Unix > Custom > setting > Run the following command > /distant path/adempiere nx script.sh