Category: nx no machine

How to find out the actual screen resolution from a shell script

When I have to personalize the settings of my FreeNX client, I have to know which resolution should I set in order to get a maximized window which perfectly fit my desktop. Once I get connected to my remote desktop and having its window resized, I get the new resolution with:

xdpyinfo  | grep dimensions
dimensions:    3200x1200 pixels (847x318 millimeters)


xrandr -q | grep current
Screen 0: minimum 8 x 8, current 3200 x 1200, maximum 8192 x 8192

How to change the port on NX server

NX Server is a complete solution for remote access to your Linux workstation. NoMachine offers a free version which allows 2 users to connect at the same time no matter what their location is, and share the desktop. NX Server runs over SSH so you don’t need to open any other ports on your firewall other than the port for the SSH service.

It is considered a good security practice to change the default port the SSH service listens on. When you change this port it breaks the NX Server service since it expects the SSH service to be running on the default port of 22. You can fix NX Server by modifying the following file:


Look for the following settings in the file:

SSHDPort = "22"
SSHDAuthPort = "22"

Change “22″ to whatever port your SSH service is now listening on. You’ll then need to restart the NX Server service to put the changes into effect:

/etc/init.d/nxserver restart

WordPress Themes