VirtualBox recording video with mouse pointer of Ubuntu live-cd guest? (#18754)

Discussions about using Linux guests in VirtualBox.
Post Reply
sdaau
Posts: 3
Joined: 8. Jul 2019, 06:07

VirtualBox recording video with mouse pointer of Ubuntu live-cd guest? (#18754)

Post by sdaau »


ModEdit; related ticket: #18754: Cannot capture mouse pointer in video recording of Ubuntu 18.04 LiveCD guest
Hi all,

This is a repost of my question from
VirtualBox recording video with mouse pointer of Ubuntu live-cd guest? - Ask Ubuntu
https://askubuntu.com/questions/1156603 ... e-cd-guest
... which I had to wait with, because:
You must be a member for 1 days and have 1 posts before you can post urls.

I'm using Ubuntu 18.04 as host, VirtualBox 6.0.8 - and Ubuntu 18.04 Live CD as guest (so not installed).

I'm trying to use the built-in recording facility of VirtualBox 6.0.8 (Machine/Display/Recording) - and it works great, except - it does not record the mouse pointer on video!

Via #12287 (VBox 4.3.2 Video Capture without cursor) – Oracle VM VirtualBox, I've learned:
I'm not sure if we will change this. The cursor is normally drawn by the host, not the guest. To make it drawn by the guest (and to include the mouse cursor into the video), disable the mouse integration.
I've done a ton of things:
  • Try disable mouse integration from the bottom menu - does not really matter, mouse integration icon gets grey when out of the VM window, and gets activated again anyway when I click in the VM guest window so it is focused
  • Via https://superuser.com/a/1390258/39752 -> "go to 'Motherboard' tab and in pointing device, choose 'USB Tablet' instead of 'PS/2 Mouse'" - does not work
  • Tried installing Guest Additions from CD after booting the live CD image, vs not installing Guest Additions -> neither works
  • Via https://askubuntu.com/questions/1156593/ -> In "VirtualBox > Settings > Display" for the guest, tried for "Graphics Controller" both VBoxSVGA and VMSVGA - no change, mouse pointer still not on video capture
Does anyone have any ideas, on how can I get the mouse pointer captured on a VirtualBox video recording of Ubuntu 18.04 live CD guest?
Edit: some more details:

First, to enable bidirectional clipboard, you need Guest additions - here is a relatively easy way to install, via: ... - in guest terminal:

Code: Select all

# below commands need to be typed, all in guest Ubuntu terminal:
# need to enable multiverse; in:
sudo nano /etc/apt/sources.list
sudo apt update
sudo apt install virtualbox-guest-x11 virtualbox-guest-utils virtualbox-guest-dkms
sudo VBoxClient --clipboard
With this, I could now copy paste, the output from `xinput list` - and regardless of what I do (I get the same also when I don't install Guest Additions), the output is:

Code: Select all

ubuntu@ubuntu:~$ xinput list
⎡ Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]
⎜   ↳ VirtualBox mouse integration                id=9    [slave  pointer  (2)]
⎜   ↳ ImExPS/2 Generic Explorer Mouse             id=11   [slave  pointer  (2)]
⎣ Virtual core keyboard                       id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard                 id=5    [slave  keyboard (3)]
    ↳ Power Button                                id=6    [slave  keyboard (3)]
    ↳ Sleep Button                                id=7    [slave  keyboard (3)]
    ↳ Video Bus                                   id=8    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard                id=10   [slave  keyboard (3)]
Also I tried this, via How to permanently disable mouse integration in Virtualbox? - Super User - on the host terminal:

Code: Select all

# get the VM Name
$ VBoxManage list vms
"Ubuntu 18.04 CD" {XXXXX-....}

$ VBoxManage getextradata "Ubuntu 18.04 CD" GUI/MouseCapturePolicy
No value set!

$ VBoxManage setextradata "Ubuntu 18.04 CD" GUI/MouseCapturePolicy Disabled

$ VBoxManage getextradata "Ubuntu 18.04 CD" GUI/MouseCapturePolicy
Value: Disabled

$ VBoxManage getextradata "Ubuntu 18.04 CD" GUI/MouseCapturePolicy
Value: Disabled

# empty set - restore default
$ VBoxManage setextradata "Ubuntu 18.04 CD" GUI/MouseCapturePolicy

$ VBoxManage getextradata "Ubuntu 18.04 CD" GUI/MouseCapturePolicy
No value set!
None of this worked; and then finally, via this answer in How to permanently disable mouse integration in Virtualbox? - Super User:
Try disabling keyboard auto-capture:
  • In the main window press File|Preferences
  • Select the "Input" tab
  • Uncheck "Autocapture keyboard"
This also disables mouse-autocapture.
Tried it, and still `VirtualBox mouse integration` shows in `xinput list`, and no mouse pointer is captured on video.

Additionally turning off 3D acceleration does not work either.
Any suggestions on what I could try, to get the mouse pointer captured on the Virtualbox video recording?
Last edited by socratis on 25. Jul 2019, 11:07, edited 3 times in total.
Reason: Added ticket related information.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: VirtualBox recording video with mouse pointer of Ubuntu live-cd guest?

Post by socratis »

sdaau wrote:So, I hope it is OK for this post to hang for a day, so I can repost the complete post...
Just copy paste the whole thing here! I don't want to go hunting on 3rd party sites, I want to have the whole story in front of me as a complete, coherent story... ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
sdaau
Posts: 3
Joined: 8. Jul 2019, 06:07

Re: VirtualBox recording video with mouse pointer of Ubuntu live-cd guest?

Post by sdaau »

Thanks for the feedback, @socratis:
socratis wrote:Just copy paste the whole thing here! I don't want to go hunting on 3rd party sites, I want to have the whole story in front of me as a complete, coherent story... ;)
I wouldn't want to go hunting on 3rd party sites either :) Which is why, the first thing I did, was to paste that post here - however, as you can see in the edited OP, it is full of URLs for reference - and I thought they'd be important to keep, because maybe someone more knowledgeable could recognize them and let me know that (maybe) I've tried following too old/unapplicable advice. And since I spent a couple of hours compiling that post already, I didn't have the energy to put into modifying the post, so it would work without URLs.

Anyways, waited out the quarantine period, - and now the full post, including URLs, is in the OP.

Any suggestions/help would be greatly appreciated!
sdaau
Posts: 3
Joined: 8. Jul 2019, 06:07

Re: VirtualBox recording video with mouse pointer of Ubuntu live-cd guest?

Post by sdaau »

OK, just installed https://download.virtualbox.org/virtual ... ox-extpack so I can get remote desktop.

This is the weirdest thing of all - even if I control via remote desktop, mouse pointer is NOT drawn in the VM; yet it reacts as it should?! Please see video capture of this on:

https://i.imgur.com/afUdSAW.gif

(Apologies in advance for the link - I know people dislike third party sites, but unfortunately this forum doesn't allow this to be attached, as it is larger than 256 KiB - and doesn't allow inclusion via img BBcode tag either.)

So - is it impossible to get the mouse pointer on a Ubuntu LiveCD virtual guest, in such a way that it can be recorded? I mean if it is impossible, so be it - I'd just like to know...

Thank you in advance for any help!

------------------

EDIT: just found this - please take a look at the video: https://i.imgur.com/KTiGSCJ.mp4

The video starts with Ubuntu 18.04 as guest in VirtualBox, controlled by rdesktop.

While mouse integration is active in VirtualBox, even if the actual mouse is controlling rdesktop, there is no mouse pointer rendered in the VirtualBox Ubuntu LiveCD guest.

If I turn off mouse integration in VirtualBox, then when we have the actual host mouse pointer controlling via rdesktop - a mouse pointer appears rendered in the VirtualBox Ubuntu LiveCD guest. So this looks promising.

But if I do a Recording video capture in VirtualBox - there is still no mouse pointer in the video recording, even if the host mouse was controlling via rdesktop, and the VirtualBox Ubuntu LiveCD appeared to be rendering its "clone"!

Maybe this is a bug in VirtualBox?

--------------------------

EDIT2: posted a bug: Ticket #18754 Cannot capture mouse pointer in video recording of Ubuntu 18.04 LiveCD guest


--------------------------

EDIT3: I think I found a workaround for this - I managed to put together a X11 application, gist: xosd_track_cursor.c (a31e9dff5), which essentially duplicates the mouse cursor/pointer - and as such, makes the mouse pointer visible on the VirtualBox video recordings, when it runs in a Ubuntu 18.04 LiveCD guest. Some more details can be found in the post VirtualBox recording video with mouse pointer of Ubuntu live-cd guest? #1159774 - Ask Ubuntu.
Post Reply