![]() You can use the same username as you use on MacOS to make custom scripting easier for yourself later. You will be asked for a username and password because it’s a new instance of linux. To get a modern shell on windows you must install WSL. ![]() If you prefer to do it manually then read on!□ Use WSL2 and Windows Terminal on Windows This set of scripts will setup your entire dev environment on all your computers - Windows or Mac! You can customize them to suit your needs. If you want to easily install and configure all these tools in one command please check out my solution. It took me around 30 hours to investigate and configure all of these tools on MacOS and Windows WSL. I’ll also show settings to change, aliases and scripts that will make the terminal more productive for you. New cat (bat) on the same file - syntax highlighting and formattingīut tooling is just half the story. New ls (Exa) - git aware with icons and colour hints Let’s go! A quick look at default Vs modern terminal tools This article also explains all the tools I use and how I keep the same terminal setup consistent on MacOS and Windows! Keeping any shell changes you make on one machine up to date on all the machines you code on is a nightmare without the right tooling. Keeping developer experience consistent across machines Terminal prompts can be made git aware and use colour to indicate state so you don’t have to query git so often. You can replace tools like ls or cat with modern equivalents that support full colour, unicode icons, git state and more. But other developer tooling has advanced quite a bit since then. Many of the terminal tools that come with unix environments are functionally similar to how they were 20 years ago. The latest version lets you run a full Ubuntu instance that integrates seamlessly with the underlying windows instance.īy using WSL2 you can have a (mostly) identical developer experience jumping between MacOS and Windows. Windows “WSL” (Windows Subsystem for Linux) is a great tool for this you can use on Windows 10 and newer. I need to use the same tools and the same experience on both. Emacs 24 (included with Ubuntu 14.04) doesn't seem to work with XMing I had to install a newer version as suggested in this post.I regularly code on both MacOS and Windows machines and I was always annoyed how different the default experiences are on each.Note that XMing has to be running for the script to work in order to start it automatically with Windows you can follow the instructions in this article.So it's convenient to put it in C:\Users\foo, for example. The ~ starts bash in your home directory, you can remove it to start in whatever directory the.Run the following in a shortcut or in the Run prompt (as suggested in the comments): powershell -windowstyle hidden -Command "iex \"bash ~ -c 'DISPLAY=:0 xfce4-terminal'\" " This will allow you to start xfce4-terminal properly from bash, but is orthogonal to the command below. In Bash for Windows, install the terminal: sudo apt-get install xfce4-terminal.It took a little while to figure out all the implied steps in the other answers, so here's a step by step summary: WScript.CreateObject("WScript.Shell").run('bash.exe -l -c "DISPLAY=:0.0 xfce4-terminal"', 0, false) ![]() ![]() Here's that same script, but a JScript version. I then pinned that to my taskbar and it's almost seemless.ĮDIT: The answer with VBScript is brilliant. I did this in C# - basically use arguments "UseShellExecute" false and "CreateNoWindow" true. PS: to make launching xfce4-terminal painless and without the extra bash cmd window, I wrote a program that does nothing but start the bash process with arguments to start xfce4-terminal without a console window. It is also possible to start an SSH server in Bash-on-Linux-on-Windows and then connect to it, say from MinTTY like from Cygwin. I am very happy with this setup and use NeoVim + lots of native linux plugins even though my "for-work" machine must be Windows. I also installed compiz and I use the cbwin project to run windows programs from my xfce4-terminal shell. export DISPLAY="localhost:0"ĭo the fix from this reddit for dbus: sudo sed -i 's$.*$tcp:host=localhost,port=0$' /etc/dbus-1/nf I found I needed to add these to my bashrc. I personally do the latter: use VcXsrv as my X server in multiple windows mode, then launch the xfce4-terminal (because gnome-terminal had visual issues that I didn't care to try to learn how to fix), and suddenly I have a competent terminal with font and color support.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |