lost and found ( for me ? )

Showing posts with label freenx. Show all posts
Showing posts with label freenx. 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 error : Error is 112 'Address already in use'

When I try to connect to Ubuntu from FreeNX client ( Windows ) , I have faced the following error.

error message on NX client

Info: Connection with remote proxy completed.
Error: Call to bind failed for font TCP port 11001. Error is 112 'Address already in use'.

# apt-cache policy nxserver
nxserver:
 Installed: 3.5.0-11
 Candidate: 3.5.0-11
 Version table:
*** 3.5.0-11 0
       100 /var/lib/dpkg/status

# apt-cache policy nxnode
nxnode:
 Installed: 3.5.0-9
 Candidate: 3.5.0-9
 Version table:
*** 3.5.0-9 0
       100 /var/lib/dpkg/status

I try to connect to two different Linux boxes from the same NX client at a time.
I can establish the first NX session , however I can’t establish the second NX session...

NX client (windows ) --- NX server ( Ubuntu 12.04 )  <- can establish :D
                    --- NX server ( Linux Mint 13 )  <- can’t establish :(

NX client seems to use the same TCP port number for both NX session.
To solve this , edit node.cfg on the NX server to avoid the NX client using same TCP port.

- on the Ubuntu 12.04 box ( NX server )
# egrep -i ^display /usr/NX/etc/node.cfg
DISPLAY_BASE=1000
DISPLAY_BASE + 3000

restart NX server
# /etc/init.d/nxserver restart

- on the Linux Mint 13 box ( NX server )
# egrep -i ^display /usr/NX/etc/node.cfg
DISPLAY_BASE=2000
DISPLAY_BASE + 4000

restart NX server
# /etc/init.d/nxserver restart

After editing node.cfg , I can connect to the two NX server boxes on the same NX client at a time.

install FreeNX on Mint 13


install nx*.deb

# ls nx*
nxclient_3.5.0-7_amd64.deb  nxserver_3.5.0-11_amd64.deb
nxnode_3.5.0-9_amd64.deb

# dpkg -l nx*


configuration file
# egrep -v ^# /usr/NX/etc/server.cfg
ConfigFileVersion = "2.0"
EnablePasswordDB = "0"

# egrep -v ^# /usr/NX/etc/node.cfg
ConfigFileVersion = "2.0"
CommandFuser = "/bin/fuser"
CommandXmodmap = "/usr/bin/xmodmap"
CUPSBinPath = ""
CUPSSbinPath = ""
EnableCUPSSupport = "0"
CommandStartGnome = "/usr/bin/mate-session"
MountShareProtocol = "both"


start NX server
# /usr/NX/scripts/init/nxserver stop
# /usr/NX/scripts/init/nxserver restart



keyboard setting
# cat /home/hattori/.Xmodmap
keycode   8 = Mode_switch
keycode   9 = Escape
keycode  10 = 1 exclam
keycode  11 = 2 quotedbl
keycode  12 = 3 numbersign
keycode  13 = 4 dollar
keycode  14 = 5 percent
keycode  15 = 6 ampersand
keycode  16 = 7 apostrophe
keycode  17 = 8 parenleft
keycode  18 = 9 parenright
keycode  19 = 0 asciitilde
keycode  20 = minus equal
keycode  21 = asciicircum asciitilde
keycode  22 = BackSpace
keycode  23 = Tab ISO_Left_Tab
keycode  24 = q Q
keycode  25 = w W
keycode  26 = e E
keycode  27 = r R
keycode  28 = t T
keycode  29 = y Y
keycode  30 = u U
keycode  31 = i I
keycode  32 = o O
keycode  33 = p P
keycode  34 = at grave
keycode  35 = bracketleft braceleft
keycode  36 = Return
keycode  37 = Control_L
keycode  38 = a A
keycode  39 = s S
keycode  40 = d D
keycode  41 = f F
keycode  42 = g G
keycode  43 = h H
keycode  44 = j J
keycode  45 = k K
keycode  46 = l L
keycode  47 = semicolon plus
keycode  48 = colon asterisk
keycode  49 = Zenkaku_Hankaku Kanji
keycode  50 = Shift_L
keycode  51 = bracketright braceright
keycode  52 = z Z
keycode  53 = x X
keycode  54 = c C
keycode  55 = v V
keycode  56 = b B
keycode  57 = n N
keycode  58 = m M
keycode  59 = comma less
keycode  60 = period greater
keycode  61 = slash question
keycode  62 = Shift_R
keycode  63 = KP_Multiply XF86ClearGrab
keycode  64 = Alt_L Meta_L
keycode  65 = space
keycode  66 = Caps_Lock ISO_Next_Group
keycode  67 = F1 XF86Switch_VT_1
keycode  68 = F2 XF86Switch_VT_2
keycode  69 = F3 XF86Switch_VT_3
keycode  70 = F4 XF86Switch_VT_4
keycode  71 = F5 XF86Switch_VT_5
keycode  72 = F6 XF86Switch_VT_6
keycode  73 = F7 XF86Switch_VT_7
keycode  74 = F8 XF86Switch_VT_8
keycode  75 = F9 XF86Switch_VT_9
keycode  76 = F10 XF86Switch_VT_10
keycode  77 = Num_Lock
keycode  78 = Scroll_Lock
keycode  79 = KP_Home KP_7
keycode  80 = KP_Up KP_8
keycode  81 = KP_Prior KP_9
keycode  82 = KP_Subtract XF86Prev_VMode
keycode  83 = KP_Left KP_4
keycode  84 = KP_Begin KP_5
keycode  85 = KP_Right KP_6
keycode  86 = KP_Add XF86Next_VMode
keycode  87 = KP_End KP_1
keycode  88 = KP_Down KP_2
keycode  89 = KP_Next KP_3
keycode  90 = KP_Insert KP_0
keycode  91 = KP_Delete KP_Decimal
keycode  92 =
keycode  93 =
keycode  94 = less greater bar brokenbar bar brokenbar
keycode  95 = F11 XF86Switch_VT_11
keycode  96 = F12 XF86Switch_VT_12
keycode  97 = Home
keycode  98 = Up
keycode  99 = Prior
keycode 100 = Left
keycode 101 =
keycode 102 = Right
keycode 103 = End
keycode 104 = Down
keycode 105 = Next
keycode 106 = Insert
keycode 107 = Delete
keycode 108 = KP_Enter
keycode 109 = Control_R
keycode 110 = Pause Break
keycode 111 = Print Execute
keycode 112 = KP_Divide XF86Ungrab
keycode 113 = Alt_R Meta_R
keycode 114 =
keycode 115 = Super_L
keycode 116 = Super_R
keycode 117 = Menu
keycode 118 =
keycode 119 =
keycode 120 =
keycode 121 =
keycode 122 =
keycode 123 = backslash underscore
keycode 124 = ISO_Level3_Shift
keycode 125 = NoSymbol Alt_L
keycode 126 = KP_Equal
keycode 127 = NoSymbol Super_L
keycode 128 = NoSymbol Hyper_L
keycode 129 = Henkan_Mode Mode_switch
keycode 130 =
keycode 131 = Muhenkan
keycode 132 =
keycode 133 = backslash bar
keycode 134 = KP_Decimal KP_Decimal
keycode 135 =
keycode 136 =
keycode 137 =
keycode 138 =
keycode 139 =
keycode 140 =
keycode 141 =
keycode 142 =
keycode 143 =
keycode 144 =
keycode 145 =
keycode 146 =
keycode 147 =
keycode 148 =
keycode 149 =
keycode 150 =
keycode 151 =
keycode 152 =
keycode 153 =
keycode 154 =
keycode 155 =
keycode 156 = NoSymbol Meta_L
keycode 157 =
keycode 158 =
keycode 159 =
keycode 160 =
keycode 161 =
keycode 162 =
keycode 163 =
keycode 164 =
keycode 165 =
keycode 166 =
keycode 167 =
keycode 168 =
keycode 169 =
keycode 170 =
keycode 171 =
keycode 172 =
keycode 173 =
keycode 174 =
keycode 175 =
keycode 176 =
keycode 177 =
keycode 178 =
keycode 179 =
keycode 180 =
keycode 181 =
keycode 182 =
keycode 183 =
keycode 184 =
keycode 185 =
keycode 186 =
keycode 187 =
keycode 188 =
keycode 189 =
keycode 190 =
keycode 191 =
keycode 192 =
keycode 193 =
keycode 194 =
keycode 195 =
keycode 196 =
keycode 197 =
keycode 198 =
keycode 199 =
keycode 200 =
keycode 201 =
keycode 202 =
keycode 203 =
keycode 204 =
keycode 205 =
keycode 206 =
keycode 207 =
keycode 208 = Hiragana_Katakana Romaji
keycode 209 = Hiragana_Katakana
keycode 210 = Eisu_toggle
keycode 211 = backslash underscore
keycode 212 =
keycode 213 =
keycode 214 = XF86Display
keycode 215 = XF86KbdLightOnOff
keycode 216 = XF86KbdBrightnessDown
keycode 217 = XF86KbdBrightnessUp
keycode 218 =
keycode 219 =
keycode 220 =
keycode 221 =
keycode 222 =
keycode 223 =
keycode 224 =
keycode 225 =
keycode 226 =
keycode 227 =
keycode 228 =
keycode 229 =
keycode 230 =
keycode 231 =
keycode 232 =
keycode 233 =
keycode 234 =
keycode 235 =
keycode 236 =
keycode 237 =
keycode 238 =
keycode 239 =
keycode 240 =
keycode 241 =
keycode 242 =
keycode 243 =
keycode 244 =
keycode 245 =
keycode 246 =
keycode 247 =
keycode 248 =
keycode 249 =
keycode 250 =
keycode 251 =
keycode 252 =
keycode 253 =
keycode 254 =
keycode 255 =

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