lost and found ( for me ? )

Showing posts with label remote desktop. Show all posts
Showing posts with label remote desktop. Show all posts

install FreeNX 4.2 on Ubuntu 14.04

download deb package from https://www.nomachine.com and install it.
# dpkg -i nomachine_4.2.25_1_amd64.deb

Unity is a little bit slow via remote desktop, so install gnome-session-fallback to use lightweight one rather than Unity.
# apt-get install gnome-session-fallback

reboot the OS
# reboot

Connect to the Ubuntu from NX client.
You will see login screen.
Slect GNOME Flashback(Metacity) and then log onto the Ubuntu.



FreeNX 4.0: connect to Ubuntu FreeNX server from Android devices with FreeNX client

There is a FreeNX client for Android devices.

You can download it as below.
https://www.nomachine.com/download

Android ( Nexus 7, Kitkat ) ---- Ubuntu 13.10
FreeNX client                           FreeNX server

How to set up FreeNX server on Ubuntu, please see the below.

The following is when connecting to the Ubuntu box from the Nexus 7.

NoMachine FreeNX 4.0 on Ubuntu 13.10

Here is how to install FreeNX 4.0 on Ubuntu 13.10

# tail -1 /etc/lsb-release ;uname -ri
DISTRIB_DESCRIPTION="Ubuntu 13.10"
3.11.0-13-generic x86_64

freenx server : ubuntu 13.10
freenx client : ubuntu 13.10

download freenx 4.0 for deb 64bit from https://www.nomachine.com/.

on the server ( ubuntu13.10 ), install freenx.
# dpkg -i nomachine_4.0.366_1_amd64.deb
以前に未選択のパッケージ nomachine を選択しています。
(データベースを読み込んでいます ... 現在 212278 個のファイルとディレクトリがインストールされています。)
(nomachine_4.0.366_1_amd64.deb から) nomachine を展開しています...
nomachine (4.0.366-1) を設定しています ...
NX> 700 Starting install at: 月 11月 18 01:30:13 2013.
NX> 700 Installing: nxclient version: 4.0.366.
NX> 700 Using installation profile: Ubuntu.
NX> 700 Install log is: /usr/NX/var/log/nxinstall.log.
NX> 700 Compiling the USB module.
NX> 700 Installing: nxplayer version: 4.0.366.
NX> 700 Using installation profile: Ubuntu.
NX> 700 Install log is: /usr/NX/var/log/nxinstall.log.
NX> 700 Installing: nxnode version: 4.0.366.
NX> 700 Using installation profile: Ubuntu.
NX> 700 Install log is: /usr/NX/var/log/nxinstall.log.
NX> 700 Creating configuration in: /usr/NX/etc/node.cfg.
NX> 700 Displaying file: /usr/NX/share/documents/node/cups-info

 CUPS Printing Backend

 The  NoMachine Node  setup procedure could not detect your
 CUPS installation: either  CUPS  is not installed on  your
 system or it was installed in a non-standard path. CUPS is
 needed  in order to  enable  printing  support  in your NX
 system.
 Please note that you can enable  printing support for your
 NX system at any time; to do this make sure  that you have
 CUPS installed then run:

   /usr/NX/scripts/setup/nxnode --printingsetup <pathname>

 to specify the location of the CUPS root path.

NX> 700 Node install completed with warnings.
NX> 700 Please review the install log for details.
NX> 700 Installing: nxserver version: 4.0.366.
NX> 700 Using installation profile: Ubuntu.
NX> 700 Install log is: /usr/NX/var/log/nxinstall.log.
NX> 700 Creating configuration in: /usr/NX/etc/server.cfg.
NX> 700 Install completed with warnings at: 月 11月 18 01:30:47 2013.
NX> 700 NoMachine was configured to run the following service:
NX> 700 NX service on port: 4000

By default, freeNX server opens TCP 4000.
I used default configuration. no edit.
# lsof -ni:4000
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
nxd     26875   nx    5u  IPv4 211463      0t0  TCP *:4000 (LISTEN)

on the client, install freenx by using same deb package.
# dpkg -i nomachine_4.0.366_1_amd64.deb

on the client, start freenx client
GUI -> Search “nomachine”

start 


connect to the server





If you have any problems about keyboard mapping, you might solve this by setxkbmap command.
# setxkbmap jp

ubuntu 13.04 64bit : install xrdp


Remote desktop server : ubuntu 13.04 64bit

Client : windows XP Pro

root@ubuntu-1:~# tail -1 /etc/lsb-release
DISTRIB_DESCRIPTION="Ubuntu 13.04"
root@ubuntu-1:~# uname -ri
3.8.0-19-generic x86_64

Install xrdp
# apt-get install xrdp

Start xrdp
# /etc/init.d/xrdp start
* Starting Remote Desktop Protocol server

Remote desktop clients usually connect to RDP server with TCP 3389.
So the XRDP server would open TCP 3389.
# lsof -ni:3389
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
xrdp    15184 xrdp    6u  IPv4 155266      0t0  TCP *:3389 (LISTEN)

On the windows XP box , start remote desktop client and connect to the server.
nnn , error , can’t connect.

login users need to belong to a group “xrdp”
add my account “foobar” in xrdp group
usermod -G groupA,groupB….xrdp <user name>
root@ubuntu-1:~# usermod -G foobar,root,fuse,libvirtd,x2gousers,xrdp foobar
root@ubuntu-1:~# egrep xrdp /etc/group
xrdp:x:144:foobar

restart xrdp
# /etc/init.d/xrdp restart

try again!
Okay , I can connect to the server.

Fedora 18 64bit : how to install freenx server


[root@localhost ~]# cat /etc/fedora-release
Fedora release 18 (Spherical Cow)
[root@localhost ~]# uname -ri
3.7.5-201.fc18.x86_64 x86_64

install freenx-server via yum.
[root@localhost ~]# yum install -y freenx-server


configure freenx-server
[root@localhost ~]# nxsetup --install --setup-nomachine-key
Setting up /etc/nxserver ...done
Generating public/private dsa key pair.
Your identification has been saved in /etc/nxserver/users.id_dsa.
Your public key has been saved in /etc/nxserver/users.id_dsa.pub.

Setting up /var/lib/nxserver/db ...done
Setting up /var/log/nx/nxserver.log ...done
Adding user "nx" to group "utmp" ...done
Setting up known_hosts and authorized_keys ...done
Setting up permissions ...done

----> Testing your nxserver configuration ...
Warning: Invalid value "COMMAND_FOOMATIC=/usr/bin/foomatic-ppdfile"
        Users will not be able to use foomatic.
Warning: "/usr/lib/cups/backend/smb" is not executable.
        Users will not be able to enable printing.
Warning: Invalid value "COMMAND_START_KDE=startkde"
        Users will not be able to request a KDE session.
Warning: Invalid value "COMMAND_START_CDE=cdwm"
        Users will not be able to request a CDE session.
Warning: Invalid value "COMMAND_XTERM=xterm"
        Users will not be able to request an xterm session.
Warning: Invalid value "COMMAND_SMBMOUNT=smbmount". You'll not be able to use SAMBA.
Warning: Invalid value "COMMAND_SMBUMOUNT=smbumount". You'll not be able to use SAMBA.
Warning: Invalid cupsd version of "/usr/sbin/cupsd". Need version 1.2.
        Users will not be able to enable printing. Ignore if you use cups > 1.2

 Warnings occured during config check.
 To enable these features please correct the configuration file.

<---- done

----> Testing your nxserver connection ...
The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
RSA key fingerprint is b3:a6:ef:05:65:a8:20:54:ed:07:67:41:7a:f2:31:87.
Are you sure you want to continue connecting (yes/no)?
Warning: Permanently added '127.0.0.1' (RSA) to the list of known hosts.
HELLO NXSERVER - Version 3.2.0-74-SVN OS (GPL, using backend: 3.5.0)
<--- done

Ok, nxserver is ready.

PAM authentication enabled:
 All users will be able to login with their normal passwords.

 PAM authentication will be done through SSH.
 Please ensure that SSHD on localhost accepts password authentication.

 You can change this behaviour in the /etc/nxserver/node.conf file.
Have Fun!


node.cfg

back up
[root@localhost ~]# cd /etc/nxserver/
[root@localhost nxserver]# cp node.conf node.conf.org


edit node.cfg like this:
[root@localhost nxserver]# cat node.conf
ENABLE_PASSDB_AUTHENTICATION="0"
ENABLE_SSH_AUTHENTICATION="1"
ENABLE_CLIPBOARD="both"
NX_LOG_LEVEL=4
NX_LOGFILE=/var/log/nx/nxserver.log
COMMAND_MD5SUM="md5sum"


start freenx-server
[root@localhost nxserver]# systemctl status freenx-server.service
freenx-server.service - FreeNX Server
 Loaded: loaded (/usr/lib/systemd/system/freenx-server.service; disabled)
 Active: active (exited) since Thu 2013-02-14 19:15:37 JST; 10s ago
   Docs: http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ
Process: 3945 ExecStart=/usr/libexec/nx/nxserver --start (code=exited, status=0/SUCCESS)
Process: 3873 ExecStartPre=/usr/libexec/nx/nxserver --cleanup (code=exited, status=1/FAILURE)
Process: 3870 ExecStartPre=/usr/libexec/nx/freenx-server-check-setup (code=exited, status=0/SUCCESS)

Feb 14 19:15:37 localhost.localdomain systemd[1]: Starting FreeNX Server...
Feb 14 19:15:37 localhost.localdomain systemd[1]: Started FreeNX Server.


start freenx-server when booting up Fedora
[root@localhost nxserver]# systemctl enable freenx-server.service
ln -s '/usr/lib/systemd/system/freenx-server.service' '/etc/systemd/system/multi-user.target.wants/freenx-server.service'



prepare a NX client.
I installed NX client on LInux Mint 14.
mint hattori # tail -1 /etc/lsb-release
DISTRIB_DESCRIPTION="Linux Mint 14 Nadia"
mint hattori # uname -ri
3.5.0-23-generic x86_64




download NX client for Linux from http://www.nomachine.com/download-client-linux.php
mint hattori # ls *.deb
nxclient_3.5.0-7_amd64.deb


install nxclient
mint hattori # dpkg -i nxclient_3.5.0-7_amd64.deb
mint hattori #  chmod 755 /usr/lib/cups/backend/ipp


start nxclient
mint hattori # /usr/NX/bin/nxclient


connect to the NX server ( Fedora 18 ) from the NX client ( Mint )

Okay , I can connect to the NX server.




how to install / set up Remote Desktop Free NX on Fedora 17 64bit


[root@f17-64 hattori]# cat /etc/fedora-release
Fedora release 17 (Beefy Miracle)
[root@f17-64 hattori]# uname -ri
3.6.9-2.fc17.x86_64 x86_64

[ install FreeNX server on Fedora 17 ]

you can install FreeNX server via yum
[root@f17-64 hattori]# yum install -y freenx-server

configure FreeNX server
# nxsetup --install --setup-nomachine-key
Setting up /etc/nxserver ...done
Setting up /var/lib/nxserver/db ...done
Setting up /var/log/nx/nxserver.log ...done
Adding user "nx" to group "utmp" ...done
Setting up known_hosts and authorized_keys ...done
Setting up permissions ...done

----> Testing your nxserver configuration ...
Warning: Invalid value "COMMAND_FOOMATIC=/usr/bin/foomatic-ppdfile"
        Users will not be able to use foomatic.
Warning: Invalid value "COMMAND_START_KDE=startkde"
        Users will not be able to request a KDE session.
Warning: Invalid value "COMMAND_START_CDE=cdwm"
        Users will not be able to request a CDE session.
Warning: Invalid value "COMMAND_SMBMOUNT=smbmount". You'll not be able to use SAMBA.
Warning: Invalid value "COMMAND_SMBUMOUNT=smbumount". You'll not be able to use SAMBA.
Warning: Invalid cupsd version of "/usr/sbin/cupsd". Need version 1.2.
        Users will not be able to enable printing. Ignore if you use cups > 1.2

 Warnings occured during config check.
 To enable these features please correct the configuration file.

<---- done

----> Testing your nxserver connection ...
HELLO NXSERVER - Version 3.2.0-74-SVN OS (GPL, using backend: 3.5.0)
<--- done

Ok, nxserver is ready.

PAM authentication enabled:
 All users will be able to login with their normal passwords.

 PAM authentication will be done through SSH.
 Please ensure that SSHD on localhost accepts password authentication.

 You can change this behaviour in the /etc/nxserver/node.conf file.
Have Fun!



NX server’s configuration
# cat /etc/nxserver/node.conf
ENABLE_PASSDB_AUTHENTICATION="0"
ENABLE_SSH_AUTHENTICATION="1"
ENABLE_CLIPBOARD="both"
NX_LOG_LEVEL=4
NX_LOGFILE=/var/log/nx/nxserver.log
COMMAND_MD5SUM="md5sum"


start freenx server
[root@f17-64 hattori]# systemctl restart freenx-server.service

[root@f17-64 hattori]# systemctl status freenx-server.service
freenx-server.service - FreeNX Server
 Loaded: loaded (/usr/lib/systemd/system/freenx-server.service; enabled)
 Active: active (exited) since Wed, 12 Dec 2012 01:03:54 +0900; 2s ago
Process: 7927 ExecStopPost=/usr/libexec/nx/nxserver --cleanup (code=exited, status=1/FAILURE)
Process: 7853 ExecStop=/usr/libexec/nx/nxserver --stop (code=exited, status=0/SUCCESS)
Process: 8078 ExecStart=/usr/libexec/nx/nxserver --start (code=exited, status=0/SUCCESS)
Process: 8004 ExecStartPre=/usr/libexec/nx/nxserver --cleanup (code=exited, status=1/FAILURE)
Process: 8001 ExecStartPre=/usr/libexec/nx/freenx-server-check-setup (code=exited, status=0/SUCCESS)
 CGroup: name=systemd:/system/freenx-server.service


how to run FreeNX server when booting up Fedora 17.
# systemctl enable freenx-server.service
ln -s '/usr/lib/systemd/system/freenx-server.service' '/etc/systemd/system/multi-user.target.wants/freenx-server.service'


check configuration
# nxsetup --test

----> Testing your nxserver configuration ...
Warning: Invalid value "COMMAND_FOOMATIC=/usr/bin/foomatic-ppdfile"
        Users will not be able to use foomatic.
Warning: Invalid value "COMMAND_START_KDE=startkde"
        Users will not be able to request a KDE session.
Warning: Invalid value "COMMAND_START_CDE=cdwm"
        Users will not be able to request a CDE session.
Warning: Invalid value "COMMAND_SMBMOUNT=smbmount". You'll not be able to use SAMBA.
Warning: Invalid value "COMMAND_SMBUMOUNT=smbumount". You'll not be able to use SAMBA.
Warning: Invalid cupsd version of "/usr/sbin/cupsd". Need version 1.2.
        Users will not be able to enable printing. Ignore if you use cups > 1.2

 Warnings occured during config check.
 To enable these features please correct the configuration file.

<---- done

----> Testing your nxserver connection ...
HELLO NXSERVER - Version 3.2.0-74-SVN OS (GPL, using backend: 3.5.0)
<--- done


[ connect to FreeNX server from NX client ]

install FreeNX client from http://www.nomachine.com/download-client-linux.php

in case of NX client for Fedora , pleaes change permission of ipp file.
# chmod 755 /usr/lib/cups/backend/ipp


start nx client and set up

enter freenx server’ip



specify UNIX , GNOME



here’s detailed configuration



connect




okay

CentOS 6.2 64bit : set up freenx server



# cat /etc/centos-release
CentOS release 6.2 (Final)

# uname -ri
2.6.32-220.7.1.el6.x86_64 x86_64


[ install freenx server on CentOS 6 ]

install freenx and nx via yum
# yum install freenx nx –y


[ configuration ]

config files are sotred under /etc/nxserver directory.
# pwd
/etc/nxserver

# ls
client.id_dsa.key  node.conf.sample  passwords.orig         users.id_dsa
node.conf          passwords         server.id_dsa.pub.key  users.id_dsa.pub


inisital setup


edit node.conf like this:
# cat node.conf
ENABLE_PASSDB_AUTHENTICATION="0"
ENABLE_SSH_AUTHENTICATION="1"
ENABLE_CLIPBOARD="both"
NX_LOG_LEVEL=4
NX_LOGFILE=/var/log/nx/nxserver.log
COMMAND_MD5SUM="md5sum"

# nxsetup --install --setup-nomachine-key

restart nxserver
# /etc/init.d/freenx-server restart


[ intall NX client for Windows on Windows 7 ]

download nx client from http://www.nomachine.com/download-package.php?Prod_Id=3655

I have installed NX client 3.5.0-7 for windows

launch NX client -> configure


configuration files ( NX client for windows ) for nx session are stored \user\user name\.nx\config folder

Here’s centos6-1.nxs file.  I configured keyboard layout as jp.

<!DOCTYPE NXClientSettings>
<NXClientSettings application="nxclient" version="1.3" >
<group name="Advanced" >
<option key="Cache size" value="16" />
<option key="Cache size on disk" value="64" />
<option key="Current keyboard" value="true" />
<option key="Custom keyboard layout" value="jp" />
<option key="Disable DirectDraw" value="false" />
<option key="Disable ZLIB stream compression" value="false" />
<option key="Disable deferred updates" value="false" />
<option key="Enable HTTP proxy" value="false" />
<option key="Enable SSL encryption" value="true" />
<option key="Enable response time optimisations" value="false" />
<option key="Grab keyboard" value="false" />
<option key="HTTP proxy host" value="" />
<option key="HTTP proxy port" value="8080" />
<option key="HTTP proxy username" value="" />
<option key="Remember HTTP proxy password" value="false" />
<option key="Restore cache" value="true" />
<option key="StreamCompression" value="" />
</group>
<group name="Environment" >
<option key="Font server host" value="" />
<option key="Font server port" value="7100" />
<option key="Use font server" value="false" />
</group>
<group name="General" >
<option key="Automatic reconnect" value="true" />
<option key="Command line" value="" />
<option key="Custom Unix Desktop" value="console" />
<option key="Desktop" value="gnome" />
<option key="Disable SHM" value="false" />
<option key="Disable emulate shared pixmaps" value="false" />
<option key="Link speed" value="adsl" />
<option key="Remember password" value="false" />
<option key="Resolution" value="1024x880" />
<option key="Resolution height" value="880" />
<option key="Resolution width" value="1024" />
<option key="Server host" value="IP address" />
<option key="Server port" value="22" />
<option key="Session" value="unix" />
<option key="Spread over monitors" value="false" />
<option key="Use default image encoding" value="1" />
<option key="Use render" value="true" />
<option key="Use taint" value="true" />
<option key="Virtual desktop" value="false" />
<option key="XAgent encoding" value="true" />
<option key="displaySaveOnExit" value="true" />
<option key="xdm broadcast port" value="177" />
<option key="xdm list host" value="localhost" />
<option key="xdm list port" value="177" />
<option key="xdm mode" value="server decide" />
<option key="xdm query host" value="localhost" />
<option key="xdm query port" value="177" />
</group>
<group name="Images" >
<option key="Disable JPEG Compression" value="0" />
<option key="Disable all image optimisations" value="false" />
<option key="Disable backingstore" value="false" />
<option key="Disable composite" value="false" />
<option key="Image Compression Type" value="3" />
<option key="Image Encoding Type" value="0" />
<option key="Image JPEG Encoding" value="false" />
<option key="JPEG Quality" value="6" />
<option key="RDP Image Encoding" value="3" />
<option key="RDP JPEG Quality" value="6" />
<option key="RDP optimization for low-bandwidth link" value="false" />
<option key="Reduce colors to" value="" />
<option key="Use PNG Compression" value="true" />
<option key="VNC JPEG Quality" value="6" />
<option key="VNC images compression" value="3" />
</group>
<group name="Login" >
<option key="Auth" value="EMPTY_PASSWORD" />
<option key="Guest Mode" value="false" />
<option key="Guest password" value="" />
<option key="Guest username" value="" />
<option key="Login Method" value="nx" />
<option key="Public Key" value="-----BEGIN DSA PRIVATE KEY-----
zzzzz
-----END DSA PRIVATE KEY-----
" />
<option key="User" value="zzz" />
</group>
<group name="Services" >
<option key="Audio" value="false" />
<option key="IPPPort" value="631" />
<option key="IPPPrinting" value="false" />
<option key="Shares" value="true" />
</group>
<group name="VNC Session" >
<option key="Display" value="0" />
<option key="Remember" value="false" />
<option key="Server" value="" />
</group>
<group name="Windows Session" >
<option key="Application" value="" />
<option key="Authentication" value="2" />
<option key="Color Depth" value="8" />
<option key="Domain" value="" />
<option key="Image Cache" value="true" />
<option key="Password" value="EMPTY_PASSWORD" />
<option key="Remember" value="true" />
<option key="Run application" value="false" />
<option key="Server" value="" />
<option key="User" value="" />
</group>
<group name="share chosen" >
<option key="Share number" value="0" />
</group>
</NXClientSettings>


connect to the centos from windows machine.

[ keymap setting ]

I can’t enter underscore via NX session

to solve this , edit .xmodmap file.
$ xmodmap -pke > .Xmodmap


add the “backslach underscore” in keycode 123.
$ egrep 123 ~/.Xmodmap
keycode 123 = backslash underscore


terminate NX session and connect again
You could enter underscore.



If you want to start freenx-server when booting the OS , configure system services with chkconfig command like this:

# chkconfig freenx-server --list
freenx-server   0:off   1:off   2:on    3:on    4:on    5:on    6:off

# chkconfig freenx-server off
# chkconfig freenx-server on