Welcome to my website. I am always posting links to photo albums, art, technology and other creations. Everything that you will see on my numerous personal sites is powered by the formVistaTM Website Management Engine.

icon.linkedin.jpgicon.twitter.jpg

  • Subscribe to this RSS Feed
  • How To Install NoMachine's NX Server and NX Client
    08/30/2012 10:50AM

    Following is a quick howto for installing the NoMachine free version of NXServer:

    . Make sure that you have a DNS entry for the hostname of your NX Server machine or an entry in the server's /etc/hosts file that points to it's IP.

    . rpm -i nxclient-3.5.0-7.x86_64.rpm
    . rpm -i nxnode-3.5.0-7.x86_64.rpm
    . rpm -i nxserver-3.5.0-9.x86_64.rpm

    . copy stock config file to server.cfg:
            . # cd /usr/NX/etc
            . # cp server.cfg server.cfg_oem
            . # cp server-redhat.cfg.sample server.cfg

    . edit config files:
            . /usr/NX/etc/server.cfg: ensure that the following values are set:
                    . EnablePasswordDB = "0"
                    . EnableStatistics = "0"
                    . EnableNodeMonitoring = "0"
                    . EnableUserProfile = "0"

            . /usr/NX/etc/node.cfg
                    . EnableSensor = "0"

    . generate SSH keys:
            . /usr/NX/bin/nxserver --keygen
            . use the key: /usr/NX/share/keys/default.id_dsa.key in the NX Client config when making a connection to your server

  • Solution for 'Server configuration error. Cannot log in. Please contact your system administrator' for NXServer/NXClient Session
    08/30/2012 10:38AM

    I am setting up a vm running CentOS 6.2 and want to be able to connect to it via NXClient.

    After doing the basic install and getting the key from the server I got the following error when trying to login on the client side:

    Server configuration error. Cannot log in.  Please contact your system administrator

    Looking at /var/log/messages on the server revealed the following (hostName is the name of the host for the machine, changed from the actual nameof the box):

    Aug 30 10:21:30 hostName NXNODE-3.5.0-9[12117]: ERROR: NX> 596 ERROR: NXNODE Ver. 3.5.0-9  (Error id eAE8C74) [eAE8C74] Logger::log nxnode 2963
    Aug 30 10:21:30 hostName NXNODE-3.5.0-9[12117]: ERROR: NX> 596 ERROR: create session: run commands [eAE8C74] Logger::log nxnode 2963
    Aug 30 10:21:30 hostName NXNODE-3.5.0-9[12117]: ERROR: NX> 596 ERROR: execution of last command failed [eAE8C74] Logger::log nxnode 2963
    Aug 30 10:21:30 hostName NXNODE-3.5.0-9[12117]: ERROR: NX> 596 last command: /usr/bin/xauth -v -f /home/rchapin/.nx/C-hostName-1004-3C32B952A4DB53BE56F707B06E917F71/authority source /home/rchapin/.nx/C-hostName-1004-3C32B952A4DB53BE56F707B06E917F71/scripts/authority [eAE8C74] Logger::log nxnode 2963
    Aug 30 10:21:30 hostName NXNODE-3.5.0-9[12117]: ERROR: NX> 596 exit value: 1 [eAE8C74] Logger::log nxnode 2963

    I realized after seeing this that I did not have a DNS entry for the hostName machine and xauth failed because it could not resolve it.

    In this case, I added a entry in /etc/hosts for the host name and was then able to fire up the NXClient session.

  • Getting a Command Prompt as Administrator Under Windows Server 2008 and Probably Window 7
    08/20/2012 10:45AM

    If you need to get a Windows command prompt as the Administrator do the following:

    • Click on 'Start'
    • Type the following in the search/command input field:
    • runas /user:administrator cmd
  • Java Project Template
    08/11/2012 9:10AM

    Attached to this post is a tar.gz file that contains a complete template with which you can build a Java project.  It includes the directory structure, sample ant build.xml, logging configs, and shell scripts (and the beginnings of some Windows scripts) to run the program:


    java_project_template/README.txt
    java_project_template/conf/
    java_project_template/conf/log4j.properties
    java_project_template/lib/
    java_project_template/lib/log4j-1.2.16.jar
    java_project_template/launch.sh
    java_project_template/scripts/
    java_project_template/scripts/run.sh
    java_project_template/scripts/run.vbs
    java_project_template/scripts/run.bat
    java_project_template/src/
    java_project_template/src/com/
    java_project_template/src/com/ryanchapin/
    java_project_template/src/com/ryanchapin/samples/
    java_project_template/src/com/ryanchapin/samples/java/
    java_project_template/src/com/ryanchapin/samples/java/Example.java

    The ant build file will create a build/classes directory into which all of the Java .class files are compiled.  It will also create a dist directory into which all of the jars, configs, and scripts to run the program are placed.

    The run.sh script will dynamically concatenate the classpath argument for java based on the contents of the dist/lib/ directory and can be customized to accept any additional command line arguments that you may require.

    The conf/ directory includes a log4j.properties file to get you started.

    The build.xml file includes default, clean, and dist targets and does all of the basics needed to build your project.

    The launch.sh script is used primarily during development to invoke run.sh without having to cd into the dist folder each time it is run.

    Attachment: java_project_template.tar.gz 439218 bytes
  • Starting a Process as a Non Root User on Startup under Linux
    07/25/2012 8:52AM

    The following is a quick howto for when you want to fire up a process as a non-root user on boot under Linux:

    Create a script, typically under /usr/bin with something similar to the following:

    #!/bin/bash

    # invoke your process

    /usr/local/process/someprocess

    exit

    Now, add an entry to /etc/rc.d/rc.local to invoke the command as the non-root user

    su - [non-root-user] -c [path-to-shell-script]

    Make sure that the exit command is the last thing in the shell script so that you will exit the su and rc.local will continue processing as the root user.

Advanced Search

Categories

Archives