This is a companion discussion topic for the original entry at https://linuxconfig.org/how-to-disable-enable-gui-on-boot-in-ubuntu-20-04-focal-fossa-linux-desktop
hello I have installed cinnamon but at startup login user can choose between gnome (ubuntu) and cinnamon before login. How can i disable it so user can only login with cinnamon?
I tried to disable as described, and thought/hoped I would end up in a terminal of some kind, but my machine stops booting with the following message:
/dev/sda1: clean, âŚfilesâŚblocks
[FAILED] failed to start Load AppArmor profiles
and I canât continue
Though I can ssh into the machine, but AppArmor fixes when searching arenât plenty and they didnât work so far.
âsudo apt install apparmor-easyprof-ubuntuâ
says canât locate such a package
Tried autoremove -purge and purge snapd, but didnât help
Any suggestions?
For now I have reverted to boot into the desktop, that works.
Hi DocMinus,
Welcome to our forums.
This is a strange issue you describe. Do you see any clues apparmor is logging? You can query for them with something like:
$ sudo journalctl --unit=apparmor
And check the time when your machine was in multi-user mode.
Thanks for the welcome and the quick reply.
Not sure if this helps, the latest portion of that logfile. Sounds like the mysql server is the/one issue?
I donât really need the server, that come from a recent âplay and testâ session.
â Reboot â
okt 10 12:21:33 Dreadnought apparmor.systemd[369]: Restarting AppArmor
okt 10 12:21:33 Dreadnought apparmor.systemd[369]: Reloading AppArmor profiles
okt 10 12:21:33 Dreadnought apparmor.systemd[410]: AppArmor parser error for /etc/apparmor.d in /etc/apparmor.d/usr.sbin.mysqld at line 9: Could not open âabstractions/mysqlâ
okt 10 12:21:33 Dreadnought apparmor.systemd[449]: Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
okt 10 12:21:33 Dreadnought apparmor.systemd[456]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
okt 10 12:21:33 Dreadnought apparmor.systemd[517]: Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
okt 10 12:21:33 Dreadnought apparmor.systemd[535]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
okt 10 12:21:33 Dreadnought apparmor.systemd[534]: AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/usr.sbin.mysqld at line 9: Could not open 'abstractions/mysq>
okt 10 12:21:33 Dreadnought apparmor.systemd[369]: Error: At least one profile failed to load
okt 10 12:21:33 Dreadnought apparmor.systemd[771]: Restarting AppArmor
okt 10 12:21:33 Dreadnought apparmor.systemd[771]: Reloading AppArmor profiles
okt 10 12:21:33 Dreadnought apparmor.systemd[785]: Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
okt 10 12:21:33 Dreadnought apparmor.systemd[783]: AppArmor parser error for /etc/apparmor.d in /etc/apparmor.d/usr.sbin.mysqld at line 9: Could not open âabstractions/mysqlâ
okt 10 12:21:33 Dreadnought apparmor.systemd[792]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
okt 10 12:21:33 Dreadnought apparmor.systemd[829]: Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
okt 10 12:21:33 Dreadnought apparmor.systemd[870]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
okt 10 12:21:33 Dreadnought apparmor.systemd[868]: AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/usr.sbin.mysqld at line 9: Could not open 'abstractions/mysq>
okt 10 12:21:33 Dreadnought apparmor.systemd[771]: Error: At least one profile failed to load
okt 10 12:21:23 Dreadnought systemd[1]: Starting Load AppArmor profilesâŚ
okt 10 12:21:27 Dreadnought systemd[1]: apparmor.service: Main process exited, code=exited, status=1/FAILURE
okt 10 12:21:27 Dreadnought systemd[1]: apparmor.service: Failed with result âexit-codeâ.
okt 10 12:21:27 Dreadnought systemd[1]: Failed to start Load AppArmor profiles.
okt 10 12:21:30 Dreadnought systemd[1]: Starting Load AppArmor profilesâŚ
okt 10 12:21:30 Dreadnought systemd[1]: apparmor.service: Main process exited, code=exited, status=1/FAILURE
okt 10 12:21:30 Dreadnought systemd[1]: apparmor.service: Failed with result âexit-codeâ.
okt 10 12:21:30 Dreadnought systemd[1]: Failed to start Load AppArmor profiles.
After a complete removal of mysql the error message dissappears.
EDIT:
after some additional searches and checking I realized I didnât have a shell activated, hence just a blinking cursor. Changed that in grub, now itâs all good.
I did this and set my home server to boot to multi user, now I can only access its terminal via ssh, the screen just shows a blinking cursor after turning on bluetooth.
Now to make matters worse, the server isnât showing up on my router and I can no longer ssh to it. (This was caused by an issue unrelated to this guideâŚ)
Can anyone help me out?
EDIT:
Fixed it by using the command:
systemctl enable getty@tty2
It forces the machine to use tty2 by default on boot.
Thank you Lubos! I used the following:
sudo systemctl set-default multi-user
gnome-session-quit
sudo service gdm3 stop
sudo systemctl disable gdm3
sudo reboot