root登录图形界面
-
切换root权限
sudo passwd root
设置密码 -
切换root用户,vim /etc/pam.d/gdm-autologin gdm-password注释其中
#auth required pam_succeed_if.so user != root quiet_succes 第二行这样 -
修改vim /root/.profile 文档最后一行 mesg n || true 前添加 tty -s && 即
tty -s &&mesg n || true
-
vim /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
[Seat:*] user-session=ubuntu autologin-guest=false autologin-user=root autologin-user-timeout=0 greeter-session=lightdm-gtk-greeter
-
修改vim /etc/gdm3/custom.conf
# Enabling automatic login AutomaticLoginEnable = true AutomaticLogin = root # Enabling timed login TimedLoginEnable = true TimedLogin = root TimedLoginDelay = 5
-
重启
基本功能配置
- 修改主机名
gedit /etc/hostname
apt-get install openssh-server
- vim /etc/ssh/sshd-config
PermitRootLogin yes
ClientAliveInterval 60
ClientAliveCountMax 10
重启服务
远程桌面
- apt install xfce4 xfce4-goodies
- apt install tightvncserver
- vncserver 只要输入6位密码,后面选N
- vncserver -kill :1 先杀死进程
- vim ~/.vnc/xstartup
#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 & - chmod +x ~/.vnc/xstartup
- vncserver 开启服务
- reboot
- window下载客户端输入IP:5901,https://www.realvnc.com/en/connect/download/viewer/
添加源
vim /etc/apt/source.list
添加
#阿里云源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
完了apt-get update