Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

NX inside VE

3,005 bytes added, 22:19, 2 January 2014
no edit summary
My goals were simply to be able to connect to a VE You can run full graphical remote desktop inside container using an [http://en.wikipedia.org/wiki/NX_technology NX clienttechnology]. This is handy for when I you work from home and you wish to run a web browser on my your work's internal network to access local resources. You can use NX client to connect to remote NX server.
= Installation =[http://www.x2go.org/ x2go] is a related project that uses a fork of the NX3 GPL'ed libraries and works fairly well and doesn't have the limitations that the free (gratis) version of NX from NoMachine has. x2goserver and x2goclient packages are available as stock packages in several distros including Fedora 19 and 20, as well as being available for RHEL6/clones via the EPEL repository. If you can't find x2go packages in your distro's stock repository, check the x2go website for packages. x2go is actually easier to setup. Just install the desired GUI desktop inside of your container, install x2goserver, enable the x2gocleansessions service, make sure sshd is enabled... and connect as a user account over ssh via the x2goclient from the desired remote machine making sure to select the appropriate settings in the client.
Firstly i created = Fedora = [[File:NX server on Fedora 12.png|thumb|300px|Connecting remotely with NX Client to Fedora inside OpenVZ container.]] * Use fedora template to create new container and install desktop of your choice: GNOME: <pre>yum groupinstall "GNOME Desktop Environment"</pre> KDE: <pre>yum groupinstall "KDE (K Desktop Environment)"</pre> XFce: <pre>yum groupinstall "XFCE"</pre>  * You may need to install additional package audiofile:<pre>yum install audiofile</pre>  * Download installation RPM packages for server from site [http://www.nomachine.com/select-package.php?os=linux&id=1 www.nomachine.com]. Choose right architecture i386 or x86_64. Example: <pre>wget http://64.34.161.181/download/3.4.0/Linux/nxclient-3.4.0-5.i386.rpmwget http://64.34.161.181/download/3.4.0/Linux/nxnode-3.4.0-6.i386.rpmwget http://64.34.161.181/download/3.4.0/Linux/FE/nxserver-3.4.0-8.i386.rpm</pre>  * Do simple manual installation of RPM packages. Example:<pre>rpm -ivh nxclient-3.4.0-5.i386.rpmrpm -ivh nxnode-3.4.0-6.i386.rpmrpm -ivh nxserver-3.4.0-8.i386.rpm</pre>  * Done. You can now connect from NX client to your server.  = Ubuntu = == Installation == Create a new VE container using the gutsy template. I then installed Edit /etc/apt/sources.list and enable the "multiverse" repository.Install X and XDM
<pre>apt-get install xorg xdm</pre>
Then I added add this 3rd party repo to sources.list. (Warning: the datakeylive.com repository below is obsolete! No ubuntu repository offers freenx at the moment) <prett>deb <s>http://www.datakeylive.com/ubuntu </s> gutsy main<br>deb-src <s>http://www.datakeylive.com/ubuntu </s> gutsy main<br></prett>Install the repo keys and update:<br><tt>wget <s>http://www.datakeylive.com/ubuntu/dists/gutsy/wjeremy.key</s> -O - | apt-key add -<br>wget <s>http://www.datakeylive.com/ubuntu/dists/gutsy/alivesoftware.key</s> -O - | apt-key add -<br>sudo apt-get update</tt>Install FreeNX (*)
<pre>
wget http://www.datakeylive.com/ubuntu/dists/gutsy/wjeremy.key -O - | sudo apt-key add get install expect openssh-wget http://www.datakeylive.com/ubuntu/dists/gutsy/alivesoftwareserver tcl8.key -O - | sudo apt-key add -sudo apt-get update4 libxcomp2 libxcompext2 libxcompshad nxlibs nxagent nxproxy nxclient freenx openssl
</pre>
Install FreeNXFor Ubuntu 8.04 :
<pre>
sudo apt-get install expect openssh-server tcl8.4 libxcomp2 libxcompext2 libxcomp3 libxcompext3 libxcompshad nxlibs nxagent nxproxy nxclient freenx-server openssl
</pre>
Finally I installed IceWMinstall XFCE
<pre>
apt-get install icewm icewm-themesxfce4
</pre>
<pre>useradd -m <username></pre>
Now we add this user to nxserver:<pre>sudo nxserver --adduser <username></pre>
=== Configure NX client ===
Setup the Host/Port.
In the desktop section select Unix and Custom. In Settings, select "Run the default X client script on server" and select "New virtual Desktop".I set display Now try to connect. You should get the XFCE desktop. Thanks to dantalizing for the feedback. == Troubleshooting == (*)If you get any errors like:<pre>dpkg: error processing /var/cache/apt/archives/libxcomp3_3.1.0-6-2_i386.deb (--unpack):trying to 1024x768overwrite `/usr/lib/libXcomp.so.3.1.0', which is also in package libxcomp2</pre>while installing the libxcomp package, just force-install the libxcomp package:<pre># cd /var/cache/apt/archives# dpkg --force-all -i libxcomp3_3.1.0-6-2_i386.deb# apt-get -f install</pre>
Now try You '''can't print from VE''' to connect. You should get the ICEwm menu bar at the bottom client PC easily because printing in NX is realized via samba-mount of the screenshared client's printer and CIFS isn't virtualized yet.
I think I would prefer a proper desktop session, but I do not know how to do this as of yet.[[Category: HOWTO]][[Category: X]]
30
edits