首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Linux 18 Cinnamon默认引导到shell /命令行/禁用GUI

Linux 18 Cinnamon默认引导到shell /命令行/禁用GUI
EN

Unix & Linux用户
提问于 2016-08-12 21:20:52
回答 1查看 23.6K关注 0票数 6

我想要什么

我想以“服务器”的形式(通常)运行一个盒子(没有GUI),有时运行GUI,因为有些事情这样更容易。我和Linux 18肉桂一起工作。我想要引导到控制台,而不是启动mdm,但我希望能够切换回来,所以涉及到完全删除mdm的解决方案对我来说不太好。

我试过什么

对于默认引导,我已经编辑了grub (下面的整个文件) GRUB_CMDLINE_LINUX="text"并运行了sudo update-grub,但mdm仍然启动;然后我尝试将mdm设置为echo manual | sudo tee /etc/init/mdm.override手动,但mdm仍然启动。

我可以用mdm手动停止sudo service mdm stop,这与我想要的非常接近。

我的解决方案怎么了,

我最好的解决方案是引导我,像往常一样启动mdm,然后我必须手动停止mdm。我希望机器正常地从reboot或电源周期启动,除非GUI根本不启动(除非我告诉它,例如编辑grub或在grub菜单中选择不同的选项)。所谓“正常启动”,我指的是像tomcat start这样的服务,我仍然可以rsh到机器和/或远程调试它。

代码语言:javascript
复制
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'


GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="text"
GRUB_CMDLINE_LINUX="text"


# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"


# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL=console


# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480


# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true


# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"


# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2016-08-12 21:56:53

代码语言:javascript
复制
sudo systemctl disable mdm  

这实际上并没有“禁用”服务,它只是阻止了服务的自动启动。

如果你想进入你的家庭,你会的

代码语言:javascript
复制
sudo systemctl start mdm

如果您想在默认情况下引导到gui:

代码语言:javascript
复制
sudo systemctl enable mdm 

对于预系统%d系统,您需要删除/etc/rc*目录中的mdm符号链接。

票数 8
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/303113

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档