question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WSL - Unhandled Exception when executing Out-Gridview command

See original GitHub issue

Description: In Windows Subsystem for Linux (WSL) the following exception occurs when executing the Out-Gridview command:

dir | select name | out-gridview

Exception message:

Unhandled Exception: System.TypeInitializationException: The type initializer for 'OutGridView.Application.AvaloniaAppRunner' threw an exception. ---> System.Exception: XOpenDisplay failed
   at Avalonia.X11.AvaloniaX11Platform.Initialize(X11PlatformOptions options)
   at Avalonia.Controls.AppBuilderBase`1.Setup()
   at OutGridView.Application.AvaloniaAppRunner.BuildAvaloniaApp() in D:\a\1\s\src\OutGridView.Gui\AvaloniaAppRunner.cs:line 34
   at OutGridView.Application.AvaloniaAppRunner..cctor() in D:\a\1\s\src\OutGridView.Gui\AvaloniaAppRunner.cs:line 31
   --- End of inner exception stack trace ---
   at OutGridView.Application.Program.Main(String[] args) in D:\a\1\s\src\OutGridView.Gui\Program.cs:line 26

Environment:

Windows 10: WSL 1 (Windows Build 1903) and 2 (Windows 10 Insider Build 18985) - Linux Ubuntu 18.04

PowerShell 7 Preview.4

Microsoft.PowerShell.GraphicalTools v 0.2.0

OG_03_2019-09-23_11-47-36

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tigcommented, Aug 24, 2022

@andschwa This should be closed as won’t fix since it’s for the Avalona version.

0reactions
rokejulianlockhartcommented, Aug 24, 2022

The Windows Subsystem For Linux Preview natively provides an X-server, so this remains important.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Windows Subsystem for Linux
Provides detailed information about common errors and issues people run into while running Linux on the Windows Subsystem for Linux.
Read more >
Test out PowerShell 7 new features in WSL1 - Tom Tech Blog
Install-Module Microsoft.PowerShell.GraphicalTools. Tried to run Out-GridView but encountered Exception error. PS /home/tom>. Unhandled Exception: System.
Read more >
Windows 10 – PowerShell Core on WSL Linux using Out ...
Open Linux WSL session. Run this command : 1. export LIBGL_ALWAYS_INDIRECT=1 ...
Read more >
When using a Visual Studio Preview version, you ...
Open a command-line prompt, Windows Terminal if you have it installed, or else Command Prompt or Windows Powershell from the Start menu.
Read more >
How to prevent from closing out-gridview when a script ...
When I run the script using Run with PowerShell, it will open gridview and close it immediately after it is opened. (I think...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found