GithubHelp home page GithubHelp logo

valpackett / xvmmgr Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 1.0 5 KB

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

License: The Unlicense

PowerShell 100.00%
virtualbox windows powershell tray-icon x11

xvmmgr's Introduction

XVMMgr unlicense

Screenshot

A simple tray icon program for integrating a UNIX system running on VirtualBox or Hyper-V 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 or Hyper-V, 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 = 'YOUR VM NAME';
    # Hypervisor = 'Hyper-V'; # Just ignore the field for VirtualBox
    SSHHost = '[email protected]';
    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.

xvmmgr's People

Contributors

valpackett avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

binaryclouddev

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.