Wednesday, 19 February 2020

Running AstroDMx Capture for Linux in a Lubuntu Virtual Machine on a Win 10 computer

Running AstroDMx Capture for Linux in a Virtual Linux machine on a Windows 10 computer.

The virtual machine will be an Oracle VM VirtualBox which is a level 2, or host hypervisor that runs in a host operating system, as opposed to a level 1 hypervisor that runs on the 'bare metal' hardware.

Windows 10 will be the Host operating system and Lubuntu Linux will be the Guest operating system.

Check to see if virtualisation is enabled on your Windows 10 computer by right-clicking on the Start button, or the taskbar, selecting Task Manager and select the Performance tab.

At the right hand side of the window, underneath the CPU graph, there will be four columns. Look in the column labelled Base speed. The fifth item in this column will be Virtualisation, which will be enabled or not. If it is not enabled, turn off your computer. If it is enabled just carry on.


Then turn on your Windows 10 computer and press F2 (or whatever is the Function key on your machine to enter the BIOS). Search for and enable virtualisation if it is not already enabled.

Download Oracle VM VirtualBox from https://www.virtualbox.org/wiki/Downloads

Click on Windows hosts and save the download file: VirtualBox-6.1.2-135663-Win.exe
Then, from the same page on the website download the VirtualBox 6.1.2. Oracle VM VirtualBox Extension Pack.

(Note that 6.1.2 is the version for both the VirtualBox and the Extension Pack at the time of writing)

Run the VirtualBox-6.1.2-135663-Win.exe file which will install Oracle VM VirtualBox on your Windows 10 computer.

Double-click on the Oracle VM VirtualBox Extension Pack to install it in the Oracle VM VirtualBox Manager. This will allow, for example, the integration of USB 2.0 and USB 3.0 Host Controller.

Download a Linux .iso file. It is best to use a relatively lightweight distribution such as The example we use here is Lubuntu 18.04 a long-term support ‘flavour’ of Ubuntu Linux that can be downloaded at https://lubuntu.me/downloads. These instructions apply to this distribution. Others may differ in their details and suitability for virtualisation.

Launch Oracle VM VirtualBox



Click on the ‘New’ button.

You will be asked to Name the operating system.

Assuming you downloaded the Lubuntu .iso file, enter Lubuntu in the Name box. As you do so, you will note that the Type box becomes populated with Linux and the Version box becomes populated with Ubuntu (64-bit).

Click on the Next button.

You will now be on a page about Memory size. Just go with the default and click on Next unless you wish to allocate more memory.

You will now be on a page called Hard disk. Go with the default, which is Create a virtual hard disk now. Click on the Create button.

You will now be on a page called Hard disk file type. Go with the default which is VDI (VirtualBox Disk Image). Click on Next.

You will now be on a page about Storage on Physical hard disk. Go with the default which is Dynamically allocated. Click on Next.

You will now be on a page called File location and size. Unless you have a reason to do otherwise, go with the default and click on Create.

You will see your new virtual machine at the left-hand side of the window.
Click on the Start arrow button.

The VM Virtual machine will start and you will be asked to select a virtual optical drive.

Click on the icon to the right of the box. This will take you to the Optical disk selector.

Click on the Add button and navigate to the lubunto .iso file.

Click on the file and select Open. Make sure that the lubuntu .iso file is highlighted in the Optical Disk Selector and click on Choose.

You will now be on a page called Select start-up disk and the lubuntu .iso file will have been selected. Click on the Start button.

The installation of Lubuntu on the virtual machine will begin. If English is pre-selected as it should be, press Enter and leave everything alone and the installation will proceed after a countdown.

You may be presented with a small Lubuntu Live desktop or you may have the option to install Lubuntu. Either way, select Install Lubuntu.. You may get the chance to do a minimal install with just a browser and some utilities. This may be the best choice if the Virtual machine is only going to be used to run AstroDMx Capture for Linux.

Now, just carefully follow the installation process, providing information when required. Do this carefully and slowly to make sure that you get the correct keyboard and location etc.

When you get to the Updates and other software page, make sure that Normal installation, Download updates while installing Lubuntu, and Install third party etc… are all checked and click on Continue.

On the Installation type page go with the default which is Erase disk and install Lubuntu. Click on Install Now.

A small window called Write changes to disks? Will appear. Click on Continue.

Depending on your earlier selection of language and keyboard, the next page called Where are you, should select the right place. If it does, click on Continue.

Then you will come to a page asking Who you are and requesting a password. Just enter something you will not forget and carry on. The installation of Lubuntu will proceed normally. Just wait until it is complete.


When you are told that the installation is complete, click on the Restart Now button.

The Virtual machine will reboot and it will ask you to remove the installation medium, then press ENTER. Just press ENTER.

The virtual Lubuntu machine will boot up and ask for your password. Enter it and press Enter.

You will have a very small Lubuntu screen. Click on the Start Button (left of the panel (the taskbar is called the panel in Linux)). Select Preferences and Monitor settings. You will see that the resolution has been set to 800 x 600. Use the drop-down menu to select the resolution that is right for your monitor. Look carefully through the options to make your selection. Then click on Apply and Save.
Then at the top of the screen, click on View and select Scaled mode. The menu at the top will disappear, but the panel at the bottom of the Lubuntu screen will be visible.

Then Click on the Right CRTL key and C this may bring up a small window. Select don’t show again. You will now be able to switch between scaled view and the view with the top menu, just by typing the Right-CTRL key and C together.

The text in yellow is optional.

I always find that it is helpful to place the panel at the left hand side of the screen. This gives more depth to the screen for the AstroDMx Capture or any other software. It may also help to make the Windows taskbar auto-hide.

Moving the panel to the left of the screen

The panel is initially at the bottom of the screen

Right click on the panel and select Panel Settings. This brings up a window with four tabs. The first two Geometry and Appearance are important at this stage. The window opens in the Geometry tab.
Set the Position to Left, Margin to 1, Width to 40 and Icon size to 30. These last two numbers can vary with the size of your screen.



The panel will now be at the left hand side, but won't look very good.
Now click on the Appearance tab and click on solid colour with opacity. Click on the chequered box to the right and adjust the Opacity to about 68.



Then click on OK and Close.
The panel will now be in a more useful position.

Alternatively, the Advanced tab could be opened and the panel can be made to auto-hide by checking the box by Minimise panel when not in use. This can be done wherever the panel is situated and may be all you want to do. If my screen is large enough, I prefer to be able to see both the Windows taskbar and the Linux panel all the time.

It is possible that the Software Updater may present itself on the panel. This might be a good time to make sure that the Lubuntu installation is up to date. Click on the Software Updater, you will be asked for your password and the installation of the updates will take quite a few minutes.

Installing AstroDMx Capture for Linux.

Click on the Browser button on the bottom panel of the Lubuntu screen. This will launch Firefox.

Type into the URL bar, https://www.linux-astro-imaging.uk

Navigate to Linux Downloads

Click on AstroDMx Capture -Download Current Version

Scroll down to the blue box Linux 64-Bit

Click on astrodmx_capture version 0.68.1 (x86-64) – Debian Installer... (or whatever the current version is of the Debian installer)

Save the file. Firefox will save it to the downloads folder.

Close the browser.

Navigate to the Downloads folder using the File manager on the bottom panel. Inside the folder will be the astrodmx capture install .deb file.

Right click on the file and select Gdebi Package Installer.

The package installer will launch and you will be able to see information about AstroDMx Capture for Linux. Just click on the Install Package button.

You will be asked for your password. Enter it and press Enter or click on OK.

The installation will begin. When it has completed, click on Close and also close the window.
To save space on your virtual machine, you can now delete the installer package from Downloads and empty the Rubbish Bin if you so wish.

Logout by clicking on the Start button and selecting Logout and then Shutdown, or use the power button on the panel.

Restart the virtual machine, enter your password and log back in. (It should be noted that shutting down and restarting is not strictly required, it should be enough simply to logout and then log back in, however, sometimes this can produce unpredictable results).

Click on the Start button and you will find that a new category called AstroImaging has been created, and within it AstroDMx Capture has been installed.


Creating a Shared folder

We now need to create a shared folder between the Windows machine and the Linux virtual machine so that results can be sent to it rather than filling up the limited space in the Virtual machine. Also, the results in the Shared Folder will be available for your Windows stacking software etc. to work on.

I created a new folder called SHARE in the Videos folder of the Win10 machine. In Properties of the folder I set it to Share for Everyone.

In the virtual machine press Right-CTRL and C if necessary, to make the File; Machine; View; Input; Devices and Help visible at the top of the window.

Select Devices and click on Insert Guest Additions CD image.

This mounts VBox_GAs_6.1.2 on the desktop (and in the file manager) and this can be opened in the file manager. The path to this can be seen at the top of the file manager folder. It will be something like /media/username/VBox_GAs_6.1.2 where username is whatever user name you created.

From the Start button launch a terminal and type into it cd /media/username/ VBox_GAs_6.1.2

Then type sudo apt install gcc make perl

You will need to type your password if asked.

When you are asked Do you want to continue [Y/n] enter y

After it has finished this task; then type sudo ./VBoxLinuxAdditions.run
It will take some time to complete these tasks.

VBox_GAs_6.1.2 can be unmounted from the desktop from within the File manager when it is no longer required.

Creating a shared folder that can be accessed by the Linux virtual machine and the Windows 10 host machine


Create a shared folder called SHARE in the Linux home directory. It will have the path /home/username/SHARE.

Press Right-CTRL and C if necessary to make the File; Machine; View; Input; Devices and Help visible at the top of the window.

The click on Machine and Settings.

Click on Shared Folders and then highlight Machine Folders. Then click on the icon like a folder with a + sign to add a shared folder.

Click on Folder Path: and navigate to the folder created earlier (In this case SHARE in the Win10 machine Videos folder).

Click on the SHARE folder and then Select Folder.

Click on Auto-mount

Then in Mount point: enter the path to the shared folder as noted above: /home/username/SHARE
Click on Make Permanent and then OK.

From the Linux Start button, select System Tools and then Users and Groups
Click on Manage Groups

A window containing Groups available on the system will appear.

Search for vboxsf in the list, double click on it and another window with Group vboxsf Properties will appear.

Check the box by the username and click OK
You will need to enter your password.
Enter it then click on Close and then Close again.

From the Linux Start button select Logout and Shutdown or use the power icon on the panel.

Start the virtual machine and it will have a shared folder, possibly mounted on the desktop as well as being in the home folder.
It should be noted that anything put into the shared folder can only be deleted from the Windows side.

AstroDMx Capture for Linux can be configured to write its data to the shared folder.
Launch AstroDMx Capture

Click on Options and Setup Output Format.
The Save Folder is shown and can be changed. Click on Change and navigate to the shared folder in the Linux file system. Click on Open and the save folder will be changed.

Close the virtual machine from the Start button, Logout and Shutdown or the power icon on the panel.

Enabling the USB controllers in the Virtual machine

Launch the Oracle VM VirtualBox Manager.
When the virtual machine is NOT running; 
Click on Settings, USB and make sure that the Enable USB Controller is checked and that USB 3.0 (xHCI) Controller is selected, otherwise, some cameras will not be seen.



Before a USB camera can be used in the virtual machine, the USB camera has to be passed through to the virtual machine.

With the virtual machine running, press Right-CTRL and C if necessary, to make the File; Machine; View; Input; Devices and Help visible at the top of the window.

Plug in your camera to the appropriate USB port.

Click on Devices, USB and select your camera from the list.


The CKCamera shown above is in fact the SV305 camera and will show as such in AstroDMx Capture for Linux.

That camera will then be available for AstroDMx Capture to use.

It should be noted that UVC cameras appear in the list but will not work. They are also listed as webcams and if selected there, will be usable, but will be restricted and only offer MJPEG. Moreover, they may cause instability. Don't use them with this system.

Finally, it should be noted that for any given camera to be usable in a VM VirtualBox virtual Linux machine, that camera's Windows driver MUST first of all be installed on the Windows 10 host machine.

The SVBONY SV305 attached to an 110mm f/4.5 ED refractor imaging a structure across the valley.
AstroDMx Capture for Linux running in a Lubuntu Virtual machine on a Windows 10 computer


If the instructions are followed as presented here, it is possible to run AstroDMx Capture for Linux in a Windows 10 computer and to capture data that can be processed in the Windows Host machine.

Naturally, the performance of the Virtual machine and the software running in it, will depend on the specifications of the Windows 10 machine, particularly the type of hard drive, the CPU and the available RAM. The more powerful the computer, the better the performance.

We shall, when the opportunity arises, post results from the SV305 (and other cameras) captured by AstroDMx Capture for Linux, running in the Virtual Lubuntu machine, on a Windows 10 computer.