Skip to content

Commit 3444c31

Browse files
Merge pull request #2488 from jasonrandrews/review
Update VNC install guide
2 parents e1d0920 + 407a61d commit 3444c31

File tree

2 files changed

+27
-27
lines changed

2 files changed

+27
-27
lines changed
194 KB
Loading

content/install-guides/vnc.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ additional_search_terms:
99
- linux
1010

1111
### Estimated completion time in minutes (please use integer multiple of 5)
12-
minutes_to_complete: 30
12+
minutes_to_complete: 15
1313

1414
author: Jason Andrews
1515

@@ -29,67 +29,67 @@ multitool_install_part: false # Set to true if a sub-page of a multi-page arti
2929
layout: installtoolsall # DO NOT MODIFY. Always true for tool install articles
3030
---
3131

32-
Virtual Network Computing (VNC) is one of the common tools used to connect to a remote Linux desktop. During development it may be useful to quickly create a remote desktop on an Arm server.
32+
Virtual Network Computing (VNC) is one of the common tools used to connect to a remote Linux desktop. During development, it can be useful to quickly create a remote desktop on an Arm server.
3333

34-
This section provides info about how to setup VNC on a remote Arm Linux machine.
35-
36-
Feel free to seek out additional VNC tutorials or add more information to this page.
34+
This guide provides information about how to set up VNC on a remote Arm Linux machine.
3735

3836
This installation only works on newer versions of Ubuntu and Debian. It was successfully tested on **Ubuntu 22.04** and is known to fail on **Ubuntu 20.04**.
3937

4038
## What is VNC?
4139

42-
VNC is a client server application. A VNC server runs on a remote machine. A VNC client runs on the local machine and connects to the remote server.
40+
VNC is a client-server application. A VNC server runs on a remote machine. A VNC client runs on the local machine and connects to the remote server.
4341

4442
### How do I install the VNC server and xfce4 desktop?
4543

46-
To use VNC, a VNC server needs to be installed. There are multiple VNC servers which can be used. This recipe uses [TigerVNC](https://tigervnc.org/).
44+
To use VNC, you need to install a VNC server. There are multiple VNC servers you can use. This guide uses [TigerVNC](https://tigervnc.org/).
4745

48-
Desktop software is also needed. There are many options for this, but using [xfce4](https://www.xfce.org/) makes for a minimal install with good performance.
46+
You also need desktop software. There are many options for this, but using [xfce4](https://www.xfce.org/) provides a minimal install with good performance.
4947

50-
Install the desktop software.
48+
Install the desktop software:
5149

5250
```bash
5351
sudo apt-get install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils xfce4-terminal -y
5452
```
5553

56-
Install the VNC server.
54+
Install the VNC server:
5755

5856
```bash
5957
sudo apt-get install tigervnc-standalone-server tigervnc-common -y
6058
```
6159

6260
### How do I set a VNC password?
6361

64-
Run the password command to set a password for VNC. This is not the password for the user account, just for the VNC client to connect to the VNC server.
62+
Run the `vncpasswd` command to set a password for VNC. This is not the password for your user account, but for the VNC client to connect to the VNC server.
6563

6664
```console
6765
vncpasswd
6866
```
6967

70-
Remember the password for later when the client is connected.
68+
Remember this password for later when you connect the client.
7169

7270
### How do I configure the desktop startup for VNC?
7371

74-
Create a file at `$HOME/.vnc/xstartup` with the contents:
72+
Create a file at `$HOME/.vnc/xstartup` with the following contents:
7573

7674
```console
7775
#!/bin/sh
7876
unset SESSION_MANAGER
7977
unset DBUS_SESSION_BUS_ADDRESS
8078
exec startxfce4
8179
```
82-
Make sure the `xstartup` file has executable permission.
80+
Make sure the `xstartup` file has executable permissions:
81+
8382
```console
8483
chmod +x $HOME/.vnc/xstartup
8584
```
8685

8786
### How do I set up a systemd service to manage VNC?
8887

89-
To create a systemd service to start the VNC server create the file `/etc/systemd/system/[email protected]`
88+
To create a systemd service to start the VNC server, create the file `/etc/systemd/system/[email protected]`.
9089

91-
Use sudo or root as it is located in a read-only area.
92-
```console
90+
Use `sudo` or root privileges because this file is in a system directory.
91+
92+
```ini
9393
[Unit]
9494
Description=Remote desktop service (VNC)
9595
After=syslog.target network.target
@@ -105,9 +105,8 @@ Use sudo or root as it is located in a read-only area.
105105

106106
[Install]
107107
WantedBy=multi-user.target
108-
109-
```
110-
The commands below are for any Linux distribution using `systemd`.
108+
```
109+
The following commands are for any Linux distribution that uses `systemd`.
111110

112111
To start the VNC service:
113112

@@ -129,24 +128,25 @@ sudo systemctl restart [email protected]
129128

130129
### How do I use port forwarding via SSH to connect to VNC?
131130

132-
The default port for the first instance of VNC is `5901`. SSH port forwarding is the best solution for accessing the Linux desktop on a cloud machine. This way no additional ports need to be opened in the security group.
131+
The default port for the first instance of VNC is `5901`. SSH port forwarding is the recommended solution for accessing the Linux desktop on a cloud machine. This way, no additional ports need to be opened in the security group.
133132

134-
SSH to your remote Linux machine. Refer to [SSH](/install-guides/ssh/) for additional details.
133+
SSH to your remote Linux machine. See [SSH](/install-guides/ssh/) for additional details.
135134

136-
Substitute your private key file and public IP address of the remote machine.
135+
Substitute your private key file and the public IP address of the remote machine in the following command:
137136

138137
```console
139138
ssh -i <private_key> -L 5901:localhost:5901 ubuntu@<public_ip_address>
140139
```
141140

142-
Once connected via SSH, use a VNC client to connect. [Download](https://sourceforge.net/projects/tigervnc/files/stable/1.12.0/) an install a TigerVNC client for your computer.
141+
Once connected via SSH, use a VNC client to connect. [Download](https://sourceforge.net/projects/tigervnc/files/stable/1.12.0/) and install a TigerVNC client for your computer.
142+
143+
Open the VNC client and enter the following for the VNC server:
143144

144-
Open the VNC client and enter the following for the VNC server.
145145
```console
146146
localhost:5901
147147
```
148-
You will be prompted for the password created earlier with `vncpasswd`.
148+
You will be prompted for the password you created earlier with `vncpasswd`.
149149

150-
A remote Linux Desktop should appear on your local computer. Make sure to close the VNC client first and then exit the SSH connection.
150+
A remote Linux desktop should appear on your local computer. When you are finished, close the VNC client first and then exit the SSH connection.
151151

152152
![Linux desktop #center](/install-guides/_images/xfce4.png)

0 commit comments

Comments
 (0)