151 points · by apitman · 4y ago · 203 comments
We definitely have cracking articles here from time to time (legal ones with responsible discosure or hacks of defunct games or software), even cyber writeups.
Hacking just means, hacking together. Its your weekend project to wire up your flower beds to your computer so you can monitor on your phone.
The majority of hackers are not people in cyber gangs perpetrating crimes, they are more like tinkerers.
There are lots of software people who absolutely do not hack in their free time, and lots of hackers who are nor software engineers. Hackers tend to build some great stuff, though, so you do see it in industry stuff a lot.
1) As a 'Store' app, it can be a pain to install in locked-down corpo networks that block Windows Store. Winget can be a workaround, or you can extract the exe from packages, but an installer would be nice.
2) Since it's a UWP app, there's no way to launch it as another user-identity (i.e. runas)
`choco install microsoft-windows-terminal`
Terminal itself can't be runas but e.g. cmd.exe or pwsh.exe inside of it can be.
I basically would just like to be able to dock that new window in the existing terminal tabs, as otherwise, I might as well just launch a PoSH prompt.
If you want to get real hacky in the meantime you can run the ssh server service and have a short alias to ssh to localhost as a user but now you have that extra abstraction between to deal with.
This is possible, the only issue is that the app needs to also be installed on the other user’s profile. Once installed for the user you can use runas.exe to start wt.exe as another user. I believe the UX from the right menu needs improvement but it is possible.
https://github.com/microsoft/terminal/releases/tag/v1.12.109...
>>Installing and running Windows Terminal
Note: Windows Terminal requires Windows 10 2004 (build 19041) or later
Microsoft Store [Recommended]Install the Windows Terminal from the Microsoft Store. This allows you to always be on the latest version when we release new builds with automatic upgrades.
This is our preferred method.
Other install methods
Via GitHub
For users who are unable to install Windows Terminal from the Microsoft Store, released builds can be manually downloaded from this repository's Releases page.
Download the Microsoft.WindowsTerminal_<versionNumber>.msixbundle file from the Assets section. To install the app, you can simply double-click on the .msixbundle file, and the app installer should automatically run. If that fails for any reason, you can try the following command at a PowerShell prompt:<<
All new application in $current_year should install as $current_user_scope by default. I hate how applications (looking at you, Google Chrome) try to install a scheduled task to keep itself updated. All of this should be up to the package manager. If I want to update the client application, I will do so myself.
choco install microsoft-windows-terminalIt's a decent terminal emulator, but could use several enhancements and the community could help.
For some reason I haven't changed to iTerm yet, even though it's been objectively better in every way for years. Even the minor gripe I had with font rendering is fixed.
There's something about using default apps as much as possible that appeals to me. But Terminal.app is lagging compared to the competition.
It's the only modern terminal that passes the VT torture test. It supports double width and double height characters (great for terminal error messages).
It doesn't support overline (which is awesome for status lines at the bottom of the screen) and requires font support for line drawing and block graphics (Unicode 13 introduced 2x3 blocks and the next one will introduce 2x4s).
> There's something about using default apps as much as possible that appeals to me
For me it's one less thing to distract my distraction-prone brain.
[1]: https://www.invisible-island.net/vttest/
EDIT to add: vttest is maintained by the current maintainer of xterm. It's the "torturiest" VT test I know of.
This is bellyaching about nothing. Instead, Microsoft should follow Apple's example and open source the operating system. The only part of macOS that is not open source is the GUI, i.e. Quartz Compositor, and the gui applications. Microsoft, meanwhile, is an incredible slouch when it comes to open source, only very recently changing their hostile "embrace, extend, extinguish" stance towards OSS.
1. Apple did not open-source MacOS. Hell, I can't even buy a copy of it and run it on a PC but instead I have to buy Apple HW to get it, while at least I can download a copy of Windows and run it (even unregistered) on any cheap PC HW and develop SW for it, without paying for Microsoft hardware, or even for the OS itself (gray legal area), unlike Apple where the only way I can run MacOS and develop SW for it is by buying Apple hardware which is a far more restrictive way, from a monetary perspective, to get someone on board
2. Microsoft cannot open-source Windows as it contains a lot of third party code for which it has no licensing rights to open source. They've explained this multiple times. I assume the same applies to modern MacOS.
But every release Apple releases more open source software.[1] No other proprietary operating system vendor releases more open source than Apple.
So, yeah, you're just wrong.
I generate a .dfont without outline data based on a tweaked version of my favorite bitmap font, in Font Forge.
Now, if there is a way you can pre-render your favorite outline font to a bitmap and write it as a .dfont without outlines (other extensions may be fine, not sure though), you could switch back to Terminal.app. But font tools on GitHub etc. are very very few and never work that well, if they even do what they advertise at all.
(iterm2 is great too)
The way I understand this project is essentially "an interface" to the new ConPTY they developed (which IIRC is closed source, naturally).
That doesn't make it any lesser. I've used it since a build was available, 4 years ago or something. I love it.
EDIT: Found it ! https://devblogs.microsoft.com/commandline/windows-command-l...
In this repo, you can find some of our terrible secrets and workarounds and debugging hooks and perhaps even some explanation for why things work the way they do. Or don't work the way they should.
If you’re looking for a good[2] way to spend a few minutes, search for “LOAD BEARING” :)
[1]: If you build the “Host.EXE” project and copy the resulting OpenConsole.exe over %WINDIR%\System32\conhost.exe, it’ll work just fine and you’ll pick up a bunch of the console changes we’ve made in the past few years.
[2] Goodness not guaranteed, void where prohibited, etc.
EDIT: Oh, kaelinl mentioned this in a sibling comment to yours. Sorry about that! I've also reworded parts of the main comment body to flow better.
Thank you and every one of your team members for the excellent work you guys have been doing on this. You have brought so much joy to working and living w/ Windows.
There are a bunch of bugs in Windows core that I can't even get anyone to look at (and I'm an MVP). With these little bits they've opened sourced you can actively participate in helping the team fix the bugs, and add features as needed.
I know the team on Terminal had a whole muddle of problems to do with rendering recently that probably still needs some outside input. Even Microsoft's developers can't and don't know all the best ways to carry out tasks with their own APIs - there is just too much to learn.
Not saying these are good reasons, but in a company whose main products are closed-source software, I'd expect some PM to make these objections.
I'm sure the flipside of that, that lots of people looking at the code will uncover the vulnerability and fix it, more than compensate for that.
> It might contain copied code that Microsoft doesn't have the right to distribute.
This is why opensourcing an existing codebase can be complicated, but, if you start something managing the licenses of included code, then it's not a huge issue.
> in a company whose main products are closed-source software, I'd expect some PM to make these objections.
I'm sure they'll never opensource Exchange, SharePoint, or SQL Server.
There are only positive outcomes here
And tmux works.
When Windows Terminal is running cmd or Powershell underneath, there is zero emulation going on.
I don’t know when, but since their features have increasingly become divorced from any terminal (other than similar software) that they might be “emulating”, it makes sense.
I would also like to add, that I am puzzled, that Microsoft has not been able to deliver a proper shell, that is comparable to …sh and delivers remote access like ssh. Yes, Powershell, but not by a long shot. And for some things you still need cmd!
It works really nice with WSL, for example I have configured each OS to have its default font and wallpaper :)
I feel a bit bad about posting comments about it relatively frequently on HN, but it's just so very very good, and snark aside, his perspective is extremely valuable.
The Terminal team have a path forward to implement strong performance improvements based on techniques like those Casey described, and are working on those improvements now, I'm told.
Microsoft haters will continue to say all kinds of stuff no matter what Microsoft does, so Microsoft isn't doing this to appease anyone; it's just performance work that they didn't understand was as easily reached as it is, and they built the Terminal in wrong ways the first time around. Anyway, it's being fixed.
I've never worked at Microsoft but I've worked with a lot of MS employees throughout my career and I wish I could convey just how much the goals of the individual employees line up with people like us. The developers at Microsoft are people like us. Extremely and intentionally caustic feedback on Microsoft stuff does nothing but give those employees good reason to stop working on the projects they love, but which also get the most attention, like Terminal. This necessarily produces a worse outcome for the project.
I wish I could make the extremely vocal and vitriolic people understand that their vitriol is counterproductive in the extreme, and makes everything worse.
Instead of just personalizing his critique (ignoring that Casey makes it easy to do that), think of it this way: why hasn't Microsoft leadership, running a multi-billion dollar company for decades, already devoted appropriate resources to create an essentially perfect terminal/console, something so discrete and simple and fixed in feature-set?
Also, I don't put much stock in the complaint about Casey's license choice. He made plenty of educational content delving into the design and implementation details, and one of his major points is that non-pessimisation implementations such as his have so little code in the first place.
Why does Microsoft prevent its developers from reading GPL-licensed code?
I’ve managed 9-figure relationships with different software companies. Microsoft plays dirty, both with their own people, who have unachievable goals that encourage douche behavior, and with the customer.
I feel for the folks on the ground. The engineers crank out amazing work. But part of working for a company that essentially taxes every global business and government is having a thick skin.
I hope Microsoft will award him an honorary PhD though.
Ha, yes, his impromptu "PhD research project" went quite well.
https://github.com/microsoft/terminal/search?q=Telemetry%3A%...
https://github.com/microsoft/terminal/blob/main/src/host/tel...
Practically any Android app these days would be considered "spyware" if we were still applying the "spyware" definition of the early 2000s. And we would be better off if we had never stopped.
https://github.com/microsoft/terminal/blob/57c3953aca49f68ac...
https://github.com/microsoft/terminal/blob/2b202ce6d99340401...
ETW is explicitly opt-in on windows and is almost exclusively used for debugging, not to mention it requires a kernel mode driver to be loaded.
https://nasbench.medium.com/a-primer-on-event-tracing-for-wi...
I have not read all the code, but from a brief overview this tracing behavior and telemetry wouldn't be automatically activated anywhere except on Azure.
Imagine if every .exe and every .dll did that! That's not OK!
With web applications every single round trip to the server is logged, inherently, and there are far more than one round trip to the server than there are page loads, I assure you. So it's ok there? "oh that's just logging, not telemetry." That's what telemetry is!
Google and Facebook track you (collect telemetry on you) across the entire web whether or not you use Google or Facebook AT ALL, and they each collect more information than Microsoft ever could. Google and Facebook do far worse things than Microsoft has ever done, but because they didn't ship a browser with their OS in the 1990s, they get a pass on everything, apparently.
I don't get it. the lies we tell ourselves are worse than anything anyone else could ever do to us, but we tell them to ourselves anyway because it is acceptable to crap on Microsoft, for imaginary reasons, and it isn't acceptable to crap on the companies doing the real bad stuff.
humanity is doomed. we are literally a garbage species.
Asking for feedback doesn't work because that inflates the vocal minority.
Awful.
Maybe quit using file extensions instead of calling things libraries and executables?
But seriously, since Microsoft is sharing the source code, why not just remove the unwanted telemetry and re-compile.
How easy would that be.
1 : [intransitive] to collect secret information about another country, organization or person
I think some people will have a hard time with this concept, but the idea of data being “private” or “secret”, by default, is disappearing. And it won’t be coming back if the world continues to digitize.
If you want those attributes for your data, you’ll have to take measures. That means reading user agreements, verifying open source, using encryption intentionally.
Vacuuming up data is not spying. Especially if you essentially agree to it when you accept the Windows terms of service (ethical issues of this aside).
I wish there was way everywhere to collect with privacy and being accepted by user as not something we want to spie people on... but as always there is (a lot ) of abuse in this area so this may never going to happen
Has anyone tried just showing people the information the application would like to report back? I know it's been tried with crash reports.
No, actually, on account of being a software dev, I know that telemetry is actively counterproductive when making decisions on how to make things. It makes your decisions more wrong, not less.
even as OSS software maker, would you start working on features because they are "cool" or a bunch of people yelling^H^Hasking for it on twitter?
There are real costs to not being able to trust your own local computer and personal information. History is rife with examples, from IBM and internment during WWII to the malware and NSA of modern times. Data is no longer deleted.
Let's take a look at `windowio.cpp` for example. This most-generic event fires every time you type any input character on the keyboard: https://github.com/microsoft/terminal/blob/57c3953aca49f68ac...
It also has more-specific events for several different ways of selecting, copying, and pasting text: https://github.com/microsoft/terminal/blob/57c3953aca49f68ac...
In `find.cpp` we can see it log every time you find the next result in the "Find" dialog, as well as when the dialog is closed: https://github.com/microsoft/terminal/blob/57c3953aca49f68ac...
In `windowproc.cpp` we can see it log every time you resize a console window, close a console window, bring up the context (right-click) menu, drag-and-drop on to a console window:
- https://github.com/microsoft/terminal/blob/57c3953aca49f68ac...
- https://github.com/microsoft/terminal/blob/57c3953aca49f68ac...
- https://github.com/microsoft/terminal/blob/57c3953aca49f68ac...
- https://github.com/microsoft/terminal/blob/57c3953aca49f68ac...
This even extends outside the "Terminal" application wrapper itself, with a generic "LogApiCall" used to track e.g. any time any other process spawns a console window:
- https://github.com/microsoft/terminal/blob/57c3953aca49f68ac...
- https://github.com/microsoft/terminal/blob/57c3953aca49f68ac...
Click around a few of the search results and see what else you can find!
For all the folks who say it's all totally innocuous (or even beneficial). Even if it is, I can tell you, I have no interest in my computer doing this while I'm using it.
Each of the calls you link to sets a boolean here: https://github.com/microsoft/terminal/blob/57c3953aca49f68ac...
It does not transmit what you copy, search for or when you clicked/resized/closed the window. It simply stores a true/false value saying "feature X was used". In some cases, like with find/replace, it also stores the average length of things you searched for. That is a common way for developers to get an idea if performance characteristics due to the longest common substring problem[1]
You are trying to spread misinformation here to make Microsoft look like a bad guy. There is nothing sinister going on here, it is just ordinary metric collection.
But don't take my word for it. Take for example the "we can see it log every time you resize a console window" statement. In the link it calls SetWindowSizeChanged()[2] which again calls SetUserInteractive()[3] and it just sets a boolean to true.
So there is no "log every time it resize a console window". It simply sets a variable to true, which presumably the Windows Terminal dev team use to see how many users use the console with interactive sessions.
[1] https://en.wikipedia.org/wiki/Longest_common_substring_probl...
[2] https://github.com/microsoft/terminal/blob/57c3953aca49f68ac...
[3] https://github.com/microsoft/terminal/blob/57c3953aca49f68ac...