Build windows apps on linux

Build windows apps on linux

WinApps for Linux

Run Windows apps such as Microsoft Office/Adobe in Linux (Ubuntu/Fedora) and GNOME/KDE as if they were a part of the native OS, including Nautilus integration for right clicking on files of specific mime types to open them.

Proud to have made the top spot on r/linux on launch day.

WinApps was created as an easy, one command way to include apps running inside a VM (or on any RDP server) directly into GNOME as if they were native applications. WinApps works by:

  • Running a Windows RDP server in a background VM container
  • Checking the RDP server for installed applications such as Microsoft Office
  • If those programs are installed, it creates shortcuts leveraging FreeRDP for both the CLI and the GNOME tray
  • Files in your home directory are accessible via the \\tsclient\home mount inside the VM
  • You can right click on any files in your home directory to open with an application, too

Currently supported applications

WinApps supports ANY installed application on your system.

It does this by:

  1. Scanning your system for offically configured applications (below)
  2. Scanning your system for any other EXE files with install records in the Windows Registry

Any officially configured applications will have support for high-resolution icons and mime types for automatically detecting what files can be opened by each application. Any other detected executable files will leverage the icons pulled from the EXE.

Note: The officially configured application list below is fueled by the community, and therefore some apps may be untested by the WinApps team.

Adobe Acrobat Pro
(X)
Adobe Acrobat Reader
(DC)
Adobe After Effects
(CC)
Adobe Audition
(CC)
Adobe Bridge
(CS6, CC)
Adobe Creative Cloud
(CC)
Adobe Illustrator
(CC)
Adobe InDesign
(CC)
Adobe Lightroom
(CC)
Adobe Photoshop
(CS6, CC)
Adobe Premiere Pro
(CC)
Command Prompt
(cmd.exe)
Explorer
(File Manager)
Internet Explorer
(11)
Microsoft Access
(2016, 2019, o365)
Microsoft Excel
(2016, 2019, o365)
Microsoft Word
(2016, 2019, o365)
Microsoft OneNote
(2016, 2019, o365)
Microsoft Outlook
(2016, 2019, o365)
Microsoft PowerPoint
(2016, 2019, o365)
Microsoft Project
(2016, 2019, o365)
Microsoft Publisher
(2016, 2019, o365)
Powershell
(Standard, Core)
Visual Studio
(2019 — Ent|Pro|Com)
Windows
(Full RDP session)

Step 1: Set up a Windows Virtual Machine

The best solution for running a VM as a subsystem for WinApps would be KVM. KVM is a CPU and memory-efficient virtualization engine bundled with most major Linux distributions. To set up the VM for WinApps, follow this guide:

If you already have a Virtual Machine or server you wish to use with WinApps, you will need to merge kvm/RDPApps.reg into the VM’s Windows Registry. If this VM is in KVM and you want to use auto-IP detection, you will need to name the machine RDPWindows . Directions for both of these can be found in the guide linked above.

Читайте также:  Windows 10 версия 17134

Step 2: Download the repo and prerequisites

To get things going, use:

Step 3: Creating your WinApps configuration file

You will need to create a

/.config/winapps/winapps.conf configuration file with the following information in it:

The username and password should be a full user account and password, such as the one created when setting up Windows or a domain user. It cannot be a user/PIN combination as those are not valid for RDP access.

  • When using a pre-existing non-KVM RDP server, you can use the RDP_IP to specify it’s location
  • If you are running a VM in KVM with NAT enabled, leave RDP_IP commented out and WinApps will auto-detect the right local IP
  • For domain users, you can uncomment and change RDP_DOMAIN
  • On high-resolution (UHD) displays, you can set RDP_SCALE to the scale you would like [100|140|160|180]
  • To add flags to the FreeRDP call, such as /audio-mode:1 to pass in a mic, use the RDP_FLAGS configuration option
  • For multi-monitor setups, you can try enabling MULTIMON , however if you get a black screen (FreeRDP bug) you will need to revert back
  • If you enable DEBUG , a log will be created on each application start in

Step 4: Run the WinApps installer

Lastly, check that FreeRDP can connect with:

You will see output from FreeRDP, as well as potentially have to accept the initial certificate. After that, a Windows Explorer window should pop up. You can close this window and press Ctrl-C to cancel out of FreeRDP.

If this step fails, try restarting the VM, or your problem could be related to:

  • You need to accept the security cert the first time you connect (with ‘check’)
  • Not enabling RDP in the Windows VM
  • Not being able to connect to the IP of the VM
  • Incorrect user credentials in

/.config/winapps/winapps.conf

  • Not merging install/RDPApps.reg into the VM
  • Then the final step is to run the installer which will prompt you for a system or user install:

    This will take you through the following process:

    Adding pre-defined applications

    Adding applications with custom icons and mime types to the installer is easy. Simply copy one of the application configurations in the apps folder, and:

    • Edit the variables for the application
    • Replace the icon.svg with an SVG for the application (appropriately licensed)
    • Re-run the installer
    • Submit a Pull Request to add it to WinApps officially

    When running the installer, it will check for if any configured apps are installed, and if they are it will create the appropriate shortcuts on the host OS.

    Running applications manually

    WinApps offers a manual mode for running applications that are not configured. This is completed with the manual flag. Executables that are in the path do not require full path definition.

    Checking for new application support

    The installer can be run multiple times, so simply run the below again and it will remove any current installations and update for the latest applications.

    Optional installer command line arguments

    The following optional commands can be used to manage your application configurations without prompts:

    • Black window: This is a FreeRDP bug that sometimes comes up. Try restarting the application or rerunning the command. If that doesn’t work, ensure you have MULTIMON disabled.
    • Some icons pulled from
      • Fluent UI React — Icons under MIT License
      • Fluent UI — Icons under MIT License with restricted use
      • PKief’s VSCode Material Icon Theme — Icons under MIT License
      • DiemenDesign’s LibreICONS — Icons under MIT License

    About

    Run Windows apps such as Microsoft Office/Adobe in Linux (Ubuntu/Fedora) and GNOME/KDE as if they were a part of the native OS, including Nautilus integration.

    Источник

    The Initial Preview of GUI app support is now available for the Windows Subsystem for Linux

    April 21st, 2021

    A year ago at BUILD 2020 we introduced our goal to bring Linux GUI applications to the Windows Subsystem for Linux (WSL) to run Linux GUI applications. We are proud to announce the first preview of this highly anticipated and open source feature! We’ve given this feature the nickname: “WSLg”. Please check out the video below or keep reading to see what you can use this feature for, how it works, and how to install it.

    What can I use GUI application support for?

    WSL lets you run a Linux environment, and up until this point has focused on enabling command line tools utilities and applications. GUI app support now lets you use your favorite Linux GUI applications as well. WSL is used in a wide variety of applications, workloads, and use cases, so ultimately, it’s up to you on what you’d like to use GUI app support for. Below, we’ve highlighted some key scenarios to help you fall in love with running applications in a Linux environment.

    Use your IDE of choice to develop Linux projects

    Visual Studio Code has an amazing experience using VS Code Remote to create a way for you to have a full-fledged Linux IDE directly on your Windows machine, keep extensions and settings across both Windows and different WSL distros (you can view our getting started with VS Code tutorial here. WSLg will let you run other IDEs such as gedit, JetBrains based editors, gvim, etc., to test, build, and debug your Linux applications in a performant manner.

    Here’s an example of running gedit and gvim to edit Linux files directly in WSL.

    Run Linux only applications, or Linux specific use cases like testing

    You can use this feature to run any GUI application that might only exist in Linux, or to run your own applications or testing in a Linux environment. This could be incredibly useful for developers who want to test their cross-platform app, as they can now run it directly on Windows 10, and then easily inside of Linux without ever needing to change machines or manage a virtual machine.

    Let’s look at an example of running TestCafe Studio in WSL to do some web testing from a Microsoft Edge browser running in Linux.

    Build, test and use Linux applications that use audio or the microphone with built in audio support

    Linux GUI applications on WSL will also include out of the box audio and microphone support. This exciting aspect will let your apps play audio cues and utilize the microphone, perfect for building, testing, or using movie players, telecommunication apps, and more.

    Here’s an example of using Audacity running on Linux to record some audio and play it back.

    Bonus: Leverage WSL’s GPU access to run Linux applications with 3D acceleration

    As part of this feature, we have also enabled support for GPU accelerated 3D graphics! Thanks to work that was completed in Mesa 21.0, any applications that are doing complex 3D rendering can leverage OpenGL to accelerate these using the GPU on your Windows 10 machine. This will make some of your more complex applications run smoothly, such as running Gazebo, a robotics simulation tool. This experience will soon be included by default with different WSL distributions, however you can gain access to it right away by following the instructions in this blog post to get the right graphics driver and to ensure your distro has a compatible Mesa version..

    Below you can see the Gazebo application simulating a robot exploring a virtual cave, as well as the Rviz application visualizing the camera feed of the robot and its laser field sensor’s output. Thanks to GPU accelerated 3D graphics we can run this demo at 60 FPS!

    How does this feature work?

    From the demos above, you might have noticed we didn’t need to start an X server manually. That’s because with this feature we are automatically starting a companion system distro, containing a Wayland, X server, pulse audio server, and everything else needed to make Linux GUI apps communicate with Windows. After you’re finished using GUI applications and terminate your WSL distribution the system distro will automatically end its session as well.

    Like with the rest of WSL plumbing, our intention is for this component to be fully managed and seamless for users. Our intentions are for this system distro to be as invisible to the user as possible, and this is why you won’t see this system distro when you run wsl -l -v . Lastly, we’re excited to present that we are using Microsoft’s CBL-Mariner distribution for this system distro! CBL-Mariner is an internal Linux distribution used traditionally for Microsoft’s cloud infrastructure and edge products and services, and we are now extending its use to support GUI apps inside of WSL. You can view the diagram below to see an overall summary of the architecture of this feature.

    For a full in depth view of what we did to make this feature possible and the deep technical details, please view this blog post written by the developers who made this feature possible.

    Getting started with this feature

    We are starting the rollout of this feature as an initial preview before we fully roll it into the WSL experience. To get started using Linux GUI app support, you’ll need to make sure you’re on Windows 10 Insiders preview build 21364 or higher. If you already have WSL installed, all you need to do is run wsl —update and you’ll be set to use GUI apps. If you don’t have WSL enabled, running wsl —install will install WSLg automatically as part of the initial WSL setup.

    You can find the full install instructions at the GitHub repositories’ README: https://github.com/microsoft/wslg . We also highly recommend that you have GPU compute support enabled in WSL for the best performance, please see this section of the install instructions to see how you can ensure that feature is enabled.

    Feedback

    Please file any technical issues, or feature requests for GUI application support on the WSLg Github repository. For general WSL issues, please file them at the WSL repository. You can also follow up with me on Twitter @craigaloewen and all WSL team members that are on Twitter using this list. Please stay tuned to this blog for more exciting WSL announcements, and we can’t wait to hear what you think about this new feature.

    Источник

    Читайте также:  Mac os или mac os server
    Оцените статью