Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal logs are cleared on cmd.exe #199

Closed
kmyk opened this issue Jul 17, 2021 · 4 comments · Fixed by #213
Closed

Terminal logs are cleared on cmd.exe #199

kmyk opened this issue Jul 17, 2021 · 4 comments · Fixed by #213
Labels
Bug This is either an issue that describes a bug or a PR that resolves a bug Status: Pending Release This is fixed but not yet released. Target: 3.x This is targeted to the 3.x version. Target: 4.x This is targeted to the 4.x release.

Comments

@kmyk
Copy link

kmyk commented Jul 17, 2021

Background Information:

    • Build: 18363
    • WSL: Ubuntu 20.04.2 LTS
    • Version: wslu v2.3.2; wslview v06
    • Build: 18363
    • WSL: Debian GNU/Linux 10 (buster)
    • Version: wslu v3.2.3-1; wslview v10

Describe the bug
When we use cmd.exe as a terminal emulator, terminal logs are cleared in running wslu commands.

To Reproduce
Steps to reproduce the behavior:

  1. Open cmd.exe
  2. Start a WSL session with $ wsl.exe
  3. Run $ wslsys in the WSL

Expected behavior
Terminal logs (e.g. a prompt and command $ wslsys) should be kept, but they are cleared.

Additional context

  • This issue happens on all commands (e.g. wslview, wslsys, wslfetch, ...)
  • This issue doesn't happen on other terminal emulators (Windows Terminal and wsltty)
  • I encountered this issue with wslview inside of Python's standard webbrowser module
@patrick330602
Copy link
Member

Can you use the following command Get-Culture | Format-List -Property * in Windows PowerShell and post the result here?

@kmyk
Copy link
Author

kmyk commented Jul 18, 2021

This is the result of the command (executed on cmd.exe)

C:\Users\kimiyuki>powershell
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

新しいクロスプラットフォームの PowerShell をお試しください https://aka.ms/pscore6

PS C:\Users\kimiyuki> Get-Culture | Format-List -Property *


Parent                         : ja
LCID                           : 1041
KeyboardLayoutId               : 1041
Name                           : ja-JP
IetfLanguageTag                : ja-JP
DisplayName                    : 日本語 (日本)
NativeName                     : 日本語 (日本)
EnglishName                    : Japanese (Japan)
TwoLetterISOLanguageName       : ja
ThreeLetterISOLanguageName     : jpn
ThreeLetterWindowsLanguageName : JPN
CompareInfo                    : CompareInfo - ja-JP
TextInfo                       : TextInfo - ja-JP
IsNeutralCulture               : False
CultureTypes                   : SpecificCultures, InstalledWin32Cultures, FrameworkCultures
NumberFormat                   : System.Globalization.NumberFormatInfo
DateTimeFormat                 : System.Globalization.DateTimeFormatInfo
Calendar                       : System.Globalization.GregorianCalendar
OptionalCalendars              : {System.Globalization.GregorianCalendar, System.Globalization.JapaneseCalendar, System
                                 .Globalization.GregorianCalendar}
UseUserOverride                : True
IsReadOnly                     : False

@waynejhou
Copy link

I think the clear effect is case by function winps_exec in source file wslu-header
which try to change codepage to windows default codepage (in my case is 950 for traditional chinese) to exec powershell and change back to 65001.
you can edit the file in ~/.config/wslu/oemcp which has codepage of your windows
change the value to 65001 to cheese codepage changing

@kmyk
Copy link
Author

kmyk commented Sep 7, 2021

I tried $ echo 65001 > ~/.config/wslu/oemcp and this suppressed the clear effect.

@patrick330602 patrick330602 added Bug This is either an issue that describes a bug or a PR that resolves a bug Status: Pending Release This is fixed but not yet released. Target: 3.x This is targeted to the 3.x version. Target: 4.x This is targeted to the 4.x release. labels Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is either an issue that describes a bug or a PR that resolves a bug Status: Pending Release This is fixed but not yet released. Target: 3.x This is targeted to the 3.x version. Target: 4.x This is targeted to the 4.x release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants