Linux running windows application

Run Linux GUI apps on the Windows Subsystem for Linux (preview)

You can now preview Windows Subsystem for Linux (WSL) support for running Linux GUI applications (X11 and Wayland) on Windows in a fully integrated desktop experience.

WSL 2 enables Linux GUI applications to feel native and natural to use on Windows.

  • Launch Linux apps from the Windows Start menu
  • Pin Linux apps to the Windows task bar
  • Use alt-tab to switch between Linux and Windows apps
  • Cut + Paste across Windows and Linux apps

You can now integrate both Windows and Linux applications into your workflow for a seamless desktop experience.

Install support for Linux GUI apps

Prerequisites

You will need to be on Windows 11 Build 22000 or higher to access this feature. You can join the Windows Insiders Program to get the latest preview builds.

Installed driver for vGPU

To run Linux GUI apps, you should first install the preview driver matching your system below. This will enable you to use a virtual GPU (vGPU) so you can benefit from hardware accelerated OpenGL rendering.

Fresh install — No prior WSL installation

If you have not already done so, install WSL and set up a user name and password for your Linux distribution.

Open a command prompt with administrator privileges.

Select Start, type PowerShell, right-click Windows PowerShell, and then select Run as administrator.

Run this command and reboot your machine when prompted:

Once your machine has finished rebooting, installation will continue and you will be asked to enter a username and password. This will be your Linux credential for the Ubuntu distribution.

You’re now ready to begin using Linux GUI apps on WSL!

Existing WSL install

If you already have WSL installed on your machine, you can update to the latest version that includes Linux GUI support by running the update command from an elevated command prompt.

Select Start, type PowerShell, right-click Windows PowerShell, and then select Run as administrator.

Enter the WSL update command:

You will need to restart WSL for the update to take effect. You can restart WSL by running the shutdown command in PowerShell.

Linux GUI apps are only supported with WSL 2 and will not work with a Linux distribution configured for WSL 1. Read about how to change your distribution from WSL 1 to WSL 2.

Run Linux GUI apps

You can run the following commands from your Linux terminal to download and install these popular Linux applications. If you are using a different distribution than Ubuntu, it may use a different package manager than apt. Once the Linux application is installed, you can find it in your Start menu under the distribution name. For example: Ubuntu -> Microsoft Edge .

Update the packages in your distribution

Install Gedit

Gedit is the default text editor of the GNOME desktop environment.

To launch your bashrc file in the editor, enter: gedit

Install GIMP

GIMP is a free and open-source raster graphics editor used for image manipulation and image editing, free-form drawing, transcoding between different image file formats, and more specialized tasks.

To launch, enter: gimp

Install Nautilus

Nautilus, also known as GNOME Files, is the file manager for the GNOME desktop. (Similiar to Windows File Explorer).

To launch, enter: nautilus

Install VLC

VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files.

To launch, enter: vlc

Install X11 apps

X11 is the Linux windowing system and this is a miscellaneous collection of apps and tools that ship with it, such as the xclock, xcalc calculator, xclipboard for cut and paste, xev for event testing, etc. See the x.org docs for more info.

To launch, enter the name of the tool you would like to use. For example:

Install Google Chrome for Linux

To install the Google Chrome for Linux:

  1. Change directories into the temp folder: cd /tmp
  2. Use wget to download it: sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
  3. Get the current stable version: sudo dpkg -i google-chrome-stable_current_amd64.deb
  4. Fix the package: sudo apt install —fix-broken -y
  5. Configure the package: sudo dpkg -i google-chrome-stable_current_amd64.deb
Читайте также:  Linux running python script

To launch, enter: google-chrome

Install Microsoft Teams for Linux

To install Microsoft Teams for Linux:

  1. Change directories into the temp folder: cd /tmp
  2. Use curl to download the package: sudo curl -L -o «./teams.deb» «https://teams.microsoft.com/downloads/desktopurl?env=production&plat=linux&arch=x64&download=true&linuxArchiveType=deb»
  3. Use apt to install it: sudo apt install ./teams.deb -y

To launch, enter: teams

Install Microsoft Edge browser for Linux

Find information on how to install the Microsoft Edge browser for Linux using the command line on the Edge Insider site. Select Get instructions under the Command line installation section of the page.

Источник

5 Tools to Help You Run Windows Programs in Linux

Get the best of both worlds with these Windows emulators

Even though open-source software includes free tools, including email clients, office applications, and media players, you might need a software app that works only on Windows. In this case, use one of the tools listed here to run Windows apps on your Linux PC.

These tools are based on or use WINE. Aside from virtual machines, WINE is the only way to run Windows applications on Linux. There are wrappers, utilities, and versions of WINE that make the process easier, though, and choosing the right one can make a difference.

Plain Classic WINE

Doesn’t require a Windows license to use Windows applications.

The simple core utility behind these tools.

This is the stable and officially supported version.

It doesn’t always run the latest versions of Windows products.

Some games and applications run sluggishly.

Lacks helper scripts.

Doesn’t have the latest patches and improvements.

WINE stands for Wine Is Not An Emulator. WINE provides a Windows compatibility layer for Linux that makes installing, running, and configuring many popular Windows applications possible.

Install WINE

To install WINE, run whichever of the following fits your Linux distribution.

On Ubuntu, Debian, or Mint:

Import the WINE developer key:

Add the repository. Replace eoan with your Ubuntu release.

On Debian, use the following example, replacing buster with the Debian release.

Update your repositories, and install WINE Staging:

Install on Fedora

Add the repository from the WINE developers. Replace 30 in the address with your Fedora release.

Then, install the latest WINE Staging release using DNF.

Install on openSUSE

openSUSE has WINE Staging in its repositories. To install it:

Install on Arch Linux and Manjaro

WINE Staging is in the official Arch repository. Install it normally.

Lutris

Easy to play games.

Manage configurations without hassle.

Get the latest versions of WINE.

Manage games in one place.

Takes a little setup on some distributions.

Focused almost exclusively on games.

When it comes to playing Windows games on Linux, there’s no better option than Lutris. Lutris is relatively new compared to the other entries on this list, but it’s more than earned its spot by making it just as easy to install Windows games on Linux as it is on Windows.

With Lutris, you can play games, like Overwatch, on Linux in only a couple of clicks. There’s no need to know the technical details. Someone already did the hard work for you.

Lutris also integrates with other Linux gaming platforms, like Steam, to keep your game library organized. With Lutris, you can access all your games in one place. Lutris keeps separate configurations for each game, so it can manage multiple versions of WINE at once, using the ideal one for each game.

Installing Lutris is fairly simple too.

Install on Ubuntu and Linux Mint

Install the Lutris PPA:

Update Apt, and install Lutris:

Install on Debian

Add the Lutris repository configuration:

Then, import the Lutris signing key:

Finally, update Apt, and install Lutris:

Install on Fedora

Lutris is available in the default Fedora repositories. Install it with DNF.

Install on openSUSE

openSUSE has Lutris in its repositories too. Install it normally.

Install on Arch Linux and Manjaro

Arch also has Lutris in the main repository:

Play On Linux

Good gaming support.

Install multiple versions of WINE simultaneously.

Excellent community support.

Starting games in full-screen mode can sometimes cause crashing.

Error reporting is lacking.

Similarly to Lutris, Play On Linux provides a graphical interface for WINE. Play On Linux came before Lutris, and it offers many of the same features. Play On Linux is bare-bones and doesn’t include support for Linux games. It takes a general approach, so you may find better office application support here, even though it’s probably not as good as something like Crossover.

Install Play On Linux

On Ubuntu, Debian, and Mint:

sudo apt install playonlinux

On Fedora and CentOS:

sudo dnf install playonlinux

sudo zypper install playonlinux

On Arch and Manjaro:

sudo pacman -S playonlinux

Available Windows Programs

When you first run Play On Linux, a toolbar appears at the top with options to run, close, install, remove, or configure applications. You’ll also see an installation option in the left panel.

Читайте также:  Простой видеопроигрыватель для windows 10

You can choose from a number of applications, including development tools such as Dreamweaver, an assortment of retro classics such as Sensible World of Soccer, modern games such as Grand Theft Auto versions 3 and 4, the Half Life series, and more.

The graphics section includes Adobe Photoshop and Fireworks, and you’ll find browsers in the internet section. The office section is a bit hit and miss. Those apps may not work.

Play On Linux requires you to have the setup files for the programs you are installing, although you can download some of the games from GOG.com.

Software installed via Play On Linux is generally more likely to work than software installed with plain WINE.

You also can install non-listed programs. However, the programs listed have been specifically configured to be installed and run using Play On Linux.

Crossover

Streamlined setup makes it easy for Linux newcomers to use Windows programs.

Reliable 24/7 customer support with the premium plan.

Applications take up more space on the hard disk due to how it handles containers.

Free trial is limited to 14 days.

Crossover is the only item on this list that isn’t free. It’s a commercial product based on WINE. Installers are available for Debian, Ubuntu, Mint, Fedora, and Red Hat.

When you first run Crossover, you are presented with a blank screen with an Install Windows Software button at the bottom. When you click the button, a new window appears with the following options:

  • Select application
  • Select installer
  • Select bottle

A bottle in Crossover is like a container that installs and configures each Windows application.

When you choose Select application, you’ll see a search bar from which you can search for the program you wish to install by typing a description.

You also can browse the list of applications. A list of categories appears, and as with Play On Linux, you can choose from an array of packages.

When you choose to install an application, a new bottle suitable for that application is created, and you are asked to provide the installer or setup.exe.

Why use Crossover when Play On Linux is free? Some programs work only with Crossover and not Play On Linux. If you need that program, then this is one option.

Источник

Running Windows Applications in Linux

Ask some Windows users why they aren’t using Linux and chances are you will hear “because [program] doesn’t have a Linux version.” Although cross-platform software is popping up all over the place, there are still a number of applications that are restricted to a single platform – and for a lot of software, that platform is Microsoft Windows.

However, all is not lost. Although Linux has its own executable format and set of system libraries, a tool exists that will allows us to run a good portion of our Windows applications directly in Linux. This tool is of course, Wine. Wine initially began as a small project that was designed to run simple 16-bit Windows applications. As time went on, the target shifted to 32-bit applications and the long and hard process of rewriting Windows’ user-mode libraries began.

How Wine Works

Learning how to use Wine is easier if you understand exactly what Wine does. In order to explain things further, we need to take a look at how Windows applications work. This explanation might get a bit technical so feel free to skip this section if you have trouble understanding it.

A Windows application consists of binary machine code contained within a PE (Portable Executable) file. More than likely, the application makes use of one or more of Windows’ user-mode libraries for things like accessing files, creating graphical interfaces, and network communication. When Windows loads the application and begins running the code contained inside, it needs to know what user-mode libraries the application needs in order to run. This information is stored inside the executable file. Whenever the application needs to access a file or have the operating system perform some other task, it invokes the appropriate function in the user-mode library.

How does all of this relate to Wine? Well, Wine contains its own versions of most common Windows user-mode libraries and when it runs a Windows application, it simply directs the program to use its version of the libraries. Under those circumstances, the Windows application doesn’t really need to even be modified since it is performing the same instructions as it would on Windows – the only difference being that the user-mode libraries (and the appropriate code inside them) is designed to run on Linux.

How to Install Wine

The easiest way to install Wine on Linux is to check your system’s package manager to see if it already contains a pre-compiled binary that you can install. In Ubuntu, you can easily do this by visiting the Software Center and searching for ‘wine.’ If you prefer to install packages from the command line, use the following on a recent version of Ubuntu to install Wine: Compiling Wine from scratch is slightly more difficult but provides you with access to the latest development versions. In order to go this route, you will need to determine what packages Wine requires for building. First off, you will need to make sure that you have a working C++ compiler (ideally g++ from the GNU Compiler Collection). The next step is to determine what packages provide the development files that Wine uses. Determining this can be tricky – a great place to find this information is the source package build dependencies page for a common distro like Ubuntu. This page, for example, lists all of the packages that the wine1.3 package needs to build on Ubuntu. Thankfully, if you are using Ubuntu, there is a very easy way to install all of them – run this command: Once you have all of the build dependencies installed, it’s simply a matter of getting the Wine source and compiling it. You can download one of the prepackaged source archives or you can checkout the latest development code from the Git repository using: This will create a ‘wine1.3’ folder in the current directory with the Wine source code. Once you have the source code, you can run the following command to compile and install Wine: That’s it! Wine is now installed and you can begin using it.

Читайте также:  Создаем резервную копию linux

Running a Simple Application in Wine

The actual process of running a Windows application in Wine is very simple: just pass the name of the Windows executable file to the ‘wine’ command and Wine will take care of the rest. In fact, most of the time, Wine is smart enough to configure your desktop environment to launch Windows applications in Wine simply by double-clicking the executable file.

Let’s take a quick look at what this process involves by starting with something simple: Notepad. Wine ships with its own version of the classic Windows utility and running it couldn’t be easier: If everything is configured correctly, you will see something like this:

The Wine Application Database

Getting an application running in Wine isn’t always easy. A lot of applications require tweaking and playing around with settings and configuration files. Thankfully you can save yourself quite a bit of trouble by checking the Wine Application Database website. The site allows Wine users to submit feedback for a particular application and report whether they were able to successfully run the application or not. Each report can also contain specific instructions on how to best configure Wine and the application itself to give you the best shot at getting the application to run.

A very large percentage of applications will run unmodified and with no configuration changes. These are usually listed as ‘Platinum’ applications. There are other ratings, and you can see the full list and an explanation here.

What to Do If Your Program Won’t Run in Wine

If your Wine application refuses to run properly, there are a few settings you can change that might make the difference. Those settings can be accessed using Wine’s configuration utility. The utility can be started by running the following command: The configuration utility provides a number of helpful options that control the way Wine operates or presents itself to an application. Probably one of the most frequently adjusted settings for me is the Windows version found in the Applications tab. Here you can select what version of Windows you would like Wine to “pretend” to be (you can select anything from Windows 3.1 to Windows 7). If an application is throwing errors or behaving incorrectly, sometimes simply changing the Windows version is enough to correct it.

If an application is choking on a particular .dll file that ships with Wine, you can instruct Wine to use the native .dll instead. Although less common, you can also do the opposite if an application is shipping its own version of a system library and you want Wine to use its own native version. Here are some of my .dll overrides:

As you can see, d3dxof.dll will use the native Windows version of the library (stored in the same directory as the application). quartz.dll on the other hand will use Wine’s version of the library instead of the native version included with the application.

I should also point out that there is a tool called winetricks that can help with downloading runtime and support libraries, such as the Microsoft Visual C++ runtime library (including multiple versions), the .Net framework runtime, etc.

If you still are running into problems, here are some resources for getting assistance:

Источник

Оцените статью