You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/install-guides/vnc.md
+27-27Lines changed: 27 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ additional_search_terms:
9
9
- linux
10
10
11
11
### Estimated completion time in minutes (please use integer multiple of 5)
12
-
minutes_to_complete: 30
12
+
minutes_to_complete: 15
13
13
14
14
author: Jason Andrews
15
15
@@ -29,67 +29,67 @@ multitool_install_part: false # Set to true if a sub-page of a multi-page arti
29
29
layout: installtoolsall # DO NOT MODIFY. Always true for tool install articles
30
30
---
31
31
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.
33
33
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.
37
35
38
36
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**.
39
37
40
38
## What is VNC?
41
39
42
-
VNC is a clientserver 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.
43
41
44
42
### How do I install the VNC server and xfce4 desktop?
45
43
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/).
47
45
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.
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.
65
63
66
64
```console
67
65
vncpasswd
68
66
```
69
67
70
-
Remember the password for later when the client is connected.
68
+
Remember this password for later when you connect the client.
71
69
72
70
### How do I configure the desktop startup for VNC?
73
71
74
-
Create a file at `$HOME/.vnc/xstartup` with the contents:
72
+
Create a file at `$HOME/.vnc/xstartup` with the following contents:
75
73
76
74
```console
77
75
#!/bin/sh
78
76
unset SESSION_MANAGER
79
77
unset DBUS_SESSION_BUS_ADDRESS
80
78
exec startxfce4
81
79
```
82
-
Make sure the `xstartup` file has executable permission.
80
+
Make sure the `xstartup` file has executable permissions:
81
+
83
82
```console
84
83
chmod +x $HOME/.vnc/xstartup
85
84
```
86
85
87
86
### How do I set up a systemd service to manage VNC?
88
87
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]`.
90
89
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
93
93
[Unit]
94
94
Description=Remote desktop service (VNC)
95
95
After=syslog.target network.target
@@ -105,9 +105,8 @@ Use sudo or root as it is located in a read-only area.
105
105
106
106
[Install]
107
107
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`.
### How do I use port forwarding via SSH to connect to VNC?
131
130
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.
133
132
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.
135
134
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:
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:
143
144
144
-
Open the VNC client and enter the following for the VNC server.
145
145
```console
146
146
localhost:5901
147
147
```
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`.
149
149
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.
0 commit comments