Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I press Ctrl+Alt+F{1..12}, it switches me to other virtual terminal.

Even xte "keydown Control_L" "keydown Alt_L" "key F1" "keyup Alt_L" "keyup Control_L" leads to switching to vt instead of sending that keys to focused window.

Use cases of this includes (but not limits to) sending special keystrokes to VNC or virtualization clients to be handled by clinet/guest system instead of the host one. Sometimes (like in VirtualBox) applications explicitly map some special alternative keystroke to that special ones (like Ctrl+Alt+Del or Ctrl+Alt+Backspace in VirtualBox), but I want clean and universal solution.

share|improve this question
The answer depends on which VNC client you're using; each has a different way of doing this. Which VNC client are you using? – Michael Hampton Jul 24 '12 at 16:13
I want universal solution for any X programs, not any VNC or virtual machine client -specific ones. – Vi. Jul 24 '12 at 19:59
I think you just need to run xte on the remote machine, rather than the local machine. – Michael Hampton Jul 24 '12 at 20:56
It's not about local or remote things at all (this is just one use case). It is about delivering arbitrary key presses to X applications in general. – Vi. Jul 24 '12 at 23:53
Perhaps you should clarify your question, then? – Michael Hampton Jul 24 '12 at 23:58

For VirtualBox, try the key combination REL + F1. Here, REL is the key used to release the mouse grab in the VirtualBox window, usually right Ctrl or Alt key.

share|improve this answer
@diago better now? – maxelost Jan 11 '11 at 17:07
The question is not about VirtualBox or VMWare (however the VMWare analogue of REL+F1 whould be interesting) or even about VNC clients, it's about "In general". /* trying to do it with xte */ – Vi. Jan 12 '11 at 14:39

It is not possible to send Ctrl+Alt+F[1..12] because the virtual terminals are seperate from the desktop that the VNC is connected to.

share|improve this answer
Unclear. I expect if the "Ctrl+Alt+Fx" event goes into a VNC client then the client will cause VNC server to issue "Ctrl+Alt+Fx". The problematic part that "Ctrl+Alt+Fx" does not reach the client, being interpreted by Xorg. – Vi. Jan 18 '15 at 20:09

You must log in to answer this question.

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