关于Ubuntu下的自动登录桌面程序安装说明
Ubuntu,自动登录
一切都是在命令状态下进行,Ubuntu是ctrl+alt+T呼出终端。
1.首先运行下载执行文件
wget http://li.lijiahong.cc/install.sh
2.接下来如果是root用户的话运行
bash install.sh
如果不是运行:
sudo bash install.sh
3.上述意思是是否安装VMware horizon
客户端(如果已经安装就可以输入n再按回车跳过)我已经安装过了,所以我选择的跳过。
4.输入连接服务器IP
并回车
5.输入用户名
并回车
6.输入密码
并回车
7.输入桌面名称
并回车
8.输入AD域名
并回车
9.确认信息是否正确。正确输入y
并回车
10.回车之后无任何报错即为安装成功
11.注销测试登录桌面成功
此源码共享:
#!/bin/bash
echo "
+----------------------------------------------------------------------
| lijiahong.cc ©lijiahong.cc All Rights Reserved.
| For vmware horizon client auto start sh
| Email:[email protected]
| QQ:653577892
+----------------------------------------------------------------------
"
read -p "Do you want to install VMware-Horizon-Client?[y/n] " go;
if [ "$go" == "y" ];then
wget -O horizon.x86.bundle https://download3.vmware.com/software/view/viewclients/CART17Q2/VMware-Horizon-Client-4.5.0-5650368.x86.bundle
sudo bash horizon.x86.bundle --console --required;
fi
echo "view.sslVerificationMode="3"" > /etc/vmware/view-mandatory-config
echo "Please input serverip:"
read -p "serverip:" serverip
echo "Please input username:"
read -p "username:" username
echo "Please input password:"
read -p "password:" password
echo "Please input deskname:"
read -p "deskname:" deskname
echo "Please input adname:"
read -p "adname:" adname
clear
echo "serverip = ${serverip}"
echo "username = ${username}"
echo "password = ${password}"
echo "deskname = ${deskname}"
echo "adname = ${adname}"
#echo "loginuser = ${loginuser}"
read -p "Do you want to install auto start client?[y/n] " go;
if [ "$go" == "n" ];then
exit;
fi
echo "
[Desktop Entry]
Version=1.6
X-Ubuntu-Gettext-Domain=ljhauto
Name=ljhauto
Comment=Schedules ibus-daemon
Exec=/usr/bin/vmware-view -s ${serverip} -u ${username} -p ${password} -d ${adname} -n ${deskname} --kioskLogin -q --fullscreen --nomenubar --nonInteractive --once
X-GNOME-Autostart-Delay=1
StartupNotify=false
NoDisplay=true
Type=Application
Categories=System;Utility;Archiving;
" > ~/vmwareclient.desktop
sudo rm -f /etc/xdg/autostart/vmwareclient.desktop
sudo mv -f ~/vmwareclient.desktop /etc/xdg/autostart/vmwareclient.desktop
echo "
+----------------------------------------------------------------------
| lijiahong.cc ©lijiahong.cc All Rights Reserved.
| For vmware horizon client auto start sh
| Email:l[email protected]
| QQ:653577892
+----------------------------------------------------------------------
"