Interpreting Ctrl+Alt+F2, F3, and the Power Button on a Late 2014 Mac Mini Running Debian Bookworm
If you're working with an old Mac Mini (Late 2014 model) running a fairly basic Debian Bookworm installation, you might have noticed that there are certain keyboard shortcuts and buttons that don't behave as you would expect. In this article, we'll cover some of the key concepts related to interpreting these shortcuts and buttons, including Ctrl+Alt+F2, Ctrl+Alt+F3, and the power button.
Ctrl+Alt+F2 and Ctrl+Alt+F3
On a traditional Linux system, the Ctrl+Alt+F1 through Ctrl+Alt+F6 keys are used to switch between different virtual consoles. However, on a Mac Mini running Debian, these keys don't behave in the same way.
Instead, Ctrl+Alt+F2 and Ctrl+Alt+F3 are used to switch between the virtual consoles and the graphical user interface (GUI). By default, the GUI is started on virtual console 7, which can be accessed by pressing Ctrl+Alt+F7. To switch to a virtual console, you can press Ctrl+Alt+F2 (or Ctrl+Alt+F3) to go to console 2 (or console 3), and so on.
If you're not seeing the expected behavior when pressing these keys, it's possible that the keyboard shortcuts have been remapped or that the virtual consoles are not enabled. To check if the virtual consoles are enabled, you can run the following command:
# cat /etc/default/console-setup
If the virtual consoles are not enabled, you can enable them by editing the /etc/default/console-setup file and setting the ACTIVE_CONSOLES parameter to /dev/tty[1-6].
The Power Button
On a Mac Mini, the power button can be used to put the computer to sleep or to shut it down. However, the behavior of the power button can be modified in Linux.
By default, pressing the power button will put the computer to sleep. However, you can change this behavior by editing the /etc/systemd/logind.conf file and setting the HandlePowerKey parameter to poweroff, reboot, or ignore.
For example, to make the power button shut down the computer immediately, you can run the following command:
# sed -i 's/#HandlePowerKey=poweroff/HandlePowerKey=poweroff/' /etc/systemd/logind.conf
After making this change, you will need to restart the systemd-logind service for the changes to take effect:
# systemctl restart systemd-logind
Interpreting keyboard shortcuts and buttons on a Mac Mini running Debian can be a bit confusing, especially if you're used to a traditional Linux system. However, by understanding the key concepts and adjusting the default settings, you can customize the behavior of these shortcuts and buttons to suit your needs.
References
- Debian Handbook: Virtual Consoles
- Debian Wiki: Systemd Logind