-
Notifications
You must be signed in to change notification settings - Fork 0
/
Install-GUI-Remote
72 lines (51 loc) · 2.29 KB
/
Install-GUI-Remote
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#Guia para ativação se Interface Grafica via acesso remoto no Ubuntu:
PowerShell commandos:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2
## ------------------------------------- ##
# No terminal do Ubuntu:
sudo apt update && sudo apt -y upgrade
sudo apt-get purge xrdp
sudo apt install -y xrdp
sudo apt install -y xfce4
# Durante a instalação haverá a apresentação (grafica) para escolha entre a GUI -> Indicado a libgtkmm (mais leve)
sudo apt install -y xfce4-goodies
# Recomendo fazer o ''backup''
sudo cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak
sudo sed -i 's/3389/3390/g' /etc/xrdp/xrdp.ini
sudo sed -i 's/max_bpp=32/#max_bpp=32\nmax_bpp=128/g' /etc/xrdp/xrdp.ini
sudo sed -i 's/xserverbpp=24/#xserverbpp=24\nxserverbpp=128/g' /etc/xrdp/xrdp.ini
echo xfce4-session > ~/.xsession
# Editando (nano ou vs code)
sudo nano /etc/xrdp/startwm.sh
#commente as linhas abaixo:
#test -x /etc/X11/Xsession && exec /etc/X11/Xsession
#exec /bin/sh /etc/X11/Xsession
# Adicione essa linha e salve o arquivo:
# xfce
startxfce4
sudo /etc/init.d/xrdp start
# Retorno esperado:
# * Starting Remote Desktop Protocol server . . . . . [ OK ]
# Confirir IP da maquina WSL
ip addr | grep eth0
## ------------------------------------- ##
# No Windows, use Remote Desktop Connection com o ip da maquina
# localhost:3390
# Use o mesmo login do Ubuntu username e password
# * * * DICAS * * *
# Para criar atalho de comando
# @ Listar Usuarios:
# alias usuarios="cut -d : -f 1,5 /etc/passwd | tr : \\\t"
# @ Listar ip local:
# alias ipconfig="ip addr | grep eth0"
#Referencias links:
# Microsoft GUI announcement: https://devblogs.microsoft.com/commandline/the-windows-subsystem-for-linux-build-2020-summary/
# Ubuntu WSL2 GUI Install:
# https://dev.to/darksmile92/linux-on-windows-wsl-with-desktop-environment-via-rdp-522g
# WSL 2 install: https://docs.microsoft.com/en-us/windows/wsl/install-win10
# Docker no WSL2: https://docs.docker.com/docker-for-windows/wsl/
# O que é WSL? https://docs.microsoft.com/en-us/windows/wsl/about
# WSL documentação: https://docs.microsoft.com/en-us/windows/wsl/
# WSL 2 : https://devblogs.microsoft.com/commandline/announcing-wsl-2/