Install VNC Server - TightVNC: Difference between revisions

From Embedded Workshop
Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:
Install the lightweight Xfce desktop environment, along with some "goodies"
Install the lightweight Xfce desktop environment, along with some "goodies"
  $ sudo apt-get install xfce4 xfce4-goodies
  $ sudo apt-get install xfce4 xfce4-goodies
Stop and check diskspace:
ubuntu@ip-172-31-26-122:~$ df
Filesystem    1K-blocks    Used Available Use% Mounted on
/dev/xvda1      8065444 2330024  5719036  29% /
Once the desktop environment is in place, install the TightVNC service:
Once the desktop environment is in place, install the TightVNC service:
  $ sudo apt-get install tightvncserver
  $ sudo apt-get install tightvncserver
Stop and check diskspace:
ubuntu@ip-172-31-26-122:~$ df
Filesystem    1K-blocks    Used Available Use% Mounted on
/dev/xvda1      8065444 2332520  5716540  29% /


Run the following to create the password(s) and configuration files for your VNC service:<br>
Run the following to create the password(s) and configuration files for your VNC service:<br>
Line 24: Line 32:
  $ sudo nano ~/.vnc/xstartup
  $ sudo nano ~/.vnc/xstartup


Commands in this file are executed whenver you start or restart the VNC serice.  We need VNC to start our desktop environment if it isn't already started.  Add the following commands to the xstartup file:
Commands in this file are executed whenever you start or restart the VNC serice.  We need VNC to start our desktop environment if it isn't already started.  Add the following commands to the xstartup file:
  #!/bin/sh
  #!/bin/sh
  xrdb $HOME/.Xresources
  xrdb $HOME/.Xresources

Revision as of 12:57, 19 March 2019

VNC: Virtual Network Computing
Let's follow the directions provided by Digital Ocean:
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-18-04

On your server, begin by updating your list of packages:

$ sudo apt-get update

Install the lightweight Xfce desktop environment, along with some "goodies"

$ sudo apt-get install xfce4 xfce4-goodies

Stop and check diskspace:

ubuntu@ip-172-31-26-122:~$ df
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/xvda1       8065444 2330024   5719036  29% /

Once the desktop environment is in place, install the TightVNC service:

$ sudo apt-get install tightvncserver

Stop and check diskspace:

ubuntu@ip-172-31-26-122:~$ df
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/xvda1       8065444 2332520   5716540  29% /

Run the following to create the password(s) and configuration files for your VNC service:
Password must be between six and eight characters in length.
Passwords longer than eight characters will be truncated.
At this time, you can also create a "View Only" password.

$ vncserver

We will now configure the VNC service, but first, we must stop the service:

$ vncserver -kill :1

We are going to be modifying the xstartup file. Before doing that, rename the original file:

$ mv ~/.vnc/xstartup ~/.vnc/xstartup.bak

Create a new xstartup file

$ sudo nano ~/.vnc/xstartup

Commands in this file are executed whenever you start or restart the VNC serice. We need VNC to start our desktop environment if it isn't already started. Add the following commands to the xstartup file:

#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
startxfce4 &

Make sure the file has execute permission

$ sudo chmod +x ~/.vnc/xstartup

Now, restart the VNC service:

$ vncserver