Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
怎样让deepin_linux直接启动至终端下
deepin Talks
1337
views ·
4
replies ·
To
floor
Go
str
deepin
2017-06-12 20:27
Author
如题!
直接在开机的情况下启动至终端页面下,可以省去进入桌面版,也可以减小旧本本的压力
怎样设置,不知道这样行不行,求助
Reply
Like 0
Favorite
View the author
All Replies
152******80
Advanced Packager
2017-06-12 20:49
#1
停了lightdm应该可以吧,没试过,systemctl disable lightdm,试试?
Reply
Like 0
View the author
DebuggerX
deepin
2017-06-12 22:23
#2
本帖最后由 debuggerx 于 2017-6-12 14:29 编辑
我家里有个老旧的x86平板装了ubuntu平常当服务器用,也是不需要图形界面,所以我写了个脚本开机运行,自动退出图形界面,你可以参考下:
#!/bin/bash
sleep 3
#利用tty号判断机器登录状态,tty7存在说明图形界面还在
tty7=`who | awk '{print $2}' | grep 7`
tty1=`who | awk '{print $2}' | grep 1`
#tty7不在了,说明是ssh登录,直接退出脚本
if [ "$tty7" != "tty7" ]
then
exit 0
fi
#执行到这里说明是正常开机后手动切到了tty1
if [ "$tty1" = "tty1" ]
then
sleep 3
#init 3 关闭图形界面
echo "passwd" | sudo -S init 3
sleep 5
#使用给定配置连接wifi
echo "passwd" | sudo -S wpa_supplicant -i wlan0 -c wpa.conf -B &
sleep 1
echo "passwd" | sudo -S dhclient wlan0 &
sleep 1
reset
sleep 1
#打开htop实时显示机器运行状态
bash /home/debuggerx/shell/htop.sh &
echo inited
exit 0
fi
#执行到这里说明是正常开机,等待一会后降低屏幕亮度省电
if [ "$tty7" = "tty7" ]
then
sleep 20
bash /home/debuggerx/shell/brightness.sh -0.8
fi
Copy the Code
我也试过网上各种修改方法,总归各种问题没能成功,最后还是用了这种很low的方式,需要开机后手动切到tty1,然后脚本会init3 结束图形界面。。
觉得麻烦的话也可以开机后打开终端手动执行sudo init 3……
Reply
Like 0
View the author
NewYoung
deepin
2017-06-12 23:36
#3
直接装服务端版本不就可以了?
Reply
Like 0
View the author
159******79
deepin
2017-06-13 03:27
#4
百度怎么修改Linux启动级别
Reply
Like 0
View the author
Please
sign
in first
Featured Collection
Change
Nuntia - Modern IMAP/SMTP mail client for Deepin (Beta tester wanted!)
[Tutorial] deepin25 WSL Offline Installation Guide
UOS AI 2.8 Released! Three New Intelligent Agents & Major Evolution
Solid Q&A | deepin 25 Common Questions – The Immutable System Edition
New Thread
Popular Ranking
Change
Four agent skills for laptop power, sleep, and honest bug reports
Installing qemu-user breaks deepin
Adding a Dancing Spectrum Bar to the Deepin Taskbar | deepin-spectrum
Popular Events
More
直接在开机的情况下启动至终端页面下,可以省去进入桌面版,也可以减小旧本本的压力
怎样设置,不知道这样行不行,求助