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

setting default-user and default-uid has no effect #7

Closed
LukeOrdelmans opened this issue Jan 18, 2018 · 9 comments
Closed

setting default-user and default-uid has no effect #7

LukeOrdelmans opened this issue Jan 18, 2018 · 9 comments

Comments

@LukeOrdelmans
Copy link

First of all: awework work! saved me a lot of time (i've installed Arch on WSL manually before, that was quite some work, this time it was a breeze thank you)...

one small problem I ran into: I'm not able to set the default user. I've tried with 'Arch.exe config --default-user luke' and 'Arch.exe config --default-uid 1000' but when I start Arch.exe afterwards I'm always root.

'Arch.exe get --default-uid' returns 1000 as expected.

As root I can sudo into luke, and running the id command shows i'm uid 1000.

@yuk7
Copy link
Owner

yuk7 commented Jan 18, 2018

@LukeOrdelmans
I confirmed this problem several times...
I think that is not a problem of this program,but a problem of WSL...
Try Arch.exe get --default-uid command. Its output is correctly, UID has correctly set...
In this case please try this:

  1. Please close the command prompt, wait for a while, then re-open it again.(I solved the problem in this way)
  2. Reboot the computer.

@yuk7
Copy link
Owner

yuk7 commented Jan 18, 2018

@LukeOrdelmans
Arch.exe get --default-uid command output is not reflected correctly, this problem is due to this program or WSL.
In that case please tell me additional information.

  1. Windows version (ver command output)
  2. Registry key values in HKCU\Software\Microsoft\Windows\CurrentVersion\Lxss\{LxUID} (You can get LxUID from Arch.exe get --lxuid command)

@LukeOrdelmans
Copy link
Author

Ah, after a reboot the user switch works as it should (sorry I should have tried that before opening an issue).

For me this issue can be closed.

@TristanCrawford
Copy link

This can be alleviated without a restart by simply restarting the LxssManager service.
From a privileged command prompt:
sc stop LxssManager
sc start LxssManager

@aleung
Copy link

aleung commented Feb 14, 2020

I tried Arch.exe config --default-user myuser and the command hanged, even after reboot. Then I used Arch.exe config --default-uid 1000 and it succeeded.

In case anybody faces the same issue, try --default-uid.

@axccod
Copy link

axccod commented Jul 11, 2021

If still persist u can try this:
.\Arch.exe config --default-user "youruser"

@MachinegunMarty
Copy link

I'm using Windows 11 here, and when following the instructions and typing exit, the terminal window closes completely.

So I opened up Windows Terminal again (which defaults to powershell) and went to the folder where i installed ArchWSL.
I couldn't run the command from powershell (even with adding .\ infront).

After that i tried running the command from CMD and it worked like a charm.

@CompeyDev
Copy link

If still persist u can try this: .\Arch.exe config --default-user "youruser"

A bit curious, what exactly does this config command do in the WSL instance (say what configuration file it updates, etc.) to make the changes take effect?

@arthurweitzel
Copy link

If still persist u can try this: .\Arch.exe config --default-user "youruser"

worked well bro, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants