How to start xde.exe using cmd and pass vm_name as a parameter to the command? - windows-phone

I start xde.exe ( windows phone emulator ) using the following command " AnycpuStart xde.exe ". But it starts the emulator with default name " Default windows phone emulator". But I wish to start a different emulator, Say " Lumia 720 ". How will I pass the virtual machine name (vm_name is found from hyper v manager) as a parameter to the command. Like " AnyCpuStart xde.exe Lumia 720".
Below image might help. It is a help window that pops up when i type the command.
Or please tell me how to start a virtual machine listed in Hyper-V manager using cmd.

found solution.
Got to CMD
Change directory (cd) to path of xde.exe
Pass name parameter in this format : " xde.exe -name vm_name "
The virtual machine name should not have spaces.
Virtual machine names can be found in hyper-v manager.

Related

Get DISPLAY environment variable from a local terminal to the Visual Studio Code terminal through SSH

I'm using VScode with Windows Subsystem for Linux (WSL) and working through an SSH connection.
Unfortunately, the Remote - SSH extension by Microsoft doesn't enable X11 forwarding (#267), and thus an extension such as Remote X11 has been created.
Sadly, this extension doesn't work for me as I'm working through a jump host/gateway, and therefore have to manually change the DISPLAY variable in the VScode terminal to the DISPLAY variable found in another terminal that is used for displaying stuff.
I guess it is possible to get the DISPLAY variable by running tr '\0' '\n' < /proc/<pid>/environ | grep DISPLAY(Environment variables of a running process on Unix?), with the <pid> being run from the local terminal, and now it's just a problem of automating the search for this process.
So i guess the stuff I'm asking for, is a way to:
Get the pid from a process on a local terminal
Get the DISPLAY variable from this process
Set the DISPLAY variable in every newly opened terminal in VScode (perhaps running step 2 in the workspace-settings.json)
PS. I'm using the VcXsrv X Server

Change bash.exe with multiple linux subsystems on windows

I first installed a Ubuntu linux subsystem with the windows store.
I then installed the hyper terminal for windows like explained in this tutorial : https://medium.com/#ssharizal/hyper-js-oh-my-zsh-as-ubuntu-on-windows-wsl-terminal-8bf577cdbd97
Like it is written in the tutorial I put C:\\Windows\\System32\\bash.exe in the hyper configuration file.
However, afterwards, I installed another linux subsystem, Wlinux.
So now I have two subsytems located here
Wlinux : C:\Users\martinpc\AppData\Local\Packages\WhitewaterFoundryLtd.Co....
Ubuntu : C:\Users\martinpc\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_7...
However, when I open the hyper terminal, It seem like I can only access the files of the ubuntu distrib and not the Wlinux. Therefore, I would like to know how I can point Hyper to Wlinux and not Ubuntu anymore. Thank you for your answer.
First of all, bash.exe has been deprecated. You should use wsl.exe in command lines. Check your installed distributions in WSL with wslconfig.exe /list /all command. Alternatively, for Windows 10 version 1903 and above, wsl.exe --list --all command can be used. Choose the distribution that you want to connect with HyperJS Terminal emulator. Open up Hyper.js configuration with Ctrl + , or open %UserProfile%\.hyper.js in any text editor. Edit the shell configuration from these two named values:
shell: 'C:\\Windows\\System32\\wsl.exe',
shellArgs: ['--distribution', 'Your-Distro-Name'],
Alternatively, you can use wslconfig.exe /setdefault <DistributionName> command to change default distribution. With this step, you can skip the shellArgs line in .hyper.js configuration file.

How to open Virtual Box on Windows 10

I am unable to access the virtual box that I initialized with the "vagrant up" command. I now get this:
[C:\web\Homestead]vagrant global-status
id name provider state directory
------------------------------------------------------------------------
13650ef default virtualbox running C:/web/Homestead
The above shows information about all known Vagrant environments
on this machine. This data is cached and may not be completely
up-to-date. To interact with any of the machines, you can go to
that directory and run Vagrant, or you can use the ID directly
with Vagrant commands from any directory. For example:
"vagrant destroy 1a2b3c4d"
[C:\web\Homestead]vagrant ssh 13650ef
C:/web/Homestead/Vagrantfile:4: warning: already initialized constant
....
The provider 'virtualbox' that was requested to back the machine
'default' is reporting that it isn't usable on this system. The
reason is shown below:
The executable 'cygpath' Vagrant is trying to run was not
found in the %PATH% variable. This is an error. Please verify
this software is installed and on the path.
I am running Windows 10 and set my environment variables, as follows:
Path c:\php;C:\Program Files\Oracle\VirtualBox;
C:\Program Files\Git\usr\bin;C:\cygwin64;
C:\Users\Kevin\AppData\Roaming\npm
The cygpath file it seeks is clearly under both c:\Program Files\Git\usr\bin and under C:\cygwin64.
I tried to access the virtual box through Putty, but got the simple message "connection refused". I have used Puttygen to convert the ssh keys to Putty ppk files.
I have tried to retrace my steps initializing the virtual box, but I fail to see how to step forward and open the box.
Should I destroy my virtual box and start over?
Try to change the PATH paths with 'Program Files' to Progra~1 paths or to wrap each path item with double-quotes, e.g.:
Path c:\php;"C:\Program Files\Oracle\VirtualBox"; "C:\Program
Files\Git\usr\bin";C:\cygwin64; C:\Users\Kevin\AppData\Roaming\npm
or
Path c:\php;C:\Progra~1\Oracle\VirtualBox;
C:\Progra~1\Git\usr\bin;C:\cygwin64;
C:\Users\Kevin\AppData\Roaming\npm

vagrant package how to save changes to new box

My question is related to this here but I do not get it to work.
I use a pre-made vagrant box from vagrantbox.es ( http://goo.gl/KwQSa2 ) and I want to make some changes and repackage the new virtual machine into a new vagrant box file.
To get the initial box, I add config.vm.box_url = "http://goo.gl/KwQSa2" to my vagrant file.
After invoking vagrant up I do vagrant ssh and then some operation (e.g. touch testfile.txt).
After logging out I use vagrant package which creates package.box.
Then I do vagrant destroy, add the path to package.box to config.vm.box_url in my vagrant file and do vagrant up again.
When I log into the VM, my testfile.txt is not there, so it looks like I packaged the unchanged box.
I tried other things such as vagrant box repackage without success.
What am I missing here?
When you package, you have to specify the UUID of the new VM created (by vagrant up) based on the base box.
NOTE: If you are using VirtualBox, it'll create a new VM with name - base_box_name-default-UUID.
When running
vagrant package --base name --output /path/to/name.box
The --base NAME, name should be either the new VM's name or its UUID.
You can get it by using the following command:
$ VBoxManage list vms
"oracle65" {5f9e6136-7773-4cd5-99a1-3a66b5e48045}
"Ubuntu" {e8c5a28c-788d-4d57-8c4a-c1f032a02443}
"oracle510" {fed5f379-495e-4b4b-b4e2-24f98edd2e72}
"archlinux" {c79dcee9-a523-4300-b026-cbc93ad37062}
"Windows" {fa768a76-5710-4b07-a4df-cc388370f038}
"Wiki" {a50ce314-6af8-4633-b02e-82b765cbf401}
"openSUSE" {af3cdf13-7e00-4c24-ae52-423919359b18}
"Debian" {37680776-73b9-44fd-8348-f60fd3895624}
"Solaris" {bc7be4ab-293d-4c94-b591-b5445a954f6c}
"centos_default_1395637517620_29337" {03d1282a-c7ba-493b-91ad-ec26ed763b6c}
"Kubuntu" {787ce012-00ef-4f90-acda-1b65c6d9941b}

How assure that gnome-terminal is displaying the correct hostname on window title?

I am looking for a solution that would update the window title to the current host.
I am usually doing ssh to different boxes and I observed that the window title in Gnome Terminal (3.0.1 from Ubuntu 11.00) is not correctly updated. Currently it displays "user#localcompure: path" - and I want to be updated after I do a ssh.
I should note that I am looking for a solution that will not require me to change settings on any machine I'm connecting to.
I'm looking to do the same here, the functionality works fine in konsole(kde's terminal app) but not from within gnome-terminal. The best solution I have found thus far is to invoke this by using a separate app with the following:
#!/bin/bash
#!/bin/bash
SETTP='MY_PROMPT="$HOSTNAME:$PWD\$ "'
SETTP="$SETTP;"'MY_TITLE="\[\e]0;$HOSTNAME:$PWD\a\]"'
SETTP="$SETTP;"'PS1="$MY_TITLE$MY_PROMPT"'
ssh -t $1#$2 "export PROMPT_COMMAND='eval '\\''$SETTP'\\'; bash --login"
found and copied from:
https://unix.stackexchange.com/a/40337?sgp=2