I want to run Windows on Linux in a seamless manner. That is, on booting up the Linux System, the Windows should be launched with no intervention from the user. The user should feel, that he is using Windows, but underneath the Linux would be running. He should be able to use the Windows applications, Network, Networked devices and the Internet within the VM itself. I have to install and demonstrate such a machine and also remove all notifications and options to the user which appears in the Linux OS including disabling access to the Linux system when Windows is running (so as to not confuse the user). Also steps reqd for disabling the use of keys like Ctrl+Alt+ Del which may allow to do this. I have a virtualbox installed on an ubuntu 12 04 OS. What are the steps?
I'll give you a few hints. I assume that you are using VBox as your virtual machine. I also assume that you have created your Windows virtual machine somewhere.
First make sure that you are able to start a vbox machine with a script. The key here is the
VBoxManage command that you can use to start windows using a command line. If the name of the virtual machine I want to start is, for example, "Windows", here is what I do to start it from the command line:
VBoxManage startvm Windows
Next, you need to create a script with this command line. Something like
#!/bin/bash /usr/bin/VBoxManage startvm Windows
Save it somewhere and make it executable (
chmod a+x /your/script/name). Try to run it: did it start Windows?
Second step. You need to create a session in your login manager, which will use your script as the desktop to run. Creating a session is easy -- it is just a text file sitting in
/usr/share/xsessions directory that holds the parameters of your session; for example, look at this answer. You will have to name your session somehow (say, "windows"). In the
Exec line you need to enter your script with the full path. That way, when this session is selected, your script will be run as the session manager.
Your session file could look like that:
[Desktop Entry] Name=Windows shell Comment=This session starts the Windows virtual machine Exec=/your/script/name TryExec= Icon= Type=Application
Now is the time to test whether your session works. You still have your lightdm login manager, you still have the other sessions in case something goes wrong. Log out, and login selecting "windows". Did it work? What happens when you quit windows? Everything oK? Proceed to next step.
Finally, you must ensure that the session is automatically selected. See here for details. For this, you will modify
/etc/lightdm/lightdm.conf. You need to tell lightdm (1) which user should auto-login (
autologin-user=), (2) that the auto-login should start immediately (
autologin-user-timeout=0) and (3) that the session to run is the same session you have created in the previous step.
Hope this is enough to help you.