SOLVED: How to use Ctrl-Alt-F1 in VMware with Linux guests

Thursday, March 17th, 2011 at 10:56 am | 50,899 views | trackback url

VMware logoIf 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:

  1. You load up your Linux guest in VMware Workstation, and it loads up a graphical environment inside the guest.
  2. After X loads in the guest, you want to drop to the console in the guest to perform some action
  3. 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.
  4. 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.


Last Modified: Sunday, March 6th, 2016 @ 04:17

4 Responses to “SOLVED: How to use Ctrl-Alt-F1 in VMware with Linux guests”

  1. 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!

  2. Nice trick !

    Also work with VMware vSphere Client

  3. […] Source: Author: demijnzia Category: Linux Leave a Comment or Cancel reply […]

  4. Gammelgaard said on

    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.

Leave a Reply

You must be logged in to post a comment.

Bad Behavior has blocked 787 access attempts in the last 7 days.