Upload setup_lxde_crd.sh
Browse files- setup_lxde_crd.sh +33 -0
setup_lxde_crd.sh
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
# Actualizar el sistema
|
4 |
+
sudo apt update
|
5 |
+
sudo apt upgrade -y
|
6 |
+
|
7 |
+
# Instalar wget y sudo
|
8 |
+
sudo apt install wget sudo -y
|
9 |
+
|
10 |
+
# Instalar LXDE
|
11 |
+
sudo apt install lxde -y
|
12 |
+
|
13 |
+
# Descargar e instalar Chrome Remote Desktop
|
14 |
+
wget https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb
|
15 |
+
sudo apt install ./chrome-remote-desktop_current_amd64.deb -y
|
16 |
+
rm chrome-remote-desktop_current_amd64.deb
|
17 |
+
|
18 |
+
# Crear un nuevo usuario y agregarlo al grupo sudo
|
19 |
+
read -p "Ingrese el nombre del nuevo usuario: " NEW_USER
|
20 |
+
sudo adduser $NEW_USER
|
21 |
+
sudo adduser $NEW_USER sudo
|
22 |
+
|
23 |
+
# Configurar Chrome Remote Desktop para el nuevo usuario
|
24 |
+
sudo su - $NEW_USER <<EOF
|
25 |
+
# Iniciar el host de Chrome Remote Desktop con el c贸digo de autorizaci贸n
|
26 |
+
DISPLAY= /opt/google/chrome-remote-desktop/start-host --code="4/0ATx3LY4qYs6cFso6HlWS7_dr9oXl7ZntyRnLlV8PMM1s782-ruunljkYjIpu_wE2m33xUQ" --redirect-url="https://remotedesktop.google.com/_/oauthredirect" --name=$(hostname)
|
27 |
+
EOF
|
28 |
+
|
29 |
+
# Instrucciones finales
|
30 |
+
echo "La instalaci贸n ha terminado. Inicia sesi贸n en https://remotedesktop.google.com/headless y sigue las instrucciones para completar la configuraci贸n de Chrome Remote Desktop."
|
31 |
+
|
32 |
+
echo "Para iniciar el escritorio LXDE, ejecuta el siguiente comando como el nuevo usuario:"
|
33 |
+
echo "/opt/google/chrome-remote-desktop/chrome-remote-desktop --start"
|