SOLVED: How to use Ctrl-Alt-F1 in VMware with Linux guests
Tags: VMware
If you’re like me, you probably use VMware Workstation (or VMware Player or VMware Fusion) quite a bit to test different aspects of other operating systems without having to break your host machine.
I do development and testing on Linux, and need to ensure that the latest Linux distributions don’t break my code, or that a kernel module doesn’t provide a broken interface to the subsystems my code relies upon.
I also use VMware Workstation for testing out various Windows and Linux distributions either to run live CDs such as KNOPPIX or install a full operating system without having to have a dedicated computer just for that one set of tests directly.
Before Linux had a stable GUI environment, we all had to juggle across multiple consoles with L-ALT-Right/Left cursor key to jump between virtual console 1-7 and back.
Once Linux had adopted a stable GUI (XFree86, xorg) we had a way to run shells, via xterm/Terminal sessions in X, but we also wanted a way to get back to the console environment if we needed to, without dropping out of X. The way to do this is by hitting Ctrl-Alt-Fx (where ‘x’ is the console number you want to jump to).
Unless you change your /etc/inittab, consoles F1-F6 are dedicated to text-based console sessions, while F7 and up are dedicated to X itself. In other words, if you haven’t changed your configuration, the first X session that runs on your machine will be available via Alt+F7. If you add an additional X session, it would be available on Ctrl-Alt-F8, and so on.
Herein lies the problem, if you are on a Linux host, running VMware Workstation with Linux guests running within it. If you initiate a Ctrl-Alt-F1 from within a VMware guest session running Linux, the host will grab the keyboard input and send you to the host’s F1 console session, not the one inside the guest, which is probably where you intended it to go.
Part of this is due to the fact that the key command “Ctrl+Alt” has a very specific meaning in VMWare Workstation. it is used as the trigger to VMware to release the keyboard and mouse control from the guest and return it back to the host.
You can reset this combo, but it’s best not to.
If you want to send a Ctrl-Alt-Fx command to the guest, you need to use a slightly different combination: Ctrl+Alt+Space
Let’s go through this, step by step:
- You load up your Linux guest in VMware Workstation, and it loads up a graphical environment inside the guest.
- After X loads in the guest, you want to drop to the console in the guest to perform some action
- With the guest having the keyboard/mouse focus, you press Ctrl-Alt-Space, release Space, then hit the F1 key, to drop you to the F1 console of that guest’s session.
- To return to the X session, you can simply hit Alt-F7 (while the guest has the keyboard and mouse focus), or you can hold left-Alt, and use the right cursor arrow key on your keyboard to cycle through all of the console sessions until X re-appears.
Voila!
mperry said on March 20th, 2011 at 12:53 pm quote
Hi Dave. As usual a very good blogpost on solving specific problems. Thanks! Question though. Since I use VirtualBox, I would like to have Windows respond on a specific virtual console so if I went to CTRL-ALT-F8, I would get the full-screen windows guest. Possible? Then to get to a specific X environment like my ubuntu desktop, I would do CTRL-ALT-F7.
I can go full screen but keyboard combinations are not enforced and I have to execute the return to windowed environment, etc.
Thakns again. Love your weblog!
Moe said on August 1st, 2011 at 1:29 pm quote
Nice trick !
Also work with VMware vSphere Client
Switch consoles in Linux platforms under VMware said on May 31st, 2012 at 4:39 am quote
[…] Source:Â https://blog.gnu-designs.com/solved-how-to-use-ctrl-alt-f1-in-vmware-with-linux-guests/ Author: demijnzia Category: Linux Leave a Comment or Cancel reply […]
Gammelgaard said on May 7th, 2013 at 7:06 am quote
Doesn’t Work for me. I’m working on a Linux laptop, RDP to my Windows 7 box at home, starts VMware on that with Linux as guest. When using any combination that includes CTRL-ALT and an F-key it will bring me the Linux laptop. I tried using Remmina and rdesktop – remmina with “Grab all keyboard events” on.