SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Downloaden Sie, um offline zu lesen
Delphi 11
Copyright © 2022 by Embarcadero, an Idera company
Linux GUI
Applications on
Windows Subsystem
for Linux [WSL2]
Jim McKeeth
Chief Developer Advocate
Embarcadero Technologies
jim.mckeeth@embarcadero.com
@JimMcKeeth
Developers Perspective
Slides, links & replay: blogs.embarcadero.com/?p=130922
Delphi 11
Copyright © 2022 by Embarcadero, an Idera company
Agenda
▪ Introduction to WSL
▪ Setup and configuration
▪ Different Linux Distributions
▪ Deploying and debugging
▪ Troubleshooting
▪ Advanced Options
▪ Q&A
Slides, links & replay: blogs.embarcadero.com/?p=130922
Delphi 11
Copyright © 2022 by Embarcadero, an Idera company
Presenter: Jim McKeeth
● Chief Developer Advocate & Engineer for Embarcadero
● Long time software developer
○ Delphi, C/C++, Python, Java, JavaScript, Ruby, etc.
● Invented and patented pattern and swipe to unlock
○ e.g. US Patents # 8352745 & 6766456
● Built thought controlled drone with Google Glass and
wireless EEG headset
● Contributor to Internet of Things and Data Analytics Handbook
● Blogger, podcaster, conference speaker, webinar host, etc.
● Twitter, TikTok, YouTube, etc. @JimMcKeeth
Delphi 11
Copyright © 2022 by Embarcadero, an Idera company
Windows Subsystem for Linux
● Introduced in Windows 10
○ Trivia: Replaces Windows Services for Unix from 2004
○ Also available on Windows 11 and Windows Server 2019
● Developed in collaboration with Canonical and others
● WSL2 improved performance with a real Linux kernel
○ Uses a subset of Hyper-V features
● Not as isolated or as much overhead as a VM
○ Performance rivals native Linux
● WSLg adds GUI support
○ Ships in Windows 11 or Windows 10 Insider 21364
Delphi 11
Copyright © 2022 by Embarcadero, an Idera company
&
LINUX
Addressing the
Elephant in
the Room…
Delphi 11
Copyright © 2022 by Embarcadero, an Idera company
"a step
backward in the
campaign for
freedom."
https://tek.io/3ufuXWR
Linus Torvalds
Creator of Linux kernel
Img https://w.wiki/4n93
"The whole
anti-Microsoft thing was
sometimes funny as a
joke… I feel like, yes,
they have changed… So
I completely dismissed
all the anti-Microsoft
stuff."
https://zd.net/35x8YjE
Richard Stallman
Found of FSF & GNU
Img https://w.wiki/4n8x
Satya Nadella
Microsoft CEO
https://zd.net/3IQSst6
Img https://w.wiki/4n9G
Mark Shuttleworth
Founder & CEO Canonical
Img https://w.wiki/4n9H
“It’s not like Microsoft is
stealing our toys, it’s
more that we’re sharing
them with Microsoft in
order to give everyone
the best possible
experience.”
https://tek.io/3ufuXWR
Delphi 11
Copyright © 2022 by Embarcadero, an Idera company
Benefits and Use Cases
● Ability to run unmodified ELF64 Linux binaries, expand toolkit and capabilities
● Flexibility of combining Windows and Linux tool chain on one computer
● Less overhead than a traditional virtual machine means better performance
● Local build environment with containers, etc.
● Testing server applications from Windows without additional infrastructure
● No need to mess with dual boot or 3rd
party VM installation
● Invoke Linux binaries from Windows and Windows executables from Linux
● Runs as you need it, less management
● Memory and drive space are dynamically shared
Delphi 11
Copyright © 2022 by Embarcadero, an Idera company
WSL Installation Guide
● Enable "Windows Subsystem for Linux" optional feature (via Admin PowerShell or Windows Features)
○ Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
● Install Linux Distro of Choice
○ Windows Store or manually via script
● Launch Linux Distro to initialize it, provide password, etc.
● You can also build a custom distro
● Launch WSL 4 ways
○ Icon on start menu
○ [distro], for example ubuntu
○ wsl.exe or bash.exe
○ wsl [command] or bash -c [command]
https://docs.microsoft.com/en-us/windows/wsl/install
Delphi 11
Copyright © 2022 by Embarcadero, an Idera company
Available Distributions
● Ubuntu, Kali, & Pengwin are in the
Debian family (using .deb pkgs - apt)
○ Kali is focused on security
○ Pengwin is designed around WSL
● SUSE and Fedora are in the RPM family
with Red Hat
● Alpine is an independent, lightweight,
security-oriented, Linux distribution
● Some distros include multiple versions
Delphi 11
Copyright © 2022 by Embarcadero, an Idera company
Managing WSL Distros
● List distributions
○ wsl --list --all or wsl --list --running
● Set default distribution
○ wsl --setdefault <DistributionName> or wsl -s <DistributionName>
● Run a specific distro
○ wsl --distribution <DistributionName>
● Run as specified user
○ wsl --user <Username> (or use the specific distro name)
● Unregister and uninstall a distribution
○ wsl --unregister <DistributionName>
● Shutdown all WSL instances
○ wsl --shutdown
Delphi 11
Copyright © 2022 by Embarcadero, an Idera company
First Run
▪ On first run you are usually
prompted for a username
and password
▪ openSUSE uses YaST2 for a
nice ASCII GUI
Delphi 11
Copyright © 2022 by Embarcadero, an Idera company
Connecting from the IDE
● Tools -> Options -> Deployment ->
Connection Profile Manager
● The IP address and ports are shared with
the host
● So you connect to 127.0.0.1
● Can only use each port number once
(even if you have multiple distros setup)
● So use different port numbers for
multiple instances if you want to run
them simultaneously
Delphi 11
Copyright © 2022 by Embarcadero, an Idera company
Linux User Password Reset
1. Note your username
2. From Windows terminal get the distro name
➢ wsl -l
3. From Windows terminal switch default-user to root
➢ ubuntu config --default-user root
4. Launch the WSL distro (you will be logged in as
root)
➢ ubuntu
5. Change the user’s password
➢ passwd username
6. Change the default user back
➢ ubuntu config --default-user username
7. Launch the WSL distro again
Delphi 11
Copyright © 2022 by Embarcadero, an Idera company
Accessing Files Between Systems
● Access Windows from Linux
○ cd /mnt/c/
● Open WSL in current Windows directory
○ wsl
○ wsl -d ubuntu
○ ubuntu
● Access Linux from Windows
○ wsl.localhost
● Open current Linux path from Windows
○ explorer.exe .
○ cmd.exe
○ powershell.exe
Delphi 11
Copyright © 2022 by Embarcadero, an Idera company RAD STUDIO
Demonstration
Delphi 11
Copyright © 2022 by Embarcadero, an Idera company
● Command Line Blog (includes WSL) http://aka.ms/cliblog
● Learn WSL http://aka.ms/learnwsl
● WSL Docs http://aka.ms/wsldocs
● Connect USB to WSL https://aka.ms/wsl-usbip
● WSL: Run Linux GUI Apps youtu.be/kC3eWRPzeWw
● Deep Dive in WSL2 youtu.be/lwhMThePdIo
● Windows Dev Tool Updates: WSL, Terminal, Package Manager, and more youtu.be/m5tt9mDRPSw
Windows Subsystem for Linux resources
Slides, links & replay: blogs.embarcadero.com/?p=130922
Delphi 11
Copyright © 2022 by Embarcadero, an Idera company
More WSL Resources
● Advanced WSL Launcher / Installer (Simplify making your own WSL distro)
○ https://github.com/yuk7/wsldl
● Other prebuilt distros based on WSLDL
○ https://wsldl-pg.github.io/docs/Using-wsldl/#distros
● Collection of WSL Utilities
○ https://github.com/wslutilities/wslu
● A GUI WSL2 instance manager
○ https://github.com/bostrot/wsl2-distro-manager
● Awesome list for WSL
○ https://github.com/sirredbeard/Awesome-WSL
Delphi 11
Copyright © 2022 by Embarcadero, an Idera company
● DocWiki: Linux Application Development
docwiki.embarcadero.com/RADStudio/en/Linux_Application_Development
● DocWiki: Installing the Platform Assistant on Linux
docwiki.embarcadero.com/RADStudio/en/Installing_the_Platform_Assistant_on_Linux
● DocWiki: FireMonkey for Linux
docwiki.embarcadero.com/RADStudio/en/FireMonkey_for_Linux
● Script to automate setup on Ubuntu
○ embt.co/Ubuntu4Delphi22
● Script to automate setup on Redhat
○ embt.co/RedHat4Delphi22
FMXLinux Resources
Slides, links & replay: blogs.embarcadero.com/?p=130922
Delphi 11
Copyright © 2022 by Embarcadero, an Idera company
Setting up CentOS (Redhat based)
● Install Docker in Ubuntu docs.docker.com/engine/install/ubuntu/
● Follow steps docs.microsoft.com/en-us/windows/wsl/use-custom-distro
○ Make folder on Windows C:WSLCentOS
○ From Ubuntu
■ sudo service docker start
■ sudo docker run -t dokken/centos-stream-9 bash ls /
■ dockerContainerID=$(sudo docker container ls -a | grep -i
dokken/centos-stream-9 | awk '{print $1}')
■ sudo docker export $dockerContainerID > /mnt/c/WSL/CentOS/centos.tar
■ sudo docker rm $dockerContainerID
○ From PowerShell
■ cd C:WSLCentOS
■ wsl --import CentOS C:WSLCentOS .centos.tar
○ From CentOS
■ yum update -y && yum install passwd sudo -y
■ myUsername=jim
■ adduser -G wheel $myUsername
■ echo -e "[user]ndefault=$myUsername" >> /etc/wsl.conf
■ passwd $myUsername
○ From PowerShell
■ wsl --terminate CentOS
Fedora
Redhat
CentOS
● Base OS
● By Redhat &
Community
● Feature focus
● Free
● By Redhat
● Supported
● Stable focus
● Commercial
● By community
● No support
● Free
https://embt.co/RedHat4Delphi22
Delphi 11
Copyright © 2022 by Embarcadero, an Idera company RAD STUDIO
Q&A
Slides, links & replay: https://blogs.embarcadero.com/?p=130922
Jim McKeeth
Chief Developer Advocate
Embarcadero Technologies
jim.mckeeth@embarcadero.com
@JimMcKeeth
Linux GUI
Applications on
Windows Subsystem
for Linux [WSL2]
Delphi 11
Copyright © 2022 by Embarcadero, an Idera company

Weitere ähnliche Inhalte

Was ist angesagt? (6)

MSI / Windows Installer for NGN 'Dummies'
MSI / Windows Installer for NGN 'Dummies'MSI / Windows Installer for NGN 'Dummies'
MSI / Windows Installer for NGN 'Dummies'
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
The pm²-story-nicos.kourounakis.2017.share
The pm²-story-nicos.kourounakis.2017.shareThe pm²-story-nicos.kourounakis.2017.share
The pm²-story-nicos.kourounakis.2017.share
 
공기청정기 제작 가이드
공기청정기 제작 가이드공기청정기 제작 가이드
공기청정기 제작 가이드
 
Git hub
Git hubGit hub
Git hub
 
Git e GitHub - L'essenziale
Git e GitHub - L'essenziale Git e GitHub - L'essenziale
Git e GitHub - L'essenziale
 

Ähnlich wie Linux GUI Applications on Windows Subsystem for Linux

Is Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VIIs Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VI
Opersys inc.
 
Is Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon VIs Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon V
Opersys inc.
 
Leveraging Android's Linux Heritage at AnDevCon VI
Leveraging Android's Linux Heritage at AnDevCon VILeveraging Android's Linux Heritage at AnDevCon VI
Leveraging Android's Linux Heritage at AnDevCon VI
Opersys inc.
 
Leveraging Android's Linux Heritage at AnDevCon V
Leveraging Android's Linux Heritage at AnDevCon VLeveraging Android's Linux Heritage at AnDevCon V
Leveraging Android's Linux Heritage at AnDevCon V
Opersys inc.
 
Is Android the New Embedded Linux? at AnDevCon IV
Is Android the New Embedded Linux? at AnDevCon IVIs Android the New Embedded Linux? at AnDevCon IV
Is Android the New Embedded Linux? at AnDevCon IV
Opersys inc.
 

Ähnlich wie Linux GUI Applications on Windows Subsystem for Linux (20)

Docker on Power Systems
Docker on Power SystemsDocker on Power Systems
Docker on Power Systems
 
Is Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VIIs Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VI
 
Is Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon VIs Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon V
 
Leveraging Android's Linux Heritage at AnDevCon VI
Leveraging Android's Linux Heritage at AnDevCon VILeveraging Android's Linux Heritage at AnDevCon VI
Leveraging Android's Linux Heritage at AnDevCon VI
 
Leveraging Android's Linux Heritage at AnDevCon V
Leveraging Android's Linux Heritage at AnDevCon VLeveraging Android's Linux Heritage at AnDevCon V
Leveraging Android's Linux Heritage at AnDevCon V
 
Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)
Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)
Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)
 
Headless Android
Headless AndroidHeadless Android
Headless Android
 
Docker4Drupal 2.1 for Development
Docker4Drupal 2.1 for DevelopmentDocker4Drupal 2.1 for Development
Docker4Drupal 2.1 for Development
 
Docker up and Running For Web Developers
Docker up and Running For Web DevelopersDocker up and Running For Web Developers
Docker up and Running For Web Developers
 
Docker Up and Running for Web Developers
Docker Up and Running for Web DevelopersDocker Up and Running for Web Developers
Docker Up and Running for Web Developers
 
Marco Cavallini - Yocto Project, an automatic generator of embedded Linux dis...
Marco Cavallini - Yocto Project, an automatic generator of embedded Linux dis...Marco Cavallini - Yocto Project, an automatic generator of embedded Linux dis...
Marco Cavallini - Yocto Project, an automatic generator of embedded Linux dis...
 
Marco Cavallini @ LinuxLab 2018 : Workshop Yocto Project, an automatic genera...
Marco Cavallini @ LinuxLab 2018 : Workshop Yocto Project, an automatic genera...Marco Cavallini @ LinuxLab 2018 : Workshop Yocto Project, an automatic genera...
Marco Cavallini @ LinuxLab 2018 : Workshop Yocto Project, an automatic genera...
 
Magento Docker Setup.pdf
Magento Docker Setup.pdfMagento Docker Setup.pdf
Magento Docker Setup.pdf
 
[DockerCon 2019] Hardening Docker daemon with Rootless mode
[DockerCon 2019] Hardening Docker daemon with Rootless mode[DockerCon 2019] Hardening Docker daemon with Rootless mode
[DockerCon 2019] Hardening Docker daemon with Rootless mode
 
DCSF19 Hardening Docker daemon with Rootless mode
DCSF19 Hardening Docker daemon with Rootless modeDCSF19 Hardening Docker daemon with Rootless mode
DCSF19 Hardening Docker daemon with Rootless mode
 
Is Android the New Embedded Linux? at AnDevCon IV
Is Android the New Embedded Linux? at AnDevCon IVIs Android the New Embedded Linux? at AnDevCon IV
Is Android the New Embedded Linux? at AnDevCon IV
 
The internals and the latest trends of container runtimes
The internals and the latest trends of container runtimesThe internals and the latest trends of container runtimes
The internals and the latest trends of container runtimes
 
[DockerCon 2020] Hardening Docker daemon with Rootless Mode
[DockerCon 2020] Hardening Docker daemon with Rootless Mode[DockerCon 2020] Hardening Docker daemon with Rootless Mode
[DockerCon 2020] Hardening Docker daemon with Rootless Mode
 
Why Users Are Moving on from Docker and Leaving Its Security Risks Behind (Sp...
Why Users Are Moving on from Docker and Leaving Its Security Risks Behind (Sp...Why Users Are Moving on from Docker and Leaving Its Security Risks Behind (Sp...
Why Users Are Moving on from Docker and Leaving Its Security Risks Behind (Sp...
 
Podman, Buildah, and Quarkus - The Latest in Linux Containers Technologies
Podman, Buildah, and Quarkus - The Latest in Linux Containers Technologies Podman, Buildah, and Quarkus - The Latest in Linux Containers Technologies
Podman, Buildah, and Quarkus - The Latest in Linux Containers Technologies
 

Mehr von Embarcadero Technologies

Getting Started Building Mobile Applications for iOS and Android
Getting Started Building Mobile Applications for iOS and AndroidGetting Started Building Mobile Applications for iOS and Android
Getting Started Building Mobile Applications for iOS and Android
Embarcadero Technologies
 

Mehr von Embarcadero Technologies (20)

PyTorch for Delphi - Python Data Sciences Libraries.pdf
PyTorch for Delphi - Python Data Sciences Libraries.pdfPyTorch for Delphi - Python Data Sciences Libraries.pdf
PyTorch for Delphi - Python Data Sciences Libraries.pdf
 
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
 
Python on Android with Delphi FMX - The Cross Platform GUI Framework
Python on Android with Delphi FMX - The Cross Platform GUI Framework Python on Android with Delphi FMX - The Cross Platform GUI Framework
Python on Android with Delphi FMX - The Cross Platform GUI Framework
 
Introduction to Python GUI development with Delphi for Python - Part 1: Del...
Introduction to Python GUI development with Delphi for Python - Part 1:   Del...Introduction to Python GUI development with Delphi for Python - Part 1:   Del...
Introduction to Python GUI development with Delphi for Python - Part 1: Del...
 
FMXLinux Introduction - Delphi's FireMonkey for Linux
FMXLinux Introduction - Delphi's FireMonkey for LinuxFMXLinux Introduction - Delphi's FireMonkey for Linux
FMXLinux Introduction - Delphi's FireMonkey for Linux
 
Python for Delphi Developers - Part 2
Python for Delphi Developers - Part 2Python for Delphi Developers - Part 2
Python for Delphi Developers - Part 2
 
Python for Delphi Developers - Part 1 Introduction
Python for Delphi Developers - Part 1 IntroductionPython for Delphi Developers - Part 1 Introduction
Python for Delphi Developers - Part 1 Introduction
 
RAD Industrial Automation, Labs, and Instrumentation
RAD Industrial Automation, Labs, and InstrumentationRAD Industrial Automation, Labs, and Instrumentation
RAD Industrial Automation, Labs, and Instrumentation
 
Embeddable Databases for Mobile Apps: Stress-Free Solutions with InterBase
Embeddable Databases for Mobile Apps: Stress-Free Solutions with InterBaseEmbeddable Databases for Mobile Apps: Stress-Free Solutions with InterBase
Embeddable Databases for Mobile Apps: Stress-Free Solutions with InterBase
 
Rad Server Industry Template - Connected Nurses Station - Setup Document
Rad Server Industry Template - Connected Nurses Station - Setup DocumentRad Server Industry Template - Connected Nurses Station - Setup Document
Rad Server Industry Template - Connected Nurses Station - Setup Document
 
TMS Google Mapping Components
TMS Google Mapping ComponentsTMS Google Mapping Components
TMS Google Mapping Components
 
Move Desktop Apps to the Cloud - RollApp & Embarcadero webinar
Move Desktop Apps to the Cloud - RollApp & Embarcadero webinarMove Desktop Apps to the Cloud - RollApp & Embarcadero webinar
Move Desktop Apps to the Cloud - RollApp & Embarcadero webinar
 
Useful C++ Features You Should be Using
Useful C++ Features You Should be UsingUseful C++ Features You Should be Using
Useful C++ Features You Should be Using
 
Getting Started Building Mobile Applications for iOS and Android
Getting Started Building Mobile Applications for iOS and AndroidGetting Started Building Mobile Applications for iOS and Android
Getting Started Building Mobile Applications for iOS and Android
 
Embarcadero RAD server Launch Webinar
Embarcadero RAD server Launch WebinarEmbarcadero RAD server Launch Webinar
Embarcadero RAD server Launch Webinar
 
ER/Studio 2016: Build a Business-Driven Data Architecture
ER/Studio 2016: Build a Business-Driven Data ArchitectureER/Studio 2016: Build a Business-Driven Data Architecture
ER/Studio 2016: Build a Business-Driven Data Architecture
 
The Secrets of SQL Server: Database Worst Practices
The Secrets of SQL Server: Database Worst PracticesThe Secrets of SQL Server: Database Worst Practices
The Secrets of SQL Server: Database Worst Practices
 
Driving Business Value Through Agile Data Assets
Driving Business Value Through Agile Data AssetsDriving Business Value Through Agile Data Assets
Driving Business Value Through Agile Data Assets
 
Troubleshooting Plan Changes with Query Store in SQL Server 2016
Troubleshooting Plan Changes with Query Store in SQL Server 2016Troubleshooting Plan Changes with Query Store in SQL Server 2016
Troubleshooting Plan Changes with Query Store in SQL Server 2016
 
Great Scott! Dealing with New Datatypes
Great Scott! Dealing with New DatatypesGreat Scott! Dealing with New Datatypes
Great Scott! Dealing with New Datatypes
 

Kürzlich hochgeladen

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Kürzlich hochgeladen (20)

AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 

Linux GUI Applications on Windows Subsystem for Linux

  • 1. Delphi 11 Copyright © 2022 by Embarcadero, an Idera company Linux GUI Applications on Windows Subsystem for Linux [WSL2] Jim McKeeth Chief Developer Advocate Embarcadero Technologies jim.mckeeth@embarcadero.com @JimMcKeeth Developers Perspective Slides, links & replay: blogs.embarcadero.com/?p=130922
  • 2. Delphi 11 Copyright © 2022 by Embarcadero, an Idera company Agenda ▪ Introduction to WSL ▪ Setup and configuration ▪ Different Linux Distributions ▪ Deploying and debugging ▪ Troubleshooting ▪ Advanced Options ▪ Q&A Slides, links & replay: blogs.embarcadero.com/?p=130922
  • 3. Delphi 11 Copyright © 2022 by Embarcadero, an Idera company Presenter: Jim McKeeth ● Chief Developer Advocate & Engineer for Embarcadero ● Long time software developer ○ Delphi, C/C++, Python, Java, JavaScript, Ruby, etc. ● Invented and patented pattern and swipe to unlock ○ e.g. US Patents # 8352745 & 6766456 ● Built thought controlled drone with Google Glass and wireless EEG headset ● Contributor to Internet of Things and Data Analytics Handbook ● Blogger, podcaster, conference speaker, webinar host, etc. ● Twitter, TikTok, YouTube, etc. @JimMcKeeth
  • 4. Delphi 11 Copyright © 2022 by Embarcadero, an Idera company Windows Subsystem for Linux ● Introduced in Windows 10 ○ Trivia: Replaces Windows Services for Unix from 2004 ○ Also available on Windows 11 and Windows Server 2019 ● Developed in collaboration with Canonical and others ● WSL2 improved performance with a real Linux kernel ○ Uses a subset of Hyper-V features ● Not as isolated or as much overhead as a VM ○ Performance rivals native Linux ● WSLg adds GUI support ○ Ships in Windows 11 or Windows 10 Insider 21364
  • 5. Delphi 11 Copyright © 2022 by Embarcadero, an Idera company & LINUX Addressing the Elephant in the Room…
  • 6. Delphi 11 Copyright © 2022 by Embarcadero, an Idera company "a step backward in the campaign for freedom." https://tek.io/3ufuXWR Linus Torvalds Creator of Linux kernel Img https://w.wiki/4n93 "The whole anti-Microsoft thing was sometimes funny as a joke… I feel like, yes, they have changed… So I completely dismissed all the anti-Microsoft stuff." https://zd.net/35x8YjE Richard Stallman Found of FSF & GNU Img https://w.wiki/4n8x Satya Nadella Microsoft CEO https://zd.net/3IQSst6 Img https://w.wiki/4n9G Mark Shuttleworth Founder & CEO Canonical Img https://w.wiki/4n9H “It’s not like Microsoft is stealing our toys, it’s more that we’re sharing them with Microsoft in order to give everyone the best possible experience.” https://tek.io/3ufuXWR
  • 7. Delphi 11 Copyright © 2022 by Embarcadero, an Idera company Benefits and Use Cases ● Ability to run unmodified ELF64 Linux binaries, expand toolkit and capabilities ● Flexibility of combining Windows and Linux tool chain on one computer ● Less overhead than a traditional virtual machine means better performance ● Local build environment with containers, etc. ● Testing server applications from Windows without additional infrastructure ● No need to mess with dual boot or 3rd party VM installation ● Invoke Linux binaries from Windows and Windows executables from Linux ● Runs as you need it, less management ● Memory and drive space are dynamically shared
  • 8. Delphi 11 Copyright © 2022 by Embarcadero, an Idera company WSL Installation Guide ● Enable "Windows Subsystem for Linux" optional feature (via Admin PowerShell or Windows Features) ○ Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux ● Install Linux Distro of Choice ○ Windows Store or manually via script ● Launch Linux Distro to initialize it, provide password, etc. ● You can also build a custom distro ● Launch WSL 4 ways ○ Icon on start menu ○ [distro], for example ubuntu ○ wsl.exe or bash.exe ○ wsl [command] or bash -c [command] https://docs.microsoft.com/en-us/windows/wsl/install
  • 9. Delphi 11 Copyright © 2022 by Embarcadero, an Idera company Available Distributions ● Ubuntu, Kali, & Pengwin are in the Debian family (using .deb pkgs - apt) ○ Kali is focused on security ○ Pengwin is designed around WSL ● SUSE and Fedora are in the RPM family with Red Hat ● Alpine is an independent, lightweight, security-oriented, Linux distribution ● Some distros include multiple versions
  • 10. Delphi 11 Copyright © 2022 by Embarcadero, an Idera company Managing WSL Distros ● List distributions ○ wsl --list --all or wsl --list --running ● Set default distribution ○ wsl --setdefault <DistributionName> or wsl -s <DistributionName> ● Run a specific distro ○ wsl --distribution <DistributionName> ● Run as specified user ○ wsl --user <Username> (or use the specific distro name) ● Unregister and uninstall a distribution ○ wsl --unregister <DistributionName> ● Shutdown all WSL instances ○ wsl --shutdown
  • 11. Delphi 11 Copyright © 2022 by Embarcadero, an Idera company First Run ▪ On first run you are usually prompted for a username and password ▪ openSUSE uses YaST2 for a nice ASCII GUI
  • 12. Delphi 11 Copyright © 2022 by Embarcadero, an Idera company Connecting from the IDE ● Tools -> Options -> Deployment -> Connection Profile Manager ● The IP address and ports are shared with the host ● So you connect to 127.0.0.1 ● Can only use each port number once (even if you have multiple distros setup) ● So use different port numbers for multiple instances if you want to run them simultaneously
  • 13. Delphi 11 Copyright © 2022 by Embarcadero, an Idera company Linux User Password Reset 1. Note your username 2. From Windows terminal get the distro name ➢ wsl -l 3. From Windows terminal switch default-user to root ➢ ubuntu config --default-user root 4. Launch the WSL distro (you will be logged in as root) ➢ ubuntu 5. Change the user’s password ➢ passwd username 6. Change the default user back ➢ ubuntu config --default-user username 7. Launch the WSL distro again
  • 14. Delphi 11 Copyright © 2022 by Embarcadero, an Idera company Accessing Files Between Systems ● Access Windows from Linux ○ cd /mnt/c/ ● Open WSL in current Windows directory ○ wsl ○ wsl -d ubuntu ○ ubuntu ● Access Linux from Windows ○ wsl.localhost ● Open current Linux path from Windows ○ explorer.exe . ○ cmd.exe ○ powershell.exe
  • 15. Delphi 11 Copyright © 2022 by Embarcadero, an Idera company RAD STUDIO Demonstration
  • 16. Delphi 11 Copyright © 2022 by Embarcadero, an Idera company ● Command Line Blog (includes WSL) http://aka.ms/cliblog ● Learn WSL http://aka.ms/learnwsl ● WSL Docs http://aka.ms/wsldocs ● Connect USB to WSL https://aka.ms/wsl-usbip ● WSL: Run Linux GUI Apps youtu.be/kC3eWRPzeWw ● Deep Dive in WSL2 youtu.be/lwhMThePdIo ● Windows Dev Tool Updates: WSL, Terminal, Package Manager, and more youtu.be/m5tt9mDRPSw Windows Subsystem for Linux resources Slides, links & replay: blogs.embarcadero.com/?p=130922
  • 17. Delphi 11 Copyright © 2022 by Embarcadero, an Idera company More WSL Resources ● Advanced WSL Launcher / Installer (Simplify making your own WSL distro) ○ https://github.com/yuk7/wsldl ● Other prebuilt distros based on WSLDL ○ https://wsldl-pg.github.io/docs/Using-wsldl/#distros ● Collection of WSL Utilities ○ https://github.com/wslutilities/wslu ● A GUI WSL2 instance manager ○ https://github.com/bostrot/wsl2-distro-manager ● Awesome list for WSL ○ https://github.com/sirredbeard/Awesome-WSL
  • 18. Delphi 11 Copyright © 2022 by Embarcadero, an Idera company ● DocWiki: Linux Application Development docwiki.embarcadero.com/RADStudio/en/Linux_Application_Development ● DocWiki: Installing the Platform Assistant on Linux docwiki.embarcadero.com/RADStudio/en/Installing_the_Platform_Assistant_on_Linux ● DocWiki: FireMonkey for Linux docwiki.embarcadero.com/RADStudio/en/FireMonkey_for_Linux ● Script to automate setup on Ubuntu ○ embt.co/Ubuntu4Delphi22 ● Script to automate setup on Redhat ○ embt.co/RedHat4Delphi22 FMXLinux Resources Slides, links & replay: blogs.embarcadero.com/?p=130922
  • 19. Delphi 11 Copyright © 2022 by Embarcadero, an Idera company Setting up CentOS (Redhat based) ● Install Docker in Ubuntu docs.docker.com/engine/install/ubuntu/ ● Follow steps docs.microsoft.com/en-us/windows/wsl/use-custom-distro ○ Make folder on Windows C:WSLCentOS ○ From Ubuntu ■ sudo service docker start ■ sudo docker run -t dokken/centos-stream-9 bash ls / ■ dockerContainerID=$(sudo docker container ls -a | grep -i dokken/centos-stream-9 | awk '{print $1}') ■ sudo docker export $dockerContainerID > /mnt/c/WSL/CentOS/centos.tar ■ sudo docker rm $dockerContainerID ○ From PowerShell ■ cd C:WSLCentOS ■ wsl --import CentOS C:WSLCentOS .centos.tar ○ From CentOS ■ yum update -y && yum install passwd sudo -y ■ myUsername=jim ■ adduser -G wheel $myUsername ■ echo -e "[user]ndefault=$myUsername" >> /etc/wsl.conf ■ passwd $myUsername ○ From PowerShell ■ wsl --terminate CentOS Fedora Redhat CentOS ● Base OS ● By Redhat & Community ● Feature focus ● Free ● By Redhat ● Supported ● Stable focus ● Commercial ● By community ● No support ● Free https://embt.co/RedHat4Delphi22
  • 20. Delphi 11 Copyright © 2022 by Embarcadero, an Idera company RAD STUDIO Q&A Slides, links & replay: https://blogs.embarcadero.com/?p=130922 Jim McKeeth Chief Developer Advocate Embarcadero Technologies jim.mckeeth@embarcadero.com @JimMcKeeth Linux GUI Applications on Windows Subsystem for Linux [WSL2]
  • 21. Delphi 11 Copyright © 2022 by Embarcadero, an Idera company