How to correctly set up IntelliJ with WSL2 - intellij-idea
I am not able to run project created under WSL2. I am getting this error. Does anyone have idea what could cause it?
Abnormal build process termination:
C:\WINDOWS\system32\wsl.exe --distribution Ubuntu-20.04 --exec /bin/sh -c "cd /home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server && /usr/lib/jvm/java-11-openjdk-amd64/bin/java -Xmx700m -Djava.awt.headless=true -Djdt.compiler.useSingleThread=true -Dpreload.project.path=/home/jakub/test -Dpreload.config.path=/mnt/c/Users/Z004506P/AppData/Roaming/JetBrains/IntelliJIdea2021.1/options -Dcompile.parallel=false -Drebuild.on.dependency.change=true -Dio.netty.initialSeedUniquifier=-636684381209623859 -Djps.in.wsl=true -Dfile.encoding=windows-1252 -Duser.language=en -Duser.country=US -Didea.paths.selector=IntelliJIdea2021.1 '-Didea.home.path=/mnt/c/Program Files/JetBrains/IntelliJ IDEA 2021.1' -Didea.config.path=/mnt/c/Users/Z004506P/AppData/Roaming/JetBrains/IntelliJIdea2021.1 -Didea.plugins.path=/mnt/c/Users/Z004506P/AppData/Roaming/JetBrains/IntelliJIdea2021.1/plugins -Djps.log.dir=/mnt/c/Users/Z004506P/AppData/Local/JetBrains/IntelliJIdea2021.1/log/build-log '-Djps.fallback.jdk.home=/mnt/c/Program Files/JetBrains/IntelliJ IDEA 2021.1/jbr' -Djps.fallback.jdk.version=11.0.10 -Dio.netty.noUnsafe=true '-Djava.io.tmpdir=//wsl$/Ubuntu-20.04/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/test_77f155f7/_temp_' -Djps.backward.ref.index.builder=true -Dtmh.instrument.annotations=true -Dkotlin.incremental.compilation=true -Dkotlin.incremental.compilation.js=true -Dkotlin.daemon.enabled '-Dkotlin.daemon.client.alive.path=\"C:\Users\Z004506P\AppData\Local\Temp\kotlin-idea-13948257364742160812-is-running\"' -classpath /home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/jps-launcher.jar org.jetbrains.jps.cmdline.Launcher '/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/netty-buffer.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/nanoxml-2.2.3.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/maven-resolver-transport-file-1.3.3.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/jna-platform.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/oro-2.0.8.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/slf4j.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/log4j.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/lz4-java-1.7.1.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/jna.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/maven-resolver-provider.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/annotations.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/resources_en.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/commons-lang3-3.10.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/util.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/maven-resolver-connector-basic-1.3.3.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/jps-builders-6.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/asm-all-9.1.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/forms_rt.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/guava.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/jps-builders.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/zip-signer.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/jdom.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/intellij-deps-fastutil-8.5.2-6.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/plexus-utils-3.3.0.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/javac2.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/qdox-2.0.0.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/commons-logging-1.2.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/trove4j.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/forms-1.1-preview.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/jps-javac-extension-1.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/aether-dependency-resolver.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/http-client.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/maven-resolver-transport-http-1.3.3.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/idea_rt.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/netty-codec-http.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/jps-model.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/gson-2.8.6.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/kotlin-stdlib-jdk8.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/platform-api.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/jasper-v2-rt.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/ant-jps.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/java-guiForms-jps.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/eclipse-jps.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/eclipse-common.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/java-langInjection-jps.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/groovy-jps.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/groovy-constants-rt.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/maven-jps.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/aspectj-jps.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/gradle-jps.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/devkit-jps.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/javaFX-jps.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/javaFX-common.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/javaee-jps.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/kotlin-jps-plugin.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/kotlin-stdlib.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/kotlin-stdlib-jdk7.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/kotlin-stdlib-jdk8.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/kotlin-reflect.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/kotlin-plugin.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/kotlin-jps-common.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/kotlin-common.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/javaee-jpa-jps.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/javaee-appServers-websphere-jps.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/javaee-appServers-weblogic-jps.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/groovy-grails-jps.jar:/home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/groovy-grails-compilerPatch.jar' org.jetbrains.jps.cmdline.BuildMain 192.168.203.193 57615 867865da-6270-418c-bb35-8dcdf1591467 /home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server"
Build process started. Classpath: /home/jakub/.cache/JetBrains/IntelliJIdea2021.1/compile-server/jps-IU-211.6693.111/jps-launcher.jar
Error connecting to 192.168.203.193:57615; reason: connection timed out: /192.168.203.193:57615
io.netty.channel.ConnectTimeoutException: connection timed out: /192.168.203.193:57615
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:261)
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.base/java.lang.Thread.run(Thread.java:834)
Exiting.
Official instructions: wrong or out of date?
The official instructions from JetBrains at https://www.jetbrains.com/help/idea/how-to-use-wsl-development-environment-in-product.html#debugging_system_settings for configuring the Windows Firewall has two parts
(Official) Step 1: allow traffic from WSL (this is right)
The first step in the above link is to add a new inbound rule to allow all traffic from WSL (via PowerShell as Administrator):
New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL)" -Action Allow
This command works and adds the new rule.
(Official) Step 2: Remove blocking inbound traffic to IDEA (this is wrong)
The next step in the instructions is to remove the existing rule(s) that block traffic to IntelliJ IDEA:
Get-NetFirewallRule | where DisplayName -ILike "idea*.exe" | Remove-NetFirewallRule
This command doesn't do anything because the filter part where DisplayName -ILike "idea*.exe" does not match anything.
The DisplayName property presumably corresponds to the Name column in the Firewall control panel:
So you can see that "idea*.exe" won't match there.
If I change the search to:
Get-NetFirewallRule | where DisplayName -ILike "IntelliJ IDEA*"
Then I do get all four rules returned in the shell output:
PS C:\Windows\system32> Get-NetFirewallRule | where DisplayName -ILike "IntelliJ IDEA*"
Name : TCP Query User{6288ADD6-1B2E-4BFF-9317-AEEA34194E04}C:\program files\jetbrains\intellij idea
community edition 2021.2\bin\idea64.exe
DisplayName : IntelliJ IDEA Community Edition 2021.2
Description : IntelliJ IDEA Community Edition 2021.2
DisplayGroup :
Group :
Enabled : True
Profile : Private
Platform : {}
Direction : Inbound
Action : Allow
EdgeTraversalPolicy : DeferToUser
LooseSourceMapping : False
LocalOnlyMapping : False
Owner :
PrimaryStatus : OK
Status : The rule was parsed successfully from the store. (65536)
EnforcementStatus : NotApplicable
PolicyStoreSource : PersistentStore
PolicyStoreSourceType : Local
Name : UDP Query User{1AE9E9C6-02EF-4C65-8781-B1050740E936}C:\program files\jetbrains\intellij idea
community edition 2021.2\bin\idea64.exe
DisplayName : IntelliJ IDEA Community Edition 2021.2
Description : IntelliJ IDEA Community Edition 2021.2
DisplayGroup :
Group :
Enabled : True
Profile : Private
Platform : {}
Direction : Inbound
Action : Allow
EdgeTraversalPolicy : DeferToUser
LooseSourceMapping : False
LocalOnlyMapping : False
Owner :
PrimaryStatus : OK
Status : The rule was parsed successfully from the store. (65536)
EnforcementStatus : NotApplicable
PolicyStoreSource : PersistentStore
PolicyStoreSourceType : Local
Name : {386E3B53-5E4D-4939-8114-74499BDA8515}
DisplayName : IntelliJ IDEA Community Edition 2021.2
Description : IntelliJ IDEA Community Edition 2021.2
DisplayGroup :
Group :
Enabled : True
Profile : Public
Platform : {}
Direction : Inbound
Action : Block
EdgeTraversalPolicy : Block
LooseSourceMapping : False
LocalOnlyMapping : False
Owner :
PrimaryStatus : OK
Status : The rule was parsed successfully from the store. (65536)
EnforcementStatus : NotApplicable
PolicyStoreSource : PersistentStore
PolicyStoreSourceType : Local
Name : {63ED0AB1-12B9-47F2-9810-D1D446EBF9D8}
DisplayName : IntelliJ IDEA Community Edition 2021.2
Description : IntelliJ IDEA Community Edition 2021.2
DisplayGroup :
Group :
Enabled : True
Profile : Public
Platform : {}
Direction : Inbound
Action : Block
EdgeTraversalPolicy : Block
LooseSourceMapping : False
LocalOnlyMapping : False
Owner :
PrimaryStatus : OK
Status : The rule was parsed successfully from the store. (65536)
EnforcementStatus : NotApplicable
PolicyStoreSource : PersistentStore
PolicyStoreSourceType : Local
Step 2: Remove blocking inbound traffic to IDEA (right)
When I disable those two Public inbound rules, and have the new added WSL inbound rule in place, then IDEA can run Java correctly where it was failing with the connection error before.
You can achieve the same disabling/removal of these two inbound Public rules for IDEA by one of the following methods:
Option 1: Windows Defender Firewall with Advanced Security > Inbound Rules
In the view as shown in the image above, right click the rules and select "Disable Rule" for each inbound rule on the Public profile.
Option 2: Disable via PowerShell
You can disable the same two rules via PowerShell (as Administrator) with the following command:
Get-NetFirewallProfile -Name Public | Get-NetFirewallRule | where DisplayName -ILike "IntelliJ IDEA*" | Disable-NetFirewallRule
Option 3: Remove via PowerShell
You can remove the same two rules via PowerShell (as Administrator) with the following command:
Get-NetFirewallProfile -Name Public | Get-NetFirewallRule | where DisplayName -ILike "IntelliJ IDEA*" | Remove-NetFirewallRule
All three of these methods worked for me and allow me to have all Windows Firewall profiles (Domain, Private, Public) enabled, and Java now runs correctly in IDEA on WSL2 projects located in the WSL2 filesystem.
Update: I had to roll back from the latest 2021.2 version to 2021.1.3, because the latest version will "lose" it's ability to connect to the WSL2 filesystem until WSL is restarted.
I have both versions installed, but I had to edit the firewall rules to allow traffic to the 2021.1.3 program (curiously also named 2021.2 in the firewall!) and add the Public profile (was just Private) to the Allow rule.
In my case, setting correct Shell path of WSL 2.0 distro in Intelij's terminal settings path helped. Instead of wsl.exe set whole path for your distro ( I took path from Windows Terminal).
In my case, when I'm using Ubuntu 20.04, changing from wsl.exe to C:\WINDOWS\system32\wsl.exe -d Ubuntu-20.04 did the trick.
Had the same issue.
All the mentioned PowerShell commands, including the ones on the JetBrains site, didn't really help.
But what eventually did the trick was that Windows Defender's "Inbound Rules" panel. Had to just find all the Restrictive rules (i.e. the ones with "Action: Block") for both "idea64.exe" and "IntelliJ IDEA" and disable them.
Works like a charm.
Related
The server exited prematurely with exit code 1 GlassFish 4
I've been trying to start the glassfish server domain with the following command asadmin start-domain domain1 but the result wasn't the expected. This what the outputs is throwing out: Waiting for domain1 to start .Error starting domain domain1. The server exited prematurely with exit code 1. Before it died, it produced the following output: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0 Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file) where options include: -d32 use a 32-bit data model if available -d64 use a 64-bit data model if available -server to select the "server" VM The default VM is server. -cp <class search path of directories and zip/jar files> -classpath <class search path of directories and zip/jar files> A ; separated list of directories, JAR archives, and ZIP archives to search for class files. -D<name>=<value> set a system property -verbose:[class|gc|jni] enable verbose output -version print product version and exit -version:<value> Warning: this feature is deprecated and will be removed in a future release. require the specified version to run -showversion print product version and continue -jre-restrict-search | -no-jre-restrict-search Warning: this feature is deprecated and will be removed in a future release. include/exclude user private JREs in the version search -? -help print this help message -X print help on non-standard options -ea[:<packagename>...|:<classname>] -enableassertions[:<packagename>...|:<classname>] enable assertions with specified granularity -da[:<packagename>...|:<classname>] -disableassertions[:<packagename>...|:<classname>] disable assertions with specified granularity -esa | -enablesystemassertions enable system assertions -dsa | -disablesystemassertions disable system assertions -agentlib:<libname>[=<options>] load native agent library <libname>, e.g. -agentlib:hprof see also, -agentlib:jdwp=help and -agentlib:hprof=help -agentpath:<pathname>[=<options>] load native agent library by full pathname -javaagent:<jarpath>[=<options>] load Java programming language agent, see java.lang.instrument -splash:<imagepath> show splash screen with specified image See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details. Command start-domain failed. Btw I've already tried changing the network-listener-port number located inside glassfish folders C:\glassfish4\glassfish\domains\domain1\config\domain.xml from port 8080 to 4949 and it didn't work. Besides I also tried running the start-domain domain1 command in the asadmin batch file and nothing happened, the output still the same. Any idea how can I fix this out?
I tried to start it with asadmin.sh and it worked on Windows 10
VS Code on Chromebook Penguin with Remote SSH: Could not establish conntection to the "servername", the VS Code Server failled to start
I installed VS code on Penguin on an Acer Chromebook R11. I followed the steps for Debian here : https://code.visualstudio.com/docs/setup/linux It works like a charm but I need to connect to my remote dev server using the official extension RemoteSSH by Microsoft. Then I configured a .ssh folder for the user with correct permissions : https://gist.github.com/grenade/6318301 Now I get : Could not establish conntection to the "servername", the VS Code Server failled to start The detailled log is : [11:39:39.572] Resolver error: The VS Code Server failed to start [11:39:39.609] TELEMETRY: {"eventName":"resolver","properties":{"outcome":"failure","reason":"ExitCode","askedPw":"0","askedPassphrase":"1","asked2fa":"0","askedHostKey":"0","gotUnrecognizedPrompt":"0","remoteInConfigFile":"1"},"measures":{"resolveAttempts":1,"exitCode":32,"retries":1}} [11:39:39.620] ------ I don't have any idea of what it could be. Do you have one ?
I was having a similar issue and I resolved it by deleting the ".vscode-server" directory that was created on my server. It's a hidden directory that is created in the home directory (you can use "ls -la" to display all the files I believe). My hunch is that some incorrect data is being cached there so deleting the directory will give you a clean slate. After deleting, you can try connecting again through remote-ssh on vscode.
How do I get Windows 10 Terminal to launch WSL?
I'm using the new Windows Terminal, and trying to get it to launch my WSL terminal. This is the setting that I'm trying to use: { "acrylicOpacity" : 0.75, "closeOnExit" : true, "colorScheme" : "Campbell", "commandline" : "%LOCALAPPDATA%/wsltty/bin/mintty.exe --WSL= --configdir='%APPDATA%/wsltty' -~ ", "cursorColor" : "#FFFFFF", "cursorShape" : "bar", "fontFace" : "Consolas", "fontSize" : 10, "guid" : "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", "historySize" : 9001, "icon" : "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png", "name" : "wsl", "padding" : "0, 0, 0, 0", "snapOnInput" : true, "startingDirectory" : "%USERPROFILE%", "useAcrylic" : true } But all it's doing is opening some sort of CMD. What's the correct command to run the WSL terminal Edit: I did notice that the GUID was the same thing as the regular CMD, so I changed that. Then it did launch an external shell.
You need to do following things first. 1. Install Linux (e.g. Ubuntu) Search "Ubuntu" in the Microsoft store, then buy and install. This is actually WSL (Windows Subsystem for Linux). Of course, you want to experience other versions of Linux, as well as Debian: 2. Enable WSL permissions After installing the WSL version of Linux, you also need to enable WSL permissions: Open another PowerShell window with "Run as Administrator". Then enter the following command: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux After the command is completed, you can execute the Linux command in the built-out Terminal. First enter ubuntu in cmd, take a little time to start Ubuntu, set the username and password. Then you can play with Ubuntu happily. Below I entered a few common commands such as ps, touch, ls etc., as shown below. 3. Change settings Click "Settings" in right top corner of above image, the file profile.json file will be opened. Then inside the word "profiles" in profile.json file, add below snippet. { "guid": "{78e390db-1bff-4533-9d7c-20f53d8bafa1}", "name": "WSL", "colorscheme": "Campbell", "historySize": 9001, "snapOnInput": true, "cursorColor": "#FFFFFF", "cursorShape": "bar", "commandline": "wsl ~", "fontFace": "Consolas", "fontSize": 12, "acrylicOpacity": 0.75, "useAcrylic": true, "closeOnExit": false, "padding": "0, 0, 0, 0" } Near the word "schemes" in profile.json file, you need to update below: "schemes": [ { "name": "Campbell", "foreground": "#A7B191", "background": "#0C0C0C", "colors": [ "#0C0C0C", "#C50F1F", "#13A10E", "#C19C00", "#0037DA", "#881798", "#3A96DD", "#CCCCCC", "#767676", "#E74856", "#16C60C", "#F9F1A5", "#3B78FF", "#B4009E", "#61D6D6", "#F2F2F2" ] } The complete setting file (profile.json) which can be obtained here. Actually, the WSL here is Ubuntu. 4. Add icons to different types of tabs You can add icons for Tab to this location: %LOCALAPPDATA%\packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState I put some 32x32 PNG in this folder, and then in profile.json I can reference the image resource with the path starting with ms-appdata:// . The icon is available here: Icons Then replace the contents of the new profile-withIcons.json file below with the previous settings. profile-withIcons.json After finishing the contents of the folder is like this: The final result is:
To launch any distribution, you can also use this for commandline: wsl.exe -d <name_of_the_distribution> Like : wsl.exe -d Ubuntu-18.04 You can list all distributions with : wsl.exe -l . PS : Tux icon for Linux : ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png
Turns out that all I needed to do was change the commandline to ubuntu1804.exe. Like this: { "acrylicOpacity" : 0.75, "closeOnExit" : true, "colorScheme" : "Campbell", "commandline": "ubuntu1804.exe", "cursorColor" : "#FFFFFF", "cursorShape" : "bar", "fontFace" : "Consolas", "fontSize" : 10, "guid" : "{0caa0dad-35be-5f56-a8ff-abceeeaa6101}", "historySize" : 9001, "icon" : "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png", "name" : "wsl", "padding" : "0, 0, 0, 0", "snapOnInput" : true, "startingDirectory" : "%USERPROFILE%", "useAcrylic" : false }
While my answer is off-question (since answered by the O.P.) I found this question while searching for adding a Windows Terminal (WT) profile for my recent Ubuntu installation, since I had recently re-imaged my laptop. Updated 19/10/03: Installation order does not matter. My profile for โubuntuโ appears after installing ubuntu, and then launching the ubuntu instance in PowerShell and establish my user account and password. THEN Windows Terminal adds the appropriate shell profile for WSL.
I have developed a tool for tweaking the terminal configurations here : Windows Terminal Tweaker ๐โก It lets you add different profiles , gives color pickers to choose color schemes and provides options to tweak every single thing while applying the settings live.
Open settings Change the "Default Profile" in the drop down. Click "Save" on the bottom right.
Create a new profile in the windows terminal settings and select the following command line C:\Windows\system32\wsl.exe -d Ubuntu-20.04 where -d selects the distribution to be run.
Windows Terminal allows you to open the settings and change things there. If you already have ubuntu installed, it should be an option to set the ubuntu profile as your default config. Copy paste the guid for ubuntu into the defaultProfile and it will automatically launch WSL ubuntu instead of powershell by default.
The premise of the question was fouled by the mistake with the GUID, as the OP says the sample code was actually correct. So, the question could be re-interpreted as-- What is the minimum required change to the default settings.json to point to an application of your choosing? (which is what got me here) guid - has to be unique. I've had success with changing just the last number for each customization. commandline - From within Bravo Yeung's answer is a link to a sample settings.json file: "commandline": "wsl ~" This little bitty value is made possible by setting a default distro: "The default WSL distribution is the one that runs when you run wsl on a command line:" wsl --setdefault <DistributionName> However, seems commandline:wsl doesn't work with startingDirectory. I've successfully omitted commandline in favor of source + startingDirectory: // Make changes here to the cmd.exe profile. "guid": "{long-guid-here}", "hidden": false, "name": "Debian", "tabTitle" : "WSL (Debian)", "source": "Windows.Terminal.Wsl", "startingDirectory" : "C:\\Users\\myuser" Here is a good link which got me started the first time I installed Windows Terminal and customized the settings, Easily add Anaconda Prompt to Windows Terminal to make life better
Recent versions of Windows Terminal include support for Dynamic Profiles, in which new WSL distros will automatically be added to the list of available profiles. However, if Windows Terminal is running when you install the new distro, it will not currently get added while running. You must exit and re-start Windows Terminal, and the new profile will automatically appear. Once it is added, you can edit/move it using the Settings dialog or by editing settings.json as usual. Each WSL distro is identified using a GUID which will have been auto-populated. As described in the linked article, Dynamic Profiles can be turned off by disabling their source(s) such as the following in settings.json: "disabledProfileSources": ["Windows.Terminal.Wsl", "Windows.Terminal.Azure", "Windows.Terminal.PowershellCore"]
How to connect a database in Atom Editor?
I want to connect my database in atom and execute directly from the editor. How can I do that?
Install a package "data-atom" Reference. You can do it in two ways : 1.Through command line (windows) : apm install data-atom make sure you have ssl false, if not then type apm config set strict-ssl false before "apm install" 2.Open atom and go to settings and click on "+Install" and look for "data-atom" package. Once you downloaded, restart atom and do "alt+shift+r" to open database window. Fill in the configuration and you are good to go. Hope this helps
Install data-atom as recommended already by Sdembla. But beware, the recommended commands in the documentation for these packages do not work, until you first use "Edit connections", to create a connections file for it to work with. Interestingly this also applied to the "data-ace" Atom package. The exact steps (assuming you've installed the data-atom package, and restarted Atom) are... click Packages > Data Atom > Edit connections replace the generic file contents ("[ ]") with a connection config, like that shown in guzman's question here: [ { name: "WindowsAuthentication" protocol: "sqlserver" user: "username" password: "password" server: "apphost/Username" database: "master" options: "" } { name: "SQLServerAuthentication" protocol: "sqlserver" user: "userlogin" password: "password" server: "apphost/sqlexpress" database: "master" options: "" } ] the other commands (eg ctrl-shift-R) should now work ๐ it's important you Save this connections file, otherwise the commands will stop working again.
epmd error for host myhost: address (cannot connect to host/port) on windows 10
I am trying to install rabbitmq. The installation of both erlang i.e OTP 18.1 file was done successfulyl and also rabbitmq installation completed successfully. But when I try to connect rabbitmq, I get the following error: C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.5.6\sbin>rabbitmq-plugins.bat enable rabbitmq_management Plugin configuration unchanged. Applying plugin configuration to rabbit#INLN50899724A... failed. * Could not contact node rabbit#INLN50899724A. Changes will take effect at broker restart. * Options: --online - fail if broker cannot be contacted. --offline - do not try to contact broker. C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.5.6\sbin>rabbitmq-server restart ERROR: epmd error for host INLN50899724A: address (cannot connect to host/port) Click below to see the image containing error Error Empd Rabbitmq
I may be replying really late, but still I'm facing this issue. So it may help somebody event while installing rabbitmq version 3.6.5. To change the node name, open "rabbitmq-env.bat" under "installation dir\sbin" and change RABBITMQ_NODENAME to "rabbit#localhost" (line number 90 in rabbitmq 3.6.5). But make sure you remove the windows service, do change the nodename, install service and start it. This worked for me. No other options worked for me which were marked as right answer in stackoverflow!
Remove the RabbitMQ service. Uninstall RabbitMQ. Kill the epmd.exe process. Delete your c:\users\\AppData\Roaming\RabbitMQ Directory. Go to Control Panels -> System -> Advanced -> Environment Variables Add a variable named RABBITMQ_NODENAME and set it to rabbit#localhost Reinstall RabbitMQ. Navigate to the RabbitMQ sbin directory (or run the command from the start menu) and run rabbitmqctl status. You should no longer see the (cannot connect to host/port) error. And yes, this will fix your Cisco AnyConnect VPN related installation issues.
open C:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.15\sbin\rabbitmq-server.bat Add the below command as the first line in set RABBITMQ_NODENAME=rabbit#localhost refer attached image
For Windows Machine: Go in C:\Users\<YourUserName>\AppData\Roaming\RabbitMQ Create a file rabbitmq-env.conf Add the following: CONFIG_FILE=C:\Users\<YourUserName>\AppData\Roaming\RabbitMQ\rabbitmq NODE_IP_ADDRESS=127.0.0.1 NODENAME=rabbit#localhost The above is my env-config, for this particular issue setting the nodename will be sufficient. Turn off you firewall & start the rabbitmq, it will work. After running it one time, even if you turn on the firewall, it will work. This works for me in Windows 10 machine.
in your shell $ export RABBITMQ_NODENAME=rabbit#localhost $ /sbin/rabbitmq-server -detached
change rabbit#INLN50899724A to rabbit#localhost and try again.
Or, edits your hosts file so that INLN50899724A points to 127.0.0.1
For using rabbit mq on windows 10 for similar error I did below set RABBITMQ_NODENAME=rabbit#localhost in the path where rabbit MQ is installed i.e for me it was in C:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.5\sbin> and then started .\rabbitmq-server start Also, I had changed the host to point to my computer name in c:\Windows\System32\Drivers\etc 127.0.0.1 yourhostnamehere