10

I've been trying to figure this out now for a while, I'm connecting to virtual machines through VNC, and by default you get a graphical or ncurses interface, and CTRL+ALT+F3 takes you to a console with debug information. However, Gentoo intercepts these commands.

How can I pass them through to the VNC server?

Edit: Some more details the VNC is being ran on the VM host, thus it just captures display output from the VM and sends any keys to the VM as if it's an actual keyboard connected to it. Hence I can switch to the TTY's if my CTRL+ALT+F1-F6 keystrokes were getting through (Works fine when on Windows for example).

3
  • It's not quite clear what you are trying to do. As I understand it, you want to send CTRL-ALT-F3 to the remote machine in order to see its console, but this won't work - VNC does not redirect console output.
    – Renan
    Mar 15, 2012 at 22:25
  • @RenanBirckPinheiro Added clarification Mar 16, 2012 at 11:59
  • related: unix.stackexchange.com/questions/105295/…
    – n611x007
    Jan 5, 2016 at 15:04

4 Answers 4

8

The proper solution: get a VNC client that can send those keys. Like jsbillings says, some clients give you the option of sending keys to the remote via a menu. With the standard xvnc4viewer, you can use the -MenuKey option to set the key that activates the menu. Again, as per jsbillings' answer, the default key is F8.

The hack: if you have a shell running on the remote server, try chvt 3 (or sudo chvt 3). On the console, you don't need Ctrl+Alt+F#, you can use Alt+F# (or Alt+ repeatedly) to go back to the X server's TTY. Or just log in and say sudo chvt 7; logout (or whatever the X VT is).

The stupid kludge: since Ctrl+Alt+F# is captured early by the X server, the direct (and hard) way is to disable (temporarily or permanently) these keys. This requires you to modify your X configuration and is an annoying thing to do, and probably a bad idea besides. Go with one of the others. :)

2
5

I believe you can use F8 to bring up a menu, which should allow you to click control and alt before you hit F3.

1
  • 1
    This is only true for TigerVNC (standard in Red Hat/Fedora) but not for TightVNC (Debian/Ubuntu).
    – erik
    Mar 10, 2014 at 13:19
3

Use TigerVNC.

With TigerVNC (a variation of TightVNC) you can lock the Alt and Ctrl modifier keys via the menu. To open the menu press the F8 key.

-1

Tried with tigervnc-viewer on Ubuntu but the ALT and CTRL locks did not seem effective. In the end resorted to xvnc4viewer which has the same option and then it did work.

1
  • Please, format your answers by using Markdown in order to get them readable, like the answer above!
    – mattia.b89
    Nov 15, 2019 at 12:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .