Программа для запуска windows на ubuntu

Если вы считаете, что GIMP не ровня Photoshop, и не можете жить без офиса от Microsoft.

5 способов установить Windows-программы на Linux

1. Wine

Название Wine расшифровывается как Wine Is Not an Emulator. Это своего рода прослойка между приложениями Windows и системой Linux. Он позволяет устанавливать и запускать многие популярные Windows-программы и работать с ними так, как будто это родные приложения Linux.

Чтобы установить Wine, воспользуйтесь соответствующей командой.

1. Ubuntu, Debian, Mint:

sudo dpkg --add-architecture i386

wget -nc https://dl.winehq.org/wine-builds/Release.key

sudo apt-key add Release.key

sudo add-apt-repository "deb https://dl.winehq.org/wine-builds/ubuntu/ artful main"

sudo apt-get update

sudo apt-get install --install-recommends winehq-stable

2. Fedora:

sudo dnf install winehq-stable

3. openSUSE:

sudo zypper install wine

4. Arch, Manjaro:

sudo pacman -S wine

Когда Wine установлен, откройте его через ваше меню приложений или с помощью команды winecfg. При первом запуске Wine может попросить установить некоторые дополнительные пакеты — позвольте ему это сделать. После этого все Windows-программы формата EXE ассоциируются в системе с Wine.

Теперь скачайте установщик нужного вам приложения Windows, найдите папку с ним в вашем файловом менеджере и откройте файл. Либо введите команду wine путь_к_приложению.

Windows-приложение запустится и будет работать так же, как и всегда. Если вы открыли установочный файл, начнётся установка приложения — как в Windows. Если программа не требует установки, вы сможете начать работать с ней немедленно.

Не все приложения могут быть установлены и запущены в Wine, хотя количество поддерживаемых впечатляет. Полный список можно посмотреть здесь.

2. Winetricks

Wine — неплохой инструмент, однако интерфейс у него оставляет желать лучшего. Если вы намучились с этой программой, но так и не добились результата, попробуйте Winetricks. У неё приятный графический интерфейс для установки и запуска Windows-приложений, в котором куда проще разобраться новичку.

Установить Winetricks можно так:

1. Ubuntu, Debian, Mint:

sudo apt-get install winetricks

2. Fedora:

sudo dnf install winetricks

3. openSUSE:

sudo zypper install winetricks

4. Arch, Manjaro:

sudo pacman -S winetricks

Winetricks позволяет установить различные версии Microsoft Office и Photoshop, плеер foobar2000 и множество других программ. Поддерживаются и такие популярные игры, как Call of Duty, Call of Duty 4, Call of Duty 5, Biohazard и Grand Theft Auto: Vice City. Некоторые программы загружаются автоматически, для других будет предложено вставить установочный носитель. И, естественно, вы можете открывать собственноручно скачанные файлы формата EXE.

3. PlayOnLinux

PlayOnLinux — ещё один удобный инструмент для запуска Windows-приложений в Linux. Как и Winetricks, он обладает простым графическим интерфейсом. Но, в отличие от него, PlayOnLinux позволяет вам выбирать конкретную версию Wine для того или иного приложения. Это полезно, если какая-то из нужных вам программ некорректно работает с новыми версиями Wine. В целом PlayOnLinux выглядит куда симпатичнее и практичнее, чем Winetricks.

Чтобы установить PlayOnLinux, выполните в терминале одну из следующих команд:

1. Ubuntu, Debian, Mint:

sudo apt-get install playonlinux

2. Fedora:

sudo dnf install playonlinux

3. OpenSUSE:

sudo zypper install playonlinux

4. Arch, Manjaro:

sudo pacman -S playonlinux

В меню установки PlayOnLinux можно найти множество предварительно сконфигурированных приложений и игр, которые вы можете загрузить и установить парой щелчков. Кроме того, PlayOnLinux можно скармливать собственные EXE-установщики. Приложение заботливо выберет за вас версию Wine и создаст значок установленной программы на рабочем столе.

4. Crossover

Изредка бесплатные PlayOnLinux и Winetricks не справляются с установкой какого-нибудь особенно привередливого приложения. В таком случае вам может помочь Crossover. Эта программа очень проста в использовании. Вам достаточно указать, какое приложение вы хотите установить, и подсунуть Crossover установочный файл. Всё остальное будет сделано за вас.

Лицензия Crossover на год стоит 39,95 доллара, но у программы есть и бесплатная пробная версия. Рекомендуется сначала установить необходимое вам приложение в ней, чтобы убедиться, что оно работает корректно.

Crossover →

5. VirtualBox

Если ваше приложение упорно отказывается запускаться в перечисленных выше программах, можно пойти на решительные меры и установить его в виртуальной машине. Учтите, что она отнимает гораздо больше системных ресурсов, поэтому использовать её стоит в крайних случаях.

Для запуска приложения в виртуалке вам понадобится установочный образ Windows в формате ISO. Загрузите и установите VirtualBox, создайте в нём виртуальную машину, укажите ей ISO с Windows, а затем просто установите систему как обычно.

Неоспоримый плюс виртуальной машины — в ней работает полноценная операционная система, а значит, запустится абсолютно всё. Минус — прожорливость в плане системных ресурсов, да и тратиться на лицензию Windows для виртуалки накладно.

VirtualBox →

Читайте также 🧐

  • 6 задач, с которыми Linux справляется лучше, чем Windows
  • Как реанимировать Windows и сохранить данные с помощью live-дистрибутива Linux
  • Как обмениваться файлами по воздуху между Windows, macOS, Linux, iOS и Android

Contents

  1. Introduction
  2. Installing Wine

    1. Ubuntu versions of Wine (Recommended)
    2. Newer versions of Wine (Not Recommended)
  3. Initial Setup
  4. Installing Windows Applications With Wine
  5. To start/run Windows programs using Wine
  6. Uninstalling Wine Applications
  7. Configuring Wine

    1. Adding CD and DVD drives to Wine
    2. Adding applications to the menu
    3. Changing application specific settings

      1. Using Windows Themes/Skins In Wine
      2. Color Scheme
      3. Using Theme/Skins
    4. Fullscreen issues with overlapping Panel
  8. Instructions for using wine over remote X11 sessions
  9. Instructions for specific Windows programs
  10. Creating file associations
  11. Troubleshooting

    1. Error: Cannot change screen BPP from 32 to XX
    2. ‘dhtmled.ocx’ is missing or invalid
    3. Screen flickers to black when starting an application
  12. Related Wiki Pages

Introduction

  • Wine allows you to run many Windows programs on Linux. Its homepage can be found at WineHQ.org. They also have an Ubuntu page with installation and build advice.

  • If you are running the latest release of Wine which is v1.6, you can get further assistance on the #winehq IRC channel on irc.freenode.net. First,

  • please consider if you really need to run the specific Windows program because in most cases, its equivalent can be provided by an OpenSource program. Also, consider using Qemu instead of Wine if you need a complete Windows installation.

Installing Wine

Ubuntu versions of Wine (Recommended)

  • open the software center
  • Type wine and install ‘wine’

Newer versions of Wine (Not Recommended)

The Wine Ubuntu repository provides the newest development versions of Wine. Follow these steps to add the repository to your software sources:

  1. Open a terminal and run these commands:
  1. wget https://dl.winehq.org/wine-builds/winehq.key

  1. sudo apt-key add winehq.key

  2. sudo apt-add-repository ‘https://dl.winehq.org/wine-builds/ubuntu/’

Note, however, that these are development packages (ie beta software), and may suffer from regressions and other problems not present in the stable version of Wine included with Ubuntu. You should avoid using them unless the current stable version of Wine does not support or is incompatible with the application you wish to use.

If you are using an older version of Wine and want support from WineHQ, you will need to upgrade to the latest development version first. If you do this, however, please file associated Wine bugs at winehq’s Bugzilla Page rather than in Launchpad.

Initial Setup

Before using Wine, it is necessary to create the fake C: drive where your Windows applications will be installed. To do this, enter the following command into the terminal: You may find the terminal by going to Applications -> Accessories -> Terminal

winecfg

You also have the option of configuring Wine via the Configure Wine option in the Applications-> Wine menu.

This will create a hidden folder (.wine) in your home directory containing the fake C: drive as well as registry files similar to those used in Windows. Once this directory is created, the Wine Configuration Window will appear. This window will allow you to customize a variety of settings for Wine, including which Windows Version that is emulated, drive mappings, DLL overrides, as well as application specific settings. Click the Ok button to close the window.

Installing Windows Applications With Wine

To install Windows applications using Wine, follow these instructions:

  1. Download the Windows application from any source (e.g. download.com). Download the .EXE (executable).
  2. Place it in a convenient directory (e.g. the desktop, or home folder).
  3. Open the terminal, and cd into the directory where the .EXE is located.

  4. Type wine the-name-of-the-application.extension (e.g. wine realplayer_installer.exe).

This will start the .EXE using Wine. If it is an installer, it should then run as it would in Windows. If the application asks for a directory to install the application to, select put it under C:\Program Files.

To start/run Windows programs using Wine

After installing an application using the directions above, those applications can be started and used by entering wine programname.exe (e.g. wine realplayer.exe). When done, close the application as one would normally. You must run the installed executable, which will by default be in the virtual Windows drive created by Wine, at ~/.wine/drive_c. Generally programs will install themselves somewhere under Program Files inside the virtual Windows drive, following Windows conventions.

You can also use the Wine file browser, by running winefile in a terminal. Clicking the C:\ button in the toolbar will open a window where you can browse the virtual Windows drive created in .wine. Doubleclicking an executable in the Wine file browser will run it in Wine.

Instead of having to always enter the terminal or use the Wine file browser, you may also create a desktop icon, and start a Wine application using that icon. To do this, right click on the desktop and select «Create a launcher.» If you wish, select an icon from the list of available icons (or browse to an icon you would like to use), fill out other information that is requested (Name, generic name, etc.). For the command, type in wine the-location-of-the-program.exe (e.g. wine /home/john/.wine/realplayer.exe). The most important part of creating a launcher is the command, the generic name is not as important. Just make sure you de-select «Run in terminal.» This completes the process.

In some cases the application requires to be running from a certain location. In this case create launcher with command

sh -c "cd /home/USER/.wine/drive_c/Program Files/Appdir/; wine /home/USER/.wine/drive_c/Program Files/Appdir/game.exe"

Of course you will need to replace USER and Appdir with the proper data.

If you desire to have an icon on the panel, create a launcher on the panel of choice. Do this by right-clicking the panel, selecting «Add to Panel,» and selecting «Custom Application Launcher.» This will ask you for the same information as before.

Alternatively, to make life easier, you can set it so wine will automatically open .exe files files for you — instead of using the Wine File to locate the file each time. To do so, right click on the .exe file, select Properties, and then select the Open With tab. Click the ‘Add’ button, and then click on ‘Use a custom command’. In the line that appears, type in wine, then click Add, and Close. Now all .exe files will be automatically opened by Wine, so you can use Nautilus to browse and open them instead of the Wine File.

Uninstalling Wine Applications

Open up a terminal window and type the command below.

wine uninstaller

What this will do is open up a program similar to the Windows add/remove programs control panel, allowing you to uninstall applications from a Wine installation. Running uninstall programs directly via Wine should also work normally. Alternatively, you could also simply delete the folder of the application. However, as when done in Windows, this method will be unclean and will not remove the program’s configuration from the Wine registry like using an uninstaller will.

Configuring Wine

On the command line or in Run Application, type winecfg

Adding CD and DVD drives to Wine

Go to the drives tab in winecfg. Hit the Autodetect button.

If you find that this does not work correctly for you, then follow these instructions:

  1. Run

    winecfg

  2. Navigate to the drives tab

  3. Click on Add…

  4. In the path bar, type

    /media/cdrom

  5. Click Show Advanced button below the Browse… button and set the Type to

    CD-ROM

  6. Click OK

If you have more than one CD/DVD device you will need to identify each one differently. Use /media/cdrom0 for the first CD/DVD device, /media/cdrom1 for the second one, and so on. If in doubt, type the following command in your terminal.

ls -la ~/.wine/dosdevices/

What this command will do is check your CD/DVD device details after Wine is installed.

It is good procedure before setting up the menu entry to launch the new Windows program from the command line to make sure the program runs properly. To do this type this command in the terminal.

wine "C:\PATHTOPROGRAM\Program.exe" 

For example the command would be wine «C:\Program Files\World of Warcraft\WoW.exe» Once you are satisfied that you have the correct details, use the normal menu editing process to add a new entry. When you get to the Command field of the entry editor be sure to copy and paste the line you used to launch the program from the terminal. Finish and save the new entry. Test to make sure the new Windows program loads via the menu.

Changing application specific settings

  1. Type this command into your terminal.

    winecfg

  2. Click on Add Application…

  3. Navigate to where the .exe is and choose that program
  4. The dropdown at the bottom allows you to choose which version of Windows Wine should emulate. Also, any changes to the Libraries and Graphics tabs will only affect the chosen application in the Applications tab.

Using Windows Themes/Skins In Wine

Color Scheme

You can change the wine color scheme to closely match the default Ubuntu colors with this Terminal command.

gedit ~/.wine/user.reg

You may also want to create a backup copy in your Home folder with this command via terminal.

cp ~/.wine/user.reg ~/

Replace the [Control Panel\\Colors] section with

[Control Panel\\Colors] 1176981676
"ActiveBorder"="239 235 231"
"ActiveTitle"="203 133 61"
"AppWorkSpace"="198 198 191"
"Background"="93 77 52"
"ButtonAlternativeFace"="200 0 0"
"ButtonDkShadow"="85 85 82"
"ButtonFace"="239 235 231"
"ButtonHilight"="255 255 255"
"ButtonLight"="255 255 255"
"ButtonShadow"="198 198 191"
"ButtonText"="0 0 0"
"GradientActiveTitle"="239 235 231"
"GradientInactiveTitle"="239 235 231"
"GrayText"="198 198 191"
"Hilight"="246 200 129"
"HilightText"="0 0 0"
"InactiveBorder"="239 235 231"
"InactiveTitle"="239 235 231"
"InactiveTitleText"="255 255 255"
"InfoText"="0 0 0"
"InfoWindow"="255 255 166"
"Menu"="239 235 231"
"MenuBar"="239 235 231"
"MenuHilight"="246 200 129"
"MenuText"="0 0 0"
"Scrollbar"="239 235 231"
"TitleText"="255 255 255"
"Window"="255 255 255"
"WindowFrame"="0 0 0"
"WindowText"="0 0 0"

Using Theme/Skins

Wine has basic handling for Windows theme/skin files in the «msstyles» format. There is a large number of these themes on Deviant Art. To use these you must make a folder in Wine’s virtual Windows drive, then tell Wine to use the theme.

Firstly go into Wine’s virtual drive, which is usually «.wine/drive_c» in your Home folder (this is hidden, you may need to select View->Show Hidden Files in the file manager). Inside this folder go into the «windows» folder then make a new folder in there called «Resources». Enter this new folder and make a new folder called «Themes». Inside here you should make a folder for each theme you want, and put the files ending in «.msstyles» directly into them. For example, the full path to a theme file called sample.msstyles might be «/home/username/.wine/drive_c/windows/Resources/Themes/Sample/sample.msstyles».

Next you need to tell Wine to use your theme, so once again run this command in the terminal.

winecfg

In the configuration window select the tab Desktop Integration and un-check out the Theme: box, which should now have your theme in it’s menu. After selecting the theme click Apply at the bottom to see how it looks (they don’t always display properly), then if you are happy click ok and you’re done!

Fullscreen issues with overlapping Panel

Sometimes the Panel overlaps your fullscreen application you’re running in wine. If you are running Visual Effects, the first solution you should try is to turn those off: Go to System -> Preferences -> Appearance, and click the Visual Effects tab. Select None, and your screen will flash. Try your full-screen application again. You may re-enable Visual Effects afterwards — just don’t forget to turn them back off when you want to run that application again!

If that does not work, then you will have to turn off the panels prior to running the application and restarting it afterwards, until a better workaround can be found. In Ubuntu the commands are gnome-session-remove gnome-panel and gnome-panel & respectively. In Xubuntu I understand they are killall xfce4-panel and xfce4-panel.

Instructions for using wine over remote X11 sessions

If you’re (trying) to use wine over a forwarded X11 session (ie Ubuntu is on one computer; you’re connected to it by ssh or another connection and you already have X11 forwarding set up to display regular Ubuntu applications on your remote computer) and the windows opened by wine are lacking fonts etc, the answer is here

Instructions for specific Windows programs

Some Windows programs have been tested on Ubuntu. They are listed below:

  • DVDShrink

  • FlashPlayerStandalone

  • WorldofWarcraft

Also, see Wine’s Application Database at http://appdb.winehq.org/ or http://wine-review.blogspot.com/

Creating file associations

If you want certain files to open in a windows application by clicking on them, the best way is to create a script. For example I want Adobe Flash project files (*.fla) to open in Adobe’s Flash editor if I double click it.

You can for example create a file using this terminal command.

gedit ~/.wine/Flash\ 8

Now paste the following example script in it, save and close gedit.

Example script:

 #!/bin/sh

QUICKPARLOCATION="c:\\Program Files\\Macromedia\\Flash 8\\Flash.exe"
PARAM=`winepath -w "$*"`
wine "$QUICKPARLOCATION" "$PARAM"
exit 0

Make sure the file is executable with this command.

chmod +x ~/.wine/Flash\ 8

After you completed this go to an *.fla file right click it, properties, go to the “open with” pane, click add, add this line into your terminal and select the radio button.

'/home/<yourusername>/.wine/Flash 8'

Now if everything went ok, you can doubleclick the file and it will be openend in Flash 8.

Troubleshooting

Error: Cannot change screen BPP from 32 to XX

In some cases (mostly games) the application does not start and you get error: Cannot change screen BPP from 32 to 16 (or some other number).

In such case editing xorg.conf and CTRL-ALT-Backspace helps as is described on http://ubuntuforums.org/showthread.php?t=649283

‘dhtmled.ocx’ is missing or invalid

It seems that in Ubuntu Karmic Wine(v1.0.1) registry isn’t configured correctly to use ActiveX component dhtmled.ocx. On some application this can cause error like this: «Component ‘dhtmled.ocx’ or one of it’s dependencies not correctly registered: a file is missing or invalid». So we must tell Wine where to find this file.

1. Download registry file:

  • cd ~ wget http://jwc.sourceforge.net/other/ieslinux-dhtmledit.reg

2. Open regedit:

  • wine regedit.exe

3. Import the downloaded registry settings

  • file->import registry file->open ~/ieslinux-dhtmledit.reg

Screen flickers to black when starting an application

This is sometimes caused by a problem with the video driver not handling XRandR well. To see if this is actually a problem with XRandR, in a console, run:

xrandr

If your screen blanks while running that command, then this might be the issue. To work around this issue, Wine can be configured to not use XRandR. To do so:

  1. Start Wine’s Registry Editor.
  2. Navigate to «HKEY_CURRENT_USER\Software\Wine\X11 Driver». You may need to create X11 Driver.
  3. Create a new key called «UseXRandR» and set it to «N».

See Wine Bug #15214 and Wine Wiki page UsefulRegistryKeys.

  • Games

  • AdobePhotoshop — A guide for running CS4 under WINE.


Время на прочтение
7 мин

Количество просмотров 580K

Введение

Статья посвящена Wine и всем аспектам его использования. В сети находится очень
много информации, есть различные руководства по настройке и многое другое. Я
постараюсь объединить все для того чтобы любой человек смог достичь
максимального успеха, в пределах своих способностей и конечно возможности
программы. Итак — начнем.

Wine — это отдельная реализация Windows API, а не эмулятор, как большинство
думают. Не единожды повторялось, но и здесь будет уместно. Это и делает проект
уникальным и интересным для пользователей различных систем, открывает различные
пути для реализации своих идей. Уникальность заключается в том, что с помощью
этой программы можно запускать Windows приложения в Ubuntu и в других
Linux системах, а также во FreeBSD и в Mac OS X. Правда и тут есть
свои «подводные камни». Некоторые думают что будет легко перейти с одной
системы на другую, в данном случае мы рассматриваем Windows и Linux.

Заблуждение заключается в том что люди думают что у них получиться запустить из
под Wine различный софт, к которому они привыкли и им удобно в нем работать.
Как не крути просто так ничего не бывает. Чтобы заработал наш любимый софт под
Wine нужно попотеть, перечитать кучу руководств и взвесить этот объём
информация. Конечно не совсем софтом придется «пыжиться», но готовым надо быть ко всему. Проект Wine развивается очень быстро, но до стабильной работы ему
очень далеко. Но думаю что в скором будущем весь основной софт, а также игры
будут работать на нем стабильно.

Установка Wine

Первый вопрос человека который только что перешёл на Linux (в нашем случае
Ubuntu): «Как я буду запускать программы из Windows?». Он начинает поиск на эту
тему и естественно натыкается на Wine.
Второй вопрос: «Как его поставить?». Есть два способа: Поставить из
официальных репозиториев или скомпилировать самому из исходников. Мы рассмотрим
оба варианта.

Вариант 1: Установка из репозитория.

Тут все очень просто. Идем в Приложения // Стандартные // Терминал:

sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine1.3

Ждем завершения установки…
Всё! Wine установлен и можно пробовать устанавливать игры и программы.

Вариант 2: Компилирование из исходников.

1.Скачиваем исходники с официального сайта, там они присутствуют. В моё случае
это Wine 1.3.11 (http://sourceforge.net/projects/wine/files/Source/wine-1.3.11.tar.bz2/download).

2. Распаковываем исходники.
Дальше вводим в терминале следующие команды:

переходим в директорию, в которую был распакован архив с исходными текстами:

cd wine-1.3.11/

Перед компиляцией надо включить поддержку OpenGL. Если мы этого не сделаем
приложения которым нужен OpenGL работать не будут. В терминале:

gedit tools/wineinstall

Находим строку, начинающуюся с CONFARGS=, и после вписываем в нее нужные
параметры сборки. В нашем случае строка будет выглядеть так:

CONFARGS="--with-opengl --disable-debug --disable-trace"

Получаем зависимости:

sudo apt-get install auto-apt checkinstall
sudo auto-apt -y run ./configure

Собираем:

make

Устанавливаем через создание пакета, вместо make install

sudo checkinstall

Всё. Ждем окончания установки.

Есть ещё промежуточный вариант, для джедаев на debian-based дистрибутивов. Кратко:

apt-get source wine1.3
sudo apt-get build-dep

Теперь самое интересное: скачиваем нужную версию wine с официального сайта, распаковываем, и копируем туда директорию debian из директории с исходниками оригинального пакета wine1.3. Делаем

debuild

и у нас появляется *.deb пакет для убунты/дебиана со всеми нужными патчами для дистрибутива, почти как из официального репозитория, но только новая версия. К тому же её ещё потом можно спокойно удалить так же через apt-get.
Рассмотрим плюсы и минусы каждого из вариантов.

Вариант 1.
Плюсы:
1. За нас уже все собрано и пыжиться не надо, все уже готово к употреблению.

Минусы:
1. Мы не сможем применить патч, например для улучшения работы какой нибудь игрушки.
2. Не стабильная работа на некоторых видеокартах.

Вариант 2.
Плюсы:
1. Возможность применить патчи для улучшения работы
2. Стабильная работа с не стабильными драйверами видеокарт.

Минусы:
1. Нет меню в Приложениях, что не удобно. Приходиться все делать из консоли,
выходить в настройки Wine например.
2. Процесс установки слишком долгий, зависит от мощности вашего компьютера.
1. Нет меню в Приложениях, что не удобно. Приходиться все делать из консоли, выходить в настройки Wine например.»

Можно самому добавить через Система — Параметры — Главное меню

Я отдаю предпочтение второму варианту. Wine установленный таким образом работает
лучше, чем установленный из репозиториев. Но это лишь мое маленькое ИМХО.

Установка программ и игр

Сперва мы идем на appdb.winehq.org Сверху, в поисковике вбиваем
название игры или программы и смотрим что там написано. Обычно там описаны
тесты на различных системах, рекомендации для стабильной работы и многое другое.

Если программа работает без проблем, значит с чистой душой её устанавливаем
простым кликом. Если это какая нибудь серьёзная игра или программа и без
шаманства с бубном не обойтись — значит надо создавать отдельный префикс* для
наших танцев. * Все файлы вайна хранятся в префиксе, или ещё называемом бутылкой (по анологии с вином/wine). Там внутри этой бутылки имеются все файлы диска C, реестр, индивидуальные настройки и так далее.

Таких бутылок может быть сколько угодно.

Просто может быть какой-то софт, который ведёт себя очень капризно под вайном и для него нужны какие-то костыли, которые будут мешать нормальной работе других приложений вайна. Тогда просто этот софт ставим в отдельную бутылку (префикс) и любые настройки не будут влиять на другие программы.

Когда вайн запускается в первый раз без указанного префикса, используется ~/.wine. Если префикс не существует вайн создаст его и наполнит дефолтным содержимым создаст и наполнит файлами каталоги C:\windows, C:\Program Files, C:\users. Плюс будет создан чистый реестр.
Идем в наш домашний каталог и создаем новую директорию. Например .wine2.
Дальше идем в терминал и вводим:

WINEPREFIX="/home/username/.wine2/" winecfg

Всё. Отдельный префикс создан. Там хранятся различные конфигурации реестра и сами программы.
Установку программы также производим через консоль.

WINEPREFIX="/home/username/.wine2/" wine /media/DVD/setup.exe

Идет процесс установки и самое главное в отдельный префикс.
Потом мы запускаем уже установленную программу, также из консоли и смотрим вывод.

В выводе могут быть ошибки, о том что нет нужных компонентов и библиотек. В
установке недостающих компонентов нам поможет winetricks (см. ниже)

Что это дает? Это дает стабильную работу приложений в своем префиксе, если
масса программ будет работать в одной префиксе, он рано или поздно засориться
что приведет к сбою других программ. Поэтому нужно использовать отдельные
префиксы, если не хотите все настраивать по много раз.

Winetricks

В правильной настройке префикса нам поможет winetricks.
Winetricks — это скрипт, который устанавливает различные компоненты, которые
требуются для работы приложения, например DirectX, Vcredist и многое другое.
Как это скрипт работает? Он скачивает библиотеки и компоненты с
Microsoft-овских ресурсов. Именно так, и не как по другому. Зачем этот скрипт
нужен? Это очень упрощает работу с Wine-ом. Без скрипта мы бы сами лазили и
искали нужные компоненты, а тут уже все сделано, надо только поставить галочку
и нажать «Установить» Также этот скрипт помогает редактировать реестр,
вписывать туда различные ключи. И помимо этого в winetricks есть много настроек
и функций.

Для ознакомления с ним просто введите в терминале winetricks

Редактирование реестра

В терминале вводим:

regedit

Мы в реестре. Редактировать нам ничего не надо, мы будет только добавлять.

Идем в HKEY_CURRENT_USER/Software/Wine/Direct3D.

Если каталога Direct3D нет, то не отчаиваемся. Я это пишу чтобы читатель понял
где-то надо редактировать или добавлять.

В терминале:

winetricks ddr=opengl orm=fbo glsl=disabled videomemorysize=1024
(1024 меняете на свое)

Все эти параметры появиться в реестре. Это можно посмотреть в папке указанной выше.

Что это дает? Это улучшает производительность в играх, скорость и вообще игры
работают от этого лучше, но это только для игр.

PlayOnLinux

Также существует PlayOnLinux. Это отдельная программа, которая использует Wine,
но там более все автоматизированно и настроено. Программа сама скачает нужный
Wine, установит компоненты и создаст отдельный префикс. Но это не значит что
все будет идеально работать. Может вообще не работать. Так что я отдаю свое
предпочтение обычному Wine, ручной настройке и работе собственного мозга, а не
автоматизированной программе.

Плюсы:
Все автоматизированно и нам по сути делать ничего не надо.
Можно держать несколько версий Wine и применять их для различных префиксов.
Программа сама создает префиксы.

Минусы:
Все что делает программа, устанавливает и скачивает предугадать невозможно.
Все что делает программа можно сделать самому, ручками, это + к знаниям человека.
Программа «Робот» никогда не сравнится с человеческим мозгом.

Монтирование образов CD/DVD-дисков

В Windows есть для этого утилита под названием Daemon-Tools. Это очень удобная
и не заменимая утилита. У человека возникает вопрос: Есть ли аналог этой
чудо-утилиты? Ответ: Есть и на много лучше Windows утилиты. Называется она
Cdemu. Для её установки нам требуется ввести всего лишь три команды:

sudo add-apt-repository ppa:cdemu/ppa
sudo apt-get update
sudo apt-get install cdemu-daemon cdemu-client gcdemu

Добавляем аплет на панель, указываем путь к образу и радуемся жизни. Не каких
проблем не будет и Wine будет отлично определять образ. Если аплета не находим не торопитесь перезагружаться.
В терминале вводим команды:

sudo service cdemu-daemon start

Если сервис не стартует при старте системы («The daemon is configured not to start at system startup»), можно исправить так:

sudo update-rc.d cdemu-daemon enable

Запуск игр в отдельном Х-сервере

Этому можно посветить целую книгу, но я остановился на одном способе, которым всегда пользуюсь:

Переходим в виртуальный терминал:

Ctrl + Alt + F1
login: ******
password: ******

Запускаем вручную новую копию X-сервера:

xinit -- :2
wine путь/папке/c/игрой/game.exe

Прирост от этого не большой, но лично мне этого хватает. Ещё раз повторю:
способов запуска в отдельном х-сервере много и каждый человек волен сам выбирать.

Заключение

Все эти советы, азы, которые должен знать каждый человек который хочет
использовать Wine для достижения своих целей. Все остальное в ваших руках. Если
вы хотите достичь цели не смотря ни на что, а надежда уже уходит, не
отчаивайтесь никогда, ибо решение может находиться у вас «перед носом». Усидеть
на двух стульях возможно, но для этого нужно желание и стальные нервы. Желание
— тысяча возможностей, не желание — тысяча причин.

Данный материал написан для «Первого конкурса русскоязычных статей для ОС
Ubuntu» (konkurs.ubuntu.ru)
Автор статьи Владимир Качармин aka rootboot
Контакты: Skype root.boot2, email verda.info@gmail.com

Операционные системы Linux обладают большим выбором программного обеспечения: всё необходимое ПО можно установить через Терминал. Однако может возникнуть потребность в специализированной программе, которая создана исключительно для ОС Windows. Но как запустить такую программу на другой операционной системе и работать с ней? В этом поможет Wine.

О том, что такое Wine и как установить его на Ubuntu, расскажем в статье.

Что такое Wine

Wine (Wine Is Not Emulator) — это приложение, которое относится к категории свободно распространяемого программного обеспечения. Оно позволяет устанавливать программы, предназначенные для ОС Windows, на UNIX-подобные системы.

Приложение Wine подходит для большинства Windows-программ: например, редакторов для работы с файлами, систем управления базами данных и компьютерных игр. Примерный список ПО, которое можно запустить с помощью Wine:

  • Adobe Animate
  • Adobe Photoshop
  • Microsoft Office
  • Total Commander
  • Lingvo
  • 1C:Предприятие
  • Гарант
  • КонсультантПлюс
  • Final Fantasy XI Online
  • StarCraft
  • Warcraft III
  • World of Warcraft
  • Counter-Strike: Source
  • EVE Online
  • Half-Life 2
  • Magic: The Gathering Online
  • The Sims 3 и др.

Создатели Wine регулярно обновляют приложение. Например, в последнем обновлении (версия 8.0) был добавлен следующий функционал:

  • поддержка модулей формата PE;
  • возможность создавать смешанные библиотеки Windows и Unix в формате ELF;
  • поддержка вспомогательных библиотек Direct3D;
  • встроенный фильтр чтения ASF;
  • актуализация библиотек Faudio, LCMS2, LibJPEG, LibMPG123, LibPng, LibTiff, LibXml2, LibXslt, Zlib и др.;
  • шифрование RSA и алгоритм подписи RSA-PSS;
  • начальная версия API для автоматизации пользовательского интерфейса;
  • поддержка C++11 для имен функций и др.

Полный список можно узнать на официальном сайте Wine.

Как работает Wine на Linux: когда вы запускаете приложение для Windows, оно направляет API-вызовы к этой операционной системе. Если программа запускается на Linux, Wine преобразовывает API-вызовы к Windows в системные вызовы ядра Linux. Благодаря этому приложение работает стабильно.

Какие особенности Wine стоит учесть при установке на Ubuntu

Приложение Wine обладает рядом преимуществ, таких как:

  • официально бесплатное ПО,
  • нет необходимости в покупке лицензии Windows,
  • высокий уровень интеграции программ для Windows в Ubuntu,
  • создание виртуальной машины не требуется,
  • экономия времени, так как вы минуете этап загрузки виртуальной машины.

Однако Wine имеет и несколько недочетов, например:

  • подходит только для запуска Windows-приложений;
  • не все программы будут работать одинаково стабильно. Список программ, которые полностью адаптированы под Wine, можно посмотреть на официальном сайте;
  • отсутствует поддержка ActiveX;
  • вид приложения может отличаться от оригинального.

Wine совместим с большинством операционных систем семейства Linux. Мы расскажем о том, как установить его на Ubuntu.

Как установить Wine в Ubuntu

Для установки Wine:

  1. Откройте Терминал с помощью сочетания клавиш Ctrl + Alt + T.
  2. Обновите репозитории Ubuntu, поочередно выполнив команды:

    sudo apt update
    sudo apt upgrade
  3. Если вы планируете работать с приложениями для ранних версий Windows, добавьте поддержку 32-битной архитектуры:

    sudo dpkg --add-architecture i386

  4. Выполните команду, чтобы установилась последняя версия Wine:

    sudo apt -y install wine

Как настроить Wine в Ubuntu (Linux)

Для настройки Wine используется функционал Winecfg. Чтобы открыть его:

  1. Откройте Терминал с помощью сочетания клавиш Ctrl + Alt + T.
  2. Запустите Wine, выполнив команду:

    winecfg
  3. В открывшемся окне выберите необходимую версию Windows. Затем нажмите OK:

Как запустить Wine

Для запуска Wine используется скрипт Winetricks. Чтобы открыть программу:

  1. Откройте Терминал с помощью сочетания клавиш Ctrl + Alt + T.
  2. Запустите Wine, выполнив команду:

    winetricks
  3. В открывшемся окне выберите действие, которое необходимо выполнить. Затем нажмите OK.

Как узнать версию Wine

  1. Откройте Терминал с помощью сочетания клавиш Ctrl + Alt + T.
  2. Выполните команду:

    wine --version

В выводе отобразится версия Wine:

Как удалить Wine в Ubuntu

  1. Откройте Терминал с помощью сочетания клавиш Ctrl + Alt + T.
  2. Запустите удаление Wine:

    sudo apt purge wine

  3. Удалите оставшиеся файлы. Для этого поочередно выполните команды:

    rm -r ~/.wine
    rm -r ~/.config/menus/applications-merged/wine*
    rm -r ~/.local/share/applications/wine
    rm -r ~/.local/share/desktop-directories/wine*
    rm -r ~/.local/share/icons/????_*.xpm

    Если при попытке удаления на экране отобразится ошибка с текстом Нет такого файла или каталога — файл удален при выполнении шага 2.

Готово. Теперь вы знаете, как пользоваться приложением Wine и адаптировать большую часть Windows-приложений под Linux.
Последние версии популярных операционных систем Linux доступны на виртуальных выделенных серверах (VPS/VDS) от SpaceWeb.


Download Article

Use Wine to install Windows software and games on Ubuntu Linux


Download Article

  • Installing Wine
  • |

  • Installing Windows Apps
  • |

  • Running Windows Apps
  • |

  • Video
  • |

  • Q&A
  • |

  • Tips

Whether you want to use Adobe Photoshop, play World of Warcraft, or use Microsoft Word 365 on Ubuntu, it’s easy to install Windows programs using Wine. There are two ways to install Wine—through the Ubuntu Software Center, and through the developer’s repository. This wikiHow article will walk you through installing Wine on Ubuntu, show you how to install and run Windows programs, and give you lots of helpful tips along the way.

Things You Should Know

  • You can easily install Wine through the Software Center, but it won’t be the latest version. For the latest version, install directly from the Wine developers.
  • Once you’ve installed Wine, you can download a Windows application from the web and double-click the .exe file to install.
  • Not all Windows software works flawlessly on Wine, but lots of popular apps and games do.
  1. Image titled Install Windows Programs in Ubuntu Step 1

    1

    Decide how you’ll install Wine. Ubuntu recommends that you install the Ubuntu-specific version of Wine straight from their repositories in the Software Center.[1]
    But, the developers of Wine recommend that you install the latest version of Wine from their repositories (WineHQ).[2]
    So, which should you choose?

    • The Software Center version is always going to be older than the version from WineHQ. However, if you want a simpler install process that doesn’t require typing any commands, you can quickly install a stable version of Wine through the Software Center.
      • With this installation method, Wine will only update if there’s a newer version available the next time you update Ubuntu itself. You won’t be able to update Wine separately.
      • To install the Ubuntu package, just open Software Center, type wine, and click Install. Then, skip down to step 8 to perform the final configuration steps.
    • If you want the latest Wine release with frequent updates, you’ll want to install Wine from WineHQ. It’s not hard to install, but there are a few more steps than using Software Center. We’ll walk you through them!
  2. Image titled Install Windows Programs in Ubuntu Step 2

    2

    Determine your system architecture. If you want the latest version of Wine from WineHQ, your first task is to find out if your system is 32-bit or 64-bit. If your system doesn’t support 32-bit programs, there will be an extra installation step. An easy way to check is to open a Terminal window and run the command lscpu.[3]

    • Once you run the command, check the value of «CPU op-mode.» You’ll either see 32-bit, 64-bit, or both.

    Advertisement

  3. Image titled Install Windows Programs in Ubuntu Step 3

    3

    Enable 32-bit architecture if your system is 64-bit. If the value of «CPU op-mode» does not include 32-bit, run this command to enable 32-bit architecture: sudo dpkg --add-architecture i386.[4]

    • If CPU op-mode displayed both 64-bit and 32-bit, there’s no need to run this command.
  4. Image titled Install Windows Programs in Ubuntu Step 4

    4

    Download and add the repository key. Now you’ll need to run two commands that will allow you to easily install Wine:

    • First, run sudo mkdir -pm755 /etc/apt/keyrings to create a directory for the repository key.
    • Then, run sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key to add the repository key.
  5. Image titled Install Windows Programs in Ubuntu Step 5

    5

    Download Wine for your version of Ubuntu. The command you’ll need to run will be a little different depending on your version of Ubuntu:

    • Ubuntu 22.04 (Jammy Jellyfish): sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources

      • If there is no stable version available for Jammy when you run this command, you can install the development version instead. To do so, use sudo apt install --install-recommends winehq-devel.
    • Ubuntu 20.04 (Focal Fossa): sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/focal/winehq-focal.sources
    • Ubuntu 18.04 (Bionic Beaver): sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/winehq-bionic.sources.
    • Ubuntu 16.04 (Xenial Xerus): sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/xenial/winehq-bionic.sources
    • Ubuntu 14.04 (Trusty Tahr): sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/trusty/winehq-bionic.sources
  6. Image titled Install Windows Programs in Ubuntu Step 6

    6

    Run sudo apt update to update the package database. Once you do this, you’ll be ready to install Wine.

  7. Image titled Install Windows Programs in Ubuntu Step 7

    7

    Run sudo apt install --install-recommends winehq-stable to install Wine. This installs Wine from the repository you’ve added.

    • The Wine files are installed in /opt/wine-(branch).
  8. Image titled Install Windows Programs in Ubuntu Step 8

    8

    Type winecfg and press Enter to open the Wine Configuration panel. No matter how you’ve installed Wine, you’ll want to run this command before you start installing Windows programs. This creates a directory called .wine in your home directory that contains a virtual Windows-style C drive (called drive_c) with the typical Windows file structure, including folders like Program Files, Program Files (x86), Windows, and ProgramData. It also opens a panel that lets you change your Wine preferences.

    • On the Applications tab, you’ll see that Wine can mimic different Windows versions for each application. The default Windows version is Windows 7, but you’ll probably want to select a newer version of Windows (such as Windows 10).
    • On the Desktop Integration tab, you can choose to add Windows-style theme and link Windows-like folder structure (e.g., Desktop, My Documents) to directories in Ubuntu.
    • You can customize the behavior of windows and mouse movements on the Graphics tab and sound on the Audio tab.
    • Once you’re finished making configuration changes, click OK to save.
  9. Advertisement

  1. Image titled Install Windows Programs in Ubuntu Step 9

    1

    Download the installer for any Windows app you want to run. Now that Wine is installed, you can easily run any Windows installer that ends with the .exe extension.

    • While lots of popular Windows software titles will work great in Wine, you might run into problems with some apps. Check out the Wine Application Database to see which apps will run flawlessly, with minor flaws, or not at all on Ubuntu.
  2. Image titled Install Windows Programs in Ubuntu Step 10

    2

    Double-click the installer. Wine should automatically detect the .exe and start the Windows program. If the program doesn’t open in Wine, right-click its icon and select Run with > Wine.[5]

    • If the installer doesn’t launch, you can also start it from the command line. In a Terminal window, use cd to enter the directory to which you saved the downloaded installer, then use wine filename.exe to launch it.
  3. Image titled Install Windows Programs in Ubuntu Step 11

    3

    Follow the on-screen instructions in the installer. The installation will look like a typical Windows installer. Many installers allow you to choose a location for installing the file. The location will be in your virtual C drive, which is actually located in the folder called .wine/drive_c in your home directory.

    • If prompted to choose an installation location, choose C:\Program Files.
    • You can configure any apps you install in the winecfg tool. Just run wincfg at the prompt, click Add Application on the Applications tab, and select the newly installed app. Then, with the new app selected, go through the tabs and make modifications specifically for that app.
  4. Advertisement

  1. Image titled Install Windows Programs in Ubuntu Step 12

    1

    Run an app from the desktop or your file manager. If the installer you ran prompted you to add an icon to your desktop, you’ll now see a shortcut to that app that you can easily double-click to launch with Wine. If not, you can run it from your file manager.

    • First, open Files and make sure hidden files are visible. If you don’t see the .wine folder, press Ctrl + H to toggle showing hidden files.[6]
    • Double-click the .wine folder and then navigate to the location to which you installed the Windows program.
    • Right-click the .exe file and choose Open with > Wine.
  2. Image titled Install Windows Programs in Ubuntu Step 13

    2

    Run programs from the command line. If you’re having trouble running programs from the GUI or just want to use the command line, start by navigating to the directory to which you installed the program using the cd command. You’ll need to surround the path with single quotes.

    • For example, if you installed it in the virtual C:\Program Files\Game\Risk directory, you’d use cd '.wine/drive_c/Program Files/Games/Risk'.[7]
    • You can start Windows programs from the full path if you’d prefer, but you’ll need to start them with wine start. For example, wine start 'C:\Program Files\Game\Risk.exe'
    • Start the program using wine appname.exe. For example, if the Windows application file is called Risk.exe, you’d use wine Risk.exe to open it from the current directory.
  3. Image titled Install Windows Programs in Ubuntu Step 14

    3

    Install Winetricks if you’re having trouble with missing DLLs and libraries. If you’re missing certain libraries required to install programs, you might be able to fix the issue with this easy-to-install tool. For example, if you’re trying to run Adobe programs and seeing errors about Adobe Type Manager or «atmlib,» Winetricks can fetch the DLLs you’ll need to run the program.

    • You can install Winetricks from Ubuntu Software or using sudo apt-get install winetricks. However, if you want to get help from the Wine team, they may not provide assistance if you’re using Winetricks.[8]
    • Once Winetricks is installed, run it from the prompt using the command winetricks. You can then use the tool to install working packages of popular apps and libraries.
  4. Advertisement

Add New Question

  • Question

    When I install an app on my computer, it asks for a password. Why is this?

    Living Concrete

    Living Concrete

    Top Answerer

    Some applications require administrator permissions in order to be installed. Simply enter your account password to continue.

  • Question

    What can I do if I don’t have an internet connection to download the software?

    Living Concrete

    Living Concrete

    Top Answerer

    Download the Debian Package (*.dpkg) file onto a flash drive on another computer. Then, put the flash drive into the computer that doesn’t have an internet connection. From here, you should be able to run the Debian Package by double clicking on it.

  • Question

    Will it be possible to run Windows games on Ubuntu?

    Somone

    Yes, but not all games work with Wine yet. You can check Wine’s list of compatible programs to see if your game is listed.

See more answers

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

Advertisement

Video

  • To uninstall Windows apps, use wine uninstaller to launch the software removal tool.

  • If the app you want to use won’t run properly in Wine, search the web for the app name and «Ubuntu.» Many Wine users share information about their experiences getting their favorite games and apps to run in Ubuntu and you’re likely to find answers.

Thanks for submitting a tip for review!

Advertisement

About This Article

Thanks to all authors for creating a page that has been read 563,901 times.

Is this article up to date?

  • Программа для наушников с микрофоном windows 10
  • Программа для майнинга на ноутбуке c windows 10 на русском
  • Программа для запуска iso образов для windows 10
  • Программа для настройки яркости монитора windows 10
  • Программа для запуска exe файлов для windows 10