Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Comments on Install and run Windows applications

Parent

Install and run Windows applications

+1
−0

How do I install and run Windows applications downloaded from a website? Windows applications do not run natively on Linux, but can be run using Wine. When downloading these applications from a webpage, I will have a .exe or .msi installer in my Downloads directory. What are the next steps to install these on Linux? How do I then run the installed application? How do I add it to my applications list readily available with a mouse click in my desktop environment?[1] I should be able to use the application as if it is any other native application on my system.

Applications downloaded from a webpage may include their own built-in updater. Will that work as intended (automatic)?


  1. Having to resort to the Terminal to open the application, is not sufficient. It needs to be available when I search in my app launcher list, or open the GUI app list. ↩︎

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

Shortcut is a separate question (4 comments)
Post
+1
−0

You can use Wine, or a VM. With a VM, it's pretty straightforward - install Windows in the VM, and then run the program as you would normally inside the VM.

With Wine, the "basic" way (which you shouldn't do!) is to run wine evil.exe in a terminal. By default, this uses the Wine prefix under something like ~/.wine, opens your whole filesystem to the Windows program, and often leads to littering your desktop and/or file associations with crap from Windows, all of which is IMO undesirable. You should at least create a separate Wine Prefix, configure it with winecfg and set the WINEPREFIX environment variable.

If you're not thoroughly familiar with Wine, your head might be spinning at this point. The good news is that you don't have to do these steps by hand, people have written utilities for it. I like using Wine Bottles - this has a GUI where you can select Windows programs and run them easily. It also has the important benefit of sandboxing the Windows programs so they can't just have full access to your entire hard drive.

Wine creates a fake C: drive for Windows programs, which is really just a folder inside the Wine prefix. You can run an installer like any other program, but you will have to choose where to install. Usually, it's more convenient to install outside the prefix, that way you can easily run the installed program with other prefixes (useful for troubleshooting). Usually, your actual drive (/) will show up as Z: in Wine, you can go from there. Keep in mind that with Bottles sandboxing, the root at Z: might be a fake one, and not the real files of your /, unless you specifically permit Bottles to share some part of your drive with Wine programs.

After you run the installer, the actual program's EXE should be created somewhere. You then find it, and run that with Wine, and hopefully everything now works. In Bottles, you can create a shortcut to make it easier to find later. Bare Wine and other helpers like Lutris have their own shortcut mechanism as well, but I don't know how it works.

A lot of Windows programs don't like it if the "working directory" is not just right. The easy solution is to make sure you cd into the directory of the executable when running, instead of doing wine /full/path/to/the/binary.exe. Lutris etc have a special configuration field where you can specify a working directory.

Occasionally you'll run into a program that fails when installed on Z:, but works on C:. IMO the best strategy is to try installing on Z: first, and if it fails, then try C: as one of the troubleshooting steps. If you install everything on C:, you end up with a lot of unnecessary extra directory levels, which is annoying.

Many Windows installers also want to install dependencies like C++ Runtime, .NET runtime, DirectX, etc. Be careful with these because they don't always work exactly right in Wine - these are system-level things that sometimes conflict with the parts that Wine abstracts away. If possible, it is better to install dependencies with winetricks rather than the official Windows installer. In Bottles, there is an easy to use GUI for this. When a dependency has not been added to winetricks/Bottles yet, I have had decent luck just downloading the installer from Microsoft's site and running in Wine (it has to be the same prefix as the program that needs it). But if you do it often you are likely to start running into annoying problems.

3D-heavy programs like games usually rely on DirectX. Vulkan is an open source replacement for this. I've seen a good amount of cases where a game crashes on launch, is slow, has artifacts with DirectX on Wine. But with Vulkan it runs much better, even though Vulkan is 3rd party and DirectX is official. IMO using Vulkan by default, and falling back to DX as a troubleshooting step, is more efficient.

There are also multiple flavors ("runtimes") of Wine these days. The big ones are Proton from Valve, Glorious Eggroll (based on proton) and Soda. I like to use Soda instead of vanilla Wine by default, since some programs that crash on vanilla seem to not crash on Soda. The Glorious Eggroll version of Proton is like the nuclear option for games, almost everything will run with it. But most of my games run with Soda already these days, so I don't usually bother with GE except for the really annoying ones like Total Wars (notorious for being hard to run on Linux). Proton is useful when running through Steam, since you then get other benefits of Steam as well, like Steam Input. Switching runtimes is much easier with a helper like Bottles or Lutris.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

Not a clear and simple answer to the question (3 comments)
Not a clear and simple answer to the question

While I appreciate the in-depth look here (good explanations is what I've really found to be lacking thus far when migrating to Linux), the answer does not present a solution friendly to casual users. I've given your answer an upvote for the explanations, but I don't think the post answers this particular question the way I intended.

Ideally, installing the application should be as simple as on Windows or MacOS; just a click with the button on the file in the Downloads folder, or a simple line in the terminal. I'm not saying an answer can be written for that, if it doesn't exist, but that's what Linux should have. Using the daily system should be easy and straightforward for a casual user, not complicated the way development or server administration is.

matthewsnyder‭ wrote 6 months ago · edited 6 months ago

As a critique of Linux, yes, it is indeed true that running Windows programs on Linux is more fiddly than on Windows. Whether this is a deal breaker is up to you - some people feel that in the grand scheme of things, it doesn't matter all that much.

Similarly, yes, it would be better to have a "one click install". However, time spent installing vs. time spent using the program is already a tiny ratio in most cases. For that reason, I don't really bother - I play a lot of games, and use some Windows software like SketchUp, and just live with the slight inconvenience of doing it this way. Streamlining it more would improve my quality of life a bit, but there's many other things I could work on instead that would improve it more, so making Windows installs smoother hasn't been a priority for me.

I offer this as a glimpse of one state you might end up in, a bit "down the line", in your journey of using Windows apps on Linux =)

matthewsnyder‭ wrote 6 months ago

Btw, nitpick:

Ideally, installing the application should be as simple as on Windows or MacOS

On MacOS, I believe the fundamental process is about the same as Wine on Linux. Except with MacOS it's harder to make Wine work, and in some cases you have to use paid, proprietary versions of Wine. So AFAIK it's harder to run Windows programs on Mac than Linux, especially hardware-y things like games. For this question, Linux vs. Windows is probably the more useful comparison.

For Mac, it would be more logical to compare for example apt or pacman vs. homebrew. Or extracting tars (bad idea) vs dragging and dropping the dmg file.