配置 阿里雲ECS Ubuntu 16.04 64bit 桌面環境


1. 步驟

  1. 安裝軟件
  2. 修改root權限
  3. 重啟

2. 詳情

1. 安裝軟件

創建腳本文件(例如:desktopSetting.sh),並輸入以下內容:

#!/bin/bash
#更新軟件庫
apt-get update
#升級軟件
apt-get upgrade
#安裝ubuntu桌面系統
apt-get install ubuntu-desktop

 

2. 修改root權限

2.1 修改 /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf 如下:

[Seat:*]
user-session=ubuntu
greeter-show-manual-login=true
allow-guest=false

 

2.2 修改/root/.profile如下:
a.修改前:

# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
mesg n || true

 

b.修改后:

# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
tty -s && mesg n || true

3. 重啟


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM