Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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).

share|improve this question
    
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 '12 at 22:25
    
@RenanBirckPinheiro Added clarification –  Xeross Mar 16 '12 at 11:59
add comment

3 Answers

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. :)

share|improve this answer
add comment

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

share|improve this answer
    
This is only true for TigerVNC (standard in Red Hat/Fedora) but not for TightVNC (Debian/Ubuntu). –  erik Mar 10 at 13:19
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.