How to set the guid field in a profile?
For example, I want to create a profile for MSYS2, which basically starts c:\msys64\usr\bin\bash.exe (or it in a msys2.cmd file). Then, how to set guid? It seems it is in the form "{00000000-0000-0000-0000-000000000000}". Is there a way to retrive/generate it or just the user have to choose it?
I tried
"guid" : "{00000000-0000-0000-0000-000000000000}", for MSYS2
'"guid" : "{00000000-0000-0000-0000-000000000001}",' for MSYS2/MINGW32 and so on
Is that the right way?
Thanks.
Use new-guid (from powershell), uuidgen (from Linux or MSYS with libuuid installed), guidgen (comes with a Visual Studio), or just make up a 128-bit hexadecimal number. It doesn鈥檛 matter!
@DHowett-MSFT, just anothe question: are these _guid(s)_ written to the registry?
Thanks...
No. Why would they be?
After update of system (or something in it) terminal lost guid for wsl.
this kinda sucks...
how to find guid of wsl?
@mrPsycho What? I'm really not sure what you're asking about. Are you trying to figure out the GUID of a WSL profile? Something else? Could you share your profiles.json?
i found that this guid is internal stuff for terminal.
so i can use any guid, even like author posted. But it is not obvious, and would be cool do define it in documentation... but idk how to name it correctly.
What's the reason for using a guid? Isn't it easier to just have a one byte value to identify each profile since it's all stored on the local machine anyways? So instead of guid: {574e775e-4f2a-5b96-ac1e-a2962a402336}, you could have id: 1. What's the reason for not doing that? Thanks.
As of 1.1 you can use the name anywhere you would have otherwise used guid, so you should probably just do that.
Most helpful comment
Use
new-guid(from powershell),uuidgen(from Linux or MSYS with libuuid installed),guidgen(comes with a Visual Studio), or just make up a 128-bit hexadecimal number. It doesn鈥檛 matter!