Giter Club home page Giter Club logo

Comments (7)

techroy23 avatar techroy23 commented on May 31, 2024 4

I got it working now.

Check list :

  • UAC is set to "(default) Notify me only when apps try to make changes to my computer".
  • You are using a local admin account with password.
  • No pending windows update.

1.) Restart your machine.
2.) Install your Distro using non-elevated terminal and complete initial setup of user account.
3.) now type sudo /opt/distrod/bin/distrod enable --start-on-windows-boot and press enter
4.) This message should show up [Distrod] Enabling atuomatic startup of Distrod. UAC dialog will appear because scheduling a task requires the admin privilege. Please hit enter to proceed.
5.) Press [ENTER] and the UAC box should appear. Press [YES]
6.) A powershell window will show please enter your Local account password then press [ENTER].
7.) This message should appear [Distrod] Distrod will now start automatically on Windows startup.

from wsl-distrod.

xu-zhipeng avatar xu-zhipeng commented on May 31, 2024 2

#I tried this method. It can be used
#Open a shell session for systemd outside the container
#Open powershell and execute following:
wsl -d Ubuntu -e /bin/bash
sudo /opt/distrod/bin/distrod enable --start-on-windows-boot

from wsl-distrod.

anuppoudel54 avatar anuppoudel54 commented on May 31, 2024 1

I also am not able to enable distrod startup on boot but my error is a bit different after UAC dialog and entering my password the task is not scheduled succesfully error.

Error
It seems the task has not been scheduled successfully. You may have typed a wrong password, or you may not have the
necessary administrative privileges. Do you want to retry?
[Y] Yes  [N] No  [?] Help (default is "Y"):
[Distrod][ERROR] Failed to enable the autostart on Windows boot.

from wsl-distrod.

Doomwhite avatar Doomwhite commented on May 31, 2024

I have the same problem in Windows 11 and Arch.

from wsl-distrod.

MRMHmdeleeuw avatar MRMHmdeleeuw commented on May 31, 2024

I had this issue with Windows 10 & Oracle Linux 8. This was caused by the distro not being run as WSL2 but instead WSL1.

 sudo /opt/distrod/bin/distrod enable --start-on-windows-boot
 [Distrod] Distrod has been enabled. Now your shell will start under systemd.
 [Distrod] Enabling atuomatic startup of Distrod. UAC dialog will appear because scheduling
 a task requires the admin privilege. Please hit enter to proceed.

 [Distrod][ERROR] Failed to enable the autostart on Windows boot.

 Caused by:
     C drive not found.

But systemctl/systemd itself in this case does not work either. Issuing the upgrade solved the issue

wsl --set-version <distro> 2

from wsl-distrod.

techroy23 avatar techroy23 commented on May 31, 2024

Hi I did #50 (comment) but still getting the same error

C:\Windows\system32>wsl --set-version Distrod 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
The distribution is already the requested version.

[Distrod] Enabling atuomatic startup of Distrod. UAC dialog will appear because scheduling
a task requires the admin privilege. Please hit enter to proceed.

[Distrod][ERROR] Failed to enable the autostart on Windows boot.

Caused by:
C drive not found.

from wsl-distrod.

Suida avatar Suida commented on May 31, 2024

I got it working now.

Check list :

  • UAC is set to "(default) Notify me only when apps try to make changes to my computer".
  • You are using a local admin account with password.
  • No pending windows update.

1.) Restart your machine. 2.) Install your Distro using non-elevated terminal and complete initial setup of user account. 3.) now type sudo /opt/distrod/bin/distrod enable --start-on-windows-boot and press enter 4.) This message should show up [Distrod] Enabling atuomatic startup of Distrod. UAC dialog will appear because scheduling a task requires the admin privilege. Please hit enter to proceed. 5.) Press [ENTER] and the UAC box should appear. Press [YES] 6.) A powershell window will show please enter your Local account password then press [ENTER]. 7.) This message should appear [Distrod] Distrod will now start automatically on Windows startup.

Thank you. This solution works for me on arch linux.

And I found an additional issue to take care of: The subsystem must be launched in non-elevated terminal. If not, you have to terminate that distribution (wsl -t <distro-name>) and restart it in a non-elevated terminal. Anyway, following this schema step-by-step definitely works.

from wsl-distrod.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.