Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


Search this Thread
Old 02-23-2012, 09:20 AM   #1
LQ Newbie
Registered: Sep 2011
Location: Wales / UK
Distribution: OpenSuse 11.x / Ubuntu
Posts: 7

Rep: Reputation: Disabled
Virtual Windows on Linux

Hi All,
don't let the topic fool you please.

I was wonder if something can be done at all, in my mind this works but i've no idea how.

What I would like to know is:
Can you install a very basic Linux distro (ubuntu/suse/whatever) that once started then starts a virtual machine that can start up M$ Window$ in full screen and almost seamless.
I'm asking as I was thinking this could be an easy way to distribute windows to our client PCs and also allow us to simply keep a copy of the virtual PC for each of our client systems, and also allow us to only link certain USB devices to windows protecting it further (beyond our already created measures)
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 02-23-2012, 10:18 AM   #2
Registered: Jun 2011
Distribution: Arch Linux
Posts: 151

Rep: Reputation: 34
I'm pretty sure this can be done using virtualbox or VMWare, although I am not entirely sure of the details.
Old 02-23-2012, 11:07 AM   #3
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,652

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
VMWare can do that off-the-shelf.

The technology is called virtualization, and it is actually built using features of the microprocessor hardware which allow the CPU to switch between entire machine contexts. The "host" operating system can be of any sort; likewise the "guest(s)." When a guest OS is running, it perceives the hardware to be whatever you set it up to be for that guest, but it is running at full speed. All of the mechanisms for defining a bulletproof virtual execution environment are ultimately provided by the CPU hardware itself, but under software control.

Last edited by sundialsvcs; 02-23-2012 at 11:08 AM.
Old 02-23-2012, 01:11 PM   #4
Senior Member
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217

I know from the other way around, executing Linux VM machine (VirtualBox) from Windows hosted machine.
In VirtualBox you create a shortcut to desktop (with running full screen), which I copied then to startup folder in Windows and that's it, then it starts automatically when Windows is started.

I don't exactly know where to put the 'shortcut' in Linux to start automatically at startup (I know some scripts run at startup in /etc/rc.local)

good luck
Old 02-23-2012, 01:15 PM   #5
Registered: Jun 2011
Distribution: Arch Linux
Posts: 151

Rep: Reputation: 34
getting it to run on startup is somewhat distribution dependent, and there are multiple ways of doing it.
Old 02-23-2012, 01:16 PM   #6
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,563
Blog Entries: 29

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179
It could definitely be done by auto-logging-on a user to the GUI desktop and using an autostart to start the VM but I wonder if it is possible to do it more cleanly by starting X and then starting the VM as the only window with no window controls (title bar etc.) ... ?
Old 02-23-2012, 01:38 PM   #7
Senior Member
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
If I understand what's being asked, then "yes"

To make sure, let me re-phrase. You want to install a linux distro, but you do not want the user to ever know that the machine is running linux. Specifically, the linux install is just the platform, and the user is presented with a fullscreen virtual machine launched immediately on boot.

To do something like that, you need to use a different X display.

The basic command for something like this is:
xinit /path/to/application -- :display#
Replace /path/to/application with the path to the application to run (e.g. for VirtualBox it would be something like "VBoxManage --startvm 'virtual_machine_name'") and replace display# with a numeric value.

The application should start and occupy the entire screen for the X display number you specify. Keep in mind, display :0 is the primary display.

If you use display :0, then you'll need to replace your distibution's default setup. You'll need to look at how they configure xinit. For Debian, my system seems to use /etc/X11/xinit/xinitrc as a base, which then points to /etc/X11/Xsession. You'll need to track down all that stuff, find out what it's doing, and either replace or modify it to create the display you want.

For clarity, I should add that the above could handle the autostart and fullscreen display issues. Keep in mind that the virtual machine software you use may add other complications for "seamless" operation. In other words, you may need to add some behind-the-scenes scripting/code to handle CD insertion/removal... likewise for USB... and any other similar devices.

Last edited by Dark_Helmet; 02-23-2012 at 01:48 PM.
2 members found this post helpful.
Old 02-23-2012, 04:59 PM   #8
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,652

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
I set up just such a "silent" distribution of Linux to run a legacy DOS application and I simply arranged for the boot-loader to go straight to Linux and for Linux to immediately start itself in a so-called run-level (Google such terms as "init," "inittab," and "runlevel" for more) which took me straight to an (in this case...) DOS-emulator program running as an automatically logged-on but absolutely non-privileged user, running in a chroot jail. The Linux distribution in question (Gentoo...) was stripped-down to the minimum necessary to run on that hardware (which was known in advance), "Gentoo" being chosen because that's a distribution that compiles everything from source.

And it worked perfectly. (Still does, in thousands of unsuspecting high-rises across the nation.) The DOS program had no idea it wasn't running on a computer from the late 1980's, but none of the inherent limitations (by modern-day standards) of DOS existed.
Old 02-24-2012, 09:44 PM   #9
Registered: Mar 2008
Posts: 12,728

Rep: Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612
Not sure about the legality of the plan.

Might look at the stuff. They sort of do stuff like that.

Last edited by jefro; 02-24-2012 at 09:48 PM.
Old 02-25-2012, 02:28 AM   #10
Registered: Apr 2008
Location: UK
Distribution: Mepis; Maemo; openSUSE
Posts: 384
Blog Entries: 74

Rep: Reputation: 81
+1 for absolutely do-able. I have Windows running as a Virtualbox guest on my Linux host. I'm fairly certain the ins and outs of auto logging in the required user id & running a script at startup to fire up the virtual guest would be fairly trivial.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
windows + Virtual BOX --> Linux server pradeep.goodTUX Linux - Virtualization and Cloud 2 12-09-2009 05:13 AM
Running virtual pc files in a virtual machine in linux ... preferably virtual box biharibong Linux - Software 4 01-21-2009 01:04 PM
virtual windows running on a linux server kirstyts Linux - Server 2 12-22-2008 09:28 AM
Linux on Windows Virtual PC vehementi Linux - Newbie 1 07-20-2004 11:07 PM

All times are GMT -5. The time now is 02:37 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration