#!/bin/bash
# todesk 远程桌面安装
sudo apt install -y ubuntu-desktop
# 先安装桌面
cd $HOME ; echo "当前路径:`pwd` ; 请输入当前用户的密码: " ; sudo date
a=`sudo dpkg -l | grep todesk`
if [ "${#a}" -lt "123" ]
then
if [ ! -e todesk_4.0.0b_amd64.deb ]
then
wget https://dl.todesk.com/linux/todesk_4.0.0b_amd64.deb
fi
sudo dpkg -i todesk_4.0.0b_amd64.deb
else
echo "已经安装 todesk"
fi
id=`cat /opt/todesk/config/todeskd.conf | grep -E "id" | awk -F"=" '{print $2}' ` ;
passwd=`cat /opt/todesk/config/todeskd.conf | grep -E "temppassword" | awk -F"=" '{print $2}' ` ;
echo "windows 控制端下载地址:https://www.todesk.com/download.html?dt=4"
echo "id 为: $id"
echo "passwd 为: $passwd"
echo "转明文密码为:"
echo -n $passwd | base64 -d
echo ""