个人工具

UbuntuHelp:SoftwareFromOtherOperatingSystems

来自Ubuntu中文

Wikibot讨论 | 贡献2010年5月20日 (四) 00:14的版本

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索
  1. title Software from other operating systems

Discuss this page

{i} This page is part of the UserDocumentation series of index pages. Please read the WikiGuide prior to making changes.

Software From Other Operating Systems

Consider if you really need to run that software: in most cases, its functionality is provided by a free Linux program, see SoftwareEquivalents. SoftwareFromOtherOperatingSystems?action=AttachFile&do=get&target=SeamlessVirtualizationResized.png You can run applications created for other Operating Systems inside Ubuntu using two different approaches:

  • Running a different OS inside Ubuntu (typically done with virtualization), see VirtualMachines
  • Using a Windows compatibility layer, like Wine or Cedega

In general, desktop and server apps work better with virtualization, multimedia apps like games work better with Wine or Cedega.

Playing Windows Games

Some Windows games have a Linux installer included on the installation CD, such as Unreal Tournament 2003 and 2004. A small number of Windows games can be run using the Wine emulator, such as World of Warcraft. Alternatively, Cedega can be used to play many Windows games, including Half Life 2, Battlefield 1942 and most popular first person shooters. Cedega is a commercial, non-free version of Wine which is optimised for running Windows games. If Cedega can't play a Windows game, then it is unlikely that the game can run under Linux at all.

Running Well-Known Windows Desktop Apps

If you need to run a well-known Windows application - for example Internet Explorer, Microsoft Office, or World of Warcraft - check if it is supported by Wine by using the Wine Application Database. If not, see below.

Running Any Windows Desktop or Server App

SoftwareFromOtherOperatingSystems?action=AttachFile&do=get&target=screenshot%2Bwindows%2Bxp%2Bin%2Bqemu.png Windows XP run using QEmu on Feisty 7.04 You can run any Windows desktop or server application - with the exception of games - using a variety of virtualization tools.

  • Ubuntu 6.06, 6.10, and 7.04 can run Windows, and all its apps, using
  • Ubuntu 7.04 also includes two virtualization tools that can run Windows in Linux:
  • QEmu works on all systems. Ubuntu 7.04 to Ubuntu 9.04 include the KQEMU module necessary to run Windows XP at speed.
  • Kernel Virtualization (KVM) requires an Intel or AMD CPU that supports VT or Pacifica technology.
  • Xen - Open Source, but complex and slower than VMware and KVM for running Windows.
  • VirtualBox - Simple, Open Source, and can run all versions of Windows including Vista.
  • VMware - Also simple, and more well known than VirtualBox. However VMware is proprietary software.

Seamless Virtualization shows how to make applications from virtualized Windows OS appear directly on the Linux desktop.

Available Methods to Run Software from Other Operating Systems

Tool Run Required Ubuntu Release Requires Hardware Virtualization Open Source
Cedega Windows games 6.06 and newer No Mixed proprietary and OSS,must be purchased for full functionality
Kernel Virtualization Any x86 OS, including Windows 7.04 beta Yes Yes
Mac on Linux Mac OS X (PPC) only 6.06 and newer No Yes
OpenVZ Linux 6.06 and newer No Yes
QEmu Any OS, including Windows 7.04 (earlier Ubuntu lack the acceleration driver needed to run most OSs at full speed) No Yes
VirtualBox Any x86 OS, including Windows 6.06 or newer No Yes
VMware Player, Workstation, or Server Any x86 OS, including Windows 6.06 and newer No No
Wine Specific Windows Programs 6.06 and newer No Yes
Xen Any x86 OS, including Windows 6.06 and newer Yes, unless running Linux Yes

Dual-Booting tricks

Switch to Windows shortcut

If you have your computer set up to run two operating systems (you can find more information about this at WindowsDualBoot), you can set up an icon that will switch you into Windows from Ubuntu by following these instructions: First, we must edit the GRUB menu and see what menu number the entry for Windows is. Run: gksudo gedit /boot/grub/menu.lst Warning: Be careful editing this file, making a mistake will potentially make your system un-bootable until you fix it with a LiveCD Look at this file, after the comments, you should see a line that says ## ## End Default Options ##. The actual menu items are located after this line. Count them, and make a note of where the Windows entry appears. Keep in mind that GRUB starts counting from 0, so don't start at 1. In my case, the entry for Windows is number 5. Note: Be sure to count every entry that has a "title" line, including the one that says Other operating systems: if you have it. Before we are done with the menu, we must change the default settings and change the Windows entry so that it automatically resets the default to Ubuntu. This will allow us to simply reset the computer from Windows and have Ubuntu load as it normally would.

To do this, look for the line that starts with default, near the beginning of the file. Change it so that it says
default saved
Warning: RAID users should heed the warning in this file

Next, we must change the line savedefault under the Windows entry to savedefault 0, where 0 is the number of the Ubuntu entry. Your number may be different, but likely not. Save the file, close gedit, and move on to the next step. Now, we need to create a script that will set the default operating system to Windows, and then reset the computer. First, we need to allow normal users to run the grub-set-default and reboot commands, which normally requires sudo. To do this, run sudo visudo Add the following lines to the bottom of the file -

ALL ALL= NOPASSWD: /usr/sbin/grub-set-default
ALL ALL= NOPASSWD: /sbin/reboot

Warning: If visudo complains about syntax errors when you exit the program, do not ignore them! Go back and look at the file and see what went wrong. If you mess up the sudoers file you might not be able to run sudo at all, which you'll need a LiveCD to fix. WARNING: This will allow any user on your computer to reboot the computer. Normally, any user can use the menus to do this, but if you allow users to remotely connect to your computer you may want to consider the idea that any of them could reset your computer at any time, so this might not be something you want to do. Now, run gedit reset-to-windows.sh, and put the following lines into it, replacing 5 with the number of the Windows entry in the GRUB menu:

 
#!/bin/sh

sudo grub-set-default 5
sudo reboot

Save this file, and make it executable and system-wide by doing the following:

 chmod a+x reset-to-windows.sh
sudo chown root reset-to-windows.sh
sudo mv reset-to-windows.sh /usr/bin

Great! Only one last step: right click on the desktop and select Create Launcher. Name this launcher Switch to Windows, and set the command to /usr/bin/reset-to-windows.sh. Select an icon if you'd like. Now, you can use this icon to reset the computer, and it will come back up in the Windows operating system. Later, if I can get my hibernate to work, I will show you how to use this technique to hibernate Ubuntu instead of resetting.