Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > General Help
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.

General Help
All your general support questions for Ubuntu, Kubuntu, Edubuntu and Xubuntu.

 
Thread Tools Display Modes
Old November 22nd, 2007   #1
daflame
Way Too Much Ubuntu
 
daflame's Avatar
 
Join Date: Mar 2007
Beans: 230
Installing FreeNX in Ubuntu 7.10 Gutsy

I have read so many posts on users having troubles installing the Seveas packages on AMD64 with Gnome or KDE. Or having to chase down some outdated client that is only available on remote sites and isn't 64bit ready. Also, I have become tired of Linux being consistently behind the ball game on the latest and greatest technology. Namely NX 3.2.0 protocol compression which is now 64bit ready, so in frustration I modded the FreeNX Debian packages to arrive on a solution that works on Gutsy and Hardy extremely well using FreeNX 0.7.2. All other mods I've heard of need either an outdated client and server or require someone with sysadmin level knowhow to install and setup. The following is a guide to install and setup the Gutsy packages that I have compiled for everyone's convenience.

[b]NOTICE: NX 3.2.0 is released! After much toil I have concluded that I cannot get native Hardy packages to compile in 64bit, so I am releasing Gutsy built packages in the Hardy repos for now since they work fine on Hardy. I will continue to try to find the problem, but it is a vague linker error that tells me to use -fPIC (which I am), so it is hard to track down the true cause.

ATTENTION: These are Gutsy and Hardy packages and I DO NOT GUARANTEE any usability especially on any other distribution prior to Gutsy. If someone would like to debuild packages for other debian versions I have also posted the source repos here that I have used to make these packages as well as compilation instructions. My only request is that you make them available to me so that I may make them available to the community. One note: You cannot build the Hardy sources on Hardy 64bit just yet. I built them on Gutsy 64 bit instead.

WARNING: All packages and files below are open-source and free according to the GPL license EXCEPT the nxclient-3.2.0 ones. This is the commercial nxclient, but it is still free to download and use according to the licensing on their site at www.nomachine.com. I have chosen the version below because it has been tested to work with these packages, you may use a newer one, but your mileage may vary. Do not bother to post about a newer version failing, as it has not been tested, it may not work so please use the version supplied. However, this new release should function with newer packages should you desire to use them. You may alternatively use the new qtnx client in Hardy repos, but only for the client side I believe.

For those desiring to use nxclient 3.2.0 for Windows, here is a link to a compatible nxclient 3.2.0-10:
nxclient-3.2.0-10.exe
This is the recommended nxclient for Windows. I have tested this version and it definitely works well.

First add the following lines to your sources.list for Gutsy:
deb http://www.datakeylive.com/ubuntu gutsy main
deb-src http://www.datakeylive.com/ubuntu gutsy main

Or add the following lines to your sources.list for Hardy:
deb http://www.datakeylive.com/ubuntu hardy main
deb-src http://www.datakeylive.com/ubuntu hardy main

Then add my keys for authentication and update your package list
(both Gutsy and Hardy):
Code:
wget http://www.datakeylive.com/ubuntu/dists/gutsy/wjeremy.key -O - | sudo apt-key add -
sudo apt-get update
Then install necessary packages:
Code:
sudo apt-get install expect openssh-server tcl8.4 dbus-x11 libxcomp3 libxcompext3 libxcompshad nxlibs nxagent nxproxy nxclient freenx-server
(I'm not sure what other libs are necessary as I have them all installed already, but you MUST have a desktop (X minimal, KDE, or Gnome) installed,
please let me know if I'm missing anything since the dependencies have changed.)

Please verify the above operation was successful by executing:
Code:
sudo apt-get -f install
sudo apt-cache show expect openssh-server tcl8.4 dbus-x11 libxcomp3 libxcompext3 libxcompshad nxlibs nxagent nxproxy nxclient freenx-server | grep "Unable"
If the previous command says unable to find .... (with a package name) you need to install that package first.
Otherwise it should just drop you back to the command prompt.
If you installed the files above you can skip this next section for compiling from source...

For those brave souls willing to compile from source first I will present the quick and dirty method (for Debian based ONLY):
Make sure you added the above package repository, then execute:
Code:
sudo apt-get install expect openssh-server tcl8.4 dbus-x11 build-essential devscripts fakeroot cdbs autotools-dev debhelper patchutils autoconf automake1.9 bzip2 libjpeg-dev libpng12-dev libssl-dev libx11-dev libxaw7-dev xutils zlib1g-dev apt-build nxclient
If you also want to build freenx-client you will need to execute:

Then execute:
Code:
sudo apt-build install libxcomp3 libxcomp-dev libxcompext3 libxcompext-dev libxcompshad libxcompshad-dev nxlibs nxlibs-dev nxagent nxagent-dev nxproxy freenx-server
Alternatively download these and try to build them yourself (I do not provide non-debian support):
nx_3.2.0.orig.tar.gz
nx_3.2.0-1gutsy1.diff.gz
freenx-server_0.7.2.orig.tar.gz
freenx-server_0.7.2-1gutsy1.diff.gz

verify that all of the above packages are installed correctly by first executing:
Code:
sudo apt-get -f install
sudo apt-cache show libxcomp3 libxcompext3 libxcompshad nxagent nxlibs nxproxy nxclient freenx-server | grep "Unable"
If the previous command says unable to find .... (with a package name) you need to reinstall that package again or restart the build process since something didn't work.
Otherwise it should just drop you back to the command prompt.

(CONTINUING FROM PACKAGE CHOICE)

Open /etc/X11/xorg.conf and make sure the font paths are in there. My section looks like:
Code:
Section "Files"

        # path to defoma fonts
        FontPath     "/usr/share/fonts/X11/misc"
        FontPath     "/usr/share/fonts/X11/100dpi/:unscaled"
        FontPath     "/usr/share/fonts/X11/75dpi/:unscaled"
        FontPath     "/usr/share/fonts/X11/Type1"
        FontPath     "/usr/share/fonts/X11/100dpi"
        FontPath     "/usr/share/fonts/X11/75dpi"
        FontPath     "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection
If you are missing this section from your xorg.conf configuration file I recommend adding it as without this FreeNX will die unexpectedly because FreeNX is actually xorg version 6.9 and Gutsy and Hardy are >=7.1. Since Gutsy, these settings aren't necessary anymore for a default install, and often aren't included by default.

I don't think this is necessary anymore but here is nxcupsd-wrapper for posterity for printing in old freenx:
nxcupsd-wrapper
Let me know if you have printing issues.

Now if you want someone to log into the server you need to make their account ready for log in. At a console prompt execute where xxxx is the name of the user you want to log in:
Code:
sudo nxserver --adduser xxxx
This should setup the user for you automatically.

If you want to support file sharing you will need to install smbfs and I would also recommend installing Samba:
Code:
sudo apt-get install samba smbfs
You need to share the directories (on the client side) using Samba or Windows file sharing that you want to mount. It is recommended to configure Samba, but it is beyond the scope of this FAQ, so just Google "setup Samba on Ubuntu" to get a better idea how to do this.

If you want to be able to proxy and tunnel RDP (Windows Remote Desktop/Terminal Services) you need to install rdesktop.
From a console type:
Code:
sudo apt-get install rdesktop
rdesktop is the RDP client that FreeNX uses to proxy RDP through the NX protocol. Then at the client end choose Windows, then click the settings button to setup the server and domain to log into. Make sure you use a server name that linux can resolve an IP to. Enter your credentials here if they differ on the windows machine.
I have found proxying RDP slightly more laggy on broadband, but it scales better and is much faster over slower connections.

If you want to proxy vnc sessions you need to install xvncviewer:
Code:
sudo apt-get install xvncviewer
If you want to also mirror sessions and the local desktop via VNC you need to install x11vnc:
Code:
sudo apt-get install x11vnc
On the client side you need to choose the session type as VNC and set a host, display and password in the custom section. Make sure to set the correct display size at the bottom or your window won't match the display size and vncviewer's scrollbar is terrible. (Right click to scroll up?) If you want to shadow when the window list pops up choose the session to shadow and click resume. If you want to VNC to a screen (Another machine usually) then click new instead.
When mirroring the local desktop make sure you have any builtin desktop VNC RFB server disabled. eg. KRFB

You should now be able to test this now by creating a connection to localhost using nxclient. If you need a Windows client version it is posted above.
There are many other commands that you can execute on nxserver just use:
Code:
sudo nxserver --help
Please post with your experiences!

TROUBLESHOOTING

I have heard reports that sometimes you need to copy the key from /home/xxxx/.ssh/authorized_keys2 to /home/xxxx/.ssh/authorized_keys where xxxx is the user name when public key authentication fails for user nx.
DO NOT DO THE FOLLOWING UNLESS YOU HAVE TO
Code:
sudo -u xxxx -i
cd
cat .ssh/authorized_keys2 >> .ssh/authorized_keys
exit
If you are having problems connecting with agent startup timeout, try one of the following:
uncomment the following from /etc/nxserver/node.conf and make sure it is at least 60 and DO NOT ADD ANY SPACES:
Code:
#AGENT_STARTUP_TIMEOUT="60"
or, delete all the xauthority files:
Code:
cd
sudo rm .XA*
Make sure you don't disable encryption of all traffic in the client. I have had problems logging in remotely with this setting turned on, local logins will still work. (There is a problem with direct unencrypted connections in FreeNX still trying to connect to localhost)
Don't forget to check the log under your username:
/home/username/.nx/F-C-(long alphanum session code)/session
if it has an error like:
/usr/lib/nx/nxnode: line 333: /usr/bin/dbus-launch: No such file or directory

You need to install the dbus-x11 package. There should be an auto-dependency from the dbus package, but there isn't.

The bug report is here:
https://bugs.launchpad.net/ubuntu/+s...us/+bug/118919

Also, remember to open port 22 (or whatever port you want to redirect to it) in your router and firewalls!
Another little trick, if you need to get through a firewall at work, it can be done by making port 21 or port 80 the new SSH port or tunneling via some tunneling client like hamachi, but make sure you do not have some other program using those ports first. For those wondering about using hamachi with NX, yes it does work, but I am having troubles with Hardy though. If you have hamachi installed in your linux box with a kernel <=2.6.23 (Not Hardy) and hamachi installed at a remote location and are a member of the network, just use the hamachi IP or a name that resolves to the hamachi IP as the server address. Opening post 22 on your internet router/firewall isn't necessary for hamachi to work, but opening hamachi ports may be.

Datakey Live Website Design and Development

Last edited by daflame; May 15th, 2008 at 01:22 AM.. Reason: Update instructions for new NX 3.2.0 build & Hardy repo
daflame is offline   Reply With Quote
Old November 22nd, 2007   #2
psypher
A Carafe of Ubuntu
 
psypher's Avatar
 
Join Date: Feb 2005
Beans: 138
Re: Installing FreeNX in Ubuntu 7.10 Gutsy

I just tried installing and the install went fine, but i don't have the nxserver folder and cannot even run the nxserver command. I think you are missing a package or am I missing something?

Other than that, thanks for taking the time to do this!! You rock!!
psypher is offline   Reply With Quote
Old November 23rd, 2007   #3
daflame
Way Too Much Ubuntu
 
daflame's Avatar
 
Join Date: Mar 2007
Beans: 230
Re: Installing FreeNX in Ubuntu 7.10 Gutsy

Quote:
Originally Posted by psypher View Post
I just tried installing and the install went fine, but i don't have the nxserver folder and cannot even run the nxserver command. I think you are missing a package or am I missing something?

Other than that, thanks for taking the time to do this!! You rock!!
Oops, you are correct, I forgot to put links to the freenx packages . You might not have a nxserver command without that package. The files are already there, so I will update the post. Thanks!!
daflame is offline   Reply With Quote
Old November 23rd, 2007   #4
daflame
Way Too Much Ubuntu
 
daflame's Avatar
 
Join Date: Mar 2007
Beans: 230
Re: Installing FreeNX in Ubuntu 7.10 Gutsy

All x86_64 and i386 packages are now uploaded and ready for download. I apologize for any inconveniences. I have to make a few notes however. I have come across four known issues that I am working out.
1) VNC proxy and shadowing currently fail to work. I am working on a resolution as this is VERY important for me to have prior to Christmas (I am visiting relatives away from the office (3000KMS away) and I need to manage my employees).
2) The shares folders do not function correctly. It seems to create a folder that is the name of the variable %24(SHARES) instead of extracting the variable's value to know where to put the directory.
3) The nxclient dialogs failed to work for me correctly, so as a last resort I disabled them. Now you will get the ugly xmessage dialogs as a result, but they do work at least.
4) Printing does not work currently without the nxcupsd-wrapper mentioned above. You will need to put this on the computer that needs to log into the server in a place the user that needs to log in can access and make it executable.

I think problems 1, 2 and 3 might be related, but I have put in a request for answers from the maker of FreeNX, Fabian. I thank you all in advance for your help in making this a great forum.
daflame is offline   Reply With Quote
Old November 23rd, 2007   #5
Brazilian Joe
First Cup of Ubuntu
 
Join Date: Nov 2005
Beans: 12
Re: Installing FreeNX in Ubuntu 7.10 Gutsy

I have tried your packages, and it ALMOST worked, but the connection always timed out. it's a brand new installation to set up a printer/scanner/file server. I have uninstalled the packages but I will give it another shot.
build-essential etc are installed.

The connection always showed up a X0: vnc something as an option to resume a session which I never started. I assume there is a vnc remote desktop connection for gnome or something. anyway, I can't terminate this connection. If I try connect to it it bails out almost instantly. If I try to set up a new connection, It goes up to 'authentication completed', then stays on that stage for some time and quits. the log says something like 'no data received from proxy for more than 30 seconds'.

I shotgun-guess that nxagent is not being able to run because of something.
Brazilian Joe is offline   Reply With Quote
Old November 26th, 2007   #6
daflame
Way Too Much Ubuntu
 
daflame's Avatar
 
Join Date: Mar 2007
Beans: 230
Re: Installing FreeNX in Ubuntu 7.10 Gutsy

Quote:
Originally Posted by Brazilian Joe View Post
I have tried your packages, and it ALMOST worked, but the connection always timed out. it's a brand new installation to set up a printer/scanner/file server. I have uninstalled the packages but I will give it another shot.
build-essential etc are installed.

The connection always showed up a X0: vnc something as an option to resume a session which I never started. I assume there is a vnc remote desktop connection for gnome or something. anyway, I can't terminate this connection. If I try connect to it it bails out almost instantly. If I try to set up a new connection, It goes up to 'authentication completed', then stays on that stage for some time and quits. the log says something like 'no data received from proxy for more than 30 seconds'.

I shotgun-guess that nxagent is not being able to run because of something.
Can you post a log from /var/logs/nxserver.log?

Make sure not to include passwords of course. Also, did you replace your /etc/nxserver/node.conf with the one supplied above? I know that I could not get it to run with the one supplied in the packages. The last suggestion is to check the /etc/nxserver/node.conf and find the line that has "-fp ....." with lots of font paths and compare them with what is in your /etc/X11/xorg.conf. If either is missing or doesn't match you will have problems. I know that Gutsy often removes all font paths from the xorg.conf file by default you will need to add them back in or nxserver crashes.
daflame is offline   Reply With Quote
Old November 26th, 2007   #7
rockballad
Just Give Me the Beans!
 
Join Date: Aug 2007
Beans: 60
Re: Installing FreeNX in Ubuntu 7.10 Gutsy

Thanks, I have a quick test on fresh Ubuntu AMD64 and it works well

Thank you a lot. Have a nice day!
rockballad is offline   Reply With Quote
Old November 27th, 2007   #8
daflame
Way Too Much Ubuntu
 
daflame's Avatar
 
Join Date: Mar 2007
Beans: 230
Re: Installing FreeNX in Ubuntu 7.10 Gutsy

Quote:
Originally Posted by rockballad View Post
Thanks, I have a quick test on fresh Ubuntu AMD64 and it works well

Thank you a lot. Have a nice day!
Glad to be of assistance. Now if I can only resolve the VNC issues I can put to rest any needs for NX Free Edition and use FreeNX exclusively with shadowing.
daflame is offline   Reply With Quote
Old November 26th, 2007   #9
fm1234
Just Give Me the Beans!
 
Join Date: Nov 2005
Beans: 66
Re: Installing FreeNX in Ubuntu 7.10 Gutsy

Thanks for the explanations, I removed the vnc setup from xinetd. Instead of doing a resume (of vnc) I'm asking for a new session. I get stuck when nxclient is "Negotiating link parameters". It comes back with:

"NX client was not able to establish an unencrypted channel with the server. This could be due to the remote server being behind a firewall. If tis is the case, you should be able to run your session by unchecking the option "Disable SSL encryption of all traffic".

which I did, and next time I tried nxclient crashed. How can I check if Ubuntu is firewalling?
fm1234 is offline   Reply With Quote
Old November 27th, 2007   #10
daflame
Way Too Much Ubuntu
 
daflame's Avatar
 
Join Date: Mar 2007
Beans: 230
Re: Installing FreeNX in Ubuntu 7.10 Gutsy

Quote:
Originally Posted by fm1234 View Post
Thanks for the explanations, I removed the vnc setup from xinetd. Instead of doing a resume (of vnc) I'm asking for a new session. I get stuck when nxclient is "Negotiating link parameters". It comes back with:

"NX client was not able to establish an unencrypted channel with the server. This could be due to the remote server being behind a firewall. If tis is the case, you should be able to run your session by unchecking the option "Disable SSL encryption of all traffic".

which I did, and next time I tried nxclient crashed. How can I check if Ubuntu is firewalling?
Could you post your /var/log/nxserver.log? That should tell me what is going wrong right away.
daflame is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:55 PM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry