-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdd GUI to Ubuntu Server on AWS
57 lines (50 loc) · 1.78 KB
/
Add GUI to Ubuntu Server on AWS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
=========================================
Method 1: Using Gnome Desktop with tigerVNC server
=========================================
sudo apt update
sudo apt install ubuntu-gnome-desktop
sudo apt install tigervnc-standalone-server tigervnc-common tigervnc-xorg-extension tigervnc-viewer
vncserver
vncserver -kill :1
sudo nano ~/.vnc/xstartup
#!/bin/sh
xrdb $HOME/.Xresources
vncconfig -iconic &
dbus-launch --exit-with-session gnome-session &
sudo chmod +x ~/.vnc/xstartup
vncserver :1 -localhost no -depth 32
netstat -tlnp
=========================================
Method 2: Using Gnome Desktop with xrdp
=========================================
sudo apt install xrdp
sudo adduser elasticourse
=========================================
Method 3: Using XFCE4 Desktop with tigerVNC server
=========================================
sudo apt install xfce4 xfce4-goodies
sudo nano ~/.vnc/xstartup
#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &
=========================================
Optional: Create system server so that VNCserver starts automatically on ubuntu reboot
=========================================
sudo nano /etc/systemd/system/[email protected]
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=simple
User=ubuntu
PAMName=login
PIDFile=/home/%u/.vnc/%H%i.pid
ExecStartPre=/usr/bin/vncserver -kill :%i > /dev/null 2>&1 || :
ExecStart=/usr/bin/vncserver :%i -localhost no
ExecStop=/usr/bin/vncserver -kill :%i
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl start vncserver@1
sudo systemctl enable vncserver@1
sudo systemctl status vncserver@1