李家宏|博客

关于Ubuntu下的自动登录桌面程序安装说明

发布时间:4年前热度: 701 ℃评论数:

关于Ubuntu下的自动登录桌面程序安装说明

Ubuntu,自动登录


一切都是在命令状态下进行,Ubuntu是ctrl+alt+T呼出终端。

1.首先运行下载执行文件

  1. wget http://li.lijiahong.cc/install.sh

image_1bn862pd66phf73go5en6ha49.png-205.2kB 
2.接下来如果是root用户的话运行

  1. bash install.sh

如果不是运行:

  1. sudo bash install.sh

image_1bn864j321r7n1e7q64t1d2p8bg26.png-114.6kB 
3.上述意思是是否安装VMware horizon客户端(如果已经安装就可以输入n再按回车跳过)我已经安装过了,所以我选择的跳过。 
4.输入连接服务器IP并回车 
image_1bn865nvj14rdono1hcc12ugado2j.png-9.9kB 
5.输入用户名并回车 
image_1bn86617s1jtc1e1a7cs14tis8f30.png-10.5kB 
6.输入密码并回车 
image_1bn8668ngj3l364aa110rhqv63d.png-13.4kB 
7.输入桌面名称并回车 
image_1bn866iu4htrnifcte1ollf3b3q.png-10.5kB 
8.输入AD域名并回车 
image_1bn867ct91jvb4jap9e4mlsar47.png-9.4kB 
9.确认信息是否正确。正确输入y并回车 
image_1bn867kqveuk1n2q18cf1gghde04k.png-51kB 
10.回车之后无任何报错即为安装成功 
image_1bn867t2s1p1o1qhcb0v1btv1ihk51.png-89kB 
11.注销测试登录桌面成功 
image_1bn868qt216eq1p35ch7tcn98s5e.png-531.4kB

此源码共享:

  1. #!/bin/bash
  2. echo "
  3. +----------------------------------------------------------------------
  4. | lijiahong.cc ©lijiahong.cc All Rights Reserved.
  5. | For vmware horizon client auto start sh
  6. | Email:lijia[email protected]
  7. | QQ:653577892
  8. +----------------------------------------------------------------------
  9. "
  10. read -p "Do you want to install VMware-Horizon-Client?[y/n] " go;
  11. if [ "$go" == "y" ];then
  12. wget -O horizon.x86.bundle https://download3.vmware.com/software/view/viewclients/CART17Q2/VMware-Horizon-Client-4.5.0-5650368.x86.bundle
  13. sudo bash horizon.x86.bundle --console --required;
  14. fi
  15. echo "view.sslVerificationMode="3"" > /etc/vmware/view-mandatory-config
  16. echo "Please input serverip:"
  17. read -p "serverip:" serverip
  18. echo "Please input username:"
  19. read -p "username:" username
  20. echo "Please input password:"
  21. read -p "password:" password
  22. echo "Please input deskname:"
  23. read -p "deskname:" deskname
  24. echo "Please input adname:"
  25. read -p "adname:" adname
  26. clear
  27. echo "serverip = ${serverip}"
  28. echo "username = ${username}"
  29. echo "password = ${password}"
  30. echo "deskname = ${deskname}"
  31. echo "adname = ${adname}"
  32. #echo "loginuser = ${loginuser}"
  33. read -p "Do you want to install auto start client?[y/n] " go;
  34. if [ "$go" == "n" ];then
  35.    exit;
  36. fi
  37. echo "
  38. [Desktop Entry]
  39. Version=1.6
  40. X-Ubuntu-Gettext-Domain=ljhauto
  41. Name=ljhauto
  42. Comment=Schedules ibus-daemon
  43. Exec=/usr/bin/vmware-view -s ${serverip} -u ${username} -p ${password} -d ${adname} -n ${deskname} --kioskLogin -q --fullscreen --nomenubar --nonInteractive --once
  44. X-GNOME-Autostart-Delay=1
  45. StartupNotify=false
  46. NoDisplay=true
  47. Type=Application
  48. Categories=System;Utility;Archiving;
  49. " > ~/vmwareclient.desktop
  50. sudo rm -f /etc/xdg/autostart/vmwareclient.desktop
  51. sudo mv -f ~/vmwareclient.desktop /etc/xdg/autostart/vmwareclient.desktop
  52. echo "
  53. +----------------------------------------------------------------------
  54. | lijiahong.cc ©lijiahong.cc All Rights Reserved.
  55. | For vmware horizon client auto start sh
  56. | Email:[email protected]
  57. | QQ:653577892
  58. +----------------------------------------------------------------------
  59. "


关于Ubuntu下的自动登录桌面程序安装说明

手机扫码访问