Results 1 to 4 of 4

Thread: WSL2 How to enable GUI authentication prompt?

  1. #1
    Join Date
    Oct 2010
    Beans
    5

    Question WSL2 How to enable GUI authentication prompt?

    Hi,

    Trying to run gedit like
    Code:
    $gedit admin:///some/root/file
    I'm getting error that admin editing is not supported.
    or
    Code:
    $ pkexec --disable-internal-agent "/usr/bin/gedit" "$@"
    Error executing command as another user: No authentication agent found.
    Polkit only authenticates in terminal, and for GUI apps it's broken anyway.
    I cannot find good info how to enable GUI authentication without dragging in full blown desktop on Xvnc.

    Code:
    > wsl --version
    WSL version: 2.0.9.0Kernel version: 5.15.133.1-1
    WSLg version: 1.0.59
    MSRDC version: 1.2.4677
    Direct3D version: 1.611.1-81528511
    DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
    Windows version: 10.0.22631.3007
    
    $ cat /etc/lsb-release
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=22.04
    DISTRIB_CODENAME=jammy
    DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"
    
    $ uname -r
    5.15.133.1-microsoft-standard-WSL2
    May be someone has some insights?

    Thanks

  2. #2
    Join Date
    Jun 2014
    Beans
    7,409

    Re: WSL2 How to enable GUI authentication prompt?

    This is not an Ubuntu or Linux problem, it is a windows problem. WSL was initially designed to work without a GUI but can now be used with a GUI in some cases. The link below to the microsoft site (creators of WSL) explains the limitations as well as what you need and how to accomplish it.

    https://learn.microsoft.com/en-us/wi...rials/gui-apps

  3. #3
    Join Date
    Oct 2010
    Beans
    5

    Re: WSL2 How to enable GUI authentication prompt?

    It seems I'm barking up the wrong tree.
    That's exactly what guys at #windows-wsl IRC said - WSL was not designed for this, to spin up a proper VM or something would be more reasonable.
    I've dropped chasing this pkexec issue.

    Thanks for replying.

  4. #4
    Join Date
    Jun 2014
    Beans
    7,409

    Re: WSL2 How to enable GUI authentication prompt?

    The link I posted above indicates which versions of windows should work for a GUI with WSL and explains the steps if interested. If you already have WSL installed you will apparently need to uninstall it an reinstall. Maybe other virtual software such as VirtualBox would be useful.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •