Creating a custom UI for VBox the fast way - Whonix Windows GUI

Good day,

did work on that parallel to the installer. Actually took about 5min. Here is the entire code for anyone interested:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;


namespace Whonix_GUI
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string a;
            a = "/K VBoxManage startvm Whonix_Workstation";
            System.Diagnostics.Process.Start("CMD.exe", a);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            string b;
            b = "/K VBoxManage startvm Whonix_Gateway";
            System.Diagnostics.Process.Start("CMD.exe", b);
        }

        private void button3_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("VirtualBox.exe");
        }
    }
}

This, as you may have noticed, pressumes that you’ve named your gateway “Whonix_Gateway” and your workstation “Whonix_Workstation”. Change this, according to what you namend yours. To use this, simply create a C#-Form in VisualStudio (any version since 1.0 should suffice) and create a GUI with the corresponding buttons, like this fairly awfull one:

Then, simply publish the project and put your “creation” in the same folder your VBoxManage.exe is, link to it on your desktop and voilá, you’ve got a simple GUI of your very own. I made it in such a way, that, by pressing the matching Gateway and Workstation buttons, each of them should start. The “Advanced button” simply calls the “normal” GUI provided with VirtualBox. At the moment, the GW and WS buttons sadly can only start it, though that is something I’ll solve in the next days.

Have a nice day,

Ego

1 Like