Sending Ctrl-Alt-Delete from VBoxManage?

This is for discussing general topics about how to use VirtualBox.
Post Reply
paulehoffman
Posts: 23
Joined: 20. Oct 2010, 18:15
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: many

Sending Ctrl-Alt-Delete from VBoxManage?

Post by paulehoffman »

Greetings. I want to use VBoxManage to send Ctrl-Alt-Delete to a vm that is running headless. If the VM was running with a console, I could use the Machine->Insert Ctrl-Alt-Del command from the menus, but this is running headless. Any suggestions are appreciated.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Sending Ctrl-Alt-Delete from VBoxManage?

Post by Sasquatch »

VBoxManage controlvm keyboardputscancode <hex> [<hex> ...] is probably what you're looking for. The hexadecimal values are the key codes.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
paulehoffman
Posts: 23
Joined: 20. Oct 2010, 18:15
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: many

Re: Sending Ctrl-Alt-Delete from VBoxManage?

Post by paulehoffman »

Sasquatch wrote:VBoxManage controlvm keyboardputscancode <hex> [<hex> ...] is probably what you're looking for. The hexadecimal values are the key codes.
What do you believe the keycode for Ctrl-Alt-Delete is? After a bunch of searching, I found no indication that such a single keycode exists, but I could have missed something.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Sending Ctrl-Alt-Delete from VBoxManage?

Post by Sasquatch »

I don't know exactly how the command works, but maybe there is a way to send the three key codes in one go, like giving it three hex values as parameter.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
paulehoffman
Posts: 23
Joined: 20. Oct 2010, 18:15
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: many

Re: Sending Ctrl-Alt-Delete from VBoxManage?

Post by paulehoffman »

Sasquatch wrote:I don't know exactly how the command works, but maybe there is a way to send the three key codes in one go, like giving it three hex values as parameter.
I am hoping for a reply from someone who does knows how the command works for Ctrl-Alt-Delete, given that there does not appear to be a scan code for that key combination. The scan code for Ctrl-Del is 0x8B and the scan code for Alt-Del is 0x98. As far as I can tell, there is no scan code for the full combination, but I would be happy to be wrong.

I would also be happy if the solution was something else that came from someone who knows how the GUI console sends a Ctrl-Alt-Del to the guest.
HubTou
Posts: 93
Joined: 24. Nov 2009, 11:01
Primary OS: FreeBSD
VBox Version: OSE other
Guest OSses: FreeBSD, OpenSolaris, and several Linuxes

Re: Sending Ctrl-Alt-Delete from VBoxManage?

Post by HubTou »

Hello,
Sasquatch wrote:I don't know exactly how the command works, but maybe there is a way to send the three key codes in one go, like giving it three hex values as parameter.
Yes you can send as many scancodes in one shot as you want.
paulehoffman wrote:I am hoping for a reply from someone who does knows how the command works for Ctrl-Alt-Delete [...]
I would also be happy if the solution was something else that came from someone who knows how the GUI console sends a Ctrl-Alt-Del to the guest.
If i remember well, you would send : 1d 38 53 b8 9d (meaning left-ctrl-down left-alt-down del left-alt-up left-ctrl-up) or 38 1d 53 9d b8 (alt before ctrl).

The reference i use for this is located at http://www.win.tue.nl/~aeb/linux/kbd/scancodes.html

You'll find a library for handling this in http://www.projet-hev.org/dist/generateur1-1.02.tar.bz2

Best regards,

Hubert
paulehoffman
Posts: 23
Joined: 20. Oct 2010, 18:15
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: many

Re: Sending Ctrl-Alt-Delete from VBoxManage?

Post by paulehoffman »

HubTou wrote: If i remember well, you would send : 1d 38 53 b8 9d (meaning left-ctrl-down left-alt-down del left-alt-up left-ctrl-up) or 38 1d 53 9d b8 (alt before ctrl).
The first one works perfectly!
HubTou wrote: The reference i use for this is located at http://www.win.tue.nl/~aeb/linux/kbd/scancodes.html
I saw that, but I didn't realize that you could stack up the codes; I thought you needed to send just one for the key combination.

I will now see if we can get this into the manual as an example.
Bsoft
Posts: 22
Joined: 26. Oct 2010, 16:15
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: XP Ubutu

Re: Sending Ctrl-Alt-Delete from VBoxManage?

Post by Bsoft »

Good one thx.

Faster than the "fire RDP" then hit "Ctrl Alt End" that I used.... if u have 1d 38 53 b8 9d handy ;)
Max___31
Posts: 1
Joined: 26. Apr 2012, 16:02

Re: Sending Ctrl-Alt-Delete from VBoxManage?

Post by Max___31 »

Hello,
And so, how can i send RCtrl+F to my vm ?

Best regards,
Maxime
Post Reply