Thursday, May 28, 2009

Howto setup freenx server on your VectorLinux box

NX/freenx is a remote desktop solution for linux, similar to RDP for Windows(r).

This howto explains how to setup a basic nx environment using the freenx-server.

Freenx-server is the free (Open Source) implementation of the commercial NX project.

WARNING: Testing the outcome of this howto requires you to use a proprietary client program, which VectorLinux does not distribute. You can however get such a program from here for a linux box and for a windows box here. This program is available free of charge, however it is not Open Source, so if you have a problem with that, perhaps you should stop here, or find you a free (open source) client.

PREPARE SERVER

Before you begin, you will need a couple things in your server box.

  • Make sure your ssh server is running and working
  • Install xdialog
  • Install freenx-server
  • Install netcat (also known as "nc")
  • Prepare a client (last step)

SOFTWARE INSTALLATION

Make sure you have the "testing" repository enabled.

# slapt-get -i freenx-server Xdialog netcat

SSH SETTINGS

You may need to make a couple of changes to your ssh settings. Make sure these options of the file are setup just like here

RSAAuthentication yes

PubkeyAuthentication yes

AuthorizedKeysFile .ssh/authorized_keys2

You may leave everything else as is. These are the only important settings for the nx server.

After you install your freenx-server package, you will need to create the default configuration file, This can be easily done by just copying the default provided with the package

# cp /usr/NX/etc/node.conf.new /usr/NX/etc/node.conf

Now, we need to setup the nx environment

cd into the NX dir

# cd /usr/NX/bin

# ./nxsetup --purge --clean --install --setup-nomachine-key

That will create everything you need for your nx server. Most likely you'll receive some error messages about RDP and CUPS not being setup, but this is OK (unless you really need to use RDP and remote printing directly from the client... that's something I'm not getting into)

After that, you will need to add user accounts to your server, so execute the following commands while still in the same dir. Repeat this step for every user in your system who will have access to the nx environment. The user you specify to the nx server MUST exist in the system first.

# ./nxserver --adduser your_user_name_here

START THE SERVER

It is now time to start the server to do some testing, while in the same dir, execute this command

# ./nxserver --start

TEST YOUR ENVIRONMENT

From your client box, fire up your nx client.

Using the nxclient is pretty much a straight forward process. It features a graphical wizard that guides you through the process. Basically you'll create a new session. You will need the basic information like host address and port. User name and password of the user account at the remote host. The tricky part to this is the one that follows.

Once you finish the wizard, you want to click the "configure" button.

If you have GNOME or KDE installed, you can just select 'unix' and 'KDE' or 'GNOME' which ever one you have on the server, otherwise select 'Custom' and read the following step.

Under "Desktop" select 'unix' and 'custom' from the drop down boxes and click the "Settings" button. Under "Application", select "Run the following command" and enter the command that starts your default window manager on the remote location. This can be something like 'startxfce4' or 'icewm-session' or 'startlxde' depending of which window manager you use.

Under "Options" select 'New Virtual Desktop' and click OK

Under "Display" on the remaining dialog, select "Fullscreen" or your prefered desktop size

Click "Save"

Click "Ok"

After that, you'll just need to enter the password for your remote user account, click "Login" and off you go.

2 comments:

  1. I recently came accross your blog and have been reading along. I thought I would leave my first comment. I dont know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.


    Susan

    http://8080proxy.com

    ReplyDelete
  2. Thank you.
    I'm really not much of a blogger, but I recently thought I'd start writing a collection of useful howtos, and things that IMO lack documentation in the linux community at least to some extent.

    Mostly notes I'm saving for personal use, but I feel other's may also benefit from, so enjoy ;)

    ReplyDelete