Author Topic: How To: Windows XP Mode In...Ubuntu Linux...Part 3  (Read 1274 times)

Online javajolt

  • Administrator
  • Hero Member
  • *****
  • Posts: 36002
  • Gender: Male
  • I Do Windows
    • windows10newsinfo.com
How To: Windows XP Mode In...Ubuntu Linux...Part 3
« on: October 08, 2009, 06:19:35 AM »
Guest Additions And Sharing Files

With Windows XP updated and booted, it's time to install some VirtualBox optimizations. Unbind the mouse from the VM by pressing the right Ctrl key. Click on Devices in the menubar of XP's VM window, then click Install Guest Additions.


The Sun VirtualBox Guest Additions setup screen should open. Rebind the mouse to the VM by left-clicking anywhere on the Windows desktop. Click Next, I Agree, and then Next again. Check the box next to Direct3D Support (Experimental) if you plan on utilizing DirectX 3D graphics. Click Install to begin copying the Guest Additions files to your VM. When Guest Additions is done installing, click Finish to reboot.


After Windows has rebooted and you're back to a workable desktop, a VirtualBox icon will be in the notification area of the taskbar. If you had previously resized the desktop's resolution, it may have reverted back. Also notice that your mouse is now able to move between the VM and host OS without clicking or using the Ctrl key. This is called Mouse Integration and is part of Guest Additions. It can be turned on and off from Machine in the menubar, or by pressing right-Ctrl+I.


Sharing Files

Remember the shared folder we designated when we tweaked XP's VM settings? You're going to need it now. Navigate to the shared folder in your Linux file manager (mine was the Public folder in my Home directory, /home/adam/Public). This is where you'll put files from Linux (the host OS) that you want to share with Windows XP (the guest OS). This is also where you go to receive files from XP to Linux.


To make files from Windows XP available to the Linux host, or to receive files from Linux in XP, you need to first boot up the XP VM. In this step, the sequence must be followed to the letter. This is very easy to get wrong, and a misstep will result in you starting over.

Follow the mouse pointer in the screenshot below for easy reference. From the Start Menu, open My Computer, then click My Network Places in the Other Places sidebar. Next, click View workgroup computers in the Network Tasks sidebar. Now, click on Microsoft Windows Network in the Other Places sidebar. Click on Entire Network again, in the Other Places sidebar. Now, there should be an entry for VirtualBox Shared Folders in the window. Double-click it.


Your shared folder should be there, listed as \\VBOXSVR\"folder name.” For example, mine is \\VBOXSVR\Public. Since it's such a hassle to go through the XP file manager's sidebar to get here, it's a good idea to put the shared folder in your Favorites. Just click Favorites/Add to Favorites when you're in VirtualBox Shared Folders. From now on, you can get to the VirtualBox Shared Folders directory from Favorites in Windows Explorer.


USB, Clipboard, And Troubleshooting

Can I Copy and Paste?

Back in the early days of desktop virtualization, the guest OS was completely separated from the host. Let's say you need to complete a Web-based research project and input the data into an Excel-only spreadsheet. If you were on Linux years ago and tried to virtualize, you would need to do your research from within the VM (probably in IE) in order to use the copy and paste functions. The alternative was to manually type all of the research data you found Linux-based Web browser into Excel running in the VM. Neither option is appealing.

If you run all your apps from within a VM, what's the point? Why not run that OS natively? Alternatively, why make more work for yourself by throwing out the nearly thirty year-old advent of cut and paste?

With VirtualBox, we've already seen how the keyboard and mouse automatically bind and unbind themselves to the guest OS without the need for special keyboard commands. But how about cut, copy, and paste features? In the past, you would most likely be out of luck (or have had to jump through hoops to get something working). Fortuneately, VirtualBox has reached the point where these staple functions are built-in. Go ahead and give it a try. Copy something from the Web in your Linux-based browser and paste it into Internet Explorer in Windows, or vice versa.










What about my USB Devices?


Keep in mind that Mouse Integration from page six will handle USB mice, so there is no need to add a filter for that device. The same holds true for USB speakers, since you are using the audio driver from the host OS and it needs the speakers, not the guest OS. Remember that any device you add a filter for will not be usable in the host OS until the VM is shut down or the filter is removed. I selected one of the USB sticks and the HP printer.


Special digital camera software, PDAs, iTunes? No problem. Just add a filter for the devices you want Windows to use and the next time that you start XP, they will be connected. Note that any device you use in the XP VM will need to be configured just as you would with any PC running XP natively.

Can You Hear Me Now?

One of the most common issues that people have with VirtualBox is garbled, or a total lack of, audio playback. Fortunately, this is relatively easy to troubleshoot. If you noticed sound issues when finalizing the XP installation or afterward, you need to go back to the Settings for the Windows XP VM. In the VirtualBox main window, highlight the XP VM, then click on the Settings button in the navigation bar.

Click on the Audio page in the left pane. Make sure that the check box next to Enable Audio is checked. If it was already checked and you still have no audio, try another driver in the Host Audio Driver field. Boot up XP and test for sound. If necessary, repeat the process. Eventually one of these drivers should work for you.

The Audio Controller field refers to the sound controller on your motherboard or on an installed card. If your sound is still not working properly, check the corresponding hardware manuals to be sure which controller you have.


The Full-Screen Treatment

For some people, a small window is going to be fine. However, if you need to run several Windows XP-based apps, you will no doubt want a larger workspace. By default, Ubuntu comes with two virtual desktops, but you can add as many as you want. There are three variations of giving XP a dedicated virtual desktop: seamless, fullscreen, and maximized.


Choosing Seamless Mode from the Machine menu makes the XP taskbar dwell right above your host OS's bottom taskbar. In Seamless Mode, the XP desktop disappears and the XP taskbar, Start Menu, and any running apps appear to run directly on the Ubuntu desktop. Below are screenshots of my Ubuntu desktop normally, and with XP in Seamless Mode.


Alternatively, you can completely fullscreen your XP VM by selecting Fullscreen Mode from Machine in the menubar. The downside with Fullscreen Mode is that you'll need to make keyboard shortcuts for switching desktops or press right Ctrl+F to switch between XP and Linux.


If I had to use Windows XP in a virtual machine, I'd maximize the VM in its own virtual desktop. By now you've probably noticed that after we installed Guest Additions, maximizing the XP VM automatically changes the XP resolution to fill the window. So, with the XP window maximized, I can easily switch to and from the full Windows XP experience without needing keyboard shortcuts for Fullscreen Mode or the quirks of Seamless Mode.


However you plan on doing it, any of these options allow you to use XP without dual-booting. I always use four virtual desktops in Linux, so I'll move the XP VM to the fourth position. Using the Compiz Fusion expo plug-in, I have taken a screenshot of all my desktops to illustrate what I mean.

Conclusion

Now you should have Windows XP set up as a guest inside VirtualBox on a Linux host. With Guest Additions, XP should now be in some form of fullscreen with mouse and keyboard integration. You can share files to and from the XP guest and Linux host. Your USB devices are available to the XP virtual machine. Heck, even cut, copy, and paste functions bi-directionally between the OSes. Unless you do really heavy 3D gaming, this setup should cover any straggling Windows-only apps that you absolutely need. It essentially does the very same thing that XP Mode does in Windows 7. Is there really a need to shell out extra money to get that functionality from a new version of Windows?

If you decide to keep this setup, then this How To guide saved you money. But how much? In a worst-case scenario, at least $90 assuming you already have a copy of Windows 7 Home Premium from a new PC purchase, in which case you'd need to pay that much to upgrade it to Professional in order to get XPM. In the best case scenario, $170. If Windows 7 Home Basic or Starter edition came installed on your new PC, you need to pay another $80 to upgrade to Windows 7 Home Premium, before paying the $90 for Pro or Ultimate.

Add in the fact that you probably have more than one PC (I have seven). Now you can really start to see how Windows 7 could end up costing serious cash. Even if you already pre-ordered the new Windows for your primary machine, you could still use the Linux/VBox/XP-combo on your others. And unless you're a hardcore gamer, go ahead and run Windows 7 in VirtualBox, too!


If it's the glowing Windows orb, the transparent windows, or gossamer reflection effects that are enticing you to go out and buy Windows 7, stay tuned for our upcoming coverage of Linux Preferences. There, we'll walk you through all the ways to customize your GUI, from panels to widgets and everything in-between. Don't worry, there will be a ton of transparency effects for those interested in cloning the Windows 7 GUI. There will even be some effects, like expo for Compiz Fusion, never before seen on a Windows machine.

« Last Edit: October 12, 2009, 01:37:09 AM by javajolt »