Pogorelovs

Navigate back to the homepage

Installation and configuration of NX server on remote host

Sergey Pogorelov
April 13th, 2020 · 1 min read

Set password

1sudo passwd ubuntu

Create dummy virtual display

1sudo apt-get install xserver-xorg-video-dummy

Put the following contents under sudo vim /etc/X11/xorg.conf

1Section "Device"
2 Identifier "Configured Video Device"
3 Driver "dummy"
4 VideoRam 256000
5EndSection
6Section "Monitor"
7 Identifier "Configured Monitor"
8 HorizSync 28.0-80.0
9 VertRefresh 48.0-75.0
10 #Modeline "1920x1200_60.00" 172.80 1920 2040 2248 2576 1200 1081 1084 1118 -HSync +Vsync
11 Modeline "1920x1200_60.00" 193.16 1920 2048 2256 2592 1200 1201 1204 1242 -HSync +Vsync
12 Virtual 2880 1800
13EndSection
14Section "Screen"
15 Identifier "Default Screen"
16 Monitor "Configured Monitor"
17 Device "Configured Video Device"
18 DefaultDepth 24
19 SubSection "Display"
20 Depth 24
21 Modes "1920x1200_60.00"
22 Virtual 2880 1800
23 EndSubSection
24EndSection

Install Desktop Environment

1sudo apt-get update
2sudo apt-get dist-upgrade
3sudo apt-get install ubuntu-desktop

Reboot sudo reboot -i

Install NX server

1wget https://download.nomachine.com/download/6.9/Linux/nomachine_6.9.2_1_amd64.deb
2sudo dpkg -i nomachine_6.9.2_1_amd64.deb
3mkdir -p ~/.nx/config

Add your host to authorized clients for NX

  1. Copy .pub key from your machine under ~/.nx/config (you can use scp)
  2. Rename your key under ~/.nx/config to authorized.crt
  3. chmod 600 ~/.nx/config/authorized.crt
  4. Reboot sudo reboot -i

Now you can connect via NX from your host machine

Join my email list and get notified about new content

Be the first to receive my latest content with the ability to opt-out at anytime. I promise not to spam your inbox or share your email with any third parties.

More articles from Pogorelovs

Sbt assembly without tests

Sometimes it might be useful to run the `sbt assembly` without tests...

February 7th, 2020 · 1 min read

How-to debug JVM applications remotely

Sometimes it might be useful to debug remote applications that run on the remote server and not your local machine...

February 4th, 2020 · 1 min read
© 2018–2020 Pogorelovs
Link to $https://github.com/sergeioffLink to $https://www.linkedin.com/in/sergeioff