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

wslfetch requires sudo #285

Closed
1 task done
selfagency opened this issue Aug 21, 2023 · 1 comment
Closed
1 task done

wslfetch requires sudo #285

selfagency opened this issue Aug 21, 2023 · 1 comment
Assignees
Labels
Bug This is either an issue that describes a bug or a PR that resolves a bug Upstream This is a bug that related to WSL, distribution or the packages wslu depends on.

Comments

@selfagency
Copy link

Windows Version

Windows 10

Windows Build Number

19045.3324

WSL Version

WSL 2

Distro Version

Pengwin Debian 12

WSL Utilities Version

4.1.1

Describe the bug

WSL fetch throws errors unless run as sudo but also throws errors when run as sudo.

Not sudo:

╭─dsieradski@RIC-DSIERADSKI2 /usr/bin
╰─$ wslfetch
/usr/bin/wslfetch: line 232: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 232: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 232: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 232: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 440: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 232: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 266: [: : integer expression expected
/usr/bin/wslsys: line 259: /mnt/c/Windows/System32/chcp.com: Permission denied
/usr/bin/wslsys: line 267: /mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe: Permission denied
/usr/bin/wslsys: line 269: [: : integer expression expected
/usr/bin/wslsys: line 259: /mnt/c/Windows/System32/chcp.com: Permission denied
                       ...`               Windows Subsystem for Linux (WSL1)
                       `-///:-`           dsieradski@RIC-DSIERADSKI2
                         .+ssys/          Build:
                          +yyyyyo         Branch:
                          -yyyyyy:        Release: Pengwin
             `.:/+ooo+/:` -yyyyyy+        Kernel: Linux 5.15.90.1-microsoft-standard-WSL2
           `:oyyyyyys+:-.`syyyyyy:        Uptime (Windows): 0d 0h 0m
          .syyyyyyo-`   .oyyyyyyo
         `syyyyyy/   `-+yyyyyyy/`
         /yyyyyy+ -/osyyyyyyo/.
         +yyyyyy-  `.-:::-.`
         .yyyyyy-
          :yyyyyo
           .+ooo+:
             `.::/:.

sudo:

╭─dsieradski@RIC-DSIERADSKI2 /usr/bin
╰─$ sudo wslfetch                                                                                                                                                                                                      1 ↵
Cannot find an overload for "GetEncoding" and the argument count: "0".
At line:1 char:59
+ ... ing]::UTF8; [Console]::InputEncoding = [System.Text.Encoding]::GetEnc ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest

                       ...`               Windows Subsystem for Linux (WSL2)
                       `-///:-`           root@RIC-DSIERADSKI2
                         .+ssys/          Build: 19045
                          +yyyyyo         Branch: vb_release
                          -yyyyyy:        Release: Pengwin
             `.:/+ooo+/:` -yyyyyy+        Kernel: Linux 5.15.90.1-microsoft-standard-WSL2
           `:oyyyyyys+:-.`syyyyyy:        Uptime (Windows): 0d 0h 11m
          .syyyyyyo-`   .oyyyyyyo
         `syyyyyy/   `-+yyyyyyy/`
         /yyyyyy+ -/osyyyyyyo/.
         +yyyyyy-  `.-:::-.`
         .yyyyyy-
          :yyyyyo
           .+ooo+:
             `.::/:.

Steps to Reproduce

  1. Install Pengwin WSL
  2. Install WSLU
  3. Run wslfetch

Expected behavior

Not to run into said errors

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@selfagency selfagency added the Bug This is either an issue that describes a bug or a PR that resolves a bug label Aug 21, 2023
@patrick330602
Copy link
Member

Please try the following solution: microsoft/WSL#3326 (comment)

@patrick330602 patrick330602 added the Upstream This is a bug that related to WSL, distribution or the packages wslu depends on. label Nov 13, 2023
@patrick330602 patrick330602 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 30, 2023
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 Upstream This is a bug that related to WSL, distribution or the packages wslu depends on.
Projects
None yet
Development

No branches or pull requests

2 participants