Skip to content

A simple tray icon program for integrating a UNIX system running on VirtualBox into the Windows desktop

License

Notifications You must be signed in to change notification settings

BinaryCloudDev/xvmmgr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XVMMgr unlicense

Screenshot

A simple tray icon program for integrating a UNIX system running on VirtualBox into the Windows desktop:

  • at launch, starts VcXsrv (at exit, quits it)
  • on left click, starts your VM if it's not started
  • has a right click menu for launching X apps from the VM using plink

Usage

You'll need VcXsrv, VirtualBox, and PuTTY. Generate a private key with PuTTY, save it without encrypting with a password.

First, install the module:

mkdir -Force $HOME\Documents\WindowsPowerShell\Modules\XVMMgr
cp .\xvmmgr.psm1 $HOME\Documents\WindowsPowerShell\Modules\XVMMgr\XVMMgr.psm1

Then write a script like this:

Import-Module XVMMgr

XVMMgr @{
    VMName = 'TheVMNameInVirtualBox';
    SSHHost = 'user@vmhostname-or-ip.lan';
    SSHPrivateKey = 'C:\Users\user\path\to\unencryptedPrivateKeyForVM.ppk'; # No spaces in the path!
    Commands = @(
        @{Name = 'Terminal'; Command = 'st'},
        @{Name = 'glxgears'; Command = 'glxgears'}
        # ...
    )
}

To run it in the background, you'll need a VBScript file to call your PowerShell script. Yes, this seems to be the easiest way to do this. Oh Windows.

Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run("powershell.exe -File C:\Users\user\path\to\mgr.ps1"), 0, True

You can put that .vbs script into your autostart folder (which is $HOME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup, and you can go there quickly by opening shell:startup in either the Win+R run dialog or the explorer path bar).

By the way: do not install VirtualBox guest OpenGL/X11 drivers.

License

This is free and unencumbered software released into the public domain.
For more information, please refer to the UNLICENSE file or unlicense.org.

About

A simple tray icon program for integrating a UNIX system running on VirtualBox into the Windows desktop

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 100.0%