Showing posts with label nxserver. Show all posts
Showing posts with label nxserver. Show all posts

Friday, August 08, 2008

Further attempts to install NXserver in Foresight Linux

As I had mentioned in an earlier post, I failed to install NXserver on Foresight using the method outlined in the nomachine documentation
So, I had a look at the more detailed instructions here. In particular, the prerequisites (1.2) are important. These libraries are mentioned as being required for the nxnode install:

- libXpm.so.4
- libc.so.6(GLIBC_2.2.3)
- libnsl.so.1(GLIBC_2.0)

I managed to find all of them in various rpms in PBone. All three were included in a relatively large bunch of files. I downloaded each package as an rpm in openSUSE 11, then I used alien
sudo alien -t file.rpm

to convert each file to a .tgz file.
I used cl1p.net to send each over to Foresight Linux.
To install, I just moved each of them to the root directory (/) and untarred (tar -zxvf file.tgz) and that was it.
Now, I was ready for the install. So, here's what I did:

1. cd /usr
2. sudo rm -rf NX #to remove all old installations
3. Install the nxclient
cd /usr
sudo tar zxvf nxclient-3.2.0-14.i386.tar.gz

4.Install nxnode
sudo tar zxvf nxnode-3.2.0-11.i386.tar.gz
sudo /usr/NX/scripts/setup/nxnode –-install debian

From what I remember this installed fine (although I have a vague recollection of some minor error or warning)
5. Install the nxserver
sudo tar zxvf nxserver-3.2.0-13.i386.tar.gz
sudo /usr/NX/scripts/setup/nxserver –-install debian

(note that this last command taken from section 2.8 of the detailed server installation instructions has an error and won't work. The "–-install" must be replaced by "--install". So the correct command line is
sudo /usr/NX/scripts/setup/nxserver --install debian

This seemed to "more or less" install, but gave quite a few warnings, the nature of which I again forget.
Note, however, that I plan to start all over again with this tomorrow and these notes are just meant to be a guide to me for tomorrows attempt.
6. First thing I saw was the /usr/NX/etc had no server.cfg file so I created it from server-debian.cfg. In server.cfg I then made the required changes:
#EnableUserDB = "0" to EnableUserDB = "1" (don't forget to uncomment
EnablePasswordDB = "0" to EnablePasswordDB = "1" (should be already uncommented)


** However, having said that I just noticed in looking at /usr/NX/etc/server.cfg that it seems to have completely changed and no longer contains the lines
EnableUserDB = "1
EnablePasswordDB = "1"
or anything remotely similar. This is strange but could be part of my problem.
7. Now to add myself as a user
sudo /usr/NX/bin/nxserver --useradd paul --administrator

However, this gave a warning (typically something like:
NX> 595 ERROR: Detected an inconsistency in the NX server configuration.

and a series of subsequent warnings all of which turned out to be due to lack of appropriate files in /usr/NX/etc/
So, I tried to get over these errorby manually producing the missing files, like, for example:
sudo cp administrators.db.sample administrators.db
sudo cp guests.db.sample guests.db

However, I was also missing the lock files of the type
users.db.lock
Strangely, I couldn't upload these to cl1p.net (no idea why) although they seemed to be just empty files (in openSUSE 11 where NXserver works fine).
So, I tar compressed a folder with the 5 files I needed from openSUSE and uploaded this to cl1p.net and opened it in Foresight. Then I uncompressed and put all the files in /usr/NX/etc/
8. Once again I tried to run
sudo /usr/NX/bin/nxserver --useradd paul --administrator

and this time it progressed fairly well but still got warnings:
NX> 900 Setting password for user: paul.
NX> 102 Password:
NX> 102 Confirm password:
NX> 110 Password for user: paul added to the NX password DB.
NX> 900 Checking user: paul with the NX password DB enabled
NX> 306 Administrator: paul added in the NX administrator DB
NX> 900 Adding public key for user: paul to the authorized keys file.
NX> 910 WARNING: The SSH key to be used for user authentication could
NX> 910 WARNING: not be added to the private authorized keys file of user.
NX> 910 WARNING: Please note that, with these settings, the user won't be
NX> 910 WARNING: able to successfully run any sessions.
NX> 910 WARNING: Run the following command to get some hints on the possible
NX> 910 WARNING: reasons of the problem:
NX> 910 WARNING:
NX> 910 WARNING: nxserver --usercheck paul
NX> 910 WARNING:
NX> 999 Bye.

9. When I did the usercheck suggested I got
$ sudo ./nxserver --usercheck paul
NX> 910 Account for user: paul is disabled
NX> 999 Bye.

10. At this stage I should have enabled my user using
sudo /usr/NX/bin/nxserver --userenable paul

but I didn't do this till later.
11. Despite many attempts to vercome this key problem , including changing the default keys according tomthis nomachine document, I failed completely and made no further progress.

Nevertheless, it looks now as if getting nxserver to work in Foresight is more of a possibility than it was yesterday. I should mention here that I had not at all paid any attention to the extensive list of required libraries for the installation of nxclient. Perhaps the fact that one or two of these might have been missing caused my nxserver problems. Worth a look.

Just for completeness, here's an interesting (although a bit old) look at NXserver.

Monday, August 04, 2008

Remote access beyond your router

This is a nice tutorial on how to use NXserver and sshd in Ubuntu to connect to a remote computer anywhere in the world.
Strangely though, I seem to be falling at the first hurdle here as in the section called "STEP 1: Testing SSH", I get this

$ ssh localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established.
RSA key fingerprint is 5e:13:99:b5:12:51:9c:1e:99:8e:25:ec:ef:42:33:ad.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/paul/.ssh/known_hosts).
paul@localhost's password:
Linux ubuntu-mac 2.6.26-5-generic #1 SMP Sun Aug 3 01:25:54 UTC 2008 i686

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
Last login: Mon Aug 4 23:32:31 2008 from localhost


Then, as per the tutorial, I type
ssh paul@xxx.xxx.xxx.xxx (where the x's represent my external IP)

and get this after quite a delay
ssh: connect to host xxx.xxx.xxx.xxx port 22: Connection timed out


Actually, I really don't understand this last command and maybe I've misinterpreted it. Right now it looks like I'm trying to ssh from Ubuntu on my Mac back to Ubuntu on my Mac. Doesn't seem right.

Sunday, August 03, 2008

NXserver in openSUSE

As VNC worked but gave a disappointing quality of remote screen in the client, I had a look at NXserver in openSUSE.
After some experimentation, I found the best way to install a functioning was to use the NoMachine documentation and this Howto.

The steps are:
1. Download nxclient-3.2.0-14.i386.rpm to the Desktop
2. Download nxnode-3.2.0-11.i386.rpm to the Desktop
3. Download nxserver-3.2.0-13.i386.rpm to the Desktop
4. sudo rpm -i nxclient-3.2.0-14.i386.rpm
5. sudo rpm -i nxnode-3.2.0-11.i386.rpm
6. sudo rpm -i nxserver-3.2.0-13.i386.rpm
7. sudo gedit /usr/NX/etc/server.cfg
uncomment the line
#EnableUserDB = "0"
and change to
EnableUserDB = "1"
Similarly, change the line
EnablePasswordDB = "0"
to
EnablePasswordDB = "1"
8. sudo /usr/NX/bin/nxserver --useradd "YourUserName" --administrator
You will now be asked for a password
9. On the server, type
sudo nxserver --restart
10. On the client, type
/usr/NX/bin/nxclient
Add the host (IP of server), leave port at 22, select the Desktop Manager and login

Now you should see the remote screen appear on the client screen. Certainly, the NXserver performance is considerably smoother and more pleasing than VNC. However, whereas VNC actually displays the very same screen that is now showing on the server, NXserver shows a new server screen. Also, while in VNC, the client mouse moved around both screens in unison, in NX, the client screen moves only on the remote screen on the client.
Based on my very limited experience so far, I would always opt for NXserver over VNC by a long shot.

Friday, August 01, 2008

Some experimentation with NXserver.

Yesterday I got NXserver working in Kurumin-dell and was able to communicate with nxclient in Ubuntu-mac.
So today I tried to see if any further OSes could be involved in NX.
First I tried to install nxclient in Foresight-Mac. This is not available in the Foresight repos but is readily available here.
I downloaded the nxclient.tar.gz file to /usr and untarred it there. That's all that's needed to install -- no compile or anything else.
Now I was able to NX to Kurumin-dell by

/usr/NX/bin/nxclient &

Now the dialog opened which I left basically as it was for Ubuntu (client) to communicate with Kurumin-Dell (server). So, the Key, the host (IP) and port (8888) remained unchanged. And it connected fine.

Next I tried to get Foresight-Mac (client) to talk to Foresight-Dell (server). This meant having to install NXserver in Foresight-Dell. Again, NXserver is not available in the Foresight repos.
Also, I couldn't use the method of yesterday as this involves some deb repos which (AFAIK) Foresight can't handle.
So I used this nomachine site to try to install the NXFree edition for Linux (as tar.gz). This involves installing three packages (nxclient, nxnode and nxserver). As mentioned, NXclient is very easy to install. Also, I once got the NXnode to install (after many tries) using this command
sudo /usr/NX/scripts/setup/nxnode --install debian

However, I was unable to repeat this. Really don't know why it worked just once. Strange.
Using the same type of command for NXserver never got me anywhere -- always failed.
So, can't get NXserver to install in Foresight.

I was, however, able to get NXserver working on Ubuntu-Dell from the same site. Here I just downloaded the debs (client, node and server) and installed them from the terminal using this commands of this type
sudo dpkg -i nxserver_3.2.0-13_i386.deb

And that was basically it.
I did NOT have to add that big line of code to node.conf. Indeed, I couldn't find any node.conf at all in Ubuntu after installation of the server.
On the client side, however, I needed to import the dsa-key from
/usr/NX/share/keys/default.id_dsa.key

on the server. In addition, I moved the port back from 8888 to 22.
When I logged in on the client, I got a message saying couldn't "start kde". Very strange since I don't have kde on the Ubuntu server. But it turns out that you must specify the Desktop Manager in the dialog before you launch nxclient.
After changing this to Gnome, it launched fine and everything seemed perfect.

Thursday, July 31, 2008

VNC from Ubuntu-mac (client) to Kurumin-dell (server)

I had this problem some time ago where I could not VNC from Ubuntu-mac (vino-server) to Kurumin-dell (krfb-kde4). Tried again today with the same negative result.
Then I thought that perhaps it was a kde thing so I tried with Sidux-mac (Kde 3.5.9) which also uses krfb. In Sidux, however, opening krfb results in a dialog box opening which allows you to create invitations. This gives you a password to pass on to the invitee which can then be used to complete the connection. Now I could connect from Kurumin (client) to Sidux (server) but not the other way around. This seems entirely because the krfb dialog doesn't open (although krfb does run) so invitations can't be created.

OK, so maybe it's a KDE4.1 thing. So, I changed session in Kurumin and changed to KDE 3.5.9. For this I had to install krfb (KDE 4.1 uses krfb-kde4). Now krfb does open a dialog box (but seemingly only from a terminal and not from Adept). This then allows creating invitations. So, I invited Sidux as client to connect to Kurumin server. Th connection was briefly made but then krfb crashed (I tried this several times, always with the same result). But, it was progress of a sort. I posted to the Kurumin forum which provides more details.

I got one reply from this post which didn't actually address the problem but recommended that instead of VNC, that I use NXServer to make these connections.
So, I thought I'd give it a try.
First I looked at the freenx home site and tried to install the package from here. But the instructions are poorly presented so I gave up.
Next I came across this blog which outlines an alternative (and more understandable install method) but this too failed for me during the make step.
Then I found this Ubuntu Community document which provides basically everything I needed.

So I set about setting up Kurumin-Dell as the server with Ubuntu-mac as the client and these are the steps:
1. Include the debs in /etc/apt/sources.list (note that I had to use the feisty repos as the freenx stuff seems to have been removed from the Gutsy repo)
2. Get the key, update and install freenx
3. Use these commands as shown in the guide

sudo nxserver --adduser
sudo nxserver --passwd
sudo nxserver --restart

4. NXserver appears to start but there's no indication of this if you run ps -e
5. Change the listening port as instructed in "Configure ssh"
6. Install nxclient on the client (Ubuntu-mac). Here there was a complaint about libstdc++2.10-glibc2.2_2.95.4-27. However, I found the deb for this here and I installed it. Thereafter the nxclient installed fine.
7.Now I tried to connect from the client to the server through NXserver by starting the client with
/usr/NX/bin/nxclient &

This opened up a small dialog box. Here I clicked the configure button where I entered the host IP (192.168.1.12 -- as the hostname didn't work for me) and the Key (8888) that I had already assigned in an earlier step. However, after adding the password, although a connection was made it broke almost immediately.
8. I googled around and found here that the answer is to add this line
AGENT_EXTRA_OPTIONS_X="-fp /usr/share/fonts/X11/misc/,/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,/usr/share/fonts/X11/100dpi"

to /etc/nxserver/node.conf on the server.
9. Now I could make the connection without problems.

One difference with VNC is that NXserver appears more like the RDP system to connect to Windows. This is because the while client can see clearly the server screen, the server user sees nothing of what the client user is doing.
Nevertheless, it does work well and is worth exploring further.