From 87d1d16d949e845c872f3ba95380c3cb7a8c19e0 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 5 Nov 2020 05:12:01 +0800 Subject: [PATCH 001/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020170115=20?= =?UTF-8?q?Magic=20GOPATH?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20170115 Magic GOPATH.md --- sources/tech/20170115 Magic GOPATH.md | 119 ++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 sources/tech/20170115 Magic GOPATH.md diff --git a/sources/tech/20170115 Magic GOPATH.md b/sources/tech/20170115 Magic GOPATH.md new file mode 100644 index 0000000000..1d4cd16e24 --- /dev/null +++ b/sources/tech/20170115 Magic GOPATH.md @@ -0,0 +1,119 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Magic GOPATH) +[#]: via: (https://www.jtolio.com/2017/01/magic-gopath) +[#]: author: (jtolio.com https://www.jtolio.com/) + +Magic GOPATH +====== + +_**Update:** With the advent of Go 1.11 and [Go modules][1], this whole post is now useless. Unset your GOPATH entirely and switch to Go modules today!_ + +Maybe someday I’ll start writing about things besides Go again. + +Go requires that you set an environment variable for your workspace called your `GOPATH`. The `GOPATH` is one of the most confusing aspects of Go to newcomers and even relatively seasoned developers alike. It’s not immediately clear what would be better, but finding a good `GOPATH` value has implications for your source code repository layout, how many separate projects you have on your computer, how default project installation instructions work (via `go get`), and even how you interoperate with other projects and libraries. + +It’s taken until Go 1.8 to decide to [set a default][2] and that small change was one of [the most talked about code reviews][3] for the 1.8 release cycle. + +After [writing about GOPATH himself][4], [Dave Cheney][5] [asked me][6] to write a blog post about what I do. + +### My proposal + +I set my `GOPATH` to always be the current working directory, unless a parent directory is clearly the `GOPATH`. + +Here’s the relevant part of my `.bashrc`: + +``` +# bash command to output calculated GOPATH. +calc_gopath() { + local dir="$PWD" + + # we're going to walk up from the current directory to the root + while true; do + + # if there's a '.gopath' file, use its contents as the GOPATH relative to + # the directory containing it. + if [ -f "$dir/.gopath" ]; then + ( cd "$dir"; + # allow us to squash this behavior for cases we want to use vgo + if [ "$(cat .gopath)" != "" ]; then + cd "$(cat .gopath)"; + echo "$PWD"; + fi; ) + return + fi + + # if there's a 'src' directory, the parent of that directory is now the + # GOPATH + if [ -d "$dir/src" ]; then + echo "$dir" + return + fi + + # we can't go further, so bail. we'll make the original PWD the GOPATH. + if [ "$dir" == "/" ]; then + echo "$PWD" + return + fi + + # now we'll consider the parent directory + dir="$(dirname "$dir")" + done +} + +my_prompt_command() { + export GOPATH="$(calc_gopath)" + + # you can have other neat things in here. I also set my PS1 based on git + # state +} + +case "$TERM" in +xterm*|rxvt*) + # Bash provides an environment variable called PROMPT_COMMAND. The contents + # of this variable are executed as a regular Bash command just before Bash + # displays a prompt. Let's only set it if we're in some kind of graphical + # terminal I guess. + PROMPT_COMMAND=my_prompt_command + ;; +*) + ;; +esac +``` + +The benefits are fantastic. If you want to quickly `go get` something and not have it clutter up your workspace, you can do something like: + +``` +cd $(mktemp -d) && go get github.com/the/thing +``` + +On the other hand, if you’re jumping between multiple projects (whether or not they have the full workspace checked in or are just library packages), the `GOPATH` is set accurately. + +More flexibly, if you have a tree where some parent directory is outside of the `GOPATH` but you want to set the `GOPATH` anyways, you can create a `.gopath` file and it will automatically set your `GOPATH` correctly any time your shell is inside that directory. + +The whole thing is super nice. I kinda can’t imagine doing something else anymore. + +### Fin. + +-------------------------------------------------------------------------------- + +via: https://www.jtolio.com/2017/01/magic-gopath + +作者:[jtolio.com][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.jtolio.com/ +[b]: https://github.com/lujun9972 +[1]: https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more +[2]: https://rakyll.org/default-gopath/ +[3]: https://go-review.googlesource.com/32019/ +[4]: https://dave.cheney.net/2016/12/20/thinking-about-gopath +[5]: https://dave.cheney.net/ +[6]: https://twitter.com/davecheney/status/811334240247812097 From 9c94ccf65e39d949fbe4c4b7dea98534b240ec90 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 5 Nov 2020 05:12:19 +0800 Subject: [PATCH 002/334] =?UTF-8?q?=E9=80=89=E9=A2=98[talk]:=2020200628=20?= =?UTF-8?q?Roy=20Fielding's=20Misappropriated=20REST=20Dissertation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md --- ...ing-s Misappropriated REST Dissertation.md | 125 ++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md diff --git a/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md b/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md new file mode 100644 index 0000000000..0272e2eb43 --- /dev/null +++ b/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md @@ -0,0 +1,125 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Roy Fielding's Misappropriated REST Dissertation) +[#]: via: (https://twobithistory.org/2020/06/28/rest.html) +[#]: author: (Two-Bit History https://twobithistory.org) + +Roy Fielding's Misappropriated REST Dissertation +====== + +RESTful APIs are everywhere. This is funny, because how many people really know what “RESTful” is supposed to mean? + +I think most of us can empathize with [this Hacker News poster][1]: + +> I’ve read several articles about REST, even a bit of the original paper. But I still have quite a vague idea about what it is. I’m beginning to think that nobody knows, that it’s simply a very poorly defined concept. + +I had planned to write a blog post exploring how REST came to be such a dominant paradigm for communication across the internet. I started my research by reading [Roy Fielding’s 2000 dissertation][2], which introduced REST to the world. After reading Fielding’s dissertation, I realized that the much more interesting story here is how Fielding’s ideas came to be so widely misunderstood. + +Many more people know that Fielding’s dissertation is where REST came from than have read the dissertation (fair enough), so misconceptions about what the dissertation actually contains are pervasive. + +The biggest of these misconceptions is that the dissertation directly addresses the problem of building APIs. I had always assumed, as I imagine many people do, that REST was intended from the get-go as an architectural model for web APIs built on top of HTTP. I thought perhaps that there had been some chaotic experimental period where people were building APIs on top of HTTP all wrong, and then Fielding came along and presented REST as the sane way to do things. But the timeline doesn’t make sense here: APIs for web services, in the sense that we know them today, weren’t a thing until a few years after Fielding published his dissertation. + +Fielding’s dissertation (titled “Architectural Styles and the Design of Network-based Software Architectures”) is not about how to build APIs on top of HTTP but rather about HTTP itself. Fielding contributed to the HTTP/1.0 specification and co-authored the HTTP/1.1 specification, which was published in 1999. He was interested in the architectural lessons that could be drawn from the design of the HTTP protocol; his dissertation presents REST as a distillation of the architectural principles that guided the standardization process for HTTP/1.1. Fielding used these principles to make decisions about which proposals to incorporate into HTTP/1.1. For example, he rejected a proposal to batch requests using new `MGET` and `MHEAD` methods because he felt the proposal violated the constraints prescribed by REST, especially the constraint that messages in a REST system should be easy to proxy and cache.[1][3] So HTTP/1.1 was instead designed around persistent connections over which multiple HTTP requests can be sent. (Fielding also felt that cookies are not RESTful because they add state to what should be a stateless system, but their usage was already entrenched.[2][4]) REST, for Fielding, was not a guide to building HTTP-based systems but a guide to extending HTTP. + +This isn’t to say that Fielding doesn’t think REST could be used to build other systems. It’s just that he assumes these other systems will also be “distributed hypermedia systems.” This is another misconception people have about REST: that it is a general architecture you can use for any kind of networked application. But you could sum up the part of the dissertation where Fielding introduces REST as, essentially, “Listen, we just designed HTTP, so if you also find yourself designing a _distributed hypermedia system_ you should use this cool architecture we worked out called REST to make things easier.” It’s not obvious why Fielding thinks anyone would ever attempt to build such a thing given that the web already exists; perhaps in 2000 it seemed like there was room for more than one distributed hypermedia system in the world. Anyway, Fielding makes clear that REST is intended as a solution for the scalability and consistency problems that arise when trying to connect hypermedia across the internet, _not_ as an architectural model for distributed applications in general. + +We remember Fielding’s dissertation now as the dissertation that introduced REST, but really the dissertation is about how much one-size-fits-all software architectures suck, and how you can better pick a software architecture appropriate for your needs. Only a single chapter of the dissertation is devoted to REST itself; much of the word count is spent on a taxonomy of alternative architectural styles[3][5] that one could use for networked applications. Among these is the Pipe-and-Filter (PF) style, inspired by Unix pipes, along with various refinements of the Client-Server style (CS), such as Layered-Client-Server (LCS), Client-Cache-Stateless-Server (C$SS), and Layered-Client-Cache-Stateless-Server (LC$SS). The acronyms get unwieldy but Fielding’s point is that you can mix and match constraints imposed by existing styles to derive new styles. REST gets derived this way and could instead have been called—but for obvious reasons was not—Uniform-Layered-Code-on-Demand-Client-Cache-Stateless-Server (ULCODC$SS). Fielding establishes this taxonomy to emphasize that different constraints are appropriate for different applications and that this last group of constraints were the ones he felt worked best for HTTP. + +This is the deep, deep irony of REST’s ubiquity today. REST gets blindly used for all sorts of networked applications now, but Fielding originally offered REST as an illustration of how to derive a software architecture tailored to an individual application’s particular needs. + +I struggle to understand how this happened, because Fielding is so explicit about the pitfalls of not letting form follow function. He warns, almost at the very beginning of the dissertation, that “design-by-buzzword is a common occurrence” brought on by a failure to properly appreciate software architecture.[4][6] He picks up this theme again several pages later: + +> Some architectural styles are often portrayed as “silver bullet” solutions for all forms of software. However, a good designer should select a style that matches the needs of a particular problem being solved.[5][7] + +REST itself is an especially poor “silver bullet” solution, because, as Fielding later points out, it incorporates trade-offs that may not be appropriate unless you are building a distributed hypermedia application: + +> REST is designed to be efficient for large-grain hypermedia data transfer, optimizing for the common case of the Web, but resulting in an interface that is not optimal for other forms of architectural interaction.[6][8] + +Fielding came up with REST because the web posed a thorny problem of “anarchic scalability,” by which Fielding means the need to connect documents in a performant way across organizational and national boundaries. The constraints that REST imposes were carefully chosen to solve this anarchic scalability problem. Web service APIs that are _public-facing_ have to deal with a similar problem, so one can see why REST is relevant there. Yet today it would not be at all surprising to find that an engineering team has built a backend using REST even though the backend only talks to clients that the engineering team has full control over. We have all become the architect in [this Monty Python sketch][9], who designs an apartment building in the style of a slaughterhouse because slaughterhouses are the only thing he has experience building. (Fielding uses a line from this sketch as an epigraph for his dissertation: “Excuse me… did you say ‘knives’?”) + +So, given that Fielding’s dissertation was all about avoiding silver bullet software architectures, how did REST become a de facto standard for web services of every kind? + +My theory is that, in the mid-2000s, the people who were sick of SOAP and wanted to do something else needed their own four-letter acronym. + +I’m only half-joking here. SOAP, or the Simple Object Access Protocol, is a verbose and complicated protocol that you cannot use without first understanding a bunch of interrelated XML specifications. Early web services offered APIs based on SOAP, but, as more and more APIs started being offered in the mid-2000s, software developers burned by SOAP’s complexity migrated away en masse. + +Among this crowd, SOAP inspired contempt. Ruby-on-Rails dropped SOAP support in 2007, leading to this emblematic comment from Rails creator David Heinemeier Hansson: “We feel that SOAP is overly complicated. It’s been taken over by the enterprise people, and when that happens, usually nothing good comes of it.”[7][10] The “enterprise people” wanted everything to be formally specified, but the get-shit-done crowd saw that as a waste of time. + +If the get-shit-done crowd wasn’t going to use SOAP, they still needed some standard way of doing things. Since everyone was using HTTP, and since everyone would keep using HTTP at least as a transport layer because of all the proxying and caching support, the simplest possible thing to do was just rely on HTTP’s existing semantics. So that’s what they did. They could have called their approach Fuck It, Overload HTTP (FIOH), and that would have been an accurate name, as anyone who has ever tried to decide what HTTP status code to return for a business logic error can attest. But that would have seemed recklessly blasé next to all the formal specification work that went into SOAP. + +Luckily, there was this dissertation out there, written by a co-author of the HTTP/1.1 specification, that had something vaguely to do with extending HTTP and could offer FIOH a veneer of academic respectability. So REST was appropriated to give cover for what was really just FIOH. + +I’m not saying that this is exactly how things happened, or that there was an actual conspiracy among irreverent startup types to misappropriate REST, but this story helps me understand how REST became a model for web service APIs when Fielding’s dissertation isn’t about web service APIs at all. Adopting REST’s constraints makes some sense, especially for public-facing APIs that do cross organizational boundaries and thus benefit from REST’s “uniform interface.” That link must have been the kernel of why REST first got mentioned in connection with building APIs on the web. But imagining a separate approach called “FIOH,” that borrowed the “REST” name partly just for marketing reasons, helps me account for the many disparities between what today we know as RESTful APIs and the REST architectural style that Fielding originally described. + +REST purists often complain, for example, that so-called REST APIs aren’t actually REST APIs because they do not use Hypermedia as The Engine of Application State (HATEOAS). Fielding himself [has made this criticism][11]. According to him, a real REST API is supposed to allow you to navigate all its endpoints from a base endpoint by following links. If you think that people are actually out there trying to build REST APIs, then this is a glaring omission—HATEOAS really is fundamental to Fielding’s original conception of REST, especially considering that the “state transfer” in “Representational State Transfer” refers to navigating a state machine using hyperlinks between resources (and not, as many people seem to believe, to transferring resource state over the wire).[8][12] But if you imagine that everyone is just building FIOH APIs and advertising them, with a nudge and a wink, as REST APIs, or slightly more honestly as “RESTful” APIs, then of course HATEOAS is unimportant. + +Similarly, you might be surprised to know that there is nothing in Fielding’s dissertation about which HTTP verb should map to which CRUD action, even though software developers like to argue endlessly about whether using PUT or PATCH to update a resource is more RESTful. Having a standard mapping of HTTP verbs to CRUD actions is a useful thing, but this standard mapping is part of FIOH and not part of REST. + +This is why, rather than saying that nobody understands REST, we should just think of the term “REST” as having been misappropriated. The modern notion of a REST API has historical links to Fielding’s REST architecture, but really the two things are separate. The historical link is good to keep in mind as a guide for when to build a RESTful API. Does your API cross organizational and national boundaries the same way that HTTP needs to? Then building a RESTful API with a predictable, uniform interface might be the right approach. If not, it’s good to remember that Fielding favored having form follow function. Maybe something like GraphQL or even just JSON-RPC would be a better fit for what you are trying to accomplish. + +_If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][13] on Twitter or subscribe to the [RSS feed][14] to make sure you know when a new post is out._ + +_Previously on TwoBitHistory…_ + +> New post is up! I wrote about how to solve differential equations using an analog computer from the '30s mostly made out of gears. As a bonus there's even some stuff in here about how to aim very large artillery pieces. +> +> — TwoBitHistory (@TwoBitHistory) [April 6, 2020][15] + + 1. Roy Fielding. “Architectural Styles and the Design of Network-based Software Architectures,” 128. 2000. University of California, Irvine, PhD Dissertation, accessed June 28, 2020, . [↩︎][16] + + 2. Fielding, 130. [↩︎][17] + + 3. Fielding distinguishes between software architectures and software architecture “styles.” REST is an architectural style that has an instantiation in the architecture of HTTP. [↩︎][18] + + 4. Fielding, 2. [↩︎][19] + + 5. Fielding, 15. [↩︎][20] + + 6. Fielding, 82. [↩︎][21] + + 7. Paul Krill. “Ruby on Rails 2.0 released for Web Apps,” InfoWorld. Dec 7, 2007, accessed June 28, 2020,  [↩︎][22] + + 8. Fielding, 109. [↩︎][23] + + + + +-------------------------------------------------------------------------------- + +via: https://twobithistory.org/2020/06/28/rest.html + +作者:[Two-Bit History][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://twobithistory.org +[b]: https://github.com/lujun9972 +[1]: https://news.ycombinator.com/item?id=7201871 +[2]: https://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation_2up.pdf +[3]: tmp.Ewi4FpMIg6#fn:1 +[4]: tmp.Ewi4FpMIg6#fn:2 +[5]: tmp.Ewi4FpMIg6#fn:3 +[6]: tmp.Ewi4FpMIg6#fn:4 +[7]: tmp.Ewi4FpMIg6#fn:5 +[8]: tmp.Ewi4FpMIg6#fn:6 +[9]: https://www.youtube.com/watch?v=vNoPJqm3DAY +[10]: tmp.Ewi4FpMIg6#fn:7 +[11]: https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven +[12]: tmp.Ewi4FpMIg6#fn:8 +[13]: https://twitter.com/TwoBitHistory +[14]: https://twobithistory.org/feed.xml +[15]: https://twitter.com/TwoBitHistory/status/1247187881946275841?ref_src=twsrc%5Etfw +[16]: tmp.Ewi4FpMIg6#fnref:1 +[17]: tmp.Ewi4FpMIg6#fnref:2 +[18]: tmp.Ewi4FpMIg6#fnref:3 +[19]: tmp.Ewi4FpMIg6#fnref:4 +[20]: tmp.Ewi4FpMIg6#fnref:5 +[21]: tmp.Ewi4FpMIg6#fnref:6 +[22]: tmp.Ewi4FpMIg6#fnref:7 +[23]: tmp.Ewi4FpMIg6#fnref:8 From ef452145156c526365fb3d6d9580f1050ddce175 Mon Sep 17 00:00:00 2001 From: stevenzdg988 <3442417@qq.com> Date: Sun, 16 Jan 2022 10:27:25 +0800 Subject: [PATCH 003/334] Transit_20220116 --- ...t tutorials to level up your open source skills in 2022.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20220104 10 Git tutorials to level up your open source skills in 2022.md b/sources/tech/20220104 10 Git tutorials to level up your open source skills in 2022.md index bddb9da683..d264dcf136 100644 --- a/sources/tech/20220104 10 Git tutorials to level up your open source skills in 2022.md +++ b/sources/tech/20220104 10 Git tutorials to level up your open source skills in 2022.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/1/git-tutorials" [#]: author: "Manaswini Das https://opensource.com/users/manaswinidas" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "stevenzdg988" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -67,7 +67,7 @@ via: https://opensource.com/article/22/1/git-tutorials 作者:[Manaswini Das][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[stevenzdg988](https://github.com/stevenzdg988) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From a3ef7de03e928e0c1109984d32dabbf1c28bc53b Mon Sep 17 00:00:00 2001 From: stevenzdg988 <3442417@qq.com> Date: Sun, 16 Jan 2022 12:25:29 +0800 Subject: [PATCH 004/334] Translated --- ...evel up your open source skills in 2022.md | 94 ------------------- ...evel up your open source skills in 2022.md | 93 ++++++++++++++++++ 2 files changed, 93 insertions(+), 94 deletions(-) delete mode 100644 sources/tech/20220104 10 Git tutorials to level up your open source skills in 2022.md create mode 100644 translated/tech/20220104 10 Git tutorials to level up your open source skills in 2022.md diff --git a/sources/tech/20220104 10 Git tutorials to level up your open source skills in 2022.md b/sources/tech/20220104 10 Git tutorials to level up your open source skills in 2022.md deleted file mode 100644 index d264dcf136..0000000000 --- a/sources/tech/20220104 10 Git tutorials to level up your open source skills in 2022.md +++ /dev/null @@ -1,94 +0,0 @@ -[#]: subject: "10 Git tutorials to level up your open source skills in 2022" -[#]: via: "https://opensource.com/article/22/1/git-tutorials" -[#]: author: "Manaswini Das https://opensource.com/users/manaswinidas" -[#]: collector: "lujun9972" -[#]: translator: "stevenzdg988" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -10 Git tutorials to level up your open source skills in 2022 -====== -These articles contain hacks, lesser-known facts, and tips and tricks -that can come in handy while working with Git. -![Business woman on laptop sitting in front of window][1] - -Git is an indispensable part of the code-sharing development workflow. Be you a beginner or an expert, this powerful version control system is the first thing you are expected to learn when working with open source code. You don't need to know everything under the sun when it comes to Git, but knowing specific hacks makes sharing your code a lot easier on platforms like GitLab, so you can collaborate with developers far and near. If there's something you're not sure about, `git --help` can come to your rescue. - -I'm amazed every day by the amount of control that knowing Git provides. There is not a single instance when you can't revert to an earlier version, however impossible or sticky the situation you may be in. - -Opensource.com had a great set of articles regarding Git in 2021; I'm summarizing just the top 10. All the articles contain hacks, lesser-known facts, and tips and tricks that can come in handy while working with Git. - -### A practical guide to using the git stash command - -[Ramakrishna Pattnaik][2] explains the functions of the [git stash command][3]. This article highlights how `git stash` can help you list, check, save, and retrieve changes to ensure a hassle-free experience when switching branches. It can also help you track changes locally without committing and while maintaining a clean working directory. - -### 5 commands to level up your Git game - -[Seth Kenlon][4] details [five lesser-known Git commands][5] that can make your life easier. Developers can save time with commands like `git whatchanged, git stash, git worktree,` and `git cherry-pick` - -### What is Git cherry-picking? - -This tutorial by [Rajeev Bera][6] walks you through the what, why, and how of the [git cherry-pick command][7] and lists all possible use cases when `git cherry-pick` will help you escape a sticky situation. - -### 3 reasons I use the git cherry-pick command - -I share how [leveraging git cherry-pick][8] can help you avoid redundancy, handle multiple commits in one go, and restore lost changes. - -### Experiment on your code freely with git worktree - -The `git stash` command takes care of saving changes to a working directory. Seth Kenlon introduces us to `git worktree` and the several [git worktree use cases][9] that can help you get a repository back to a known state. - -### 4 tips for context switching in Git - -This article by [Olaf Alders][10] discusses the pros and cons of [four different ways of switching branches][11] while working with Git. These options will help you simplify your workflow and maintain a clean working directory without losing your changes. - -### Find what changed in a Git commit - -Seth Kenlon explains how to leverage simple commands like [git log and git whatchanged][12] to extract specific information regarding what changed in a Git commit. It's a helpful shortcut, and the name makes it easy to remember. - -### 7 Git tips for managing your home directory - -Seth Kenlon shares the dos and don'ts of [managing and organizing $HOME with Git][13] and explains how it made his life more convenient across devices. Even better, it's freed him to experiment with new ideas, knowing he can roll them back easily. - -### GitOps vs. DevOps: What's the difference? - -[Bryant Son][14] introduces you to [GitOps,][15] which he describes as an evolved version of DevOps that uses Git as the single source of truth. The article also lists helpful resources available on Opensource.com for learning DevOps and landing a job in open source. - -### Get started with Argo CD - -[Ayush Sharma][16] details the advantages of [Argo CD,][17] a pull-based GitOps development tool. Argo CD gives you the best of both worlds by managing Kubernetes manifests in Git and syncing them in a cluster. - -Can you think of other Git hacks that make your life easier? Please let us know in the comments or [send us an article idea][18]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/git-tutorials - -作者:[Manaswini Das][a] -选题:[lujun9972][b] -译者:[stevenzdg988](https://github.com/stevenzdg988) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/manaswinidas -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating) -[2]: https://opensource.com/users/rkpattnaik780 -[3]: https://opensource.com/article/21/4/git-stash -[4]: https://opensource.com/users/seth -[5]: https://opensource.com/article/21/4/git-commands -[6]: https://opensource.com/users/acompiler -[7]: https://opensource.com/article/21/4/cherry-picking-git -[8]: https://opensource.com/article/21/3/git-cherry-pick -[9]: https://opensource.com/article/21/4/git-worktree -[10]: https://opensource.com/users/oalders -[11]: https://opensource.com/article/21/4/context-switching-git -[12]: https://opensource.com/article/21/4/git-whatchanged -[13]: https://opensource.com/article/21/4/git-home -[14]: https://opensource.com/users/brson -[15]: https://opensource.com/article/21/3/gitops -[16]: https://opensource.com/users/ayushsharma -[17]: https://opensource.com/article/21/8/argo-cd -[18]: https://opensource.com/how-submit-article diff --git a/translated/tech/20220104 10 Git tutorials to level up your open source skills in 2022.md b/translated/tech/20220104 10 Git tutorials to level up your open source skills in 2022.md new file mode 100644 index 0000000000..68d3a92b2b --- /dev/null +++ b/translated/tech/20220104 10 Git tutorials to level up your open source skills in 2022.md @@ -0,0 +1,93 @@ +[#]: subject: "10 Git tutorials to level up your open source skills in 2022" +[#]: via: "https://opensource.com/article/22/1/git-tutorials" +[#]: author: "Manaswini Das https://opensource.com/users/manaswinidas" +[#]: collector: "lujun9972" +[#]: translator: "stevenzdg988" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +2022 年提升开源技能的 10 个 Git 学习指南 +====== +这些文章包含黑客,鲜为人知的事实,以及在使用 Git 时可以派上用场提示和技巧。 + +![坐在窗前笔记本电脑前的女商人][1] + +Git 是代码共享开发工作流程中不可或缺的一部分。无论您是初学者还是专家,第一件事就是在使用开源代码时需要学习这个功能强大的版本控制系统。在谈到 Git 时,不需要知道所有事情,但是了解一些特性可以让您在 GitLab 等平台上更轻松地共享代码,因此您可以与不同地方的开发人员协作。如果有什么没把握的地方,`git --help` 可以帮助你。 + +我每天都对 Git 提供的已知控制数量感到惊讶。没有一个无法恢复到早期版本的实例,无论您所处的情况是多么不可能或棘手。 + +在 2021 年 Opensource.com 有大量关于 Git 的文章;我只汇总了前 10 名。所有文章都包含包含黑客,鲜为人知的事实,以及在使用 Git 时可以派上用场提示和技巧。 +### 使用 git stash 命令的实用指南 + +[Ramakrishna Pattnaik][2] 解释了 [git stash 命令][3] 的功能。这篇文章重点介绍 `git stash` 如何帮助您列出、检查、保存和恢复更改,以确保切换分支时的无忧体验。它还可以帮助您跟踪在本地无需提交的更改而,同时保持干净的工作目录。 + +### 5 个 Git 命令快速升级你的游戏 + +[Seth Kenlon][4] 详细介绍了 [五个鲜为人知的 Git 命令][5],它们可以让您的生活更轻松。开发人员可以使用 `git whatchanged`、`git stash`、`git worktree` 和 `git cherry-pick` 等命令来节省时间。 + +### What is Git cherry-picking? 什么是 Git cherry-pick + +[Rajeev Bera][6] 教程将引导您了解 [git cherry-pick 命令][7] 的内容、原因和方式,并列出所有可能的用例,`git cherry-pick` 可以帮助您避免棘手的情况。 + +### 3 个使用 git cherry-pick 命令的原因 + +我分享了 [利用 git cherry-pick][8] 如何帮助您避免冗余、一次性处理多个提交并恢复丢失的更改。 + +### 使用 git worktree 自由地尝试你的代码 + +`git stash` 命令负责将更改保存到工作目录。Seth Kenlon 向我们介绍了 `git worktree` 和几个 [git worktree 用例][9],它们可以帮助您将存储库恢复到已知状态。 + +### 4 个 Git 上下文切换的技巧 + +[Olaf Alders][10] 的这篇文章讨论了使用 Git 时[四种不同的切换分支方式][11] 的优缺点。这些选项将帮助您简化工作流程并保持干净的工作目录,而不会丢失您的更改。 + +### 查找 Git 提交中的更改 + +Seth Kenlon 解释了如何利用如 [git log 和 git whatchanged][12] 等简单命令来提取有关 Git 提交内容中更改的特定信息。这是一个有用的快捷方式,而且名字很容易记住。 + +### 7 个管理主目录的 Git 技巧 + +Seth Kenlon 分享了磁盘操作系统和 [使用 Git 管理和组织 $HOME 变量][13] 的注意事项,并解释了它如何让他的跨设备生活更实用。更好的是,这让他可以自由地尝试新想法,因为他知道他可以轻松地将它们回滚。 + +### GitOps 与 DevOps:有什么区别? + +[Bryant Son][14] 向您介绍了 [GitOps,][15],他将其描述为 DevOps 的进化版本,它使用 Git 作为单一事实来源。 这篇文章还列出了 Opensource.com 上可用于学习 DevOps 和在开源领域找到工作的有用资源。 + +### 开始使用 Argo CD + +[Ayush Sharma][16] 详细介绍了 [Argo CD,][17] 一种基于拉取式的 GitOps 开发工具的优势。Argo CD 通过在 Git 中管理 Kubernetes 清单并将它们同步到集群中,为您提供两全其美的体验。 + +你能想到其他让你的生活更轻松的 Git 技巧吗?请在评论中告诉我们或[向我们发送文章创意][18]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/git-tutorials + +作者:[Manaswini Das][a] +选题:[lujun9972][b] +译者:[stevenzdg988](https://github.com/stevenzdg988) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/manaswinidas +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating) +[2]: https://opensource.com/users/rkpattnaik780 +[3]: https://opensource.com/article/21/4/git-stash +[4]: https://opensource.com/users/seth +[5]: https://opensource.com/article/21/4/git-commands +[6]: https://opensource.com/users/acompiler +[7]: https://opensource.com/article/21/4/cherry-picking-git +[8]: https://opensource.com/article/21/3/git-cherry-pick +[9]: https://opensource.com/article/21/4/git-worktree +[10]: https://opensource.com/users/oalders +[11]: https://opensource.com/article/21/4/context-switching-git +[12]: https://opensource.com/article/21/4/git-whatchanged +[13]: https://opensource.com/article/21/4/git-home +[14]: https://opensource.com/users/brson +[15]: https://opensource.com/article/21/3/gitops +[16]: https://opensource.com/users/ayushsharma +[17]: https://opensource.com/article/21/8/argo-cd +[18]: https://opensource.com/how-submit-article From a0d4673be2270a3c3f02348ead960baaaca8361e Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 17 Jan 2022 05:02:34 +0800 Subject: [PATCH 005/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220116=20?= =?UTF-8?q?Solve=20Wordle=20using=20the=20Linux=20command=20line?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220116 Solve Wordle using the Linux command line.md --- ...lve Wordle using the Linux command line.md | 205 ++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 sources/tech/20220116 Solve Wordle using the Linux command line.md diff --git a/sources/tech/20220116 Solve Wordle using the Linux command line.md b/sources/tech/20220116 Solve Wordle using the Linux command line.md new file mode 100644 index 0000000000..c768ef7994 --- /dev/null +++ b/sources/tech/20220116 Solve Wordle using the Linux command line.md @@ -0,0 +1,205 @@ +[#]: subject: "Solve Wordle using the Linux command line" +[#]: via: "https://opensource.com/article/22/1/word-game-linux-command-line" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Solve Wordle using the Linux command line +====== +Use the Linux grep and fgrep commands to win your favorite word-based +guessing games. +![Linux keys on the keyboard for a desktop computer][1] + +I've recently become a little obsessed with an online word puzzle game in which you have six attempts to guess a random five-letter word. The word changes every day, and you can only play once per day. After each guess, each of the letters in your guess is highlighted: gray means that letter does not appear in the mystery word, yellow means that letter appears in the word but not at that position, and green means the letter appears in the word at that correct position. + +Here's how you can use the Linux command line to help you play guessing games like Wordle. I used this method to help me solve the January 6 puzzle: + +### First try + +Linux systems keep a dictionary of words in the `/usr/share/dict/words` file. This is a very long plain text file. My system's words file has over 479,800 entries in it. The file contains both plain words and proper nouns (names, places, and so on). + +To start my first guess, I just want a list of plain words that are exactly five letters long. To do that, I use this `grep` command: + + +``` +`$ grep '^[a-z][a-z][a-z][a-z][a-z]$' /usr/share/dict/words > myguess` +``` + +The `grep` command uses regular expressions to perform searches. You can do a lot with regular expressions, but to help me solve Wordle, I only need the basics: The `^` means the start of a line, and the `$` means the end of a line. In between, I've specified five instances of `[a-z]`, which indicates any lowercase letter from a to z. + +I can also use the `wc` command to see my list of possible words is "only" 15,000 words: + + +``` + + +$ wc -l myguess +15034 myguess + +``` + +From that list, I picked a random five-letter word: _acres_. The _a_ was set to yellow, meaning that letter exists somewhere in the mystery word but not in the first position. The other letters are gray, so I know they don't exist in the word of the day. + +![acres word attempt][2] + +Jim Hall (CC BY-SA 4.0) + +### Second try + +For my next guess, I want to get a list of all words that contain an _a_, but not in the first position. My list should also not include the letters _c_, _r_, _e_, or _s_. Let's break this down into steps: + +To get a list of all words with an a, I use the `fgrep` (fixed strings grep) command. The `fgrep` command also searches for text like `grep`, but without using regular expressions: + + +``` +`$ fgrep a myguess > myguess2` +``` + +That brings my possible list of next guesses down from 15,000 words to 6,600 words: + + +``` + + +$ wc -l myguess myguess2 + 15034 myguess +  6634 myguess2 + 21668 total + +``` + +But that list of words also includes the letter _a_ in the first position, which I don't want. The game already indicated the letter _a_ exists in some other position. I can modify my command with `grep` to look for words containing some other letter in the first position. That narrows my possible guesses to just 5,500 words: + + +``` + + +$ fgrep a myguess | grep '^[b-z]' > myguess2 +$ wc -l myguess myguess2 + 15034 myguess +  5566 myguess2 + 20600 total + +``` + +But I know the mystery word also does not include the letters _c_, _r_, _e_, or _s_. I can use another `grep` command to omit those letters from the search: + + +``` + + +$ fgrep a myguess | grep '^[b-z]' | grep -v '[cres]' > myguess2 +$ wc -l myguess myguess2 +15034 myguess + 1257 myguess2 +16291 total + +``` + +The `-v` option means to invert the search, so `grep` will only return the lines that do not match the regular expression `[cres]` or the single list of letters _c_, _r_, _e_, or _s_. With this extra `grep` command, I've narrowed my next guess considerably to only 1,200 possible words with an a somewhere but not in the first position, and that do not contain _c_, _r_, _e_, or _s_. + +After viewing the list, I decided to try the word _balmy_. + +![balmy word attempt][3] + +Jim Hall (CC BY-SA 4.0) + +### Third try + +This time, the letters _b_ and _a_ were highlighted in green, meaning I have those letters in the correct position. The letter _l_ was yellow, so that letter exists somewhere else in the word, but not in that position. The letters _m_ and _y_ are gray, so I can eliminate those from my next guess. + +To identify my next list of possible words, I can use another set of `grep` commands. I know the word starts with _ba_, so I can begin my search there: + + +``` + + +$ grep '^ba' myguess2 > myguess3 +$ wc -l myguess3 +77 myguess3 + +``` + +That's only 77 words! I can narrow that further by looking for words that also contain the letter _l_ in anywhere but the third position: + + +``` + + +$ grep '^ba[^l]' myguess2 > myguess3 +$ wc -l myguess3 +61 myguess3 + +``` + +The `^` inside the square brackets `[^l]` means not this list of letters, so not the letter _l_. That brings my list of possible words to 61, not all of which contain the letter _l_, which I can eliminate using another `grep` search: + + +``` + + +$ grep '^ba[^l]' myguess2 | fgrep l > myguess3 +$ wc -l myguess3 +10 myguess3 + +``` + +Some of those words might contain the letters _m_ and _y_, which are not in today's mystery word. I can remove those from my list of guesses with one more inverted `grep` search: + + +``` + + +$ grep '^ba[^l]' myguess2 | fgrep l | grep -v '[my]' > myguess3 +$ wc -l myguess3 +7 myguess3 + +``` + +My list of possible words is very short now, only seven words! + + +``` + + +$ cat myguess3 +babul +bailo +bakal +bakli +banal +bauld +baulk + +``` + +I'll pick _banal_ as a likely word for my next guess, which happened to be correct. + +![banal word attempt][4] + +Jim Hall (CC BY-SA 4.0) + +### The power of regular expressions + +The Linux command line provides powerful tools to help you do real work. The `grep` and `fgrep` commands offer great flexibility in scanning lists of words. For a word-based guessing game, `grep` helped identify a list of 15,000 possible words of the day. After guessing and knowing what letters did and did not appear in the mystery word, `grep` and `fgrep` helped narrow the options to 1,200 words and then only seven words. That's the power of the command line. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/word-game-linux-command-line + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_keyboard_desktop.png?itok=I2nGw78_ (Linux keys on the keyboard for a desktop computer) +[2]: https://opensource.com/sites/default/files/acres.png (acres word attempt) +[3]: https://opensource.com/sites/default/files/balmy.png (balmy word attempt) +[4]: https://opensource.com/sites/default/files/banal.png (banal word attempt) From 6ec42566a4a9bcdd3403234d3dc96e33b7e59fdd Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 17 Jan 2022 05:02:42 +0800 Subject: [PATCH 006/334] add done: 20220116 Solve Wordle using the Linux command line.md --- sources/tech/20220116 .md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 sources/tech/20220116 .md diff --git a/sources/tech/20220116 .md b/sources/tech/20220116 .md new file mode 100644 index 0000000000..a91829e975 --- /dev/null +++ b/sources/tech/20220116 .md @@ -0,0 +1,16 @@ +[#]: subject: "" +[#]: via: "https://www.debugpoint.com/2022/01/maui-shell-first-look-1/" +[#]: author: "[Arindam] + +Posted by Arindam + +Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + + +====== + From c0c41bd85c7759d9d43fed0d5e801a9a5629e6cd Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 17 Jan 2022 08:58:38 +0800 Subject: [PATCH 007/334] translated --- ...tainers on Linux without sudo in Podman.md | 100 ------------------ ...tainers on Linux without sudo in Podman.md | 100 ++++++++++++++++++ 2 files changed, 100 insertions(+), 100 deletions(-) delete mode 100644 sources/tech/20220111 Run containers on Linux without sudo in Podman.md create mode 100644 translated/tech/20220111 Run containers on Linux without sudo in Podman.md diff --git a/sources/tech/20220111 Run containers on Linux without sudo in Podman.md b/sources/tech/20220111 Run containers on Linux without sudo in Podman.md deleted file mode 100644 index d02164a81d..0000000000 --- a/sources/tech/20220111 Run containers on Linux without sudo in Podman.md +++ /dev/null @@ -1,100 +0,0 @@ -[#]: subject: "Run containers on Linux without sudo in Podman" -[#]: via: "https://opensource.com/article/22/1/run-containers-without-sudo-podman" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Run containers on Linux without sudo in Podman -====== -Configure your system for rootless containers. -![Command line prompt][1] - -Containers are an important part of modern computing, and as the infrastructure around containers evolves, new and better tools have started to surface. It used to be that you could run containers with just [LXC][2], and then Docker gained popularity, and things started getting more complex. Eventually, we got the container management system we all deserved with [Podman][3], a daemonless container engine that makes containers and pods easy to build, run, and manage. - -Containers interface directly with Linux kernel abilities like cgroups and namespaces, and they spawn lots of new processes within those namespaces. In short, running a container is literally running a Linux system _inside_ a Linux system. From the operating system's viewpoint, it looks very much like an administrative and privileged activity. Normal users don't usually get to have free reign over system resources the way containers demand, so by default, root or `sudo` permissions are required to run Podman. However, that's only the default setting, and it's by no means the only setting available or intended. This article demonstrates how to configure your Linux system so that a normal user can run Podman without the use of `sudo` ("rootless"). - -### Namespace user IDs - -A [kernel namespace][4] is essentially an imaginary construct that helps Linux keep track of what processes belong together. It's the red queue ropes of Linux. There's not actually a difference between processes in one queue and another, but it's helpful to cordon them off from one another. Keeping them separate is the key to declaring one group of processes a "container" and the other group of processes your OS. - -Linux tracks what user or group owns each process by User ID (UID) and Group ID (GID). Normally, a user has access to a thousand or so subordinate UIDs to assign to child processes in a namespace. Because Podman runs an entire subordinate operating system assigned to the user who started the container, you need a lot more than the default allotment of subuids and subgids. - -You can grant a user more subuids and subgids with the `usermod` command. For example, to grant more subuids and subgids to the user `tux`, choose a suitably high UID that has no user assigned to it (such as 200,000) and increment it by several thousand: - - -``` - - -$ sudo usermod \ -\--add-subuids 200000-265536 \ -\--add-subgids 200000-265536 \ -tux - -``` - -### Namespace access - -There are limits on namespaces, too. This usually gets set very high, but you can verify the user allotment of namespaces with `systctl`, the kernel parameter tool: - - -``` - - -$ sysctl --all --pattern user_namespaces -user.max_user_namespaces = 28633 - -``` - -That's plenty of namespaces, and it's probably what your distribution has set by default. If your distribution doesn't have that property or has it set very low, then you can create it by entering this text into the file `/etc/sysctl.d/userns.conf`: - - -``` -`user.max_user_namespaces=28633` -``` - -Load that setting: - - -``` -`$ sudo sysctl -p /etc/sysctl.d/userns.conf` -``` - -### Run a container without root - -Once you've got your configuration set, reboot your computer to ensure that the changes to your user and kernel parameters are loaded and active. - -After you reboot, try running a container image: - - -``` - - -$ podman run -it busybox echo "hello" -hello - -``` - -### Containers like commands - -Containers may feel mysterious if you're new to them, but actually, they're no different than your existing Linux system. They are literally processes running on your system, without the cost or barrier of an emulated environment or virtual machine. All that separates a container from your OS are kernel namespaces, so they're really just native processes with different labels on them. Podman makes this more evident than ever, and once you configure Podman to be a rootless command, containers feel more like commands than virtual environments. Podman makes containers and pods easy, so give it a try. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/run-containers-without-sudo-podman - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/command_line_prompt.png?itok=wbGiJ_yg (Command line prompt) -[2]: https://opensource.com/article/18/11/behind-scenes-linux-containers -[3]: http://podman.io -[4]: https://opensource.com/article/19/10/namespaces-and-containers-linux diff --git a/translated/tech/20220111 Run containers on Linux without sudo in Podman.md b/translated/tech/20220111 Run containers on Linux without sudo in Podman.md new file mode 100644 index 0000000000..c917b6a1f1 --- /dev/null +++ b/translated/tech/20220111 Run containers on Linux without sudo in Podman.md @@ -0,0 +1,100 @@ +[#]: subject: "Run containers on Linux without sudo in Podman" +[#]: via: "https://opensource.com/article/22/1/run-containers-without-sudo-podman" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +在 Podman 中无需 sudo 在 Linux 上运行容器 +====== +为 rootless 容器配置你的系统。 +![Command line prompt][1] + +容器是现代计算的一个重要组成部分,随着围绕容器的基础设施的发展,新的和更好的工具开始浮出水面。过去,你只需用 [LXC][2] 就可以运行容器,然后 Docker 得到了普及,事情开始变得越来越复杂。最终,我们得到了我们所期望的容器管理系统 [Podman][3],一个无守护程序的容器引擎,使容器和 pod 易于构建、运行和管理。 + +容器直接与 Linux 内核能力(如 cgroups 和命名空间)交互,它们在这些命名空间中产生大量的新进程。简而言之,运行一个容器实际上就是在 Linux 系统内部运行一个 Linux 系统。从操作系统的角度来看,它看起来非常像一种管理和特权活动。普通用户通常不能像容器那样自由支配系统资源,所以默认情况下,运行 Podman 需要 root 或 `sudo` 权限。然而,这只是默认设置,而且这绝不是唯一可用的设置。本文演示了如何配置你的 Linux 系统,使普通用户可以在不使用 `sudo` 的情况下运行 Podman(“rootless”)。 + +### 命名空间的用户 ID + +[内核命名空间][4]本质上是一种虚构的结构,可帮助 Linux 跟踪哪些进程属于同一类。 这是 Linux 中的队列分组。 一个队列中的进程与另一个队列中的进程之间实际上没有区别,但将它们彼此隔离是有帮助的。 将它们分开是声明一组进程为“容器”而另一组进程为你的操作系统的关键。 + +Linux 通过用户 ID(UID)和组 ID(GID)来跟踪哪个用户或组拥有的进程。通常情况下,一个用户可以访问一千个左右的从属 UID,以分配给命名空间的子进程。由于 Podman 运行的是分配给启动容器的用户的整个从属操作系统,因此你需要的不仅仅是默认分配的 subuid 和 subgid。 + +你可以用 `usermod` 命令授予一个用户更多的 subuid 和 subgid。例如,要授予用户 `tux` 更多的 subuid 和 subgid,选择一个还没分配用户的适当的高 UID(如 200,000),然后将其增加几千: + + +``` + + +$ sudo usermod \ +\--add-subuids 200000-265536 \ +\--add-subgids 200000-265536 \ +tux + +``` + +### 命名空间访问 + +对命名空间也有限制。这通常被设置得很高,但你可以用 `systctl`,即内核参数工具来验证用户的命名空间分配: + + +``` + + +$ sysctl --all --pattern user_namespaces +user.max_user_namespaces = 28633 + +``` + +这是很充足的命名空间,而且可能是你的发行版默认设置的。如果你的发行版没有这个属性或者设置得很低,那么你可以在文件 `/etc/sysctl.d/userns.conf` 中输入这样的文本来创建它: + + +``` +`user.max_user_namespaces=28633` +``` + +加载该设置: + + +``` +`$ sudo sysctl -p /etc/sysctl.d/userns.conf` +``` + +### 在没有 root 权限的情况下运行一个容器 + +当你设置好你的配置,重启你的计算机,以确保你的用户和内核参数的变化被加载和激活。 + +重启后,试着运行一个容器镜像: + + +``` + + +$ podman run -it busybox echo "hello" +hello + +``` + +### 容器像命令一样 + +如果你是第一次接触容器,可能会觉得很神秘,但实际上,它们与你现有的 Linux 系统没有什么不同。它们实际上是在你的系统上运行的进程,没有仿真环境或虚拟机的成本和障碍。容器和你的操作系统之间的区别只是内核命名空间,所以它们实际上只是带有不同标签的本地进程。Podman 使这一点比以往更加明显,当你将 Podman 配置为 rootless 命令,容器感觉更像命令而不是虚拟环境。Podman 使容器和 pod 变得简单,所以请试一试。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/run-containers-without-sudo-podman + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/command_line_prompt.png?itok=wbGiJ_yg (Command line prompt) +[2]: https://opensource.com/article/18/11/behind-scenes-linux-containers +[3]: http://podman.io +[4]: https://opensource.com/article/19/10/namespaces-and-containers-linux From 0f7522aa8982898b6eb05da47c29a796ada1f527 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 17 Jan 2022 09:02:29 +0800 Subject: [PATCH 008/334] translating --- sources/tech/20220114 What makes Linux the sustainable OS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220114 What makes Linux the sustainable OS.md b/sources/tech/20220114 What makes Linux the sustainable OS.md index ad34960031..ccbe6e44a9 100644 --- a/sources/tech/20220114 What makes Linux the sustainable OS.md +++ b/sources/tech/20220114 What makes Linux the sustainable OS.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/1/linux-sustainable-os" [#]: author: "Don Watkins https://opensource.com/users/don-watkins" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 9e90d8bc8cd2de4a4c8473affa0c3b9f7cbbda6b Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Mon, 17 Jan 2022 09:54:53 +0800 Subject: [PATCH 009/334] Delete 20220116 .md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @lujun9972 这个 debugpoint 的好像好久没抓取成功 --- sources/tech/20220116 .md | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 sources/tech/20220116 .md diff --git a/sources/tech/20220116 .md b/sources/tech/20220116 .md deleted file mode 100644 index a91829e975..0000000000 --- a/sources/tech/20220116 .md +++ /dev/null @@ -1,16 +0,0 @@ -[#]: subject: "" -[#]: via: "https://www.debugpoint.com/2022/01/maui-shell-first-look-1/" -[#]: author: "[Arindam] - -Posted by Arindam - -Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - - -====== - From a1de8c1763ebfd69d1f39350a4b1802d18810d92 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 17 Jan 2022 10:03:51 +0800 Subject: [PATCH 010/334] A --- ...20220114 I Tried System76-s New Rust-based COSMIC Desktop.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md b/sources/news/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md index 747bc52f0e..4f93f663dd 100644 --- a/sources/news/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md +++ b/sources/news/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/system76-rust-cosmic-desktop/" [#]: author: "Community https://news.itsfoss.com/author/team/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 6339308c5506351f4cd8e7f27e6b141633411af7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 17 Jan 2022 10:49:59 +0800 Subject: [PATCH 011/334] TR --- ...ystem76-s New Rust-based COSMIC Desktop.md | 125 ------------------ ...ystem76-s New Rust-based COSMIC Desktop.md | 124 +++++++++++++++++ 2 files changed, 124 insertions(+), 125 deletions(-) delete mode 100644 sources/news/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md create mode 100644 translated/news/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md diff --git a/sources/news/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md b/sources/news/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md deleted file mode 100644 index 4f93f663dd..0000000000 --- a/sources/news/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md +++ /dev/null @@ -1,125 +0,0 @@ -[#]: subject: "I Tried System76’s New Rust-based COSMIC Desktop!" -[#]: via: "https://news.itsfoss.com/system76-rust-cosmic-desktop/" -[#]: author: "Community https://news.itsfoss.com/author/team/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -I Tried System76’s New Rust-based COSMIC Desktop! -====== - -If you didn’t know already, System76 developers have been [working on a new Desktop Environment][1] (dubbed COSMIC) written in [Rust][2]: a memory-safe and superfast programming language. - -Creating a desktop environment from scratch is no small feat. That involves creating everything from the compositor, panel, window manager to the APIs for your desktop environment and other back-end tasks. - -It is not an easy task, and maintaining it is another story. - -And, it looks like System76 has already started working on it! - -On GitHub, you will notice there is already a repository called [cosmic][3], but it is mainly in JavaScript (the language used to create GNOME shell extensions). This is the cosmic shell extension repository, which is what Pop!_OS ships with now. - -There are a couple of newer repositories on their GitHub profile, which happen to be the elements of their upcoming Rust-based COSMIC Desktop. - -So, it is time to build, test, and get an early look! - -**Note:** _To clarify, the current GNOME-based desktop environment on Pop!_OS is COSMIC. This article discusses the Rust-based COSMIC desktop environment, built from scratch_, _meant to replace the current offering._ - -### Rust-based COSMIC Desktop Experience - -The three repositories intended to be a part of the COSMIC desktop environment as a whole are - - * [Settings app][4] - * [Top panel][5] (currently for X11 systems) - * [Compositor][6] (appears to have support for native wayland, xwayland and X11 systems) - - - -#### COSMIC Settings - -![][7] - -**Note:** This is a half-baked early preview to get an idea. The user interface can be fundamentally different as the development continues. So, hold your thoughts! - -This is the settings app for Pop!_OS’s new COSMIC Desktop. It is currently WIP and not ready for use, although if you want to run it and play around with the GUI, feel free! - -So, how does it look different from the current COSMIC experience? - -![Rust-based COSMIC Settings vs. GNOME-based COSMIC][8] - -When writing this, the GUI does not seem to be connected to any back-end APIs. Enabling and disabling “Enable top-left hot corner for Workspaces” toggle does not make a difference, nor does any other toggles, except for the information shown by the ‘About’ section of the Settings app. - -Looking closer at the screenshot, the placements are messy but expected from an early preview (or prototype). - -It looks like they are approaching everything with rounded corners and a cleaner look to it. - -The toggle animation feels quick, smooth and snappy (even inside a virtual machine, cannot wait to try it on bare metal). Considering it’s not even functional, let’s forget about the performance. - -![][9] - -Personally, not a fan of the rounded corner look they are going with. GNOME’s implementation of rounded corners seems perfect to me. But, it should be interesting to see how it turns out. - -#### Top Panel - -As part of the COSMIC desktop environment, the top panel is also being implemented using Rust language. - -As for the appearance of this top panel, I am not exactly sure how to test it without being unfair to it. Launching it from GNOME opens it behind the top bar that GNOME has. So I thought of opening it in a separate window manager (tried only with [bspwm][10] and [i3-wm][11] so far), but that resulted in some quirky behavior like the panel taking full vertical space like a normal GUI software. - -#### COSMIC Compositor - -The compositor for COSMIC desktop environment compiled successfully but would not launch when used with bspwm or i3-wm. I tried launching it in window managers because GNOME does not allow changing compositors. - -This is due to the mess of video drivers in a virtual machine using VirtualBox and the fact that the COSMIC compositor is not ready. - -But, there’s more! - -Developer **Eduardo Flores** also tried the new COSMIC Desktop, sharing some screenshots of the app launcher and the dock in his [blog post][12]. - -![Credits: Eduardo Flores][13] - -The application launcher looks similar, but built using GTK. Similarly, you can also expect a similar-looking application library, introduced with [Pop!_OS 21.10][14], and the good-old dock. - -![Credits: Eduardo Flores][15] - -### Concluding Thoughts - -Sure, it is too early to tell where the development is heading. - -It should take a while to expect a beta release for a full-fledged Rust-based COSMIC Desktop experience. - -But, from what we’ve seen here, I am excited! - -_What do you think? You are welcome to share your thoughts in the comments down below!_ - -_Originally written by [Pratham Patel][16]._ - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/system76-rust-cosmic-desktop/ - -作者:[Community][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/team/ -[b]: https://github.com/lujun9972 -[1]: https://news.itsfoss.com/pop-os-cosmic-rust/ -[2]: https://research.mozilla.org/rust/ -[3]: https://github.com/pop-os/cosmic -[4]: https://github.com/pop-os/cosmic-settings -[5]: https://github.com/pop-os/cosmic-panel -[6]: https://github.com/pop-os/cosmic-comp -[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU4MyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM1MSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQwNCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[10]: https://github.com/baskerville/bspwm -[11]: https://github.com/i3/i3 -[12]: https://blog.edfloreshz.dev/articles/linux/system76/rust-based-desktop-environment/ -[13]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzNSIgd2lkdGg9Ijc3MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[14]: https://news.itsfoss.com/pop-os-21-10/ -[15]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4OSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[16]: https://itsfoss.com/author/pratham/ diff --git a/translated/news/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md b/translated/news/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md new file mode 100644 index 0000000000..a4ddc29498 --- /dev/null +++ b/translated/news/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md @@ -0,0 +1,124 @@ +[#]: subject: "I Tried System76’s New Rust-based COSMIC Desktop!" +[#]: via: "https://news.itsfoss.com/system76-rust-cosmic-desktop/" +[#]: author: "Community https://news.itsfoss.com/author/team/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +提前了解一下 System76 新的基于 Rust 的 COSMIC 桌面 +===== + +> 提前了解一下 Pop!_OS 即将推出的基于 Rust 的 COSMIC 桌面环境。仅供参考。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/system76-rust-based-distro-ft.png?w=1200&ssl=1) + +如果你还不知道,System76 的开发者一直在 [致力于开发一个新的桌面环境][1](被称为 COSMIC),它是用 [Rust][2] 编写的,Rust 是一种内存安全的超快编程语言。 + +从头开始创建一个桌面环境不是一件小事。这涉及到创建从合成器、面板、窗口管理器到桌面环境的 API 和其他后端任务的一切。 + +这不是一件容易的事,而维护它又是另一回事。 + +而且,看起来 System76 已经开始了这方面的工作。 + +在 GitHub 上,你会发现已经有一个名为 [cosmic][3] 的仓库,但它主要是使用 JavaScript(用于创建 GNOME shell 扩展的语言)编写的。这就是 cosmic shell 扩展仓库,也就是 Pop!_OS 现在所搭载的。 + +在他们的 GitHub 中还有几个较新的仓库,这些恰好是他们即将推出的基于 Rust 的 COSMIC 桌面的元素。 + +所以,现在是时候构建、测试并提前了解一下了。 + +> **注:** 澄清一下,目前 Pop!_OS 上基于 GNOME 的桌面环境叫做 COSMIC。而本文讨论的是基于 Rust 的 COSMIC 桌面环境,它是从头开始构建的,旨在取代当前的产品。 + +### 基于 Rust 的 COSMIC 桌面体验 + +打算成为 COSMIC 桌面环境整体一部分的三个仓库是: + + * [设置应用][4] + * [顶部面板][5](目前用于 X11 系统) + * [合成器][6](似乎支持原生的 wayland、xwayland 和 X11 系统) + +#### COSMIC 设置应用 + +![][7] + +> **注意:** 这是一个半生不熟的早期预览,以让你有个大致印象。随着开发的继续,用户界面可能会有根本性的变化。所以,仅用于参考。 + +这是 Pop!_OS 的新 COSMIC 桌面的设置应用。它目前还在开发当中,没有准备好使用,不过如果你想运行它并试试界面,请随意! + +那么,它看起来与目前的 COSMIC 体验有什么不同呢? + +![基于 Rust 的 COSMIC 设置与基于 GNOME 的 COSMIC][8] + +在写这篇文章时,该用户界面似乎没有与任何后端 API 相连接。启用和禁用 “为工作区启用左上角热角 ”的切换并没有什么变化,其他的切换也是如此,除了设置应用的 “关于” 部分所显示的信息。 + +仔细看截图,放置的位置很凌乱,但作为早期预览(或原型)来说也是正常的。 + +看起来他们正在用圆角和更干净的外观来处理一切。 + +切换动画感觉快速、流畅和迅捷(即使是在虚拟机内,我等不及在裸机上尝试)。但考虑到它甚至还没有功能,谈论性能没什么意义。 + +![][9] + +就个人而言,我不喜欢他们所采用的圆角外观。在我看来,GNOME 对圆角的实现是完美的。但是,看看它的结果应该是很有趣的。 + +#### 顶部面板 + +作为 COSMIC 桌面环境的一部分,顶部面板也正在使用 Rust 语言实现。 + +至于这个顶部面板的外观,我不太确定如何测试它才不算对它不公平。从 GNOME 中启动它,会在 GNOME 的顶栏后面打开它。所以我想在一个单独的窗口管理器中打开它(到目前为止只用 [bspwm][10] 和 [i3-wm][11] 试过),但这导致了一些古怪的行为,比如面板像普通 GUI 软件一样占据了全部垂直空间。 + +#### COSMIC 合成器 + +COSMIC 桌面环境的合成器编译成功了,但在与 bspwm 或 i3-wm 一起使用时却无法启动。我试着在窗口管理器中启动它,因为 GNOME 不允许改变合成器。 + +这是由于在使用 VirtualBox 的虚拟机中,视频驱动的混乱以及 COSMIC 合成器还没有准备好。 + +但是,还有更多! + +开发者 Eduardo Flores 也尝试了新的 COSMIC 桌面,在他的 [博客文章][12] 中分享了一些应用启动器和坞站的截图。 + +![来自 Eduardo Flores][13] + +应用程序启动器看起来很相似,但是使用 GTK 构建的。同样,你也可以期待 [Pop!_OS 21.10][14] 引入一个类似的应用程序库,以及经典的坞站。 + +![来自 Eduardo Flores][15] + +### 总结 + +当然,现在说发展的方向还为时过早。 + +要期待一个成熟的基于 Rust 的 COSMIC 桌面体验的测试版,应该还需要一段时间。 + +但是,从我们在这里看到的情况来看,我很兴奋。 + +你怎么看?欢迎你在下面的评论中分享你的想法! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/system76-rust-cosmic-desktop/ + +作者:[Pratham Patel][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/pratham/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/pop-os-cosmic-rust/ +[2]: https://research.mozilla.org/rust/ +[3]: https://github.com/pop-os/cosmic +[4]: https://github.com/pop-os/cosmic-settings +[5]: https://github.com/pop-os/cosmic-panel +[6]: https://github.com/pop-os/cosmic-comp +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pop-os-cosmic-settings-early.png?w=963&ssl=1 +[8]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pop-os-settings-new-old-early.png?resize=1568%2C705&ssl=1 +[9]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pop-os-new-old-cosmic.png?w=1387&ssl=1 +[10]: https://github.com/baskerville/bspwm +[11]: https://github.com/i3/i3 +[12]: https://blog.edfloreshz.dev/articles/linux/system76/rust-based-desktop-environment/ +[13]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/new_launcher.png?w=770&ssl=1 +[14]: https://news.itsfoss.com/pop-os-21-10/ +[15]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/new_app_library.png?w=1200&ssl=1 From de040e249351560a810dbf232c7ee2a4adad70e1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 17 Jan 2022 10:52:42 +0800 Subject: [PATCH 012/334] P @wxy https://linux.cn/article-14186-1.html --- ...0114 I Tried System76-s New Rust-based COSMIC Desktop.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/news => published}/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md (98%) diff --git a/translated/news/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md b/published/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md similarity index 98% rename from translated/news/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md rename to published/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md index a4ddc29498..26ab9a4190 100644 --- a/translated/news/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md +++ b/published/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md @@ -3,9 +3,9 @@ [#]: author: "Community https://news.itsfoss.com/author/team/" [#]: collector: "lujun9972" [#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14186-1.html" 提前了解一下 System76 新的基于 Rust 的 COSMIC 桌面 ===== From 83673f89eab699feff69af48c7fa876665dece62 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 17 Jan 2022 12:23:45 +0800 Subject: [PATCH 013/334] RP @geekpi https://linux.cn/article-14187-1.html --- ... Source Teleprompter for Video Creators.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) rename {translated/tech => published}/20220111 QPrompt is a Free and Open Source Teleprompter for Video Creators.md (74%) diff --git a/translated/tech/20220111 QPrompt is a Free and Open Source Teleprompter for Video Creators.md b/published/20220111 QPrompt is a Free and Open Source Teleprompter for Video Creators.md similarity index 74% rename from translated/tech/20220111 QPrompt is a Free and Open Source Teleprompter for Video Creators.md rename to published/20220111 QPrompt is a Free and Open Source Teleprompter for Video Creators.md index b289fc7931..2914c8e821 100644 --- a/translated/tech/20220111 QPrompt is a Free and Open Source Teleprompter for Video Creators.md +++ b/published/20220111 QPrompt is a Free and Open Source Teleprompter for Video Creators.md @@ -3,18 +3,20 @@ [#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14187-1.html" -QPrompt 是一款为视频创作者提供的免费和开源的提词器 +QPrompt:一款为视频创作者提供的自由开源的提词器 ====== +![](https://img.linux.net.cn/data/attachment/album/202201/17/121957caladccafgdfjfa7.jpg) + 这些天来,各种各样的人都在创建视频内容。从专业的 YouTubers 到学校教师,创建视频内容已经成为各种工作内容的一部分。 从屏幕记录器到视频编辑器,有各种工具可以帮助创建良好的视频。提词器也是这样的工具之一。 -提词器可以运行视觉提示,甚至是完整的文本,这样演讲者就可以在讲话时接受提示。你可能已经看到新闻读者使用提词器。 +提词器可以提供视觉提示,甚至是完整的文本,这样演讲者就可以在讲话时接受提示。你可能已经看到新闻读者使用提词器。 有专门的提词器软件,可以在电脑或移动设备上运行。 @@ -26,42 +28,40 @@ QPrompt 就是这样一款软件,它可以在 Linux、Windows 和其他平台 [QPrompt][2] 是一个提词器软件,适用于所有类型的视频创作者。它的主要重点是易用性和快速性能。 -QPrompt 可与网络摄像头和手机、演播室提词器和平板提词器一起使用。它的独特能力是使其背景透明,这使得它在视频会议上表现出色。 +QPrompt 可与 Web 摄像头和手机、演播室提词器和平板提词器一起使用。它的独特能力是使其背景透明,这使得它在视频会议上表现出色。 以下是 QPrompt 的亮点功能: * 可与演播室提词器、平板提词器、网络摄像头和电话一起使用 - * 流畅移动,无抖动体验 - * 在提示的同时进行即时修改 + * 流畅移动,无抖动 + * 可以在提示的同时进行即时修改 * 从其他软件中粘贴,不费力气 * 为你估算剩余时间 * 使用标记来跳到脚本的任何地方 * 向多个屏幕提示,有独立的镜像功能 - * 背景透明,让你在讲话时可以监视你自己或你的听众 + * 背景透明,让你在讲话时可以看到你自己或你的听众 * 内置的计时器 * 进度指示器 * 丰富的文本格式 * 支持超过 180 种语言的书写系统 - - -QPrompt 中的 “Q” 提示该应用是使用 Qt 框架制作的。它的用户界面使用 [Kirigami 框架][3]。所有这些都使它成为 KDE 的一个很好的选择,但在 GNOME 中也是如此。 +QPrompt 中的 “Q” 提示该应用是使用 Qt 框架制作的。它的用户界面使用 [Kirigami 框架][3]。所有这些都使它成为 KDE 上的一个很好的选择,但在 GNOME 中也是如此。 ### 安装 QPrompt ![QPrompt running in Ubuntu][4] -QPrompt 是一个免费的开源软件,它可以用于 Linux、Windows和 macOS。也有适用于安卓设备的 APK,但目前还不稳定。 +QPrompt 是一个自由开源软件,它可以用于 Linux、Windows 和 macOS。也有适用于安卓设备的 APK,但目前还不稳定。 Linux 用户可以选择 AppImage、Snap 和 Deb文件。在写这篇文章的时候,Flatpak 包正在开发中。 你可以从该项目网站的下载区获得 AppImage。 -[下载 AppImage 格式的 QPrompt][2] +- [下载 AppImage 格式的 QPrompt][2] 其他安装选项可在其 GitHub 仓库的发布页面上找到: -[其他下载选项][5] +- [其他下载选项][5] ### 总结 @@ -74,7 +74,7 @@ via: https://itsfoss.com/qprompt/ 作者:[Abhishek Prakash][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From cab5362432b198131d8683d3e13d5fc23a5225a3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 17 Jan 2022 21:56:18 +0800 Subject: [PATCH 014/334] A:20211211 What Desktop Linux Needs to Succeed in the Mainstream --- ...211 What Desktop Linux Needs to Succeed in the Mainstream.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md b/sources/talk/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md index 36c8b2eeaf..464a66dee8 100644 --- a/sources/talk/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md +++ b/sources/talk/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/what-desktop-linux-needs-to-succeed-in-the-mainstream/" [#]: author: "Community https://news.itsfoss.com/author/team/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 66c172942ef388d7b23499a41ac76e5781a3024a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 17 Jan 2022 23:04:32 +0800 Subject: [PATCH 015/334] TR:20211211 What Desktop Linux Needs to Succeed in the Mainstream --- ...inux Needs to Succeed in the Mainstream.md | 69 ------------------ ...inux Needs to Succeed in the Mainstream.md | 71 +++++++++++++++++++ 2 files changed, 71 insertions(+), 69 deletions(-) delete mode 100644 sources/talk/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md create mode 100644 translated/talk/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md diff --git a/sources/talk/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md b/sources/talk/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md deleted file mode 100644 index 464a66dee8..0000000000 --- a/sources/talk/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md +++ /dev/null @@ -1,69 +0,0 @@ -[#]: subject: "What Desktop Linux Needs to Succeed in the Mainstream" -[#]: via: "https://news.itsfoss.com/what-desktop-linux-needs-to-succeed-in-the-mainstream/" -[#]: author: "Community https://news.itsfoss.com/author/team/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -What Desktop Linux Needs to Succeed in the Mainstream -====== - -You might be aware of the [recent Linus Tech Tips videos about switching to Linux][1], including [one with some complaints about KDE software][2]. For those of you who are following along, I want to let you know that we’re (KDE) working on fixing the issues Linus brought up, and you can track our progress [here][3]. Thankfully, most of the issues are fairly minor and should be easy to fix. - -This blog post is my version of [Sway][4] developer [Drew DeVault’s post][5] about the videos, regarding the question of what desktop Linux needs to go mainstream. Drew emphasizes accessibility, and I agree, but with a slightly different conclusion: - -### Desktop Linux needs to be pre-installed on retail hardware to succeed in the mainstream - -That’s it. - -Allow me to explain. - -People get hung up a lot on features and usability, and these are important. But they’re means to an end and not good enough ends by themselves. Quality means nothing if people can’t get it. And people can’t get it without accessible distribution. High quality Linux distros aren’t enough; they need to be pre-installed on hardware products you can buy in mainstream retail stores! “The mainstream” buys products they can touch and hold; if you can’t find it in a mainstream store, it doesn’t exist. - -Think about it: **why do normal people use Windows or macOS**? Because the physical computer they bought included it. iOS or Android? Because it was shipped by default on their physical smartphone. The notion of replacing a device’s operating system with a new one doesn’t exist to “the mainstream”. Only the [“three-dot” users][6] ever do that, and they’re about 5% of the market. If the only way to get your OS is to install it yourself, you have no chance of succeeding in the mainstream. - -As for features, people generally use only a very small fraction of what’s available to them. When it comes to usability, most users [memorize their software rather than understanding it][7]–and you can memorize anything if you really have to. A better user interface helps, but it isn’t needed for the memorizers and mostly benefits power users (the 30% of the market “two-dot and up” crowd) who recognize patterns and appreciate logic, consistency, and good design. So these are not good enough on their own. - -This doesn’t mean we should forget about features and usability! Not at all! But if the goal is to “go mainstream,”we have to understand the true audience: **hardware vendors, not end users**. The goal is to have a software product appealing enough to get picked up by vendors when they go shopping for one, because that’s mostly how it works. Companies like Apple that do their own custom top-to-bottom hardware and software for big-name products are rare. Most build on top of 3rd-party software that requires the least integration and custom work from their in-house software team. If your software isn’t up to the task, they move onto the next option. So when some hardware vendor has a need, your software better be ready! - -And what do hardware vendors need? - - * **Flexibility**. Your software has to be easily adaptable to whatever kind of device they have without tons of custom engineering they’ll be on the hook for supporting over the product’s lifecycle. - * **Features that make their devices look good**. Support for its physical hardware characteristics, good performance, a pleasant-looking user interface… reasons for people to buy it, basically. - * **Stability**. Can’t crash and dump users at a command line terminal prompt. Has to actually work. Can’t feel like a hobbyist science fair project. - * **Usability that’s to be good enough to minimize support costs**. When something goes wrong, “the mainstream” contacts their hardware vendor. Usability needs to be good enough so that this happens as infrequently as possible. - - - -It doesn’t need to be perfect. It just needs to do that stuff. This is how Windows conquered the PC market in the 90s despite being terrible! And our stuff is much better! - -I see evidence that this is already working for KDE. Pine ships Manjaro with Plasma Mobile and Plasma Desktop on the [PinePhone][8] and [PineBook Pro][9], respectively. Valve also picked Plasma Desktop for the [Steam Deck][10], replacing GNOME for their new version of SteamOS. I see KDE software as well-positioned here and getting better all the time. So let’s keep doubling down on delivering what hardware vendors need to sell their awesome products. - -_Originally written by KDE developer Nate Graham on his [blog PointiestStick][11]. The content has been reproduced here with his permission. The views expressed are of author’s own and it may not reflect the views of It’s FOSS._ - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/what-desktop-linux-needs-to-succeed-in-the-mainstream/ - -作者:[Community][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/team/ -[b]: https://github.com/lujun9972 -[1]: https://www.youtube.com/watch?v=0506yDSgU7M&list=PL8mG-RkN2uTyhe6fxWpnsHv53Y1I-K3yu -[2]: https://www.youtube.com/watch?v=TtsglXhbxno&list=PL8mG-RkN2uTyhe6fxWpnsHv53Y1I-K3yu&index=3 -[3]: https://invent.kde.org/teams/usability/issue-board/-/boards/7723 -[4]: https://swaywm.org/ -[5]: https://drewdevault.com/2021/12/05/What-desktop-Linux-needs.html -[6]: https://pointieststick.com/2021/11/29/who-is-the-target-user -[7]: https://pointieststick.com/2021/11/30/more-about-those-zero-dot-users/ -[8]: https://www.pine64.org/pinephone/ -[9]: https://www.pine64.org/pinebook-pro/ -[10]: https://www.steamdeck.com/ -[11]: https://pointieststick.com/2021/12/09/what-desktop-linux-needs-to-succeed-in-the-mainstream/ diff --git a/translated/talk/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md b/translated/talk/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md new file mode 100644 index 0000000000..5787404b8d --- /dev/null +++ b/translated/talk/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md @@ -0,0 +1,71 @@ +[#]: subject: "What Desktop Linux Needs to Succeed in the Mainstream" +[#]: via: "https://news.itsfoss.com/what-desktop-linux-needs-to-succeed-in-the-mainstream/" +[#]: author: "Community https://news.itsfoss.com/author/team/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +桌面 Linux 需要什么才能在主流中获得成功? +====== + +> 这是 Linux 走向大众最重要的一件事。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/penguin-laptop.png?w=1200&ssl=1) + +你可能看过 [最近 Linus Tech Tips 关于切换到 Linux 的视频][1],以及 [他对 KDE 软件的一些抱怨的那个视频][2]。对于那些关注此事的人,我想让你们知道,我们(KDE)正在努力修复 Linus 提出的问题,你们可以在 [这里][3] 跟踪我们的进展。值得庆幸的是,大部分的问题都相当小,应该很容易解决。 + +关于桌面 Linux 需要什么才能成为主流的问题。[Sway][4] 开发者 [Drew DeVault 针对该视频发表了一篇文章][5],而这篇博文是我的版本。Drew 强调了可访问性,我也同意,但结论略有不同。 + +### 桌面 Linux 需要预装在零售硬件上才能在主流市场取得成功 + +就是这样。 + +请允许我解释一下。 + +人们经常被功能和可用性所困扰,这些都很重要,但它们只是达到目的的手段,本身并不是好的目的。如果人们根本不能得到它,质量就毫无意义。而如果没有可访问的发行版,人们就无法得到它。高质量的 Linux 发行版还不够;它们需要被预装在你可以在主流零售店买到的硬件产品上。“主流人群”会购买他们可以触摸和拿起的产品;如果在主流商店找不到它,它就不存在。 + +想一想,**为什么普通人都使用 Windows 或 macOS**?因为他们购买的实体电脑包含了它。iOS 或 Android 呢?它被默认装在了他们的实体智能手机上。对于“主流人群”来说,不存在用一个新的操作系统替换设备的想法。只有 [“三点”用户][6] 才会这么做,而他们只占市场的 5% 左右。如果获得你的操作系统的唯一途径是自己安装,那么你就没有机会在主流市场取得成功。 + +至于功能,人们通常只使用可用功能的很小的一部分。在可用性方面,大多数用户 [记住他们的软件如何使用而不是理解它][7] —— 如果你真的需要,你可以记住任何东西。一个更好的用户界面会有所帮助,但是对于那些记忆这些的人来说并不是必需的,而是主要有利于那些能够识别模式并欣赏逻辑、一致性和良好设计的高级用户(市场上 30% 的“二点”人群)。因此,这些东西本身就不够好。 + +但这并不意味着我们应该忘记功能和可用性!一点也不。但是如果我们的目标是“走向主流”,我们就必须了解真正的受众:**是硬件供应商,而不是终端用户**。我们的目标是让软件产品有足够的吸引力,以便在供应商选购时被他们选中,因为它基本上就是这样做的。像苹果这样为知名产品定制自上而下的硬件和软件的公司很少。大多数公司都建立在第三方软件之上,这些软件需要他们内部软件团队进行最少的整合和定制工作。如果你的软件不能胜任,他们会转向下一个选择。因此,当一些硬件供应商有需求时,你的软件最好已经准备好了! + +而硬件供应商需要什么? + + * **灵活性**。你的软件必须容易适应他们的任何类型的设备,而不需要大量的定制工程,他们将在产品的生命周期中负责支持。 + * **能使他们的设备看起来不错的功能**。对其物理硬件特性的支持、良好的性能、令人愉快的用户界面……人们购买它的理由基本上是这些。 + * **稳定性**。不能崩溃并将用户抛弃在命令行终端提示符下。必须可以实际工作。不能让人感觉像一个业余的科学展览会项目。 + * **可用性要足够好,以减少支持成本**。当出现问题时,“主流人群”会联系他们的硬件供应商。可用性需要足够好,以便尽可能少地发生这种情况。 + +它不需要完美。它只需要做这些事情。这就是 Windows 在 90 年代征服了个人电脑市场的方式,尽管它很糟糕!而我们的东西要好得多! + +我看到有证据表明这已经适用于 KDE 了。Pine 在 [PinePhone][8] 和 [PineBook Pro][9] 上分别为 Manjaro 提供了移动版和桌面版的 Plasma。Valve 也为 [Steam Deck][10] 选择了桌面版的 Plasma,在他们的新版 SteamOS 中取代了 GNOME。我认为 KDE 软件在这里定位良好,并且一直在变得更好。因此,让我们继续加倍努力提供硬件供应商销售其出色产品所需的东西。 + +原文由 KDE 开发者 Nate Graham 发表在他的 [博客 PointiestStick][11] 中。 本文经许可后转载。所表达的观点代表作者自己,可能不能反映我们的观点。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/what-desktop-linux-needs-to-succeed-in-the-mainstream/ + +作者:[Nate Graham][11] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/team/ +[b]: https://github.com/lujun9972 +[1]: https://linux.cn/article-14053-1.html +[2]: https://www.youtube.com/watch?v=TtsglXhbxno&list=PL8mG-RkN2uTyhe6fxWpnsHv53Y1I-K3yu&index=3 +[3]: https://invent.kde.org/teams/usability/issue-board/-/boards/7723 +[4]: https://swaywm.org/ +[5]: https://drewdevault.com/2021/12/05/What-desktop-Linux-needs.html +[6]: https://pointieststick.com/2021/11/29/who-is-the-target-user +[7]: https://pointieststick.com/2021/11/30/more-about-those-zero-dot-users/ +[8]: https://www.pine64.org/pinephone/ +[9]: https://www.pine64.org/pinebook-pro/ +[10]: https://www.steamdeck.com/ +[11]: https://pointieststick.com/2021/12/09/what-desktop-linux-needs-to-succeed-in-the-mainstream/ From 717c3587b8775430211240592d477bb37f36ccf3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 18 Jan 2022 02:56:03 +0800 Subject: [PATCH 016/334] P @wxy https://linux.cn/article-14189-1.html --- ...p Linux Needs to Succeed in the Mainstream.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) rename {translated/talk => published}/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md (72%) diff --git a/translated/talk/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md b/published/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md similarity index 72% rename from translated/talk/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md rename to published/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md index 5787404b8d..1594f838a1 100644 --- a/translated/talk/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md +++ b/published/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md @@ -3,9 +3,9 @@ [#]: author: "Community https://news.itsfoss.com/author/team/" [#]: collector: "lujun9972" [#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14189-1.html" 桌面 Linux 需要什么才能在主流中获得成功? ====== @@ -24,11 +24,13 @@ 请允许我解释一下。 -人们经常被功能和可用性所困扰,这些都很重要,但它们只是达到目的的手段,本身并不是好的目的。如果人们根本不能得到它,质量就毫无意义。而如果没有可访问的发行版,人们就无法得到它。高质量的 Linux 发行版还不够;它们需要被预装在你可以在主流零售店买到的硬件产品上。“主流人群”会购买他们可以触摸和拿起的产品;如果在主流商店找不到它,它就不存在。 +人们经常被功能和可用性所困扰,这些都很重要,但它们只是达到目的的手段,本身并不是目的。如果人们根本不能得到它,质量就毫无意义。而如果没有可访问的发行版,人们就无法得到它。高质量的 Linux 发行版还不够;它们需要被预装在你可以在主流零售店买到的硬件产品上。“主流人群”会购买他们可以触摸和拿起的产品;如果在主流商店找不到它,它就不存在。 -想一想,**为什么普通人都使用 Windows 或 macOS**?因为他们购买的实体电脑包含了它。iOS 或 Android 呢?它被默认装在了他们的实体智能手机上。对于“主流人群”来说,不存在用一个新的操作系统替换设备的想法。只有 [“三点”用户][6] 才会这么做,而他们只占市场的 5% 左右。如果获得你的操作系统的唯一途径是自己安装,那么你就没有机会在主流市场取得成功。 +想一想,**为什么普通人都使用 Windows 或 macOS**?因为他们购买的实体电脑包含了它。iOS 或 Android 呢?它被默认装在了他们的实体智能手机上。对于“主流人群”来说,不存在用一个新的操作系统替换设备的操作系统的想法。只有 [“三点”用户][6] 才会这么做,而他们只占市场的 5% 左右。如果获得你的操作系统的唯一途径是自己安装,那么你就没有机会在主流市场取得成功。 -至于功能,人们通常只使用可用功能的很小的一部分。在可用性方面,大多数用户 [记住他们的软件如何使用而不是理解它][7] —— 如果你真的需要,你可以记住任何东西。一个更好的用户界面会有所帮助,但是对于那些记忆这些的人来说并不是必需的,而是主要有利于那些能够识别模式并欣赏逻辑、一致性和良好设计的高级用户(市场上 30% 的“二点”人群)。因此,这些东西本身就不够好。 +![](https://pointieststick.files.wordpress.com/2021/11/computers-skill.jpg?w=1085) + +至于功能,人们通常只使用可用功能的很小的一部分。在可用性方面,大多数用户是 [记住他们的软件如何使用而不是理解它][7] —— 如果你真的需要,你可以记住任何东西。一个更好的用户界面会有所帮助,但是对于那些记忆这些的人来说并不是必需的,而它主要有利于那些能够识别模式,并欣赏逻辑、一致性和良好设计的高级用户(市场上 30% 的“二点及以上”人群)。因此,这些东西本身就不够好。 但这并不意味着我们应该忘记功能和可用性!一点也不。但是如果我们的目标是“走向主流”,我们就必须了解真正的受众:**是硬件供应商,而不是终端用户**。我们的目标是让软件产品有足够的吸引力,以便在供应商选购时被他们选中,因为它基本上就是这样做的。像苹果这样为知名产品定制自上而下的硬件和软件的公司很少。大多数公司都建立在第三方软件之上,这些软件需要他们内部软件团队进行最少的整合和定制工作。如果你的软件不能胜任,他们会转向下一个选择。因此,当一些硬件供应商有需求时,你的软件最好已经准备好了! @@ -41,7 +43,7 @@ 它不需要完美。它只需要做这些事情。这就是 Windows 在 90 年代征服了个人电脑市场的方式,尽管它很糟糕!而我们的东西要好得多! -我看到有证据表明这已经适用于 KDE 了。Pine 在 [PinePhone][8] 和 [PineBook Pro][9] 上分别为 Manjaro 提供了移动版和桌面版的 Plasma。Valve 也为 [Steam Deck][10] 选择了桌面版的 Plasma,在他们的新版 SteamOS 中取代了 GNOME。我认为 KDE 软件在这里定位良好,并且一直在变得更好。因此,让我们继续加倍努力提供硬件供应商销售其出色产品所需的东西。 +我看到有证据表明 KDE 已经是这样了。Pine 在 [PinePhone][8] 和 [PineBook Pro][9] 上分别为 Manjaro 提供了 Plasma 的移动版和桌面版。Valve 也为 [Steam Deck][10] 选择了 Plasma 的桌面版,在他们的新版 SteamOS 中取代了 GNOME。我认为 KDE 软件定位良好,并且一直在变得更好。因此,让我们继续加倍努力提供硬件供应商销售其出色产品所需的东西。 原文由 KDE 开发者 Nate Graham 发表在他的 [博客 PointiestStick][11] 中。 本文经许可后转载。所表达的观点代表作者自己,可能不能反映我们的观点。 From cf476534ee09c345aa7fc66847aaf30ec40783e8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 18 Jan 2022 03:35:42 +0800 Subject: [PATCH 017/334] RP @geekpi https://linux.cn/article-14190-1.html --- ...tainers on Linux without sudo in Podman.md | 54 ++++++++----------- 1 file changed, 21 insertions(+), 33 deletions(-) rename {translated/tech => published}/20220111 Run containers on Linux without sudo in Podman.md (62%) diff --git a/translated/tech/20220111 Run containers on Linux without sudo in Podman.md b/published/20220111 Run containers on Linux without sudo in Podman.md similarity index 62% rename from translated/tech/20220111 Run containers on Linux without sudo in Podman.md rename to published/20220111 Run containers on Linux without sudo in Podman.md index c917b6a1f1..702134a369 100644 --- a/translated/tech/20220111 Run containers on Linux without sudo in Podman.md +++ b/published/20220111 Run containers on Linux without sudo in Podman.md @@ -3,63 +3,55 @@ [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14190-1.html" -在 Podman 中无需 sudo 在 Linux 上运行容器 +无需 sudo 使用 Podman 在 Linux 上运行容器 ====== -为 rootless 容器配置你的系统。 -![Command line prompt][1] -容器是现代计算的一个重要组成部分,随着围绕容器的基础设施的发展,新的和更好的工具开始浮出水面。过去,你只需用 [LXC][2] 就可以运行容器,然后 Docker 得到了普及,事情开始变得越来越复杂。最终,我们得到了我们所期望的容器管理系统 [Podman][3],一个无守护程序的容器引擎,使容器和 pod 易于构建、运行和管理。 +> 配置你的系统使用无根容器。 -容器直接与 Linux 内核能力(如 cgroups 和命名空间)交互,它们在这些命名空间中产生大量的新进程。简而言之,运行一个容器实际上就是在 Linux 系统内部运行一个 Linux 系统。从操作系统的角度来看,它看起来非常像一种管理和特权活动。普通用户通常不能像容器那样自由支配系统资源,所以默认情况下,运行 Podman 需要 root 或 `sudo` 权限。然而,这只是默认设置,而且这绝不是唯一可用的设置。本文演示了如何配置你的 Linux 系统,使普通用户可以在不使用 `sudo` 的情况下运行 Podman(“rootless”)。 +![](https://img.linux.net.cn/data/attachment/album/202201/18/033424l111pvcc1iy0a1a1.jpg) + +容器是现代计算的一个重要组成部分,随着围绕容器的基础设施的发展,新的和更好的工具开始浮出水面。过去,你只需用 [LXC][2] 就可以运行容器,然而随着 Docker 得到了普及,它开始变得越来越复杂。最终,我们在 [Podman][3] 得到了我们所期望的容器管理系统:一个无守护进程的容器引擎,它使容器和吊舱易于构建、运行和管理。 + +容器直接与 Linux 内核能力(如控制组和命名空间)交互,它们在这些命名空间中产生大量的新进程。简而言之,运行一个容器实际上就是在 Linux 系统内部运行一个 Linux 系统。从操作系统的角度来看,它看起来非常像一种管理和特权活动。普通用户通常不能像容器那样自由支配系统资源,所以默认情况下,运行 Podman 需要 root 或 `sudo` 权限。然而,这只是默认设置,而且这绝不是唯一可用的设置。本文演示了如何配置你的 Linux 系统,使普通用户可以在不使用 `sudo` 的情况下(“无根rootless”)运行 Podman。 ### 命名空间的用户 ID -[内核命名空间][4]本质上是一种虚构的结构,可帮助 Linux 跟踪哪些进程属于同一类。 这是 Linux 中的队列分组。 一个队列中的进程与另一个队列中的进程之间实际上没有区别,但将它们彼此隔离是有帮助的。 将它们分开是声明一组进程为“容器”而另一组进程为你的操作系统的关键。 +[内核命名空间][4] 本质上是一种虚构的结构,可帮助 Linux 跟踪哪些进程属于同一类。这是 Linux 中的“队列护栏”。一个队列中的进程与另一个队列中的进程之间实际上没有区别,但可以将它们用“警戒线”彼此隔离。要声明一组进程为“容器”,而另一组进程为你的操作系统,将它们分开是关键。 -Linux 通过用户 ID(UID)和组 ID(GID)来跟踪哪个用户或组拥有的进程。通常情况下,一个用户可以访问一千个左右的从属 UID,以分配给命名空间的子进程。由于 Podman 运行的是分配给启动容器的用户的整个从属操作系统,因此你需要的不仅仅是默认分配的 subuid 和 subgid。 - -你可以用 `usermod` 命令授予一个用户更多的 subuid 和 subgid。例如,要授予用户 `tux` 更多的 subuid 和 subgid,选择一个还没分配用户的适当的高 UID(如 200,000),然后将其增加几千: +Linux 通过用户 ID(UID)和组 ID(GID)来跟踪哪个用户或组拥有的进程。通常情况下,一个用户可以访问一千个左右的从属 UID,以分配给命名空间的子进程。由于 Podman 运行的是分配给启动容器的用户的整个从属操作系统,因此你需要的不仅仅是默认分配的从属 UID 和从属 GID。 +你可以用 `usermod` 命令授予一个用户更多的从属 UID 和从属 GID。例如,要授予用户 `tux` 更多的从属 UID 和从属 GID,选择一个还没分配用户的适当的高 UID(如 200000),然后将其增加几千: ``` - - $ sudo usermod \ -\--add-subuids 200000-265536 \ -\--add-subgids 200000-265536 \ -tux - + --add-subuids 200000-265536 \ + --add-subgids 200000-265536 \ + tux ``` ### 命名空间访问 -对命名空间也有限制。这通常被设置得很高,但你可以用 `systctl`,即内核参数工具来验证用户的命名空间分配: - +对命名空间数量也有限制。这通常被设置得很高。你可以用 `systctl`,即内核参数工具来验证用户的命名空间分配: ``` - - $ sysctl --all --pattern user_namespaces user.max_user_namespaces = 28633 - ``` 这是很充足的命名空间,而且可能是你的发行版默认设置的。如果你的发行版没有这个属性或者设置得很低,那么你可以在文件 `/etc/sysctl.d/userns.conf` 中输入这样的文本来创建它: - ``` -`user.max_user_namespaces=28633` +user.max_user_namespaces=28633 ``` 加载该设置: - ``` -`$ sudo sysctl -p /etc/sysctl.d/userns.conf` +$ sudo sysctl -p /etc/sysctl.d/userns.conf ``` ### 在没有 root 权限的情况下运行一个容器 @@ -68,18 +60,14 @@ user.max_user_namespaces = 28633 重启后,试着运行一个容器镜像: - ``` - - $ podman run -it busybox echo "hello" hello - ``` ### 容器像命令一样 -如果你是第一次接触容器,可能会觉得很神秘,但实际上,它们与你现有的 Linux 系统没有什么不同。它们实际上是在你的系统上运行的进程,没有仿真环境或虚拟机的成本和障碍。容器和你的操作系统之间的区别只是内核命名空间,所以它们实际上只是带有不同标签的本地进程。Podman 使这一点比以往更加明显,当你将 Podman 配置为 rootless 命令,容器感觉更像命令而不是虚拟环境。Podman 使容器和 pod 变得简单,所以请试一试。 +如果你是第一次接触容器,可能会觉得很神秘,但实际上,它们与你现有的 Linux 系统没有什么不同。它们实际上是在你的系统上运行的进程,没有仿真环境或虚拟机的成本和障碍。容器和你的操作系统之间的区别只是内核命名空间,所以它们实际上只是带有不同标签的本地进程。Podman 使这一点比以往更加明显,当你将 Podman 配置为无根命令,容器感觉更像命令而不是虚拟环境。Podman 使容器和吊舱变得简单,所以请试一试。 -------------------------------------------------------------------------------- @@ -88,7 +76,7 @@ via: https://opensource.com/article/22/1/run-containers-without-sudo-podman 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 847a84cced2b199da65e205036f5fb1ebc6d2f87 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 18 Jan 2022 05:02:23 +0800 Subject: [PATCH 018/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220117=20?= =?UTF-8?q?Restarting=20and=20Offline=20Updates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220117 Restarting and Offline Updates.md --- ...20220117 Restarting and Offline Updates.md | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 sources/tech/20220117 Restarting and Offline Updates.md diff --git a/sources/tech/20220117 Restarting and Offline Updates.md b/sources/tech/20220117 Restarting and Offline Updates.md new file mode 100644 index 0000000000..19b7136fe3 --- /dev/null +++ b/sources/tech/20220117 Restarting and Offline Updates.md @@ -0,0 +1,144 @@ +[#]: subject: "Restarting and Offline Updates" +[#]: via: "https://fedoramagazine.org/offline-updates-and-fedora-35/" +[#]: author: "Kevin Degeling https://fedoramagazine.org/author/eonfge/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Restarting and Offline Updates +====== + +![][1] + +A recurring question that goes around the internet is why Fedora Linux has to restart for updates. The truth is, Linux technically doesn’t need to restart for updates. But there is more than meets the eye. In this short guide we’ll look into why Fedora Linux asks you to restart for offline updates. + +### Offline Updates + +The process of restarting, applying updates, and then restarting again is called Offline Updates. Your computer boots into a special save-mode, where all other systems are disabled and where network access is unavailable. It then applies the updates and restarts. + +#### Why Offline Updates exist + +Offline Updates is there to protect you. Computers have become way more complex in the past twenty years. Back in the day, it was possible to apply updates without too much worry since the system itself was smaller and less interconnected. Multitasking was also in its infancy, so users were not actually using the computer and updating it at the same time. + +The Linux Kernel can change files without restarting, but the services or application using that file don’t have the same luxury. If a file being used by an application changes while the application is running then the application won’t know about the change. This can cause the application to no longer work the same way. As such, the adage that “Linux doesn’t need to restart to update” is a discredited meme. All Linux distributions should restart. + +#### How Offline Updates work + +For Offline Updates to work, there are a few components collaborating under the hood. First, there is the package manager that downloads updates and then stores them. It won’t actually apply the updates directly, but it will tell the next system that there are updates to be applied. + +The second part is done by _systemd_. When _systemd_ starts, it will see if the package manager has prepared any updates. If that’s the case, then _systemd_ won’t go into a full system start-up, but will instead start the package manager and apply the updates. Once the updates are completed _systemd_ will then restart the machine a final time. + +![][2] + +_Software update pending for Firefox. See how the Flatpak version of Firefox does not need to restart since Flatpaks are designed with reliability in mind._ + +#### Where Offline Updates comes from + +This problem was first realized in 2009 and the [early whiteboard discussions][3] are still visible. Once a possible solution was designed, it was put in development. + +Still, it required multiple components to work together. Changes had to be made to _systemd_ to [support this special start-up flow][4] and package managers had to understand the process as well. After that, it was important for users to have a supporting UI, which was included with [GNOME Software Center in 2012][5] and with [KDE Discover in 2021][6]. + +![][7] + +_[Fedora 18 official artwork][8]. Very wild, but also very reliable._ + +Finally, the feature was [officially deployed in Fedora 18][9], making Fedora Linux the first distribution that does everything it can to ensure that your system is reliable and stable. It was a long road, but this functionality has now been with us for almost 10 years. + +### Doing live updates + +Now that you’ve been told about Offline Updates and their importance, you’ll of course never do them again… but what if you do? Fedora Linux will not stop you and since we’ve all used DNF at some point, it might be good to talk about live updates as well. + +#### Nothing bad happens + +First, there is a good chance that nothing bad happens. Perhaps it’s just a minor update, or the application that it affects is not running at the moment. There will be little issue updating SDL for example, when you’re not running a game. + +Do keep in mind that running systems may still have the exploits that a previous version of the program might contain. If you update an application without restarting the application, then you’re still running the old version with its vulnerabilities. + +Many expert Linux users, like those who professionally maintain servers, will often instinctively know what application can be updated without any risk. For this specific purpose, you can also only install security-updates, which is [discussed in another article][10]. For larger updates, even professionals are encouraged to use _[dnf offline-upgrades][11]_ through the terminal. + +#### Firefox restart required + +The most common sign of instability is Firefox warning you. When Firefox detects updated packages, it will force you to restart the browser. Firefox can’t reliably run without completely restarting and it will therefor force you to restart. + +This also highlights a happy recovery: A complex and security-critical application like Firefox will help you, shielding you from potential crashes or vulnerabilities. While many might consider this a big nuisance, it could be far worse. + +![][12] + +_Demonstrated with Ubuntu 20.04.3 in GNOME Boxes. I tried to trigger this error using Fedora Linux 34 & 35, but in both cases it completely crashed Firefox. Just to drive the point home: this recovery scenario is a fluke._ + +#### Crashes + +Not every application can recover so gracefully, though, since most will just crash. Firefox might also still crash. While many of you will be familiar with Firefox gracefully terminating, this is still an exception to the rule. + +If the system in question is the X Window Server, or the GNOME Shell, then your screen might turn completely black. In many cases, you’ll still be able to complete the updates, but there is no way to know that for sure. Now, the best course of action is to switch to a terminal view. + +You can use Ctrl‑Alt‑F3 to enter a text-only instance of Fedora Linux. Once you log-in here, you can use a terminal application like _top_ to see if the update has completed. You might then shut-down all processes and restart the computer. + +![][13] + +_In top you can filter for certain processes by pressing ‘O’ and then typing a filter like ‘COMMAND=dnf’_ + +#### Blackouts + +At this point, there is still hope. Start your computer and see if the system comes back to life. If the system boots into a graphical environment, everything will likely be fine. If not, you’ll have to enter the text-only interface (TTY) and you should look at the history of DNF and see what happened underneath the hood. + +``` + + $ dnf history list + $ dnf history info {LAST ITEM} + $ dnf history redo {LAST ITEM} + +``` + +Additional information can be found in the [DNF Documentation][14]. There is no guarantee that repeating the last update-action won’t cause the same problems, but it’s the best you can try at this point. Removing third-party drivers (like those from Nvidia) might also help, as this is a known to cause updating-related issues. + +#### System bricking + +Finally, you can hard brick your system. If the system that crashes happens to be DNF or _systemd_, then it might not be possible for the system to continue its update process. When this happens, even restarting the machine will not be enough to restore it. + +There is no one answer about what to do now. First, you should get a USB-Stick with Fedora Linux. You could then try to recover the system using _systemd-nspawn_ but that is highly technical. Regular users might just as well reinstall Fedora Linux and start from scratch. + +Keep in mind that all your files are still safe. Booting from a USB Stick will not damage them, and if you make sure that you don’t overwrite your existing /home partition, then all your personal data will still be there afterwards. + +### Closing words + +Direct updates are a roll of the dice, and while you might get lucky a lot…. We tend to overestimate ourselves and the chances we have. Many of you have never experienced a system bricking, but on the whole those stories are very common on social media. As such, it’s important to spread the word. Encourage others to restart their computer to apply offline updates, and be careful yourself when you apply updates directly. + +In the future, problems like these might go away entirely. Systems like [Flatpak][15] and [Fedora Silverblue][16] have technologies that make these kinds of crashes nigh impossible, and the Linux Desktop is slowly moving into that direction. The future is bright, but for the time being we should make do with a progress bar, just like some other operating systems. + +![][17] + +_Got any personal update-related horror stories? Feel free to share them in the comments. I would also like to point out that I like memes just as much as the next guy… but they should be jokes, not technical advice._ + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/offline-updates-and-fedora-35/ + +作者:[Kevin Degeling][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/eonfge/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2022/01/offline-updates-explained_s-816x345.png +[2]: https://fedoramagazine.org/wp-content/uploads/2022/01/Screenshot-from-2022-01-09-16-39-09-1024x697.png +[3]: https://fedoraproject.org/wiki/Desktop/Whiteboards/UpdateExperience +[4]: https://www.freedesktop.org/wiki/Software/systemd/SystemUpdates/ +[5]: https://blogs.gnome.org/hughsie/2012/06/04/offline-os-updates-looking-forward-to-gnome-3-6/ +[6]: https://blog.neon.kde.org/2021/03/01/offline-updates-are-coming/ +[7]: https://fedoramagazine.org/wp-content/uploads/2022/01/banners_cow2-1024x537.png +[8]: https://fedoraproject.org/wiki/F18_Artwork +[9]: https://fedoraproject.org/wiki/Features/OfflineSystemUpdates +[10]: https://fedoramagazine.org/how-to-install-only-security-and-bugfixes-updates-with-dnf/ +[11]: https://dnf-plugins-extras.readthedocs.io/en/latest/system-upgrade.html +[12]: https://fedoramagazine.org/wp-content/uploads/2022/01/Screenshot-from-2022-01-11-21-23-52-1024x632.png +[13]: https://fedoramagazine.org/wp-content/uploads/2022/01/Screenshot-from-2022-01-09-17-24-03.png +[14]: https://dnf.readthedocs.io/en/latest/command_ref.html +[15]: https://www.flatpak.org/ +[16]: https://silverblue.fedoraproject.org/ +[17]: https://fedoramagazine.org/wp-content/uploads/2022/01/Screenshot-from-2022-01-09-17-37-45-1024x697.png From 14128a20904a6aad6e445ce267834dcfd89a5102 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 18 Jan 2022 05:02:36 +0800 Subject: [PATCH 019/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220118=20?= =?UTF-8?q?OpenBoard:=20An=20Open=20Source=20Interactive=20Whiteboard=20fo?= =?UTF-8?q?r=20Educators?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md --- ...ce Interactive Whiteboard for Educators.md | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 sources/tech/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md diff --git a/sources/tech/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md b/sources/tech/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md new file mode 100644 index 0000000000..cdf58ffb37 --- /dev/null +++ b/sources/tech/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md @@ -0,0 +1,106 @@ +[#]: subject: "OpenBoard: An Open Source Interactive Whiteboard for Educators" +[#]: via: "https://itsfoss.com/openboard/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +OpenBoard: An Open Source Interactive Whiteboard for Educators +====== + +**Brief:** _OpenBoard is an interactive open-source whiteboard tailored for schools and universities. Let’s take a look at what it offers!_ + +There are several open-source tools available for education. But, not all of them are impressively well-maintained at the level of commercial software put forward for schools and universities. + +OpenBoard is one such exceptional free and open-source tool that enables education without any compromises. It is an interactive whiteboard program that features all the essential functionalities along with support for a variety of hardware. + +### OpenBoard: Free and Open Source Interactive Whiteboard + +![][1] + +As a free and open-source program, OpenBoard seems to be an impressive option. + +The Education Department (DIP) of the canton of Geneva, in Switzerland, maintains the tool along with the community on GitHub. + +It shouldn’t cost a fortune just to facilitate easy digital teaching through interactive whiteboards. And, this is where OpenBoard comes in. + +It offers a range of features that should be enough for most schools and universities. + +While I can’t test it out in a school/university setting, I shall highlight the key features that it offers. + +### Features of OpenBoard + +![][2] + +An interactive whiteboard does not need numerous fancy features, but enough to make the experience easy for teachers to be able to express themselves as easily as possible. + +Some of the features that I noticed include: + + * Cross-platform support + * Ability to draw/write freely. + * The ability to add annotation. + * You get to remove annotation. + * Get the ability to highlight part of your whiteboard using highlighter. + * Individually interact and move the items created/drawn. + * Add multiple pages in an order to continue teaching without needing to erase. + * Ability to scroll through the pages. + * Draw a line (choosing from three different weights of lines) + * Toggle Stylus mode (if you are using a pen tablet or similar) + * Easy to erase the items created in the whiteboard + * Choose from a set of different backgrounds, including ones that turn it into a blackboard or with grid lines. + * A variety of essential applications including calculator, maps, ruler, and more is available to use through drag and drop. + * Limited shapes available to make drawing easier. + * Ability to add audio/video to your whiteboard and play it seamlessly for better experience. + * Virtual laser pointer. + * Option to zoom in and zoom out. + * Write text, resize it, and clone it. + * Take a screenshot of the screen from within the whiteboard. + * Virtual keyboard available when required. + + + +In my brief testing, the user interface and the options available worked incredibly well, without any fail. + +![][3] + +Of course, your experience will depend on the type of device and your setup. You can try it with a Wacom tablet, a dual-monitor setup, or using a projector through a touch-enabled laptop. + +### Install OpenBoard in Linux + +Fortunately, it is available across multiple platforms that include Windows, macOS, and Linux. + +If you are using Ubuntu, you can head to its official website and download the DEB file. In either case, you can choose to [install the Flatpak package][4] from [Flathub][5] for any other Linux distribution. + +[OpenBoard][6] + +### Closing Thoughts + +Overall, I found it effortless to use and navigate. You can quickly switch between multiple pages, erase/add items seamlessly while having the ability to add rich elements to the whiteboard as well. + +The presence of a virtual laser pointer, and several applications, make it suitable for use in various schools and universities without any hiccups. + +I don’t know if it can be called an alternative to Google Classroom or Miro’s Whiteboard feature but for simpler usage, OpenBoard does the job. + +If you haven’t tried this out, I recommend giving it a spin. Is there something better than this that you know of? Let me know in the comments down below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/openboard/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/openboard-screenshot.png?resize=800%2C435&ssl=1 +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/openboard-screenshot-1.png?resize=800%2C462&ssl=1 +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/openboard-dock.png?resize=800%2C344&ssl=1 +[4]: https://itsfoss.com/flatpak-guide/ +[5]: https://flathub.org/apps/details/ch.openboard.OpenBoard +[6]: https://www.openboard.ch/index.en.html From 00b877ceed4268bc15ed8b7335a66a616416c9ae Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 18 Jan 2022 05:02:49 +0800 Subject: [PATCH 020/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220117=20?= =?UTF-8?q?Record=20your=20terminal=20session=20with=20Asciinema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220117 Record your terminal session with Asciinema.md --- ...rd your terminal session with Asciinema.md | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 sources/tech/20220117 Record your terminal session with Asciinema.md diff --git a/sources/tech/20220117 Record your terminal session with Asciinema.md b/sources/tech/20220117 Record your terminal session with Asciinema.md new file mode 100644 index 0000000000..e1e75b954a --- /dev/null +++ b/sources/tech/20220117 Record your terminal session with Asciinema.md @@ -0,0 +1,164 @@ +[#]: subject: "Record your terminal session with Asciinema" +[#]: via: "https://opensource.com/article/22/1/record-terminal-session-asciinema" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Record your terminal session with Asciinema +====== +Show don't tell with Asciinema, an open source terminal session +recorder. +![4 different color terminal windows with code][1] + +Support calls are important and often satisfying in the end, but the act of clear communication can be arduous for everyone involved. If you've ever been on a support call, you've probably spent several minutes spelling out even the shortest commands and explaining in detail where the spaces and returns fall. While it's often easier to just seize control of a user's computer, that's not really the best way to educate. What you might try instead is sending a user a screen recording, but one that they can copy commands from and paste into their own terminal. + +Asciinema is an open source terminal session recorder. Similar to the `script` and `scriptreplay` commands, Asciinema records exactly what your terminal displays. It saves your "movie" recording to a text file and then replays it on demand. You can upload your movie to Asciinema.org and share them just as you would any other video on the internet, and you can even embed your movie into a webpage. + +### Install Asciinema + +On Linux, you can install Asciinema using your package manager. + +On Fedora, CentOS, Mageia, or similar: + + +``` +`$ sudo dnf install asciinema` +``` + +On Debian, Linux Mint, or similar: + + +``` +`$ sudo apt install asciinema` +``` + +On macOS, you can install using Homebrew: + + +``` +`$ sudo brew install asciinema` +``` + +On BSD and any other platform using [Pkgsrc][2]: + + +``` + + +$ cd /usr/pkgsrc/misc/py-asciinema + +$ sudo bmake install clean + +``` + +### Making movies out of text + +To start recording with Asciinema, you use the `rec` subcommand: + + +``` + + +$ asciinema rec mymovie.cast + +asciinema: recording asciicast to mymovie.cast + +asciinema: press <ctrl-d> or type "exit" when you're done + +``` + +Some friendly output alerts you that you're recording, and it tells you how to stop: Press **Ctrl+D** or just type `exit`. + +Everything you do in your terminal while Asciinema is active gets recorded. This includes input, output, errors, awkward pauses, mistakes, or successes. If you see it in your terminal during recording, it makes the cut. + +When you're finished demonstrating how the terminal works, press **Ctrl+D** or type `exit` to stop the recording. + +In this example, the resulting file, `mymovie.cast` is a collection of timestamps and actions that serve as a script (in the sense of a movie script) for the playback mechanism. + + +``` + + +{"version": 2, "width": 139, "height": 36, "timestamp": 1641457358, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}} + +[0.05351, "o", "\u001b]0;seth:~\u0007"] + +[0.05393, "o", "\u001b[1;31m$ \u001b[00m"] + +[1.380059, "o", "e"] + +[1.443823, "o", "c"] + +[1.514674, "o", "h"] + +[1.595238, "o", "o"] + +[1.789562, "o", " "] + +[2.09658, "o", "\""] + +[2.19683, "o", "h"] + +[2.403994, "o", "e"] + +[2.466784, "o", "l"] + +[2.711183, "o", "lo"] + +[3.120852, "o", "\""] + +[3.427886, "o", "\r\nhello\r\n"] + +[...] + +``` + +If you've made a mistake, you can cut the mistake by removing the lines recreating the error. Should you find yourself making lots of edits or belaboring long pauses during the recording, you can install and use the [asciinema-edit][3] utility, which can trim out blocks of "footage" by timestamps of your definition, or by eliminating idle time. + +### Playing an Asciinema movie + +You can playback your Asciinema using the `play` subcommand: + + +``` +`$ asciinema play mymovie.cast` +``` + +This takes over your terminal session and makes it into the nearest equivalent of the Silver Screen as it's likely ever to be (aside from that time you watched Star Wars in ASCII over `telnet`). Your text-based movie plays—demonstrating for your users exactly how a complex task gets done. Of course, the _actual_ commands getting played don't actually execute. This isn't a shell script in action, so even though you may have created a file `hello.txt` in your movie, there won't be a new `hello.txt` after playback. This is just for show. + +And yet it's more than just a show. You can pause Asciinema movies, select the text you see on the screen and paste it into an active terminal to run the command. Asciinema is useful documentation. It shows users how to do a task, and it allows them to copy and paste to ensure accuracy. + +### Upload your Asciinema movie  + +No Asciinema movie has yet reached a blockbuster status, but you can upload yours to Asciinema.org and share it with the world nevertheless. + + +``` +`$ asciinema upload mymovie.cast` +``` + +If you're used to YouTube upload times, you'll be pleasantly surprised by how quickly Asciinema movies transfer. A `.cast` file is usually only a few kilobytes, or at the most a few megabytes, so the upload is nearly instantaneous. You don't need an account to share your movie, but all unclaimed movies get deleted after seven days. To preserve your masterpiece, you can open an account on Asciinema and then sit back and wait for the Academy to call. + +### Asciinema as documentation + +Asciinema is a great way to demonstrate even the most basic of concepts. Because it retains the ability to copy and paste code from the recording, provides the ability to pause and play on-demand, and is completely accurate in what it portrays, it's not just as good as a screen recording. It's much, much better. Whether you use it to show off your terminal skills to your friends or whether you use it to educate colleagues and students, Asciinema is an invaluable, social, and accessible tool. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/record-terminal-session-asciinema + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/freedos.png?itok=aOBLy7Ky (4 different color terminal windows with code) +[2]: https://opensource.com/article/19/11/pkgsrc-netbsd-linux +[3]: https://github.com/cirocosta/asciinema-edit From 5d31b841d947c3b0cc7716107339fa4e6a006fda Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 18 Jan 2022 05:03:00 +0800 Subject: [PATCH 021/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220115=20?= =?UTF-8?q?Some=20ways=20DNS=20can=20break?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220115 Some ways DNS can break.md --- .../tech/20220115 Some ways DNS can break.md | 206 ++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 sources/tech/20220115 Some ways DNS can break.md diff --git a/sources/tech/20220115 Some ways DNS can break.md b/sources/tech/20220115 Some ways DNS can break.md new file mode 100644 index 0000000000..92e94354f1 --- /dev/null +++ b/sources/tech/20220115 Some ways DNS can break.md @@ -0,0 +1,206 @@ +[#]: subject: "Some ways DNS can break" +[#]: via: "https://jvns.ca/blog/2022/01/15/some-ways-dns-can-break/" +[#]: author: "Julia Evans https://jvns.ca/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Some ways DNS can break +====== + +When I first learned about it, DNS didn’t seem like it should be THAT complicated. Like, there are DNS records, they’re stored on a server, what’s the big deal? + +But with DNS, reading about how it works in a textbook doesn’t prepare you for the sheer volume of different ways DNS can break your system in practice. It’s not just caching problems! + +So I [asked people on Twitter][1] for example of DNS problems they’ve run into, especially DNS problems that **didn’t initially appear to be DNS problems**. (the popular “it’s always DNS” meme) + +I’m not going to discuss how to solve or avoid any of these problems in this post, but I’ve linked to webpages discussing the problem where I could find them. + +### problem: slow network requests + +Your network requests are a little bit slower than expected, and it’s actually because your DNS resolver is slow for some reason. This might be because the resolver is under a lot of load, or it has a memory leak, or something else. + +I’ve run into this before with my router’s DNS forwarder – all of my DNS requests were slow, and I restarted my router and that fixed the problem. + +### problem: DNS timeouts + +A couple of people mentioned network requests that were taking 2+ seconds or 30 seconds because of DNS queries that were timing out. This is sort of the same as “slow requests”, but it’s worse because queries can take several seconds to time out. + +Sophie Haskins has a great blog post [Misadventures with Kube DNS][2] about DNS timeouts with Kubernetes. + +### problem: ndots + +A few people mentioned a specific issue where Kubernetes sets `ndots:5` in its `/etc/resolv.conf` + +Here’s an example /etc/resolv.conf from [Kubernetes pods /etc/resolv.conf ndots:5 option and why it may negatively affect your application performances][3]. + +``` + + nameserver 100.64.0.10 + search namespace.svc.cluster.local svc.cluster.local cluster.local eu-west-1.compute.internal + options ndots:5 + +``` + +My understanding is that if this is your `/etc/resolv.conf` and you look up `google.com`, your application will call the C `getaddrinfo` function, and `getaddrinfo` will: + + 1. look up `google.com.namespace.svc.cluster.local.` + 2. look up `google.com.svc.cluster.local.` + 3. look up `google.com.cluster.local.` + 4. look up `google.com.eu-west-1.compute.internal.` + 5. look up `google.com.` + + + +Basically it checks if `google.com` is actually a subdomain of everything on the `search` line. + +So every time you make a DNS query, you need to wait for 4 DNS queries to fail before you can get to the actual real DNS query that succeeds. + +### problem: it’s hard to tell what DNS resolver(s) your system is using + +This isn’t a bug by itself, but when you run into a problem with DNS, often it’s related in some way to your DNS resolver. I don’t know of any foolproof way to tell what DNS resolver is being used. + +A few things I know: + + * on Linux, I think that most things use /etc/resolv.conf to choose a DNS resolver. There are definitely exceptions though, for example your browser might ignore /etc/resolv.conf and use a different DNS-over-HTTPS service instead. + * if you’re using UDP DNS, you can use `sudo tcpdump port 53` to see where DNS requests are being sent. This doesn’t work if you’re using DNS over HTTPS or DNS over TLS though. + + + +I also vaguely remember it being even more confusing on MacOS than on Linux, though I don’t know why. + +### problem: DNS servers that return NXDOMAIN instead of NOERROR + +Here’s a problem that I ran into once, where nginx couldn’t resolve a domain. + + * I set up nginx to use a specific DNS server to resolve DNS queries + * when visiting the domain, nginx made 2 queries, one for an `A` record, and one for an `AAAA` record + * the DNS server returned a `NXDOMAIN` reply for the `A` query + * nginx decided “ok, that domain doesn’t exist”, and gave up + * the DNS server returned a successful reply for the `AAAA` query + * nginx ignored the `AAAA` record because it had already given up + + + +The problem was that the DNS server should have returned `NOERROR` – that domain _did_ exist, it was just that there weren’t any `A` records for it. I reported the bug, they fixed it, and that fixed the problem. + +I’ve implemented this bug myself too, so I understand why it happens – it’s easy to think “there aren’t any records for this query, I should return an `NXDOMAIN` error”. + +### problem: negative DNS caching + +If you visit a domain before creating a DNS record for it, the **absence** of the record will be cached. This is very surprising the first time your run into it – I only learned about this last year! + +The TTL for cache entry is the TTL of the domain’s SOA record – for example for `jvns.ca`, it’s an hour. + +### problem: nginx caching DNS records forever + +If you put this in your nginx config: + +``` + + location / { + proxy_pass https://some.domain.com; + } + +``` + +then nginx will resolve `some.domain.com` once on startup and never again. This is especially dangerous if the IP address for `some.domain.com` changes infrequently, because it might keep happily working for months and then suddenly break at 2am one day. + +There are pretty well-known ways to fix this and this post isn’t about nginx so I won’t get into it, but it’s surprising the first time you run into it. + +Here’s a [blog post][4] with a story of how this happened to someone with an AWS load balancer. + +### problem: Java caching DNS records forever + +Same thing, but for Java: [Apparently][5] depending on how you configure Java, “the JVM default TTL [might be] set so that it will never refresh DNS entries until the JVM is restarted.” + +I haven’t run into this myself but I asked a friend about it who writes more Java than me and they told me that it’s happened to them. + +Of course, literally any software could have this problem of caching DNS records forever, but the main cases I’ve heard of in practice are nginx and Java. + +### problem: that entry in /etc/hosts you forgot about + +Another variant on caching issues: entries in `/etc/hosts` that override your usual DNS settings! + +This is extra confusing because `dig` ignores `/etc/hosts`, so everything SEEMS like it should be fine (”`dig whatever.com` is working!“). + +### problem: your email isn’t being sent / is going to spam + +The way email is sent and validated is through DNS (MX records, SPF records, DKIM records), so a lot of email problems are DNS problems. + +### problem: internationalized domain names don’t work + +You can register domain names with non-ASCII characters or emoji like [https://💩.la][6]. + +The way this works with DNS is that `💩.la` gets translated into `xn--ls8h.la` with an encoding called “punycode”. + +But even though there’s a clear standard for how they should work with DNS, a lot of software doesn’t handle internationalized domain names well! There’s a fun story about this in Julian Squires’ great talk [The emoji that Killed Chrome!!][7]. + +### problem: TCP DNS is blocked by a firewall + +A couple of people mentioned that some firewalls allow UDP port 53 but not TCP port 53. But large DNS queries need to use TCP port 53, so this can cause weird intermittent problems that are hard to debug. + +### problem: musl doesn’t support TCP DNS + +A lot of applications use libc’s `getaddrinfo` to make DNS queries. musl is an alternative to `glibc` that’s used in Alpine Docker container which doesn’t support TCP DNS. This can cause problems if you make DNS queries where the response would be too big to fit inside a regular DNS UDP packet (512 bytes). + +I’m still a bit fuzzy on this so I might have it wrong, but my understanding of how this can break is: + + 1. musl’s getaddrinfo makes a DNS query + 2. the DNS server notices that the response is too big to fit in a single DNS response packet + 3. the DNS server returns an **empty** truncated response, expecting that the client will retry by making a TCP DNS query + 4. `musl` does not support TCP so it does not retry + + + +A blog post about this: [DNS resolution issue in Alpine Linux][8] + +### problem: round robin DNS doesn’t work with `getaddrinfo` + +One way you could approach load balancing is to use “round robin DNS”. The idea is that every time you make a DNS query, you get a different IP address. Apparently this works if you use `gethostbyname` to make DNS queries, but it does not work if you use `getaddrinfo` because `getaddrinfo` sorts the IP responses it receives. + +So you could run into an upsetting problem if you switch from `gethostbyname` to `getaddrinfo` behind the scenes without realising that this will break your DNS load balancing. + +This is especially insidious because you might not realize that you’re switching to `gethostbyname` to `getaddrinfo` at all – if you’re not writing a C program, those functions calls are hidden inside some library. So it could be part of a seemingly innocuous upgrade. + +Here are a couple of pages discussing this: + + * [getaddrinfo breaks round robin DNS][9] + * [getaddrinfo with round robin DNS and happy eyeballs][10] + + + +### problem: a race condition when starting a service + +A problem someone [mentioned][11] with Kubernetes DNS: they had 2 containers which started simultaneously and immediately tried to resolve each other. But the DNS lookup failed because the Kubernetes DNS change hadn’t happened yet, and then the failure was cached so it kept failing. + +### that’s all! + +I’ve definitely missed some important DNS problems here, so I’d love to hear what I’ve missed. I’d also love links to blog posts that write up examples of these problems – I think it’s really useful to see how the problem specifically manifests in practice and how people debugged it. + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2022/01/15/some-ways-dns-can-break/ + +作者:[Julia Evans][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://twitter.com/b0rk/status/1481265429897261058 +[2]: https://blog.sophaskins.net/blog/misadventures-with-kube-dns/ +[3]: https://pracucci.com/kubernetes-dns-resolution-ndots-options-and-why-it-may-affect-application-performances.html +[4]: https://medium.com/driven-by-code/dynamic-dns-resolution-in-nginx-22133c22e3ab +[5]: https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/java-dg-jvm-ttl.html +[6]: https://💩.la/ +[7]: https://www.youtube.com/watch?v=UE-fJjMasec +[8]: https://christoph.luppri.ch/fixing-dns-resolution-for-ruby-on-alpine-linux +[9]: https://groups.google.com/g/consul-tool/c/AGgPjrrkw3g +[10]: https://daniel.haxx.se/blog/2012/01/03/getaddrinfo-with-round-robin-dns-and-happy-eyeballs/ +[11]: https://mobile.twitter.com/omatskiv/status/1481305175440646148 From 05e3e74e85124645435d78b88d58404b8c08ba02 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 18 Jan 2022 05:03:54 +0800 Subject: [PATCH 022/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220117=20?= =?UTF-8?q?Popular=20Nintendo=20Video=20Game=20Emulator=20=E2=80=98Cemu?= =?UTF-8?q?=E2=80=99=20Plans=20to=20Go=20Open-Source=20with=20Linux=20Supp?= =?UTF-8?q?ort?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md --- ...lans to Go Open-Source with Linux Support.md | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sources/news/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md diff --git a/sources/news/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md b/sources/news/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md new file mode 100644 index 0000000000..7d088078f9 --- /dev/null +++ b/sources/news/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md @@ -0,0 +1,72 @@ +[#]: subject: "Popular Nintendo Video Game Emulator ‘Cemu’ Plans to Go Open-Source with Linux Support" +[#]: via: "https://news.itsfoss.com/cemu-nintendo-linux/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Popular Nintendo Video Game Emulator ‘Cemu’ Plans to Go Open-Source with Linux Support +====== + +If you’re into retro gaming, you may have come across retro console emulators. For those unaware, they are basically software or hardware that allow the host system to run games designed for another system. + +Lately, Cemu has managed to grab the attention of the open-source community. It is one of the many retro console emulators out there that lets you play games tailored for Nintendo Wii U. However, as of now, it distinguishes itself from most of them in one major aspect, its closed-source nature, but that’s about to change. + +### What is Cemu? + +[Cemu][1] is a popular software-based retro console emulator that specifically emulates Nintendo Wii U games and is the first one to do so. It makes use of both OpenGL and Vulkan to run the games. + +It has improved significantly over the years and can now [play around 51% of the entire Wii U library][2]. This list includes popular titles like Mario Kart 8 and The Legend of Zelda: Breath of the Wild. + +Although released back in 2015, Cemu is only available on Windows. But, a new roadmap published by the developers states that Cemu should arrive on Linux soon. + +And, as a cherry on top, Cemu will be going open-source! + +### The Way to Open-Source and Linux + +The roadmap includes a total of eight milestones planned by the devs. Among them are plans to develop a Linux port and make the code available to the community. + +Talking about Cemu going open-source, the devs have plans to do this by 2022. So, you should not keep your hopes high for anything to arrive soon enough. + +Moving to Linux involves rewriting the source code from C to C++ and migrating from Visual Studio to cmake. + +Here’s what the devs had to say about bringing Cemu to Linux: + +> We eventually want to offer a native Linux version. This has been an ongoing side-project, albeit progressing relatively slowly due to somewhat low-priority nature and being dependent on other tasks. About 70% of the work has been done at this point.  + +The devs have also mentioned that the porting process is accompanied by other duties like the software H264 decoder and cubeb backend. Since a major of work has been completed, it’s safe to say Cemu will be coming to Linux very soon. + +### Other Plans + +The devs have considered implementing LLVM as CPU JIT backend for translating PowerPC (Wii U’s host architecture) to x86 architectures like ARM. + +They have also just begun working on a new shader decompiler to reduce shader compilation time and stuttering. + +You can refer to the [official roadmap][3] for more details. + +### Wrapping Up + +This is definitely a massive gift to retro gaming enthusiasts eager to contribute and make Cemu better. + +Cemu will finally join the likes of many popular and open-source Nintendo console emulators like Citra, Dolphin, and Yuzu. + +_What do you think of Cemu going open-source? Should retro game emulators be closed-source or open-source?_ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/cemu-nintendo-linux/ + +作者:[Rishabh Moharir][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lujun9972 +[1]: https://cemu.info +[2]: https://compat.cemu.info/ +[3]: https://wiki.cemu.info/wiki/Roadmap From 66cbf3b3d0e7c5a9f6c86a4942db30a0f384efe9 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 18 Jan 2022 05:04:02 +0800 Subject: [PATCH 023/334] =?UTF-8?q?add=20done:=2020220117=20Popular=20Nint?= =?UTF-8?q?endo=20Video=20Game=20Emulator=20=E2=80=98Cemu-=20Plans=20to=20?= =?UTF-8?q?Go=20Open-Source=20with=20Linux=20Support.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20220118 .md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 sources/tech/20220118 .md diff --git a/sources/tech/20220118 .md b/sources/tech/20220118 .md new file mode 100644 index 0000000000..c7b97ccffa --- /dev/null +++ b/sources/tech/20220118 .md @@ -0,0 +1,16 @@ +[#]: subject: "" +[#]: via: "https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/" +[#]: author: "[Arindam] + +Posted by Arindam + +Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + + +====== + From 6548d47cd278c573e26c5319213654efaae56d04 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 18 Jan 2022 05:04:10 +0800 Subject: [PATCH 024/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220117=20?= =?UTF-8?q?Get=20Ready=20for=20an=20Upgrade!=20Ubuntu=2021.04=20Will=20Rea?= =?UTF-8?q?ch=20End=20of=20Life=20This=20Week?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md --- ... 21.04 Will Reach End of Life This Week.md | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 sources/news/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md diff --git a/sources/news/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md b/sources/news/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md new file mode 100644 index 0000000000..a061d453d8 --- /dev/null +++ b/sources/news/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md @@ -0,0 +1,80 @@ +[#]: subject: "Get Ready for an Upgrade! Ubuntu 21.04 Will Reach End of Life This Week" +[#]: via: "https://news.itsfoss.com/ubuntu-21-04-eol/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Get Ready for an Upgrade! Ubuntu 21.04 Will Reach End of Life This Week +====== + +[Ubuntu 21.04][1] had a good run with interesting feature additions. Some notable changes included [multi-monitor improvements][2], UI enhancements, GNOME 40-ready applications, and more. + +Now, it is time to upgrade! + +The support for updates in Ubuntu 21.04 ends this week i.e., **January 20th**. + +You will no longer receive any updates to your Ubuntu 21.04 system. If you have been using Ubuntu or any of its flavors like Ubuntu MATE, you need to upgrade your systems to Ubuntu 21.10. + +In case you did not know, Ubuntu’s non-LTS releases are maintained for nine months. I recommend you to learn about [Ubuntu release cycles][3], if you are new to Linux. + +So, now that you have to upgrade to Ubuntu 21.10, you will have to be ready for another upgrade in July 2022. But, for that, you have plenty of time! + +### Upgrading to Ubuntu 21.10 + +Unless you have a system that is not connected to the internet, and you want it to keep using Ubuntu 21.04, it is recommended that you upgrade now. + +Your system will remain vulnerable to new security risks without any updates. So, keep that in mind before making a decision. + +[Ubuntu 21.10][4] introduced many changes, including GNOME 40, [Linux Kernel 5.13][5], support for high-quality Bluetooth audio codecs, dark/light theme, and more. + +So, you might want to start considering your upgrade options! + +You can continue with Ubuntu 21.10 upgrade. You can also try distributions like [Pop!_OS 21.10][6], if you consider a fresh installation with something different. + +Not to forget, there are plenty of Ubuntu flavours as well! + +To start the upgrade, all you need to do is search for “**Software Updater**” and click on it to let it look for the upgrade/notify you. + +No matter what distribution you have, the software updater or your software center should give you the upgrade option, or you can look for it in the system settings. + +And, then follow the on-screen instructions to proceed with the upgrade process in a few more clicks. + +It is important to back up your necessary data before performing the upgrade, just to be on the safe side. + +On some flavors like Ubuntu MATE, you can also prefer to use the terminal and type in the following command to start the upgrade: + +``` + + sudo do-release-upgrade + +``` + +### The Road to Ubuntu 22.04 LTS + +Ubuntu 22.04 LTS should not disappoint you with its [list of expected features][7]. So, you can easily upgrade to it when it releases or hang on to Ubuntu 21.10 to end support in July. + +_Are you looking forward to Ubuntu 22.04 LTS as soon as it releases in April this year? Or, would you prefer to stick with Ubuntu 21.10 until July 2022?_ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/ubuntu-21-04-eol/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/ubuntu-21-04-release/ +[2]: https://news.itsfoss.com/ubuntu-21-04-multi-monitor-support/ +[3]: https://itsfoss.com/end-of-life-ubuntu/ +[4]: https://news.itsfoss.com/ubuntu-21-10-release/ +[5]: https://news.itsfoss.com/linux-kernel-5-13-release/ +[6]: https://news.itsfoss.com/pop-os-21-10/ +[7]: https://itsfoss.com/ubuntu-22-04-release-features/ From 10b7a85630cf612027055a93e6f1c54f02fb4d1d Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 18 Jan 2022 09:02:34 +0800 Subject: [PATCH 025/334] translating --- ...g things I learned about Python in 2021.md | 58 ------------------- ...g things I learned about Python in 2021.md | 57 ++++++++++++++++++ 2 files changed, 57 insertions(+), 58 deletions(-) delete mode 100644 sources/tech/20220111 8 surprising things I learned about Python in 2021.md create mode 100644 translated/tech/20220111 8 surprising things I learned about Python in 2021.md diff --git a/sources/tech/20220111 8 surprising things I learned about Python in 2021.md b/sources/tech/20220111 8 surprising things I learned about Python in 2021.md deleted file mode 100644 index b2f6db7589..0000000000 --- a/sources/tech/20220111 8 surprising things I learned about Python in 2021.md +++ /dev/null @@ -1,58 +0,0 @@ -[#]: subject: "8 surprising things I learned about Python in 2021" -[#]: via: "https://opensource.com/article/22/1/python-roundup" -[#]: author: "Sumantro Mukherjee https://opensource.com/users/sumantro" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -8 surprising things I learned about Python in 2021 -====== -Opensource.com authors shed light on new ways to use the popular -programming language. -![Hands on a keyboard with a Python book ][1] - -Python has long been one of the most popular programming languages, but that doesn't mean there's nothing new to learn. This list of Opensource.com's most-read articles about Python is an excellent place to start.  - - * Widespread adoption of machine learning is here, and its applications are still growing. See how machine learning, using [Naïve Bayes][2] classifiers and implemented with Python, can solve real-life problems. - - * The transition to Python 3 is complete, but enhancements keep coming. Seth Kenlon highlights [five hidden gems in Python 3][3] that stand out among recent improvements. - - * Openshot has been one of the best options for Linux video editing for years. This popular article will show you how you, too, can [edit video on Linux][4] with this Python app.  - - * The best part of Python is the limitless possibilities a programmer can achieve. [Cython][5] is a compiler that will not only help speed up code execution but also let users write C extensions for Python. - - * Python can make API unit testing simpler. Miguel Brito shows you [three ways to test your API][6] with Python. - - * As computation power increases, more and more programs run concurrently. That can make it challenging to debug, log, and profile what's going wrong. [VizTracer][7] was created to solve exactly that problem. - - * Users' personal projects, big and small, are a good reminder of how much fun open source coding can be. Here's an inspirational one: how Opensource.com author Darin London [monitors his greenhouse][8] using CircuitPython. - - * Linux users often encounter programs requiring a lot of command-line arguments that are not pleasant to work with. This is a [nice configuration parsing hack][9] to make life easier. - - - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/python-roundup - -作者:[Sumantro Mukherjee][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/sumantro -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/python-programming-code-keyboard.png?itok=fxiSpmnd (Hands on a keyboard with a Python book ) -[2]: https://opensource.com/article/21/1/machine-learning-python -[3]: https://opensource.com/article/21/7/python-3 -[4]: https://opensource.com/article/21/2/linux-python-video -[5]: https://opensource.com/article/21/4/cython -[6]: https://opensource.com/article/21/9/unit-test-python -[7]: https://opensource.com/article/21/3/python-viztracer -[8]: https://opensource.com/article/21/5/monitor-greenhouse-open-source -[9]: https://opensource.com/article/21/6/parse-configuration-files-python diff --git a/translated/tech/20220111 8 surprising things I learned about Python in 2021.md b/translated/tech/20220111 8 surprising things I learned about Python in 2021.md new file mode 100644 index 0000000000..998948529c --- /dev/null +++ b/translated/tech/20220111 8 surprising things I learned about Python in 2021.md @@ -0,0 +1,57 @@ +[#]: subject: "8 surprising things I learned about Python in 2021" +[#]: via: "https://opensource.com/article/22/1/python-roundup" +[#]: author: "Sumantro Mukherjee https://opensource.com/users/sumantro" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +我在 2021 年学到的关于 Python 的 8 个令人惊讶的东西 +====== +Opensource.com 的作者们揭示了使用这一流行的编程语言的新方法。 +![Hands on a keyboard with a Python book ][1] + +长期以来,Python 一直是最受欢迎的编程语言之一,但这并不意味着没有什么新东西可学。Opensource.com 上关于 Python 的阅读量最大的文章列表是一个很好的开始。 + + * 机器学习的广泛采用已经到来,其应用仍在增长。看看使用 [Naïve Bayes][2] 分类器并通过 Python 实现的机器学习如何解决现实生活中的问题。 + + * 向 Python 3 的过渡已经完成,但增强功能不断涌现。Seth Kenlon 强调了[Python 3 中的五颗隐藏的宝石][3],它们在最近的改进中脱颖而出。 + + * Openshot 多年来一直是 Linux 视频编辑的最佳选择之一。这篇受欢迎的文章将告诉你,你也可以用这个 Python 应用[在 Linux 上编辑视频][4]。 + + * Python 最好的部分是一个程序员可以实现的无限可能。[Cython][5] 是一个编译器,不仅可以帮助加快代码执行速度,还可以让用户为 Python 编写 C 语言扩展。 + + * Python可以使 API 单元测试更简单。Miguel Brito 向你展示了[用 Python 测试 API 的三种方法][6]。 + + * 随着计算能力的提高,越来越多的程序在并发运行。这可能会使调试、日志记录和剖析出错的地方成为挑战。[VizTracer][7] 正是为了解决这个问题而创建的。 + + * 用户的个人项目,无论大小,都很好地提醒我们开源编码可以有多大的乐趣。这里有一个鼓舞人心的项目:Opensource.com 的作者 Darin London 如何使用 CircuitPython [监控他的温室][8]。 + + * Linux 用户经常会遇到需要大量命令行参数的程序,这让人很不爽。这是一个[不错的配置解析技巧][9],可以让生活更轻松。 + + + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/python-roundup + +作者:[Sumantro Mukherjee][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/sumantro +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/python-programming-code-keyboard.png?itok=fxiSpmnd (Hands on a keyboard with a Python book ) +[2]: https://opensource.com/article/21/1/machine-learning-python +[3]: https://opensource.com/article/21/7/python-3 +[4]: https://opensource.com/article/21/2/linux-python-video +[5]: https://opensource.com/article/21/4/cython +[6]: https://opensource.com/article/21/9/unit-test-python +[7]: https://opensource.com/article/21/3/python-viztracer +[8]: https://opensource.com/article/21/5/monitor-greenhouse-open-source +[9]: https://opensource.com/article/21/6/parse-configuration-files-python From be78e6f4c7751594ebcd6c2ce133ea8d4ea31e90 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 18 Jan 2022 09:10:14 +0800 Subject: [PATCH 026/334] translating --- sources/tech/20220107 Try FreeDOS in 2022.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220107 Try FreeDOS in 2022.md b/sources/tech/20220107 Try FreeDOS in 2022.md index e0f0c94880..1133fa055e 100644 --- a/sources/tech/20220107 Try FreeDOS in 2022.md +++ b/sources/tech/20220107 Try FreeDOS in 2022.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/1/try-freedos" [#]: author: "Jim Hall https://opensource.com/users/jim-hall" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From f0ef607dc747e221dbcbb2c4afc44f22ffbeb417 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 18 Jan 2022 16:50:47 +0800 Subject: [PATCH 027/334] Delete 20220118 .md --- sources/tech/20220118 .md | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 sources/tech/20220118 .md diff --git a/sources/tech/20220118 .md b/sources/tech/20220118 .md deleted file mode 100644 index c7b97ccffa..0000000000 --- a/sources/tech/20220118 .md +++ /dev/null @@ -1,16 +0,0 @@ -[#]: subject: "" -[#]: via: "https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/" -[#]: author: "[Arindam] - -Posted by Arindam - -Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - - -====== - From 56dc312bb27a400141d4d8a7db67fd062c8f0395 Mon Sep 17 00:00:00 2001 From: CN-QUAN <97161224+CN-QUAN@users.noreply.github.com> Date: Tue, 18 Jan 2022 23:18:34 +0800 Subject: [PATCH 028/334] Update and rename sources/talk/20210704 Pricing Yourself as a Contractor 101.md to translated/talk/20210704 Pricing Yourself as a Contractor 101.md --- ...04 Pricing Yourself as a Contractor 101.md | 78 ------------------- ...04 Pricing Yourself as a Contractor 101.md | 78 +++++++++++++++++++ 2 files changed, 78 insertions(+), 78 deletions(-) delete mode 100644 sources/talk/20210704 Pricing Yourself as a Contractor 101.md create mode 100644 translated/talk/20210704 Pricing Yourself as a Contractor 101.md diff --git a/sources/talk/20210704 Pricing Yourself as a Contractor 101.md b/sources/talk/20210704 Pricing Yourself as a Contractor 101.md deleted file mode 100644 index 8087573d76..0000000000 --- a/sources/talk/20210704 Pricing Yourself as a Contractor 101.md +++ /dev/null @@ -1,78 +0,0 @@ -[#]: subject: (Pricing Yourself as a Contractor 101) -[#]: via: (https://theartofmachinery.com/2021/07/04/pricing_as_contractor_101.html) -[#]: author: (Simon Arneaud https://theartofmachinery.com) -[#]: collector: (lujun9972) -[#]: translator: (CN-QUAN) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Pricing Yourself as a Contractor 101 -====== - -I’ve been self-employed for most of my career. Sometimes I talk to other people who are interested in leaving a full-time job to do some kind of contracting or service business. By far, the most common newbie mistake that we all seem to make is in pricing ourselves. - -Take [this useful blog post that breaks down employee income vs freelancer income in the US][1]. It estimates that you need $140k revenue as a freelancer in the US to have the equivalent of $100k employee compensation. I remember finding calculations like that really useful when I first started a business. However, some people will look at the result and think, “Gee, I have to make 1.4x as much if I’m self employed. Can I really do that?” - -No, no, no. That thinking is backwards. - -### How to price yourself - -Let’s make up an example. Suppose you’re a full-time-employed software engineer grossing that $100k p.a., and you’re thinking of switching to contracting. - -When you’re self-employed, you have to think like a business because that’s literally how you’re making your living. So you have to add up all your costs and figure out how you’re going to recover them. Spreadsheets get a bad rap (for some good reasons), but they’re actually really useful for this stuff (and a lot of other calculations you’ll do as a business owner). - -The first cost to add to the tally is that $100k. If that sounds weird, it’s what’s called “opportunity cost”. You could have made $100k by staying employed; not making that is effectively a cost you have to justify when planning your business. Mark that cost down, along with any other employment benefits you actually use. If your employer offers on-site lunches, add what it costs you to get lunch each workday of the year. If your employer offers employee discounts on its fitness software, but you don’t use that software anyway, don’t add that benefit as an opportunity cost. - -Other costs depend on what you’re doing and where you live. Employee-provided health insurance isn’t as big a thing in Australia as in the US. On the other hand, compulsory superannuation payments (similar to the US 401(k)) are a big deal. I have my own company, and my major non-salary costs are insurance, accounting/filing, legal (for contract reviews, etc.), debt collection and various online service costs. If you’re counting something durable (like a desk) divide the cost by the estimated number of years you expect to use the thing. - -Anyway, so far this is basically what was in Caleb’s blog post, so to keep things simple, I’ll assume the same $100k nominal salary and $140k equivalent business cost. (Scale everything to match your own circumstances, of course.) Now you need to figure out how to recover that cost. There are about 255 Australian working days in a year, so if you could contract them all out, you’d charge $550 a day (plus sales tax). In reality, you won’t be able to bill the entire year. I’ve taken a higher-risk approach and averaged about 60-70% in the past 6 years of my current stint of self employment. [Accenture’s annual financial reports][2] say they get about 90% “utilization” from their contractors, which I assume means they bill 90% of the total workdays. Let’s assume you’re moderate and bill 75% of work days. That means you recover $140k of costs in 75% of 255 days (or 191 days) by billing about $730 a day (plus sales tax). - -### The mistake - -People new to contracting often react to numbers like that and think, “WTF?! That’s huge!” That’s just one example calculation, but it’s normal for service prices to be around double or more what you might naïvely guess from equivalent full-time employee rates. However, that day rate came from a simple calculation of how much you need to charge to get the equivalent of a $100k salary. It’s the same thing. Thinking otherwise is the critical mistake. - -New contractors are often still unsure. Won’t they sound _greedy_ asking for that much? If your clients have any clue, they’re doing pretty much the same calculation. “I could pay Gentle Blog Reader $730 a day for just as long as I want, or I could pay ~$140k for a full-timer who I won’t even really need every day.” A $100k salary isn’t actually $100k from the employer’s point of view, either. Basing prices on nominal base salaries just doesn’t make sense. Even if you’re selling B2C, your cluey competitors won’t be charging less, at least not sustainably. - -### Why it matters - -That specific example was for contracting, but it’s a basic rule of business economics: unless you’re trying some super-risky growth hacking (and we know how [Pets.com][3] turned out), you need to figure out your costs and set your price high enough to cover them. - -Some people still feel uncomfortable with the price they need to set, and they rationalise dropping the price. Perhaps they think something like, “I’m a really nice person, and if I charge only $400 a day my clients will be even happier.” The problem is that you won’t get the same clients. Cluey clients who would pay $100k a year base salary for an employee won’t pay $400 a day for a contractor to do the same job. Instead, in practice, you might get a few good clients who just didn’t have the budget for $730 a day, but you _will_ get a whole bunch of really bad clients. Think about it. If a stranger offered you a fancy-looking diamond ring for $50, would you pay? Or would you rather buy another ring for a normal price? - -Let me stress that I’m just taking the numbers from Caleb’s post and that everything is relative. Use your own numbers instead. In most parts of the world, $400 a day might be a fantastic rate. However, if you’re a senior fintech developer in Silicon Valley, charging $400 a day will just make you a magnet for terrible clients. Most of the good ones will know something isn’t adding up, and they’ll be scared away. - -What do I mean by bad clients? Browse through [the Clients from Hell blog][4] for a bit. It ranges from a lot of basic annoyance like clients who are never satisfied, or who make unreasonable demands, or who waste your time, all the way to clients who are outright abusive, or who get you to do work to spec before arguing they shouldn’t have to pay because “I don’t want it”. Some clients simply don’t pay at all. - -If _you_ don’t value your own product enough, don’t be shocked if you have customers who don’t value it enough, either. - -It gets worse, though. Good clients tend to work with other good clients. If you’re always available when you say you will be, would you work with people who waste your time? If you treat others with respect, would you work with people who are unreasonable and abusive? On average, your good clients will tend to refer you to other good clients. The reverse is true of bad clients, if they’re even grateful enough to refer you to anyone at all. Therefore, if you charge a good price, your business will tend to grow as you build a reputation. If you undercharge, you’ll find yourself in a downward spiral where you’re not only losing money, but finding it harder and harder to get proper pay at all. - -All of this is just a matter of averages, and if you’re lucky you’ll still get good clients even if you undercharge, and if you’re unlucky you’ll still get bad clients even if you charge the right price. However, if your revenue is already weak, each bad client will really hurt. Hoping to beat the averages isn’t a good plan. - -### “But no one pays that much!” - -Suppose you’re an experienced full-time engineer and you decide to try going independent. You’ll probably find that your calculated rate seems high compared to what you see on a freelancing website. That’s because it’s hard to build up a reputation on freelancing websites. Freelancing websites are most useful for casual buyers who primarily want a low price. - -I think a lot of smart engineers assume career networking is hard and requires super high levels of extroversion, so they have to rely on freelancing websites for work. The bad news is that you need to build up a good reputation to get good pay. The good news is that most people can do it as long as they have skills that are in demand. Networking isn’t about going to so-called “networking events” (they’re actually mostly terrible for networking). Networking tips would make a whole new blog post, but the key is to find good clients in their natural habitats, and to do the things that make them keep coming back and maybe even refer you to other good clients. - -In any case, don’t let freelancing websites or anything else set your price below the equivalent of what you could get from a full-time salary. In fact, [you might even get better than your current salary][5], which is why this is “Pricing 101”. Undercharging, however, will kill your self-employment career. - --------------------------------------------------------------------------------- - -via: https://theartofmachinery.com/2021/07/04/pricing_as_contractor_101.html - -作者:[Simon Arneaud][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://theartofmachinery.com -[b]: https://github.com/lujun9972 -[1]: https://calebporzio.com/making-100k-as-an-employee-versus-being-self-employed -[2]: https://www.accenture.com/au-en/about/company/annual-report -[3]: https://en.wikipedia.org/wiki/Pets.com -[4]: https://clientsfromhell.net/ -[5]: https://theartofmachinery.com/2018/10/07/payrise_by_switching_jobs.html diff --git a/translated/talk/20210704 Pricing Yourself as a Contractor 101.md b/translated/talk/20210704 Pricing Yourself as a Contractor 101.md new file mode 100644 index 0000000000..26ef6000ec --- /dev/null +++ b/translated/talk/20210704 Pricing Yourself as a Contractor 101.md @@ -0,0 +1,78 @@ +[#]: via: (https://theartofmachinery.com/2021/07/04/pricing_as_contractor_101.html) +[#]: author: (Simon Arneaud https://theartofmachinery.com) +[#]: collector: (lujun9972) +[#]: translator: (CN-QUAN) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +作为承包商为自己以101的方式标价 + +====== + +我职业生涯的大部分时间都是自由职业者。有时候,我也会和一些想要辞掉全职工作去做一些承包或服务业务的人聊天。到目前为止,我们新手最常犯的错误就是自我定价。 + +以[这篇有用的博客文章为例,它分析了美国员工收入与自由职业者收入的对比][1]。据估计,在美国,作为一名自由职业者,你需要获得14万美元的收入,才能获得相当于10万美元的员工薪酬。我记得当我第一次创业时,我发现这样的计算非常有用。而,有些人看到结果会想:“哎呀,如果我是自由职业者,我得赚1.4倍的钱。我真的能做到吗?” + +不,不,不,这种想法是落后的。 + +### 如何给自己定价 + +让我们举个例子。假设你是一名全职软件工程师,年收入10万美元,你正考虑转用合同制。 + +当你是自由职业者时候,你必须像做生意一样思考,因为这就是你的谋生方式。所以,你必须把所有的成本加起来,并计算出如何收回这些成本。电子表格的口碑很差(出于一些好的原因),但它们实际上对这些东西非常有用(以及作为企业主将进行的许多其他计算)。 + +第一个要增加的成本是10万美元。如果这听起来很奇怪,那就是所谓的“机会成本”。如果你继续工作,你本可以赚到10万美元;在规划业务时,不这样做实际上是一种成本。把这笔费用和其他你实际使用的就业福利一起标记下来。如果你的雇主提供工作日午餐,那就加上一年中每个工作日午餐的费用。如果你的雇主为员工提供健身软件的折扣,但你却没有使用该软件,那么不要将该福利作为机会成本。 + +其他成本取决于你在做什么和你住在哪里。员工医疗保险在澳大利亚不像在美国那么重要。另一方面,强制性养老金支付(类似于美国的401K计划))是一件大事。我有自己的公司,我的主要非工资成本是保险、会计/备案、法律(合同审查等)、债务催收和各种在线服务成本。如果你在计算一些耐用的东西(比如一张桌子),把成本除以你预计使用该东西的年数。 + +总之,到目前为止,这基本上就是Caleb的博客文章中的内容,所以为了简单起见,我将假设10万美元的名义工资和14万美元的等效业务成本不变。(当然,一切都要根据自己的情况进行调整。)现在你需要想办法收回这笔成本。澳大利亚一年大约有255个工作日,所以如果你能把它们全部外包出去,你每天要收取550美元(外加销售税)。在现实中,你将无法支付一整年的账单。我采取了一种风险更高的方法,在我目前从事自营职业的过去6年里,我的平均回报率约为60%-70%。[埃森哲的年度财务报告][2]说他们从承包商那里得到了大约90%的“利用率”,我想这意味着他们收取了总工作日的90%的费用。让我们假设你是一个中等收入者并且在75%的工作日里都要付账。这意味着你可以在255天(或191天)的75%内通过每天730美元的账单(加上销售税)收回14万美元的成本。 + +### 误区 + +刚接触合同的人通常会对这样的数字做出反应,并会想,“见鬼?!这可是件大事!“。这只是一个计算示例,但服务价格通常是相当于全职员工工资的两倍或两倍以上。然而,这一天的工资是通过一个简单的计算得出的,那就是你需要收取多少钱才能获得相当于10万美元的工资。这是一回事。不这样想才是关键的错误。 + +新承包商往往还不确定。他们要求那么多,听起来是不是很贪婪?如果你的客户有任何线索,他们也在做大致相同的计算。“我可以付给Gentle Blog Reader每天730美元,只要我愿意,我也可以花14万美元买一个我甚至不是每天都真正需要的全职雇员。”从雇主的角度来看,10万美元的薪水实际上也不是10万美元。把价格建立在名义基本工资的基础上是没有意义的。即使你是在销售B2C产品,你的潜在竞争对手也不会降价,至少不会持续降价。 + +### 为什么这很重要 + +这个具体的例子是为了承包,但这是商业经济学的一条基本规则:除非你正在尝试一些风险极高的高收入行为(我们知道[Pets.com][3]的结果),否则你需要计算出你的成本,并设定足够高的价格来弥补这些成本。 + +一些人仍然对他们需要设定的价格感到不安,他们认为降低价格是合理的。也许他们会这样想:“我是个很好的人,如果我每天只收400美元,我的客户会更高兴。”问题是你得不到同样的客户。聪明的客户愿意为员工支付10万美元的基本工资,他们不会为承包商每天支付400美元来做同样的工作。相反,在实践中,你可能会得到一些好客户,他们只是没有每天730美元的预算,但同时你也会得到一大堆非常糟糕的客户。想想看。如果一个陌生人以50美元的价格卖给你一枚看起来很花哨的钻戒,你会付钱吗?还是愿意以正常价格再买一枚戒指? + +我要强调的是,我只是从凯莱布的帖子中获取数据,而且一切都是相对的。用你自己的数字代替。在世界上大多数地区,每天400美元可能是一个令人难以置信的价格。然而,如果你是硅谷的一名高级金融科技开发人员,每天收费400美元只会让你成为吸引糟糕客户的磁铁。大多数优秀的人都会知道有些事情不对劲,他们会被吓跑。 + +我说的坏客户是什么意思?浏览一下[来自地狱的客户博客][4]。它包括很多基本的烦恼,比如客户永远不会得到满足,或者提出无理要求,或者浪费你的时间,一直到彻头彻尾的辱骂,或者让你按规格工作,然后辩称自己不应该付钱,因为“我不想要”。有些客户根本就不付钱。 + +如果你不够重视你自己的产品,也不要因为你的客户不够重视你的产品而感到震惊。 + +不过,情况变得更糟了。好客户倾向于与其他好客户合作。如果你说你会随时待命,你会和那些浪费你时间的人一起工作吗?如果你尊重他人,你会和那些不讲道理、辱骂他人的人一起工作吗?一般来说,你的好客户会把你介绍给其他好客户。糟糕的客户则恰恰相反,如果他们甚至感激地把你推荐给任何人的话。因此,如果你的价格合适,你的生意会随着你的声誉而增长。如果你收费过低,你会发现自己陷入了一个恶性循环,你不仅会赔钱,而且会发现越来越难获得适当的报酬。 + +这些都只是平均水平,如果你幸运的话,低收费也能吸引到好客户,如果你不幸的话,价格合理也仍然会得到坏客户。然而,如果你的收入已经很低了,那么每一个坏客户都会对你造成伤害。希望超越平均水平不是一个好计划。 + +### “但没人付那么多钱!” + +假设你是一名经验丰富的全职工程师,你决定尝试独立工作。你可能会发现,你的计算比率似乎比你在自由职业网站上看到的要高。这是因为在自由职业网站上建立声誉很难。自由职业者网站对于那些主要想要低价的临时买家来说是最有用的。 + +我想,很多聪明的工程师都认为,职业社交是很难的,而且需要非常外向的性格,所以他们不得不依靠自由职业网站来工作。坏消息是,你需要建立良好的声誉才能拿到高薪。好消息是,只要他们拥有所需的技能,大多数人都可以做到。社交并不是去参加所谓的“社交活动”(实际上,这些活动对社交来说都很糟糕)。社交技巧会让你写一篇全新的博客文章,但关键是在他们的日常生活中找到好客户,并做一些让他们不断回头的事情,甚至可能让你找到其他好客户。 + +在任何情况下,不要让自由职业网站或其他任何东西把你的价格定在你可以从全职工资中拿到的等价物以下。事实上,[你甚至可能比你现在的工资还高][5],这就是为什么这是“定价101”。然而,收费过低会扼杀你的自主创业生涯。 + +-------------------------------------------------------------------------------- + +via: https://theartofmachinery.com/2021/07/04/pricing_as_contractor_101.html + +作者:[Simon Arneaud][a] +选题:[lujun9972][b] +译者:[CN-QUAN](https://github.com/CN-QUAN) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://theartofmachinery.com +[b]: https://github.com/lujun9972 +[1]: https://calebporzio.com/making-100k-as-an-employee-versus-being-self-employed +[2]: https://www.accenture.com/au-en/about/company/annual-report +[3]: https://en.wikipedia.org/wiki/Pets.com +[4]: https://clientsfromhell.net/ +[5]: https://theartofmachinery.com/2018/10/07/payrise_by_switching_jobs.html From 7334dce2e8d50cffc32e05129456dd31a4478349 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 19 Jan 2022 05:02:25 +0800 Subject: [PATCH 029/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220119=20?= =?UTF-8?q?What=20is=20POSIX=3F=20Why=20Does=20it=20Matter=20to=20Linux/UN?= =?UTF-8?q?IX=20Users=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md --- ... Why Does it Matter to Linux-UNIX Users.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 sources/tech/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md diff --git a/sources/tech/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md b/sources/tech/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md new file mode 100644 index 0000000000..448f99ff32 --- /dev/null +++ b/sources/tech/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md @@ -0,0 +1,95 @@ +[#]: subject: "What is POSIX? Why Does it Matter to Linux/UNIX Users?" +[#]: via: "https://itsfoss.com/posix/" +[#]: author: "Bill Dyer https://itsfoss.com/author/bill/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +What is POSIX? Why Does it Matter to Linux/UNIX Users? +====== + +You’ll hear the acronym, or read about it: POSIX, on different online boards and articles. Programmers and system developers seem to worry about it the most. It can sound mysterious and, while there are many good sources on the subject, some discussion boards (brevity is part of their nature), don’t go into detail as to what it is and this can lead to confusion. What, then, is POSIX, really? + +![][1] + +### What is POSIX? + +POSIX isn’t actually a thing. It describes a thing – much like a label. Imagine a box labeled: _POSIX_, and inside the box is a standard. A standard consists of sets of rules and instructions that POSIX is concerned with. **POSIX** is shorthand for _Portable Operating System Interface_. It is an IEEE 1003.1 standard that defines the language interface between application programs (along with command line shells and utility interfaces) and the UNIX operating system. + +Compliance to the standard ensures compatibility when UNIX programs are moved from one UNIX platform to another. POSIX’s focus is primarily on features from AT&T’s System V UNIX and BSD UNIX. + +A standard must be spelled out and followed by rules on how to achieve the goal of interoperability between operating systems. POSIX covers such things as: System Interfaces, and Commands and Utilities, Network File Access, just to name a few – there is much more to POSIX than this. + +### Why POSIX? + +In a word: portability. + +Over 60 years ago, programmers had to rewrite code completely if they wanted their software to run on more than one system. This didn’t happen all that often due to the expense involved, but portability became a feature in the mid-1960s – not through POSIX – but in the mainframe arena. + +IBM introduced the System/360 family of mainframe computers. Different models had their unique specializations, but the hardware was such that they could use the same operating system: OS/360. + +Not only could the operating system run on different models, applications could run on them as well. Not only did this keep costs low, but it created _computer systems_ – systems across a product line that could work together. It’s all common today – networks and systems, but back then, this was a huge deal! + +![IBM System 360 | Image Credit: IBM][2] + +When UNIX came about, around the same time, it also showed promise in that it could operate on machines from different manufacturers. However, when UNIX started to fork into different flavors, porting code across these UNIX variants became difficult. The promise of UNIX portability was losing ground. + +To solve this portability issue POSIX was formed in the 1980s. The standard was defined based on AT&T’s System V UNIX and BSD UNIX, the two biggest variants at the time. It’s important to note that POSIX wasn’t formed to control how the operating systems were built – any company was free to design their UNIX variant any way they pleased. POSIX was only concerned with how an application interfaces with the operating system. In programmer-speak, an interface is the method one program’s code can communicate with another program. The interface expects Program A to provide a specific type of information to Program B. Likewise, Program A expects Program B to answer back with a specific type of data. + +For example, if I want to read a file using the cat command, I would type something like this on the command line: + +`cat myfile.txt` + +Without going into a lot of programmer-speak, I’ll just say that the cat command makes a call to the operating system to fetch the file so cat can read it. cat reads it and then displays the file’s contents on the screen. There is a lot of interplay between the application (`cat`) and the operating system. How this interplay works is what POSIX was interested in. If the interplay could be the same across the different UNIX variants, portability – regardless of operating system, manufacturer, and hardware – is regained. + +The specifics as to how all of this is accomplished is defined in the standard. + +### Compliance is Voluntary + +All of us have at least seen a message like, “for help, type: xxxxx –help.” This is common in Linux and is not POSIX compliant. POSIX never required the double-dash, they expect one dash. The double-dash comes from GNU, yet, it doesn’t harm Linux and adds a little to its character. At the same time, Linux is mostly compliant, especially when it comes to system call interfaces. This is why we are able to run X, GNOME, and KDE applications on Linux, Sys V UNIX, and BSD UNIX. Various commands, such as ls, cat, grep, find, awk, and many more operate the same across the different variants. + +As a rule, compliance is a willing step. When code is compliant, it’s easier to move to another system; very little code rewrite, if any, would be necessary. When code can work on different systems, the use of it expands. People using other systems can benefit from the use of the program. For the budding programmer, learning how to write programs that are POSIX compliant can only help their career. For those readers who are interested in the Linux sphere of compliance, much good information can be found at: [Linux Standard Base][3]. + +### But I’m Not a Programmer or System Designer… + +Many people who work on computers aren’t programmers or operating system designers. They’re the medical transcription clerks, secretaries who write out letters, task lists, dictated memos, and so on. Others tabulate numbers, gather and massage data, run online stores, write books and articles (and some of us read them). In almost every job, there’s probably a computer close by. + +POSIX affects these users too, whether they know it or not. Users don’t have to comply with the standard, but they do expect their computers to work. When operating systems and programs conform to the POSIX standard, the gain the benefit of interoperability. They will be able to move from on system to another with the reasonable expectation that the machines will work much like another one does. Their data will still be accessible and they will still be able to make changes to it. + +POSIX, as well as other standards, are continually evolving. As technology grows, so does the standard. Standards are actually an agreed-upon system used by people, manufacturers, organizations, etc. to perform tasks in an efficient manner. Devices from one manufacturer is able to work with another manufacturer’s device. Think about it: Your Bluetooth earpiece can be used on an Apple iPhone just as well as it can on an Android phone. Our TV can hook up to, and stream, videos and shows from different networks, such as Amazon Prime, BritBox, Hulu – just to name a few. Now, we can even monitor out heart rate with our phones. All of this is made possible, largely in part, from compliance to standards. + +Benefits galore. I like that. + +### So what about the X? + +I admit it, I never said what the “X” was for in POSIX. [Opensource.com has an excellent article][4] where Richard Stallman explains what the “X” in POSIX means. Here it is, in his words: + +> The IEEE had finished developing the spec but had no concise name for it. The title said something like “portable operating system interface,” though I don’t remember the exact words. The committee put on “IEEEIX” as the concise name. I did not think that was a good choice. It is ugly to pronounce—it would sound like a scream of terror, “Ayeee!”—so I expected people would instead call the spec “Unix.” +> +> Since GNU’s Not Unix, and it was intended to replace Unix, I did not want people to call GNU a “Unix system.” I, therefore, proposed a concise name that people might actually use. Having no particular inspiration, I generated a name the unclever way: I took the initials of “portable operating system” and added “ix.” The IEEE adopted this eagerly. + +### Conclusion + +The POSIX standard allows developers to create applications, tools, and platforms on many operating systems using much of the same code. It isn’t a requirement, by any means, to write code according to the standard, but it does help, in a big way, when you want to port your code to other systems. + +Basically, POSIX is geared toward operating system designers and software developers, but as users of a system, we are affected by POSIX whether we may realize it or not. It is because of the standard that we are able to work on one UNIX or Linux system and bring that work over to another system and work on it with no hiccups. As users, we gain numerous benefits in usability and data re-use across systems. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/posix/ + +作者:[Bill Dyer][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/bill/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/What-is-POSIX.png?resize=800%2C450&ssl=1 +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/IBM-system-360-vintage-picture.jpg?resize=800%2C593&ssl=1 +[3]: https://refspecs.linuxfoundation.org/lsb.shtml +[4]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains From fe775191c7f0466225dc7aefc405d07b0f3883dd Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 19 Jan 2022 05:02:38 +0800 Subject: [PATCH 030/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220118=20?= =?UTF-8?q?Perform=20unit=20tests=20using=20GoogleTest=20and=20CTest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220118 Perform unit tests using GoogleTest and CTest.md --- ...m unit tests using GoogleTest and CTest.md | 371 ++++++++++++++++++ 1 file changed, 371 insertions(+) create mode 100644 sources/tech/20220118 Perform unit tests using GoogleTest and CTest.md diff --git a/sources/tech/20220118 Perform unit tests using GoogleTest and CTest.md b/sources/tech/20220118 Perform unit tests using GoogleTest and CTest.md new file mode 100644 index 0000000000..843802d802 --- /dev/null +++ b/sources/tech/20220118 Perform unit tests using GoogleTest and CTest.md @@ -0,0 +1,371 @@ +[#]: subject: "Perform unit tests using GoogleTest and CTest" +[#]: via: "https://opensource.com/article/22/1/unit-testing-googletest-ctest" +[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Perform unit tests using GoogleTest and CTest +====== +Using unit tests will likely improve your code's quality and do so +without disturbing your workflow. +![Team checklist and to dos][1] + +This article is a follow-up to my last article [Set up a build system with CMake and VSCodium][2]. + +In the last article, I showed how to configure a build system based on [VSCodium][3] and [CMake][4]. This article refines this setup by integrating meaningful unit tests using [GoogleTest][5] and [CTest][6]. + +If not already done, clone the [repository][7], open it in VSCodium and checkout the tag _devops_2_ by clicking on the _main_-branch symbol (red marker) and choosing the branch (yellow marker): + +![VSCodium tag][8] + +Stephan Avenwedde (CC BY-SA 4.0) + +Alternatively, open the command line and type: + + +``` +`$ git checkout tags/devops_2` +``` + +### GoogleTest + +GoogleTest is a platform-independent, open source C++ testing framework. Even though GoogleTest is not meant to be exclusively for unit tests, I will use it to define unit tests for the _Generator_ library. In general, a unit test should verify the behavior of a single, logical unit. The _Generator_ library is one unit, so I'll write some meaningful tests to ensure proper function. + +Using GoogleTest, the test cases are defined by assertions macros. Processing an assertion generates one of the following results: + + * _Success_: Test passed. + * _Nonfatal failure_: Test failed, but the test function will continue. + * _Fatal failure_: Test failed, and the test function will be aborted. + + + +The assertions macros follow this scheme to distinguish a fatal from a nonfatal failure: + + * `ASSERT_*` fatal failure, function is aborted. + * `EXPECT_*` nonfatal failure, function is not aborted. + + + +Google recommends using `EXPECT_*` macros as they allow the test to continue when the tests define multiple assertions. An assertion macro takes two arguments: The first argument is the name of the test group (a freely selectable string), and the second argument is the name of the test itself. The _Generator_ library just defines the function _generate(...)_, therefore the tests in this article belong to the same group: _GeneratorTest_. + +The following unit tests for the _generate(...)_ function can be found in [GeneratorTest.cpp][9]. + +#### Reference check + +The [generate(...)][10] function takes a reference to a [std::stringstream][11] as an argument and returns the same reference. So the first test is to check if the passed reference is the same reference which the function returns. + + +``` + + +TEST(GeneratorTest, ReferenceCheck){ +    const int NumberOfElements = 10; +    std::stringstream buffer; +    EXPECT_EQ( +        std::addressof(buffer), +        std::addressof(Generator::generate(buffer, NumberOfElements)) +    ); +} + +``` + +Here I use [std::addressof][12] to check if the address of the returned object refers to the same object I provided as input. + +#### Number of elements + +This test checks if the number of elements in the stringstream reference matches the number given as an argument. + + +``` + + +TEST(GeneratorTest, NumberOfElements){ +    const int NumberOfElements = 50; +    int nCalcNoElements = 0; + +    std::stringstream buffer; + +    Generator::generate(buffer, NumberOfElements); +    std::string s_no; + +    while(std::getline(buffer, s_no, ' ')) { +        nCalcNoElements++; +    } + +    EXPECT_EQ(nCalcNoElements, NumberOfElements); +} + +``` + +#### Shuffle + +This test checks the proper working of the random engine. If I invoke the _generate_ function two times in a row, I expect not to get the same result. + + +``` + + +TEST(GeneratorTest, Shuffle){ + +    const int NumberOfElements = 50; + +    std::stringstream buffer_A; +    std::stringstream buffer_B; + +    Generator::generate(buffer_A, NumberOfElements); +    Generator::generate(buffer_B, NumberOfElements); + +    EXPECT_NE(buffer_A.str(), buffer_B.str()); +} + +``` + +#### Checksum + +This is the largest test. It checks whether the sum of the digits of a numerical series from 1 to _n_ is the same as the sum of the shuffled output series. I expect that the sum matches as the _generate(...)_ function should simply create a shuffled variant of such a series. + + +``` + + +TEST(GeneratorTest, CheckSum){ + +    const int NumberOfElements = 50; +    int nChecksum_in = 0; +    int nChecksum_out = 0; + +    std::vector<int> vNumbersRef(NumberOfElements); // Input vector +    std::iota(vNumbersRef.begin(), vNumbersRef.end(), 1); // Populate vector + +    // Calculate reference checksum +    for(const int n : vNumbersRef){ +        nChecksum_in += n; +    } + +    std::stringstream buffer; +    Generator::generate(buffer, NumberOfElements); + +    std::vector<int> vNumbersGen; // Output vector +    std::string s_no; + +    // Read the buffer back back to the output vector +    while(std::getline(buffer, s_no, ' ')) { +        vNumbersGen.push_back(std::stoi(s_no)); +    } + +    // Calculate output checksum +    for(const int n : vNumbersGen){ +        nChecksum_out += n; +    } + +    EXPECT_EQ(nChecksum_in, nChecksum_out); +} + +``` + +The above tests can also be debugged like an ordinary C++ application. + +### CTest + +In addition to the in-code unit test, the [CTest][6] utility lets me define tests that can be performed on executables. In a nutshell, I call the executable with certain arguments and match the output with [regular expressions][13]. This lets me simply check how the executable behaves with incorrect command-line arguments. The tests are defined in the top level [CMakeLists.txt][14]. Here is a closer look at three test cases: + +#### Regular usage + +If a positive integer is provided as a command-line argument, I expect the executable to produce a series of numbers separated by whitespace: + + +``` + + +add_test(NAME RegularUsage COMMAND Producer 10) +set_tests_properties(RegularUsage +    PROPERTIES PASS_REGULAR_EXPRESSION "^[0-9 ]+" +) + +``` + +#### No argument + +If no argument is provided, the program should exit immediately and display the reason why: + + +``` + + +add_test(NAME NoArg COMMAND Producer) +set_tests_properties(NoArg +    PROPERTIES PASS_REGULAR_EXPRESSION "^Enter the number of elements as argument" +) + +``` + +#### Wrong argument + +Providing an argument that cannot be converted into an integer should also cause an immediate exit with an error message. This test invokes the _Producer_ executable with the command line parameter*"ABC"*: + + +``` + + +add_test(NAME WrongArg COMMAND Producer ABC) +set_tests_properties(WrongArg +    PROPERTIES PASS_REGULAR_EXPRESSION "^Error: Cannot parse" +) + +``` + +#### Testing the tests + +To run a single test and see how it is processed, invoke `ctest` from the command line providing the following arguments: + + * Run single tst: `-R ` + * Enable verbose output: `-VV` + + + +Here is the command `ctest -R Usage -VV:` + + +``` + + +$ ctest -R Usage -VV +UpdatecTest Configuration from :/home/stephan/Documents/cpp_testing sample/build/DartConfiguration.tcl +UpdateCTestConfiguration from :/home/stephan/Documents/cpp_testing sample/build/DartConfiguration.tcl +Test project /home/stephan/Documents/cpp_testing sample/build +Constructing a list of tests +Done constructing a list of tests +Updating test list for fixtures +Added 0 tests to meet fixture requirements +Checking test dependency graph... +Checking test dependency graph end + +``` + +In this code block, I invoked a test named _Usage_. + +This ran the executable with no command-line arguments: + + +``` + + +test 3 +    Start 3: Usage +3: Test command: /home/stephan/Documents/cpp testing sample/build/Producer + +``` + +The test failed because the output didn't match the regular expression `[^[0-9]+]`. + + +``` + + +3: Enter the number of elements as argument +1/1 test #3. Usage ................ + +Failed Required regular expression not found. +Regex=[^[0-9]+] + +0.00 sec round. + +0% tests passed, 1 tests failed out of 1 +Total Test time (real) = +0.00 sec +The following tests FAILED: +3 - Usage (Failed) +Errors while running CTest +$ + +``` + +To run all tests (including the one defined with GoogleTest), navigate to the _build_ directory and run `ctest`: + +![CTest run][15] + +Stephan Avenwedde (CC BY-SA 4.0) + +Inside VSCodium, click on the area marked yellow in the info bar to invoke CTest. If all tests pass, the following output is displayed: + +![VSCodium][16] + +Stephan Avenwedde (CC BY-SA 4.0) + +### Automate testing with Git Hooks + +By now, running the tests is an additional step for the developer. The developer could also commit and push code that doesn't pass the tests. Thanks to [Git Hooks][17], I can implement a mechanism that automatically runs the tests and prevents the developer from accidentally committing faulty code. + +Navigate to `.git/hooks`, create an empty file named _pre-commit_, and copy and paste the following code: + + +``` + + +#!/usr/bin/sh + +(cd build; ctest --output-on-failure -j6) + +``` + +After it, make this file executable: + + +``` +`$ chmod +x pre-commit` +``` + +This script invokes CTest when trying to perform a commit. If a test fails, like in the screenshot below, the commit is aborted: + +![Commit failed][18] + +Stephan Avenwedde (CC BY-SA 4.0) + +If the tests succeed, the commit is processed, and the output looks like this: + +![Commit succeeded][19] + +Stephan Avenwedde (CC BY-SA 4.0) + +The described mechanism is only a soft barrier: A developer could still commit faulty code using `git commit --no-verify`. I can ensure that only working code is pushed by configuring a build server. This topic will be part of a separate article. + +### Summary + +The techniques mentioned in this article are easy to implement and help you quickly find bugs in your code. Using unit tests will likely improve your code's quality and, as I have shown, do so without disturbing your workflow. The GoogleTest framework provides features for every conceivable scenario; I only used a subset of its functionality. At this point, I also want to mention the [GoogleTest Primer][20], which gives you an overview of the ideas, opportunities, and features of the framework. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/unit-testing-googletest-ctest + +作者:[Stephan Avenwedde][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/hansic99 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/todo_checklist_team_metrics_report.png?itok=oB5uQbzf (Team checklist and to dos) +[2]: https://opensource.com/article/22/1/devops-cmake +[3]: https://vscodium.com/ +[4]: https://cmake.org/ +[5]: https://github.com/google/googletest +[6]: https://cmake.org/cmake/help/latest/manual/ctest.1.html +[7]: https://github.com/hANSIc99/cpp_testing_sample +[8]: https://opensource.com/sites/default/files/cpp_unit_test_vscodium_tag.png (VSCodium tag) +[9]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/Generator/GeneratorTest.cpp +[10]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/Generator/Generator.cpp +[11]: https://en.cppreference.com/w/cpp/io/basic_stringstream +[12]: https://en.cppreference.com/w/cpp/memory/addressof +[13]: https://en.wikipedia.org/wiki/Regular_expression +[14]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/CMakeLists.txt +[15]: https://opensource.com/sites/default/files/cpp_unit_test_ctest_run.png (CTest run) +[16]: https://opensource.com/sites/default/files/cpp_unit_test_ctest_vscodium.png (VSCodium) +[17]: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks +[18]: https://opensource.com/sites/default/files/cpp_unit_test_git_hook_commit_failed.png (Commit failed) +[19]: https://opensource.com/sites/default/files/cpp_unit_test_git_hook_commit_succeeded.png (Commit succeeded) +[20]: https://google.github.io/googletest/primer.html From 3289c05575331fdee355c12495a2f3c1e13c26e1 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 19 Jan 2022 05:02:48 +0800 Subject: [PATCH 031/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220118=20?= =?UTF-8?q?How=20curiosity=20helped=20me=20solve=20a=20hardware=20problem?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220118 How curiosity helped me solve a hardware problem.md --- ...sity helped me solve a hardware problem.md | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 sources/tech/20220118 How curiosity helped me solve a hardware problem.md diff --git a/sources/tech/20220118 How curiosity helped me solve a hardware problem.md b/sources/tech/20220118 How curiosity helped me solve a hardware problem.md new file mode 100644 index 0000000000..eb1efd0073 --- /dev/null +++ b/sources/tech/20220118 How curiosity helped me solve a hardware problem.md @@ -0,0 +1,101 @@ +[#]: subject: "How curiosity helped me solve a hardware problem" +[#]: via: "https://opensource.com/article/22/1/troubleshoot-hardware-sysadmin" +[#]: author: "David Both https://opensource.com/users/dboth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How curiosity helped me solve a hardware problem +====== +Curiosity fuels the quest for knowledge and truth, whether it's about +hardware, open source software, programming, building a PC, optimizing +settings, or just learning a new application. +![Puzzle pieces coming together to form a computer screen][1] + +I typically have a dozen computers up and running on my home network—yes, 12. And I am responsible for several more in other locations. With so many computers, there are always failures of various types, and I ultimately diagnose many of them as hardware problems. But it can be difficult to diagnose which hardware component is causing the issue. + +Just this week, I had a perplexing problem that I misdiagnosed the cause of on my primary workstation—twice. This article takes you through the process I followed. I show you where and why I went down the wrong path and how easy it can be to do so. + +### The first symptoms + +I have been working on several projects. Recently, I had many applications open on multiple desktops and was just starting to work when the display went blank. Most (not all) of the fans in my primary workstation came to a stop, and I sucked in a deep breath. I'd never seen anything quite like this before, but I did know that my system was in trouble. + +There were two primary clues I had to work with. The display went dark, and several fans had stopped. However, the front-panel power and disk activity LEDs were still on, although at a lower brightness level than usual. Most of the decorative RGB LED lights on my motherboard, memory DIMMs, and fans also went out. + +I tried the power and reset buttons with no results. I turned off the power supply directly using the PSU rocker switch. Powering it back on resulted in the same set of symptoms. + +### Initial thoughts + +These symptoms and decades of experience with all kinds of failures pointed me to the power supply. + +I removed the power supply and used my PSU tester to check it. The tester indicated that the PSU was good, and all voltages were within specs. However, I knew the tester could be wrong. PSU testers do not test under full load conditions such as those that exist when the computer is running and drawing a few hundred watts of power. I went with my gut and installed my spare 1000W power supply. + +With an average of 12 computers in my home network, I have learned to keep plenty of spare parts on hand. It saves a lot of frustration that I don't have to run to the local computer store or order online and wait for delivery when things break—and things are always breaking with that many computers around. + +That replacement power supply solved the problem despite the result I got from the PSU tester. Even though the tester has been correct many times in the past, my experience, my knowledge, and my gut told me differently. + +Unfortunately, my gut instinct was wrong. + +### Second thoughts + +My workstation was exhibiting the same symptoms again. It is very unlikely that two different PSUs would fail exactly the same way. + +Next idea: It had to be the motherboard. I don't keep spare motherboards around, so I ordered a new one online and figured that I could use extra memory I already had and move the CPU to the new motherboard along with its all-in-one liquid cooling unit. + +### Disciplined troubleshooting + +The new motherboard would take a couple of days to arrive, so I decided to prepare by removing the old one from the workstation. But before I unplugged the power feeds to the motherboard, my curiosity took over and forced me to power on the system with only the motherboard, CPU, and memory installed. I had disconnected everything else. + +Good troubleshooting demands that you isolate all potential variables, and all I'd done so far was test the PSU. I had to test every component. + +This process required me to disconnect the front panel cables for sound and the dashboard media panel that includes various USB, SATA, and memory card slots. + +With just the motherboard connected, I got a surprise: Everything worked as normal! + +The computer itself wouldn't boot because there were no connected storage drives, and nothing was displayed because I had removed the display adapter. But there were no symptoms of either power or motherboard failure. That piqued my curiosity even more. If the motherboard were truly bad, the symptoms would still exist. + +So I started a sequence of powering off, reinstalling one of the removed components, and powering back on. + +It turns out that the front panel media dashboard caused the symptoms. + +I removed the media dashboard and plugged everything else back in. My workstation booted up properly and performed as expected. I had identified the culprit. + +### How it started + +Having figured out the actual problem, I immediately understood the root cause. It had started a couple of days previously. I was working with and testing several external USB devices, including various cameras, storage devices that I use for backups, and an external USB hub. + +I picked up one USB cable and plugged it into a USB 2.0 slot on the media dashboard. Everything ground to a halt, and most of the lights and fans went out. I unplugged the USB cable, which was now very hot, and burned my fingers. I had inadvertently plugged the type C end into the USB 3.0 type A socket, which had shorted the power. + +After unplugging the USB cable, everything went back to "normal"—except it didn't. The media dashboard lasted a few more days and then shorted out completely, having been weakened by my careless mistake. + +### Jumping to conclusions + +Knowledge and experience can sometimes count for more than tools like PSU testers. Except when they don't. I eventually found the actual cause of the problem, but I should have seen it sooner. + +Although I was correct about this being a power problem, I was sidetracked by not correctly reading the symptoms and following that line of inquiry to its logical conclusion. I could have isolated the true cause of the problem sooner than I did and saved the time I spent configuring my laptop to be a temporary primary device until I could fix my primary workstation. + +Sysadmins work with complex devices, and it can be easy to jump to conclusions. I have over 50 years of experience in the computer industry, and I still do it. I just need to remember to take a few deep [yoga breaths][2] and keep digging until I isolate the root cause of the problem. + +### Curiosity + +At least I followed my curiosity while waiting for the replacement motherboard to arrive. That allowed me to return things to normal much sooner than had I waited until the new motherboard arrived. And I might have discarded a perfectly good motherboard by not testing it further. + +There is a saying about curiosity killing the cat. I hate that saying because it is all too frequently used by parents, colleagues, pointy-haired bosses, teachers, and others who just want us curious folk to leave them alone. In reality, curiosity fuels the quest for knowledge and truth, whether it's about hardware, open source software, programming, building a PC, optimizing settings, or just learning a new application. Feed your curiosity! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/troubleshoot-hardware-sysadmin + +作者:[David Both][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/dboth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/puzzle_computer_solve_fix_tool.png?itok=U0pH1uwj (Puzzle pieces coming together to form a computer screen) +[2]: https://opensource.com/article/21/11/linux-yoga From 4fe3019cff0f1dc1ba593f7c7bac489505a18b6a Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 19 Jan 2022 05:03:44 +0800 Subject: [PATCH 032/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220118=20?= =?UTF-8?q?ONLYOFFICE=20Docs=20v7.0=20Adds=20Online=20Forms,=20Password=20?= =?UTF-8?q?Protection,=20and=20More=20Improvements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220118 ONLYOFFICE Docs v7.0 Adds Online Forms, Password Protection, and More Improvements.md --- ...sword Protection, and More Improvements.md | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 sources/news/20220118 ONLYOFFICE Docs v7.0 Adds Online Forms, Password Protection, and More Improvements.md diff --git a/sources/news/20220118 ONLYOFFICE Docs v7.0 Adds Online Forms, Password Protection, and More Improvements.md b/sources/news/20220118 ONLYOFFICE Docs v7.0 Adds Online Forms, Password Protection, and More Improvements.md new file mode 100644 index 0000000000..54a966feb4 --- /dev/null +++ b/sources/news/20220118 ONLYOFFICE Docs v7.0 Adds Online Forms, Password Protection, and More Improvements.md @@ -0,0 +1,129 @@ +[#]: subject: "ONLYOFFICE Docs v7.0 Adds Online Forms, Password Protection, and More Improvements" +[#]: via: "https://news.itsfoss.com/onlyoffice-docs-7-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +ONLYOFFICE Docs v7.0 Adds Online Forms, Password Protection, and More Improvements +====== + +ONLYOFFICE is a popular open-source office suite available for Desktop platforms (including Linux) and web applications as well. + +If you have a [Nextcloud][1] or ownCloud instance, you may already have ONLYOFFICE installed to manage your documents. + +Now, for its first major release in 2022, ONLYOFFICE v7.0 has been announced with a range of improvements and much-needed feature editions. + +### ONLYOFFICE 7.0: What’s New? + +![][2] + +No matter whether you work with its online editors or desktop editors, the improvements should come in handy. + +Let me highlight some of the key features here: + +#### Fillable Online Forms + +![][3] + +The better the ability to collaborate, the more time we save. And, the ability to create and share a form online with friends and collaborators should make things easier. + +To get started, you need to save the document as a standard PDF or as OFORM to be able to share it online for collaboration. + +You get access to a variety of fields that include text, boxes, drop-down lists, and images. It should be a breeze to manage the form, customize it, and complete it with the help of collaborators. + +To improve the collaboration experience, you can also group fields to fill them out quickly. The online fillable form can be accessed using mobile applications as well. You should update the Android/iOS applications to try it out. + +#### Password Protection in Spreadsheets + +![][4] + +While we work with a lot of data in spreadsheets, it is also important to protect them from unauthorized access. + +With ONLYOFFICE Docs v7.0, you can add password protection to individual sheets or the entire workbook. + +#### Support for Query tables + +For easy reporting and analysis, a new ability to open and save query tables has been added that helps you combine data from multiple tables. + +#### New Transitions Tab and Animation for Presentations + +![][5] + +A separate transitions tab was added to let you easily access, add/edit, available transitions for your presentation slides. + +It should prove to be a quick task to choose between different transitions, and manage the settings. + +You can’t quite add animations to your presentations yet, but the support has been added, considering that it is planned for the next release. + +#### Collaboration Improvements + +![][4] + +Not just limited to new feature additions, there have been several improvements across the office suite. + +The version history for spreadsheets received an update to save each draft as a version when the last user exits from the spreadsheet. Moreover, different colors should help identify versions for other users if you are co-editing a spreadsheet. + +The comments system also received a new ability to sort through by date and author. + +You should also find it easier to review changes by co-authors working in a single document. + +#### Usability Improvements + +![][6] + +A new dark mode has been added for text documents to improve readability and reduce eye strain. + +You can perform several quick actions using some of the new keyboard shortcuts by pressing “**Alt**” in any editor. + +There are also new scaling options with the ability of up to 500% scaling. + +#### Other Improvements + +In addition to more scaling range, you also get more options like 125% and 175% to let you work with documents on different monitors. + +Other essential improvements include: + + * The ability to decide if you want to open editors as a new tab or a new window. + * Desktop editor integration with kDrive and Liferay + * New colour palette + * Mobile app improvements + * Hyperlink autocorrection + * New localization options + + + +You can learn more about the changes in the [official changelog][7] or the [official announcement][8]. + +### Download ONLYOFFICE 7.0 + +You can head to its [official website][9] and download the free version (community edition). If you need, you can opt for its premium offerings as well. If you can’t find the latest version, it should be available soon. + +The latest version should be available as DEB/RPM package, Docker image, Snap, and 1-click applications for cloud platforms like Vultr and Digital Ocean. + +[ONLYOFFICE 7.0][9] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/onlyoffice-docs-7-release/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/nextcloud/ +[2]: https://i0.wp.com/i.ytimg.com/vi/hmGHs4v44Tk/hqdefault.jpg?w=780&ssl=1 +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU3MSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM3MSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM2OSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM3MCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[7]: https://github.com/ONLYOFFICE/DocumentServer/blob/master/CHANGELOG.md#641 +[8]: https://www.onlyoffice.com/blog/2022/01/onlyoffice-docs-7-0/ +[9]: https://www.onlyoffice.com/download-docs.aspx?from=default#docs-community From 5938cf0b752def9e83424fe99aa1b996e77a8834 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 19 Jan 2022 05:03:52 +0800 Subject: [PATCH 033/334] add done: 20220118 ONLYOFFICE Docs v7.0 Adds Online Forms, Password Protection, and More Improvements.md --- sources/tech/20220119 .md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 sources/tech/20220119 .md diff --git a/sources/tech/20220119 .md b/sources/tech/20220119 .md new file mode 100644 index 0000000000..498e119366 --- /dev/null +++ b/sources/tech/20220119 .md @@ -0,0 +1,16 @@ +[#]: subject: "" +[#]: via: "https://www.debugpoint.com/2022/01/kde-plasma-guide/" +[#]: author: "[Arindam] + +Posted by Arindam + +Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + + +====== + From c2beda8003886d28630e8ea4ae34be38026de5af Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 19 Jan 2022 05:04:00 +0800 Subject: [PATCH 034/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220118=20?= =?UTF-8?q?Linux=20Mint=E2=80=99s=20Brand=20New=20Edge=20ISO=20is=20Availa?= =?UTF-8?q?ble=20to=20Download!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md --- ...d New Edge ISO is Available to Download.md | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 sources/news/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md diff --git a/sources/news/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md b/sources/news/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md new file mode 100644 index 0000000000..26358906cb --- /dev/null +++ b/sources/news/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md @@ -0,0 +1,68 @@ +[#]: subject: "Linux Mint’s Brand New Edge ISO is Available to Download!" +[#]: via: "https://news.itsfoss.com/linux-mint-20-3-edge-iso/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Linux Mint’s Brand New Edge ISO is Available to Download! +====== + +[Linux Mint 20.3 release][1] brings in several improvements. However, it is powered by Linux Kernel 5.4 LTS. + +So, users with newer hardware may find it troublesome to boot or run into other incompatibility issues with an older Linux Kernel. + +Fortunately, Linux Mint 20.3 now has an Edge ISO featuring Linux Kernel 5.13.0-25. + +### Linux Kernel 5.13 With Linux Mint 20.3 + +[Linux Kernel 5.13][2] introduced support for AMD GPU FreeSync via HDMI along with many other hardware improvements. + +So, for instance, if you have an AMD GPU and have issues with Linux Mint 20.3, the Edge ISO can come in handy. + +Yes, if you have newer hardware having trouble with Linux Mint 20.3, you can try the Edge ISO. + +However, Linux Kernel 5.13 did not fully support all the modern hardware like Intel Alder Lake processors. + +Considering that Intel’s 12th Gen lineup is already available for consumers, a more recent Linux Kernel could have been a better choice, but it’s better than nothing. + +So, it is essential to note that using the Edge ISO would not magically resolve issues with the latest-gen hardware. You will have to go through the detailed changes/support with [Linux Kernel 5.13][2] and then proceed to try it out. + +### Download Linux Mint 20.3 Edge ISO + +You can choose to download the separate Edge ISO or update the Linux Kernel from the update manager. + +![][3] + +Head to the “**Update Manager**” and then navigate to the Linux Kernels option from the View menu. As you can notice, you can install other available Linux Kernels (as per your requirements) and remove the older ones, if needed. + +It is recommended not to remove an older kernel unless you’re sure that the newer version works as expected. + +![][4] + +Before proceeding with a kernel upgrade, you might want to back up your important files, just in case. + +The Edge ISO is limited to the Cinnamon edition. So, you will need to head to Linux Mint 20.3 Cinnamon page to download the ISO. + +[Linux Mint 20.3 Cinnamon (Edge) Edition][5] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-mint-20-3-edge-iso/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/linux-mint-20-3-una-release/ +[2]: https://news.itsfoss.com/linux-kernel-5-13-release/ +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUyMyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjIzMyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[5]: https://www.linuxmint.com/edition.php?id=296 From cd487499de094a26a58d4f9cade24120e2625e13 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 19 Jan 2022 08:51:25 +0800 Subject: [PATCH 035/334] translated --- ...114 What makes Linux the sustainable OS.md | 71 ------------------- ...114 What makes Linux the sustainable OS.md | 70 ++++++++++++++++++ 2 files changed, 70 insertions(+), 71 deletions(-) delete mode 100644 sources/tech/20220114 What makes Linux the sustainable OS.md create mode 100644 translated/tech/20220114 What makes Linux the sustainable OS.md diff --git a/sources/tech/20220114 What makes Linux the sustainable OS.md b/sources/tech/20220114 What makes Linux the sustainable OS.md deleted file mode 100644 index ccbe6e44a9..0000000000 --- a/sources/tech/20220114 What makes Linux the sustainable OS.md +++ /dev/null @@ -1,71 +0,0 @@ -[#]: subject: "What makes Linux the sustainable OS" -[#]: via: "https://opensource.com/article/22/1/linux-sustainable-os" -[#]: author: "Don Watkins https://opensource.com/users/don-watkins" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -What makes Linux the sustainable OS -====== -Linux helps to bridge the digital divide and extend the life of -hardware, making it an eco-friendly choice for an operating system. -![5 pengiuns floating on iceburg][1] - -Battling the pandemic has created a shortage of microchips needed to produce new computers. In addition, some newer proprietary operating systems come with higher minimum standards for those systems. This conundrum has created an opportunity for those of us who use Linux in our daily lives. - -### Extend the hardware lifecycle - -Linux has long been noted for adding life to aging hardware. That ability has been a boon to those folks who use computers every day. - -I have helped many folks refurbish and [refit older computers][2] using Linux in the past year. Linux-based computers consume less power and start up much quicker. The [Gnome][3] desktop is great, but many older computers are better suited to [LXDE][4] or [XFCE][5] environments, which require fewer resources to run. - -Organizations like [FreeGeek][6] and [Kramden Institute][7] have made it their core mission to bridge the digital divide and, in so doing. These groups have repurposed older computers, keeping them out of the landfill and putting them in the hands of users who need them. Those programs don't happen without Linux. - -[DD-Wrt][8], [OpenWrt][9], and [Tomato][10] are all Linux solutions that keep older network hardware out of the landfill while providing users with added security, privacy, and performance from their routers. - -With [GalliumOS][11] and [Mrchromebox.tech][12], even Chromebooks can be given new life after Google stops supporting them. - -### New opportunities - -Linux has created opportunities that would not otherwise exist. Students and hobbyists alike have started successful careers in computer science with no investment, thanks to lessons learned on old computers. These systems run enterprise-grade software, such as the [LAMP][13] stack, which facilitated the transition to "Web 2.0". It was one of the first open source software stacks for the web. Today, it powers WordPress, Drupal, and Joomla installations. In fact, Linux powers over 96% of the world's top one million web servers. Linux also manages [embedded systems][14], e-readers, smart televisions, smartwatches, [and more][15]. Linux is the OS for well [over 70%][16] of the world's smartphones. Even NASA's [Perseverance Rover][17], that made history on Mars this year, is powered by Linux. - -The cloud, which powers most of today's applications, could not exist without Linux. Most of today's web and smartphone applications run in Linux-based [containers][18]. Even with the microchip shortage and the high cost of proprietary systems, those entering the cloud services industry have the opportunity to learn on an open source operating system and software. - -### The future - -But most appropriately, Linux and open source power the [United Nations Sustainability Goals][19]. Linux continues to be a critical resource as the pandemic continues. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/linux-sustainable-os - -作者:[Don Watkins][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_linux31x_cc.png?itok=Pvim4U-B (5 pengiuns floating on iceburg) -[2]: https://opensource.com/article/21/4/restore-macbook-linux -[3]: https://www.gnome.org/ -[4]: https://www.lxde.org/ -[5]: https://xfce.org/ -[6]: https://opensource.com/article/21/4/linux-free-geek -[7]: https://opensource.com/education/16/2/kramden-helps-bridge-digital-divide -[8]: https://dd-wrt.com/ -[9]: https://openwrt.org/ -[10]: https://www.freshtomato.org/ -[11]: https://galliumos.org -[12]: https://mrchromebox.tech -[13]: https://en.wikipedia.org/wiki/LAMP_%28software_bundle%29 -[14]: https://opensource.com/article/20/6/open-source-rtos -[15]: https://opensource.com/article/19/8/everyday-tech-runs-linux -[16]: https://gs.statcounter.com/os-market-share/mobile/worldwide/ -[17]: https://mars.nasa.gov/mars2020/spacecraft/rover/ -[18]: https://opensource.com/resources/what-are-linux-containers -[19]: https://opensource.com/article/21/11/open-source-un-sustainability diff --git a/translated/tech/20220114 What makes Linux the sustainable OS.md b/translated/tech/20220114 What makes Linux the sustainable OS.md new file mode 100644 index 0000000000..742870f02c --- /dev/null +++ b/translated/tech/20220114 What makes Linux the sustainable OS.md @@ -0,0 +1,70 @@ +[#]: subject: "What makes Linux the sustainable OS" +[#]: via: "https://opensource.com/article/22/1/linux-sustainable-os" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +是什么让 Linux 成为可持续的操作系统 +====== +Linux 有助于缩小数字鸿沟,延长硬件的使用寿命。使得它成为操作系统的一个环保选择。 +![5 pengiuns floating on iceburg][1] + +与大流行病作斗争,造成了生产新电脑所需的微芯片的短缺。此外,一些较新的专有操作系统对这些系统有更高的最低标准。这个难题为我们这些在日常生活中使用 Linux 的人创造了一个机会。 + +### 延长硬件的生命周期 + +长期以来,Linux 一直以增加老化硬件的寿命而闻名。这种能力对那些每天使用电脑的人来说是个福音。 + +在过去的一年里,我已经帮助许多人使用 Linux 翻新和[改装旧电脑][2]。基于 Linux 的电脑耗电更少,启动速度更快。[Gnome][3] 桌面很好,但许多旧电脑更适合 [LXDE][4] 或 [XFCE][5] 环境,它们需要较少的资源来运行。 + +像 [FreeGeek][6] 和 [Kramden Institute][7] 这样的组织已经把缩小数字鸿沟作为他们的核心任务,并且,在这样做的时候。这些团体对旧电脑进行了再利用,使它们不被填埋,并把它们送到需要它们的用户手中。没有 Linux,这些项目就不会发生。 + +[DD-Wrt][8]、[OpenWrt][9] 和 [Tomato][10] 都是 Linux 解决方案,使旧的网络硬件不被填埋,同时为用户的路由器提供更多的安全、隐私和性能。 + +有了 [GalliumOS][11] 和 [Mrchromebox.tech][12],即使是 Chromebooks 在谷歌停止支持后也能获得新的生命。 + +### 新的机会 + +Linux 创造了一些本来不存在的机会。学生和业余爱好者都在没有投资的情况下开始了计算机科学的成功事业,这要归功于在旧电脑上学到的经验。这些系统运行企业级软件,如 [LAMP][13]栈,它促进了向 “Web 2.0” 的过渡。它是最早的网络开源软件栈之一。今天,它为 WordPress、Drupal 和 Joomla 的安装提供动力。事实上,Linux 为超过 96% 的世界顶级 100 万台网络服务器提供动力。Linux 还管理着[嵌入式系统][14]、电子阅读器、智能电视、智能手表[等等][15]。Linux 是世界上远[超过 70%][16] 的智能手机的操作系统。甚至美国国家航空航天局(NASA)今年在火星上创造历史的[毅力号][17],也是由 Linux 驱动的。 + +为当今大多数应用提供动力的云计算,没有 Linux 就不可能存在。今天的大多数网络和智能手机应用都在基于 Linux 的[容器][18]中运行。即使在微芯片短缺和专有系统成本高的情况下,进入云服务行业的人也有机会在开放源码的操作系统和软件上学习。 + +### 未来 + +但最恰当的是,Linux 和开源为[联合国可持续发展目标][19]提供了动力。随着大流行的继续,Linux 仍然是一个重要的资源。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/linux-sustainable-os + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_linux31x_cc.png?itok=Pvim4U-B (5 pengiuns floating on iceburg) +[2]: https://opensource.com/article/21/4/restore-macbook-linux +[3]: https://www.gnome.org/ +[4]: https://www.lxde.org/ +[5]: https://xfce.org/ +[6]: https://opensource.com/article/21/4/linux-free-geek +[7]: https://opensource.com/education/16/2/kramden-helps-bridge-digital-divide +[8]: https://dd-wrt.com/ +[9]: https://openwrt.org/ +[10]: https://www.freshtomato.org/ +[11]: https://galliumos.org +[12]: https://mrchromebox.tech +[13]: https://en.wikipedia.org/wiki/LAMP_%28software_bundle%29 +[14]: https://opensource.com/article/20/6/open-source-rtos +[15]: https://opensource.com/article/19/8/everyday-tech-runs-linux +[16]: https://gs.statcounter.com/os-market-share/mobile/worldwide/ +[17]: https://mars.nasa.gov/mars2020/spacecraft/rover/ +[18]: https://opensource.com/resources/what-are-linux-containers +[19]: https://opensource.com/article/21/11/open-source-un-sustainability From 8434ddf0b4e39531c6e27524e7b6294ac99e66d7 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 19 Jan 2022 08:56:39 +0800 Subject: [PATCH 036/334] translating --- ...oard- An Open Source Interactive Whiteboard for Educators.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md b/sources/tech/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md index cdf58ffb37..f4bff00aea 100644 --- a/sources/tech/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md +++ b/sources/tech/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/openboard/" [#]: author: "Ankush Das https://itsfoss.com/author/ankush/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From aa57393e4719c3c1e87c43d02ad2d4a5e36cb9e9 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Wed, 19 Jan 2022 09:45:26 +0800 Subject: [PATCH 037/334] Delete 20220119 .md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @lujun9972 这个就是选题错误,然后加到一起了 --- sources/tech/20220119 .md | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 sources/tech/20220119 .md diff --git a/sources/tech/20220119 .md b/sources/tech/20220119 .md deleted file mode 100644 index 498e119366..0000000000 --- a/sources/tech/20220119 .md +++ /dev/null @@ -1,16 +0,0 @@ -[#]: subject: "" -[#]: via: "https://www.debugpoint.com/2022/01/kde-plasma-guide/" -[#]: author: "[Arindam] - -Posted by Arindam - -Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - - -====== - From 8f56644166cb255f2a03a344f0855a13f87088cf Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Wed, 19 Jan 2022 09:48:31 +0800 Subject: [PATCH 038/334] Rename sources/tech/20220118 How curiosity helped me solve a hardware problem.md to sources/talk/20220118 How curiosity helped me solve a hardware problem.md --- .../20220118 How curiosity helped me solve a hardware problem.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20220118 How curiosity helped me solve a hardware problem.md (100%) diff --git a/sources/tech/20220118 How curiosity helped me solve a hardware problem.md b/sources/talk/20220118 How curiosity helped me solve a hardware problem.md similarity index 100% rename from sources/tech/20220118 How curiosity helped me solve a hardware problem.md rename to sources/talk/20220118 How curiosity helped me solve a hardware problem.md From 4a3fc2dc68ae24ddcb3e05e3db4e4f6d1d3246b3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 19 Jan 2022 09:53:49 +0800 Subject: [PATCH 039/334] A --- ... Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/news/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md b/sources/news/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md index a061d453d8..3c4fcc9b8a 100644 --- a/sources/news/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md +++ b/sources/news/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md @@ -2,8 +2,8 @@ [#]: via: "https://news.itsfoss.com/ubuntu-21-04-eol/" [#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" [#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " +[#]: translator: "wxy" +[#]: reviewer: "wxy" [#]: publisher: " " [#]: url: " " From e90e71ecd3079fcf1e84636d4d551f578d12dacb Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 19 Jan 2022 10:22:05 +0800 Subject: [PATCH 040/334] TRP @wxy https://linux.cn/article-14192-1.html --- ... 21.04 Will Reach End of Life This Week.md | 82 +++++++++++++++++++ ... 21.04 Will Reach End of Life This Week.md | 80 ------------------ 2 files changed, 82 insertions(+), 80 deletions(-) create mode 100644 published/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md delete mode 100644 sources/news/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md diff --git a/published/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md b/published/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md new file mode 100644 index 0000000000..1aeae5cdd0 --- /dev/null +++ b/published/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md @@ -0,0 +1,82 @@ +[#]: subject: "Get Ready for an Upgrade! Ubuntu 21.04 Will Reach End of Life This Week" +[#]: via: "https://news.itsfoss.com/ubuntu-21-04-eol/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14192-1.html" + +准备升级了!Ubuntu 21.04 将在本周达到支持终点 +====== + +> 从本周 1 月 20 日起,Ubuntu 21.04 将不再收到任何更新。是时候考虑你的升级选择了! + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/ubuntu-21-04-eol.jpg?w=1200&ssl=1) + +[Ubuntu 21.04][1] 运行良好、添加了有趣的功能,也包括一些值得注意的变化,如 [对多显示器的改进][2]、用户界面的改进、支持 GNOME 40 的应用程序等等。 + +现在,是时候升级了。 + +Ubuntu 21.04 的更新支持在本周,即 **1 月 20 日** 结束。 + +你将不再收到任何关于 Ubuntu 21.04 系统的更新。如果你一直在使用 Ubuntu 或其某种风格,如 Ubuntu MATE,你需要将你的系统升级到 Ubuntu 21.10。 + +顺便提一句,Ubuntu 的非 LTS 版本维护期为 9 个月。如果你是 Linux 的新手的话,我建议你了解一下 [Ubuntu 发布周期][3]。 + +所以,现在你必须升级到 Ubuntu 21.10,然后再为 2022 年 7 月的另一次升级做好准备。不过,这样你的时间就充裕多了! + +### 升级到 Ubuntu 21.10 + +除非你有一个没有连接到互联网的系统,并且你希望它继续使用 Ubuntu 21.04,否则建议你现在就升级。 + +在没有任何更新的情况下,你的系统将继续受到新的安全风险的影响。所以,在做决定之前要记住这一点。 + +[Ubuntu 21.10][4] 引入了许多变化,包括 GNOME 40、[Linux 内核 5.13][5]、对高质量蓝牙音频编解码器的支持、暗色/浅色主题等等。 + +所以,你可能要开始考虑你的升级选择了。 + +你可以继续使用 Ubuntu,升级到 21.10。如果你考虑用不同的东西进行全新安装,也可以尝试像 [Pop!_OS 21.10][6] 这样的发行版。 + +不要忘了,还有各种的 Ubuntu 的风格版呢。 + +要开始升级,你只需要搜索 “软件更新器Software Updater” 并点击它,让它寻找升级并通知你。 + +无论你有什么发行版,软件更新器或你的软件中心应该给你提供升级选项,或者你可以在系统设置中找到它。 + +而且,然后按照屏幕上的指示,再点击几下就可以进行升级过程了。 + +重要的是,为了安全起见,在执行升级之前要备份你的必要数据。 + +在一些像 Ubuntu MATE 这样的版本中,你也可以选择使用终端,输入以下命令开始升级: + +``` +sudo do-release-upgrade +``` + +### 通往 Ubuntu 22.04 LTS 之路 + +Ubuntu 22.04 LTS 的 [预期功能列表][7] 应该不会让你失望。因此,你可以在它发布时轻松地升级到它,或者留在 Ubuntu 21.10 上,等待 7 月份支持结束时升级。 + +你是否期待着 Ubuntu 22.04 LTS 在今年 4 月的发布?或者,你愿意坚持使用 Ubuntu 21.10 直到 2022 年 7 月? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/ubuntu-21-04-eol/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/ubuntu-21-04-release/ +[2]: https://news.itsfoss.com/ubuntu-21-04-multi-monitor-support/ +[3]: https://itsfoss.com/end-of-life-ubuntu/ +[4]: https://news.itsfoss.com/ubuntu-21-10-release/ +[5]: https://news.itsfoss.com/linux-kernel-5-13-release/ +[6]: https://news.itsfoss.com/pop-os-21-10/ +[7]: https://itsfoss.com/ubuntu-22-04-release-features/ diff --git a/sources/news/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md b/sources/news/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md deleted file mode 100644 index 3c4fcc9b8a..0000000000 --- a/sources/news/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md +++ /dev/null @@ -1,80 +0,0 @@ -[#]: subject: "Get Ready for an Upgrade! Ubuntu 21.04 Will Reach End of Life This Week" -[#]: via: "https://news.itsfoss.com/ubuntu-21-04-eol/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " - -Get Ready for an Upgrade! Ubuntu 21.04 Will Reach End of Life This Week -====== - -[Ubuntu 21.04][1] had a good run with interesting feature additions. Some notable changes included [multi-monitor improvements][2], UI enhancements, GNOME 40-ready applications, and more. - -Now, it is time to upgrade! - -The support for updates in Ubuntu 21.04 ends this week i.e., **January 20th**. - -You will no longer receive any updates to your Ubuntu 21.04 system. If you have been using Ubuntu or any of its flavors like Ubuntu MATE, you need to upgrade your systems to Ubuntu 21.10. - -In case you did not know, Ubuntu’s non-LTS releases are maintained for nine months. I recommend you to learn about [Ubuntu release cycles][3], if you are new to Linux. - -So, now that you have to upgrade to Ubuntu 21.10, you will have to be ready for another upgrade in July 2022. But, for that, you have plenty of time! - -### Upgrading to Ubuntu 21.10 - -Unless you have a system that is not connected to the internet, and you want it to keep using Ubuntu 21.04, it is recommended that you upgrade now. - -Your system will remain vulnerable to new security risks without any updates. So, keep that in mind before making a decision. - -[Ubuntu 21.10][4] introduced many changes, including GNOME 40, [Linux Kernel 5.13][5], support for high-quality Bluetooth audio codecs, dark/light theme, and more. - -So, you might want to start considering your upgrade options! - -You can continue with Ubuntu 21.10 upgrade. You can also try distributions like [Pop!_OS 21.10][6], if you consider a fresh installation with something different. - -Not to forget, there are plenty of Ubuntu flavours as well! - -To start the upgrade, all you need to do is search for “**Software Updater**” and click on it to let it look for the upgrade/notify you. - -No matter what distribution you have, the software updater or your software center should give you the upgrade option, or you can look for it in the system settings. - -And, then follow the on-screen instructions to proceed with the upgrade process in a few more clicks. - -It is important to back up your necessary data before performing the upgrade, just to be on the safe side. - -On some flavors like Ubuntu MATE, you can also prefer to use the terminal and type in the following command to start the upgrade: - -``` - - sudo do-release-upgrade - -``` - -### The Road to Ubuntu 22.04 LTS - -Ubuntu 22.04 LTS should not disappoint you with its [list of expected features][7]. So, you can easily upgrade to it when it releases or hang on to Ubuntu 21.10 to end support in July. - -_Are you looking forward to Ubuntu 22.04 LTS as soon as it releases in April this year? Or, would you prefer to stick with Ubuntu 21.10 until July 2022?_ - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/ubuntu-21-04-eol/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://news.itsfoss.com/ubuntu-21-04-release/ -[2]: https://news.itsfoss.com/ubuntu-21-04-multi-monitor-support/ -[3]: https://itsfoss.com/end-of-life-ubuntu/ -[4]: https://news.itsfoss.com/ubuntu-21-10-release/ -[5]: https://news.itsfoss.com/linux-kernel-5-13-release/ -[6]: https://news.itsfoss.com/pop-os-21-10/ -[7]: https://itsfoss.com/ubuntu-22-04-release-features/ From 508fee6b1c9e668da40a3678ae078f02060157b2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 19 Jan 2022 10:29:02 +0800 Subject: [PATCH 041/334] A --- ...mulator ‘Cemu- Plans to Go Open-Source with Linux Support.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md b/sources/news/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md index 7d088078f9..98980998d8 100644 --- a/sources/news/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md +++ b/sources/news/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/cemu-nintendo-linux/" [#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From b8e063003ed32f28fe6e974bfd9be1fde28bfef3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 19 Jan 2022 11:11:50 +0800 Subject: [PATCH 042/334] TRP @wxy https://linux.cn/article-14193-1.html --- ...lans to Go Open-Source with Linux Support.md | 76 +++++++++++++++++++ ...lans to Go Open-Source with Linux Support.md | 72 ------------------ 2 files changed, 76 insertions(+), 72 deletions(-) create mode 100644 published/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md delete mode 100644 sources/news/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md diff --git a/published/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md b/published/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md new file mode 100644 index 0000000000..3f3a1a0dbf --- /dev/null +++ b/published/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md @@ -0,0 +1,76 @@ +[#]: subject: "Popular Nintendo Video Game Emulator ‘Cemu’ Plans to Go Open-Source with Linux Support" +[#]: via: "https://news.itsfoss.com/cemu-nintendo-linux/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14193-1.html" + +流行的任天堂电子游戏模拟器 Cemu 计划开源并支持 Linux +====== + +> 这的确是个好消息! + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/nintendo-cemu-linux.jpg?w=1200&ssl=1) + +如果你喜欢玩复古游戏,你可能已经接触过复古游戏机模拟器。顺便说一句,所谓“模拟器Emulator”(仿真器)主要是指允许主机系统运行为另一系统设计的游戏的软件或硬件。 + +最近,Cemu 成功引起了开源社区的注意力。它是众多复古电子游戏模拟器之一,可以让你玩为任天堂 Wii U 定制的游戏。然而,到目前为止,它在一个主要方面与大多数模拟器不同,即它是闭源的,但这即将改变。 + +### Cemu 简介 + +[Cemu][1] 是一个流行的基于软件的复古电子游戏模拟器,专门模拟任天堂 Wii U 游戏,它是这类模拟器中第一个。它利用了 OpenGL 和 Vulkan 来运行游戏。 + +多年来,它已经有了显著的进展,现在可以 [玩整个 Wii U 库中的 51% 的游戏][2]。这包括《马里奥卡丁车 8》和《塞尔达传说:荒野之息》等热门游戏。 + +虽然它早在 2015 年就发布了,但 Cemu 只能运行在 Windows 上。不过,开发者发布的新路线图指出,Cemu 应该很快就会移植到 Linux 上了。 + +而且,最令人关注的是,Cemu 将走向开源! + +### 通往开源和 Linux 之路 + +路线图总共包括了由开发人员计划的八个里程碑。其中包括计划开发一个 Linux 移植版并向社区提供代码。 + +谈到 Cemu 的开源问题,开发者计划在 2022 年完成这一工作。所以,你不应该对此寄予厚望。 + +迁移到 Linux 涉及到将源代码从 C 语言改写成 C++ 语言,并从 Visual Studio 迁移到 cmake。 + +以下是开发者对将 Cemu 引入 Linux 的看法: + +> 我们最终想提供一个原生的 Linux 版本。这一直是一个正在进行的副计划,尽管由于优先级较低和依赖于其他任务而进展相对缓慢,但现在已经完成了大约 70% 的工作。 + +开发人员还提到,移植过程伴随着其他工作,如软件 H264 解码器和 cubeb 后端。由于主要的工作已经完成,可以说 Cemu 很快就会出现在 Linux 上。 + +### 其他计划 + +开发人员已经考虑将 LLVM 作为 CPU JIT 后端,用于将 PowerPC(Wii U 的主机架构)转换为 ARM 等 X86 架构。 + +他们还刚刚开始着手开发一个新的着色器反编译器,以减少着色器编译时间和卡顿。 + +你可以参考 [官方路线图][3] 了解更多细节。 + +### 总结 + +这对渴望做出贡献并使 Cemu 变得更好的复古游戏爱好者来说绝对是一份大礼。 + +Cemu 最终将加入许多流行的、开源的任天堂游戏机模拟器的行列,如 Citra、Dolphin 和 Yuzu。 + +你对 Cemu 的开源有什么看法?复古游戏模拟器应该是闭源的还是开源的? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/cemu-nintendo-linux/ + +作者:[Rishabh Moharir][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lujun9972 +[1]: https://cemu.info +[2]: https://compat.cemu.info/ +[3]: https://wiki.cemu.info/wiki/Roadmap diff --git a/sources/news/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md b/sources/news/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md deleted file mode 100644 index 98980998d8..0000000000 --- a/sources/news/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md +++ /dev/null @@ -1,72 +0,0 @@ -[#]: subject: "Popular Nintendo Video Game Emulator ‘Cemu’ Plans to Go Open-Source with Linux Support" -[#]: via: "https://news.itsfoss.com/cemu-nintendo-linux/" -[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Popular Nintendo Video Game Emulator ‘Cemu’ Plans to Go Open-Source with Linux Support -====== - -If you’re into retro gaming, you may have come across retro console emulators. For those unaware, they are basically software or hardware that allow the host system to run games designed for another system. - -Lately, Cemu has managed to grab the attention of the open-source community. It is one of the many retro console emulators out there that lets you play games tailored for Nintendo Wii U. However, as of now, it distinguishes itself from most of them in one major aspect, its closed-source nature, but that’s about to change. - -### What is Cemu? - -[Cemu][1] is a popular software-based retro console emulator that specifically emulates Nintendo Wii U games and is the first one to do so. It makes use of both OpenGL and Vulkan to run the games. - -It has improved significantly over the years and can now [play around 51% of the entire Wii U library][2]. This list includes popular titles like Mario Kart 8 and The Legend of Zelda: Breath of the Wild. - -Although released back in 2015, Cemu is only available on Windows. But, a new roadmap published by the developers states that Cemu should arrive on Linux soon. - -And, as a cherry on top, Cemu will be going open-source! - -### The Way to Open-Source and Linux - -The roadmap includes a total of eight milestones planned by the devs. Among them are plans to develop a Linux port and make the code available to the community. - -Talking about Cemu going open-source, the devs have plans to do this by 2022. So, you should not keep your hopes high for anything to arrive soon enough. - -Moving to Linux involves rewriting the source code from C to C++ and migrating from Visual Studio to cmake. - -Here’s what the devs had to say about bringing Cemu to Linux: - -> We eventually want to offer a native Linux version. This has been an ongoing side-project, albeit progressing relatively slowly due to somewhat low-priority nature and being dependent on other tasks. About 70% of the work has been done at this point.  - -The devs have also mentioned that the porting process is accompanied by other duties like the software H264 decoder and cubeb backend. Since a major of work has been completed, it’s safe to say Cemu will be coming to Linux very soon. - -### Other Plans - -The devs have considered implementing LLVM as CPU JIT backend for translating PowerPC (Wii U’s host architecture) to x86 architectures like ARM. - -They have also just begun working on a new shader decompiler to reduce shader compilation time and stuttering. - -You can refer to the [official roadmap][3] for more details. - -### Wrapping Up - -This is definitely a massive gift to retro gaming enthusiasts eager to contribute and make Cemu better. - -Cemu will finally join the likes of many popular and open-source Nintendo console emulators like Citra, Dolphin, and Yuzu. - -_What do you think of Cemu going open-source? Should retro game emulators be closed-source or open-source?_ - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/cemu-nintendo-linux/ - -作者:[Rishabh Moharir][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/rishabh/ -[b]: https://github.com/lujun9972 -[1]: https://cemu.info -[2]: https://compat.cemu.info/ -[3]: https://wiki.cemu.info/wiki/Roadmap From 54af9a46782597ff03169a66cd350b2146f56ae6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 19 Jan 2022 17:14:58 +0800 Subject: [PATCH 043/334] RP @stevenzdg988 https://linux.cn/article-14194-1.html --- ...evel up your open source skills in 2022.md | 95 +++++++++++++++++++ ...evel up your open source skills in 2022.md | 93 ------------------ 2 files changed, 95 insertions(+), 93 deletions(-) create mode 100644 published/20220104 10 Git tutorials to level up your open source skills in 2022.md delete mode 100644 translated/tech/20220104 10 Git tutorials to level up your open source skills in 2022.md diff --git a/published/20220104 10 Git tutorials to level up your open source skills in 2022.md b/published/20220104 10 Git tutorials to level up your open source skills in 2022.md new file mode 100644 index 0000000000..f5d166a924 --- /dev/null +++ b/published/20220104 10 Git tutorials to level up your open source skills in 2022.md @@ -0,0 +1,95 @@ +[#]: subject: "10 Git tutorials to level up your open source skills in 2022" +[#]: via: "https://opensource.com/article/22/1/git-tutorials" +[#]: author: "Manaswini Das https://opensource.com/users/manaswinidas" +[#]: collector: "lujun9972" +[#]: translator: "stevenzdg988" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14194-1.html" + +2021 总结:提升 Git 技能的 10 篇指南 +====== + +> 这些文章包含了黑科技、鲜为人知的事实,以及在使用 Git 时可以派上用场的技巧和窍门。 + +![](https://img.linux.net.cn/data/attachment/album/202201/19/171344h03bqej63r36vyvl.jpg) + +Git 是代码协作开发工作流程中不可或缺的一部分。无论你是初学者还是专家,第一件事就是在使用开源代码时需要学习这个功能强大的版本控制系统。对于 Git,不需要知道所有事情,但是了解一些特殊的黑科技可以让你在 GitLab 等平台上更轻松地分享代码,因此你可以与不同地方的开发人员协作。如果有什么没把握的地方,`git --help` 可以帮助你。 + +我每天都为了解 Git 所提供的控制能力而感到惊讶。没有哪种情况是你无法恢复到早期版本的,无论你所处的情况是多么不可能或棘手。 + +在 2021 年我们发布了大量 Git 的文章;我只汇总了其中前 10 篇,这些文章包含了各种黑科技、鲜为人知的事实,以及在使用 Git 时可以派上用场的技巧和窍门。 + +### 使用 git stash 命令的实用指南 + +[Ramakrishna Pattnaik][2] 解释了 [git stash 命令][3] 的功能。这篇文章重点介绍 `git stash` 如何帮助你列出、检查、保存和恢复更改,以确保切换分支时的无忧体验。它还可以帮助你跟踪在本地无需提交的更改,而同时保持干净的工作目录。 + +### 5 个让你的 Git 技能更上一层楼的 Git 命令 + +[Seth Kenlon][4] 详细介绍了 [五个鲜为人知的 Git 命令][5],它们可以让你的生活更轻松。开发人员可以使用 `git whatchanged`、`git stash`、`git worktree` 和 `git cherry-pick` 等命令来节省时间。 + +### Git cherry-pick 简介 + +[Rajeev Bera][6] 教程将引导你了解 [git cherry-pick 命令][7] 是什么,为什么和如何使用它,并列出 `git cherry-pick` 可以帮助你避免棘手的情况所有用例。 + +### 3 个使用 git cherry-pick 命令的原因 + +我分享了 [利用 git cherry-pick][8] 如何帮助你避免冗余,一次性处理多个提交并恢复丢失的更改。 + +### 使用 git worktree 自由地尝试你的代码 + +`git stash` 命令负责将更改保存到工作目录。Seth Kenlon 向我们介绍了 `git worktree` 和几个 [git worktree 用例][9],它们可以帮助你将存储库恢复到已知状态。 + +### Git 上下文切换的 4 个技巧 + +[Olaf Alders][10] 的这篇文章讨论了使用 Git 时 [切换分支的四种不同方式][11] 的利弊。这些选项将帮助你简化工作流程,并保持干净的工作目录,而不会丢失你的更改。 + +### 查找 Git 提交中的更改 + +Seth Kenlon 解释了如何利用如 [git log 和 git whatchanged][12] 等简单命令来提取有关 Git 提交内容中更改的特定信息。这是一个有用的快捷方式,而且名字很容易记住。 + +### 管理主目录的 7 个 Git 技巧 + +Seth Kenlon 分享了 [使用 Git 管理和组织 $HOME 变量][13] 的注意事项,并解释了它如何让他的跨设备生活更实用。更好的是,这让他可以自由地尝试新想法,因为他知道他可以轻松地将它们回滚。 + +### GitOps 与 DevOps:有什么区别? + +[Bryant Son][14] 向你介绍了 [GitOps][15],他将其描述为 DevOps 的进化版本,它使用 Git 作为单一事实来源。这篇文章还列出了其它有用资源,可用于学习 DevOps 并在开源领域找到工作。 + +### 开始使用 Argo CD + +[Ayush Sharma][16] 详细介绍了 [Argo CD][17] 的优势,这是一种基于拉取式的 GitOps 开发工具。Argo CD 通过在 Git 中管理 Kubernetes 清单并将它们同步到集群中,为你提供两全其美的体验。 + +你能想到其他让你的生活更轻松的 Git 技巧吗?请在评论中告诉我们。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/git-tutorials + +作者:[Manaswini Das][a] +选题:[lujun9972][b] +译者:[stevenzdg988](https://github.com/stevenzdg988) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/manaswinidas +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating) +[2]: https://opensource.com/users/rkpattnaik780 +[3]: https://opensource.com/article/21/4/git-stash +[4]: https://opensource.com/users/seth +[5]: https://opensource.com/article/21/4/git-commands +[6]: https://opensource.com/users/acompiler +[7]: https://opensource.com/article/21/4/cherry-picking-git +[8]: https://opensource.com/article/21/3/git-cherry-pick +[9]: https://opensource.com/article/21/4/git-worktree +[10]: https://opensource.com/users/oalders +[11]: https://opensource.com/article/21/4/context-switching-git +[12]: https://opensource.com/article/21/4/git-whatchanged +[13]: https://opensource.com/article/21/4/git-home +[14]: https://opensource.com/users/brson +[15]: https://opensource.com/article/21/3/gitops +[16]: https://opensource.com/users/ayushsharma +[17]: https://opensource.com/article/21/8/argo-cd +[18]: https://opensource.com/how-submit-article diff --git a/translated/tech/20220104 10 Git tutorials to level up your open source skills in 2022.md b/translated/tech/20220104 10 Git tutorials to level up your open source skills in 2022.md deleted file mode 100644 index 68d3a92b2b..0000000000 --- a/translated/tech/20220104 10 Git tutorials to level up your open source skills in 2022.md +++ /dev/null @@ -1,93 +0,0 @@ -[#]: subject: "10 Git tutorials to level up your open source skills in 2022" -[#]: via: "https://opensource.com/article/22/1/git-tutorials" -[#]: author: "Manaswini Das https://opensource.com/users/manaswinidas" -[#]: collector: "lujun9972" -[#]: translator: "stevenzdg988" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -2022 年提升开源技能的 10 个 Git 学习指南 -====== -这些文章包含黑客,鲜为人知的事实,以及在使用 Git 时可以派上用场提示和技巧。 - -![坐在窗前笔记本电脑前的女商人][1] - -Git 是代码共享开发工作流程中不可或缺的一部分。无论您是初学者还是专家,第一件事就是在使用开源代码时需要学习这个功能强大的版本控制系统。在谈到 Git 时,不需要知道所有事情,但是了解一些特性可以让您在 GitLab 等平台上更轻松地共享代码,因此您可以与不同地方的开发人员协作。如果有什么没把握的地方,`git --help` 可以帮助你。 - -我每天都对 Git 提供的已知控制数量感到惊讶。没有一个无法恢复到早期版本的实例,无论您所处的情况是多么不可能或棘手。 - -在 2021 年 Opensource.com 有大量关于 Git 的文章;我只汇总了前 10 名。所有文章都包含包含黑客,鲜为人知的事实,以及在使用 Git 时可以派上用场提示和技巧。 -### 使用 git stash 命令的实用指南 - -[Ramakrishna Pattnaik][2] 解释了 [git stash 命令][3] 的功能。这篇文章重点介绍 `git stash` 如何帮助您列出、检查、保存和恢复更改,以确保切换分支时的无忧体验。它还可以帮助您跟踪在本地无需提交的更改而,同时保持干净的工作目录。 - -### 5 个 Git 命令快速升级你的游戏 - -[Seth Kenlon][4] 详细介绍了 [五个鲜为人知的 Git 命令][5],它们可以让您的生活更轻松。开发人员可以使用 `git whatchanged`、`git stash`、`git worktree` 和 `git cherry-pick` 等命令来节省时间。 - -### What is Git cherry-picking? 什么是 Git cherry-pick - -[Rajeev Bera][6] 教程将引导您了解 [git cherry-pick 命令][7] 的内容、原因和方式,并列出所有可能的用例,`git cherry-pick` 可以帮助您避免棘手的情况。 - -### 3 个使用 git cherry-pick 命令的原因 - -我分享了 [利用 git cherry-pick][8] 如何帮助您避免冗余、一次性处理多个提交并恢复丢失的更改。 - -### 使用 git worktree 自由地尝试你的代码 - -`git stash` 命令负责将更改保存到工作目录。Seth Kenlon 向我们介绍了 `git worktree` 和几个 [git worktree 用例][9],它们可以帮助您将存储库恢复到已知状态。 - -### 4 个 Git 上下文切换的技巧 - -[Olaf Alders][10] 的这篇文章讨论了使用 Git 时[四种不同的切换分支方式][11] 的优缺点。这些选项将帮助您简化工作流程并保持干净的工作目录,而不会丢失您的更改。 - -### 查找 Git 提交中的更改 - -Seth Kenlon 解释了如何利用如 [git log 和 git whatchanged][12] 等简单命令来提取有关 Git 提交内容中更改的特定信息。这是一个有用的快捷方式,而且名字很容易记住。 - -### 7 个管理主目录的 Git 技巧 - -Seth Kenlon 分享了磁盘操作系统和 [使用 Git 管理和组织 $HOME 变量][13] 的注意事项,并解释了它如何让他的跨设备生活更实用。更好的是,这让他可以自由地尝试新想法,因为他知道他可以轻松地将它们回滚。 - -### GitOps 与 DevOps:有什么区别? - -[Bryant Son][14] 向您介绍了 [GitOps,][15],他将其描述为 DevOps 的进化版本,它使用 Git 作为单一事实来源。 这篇文章还列出了 Opensource.com 上可用于学习 DevOps 和在开源领域找到工作的有用资源。 - -### 开始使用 Argo CD - -[Ayush Sharma][16] 详细介绍了 [Argo CD,][17] 一种基于拉取式的 GitOps 开发工具的优势。Argo CD 通过在 Git 中管理 Kubernetes 清单并将它们同步到集群中,为您提供两全其美的体验。 - -你能想到其他让你的生活更轻松的 Git 技巧吗?请在评论中告诉我们或[向我们发送文章创意][18]。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/git-tutorials - -作者:[Manaswini Das][a] -选题:[lujun9972][b] -译者:[stevenzdg988](https://github.com/stevenzdg988) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/manaswinidas -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating) -[2]: https://opensource.com/users/rkpattnaik780 -[3]: https://opensource.com/article/21/4/git-stash -[4]: https://opensource.com/users/seth -[5]: https://opensource.com/article/21/4/git-commands -[6]: https://opensource.com/users/acompiler -[7]: https://opensource.com/article/21/4/cherry-picking-git -[8]: https://opensource.com/article/21/3/git-cherry-pick -[9]: https://opensource.com/article/21/4/git-worktree -[10]: https://opensource.com/users/oalders -[11]: https://opensource.com/article/21/4/context-switching-git -[12]: https://opensource.com/article/21/4/git-whatchanged -[13]: https://opensource.com/article/21/4/git-home -[14]: https://opensource.com/users/brson -[15]: https://opensource.com/article/21/3/gitops -[16]: https://opensource.com/users/ayushsharma -[17]: https://opensource.com/article/21/8/argo-cd -[18]: https://opensource.com/how-submit-article From 706d4b56df4516c3b433b683181675805f0cc98e Mon Sep 17 00:00:00 2001 From: "patrick.zeng" Date: Wed, 19 Jan 2022 18:15:56 +0800 Subject: [PATCH 044/334] Translate talk - 20211113 Why Now Is A Great... --- ...nsider a career in open source hardware.md | 72 ------------------ ...nsider a career in open source hardware.md | 74 +++++++++++++++++++ 2 files changed, 74 insertions(+), 72 deletions(-) delete mode 100644 sources/talk/20211113 Why now is a great time to consider a career in open source hardware.md create mode 100644 translated/talk/20211113 Why now is a great time to consider a career in open source hardware.md diff --git a/sources/talk/20211113 Why now is a great time to consider a career in open source hardware.md b/sources/talk/20211113 Why now is a great time to consider a career in open source hardware.md deleted file mode 100644 index 45ae02997d..0000000000 --- a/sources/talk/20211113 Why now is a great time to consider a career in open source hardware.md +++ /dev/null @@ -1,72 +0,0 @@ -[#]: subject: "Why now is a great time to consider a career in open source hardware" -[#]: via: "https://opensource.com/article/21/11/open-source-hardware-careers" -[#]: author: "Joshua Pearce https://opensource.com/users/jmpearce" -[#]: collector: "lujun9972" -[#]: translator: "zengyi1001" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Why now is a great time to consider a career in open source hardware -====== -Open source hardware is now a field of its own and it is growing -rapidly. -![open source hardware shaking hands][1] - -It has become commonplace in the software industry for programmers of all flavors to build careers writing code that releases to the commons with open source licenses. Industry headhunters often demand access to the code to vet future employees. Those that focus their career on open source development get rewarded. According to payscale.com, Linux sysadmins earn more than their Windows counterparts, indicating better pay and job security for jobs in open source software. There's also a good feeling (maybe even karma) that comes with sharing your work. You know you are creating value literally for the entire world. Historically, such opportunities did not exist for those of us that work in open hardware.  - -Twenty years or so ago, almost no one even knew what open source hardware was, let alone planned a career around it. In 2000, for example, out of the more than 2 million academic papers published that year in the entire world, only seven articles even mentioned "open source hardware" at all. When I first wrote [_Open-Source Lab_][2], I'd collected every example (only a few dozen) and could easily keep up and read every open hardware article that got published to post them on a wiki. I am happy to report that is no longer physically possible. There have already been over 1,500 articles that discuss "open source hardware" this year, and I am sure many more will be out by year's end. Open source hardware is now a field of its own, with a few journals dedicated to it specifically (for example, [_HardwareX_][3] and the [_Journal of Open Hardware_][4]). In a wide range of fields, dozens of traditional journals now routinely cover the latest open hardware developments. - -![Smart open source 3-D printing][5] - -Developing smart open source 3-D printing (Joshua Pearce, [GNU-FDL][6]) - -Even a decade ago, stressing open source hardware development was somewhat of a risk from a career perspective. I remember downplaying it on my resume for my last job and stressing my more conventional work. Supervisors in industry and academia had difficulty figuring out how you'd capture value if designs were given away and got manufactured elsewhere. This has all been changing. Like free and open source software, open source hardware development is faster and, dare I say, superior to proprietary approaches. - -![Open source recycle bot][7] - -(Joshua Pearce, [GNU-FDL][6]) - -There are plenty of successful [open hardware business models][8] for every kind of enterprise. With the rise of digital manufacturing (largely due to open source development), the lines have blurred between open source software and open source hardware. Open source software like [FreeCAD][9] enables open designs to be made and then used in built-in CAM to get fabricated on open source laser cutters, CNC mills, or 3-D printers. [OpenSCAD][10], an open source script-based CAD package, in particular, really blurs the lines between software and hardware so much that code and physical design become synonymous. Many of us started speaking out about open hardware openly. I made it a core thrust of my research program, first making my own equipment open source and then working on open hardware development for others. I was far from alone. As a community, we had gained enough critical mass that the [Open Source Hardware Association][11] (OSHWA) got founded in 2012. Today, almost a decade later, career prospects in open source hardware are totally different: Hundreds of open source hardware companies exist, the Internet is swimming with millions (millions!) of open source designs, and the interest in open source hardware in the academic literature has been rising exponentially.  - -![Open source production for solar photovoltaics][12] - -Developing open source production for solar photovoltaics (Joshua Pearce, [GNU-FDL][6]) - -There are even jobs meant to push a faster transition to ubiquitous open source hardware. For example, the Internet of Production (IoP) Alliance in developing Open Data Standards and growing the community of users of these standards has [positions open now][13] for Operations & Communications Officer, Data standards Community Support Manager, and DevOps engineer. I was just hired into a tenured endowed chair at [Western University in Canada,][14] a top 1% global university, **because** of my open source hardware work, not in spite of it. The position is cross-pointed with the [Ivey Business School,][15] the #1 business school in Canada. My job is to help the University rapidly evolve to take advantage of open source technology development opportunities. To put my money where my mouth is, I am [currently hiring][16] graduate students at the masters and PhD levels, including a full-tuition scholarship and a living stipend. These [Free Appropriate Sustainability Technology (FAST) Lab][17] graduate engineering positions are specifically reserved for developing open source hardware for a range of applications covering solar photovoltaic systems, distributed recycling, and emergency food production. This type of work gets more frequently financed by funders who want to maximize [return on their investment for research][18]. Entire nations are moving in this direction. The latest good example is France, which just published its [second plan for Open Science][19]. I have noticed a marked uptick in the number of "open source" keyword grants listed on [GrantForward][20] for open source funding in the US. Many foundations have already received the open source memo loud and clear—so there is a growing deluge of opportunities in open source R&D. - -So if you have not already, maybe it is time for you to consider open source as a career, even if you are an engineer that likes to develop hardware. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/11/open-source-hardware-careers - -作者:[Joshua Pearce][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jmpearce -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open-source-hardware.png?itok=vS4MBRSh (shaking hands open source hardware) -[2]: https://www.appropedia.org/Open-source_Lab -[3]: https://www.hardware-x.com/ -[4]: https://openhardware.metajnl.com/ -[5]: https://opensource.com/sites/default/files/uploads/smart-open-source-3d-printing.png (Smart open source 3-D printing) -[6]: https://www.gnu.org/licenses/fdl-1.3.en.html -[7]: https://opensource.com/sites/default/files/pictures/open-source-recyclebot_0.jpg (Open source recycle bot) -[8]: https://doi.org/10.5334/joh.4 -[9]: https://www.freecadweb.org/ -[10]: https://openscad.org/ -[11]: https://www.oshwa.org/ -[12]: https://opensource.com/sites/default/files/uploads/open-source-solar-photovoltaics.png (Open source production for solar photovoltaics) -[13]: https://www.internetofproduction.org/hiring -[14]: https://www.uwo.ca/ -[15]: https://www.ivey.uwo.ca/ -[16]: https://www.appropedia.org/FAST_application_process -[17]: https://www.appropedia.org/Category:FAST -[18]: https://www.academia.edu/13799962/Return_on_Investment_for_Open_Source_Hardware_Development -[19]: https://www.ouvrirlascience.fr/wp-content/uploads/2021/10/Second_French_Plan-for-Open-Science_web.pdf -[20]: https://www.grantforward.com/index diff --git a/translated/talk/20211113 Why now is a great time to consider a career in open source hardware.md b/translated/talk/20211113 Why now is a great time to consider a career in open source hardware.md new file mode 100644 index 0000000000..b8acff85f5 --- /dev/null +++ b/translated/talk/20211113 Why now is a great time to consider a career in open source hardware.md @@ -0,0 +1,74 @@ +[#]: subject: "Why now is a great time to consider a career in open source hardware" +[#]: via: "https://opensource.com/article/21/11/open-source-hardware-careers" +[#]: author: "Joshua Pearce https://opensource.com/users/jmpearce" +[#]: collector: "lujun9972" +[#]: translator: "zengyi1001" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Why now is a great time to consider a career in open source hardware +为什么说现在是考虑从事开源硬件职业的好时机 +====== + +开源硬件现在有了自己的专属领域并且正在快速的成长中。 +![open source hardware shaking hands][1] + +在软件行业中,各种风格的程序员通过编写代码并且使用开源许可发布到公共场所来构建自己的职业生涯,已经变得司空见惯。产业界的猎头们通常要求访问他们未来员工候选人的代码。哪些将自己职业生涯专注在开源项目开发的人得到了回报。从 payscale.com 网站得知,Linux 系统管理员的收入比他们的 Windows 管理员同行要高,说明从事开源软件领域可以获得更高的报酬和更稳定的工作机会。分享你的工作会让你感觉非常好(这甚至可能是一种因果报应),你知道自己正在为整个世界创造价值。历史上,这样的机会可从来没有为我们这些工作在开源硬件领域的人存在过。 + +大约20年前,没有人知道开源硬件是什么,更别说围绕它规划自己的职业生涯了。举例而言,在2000年全世界发表了超过200万篇学术论文,却只有7篇文章提到过“开源硬件”。在我第一次写 [_Open-Source Lab_][2]的时候,我收集了每一个案例(其实也就几十个)并且可以轻松的跟上和阅读每一篇发布的关于开源硬件的文章,还把它们发布到一个维基上。我很高兴的报告大家这种情况现在已经在物理上成为了不可能。今年已经有超过1500篇文章在讨论“开源硬件”,而且我相信年底的时候还会有更多的文章发表出来。开源硬件现在已经发展出来了自己的领域,有一些专门报导它的杂志(比如说 [_HardwareX_][3] 和 [_Journal of Open Hardware_][4])。在广泛的领域,数十种传统杂志现在也会定期报道最新的开源硬件的发展。 +![Smart open source 3-D printing][5] + +开发智能开源硬件 3-D 打印 (Joshua Pearce, [GNU-FDL][6]) + +即使是在十年前,从职业生涯的角度看,着重于开源硬件开发在某种程度上也是一种冒险。我记得在我上一份工作的简历中,我淡化了和它相关的内容,更多的强调了我的传统工作。工业界和学术界的管理人员难以明白如果这些设计被赠与出去并在其他地方生产制造,你又怎样获得收益。这一切都在改变。和自由与开源的软件一样开源硬件开发要更快,而且我敢说,会优于私有开发模式。 + +![Open source recycle bot][7] + +(Joshua Pearce, [GNU-FDL][6]) + + +对于每一种企业,都有大量成功的[开放硬件商业模式][8]。随着数字制造的兴起(主要是由于开源开发),开源软件和开源硬件之间的界限变得模糊。像 [FreeCAD][9] 这样的开源软件可以制作开放式设计,然后在内置 CAM 中使用,以便在开源激光切割机、CNC 铣床或 3D 打印机上进行制造。 [OpenSCAD][10] 是一个基于开源脚本的 CAD 包,尤其是它确实模糊了软件和硬件之间的界限,以至于代码和物理设计成为同义词。我们中的许多人开始公开谈论开放硬件。我把它作为我研究计划的核心推动力,首先让我自己的设备开源,然后为其他人开发开放硬件。我并不孤单。作为一个社区,我们已经获得了足够的临界质量,以至于 [开源硬件协会][11] (OSHWA) 于 2012 年成立。如今,差不多十年后,开源硬件的职业前景完全不同:数百个开源硬件硬件公司存在,互联网上涌现出数百万(数百万!)个开源设计,学术文献中对开源硬件的兴趣呈指数级增长。 + +![Open source production for solar photovoltaics][12] +太阳能光伏产业的开源生产 + +为太阳能光伏开发开源产品。(Joshua Pearce, [GNU-FDL][6]) + +甚至有些工作的目标就是促进更快过渡到无处不在的开源硬件。例如,开发开放数据标准和发展这些标准的用户社区的互联网产业 (IoP) 联盟现在已经为运营通信员、数据标准社区支持经理和 DevOps 工程师提供了[职位][13]。正是由于**我在开源硬件上方面的工作**,我刚被聘为[加拿大西部大学][14],这所世界排名前 1% 的大学的终身讲席主席。该职位与加拿大排名第一的商学院 [Ivey Business School,][15] 相交叉。我的工作是帮助大学快速发展,抓住开源技术发展机会。说到做到,我现在正[招聘][16]硕士和博士水平的毕业生,包含全额奖学金和生活津贴。这些[免费适用的可持续性技术 (FAST) 实验室][17] 的研究生工程职位专门用于开发开源硬件,用于太阳能光伏系统、分布式回收和紧急食品生产等一系列应用。这种工作得到了那些想要最大化[他们的研究投资回报][18]的资助者的更频繁的资助。整个国家都在朝着这个方向前进。最近的好例子是法国,它刚刚发布了[第二个开放科学计划][19]。我注意到 [GrantForward][20] 上列出的,用于美国开源资金的“开源”关键字资助的数量显着增加。许多基金会已经大声而清晰地收到了开源备忘录——因此开源研发的机会越来越多。 + +因此,如果你还没开始的话,也许是时候考虑将开源作为一种职业,即使您是一名喜欢开发硬件的工程师。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/open-source-hardware-careers + +作者:[Joshua Pearce][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/zengyi1001) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jmpearce +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open-source-hardware.png?itok=vS4MBRSh (shaking hands open source hardware) +[2]: https://www.appropedia.org/Open-source_Lab +[3]: https://www.hardware-x.com/ +[4]: https://openhardware.metajnl.com/ +[5]: https://opensource.com/sites/default/files/uploads/smart-open-source-3d-printing.png (Smart open source 3-D printing) +[6]: https://www.gnu.org/licenses/fdl-1.3.en.html +[7]: https://opensource.com/sites/default/files/pictures/open-source-recyclebot_0.jpg (Open source recycle bot) +[8]: https://doi.org/10.5334/joh.4 +[9]: https://www.freecadweb.org/ +[10]: https://openscad.org/ +[11]: https://www.oshwa.org/ +[12]: https://opensource.com/sites/default/files/uploads/open-source-solar-photovoltaics.png (Open source production for solar photovoltaics) +[13]: https://www.internetofproduction.org/hiring +[14]: https://www.uwo.ca/ +[15]: https://www.ivey.uwo.ca/ +[16]: https://www.appropedia.org/FAST_application_process +[17]: https://www.appropedia.org/Category:FAST +[18]: https://www.academia.edu/13799962/Return_on_Investment_for_Open_Source_Hardware_Development +[19]: https://www.ouvrirlascience.fr/wp-content/uploads/2021/10/Second_French_Plan-for-Open-Science_web.pdf +[20]: https://www.grantforward.com/index From ef6227405ffac29cec387d432aef443b5642cc5a Mon Sep 17 00:00:00 2001 From: unigeorge <40418272+unigeorge@users.noreply.github.com> Date: Wed, 19 Jan 2022 21:28:31 +0800 Subject: [PATCH 045/334] translated --- ... Shell Scripting for beginners (Part 2).md | 281 ------------------ ... Shell Scripting for beginners (Part 2).md | 281 ++++++++++++++++++ 2 files changed, 281 insertions(+), 281 deletions(-) delete mode 100644 sources/tech/20211027 Bash Shell Scripting for beginners (Part 2).md create mode 100644 translated/tech/20211027 Bash Shell Scripting for beginners (Part 2).md diff --git a/sources/tech/20211027 Bash Shell Scripting for beginners (Part 2).md b/sources/tech/20211027 Bash Shell Scripting for beginners (Part 2).md deleted file mode 100644 index 5f5337632b..0000000000 --- a/sources/tech/20211027 Bash Shell Scripting for beginners (Part 2).md +++ /dev/null @@ -1,281 +0,0 @@ -[#]: subject: "Bash Shell Scripting for beginners (Part 2)" -[#]: via: "https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-2/" -[#]: author: "Matthew Darnell https://fedoramagazine.org/author/zexcon/" -[#]: collector: "lujun9972" -[#]: translator: "unigeorge" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Bash Shell Scripting for beginners (Part 2) -====== - -![][1] - -Photo by [N Bandaru][2] on [Unsplash][3] - -Welcome to part 2 of Bash Shell Scripting at a beginner level. This article will dive into some more unique aspects of bash scripting. It will continue to use familiar commands, with an explain of anything new, and cover standard output standard input, standard error, the “pipe”, and data redirection. - -### Adding comments # - -As your scripts get more complicated and functional you will need to add comments to remember what you were doing. If you share your scripts with others, comments will help them understand the thought process and what you intended for your script to do. From the last article recall there were mathematical equations. Some comments have been added in the new version. Notice that in the _learnToScript.sh_ file (reproduced below) the comments are the lines with the hash sign before them. When the script runs these lines do not appear. - -``` - - #!/bin/bash - - #Let's pick up from our last article. We - #learned how to use mathematical equations - #in bash scripting. - - echo $((5+3)) - echo $((5-3)) - echo $((5*3)) - echo $((5/3)) - -``` - -``` - - [zexcon ~]$ ./learnToScript.sh - 8 - 2 - 15 - 1 - -``` - -### Pipe Operator | - -We will use another tool called _grep_ to introduce the pipe operator. - -> Grep searches one or more input files for lines containing a match to a specified pattern. By default, Grep outputs the matching lines. -> -> - -Paul W. Frields’ article in the Fedora Magazine provides a good background on _grep_. - -> [Command line quick tips: Searching with grep][4] - -You will find the pipe key above the Enter key. Enter it by pressing Shift + \\. (English Keyboard) - -Now that you are all freshened up on grep, look at an example of the use of the pipe command. At the command line type in _ls -l | grep_ _learn_ - -``` - - [zexcon ~]$ ls -l | grep learn - -rwxrw-rw-. 1 zexcon zexcon 70 Sep 17 10:10 learnToScript.sh - -``` - -Normally the _ls -l_ command would provide a list of the files on your screen. Here the full results of the _ls_ _-l_ command are piped into the grep command which searches for the string _learn_. Think of the pipe command like a filter. A command is run, in this case _ls -l_, and the results are limited to the files inside your directory. These results are sent via the pipe command to _grep_ which searches for the work _learn_ and only that line appears. - -Look at one more example to try and nail this home. The _less_ command will allow you to see the results of a command that would extend beyond one screen size. Here is a quick description from the man pages for the _less_ command. - -> Less  is a program similar to more(1), but which allows backward movement in the file as well as -> forward movement.  Also, less does not have to read the entire input file  before  starting,  so -> with  large input files it starts up faster than text editors like vi(1).  Less uses termcap (or -> terminfo on some systems), so it can run on a variety of terminals.  There is even limited  sup‐ -> port  for hardcopy terminals.  (On a hardcopy terminal, lines which should be printed at the top -> of the screen are prefixed with a caret.) -> -> Fedora 34 Manual(man) Pages - -So let’s see what it looks like utilizing the pipe and the _less_ command - -``` - - [zexcon ~]$ ls -l /etc | less - -``` - -``` - - total 1504 - drwxr-xr-x. 1 root root 126 Jul 7 17:46 abrt - -rw-r--r--. 1 root root 18 Jul 7 16:04 adjtime - -rw-r--r--. 1 root root 1529 Jun 23 2020 aliases - drwxr-xr-x. 1 root root 70 Jul 7 17:47 alsa - drwxr-xr-x. 1 root root 14 Apr 23 05:58 cron.d - drwxr-xr-x. 1 root root 0 Jan 25 2021 cron.daily - : - : - -``` - -The results have been trimmed, here, for readability. Use the arrow keys on the keyboard to scroll up or down. Unlike the command line, where you might miss the top of the results if they scroll off screen, you can control the display. To get out of the _less_ screen tap the _q_ key. - -### Standard Output (stdout), >, >>, 1>, and 1>> - -The output of a command preceding the > or >> is sent to a file whose name follows. Keep in mind that > and 1> have the same results since the 1 stands for stdout (the standard output). Stdout is assumed if it does not appear. The >> and 1>> will append the data to the end of the file. In each case (> or >>) the file is created if it does not exist. - -As an example, say you want to watch the ping command output to see if it dropped a packet. Rather than sit and watch the console, redirect the output to a file. You can come back later and see if packets were dropped. Here is a test of the redirect using _>_. - -``` - - [zexcon ~]$ ls -l ~ > learnToScriptOutput - -``` - -This takes the normal results you see in the terminal (recall ~ is your home directory) and redirects it to the _learnToScriptOutput_ file. Did you notice that _learnToScriptOutput_ was never created but now the file exists? Kind of cool. - -``` - - total 128 - drwxr-xr-x. 1 zexcon zexcon 268 Oct 1 16:02 Desktop - drwxr-xr-x. 1 zexcon zexcon 80 Sep 16 08:53 Documents - drwxr-xr-x. 1 zexcon zexcon 0 Oct 1 15:59 Downloads - -rw-rw-r--. 1 zexcon zexcon 685 Oct 4 16:00 learnToScriptAllOutput - -rw-rw-r--. 1 zexcon zexcon 23 Oct 4 12:42 learnToScriptInput - -rw-rw-r--. 1 zexcon zexcon 0 Oct 4 16:42 learnToScriptOutput - -rw-rw-r--. 1 zexcon zexcon 52 Oct 4 16:07 learnToScriptOutputError - -rwxrw-rw-. 1 zexcon zexcon 477 Oct 4 15:01 learnToScript.sh - drwxr-xr-x. 1 zexcon zexcon 0 Jul 7 16:04 Videos - -``` - -### Standard Error (stderr), 2>, and 2>> - -The error output of a command preceding the > or >> is sent to a file whose name follows. Keep in mind that 2> and 2>> have the same result but the 2>> will append the data to the end of the file. So what is the purpose of these? What if you only want to catch an error. Then the 2> or 2>> is here to help. The 2 indicates the output that would normally go to stderr (standard error). Now put this into practice by listing a non-existent file. - -``` - - [zexcon ~]$ ls -l /etc/invalidTest 2> learnToScriptOutputError - -``` - -This takes the error results and redirects it to the _learnToScriptOutputError_ file. - -``` - - ls: cannot access '/etc/invalidTest': No such file or directory - -``` - -### All Output &>, &>> and |& - -If you are thinking, I don’t want to write both standard output (stdout) and standard error (stderr) to different files. You are in luck. In Bash 5 the preferred way to redirect both stdout and stderr to the same file is to use &> or, as you might guess, &>> to append to a file. - -``` - - [zexcon ~]$ ls -l ~ &>> learnToScriptAllOutput - [zexcon ~]$ ls -l /etc/invalidTest &>> learnToScriptAllOutput - -``` - -After running these commands, the output of both appear in the same file without identifying error or a standard output. - -``` - - total 128 - drwxr-xr-x. 1 zexcon zexcon 268 Oct 1 16:02 Desktop - drwxr-xr-x. 1 zexcon zexcon 80 Sep 16 08:53 Documents - drwxr-xr-x. 1 zexcon zexcon 0 Oct 1 15:59 Downloads - -rw-rw-r--. 1 zexcon zexcon 685 Oct 4 16:00 learnToScriptAllOutput - -rw-rw-r--. 1 zexcon zexcon 23 Oct 4 12:42 learnToScriptInput - -rw-rw-r--. 1 zexcon zexcon 0 Oct 4 16:42 learnToScriptOutput - -rw-rw-r--. 1 zexcon zexcon 52 Oct 4 16:07 learnToScriptOutputError - -rwxrw-rw-. 1 zexcon zexcon 477 Oct 4 15:01 learnToScript.sh - drwxr-xr-x. 1 zexcon zexcon 0 Jul 7 16:04 Videos - ls: cannot access '/etc/invalidTest': No such file or directory - -``` - -If you are working directly from the command line and looking to pipe all results to another command, you can use |& for this purpose. - -``` - - [zexcon ~]$ ls -l |& grep learn - -rw-rw-r--. 1 zexcon zexcon 1197 Oct 18 09:46 learnToScriptAllOutput - -rw-rw-r--. 1 zexcon zexcon 343 Oct 14 10:47 learnToScriptError - -rw-rw-r--. 1 zexcon zexcon 0 Oct 14 11:11 learnToScriptOut - -rw-rw-r--. 1 zexcon zexcon 348 Oct 14 10:27 learnToScriptOutError - -rwxr-x---. 1 zexcon zexcon 328 Oct 18 09:46 learnToScript.sh - [zexcon ~]$ - -``` - -### Standard Input (stdin) - -You have used standard input (stdin) numerous times throughout articles 1 and 2 since your keyboard uses standard input every time you type a key. To give a bit of a change to the usual “it’s your keyboard”, let’s use the _read_ command in a script. The _read_ command, used in the script below, does what it sounds like, reads standard input. - -``` - - #!/bin/bash - - #Here we are asking a question to prompt the user for standard input. i.e.keyboard - echo 'Please enter your name.' - - #Here we are reading the standard input and assigning it to the variable name with the read command. - read name - - #We are now going back to standard output, by using echo and printing your name to the command line. - echo "With standard input you have told me your name is: $name" - -``` - -This example prompts for input via standard output, for information it obtains from standard input(keyboard), storing it in a variable called _name_ using _read_ and displays the value in _name_ via standard output. - -``` - - [zexcon@fedora ~]$ ./learnToScript.sh - Please enter your name. - zexcon - With standard input you have told me your name is: zexcon - [zexcon@fedora ~]$ - -``` - -### Into the script… - -Now put what has been learned in a script to see how it can be used. The following is a new version of the previous learnToScript.sh file. There are a few added lines. It uses the append options for standard output, standard error and both into one file. It will write the standard output into learnToScriptStandardOutput, standard error into learnToScriptStandardError and both output and error into learnToScriptAllOutput - -``` - - #!/bin/bash - - #As we know this article is about scripting. So let's - #use what we learned in a script. - - #Let's get some information from the user and add it to our scripts with stanard input and read - - echo "What is your name? " - read name - - - #Here standard output directed to append a file to learnToScirptStandardOutput - echo "$name, this will take standard output with append >> and redirect to learnToScriptStandardOutput." 1>> learnToScriptStandardOutput - - - #Here we are taking the standard error and appending it to learnToScriptStandardError but to see this we need to #create an error. - eco "Standard error with append >> redirect to learnToScriptStandardError." 2>> learnToScriptStandardError - - #Here we are going to create an error and a standard output and see they go to the same place. - echo "Standard output with append >> redirect to learnToScriptAllOutput." &>> learnToScriptAllOutput - eco "Standard error with append >> redirect to learnToScriptAllOutput." &>> learnToScriptAllOutput - -``` - -This example creates three files in the same directory. The command _echo_ is intentionally typed incorrectly to generate an error. If you check out all three files, you will see one message in learnToScriptStandardOutput, one in learnToScriptStandardError and two in learnToScriptAllOutput. Also notice the script prompts for a name which it writes to the learnToScriptStandardOutput. - -# Conclusion - -At this point it should start to be clear that anything you can do on the command line you can also do in a script. When writing a script that others might use, documentation is extremely important. Continuing the dive into scripting, the standard output will make more sense as you will be the one generating them. Inside a script you can use the same things used from the command line. The next article will get into functions, loops and things that will continue to build on this foundation. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-2/ - -作者:[Matthew Darnell][a] -选题:[lujun9972][b] -译者:[unigeorge](https://github.com/unigeorge) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://fedoramagazine.org/author/zexcon/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2021/10/bash_shell_scripting_pt2-816x345.jpg -[2]: https://unsplash.com/@nbandana?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[3]: https://unsplash.com/s/photos/shell-scripting?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[4]: https://fedoramagazine.org/command-line-quick-tips-searching-with-grep/ diff --git a/translated/tech/20211027 Bash Shell Scripting for beginners (Part 2).md b/translated/tech/20211027 Bash Shell Scripting for beginners (Part 2).md new file mode 100644 index 0000000000..4edee2f2d2 --- /dev/null +++ b/translated/tech/20211027 Bash Shell Scripting for beginners (Part 2).md @@ -0,0 +1,281 @@ +[#]: subject: "Bash Shell Scripting for beginners (Part 2)" +[#]: via: "https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-2/" +[#]: author: "Matthew Darnell https://fedoramagazine.org/author/zexcon/" +[#]: collector: "lujun9972" +[#]: translator: "unigeorge" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Bash Shell 脚本新手指南(二) +====== + +![][1] + +Photo by [N Bandaru][2] on [Unsplash][3] + +欢迎来到面向初学者的 Bash Shell 脚本知识第二部分。本篇将就 Bash 脚本一些更独特的方面进行深入探讨。我们会用到一些上篇中已经熟悉的命令(如果遇到新命令,会给出讲解),进而涵盖一些标准输出、标准输入、标准错误、“管道”和数据重定向的相关知识。 + +### 使用 # 添加注释 + +随着脚本变得愈加复杂和实用,我们需要添加注释,以便记住程序在做什么。如果与其他人分享你的脚本,注释也将帮助他们理解思考过程,以及更好理解你的脚本实现的功能。想一想上篇文章中的数学方程,我们在新版脚本中添加了一些注释。注意,在 _learnToScript.sh_ 文件(如下所示)中,注释是前面带有井号的行。当脚本运行时,这些注释行并不会出现。 + +``` + + #!/bin/bash + + #Let's pick up from our last article. We + #learned how to use mathematical equations + #in bash scripting. + + echo $((5+3)) + echo $((5-3)) + echo $((5*3)) + echo $((5/3)) + +``` + +``` + + [zexcon ~]$ ./learnToScript.sh + 8 + 2 + 15 + 1 + +``` + +### 管道符 | + +我们将使用另一个名为 _grep_ 的工具来介绍管道运算符。 + +> Grep 可以在输入文件中搜索可以匹配指定模式的行。默认情况下,Grep 会输出相应的匹配行。 +> +> + +Paul W. Frields 在 Fedora 杂志上的文章很好地介绍了关于 _grep_ 的知识。 + +> [命令行快小技巧:使用 grep 进行搜索][4] + +管道键在键盘上位于 Enter 键上方,可以在英文状态下按 Shift + \\ 输入。 + +现在你已经略微熟悉了 grep,接下来看一个使用管道命令的示例。在命令行输入 _ls -l | grep_ _learn_ + +``` + + [zexcon ~]$ ls -l | grep learn + -rwxrw-rw-. 1 zexcon zexcon 70 Sep 17 10:10 learnToScript.sh + +``` + +通常 _ls -l_ 命令会在屏幕上显示文件列表。这里 _ls_ _-l_ 命令的完整结果通过管道传送到搜索字符串 _learn_ 的 grep 命令中。你可以将管道命令想象成一个过滤器。先运行一个命令(本例中为 _ls -l_,结果会给出目录中的文件),这些结果通过管道命令给到 _grep_,后者会在其中搜索 _learn_,并且只显示符合条件的目标行。 + +下面再看一个例子以巩固相关知识。_less_ 命令可以让用户查看超出一个屏幕尺寸的命令结果。以下是命令手册页中关于 _less_ 的简要说明。 + +> Less 是一个类似于 more 的程序,但它允许在文件中向后或向前 +> 进行翻页移动。此外,less 不必在开始之前读取整个输入文件,因此 +> 对于大型输入文件而言,它比 vi 等文本编辑器启动更快。该命令较少使用 termcap(或 +> 某些系统上的 terminfo),因此可以在各种终端上运行。甚至还在一定程度上支持 +> 用于硬拷贝终端的端口。(在硬拷贝终端上,显示在屏幕顶部的行 +> 会以插入符号为前缀。) +> +> Fedora 手册 34 页 + +下面让我们看看管道命令和 _less_ 命令结合使用会是什么样子。 + +``` + + [zexcon ~]$ ls -l /etc | less + +``` + +``` + + total 1504 + drwxr-xr-x. 1 root root 126 Jul 7 17:46 abrt + -rw-r--r--. 1 root root 18 Jul 7 16:04 adjtime + -rw-r--r--. 1 root root 1529 Jun 23 2020 aliases + drwxr-xr-x. 1 root root 70 Jul 7 17:47 alsa + drwxr-xr-x. 1 root root 14 Apr 23 05:58 cron.d + drwxr-xr-x. 1 root root 0 Jan 25 2021 cron.daily + : + : + +``` + +为便于阅读,此处对结果进行了修剪。用户可以使用键盘上的箭头键向上或向下滚动,进而控制显示。如果使用命令行,结果超出屏幕的话,用户可能会看不到结果的开头行。要退出 _less_ 屏幕,只需点击 _q_ 键。 + +### 标准输出(stdout)重定向 >, >>, 1>, 1>> + +> 或 >> 符号之前的命令输出结果,会被写入到紧跟的文件名对应的文件中。> 和 1> 具有相同的效果,因为 1 就代表着标准输出。如果不显式指定 1,则默认为标准输出。>> 和 1>> 将数据附加到文件的末尾。使用 > 或 >> 时,如果文件不存在,则会创建对应文件。 + +例如,如果你想查看 ping 命令的输出,以查看它是否丢弃了数据包。与其关注控制台,不如将输出结果重定向到文件中,这样你就可以稍后再回来查看数据包是否被丢弃。下面是使用 _>_ 的重定向测试。 + +``` + + [zexcon ~]$ ls -l ~ > learnToScriptOutput + +``` + +该命令会获取本应输出到终端的结果(~ 代表家目录),并将其重定向到 _learnToScriptOutput_ 文件。注意,我们并未手动创建 _learnToScriptOutput_,系统会自动创建该文件。 + +``` + + total 128 + drwxr-xr-x. 1 zexcon zexcon 268 Oct 1 16:02 Desktop + drwxr-xr-x. 1 zexcon zexcon 80 Sep 16 08:53 Documents + drwxr-xr-x. 1 zexcon zexcon 0 Oct 1 15:59 Downloads + -rw-rw-r--. 1 zexcon zexcon 685 Oct 4 16:00 learnToScriptAllOutput + -rw-rw-r--. 1 zexcon zexcon 23 Oct 4 12:42 learnToScriptInput + -rw-rw-r--. 1 zexcon zexcon 0 Oct 4 16:42 learnToScriptOutput + -rw-rw-r--. 1 zexcon zexcon 52 Oct 4 16:07 learnToScriptOutputError + -rwxrw-rw-. 1 zexcon zexcon 477 Oct 4 15:01 learnToScript.sh + drwxr-xr-x. 1 zexcon zexcon 0 Jul 7 16:04 Videos + +``` + +### 标准错误信息(stderr)重定向 2>, 2>> + +> 或 >> 符号之前命令的错误信息输出,会被写入到紧跟的文件名对应的文件中。2> 和 2>> 具有相同的效果,但 2>> 是将数据追加到文件末尾。你可能会想,这有什么用?不妨假象一下用户只想捕获错误信息的场景,然后你就会意识到 2> 或 2>> 的作用。数字 2 表示本应输出到终端的标准错误信息输出。现在我们试着追踪一个不存在的文件,以试试这个知识点。 + +``` + + [zexcon ~]$ ls -l /etc/invalidTest 2> learnToScriptOutputError + +``` + +这会生成错误信息,并将错误信息重定向输入到 _learnToScriptOutputError_ 文件中. + +``` + + ls: cannot access '/etc/invalidTest': No such file or directory + +``` + +### 所有输出重定向 &>, &>>, |& + +如果你不想将标准输出(stdout)和标准错误信息(stderr)写入不同的文件,那么在 Bash 5 中,你可以使用 &> 将 stdout 和 stderr 重定向到同一个文件,或者使用 &>> 追加到文件末尾。 + +``` + + [zexcon ~]$ ls -l ~ &>> learnToScriptAllOutput + [zexcon ~]$ ls -l /etc/invalidTest &>> learnToScriptAllOutput + +``` + +运行这些命令后,两者的输出都会进入同一个文件中,而不会区分是错误信息还是标准输出。 + +``` + + total 128 + drwxr-xr-x. 1 zexcon zexcon 268 Oct 1 16:02 Desktop + drwxr-xr-x. 1 zexcon zexcon 80 Sep 16 08:53 Documents + drwxr-xr-x. 1 zexcon zexcon 0 Oct 1 15:59 Downloads + -rw-rw-r--. 1 zexcon zexcon 685 Oct 4 16:00 learnToScriptAllOutput + -rw-rw-r--. 1 zexcon zexcon 23 Oct 4 12:42 learnToScriptInput + -rw-rw-r--. 1 zexcon zexcon 0 Oct 4 16:42 learnToScriptOutput + -rw-rw-r--. 1 zexcon zexcon 52 Oct 4 16:07 learnToScriptOutputError + -rwxrw-rw-. 1 zexcon zexcon 477 Oct 4 15:01 learnToScript.sh + drwxr-xr-x. 1 zexcon zexcon 0 Jul 7 16:04 Videos + ls: cannot access '/etc/invalidTest': No such file or directory + +``` + +如果你直接使用命令行操作,并希望将所有结果通过管道传输到另一个命令,可以选择使用 |& 实现。 + +``` + + [zexcon ~]$ ls -l |& grep learn + -rw-rw-r--. 1 zexcon zexcon 1197 Oct 18 09:46 learnToScriptAllOutput + -rw-rw-r--. 1 zexcon zexcon 343 Oct 14 10:47 learnToScriptError + -rw-rw-r--. 1 zexcon zexcon 0 Oct 14 11:11 learnToScriptOut + -rw-rw-r--. 1 zexcon zexcon 348 Oct 14 10:27 learnToScriptOutError + -rwxr-x---. 1 zexcon zexcon 328 Oct 18 09:46 learnToScript.sh + [zexcon ~]$ + +``` + +### 标准输入 (stdin) + +在本篇和上篇文章中,我们已经多次使用过标准输入 (stdin),因为在每次使用键盘输入时,我们都在使用标准输入。为了区别通常意义上的“键盘即标准输入”,这次我们尝试在脚本中使用 _read_ 命令。下面的脚本中就使用了 _read_ 命令,字面上就像“读取标准输入”。 + +``` + + #!/bin/bash + + #Here we are asking a question to prompt the user for standard input. i.e.keyboard + echo 'Please enter your name.' + + #Here we are reading the standard input and assigning it to the variable name with the read command. + read name + + #We are now going back to standard output, by using echo and printing your name to the command line. + echo "With standard input you have told me your name is: $name" + +``` + +这个示例通过标准输出给出提示,提醒用户输入信息,然后从标准输入(键盘)获取信息,使用 _read_ 将其存储在 _name_ 变量中,并通过标准输出显示处 _name_ 中的值。 + +``` + + [zexcon@fedora ~]$ ./learnToScript.sh + Please enter your name. + zexcon + With standard input you have told me your name is: zexcon + [zexcon@fedora ~]$ + +``` + +### 在脚本中使用 + +现在我们把学到的东西放入脚本中,学习一下如何实际应用。下面是增加了几行后的新版本 learnToScript.sh 文件。它用追加的方式将标准输出、标准错误信息,以及两者混合后的信息,分别写入到三个不同文件。它将标准输出写入 learnToScriptStandardOutput,标准错误信息写入 learnToScriptStandardError,二者共同都写入 learnToScriptAllOutput 文件。 + +``` + + #!/bin/bash + + #As we know this article is about scripting. So let's + #use what we learned in a script. + + #Let's get some information from the user and add it to our scripts with stanard input and read + + echo "What is your name? " + read name + + + #Here standard output directed to append a file to learnToScirptStandardOutput + echo "$name, this will take standard output with append >> and redirect to learnToScriptStandardOutput." 1>> learnToScriptStandardOutput + + + #Here we are taking the standard error and appending it to learnToScriptStandardError but to see this we need to #create an error. + eco "Standard error with append >> redirect to learnToScriptStandardError." 2>> learnToScriptStandardError + + #Here we are going to create an error and a standard output and see they go to the same place. + echo "Standard output with append >> redirect to learnToScriptAllOutput." &>> learnToScriptAllOutput + eco "Standard error with append >> redirect to learnToScriptAllOutput." &>> learnToScriptAllOutput + +``` + +脚本在同一目录中创建了三个文件。命令 _echo_ 故意输入错误(LCTT 译注:缺少了字母 h)以产生错误信息。如果查看三个文件,你会在 learnToScriptStandardOutput 中看到一条信息,在 learnToScriptStandardError 中看到一条信息,在 learnToScriptAllOutput 中看到两条信息。另外,该脚本还会再次提示输入的 name 值,再将其写入 learnToScriptStandardOutput 中。 + +# 结语 + +至此你应该能够明确,可以在命令行中执行的操作,都可以在脚本中执行。在编写可能供他人使用的脚本时,文档非常重要。如果继续深入研究脚本,标准输出会显得更有意义,因为你将会控制它们的生成。在脚本中,你可以与命令行中操作时应用相同的内容。下一篇文章我们会讨论函数、循环,以及在此基础上进一步构建的结构。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-2/ + +作者:[Matthew Darnell][a] +选题:[lujun9972][b] +译者:[unigeorge](https://github.com/unigeorge) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/zexcon/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2021/10/bash_shell_scripting_pt2-816x345.jpg +[2]: https://unsplash.com/@nbandana?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/shell-scripting?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://fedoramagazine.org/command-line-quick-tips-searching-with-grep/ From dcce085a7eb94d391441ff820d9173607f87c505 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 20 Jan 2022 05:02:32 +0800 Subject: [PATCH 046/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220119=20?= =?UTF-8?q?Manage=20your=20passwords=20in=20the=20Linux=20terminal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220119 Manage your passwords in the Linux terminal.md --- ...ge your passwords in the Linux terminal.md | 259 ++++++++++++++++++ 1 file changed, 259 insertions(+) create mode 100644 sources/tech/20220119 Manage your passwords in the Linux terminal.md diff --git a/sources/tech/20220119 Manage your passwords in the Linux terminal.md b/sources/tech/20220119 Manage your passwords in the Linux terminal.md new file mode 100644 index 0000000000..87805bf010 --- /dev/null +++ b/sources/tech/20220119 Manage your passwords in the Linux terminal.md @@ -0,0 +1,259 @@ +[#]: subject: "Manage your passwords in the Linux terminal" +[#]: via: "https://opensource.com/article/22/1/manage-passwords-linux-terminal" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Manage your passwords in the Linux terminal +====== +Pass is a classic UNIX-style password management system that uses GnuPG +(GPG) for encryption, and the terminal as its primary interface. +![Linux keys on the keyboard for a desktop computer][1] + +These days, we all have a few dozen passwords. Fortunately, the bulk of those passwords are probably for websites, and you probably access most websites through your internet browser, and most browsers have a built-in password manager. The most common internet browsers also have a synchronization feature to help you distribute your passwords between the browsers you run across all your devices, so you're never without your login information when you need it. If that's not enough for you, there are excellent open source projects like [BitWarden][2] that can host your encrypted passwords, ensuring that only you have the key to unlock them. These solutions help make maintaining unique passwords easy, and I use these convenient systems for a selection of passwords. But my main vault of password storage is a lot simpler than any of these methods. I primarily use [pass][3], a classic UNIX-style password management system that uses GnuPG (GPG) for encryption, and the terminal as its primary interface. + +### Install pass + +You can install the `pass` command from your distribution repository. + +On Fedora, Mageia, and similar distributions, you can install it with your package manager: + + +``` +`$ sudo dnf install pass` +``` + +On Elementary, Mint, and other Debian-based distributions: + + +``` +`$ sudo apt install pass` +``` + +On macOS, you can install it using [Homebrew][4]: + + +``` +`$ brew install pass` +``` + +### Configuring GnuPG + +Before you can use `pass`, you need a valid PGP ("Pretty Good Privacy") key. If you already maintain a PGP key, you can skip this step, or you can choose to create a new key exclusively for use with `pass`. The most common open source PGP implementation is GnuPG (GPG), which ships with Linux, and you can install it on macOS from [gpgtools.org][5], Homebrew, or [Macports][6]. To create a GnuPG key, run this command: + + +``` +`$ gpg --generate-key` +``` + +You're prompted for your name and email address and create a password for the key. Your key is a digital file, and your password is known only to you. Combined, these two things can lock and unlock encrypted information, such as a file containing a password. + +A GPG key is much like a house key or a car key. Should you lose it, anything locked by it becomes unobtainable. Just knowing your password is not enough. + +If you already manage several SSH keys, you're probably used to this. If you're new to digital encryption keys, it can take some getting used to. Backup your `~/.gnupg` directory, so you don't accidentally erase it the next time you decide to try an exciting new distro on a whim. + +Make a backup and keep the backup safe. + +### Configuring pass + +To start using `pass`, you must initialize a _password store_, which is defined as a storage location configured to use a specific encryption key. You can indicate what GPG key you want to use for your password store by either the name associated with the key or the digital fingerprint. Your own name is usually the easier option: + + +``` + + +$ pass init seth +mkdir: created directory '/home/seth/.password-store/' +Password store initialized for seth + +``` + +If you've managed to forget your name, you can see the digital fingerprint and name associated with your key with the `gpg` command: + + +``` + + +$ gpg --list-keys +gpg --list-keys +/home/seth/.gnupg/pubring.kbx +\----------------------------- +pub  ed25519 2022-01-06 [SC] [expires: 2024-01-06] +     2BFF94286461216C907CBA52F067996F13EF10D8 +uid  [ultimate] Seth Kenlon <[seth@example.com][7]> +sub  cv25519 2022-01-06 [E] [expires: 2024-01-06] + +``` + +Initializing a password store with the fingerprint is basically the same as with your name: + + +``` +`$ pass init 2BFF94286461216C907CBA52F067996F13EF10D8` +``` + +### Store a password + +Add a password to your password store with the `pass add` command: + + +``` + + +$ pass add [www.example.com][8] +Enter password for [www.example.com][8]: + +``` + +Enter the password you want to add when prompted. + +The password now gets stored in your password store. You can take a look for yourself: + + +``` + + +$ ls /root/.password-store/ +[www.example.com.gpg][9] + +``` + +Of course, the file is unreadable, and if you attempt to run `cat` or `less` on it, you'll get unprintable characters in your terminal (use `reset` to fix your terminal if its display gets too untidy.) + +### Edit a password with pass + +I use different user names for different activities online, so the username for a site is often just as important as the password. The `pass` system allows for this, even though it doesn't prompt you for it by default. You can add a user name to a password file using the `pass edit` command: + + +``` +`$ pass edit www.example.com` +``` + +This opens a text editor (specifically the editor you have set as your `EDITOR` or `VISUAL` [environment variable][10]) displaying the contents of the `www.example.com` file. Currently, that's just a password, but you can add a user name and even another URL or any information you want. It's an encrypted file, so you're free to keep what you want in it. + + +``` + + +bd%dc$3a49af49498bb6f31bc964718C +user: seth123 +url: example.com + +``` + +Save the file and close it. + +### Get a password from pass + +To see the contents of a password file, use the `pass show` command: + + +``` + + +$ pass show [www.example.com][8] +bd%dc$3a49af49498bb6f31bc964718C +user: seth123 +url: [www.example.org][11] + +``` + +### Search for a password + +Sometimes it's tough to remember whether a password is filed under `www.example.com` or just `example.com` or even something like `app.example.com`. Furthermore, some website infrastructures use different URLs for different site functions, so you might file a password away under `www.example.com` even though you also use the same login information for the partner site `www.example.org`. + +When in doubt, use `grep`. The `pass grep` command shows all instances of a search term, either in a file name or in the contents of a file: + + +``` + + +$ pass grep example +[www.example.com][8]: +url: [www.example.org][11] + +``` + +### Using pass with a browser + +I use `pass` for information beyond just internet passwords, but websites are where I most often need passwords. I usually have a terminal open somewhere on my computer, so it's not much trouble to **Alt+Tab** to a terminal and get the information I need with `pass`. But that's not what I do because there are plugins to integrate `pass` with web browsers. + +#### Pass host script + +First, install the `pass` host script: + + +``` +`$ curl -sSL github.com/passff/passff-host/release/latest/download/install_host_app.sh` +``` + +This install script places a Python script that helps your browser access your password store and GPG keys. Run it along with the name of the browser you use (or nothing, to see all options): + + +``` +`$ bash ./install_host_app.sh firefox` +``` + +If you use multiple browsers, you can install it for each. + +#### Pass Add-on + +Once you've installed the host application, you can install an add-on or extension for your browser. Search for the `PassFF` plugin in your browser's add-on or extension manager. + +![PassFF][12] + +(Seth Kenlon, [CC BY-SA 4.0][13]) + +Install the add-on, and then close and re-launch your browser. + +Navigate to a site you've got a password for in your password store. There's now a small **P** icon in the right of your login text fields. + +![PassFF browser prompt][14] + +(Seth Kenlon, [CC BY-SA 4.0][13]) + +Click on the **P** button to see a list of matching site names in your password store. + +![PassFF browser menu][15] + +(Seth Kenlon, [CC BY-SA 4.0][13]) + +Click the pen-and-paper icon to fill in the form or the paper-airplane icon to fill and auto-submit the form. + +Easy password management and fully integrated! + +### Try pass as your Linux password manager + +The `pass` command is a great option for users who want to manage passwords and personal information using tools they already use on a daily basis. If you rely on GPG and a terminal already, then you may enjoy the `pass` system. It's also an important option for users who don't want their passwords tied to a specific application. Maybe you don't use just one browser, or you don't like the idea that it might be difficult to extract your passwords from an application if you decide to stop using it. With `pass`, you maintain control of your secrets in a UNIX-like and straightforward system. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/manage-passwords-linux-terminal + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_keyboard_desktop.png?itok=I2nGw78_ (Linux keys on the keyboard for a desktop computer) +[2]: http://bitwarden.com +[3]: https://www.passwordstore.org/ +[4]: https://opensource.com/article/20/6/homebrew-mac +[5]: https://gpgtools.org/ +[6]: https://opensource.com/article/20/11/macports +[7]: mailto:seth@example.com +[8]: http://www.example.com +[9]: http://www.example.com.gpg +[10]: https://opensource.com/article/19/8/what-are-environment-variables +[11]: http://www.example.org +[12]: https://opensource.com/sites/default/files/uploads/passff.jpg (PassFF) +[13]: https://creativecommons.org/licenses/by-sa/4.0/ +[14]: https://opensource.com/sites/default/files/uploads/passff-button-web.jpg (PassFF browser prompt) +[15]: https://opensource.com/sites/default/files/uploads/passff-menu-web.jpg (PassFF browser menu) From 2c6843b8e3dc5cf5be76f8bca78c550e9f9f4162 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 20 Jan 2022 05:02:43 +0800 Subject: [PATCH 047/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220119=20?= =?UTF-8?q?Protect=20your=20PHP=20website=20from=20bots=20with=20this=20op?= =?UTF-8?q?en=20source=20tool?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220119 Protect your PHP website from bots with this open source tool.md --- ...te from bots with this open source tool.md | 293 ++++++++++++++++++ 1 file changed, 293 insertions(+) create mode 100644 sources/tech/20220119 Protect your PHP website from bots with this open source tool.md diff --git a/sources/tech/20220119 Protect your PHP website from bots with this open source tool.md b/sources/tech/20220119 Protect your PHP website from bots with this open source tool.md new file mode 100644 index 0000000000..50a0822941 --- /dev/null +++ b/sources/tech/20220119 Protect your PHP website from bots with this open source tool.md @@ -0,0 +1,293 @@ +[#]: subject: "Protect your PHP website from bots with this open source tool" +[#]: via: "https://opensource.com/article/22/1/php-website-bouncer-crowdsec" +[#]: author: "Philippe Humeau https://opensource.com/users/philippe-humeau" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Protect your PHP website from bots with this open source tool +====== +The CrowdSec bouncer is designed to be included in any PHP application +to help block attackers. +![Security monster][1] + +PHP is a widely-used programming language on the web, and it's estimated that nearly 80% of all websites use it. My team at [CrowdSec][2] decided that we needed to provide server admins with a PHP bouncer to help ward away bots and bad actors who may attempt to interact with PHP files. + +CrowdSec bouncers can be set up at various levels of an applicative stack: [web server, firewall, CDN][3], and so on. This article looks at one more layer: setting up remediation directly at the application level. + +Remediation directly in the application can be helpful for various reasons: + + * It provides a business-logic answer to potential security threats. + * It gives freedom about how to respond to security issues. + + + +While CrowdSec already publishes a WordPress bouncer, this PHP library is designed to be included in _any_ PHP application (Drupal, for example). The bouncer helps block attackers, challenging them with CAPTCHA to let humans through while blocking bots. + +### Prerequisites + +This tutorial assumes that you are running Drupal on a Linux server with [Apache as a web server.][4] + +The first step is to [install CrowdSec][5] on your server. You can do this with an [official install script][6]. If you're on Fedora, CentOS, or similar, download the RPM version: + + +``` +`$ curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh` +``` + +On Debian and Debian-based systems, download the DEB version: + + +``` +`$ curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh` +``` + +These scripts are simple, so read through the one you download to verify that it imports a GPG key and configures a new repository. Once you're comfortable with what it does, execute it and then install. + + +``` +`$ sudo dnf install crowdsec || sudo apt install crowdsec` +``` + +CrowdSec detects all the existing services on its own, so there should be no further configuration to get an immediately functional setup. + +### Test the initial setup + +Now that you have CrowdSec installed, launch a web application vulnerability scanner, such as [Nikto][7], and see how it behaves: + + +``` +`$ ./nikto.pl -h http://` +``` + +![nikto scan][8] + +(Philippe Humeau, CC BY-SA 4.0) + +The IP address has been detected and triggers various scenarios, the last one being **crowdsecurity/http-crawl-non_statics**. + +![detected scan][9] + +(Philippe Humeau, CC BY-SA 4.0) + +However, CrowdSec only detects issues, and a bouncer is needed to apply remediation. Here comes the PHP bouncer. + +### Remediate with the PHP bouncer + +Now that you can detect malicious behaviors, you need to block the IP at the website level. At this time, there is no Drupal bouncer available. However, you can use the PHP bouncer directly. + +How does it work? The PHP bouncer (like any other bouncer) makes an API call to the CrowdSec API and checks whether it should ban incoming IPs, send them a CAPTCHA, or allow them to pass. + +The web server is Apache, so you can use the [install script for Apache][10]. + + +``` + + +$ git clone +$ cd cs-php-bouncer/ +$ ./install.sh --apache + +``` + +![apache install script][11] + +(Philippe Humeau, CC BY-SA 4.0) + +The bouncer is configured to protect the whole website. Secure a specific part of the site by adapting the Apache configuration. + +### Try to access the website + +The PHP bouncer is installed and configured. You're banned due to the previous web vulnerability scan actions, but you can try to access the website: + +![site access attempt][12] + +(Philippe Humeau, CC BY-SA 4.0) + +The bouncer successfully blocked your traffic. If you were not banned following a previous web vulnerability scan, you could add a manual decision with: + + +``` +`$ cscli decisions add -i ` +``` + +For the remaining tests, remove the current decisions: + + +``` +`$ cscli decisions delete -i ` +``` + +### Going further + +I blocked the IP trying to mess with the PHP website. It’s nice, but what about IPs trying to scan, crawl, or DDoS it? Those kinds of detections can lead to false positives, so why not return a CAPTCHA challenge to check whether it is an actual user (rather than a bot) instead of blocking the IP? + +#### Detect crawlers and scanners + +I dislike crawlers and bad user agents and there are various scenarios available on the [Hub][13] to spot them. + +Ensure the `base-http-scenarios` collections from the Hub are downloaded with `cscli`: + + +``` + + +$ cscli collections list | grep base-http-scenarios +crowdsecurity/base-http-scenarios  ✔️ enabled  /etc/crowdsec/collections/base-http-scenarios.yaml + +``` + +If it is not the case, install it, and reload CrowdSec: + + +``` + + +$ sudo cscli collections install crowdsecurity/base-http-scenarios +$ sudo systemctl reload crowdsec + +``` + +#### Remedy with a CAPTCHA + +Since detecting DDoS, crawlers, or malevolent user agents can lead to false positives, I prefer to return a CAPTCHA for any IP address triggering those scenarios to avoid blocking real users. + +To achieve this, modify the `profiles.yaml` file. + +Add this YAML block at the beginning of your profile in `/etc/crowdsec/profiles.yaml`: + + +``` + + +\--- +# /etc/crowdsec/profiles.yaml +name: crawler_captcha_remediation +filter: Alert.Remediation == true && Alert.GetScenario() in ["crowdsecurity/http-crawl-non_statics", "crowdsecurity/http-bad-user-agent"] + +decisions: +  - type: captcha +    duration: 4h +on_success: break + +``` + +With this profile, a CAPTCHA is enforced (for four hours) on any IP address that triggers the scenarios `crowdsecurity/http-crawl-non_statics` or `crowdsecurity/http-bad-user-agent`. + +Next, reload CrowdSec: + + +``` +`$ sudo systemctl reload crowdsec` +``` + +#### Try the custom remediations + +Relaunching a web vulnerability scanner would trigger many scenarios, so you would ultimately be banned again. Instead, you can just craft an attack that triggers the `bad-user-agent` scenario (the list of known bad user-agents is [here][14]). Please note that you must activate the rule twice to get banned. + + +``` + + +$ curl --silent -I -H "User-Agent: Cocolyzebot" > /dev/null +$ curl -I -H "User-Agent: Cocolyzebot" +HTTP/1.1 200 OK +Date: Tue, 05 Oct 2021 09:35:43 GMT +Server: Apache/2.4.41 (Ubuntu) +Expires: Sun, 19 Nov 1978 05:00:00 GMT +Cache-Control: no-cache, must-revalidate +X-Content-Type-options: nosniff +Content-Language: en +X-Frame-Options: SAMEORIGIN +X-Generator: Drupal 7 () +Content-Type: text/html; charset=utf-8 + +``` + +You can, of course, see that you get caught for your actions. + + +``` +`$ sudo cscli decisions list` +``` + +![detected scan][15] + +(Philippe Humeau, CC BY-SA 4.0) + +If you try to access the website, instead of being simply blocked, you receive a CAPTCHA: + +![CAPTCHA prompt][16] + +(Philippe Humeau, CC BY-SA 4.0) + +Once you solve it, you can reaccess the website. + +Next, unban myself again: + + +``` +`$ cscli decisions delete -i ` +``` + +Launch the vulnerability scanner: + + +``` +`$ ./nikto.pl -h http://example.com` +``` + +Unlike the last time, you can now see that you've triggered several decisions: + +![scan detected][17] + +(Philippe Humeau, CC BY-SA 4.0) + +When trying to access the website, the ban decision has the priority: + +![site access attempt][18] + +(Philippe Humeau, CC BY-SA 4.0) + +### Wrap up + +This is a quick way to help block attackers from PHP websites and applications. This article contains only one example. Remediations can be easily extended to fit additional needs. To find out more about installing and using the CrowdSec agent, [check this how-to guide][19] to get started. + +To download the PHP bouncer, go to [the CrowdSec Hub][20] or [GitHub][21]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/php-website-bouncer-crowdsec + +作者:[Philippe Humeau][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/philippe-humeau +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/security_password_chaos_engineer_monster.png?itok=J31aRccu (Security monster) +[2]: https://opensource.com/article/20/10/crowdsec +[3]: https://hub.crowdsec.net/browse/#bouncers +[4]: https://opensource.com/article/18/2/how-configure-apache-web-server +[5]: https://doc.crowdsec.net/docs/getting_started/install_crowdsec +[6]: https://packagecloud.io/crowdsec/crowdsec/install +[7]: https://github.com/sullo/nikto +[8]: https://opensource.com/sites/default/files/1nikto_0.png (nikto scan) +[9]: https://opensource.com/sites/default/files/2decisions.png (detected scan) +[10]: https://github.com/crowdsecurity/cs-php-bouncer/blob/main/install.sh +[11]: https://opensource.com/sites/default/files/3bouncer.png (apache install script) +[12]: https://opensource.com/sites/default/files/4blocked.png (site access attempt) +[13]: https://hub.crowdsec.net/ +[14]: https://raw.githubusercontent.com/crowdsecurity/sec-lists/master/web/bad_user_agents.txt +[15]: https://opensource.com/sites/default/files/7decisions-again.png (detected scan) +[16]: https://opensource.com/sites/default/files/8sitedeny.png (CAPTCHA prompt) +[17]: https://opensource.com/sites/default/files/10decisionsagain.png (scan detected) +[18]: https://opensource.com/sites/default/files/11sitedeny.png (site access attempt) +[19]: https://crowdsec.net/tutorial-crowdsec-v1-1/ +[20]: https://hub.crowdsec.net/author/crowdsecurity/bouncers/cs-php-bouncer +[21]: https://github.com/crowdsecurity/cs-php-bouncer From 70eec66e7c093900f71b0d7b28c34443d26e860d Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 20 Jan 2022 08:38:20 +0800 Subject: [PATCH 048/334] translated --- sources/tech/20220107 Try FreeDOS in 2022.md | 91 ------------------- .../tech/20220107 Try FreeDOS in 2022.md | 90 ++++++++++++++++++ 2 files changed, 90 insertions(+), 91 deletions(-) delete mode 100644 sources/tech/20220107 Try FreeDOS in 2022.md create mode 100644 translated/tech/20220107 Try FreeDOS in 2022.md diff --git a/sources/tech/20220107 Try FreeDOS in 2022.md b/sources/tech/20220107 Try FreeDOS in 2022.md deleted file mode 100644 index 1133fa055e..0000000000 --- a/sources/tech/20220107 Try FreeDOS in 2022.md +++ /dev/null @@ -1,91 +0,0 @@ -[#]: subject: "Try FreeDOS in 2022" -[#]: via: "https://opensource.com/article/22/1/try-freedos" -[#]: author: "Jim Hall https://opensource.com/users/jim-hall" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Try FreeDOS in 2022 -====== -15 resources for new users and longtime fans of this free operating -system. -![Puzzle pieces coming together to form a computer screen][1] - -Throughout the 1980s and into the 1990s, DOS was king of the desktop. Not satisfied with a proprietary version of DOS, programmers worldwide worked together to create an open source version of DOS called FreeDOS, which first became available in 1994. [The FreeDOS Project][2] continues to grow in 2021 and beyond. - -We've run several articles about FreeDOS on Opensource.com to help new users get started with FreeDOS and learn new programs. Here are a few of our most popular FreeDOS articles from the last year: - -### New to FreeDOS - -Are you new to FreeDOS? If you'd like to learn the basics of how to boot and run FreeDOS, check out these articles: - - * [Get started with FreeDOS][3]: It looks like retro computing, but FreeDOS is a modern OS you can use to get things done. - * [How FreeDOS boots][4]: Learn how your computer boots up and starts FreeDOS, from power on to the command-line prompt. - * [Configure FreeDOS in plain text][5]: Learn how to configure FreeDOS with the `fdconfig.sys` file. - * [How to navigate FreeDOS with CD and DIR][6]: Armed with just two commands, `DIR` and `CD`, you can navigate your FreeDOS system from the command line. - * [Set and use environment variables in FreeDOS][7]: Environment variables are helpful in almost every command-line environment, including FreeDOS. - - - -### FreeDOS for Linux users - -If you're already familiar with the Linux command line, you might like to try these commands and programs that create a similar environment on FreeDOS: - - * [FreeDOS commands for Linux fans][8]: If you're already familiar with the Linux command line, try these commands to help ease into FreeDOS. - * [Edit text like Emacs in FreeDOS][9]: If you're already familiar with GNU Emacs, you should feel right at home in Freemacs. - * [Copy files between Linux and FreeDOS][10]: Learn how to transfer files between a FreeDOS virtual machine and a Linux desktop system. - * [How to archive files on FreeDOS][11]: There's a version of ****`tar` on FreeDOS, but the standard way to archive on DOS is Zip and Unzip. - * [Use this nostalgic text editor on FreeDOS][12]: Reminiscent of Linux ed(1), Edlin is a joy to use when you want to edit text the old-school way. - - - -### Using FreeDOS - -Once you've booted into FreeDOS, you can use these great tools and apps to get work done or to install other software: - - * [How to use the FreeDOS text editor][13]: FreeDOS provides a user-friendly text editor called FreeDOS Edit. - * [Listen to music on FreeDOS][14]: Mplayer is an open source media player usually found on Linux, Windows, Mac, and DOS. - * [Install and remove software packages on FreeDOS][15]: Learn how to use FDIMPLES, the FreeDOS package manager, to install and remove packages on your FreeDOS system. - * [Why I love programming on FreeDOS with GW-BASIC][16]: BASIC was my entry into computer programming. I haven't written BASIC code in years, but I'll always have a fondness for BASIC and GW-BASIC. - * [Program on FreeDOS with Bywater BASIC][17]: Install Bywater BASIC on your FreeDOS system and start experimenting with BASIC programming. - - - -Throughout its nearly 30-year journey, FreeDOS has tried to be a modern DOS. If you'd like to learn more, you can read about the origins and development of FreeDOS in [A brief history of FreeDOS][18]. Also, check out Don Watkins' interview about FreeDOS in [How a college student founded a free and open source operating system][19]. - -If you'd like to try FreeDOS, download FreeDOS 1.3 RC5, released in December 2021. This version has a ton of new changes and improvements, including an updated kernel and command shell, new programs and games, better international support, and network support. Download FreeDOS 1.3 RC5 from the [FreeDOS website][2]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/try-freedos - -作者:[Jim Hall][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jim-hall -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/puzzle_computer_solve_fix_tool.png?itok=U0pH1uwj (Puzzle pieces coming together to form a computer screen) -[2]: https://www.freedos.org/ -[3]: https://opensource.com/article/21/6/get-started-freedos -[4]: https://opensource.com/article/21/6/freedos-boots -[5]: https://opensource.com/article/21/6/freedos-fdconfigsys -[6]: https://opensource.com/article/21/6/navigate-freedos-cd-dir -[7]: https://opensource.com/article/21/6/freedos-environment-variables -[8]: https://opensource.com/article/21/6/freedos-linux-users -[9]: https://opensource.com/article/21/6/freemacs -[10]: https://opensource.com/article/21/6/copy-files-linux-freedos -[11]: https://opensource.com/article/21/6/archive-files-freedos -[12]: https://opensource.com/article/21/6/edlin-freedos -[13]: https://opensource.com/article/21/6/freedos-text-editor -[14]: https://opensource.com/article/21/6/listen-music-freedos -[15]: https://opensource.com/article/21/6/freedos-package-manager -[16]: https://opensource.com/article/21/6/freedos-gw-basic -[17]: https://opensource.com/article/21/6/freedos-bywater-basic -[18]: https://opensource.com/article/21/6/history-freedos -[19]: https://opensource.com/article/21/6/freedos-founder diff --git a/translated/tech/20220107 Try FreeDOS in 2022.md b/translated/tech/20220107 Try FreeDOS in 2022.md new file mode 100644 index 0000000000..3f0ba84ee5 --- /dev/null +++ b/translated/tech/20220107 Try FreeDOS in 2022.md @@ -0,0 +1,90 @@ +[#]: subject: "Try FreeDOS in 2022" +[#]: via: "https://opensource.com/article/22/1/try-freedos" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +在 2022 年尝试 FreeDOS +====== +为这个免费操作系统的新用户和老用户提供 15 种资源。 +![Puzzle pieces coming together to form a computer screen][1] + +在整个 80 年代和 90 年代,DOS 是桌面之王。世界各地的程序员不满足于 DOS 的专利版本,他们共同创建了一个名为 FreeDOS 的开源版本,该版本于 1994 年首次推出。[FreeDOS 项目][2] 在 2021 年及以后继续发展。 + +我们在 Opensource.com 上发表了几篇关于 FreeDOS 的文章,以帮助新用户开始使用 FreeDOS 和学习新程序。以下是去年我们最受欢迎的几篇 FreeDOS 文章。 + +### 初学 FreeDOS + +你是 FreeDOS 的新手吗?如果你想了解如何启动和运行 FreeDOS 的基本知识,请查看这些文章: + + * [开始使用 FreeDOS][3]:它看起来像复古的计算机,但 FreeDOS 是一个现代的操作系统,你可以用它来完成事情。 + * [FreeDOS 如何启动][4]:了解你的计算机是如何引导和启动 FreeDOS 的,从开机到命令行提示。 + * [用纯文本配置 FreeDOS][5]:学习如何用 `fdconfig.sys` 文件来配置 FreeDOS。 + * [如何用 CD 和 DIR 浏览 FreeDOS][6]:只需掌握两个命令,`DIR` 和 `CD`,你就可以在命令行中浏览你的 FreeDOS 系统。 + * [在 FreeDOS 中设置和使用环境变量][7]:环境变量在几乎所有的命令行环境中都有帮助,包括 FreeDOS。 + + + +### Linux 用户的 FreeDOS + +如果你已经熟悉了 Linux 的命令行,你可能想试试这些在 FreeDOS 上创造类似环境的命令和程序: + + * [给 Linux 爱好者的 FreeDOS命令][8]:如果你已经熟悉了 Linux 的命令行,可以试试这些命令来帮助你轻松进入 FreeDOS。 + * [在 FreeDOS 中像 Emacs 一样编辑文本][9]:如果你已经熟悉了 GNU Emacs,你应该在 Freemacs 中感到很自在。 + * [在 Linux 和 FreeDOS 之间复制文件][10]:学习如何在 FreeDOS 虚拟机和 Linux 桌面系统之间传输文件。 + * [如何在 FreeDOS 上归档文件][11]:在 FreeDOS 版本的 **`tar`**,但在 DOS 上归档的标准方法是 Zip 和 Unzip。 + * [在 FreeDOS 上使用这个怀旧的文本编辑器][12]:让人联想到 Linux ed(1),当你想用老式的方法编辑文本时,Edlin 是一种乐趣。 + + + +### 使用 FreeDOS + +当你启动进入 FreeDOS,你可以使用这些很棒的工具和应用来完成工作或安装其他软件: + + * [如何使用 FreeDOS 的文本编辑器][13]:FreeDOS 提供了一个用户友好的文本编辑器,叫做 FreeDOS Edit。 + * [在 FreeDOS 上听音乐][14]:Mplayer 是一个开源的媒体播放器,通常可以在 Linux、Windows、Mac 和 DOS 上找到。 + * [在 FreeDOS 上安装和删除软件包][15]:了解如何使用 FDIMPLES,即 FreeDOS 包管理器,在你的 FreeDOS 系统上安装和删除软件包。 + * [为什么我喜欢用 GW-BASIC 在 FreeDOS 上编程][16]:BASIC 是我进入计算机编程的起点。我已经很多年没有写过 BASIC 代码了,但我对 BASIC 和 GW-BASIC 永远怀有好感。 + * [用 Bywater BASIC 在 FreeDOS 上编程][17]:在你的 FreeDOS 系统上安装 Bywater BASIC,并开始尝试使用 BASIC 编程。 + + + +在其近 30 年的历程中,FreeDOS 一直试图成为一个现代 DOS。如果你想了解更多,你可以在 [FreeDOS 简史][18]中阅读关于 FreeDOS 的起源和发展。另外,请看 Don Watkins 关于 FreeDOS 的采访:[一个大学生是如何创立一个自由和开源的操作系统][19]。 + +如果你想尝试 FreeDOS,请下载 2021 年 12 月发布的 FreeDOS 1.3 RC5。这个版本有大量的新变化和改进,包括更新的内核和命令 shell,新的程序和游戏,更好的国际支持,以及网络支持。从[FreeDOS 网站][2]下载 FreeDOS 1.3 RC5。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/try-freedos + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/puzzle_computer_solve_fix_tool.png?itok=U0pH1uwj (Puzzle pieces coming together to form a computer screen) +[2]: https://www.freedos.org/ +[3]: https://opensource.com/article/21/6/get-started-freedos +[4]: https://opensource.com/article/21/6/freedos-boots +[5]: https://opensource.com/article/21/6/freedos-fdconfigsys +[6]: https://opensource.com/article/21/6/navigate-freedos-cd-dir +[7]: https://opensource.com/article/21/6/freedos-environment-variables +[8]: https://opensource.com/article/21/6/freedos-linux-users +[9]: https://opensource.com/article/21/6/freemacs +[10]: https://opensource.com/article/21/6/copy-files-linux-freedos +[11]: https://opensource.com/article/21/6/archive-files-freedos +[12]: https://opensource.com/article/21/6/edlin-freedos +[13]: https://opensource.com/article/21/6/freedos-text-editor +[14]: https://opensource.com/article/21/6/listen-music-freedos +[15]: https://opensource.com/article/21/6/freedos-package-manager +[16]: https://opensource.com/article/21/6/freedos-gw-basic +[17]: https://opensource.com/article/21/6/freedos-bywater-basic +[18]: https://opensource.com/article/21/6/history-freedos +[19]: https://opensource.com/article/21/6/freedos-founder From 2a496128b1f85bafe6cf722de92565717ab4460e Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 20 Jan 2022 08:43:10 +0800 Subject: [PATCH 049/334] translating --- .../20220117 Record your terminal session with Asciinema.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220117 Record your terminal session with Asciinema.md b/sources/tech/20220117 Record your terminal session with Asciinema.md index e1e75b954a..84bc477327 100644 --- a/sources/tech/20220117 Record your terminal session with Asciinema.md +++ b/sources/tech/20220117 Record your terminal session with Asciinema.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/1/record-terminal-session-asciinema" [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 6d994a0d5d39fd3392a6dedf9416849310495827 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 20 Jan 2022 09:54:27 +0800 Subject: [PATCH 050/334] R @CN-QUAN --- ...04 Pricing Yourself as a Contractor 101.md | 41 ++++++++++--------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/translated/talk/20210704 Pricing Yourself as a Contractor 101.md b/translated/talk/20210704 Pricing Yourself as a Contractor 101.md index 26ef6000ec..608b2de9b2 100644 --- a/translated/talk/20210704 Pricing Yourself as a Contractor 101.md +++ b/translated/talk/20210704 Pricing Yourself as a Contractor 101.md @@ -2,51 +2,52 @@ [#]: author: (Simon Arneaud https://theartofmachinery.com) [#]: collector: (lujun9972) [#]: translator: (CN-QUAN) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) -作为承包商为自己以101的方式标价 - +将自己作为承包商而定价的基础原则 ====== -我职业生涯的大部分时间都是自由职业者。有时候,我也会和一些想要辞掉全职工作去做一些承包或服务业务的人聊天。到目前为止,我们新手最常犯的错误就是自我定价。 +![](https://img.linux.net.cn/data/attachment/album/202201/20/095355ib1k816i22fieoeh.jpg) -以[这篇有用的博客文章为例,它分析了美国员工收入与自由职业者收入的对比][1]。据估计,在美国,作为一名自由职业者,你需要获得14万美元的收入,才能获得相当于10万美元的员工薪酬。我记得当我第一次创业时,我发现这样的计算非常有用。而,有些人看到结果会想:“哎呀,如果我是自由职业者,我得赚1.4倍的钱。我真的能做到吗?” +我职业生涯的大部分时间都是自由职业者。有时候,我也会和一些想要辞掉全职工作去做一些承包或服务业务的人聊天。到目前为止,我们新手最常犯的错误就是为自己定价。 + +以 [这篇有用的博客文章为例,它分析了美国雇员与自由职业者的收入间的对比][1]。据估计,在美国,作为一名自由职业者,你需要获得 14 万美元的收入,才能获得相当于 10 万美元的雇员薪酬。我记得当我第一次创业时,我发现这样的计算非常有用。而,有些人看到结果会想:“哎呀,如果我是自由职业者,我得赚 1.4 倍的钱。我真的能做到吗?” 不,不,不,这种想法是落后的。 ### 如何给自己定价 -让我们举个例子。假设你是一名全职软件工程师,年收入10万美元,你正考虑转用合同制。 +让我们举个例子。假设你是一名全职软件工程师,年收入 10 万美元,你正考虑转成承保。 -当你是自由职业者时候,你必须像做生意一样思考,因为这就是你的谋生方式。所以,你必须把所有的成本加起来,并计算出如何收回这些成本。电子表格的口碑很差(出于一些好的原因),但它们实际上对这些东西非常有用(以及作为企业主将进行的许多其他计算)。 +当你是自由职业者时候,你必须像做企业一样思考,因为这就是你的谋生方式。所以,你必须把所有的成本加起来,并计算出如何收回这些成本。电子表格的口碑很差(有一些很好的理由),但它们实际上非常有用,尤其是对这些东西(以及作为企业主要进行的许多其他计算)。 -第一个要增加的成本是10万美元。如果这听起来很奇怪,那就是所谓的“机会成本”。如果你继续工作,你本可以赚到10万美元;在规划业务时,不这样做实际上是一种成本。把这笔费用和其他你实际使用的就业福利一起标记下来。如果你的雇主提供工作日午餐,那就加上一年中每个工作日午餐的费用。如果你的雇主为员工提供健身软件的折扣,但你却没有使用该软件,那么不要将该福利作为机会成本。 +第一个要加入统计的成本是那 10 万美元。如果这听起来很奇怪,那就是所谓的“机会成本”。你本可以继续工作以赚到 10 万美元;而没有赚到这 10 万美元,实际上是在规划业务时的一种成本。把这一费用和其他你实际使用的任何其它就业福利一起记下来。如果你的雇主提供工作日午餐,那就加上一年中每个工作日午餐的费用。如果你的雇主为员工提供健身软件的折扣,但你却没有使用该软件,那么不要将该福利作为机会成本。 -其他成本取决于你在做什么和你住在哪里。员工医疗保险在澳大利亚不像在美国那么重要。另一方面,强制性养老金支付(类似于美国的401K计划))是一件大事。我有自己的公司,我的主要非工资成本是保险、会计/备案、法律(合同审查等)、债务催收和各种在线服务成本。如果你在计算一些耐用的东西(比如一张桌子),把成本除以你预计使用该东西的年数。 +其他费用取决于你在做什么和你住在哪里。员工医疗保险在澳大利亚不像在美国那么重要。另一方面,强制性养老金支付(类似于美国的 401(K) 计划)是一个大问题。我有自己的公司,我的主要非工资成本是保险、会计/档案、法律(合同审查等)、债务催收和各种在线服务成本。如果你在计算一些耐用的东西(比如一张桌子),把成本除以你预计使用该东西的年数。 -总之,到目前为止,这基本上就是Caleb的博客文章中的内容,所以为了简单起见,我将假设10万美元的名义工资和14万美元的等效业务成本不变。(当然,一切都要根据自己的情况进行调整。)现在你需要想办法收回这笔成本。澳大利亚一年大约有255个工作日,所以如果你能把它们全部外包出去,你每天要收取550美元(外加销售税)。在现实中,你将无法支付一整年的账单。我采取了一种风险更高的方法,在我目前从事自营职业的过去6年里,我的平均回报率约为60%-70%。[埃森哲的年度财务报告][2]说他们从承包商那里得到了大约90%的“利用率”,我想这意味着他们收取了总工作日的90%的费用。让我们假设你是一个中等收入者并且在75%的工作日里都要付账。这意味着你可以在255天(或191天)的75%内通过每天730美元的账单(加上销售税)收回14万美元的成本。 +总之,到目前为止,这基本上就是 Caleb 的博客文章中的内容,所以为了简单起见,我将假设同样的 10 万美元的名义工资和 14 万美元的等效业务成本。(当然,一切都要根据自己的情况进行调整。)现在你需要想办法收回这笔成本。澳大利亚一年大约有 255 个工作日,所以如果你能把它们全部外包出去,你每天要收取 550 美元(外加销售税)。在现实中,你不可能为一整年的工作计费。我采取了一种风险更高的方法,在我目前从事自营职业的过去 6 年里,我的平均回报率约为 60%-70%。[埃森哲的年度财务报告][2] 说他们的承包商的“利用率”大约为 90%,我想这意味着他们付费了 90% 的总工作日的费用。让我们假设你的工作适度,75% 的工作日都有付账。这意味着你可以在 255 天的 75%(即 191 天) 里收回了 14 万美元的成本,每天开出 730 美元的账单(加上销售税)。 ### 误区 -刚接触合同的人通常会对这样的数字做出反应,并会想,“见鬼?!这可是件大事!“。这只是一个计算示例,但服务价格通常是相当于全职员工工资的两倍或两倍以上。然而,这一天的工资是通过一个简单的计算得出的,那就是你需要收取多少钱才能获得相当于10万美元的工资。这是一回事。不这样想才是关键的错误。 +刚接触合同的人通常会对这样的数字做出反应,并会想,“见鬼?!这么高啊!”。这只是一个计算示例,但服务价格通常相当于你天真猜测的全职雇员工资的两倍或两倍以上。然而,这日薪是通过一个简单的计算得出的,那就是你需要收取多少钱才能获得相当于 10 万美元的工资。这是一回事。不这样想才是关键的错误。 -新承包商往往还不确定。他们要求那么多,听起来是不是很贪婪?如果你的客户有任何线索,他们也在做大致相同的计算。“我可以付给Gentle Blog Reader每天730美元,只要我愿意,我也可以花14万美元买一个我甚至不是每天都真正需要的全职雇员。”从雇主的角度来看,10万美元的薪水实际上也不是10万美元。把价格建立在名义基本工资的基础上是没有意义的。即使你是在销售B2C产品,你的潜在竞争对手也不会降价,至少不会持续降价。 +新的承包商往往还不敢确定,他们要求那么多,听起来是不是很贪婪?如果你的客户有考虑采购你,他们也在做大致相同的计算。“我可以付给 Gentle Blog Reader 每天 730 美元,只要我愿意,我也可以花大约 14 万美元雇佣一个我甚至不是每天都真正需要的全职雇员。”从雇主的角度来看,10 万美元的薪水实际上也不是 10 万美元。把价格建立在名义基本工资的基础上是没有意义的。即使你是在销售 B2C 产品,你的潜在竞争对手也不会降价,至少不会持续降价。 ### 为什么这很重要 -这个具体的例子是为了承包,但这是商业经济学的一条基本规则:除非你正在尝试一些风险极高的高收入行为(我们知道[Pets.com][3]的结果),否则你需要计算出你的成本,并设定足够高的价格来弥补这些成本。 +这个具体的例子是针对承包的,但这是商业经济学的一条基本规则:除非你正在尝试一些风险极高的高收入行为(我们知道 [Pets.com][3] 的结果),否则你需要计算出你的成本,并设定足够高的价格来弥补这些成本。 -一些人仍然对他们需要设定的价格感到不安,他们认为降低价格是合理的。也许他们会这样想:“我是个很好的人,如果我每天只收400美元,我的客户会更高兴。”问题是你得不到同样的客户。聪明的客户愿意为员工支付10万美元的基本工资,他们不会为承包商每天支付400美元来做同样的工作。相反,在实践中,你可能会得到一些好客户,他们只是没有每天730美元的预算,但同时你也会得到一大堆非常糟糕的客户。想想看。如果一个陌生人以50美元的价格卖给你一枚看起来很花哨的钻戒,你会付钱吗?还是愿意以正常价格再买一枚戒指? +一些人仍然对他们需要设定的价格感到不安,他们认为降低价格是合理的。也许他们会这样想:“我是个很好的人,如果我每天只收 400 美元,我的客户会更高兴。”问题是你得不到同样的客户。那些愿意为雇员支付 10 万美元年薪的客户,不会为承包商支付 400 美元一天来做同样的工作。相反,在实践中,你可能会得到一些好客户,他们只是没有每天 730 美元的预算,但同时你也会得到一大堆非常糟糕的客户。想想看。如果一个陌生人以 50 美元的价格卖给你一枚看起来很精美的钻戒,你会付钱吗?还是宁愿以正常价格买另一枚戒指? -我要强调的是,我只是从凯莱布的帖子中获取数据,而且一切都是相对的。用你自己的数字代替。在世界上大多数地区,每天400美元可能是一个令人难以置信的价格。然而,如果你是硅谷的一名高级金融科技开发人员,每天收费400美元只会让你成为吸引糟糕客户的磁铁。大多数优秀的人都会知道有些事情不对劲,他们会被吓跑。 +我要强调的是,我只是从 Caleb 的博客文章中提取了数据,而且一切都是相对的。用你自己的数字代替吧。在世界上大多数地区,每天 400 美元可能是一个令人难以置信的价格。然而,如果你是硅谷的一名高级金融科技开发人员,每天收费 400 美元只会让你成为吸引糟糕客户的磁铁。大多数优秀的人都会知道有些事情不对劲,他们会被吓跑。 -我说的坏客户是什么意思?浏览一下[来自地狱的客户博客][4]。它包括很多基本的烦恼,比如客户永远不会得到满足,或者提出无理要求,或者浪费你的时间,一直到彻头彻尾的辱骂,或者让你按规格工作,然后辩称自己不应该付钱,因为“我不想要”。有些客户根本就不付钱。 +我说的糟糕客户是什么意思?浏览一下 [“来自地狱的客户”博客][4] 吧。它包括很多基本的烦恼,比如客户永远不会得到满足,或者提出无理要求,或者浪费你的时间,一直到彻头彻尾的辱骂,或者让你按规格工作,然后辩称自己不应该付钱,因为“我不想要”。有些客户根本就不付钱。 如果你不够重视你自己的产品,也不要因为你的客户不够重视你的产品而感到震惊。 -不过,情况变得更糟了。好客户倾向于与其他好客户合作。如果你说你会随时待命,你会和那些浪费你时间的人一起工作吗?如果你尊重他人,你会和那些不讲道理、辱骂他人的人一起工作吗?一般来说,你的好客户会把你介绍给其他好客户。糟糕的客户则恰恰相反,如果他们甚至感激地把你推荐给任何人的话。因此,如果你的价格合适,你的生意会随着你的声誉而增长。如果你收费过低,你会发现自己陷入了一个恶性循环,你不仅会赔钱,而且会发现越来越难获得适当的报酬。 +不过,情况会变得更糟。好客户倾向于与其他好客户合作。如果你总是按时做到,你会和那些浪费你时间的人一起工作吗?如果你尊重他人,你会和那些不讲道理、辱骂他人的人一起工作吗?一般来说,你的好客户会把你介绍给其他好客户。糟糕的客户则恰恰相反,如果他们甚至会感激地把你推荐给任何人的话。因此,如果你的价格合适,你的生意会随着你的声誉而增长。如果你收费过低,你会发现自己陷入了一个恶性循环,你不仅会赔钱,而且会发现越来越难获得适当的报酬。 这些都只是平均水平,如果你幸运的话,低收费也能吸引到好客户,如果你不幸的话,价格合理也仍然会得到坏客户。然而,如果你的收入已经很低了,那么每一个坏客户都会对你造成伤害。希望超越平均水平不是一个好计划。 @@ -54,9 +55,9 @@ 假设你是一名经验丰富的全职工程师,你决定尝试独立工作。你可能会发现,你的计算比率似乎比你在自由职业网站上看到的要高。这是因为在自由职业网站上建立声誉很难。自由职业者网站对于那些主要想要低价的临时买家来说是最有用的。 -我想,很多聪明的工程师都认为,职业社交是很难的,而且需要非常外向的性格,所以他们不得不依靠自由职业网站来工作。坏消息是,你需要建立良好的声誉才能拿到高薪。好消息是,只要他们拥有所需的技能,大多数人都可以做到。社交并不是去参加所谓的“社交活动”(实际上,这些活动对社交来说都很糟糕)。社交技巧会让你写一篇全新的博客文章,但关键是在他们的日常生活中找到好客户,并做一些让他们不断回头的事情,甚至可能让你找到其他好客户。 +我想,很多聪明的工程师都认为,职业社交是很难的,而且需要非常外向的性格,所以他们不得不依靠自由职业网站来工作。坏消息是,你需要建立良好的声誉才能拿到高薪。好消息是,只要他们拥有所需的技能,大多数人都可以做到。社交并不是去参加所谓的“社交活动”(实际上,这些活动对社交来说都很糟糕)。建立关系网的技巧可以写一篇全新的博客文章,但关键是在他们的日常生活中找到好客户,并做一些让他们不断回头的事情,甚至可能让你找到其他好客户。 -在任何情况下,不要让自由职业网站或其他任何东西把你的价格定在你可以从全职工资中拿到的等价物以下。事实上,[你甚至可能比你现在的工资还高][5],这就是为什么这是“定价101”。然而,收费过低会扼杀你的自主创业生涯。 +在任何情况下,不要让自由职业网站或其他任何东西把你的价格定在你可以从全职工资中拿到的等价物以下。事实上,[你甚至可能比你现在的工资还高][5],这就是为什么这是 “定价基础原则”。收费过低会扼杀你的自主创业生涯。 -------------------------------------------------------------------------------- @@ -65,7 +66,7 @@ via: https://theartofmachinery.com/2021/07/04/pricing_as_contractor_101.html 作者:[Simon Arneaud][a] 选题:[lujun9972][b] 译者:[CN-QUAN](https://github.com/CN-QUAN) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 96f265eb9a706318a8e4f047e459969521a45787 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 20 Jan 2022 09:55:03 +0800 Subject: [PATCH 051/334] P @CN-QUAN https://linux.cn/article-14196-1.html --- .../20210704 Pricing Yourself as a Contractor 101.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/talk => published}/20210704 Pricing Yourself as a Contractor 101.md (99%) diff --git a/translated/talk/20210704 Pricing Yourself as a Contractor 101.md b/published/20210704 Pricing Yourself as a Contractor 101.md similarity index 99% rename from translated/talk/20210704 Pricing Yourself as a Contractor 101.md rename to published/20210704 Pricing Yourself as a Contractor 101.md index 608b2de9b2..cc78168e66 100644 --- a/translated/talk/20210704 Pricing Yourself as a Contractor 101.md +++ b/published/20210704 Pricing Yourself as a Contractor 101.md @@ -3,8 +3,8 @@ [#]: collector: (lujun9972) [#]: translator: (CN-QUAN) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14196-1.html) 将自己作为承包商而定价的基础原则 ====== From 19a537b28c8e1a255b5473e5a2aa2d40464264e4 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 20 Jan 2022 10:03:42 +0800 Subject: [PATCH 052/334] A --- ...inux Mint-s Brand New Edge ISO is Available to Download.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/news/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md b/sources/news/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md index 26358906cb..adbdd70829 100644 --- a/sources/news/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md +++ b/sources/news/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md @@ -2,8 +2,8 @@ [#]: via: "https://news.itsfoss.com/linux-mint-20-3-edge-iso/" [#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" [#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " +[#]: translator: "wxy" +[#]: reviewer: "wxy" [#]: publisher: " " [#]: url: " " From 99a07425520678289ae4ae3a0f994108a18c0d5e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 20 Jan 2022 10:55:45 +0800 Subject: [PATCH 053/334] TRP @wxy https://linux.cn/article-14197-1.html --- ...d New Edge ISO is Available to Download.md | 72 +++++++++++++++++++ ...d New Edge ISO is Available to Download.md | 68 ------------------ 2 files changed, 72 insertions(+), 68 deletions(-) create mode 100644 published/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md delete mode 100644 sources/news/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md diff --git a/published/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md b/published/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md new file mode 100644 index 0000000000..fd2f41273f --- /dev/null +++ b/published/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md @@ -0,0 +1,72 @@ +[#]: subject: "Linux Mint’s Brand New Edge ISO is Available to Download!" +[#]: via: "https://news.itsfoss.com/linux-mint-20-3-edge-iso/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14197-1.html" + +Linux Mint 全新的 Edge ISO 已经可以下载了! +====== + +> Linux Mint 20.3 现在为 Cinnamon 版提供了一个单独的 Edge ISO,以帮助用户使用最新一代的硬件! + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/mint-edge-iso.png?w=1200&ssl=1) + +[Linux Mint 20.3][1] 带来了一些改进。然而,它是由 Linux 内核 5.4 LTS 驱动的。 + +因此,使用较新硬件的用户可能会发现启动时很麻烦,或者遇到其他与旧的 Linux 内核不兼容的问题。 + +幸运的是,Linux Mint 20.3 现在有一个提供了 Linux 内核 5.13.0-25 的 Edge ISO。 + +### 带有 Linux 内核 5.13 的 Linux Mint 20.3 + +[Linux 内核 5.13][2] 通过 HDMI 引入了对 AMD GPU FreeSync 的支持,以及许多其他硬件改进。 + +因此,举例来说,如果你有一个 AMD GPU,并且在 Linux Mint 20.3 上遇到了问题,Edge ISO 可以派上用场。 + +是的,如果你有较新的硬件在使用 Linux Mint 20.3 时有问题,你可以试试 Edge ISO。 + +然而,Linux 内核 5.13 并不完全支持所有现代硬件,如英特尔 Alder Lake 处理器。 + +考虑到英特尔的第 12 代产品系列已经可以供消费者使用,一个更新的 Linux 内核可能是一个更好的选择,但有总比没有好。 + +因此,有必要指出,使用 Edge ISO 不会神奇地解决最新一代硬件的问题。你必须了解了 [Linux 内核 5.13][2] 的详细变化/支持,然后再进行尝试。 + +### 下载 Linux Mint 20.3 Edge ISO + +你可以选择下载单独的 Edge ISO 或从更新管理器中更新 Linux 内核。 + +![][3] + +前往 “更新管理器”,然后从“查看”菜单中导航到 Linux 内核选项。你可以注意到,你可以安装其他可用的 Linux 内核(根据你的要求),如果需要,可以删除旧的内核。 + +建议不要删除旧的内核,除非你确定较新的版本能按预期工作。 + +![][4] + +在进行内核升级之前,你应该备份你的重要文件,以防万一。 + +Edge ISO 只限于 Cinnamon 版。所以,你需要前往 Linux Mint 20.3 Cinnamon 页面下载该 ISO。 + +- [Linux Mint 20.3 Cinnamon(Edge)版][5] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-mint-20-3-edge-iso/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/linux-mint-20-3-una-release/ +[2]: https://news.itsfoss.com/linux-kernel-5-13-release/ +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/linux-mint-edge-kernel.png?w=829&ssl=1 +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/update-manager-edge-kernel.png?w=825&ssl=1 +[5]: https://www.linuxmint.com/edition.php?id=296 diff --git a/sources/news/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md b/sources/news/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md deleted file mode 100644 index adbdd70829..0000000000 --- a/sources/news/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md +++ /dev/null @@ -1,68 +0,0 @@ -[#]: subject: "Linux Mint’s Brand New Edge ISO is Available to Download!" -[#]: via: "https://news.itsfoss.com/linux-mint-20-3-edge-iso/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " - -Linux Mint’s Brand New Edge ISO is Available to Download! -====== - -[Linux Mint 20.3 release][1] brings in several improvements. However, it is powered by Linux Kernel 5.4 LTS. - -So, users with newer hardware may find it troublesome to boot or run into other incompatibility issues with an older Linux Kernel. - -Fortunately, Linux Mint 20.3 now has an Edge ISO featuring Linux Kernel 5.13.0-25. - -### Linux Kernel 5.13 With Linux Mint 20.3 - -[Linux Kernel 5.13][2] introduced support for AMD GPU FreeSync via HDMI along with many other hardware improvements. - -So, for instance, if you have an AMD GPU and have issues with Linux Mint 20.3, the Edge ISO can come in handy. - -Yes, if you have newer hardware having trouble with Linux Mint 20.3, you can try the Edge ISO. - -However, Linux Kernel 5.13 did not fully support all the modern hardware like Intel Alder Lake processors. - -Considering that Intel’s 12th Gen lineup is already available for consumers, a more recent Linux Kernel could have been a better choice, but it’s better than nothing. - -So, it is essential to note that using the Edge ISO would not magically resolve issues with the latest-gen hardware. You will have to go through the detailed changes/support with [Linux Kernel 5.13][2] and then proceed to try it out. - -### Download Linux Mint 20.3 Edge ISO - -You can choose to download the separate Edge ISO or update the Linux Kernel from the update manager. - -![][3] - -Head to the “**Update Manager**” and then navigate to the Linux Kernels option from the View menu. As you can notice, you can install other available Linux Kernels (as per your requirements) and remove the older ones, if needed. - -It is recommended not to remove an older kernel unless you’re sure that the newer version works as expected. - -![][4] - -Before proceeding with a kernel upgrade, you might want to back up your important files, just in case. - -The Edge ISO is limited to the Cinnamon edition. So, you will need to head to Linux Mint 20.3 Cinnamon page to download the ISO. - -[Linux Mint 20.3 Cinnamon (Edge) Edition][5] - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/linux-mint-20-3-edge-iso/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://news.itsfoss.com/linux-mint-20-3-una-release/ -[2]: https://news.itsfoss.com/linux-kernel-5-13-release/ -[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUyMyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjIzMyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[5]: https://www.linuxmint.com/edition.php?id=296 From dbc0dfd447b728562a0bb16d72f7e760592e57af Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 20 Jan 2022 11:41:52 +0800 Subject: [PATCH 054/334] R @unigeorge --- ... Shell Scripting for beginners (Part 2).md | 268 ++++++++---------- 1 file changed, 116 insertions(+), 152 deletions(-) diff --git a/translated/tech/20211027 Bash Shell Scripting for beginners (Part 2).md b/translated/tech/20211027 Bash Shell Scripting for beginners (Part 2).md index 4edee2f2d2..39b6f46859 100644 --- a/translated/tech/20211027 Bash Shell Scripting for beginners (Part 2).md +++ b/translated/tech/20211027 Bash Shell Scripting for beginners (Part 2).md @@ -3,7 +3,7 @@ [#]: author: "Matthew Darnell https://fedoramagazine.org/author/zexcon/" [#]: collector: "lujun9972" [#]: translator: "unigeorge" -[#]: reviewer: " " +[#]: reviewer: "wxy" [#]: publisher: " " [#]: url: " " @@ -12,253 +12,216 @@ Bash Shell 脚本新手指南(二) ![][1] -Photo by [N Bandaru][2] on [Unsplash][3] - -欢迎来到面向初学者的 Bash Shell 脚本知识第二部分。本篇将就 Bash 脚本一些更独特的方面进行深入探讨。我们会用到一些上篇中已经熟悉的命令(如果遇到新命令,会给出讲解),进而涵盖一些标准输出、标准输入、标准错误、“管道”和数据重定向的相关知识。 +欢迎来到面向初学者的 Bash Shell 脚本知识第二部分。本篇将就 Bash 脚本一些更独特的方面进行深入探讨。我们会用到一些 [上篇][5] 中已经熟悉的命令(如果遇到新命令,会给出讲解),进而涵盖一些标准输出、标准输入、标准错误、“管道”和数据重定向的相关知识。 ### 使用 # 添加注释 -随着脚本变得愈加复杂和实用,我们需要添加注释,以便记住程序在做什么。如果与其他人分享你的脚本,注释也将帮助他们理解思考过程,以及更好理解你的脚本实现的功能。想一想上篇文章中的数学方程,我们在新版脚本中添加了一些注释。注意,在 _learnToScript.sh_ 文件(如下所示)中,注释是前面带有井号的行。当脚本运行时,这些注释行并不会出现。 +随着脚本变得愈加复杂和实用,我们需要添加注释,以便记住程序在做什么。如果与其他人分享你的脚本,注释也将帮助他们理解思考过程,以及更好理解你的脚本实现的功能。想一想上篇文章中的数学方程,我们在新版脚本中添加了一些注释。注意,在 `learnToScript.sh` 文件(如下所示)中,注释是前面带有 `#` 号的行。当脚本运行时,这些注释行并不会出现。 ``` +#!/bin/bash - #!/bin/bash - - #Let's pick up from our last article. We - #learned how to use mathematical equations - #in bash scripting. - - echo $((5+3)) - echo $((5-3)) - echo $((5*3)) - echo $((5/3)) +#Let's pick up from our last article. We +#learned how to use mathematical equations +#in bash scripting. +echo $((5+3)) +echo $((5-3)) +echo $((5*3)) +echo $((5/3)) ``` ``` - - [zexcon ~]$ ./learnToScript.sh - 8 - 2 - 15 - 1 - +[zexcon ~]$ ./learnToScript.sh +8 +2 +15 +1 ``` ### 管道符 | -我们将使用另一个名为 _grep_ 的工具来介绍管道运算符。 +我们将使用另一个名为 `grep` 的工具来介绍管道运算符。 -> Grep 可以在输入文件中搜索可以匹配指定模式的行。默认情况下,Grep 会输出相应的匹配行。 +> `grep` 可以在输入文件中搜索可以匹配指定模式的行。默认情况下,`grep` 会输出相应的匹配行。 > > -Paul W. Frields 在 Fedora 杂志上的文章很好地介绍了关于 _grep_ 的知识。 +Paul W. Frields 在 《Fedora 杂志》上的文章很好地介绍了关于 _grep_ 的知识。 -> [命令行快小技巧:使用 grep 进行搜索][4] +> [命令行快速小技巧:使用 grep 进行搜索][4] -管道键在键盘上位于 Enter 键上方,可以在英文状态下按 Shift + \\ 输入。 +管道键在键盘上位于回车键上方,可以在英文状态下按 `Shift + \` 输入。 -现在你已经略微熟悉了 grep,接下来看一个使用管道命令的示例。在命令行输入 _ls -l | grep_ _learn_ +现在你已经略微熟悉了 `grep`,接下来看一个使用管道命令的示例。在命令行输入 `ls -l | grep learn`。 ``` - - [zexcon ~]$ ls -l | grep learn - -rwxrw-rw-. 1 zexcon zexcon 70 Sep 17 10:10 learnToScript.sh - +[zexcon ~]$ ls -l | grep learn +-rwxrw-rw-. 1 zexcon zexcon 70 Sep 17 10:10 learnToScript.sh ``` -通常 _ls -l_ 命令会在屏幕上显示文件列表。这里 _ls_ _-l_ 命令的完整结果通过管道传送到搜索字符串 _learn_ 的 grep 命令中。你可以将管道命令想象成一个过滤器。先运行一个命令(本例中为 _ls -l_,结果会给出目录中的文件),这些结果通过管道命令给到 _grep_,后者会在其中搜索 _learn_,并且只显示符合条件的目标行。 +通常 `ls -l` 命令会在屏幕上显示文件列表。这里 `ls -l` 命令的完整结果通过管道传送到搜索字符串 `learn` 的 `grep` 命令中。你可以将管道命令想象成一个过滤器。先运行一个命令(本例中为 `ls -l`,结果会给出目录中的文件),这些结果通过管道命令给到 `grep`,后者会在其中搜索 `learn`,并且只显示符合条件的目标行。 -下面再看一个例子以巩固相关知识。_less_ 命令可以让用户查看超出一个屏幕尺寸的命令结果。以下是命令手册页中关于 _less_ 的简要说明。 +下面再看一个例子以巩固相关知识。`less` 命令可以让用户查看超出一个屏幕尺寸的命令结果。以下是命令手册页中关于 `less` 的简要说明。 -> Less 是一个类似于 more 的程序,但它允许在文件中向后或向前 -> 进行翻页移动。此外,less 不必在开始之前读取整个输入文件,因此 -> 对于大型输入文件而言,它比 vi 等文本编辑器启动更快。该命令较少使用 termcap(或 -> 某些系统上的 terminfo),因此可以在各种终端上运行。甚至还在一定程度上支持 -> 用于硬拷贝终端的端口。(在硬拷贝终端上,显示在屏幕顶部的行 -> 会以插入符号为前缀。) +> `less` 是一个类似于 `more` 的程序,但它允许在文件中向后或向前进行翻页移动。此外,`less` 不必在开始之前读取整个输入文件,因此对于大型输入文件而言,它比 `vi` 等文本编辑器启动更快。该命令较少使用 termcap(或某些系统上的 terminfo),因此可以在各种终端上运行。甚至还在一定程度上支持用于硬拷贝终端的端口。(在硬拷贝终端上,显示在屏幕顶部的行会以插入符号为前缀。) > -> Fedora 手册 34 页 +> Fedora 34 手册页 -下面让我们看看管道命令和 _less_ 命令结合使用会是什么样子。 +下面让我们看看管道命令和 `less` 命令结合使用会是什么样子。 ``` - - [zexcon ~]$ ls -l /etc | less - +[zexcon ~]$ ls -l /etc | less ``` ``` - - total 1504 - drwxr-xr-x. 1 root root 126 Jul 7 17:46 abrt - -rw-r--r--. 1 root root 18 Jul 7 16:04 adjtime - -rw-r--r--. 1 root root 1529 Jun 23 2020 aliases - drwxr-xr-x. 1 root root 70 Jul 7 17:47 alsa - drwxr-xr-x. 1 root root 14 Apr 23 05:58 cron.d - drwxr-xr-x. 1 root root 0 Jan 25 2021 cron.daily - : - : - +total 1504 +drwxr-xr-x. 1 root root 126 Jul 7 17:46 abrt +-rw-r--r--. 1 root root 18 Jul 7 16:04 adjtime +-rw-r--r--. 1 root root 1529 Jun 23 2020 aliases +drwxr-xr-x. 1 root root 70 Jul 7 17:47 alsa +drwxr-xr-x. 1 root root 14 Apr 23 05:58 cron.d +drwxr-xr-x. 1 root root 0 Jan 25 2021 cron.daily +: +: ``` -为便于阅读,此处对结果进行了修剪。用户可以使用键盘上的箭头键向上或向下滚动,进而控制显示。如果使用命令行,结果超出屏幕的话,用户可能会看不到结果的开头行。要退出 _less_ 屏幕,只需点击 _q_ 键。 +为便于阅读,此处对结果进行了修剪。用户可以使用键盘上的箭头键向上或向下滚动,进而控制显示。如果使用命令行,结果超出屏幕的话,用户可能会看不到结果的开头行。要退出 `less` 屏幕,只需点击 `q` 键。 -### 标准输出(stdout)重定向 >, >>, 1>, 1>> +### 标准输出(stdout)重定向 >、>>、1>、1>> -> 或 >> 符号之前的命令输出结果,会被写入到紧跟的文件名对应的文件中。> 和 1> 具有相同的效果,因为 1 就代表着标准输出。如果不显式指定 1,则默认为标准输出。>> 和 1>> 将数据附加到文件的末尾。使用 > 或 >> 时,如果文件不存在,则会创建对应文件。 +`>` 或 `>>` 符号之前的命令输出结果,会被写入到紧跟的文件名对应的文件中。`>` 和 `1>` 具有相同的效果,因为 `1` 就代表着标准输出。如果不显式指定 `1`,则默认为标准输出。`>>` 和 `1>>` 将数据附加到文件的末尾。使用 `>` 或 `>>` 时,如果文件不存在,则会创建对应文件。 -例如,如果你想查看 ping 命令的输出,以查看它是否丢弃了数据包。与其关注控制台,不如将输出结果重定向到文件中,这样你就可以稍后再回来查看数据包是否被丢弃。下面是使用 _>_ 的重定向测试。 +例如,如果你想查看 `ping` 命令的输出,以查看它是否丢弃了数据包。与其关注控制台,不如将输出结果重定向到文件中,这样你就可以稍后再回来查看数据包是否被丢弃。下面是使用 `>` 的重定向测试。 ``` - - [zexcon ~]$ ls -l ~ > learnToScriptOutput - +[zexcon ~]$ ls -l ~ > learnToScriptOutput ``` -该命令会获取本应输出到终端的结果(~ 代表家目录),并将其重定向到 _learnToScriptOutput_ 文件。注意,我们并未手动创建 _learnToScriptOutput_,系统会自动创建该文件。 +该命令会获取本应输出到终端的结果(`~` 代表家目录),并将其重定向到 `learnToScriptOutput` 文件。注意,我们并未手动创建 `learnToScriptOutput`,系统会自动创建该文件。 ``` - - total 128 - drwxr-xr-x. 1 zexcon zexcon 268 Oct 1 16:02 Desktop - drwxr-xr-x. 1 zexcon zexcon 80 Sep 16 08:53 Documents - drwxr-xr-x. 1 zexcon zexcon 0 Oct 1 15:59 Downloads - -rw-rw-r--. 1 zexcon zexcon 685 Oct 4 16:00 learnToScriptAllOutput - -rw-rw-r--. 1 zexcon zexcon 23 Oct 4 12:42 learnToScriptInput - -rw-rw-r--. 1 zexcon zexcon 0 Oct 4 16:42 learnToScriptOutput - -rw-rw-r--. 1 zexcon zexcon 52 Oct 4 16:07 learnToScriptOutputError - -rwxrw-rw-. 1 zexcon zexcon 477 Oct 4 15:01 learnToScript.sh - drwxr-xr-x. 1 zexcon zexcon 0 Jul 7 16:04 Videos - +total 128 +drwxr-xr-x. 1 zexcon zexcon 268 Oct 1 16:02 Desktop +drwxr-xr-x. 1 zexcon zexcon 80 Sep 16 08:53 Documents +drwxr-xr-x. 1 zexcon zexcon 0 Oct 1 15:59 Downloads +-rw-rw-r--. 1 zexcon zexcon 685 Oct 4 16:00 learnToScriptAllOutput +-rw-rw-r--. 1 zexcon zexcon 23 Oct 4 12:42 learnToScriptInput +-rw-rw-r--. 1 zexcon zexcon 0 Oct 4 16:42 learnToScriptOutput +-rw-rw-r--. 1 zexcon zexcon 52 Oct 4 16:07 learnToScriptOutputError +-rwxrw-rw-. 1 zexcon zexcon 477 Oct 4 15:01 learnToScript.sh +drwxr-xr-x. 1 zexcon zexcon 0 Jul 7 16:04 Videos ``` -### 标准错误信息(stderr)重定向 2>, 2>> +### 标准错误(stderr)重定向 `2>`、`2>>` -> 或 >> 符号之前命令的错误信息输出,会被写入到紧跟的文件名对应的文件中。2> 和 2>> 具有相同的效果,但 2>> 是将数据追加到文件末尾。你可能会想,这有什么用?不妨假象一下用户只想捕获错误信息的场景,然后你就会意识到 2> 或 2>> 的作用。数字 2 表示本应输出到终端的标准错误信息输出。现在我们试着追踪一个不存在的文件,以试试这个知识点。 +`>` 或 `>>` 符号之前命令的错误信息输出,会被写入到紧跟的文件名对应的文件中。`2>` 和 `2>>` 具有相同的效果,但 `2>>` 是将数据追加到文件末尾。你可能会想,这有什么用?不妨假象一下用户只想捕获错误信息的场景,然后你就会意识到 `2>` 或 `2>>` 的作用。数字 `2` 表示本应输出到终端的标准错误信息输出。现在我们试着追踪一个不存在的文件,以试试这个知识点。 ``` - - [zexcon ~]$ ls -l /etc/invalidTest 2> learnToScriptOutputError - +[zexcon ~]$ ls -l /etc/invalidTest 2> learnToScriptOutputError ``` -这会生成错误信息,并将错误信息重定向输入到 _learnToScriptOutputError_ 文件中. +这会生成错误信息,并将错误信息重定向输入到 `learnToScriptOutputError` 文件中。 ``` - - ls: cannot access '/etc/invalidTest': No such file or directory - +ls: cannot access '/etc/invalidTest': No such file or directory ``` -### 所有输出重定向 &>, &>>, |& +### 所有输出重定向 &>、&>>、|& -如果你不想将标准输出(stdout)和标准错误信息(stderr)写入不同的文件,那么在 Bash 5 中,你可以使用 &> 将 stdout 和 stderr 重定向到同一个文件,或者使用 &>> 追加到文件末尾。 +如果你不想将标准输出(`stdout`)和标准错误信息(`stderr`)写入不同的文件,那么在 Bash 5 中,你可以使用 `&>` 将标准输出和标准错误重定向到同一个文件,或者使用 `&>>` 追加到文件末尾。 ``` - - [zexcon ~]$ ls -l ~ &>> learnToScriptAllOutput - [zexcon ~]$ ls -l /etc/invalidTest &>> learnToScriptAllOutput - +[zexcon ~]$ ls -l ~ &>> learnToScriptAllOutput +[zexcon ~]$ ls -l /etc/invalidTest &>> learnToScriptAllOutput ``` 运行这些命令后,两者的输出都会进入同一个文件中,而不会区分是错误信息还是标准输出。 ``` - - total 128 - drwxr-xr-x. 1 zexcon zexcon 268 Oct 1 16:02 Desktop - drwxr-xr-x. 1 zexcon zexcon 80 Sep 16 08:53 Documents - drwxr-xr-x. 1 zexcon zexcon 0 Oct 1 15:59 Downloads - -rw-rw-r--. 1 zexcon zexcon 685 Oct 4 16:00 learnToScriptAllOutput - -rw-rw-r--. 1 zexcon zexcon 23 Oct 4 12:42 learnToScriptInput - -rw-rw-r--. 1 zexcon zexcon 0 Oct 4 16:42 learnToScriptOutput - -rw-rw-r--. 1 zexcon zexcon 52 Oct 4 16:07 learnToScriptOutputError - -rwxrw-rw-. 1 zexcon zexcon 477 Oct 4 15:01 learnToScript.sh - drwxr-xr-x. 1 zexcon zexcon 0 Jul 7 16:04 Videos - ls: cannot access '/etc/invalidTest': No such file or directory - +total 128 +drwxr-xr-x. 1 zexcon zexcon 268 Oct 1 16:02 Desktop +drwxr-xr-x. 1 zexcon zexcon 80 Sep 16 08:53 Documents +drwxr-xr-x. 1 zexcon zexcon 0 Oct 1 15:59 Downloads +-rw-rw-r--. 1 zexcon zexcon 685 Oct 4 16:00 learnToScriptAllOutput +-rw-rw-r--. 1 zexcon zexcon 23 Oct 4 12:42 learnToScriptInput +-rw-rw-r--. 1 zexcon zexcon 0 Oct 4 16:42 learnToScriptOutput +-rw-rw-r--. 1 zexcon zexcon 52 Oct 4 16:07 learnToScriptOutputError +-rwxrw-rw-. 1 zexcon zexcon 477 Oct 4 15:01 learnToScript.sh +drwxr-xr-x. 1 zexcon zexcon 0 Jul 7 16:04 Videos +ls: cannot access '/etc/invalidTest': No such file or directory ``` -如果你直接使用命令行操作,并希望将所有结果通过管道传输到另一个命令,可以选择使用 |& 实现。 +如果你直接使用命令行操作,并希望将所有结果通过管道传输到另一个命令,可以选择使用 `|&` 实现。 ``` - - [zexcon ~]$ ls -l |& grep learn - -rw-rw-r--. 1 zexcon zexcon 1197 Oct 18 09:46 learnToScriptAllOutput - -rw-rw-r--. 1 zexcon zexcon 343 Oct 14 10:47 learnToScriptError - -rw-rw-r--. 1 zexcon zexcon 0 Oct 14 11:11 learnToScriptOut - -rw-rw-r--. 1 zexcon zexcon 348 Oct 14 10:27 learnToScriptOutError - -rwxr-x---. 1 zexcon zexcon 328 Oct 18 09:46 learnToScript.sh - [zexcon ~]$ - +[zexcon ~]$ ls -l |& grep learn +-rw-rw-r--. 1 zexcon zexcon 1197 Oct 18 09:46 learnToScriptAllOutput +-rw-rw-r--. 1 zexcon zexcon 343 Oct 14 10:47 learnToScriptError +-rw-rw-r--. 1 zexcon zexcon 0 Oct 14 11:11 learnToScriptOut +-rw-rw-r--. 1 zexcon zexcon 348 Oct 14 10:27 learnToScriptOutError +-rwxr-x---. 1 zexcon zexcon 328 Oct 18 09:46 learnToScript.sh +[zexcon ~]$ ``` -### 标准输入 (stdin) +### 标准输入(stdin) -在本篇和上篇文章中,我们已经多次使用过标准输入 (stdin),因为在每次使用键盘输入时,我们都在使用标准输入。为了区别通常意义上的“键盘即标准输入”,这次我们尝试在脚本中使用 _read_ 命令。下面的脚本中就使用了 _read_ 命令,字面上就像“读取标准输入”。 +在本篇和上篇文章中,我们已经多次使用过标准输入(stdin),因为在每次使用键盘输入时,我们都在使用标准输入。为了区别通常意义上的“键盘即标准输入”,这次我们尝试在脚本中使用 `read` 命令。下面的脚本中就使用了 `read` 命令,字面上就像“读取标准输入”。 ``` +#!/bin/bash - #!/bin/bash +#Here we are asking a question to prompt the user for standard input. i.e.keyboard +echo 'Please enter your name.' - #Here we are asking a question to prompt the user for standard input. i.e.keyboard - echo 'Please enter your name.' - - #Here we are reading the standard input and assigning it to the variable name with the read command. - read name - - #We are now going back to standard output, by using echo and printing your name to the command line. - echo "With standard input you have told me your name is: $name" +#Here we are reading the standard input and assigning it to the variable name with the read command. +read name +#We are now going back to standard output, by using echo and printing your name to the command line. +echo "With standard input you have told me your name is: $name" ``` -这个示例通过标准输出给出提示,提醒用户输入信息,然后从标准输入(键盘)获取信息,使用 _read_ 将其存储在 _name_ 变量中,并通过标准输出显示处 _name_ 中的值。 +这个示例通过标准输出给出提示,提醒用户输入信息,然后从标准输入(键盘)获取信息,使用 `read` 将其存储在 `name` 变量中,并通过标准输出显示出 `name` 中的值。 ``` - - [zexcon@fedora ~]$ ./learnToScript.sh - Please enter your name. - zexcon - With standard input you have told me your name is: zexcon - [zexcon@fedora ~]$ - +[zexcon@fedora ~]$ ./learnToScript.sh +Please enter your name. +zexcon +With standard input you have told me your name is: zexcon +[zexcon@fedora ~]$ ``` ### 在脚本中使用 -现在我们把学到的东西放入脚本中,学习一下如何实际应用。下面是增加了几行后的新版本 learnToScript.sh 文件。它用追加的方式将标准输出、标准错误信息,以及两者混合后的信息,分别写入到三个不同文件。它将标准输出写入 learnToScriptStandardOutput,标准错误信息写入 learnToScriptStandardError,二者共同都写入 learnToScriptAllOutput 文件。 +现在我们把学到的东西放入脚本中,学习一下如何实际应用。下面是增加了几行后的新版本 `learnToScript.sh` 文件。它用追加的方式将标准输出、标准错误信息,以及两者混合后的信息,分别写入到三个不同文件。它将标准输出写入 `learnToScriptStandardOutput`,标准错误信息写入 `learnToScriptStandardError`,二者共同都写入 `learnToScriptAllOutput` 文件。 ``` +#!/bin/bash - #!/bin/bash +#As we know this article is about scripting. So let's +#use what we learned in a script. - #As we know this article is about scripting. So let's - #use what we learned in a script. +#Let's get some information from the user and add it to our scripts with stanard input and read - #Let's get some information from the user and add it to our scripts with stanard input and read - - echo "What is your name? " - read name +echo "What is your name? " +read name - #Here standard output directed to append a file to learnToScirptStandardOutput - echo "$name, this will take standard output with append >> and redirect to learnToScriptStandardOutput." 1>> learnToScriptStandardOutput +#Here standard output directed to append a file to learnToScirptStandardOutput +echo "$name, this will take standard output with append >> and redirect to learnToScriptStandardOutput." 1>> learnToScriptStandardOutput - #Here we are taking the standard error and appending it to learnToScriptStandardError but to see this we need to #create an error. - eco "Standard error with append >> redirect to learnToScriptStandardError." 2>> learnToScriptStandardError - - #Here we are going to create an error and a standard output and see they go to the same place. - echo "Standard output with append >> redirect to learnToScriptAllOutput." &>> learnToScriptAllOutput - eco "Standard error with append >> redirect to learnToScriptAllOutput." &>> learnToScriptAllOutput +#Here we are taking the standard error and appending it to learnToScriptStandardError but to see this we need to #create an error. +eco "Standard error with append >> redirect to learnToScriptStandardError." 2>> learnToScriptStandardError +#Here we are going to create an error and a standard output and see they go to the same place. +echo "Standard output with append >> redirect to learnToScriptAllOutput." &>> learnToScriptAllOutput +eco "Standard error with append >> redirect to learnToScriptAllOutput." &>> learnToScriptAllOutput ``` -脚本在同一目录中创建了三个文件。命令 _echo_ 故意输入错误(LCTT 译注:缺少了字母 h)以产生错误信息。如果查看三个文件,你会在 learnToScriptStandardOutput 中看到一条信息,在 learnToScriptStandardError 中看到一条信息,在 learnToScriptAllOutput 中看到两条信息。另外,该脚本还会再次提示输入的 name 值,再将其写入 learnToScriptStandardOutput 中。 +脚本在同一目录中创建了三个文件。命令 `echo` 故意输入错误(LCTT 译注:缺少了字母 h)以产生错误信息。如果查看三个文件,你会在 `learnToScriptStandardOutput` 中看到一条信息,在 `learnToScriptStandardError` 中看到一条信息,在 `learnToScriptAllOutput` 中看到两条信息。另外,该脚本还会再次提示输入的 `name` 值,再将其写入 `learnToScriptStandardOutput` 中。 -# 结语 +### 结语 至此你应该能够明确,可以在命令行中执行的操作,都可以在脚本中执行。在编写可能供他人使用的脚本时,文档非常重要。如果继续深入研究脚本,标准输出会显得更有意义,因为你将会控制它们的生成。在脚本中,你可以与命令行中操作时应用相同的内容。下一篇文章我们会讨论函数、循环,以及在此基础上进一步构建的结构。 @@ -269,7 +232,7 @@ via: https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-2/ 作者:[Matthew Darnell][a] 选题:[lujun9972][b] 译者:[unigeorge](https://github.com/unigeorge) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -279,3 +242,4 @@ via: https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-2/ [2]: https://unsplash.com/@nbandana?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText [3]: https://unsplash.com/s/photos/shell-scripting?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText [4]: https://fedoramagazine.org/command-line-quick-tips-searching-with-grep/ +[5]: https://linux.cn/article-14131-1.html \ No newline at end of file From 4bead62e179da345d5cf24047a48bfce0a015a5a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 20 Jan 2022 11:42:30 +0800 Subject: [PATCH 055/334] P @unigeorge https://linux.cn/article-14198-1.html --- .../20211027 Bash Shell Scripting for beginners (Part 2).md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20211027 Bash Shell Scripting for beginners (Part 2).md (99%) diff --git a/translated/tech/20211027 Bash Shell Scripting for beginners (Part 2).md b/published/20211027 Bash Shell Scripting for beginners (Part 2).md similarity index 99% rename from translated/tech/20211027 Bash Shell Scripting for beginners (Part 2).md rename to published/20211027 Bash Shell Scripting for beginners (Part 2).md index 39b6f46859..a0bd7f98b8 100644 --- a/translated/tech/20211027 Bash Shell Scripting for beginners (Part 2).md +++ b/published/20211027 Bash Shell Scripting for beginners (Part 2).md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "unigeorge" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14198-1.html" Bash Shell 脚本新手指南(二) ====== From 9370f52b17928889f264b0a81ff75a3b20b4e93f Mon Sep 17 00:00:00 2001 From: CN-QUAN <97161224+CN-QUAN@users.noreply.github.com> Date: Thu, 20 Jan 2022 14:48:29 +0800 Subject: [PATCH 056/334] Update 20220102 10 DIY IoT projects to try using open source tools.md --- ...220102 10 DIY IoT projects to try using open source tools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220102 10 DIY IoT projects to try using open source tools.md b/sources/tech/20220102 10 DIY IoT projects to try using open source tools.md index 1a61096e49..e61622cb1b 100644 --- a/sources/tech/20220102 10 DIY IoT projects to try using open source tools.md +++ b/sources/tech/20220102 10 DIY IoT projects to try using open source tools.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/1/open-source-internet-of-things" [#]: author: "Joshua Allen Holm https://opensource.com/users/holmja" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "CN-QUAN " [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 9acc45a58c94c6b9904bbe6d8782dc3ea68e83fd Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 21 Jan 2022 05:02:31 +0800 Subject: [PATCH 057/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220120=20?= =?UTF-8?q?Solve=20network=20fragmentation=20with=20MTU?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220120 Solve network fragmentation with MTU.md --- ...20 Solve network fragmentation with MTU.md | 403 ++++++++++++++++++ 1 file changed, 403 insertions(+) create mode 100644 sources/tech/20220120 Solve network fragmentation with MTU.md diff --git a/sources/tech/20220120 Solve network fragmentation with MTU.md b/sources/tech/20220120 Solve network fragmentation with MTU.md new file mode 100644 index 0000000000..31230188d9 --- /dev/null +++ b/sources/tech/20220120 Solve network fragmentation with MTU.md @@ -0,0 +1,403 @@ +[#]: subject: "Solve network fragmentation with MTU" +[#]: via: "https://opensource.com/article/22/1/solve-network-fragmentation-mtu" +[#]: author: "Jair Patete https://opensource.com/users/jpatete" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Solve network fragmentation with MTU +====== +This tutorial provides a workaround to help network administrators +address MTU issues without needing a stack update to move MTUs back and +forth. +![Coding on a computer][1] + +During the implementation of OpenStack workloads, a common issue is fragmentation throughout the network, causing unforeseen performance issues. Fragmentation is normally difficult to address because networks can get complex, so the path of packets can be hard to trace or predict. + +OpenStack initiates the network interface card (NIC) configuration during the initial setup of the cluster or when new nodes are added. The Message Transfer Unit (MTU) configuration is also generated at this stage. Changing the configuration after the cluster is deployed is not recommended. Normally, the System Integrator expects that the end-to-end path is properly configured before deploying and configuring the network for the stack to avoid constant MTU changes just for testing. + +Neutron networks are created after OSP is deployed. This allows administrators to create 1500 MTU networks for the instances. However, the compute node itself is still set to the MTU, so fragmentation may still occur. In telco workloads, for example, the most common MTU value for all instances is 9000, so it's easy to inadvertently cause fragmentation after networks and instances have been created. + +### Jumbo frames + +Here's an example of an instance (deployed in OSP 16.1.5) configured with jumbo frames (8996), but you can see that the network path does not also have jumbo frames configured. This causes fragmentation because system packets use 8996 as the MTU. + + +``` + + +$ ping 10.169.252.1 -M do -s 8968 +PING 10.169.252.1 (10.169.252.1) 8968(8996) bytes of data. + +\--- 10.169.252.1 ping statistics --- +7 packets transmitted, 0 received, 100% packet loss, time 5999ms + +``` + +This shows 100% packet loss when no fragmentation is allowed. The output effectively identifies the issue and reveals a problem with the MTU in the network path. If you allow fragmentation, you can see there is a successful ping. + + +``` + + +$ ping 10.169.252.1 -M dont -s 8968 +PING 10.169.252.1 (10.169.252.1) 8968(8996) bytes of data. +8976 bytes from 10.169.252.1: icmp_seq=1 ttl=255 time=3.66 ms +8976 bytes from 10.169.252.1: icmp_seq=2 ttl=255 time=2.94 ms +8976 bytes from 10.169.252.1: icmp_seq=3 ttl=255 time=2.88 ms +8976 bytes from 10.169.252.1: icmp_seq=4 ttl=255 time=2.56 ms +8976 bytes from 10.169.252.1: icmp_seq=5 ttl=255 time=2.91 ms + +\--- 10.169.252.1 ping statistics --- +5 packets transmitted, 5 received, 0% packet loss, time 4005ms +rtt min/avg/max/mdev = 2.561/2.992/3.663/0.368 m + +``` + +Having confirmed the issue, you might have to wait until the network team resolves the problem. In the meantime, fragmentation exists and impacts your system. You shouldn't update the stack to check whether the issue has been fixed, so in this article, I share one safe way to lower the end-to-end MTU inside the compute node. + +### Adjusting the MTU + +#### Step 1: Identify the hypervisor your instance is running on + +First, you must obtain information about your instance. Do this from the Overcloud using the `openstack` command: + + +``` + + +(overcloud)[director]$ openstack server \ +show 2795221e-f0f7-4518-a5c5-85977357eeec \ +-f json +{ +  "OS-DCF:diskConfig": "MANUAL", +  "OS-EXT-AZ:availability_zone": "srvrhpb510-compute-2", +  "OS-EXT-SRV-ATTR:host": "srvrhpb510-compute-2.localdomain", +  "OS-EXT-SRV-ATTR:hostname": "server-2", +  "OS-EXT-SRV-ATTR:hypervisor_hostname": "srvrhpb510-compute-2.localdomain", +  "OS-EXT-SRV-ATTR:instance_name": "instance-00000248", +  "OS-EXT-SRV-ATTR:kernel_id": "", +  "OS-EXT-SRV-ATTR:launch_index": 0, +  "OS-EXT-SRV-ATTR:ramdisk_id": "", +  "OS-EXT-SRV-ATTR:reservation_id": "r-ms2ep00g", +  "OS-EXT-SRV-ATTR:root_device_name": "/dev/vda", +  "OS-EXT-SRV-ATTR:user_data": null, +  "OS-EXT-STS:power_state": "Running", +  "OS-EXT-STS:task_state": null, +  "OS-EXT-STS:vm_state": "active", +  "OS-SRV-USG:launched_at": "2021-12-16T18:57:24.000000", +  <...> +  "volumes_attached": "" +} + +``` + +#### Step 2: Connect to the hypervisor and dump the XML of the instance + +Next, you need a dump of the XML (using the `virsh dumpxml` command) that defines your instance. So you can filter it in the next step, redirect the output into a file: + + +``` + + +[compute2]$ sudo podman \ +exec -it nova_libvirt bash + +(pod)[compute2]# virsh \ +list --all + Id   Name                State +\----------------------------------- + 6    instance-00000245   running + 7    instance-00000248   running + +(pod)[compute2]# virsh dumpxml instance-00000245 | tee inst245.xml +<domain type='kvm' id='6'> +  <name>instance-00000245</name> +  <uuid>1718c7d4-520a-4366-973d-d421555295b0</uuid> +  <metadata> +    <nova:instance xmlns:nova="[http://openstack.org/xmlns/libvirt/nova/1.0"\>][2] +      <nova:package version="20.4.1-1.20201114041747.el8ost"/> +      <nova:name>server-1</nova:name> +      <nova:creationTime>2021-12-16 18:57:03</nova:creationTime> +[...] +</domain> + +``` + +#### Step 3: Examine the XML output + +After you have the XML output, use your favourite pager or text editor to get the network interface information for the instance. + + +``` + + +<interface type='bridge'> +      <mac address='fa:16:3e:f7:15:db'/> +      <source bridge='br-int'/> +      <virtualport type='openvswitch'> +        <parameters interfaceid='da128923-84c7-435e-9ec1-5a000ecdc163'/> +      </virtualport> +      <target dev='tap123'/> +      <model type='virtio'/> +      <driver name='vhost' rx_queue_size='1024'/> +      <mtu size='8996'/> +      <alias name='net0'/> +      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> +    </interface> + +``` + +From this output, filter the source bridge (on the compute node) and the target device (the physical interface in the compute node). + +This output can change depending on the firewall type you are using, or if you are using security groups where the flow is a bit different, but all the host interfaces are displayed, and the next steps apply to all of them. + +#### Step 4: Look at the target device + +In this case, `tap123` on the compute node is the target device, so examine it with the [ip command][3]: + + +``` + + +[compute2]$ ip addr show tap123 + +tap123: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 8996 +        inet6 fe80::fc16:3eff:fef7:15db  prefixlen 64  scopeid 0x20<link> +        ether fe:16:3e:f7:15:db  txqueuelen 10000  (Ethernet) +       [...] + +``` + +You can see that the MTU is 8996, as expected. You can also find the MAC address (fe:16:3e:f7:15:db), so you can optionally confirm the port using the OpenStack port commands. + +You can also check this interface is in the br-int bridge: + + +``` + + +Bridge br-int +       [...] +        Port tap123 +            tag: 1 +            Interface tap123 + +``` + +That's also as expected because this allows South and North traffic for this instance using the external network. + +#### Step 5: Change the MTU + +Apply a common MTU change on the host specifically for your target interface (`tap123` in this example). + + +``` + + +[compute2]$ sudo ifconfig tap123 mtu 1500 +[compute2]$ ip addr show tap123 | grep mtu +tap123: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500 + +``` + +#### Step 6: Repeat + +Now repeat the procedure inside the instance to move the mtu from 8996 to 1500. This covers the hypervisor part, as neutron is still configured with jumbo frames. + + +``` + + +[localhost]$ sudo ip link set dev eth0 mtu 1500 +[localhost]$ ip addr show eth0 +eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500 +        inet 10.169.252.186  netmask 255.255.255.255  broadcast 0.0.0.0 +        inet6 fe80::f816:3eff:fef7:15db  prefixlen 64  scopeid 0x20<link> +        ether fa:16:3e:f7:15:db  txqueuelen 1000  (Ethernet) +        RX packets 1226  bytes 242462 (236.7 KiB) +        RX errors 0  dropped 0  overruns 0  frame 0 +        TX packets 401  bytes 292332 (285.4 KiB) +        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0 + +``` + +### Validation + +Now the path inside the local network has an MTU of 1500. If you try to send a packet bigger than this, an error should be displayed: + + +``` + + +[localhost]$ ping 10.169.252.1 -M do -s 1500 +PING 10.169.252.1 (10.169.252.1) 1500(1528) bytes of data. +ping: local error: Message too long, mtu=1500 +ping: local error: Message too long, mtu=1500 +ping: local error: Message too long, mtu=1500 +ping: local error: Message too long, mtu=1500 + +\--- 10.169.252.1 ping statistics --- +4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 3000ms + +``` + +This ping adds 28 bytes to the header, attempting to send a payload of 1500 bytes + 28 bytes. The system cannot send it because it exceeds the MTU. Once you decrease the payload to 1472, you can successfully send the ping in a single frame. + + +``` + + +[localhost]$ ping 10.169.252.1 -M do -s 1472 +PING 10.169.252.1 (10.169.252.1) 1472(1500) bytes of data. +1480 bytes from 10.169.252.1: icmp_seq=1 ttl=255 time=1.37 ms +1480 bytes from 10.169.252.1: icmp_seq=2 ttl=255 time=1.11 ms +1480 bytes from 10.169.252.1: icmp_seq=3 ttl=255 time=1.02 ms +1480 bytes from 10.169.252.1: icmp_seq=4 ttl=255 time=1.12 ms + +\--- 10.169.252.1 ping statistics --- +4 packets transmitted, 4 received, 0% packet loss, time 3004ms +rtt min/avg/max/mdev = 1.024/1.160/1.378/0.131 ms + +``` + +This is how to end fragmentation problems when the platform sends 9000-byte packets to the network, but fragmentation still occurs in some network components. You have now solved retransmission issues, packet loss, jitter, latency, and other related problems. + +When the network team resolves the network issues, you can revert the MTU commands back to the previous value. This is how you fix network issues without needing to redeploy the stack. + +### End-to-end simulation + +Here's how to simulate the issue in an end-to-end scenario to see how it works. Instead of pinging the gateway, you can ping a second instance. You should observe how an MTU mismatch causes issues, specifically when an application is marking packets as Not-Fragment. + +Assume your servers have the following specifications: + +**Server 1:** +Hostname: server1 +IP: 10.169.252.186/24 +MTU: 1500 + +**Server 2:** +Hostname: server2 +IP: 10.169.252.184/24 +MTU: 8996 + +Connect to **server1** and ping to **server2**: + + +``` + + +[server1]$ ping 10.169.252.184 +PING 10.169.252.184 (10.169.252.184) 56(84) bytes of data. +64 bytes from 10.169.252.184: icmp_seq=1 ttl=64 time=0.503 ms +64 bytes from 10.169.252.184: icmp_seq=2 ttl=64 time=0.193 ms +64 bytes from 10.169.252.184: icmp_seq=3 ttl=64 time=0.213 ms + +\--- 10.169.252.184 ping statistics --- +3 packets transmitted, 3 received, 0% packet loss, time 2000ms +rtt min/avg/max/mdev = 0.193/0.303/0.503/0.141 ms + +``` + +Connect to **server1** and ping to **server2** without fragmentation with an MTU of 1500: + + +``` + + +[server1]$ ping 10.169.252.184 -M do -s 1472 +PING 10.169.252.184 (10.169.252.184) 1472(1500) bytes of data. +1480 bytes from 10.169.252.184: icmp_seq=1 ttl=64 time=0.512 ms +1480 bytes from 10.169.252.184: icmp_seq=2 ttl=64 time=0.293 ms +1480 bytes from 10.169.252.184: icmp_seq=3 ttl=64 time=0.230 ms +1480 bytes from 10.169.252.184: icmp_seq=4 ttl=64 time=0.268 ms +1480 bytes from 10.169.252.184: icmp_seq=5 ttl=64 time=0.230 ms +1480 bytes from 10.169.252.184: icmp_seq=6 ttl=64 time=0.208 ms +1480 bytes from 10.169.252.184: icmp_seq=7 ttl=64 time=0.219 ms +1480 bytes from 10.169.252.184: icmp_seq=8 ttl=64 time=0.229 ms +1480 bytes from 10.169.252.184: icmp_seq=9 ttl=64 time=0.228 ms + +\--- 10.169.252.184 ping statistics --- +9 packets transmitted, 9 received, 0% packet loss, time 8010ms +rtt min/avg/max/mdev = 0.208/0.268/0.512/0.091 ms + +``` + +The MTU of **server1** is 1500, and **server2** has an MTU size larger than that, so an application running on **server1** sending packets to **server2** has no fragmentation issues. What happens if **server2**'s application is also set to Not-Fragment, but uses an MTU of 9000? + + +``` + + +[localhost]$ ping 10.169.252.186 -M do -s 8968 +PING 10.169.252.186 (10.169.252.186) 8968(8996) bytes of data. + +\--- 10.169.252.186 ping statistics --- +10 packets transmitted, 0 received, 100% packet loss, time 8999ms + +``` + +Fragmentation occurs, and the packets sent were lost. + +To correct this, repeat the MTU fix so that both servers have the same MTU. As a test, revert **server1**: + + +``` + + +[compute2]$ sudo ip link set dev tap123 mtu 8996 +[compute2]$ ip addr show tap123 | grep mtu +tap123: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 8996 + +[server1]$ sudo ip link set dev eth0 mtu 8996 +[server1]$ ip addr show eth0 | grep mtu +eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 8996 +[...] + +``` + +Now repeat the 9000 byte payload ping without fragmentation allowed: + + +``` + + +[server2]$ ping 10.169.252.186 -M do -s 8968 +PING 10.169.252.186 (10.169.252.186) 8968(8996) bytes of data. +8976 bytes from 10.169.252.186: icmp_seq=1 ttl=64 time=1.60 ms +8976 bytes from 10.169.252.186: icmp_seq=2 ttl=64 time=0.260 ms +8976 bytes from 10.169.252.186: icmp_seq=3 ttl=64 time=0.257 ms +8976 bytes from 10.169.252.186: icmp_seq=4 ttl=64 time=0.210 ms +8976 bytes from 10.169.252.186: icmp_seq=5 ttl=64 time=0.249 ms +8976 bytes from 10.169.252.186: icmp_seq=6 ttl=64 time=0.250 ms + +\--- 10.169.252.186 ping statistics --- +6 packets transmitted, 6 received, 0% packet loss, time 5001ms +rtt min/avg/max/mdev = 0.210/0.472/1.607/0.507 ms + +``` + +### Troubleshooting MTU + +This is an easy workaround to help network administrators address MTU issues without needing a stack update to move MTUs back and forth. All these MTU configurations are also temporary. An instance or system reboot causes all interfaces to revert to the original (and configured value). + +It also takes only a few minutes to perform, so I hope you find this useful. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/solve-network-fragmentation-mtu + +作者:[Jair Patete][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jpatete +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_laptop_hack_work.png?itok=aSpcWkcl (Coding on a computer) +[2]: http://openstack.org/xmlns/libvirt/nova/1.0"\> +[3]: https://opensource.com/article/18/5/useful-things-you-can-do-with-ip-tool-linux From 33a8b3bde09f8ac8d66539952599856397c748c0 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 21 Jan 2022 05:02:41 +0800 Subject: [PATCH 058/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220120=20?= =?UTF-8?q?How=20to=20back=20your=20open=20source=20project's=20stack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220120 How to back your open source project-s stack.md --- ...o back your open source project-s stack.md | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 sources/tech/20220120 How to back your open source project-s stack.md diff --git a/sources/tech/20220120 How to back your open source project-s stack.md b/sources/tech/20220120 How to back your open source project-s stack.md new file mode 100644 index 0000000000..da7b4056f1 --- /dev/null +++ b/sources/tech/20220120 How to back your open source project-s stack.md @@ -0,0 +1,97 @@ +[#]: subject: "How to back your open source project's stack" +[#]: via: "https://opensource.com/article/22/1/back-your-stack" +[#]: author: "Ruth Cheesley https://opensource.com/users/rcheesley" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to back your open source project's stack +====== +Identify your open source project's dependencies through the Back Your +Stack initiative and consider one of the many creative ways to show +support. +![Two diverse hands holding a globe][1] + +On [GivingTuesday][2], the Mautic project—an open source marketing automation platform—shared its intention to allocate part of its budget each year to [financially support the other open source projects on which it depends][3], as part of the _Back Your Stack_ initiative. + +### What is Back Your Stack? + +What is Back Your Stack, and why should open source projects follow Mautic's lead? + +Sustainability is a huge challenge in open source. + +We've seen several cases in recent years where critical tools which are literally keeping the internet and the world of technology running are being maintained by a very small number of people, at times as a hobby rather than their full-time occupation. Sometimes this only comes to light when those people decide that enough is enough and either stop maintaining it or sell/transfer it to another organization to support. + +[Tidelift][4] recently reported that [46% of open source maintainers are not paid][5]. Only 26% earn more than $1,000 from their maintenance work. The same survey also reported that around half felt demotivated, stressed, and undervalued because there was no recognition for the "thankless work" involved in maintaining these projects. + +While some projects and maintainers may genuinely not want to receive any funds for their work, the vast majority have various channels through which they can be compensated, whether it be the cost of a coffee or a more substantial donation, once or on a regular basis. + +The finger is often pointed at the end-users of software and there is pressure on them to fund open source projects directly. However, once an open source project has any significant budget, I believe it is the project's responsibility to support those on whom it relies—its dependencies. + +Without dependencies, open source projects would not be able to do all the awesome things that they do. Even if every open source project with an annual budget of over $50,000 per year decided to support their top ten dependencies at a relatively low amount of $200, I am sure that the maintainers would find a massive benefit in the support, if only in terms of a morale boost for being appreciated! + +### Identify dependencies with open source tools + +There are some great tools out there to help you identify the projects on which you depend. + +First, if you're a composer-based project, you can use the command below to get a list of all the dependencies actively seeking funding (this uses the [funding markup][6] in the composer.json, so if you're a project seeking funding, make sure you add it!). + + +``` +`$ composer fund` +``` + +You can also use [backyourstack.com][7] to identify dependencies through your GitHub organization or upload a dependency file—they support package.json, composer.json, *.csproj, packages.config, Gopkg.lock, Gemfile.lock, and requirements.txt files. + +This gives you a list of projects on Open Collective and a useful list of all your dependencies that you can then use to research funding opportunities. + +### How much should I contribute? + +How much you contribute depends on your budget and how much money you have available outside of your "must cover" expenses. + +Personally, I would like Mautic to be at 10% so that we could support all of our dependencies at a basic level, but we haven't got the financial stability just yet to reach that. For now, we're allocating 4% of our budget to support the top 10 projects as prioritized by our community—it's not much, but it's a starting point. + +### But I don't have the money! + +I hear you. It's tough to get to a point where you have enough funds available to support your dependencies, so what about getting creative about how you support them? + + * Organize a documentation swarm, where you bring some of your contributors to improve the documentation for one of your dependencies in a _giving back_ initiative. + * Give a project feedback, and help them improve the contributor experience by sharing what's worked well for your project or where you find things difficult with their project. + * Allow a developer on your team to work on a dependency project for some portion of each week. + * Find a project on [github.com/opensourcedesign][8] and assign a designer on your team to help out. + + + +In the survey from Tidelift, 90% of maintainers suggested that the primary non-financial ways they are looking for help are improving documentation and improving the experience for new users and contributors. + +What about donating a percentage of the ticket sales from your next conference or event towards supporting your dependencies, or adding it as a power-up for your community members to pay more in order to support your dependencies? + +There are many creative ways to collectively help open source projects become more sustainable, through which we all grow stronger. + +Are you backing your stack currently? What ideas do you have for backing your stack? If you're a maintainer, what are your thoughts on the most helpful way for people to support your projects if they depend on you for their own products or services? + +Feel free to share in a comment below. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/back-your-stack + +作者:[Ruth Cheesley][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/rcheesley +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/world_hands_diversity.png?itok=zm4EDxgE (Two diverse hands holding a globe) +[2]: https://en.wikipedia.org/wiki/GivingTuesday +[3]: https://www.mautic.org/blog/community/giving-tuesday-mautic-backs-their-stack-support-open-source-projects-they-depend +[4]: https://opensource.com/article/21/3/open-source-maintainer-survey +[5]: https://tidelift.com/about/press-releases/survey-finds-many-open-source-maintainers-are-stressed-out-and-underpaid-but-persist-so-they-can-make-a-positive-impact +[6]: https://getcomposer.org/doc/04-schema.md#funding +[7]: https://backyourstack.com/ +[8]: https://github.com/opensourcedesign/jobs/tree/master/jobs From 539bd6ff8afa10a8dbd350616864e24dea93939a Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 21 Jan 2022 05:03:03 +0800 Subject: [PATCH 059/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220120=20?= =?UTF-8?q?ProtonMail=20Now=20Protects=20You=20From=20Email=20Tracking?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220120 ProtonMail Now Protects You From Email Tracking.md --- ...il Now Protects You From Email Tracking.md | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sources/news/20220120 ProtonMail Now Protects You From Email Tracking.md diff --git a/sources/news/20220120 ProtonMail Now Protects You From Email Tracking.md b/sources/news/20220120 ProtonMail Now Protects You From Email Tracking.md new file mode 100644 index 0000000000..3b8679a9e5 --- /dev/null +++ b/sources/news/20220120 ProtonMail Now Protects You From Email Tracking.md @@ -0,0 +1,72 @@ +[#]: subject: "ProtonMail Now Protects You From Email Tracking" +[#]: via: "https://news.itsfoss.com/protonmail-tracking-protection/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +ProtonMail Now Protects You From Email Tracking +====== + +[ProtonMail][1] is an open-source email service that offers best-in-class privacy and security features. All of its client applications are open-source as well. You can use it for free and opt for premium upgrades if needed. Whether using it for free or with a subscription, ProtonMail has been an impressive option for privacy and open-source enthusiasts. + +In fact, we use it for our team. And, it has been a good service so far! + +Now, to make things better, ProtonMail [announced][2] a new feature that blocks hidden pixels in emails that often track your activity. + +While they claim that it should make your email experience safer, what is it? And, what should you expect from it? + +### Blocking Tracking Pixels in Emails + +As of now, the email tracking happens without the receiver’s consent. Some of the newsletters that you receive, marketing/promotion emails, or just about anything might already contain a hidden tracking pixel that monitors your email activity. + +Fret not; the email tracking methods do not compromise the data or your email address. However, these trackers monitor when you open the email, how many times you access it, and the IP address/location associated with it. + +So, with this data, the sender can analyze a wide range of things. + +While this can be useful for digital marketers, it can give attackers more opportunities to lure you into a scam effectively. + +Unfortunately, there’s no way to regulate or ask consent for it. The tracking pixels in emails are all over the place. And, several trustworthy services make use of them as well. + +![][3] + +ProtonMail comes to the rescue by blocking these tracking pixels and hiding your IP address or location from third parties in your email. + +As you can notice from the screenshot above, the email I received included one tracker. + +This feature is enabled by default for every free and premium ProtonMail user. + +When you click on the tracking protection icon on the web, here’s what you would see: + +![][4] + +And, there can be a variety of trackers that cannot be identified easily and would appear as “Uncategorized Tracker”. + +The presence of this feature makes ProtonMail an attractive, privacy-focused email offering. Not to forget, you may not need to opt for expensive solutions like [HEY][5] from Basecamp to get rid of email tracking. + +[ProtonMail][1] + +_What do you think about ProtonMail’s new enhanced tracking protection feature? Let me know your thoughts in the comments down below._ + +**Disclaimer:** It’s FOSS is an affiliate partner of ProtonMail. While this does not affect our news reporting stance, we get a small commission if you get a ProtonMail subscription from our link. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/protonmail-tracking-protection/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/recommends/protonmail/ +[2]: https://protonmail.com/blog/enhanced-tracking-protection/ +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ1MyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMzMyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[5]: https://www.hey.com/ From 04a0262c0160fb3a1302f514d72587d4263ccd61 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 21 Jan 2022 08:48:38 +0800 Subject: [PATCH 060/334] translating --- ...ce Interactive Whiteboard for Educators.md | 106 ----------------- ...ce Interactive Whiteboard for Educators.md | 107 ++++++++++++++++++ 2 files changed, 107 insertions(+), 106 deletions(-) delete mode 100644 sources/tech/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md create mode 100644 translated/tech/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md diff --git a/sources/tech/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md b/sources/tech/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md deleted file mode 100644 index f4bff00aea..0000000000 --- a/sources/tech/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md +++ /dev/null @@ -1,106 +0,0 @@ -[#]: subject: "OpenBoard: An Open Source Interactive Whiteboard for Educators" -[#]: via: "https://itsfoss.com/openboard/" -[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -OpenBoard: An Open Source Interactive Whiteboard for Educators -====== - -**Brief:** _OpenBoard is an interactive open-source whiteboard tailored for schools and universities. Let’s take a look at what it offers!_ - -There are several open-source tools available for education. But, not all of them are impressively well-maintained at the level of commercial software put forward for schools and universities. - -OpenBoard is one such exceptional free and open-source tool that enables education without any compromises. It is an interactive whiteboard program that features all the essential functionalities along with support for a variety of hardware. - -### OpenBoard: Free and Open Source Interactive Whiteboard - -![][1] - -As a free and open-source program, OpenBoard seems to be an impressive option. - -The Education Department (DIP) of the canton of Geneva, in Switzerland, maintains the tool along with the community on GitHub. - -It shouldn’t cost a fortune just to facilitate easy digital teaching through interactive whiteboards. And, this is where OpenBoard comes in. - -It offers a range of features that should be enough for most schools and universities. - -While I can’t test it out in a school/university setting, I shall highlight the key features that it offers. - -### Features of OpenBoard - -![][2] - -An interactive whiteboard does not need numerous fancy features, but enough to make the experience easy for teachers to be able to express themselves as easily as possible. - -Some of the features that I noticed include: - - * Cross-platform support - * Ability to draw/write freely. - * The ability to add annotation. - * You get to remove annotation. - * Get the ability to highlight part of your whiteboard using highlighter. - * Individually interact and move the items created/drawn. - * Add multiple pages in an order to continue teaching without needing to erase. - * Ability to scroll through the pages. - * Draw a line (choosing from three different weights of lines) - * Toggle Stylus mode (if you are using a pen tablet or similar) - * Easy to erase the items created in the whiteboard - * Choose from a set of different backgrounds, including ones that turn it into a blackboard or with grid lines. - * A variety of essential applications including calculator, maps, ruler, and more is available to use through drag and drop. - * Limited shapes available to make drawing easier. - * Ability to add audio/video to your whiteboard and play it seamlessly for better experience. - * Virtual laser pointer. - * Option to zoom in and zoom out. - * Write text, resize it, and clone it. - * Take a screenshot of the screen from within the whiteboard. - * Virtual keyboard available when required. - - - -In my brief testing, the user interface and the options available worked incredibly well, without any fail. - -![][3] - -Of course, your experience will depend on the type of device and your setup. You can try it with a Wacom tablet, a dual-monitor setup, or using a projector through a touch-enabled laptop. - -### Install OpenBoard in Linux - -Fortunately, it is available across multiple platforms that include Windows, macOS, and Linux. - -If you are using Ubuntu, you can head to its official website and download the DEB file. In either case, you can choose to [install the Flatpak package][4] from [Flathub][5] for any other Linux distribution. - -[OpenBoard][6] - -### Closing Thoughts - -Overall, I found it effortless to use and navigate. You can quickly switch between multiple pages, erase/add items seamlessly while having the ability to add rich elements to the whiteboard as well. - -The presence of a virtual laser pointer, and several applications, make it suitable for use in various schools and universities without any hiccups. - -I don’t know if it can be called an alternative to Google Classroom or Miro’s Whiteboard feature but for simpler usage, OpenBoard does the job. - -If you haven’t tried this out, I recommend giving it a spin. Is there something better than this that you know of? Let me know in the comments down below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/openboard/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/openboard-screenshot.png?resize=800%2C435&ssl=1 -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/openboard-screenshot-1.png?resize=800%2C462&ssl=1 -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/openboard-dock.png?resize=800%2C344&ssl=1 -[4]: https://itsfoss.com/flatpak-guide/ -[5]: https://flathub.org/apps/details/ch.openboard.OpenBoard -[6]: https://www.openboard.ch/index.en.html diff --git a/translated/tech/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md b/translated/tech/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md new file mode 100644 index 0000000000..ee431862fd --- /dev/null +++ b/translated/tech/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md @@ -0,0 +1,107 @@ +[#]: subject: "OpenBoard: An Open Source Interactive Whiteboard for Educators" +[#]: via: "https://itsfoss.com/openboard/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +OpenBoard:面向教育工作者的开源交互式白板 +====== + +**简介:** _OpenBoard 是为学校和大学定制的交互式开源白板。让我们来看看它提供了什么!_ + +有几个开源工具可用于教育。但是,并非所有这些软件都在面向学校和大学的商业软件水平上得到了令人印象深刻的良好维护。 + +OpenBoard 就是这样一个特殊的免费开源工具,它可以在不妥协的情况下实现教育。它是一个交互式白板程序,具有所有基本功能,并支持各种硬件。 + +### OpenBoard:免费和开源的交互式白板 + +![][1] + +作为一个免费和开源的程序,OpenBoard 似乎是一个令人印象深刻的选择。 + +瑞士日内瓦州的教育部门(DIP)与 GitHub 上的社区一起维护该工具。 + +为了通过交互式白板促进轻松的数字教学,它不应该花费巨资。这就是 OpenBoard 的优势所在。 + +它提供的一系列功能对大多数学校和大学来说应该是足够的。 + +虽然我无法在学校/大学环境中测试它,但我将强调它提供的主要功能。 + +### OpenBoard 的特点 + +![][2] + +交互式白板不需要众多花哨的功能,但足以使教师能够尽可能轻松地表达自己。 + + +我注意到的一些特点包括: + + * 跨平台支持 + * 能够自由地画/写 + * 能够添加注释 + * 能够删除注释 + * 使用荧光笔高亮显示你的白板的一部分 + * 单独互动和移动创建/绘制的项目 + * 按顺序添加多个页面,继续教学而不需要擦除 + * 能够滚动浏览各页 + * 绘制线条(从三种不同线宽中选择) + * 切换手写笔模式(如果你使用的是手写板或类似的东西) + * 易于擦除在白板上创建的项目 + * 从一组不同的背景中选择,包括把它变成黑板或带网格线的背景 + * 各种必要的应用,包括计算器、地图、尺子等,都可以通过拖放使用 + * 可以使用有限的形状,使绘图更容易 + * 能够向你的白板添加音频/视频,并无缝播放,以获得更好的体验 + * 虚拟激光笔 + * 可选择放大和缩小 + * 写文字,调整大小,并克隆它 + * 从白板中对屏幕进行截图 + * 需要时可使用虚拟键盘 + + + +在我简短的测试中,用户界面和可用的选项工作得非常好,没有任何故障。 + +![][3] + +当然,你的体验将取决于设备的类型和你的设置。你可以用 Wacom 平板电脑、双显示器设置,或者通过支持触摸的笔记本电脑使用投影仪来尝试。 + +### 在 Linux 中安装 OpenBoard + +幸运的是,它可以在多个平台上使用,包括 Windows、macOS 和 Linux。 + +如果你使用的是 Ubuntu,你可以到官方网站下载 DEB 文件。另外对于其他 Linux 发行版,你可以选择通过 [Flathub][5] [安装 Flatpak 软件包][4]。 + +[OpenBoard][6] + +### 结语 + +总的来说,我发现它在使用和导航方面毫不费力。你可以在多个页面之间快速切换,无缝擦除/添加项目,同时还可以在白板上添加丰富的元素。 + +虚拟激光笔的存在,以及一些应用,使它适合在各种学校和大学中使用而没有任何障碍。 + +我不知道它是否可以被称为谷歌课堂或 Miro 白板功能的替代品,但对于更简单的使用,OpenBoard 可以胜任。 + +如果你还没有试过,我建议你试一试。你知道有什么比这更好的东西吗?请在下面的评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/openboard/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/openboard-screenshot.png?resize=800%2C435&ssl=1 +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/openboard-screenshot-1.png?resize=800%2C462&ssl=1 +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/openboard-dock.png?resize=800%2C344&ssl=1 +[4]: https://itsfoss.com/flatpak-guide/ +[5]: https://flathub.org/apps/details/ch.openboard.OpenBoard +[6]: https://www.openboard.ch/index.en.html From e58e1ce263eebcba209ca71c3a039beaefea9b81 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 21 Jan 2022 08:54:25 +0800 Subject: [PATCH 061/334] translating --- ...220102 10 DIY IoT projects to try using open source tools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220102 10 DIY IoT projects to try using open source tools.md b/sources/tech/20220102 10 DIY IoT projects to try using open source tools.md index 1a61096e49..b1b6119eb8 100644 --- a/sources/tech/20220102 10 DIY IoT projects to try using open source tools.md +++ b/sources/tech/20220102 10 DIY IoT projects to try using open source tools.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/1/open-source-internet-of-things" [#]: author: "Joshua Allen Holm https://opensource.com/users/holmja" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 72ad57b6681fa9a07b166bc03757b4672de30bae Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 21 Jan 2022 10:02:22 +0800 Subject: [PATCH 062/334] RP @geekpi https://linux.cn/article-14200-1.html --- ...g things I learned about Python in 2021.md | 36 ++++++++----------- 1 file changed, 14 insertions(+), 22 deletions(-) rename {translated/tech => published}/20220111 8 surprising things I learned about Python in 2021.md (65%) diff --git a/translated/tech/20220111 8 surprising things I learned about Python in 2021.md b/published/20220111 8 surprising things I learned about Python in 2021.md similarity index 65% rename from translated/tech/20220111 8 surprising things I learned about Python in 2021.md rename to published/20220111 8 surprising things I learned about Python in 2021.md index 998948529c..89f8ba5500 100644 --- a/translated/tech/20220111 8 surprising things I learned about Python in 2021.md +++ b/published/20220111 8 surprising things I learned about Python in 2021.md @@ -3,35 +3,27 @@ [#]: author: "Sumantro Mukherjee https://opensource.com/users/sumantro" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14200-1.html" -我在 2021 年学到的关于 Python 的 8 个令人惊讶的东西 +2021 总结:Python 的 8 个令人惊讶的东西 ====== -Opensource.com 的作者们揭示了使用这一流行的编程语言的新方法。 -![Hands on a keyboard with a Python book ][1] -长期以来,Python 一直是最受欢迎的编程语言之一,但这并不意味着没有什么新东西可学。Opensource.com 上关于 Python 的阅读量最大的文章列表是一个很好的开始。 +> 这些文章的作者们揭示了使用这一流行的编程语言的新方法。 - * 机器学习的广泛采用已经到来,其应用仍在增长。看看使用 [Naïve Bayes][2] 分类器并通过 Python 实现的机器学习如何解决现实生活中的问题。 +![](https://img.linux.net.cn/data/attachment/album/202201/21/100110n5iuyvzvmhg2jwt7.jpg) - * 向 Python 3 的过渡已经完成,但增强功能不断涌现。Seth Kenlon 强调了[Python 3 中的五颗隐藏的宝石][3],它们在最近的改进中脱颖而出。 - - * Openshot 多年来一直是 Linux 视频编辑的最佳选择之一。这篇受欢迎的文章将告诉你,你也可以用这个 Python 应用[在 Linux 上编辑视频][4]。 +长期以来,Python 一直是最受欢迎的编程语言之一,但这并不意味着没有什么新东西可学。我们关于 Python 的阅读量最大的文章列表是一个很好的开始。 + * 机器学习的广泛采用已经到来,其应用仍在增长。看看使用 [朴素贝叶斯][2] 分类器并通过 Python 实现的机器学习如何解决现实生活中的问题。 + * 向 Python 3 的过渡已经完成,但增强功能不断涌现。Seth Kenlon 强调了 [Python 3 中的五颗隐藏的宝石][3],它们在最近的改进中脱颖而出。 + * Openshot 多年来一直是 Linux 视频编辑的最佳选择之一。这篇受欢迎的文章将告诉你,你也可以用这个 Python 应用 [在 Linux 上编辑视频][4]。 * Python 最好的部分是一个程序员可以实现的无限可能。[Cython][5] 是一个编译器,不仅可以帮助加快代码执行速度,还可以让用户为 Python 编写 C 语言扩展。 - - * Python可以使 API 单元测试更简单。Miguel Brito 向你展示了[用 Python 测试 API 的三种方法][6]。 - + * Python 可以使 API 单元测试更简单。Miguel Brito 向你展示了 [用 Python 测试 API 的三种方法][6]。 * 随着计算能力的提高,越来越多的程序在并发运行。这可能会使调试、日志记录和剖析出错的地方成为挑战。[VizTracer][7] 正是为了解决这个问题而创建的。 - - * 用户的个人项目,无论大小,都很好地提醒我们开源编码可以有多大的乐趣。这里有一个鼓舞人心的项目:Opensource.com 的作者 Darin London 如何使用 CircuitPython [监控他的温室][8]。 - - * Linux 用户经常会遇到需要大量命令行参数的程序,这让人很不爽。这是一个[不错的配置解析技巧][9],可以让生活更轻松。 - - - + * 用户的个人项目,无论大小,都很好地提醒我们开源编码可以有无穷的乐趣。这里有一个鼓舞人心的项目:Darin London 如何使用 CircuitPython [监控他的温室][8]。 + * Linux 用户经常会遇到需要大量命令行参数的程序,这让人很不爽。这是一个 [不错的配置解析技巧][9],可以让生活更轻松。 -------------------------------------------------------------------------------- @@ -40,7 +32,7 @@ via: https://opensource.com/article/22/1/python-roundup 作者:[Sumantro Mukherjee][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From b070d31d4111e291fb9f1f8cde55c87212a653f4 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 21 Jan 2022 10:38:19 +0800 Subject: [PATCH 063/334] Revert "translating" --- ...220102 10 DIY IoT projects to try using open source tools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220102 10 DIY IoT projects to try using open source tools.md b/sources/tech/20220102 10 DIY IoT projects to try using open source tools.md index b1b6119eb8..1a61096e49 100644 --- a/sources/tech/20220102 10 DIY IoT projects to try using open source tools.md +++ b/sources/tech/20220102 10 DIY IoT projects to try using open source tools.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/1/open-source-internet-of-things" [#]: author: "Joshua Allen Holm https://opensource.com/users/holmja" [#]: collector: "lujun9972" -[#]: translator: "geekpi" +[#]: translator: " " [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 60dc6eaca4738d295e5def3ca5c2e83c05742efd Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 21 Jan 2022 12:31:46 +0800 Subject: [PATCH 064/334] translating --- .../20210914 Revolt- An Open-Source Alternative to Discord.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210914 Revolt- An Open-Source Alternative to Discord.md b/sources/tech/20210914 Revolt- An Open-Source Alternative to Discord.md index 36a33babf8..8daa9dc4a3 100644 --- a/sources/tech/20210914 Revolt- An Open-Source Alternative to Discord.md +++ b/sources/tech/20210914 Revolt- An Open-Source Alternative to Discord.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/revolt/" [#]: author: "Ankush Das https://itsfoss.com/author/ankush/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 20caa2f1803efcb8a367f700065d2b2a27dfcb89 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 21 Jan 2022 13:04:20 +0800 Subject: [PATCH 065/334] A --- ...119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md b/sources/tech/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md index 448f99ff32..752a8eca1c 100644 --- a/sources/tech/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md +++ b/sources/tech/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/posix/" [#]: author: "Bill Dyer https://itsfoss.com/author/bill/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From a79946233abc5a0ab1e0646126c8f7e6ac2a98b7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 21 Jan 2022 18:30:52 +0800 Subject: [PATCH 066/334] TR @wxy --- ... Why Does it Matter to Linux-UNIX Users.md | 95 ------------------ ... Why Does it Matter to Linux-UNIX Users.md | 97 +++++++++++++++++++ 2 files changed, 97 insertions(+), 95 deletions(-) delete mode 100644 sources/tech/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md create mode 100644 translated/tech/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md diff --git a/sources/tech/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md b/sources/tech/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md deleted file mode 100644 index 752a8eca1c..0000000000 --- a/sources/tech/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md +++ /dev/null @@ -1,95 +0,0 @@ -[#]: subject: "What is POSIX? Why Does it Matter to Linux/UNIX Users?" -[#]: via: "https://itsfoss.com/posix/" -[#]: author: "Bill Dyer https://itsfoss.com/author/bill/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -What is POSIX? Why Does it Matter to Linux/UNIX Users? -====== - -You’ll hear the acronym, or read about it: POSIX, on different online boards and articles. Programmers and system developers seem to worry about it the most. It can sound mysterious and, while there are many good sources on the subject, some discussion boards (brevity is part of their nature), don’t go into detail as to what it is and this can lead to confusion. What, then, is POSIX, really? - -![][1] - -### What is POSIX? - -POSIX isn’t actually a thing. It describes a thing – much like a label. Imagine a box labeled: _POSIX_, and inside the box is a standard. A standard consists of sets of rules and instructions that POSIX is concerned with. **POSIX** is shorthand for _Portable Operating System Interface_. It is an IEEE 1003.1 standard that defines the language interface between application programs (along with command line shells and utility interfaces) and the UNIX operating system. - -Compliance to the standard ensures compatibility when UNIX programs are moved from one UNIX platform to another. POSIX’s focus is primarily on features from AT&T’s System V UNIX and BSD UNIX. - -A standard must be spelled out and followed by rules on how to achieve the goal of interoperability between operating systems. POSIX covers such things as: System Interfaces, and Commands and Utilities, Network File Access, just to name a few – there is much more to POSIX than this. - -### Why POSIX? - -In a word: portability. - -Over 60 years ago, programmers had to rewrite code completely if they wanted their software to run on more than one system. This didn’t happen all that often due to the expense involved, but portability became a feature in the mid-1960s – not through POSIX – but in the mainframe arena. - -IBM introduced the System/360 family of mainframe computers. Different models had their unique specializations, but the hardware was such that they could use the same operating system: OS/360. - -Not only could the operating system run on different models, applications could run on them as well. Not only did this keep costs low, but it created _computer systems_ – systems across a product line that could work together. It’s all common today – networks and systems, but back then, this was a huge deal! - -![IBM System 360 | Image Credit: IBM][2] - -When UNIX came about, around the same time, it also showed promise in that it could operate on machines from different manufacturers. However, when UNIX started to fork into different flavors, porting code across these UNIX variants became difficult. The promise of UNIX portability was losing ground. - -To solve this portability issue POSIX was formed in the 1980s. The standard was defined based on AT&T’s System V UNIX and BSD UNIX, the two biggest variants at the time. It’s important to note that POSIX wasn’t formed to control how the operating systems were built – any company was free to design their UNIX variant any way they pleased. POSIX was only concerned with how an application interfaces with the operating system. In programmer-speak, an interface is the method one program’s code can communicate with another program. The interface expects Program A to provide a specific type of information to Program B. Likewise, Program A expects Program B to answer back with a specific type of data. - -For example, if I want to read a file using the cat command, I would type something like this on the command line: - -`cat myfile.txt` - -Without going into a lot of programmer-speak, I’ll just say that the cat command makes a call to the operating system to fetch the file so cat can read it. cat reads it and then displays the file’s contents on the screen. There is a lot of interplay between the application (`cat`) and the operating system. How this interplay works is what POSIX was interested in. If the interplay could be the same across the different UNIX variants, portability – regardless of operating system, manufacturer, and hardware – is regained. - -The specifics as to how all of this is accomplished is defined in the standard. - -### Compliance is Voluntary - -All of us have at least seen a message like, “for help, type: xxxxx –help.” This is common in Linux and is not POSIX compliant. POSIX never required the double-dash, they expect one dash. The double-dash comes from GNU, yet, it doesn’t harm Linux and adds a little to its character. At the same time, Linux is mostly compliant, especially when it comes to system call interfaces. This is why we are able to run X, GNOME, and KDE applications on Linux, Sys V UNIX, and BSD UNIX. Various commands, such as ls, cat, grep, find, awk, and many more operate the same across the different variants. - -As a rule, compliance is a willing step. When code is compliant, it’s easier to move to another system; very little code rewrite, if any, would be necessary. When code can work on different systems, the use of it expands. People using other systems can benefit from the use of the program. For the budding programmer, learning how to write programs that are POSIX compliant can only help their career. For those readers who are interested in the Linux sphere of compliance, much good information can be found at: [Linux Standard Base][3]. - -### But I’m Not a Programmer or System Designer… - -Many people who work on computers aren’t programmers or operating system designers. They’re the medical transcription clerks, secretaries who write out letters, task lists, dictated memos, and so on. Others tabulate numbers, gather and massage data, run online stores, write books and articles (and some of us read them). In almost every job, there’s probably a computer close by. - -POSIX affects these users too, whether they know it or not. Users don’t have to comply with the standard, but they do expect their computers to work. When operating systems and programs conform to the POSIX standard, the gain the benefit of interoperability. They will be able to move from on system to another with the reasonable expectation that the machines will work much like another one does. Their data will still be accessible and they will still be able to make changes to it. - -POSIX, as well as other standards, are continually evolving. As technology grows, so does the standard. Standards are actually an agreed-upon system used by people, manufacturers, organizations, etc. to perform tasks in an efficient manner. Devices from one manufacturer is able to work with another manufacturer’s device. Think about it: Your Bluetooth earpiece can be used on an Apple iPhone just as well as it can on an Android phone. Our TV can hook up to, and stream, videos and shows from different networks, such as Amazon Prime, BritBox, Hulu – just to name a few. Now, we can even monitor out heart rate with our phones. All of this is made possible, largely in part, from compliance to standards. - -Benefits galore. I like that. - -### So what about the X? - -I admit it, I never said what the “X” was for in POSIX. [Opensource.com has an excellent article][4] where Richard Stallman explains what the “X” in POSIX means. Here it is, in his words: - -> The IEEE had finished developing the spec but had no concise name for it. The title said something like “portable operating system interface,” though I don’t remember the exact words. The committee put on “IEEEIX” as the concise name. I did not think that was a good choice. It is ugly to pronounce—it would sound like a scream of terror, “Ayeee!”—so I expected people would instead call the spec “Unix.” -> -> Since GNU’s Not Unix, and it was intended to replace Unix, I did not want people to call GNU a “Unix system.” I, therefore, proposed a concise name that people might actually use. Having no particular inspiration, I generated a name the unclever way: I took the initials of “portable operating system” and added “ix.” The IEEE adopted this eagerly. - -### Conclusion - -The POSIX standard allows developers to create applications, tools, and platforms on many operating systems using much of the same code. It isn’t a requirement, by any means, to write code according to the standard, but it does help, in a big way, when you want to port your code to other systems. - -Basically, POSIX is geared toward operating system designers and software developers, but as users of a system, we are affected by POSIX whether we may realize it or not. It is because of the standard that we are able to work on one UNIX or Linux system and bring that work over to another system and work on it with no hiccups. As users, we gain numerous benefits in usability and data re-use across systems. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/posix/ - -作者:[Bill Dyer][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/bill/ -[b]: https://github.com/lujun9972 -[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/What-is-POSIX.png?resize=800%2C450&ssl=1 -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/IBM-system-360-vintage-picture.jpg?resize=800%2C593&ssl=1 -[3]: https://refspecs.linuxfoundation.org/lsb.shtml -[4]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains diff --git a/translated/tech/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md b/translated/tech/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md new file mode 100644 index 0000000000..e5d826bf15 --- /dev/null +++ b/translated/tech/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md @@ -0,0 +1,97 @@ +[#]: subject: "What is POSIX? Why Does it Matter to Linux/UNIX Users?" +[#]: via: "https://itsfoss.com/posix/" +[#]: author: "Bill Dyer https://itsfoss.com/author/bill/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +什么是 POSIX?为什么它对 Linux/UNIX 用户很重要? +====== + +POSIX,你肯定在各种在线论坛和文章中,听到过这个缩写,或读到过关于它的信息。程序员和系统开发人员似乎最关心这个问题。它听起来很神秘,虽然有很多关于这个主题的好资料,但一些讨论区(简洁是它们的特点)并没有详细说明它是什么,这可能会让人困扰。那么,POSIX 到底是什么? + +![][1] + +### POSIX 简介 + +与其说 POSIX 是一个东西,不如说是一个标签。想象一下,有一个盒子,上面贴着标签:POSIX,而盒子里是一个标准。该标准由 POSIX 所关注的规则和指令集组成。**POSIX** 是可移植操作系统接口Portable Operating System Interface 的缩写。它是一个 IEEE 1003.1 标准,其定义了应用程序(以及命令行 Shell 和实用程序接口)和 UNIX 操作系统之间的语言接口。 + +当 UNIX 程序从一个 UNIX 平台移植到另一个平台时,遵守该标准可以确保其兼容性。POSIX 主要关注的是 AT&T 的 System V UNIX 和 BSD UNIX 的特性。 + +该标准必须阐明并遵循如何实现操作系统之间互操作性的目标的规则。POSIX 涵盖了以下内容:系统接口、命令和实用程序、网络文件访问,这里仅举几例(POSIX 的内容远不止这些)。 + +### 为什么有 POSIX? + +一句话:可移植性。 + +60 多年前,如果程序员想让他们的软件在一个以上的系统上运行,就必须完全重写代码。由于所涉及的费用,这种情况并不经常发生,但在 1960 年代中期,可移植性成为一种特性 —— 不是通过 POSIX,而是在大型机领域。 + +IBM 推出了 System/360 系列的大型计算机。不同的型号有其独特的规范,但硬件使得它们可以使用同一个操作系统:OS/360。 + +不仅操作系统可以在不同的型号上运行,应用程序也可以在它们上面运行。这不仅降低了成本,而且创造了“计算机系统”:可以跨产品线协同工作的系统。今天,这一切都很常见,比如网络和系统,但在当时,这是一个巨大的进步! + +![IBM System 360 | 图片来源:IBM][2] + +大约在同一时间,当 UNIX 出现的时候,它也做出了承诺,它可以在不同制造商的机器上运行。然而,当 UNIX 开始衍生出不同的流派时,在这些 UNIX 变体之间移植代码变得很困难。UNIX 可移植性的承诺正在失去基础。 + +为了解决这个可移植性问题,在 20 世纪 80 年代形成了 POSIX 标准。这个标准是在 AT&T 的 System V UNIX 和 BSD UNIX 的基础上定义的,这是当时最大的两个 UNIX 变体。值得注意的是,POSIX 的形成并不是为了控制操作系统的构建方式,任何公司都可以自由地以他们喜欢的方式设计他们的 UNIX 变体。POSIX 只关心应用程序与操作系统的接口是怎样的。用程序员的话来说,接口是一个程序的代码与另一个程序的通信方法。接口期望程序 A 向程序 B 提供特定类型的信息。同样地,程序 A 期望程序 B 用特定类型的数据来回答。 + +例如,如果我想用 `cat` 命令读取一个文件,我会在命令行上输入类似这样的内容: + +``` +cat myfile.txt +``` + +我不想说很多程序员的术语,简单的来说,`cat` 命令调用操作系统来获取文件,以便 `cat` 能够读取它。`cat` 读取它,然后在屏幕上显示文件的内容。在应用程序(`cat`)和操作系统之间有很多的相互作用。这种相互作用如何工作是 POSIX 所关心的。如果这种相互作用在不同的 UNIX 变体中是相同的,那么可移植性,无论操作系统、制造商和硬件如何,就可以重新获得了。 + +关于如何实现这一切的具体细节,在该标准中作了规定。 + +### 合规是自愿的 + +我们所有人都至少见过这样的信息:“如需帮助,请输入:XXXX -help”。这在 Linux 中很常见,但是这不符合 POSIX 标准。POSIX 从来没有要求双破折号,他们希望用一个破折号。双破折号来自 GNU,然而,它并没有损害 Linux,而且还为其增加了一点特性。同时,Linux 大部分都是兼容 POSIX 的,特别是在涉及到系统调用接口时。这就是为什么我们能够在 Linux、Sys V UNIX 和 BSD UNIX 上运行 X、GNOME 和 KDE 应用程序。各种命令,如 `ls`、`cat`、`grep`、`find`、`awk` 等,在不同的变体中操作相同。 + +作为一项规则,合规是一个自愿的步骤。当代码符合要求时,移到另一个系统上就比较容易,很少有必要或根本不需要重写代码。当代码可以在不同的系统上工作时,它的使用范围就会扩大。使用其他系统的人可以从使用该程序中受益。对于初出茅庐的程序员来说,学习如何编写符合 POSIX 标准的程序,就能对他们的职业生涯有所帮助。对于那些对 Linux 领域的合规性感兴趣的读者,可以在以下网站找到很多好的信息: [Linux 基本标准(LSB)][3]。 + +### 但我不是程序员或系统设计师... + +许多从事计算机工作的人并不是程序员或操作系统设计师。他们是医院的文员,是写信件、任务清单、听写备忘录的秘书,等等。其他人则是将数字制成表格,收集和整理数据,经营网上商店,写书和文章(我们中的一些人还会阅读这些文章)。几乎在每一个工作中,附近都可能有一台计算机。 + +POSIX 也影响着这些用户,不管他们是否知道。用户不一定要遵守这个标准,但他们确实希望他们的计算机能够工作。当操作系统和程序符合 POSIX 标准时,他们就获得了互操作性的好处。他们将能够从一个系统转移到另一个系统,并合理地期望这些机器能够像另一个系统那样工作。他们的数据仍然可以访问,他们仍然能够对其进行修改。 + +POSIX,以及其他标准,都在不断发展。随着技术的发展,标准也在发展。标准实际上是人们、制造商、组织等用来以有效的方式执行任务的商定系统。一个制造商的设备能够与另一个制造商的设备一起工作。想一想吧。你的蓝牙耳机可以在苹果手机上使用,也可以在安卓手机上使用。我们的电视可以连接到不同网络的视频和节目,如 Amazon Prime、BritBox、Hulu —— 仅举几例。现在,我们甚至可以用我们的手机监测心率。所有这些在很大程度上都是通过遵守标准而实现的。 + +好处多多。我喜欢这样。 + +### 那么 “X” 是什么? + +我承认,我还没说过 POSIX 中的 “X” 是什么意思。[在一篇很好的文章中][4],Richard Stallman 解释了 POSIX 中的 “X” 是什么意思。用他的话来说就是这样: + +> IEEE 已经完成了规范的制定,但没有简洁的名称。标题是 “可移植的操作系统接口”,虽然我不记得确切的字眼了。委员会把 “IEEEIX” 作为简写。我不认为这是个好的选择。它的发音很难听 —— 听起来就像恐怖的尖叫声,“Ayeee!” —— 所以我预计人们会把这个规范叫为 “Unix”。 +> +> 由于 GNU 不是 Unix,而它的目的是取代 Unix,我不希望人们把 GNU 称为 “Unix 系统”。因此,我提出了一个人们可能真正使用的简洁的名字。在没有特别灵感的情况下,我用了一种很笨的方式取了一个名字。我取了 “可移植操作系统” 的首字母并加上 “ix”。IEEE 马上就采用了这个名字。 + +### 结论 + +POSIX 标准允许开发者使用大部分相同的代码在许多操作系统上创建应用程序、工具和平台。不管怎么说,按照标准写代码并不是一个要求,但当你想把你的代码移植到其他系统时,它确实有很大的帮助。 + +基本上,POSIX 是面向操作系统设计者和软件开发者的,但作为系统的使用者,无论我们是否意识到,我们都受到 POSIX 的影响。正是因为有了这个标准,我们才能够在一个 UNIX 或 Linux 系统上工作,并把工作带到另一个系统上,而且工作起来毫无障碍。作为用户,我们在可用性和跨系统的数据重复使用方面获得了许多好处。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/posix/ + +作者:[Bill Dyer][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/bill/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/What-is-POSIX.png?resize=800%2C450&ssl=1 +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/IBM-system-360-vintage-picture.jpg?resize=800%2C593&ssl=1 +[3]: https://refspecs.linuxfoundation.org/lsb.shtml +[4]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains From 4766c9c52bef807cbab671f2950e74d384fcfd27 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 21 Jan 2022 18:32:57 +0800 Subject: [PATCH 067/334] P @wxy https://linux.cn/article-14201-1.html --- ...9 What is POSIX- Why Does it Matter to Linux-UNIX Users.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md (99%) diff --git a/translated/tech/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md b/published/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md similarity index 99% rename from translated/tech/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md rename to published/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md index e5d826bf15..d875857f58 100644 --- a/translated/tech/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md +++ b/published/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14201-1.html" 什么是 POSIX?为什么它对 Linux/UNIX 用户很重要? ====== From 717e01b0e747d312b62b90d637cf80a17222722f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 21 Jan 2022 18:36:52 +0800 Subject: [PATCH 068/334] R --- ...119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md b/published/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md index d875857f58..e25c700996 100644 --- a/published/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md +++ b/published/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md @@ -7,7 +7,7 @@ [#]: publisher: "wxy" [#]: url: "https://linux.cn/article-14201-1.html" -什么是 POSIX?为什么它对 Linux/UNIX 用户很重要? +Linux 黑话解释:什么是 POSIX? ====== POSIX,你肯定在各种在线论坛和文章中,听到过这个缩写,或读到过关于它的信息。程序员和系统开发人员似乎最关心这个问题。它听起来很神秘,虽然有很多关于这个主题的好资料,但一些讨论区(简洁是它们的特点)并没有详细说明它是什么,这可能会让人困扰。那么,POSIX 到底是什么? From 05939bf1b0551c46820ae56a01ecff1e24ac172a Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 22 Jan 2022 05:02:39 +0800 Subject: [PATCH 069/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220121=20?= =?UTF-8?q?Make=20a=20video=20game=20with=20Bitsy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220121 Make a video game with Bitsy.md --- .../20220121 Make a video game with Bitsy.md | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 sources/tech/20220121 Make a video game with Bitsy.md diff --git a/sources/tech/20220121 Make a video game with Bitsy.md b/sources/tech/20220121 Make a video game with Bitsy.md new file mode 100644 index 0000000000..a4b6ddbb91 --- /dev/null +++ b/sources/tech/20220121 Make a video game with Bitsy.md @@ -0,0 +1,101 @@ +[#]: subject: "Make a video game with Bitsy" +[#]: via: "https://opensource.com/article/22/1/bitsy-game-design" +[#]: author: "Peter Cheer https://opensource.com/users/petercheer" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Make a video game with Bitsy +====== +Bitsy is an open source video game designer. Its minimalistic features +make it prime for anyone to explore their creativity. +![Gaming artifacts with joystick, GameBoy, paddle][1] + +There are many game design programs and many different possible approaches to game design, but for me, the one that stands out is Bitsy. Created by Adam Le Doux in 2017 and released under an MIT license, Bitsy is, in the words of its creator: "A little editor for little games or worlds. The goal is to make it easy to make games where you can walk around, talk to people, and be somewhere." + +### Install Bitsy + +Bitsy is written in JavaScript and produces HTML5 games. You can download it from [GitHub][2] or the [creator's website][3]. It's small, easy to learn, has a distinctive bit map art style, is intentionally short on features, and is limited in what it can do. + +Despite (or perhaps because of) these limitations, Bitsy has attracted a vibrant user community since it was released. The two main approaches users have taken to Bitsy have been embracing the limitations and seeking to push against the limitations to see how far you can go. + +### Creative bounds + +The limitations of Bitsy means that accepting them and still producing a satisfying game becomes a challenge demanding inventiveness and creativity. You can see and play some of the impressive games produced with Bitsy online at the [Itch.io website][4]. At the same time, people have come up with hacks, tweaks, and extensions. These have pushed against some of the limitations without sacrificing the essence of Bitsy. + +The basic elements in Bitsy are an avatar representing the player, rooms where the game action takes place, sprites (non-player characters that you can interact with), and items. There's a bitmap editor for creating these elements, which also allows for simple two-frame animations. + +![Bitsy bitmap editor][5] + +(Peter Cheer, [CC BY-SA 4.0][6]) + +Working within Bitsy relies on conditional variables rather than full-fledged scripting, making it easy to learn for those without a background in coding and sometimes frustrating to those expecting more flexibility. + +If you want to see the basics of Bitsy, you can do that online at the creator's website, or download it and run it locally. + +![Bitsy room editor][7] + +(Peter Cheer, [CC BY-SA 4.0][6]) + +### Documentation + +There isn't just one place to go for documentation about Bitsy. Various short videos are available on YouTube if you want to see Bitsy in action. I prefer text-based tutorials, and the three resources I found most useful are: + + * [The official Bitsy tutorial][8] made available on the Itch.io site is by Claire Morwood + * [Bitsy workshop PDF][9] by user haraiva + * [Bitsy variables][10] tutorial by user ayolland + + + +Read through the tutorials, try out some Bitsy games, and get creating something of your own. Keep it simple to start with. Once you've become comfortable with Bitsy, you may want to investigate some of the [tools, hacks, and extensions][11] that people have created for it. + +It's the perfect tool for educators, too, and there's even a [Bitsy class][12] curriculum by educator Hal Meeks available online. + +You can also find heaps of game assets that people have made for Bitsy on the [Itch.io website][13]. + +### Twine integration + +You may have already tried the popular browser-based game development tool [Twine][14]. You can integrate Bitsy with Twine by varying degrees. Integration can extend from simply placing a Bitsy game in an iframe to display inside your Twine game up to sharing variables between the two engines and dialogue commands which let you execute basic Twine commands inside a Bitsy game! If these possibilities interest you, then look at: + + * [Combining Bitsy and Twine tutorial][15] + * [Bitsy hacks][16] + * [Freya's Twisty Template][17] + + + +### Bitsy for beginners + +Beginners can get started easily with Bitsy, whether you're new to programming or just to game design. With it, you can explore all its possibilities for sparking creativity, imagination, and inventiveness. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/bitsy-game-design + +作者:[Peter Cheer][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/petercheer +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open_gaming_games_roundup_news.png?itok=KM0ViL0f (Gaming artifacts with joystick, GameBoy, paddle) +[2]: https://github.com/le-doux/bitsy +[3]: https://ledoux.itch.io/bitsy +[4]: https://itch.io/games/tag-bitsy +[5]: https://opensource.com/sites/default/files/uploads/bitsy-editor-sprite.jpg (Bitsy bitmap editor) +[6]: https://creativecommons.org/licenses/by-sa/4.0/ +[7]: https://opensource.com/sites/default/files/uploads/bitsy-editor-room.jpg (Bitsy room editor) +[8]: https://www.shimmerwitch.space/bitsyTutorial.html +[9]: https://static1.squarespace.com/static/58930a6c893fc0a33ae624db/t/5bacd94ac83025ead3937071/1538054510407/BITSY-WORKSHOP.pdf +[10]: https://ayolland.itch.io/trevor/devlog/29520/bitsy-variables-a-tutorial +[11]: https://itch.io/tools/tag-bitsy +[12]: https://halmeeks.net/bitsyclass/ +[13]: https://itch.io/game-assets/tag-bitsy +[14]: https://opensource.com/article/18/2/twine-gaming +[15]: https://spdrcstl.com/blog/bitsy-twine-tutorial.html +[16]: https://github.com/seleb/bitsy-hacks/blob/main/dist/twine-bitsy-comms.js +[17]: https://communistsister.itch.io/twitsy-template-1 From 856d3a3c12eb5577605c89a2db00b5b120faa92a Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 22 Jan 2022 05:02:50 +0800 Subject: [PATCH 070/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220121=20?= =?UTF-8?q?What=20you=20need=20to=20know=20about=20fuzz=20testing=20and=20?= =?UTF-8?q?Go?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220121 What you need to know about fuzz testing and Go.md --- ... need to know about fuzz testing and Go.md | 163 ++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 sources/tech/20220121 What you need to know about fuzz testing and Go.md diff --git a/sources/tech/20220121 What you need to know about fuzz testing and Go.md b/sources/tech/20220121 What you need to know about fuzz testing and Go.md new file mode 100644 index 0000000000..47f60db5de --- /dev/null +++ b/sources/tech/20220121 What you need to know about fuzz testing and Go.md @@ -0,0 +1,163 @@ +[#]: subject: "What you need to know about fuzz testing and Go" +[#]: via: "https://opensource.com/article/22/1/native-go-fuzz-testing" +[#]: author: "Gaurav Kamathe https://opensource.com/users/gkamathe" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +What you need to know about fuzz testing and Go +====== +The Go team has accepted a proposal to add fuzz testing support to the +language. +![Person using a laptop][1] + +The usage of [Go][2] is growing rapidly. It is now the preferred language for writing cloud-native software, container software, command-line tools, databases, and more. Go has had built-in [support for testing][3] for quite some time now. It makes writing tests and running them using the Go tool relatively easy. + +### What is fuzz testing? + +Fuzzing, sometimes also called fuzz testing, is the practice of giving unexpected input to your software. Ideally, this test causes your application to crash, or behave in unexpected ways. Regardless of what happens, you can learn a lot from how your code reacts to data it wasn't programmed to accept, and you can add appropriate error handling. + +Any given software program consists of instructions that accept input or data from various sources, then it processes this data and generates appropriate output. As software gets developed, a team of test engineers tests this software to find bugs in the software that can then be reported and fixed. Often, the intent is to see if the software behaves as expected. Testing can further get divided into multiple areas, such as functional testing, integration testing, performance testing, and more. Each focuses on a specific aspect of the software functionality to find bugs or improve reliability or performance. + +Fuzzing takes this testing process a step further and tries to provide "invalid" or "random" data to the software program. This is intentional, and the expectation is that the program should crash or behave unexpectedly to uncover bugs in the program so the developers can fix them. Like testing, doing this manually doesn't scale, so many fuzzing tools have been written to automate this process. + +### Software testing in Go + +As an example to test `Add()` function within `add.go`, you could write tests within `add_test.go` by importing the "testing" package and adding the test functionality within a function starting with `TestXXX()`. + +Given this code: + + +``` + + +func Add(num1, num2 int) int { +} + +``` + +In a file called `add_test.go`, you might have this code for testing: + + +``` + + +import "testing" + +func TestAdd(t *testing.T) { +} + +``` + +Run the test: + + +``` +`$ go test` +``` + +### Addition of fuzz testing support + +The Go team has accepted a [proposal to add fuzz testing support][4] to the language to further this effort. This involves adding a new `testing.F` type, the addition of `FuzzXXX()` functions within the `_test.go` files, and to run these tests with the `-fuzz` option is being added to the Go tool. + +In a file called `add_test.go`: + + +``` + + +func FuzzAdd(f *testing.F) { +} + +``` + +Run the code: + + +``` +`$ go test -fuzz` +``` + +This [feature is experimental][5] at the time of writing, but it should be included in the 1.18 release. Also, many features like `-keepfuzzing` and `-race` are not supported at the moment. The Go team has recently published [a tutorial on fuzzing][6], which is well worth a read. + +### Get the latest features with gotip installation + +If you are enthusiastic and wish to try out the feature before the official release, you can utilize `gotip`, which allows you to test upcoming Go features and provide feedback. To install `gotip`, you can use the commands below. After installation, you can use the `gotip` utility to compile and run the program instead of the usual `go` utility. + + +``` + + +$ go install golang.org/dl/gotip@latest +$ gotip download + +$ gotip version +go version devel go1.18-f009910 Thu Jan 6 16:22:21 2022 +0000 linux/amd64 +$ + +``` + +### Fuzzing opinions in the community + +Fuzzing is often a point of discussion among the software community, and we find people on both ends of the spectrum. Some consider it a useful technique to find bugs, especially on the security front. Whereas given the required resources (CPU/memory) for fuzzing, some consider it a waste or prefer other techniques over it. This is even evident in the Go team as well. We can see Go co-founder Rob Pike being slightly skeptical about the uses of fuzzing and its implementation in Go. + +> _... Although fuzzing is good at finding certain classes of bugs, it is very expensive in CPU and storage, and cost/benefit ratio remains unclear. I worry about wasting energy and filling up git repos with testdata noise..._ +> +> _~_[Rob Pike][7] + +However, another member of the Go security team, Filo Sottile, seems quite optimistic about the addition of fuzz support to Go, also backing it up with some examples and wants it to be a part of the development process. + +> *I like to say that fuzzing finds bugs at the margin. It's why we are interested in it as the security team: bugs caught at the margin are ones that don't make it into production to become vulnerabilities. * +> +> _We want fuzzing to be part of the development—not build or security—process: make a change to the relevant code…_ +> +> _~_[Filo Sottile][8] + +### Real-world fuzzing + +To me, fuzzing seems quite effective at findings bugs and making systems more secure and resilient. To give an example, even the Linux kernel is fuzz tested using a tool called [syzkaller][9], and it has uncovered a [variety of bugs][10]. + +[AFL][11]** **is another popular fuzzer, used to fuzz programs written in C/C++. + +There were options available for fuzzing Go programs as well in the past, one of them being [go-fuzz][12] which Filo mentions in his GitHub comments + +> _The track record of go-fuzz provides pretty amazing evidence that fuzzing is good at finding bugs that humans had not found. In my experience, just a few CPU minutes of fuzzing can be extremely effective at the margin_ + +### Why add native fuzzing support in Go + +If the requirement is to fuzz Go programs and existing tools like `go-fuzz` could do it, why add native fuzzing support to the language? The [Go fuzzing design draft][13] provides some rationale for doing so. The idea was to bring simplicity to the process as using the above tools adds more work for the developer and has many missing features. If you are new to fuzzing, I recommend reading the design draft document. + +> Developers could use tools like go-fuzz or fzgo (built on top of go-fuzz) to solve some of their needs. However, each existing solution involves more work than typical Go testing and is missing crucial features. Fuzz testing shouldn't be any more complicated or less feature-complete than other types of Go testing (like benchmarking or unit testing). Existing solutions add extra overhead, such as custom command-line tools, + +### Fuzz tooling + +Fuzzing is a welcome addition to the Go language's long list of desired features. Although experimental for now, it's expected to become robust in upcoming releases. This gives sufficient time to try it out and explore its use cases. Rather than seeing it as an overhead, it should be seen as an effective testing tool to uncover hidden bugs if used correctly. Teams using Go should encourage its use, starting with developers writing small fuzz tests and testing teams extending it further to utilize its potential fully. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/native-go-fuzz-testing + +作者:[Gaurav Kamathe][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/gkamathe +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) +[2]: https://go.dev/ +[3]: https://pkg.go.dev/testing +[4]: https://github.com/golang/go/issues/44551 +[5]: https://go.dev/blog/fuzz-beta +[6]: https://go.dev/doc/tutorial/fuzz +[7]: https://github.com/golang/go/issues/44551#issuecomment-784584785 +[8]: https://github.com/golang/go/issues/44551#issuecomment-784655571 +[9]: https://github.com/google/syzkaller +[10]: https://github.com/google/syzkaller/blob/master/docs/linux/found_bugs.md +[11]: https://github.com/google/AFL +[12]: https://github.com/dvyukov/go-fuzz +[13]: https://go.googlesource.com/proposal/+/master/design/draft-fuzzing.md From 68662382ab3f968a1f66c989efc18734bbeac89c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 22 Jan 2022 05:03:11 +0800 Subject: [PATCH 071/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220121=20?= =?UTF-8?q?System76=E2=80=99s=20COSMIC=20Desktop=20Panel=20Looks=20Refresh?= =?UTF-8?q?ing!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md --- ...s COSMIC Desktop Panel Looks Refreshing.md | 132 ++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 sources/news/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md diff --git a/sources/news/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md b/sources/news/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md new file mode 100644 index 0000000000..d3186d4973 --- /dev/null +++ b/sources/news/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md @@ -0,0 +1,132 @@ +[#]: subject: "System76’s COSMIC Desktop Panel Looks Refreshing!" +[#]: via: "https://news.itsfoss.com/system76-cosmic-panel/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +System76’s COSMIC Desktop Panel Looks Refreshing! +====== + +The development work for System76’s exciting new Rust-based COSMIC desktop is now underway. + +While [we already tried it out][1] using the early code available, we get to see more of it now. Thanks to some prototypes available in its [GitHub repository][2] and a [Figma document][3], we get to see more of it! + +Notably, we get to see the top panel and the system tray as you would expect in the COSMIC desktop. + +It is still a work in progress and is subject to change. + +### Top Panel in COSMIC Desktop + +Pop!_OS relies on GNOME extensions to offer more functionalities through the top panel or the system tray icons. + +With the upcoming Rust-based COSMIC desktop, it looks like they’re creating new applets that blend in with the current look and offer more functionality out of the box. + +Eduardo Flores, a developer, [breaks it down][4] to learn the key differences and how System76 aims to make it work. + +And, this is what makes it more interesting: + +> Looks like System76 is moving away from the traditional “extensions” and plans to design an API for third party applets, this is similar to what KDE, XFCE and others are doing. +> +> This is exciting news, this will make COSMIC a much more powerful desktop environment, making it extendable and customizable. + +Also, it seems that these applets can also be placed in the dock along with the top panel. We’ll have to see more of it in action in one of its future beta releases. + +Here, let me highlight the fundamental changes observed from the mockups available: + +#### 1\. Sound Applet + +![Rust-based COSMIC Desktop \(Sound Applet\)][5] + +Compared to what we have now, COSMIC aims to add granular controls like selecting Input/Output devices, option to toggle media controls on the top panel, control playing media, and access the sound settings. + +While the mockup doesn’t show album art, it will include it down the road before release. + +For reference, here’s what the Pop!_OS top panel options look like now: + +![Pop!_OS 21.10 \(COSMIC, GNOME-based\)][6] + +#### 2\. Power Applet + +![][7] + +It is good to see a dedicated power button to quickly access system settings, lock screen, and log out. + +Also, the buttons for suspending, restart, and shut down should improve usability, eliminating any extra clicks to shut down the computer. + +#### 3\. Network Applet + +While you can easily turn on/off the Wired/Wireless networks, a separate window pops up to select Wi-Fi network and enter the password taking up the entire screen. + +![][8] + +But, it looks like we can finally type in the password, connect to available wireless networks, and retry the failed connection without getting distracted from the active window. All that happens from the network applet on the system tray, as shown in the screenshot above. + +Similarly, you get to see more information about your wired connection, including the IP address and speed. + +#### 4\. Date, Time, and Calendar Applet + +![][9] + +The most important calendar applet looks much more functional and informative. The notification area no longer resides here (considering it has a separate applet now), making it a cleaner experience to focus on what you want here. + +Several subtle visual enhancements like accent color to highlight a row in the calendar should make it easy to understand. + +#### 5\. Notifications Center + +![][10] + +As I mentioned earlier, notifications now have a separate space. The notification applet will stack up all notifications and allow you to expand them if needed or clear them all. + +We still have the Do Not Disturb toggle and quick access to notification settings. + +#### 6\. Graphics Mode Applet + +![][11] + +This should be incredibly useful for laptop users, making it seamless to switch between graphics and keep an eye on what’s active. + +In addition to all these, a Bluetooth applet, a battery power mode applet, and a few more things like the ability to change input language or input source. + +![][12] + +![][13] + +Given this is the first look for the top-panel of Rust-based COSMIC desktop, it looks like we have a lot to go through! + +### Closing Thoughts + +Overall, System76 is gearing up to give us a highly customizable yet simplified version of the COSMIC desktop. + +And all of that should contribute to a unique desktop experience. Of course, you will have to say goodbye to GNOME next year. + +What do you think? Let me know your thoughts in the comments below! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/system76-cosmic-panel/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/system76-rust-cosmic-desktop/ +[2]: https://github.com/pop-os/cosmic-panel/issues +[3]: https://www.figma.com/proto/ZeGTqzAM7dVZgjEW3uhxcd/Top-panel?node-id=559%3A11100&scaling=scale-down&page-id=559%3A11099&starting-point-node-id=559%3A11100&show-proto-sidebar=1 +[4]: https://blog.edfloreshz.dev/articles/linux/system76/cosmic-panel/ +[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjcwMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUxNiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ3MCIgd2lkdGg9IjU5OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9Ijk3NiIgd2lkdGg9Ijc2OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjYwMyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[10]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9Ijg1NiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[11]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjYzMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[12]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjgyMCIgd2lkdGg9IjU5OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[13]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjY1MiIgd2lkdGg9IjY3OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= From 0a104c73c9f7c1cc3e416e9bf95a823936c33242 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 22 Jan 2022 09:01:23 +0800 Subject: [PATCH 072/334] A --- ...20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md b/sources/news/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md index d3186d4973..fe4894b475 100644 --- a/sources/news/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md +++ b/sources/news/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/system76-cosmic-panel/" [#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 8d4593c46257d3d12b91ed841c1395b9bafaa3bd Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 22 Jan 2022 11:04:55 +0800 Subject: [PATCH 073/334] TRP @wxy https://linux.cn/article-14203-1.html --- ...s COSMIC Desktop Panel Looks Refreshing.md | 136 ++++++++++++++++++ ...s COSMIC Desktop Panel Looks Refreshing.md | 132 ----------------- 2 files changed, 136 insertions(+), 132 deletions(-) create mode 100644 published/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md delete mode 100644 sources/news/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md diff --git a/published/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md b/published/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md new file mode 100644 index 0000000000..d99744502b --- /dev/null +++ b/published/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md @@ -0,0 +1,136 @@ +[#]: subject: "System76’s COSMIC Desktop Panel Looks Refreshing!" +[#]: via: "https://news.itsfoss.com/system76-cosmic-panel/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14203-1.html" + +System76 的 COSMIC 桌面面板看起来很清爽! +====== + +> System76 分享了其即将推出的使用 Rust 开发的 COSMIC 桌面的顶部面板草图。看起来令人惊叹! + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-top-panel-ft.png?w=1200&ssl=1) + +System76 令人兴奋的用 Rust 开发的 COSMIC 桌面的开发工作现在正在进行中。 + +虽然我们已经用早期的代码 [试过了][1],但我们现在可以看到更多的东西。从其 [GitHub 仓库][2] 和 [Figma 文档][3] 的一些原型中,我们可以看到它的更多信息。 + +值得注意的是,我们可以看到顶部面板和系统托盘,正如你在 COSMIC 桌面上所期望的那样。 + +这仍是一项正在进行的工作,可能会有变化。 + +### COSMIC 桌面的顶部面板 + +Pop!_OS 依赖于 GNOME 扩展来通过顶部面板或系统托盘图标提供更多的功能。 + +随着即将推出的使用 Rust 开发的 COSMIC 桌面,看起来他们正在创建新的小程序,与当前的外观相融合,并提供更多的功能。 + +开发者 Eduardo Flores [分解研究][4] 了它,发现了关键的区别以及 System76 的目标是如何使其发挥作用。 + +而且,这也是它更有趣的地方: + +> 看起来 System76 正在摆脱传统的“扩展”,计划为第三方小程序设计一个 API,这与 KDE、XFce 和其他公司的做法类似。 +> +> 这是一个令人兴奋的消息,将使 COSMIC 成为一个更强大的桌面环境,使其可以扩展和定制。 + +另外,似乎这些小程序也可以和顶部面板一起放在坞站里。我们会在其未来的某个测试版中看到更多的实际情况。 + +在这里,让我重点介绍一下从现有的草图中观察到的基本变化: + +#### 1、声音小程序 + +![用 Rust 开发的 COSMIC 桌面(声音小程序)][5] + +与我们现在所拥有的相比,COSMIC 的目标是增加细化的控制,如选择输入/输出设备、在顶部面板上切换媒体控制的选项、控制媒体播放,以及访问声音设置。 + +虽然草图没有显示专辑封面,但在发布前会包括它。 + +作为参考,以下是 Pop!_OS 顶部面板选项现在的样子。 + +![Pop!_OS 21.10(COSMIC,基于 GNOME)][6] + +#### 2、电源小程序 + +![][7] + +很高兴看到有一个专门的电源按钮来快速访问系统设置、锁屏和注销。 + +另外,暂停、重启和关机的按钮应该可以提高可用性,关闭计算机不用额外的点击。 + +#### 3、网络小程序 + +虽然你可以很容易地打开或关闭有线、无线网络,但会弹出一个占据了整个屏幕的单独窗口来选择 Wi-Fi 网络并输入密码。 + +![][8] + +但是,看起来我们终于可以在这里输入密码,连接到可用的无线网络,并重试失败的连接,而不必从活动窗口分心。所有这些都发生在系统托盘上的网络小程序上,如上面的截图所示。 + +同样,你可以看到关于你的有线连接的更多信息,包括 IP 地址和速度。 + +#### 4、日期、时间和日历小程序 + +![][9] + +最重要的日历小程序看起来更加实用,信息量更大。通知区不再驻留在这里(它现在有一个单独的小程序),使它的体验更干净,可以把注意力放在你关注的东西上。 + +一些细微的视觉改进,比如用重点颜色来突出日历中的某一行,应该会使它更容易理解。 + +#### 5、通知中心 + +![][10] + +正如我前面提到的,通知现在有一个独立的空间。通知小程序会将所有的通知堆积起来,并允许你在需要时展开它们,或者将它们全部清除。 + +我们仍然有“请勿打扰”开关,并可以快速访问通知设置。 + +#### 6、图形模式小程序 + +![][11] + +这对笔记本电脑用户来说应该是非常有用的,可以在图形模式之间无缝切换,并可以看到当前使用的哪种模式。 + +除了所有这些,还有一个蓝牙小程序、一个电池电源模式小程序,以及一些其他的东西,比如改变输入语言或输入源的能力。 + +![][12] + +![][13] + +鉴于这是初次看到使用 Rust 开发 COSMIC 桌面顶部面板的外观,看来我们有很多东西要去看了。 + +### 总结 + +总的来说,System76 正准备为我们提供一个高度可定制但又简化的 COSMIC 桌面版本。 + +而所有这些都应该有助于形成一种独特的桌面体验。当然,明年你就得在 Pop!_OS 中和 GNOME 说再见了。 + +你怎么看?请在下面的评论中告诉我你的想法! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/system76-cosmic-panel/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/system76-rust-cosmic-desktop/ +[2]: https://github.com/pop-os/cosmic-panel/issues +[3]: https://www.figma.com/proto/ZeGTqzAM7dVZgjEW3uhxcd/Top-panel?node-id=559%3A11100&scaling=scale-down&page-id=559%3A11099&starting-point-node-id=559%3A11100&show-proto-sidebar=1 +[4]: https://blog.edfloreshz.dev/articles/linux/system76/cosmic-panel/ +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pop-os-cosmic-sound-applet-early.png?w=820&ssl=1 +[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pop-os-current-top-panel.png?resize=1568%2C1037&ssl=1 +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-new-power-applet.png?w=598&ssl=1 +[8]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-new-network-applet.png?w=768&ssl=1 +[9]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-new-date-panel.png?w=1188&ssl=1 +[10]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-new-notifications.png?w=1132&ssl=1 +[11]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-new-graphics-applet.png?w=822&ssl=1 +[12]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-new-battery.png?w=598&ssl=1 +[13]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-new-bluetooth.png?w=678&ssl=1 diff --git a/sources/news/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md b/sources/news/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md deleted file mode 100644 index fe4894b475..0000000000 --- a/sources/news/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md +++ /dev/null @@ -1,132 +0,0 @@ -[#]: subject: "System76’s COSMIC Desktop Panel Looks Refreshing!" -[#]: via: "https://news.itsfoss.com/system76-cosmic-panel/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -System76’s COSMIC Desktop Panel Looks Refreshing! -====== - -The development work for System76’s exciting new Rust-based COSMIC desktop is now underway. - -While [we already tried it out][1] using the early code available, we get to see more of it now. Thanks to some prototypes available in its [GitHub repository][2] and a [Figma document][3], we get to see more of it! - -Notably, we get to see the top panel and the system tray as you would expect in the COSMIC desktop. - -It is still a work in progress and is subject to change. - -### Top Panel in COSMIC Desktop - -Pop!_OS relies on GNOME extensions to offer more functionalities through the top panel or the system tray icons. - -With the upcoming Rust-based COSMIC desktop, it looks like they’re creating new applets that blend in with the current look and offer more functionality out of the box. - -Eduardo Flores, a developer, [breaks it down][4] to learn the key differences and how System76 aims to make it work. - -And, this is what makes it more interesting: - -> Looks like System76 is moving away from the traditional “extensions” and plans to design an API for third party applets, this is similar to what KDE, XFCE and others are doing. -> -> This is exciting news, this will make COSMIC a much more powerful desktop environment, making it extendable and customizable. - -Also, it seems that these applets can also be placed in the dock along with the top panel. We’ll have to see more of it in action in one of its future beta releases. - -Here, let me highlight the fundamental changes observed from the mockups available: - -#### 1\. Sound Applet - -![Rust-based COSMIC Desktop \(Sound Applet\)][5] - -Compared to what we have now, COSMIC aims to add granular controls like selecting Input/Output devices, option to toggle media controls on the top panel, control playing media, and access the sound settings. - -While the mockup doesn’t show album art, it will include it down the road before release. - -For reference, here’s what the Pop!_OS top panel options look like now: - -![Pop!_OS 21.10 \(COSMIC, GNOME-based\)][6] - -#### 2\. Power Applet - -![][7] - -It is good to see a dedicated power button to quickly access system settings, lock screen, and log out. - -Also, the buttons for suspending, restart, and shut down should improve usability, eliminating any extra clicks to shut down the computer. - -#### 3\. Network Applet - -While you can easily turn on/off the Wired/Wireless networks, a separate window pops up to select Wi-Fi network and enter the password taking up the entire screen. - -![][8] - -But, it looks like we can finally type in the password, connect to available wireless networks, and retry the failed connection without getting distracted from the active window. All that happens from the network applet on the system tray, as shown in the screenshot above. - -Similarly, you get to see more information about your wired connection, including the IP address and speed. - -#### 4\. Date, Time, and Calendar Applet - -![][9] - -The most important calendar applet looks much more functional and informative. The notification area no longer resides here (considering it has a separate applet now), making it a cleaner experience to focus on what you want here. - -Several subtle visual enhancements like accent color to highlight a row in the calendar should make it easy to understand. - -#### 5\. Notifications Center - -![][10] - -As I mentioned earlier, notifications now have a separate space. The notification applet will stack up all notifications and allow you to expand them if needed or clear them all. - -We still have the Do Not Disturb toggle and quick access to notification settings. - -#### 6\. Graphics Mode Applet - -![][11] - -This should be incredibly useful for laptop users, making it seamless to switch between graphics and keep an eye on what’s active. - -In addition to all these, a Bluetooth applet, a battery power mode applet, and a few more things like the ability to change input language or input source. - -![][12] - -![][13] - -Given this is the first look for the top-panel of Rust-based COSMIC desktop, it looks like we have a lot to go through! - -### Closing Thoughts - -Overall, System76 is gearing up to give us a highly customizable yet simplified version of the COSMIC desktop. - -And all of that should contribute to a unique desktop experience. Of course, you will have to say goodbye to GNOME next year. - -What do you think? Let me know your thoughts in the comments below! - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/system76-cosmic-panel/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://news.itsfoss.com/system76-rust-cosmic-desktop/ -[2]: https://github.com/pop-os/cosmic-panel/issues -[3]: https://www.figma.com/proto/ZeGTqzAM7dVZgjEW3uhxcd/Top-panel?node-id=559%3A11100&scaling=scale-down&page-id=559%3A11099&starting-point-node-id=559%3A11100&show-proto-sidebar=1 -[4]: https://blog.edfloreshz.dev/articles/linux/system76/cosmic-panel/ -[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjcwMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUxNiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ3MCIgd2lkdGg9IjU5OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9Ijk3NiIgd2lkdGg9Ijc2OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjYwMyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[10]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9Ijg1NiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[11]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjYzMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[12]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjgyMCIgd2lkdGg9IjU5OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[13]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjY1MiIgd2lkdGg9IjY3OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= From 378a8efee0ea45c73231bd49bf38b298a278c2a6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 22 Jan 2022 11:29:44 +0800 Subject: [PATCH 074/334] RP @geekpi https://linux.cn/article-14204-1.html --- .../20220107 Try FreeDOS in 2022.md | 58 +++++++++---------- 1 file changed, 27 insertions(+), 31 deletions(-) rename {translated/tech => published}/20220107 Try FreeDOS in 2022.md (62%) diff --git a/translated/tech/20220107 Try FreeDOS in 2022.md b/published/20220107 Try FreeDOS in 2022.md similarity index 62% rename from translated/tech/20220107 Try FreeDOS in 2022.md rename to published/20220107 Try FreeDOS in 2022.md index 3f0ba84ee5..bc732dce25 100644 --- a/translated/tech/20220107 Try FreeDOS in 2022.md +++ b/published/20220107 Try FreeDOS in 2022.md @@ -3,43 +3,41 @@ [#]: author: "Jim Hall https://opensource.com/users/jim-hall" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14204-1.html" -在 2022 年尝试 FreeDOS +2021 总结:尝试 FreeDOS ====== -为这个免费操作系统的新用户和老用户提供 15 种资源。 -![Puzzle pieces coming together to form a computer screen][1] -在整个 80 年代和 90 年代,DOS 是桌面之王。世界各地的程序员不满足于 DOS 的专利版本,他们共同创建了一个名为 FreeDOS 的开源版本,该版本于 1994 年首次推出。[FreeDOS 项目][2] 在 2021 年及以后继续发展。 +> 为这个自由操作系统的新用户和老用户提供 15 种资源。 -我们在 Opensource.com 上发表了几篇关于 FreeDOS 的文章,以帮助新用户开始使用 FreeDOS 和学习新程序。以下是去年我们最受欢迎的几篇 FreeDOS 文章。 +![](https://img.linux.net.cn/data/attachment/album/202201/22/112846m55u0f3u5rh6i6e3.jpg) + +在整个上世纪 80 年代和 90 年代,DOS 是桌面之王。世界各地的程序员不满足于 DOS 的专有版本,他们共同创建了一个名为 FreeDOS 的开源版本,该版本于 1994 年首次推出。[FreeDOS 项目][2] 在 2021 年及以后还在继续发展。 + +我们发表了几篇关于 FreeDOS 的文章,以帮助新用户开始使用 FreeDOS 和学习新程序。以下是去年我们最受欢迎的几篇 FreeDOS 文章。 ### 初学 FreeDOS 你是 FreeDOS 的新手吗?如果你想了解如何启动和运行 FreeDOS 的基本知识,请查看这些文章: - * [开始使用 FreeDOS][3]:它看起来像复古的计算机,但 FreeDOS 是一个现代的操作系统,你可以用它来完成事情。 - * [FreeDOS 如何启动][4]:了解你的计算机是如何引导和启动 FreeDOS 的,从开机到命令行提示。 + * [开始使用 FreeDOS][3]:它看起来像复古计算时代,但 FreeDOS 是一个现代的操作系统,你可以用它来完成事情。 + * [FreeDOS 如何启动][4]:了解你的计算机是如何引导和启动 FreeDOS 的,从开机到命令行提示符。 * [用纯文本配置 FreeDOS][5]:学习如何用 `fdconfig.sys` 文件来配置 FreeDOS。 * [如何用 CD 和 DIR 浏览 FreeDOS][6]:只需掌握两个命令,`DIR` 和 `CD`,你就可以在命令行中浏览你的 FreeDOS 系统。 - * [在 FreeDOS 中设置和使用环境变量][7]:环境变量在几乎所有的命令行环境中都有帮助,包括 FreeDOS。 - - + * [在 FreeDOS 中设置和使用环境变量][7]:环境变量在几乎所有的命令行环境中都有用,包括 FreeDOS。 ### Linux 用户的 FreeDOS 如果你已经熟悉了 Linux 的命令行,你可能想试试这些在 FreeDOS 上创造类似环境的命令和程序: - * [给 Linux 爱好者的 FreeDOS命令][8]:如果你已经熟悉了 Linux 的命令行,可以试试这些命令来帮助你轻松进入 FreeDOS。 + * [给 Linux 爱好者的 FreeDOS 命令][8]:如果你已经熟悉了 Linux 的命令行,可以试试这些命令来帮助你轻松进入 FreeDOS。 * [在 FreeDOS 中像 Emacs 一样编辑文本][9]:如果你已经熟悉了 GNU Emacs,你应该在 Freemacs 中感到很自在。 * [在 Linux 和 FreeDOS 之间复制文件][10]:学习如何在 FreeDOS 虚拟机和 Linux 桌面系统之间传输文件。 - * [如何在 FreeDOS 上归档文件][11]:在 FreeDOS 版本的 **`tar`**,但在 DOS 上归档的标准方法是 Zip 和 Unzip。 + * [如何在 FreeDOS 上归档文件][11]:这是 FreeDOS 版本的 `tar`,在 DOS 上归档的标准方法是 Zip 和 Unzip。 * [在 FreeDOS 上使用这个怀旧的文本编辑器][12]:让人联想到 Linux ed(1),当你想用老式的方法编辑文本时,Edlin 是一种乐趣。 - - ### 使用 FreeDOS 当你启动进入 FreeDOS,你可以使用这些很棒的工具和应用来完成工作或安装其他软件: @@ -50,11 +48,9 @@ * [为什么我喜欢用 GW-BASIC 在 FreeDOS 上编程][16]:BASIC 是我进入计算机编程的起点。我已经很多年没有写过 BASIC 代码了,但我对 BASIC 和 GW-BASIC 永远怀有好感。 * [用 Bywater BASIC 在 FreeDOS 上编程][17]:在你的 FreeDOS 系统上安装 Bywater BASIC,并开始尝试使用 BASIC 编程。 +在其近 30 年的历程中,FreeDOS 一直试图成为一个现代 DOS。如果你想了解更多,你可以在 [FreeDOS 简史][18] 中阅读关于 FreeDOS 的起源和发展。另外,请看 Don Watkins 关于 FreeDOS 的采访:[一个大学生是如何创立一个自由和开源的操作系统][19]。 - -在其近 30 年的历程中,FreeDOS 一直试图成为一个现代 DOS。如果你想了解更多,你可以在 [FreeDOS 简史][18]中阅读关于 FreeDOS 的起源和发展。另外,请看 Don Watkins 关于 FreeDOS 的采访:[一个大学生是如何创立一个自由和开源的操作系统][19]。 - -如果你想尝试 FreeDOS,请下载 2021 年 12 月发布的 FreeDOS 1.3 RC5。这个版本有大量的新变化和改进,包括更新的内核和命令 shell,新的程序和游戏,更好的国际支持,以及网络支持。从[FreeDOS 网站][2]下载 FreeDOS 1.3 RC5。 +如果你想尝试 FreeDOS,请下载 2021 年 12 月发布的 FreeDOS 1.3 RC5。这个版本有大量的新变化和改进,包括更新的内核和命令 shell,新的程序和游戏,更好的国际支持,以及网络支持。从 [FreeDOS 网站][2]下载 FreeDOS 1.3 RC5。 -------------------------------------------------------------------------------- @@ -63,7 +59,7 @@ via: https://opensource.com/article/22/1/try-freedos 作者:[Jim Hall][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -71,20 +67,20 @@ via: https://opensource.com/article/22/1/try-freedos [b]: https://github.com/lujun9972 [1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/puzzle_computer_solve_fix_tool.png?itok=U0pH1uwj (Puzzle pieces coming together to form a computer screen) [2]: https://www.freedos.org/ -[3]: https://opensource.com/article/21/6/get-started-freedos -[4]: https://opensource.com/article/21/6/freedos-boots -[5]: https://opensource.com/article/21/6/freedos-fdconfigsys +[3]: https://linux.cn/article-13492-1.html +[4]: https://linux.cn/article-13503-1.html +[5]: https://linux.cn/article-14061-1.html [6]: https://opensource.com/article/21/6/navigate-freedos-cd-dir -[7]: https://opensource.com/article/21/6/freedos-environment-variables -[8]: https://opensource.com/article/21/6/freedos-linux-users +[7]: https://linux.cn/article-13995-1.html +[8]: https://linux.cn/article-14092-1.html [9]: https://opensource.com/article/21/6/freemacs -[10]: https://opensource.com/article/21/6/copy-files-linux-freedos -[11]: https://opensource.com/article/21/6/archive-files-freedos +[10]: https://linux.cn/article-13548-1.html +[11]: https://linux.cn/article-13567-1.html [12]: https://opensource.com/article/21/6/edlin-freedos [13]: https://opensource.com/article/21/6/freedos-text-editor [14]: https://opensource.com/article/21/6/listen-music-freedos -[15]: https://opensource.com/article/21/6/freedos-package-manager +[15]: https://linux.cn/article-14031-1.html [16]: https://opensource.com/article/21/6/freedos-gw-basic [17]: https://opensource.com/article/21/6/freedos-bywater-basic -[18]: https://opensource.com/article/21/6/history-freedos +[18]: https://linux.cn/article-13601-1.html [19]: https://opensource.com/article/21/6/freedos-founder From 494e9b1fb49d957df0505341a4e9faee9ca563bb Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 23 Jan 2022 05:02:21 +0800 Subject: [PATCH 075/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220123=20?= =?UTF-8?q?9=20Open=20Source=20Add-Ons=20to=20Improve=20Your=20Mozilla=20F?= =?UTF-8?q?irefox=20Experience?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md --- ...Improve Your Mozilla Firefox Experience.md | 209 ++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 sources/tech/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md diff --git a/sources/tech/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md b/sources/tech/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md new file mode 100644 index 0000000000..385bc1f8e1 --- /dev/null +++ b/sources/tech/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md @@ -0,0 +1,209 @@ +[#]: subject: "9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience" +[#]: via: "https://itsfoss.com/best-firefox-add-ons/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience +====== + +Mozilla Firefox is easily one of the most popular open-source web browsers among Linux users. + +In fact, it is one of the [best web browsers available for Linux][1]. But, what about its add-ons (or extensions)? + +Considering that you prefer open-source solutions, are you using add-ons for open-source services? What are some of the best open-source Mozilla Firefox add-ons that you can install? + +### Open-Source Mozilla Firefox Extensions You Should Try + +![][2] + +It is important to note that just because it’s Firefox, not every add-on is open-source. + +Furthermore, there are several open-source projects with a Firefox add-on, but with a different license. + +#### 1\. Dark Reader + +![][3] + +Dark Reader is a popular browser extension that lets you turn on the dark mode for websites. The extension simply changes the background and text color to blend in as a dark mode theme. + +By default, it works well with almost every website. However, if you think that a dark mode is unreadable (or doesn’t look good), you can customize the color, contrast, brightness, and grayscale as well. + +You can also choose to enable it on specific websites and have it disabled for the rest. In either case, you can create a list of sites to whitelist/blacklist. + +It is an open-source project that respects users’ privacy. You can explore more about it in its [GitHub page][4] or get the add-on to try it out. + +[Dark Reader][5] + +#### 2\. Bitwarden + +![][6] + +Undoubtedly, one of the [best password managers][7] available out there. + +[Bitwarden][8] is an open-source password manager offering a variety of features. It focuses on providing competitive open-source solutions. + +The password manager add-on available for Mozilla Firefox is no less than any other similar offerings. You get all the essential functionalities starting from generating passwords, managing your vault, along with some advanced options right through the extension. + +In my use case, I don’t find the extension lacking anything at all. And, you should try the add-on if you haven’t already. You can take a look at its [GitHub page][9] to explore more. + +[Bitwarden][10] + +#### 3\. Vimium-FF + +![][11] + +An open-source tool inspired by [Vim keyboard shortcuts][12], originally popular for Chrome, ported to Firefox. + +The add-on is a work in progress for Mozilla Firefox, with no recent activity. However, as an experimental add-on, it still has excellent user reviews. + +This add-on lets you use keyboard shortcuts to improve your browsing experience. For instance, you can set shortcuts to scroll, view source code, enable insert mode, browse the history, check downloads, and more. + +If you are comfortable with keyboard shortcuts, this add-on should be on top of your bucket lists to try if you haven’t. + +You can find its [GitHub page][13] and explore several customized versions (forks) of it as well. + +[Vimium][14] + +#### 4\. uBlock Origin + +![][15] + +If you want to get rid of several dynamic elements in a website to improve the browsing experience, uBlock Origin is a fantastic content blocker for the job. + +For starters, it blocks a wide range of ads, trackers, pop-ups, to make the web page faster to load. It should come in handy if some web pages stutter when it loads up in your browser. + +You can also choose to selectively block/allow JavaScript if a website does not function as it should. It also features filter lists to help you enable aggressive blocking or minimize blocking to balance the web browsing experience without breaking websites. + +Advance features like blocking malicious domains, blocking media bigger than a specific size, should help you stay secure and save internet bandwidth. Explore its [GitHub page][16] for more technical details. + +[uBlock Origin][17] + +#### 5\. LanguageTool + +![][18] + +**Note:** For this list, we try to recommend Firefox add-ons that are totally open-source. But, this is an exception as a non-foss add-on, where the service is originally open-source, but the extension is not. + +[LanguageTool][19] is an open-source grammar and spellchecker that respects your privacy, making it a decent alternative to the likes of Grammarly and others. It is free to use, with an optional premium upgrade for advanced correction features. + +It should be good enough for basic spellcheck and common grammatical mistakes. As I write this, I have LanguageTool Firefox extension active. Not just a privacy-focused, open-source alternative, it works super quickly without impacting your writing experience. + +The server-side is open-source but unfortunately, the add-on is not open-source. They clarified the reason as they do not want competitors to use the add-on and contribute nothing in return (more in their [forum post][20]). + +However, Mozilla gets access to the source code to review with every release, which makes it a recommended add-on to try. You can explore more about the tool on its [official site][21] or its [GitHub page][22]. + +[LanguageTool][23] + +#### 6\. Tabby + +![][24] + +If you want the convenience of managing multiple tabs with different active windows, Tabby should come in handy. + +It simplifies the method of managing several tabs and windows of a browser and also lets you save tabs/windows to use later. When it comes to tab management, Firefox isn’t a champion, so you might want to try this out. + +You can check out its [GitHub page][25] to explore more, or get the add-on below. + +[Tabby][26] + +#### 7\. Emoji + +![][27] + +It isn’t easy to pick or use an emoji using the desktop. With this open-source extension, you get access to several emojis that can be easily copied to the clipboard with a single click. + +The add-on is entirely open-source and also uses some open-source fonts with the add-on. + +You can find more about it on its [GitHub page][28]. + +[Emoji][29] + +#### 8\. DownThemAll + +![][30] + +DownThemAll is a powerful add-on to easily download multiple files/media from a webpage. You can choose to download everything in a single click or customize the ones you want. + +There are some extra options to customize the file name, queue-based downloads, and advanced selection. + +You can explore more about it on its [official website][31] or [GitHub page][32]. + +[DownThemAll][33] + +#### 9\. Tomato Clock + +![][34] + +If you want a Pomodoro functionality in your web browser (like Vivaldi offers out-of-the-box), Tomato Clock is the add-on you need. + +In other words, it lets you set timers to help you break down your work in intervals with short breaks in between. This should help you stay productive without getting overwhelmed with work. + +It is simple to use and also shows you some usage stats to see how well you make use of it. + +You can explore its [GitHub page][35] for technical info or get the extension to start. + +[Tomato Clock][36] + +### Conclusion + +If you are an avid Firefox user, I advise checking out this [helpful list of Firefox keyboard shortcuts][37]. We also have a list of [rather unknown Firefox features][38]. Feel free to check that as well. + +While there are several other useful Firefox add-ons available, I limited the list to the best ones I found myself using. + +What are some of your favorite open-source Firefox add-ons? Let me know in the comments down below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/best-firefox-add-ons/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-browsers-ubuntu-linux/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/firefox-extensions.png?resize=800%2C450&ssl=1 +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/firefox-dark-reader.png?resize=708%2C608&ssl=1 +[4]: https://github.com/darkreader/darkreader +[5]: https://addons.mozilla.org/en-US/firefox/addon/darkreader/ +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/bitwarden-firefox-extension.png?resize=800%2C500&ssl=1 +[7]: https://itsfoss.com/password-managers-linux/ +[8]: https://itsfoss.com/bitwarden/ +[9]: https://github.com/bitwarden/browser +[10]: https://addons.mozilla.org/en-US/firefox/addon/bitwarden-password-manager/ +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/vimium-firefox.png?resize=800%2C553&ssl=1 +[12]: https://itsfoss.com/pro-vim-tips/ +[13]: https://github.com/philc/vimium +[14]: https://addons.mozilla.org/en-US/firefox/addon/vimium-ff/ +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/ublockorigin-firefox.png?resize=647%2C491&ssl=1 +[16]: https://github.com/gorhill/uBlock#ublock-origin +[17]: https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/ +[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/languagetool-firefox.png?resize=710%2C601&ssl=1 +[19]: https://itsfoss.com/languagetool-review/ +[20]: https://forum.languagetool.org/t/about-the-browser-addon-privacy-and-open-source/7505 +[21]: https://languagetool.org +[22]: https://github.com/languagetool-org/languagetool +[23]: https://addons.mozilla.org/firefox/addon/languagetool/ +[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/tabby-firefox.png?resize=800%2C548&ssl=1 +[25]: https://github.com/Bill13579/tabby +[26]: https://addons.mozilla.org/en-US/firefox/addon/tabby-window-tab-manager/ +[27]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/emoji-firefox.png?resize=685%2C508&ssl=1 +[28]: https://github.com/Sav22999/emoji +[29]: https://addons.mozilla.org/en-US/firefox/addon/emoji-sav/ +[30]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/downthemall-firefox.png?resize=643%2C408&ssl=1 +[31]: https://www.downthemall.org +[32]: https://github.com/downthemall/downthemall +[33]: https://addons.mozilla.org/en-US/firefox/addon/downthemall/ +[34]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/tomato-firefox.png?resize=524%2C428&ssl=1 +[35]: https://github.com/samueljun/tomato-clock +[36]: https://addons.mozilla.org/en-US/firefox/addon/tomato-clock/ +[37]: https://itsfoss.com/firefox-keyboard-shortcuts/ +[38]: https://itsfoss.com/firefox-useful-features/ From 80c5de49cd5ad44b8c14eb2cdec43602f4bd8a71 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 23 Jan 2022 05:02:34 +0800 Subject: [PATCH 076/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220122=20?= =?UTF-8?q?Our=20favorite=20Linux=20commands=20to=20use=20just=20for=20fun?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220122 Our favorite Linux commands to use just for fun.md --- ...rite Linux commands to use just for fun.md | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 sources/tech/20220122 Our favorite Linux commands to use just for fun.md diff --git a/sources/tech/20220122 Our favorite Linux commands to use just for fun.md b/sources/tech/20220122 Our favorite Linux commands to use just for fun.md new file mode 100644 index 0000000000..7eedf08a82 --- /dev/null +++ b/sources/tech/20220122 Our favorite Linux commands to use just for fun.md @@ -0,0 +1,136 @@ +[#]: subject: "Our favorite Linux commands to use just for fun" +[#]: via: "https://opensource.com/article/22/1/fun-linux-commands" +[#]: author: "Opensource.com https://opensource.com/users/admin" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Our favorite Linux commands to use just for fun +====== +The Linux command line is known for being a productivity powerhouse. +It's also a place to have some fun, too! +![woman on laptop sitting at the window][1] + +In November, we shared the article [7 Linux commands to use just for fun][2] and asked you to tell us what "for fun" Linux command you recommend—and why? + +Some Opensource.com contributors shared their favorites below. + +* * * + +My favorites: + + * `cowsay`, of course! + * `fortune`, my favorite "hack" was having the `motd` when users connected be a humorous fortune. + * `sl`, a steam locomotive in your terminal. + * `xsnow`, another root XWindow hack, this command puts relaxing snowfall over your workspace, with accumulation on the top of open windows. + * GNOME Easter eggs, in GNOME 2, **Alt+F2** (opening the run dialog) and entering "free the fish" released Wanda the Fish onto your root window. Wanda would wander around, scurrying off (for a while) if you clicked on her. + + + +~[Dave Neary][3] + +* * * + +My day starts with these: + +`fortune`, `cowsa`y, `lolcat`  + +![Don't take life too seriously][4] + +(Tomasz Waraksa, [CC BY-SA 4.0][5]) + +Followed by `curl` [wttr.in][6] + +![Weather][7] + +(Tomasz Waraksa, [CC BY-SA 4.0][5]) + +Now we can have a coffee ;-) + +~[Tomasz Waraksa][8] + +* * * + +`cmatrix` , because every now and then you feel like you're jacked into the machine. + +~[Gary Smith][9] + +* * * + +Telnet towel.blinkenlights.nl. + +It's not exactly Linux-specific but it's kinda awesome. + +~[John 'Warthog9' Hawley][10] + +* * * + +Xroach was a cool add-on for your window manager in the 1990s. It was a lot of fun with Tab Window Manager (TWM) and F Virtual Window Manager (FVWM) at the time, but I haven't used it in years. When you ran Xroach, it added little cockroaches that "lived" under your windows. When you moved a window or closed it, the roaches would scamper to hide under another window or run off the screen. Just one of those little ways to make the desktop more fun. + +Looks like there's a [modern port of Xroach][11] that I'll have to try out sometime. + +~[Jim Hall][12] + +* * * + +I worked as a computer science TA in the late 90s, and we had Sun Sparc workstations in our computer lab. Sometimes students would walk away during lab time without locking the screen. Every once in a while, I would execute `xroach &; clear` on the terminal when they weren't looking.   + +XRoach is a good one. Cockroaches hide under the windows, and scurry around the screen and then under another window when you move a window.   + +~[Ann Marie Fred][13] + +* * * + +One of my favorites is `hollywood`. Check it out [here][14]. + +Just run it and start jamming on the keys, you will convince everyone at Starbucks that you're taking down the NSA. + +~[Clint Byrum][15] + +[Jim Hall][12] responded to this one with: + +That's awesome! It reminds me of [Hacker Typer][16]—it's a website instead of a terminal program. Just bring up the site, and mash on the keys. It doesn't matter what you type, Hacker Typer will spit out what seems to be real work. :-) + +In response to the fun presented by Clint Byrum (and Jim Hall's response): + +I like both of those! Enjoy this [blog post][17] about Hollywood hackers. One of my favorites. + +~[Greg Scott][18] + +* * * + +What's your favorite "for fun" Linux command? Please share yours in the comments below. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/fun-linux-commands + +作者:[Opensource.com][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/admin +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop) +[2]: https://opensource.com/article/21/11/fun-linux-commands +[3]: https://opensource.com/users/dneary +[4]: https://opensource.com/sites/default/files/uploads/too-seriously.png (Don't take life too seriously) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: http://wttr.in/ +[7]: https://opensource.com/sites/default/files/uploads/wttr.png (Weather (wttr.in)) +[8]: https://opensource.com/user_articles/380541 +[9]: https://opensource.com/users/greptile +[10]: https://opensource.com/users/warthog9 +[11]: https://github.com/interkosmos/xroach +[12]: https://opensource.com/users/jim-hall +[13]: https://opensource.com/users/annmarie99 +[14]: https://snapcraft.io/install/hollywood/ubuntu +[15]: https://opensource.com/users/spamaps +[16]: https://hackertyper.net/ +[17]: https://www.dgregscott.com/hollywood-hacker/ +[18]: https://opensource.com/users/greg-scott From f55dcac2f71f7926c975df92ccecdbc2ba99d752 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 23 Jan 2022 10:24:25 +0800 Subject: [PATCH 077/334] PR @zengyi1001 https://linux.cn/article-14206-1.html --- ...nsider a career in open source hardware.md | 73 ++++++++++++++++++ ...nsider a career in open source hardware.md | 74 ------------------- 2 files changed, 73 insertions(+), 74 deletions(-) create mode 100644 published/20211113 Why now is a great time to consider a career in open source hardware.md delete mode 100644 translated/talk/20211113 Why now is a great time to consider a career in open source hardware.md diff --git a/published/20211113 Why now is a great time to consider a career in open source hardware.md b/published/20211113 Why now is a great time to consider a career in open source hardware.md new file mode 100644 index 0000000000..9bfcd1f422 --- /dev/null +++ b/published/20211113 Why now is a great time to consider a career in open source hardware.md @@ -0,0 +1,73 @@ +[#]: subject: "Why now is a great time to consider a career in open source hardware" +[#]: via: "https://opensource.com/article/21/11/open-source-hardware-careers" +[#]: author: "Joshua Pearce https://opensource.com/users/jmpearce" +[#]: collector: "lujun9972" +[#]: translator: "zengyi1001" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14206-1.html" + +现在是考虑从事开源硬件职业的好时机 +====== + +> 开源硬件现在是一个独立领域,并且正在快速的成长中。 + +![](https://img.linux.net.cn/data/attachment/album/202201/23/102054w2jnwennn8rwh27w.jpg) + +在软件行业中,各种类型的程序员写代码的职业已经变得很普遍,这些代码通过开源许可证发布到公共场所。业界的猎头们通常要求查看这些代码来审查未来员工候选人。那些将自己职业生涯专注在开源项目开发的人得到了回报。从 payscale.com 网站得知,Linux 系统管理员的收入比 Windows 管理员要高,这表明从事开源软件领域可以获得更高的报酬和更稳定的工作机会。分享你的工作会让你感觉良好(这甚至可能是一种因果报应),你知道自己正在为整个世界创造价值。历史上,这样的机会可从来没有为我们这些从事于开源硬件领域的人存在过。 + +二十多年前,几乎没有人知道开源硬件是什么,更别说围绕它规划自己的职业生涯了。举例而言,在 2000 年全世界发表了超过 200 万篇学术论文,却只有 7 篇文章提到过“开源硬件”。在我第一次写《[开源实验室][2]》 的时候,我收集了每一个案例(其实也就几十个),并且可以轻松的跟上和阅读每一篇发布的关于开源硬件的文章,还把它们发布到维基上。我很高兴的报告大家,这种情况现在已经实际上不可能了。今年已经有超过 1500 篇文章在讨论“开源硬件”,而且我相信年底的时候还会有更多的文章发表出来。开源硬件现在已经是一个独立的领域,有一些专门报导它的杂志(比如说 《[HardwareX][3]》 和 《[Journal of Open Hardware][4]》)。在更多的领域中,数十种传统杂志现在也会定期报道最新的开源硬件的发展。 + +![Smart open source 3-D printing][5] + +*开发智能开源硬件 3-D 打印 (Joshua Pearce, [GNU-FDL][6])* + +即使是在十年前,从职业生涯的角度看,强调开源硬件开发在某种程度上也是一种冒险。我记得在我上一份工作的简历中,我淡化了和它相关的内容,更多的强调了我的传统工作。工业界和学术界的管理人员难以明白如果这些设计被送出去并在其他地方生产制造,你又怎样获得收益。这一切都在改变。和自由与开源的软件一样,开源硬件开发更快,而且我敢说,会优于专有开发模式。 + +![Open source recycle bot][7] + +*(Joshua Pearce, [GNU-FDL][6])* + +每种企业都有大量成功的 [开放硬件商业模式][8]。随着数字制造的兴起(主要是由于开源开发),开源软件和开源硬件之间的界限变得模糊。像 [FreeCAD][9] 这样的开源软件可以制作开源设计,然后在内置 CAM 中使用,在开源激光切割机、CNC 铣床或 3D 打印机上进行制造。[OpenSCAD][10] 是一个基于开源脚本的 CAD 包,尤其是它确实模糊了软件和硬件之间的界限,以至于代码和物理设计成为同义词。我们中的许多人开始公开谈论开源硬件。我把它作为我研究项目的核心主旨,首先让我自己的设备开源,然后为其他人开发开源硬件。我并不孤单。作为一个社区,我们已经获得了足够的临界质量,于 2012 年成立了 [开源硬件协会][11](OSHWA)。如今,差不多十年后,开源硬件的职业前景完全不同:已经有了数百个开源硬件硬件公司,互联网上涌现出数百万(数百万!)个开源设计,学术文献中对开源硬件的兴趣也呈指数级增长。 + +![Open source production for solar photovoltaics][12] + +*为太阳能光伏开发开源产品。(Joshua Pearce, [GNU-FDL][6])* + +甚至有些工作的目标就是促进更快过渡到无处不在的开源硬件。例如,生产互联网Internet of Production(IoP)联盟在开发开放数据标准Open Data Standards和发展这些标准的用户社区方面,现在已经为运营和通信官、数据标准社区支持经理和 DevOps 工程师提供了 [职位][13]。由于 **我在开源硬件上方面的工作**,我刚被聘为 [加拿大西部大学][14](世界排名前 1% 的大学)的终身讲席教授。该职位是与加拿大排名第一的商学院 [毅伟商学院][15] 交叉任职的。我的工作是帮助大学快速发展,抓住开源技术发展机会。说到做到,我现在正 [招聘][16] 硕士和博士水平的毕业生,包含全额奖学金和生活津贴。这些 [免费适用的可持续性技术(FAST)实验室][17] 的研究生工程职位专门用于开发开源硬件,用于太阳能光伏系统、分布式回收和紧急食品生产等一系列应用。这种工作得到了那些想要最大化 [他们的研究投资回报][18] 的资助者的更多的资助。整个国家都在朝着这个方向前进。最近的一个好例子是法国,它刚刚发布了 [第二个开放科学计划][19]。我注意到 [GrantForward][20] 上列出的,用于美国开源资金的“开源”关键字资助的数量显着增加。许多基金会已经清晰明了地收到了开源备忘录 —— 因此开源研发的机会越来越多。 + +因此,如果你还没开始的话,也许是时候考虑将开源作为一种职业,即使你是一名喜欢开发硬件的工程师。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/open-source-hardware-careers + +作者:[Joshua Pearce][a] +选题:[lujun9972][b] +译者:[zengyi1001](https://github.com/zengyi1001) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jmpearce +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open-source-hardware.png?itok=vS4MBRSh (shaking hands open source hardware) +[2]: https://www.appropedia.org/Open-source_Lab +[3]: https://www.hardware-x.com/ +[4]: https://openhardware.metajnl.com/ +[5]: https://img.linux.net.cn/data/attachment/album/202201/23/102227iur7uut1dyyhyb2r.jpg (Smart open source 3-D printing) +[6]: https://www.gnu.org/licenses/fdl-1.3.en.html +[7]: https://img.linux.net.cn/data/attachment/album/202201/23/102236djy2djyy101b8g1x.jpg (Open source recycle bot) +[8]: https://doi.org/10.5334/joh.4 +[9]: https://www.freecadweb.org/ +[10]: https://openscad.org/ +[11]: https://www.oshwa.org/ +[12]: https://img.linux.net.cn/data/attachment/album/202201/23/102243x383b7bh3884bdb8.jpg (Open source production for solar photovoltaics) +[13]: https://www.internetofproduction.org/hiring +[14]: https://www.uwo.ca/ +[15]: https://www.ivey.uwo.ca/ +[16]: https://www.appropedia.org/FAST_application_process +[17]: https://www.appropedia.org/Category:FAST +[18]: https://www.academia.edu/13799962/Return_on_Investment_for_Open_Source_Hardware_Development +[19]: https://www.ouvrirlascience.fr/wp-content/uploads/2021/10/Second_French_Plan-for-Open-Science_web.pdf +[20]: https://www.grantforward.com/index diff --git a/translated/talk/20211113 Why now is a great time to consider a career in open source hardware.md b/translated/talk/20211113 Why now is a great time to consider a career in open source hardware.md deleted file mode 100644 index b8acff85f5..0000000000 --- a/translated/talk/20211113 Why now is a great time to consider a career in open source hardware.md +++ /dev/null @@ -1,74 +0,0 @@ -[#]: subject: "Why now is a great time to consider a career in open source hardware" -[#]: via: "https://opensource.com/article/21/11/open-source-hardware-careers" -[#]: author: "Joshua Pearce https://opensource.com/users/jmpearce" -[#]: collector: "lujun9972" -[#]: translator: "zengyi1001" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Why now is a great time to consider a career in open source hardware -为什么说现在是考虑从事开源硬件职业的好时机 -====== - -开源硬件现在有了自己的专属领域并且正在快速的成长中。 -![open source hardware shaking hands][1] - -在软件行业中,各种风格的程序员通过编写代码并且使用开源许可发布到公共场所来构建自己的职业生涯,已经变得司空见惯。产业界的猎头们通常要求访问他们未来员工候选人的代码。哪些将自己职业生涯专注在开源项目开发的人得到了回报。从 payscale.com 网站得知,Linux 系统管理员的收入比他们的 Windows 管理员同行要高,说明从事开源软件领域可以获得更高的报酬和更稳定的工作机会。分享你的工作会让你感觉非常好(这甚至可能是一种因果报应),你知道自己正在为整个世界创造价值。历史上,这样的机会可从来没有为我们这些工作在开源硬件领域的人存在过。 - -大约20年前,没有人知道开源硬件是什么,更别说围绕它规划自己的职业生涯了。举例而言,在2000年全世界发表了超过200万篇学术论文,却只有7篇文章提到过“开源硬件”。在我第一次写 [_Open-Source Lab_][2]的时候,我收集了每一个案例(其实也就几十个)并且可以轻松的跟上和阅读每一篇发布的关于开源硬件的文章,还把它们发布到一个维基上。我很高兴的报告大家这种情况现在已经在物理上成为了不可能。今年已经有超过1500篇文章在讨论“开源硬件”,而且我相信年底的时候还会有更多的文章发表出来。开源硬件现在已经发展出来了自己的领域,有一些专门报导它的杂志(比如说 [_HardwareX_][3] 和 [_Journal of Open Hardware_][4])。在广泛的领域,数十种传统杂志现在也会定期报道最新的开源硬件的发展。 -![Smart open source 3-D printing][5] - -开发智能开源硬件 3-D 打印 (Joshua Pearce, [GNU-FDL][6]) - -即使是在十年前,从职业生涯的角度看,着重于开源硬件开发在某种程度上也是一种冒险。我记得在我上一份工作的简历中,我淡化了和它相关的内容,更多的强调了我的传统工作。工业界和学术界的管理人员难以明白如果这些设计被赠与出去并在其他地方生产制造,你又怎样获得收益。这一切都在改变。和自由与开源的软件一样开源硬件开发要更快,而且我敢说,会优于私有开发模式。 - -![Open source recycle bot][7] - -(Joshua Pearce, [GNU-FDL][6]) - - -对于每一种企业,都有大量成功的[开放硬件商业模式][8]。随着数字制造的兴起(主要是由于开源开发),开源软件和开源硬件之间的界限变得模糊。像 [FreeCAD][9] 这样的开源软件可以制作开放式设计,然后在内置 CAM 中使用,以便在开源激光切割机、CNC 铣床或 3D 打印机上进行制造。 [OpenSCAD][10] 是一个基于开源脚本的 CAD 包,尤其是它确实模糊了软件和硬件之间的界限,以至于代码和物理设计成为同义词。我们中的许多人开始公开谈论开放硬件。我把它作为我研究计划的核心推动力,首先让我自己的设备开源,然后为其他人开发开放硬件。我并不孤单。作为一个社区,我们已经获得了足够的临界质量,以至于 [开源硬件协会][11] (OSHWA) 于 2012 年成立。如今,差不多十年后,开源硬件的职业前景完全不同:数百个开源硬件硬件公司存在,互联网上涌现出数百万(数百万!)个开源设计,学术文献中对开源硬件的兴趣呈指数级增长。 - -![Open source production for solar photovoltaics][12] -太阳能光伏产业的开源生产 - -为太阳能光伏开发开源产品。(Joshua Pearce, [GNU-FDL][6]) - -甚至有些工作的目标就是促进更快过渡到无处不在的开源硬件。例如,开发开放数据标准和发展这些标准的用户社区的互联网产业 (IoP) 联盟现在已经为运营通信员、数据标准社区支持经理和 DevOps 工程师提供了[职位][13]。正是由于**我在开源硬件上方面的工作**,我刚被聘为[加拿大西部大学][14],这所世界排名前 1% 的大学的终身讲席主席。该职位与加拿大排名第一的商学院 [Ivey Business School,][15] 相交叉。我的工作是帮助大学快速发展,抓住开源技术发展机会。说到做到,我现在正[招聘][16]硕士和博士水平的毕业生,包含全额奖学金和生活津贴。这些[免费适用的可持续性技术 (FAST) 实验室][17] 的研究生工程职位专门用于开发开源硬件,用于太阳能光伏系统、分布式回收和紧急食品生产等一系列应用。这种工作得到了那些想要最大化[他们的研究投资回报][18]的资助者的更频繁的资助。整个国家都在朝着这个方向前进。最近的好例子是法国,它刚刚发布了[第二个开放科学计划][19]。我注意到 [GrantForward][20] 上列出的,用于美国开源资金的“开源”关键字资助的数量显着增加。许多基金会已经大声而清晰地收到了开源备忘录——因此开源研发的机会越来越多。 - -因此,如果你还没开始的话,也许是时候考虑将开源作为一种职业,即使您是一名喜欢开发硬件的工程师。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/11/open-source-hardware-careers - -作者:[Joshua Pearce][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/zengyi1001) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jmpearce -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open-source-hardware.png?itok=vS4MBRSh (shaking hands open source hardware) -[2]: https://www.appropedia.org/Open-source_Lab -[3]: https://www.hardware-x.com/ -[4]: https://openhardware.metajnl.com/ -[5]: https://opensource.com/sites/default/files/uploads/smart-open-source-3d-printing.png (Smart open source 3-D printing) -[6]: https://www.gnu.org/licenses/fdl-1.3.en.html -[7]: https://opensource.com/sites/default/files/pictures/open-source-recyclebot_0.jpg (Open source recycle bot) -[8]: https://doi.org/10.5334/joh.4 -[9]: https://www.freecadweb.org/ -[10]: https://openscad.org/ -[11]: https://www.oshwa.org/ -[12]: https://opensource.com/sites/default/files/uploads/open-source-solar-photovoltaics.png (Open source production for solar photovoltaics) -[13]: https://www.internetofproduction.org/hiring -[14]: https://www.uwo.ca/ -[15]: https://www.ivey.uwo.ca/ -[16]: https://www.appropedia.org/FAST_application_process -[17]: https://www.appropedia.org/Category:FAST -[18]: https://www.academia.edu/13799962/Return_on_Investment_for_Open_Source_Hardware_Development -[19]: https://www.ouvrirlascience.fr/wp-content/uploads/2021/10/Second_French_Plan-for-Open-Science_web.pdf -[20]: https://www.grantforward.com/index From 5654b9fd2d1d27eb6ea0a040bd465de97df888e3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 23 Jan 2022 16:32:41 +0800 Subject: [PATCH 078/334] A --- sources/talk/20211224 10 reasons to love Linux in 2021.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20211224 10 reasons to love Linux in 2021.md b/sources/talk/20211224 10 reasons to love Linux in 2021.md index 5e2a14de7b..7ad3642522 100644 --- a/sources/talk/20211224 10 reasons to love Linux in 2021.md +++ b/sources/talk/20211224 10 reasons to love Linux in 2021.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/12/reasons-love-linux" [#]: author: "Joshua Allen Holm https://opensource.com/users/holmja" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From e3f7aeab14af4050422ff7a93f036dc30cf635e1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 23 Jan 2022 17:18:41 +0800 Subject: [PATCH 079/334] TRP @wxy https://linux.cn/article-14207-1.html --- ...211224 10 reasons to love Linux in 2021.md | 85 +++++++++++++++++++ ...211224 10 reasons to love Linux in 2021.md | 84 ------------------ 2 files changed, 85 insertions(+), 84 deletions(-) create mode 100644 published/20211224 10 reasons to love Linux in 2021.md delete mode 100644 sources/talk/20211224 10 reasons to love Linux in 2021.md diff --git a/published/20211224 10 reasons to love Linux in 2021.md b/published/20211224 10 reasons to love Linux in 2021.md new file mode 100644 index 0000000000..03f712ec72 --- /dev/null +++ b/published/20211224 10 reasons to love Linux in 2021.md @@ -0,0 +1,85 @@ +[#]: subject: "10 reasons to love Linux in 2021" +[#]: via: "https://opensource.com/article/21/12/reasons-love-linux" +[#]: author: "Joshua Allen Holm https://opensource.com/users/holmja" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14207-1.html" + +2021 总结:Linux 方面的 10 篇好文章 +====== + +> 以下是 10 篇最受欢迎的 Linux 文章。 + +![](https://img.linux.net.cn/data/attachment/album/202201/23/171708xzs53zvp9occmgcy.jpg) + +2021 年,我们发表了远超 [150 篇的 Linux 方面的文章][2]。从桌面 Linux 用户小工具的文章到将 Linux 作为服务器操作系统的教程,以及介乎于两者之间的各种场景,这些文章已经涵盖了 Linux 生态系统的许多方面。所有这些文章都值得你花时间去阅读,但你可以从今年发表的这十篇好文章开始阅读。 + +### 3 个开源工具,使 Linux 成为理想的工作站 + +在这篇文章中,Seth Kenlon 介绍了 LibreOffice、AbiWord、Gnumeric 和 Pandoc,涵盖了 [使 Linux 成为理想工作站的工具][3]。他解释了在使用 Linux 作为桌面操作系统时,这些应用程序如何使你的工作效率提高。文章探讨了一些高级功能,如 LibreOffice 的无头模式,并提供了如何充分利用每个应用程序的小技巧。 + +### 为什么我在 Linux 上使用 exa 而不是 ls + +`ls` 命令是 Linux 中最常用的终端命令之一,但你知道它有一个现代的替代品,提供了许多有益的改进吗?Sudeshna Sur 的 [文章][4] 介绍了 `exa` 命令以及它相比 `ls` 的优势,讨论了 `exa` 如何跟踪添加到 Git 仓库的新文件、显示目录和文件树等等。 + +### 我喜欢在 Linux 上编码的 5 个原因 + +像许多人一样,Seth Kenlon 喜欢在 Linux 上编码。在这篇文章中,他分享了这样做的 [五个原因][5]。他喜欢在 Linux 上编码,因为它建立在逻辑的基础上,可以让你欣赏代码之间的关联,提供了源代码,并提供直接访问外设和抽象层的能力,使编写代码更容易。 + +### 在 Linux 上使用可启动的 USB 驱动器来拯救 Windows 用户 + +即使你喜欢 Linux,但有时你可能需要修复一台 Windows 电脑或为某人安装 Windows。在 Linux 上从 Windows ISO 创建一个可启动的 U 盘,并不像为 Linux 发行版制作一个可启动的 U 盘那样简单明了。在这个教程中,Don Watkins 演示了 [如何使用 WoeUSB][6],这个工具可以为用户处理这个过程中所有棘手的部分。 + +### 4 个用于运行 Linux 服务器的开源工具 + +当使用 Linux 作为服务器操作系统时,Seth Kenlon 推荐了这 [四个开源工具][7]: Samba、Snapdrop、VLC 和 PulseAudio。正如 Seth 在他的文章中所指出的,这四个工具使得用 Linux 进行文件共享和流媒体变得很容易。 + +### 3 个你需要尝试的 Linux 终端 + +Linux 有许多不同的终端模拟器。Seth Kenlon 的这篇文章推荐了 [3 个 Linux 终端][8],值得一试:Xfce 终端、rxvt-unicode 和 Konsole。他提供了每一个的简要概述,并指出了每个终端模拟器的优势。 + +### 在你的 Linux 家庭实验室中运行 Kubernetes 的另外 5 个理由 + +在 Seth Kenlon 2020 年的文章《[在树莓派家庭实验室上运行 Kubernetes 的五个理由][9]》的续篇中,他给出了 [在 Linux 家庭实验室中运行 Kubernetes 的另外五个理由][10]:Kubernetes 建立在Linux 的基础上,它很灵活,学习它可以为你提供个人发展,它使容器变得有意义,而且它有利于云原生开发。他还提供了一个额外的理由:因为它很有趣。 + +### 6 个开源工具和技巧,为初学者保障 Linux 服务器的安全 + +Sahana Sreeram 提供了 [保证 Linux 服务器安全的六个优秀技巧][11]。这个教程着眼于更新软件、启用防火墙、加强密码保护、禁用非必要的服务、检查监听端口,以及扫描恶意软件。Sahana 提供的技巧可以帮助 Linux 初学者学习保持 Linux 服务器安全的基本知识。 + +### Linux 如何使一所学校为大流行病做好准备 + +Don Watkins 采访了威斯康星州莫诺纳市 [圣心玛利亚学校][12] 的教师 Robert Maynord,介绍了该校 [将他们的电脑换成 Linux][13] 的情况。Maynord 分享了关于他是如何对 Linux 感兴趣的轶事,他为把学校的计算机换成 Linux 所采取的第一个步骤,Linux 如何使学校受益等等。Don 在这次采访中提出了许多很好的问题,Maynord 为有意采用 Linux 的学校提供了许多有用的信息。 + +### 在 Linux 上运行你喜欢的 Windows 应用程序 + +有时,在切换到 Linux 之后,你仍然需要那个只在 Windows 下运行的特定应用程序,或者真的想玩那个只能在 Windows 下运行的游戏。在这篇文章中,Seth Kenlon 提供了一个关于如何 [在 Linux 上运行你喜欢的 Windows 应用程序][14] 的教程。做到这一点的工具是 WINE。Seth 解释了什么是 WINE,它是如何工作的,以及如何在你的 Linux 计算机上安装它,以便你可以运行你最喜欢的 Windows 应用程序。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/reasons-love-linux + +作者:[Joshua Allen Holm][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/holmja +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/car-penguin-drive-linux-yellow.png?itok=twWGlYAc (Penguin driving a car with a yellow background) +[2]: https://opensource.com/tags/linux +[3]: https://linux.cn/article-13133-1.html +[4]: https://linux.cn/article-13972-1.html +[5]: https://opensource.com/article/21/2/linux-programming +[6]: https://linux.cn/article-13143-1.html +[7]: https://linux.cn/article-13192-1.html +[8]: https://linux.cn/article-13186-1.html +[9]: https://opensource.com/article/20/8/kubernetes-raspberry-pi +[10]: https://opensource.com/article/21/6/kubernetes-linux-homelab +[11]: https://linux.cn/article-13298-1.html +[12]: https://www.ihmcatholicschool.org/ +[13]: https://opensource.com/article/21/5/linux-school-servers +[14]: https://linux.cn/article-13184-1.html diff --git a/sources/talk/20211224 10 reasons to love Linux in 2021.md b/sources/talk/20211224 10 reasons to love Linux in 2021.md deleted file mode 100644 index 7ad3642522..0000000000 --- a/sources/talk/20211224 10 reasons to love Linux in 2021.md +++ /dev/null @@ -1,84 +0,0 @@ -[#]: subject: "10 reasons to love Linux in 2021" -[#]: via: "https://opensource.com/article/21/12/reasons-love-linux" -[#]: author: "Joshua Allen Holm https://opensource.com/users/holmja" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -10 reasons to love Linux in 2021 -====== -Opensource.com authors wrote about the many facets of the Linux -ecosystem. Here are 10 of the most popular Linux articles. -![Penguin driving a car with a yellow background][1] - -Opensource.com published well over [150 articles about Linux in 2021][2]. From articles about small utilities for desktop Linux users to tutorials about working with Linux as a server operating system and everything in between, these articles have covered many facets of the Linux ecosystem. It is well worth your time to check out all of them, but here are ten great articles published this year to get you started. - -### 3 open source tools that make Linux the ideal workstation - -In this article, Seth Kenlon writes about LibreOffice, AbiWord, Gnumeric, and Pandoc covering [tools that make Linux the ideal workstation][3]. He explains how these applications can make you productive when using Linux as a desktop operating system. The article explores advanced features, like LibreOffice's headless mode, and provides tips about getting the most out of each application. - -### Why I use exa instead of ls on Linux - -The `ls` command is one of the most frequently used terminal commands in Linux, but did you know there is a modern alternative with many quality of life improvements? [Why I use exa instead of ls on Linux][4] by Sudeshna Sur describes the `exa` command and the advantages it has over `ls`. The article discusses how `exa` can track new files added to a Git repository, display a directory and file tree, and more. - -### 5 reasons why I love coding on Linux - -Like many people, Seth Kenlon loves coding on Linux. In this article, he shares [five reasons why][5]. He likes coding on Linux because it is built on a foundation of logic, makes you appreciate code connections, provides source code, and provides direct access to peripherals and abstractions layers that make writing code easier. - -### Use this bootable USB drive on Linux to rescue Windows users - -Even if you prefer Linux, there might be times where you need to fix a Windows computer or install Windows for someone. Creating a bootable USB flash drive from a Windows ISO on Linux is not as straightforward as making a bootable flash drive for a Linux distribution. In this tutorial, Don Watkins demonstrates [how to use WoeUSB][6], a utility that handles all the tricky parts of the process for the user. - -### 4 open source tools for running a Linux server - -When using Linux as a server operating system, Seth Kenlon recommends these [four open source tools][7]. The four tools are Samba, Snapdrop, VLC, and PulseAudio. As Seth notes in his article, these four tools make file sharing and streaming with Linux easy. - -### 3 Linux terminals you need to try - -There are many different terminal emulators for Linux. This article by Seth Kenlon recommends [three Linux terminals][8] that are worth trying out. Seth's recommendations are Xfce terminal, rxvt-unicode, and Konsole. He provides a brief overview of each and highlights each terminal emulator's strengths. - -### 5 more reasons to run Kubernetes in your Linux homelab - -In the sequel to his 2020 article [five reasons to run Kubernetes on your Raspberry Pi homelab][9], Seth Kenlon provides [five more reasons to run Kubernetes in your Linux homelab][10]. The five more reasons are that Kubernetes is built on the foundation of Linux, it is flexible, learning it can provide you with personal development, it makes containers make sense, and it facilitates cloud-native development. He also provides a bonus reason: Because it is fun. - -### 6 open source tools and tips to securing a Linux server for beginners - -Sahana Sreeram provides [six excellent tips for securing a Linux server][11]. This tutorial looks at updating software, enabling a firewall, strengthening password protection, disabling nonessential services, checking for listening ports, and scanning for malware. The tips provided by Sahana will help any Linux beginner learn the basics of keeping their Linux servers secure. - -### How Linux made a school pandemic-ready - -Don Watkins interviews Robert Maynord, a teacher at [Immaculate Heart of Mary School][12] in Monona, Wisconsin, about the school [switching their computers to Linux][13]. Maynord shares anecdotes about how he became interested in Linux, the first steps he took to change the school's computers to Linux, how Linux benefits the school, and much more. Don asks many great questions in this interview, and Maynord provides a lot of useful information for schools interested in adopting Linux. - -### Run your favorite Windows applications on Linux - -Sometimes, after switching to Linux, you still need that one particular Windows-only application or really want to play that Windows-only game. In this article, Seth Kenlon provides a tutorial about how to [run your favorite Windows applications on Linux][14]. The tool for doing this is WINE. Seth explains what WINE is, how it works, and how to get it installed on your Linux computer so you can run your favorite Windows applications. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/12/reasons-love-linux - -作者:[Joshua Allen Holm][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/holmja -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/car-penguin-drive-linux-yellow.png?itok=twWGlYAc (Penguin driving a car with a yellow background) -[2]: https://opensource.com/tags/linux -[3]: https://opensource.com/article/21/2/linux-workday -[4]: https://opensource.com/article/21/3/replace-ls-exa -[5]: https://opensource.com/article/21/2/linux-programming -[6]: https://opensource.com/article/21/2/linux-woeusb -[7]: https://opensource.com/article/21/3/linux-server -[8]: https://opensource.com/article/21/2/linux-terminals -[9]: https://opensource.com/article/20/8/kubernetes-raspberry-pi -[10]: https://opensource.com/article/21/6/kubernetes-linux-homelab -[11]: https://opensource.com/article/21/4/securing-linux-servers -[12]: https://www.ihmcatholicschool.org/ -[13]: https://opensource.com/article/21/5/linux-school-servers -[14]: https://opensource.com/article/21/2/linux-wine From dc07e405e715af17075c1a9508663afa6d600256 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 24 Jan 2022 05:02:23 +0800 Subject: [PATCH 080/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220124=20?= =?UTF-8?q?Linux=20Jargon=20Buster:=20What=20are=20Upstream=20and=20Downst?= =?UTF-8?q?ream=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220124 Linux Jargon Buster- What are Upstream and Downstream.md --- ...uster- What are Upstream and Downstream.md | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 sources/tech/20220124 Linux Jargon Buster- What are Upstream and Downstream.md diff --git a/sources/tech/20220124 Linux Jargon Buster- What are Upstream and Downstream.md b/sources/tech/20220124 Linux Jargon Buster- What are Upstream and Downstream.md new file mode 100644 index 0000000000..16712c606e --- /dev/null +++ b/sources/tech/20220124 Linux Jargon Buster- What are Upstream and Downstream.md @@ -0,0 +1,104 @@ +[#]: subject: "Linux Jargon Buster: What are Upstream and Downstream?" +[#]: via: "https://itsfoss.com/upstream-and-downstream-linux/" +[#]: author: "Bill Dyer https://itsfoss.com/author/bill/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Linux Jargon Buster: What are Upstream and Downstream? +====== + +The terms: _upstream_ and _downstream_ are rather ambiguous terms and, I think, not really used by the general public. If you are a Linux user and do not write or maintain software, chances are pretty good that these terms will mean nothing to you, but they can be instructive in how communication between groups within the Linux world works. + +The terms are used in networking, programming, kernel, and even in non-computer areas such as supply chains. When we talk about upstream and downstream then, context is important. + +In its simplest form, upstream and downstream is the direction of the flow of information. + +Since we are all reading this article while we’re connected to the Internet, let’s look at an upstream/downstream example as it applies to Internet Service Providers (ISP). Here, the ISP is concerned with traffic. Upstream traffic is data is coming in from a user from a different ISP. For example, if you have a website that offers a subscription to a newsletter, the information I send, to subscribe, is upstream data. + +Downstream traffic is data that is sent from a user to another user at a different ISP, then it is considered as downstream traffic. Using the same subscription example, let’s assume that my request to subscribe is approved and I get a “welcome” note in one email and the latest newsletter in another email. In this case, the data is downstream as it is sent by you (well, probably automated software operating as a representative of you) to me, a user from a different ISP. + +Summing up: the thing I need or want (your newsletter) is upstream. The things you provide to me (the welcome note and actual newsletter) come to me, downstream. + +Whether data is upstream or downstream is probably unimportant to us as users, but it is important to the server administrators who monitor bandwidth usage, as well as to distributors, and application programmers. + +In the Linux world, upstream and downstream have two main contexts. One is concerned with the kernel and the other is concerned with applications. There are others, but I hope that I can get the idea across with these two. + +### Upstream and downstream in the context of Linux kernel + +![][1] + +Linux _is_ the kernel. In creating a distribution (often called a “distro”), Linux distributions initially use the source code from an unmodified kernel. Necessary patches are added and then the kernel is configured. The kernel’s configuration is based upon what features and options the distribution wants to offer. Once decided upon, the kernel is created accordingly. + +The original kernel is upstream from the distribution. When the distribution gets the source code, it flows downstream. Once the distribution has the code it stays with the makers of the distribution while work is being done on it. It is still upstream from us, as users, until it is ready for release. + +The kernel version that the distribution creates will have patches added and certain features and options enabled. This configuration is determined by the distro builder. This is why there are several flavors of Linux: [Debian][2] vs. [Red Hat][3], for example. The builder of the distro decides on the options to offer to their user base, and compiles the kernel accordingly. + +Once that work is completed, it is made ready for release in a repository and we’re allowed to grab a copy. That copy flows downstream to us. + +Similarly, if the distributor finds a bug in the kernel, fixes it and then sends the patch to the kernel developers so that they could patch the kernel for everyone downstream. This is called contributing to upstream because here the flow is going upwards to the original source. + +### Upstream and downstream in the context of applications + +Again, technically, Linux is the kernel, everything else is additional software. The distro builder also adds additional software to their project. In this case, there are several upstreams. A distro can contain any number of applications such as X, KDE, Gnome, and so on. + +Let’s imagine that you are using the [nano][4] editor and discover that it isn’t working right so you submit a bug report to the distributor. The programmers working on the distro will look at it and, if they find that they inserted a bug into nano, they will fix it and make a new release available in their repository. If they find that they didn’t make the bug, the distributor will submit a bug report upstream to the nano programmer. + +When it comes to things like bug reports, feature requests, etc. it is always best to send them upstream to your distributor since they maintain the kernel and additional applications for the distro you’re using. For example, I use a distro called [Q4OS][5] on a few machines. If I find a bug in a program, I report it to the Q4OS folks. If you happen to be using, say, [Mint][6], you would report it to the Mint project. + +If you were to post a problem on a generic Linux board, for example, and you mentioned that you were using Mint, you will surely get a reply that says something like: “This is better handled in a Mint forum.” Using the previous “nano bug” example, it’s possible that the Mint programmers made a change to nano to make it work better in their distro. If they did make a mistake, they would want to know about it and, having made the mistake, they would be the ones to fix it. + +Once fixed, the updated program is put into a repository available to you. When you get the update, it comes downstream to you, like so: + + * If a distributor makes the fix, the new version is made available in the distro repository + * If the programmer of the application makes the fix, it is sent downstream to the distributors who test the new code. Once it’s found to be working right, it is placed in the repository, to flow downstream to you + + + +### Automatic flow downstream + +There was a time, when users had to get their own updates. A user would get the updated source code and compile a new executable. As time went on, utilities like apt were created to allow users to pull updated binaries (executables) from the repositories. The apt program is Debian, but other distros have their own, similar program for this. + +Programs like apt take care of the upstream/downstream work. If you ran apt with the upgrade option like so: + +`sudo apt upgrade` + +it would look (upstream) to the distro repository, find any needed updated packages and pull them (downstream) to your machine and install them. + +Some distros take this further. Distro programmers and maintainers are always checking over their product. Often times, an application programmer will make improvements to their program. System libraries are updated frequently, security holes get plugged, and so on. These updates are made available to the distributors who then make the new version available in the distro’s repository. + +Rather than have you run apt every day, some distros will alert you to updates that are available and ask if you want them. If you want then, just accept and the updates will be sent downstream to your machine and installed. + +### Conclusion + +I just remembered a bit of my history, having mentioned Red Hat. Back in 1994 or 1995, they placed a job ad and one of the cool workplace benefits listed was, “all the free peanut M&Ms you could eat and all the free Dr. Pepper you could drink.” I had no doubt that I could do the work, and I applied just for those two benefits alone. I didn’t get a call though. + +Oh well. Getting back to the point… + +Upstream and downstream is really just the direction of data flow. How far upstream or downstream this data flows depends on who ultimately needs to work on it. Basically, the programmers are upstream and the users are downstream. + +Again, as users, we really don’t need to be worried about these terms, but the concepts do help in the development and maintenance of software. By being able to direct the work to the appropriate group, duplicate work is avoided. It also ensures that a standard is maintained. The Chrome browser, for example, might need slight changes made to it in order to work on a certain distro, but it will be Chrome at its core – it will look and act like Chrome. + +If you do find a bug with any program in your distro, just report it to your distro’s maintainers, which is usually done through their website. You’ll be sending it upstream to them, but it doesn’t matter whether you remember that you’re sending the report upstream. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/upstream-and-downstream-linux/ + +作者:[Bill Dyer][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/bill/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/upstream-downstream.png?resize=800%2C450&ssl=1 +[2]: https://www.debian.org/ +[3]: https://www.redhat.com/ +[4]: https://www.nano-editor.org/ +[5]: https://q4os.org/ +[6]: https://linuxmint.com/ From 04d4779b8198e29d7ac40255e8d507a8df13d953 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 24 Jan 2022 05:02:37 +0800 Subject: [PATCH 081/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220123=20?= =?UTF-8?q?How=20I=20use=20Linux=20accessibility=20settings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220123 How I use Linux accessibility settings.md --- ... How I use Linux accessibility settings.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sources/tech/20220123 How I use Linux accessibility settings.md diff --git a/sources/tech/20220123 How I use Linux accessibility settings.md b/sources/tech/20220123 How I use Linux accessibility settings.md new file mode 100644 index 0000000000..b7ad529d9d --- /dev/null +++ b/sources/tech/20220123 How I use Linux accessibility settings.md @@ -0,0 +1,99 @@ +[#]: subject: "How I use Linux accessibility settings" +[#]: via: "https://opensource.com/article/22/1/linux-accessibility-settings" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How I use Linux accessibility settings +====== +Various Linux systems handle assistive technologies differently. Here +are a few helpful settings for seeing, hearing, typing, and more. +![Person using a laptop][1] + +When I started using Linux in the 1990s, I was in my mid-40s and accessibility was not something I gave much thought to. Now, however, as I'm pushing 70, my needs have changed. A few years ago, I purchased a brand new Darter Pro from System76, and its default resolution is 1920x1080, and it's high DPI, too. The system came with Pop_OS!, which I found that I had to modify to be able to see the icons and text on the display. Thank goodness that Linux on the desktop has become much more accessible than in the 1990s. + +I need assistive technology for seeing and hearing in particular. There are other areas that I do not use but are useful to folks who need help typing, pointing, clicking, and gesturing. + +Various systems, like Gnome, KDE, LXDE, XFCE, and others, handle these assistive technologies differently. These assistive tweaks are mostly available through the **Settings** dialog box or from keyboard shortcuts. + +### Text display + +I need help with larger text, and on my Linux Mint Cinnamon desktop, I use these settings: + +![accessibility options - visual][2] + +Don Watkins (CC BY-SA 4.0) + +I have also found **Gnome Tweaks** allows me to fine-tune text display sizes for my desktop experience. I adjusted the resolution of my display from its default of 1920x1080 to a more comfortable 1600x900. Here are my Layout settings: + +![accessibility options - display][3] + +Don Watkins (CC BY-SA 4.0) + +### Keyboard supports + +I do not need keyboard supports, but they are readily available, as seen below: + +![accessibility options - keyboard][4] + +Don Watkins (CC BY-SA 4.0) + +### More accessibility options + +Accessibility access is familiar on Fedora 35, too. Open the **Settings** menu and choose to make the **Always show Accessibility Menu** icon visible on the desktop. I usually toggle **Large Text** unless I am on a large display. There are many additional options, including **Zoom**, **Screen Reader**, and **Sound Keys**. Here are some: + +![accessibility options - settings][5] + +Don Watkins (CC BY-SA 4.0) + +Once the **Accessibility Menu** is enabled in the **Settings** menu in Fedora, it is easy to toggle other features from the icon in the upper-right corner: + +![accessibility options - desktop][6] + +Don Watkins (CC BY-SA 4.0) + +There are Linux distributions that are designed specifically for folks who need supports. [Accessible Coconut][7] is such a distribution. Coconut is based on Ubuntu Mate 20.04 and comes with the screen reader enabled by default. It is loaded with Ubuntu Mate's default applications. Accessible Coconut is a creation of [Zendalona][8], which specializes in developing free and open source accessibility applications. All of their applications are released with the GPL 2.0 license, including [iBus-Braille][9]. The distribution includes screen reader, print reading in various languages, six key input, typing tutor, magnification, eBook speaker, and many more. + +![accessibility options - desktop][10] + +Don Watkins (CC BY-SA 4.0) + +The [Gnome Accessibility Toolkit][11] is an open source software library that is part of the Gnome Project and provides APIs for implementing accessibility. You can get involved with the [Gnome Accessibility Team][12] by visiting their wiki. KDE also maintains an [accessibility project][13] and a list of [applications][14] supporting the project. You can get involved with the KDE Accessibility project by visiting their [wiki][15]. [XFCE][16] provides resources for users, too. The [Fedora Project Wiki][17] also has a list of accessible applications that you can install on the operating system. + +### Linux for everyone + +Linux has come a long way since the 1990s, and one great improvement is accessibility support. It's good to know that as Linux users change over time, the operating system can change with us and make many different support options available. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/linux-accessibility-settings + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) +[2]: https://opensource.com/sites/default/files/accessibility-visualpng.png (accessibility options - visual) +[3]: https://opensource.com/sites/default/files/display.png (accessibility options - display) +[4]: https://opensource.com/sites/default/files/keyboard_0.png (accessibility options - keyboard) +[5]: https://opensource.com/sites/default/files/settings.png (accessibility options - settings) +[6]: https://opensource.com/sites/default/files/desktop.png (accessibility options - desktop) +[7]: https://zendalona.com/accessible-coconut/ +[8]: https://zendalona.com/ +[9]: https://github.com/zendalona/ibus-braille +[10]: https://opensource.com/sites/default/files/desktop2.png (accessibility options - desktop) +[11]: https://en.wikipedia.org/wiki/Accessibility_Toolkit +[12]: https://wiki.gnome.org/Accessibility +[13]: https://community.kde.org/Accessibility#KDE_Accessibility_Project +[14]: https://userbase.kde.org/Applications/Accessibility +[15]: https://community.kde.org/Get_Involved/accessibility +[16]: https://docs.xfce.org/xfce/xfce4-settings/accessibility +[17]: https://fedoraproject.org/wiki/Docs/Beats/Accessibility#Using_Fedora.27s_Accessibility_Tools From ac81420efd1568441a6c4dd9180af12fc92f9241 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 24 Jan 2022 08:25:08 +0800 Subject: [PATCH 082/334] A --- ...ect your PHP website from bots with this open source tool.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220119 Protect your PHP website from bots with this open source tool.md b/sources/tech/20220119 Protect your PHP website from bots with this open source tool.md index 50a0822941..115fa4bb11 100644 --- a/sources/tech/20220119 Protect your PHP website from bots with this open source tool.md +++ b/sources/tech/20220119 Protect your PHP website from bots with this open source tool.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/1/php-website-bouncer-crowdsec" [#]: author: "Philippe Humeau https://opensource.com/users/philippe-humeau" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 480db25565ac754566272e63b285a5fb1e741499 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 24 Jan 2022 08:50:17 +0800 Subject: [PATCH 083/334] translated --- ...rd your terminal session with Asciinema.md | 164 ------------------ ...rd your terminal session with Asciinema.md | 163 +++++++++++++++++ 2 files changed, 163 insertions(+), 164 deletions(-) delete mode 100644 sources/tech/20220117 Record your terminal session with Asciinema.md create mode 100644 translated/tech/20220117 Record your terminal session with Asciinema.md diff --git a/sources/tech/20220117 Record your terminal session with Asciinema.md b/sources/tech/20220117 Record your terminal session with Asciinema.md deleted file mode 100644 index 84bc477327..0000000000 --- a/sources/tech/20220117 Record your terminal session with Asciinema.md +++ /dev/null @@ -1,164 +0,0 @@ -[#]: subject: "Record your terminal session with Asciinema" -[#]: via: "https://opensource.com/article/22/1/record-terminal-session-asciinema" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Record your terminal session with Asciinema -====== -Show don't tell with Asciinema, an open source terminal session -recorder. -![4 different color terminal windows with code][1] - -Support calls are important and often satisfying in the end, but the act of clear communication can be arduous for everyone involved. If you've ever been on a support call, you've probably spent several minutes spelling out even the shortest commands and explaining in detail where the spaces and returns fall. While it's often easier to just seize control of a user's computer, that's not really the best way to educate. What you might try instead is sending a user a screen recording, but one that they can copy commands from and paste into their own terminal. - -Asciinema is an open source terminal session recorder. Similar to the `script` and `scriptreplay` commands, Asciinema records exactly what your terminal displays. It saves your "movie" recording to a text file and then replays it on demand. You can upload your movie to Asciinema.org and share them just as you would any other video on the internet, and you can even embed your movie into a webpage. - -### Install Asciinema - -On Linux, you can install Asciinema using your package manager. - -On Fedora, CentOS, Mageia, or similar: - - -``` -`$ sudo dnf install asciinema` -``` - -On Debian, Linux Mint, or similar: - - -``` -`$ sudo apt install asciinema` -``` - -On macOS, you can install using Homebrew: - - -``` -`$ sudo brew install asciinema` -``` - -On BSD and any other platform using [Pkgsrc][2]: - - -``` - - -$ cd /usr/pkgsrc/misc/py-asciinema - -$ sudo bmake install clean - -``` - -### Making movies out of text - -To start recording with Asciinema, you use the `rec` subcommand: - - -``` - - -$ asciinema rec mymovie.cast - -asciinema: recording asciicast to mymovie.cast - -asciinema: press <ctrl-d> or type "exit" when you're done - -``` - -Some friendly output alerts you that you're recording, and it tells you how to stop: Press **Ctrl+D** or just type `exit`. - -Everything you do in your terminal while Asciinema is active gets recorded. This includes input, output, errors, awkward pauses, mistakes, or successes. If you see it in your terminal during recording, it makes the cut. - -When you're finished demonstrating how the terminal works, press **Ctrl+D** or type `exit` to stop the recording. - -In this example, the resulting file, `mymovie.cast` is a collection of timestamps and actions that serve as a script (in the sense of a movie script) for the playback mechanism. - - -``` - - -{"version": 2, "width": 139, "height": 36, "timestamp": 1641457358, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}} - -[0.05351, "o", "\u001b]0;seth:~\u0007"] - -[0.05393, "o", "\u001b[1;31m$ \u001b[00m"] - -[1.380059, "o", "e"] - -[1.443823, "o", "c"] - -[1.514674, "o", "h"] - -[1.595238, "o", "o"] - -[1.789562, "o", " "] - -[2.09658, "o", "\""] - -[2.19683, "o", "h"] - -[2.403994, "o", "e"] - -[2.466784, "o", "l"] - -[2.711183, "o", "lo"] - -[3.120852, "o", "\""] - -[3.427886, "o", "\r\nhello\r\n"] - -[...] - -``` - -If you've made a mistake, you can cut the mistake by removing the lines recreating the error. Should you find yourself making lots of edits or belaboring long pauses during the recording, you can install and use the [asciinema-edit][3] utility, which can trim out blocks of "footage" by timestamps of your definition, or by eliminating idle time. - -### Playing an Asciinema movie - -You can playback your Asciinema using the `play` subcommand: - - -``` -`$ asciinema play mymovie.cast` -``` - -This takes over your terminal session and makes it into the nearest equivalent of the Silver Screen as it's likely ever to be (aside from that time you watched Star Wars in ASCII over `telnet`). Your text-based movie plays—demonstrating for your users exactly how a complex task gets done. Of course, the _actual_ commands getting played don't actually execute. This isn't a shell script in action, so even though you may have created a file `hello.txt` in your movie, there won't be a new `hello.txt` after playback. This is just for show. - -And yet it's more than just a show. You can pause Asciinema movies, select the text you see on the screen and paste it into an active terminal to run the command. Asciinema is useful documentation. It shows users how to do a task, and it allows them to copy and paste to ensure accuracy. - -### Upload your Asciinema movie  - -No Asciinema movie has yet reached a blockbuster status, but you can upload yours to Asciinema.org and share it with the world nevertheless. - - -``` -`$ asciinema upload mymovie.cast` -``` - -If you're used to YouTube upload times, you'll be pleasantly surprised by how quickly Asciinema movies transfer. A `.cast` file is usually only a few kilobytes, or at the most a few megabytes, so the upload is nearly instantaneous. You don't need an account to share your movie, but all unclaimed movies get deleted after seven days. To preserve your masterpiece, you can open an account on Asciinema and then sit back and wait for the Academy to call. - -### Asciinema as documentation - -Asciinema is a great way to demonstrate even the most basic of concepts. Because it retains the ability to copy and paste code from the recording, provides the ability to pause and play on-demand, and is completely accurate in what it portrays, it's not just as good as a screen recording. It's much, much better. Whether you use it to show off your terminal skills to your friends or whether you use it to educate colleagues and students, Asciinema is an invaluable, social, and accessible tool. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/record-terminal-session-asciinema - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/freedos.png?itok=aOBLy7Ky (4 different color terminal windows with code) -[2]: https://opensource.com/article/19/11/pkgsrc-netbsd-linux -[3]: https://github.com/cirocosta/asciinema-edit diff --git a/translated/tech/20220117 Record your terminal session with Asciinema.md b/translated/tech/20220117 Record your terminal session with Asciinema.md new file mode 100644 index 0000000000..1bb36e1cfe --- /dev/null +++ b/translated/tech/20220117 Record your terminal session with Asciinema.md @@ -0,0 +1,163 @@ +[#]: subject: "Record your terminal session with Asciinema" +[#]: via: "https://opensource.com/article/22/1/record-terminal-session-asciinema" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +用 Asciinema 记录你的终端会话 +====== +用开源终端会话记录器 Asciinema 演示。 +![4 different color terminal windows with code][1] + +支持电话是很重要的,而且最后往往是令人满意的,但明确的沟通行为对每个参与的人来说都是艰巨的。如果你曾经参加过支持电话,你可能已经花了好几分钟拼出了最短的命令,并详细解释了空格和回车的位置。虽然直接夺取用户电脑的控制权往往更容易,但这并不是真正的教育的最佳方式。你可以尝试向用户发送一个屏幕记录,但是他们可以复制命令并粘贴到自己的终端。 + +Asciinema 是一个开源的终端会话记录器。与 `script` 和 `scriptreplay` 命令类似,Asciinema 准确记录了你的终端显示。它将你的“电影”记录保存到一个文本文件中,然后根据需要进行重放。你可以把你的电影上传到 Asciinema.org,就像你在互联网上分享任何其他视频一样,你甚至可以把你的电影嵌入到网页中。 + +### 安装 Asciinema + +在 Linux 上,你可以使用你的包管理器安装 Asciinema。 + +在 Fedora、CentOS、Mageia 或类似系统上: + + +``` +`$ sudo dnf install asciinema` +``` + +在 Debian、Linux Mint 或类似系统上: + + +``` +`$ sudo apt install asciinema` +``` + +在 macOS 上,你可以用 Homebrew 安装: + + +``` +`$ sudo brew install asciinema` +``` + +在 BSD 和任何其他平台上使用 [Pkgsrc][2]: + + +``` + + +$ cd /usr/pkgsrc/misc/py-asciinema + +$ sudo bmake install clean + +``` + +### 从文本中制作电影 + +要用 Asciinema 开始录制,你可以使用 `rec` 子命令: + + +``` + + +$ asciinema rec mymovie.cast + +asciinema: recording asciicast to mymovie.cast + +asciinema: press <ctrl-d> or type "exit" when you're done + +``` + +一些友好的输出提醒你,你正在录制,并告诉你如何停止。按 **Ctrl+D** 或直接输入 `exit`。 + +当 Asciinema 处于活动状态时,你在终端所做的一切都会被记录下来。这包括输入、输出、错误、尴尬的停顿、错误或成功。如果你在录制过程中在你的终端中看到它,它会被剪辑。 + +当你演示完终端如何工作时,按 **Ctrl+D** 或输入 `exit` 来停止记录。 + +在这个例子中,产生的文件 `mymovie.cast` 是一个时间戳和动作的集合,作为播放机制的脚本(在电影脚本的意义上)。 + + +``` + + +{"version": 2, "width": 139, "height": 36, "timestamp": 1641457358, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}} + +[0.05351, "o", "\u001b]0;seth:~\u0007"] + +[0.05393, "o", "\u001b[1;31m$ \u001b[00m"] + +[1.380059, "o", "e"] + +[1.443823, "o", "c"] + +[1.514674, "o", "h"] + +[1.595238, "o", "o"] + +[1.789562, "o", " "] + +[2.09658, "o", "\""] + +[2.19683, "o", "h"] + +[2.403994, "o", "e"] + +[2.466784, "o", "l"] + +[2.711183, "o", "lo"] + +[3.120852, "o", "\""] + +[3.427886, "o", "\r\nhello\r\n"] + +[...] + +``` + +如果你犯了一个错误,你可以通过删除重现错误的行来去除这个错误。如果你发现自己在录制过程中做了很多编辑或冗长的停顿,你可以安装并使用 [asciinema-edit][3] 工具,它可以通过你定义的时间戳或消除空闲时间来剪掉这些“镜头”片段。 + +### 播放 Asciinema 电影 + +你可以使用 `play` 子命令播放你的 Asciinema: + + +``` +`$ asciinema play mymovie.cast` +``` + +这将接管你的终端会话,并使其成为最接近银幕的形式(除了那次你通过 `telnet` 观看 ASCII 格式的星球大战)。你的基于文本的电影播放,向你的用户展示一个复杂的任务是如何完成的。当然,播放的_实际_命令并不真正执行。这不是一个正在运行的 shell 脚本,所以即使你在电影中创建了一个 `hello.txt` 文件,在播放后也不会有一个新的 `hello.txt`。这只是为了展示。 + +然而,它不仅仅是一个展示。你可以暂停 Asciinema 电影,选择你在屏幕上看到的文本,并将其粘贴到一个活动终端,以运行该命令。Asciinema 是有用的文档。它向用户展示了如何完成一项任务,并允许他们进行复制和粘贴以确保准确性。 + +### 上传你的 Asciinema 电影 + +目前还没有 Asciinema 电影达到大片的地位,但你可以把你的电影上传到 Asciinema.org,与全世界分享。 + + +``` +`$ asciinema upload mymovie.cast` +``` + +如果你习惯了 YouTube 的上传时间,你会对 Asciinema 电影的传输速度感到惊喜。一个 `.cast` 文件通常只有几千字节,或最多几兆字节,所以上传几乎是瞬间完成的。你不需要一个账户来分享你的电影,但所有无人认领的电影在七天后会被删除。为了保存你的杰作,你可以在 Asciinema 上开设一个账户,然后坐等学院的召唤。 + +### Asciinema 作为文档 + +Asciinema 是演示最基本概念的好方法。因为它保留了从录制中复制和粘贴代码的能力,提供了按需暂停和播放的能力,并且完全准确地描绘了它的内容,它不仅仅是和屏幕录像一样好。它要好得多得多。无论你是用它来向你的朋友炫耀你的终端技能,还是用它来教育同事和学生,Asciinema 都是一个无价的、社交的、可利用的工具。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/record-terminal-session-asciinema + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/freedos.png?itok=aOBLy7Ky (4 different color terminal windows with code) +[2]: https://opensource.com/article/19/11/pkgsrc-netbsd-linux +[3]: https://github.com/cirocosta/asciinema-edit From 66dc81fe86b5d7215f1090b6d52a10e188961c71 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 24 Jan 2022 08:53:46 +0800 Subject: [PATCH 084/334] translting --- sources/tech/20220121 Make a video game with Bitsy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220121 Make a video game with Bitsy.md b/sources/tech/20220121 Make a video game with Bitsy.md index a4b6ddbb91..4f15d34390 100644 --- a/sources/tech/20220121 Make a video game with Bitsy.md +++ b/sources/tech/20220121 Make a video game with Bitsy.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/1/bitsy-game-design" [#]: author: "Peter Cheer https://opensource.com/users/petercheer" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From af5881949573602c2d8556c213bcb7e6a7b5b1fa Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 24 Jan 2022 09:44:16 +0800 Subject: [PATCH 085/334] TRP @wxy https://linux.cn/article-14209-1.html --- ...te from bots with this open source tool.md | 246 +++++++++++++++ ...te from bots with this open source tool.md | 293 ------------------ 2 files changed, 246 insertions(+), 293 deletions(-) create mode 100644 published/20220119 Protect your PHP website from bots with this open source tool.md delete mode 100644 sources/tech/20220119 Protect your PHP website from bots with this open source tool.md diff --git a/published/20220119 Protect your PHP website from bots with this open source tool.md b/published/20220119 Protect your PHP website from bots with this open source tool.md new file mode 100644 index 0000000000..ffc9c6f47a --- /dev/null +++ b/published/20220119 Protect your PHP website from bots with this open source tool.md @@ -0,0 +1,246 @@ +[#]: subject: "Protect your PHP website from bots with this open source tool" +[#]: via: "https://opensource.com/article/22/1/php-website-bouncer-crowdsec" +[#]: author: "Philippe Humeau https://opensource.com/users/philippe-humeau" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14209-1.html" + +用 CrowdSec 保护你的 PHP 网站不受机器人攻击 +====== + +> CrowdSec 门卫被设计成可以包含在任何 PHP 应用程序中,以帮助阻止攻击者。 + +![](https://img.linux.net.cn/data/attachment/album/202201/24/094243dtt2fkjjwtn5i2kz.jpg) + +PHP 是 Web 上广泛使用的一种编程语言,据估计有近 80% 的网站使用它。我在 [CrowdSec][2] 的团队决定,我们需要为服务器管理员提供一个 PHP 门卫,以帮助抵御那些可能试图与 PHP 文件互动的机器人和不良分子。 + +CrowdSec 门卫可以在应用栈的各个层面上进行设置:[Web 服务器、防火墙、CDN][3] 等等。本文关注的是另外一个层次:直接在应用层面设置补救措施。 + +由于各种原因,直接在应用程序中进行补救是有帮助的: + + * 它为潜在的安全威胁提供了业务逻辑上的答案。 + * 它提供了关于如何应对安全问题的自由。 + +虽然 CrowdSec 已经发布了一个 WordPress 门卫,但这个 PHP 库被设计成可以包含在任何 PHP 应用中(例如 Drupal)。该门卫有助于阻止攻击者,用验证码挑战他们,让人类通过,同时阻止机器人。 + +### 先决条件 + +本教程假定你在 Linux 服务器上运行 Drupal,并使用 [Apache 作为 Web 服务器][4]。 + +第一步是在你的服务器上 [安装 CrowdSec][5]。你可以用 [官方安装脚本][6] 来完成。如果你使用的是 Fedora、CentOS 或类似系统,请下载 RPM 版本: + +``` +$ curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh +``` + +在 Debian 和基于 Debian 的系统上,下载 DEB 版本: + +``` +$ curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh +``` + +这些脚本很简单,所以仔细阅读你下载的脚本,以验证它是否导入了 GPG 密钥并配置了一个新的存储库。当你清楚了它的作用后,就执行它,然后安装。 + +``` +$ sudo dnf install crowdsec || sudo apt install crowdsec +``` + +CrowdSec 会自己检测到所有现有的服务,所以不需要进一步的配置就可以立即得到一个能发挥功能的设置。 + +### 测试初始设置 + +现在你已经安装了 CrowdSec,启动一个 Web 应用漏洞扫描器,比如 [Nikto][7],看看它的表现如何: + +``` +$ ./nikto.pl -h http:// +``` + +![nikto scan][8] + +该 IP 地址已被检测到触发了各种场景,最后一个是 `crowdsecurity/http-crawl-non_statics`: + +![detected scan][9] + +然而,CrowdSec 只检测问题,需要一个门卫来应用补救措施。这就是 PHP 门卫发挥作用的地方。 + +### 用 PHP 门卫进行补救 + +现在你可以检测到恶意行为了,你需要在网站层面上阻止 IP。在这个时候,没有用于 Drupal 的门卫可用。然而,你可以直接使用 PHP 门卫。 + +它是如何工作的?PHP 门卫(和其他门卫一样)对 CrowdSec 的 API 进行调用,并检查是否应该禁止进入的 IP,向他们发送验证码,或者允许他们通过。 + +Web 服务器是 Apache,所以你可以使用 [Apache 的安装脚本][10]: + +``` +$ git clone https://github.com/crowdsecurity/cs-php-bouncer.git +$ cd cs-php-bouncer/ +$ ./install.sh --apache +``` + +![apache install script][11] + +门卫的配置是用来保护整个网站。可以通过调整 Apache 的配置保护网站的一个特定部分。 + +### 尝试访问网站 + +PHP 门卫已经安装并配置好。由于之前的网络漏洞扫描行动,你被禁止了,你可以尝试访问该网站看看: + +![site access attempt][12] + +门卫成功阻止了你的流量。如果你在以前的 Web 漏洞扫描后没有被禁止,你可以用增加一个手动决策: + +``` +$ cscli decisions add -i +``` + +对于其余的测试,删除当前的决策: + +``` +$ cscli decisions delete -i +``` + +### 更进一步 + +我封锁了试图破坏 PHP 网站的 IP。这很好,但那些试图扫描、爬取或 DDoS 的 IP 怎么办?这些类型的检测可能会导致误报,那么为什么不返回一个验证码挑战来检查它是否是一个真正的用户(而不是一个机器人),而不是封锁 IP? + +#### 检测爬虫和扫描器 + +我不喜欢爬虫和坏的用户代理,在 [Hub][13] 上有各种方案可以用来发现它们。 + +确保用 `cscli’ 下载了 Hub 上的 `base-http-scenarios` 集合: + +``` +$ cscli collections list | grep base-http-scenarios +crowdsecurity/base-http-scenarios ✔️ enabled /etc/crowdsec/collections/base-http-scenarios.yaml +``` + +如果没有找到,请安装它,并重新加载 CrowdSec: + +``` +$ sudo cscli collections install crowdsecurity/base-http-scenarios +$ sudo systemctl reload crowdsec +``` + +#### 用验证码补救 + +由于检测 DDoS、爬虫或恶意的用户代理可能会导致误报,我更倾向于对任何触发这些情况的 IP 地址返回一个验证码,以避免阻止真正的用户。 + +为了实现这一点,请修改 `profiles.yaml` 文件。 + +在 `/etc/crowdsec/profiles.yaml` 中的配置文件的开头添加这个 YAML 块: + +``` +--- +# /etc/crowdsec/profiles.yaml +name: crawler_captcha_remediation +filter: Alert.Remediation == true && Alert.GetScenario() in ["crowdsecurity/http-crawl-non_statics", "crowdsecurity/http-bad-user-agent"] + +decisions: + - type: captcha + duration: 4h +on_success: break +``` + +有了这个配置文件,任何触发 `crowdsecurity/http-crawl-non_statics` 或 `crowdsecurity/http-bad-user-agent` 场景的 IP 地址都会被强制执行一个验证码(持续 4 小时)。 + +接下来,重新加载 CrowdSec: + +``` +$ sudo systemctl reload crowdsec +``` + +#### 尝试自定义的补救措施 + +重新启动 Web 漏洞扫描器会触发很多场景,所以你最终会再次被禁止。相反,你可以直接制作一个触发 `bad-user-agent` 场景的攻击(已知的坏用户代理列表在 [这里][14])。请注意,你必须激活该规则两次才能被禁止。 + +``` +$ curl --silent -I -H "User-Agent: Cocolyzebot" http://example.com > /dev/null +$ curl -I -H "User-Agent: Cocolyzebot" http://example.com +HTTP/1.1 200 OK +Date: Tue, 05 Oct 2021 09:35:43 GMT +Server: Apache/2.4.41 (Ubuntu) +Expires: Sun, 19 Nov 1978 05:00:00 GMT +Cache-Control: no-cache, must-revalidate +X-Content-Type-options: nosniff +Content-Language: en +X-Frame-Options: SAMEORIGIN +X-Generator: Drupal 7 (http://drupal.org) +Content-Type: text/html; charset=utf-8 +``` + +当然,你可以看到,你的行为会被抓住。 + +``` +$ sudo cscli decisions list +``` + +![detected scan][15] + +如果你试图访问该网站,不会被简单地被阻止,而是会收到一个验证码: + +![CAPTCHA prompt][16] + +一旦你解决了这个验证码,你就可以重新访问网站了。 + +接下来,再次解禁自己: + +``` +$ cscli decisions delete -i +``` + +启动漏洞扫描器: + +``` +$ ./nikto.pl -h http://example.com +``` + +与上次不同的是,你现在可以看到,你已经触发了几个决策: + +![scan detected][17] + +当试图访问网站时,禁止决策具有优先权: + +![site access attempt][18] + +### 总结 + +这是一个帮助阻止攻击者进入 PHP 网站和应用程序的快速方法。本文只包含一个例子。补救措施可以很容易地扩展,以适应额外的需求。要了解更多关于安装和使用 CrowdSec 代理的信息,[查看这个方法指南][19] 来开始。 + +要下载 PHP 门卫,请到 [CrowdSec Hub][20] 或 [GitHub][21]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/php-website-bouncer-crowdsec + +作者:[Philippe Humeau][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/philippe-humeau +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/security_password_chaos_engineer_monster.png?itok=J31aRccu (Security monster) +[2]: https://opensource.com/article/20/10/crowdsec +[3]: https://hub.crowdsec.net/browse/#bouncers +[4]: https://opensource.com/article/18/2/how-configure-apache-web-server +[5]: https://doc.crowdsec.net/docs/getting_started/install_crowdsec +[6]: https://packagecloud.io/crowdsec/crowdsec/install +[7]: https://github.com/sullo/nikto +[8]: https://opensource.com/sites/default/files/1nikto_0.png (nikto scan) +[9]: https://opensource.com/sites/default/files/2decisions.png (detected scan) +[10]: https://github.com/crowdsecurity/cs-php-bouncer/blob/main/install.sh +[11]: https://opensource.com/sites/default/files/3bouncer.png (apache install script) +[12]: https://opensource.com/sites/default/files/4blocked.png (site access attempt) +[13]: https://hub.crowdsec.net/ +[14]: https://raw.githubusercontent.com/crowdsecurity/sec-lists/master/web/bad_user_agents.txt +[15]: https://opensource.com/sites/default/files/7decisions-again.png (detected scan) +[16]: https://opensource.com/sites/default/files/8sitedeny.png (CAPTCHA prompt) +[17]: https://opensource.com/sites/default/files/10decisionsagain.png (scan detected) +[18]: https://opensource.com/sites/default/files/11sitedeny.png (site access attempt) +[19]: https://crowdsec.net/tutorial-crowdsec-v1-1/ +[20]: https://hub.crowdsec.net/author/crowdsecurity/bouncers/cs-php-bouncer +[21]: https://github.com/crowdsecurity/cs-php-bouncer diff --git a/sources/tech/20220119 Protect your PHP website from bots with this open source tool.md b/sources/tech/20220119 Protect your PHP website from bots with this open source tool.md deleted file mode 100644 index 115fa4bb11..0000000000 --- a/sources/tech/20220119 Protect your PHP website from bots with this open source tool.md +++ /dev/null @@ -1,293 +0,0 @@ -[#]: subject: "Protect your PHP website from bots with this open source tool" -[#]: via: "https://opensource.com/article/22/1/php-website-bouncer-crowdsec" -[#]: author: "Philippe Humeau https://opensource.com/users/philippe-humeau" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Protect your PHP website from bots with this open source tool -====== -The CrowdSec bouncer is designed to be included in any PHP application -to help block attackers. -![Security monster][1] - -PHP is a widely-used programming language on the web, and it's estimated that nearly 80% of all websites use it. My team at [CrowdSec][2] decided that we needed to provide server admins with a PHP bouncer to help ward away bots and bad actors who may attempt to interact with PHP files. - -CrowdSec bouncers can be set up at various levels of an applicative stack: [web server, firewall, CDN][3], and so on. This article looks at one more layer: setting up remediation directly at the application level. - -Remediation directly in the application can be helpful for various reasons: - - * It provides a business-logic answer to potential security threats. - * It gives freedom about how to respond to security issues. - - - -While CrowdSec already publishes a WordPress bouncer, this PHP library is designed to be included in _any_ PHP application (Drupal, for example). The bouncer helps block attackers, challenging them with CAPTCHA to let humans through while blocking bots. - -### Prerequisites - -This tutorial assumes that you are running Drupal on a Linux server with [Apache as a web server.][4] - -The first step is to [install CrowdSec][5] on your server. You can do this with an [official install script][6]. If you're on Fedora, CentOS, or similar, download the RPM version: - - -``` -`$ curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh` -``` - -On Debian and Debian-based systems, download the DEB version: - - -``` -`$ curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh` -``` - -These scripts are simple, so read through the one you download to verify that it imports a GPG key and configures a new repository. Once you're comfortable with what it does, execute it and then install. - - -``` -`$ sudo dnf install crowdsec || sudo apt install crowdsec` -``` - -CrowdSec detects all the existing services on its own, so there should be no further configuration to get an immediately functional setup. - -### Test the initial setup - -Now that you have CrowdSec installed, launch a web application vulnerability scanner, such as [Nikto][7], and see how it behaves: - - -``` -`$ ./nikto.pl -h http://` -``` - -![nikto scan][8] - -(Philippe Humeau, CC BY-SA 4.0) - -The IP address has been detected and triggers various scenarios, the last one being **crowdsecurity/http-crawl-non_statics**. - -![detected scan][9] - -(Philippe Humeau, CC BY-SA 4.0) - -However, CrowdSec only detects issues, and a bouncer is needed to apply remediation. Here comes the PHP bouncer. - -### Remediate with the PHP bouncer - -Now that you can detect malicious behaviors, you need to block the IP at the website level. At this time, there is no Drupal bouncer available. However, you can use the PHP bouncer directly. - -How does it work? The PHP bouncer (like any other bouncer) makes an API call to the CrowdSec API and checks whether it should ban incoming IPs, send them a CAPTCHA, or allow them to pass. - -The web server is Apache, so you can use the [install script for Apache][10]. - - -``` - - -$ git clone -$ cd cs-php-bouncer/ -$ ./install.sh --apache - -``` - -![apache install script][11] - -(Philippe Humeau, CC BY-SA 4.0) - -The bouncer is configured to protect the whole website. Secure a specific part of the site by adapting the Apache configuration. - -### Try to access the website - -The PHP bouncer is installed and configured. You're banned due to the previous web vulnerability scan actions, but you can try to access the website: - -![site access attempt][12] - -(Philippe Humeau, CC BY-SA 4.0) - -The bouncer successfully blocked your traffic. If you were not banned following a previous web vulnerability scan, you could add a manual decision with: - - -``` -`$ cscli decisions add -i ` -``` - -For the remaining tests, remove the current decisions: - - -``` -`$ cscli decisions delete -i ` -``` - -### Going further - -I blocked the IP trying to mess with the PHP website. It’s nice, but what about IPs trying to scan, crawl, or DDoS it? Those kinds of detections can lead to false positives, so why not return a CAPTCHA challenge to check whether it is an actual user (rather than a bot) instead of blocking the IP? - -#### Detect crawlers and scanners - -I dislike crawlers and bad user agents and there are various scenarios available on the [Hub][13] to spot them. - -Ensure the `base-http-scenarios` collections from the Hub are downloaded with `cscli`: - - -``` - - -$ cscli collections list | grep base-http-scenarios -crowdsecurity/base-http-scenarios  ✔️ enabled  /etc/crowdsec/collections/base-http-scenarios.yaml - -``` - -If it is not the case, install it, and reload CrowdSec: - - -``` - - -$ sudo cscli collections install crowdsecurity/base-http-scenarios -$ sudo systemctl reload crowdsec - -``` - -#### Remedy with a CAPTCHA - -Since detecting DDoS, crawlers, or malevolent user agents can lead to false positives, I prefer to return a CAPTCHA for any IP address triggering those scenarios to avoid blocking real users. - -To achieve this, modify the `profiles.yaml` file. - -Add this YAML block at the beginning of your profile in `/etc/crowdsec/profiles.yaml`: - - -``` - - -\--- -# /etc/crowdsec/profiles.yaml -name: crawler_captcha_remediation -filter: Alert.Remediation == true && Alert.GetScenario() in ["crowdsecurity/http-crawl-non_statics", "crowdsecurity/http-bad-user-agent"] - -decisions: -  - type: captcha -    duration: 4h -on_success: break - -``` - -With this profile, a CAPTCHA is enforced (for four hours) on any IP address that triggers the scenarios `crowdsecurity/http-crawl-non_statics` or `crowdsecurity/http-bad-user-agent`. - -Next, reload CrowdSec: - - -``` -`$ sudo systemctl reload crowdsec` -``` - -#### Try the custom remediations - -Relaunching a web vulnerability scanner would trigger many scenarios, so you would ultimately be banned again. Instead, you can just craft an attack that triggers the `bad-user-agent` scenario (the list of known bad user-agents is [here][14]). Please note that you must activate the rule twice to get banned. - - -``` - - -$ curl --silent -I -H "User-Agent: Cocolyzebot" > /dev/null -$ curl -I -H "User-Agent: Cocolyzebot" -HTTP/1.1 200 OK -Date: Tue, 05 Oct 2021 09:35:43 GMT -Server: Apache/2.4.41 (Ubuntu) -Expires: Sun, 19 Nov 1978 05:00:00 GMT -Cache-Control: no-cache, must-revalidate -X-Content-Type-options: nosniff -Content-Language: en -X-Frame-Options: SAMEORIGIN -X-Generator: Drupal 7 () -Content-Type: text/html; charset=utf-8 - -``` - -You can, of course, see that you get caught for your actions. - - -``` -`$ sudo cscli decisions list` -``` - -![detected scan][15] - -(Philippe Humeau, CC BY-SA 4.0) - -If you try to access the website, instead of being simply blocked, you receive a CAPTCHA: - -![CAPTCHA prompt][16] - -(Philippe Humeau, CC BY-SA 4.0) - -Once you solve it, you can reaccess the website. - -Next, unban myself again: - - -``` -`$ cscli decisions delete -i ` -``` - -Launch the vulnerability scanner: - - -``` -`$ ./nikto.pl -h http://example.com` -``` - -Unlike the last time, you can now see that you've triggered several decisions: - -![scan detected][17] - -(Philippe Humeau, CC BY-SA 4.0) - -When trying to access the website, the ban decision has the priority: - -![site access attempt][18] - -(Philippe Humeau, CC BY-SA 4.0) - -### Wrap up - -This is a quick way to help block attackers from PHP websites and applications. This article contains only one example. Remediations can be easily extended to fit additional needs. To find out more about installing and using the CrowdSec agent, [check this how-to guide][19] to get started. - -To download the PHP bouncer, go to [the CrowdSec Hub][20] or [GitHub][21]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/php-website-bouncer-crowdsec - -作者:[Philippe Humeau][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/philippe-humeau -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/security_password_chaos_engineer_monster.png?itok=J31aRccu (Security monster) -[2]: https://opensource.com/article/20/10/crowdsec -[3]: https://hub.crowdsec.net/browse/#bouncers -[4]: https://opensource.com/article/18/2/how-configure-apache-web-server -[5]: https://doc.crowdsec.net/docs/getting_started/install_crowdsec -[6]: https://packagecloud.io/crowdsec/crowdsec/install -[7]: https://github.com/sullo/nikto -[8]: https://opensource.com/sites/default/files/1nikto_0.png (nikto scan) -[9]: https://opensource.com/sites/default/files/2decisions.png (detected scan) -[10]: https://github.com/crowdsecurity/cs-php-bouncer/blob/main/install.sh -[11]: https://opensource.com/sites/default/files/3bouncer.png (apache install script) -[12]: https://opensource.com/sites/default/files/4blocked.png (site access attempt) -[13]: https://hub.crowdsec.net/ -[14]: https://raw.githubusercontent.com/crowdsecurity/sec-lists/master/web/bad_user_agents.txt -[15]: https://opensource.com/sites/default/files/7decisions-again.png (detected scan) -[16]: https://opensource.com/sites/default/files/8sitedeny.png (CAPTCHA prompt) -[17]: https://opensource.com/sites/default/files/10decisionsagain.png (scan detected) -[18]: https://opensource.com/sites/default/files/11sitedeny.png (site access attempt) -[19]: https://crowdsec.net/tutorial-crowdsec-v1-1/ -[20]: https://hub.crowdsec.net/author/crowdsecurity/bouncers/cs-php-bouncer -[21]: https://github.com/crowdsecurity/cs-php-bouncer From 94c634fdb4720e02975d2273baad7948a59dd9ce Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 24 Jan 2022 11:21:43 +0800 Subject: [PATCH 086/334] RP @geekpi https://linux.cn/article-14210-1.html --- ...114 What makes Linux the sustainable OS.md | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) rename {translated/tech => published}/20220114 What makes Linux the sustainable OS.md (50%) diff --git a/translated/tech/20220114 What makes Linux the sustainable OS.md b/published/20220114 What makes Linux the sustainable OS.md similarity index 50% rename from translated/tech/20220114 What makes Linux the sustainable OS.md rename to published/20220114 What makes Linux the sustainable OS.md index 742870f02c..132f9009ea 100644 --- a/translated/tech/20220114 What makes Linux the sustainable OS.md +++ b/published/20220114 What makes Linux the sustainable OS.md @@ -3,38 +3,40 @@ [#]: author: "Don Watkins https://opensource.com/users/don-watkins" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14210-1.html" 是什么让 Linux 成为可持续的操作系统 ====== -Linux 有助于缩小数字鸿沟,延长硬件的使用寿命。使得它成为操作系统的一个环保选择。 -![5 pengiuns floating on iceburg][1] -与大流行病作斗争,造成了生产新电脑所需的微芯片的短缺。此外,一些较新的专有操作系统对这些系统有更高的最低标准。这个难题为我们这些在日常生活中使用 Linux 的人创造了一个机会。 +> Linux 有助于弥合数字鸿沟,延长硬件的使用寿命,使得它成为操作系统的一个环保选择。 + +![](https://img.linux.net.cn/data/attachment/album/202201/24/112042k6sonl2qqvnp6nqb.jpg) + +与大流行病作斗争,造成了生产新电脑所需的微芯片的短缺。此外,一些较新的专有操作系统提高了它们的硬件标准(LCTT 译注:Windows 11,别扭头看别人)。这个难题为我们这些在日常生活中使用 Linux 的人创造了一个机会。 ### 延长硬件的生命周期 -长期以来,Linux 一直以增加老化硬件的寿命而闻名。这种能力对那些每天使用电脑的人来说是个福音。 +长期以来,Linux 一直以延长老旧硬件的寿命而闻名。这种能力对那些每天使用电脑的人来说是个福音。 -在过去的一年里,我已经帮助许多人使用 Linux 翻新和[改装旧电脑][2]。基于 Linux 的电脑耗电更少,启动速度更快。[Gnome][3] 桌面很好,但许多旧电脑更适合 [LXDE][4] 或 [XFCE][5] 环境,它们需要较少的资源来运行。 +在过去的一年里,我已经帮助许多人使用 Linux 翻新和 [改装旧电脑][2]。基于 Linux 的电脑耗电更少,启动速度更快。[Gnome][3] 桌面很好,但许多旧电脑更适合 [LXDE][4] 或 [XFCE][5] 环境,它们运行需要较少的资源。 -像 [FreeGeek][6] 和 [Kramden Institute][7] 这样的组织已经把缩小数字鸿沟作为他们的核心任务,并且,在这样做的时候。这些团体对旧电脑进行了再利用,使它们不被填埋,并把它们送到需要它们的用户手中。没有 Linux,这些项目就不会发生。 +像 [FreeGeek][6] 和 [Kramden Institute][7] 这样的组织已经把弥合数字鸿沟作为他们的核心使命,并以此为目标。这些团体对旧电脑进行了再利用,使它们不被当成垃圾填埋,而是把它们送到需要它们的用户手中。没有 Linux,就没有这些项目。 -[DD-Wrt][8]、[OpenWrt][9] 和 [Tomato][10] 都是 Linux 解决方案,使旧的网络硬件不被填埋,同时为用户的路由器提供更多的安全、隐私和性能。 +[DD-Wrt][8]、[OpenWrt][9] 和 [Tomato][10] 都是 Linux 解决方案,使旧的网络硬件不被当成垃圾丢弃,并同时为用户的路由器提供更多的安全、隐私和性能。 -有了 [GalliumOS][11] 和 [Mrchromebox.tech][12],即使是 Chromebooks 在谷歌停止支持后也能获得新的生命。 +借助 [GalliumOS][11] 和 [Mrchromebox.tech][12],即使是 Chromebooks 在谷歌停止支持后也能获得新的生命。 ### 新的机会 -Linux 创造了一些本来不存在的机会。学生和业余爱好者都在没有投资的情况下开始了计算机科学的成功事业,这要归功于在旧电脑上学到的经验。这些系统运行企业级软件,如 [LAMP][13]栈,它促进了向 “Web 2.0” 的过渡。它是最早的网络开源软件栈之一。今天,它为 WordPress、Drupal 和 Joomla 的安装提供动力。事实上,Linux 为超过 96% 的世界顶级 100 万台网络服务器提供动力。Linux 还管理着[嵌入式系统][14]、电子阅读器、智能电视、智能手表[等等][15]。Linux 是世界上远[超过 70%][16] 的智能手机的操作系统。甚至美国国家航空航天局(NASA)今年在火星上创造历史的[毅力号][17],也是由 Linux 驱动的。 +Linux 创造了一些本来不存在的机会。学生和业余爱好者都在没有投资的情况下开始了计算机科学的成功事业,这要归功于他们在旧电脑上学到的经验。这些系统运行企业级软件,如 [LAMP][13] 栈,它促进了向 “Web 2.0” 的过渡。它是最早的 Web 开源软件栈之一。今天,它为 WordPress、Drupal 和 Joomla 系统提供了动力。事实上,Linux 为超过 96% 的世界前 100 万台 Web 服务器提供动力。Linux 还管理着 [嵌入式系统][14]、电子阅读器、智能电视、智能手表 [等等][15]。Linux 是世界上远远 [超过 70%][16] 的智能手机的操作系统。甚至美国国家航空航天局(NASA)今年在火星上创造历史的 [毅力号][17],也是由 Linux 驱动的。 -为当今大多数应用提供动力的云计算,没有 Linux 就不可能存在。今天的大多数网络和智能手机应用都在基于 Linux 的[容器][18]中运行。即使在微芯片短缺和专有系统成本高的情况下,进入云服务行业的人也有机会在开放源码的操作系统和软件上学习。 +为当今大多数应用提供动力的云计算,没有 Linux 就不可能存在。今天的大多数 Web 和智能手机应用都在基于 Linux 的 [容器][18] 中运行。即使在微芯片短缺和专有系统成本高昂的情况下,进入云服务行业的人也有机会学习开源的操作系统和软件。 ### 未来 -但最恰当的是,Linux 和开源为[联合国可持续发展目标][19]提供了动力。随着大流行的继续,Linux 仍然是一个重要的资源。 +但最恰当的是,Linux 和开源为 [联合国可持续发展目标][19] 提供了动力。随着大流行的继续,Linux 仍然是一个重要的资源。 -------------------------------------------------------------------------------- @@ -43,7 +45,7 @@ via: https://opensource.com/article/22/1/linux-sustainable-os 作者:[Don Watkins][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From dbc00a3de39cc3c72237873ae9d947e803d57953 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 25 Jan 2022 05:02:28 +0800 Subject: [PATCH 087/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220125=20?= =?UTF-8?q?Obsidian=20is=20a=20Notion=20Alternative=20for=20Hardcore=20Mar?= =?UTF-8?q?kdown=20Users=20for=20Creating=20Knowledge=20Graph=20of=20Notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md --- ...s for Creating Knowledge Graph of Notes.md | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 sources/tech/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md diff --git a/sources/tech/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md b/sources/tech/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md new file mode 100644 index 0000000000..574feb7e62 --- /dev/null +++ b/sources/tech/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md @@ -0,0 +1,113 @@ +[#]: subject: "Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes" +[#]: via: "https://itsfoss.com/obsidian-markdown-editor/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes +====== + +I like using Markdown for writing articles and taking notes. I am uncertain if I fit the criteria for a ‘hardcore Markdown user’ or not but I find it convenient for my writing works. + +I have tried several markdown editors on Linux. [Joplin][1] is my favorite for taking and organizing notes and keeping a backup on Nextcloud. There is also [Zettlr][2] which is suitable for researchers. + +Recently, I came across another Markdown editor that has a twist on document organizing. You can use it to interlink your documents and display them in a mind-map like graphical view. + +![Obsidian Markdown Editor][3] + +That’s the main attraction of [Obsidian][4] that you can get a graphical view of your Markdown notes specially when these notes have to be linked with each other. There are other features here as well. + +Non-FOSS alert! + +Initially, I thought that Obsidian was an open source software. It was only when I was looking for their source code repository (after I finished writing this article) that I realized it is [free-to-use application][5] but not FOSS (free and open source software). Which is a shame because it’s a damn good application and hence I continued to feature it here. + +### Features of Obsidian markdown editor + +You’ll find all features you expect from a standard Markdown editor. There is a sidebar to show the folder structure and a main pane where your document lies. You can choose to switch between ‘edit’ and ‘read’ view. + +![Interface of Obsidian markdown editor][6] + +By default, it displays one pane only but you can add more panes as per your liking. For example, I added a new pane to show both editing and viewing modes. This enables to edit and preview the document at the same time. + +![You can split the editor vertically or horizontally to add more panes for side by side viewing][7] + +You can create internal links to existing notes by pressing [[ keys. It opens a file searcher and lets you select from the existing notes in the same project (called vaults here). + +![Creating internal linking in Obsidian][8] + +You can switch to the Graph view to display the connection between the notes in the same vault (project). I made a few quick internal links to perform a test and you can see that it shows how files are interlinked to each other. + +![Obsidian Graph View][9] + +You can perform search and replace graphically. Tag the notes, merge files, move headlines between notes and more. + +It also has a command palette (located in the left sidebar of the editor) that allows you to control various aspects of the editor. Several of these ‘actions’ can be performed using keyboard shortcuts as well. + +![Obsidian command palette][10] + +This is not it. Obsidian also has a [community marketplace][11] where you can find and install plugins to extend its capabilities. For example, you can download the Kanban plugin and use Obsidian to manage projects and tasks. + +![Obsidian also has third-party, community plugins][12] + +There are plenty more features here and I can possibly not list all of them. Even the project website doesn’t list all the features at once place which is a bummer. + +### Installing Obsidian + +Obsidian is a cross platform application and it is available for Linux, macOS, Windows, Android and iOS. + +For Linux, you have the option to use AppImage, Snap or Flatpak. I used the AppImage version for testing. You can find relevant information and files on its download page. + +[Download Obsidian][13] + +### Is it worth it? + +Obsidian has a learning curve. You need to know the [basics of Markdown][14] of course but even for any features besides editing and displaying Markdown text, you need to learn things here. + +Almost any application requires some learning but to use Obsidian to its fullest, you need to put in more effort than the usual. + +But it’s entirely worth it if you are an obsessive Markdown user and with tons of documents. The good thing here is that it has [extensive documentation][15] to help you with your learning process. This documentation is also accessible from within the application interface when you hit the Help button (displayed with a question mark). + +![Accessing documentation on Obsidian][16] + +Obsidian interface makes me feel like I am using VS Code and that’s not a negative thing. + +If you live and breath Markdown and you are also obsessed with managing your documents properly, you should consider giving Obsidian a try. + +If you like it enough and start using it regularly, perhaps you may [consider a donation][17] or opt in for their premium offering to support the development of this project. The premium offering includes the option to sync your notes to their cloud or publish your notes on a website. + +Obsidian has been done professionally and beautifully. It’s like Visual Studio Code for Markdown and it has potential to become a true alternative to the likes of [Notion][18]. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/obsidian-markdown-editor/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/joplin/ +[2]: https://itsfoss.com/zettlr-markdown-editor/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/obsidian.jpg?resize=800%2C424&ssl=1 +[4]: https://obsidian.md/ +[5]: https://obsidian.md/eula +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Markdown-Editor-800x462.png?resize=800%2C462&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-multiple-pane.png?resize=800%2C462&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Internal-Linking.webp?resize=800%2C450&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Graph-View.png?resize=800%2C474&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Command-Palette.png?resize=800%2C474&ssl=1 +[11]: https://obsidian.md/plugins +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Plugins.webp?resize=800%2C364&ssl=1 +[13]: https://obsidian.md/download +[14]: https://itsfoss.com/markdown-guide/ +[15]: https://help.obsidian.md/Obsidian/Index +[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Markdown-Editor-Help.png?resize=800%2C439&ssl=1 +[17]: https://obsidian.md/pricing +[18]: https://www.notion.so/ From b20fbd20898bcdc1359ea3341f652e39eedc2804 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 25 Jan 2022 05:02:36 +0800 Subject: [PATCH 088/334] add done: 20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md --- sources/tech/20220124 .md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 sources/tech/20220124 .md diff --git a/sources/tech/20220124 .md b/sources/tech/20220124 .md new file mode 100644 index 0000000000..46ffb72458 --- /dev/null +++ b/sources/tech/20220124 .md @@ -0,0 +1,16 @@ +[#]: subject: "" +[#]: via: "https://www.debugpoint.com/2022/01/best-gnome-apps-part-3/" +[#]: author: "[Arindam] + +Posted by Arindam + +Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + + +====== + From 661a235b4ec23ec0b0c2527e940387c8f12e7440 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 25 Jan 2022 05:02:47 +0800 Subject: [PATCH 089/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220124=20?= =?UTF-8?q?Why=20choose=20Rocket.Chat=20for=20your=20open=20source=20chat?= =?UTF-8?q?=20tool?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220124 Why choose Rocket.Chat for your open source chat tool.md --- ...ket.Chat for your open source chat tool.md | 130 ++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 sources/tech/20220124 Why choose Rocket.Chat for your open source chat tool.md diff --git a/sources/tech/20220124 Why choose Rocket.Chat for your open source chat tool.md b/sources/tech/20220124 Why choose Rocket.Chat for your open source chat tool.md new file mode 100644 index 0000000000..bfae6319d4 --- /dev/null +++ b/sources/tech/20220124 Why choose Rocket.Chat for your open source chat tool.md @@ -0,0 +1,130 @@ +[#]: subject: "Why choose Rocket.Chat for your open source chat tool" +[#]: via: "https://opensource.com/article/22/1/rocketchat-data-privacy" +[#]: author: "Manuela Massochin https://opensource.com/users/manuela-massochin" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Why choose Rocket.Chat for your open source chat tool +====== +Rocket.Chat is an open source communications platform for organizations +that put data privacy first. +![Chat via email][1] + +Created in 2015, [Rocket.Chat][2] is a fully open source and customizable communications platform designed for communities and organizations with high standards for data protection. Rocket.Chat enables communication through federation, and over 12 million people are using it for team chat, customer service, secure file sharing, and much more. Rocket.Chat is in many ways the world's most comprehensive open source communications platform. + +### Install Rocket.Chat + +Rocket.Chat is open source, so you can install and host it yourself if you want. You can deploy it using all industry-standard deployment methods, including Podman, Docker, or Kubernetes, all of which are supported officially by Rocket.Chat. It's also available as a one-click app on many server and cloud providers. + +To run Rocket.Chat using Docker, downloading the `docker-compose.yml` file: + + +``` + + +$ wget -O docker-compose.yml \ + + +``` + +Now deploy Rocket.Chat: + + +``` +`$ docker-compose up -d` +``` + +[Firewall configuration][3] may be necessary, depending on your setup. + +Once you have the server running, you can download the Rocket.Chat client app on your desktop and mobile device. + +Alternatively, you can purchase a hosting from Rocket.Chat itself. There's a free trial, so you can evaluate it before committing, but Rocket.Chat is used in over 130 countries, and is the go-to messaging app for organizations including The World Bank, the US Navy, and [Audi][4]. + +### Rocket.Chat's main features + +Due to its scalability and adaptability, organizations can leverage Rocket.Chat in multiple ways, from internal communication to virtual events. Rocket.Chat's openness even allows companies to create new products on top of its code. + +![Rocket.Chat UI][5] + +Manuela Massochin (CC BY-SA 4.0) + +#### Talk to people outside of Rocket.Chat + +Communicating with other teams shouldn't be a hassle just because they use different communication platforms. Using federation, Rocket.Chat allows you to chat with partners, vendors, or any external organization, regardless of which collaboration platform they use. You can talk to people across Slack, MS Teams, Skype for Business, and other communications platforms. + +### 5 reasons organizations choose Rocket.Chat + +Your data is important, whether it's personal or work-related. It's a common misunderstanding that no criminal is interested enough in what you do online to bother stealing it, but ransomware is a largely automated process that doesn't require anyone to care about you. All it needs is data that's important to you to be exposed, stolen, and then ransomed back to you. To combat this, you need sufficient privacy in your online communication. + +That's one reason to choose Rocket.Chat, but not the only one. Here are five good reasons to choose Rocket.Chat over a non-open application: + +#### Open source + +First things first: Rocket.Chat has been open source since day one. With over 1000 contributors worldwide, it has standards for security, data privacy, and transparency that only open source software can offer. + +Rocket.Chat is full of out-of-the-box features and you can make it even more useful, efficient, and fun with integrations and add-on apps. This is just one of the [advantages of being open source.][6] Based on webhooks, its integrations connect the tools you already use with your workspace, providing a simplified workflow and increased productivity. + +In Rocket.Chat's [Marketplace][7] you'll find apps to integrate with other services, such as WhatsApp, Twitter, Jira, Dialogflow, Facebook Messenger, and many more. They're just one click away from being added to your workplace. + +#### Streamlined communication for teams and customers + +You don't have to take a scientific survey to know that employees want communication to be streamlined through a single application. Rocket.Chat accommodates all sorts of workplace communication and allows you to divide conversations into channels, threads, and discussions to work with your remote colleagues. + +It also has a comprehensive set of team collaboration features that ensure productivity, such as unlimited access to chat history, broadcast channels, and integrations. + +Not only does Rocket.Chat allow you to chat with colleagues, but it also lets you get in touch with customers and centralize your messages in a single inbox. Due to its comprehensive set of integrations, you can provide customer support entirely from Rocket.Chat, regardless of the channel your customers reach out to you from. + +Rocket.Chat integrates with common social media channels (including Facebook Messenger, email, WhatsApp, Telegram, and SMS) and also provides integrations with CRMs, chatbots, and machine learning apps. + +#### SaaS or self-managed hosting + +Rocket.Chat can be deployed in multiple ways, depending on business needs. You can choose between deploying it on Rocket.Chat's cloud (built on Docker and Kubernetes), cloud servers under your control, or your own premises. + +Rocket.Chat offers one-click deployments for more than thirty deployment methods across many on-premise and cloud solutions. For companies worried about data security, its on-premise hosting option puts you in complete control of your data, meaning nothing leaves your infrastructure. It can be hosted entirely behind your firewall or even on an air-gapped network. + +#### Complete data privacy, security, and ownership + +Rocket.Chat is ISO27001-certified and supports compliance with GDPR, HIPAA, FINRA, FedRAMP, and more. + +Its SaaS version is hosted in secure and audited data centers, ensuring the best performance and meeting strict data localization requirements. For the on-premise version, you'll be able to leverage the self-managed installation in your data center with layered security options (e.g., SSL, VPN, and DMZ). + +The self-managed option is a common choice for many companies with high standards for data security, like the American cybersecurity firm [OnShore][8] and the [Government of British Columbia][9]. + +#### High availability infrastructure and microservices architecture + +A common pain point for fast-growing companies and startups is finding software solutions that grow with them. Rocket.Chat's microservices architecture allows companies to scale easily and save on infrastructure costs. + +A microservices architecture means that the application is developed as a suite of small services. When it needs to be scaled, only parts of the system will need to be adjusted instead of the whole system—saving companies time and money. + +If you're pitching Rocket.Chat to your boss, it's significant that you can start using Rocket.Chat for free, or opt for one of its paid SaaS and self-hosted plans starting at $2 USD/user month. Paid plans offer a high availability infrastructure, microservices, administrative features (including LDAP and Active Directory, social media log in, an Atlassian bundle, and more), and unlimited push notifications. + +### Try Rocket.Chat + +Whether you host your own Rocket.Chat server or you opt for managed hosting, it's easy to [get started][10] with this great chat tool. Consolidate your communication into one open source application, increase online privacy, and support open source. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/rocketchat-data-privacy + +作者:[Manuela Massochin][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/manuela-massochin +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/email_chat_communication_message.png?itok=LKjiLnQu (Chat via email) +[2]: http://rocket.chat/ +[3]: https://www.redhat.com/sysadmin/secure-linux-network-firewall-cmd +[4]: https://rocket.chat/customer-stories/audi +[5]: https://opensource.com/sites/default/files/rocket-chat-ui.png (Rocket.Chat UI) +[6]: https://rocket.chat/blog/open-source-software-advantages +[7]: https://rocket.chat/marketplace +[8]: https://pt-br.rocket.chat/customer-stories/onshore +[9]: https://pt-br.rocket.chat/customer-stories/government-of-british-columbia +[10]: https://rocket.chat/install From 9c476b2cdf794fcf7f1c386b7793081a6876921b Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 25 Jan 2022 05:03:09 +0800 Subject: [PATCH 090/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220124=20?= =?UTF-8?q?Hosting=20my=20static=20sites=20with=20nginx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220124 Hosting my static sites with nginx.md --- ...0124 Hosting my static sites with nginx.md | 236 ++++++++++++++++++ 1 file changed, 236 insertions(+) create mode 100644 sources/tech/20220124 Hosting my static sites with nginx.md diff --git a/sources/tech/20220124 Hosting my static sites with nginx.md b/sources/tech/20220124 Hosting my static sites with nginx.md new file mode 100644 index 0000000000..6bd94debc3 --- /dev/null +++ b/sources/tech/20220124 Hosting my static sites with nginx.md @@ -0,0 +1,236 @@ +[#]: subject: "Hosting my static sites with nginx" +[#]: via: "https://jvns.ca/blog/2022/01/24/hosting-my-static-sites-with-nginx/" +[#]: author: "Julia Evans https://jvns.ca/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Hosting my static sites with nginx +====== + +Hello! Recently I’ve been thinking about putting my static sites on servers that I run myself instead of using managed services like Netlify or GitHub Pages. + +Originally I thought that running my own servers would require a lot of maintenance and be a huge pain, but I was chatting with Wesley about what kind of maintainance [their servers][1] require, and they convinced me that it might not be that bad. + +So I decided to try out moving all my static sites to a $5/month server to see what it was like. + +Everything in here is pretty standard but I wanted to write down what I did anyway because there are a surprising number of decisions and I like to see what choices other people make. + +### the constraint: only static sites + +To keep things simple, I decided that this server would only run `nginx` and only serve static sites. I have about 10 static sites right now, mostly projects for [wizard zines][2]. + +I decided to use a $5/month DigitalOcean droplet, which should very easily be able to handle my existing traffic (about 3 requests per second and 100GB of bandwidth per month). Right now it’s using about 1% of its CPU. I picked DigitalOcean because it was what I’ve used before. + +Also all the sites were already behind a CDN so they’re still behind the same CDN. + +### problem 1: getting a clean Git repo for each build + +This was the most interesting problem so let’s talk about it first! + +Building the static sites might seem pretty easy – each one of them already has a working build script. + +But I have pretty bad hygiene around files on my laptop – often I have a bunch of uncommitted files that I don’t want to go onto the live site. So I wanted to start every build with a clean Git repo. I also wanted this to be _fast_ – I’m impatient so I wanted to be able to build and deploy most of my sites in less than 10 seconds. + +I handled this by hacking together a tiny build system called [tinybuild][3]. It’s basically a 4-line bash script, but with extra some command line arguments and error checking. Here are the 4 lines of bash: + +``` + + docker build - -t tinybuild < Dockerfile + CONTAINER_ID=$(docker run -v "$PWD":/src -v "./deploy:/artifact" -d -t tinybuild /bin/bash) + docker exec $CONTAINER_ID bash -c "git clone /src /build && cd /build && bash /src/scripts/build.sh" + docker exec $CONTAINER_ID bash -c "mv /build/public/* /artifact" + +``` + +These 4 lines: + + 1. Build a Dockerfile with all the dependencies for that build + 2. Clone my repo into `/build` in the container, so that I always start with a clean Git repo + 3. Run the build script (`/src/scripts/build.sh`) + 4. Copy the build artifacts into `./deploy` in the local directory + + + +Then once I have `./deploy`, I can rsync the result onto the server + +It’s fast because: + + * the `docker build -` means I don’t send any state from the repository to the Docker daemon. This matters because one of my repos is 1GB (it has a lot of PDFs in it) and sending all that to the Docker daemon takes forever + * the `git clone` is from the local filesystem and I have a SSD so it’s fast even for a 1GB repo + * most of the build scripts just run `hugo` or `cat` so they’re fast. The `npm` build scripts take maybe 30 seconds. + + + +### apparently local git clones make hard links + +A tiny interesting fact: I tried to do `git clone --depth 1` to speed up my git clone, but git gave me this warning: + +``` + + warning: --depth is ignored in local clones; use file:// instead. + +``` + +I think what’s going on here is that git makes hard links of all the objects to make a local clone (which is a lot faster than copying). So I guess with the hard links approach `--depth 1` doesn’t make sense for some reason? And `file://` forces git to copy all objects instead, which is actually slower. + +### bonus: now my builds are faster than they used to be! + +One nice thing about this is that my build/deploy time is less than it was on Netlify. For `jvns.ca` it’s about 7 seconds to build and deploy the site instead of about a minute previously. + +### running the builds on my laptop seems nice + +I’m the only person who develops all of my sites, so doing all the builds in a Docker container on my computer seems to make sense. My computer is pretty fast and all the files are already right there! No giant downloads! And doing it in a Docker container keeps the build isolated. + +### example build scripts + +Here are the build scripts for this blog (`jvns.ca`). + +**Dockerfile** + +``` + + FROM ubuntu:20.04 + + RUN apt-get update && apt-get install -y git + RUN apt-get install -y wget python2 + RUN wget https://github.com/gohugoio/hugo/releases/download/v0.40.1/hugo_0.40.1_Linux-64bit.tar.gz + RUN wget https://github.com/sass/dart-sass/releases/download/1.49.0/dart-sass-1.49.0-linux-x64.tar.gz + RUN tar -xf dart-sass-1.49.0-linux-x64.tar.gz + RUN tar -xf hugo_0.40.1_Linux-64bit.tar.gz + RUN mv hugo /usr/bin/hugo + RUN mv dart-sass/sass /usr/bin/sass + +``` + +**build-docker.sh**: + +``` + + set -eu + scripts/parse_titles.py + sass sass/:static/stylesheets/ + hugo + +``` + +**deploy.sh**: + +``` + + set -eu + tinybuild -s scripts/build-docker.sh \ + -l "$PWD/deploy" \ + -c /build/public + + rsync-showdiff ./deploy/ [email protected]:/var/www/jvns.ca + rm -rf ./deploy + +``` + +### problem 2: getting rsync to just show me which files it updated + +When I started using rsync to sync the files, it would list every single file instead of just files that had changed. I think this was because I was generating new files for every build, so the timestamps were always newer than the files on the server. + +I did a bunch of Googling and figured out this incantation to get rsync to just show me files that were updated; + +``` + + rsync -avc --out-format='%n' "[email protected]" | grep --line-buffered -v '/$' + +``` + +I put that in a script called `rsync-showdiff` so I could reuse it. There might be a better way, but this seems to work. + +### problem 3: configuration management + +All I needed to do to set up the server was: + + * install nginx + * create directories in /var/www for each site, like `/var/www/jvns.ca` + * create an nginx configuration for each site, like `/etc/nginx/sites-enabled/jvns.ca.conf` + * deploy the files (with my deploy script above) + + + +I wanted to use some kind of configuration management to do this because that’s how I’m used to managing servers. I’ve used Puppet a lot in the past at work, but I don’t really _like_ using Puppet. So I decided to use Ansible even though I’d never used it before because it seemed simpler than using Puppet. Here’s [my current Ansible configuration][4], minus some of the templates it depends on. + +I didn’t use any Ansible plugins because I wanted to maximize the probability that I would actually be able to run this thing in 3 years. + +The most complicated thing in there is probably the `reload nginx` handler, which makes sure that the configuration is still valid after I make an nginx configuration update. + +### problem 4: replacing a lambda function + +I was using one Netlify lambda function to calculate purchasing power parity (“PPP”) for countries that have a weaker currency relative to the US on . Basically it gets your country using IP geolocation and then returns a discount code if you’re in a country that has a discount code. (like 70% off for India, for example). So I needed to replace it. + +I handled this by rewriting the (very small) program in Go, copying the static binary to the server, and adding a `proxy_pass` for that site. + +The program just looks up the country code from the [geolocation HTTP header][5] in a hashmap, so it doesn’t seem like it should cause maintenance problems. + +### a very simple nginx config + +I used the same nginx config file for templates for almost all my sites: + +``` + + server { + listen 80; + listen [::]:80; + + root /var/www/{{item.dir}}; + index index.html index.htm; + server_name {{item.server}}; + + location / { + # First attempt to serve request as file, then + # as directory, then fall back to displaying a 404. + try_files $uri $uri/ =404; + } + } + +``` + +The `{{item.dir}}` is an Ansible thing. + +I also added support for custom 404 pages (`error_page /404.html`) in the main `nginx.conf`. + +I’ll probably add TLS support with certbot later. My CDN handles TLS to the client, I just need to make the connection between the CDN and the origin server use TLS + +Also I don’t know if there are problems with using such a simple nginx config. Maybe I’ll learn about them! + +### bonus: I can find 404s more easily + +Another nice bonus of this setup is that it’s easier to see what’s happening with my site – I can just look at the nginx logs! + +I ran `grep 404 /var/log/nginx/access.log` to figure out if I’d broken anything during the migration, and I actually ended up finding a lot of links that had been broken for many years, but that I’d just never noticed. + +Netlify’s analytics has a “Top resources not found” that shows you the most common 404s, but I don’t think there’s any way to see _all_ 404s. + +### a small factor: costs + +Part of my motivation for this switch was – I was getting close to the Netlify free tier’s bandwidth limit (100GB/month), and Netlify charges $20/100GB for additional bandwidth. Digital Ocean charges $1/100GB for additional bandwidth (20x less), and my droplet comes with 1TB of bandwidth. So the bandwidth pricing feels a lot more reasonable to me. + +### we’ll see how it goes! + +All my static sites are running on my own server now. I don’t really know what this will be like to maintain, we’ll see how it goes – maybe I’ll like it! maybe I’ll hate it! I definitely like the faster build times and that I can easily look at my nginx logs. + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2022/01/24/hosting-my-static-sites-with-nginx/ + +作者:[Julia Evans][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://blog.wesleyac.com/posts/how-i-run-my-servers +[2]: https://wizardzines.com +[3]: https://github.com/jvns/tinybuild/ +[4]: https://gist.github.com/jvns/06754e9e65b49dd461fefa071dd4aace +[5]: https://support.cloudflare.com/hc/en-us/articles/200168236-Configuring-Cloudflare-IP-Geolocation From 131f0ae89426b6f4fa819d638fa9ecf30897ee59 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 25 Jan 2022 08:41:37 +0800 Subject: [PATCH 091/334] Delete 20220124 .md @lujun9972 --- sources/tech/20220124 .md | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 sources/tech/20220124 .md diff --git a/sources/tech/20220124 .md b/sources/tech/20220124 .md deleted file mode 100644 index 46ffb72458..0000000000 --- a/sources/tech/20220124 .md +++ /dev/null @@ -1,16 +0,0 @@ -[#]: subject: "" -[#]: via: "https://www.debugpoint.com/2022/01/best-gnome-apps-part-3/" -[#]: author: "[Arindam] - -Posted by Arindam - -Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - - -====== - From 47845b005fffc6c898eae2b6090a6faabd2cdb18 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 25 Jan 2022 08:55:14 +0800 Subject: [PATCH 092/334] translated --- ...- An Open-Source Alternative to Discord.md | 136 ------------------ ...- An Open-Source Alternative to Discord.md | 136 ++++++++++++++++++ 2 files changed, 136 insertions(+), 136 deletions(-) delete mode 100644 sources/tech/20210914 Revolt- An Open-Source Alternative to Discord.md create mode 100644 translated/tech/20210914 Revolt- An Open-Source Alternative to Discord.md diff --git a/sources/tech/20210914 Revolt- An Open-Source Alternative to Discord.md b/sources/tech/20210914 Revolt- An Open-Source Alternative to Discord.md deleted file mode 100644 index 8daa9dc4a3..0000000000 --- a/sources/tech/20210914 Revolt- An Open-Source Alternative to Discord.md +++ /dev/null @@ -1,136 +0,0 @@ -[#]: subject: "Revolt: An Open-Source Alternative to Discord" -[#]: via: "https://itsfoss.com/revolt/" -[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Revolt: An Open-Source Alternative to Discord -====== - -_**Brief**: Revolt is a promising free and open-source choice to replace Discord. Here, we take a look at what it offers along with its initial impressions._ - -Discord is a feature-rich collaboration platform primarily tailored for gamers. Even though you can use Discord on Linux with no issues, it is still a proprietary solution. - -You can choose to use [Element][1] as an open-source solution collaboration platform, but it is not a replacement. - -But, Revolt is an impressive Discord alternative that is open-source. - -Note - -Revolt is in the public beta testing phase and does not offer any mobile applications. It may lack some essential features that you find on Discord. - -Let me highlight what you can expect with Revolt and if it can be a replacement for Discord on Linux. - -### An Open Source Discord Alternative That You Can Self-Host - -![][2] - -Revolt is not just a simple open-source replacement, but you also get the ability to self-host. - -It does lack a variety of features that Discord offers, but you get a lot of basic functionalities to get a head start to start experimenting. - -Even without some features, you could mention it as a feature-rich open-source client. Let us look at the features available right now. - -### Features of Revolt - -![][3] - -While it looks and feels a lot like Discord already, here are some of the key highlights: - - * Ability to create your own server - * Create text channels and voice channels - * Assign user roles in a server - * Tweak the theme (dark/light) - * Change the accent color - * Manage the font and emoji packs from available options - * Custom CSS support - * Ability to add bots - * Easy to manage permissions for text/voice channels - * Send friend requests to other users - * Saved notes section - * Ability to control notifications - * Hardware acceleration support - * Dedicated desktop settings - * Self-hosting using Docker - * User status and custom status support - - - -So, as something in the public beta testing phase, it sounds excellent for starters. You already get most of the core functionalities, but you may want to wait to see it as a full-fledged Discord replacement. - -### Initial Impressions of Using Revolt - -![][4] - -If you have used Discord, the user experience will feel familiar. And that is a good thing here. - -For this quick app highlight, I did not compare the resource usage of Discord and Revolt because it is still in beta and won’t be an apples-to-apples comparison. - -However, in my brief testing, it felt snappy, except the case when you load up a text channel for the first time. When publishing this, it did not have the Two-Factor Authentication (2FA) feature but was supposed to be added in their first milestone (Version 1) release. - -![][5] - -Some features like user status, permission management, and appearance tweaks looked useful. But, when it comes to the voice channels, it is not the same way as Discord works, at least for now. - -I have no idea if they plan to do it the same way, but Discord’s voice channel feature is intuitive, fast, and with better controls. - -Not to forget, Discord also offers “Discord Stage,” which is a Clubhouse-like audio room feature. - -Some other features that I couldn’t find included: - - * Ability to react to messages - * Noise suppression feature - * Change server - * Server logs - * Variety of useful bots - - - -Of course, it will take a significant amount of time to catch up with the features offered by Discord, but at least we now have an open-source solution to Discord. - -You can explore their [project roadmap/release tracker][6] to see what you can expect in its final/future releases. - -### Install Revolt in Linux - -Revolt is available for Linux and Windows. You can choose to use it on your web browser without needing a separate application. - -But, if you need to have it on your desktop, they offer an AppImage file and a deb package that you can grab from its [GitHub releases section][7]. - -If you’re new to Linux, refer to our resources on [using an AppImage file][8] and [installing deb packages][9] to get started. - -Feel free to head to its [Feedback section][10] if you want to help them improve with your bug reports and suggestions. Also, you can explore their [GitHub page][11] for more information. - -[Revolt][12] - -What do you think about Revolt? Do you believe that it has the potential to become a good open-source replacement to Discord on Linux? - -Let me know your thoughts in the comments down below! - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/revolt/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/element/ -[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/revolt-screenshot.png?resize=800%2C506&ssl=1 -[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/revolt-desktop-settings.png?resize=800%2C501&ssl=1 -[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/revolt-screenshot1.png?resize=800%2C509&ssl=1 -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/revolt-appearance-setting.png?resize=800%2C524&ssl=1 -[6]: https://github.com/orgs/revoltchat/projects/2 -[7]: https://github.com/revoltchat/desktop/releases/tag/v1.0.2 -[8]: https://itsfoss.com/use-appimage-linux/ -[9]: https://itsfoss.com/install-deb-files-ubuntu/ -[10]: https://app.revolt.chat/settings/feedback -[11]: https://github.com/revoltchat -[12]: https://revolt.chat diff --git a/translated/tech/20210914 Revolt- An Open-Source Alternative to Discord.md b/translated/tech/20210914 Revolt- An Open-Source Alternative to Discord.md new file mode 100644 index 0000000000..68329ac4cd --- /dev/null +++ b/translated/tech/20210914 Revolt- An Open-Source Alternative to Discord.md @@ -0,0 +1,136 @@ +[#]: subject: "Revolt: An Open-Source Alternative to Discord" +[#]: via: "https://itsfoss.com/revolt/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Revolt:Discord 的开源替代品 +====== + +_**简介**:Revolt 是一个有前途的自由和开源的选择,以取代 Discord。在这里,我们看一下它所提供的东西以及它的初步印象。_ + +Discord 是一个功能丰富的协作平台,主要为游戏玩家量身定做。尽管你可以在 Linux 上毫无问题地使用 Discord,但它仍然是一个专有解决方案。 + +你可以选择使用 [Element][1] 作为一个开源的解决方案协作平台,但它不是一个替代品。 + +但是,Revolt 是一个令人印象深刻的 Discord 替代品,它是开源的。 + +注意 + +Revolt 正处于公开测试阶段,不提供任何移动应用。它可能缺乏一些你在 Discord 上找到的基本功能。 + +让我强调一下你可以对 Revolt 的期待,以及它是否可以成为 Linux 上 Discord 的替代品。 + +### 一个你可以自行托管的开源 Discord 替代品 + +![][2] + +Revolt 不仅仅是一个简单的开源替代品,而且你还可以自我托管。 + +它确实缺少 Discord 提供的各种功能,但你可以获得许多基本功能,以便抢先开始尝试。 + +即使没有一些功能,你也可以说它是一个功能丰富的开源客户端。让我们来看看现在的特点。 + +### Revolt 的特点 + +![][3] + +虽然它看起来和感觉已经很像Discord,但这里有一些关键的亮点: + + * 能够创建你自己的服务器 + * 创建文字频道和语音频道 + * 在服务器中分配用户角色 + * 调整主题(深色/浅色) + * 改变强调色 + * 从可用选项中管理字体和表情包 + * 支持自定义 CSS + * 能够添加机器人 + * 易于管理文本/语音频道的权限 + * 向其他用户发送朋友请求 + * 保存的笔记部分 + * 能够控制通知 + * 支持硬件加速 + * 专门的桌面设置 + * 使用 Docker 进行自我托管 + * 用户状态和自定义状态支持 + + + +因此,作为处于公开测试阶段的东西,它听起来对初学者来说非常好。你已经得到了大部分的核心功能,但你可能想等着看它成为一个成熟的 Discord 替代品。 + +### 使用 Revolt 的初步印象 + +![][4] + +如果你使用过 Discord,用户体验会感觉很熟悉。而这在这里是一件好事。 + +对于这篇快速亮点介绍,我没有比较 Discord 和 Revolt 的资源使用情况,因为它仍然处于测试阶段,不会是一个同类的比较。 + +然而,在我简短的测试中,它感觉很快速,除了你第一次加载一个文本频道的情况。在发表这篇文章时,它没有双因素认证(2FA)功能,但应该是在他们的第一个里程碑(第一版)版本中添加。 + +![][5] + +一些功能如用户状态、权限管理和外观调整看起来很有用。但是,当涉及到语音频道时,它和 Discord 的工作方式不一样,至少现在是这样。 + +我不知道他们是否打算用同样的方式,但 Discord 的语音频道功能是直观的,快速的,而且有更好的控制。 + +不要忘了,Discord 还提供 “Discord Stage”,这是一个类似 Clubhouse 的音频室功能。 + +其他一些我找不到的功能包括: + + * 对信息作出反应的能力 + * 抑制噪音的功能 + * 改变服务器 + * 服务器日志 + * 各种有用的机器人 + + + +当然,要赶上 Discord 提供的功能还需要大量的时间,但至少我们现在有一个开源的 Discord 解决方案。 + +你可以探索他们的[项目路线图/发布跟踪器][6],看看你可以在其最终/未来的版本中期待什么。 + +### 在 Linux 中安装 Revolt + +Revolt 可用于 Linux 和 Windows。你可以选择在你的网络浏览器上使用它,而不需要一个单独的应用。 + +但是,如果你需要在你的桌面上使用它,他们提供了一个 AppImage 文件和一个 deb 包,你可以从它的 [GitHub 发布页][7]下载。 + +如果你是 Linux 的新手,可以参考我们关于[使用 AppImage 文件][8]和[安装 deb 包][9]的资源来开始学习。 + +如果你想用你的错误报告和建议来帮助他们改进,请随时前往[反馈页面][10]。此外,你还可以浏览他们的 [GitHub 页面][11]以了解更多信息。 + +[Revolt][12] + +你对 Revolt 有什么看法?你认为它有可能成为 Linux 上 Discord 的一个很好的开源替代品吗? + +请在下面的评论中告诉我你的想法! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/revolt/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/element/ +[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/revolt-screenshot.png?resize=800%2C506&ssl=1 +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/revolt-desktop-settings.png?resize=800%2C501&ssl=1 +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/revolt-screenshot1.png?resize=800%2C509&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/revolt-appearance-setting.png?resize=800%2C524&ssl=1 +[6]: https://github.com/orgs/revoltchat/projects/2 +[7]: https://github.com/revoltchat/desktop/releases/tag/v1.0.2 +[8]: https://itsfoss.com/use-appimage-linux/ +[9]: https://itsfoss.com/install-deb-files-ubuntu/ +[10]: https://app.revolt.chat/settings/feedback +[11]: https://github.com/revoltchat +[12]: https://revolt.chat From a7789510c89d2cd8ff7b1def6fedff9c32911e28 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 25 Jan 2022 08:59:57 +0800 Subject: [PATCH 093/334] translating --- .../20220122 Our favorite Linux commands to use just for fun.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220122 Our favorite Linux commands to use just for fun.md b/sources/tech/20220122 Our favorite Linux commands to use just for fun.md index 7eedf08a82..98783ed06e 100644 --- a/sources/tech/20220122 Our favorite Linux commands to use just for fun.md +++ b/sources/tech/20220122 Our favorite Linux commands to use just for fun.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/1/fun-linux-commands" [#]: author: "Opensource.com https://opensource.com/users/admin" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From bfaaa2ab9931015258bd9c5ef269e72ecdf8178f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 25 Jan 2022 13:51:12 +0800 Subject: [PATCH 094/334] RP @geekpi https://linux.cn/article-14212-1.html --- ...ce Interactive Whiteboard for Educators.md | 57 +++++++++---------- 1 file changed, 28 insertions(+), 29 deletions(-) rename {translated/tech => published}/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md (60%) diff --git a/translated/tech/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md b/published/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md similarity index 60% rename from translated/tech/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md rename to published/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md index ee431862fd..d011673fa9 100644 --- a/translated/tech/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md +++ b/published/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md @@ -3,84 +3,83 @@ [#]: author: "Ankush Das https://itsfoss.com/author/ankush/" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14212-1.html" OpenBoard:面向教育工作者的开源交互式白板 ====== -**简介:** _OpenBoard 是为学校和大学定制的交互式开源白板。让我们来看看它提供了什么!_ +![](https://img.linux.net.cn/data/attachment/album/202201/25/134634wzn22l0x3zycy9et.jpg) -有几个开源工具可用于教育。但是,并非所有这些软件都在面向学校和大学的商业软件水平上得到了令人印象深刻的良好维护。 +> OpenBoard 是为中小学和大学定制的交互式开源白板。让我们来看看它提供了什么。 -OpenBoard 就是这样一个特殊的免费开源工具,它可以在不妥协的情况下实现教育。它是一个交互式白板程序,具有所有基本功能,并支持各种硬件。 +有几个可用于教育的开源工具,但是,并非所有这些面向中小学和大学的软件都能达到商业软件级的良好维护。 -### OpenBoard:免费和开源的交互式白板 +OpenBoard 就是这样一个不同凡响的自由开源工具,它可以不打折扣地为教育服务。它是一个交互式白板程序,具有所有基本功能,并支持各种硬件。 + +### OpenBoard:自由及开源的交互式白板 ![][1] -作为一个免费和开源的程序,OpenBoard 似乎是一个令人印象深刻的选择。 +作为一个自由开源的程序,OpenBoard 看起来是一个令人印象深刻的选择。 瑞士日内瓦州的教育部门(DIP)与 GitHub 上的社区一起维护该工具。 -为了通过交互式白板促进轻松的数字教学,它不应该花费巨资。这就是 OpenBoard 的优势所在。 +通过交互式白板促进简单的数字教学不应该花费很多,这就是 OpenBoard 的优势所在。 -它提供的一系列功能对大多数学校和大学来说应该是足够的。 +它提供的一系列功能对大多数中小学和大学来说应该是足够的。 -虽然我无法在学校/大学环境中测试它,但我将强调它提供的主要功能。 +虽然我无法在中小学/大学环境中测试它,但我会重点介绍它提供的主要功能。 ### OpenBoard 的特点 ![][2] -交互式白板不需要众多花哨的功能,但足以使教师能够尽可能轻松地表达自己。 - +交互式白板没有众多花哨的功能,但足以使教师能够尽可能轻松地表达自己。 我注意到的一些特点包括: * 跨平台支持 - * 能够自由地画/写 + * 能够自由地写写画画 * 能够添加注释 * 能够删除注释 - * 使用荧光笔高亮显示你的白板的一部分 + * 可以使用荧光笔高亮显示你的白板的部分区域 * 单独互动和移动创建/绘制的项目 - * 按顺序添加多个页面,继续教学而不需要擦除 - * 能够滚动浏览各页 + * 按顺序添加多个页面,可以继续教学而不需要擦除 + * 能够在页面间滚动浏览 * 绘制线条(从三种不同线宽中选择) * 切换手写笔模式(如果你使用的是手写板或类似的东西) - * 易于擦除在白板上创建的项目 - * 从一组不同的背景中选择,包括把它变成黑板或带网格线的背景 + * 轻松擦除在白板上创建的项目 + * 可以从一组不同的背景中选择,包括把它变成黑板或带网格线的背景 * 各种必要的应用,包括计算器、地图、尺子等,都可以通过拖放使用 - * 可以使用有限的形状,使绘图更容易 + * 提供的一些形状,可以使绘图更容易 * 能够向你的白板添加音频/视频,并无缝播放,以获得更好的体验 * 虚拟激光笔 - * 可选择放大和缩小 - * 写文字,调整大小,并克隆它 + * 可放大和缩小 + * 书写文字,调整大小,并克隆它 * 从白板中对屏幕进行截图 * 需要时可使用虚拟键盘 - - 在我简短的测试中,用户界面和可用的选项工作得非常好,没有任何故障。 ![][3] -当然,你的体验将取决于设备的类型和你的设置。你可以用 Wacom 平板电脑、双显示器设置,或者通过支持触摸的笔记本电脑使用投影仪来尝试。 +当然,你的体验将取决于设备的类型和你的设置。你可以用 Wacom 平板、双显示器设置,或者通过支持触摸的笔记本电脑使用投影仪来尝试。 ### 在 Linux 中安装 OpenBoard -幸运的是,它可以在多个平台上使用,包括 Windows、macOS 和 Linux。 +更好的是,它可以在多个平台上使用,包括 Windows、macOS 和 Linux。 如果你使用的是 Ubuntu,你可以到官方网站下载 DEB 文件。另外对于其他 Linux 发行版,你可以选择通过 [Flathub][5] [安装 Flatpak 软件包][4]。 -[OpenBoard][6] +- [OpenBoard][6] ### 结语 总的来说,我发现它在使用和导航方面毫不费力。你可以在多个页面之间快速切换,无缝擦除/添加项目,同时还可以在白板上添加丰富的元素。 -虚拟激光笔的存在,以及一些应用,使它适合在各种学校和大学中使用而没有任何障碍。 +通过虚拟激光笔以及一些应用,使得它适合在各种中小学和大学中使用而没有任何障碍。 我不知道它是否可以被称为谷歌课堂或 Miro 白板功能的替代品,但对于更简单的使用,OpenBoard 可以胜任。 @@ -93,7 +92,7 @@ via: https://itsfoss.com/openboard/ 作者:[Ankush Das][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 7ff8ce4b355be05d060d5088ca0d06cc3049b015 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 25 Jan 2022 15:25:02 +0800 Subject: [PATCH 095/334] A --- ...ve vs. Google Chrome- Which is the better browser for you.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220108 Brave vs. Google Chrome- Which is the better browser for you.md b/sources/tech/20220108 Brave vs. Google Chrome- Which is the better browser for you.md index bf2ba5be47..2cdd6eac54 100644 --- a/sources/tech/20220108 Brave vs. Google Chrome- Which is the better browser for you.md +++ b/sources/tech/20220108 Brave vs. Google Chrome- Which is the better browser for you.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/brave-vs-chrome/" [#]: author: "Ankush Das https://itsfoss.com/author/ankush/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 30542dba6b004296a04cb724300cd1b1a7f3496d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 25 Jan 2022 16:32:44 +0800 Subject: [PATCH 096/334] TR @wxy --- ...me- Which is the better browser for you.md | 175 ----------------- ...me- Which is the better browser for you.md | 177 ++++++++++++++++++ 2 files changed, 177 insertions(+), 175 deletions(-) delete mode 100644 sources/tech/20220108 Brave vs. Google Chrome- Which is the better browser for you.md create mode 100644 translated/tech/20220108 Brave vs. Google Chrome- Which is the better browser for you.md diff --git a/sources/tech/20220108 Brave vs. Google Chrome- Which is the better browser for you.md b/sources/tech/20220108 Brave vs. Google Chrome- Which is the better browser for you.md deleted file mode 100644 index 2cdd6eac54..0000000000 --- a/sources/tech/20220108 Brave vs. Google Chrome- Which is the better browser for you.md +++ /dev/null @@ -1,175 +0,0 @@ -[#]: subject: "Brave vs. Google Chrome: Which is the better browser for you?" -[#]: via: "https://itsfoss.com/brave-vs-chrome/" -[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Brave vs. Google Chrome: Which is the better browser for you? -====== - -Google Chrome is undoubtedly one of the [best web browsers available for Linux][1]. It offers a good blend of user experience and feature set for many, regardless of what platform you use it on. - -On the other hand, Brave is popular as a privacy-focused open-source option available cross-platform. - -So, what should you pick as your primary web browser? Is Chrome for you? Who should use Brave? - -Here, we compare all the important aspects (including benchmarks) on both browsers to help you decide. - -### User Interface - -![][2] - -[Google Chrome][3] provides a clean user interface without unnecessary distractions out of the box. - -By default, it blends in with the system theme on Linux (GTK), as per my experience. So, it might look a bit different as per your customizations. - -![][4] - -If you are not using it on Linux, everything else should look similar except the color scheme. - -When it comes to [Brave][5], it does not adapt to your system color scheme out of the box. But, you can head to the Appearance settings and enable the GTK theme if you prefer. - -Brave gets close to the Chrome user interface, with some unique tweaks/options to access. - -![][6] - -You can’t go wrong with either, considering the user interface. They’re both easy to navigate. - -However, Brave provides a few extra options to customize the appearance, like removing the tab search button (left to the minimize button), showing the full URL, etc. - -![][7] - -If you find this helpful, Brave is your friend. With Google Chrome, you do not get a lot of control in terms of UI customization. - -### Open Source vs. Proprietary - -![][8] - -Brave is an open-source web browser based on Chromium. We also have a list of [open-source browsers not based on Chromium][9], if you are curious. - -Google Chrome is also based on Chromium, but it adds several proprietary elements, making it a closed source offering. - -While you can expect the benefits of open-source software and transparency with Brave, Google can be quite fast when patching issues considering they have a dedicated security team. - -None of these should be noticeable for an average user. But, if you prefer open-source and software that believes in transparency, Brave should be the pick. In either case, if you have no issues with proprietary code and trust Google with their products, Google Chrome can be a choice. - -If you want an open-source browser with a similar UI to Chrome, you may want to check our comparison between [Chrome vs Chromium][10] to pick one. - -### Feature Differences - -You should find all the essential functionalities on both the browsers, with similar behavior. - -However, there are some notable differences between the two. - -As mentioned above, you will notice differences in the ability to customize the look and feel. - -There is also a big difference in the ability to sync browser data between multiple devices. - -![][11] - -With Google Chrome, you can quickly sign in to your Google account and sync everything to your phone and other devices. - -Brave also lets you sync, but it could be inconvenient for some. You will need access to one of your devices, where you use Brave to sync successfully. - -Your sync data is not stored in the cloud. So, you will have to authorize using a QR code or a secret phrase to transfer/sync browsing data to another device. - -![][12] - -Hence, you must export the bookmarks and other associated data for external backup. - -Thankfully, there’s an alternative if you want the convenience of sync and an open-source browser. Head to our [Firefox vs Brave comparison][13] article to know why that can be a good pick for you. - -In addition to these differences, Brave offers support [IPFS protocol][14], which is a peer-to-peer secure protocol aimed to fight against censorship. - -Not to forget, Brave comes with [Brave Search][15] as its search engine by default. So, if you prefer it over Google as a [private search engine][16], that’s a good thing as well. - -Brave Rewards is also an interesting addition, where you earn rewards for enabling Brave’s privacy-friendly ads and can contribute them back to websites you frequently visit. - -You can share resources using it directly to the recipient if cloud storage services or any online platform normally blocks it. - -Overall, Brave offers numerous interesting things. But, Google Chrome is a simpler alternative that can be a convenient option for many. - -### The Privacy Angle - -The presence of tracking protection on Brave should be good for privacy enthusiasts. You can block ads and trackers using the Shield feature. In addition to that, you also get several filters available to toggle if you want aggressive blocking (which might result in broken websites). - -Google Chrome does not offer this feature. But, you can always use some privacy-focused chrome extensions, and Google’s Safe Browsing feature should keep you safe from malicious websites. - -Generally speaking, if you do not visit shady websites, you should be OK with Google Chrome. And, if you are a privacy enthusiast, Brave can be a better choice. - -### Performance - -While Brave is usually considered the fastest, it didn’t seem to be the case in my benchmark tests. That’s a surprise! - -However, the real-world difference should not be noticeable for most. - -![][17] - -I used the popular benchmark tests: [JetStream 2][18], [Speedometer 2.0][19], and [Basemark Web 3.0][20]. - -Note that the Linux distribution used is **Pop!_OS 21.10**, and the browser versions tested were **Chrome 97.0.4692.71** and **Brave 97.0.4692.71**. - -To give you an idea, I had nothing running in the background, except the browser on my PC powered by **Intel i5-11600k @4.7 GHz, 32 GB 3200 MHz RAM, and 1050ti Nvidia Graphics**. - -### Installation - -![][21] - -Google Chrome provides DEB/RPM packages to download and install on Ubuntu, Debian, Fedora, or openSUSE. - -Brave also supports the same Linux distributions, but you will have to use the terminal and follow the commands mentioned in their download page to get it installed. - -![][22] - -You can follow our installation guide to [install Brave in Fedora][23]. - -None of them are available in the software center. Also, you do not get any [Flatpak package][24] or snaps. - -If you want something directly from the software center, a flatpak package, or a snap, Firefox is your friend. - -### What Should You Pick? - -If you want more customizations and advanced features, Brave should be an impressive choice. But, if you do not have a problem using a proprietary browser on your Linux distro and want slightly better performance, Google Chrome is a viable choice. - -For privacy-focused users, the answer is obvious. But, you do have to think about the convenience of sync. So, if you are confused about your priorities, I encourage you to evaluate your requirements and decide what you want. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/brave-vs-chrome/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/best-browsers-ubuntu-linux/ -[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2022/01/chrome-brave-ui.png?resize=800%2C435&ssl=1 -[3]: https://www.google.com/chrome/index.html -[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2022/01/google-chrome-ui.png?resize=800%2C479&ssl=1 -[5]: https://brave.com -[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-browser-ui.png?resize=800%2C479&ssl=1 -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-appearance-options.png?resize=800%2C563&ssl=1 -[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/open-source-proprietary.png?resize=800%2C450&ssl=1 -[9]: https://itsfoss.com/open-source-browsers-linux/ -[10]: https://itsfoss.com/chrome-vs-chromium/ -[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/google-chrome-sync.png?resize=800%2C555&ssl=1 -[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/brave-sync.png?resize=800%2C383&ssl=1 -[13]: https://itsfoss.com/brave-vs-firefox/ -[14]: https://ipfs.io -[15]: https://itsfoss.com/brave-search-features/ -[16]: https://itsfoss.com/privacy-search-engines/ -[17]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/chrome-brave-benchmarks.png?resize=800%2C450&ssl=1 -[18]: https://webkit.org/blog/8685/introducing-the-jetstream-2-benchmark-suite/ -[19]: https://webkit.org/blog/8063/speedometer-2-0-a-benchmark-for-modern-web-app-responsiveness/ -[20]: https://web.basemark.com -[21]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/google-chrome-package.png?resize=800%2C561&ssl=1 -[22]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-install-linux.png?resize=800%2C325&ssl=1 -[23]: https://itsfoss.com/install-brave-browser-fedora/ -[24]: https://itsfoss.com/what-is-flatpak/ diff --git a/translated/tech/20220108 Brave vs. Google Chrome- Which is the better browser for you.md b/translated/tech/20220108 Brave vs. Google Chrome- Which is the better browser for you.md new file mode 100644 index 0000000000..5318ac07d4 --- /dev/null +++ b/translated/tech/20220108 Brave vs. Google Chrome- Which is the better browser for you.md @@ -0,0 +1,177 @@ +[#]: subject: "Brave vs. Google Chrome: Which is the better browser for you?" +[#]: via: "https://itsfoss.com/brave-vs-chrome/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +Brave vs. Google Chrome:哪个浏览器更适合你? +====== + +![](https://img.linux.net.cn/data/attachment/album/202201/25/163210d15a580twwpwyzmw.jpg) + +Google Chrome 无疑是 [可用于 Linux 的最佳网页浏览器][1] 之一。无论你在什么平台上使用它,它都提供了用户体验和功能集的良好融合。 + +另一方面,Brave 作为跨平台可用的、以隐私为中心的开源选项而广受欢迎。 + +那么,你应该选择哪一个作为首选网页浏览器呢?Chrome 适合你吗?谁应该使用 Brave? + +在这里,我们比较了两种浏览器的所有重要方面(包括基准测试),以帮助你做出决定。 + +### 用户界面 + +![][2] + +[Google Chrome][3] 用户界面干净、开箱即用,没有不必要的干扰。 + +根据我的经验,默认情况下,它与 Linux 上的(GTK)系统主题融为一体。因此,根据你的自定义设置,它可能看起来有点不同。 + +![][4] + +如果你不在 Linux 上使用它,那么除了配色方案外,其他所有界面都基本相似。 + +而对于 [Brave][5],它并不能开箱即用地适应你的系统配色方案。但是,你可以在它的外观设置里启用 GTK 主题。 + +Brave 与 Chrome 的用户界面接近,但有一些独有的调整/选项。 + +![][6] + +就用户界面而言,两者都不错,都很容易使用。 + +但是,Brave 提供了一些自定义外观的附加选项,例如删除选项卡搜索按钮(左侧到最小化按钮)、显示完整的 URL 等。 + +![][7] + +如果你觉得这对你有用,Brave 就更适合你。使用 Google Chrome,你在 UI 定制方面没有太多控制权。 + +### 开源与专有 + +![][8] + +Brave 是一个基于 Chromium 的开源网页浏览器。顺便说一句,我们还有一份 [不基于 Chromium 的开源浏览器][9] 的列表。 + +Google Chrome 也基于 Chromium,但它添加了几个专有元素,使其成为一个闭源产品。 + +虽然你可以期待 Brave 的开源和透明度带来的好处,但考虑到 Google 有专门的安全团队,他们在修补问题时可以非常快。 + +对于普通用户来说,这些都是不太关注的地方。但是,如果你更在意开源和具有透明度的软件,那么 Brave 应该是首选。另一方面,如果你不在意是否是专有代码,并且信任 Google 的产品,那么 Google Chrome 是一个选择。 + +如果你想要一个与 Chrome 具有相似 UI 的开源浏览器,你可能想要看看我们对 [Chrome 和 Chromium][10] 的比较来选择一个。 + +### 功能差异 + +你应该会发现两个浏览器的所有基本功能都是相似的。 + +但是,两者之间存在一些显着差异。 + +如上所述,你会注意到自定义外观的能力存在差异。 + +在多个设备之间同步浏览器数据的能力也存在很大差异。 + +![][11] + +使用 Google Chrome,你可以快速登录你的 Google 帐户并将所有内容同步到你的手机和其他设备。 + +Brave 也可以让你同步,但对某些人来说可能不方便。你需要访问你已经使用 Brave 成功同步的设备之一。 + +你的同步数据并未存储在云中。因此,你必须使用二维码或密码授权将浏览数据传输/同步到另一台设备。 + +![][12] + +因此,你必须导出书签和其他相关数据以进行外部备份。 + +值得庆幸的是,如果你既想要方便的同步,也想要开源浏览器,还有另一种选择。看看我们的 [Firefox 和 Brave 比较][13] 文章,了解为什么这对你来说是一个不错的选择。 + +除了这些差异之外,Brave 还支持 [IPFS 协议][14],这是一种旨在对抗审查的点对点安全协议。 + +也不要忘记,Brave 默认带有 [Brave Search][15] 作为其搜索引擎。所以,如果你更喜欢它而不是将谷歌作为 [私人搜索引擎][16],那也是一件好事。 + +Brave Rewards 也是一个有趣的附加功能,你可以通过启用 Brave 的隐私友好型广告获得奖励,并将其回馈给你经常访问的网站。 + +如果云存储服务或任何在线平台阻止了这些,你可以将使用它的资源直接共享给接收者。 + +总的来说,Brave 提供了许多有趣的东西。但是,Chrome 浏览器是一个更简单的选择,对许多人来说是一个方便的选择。 + +### 隐私角度 + +Brave 的跟踪保护应该有利于注重隐私的人。你可以使用 Shield 功能阻止广告和跟踪器。除此之外,如果你想要更积极阻止广告(这可能会破坏网站显示和功能),还有几个可切换使用的过滤器。 + +Chrome 浏览器不提供此功能。但是,你总可以使用一些以隐私为重点的 Chrome 扩展程序,而 Google 的安全浏览功能应该可以保护你免受恶意网站的侵害。 + +一般来说,如果你不访问黑幕网站,应该可以使用 Chrome 浏览器。而如果你关注隐私,Brave 可能是更好的选择。 + +### 表现 + +虽然 Brave 通常被认为是最快的,但在我的基准测试中似乎并非如此。这真令人吃惊! + +但是,对于大多数人来说,实际的差异应该不明显。 + +![][17] + +我使用了流行的基准测试:[JetStream 2][18]、[Speedometer 2.0][19] 和 [Basemark Web 3.0][20]。 + +请注意,我使用的 Linux 发行版是 **Pop!_OS 21.10**,测试的浏览器版本是 **Chrome 97.0.4692.71** 和 **Brave 97.0.4692.71**。 + +当然,除了浏览器之外,我没有在后台运行任何东西。我的 PC 是由 **Intel i5-11600k @4.7 GHz、32 GB 3200 MHz RAM 和 1050ti Nvidia Graphics** 驱动的。 + +### 安装 + +![][21] + +Chrome 浏览器提供的 DEB/RPM 软件包以在 Ubuntu、Debian、Fedora 或 openSUSE 上下载和安装。 + +Brave 也支持相同的 Linux 发行版,但你必须使用终端,并按照下载页面中提到的命令进行安装。 + +![][22] + +你可以按照我们的安装指南 [在 Fedora 中安装 Brave][23]。 + +它们都不能通过软件中心安装。此外,你也找不到任何 [Flatpak 包][24] 或 Snap 包。 + +如果你想要直接从软件中心安装,或找到一个 flatpak 包或 Snap 包,Firefox 可以满足你的需求。 + +### 你应该选择什么? + +如果你想要更多自定义和高级功能,Brave 应该是一个令人印象深刻的选择。但是,如果你对在 Linux 发行版上使用专有浏览器没有问题,并且想要稍微更好的性能,那么 Google Chrome 是一个可行的选择。 + +对于注重隐私的用户来说,答案是显而易见的。但是,你必须考虑同步的便利性。因此,如果你对自己到底最在意什么感到困惑,我建议你先评估你的要求并决定你想要什么。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/brave-vs-chrome/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-browsers-ubuntu-linux/ +[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2022/01/chrome-brave-ui.png?resize=800%2C435&ssl=1 +[3]: https://www.google.com/chrome/index.html +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2022/01/google-chrome-ui.png?resize=800%2C479&ssl=1 +[5]: https://brave.com +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-browser-ui.png?resize=800%2C479&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-appearance-options.png?resize=800%2C563&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/open-source-proprietary.png?resize=800%2C450&ssl=1 +[9]: https://itsfoss.com/open-source-browsers-linux/ +[10]: https://itsfoss.com/chrome-vs-chromium/ +[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/google-chrome-sync.png?resize=800%2C555&ssl=1 +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/brave-sync.png?resize=800%2C383&ssl=1 +[13]: https://itsfoss.com/brave-vs-firefox/ +[14]: https://ipfs.io +[15]: https://itsfoss.com/brave-search-features/ +[16]: https://itsfoss.com/privacy-search-engines/ +[17]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/chrome-brave-benchmarks.png?resize=800%2C450&ssl=1 +[18]: https://webkit.org/blog/8685/introducing-the-jetstream-2-benchmark-suite/ +[19]: https://webkit.org/blog/8063/speedometer-2-0-a-benchmark-for-modern-web-app-responsiveness/ +[20]: https://web.basemark.com +[21]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/google-chrome-package.png?resize=800%2C561&ssl=1 +[22]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-install-linux.png?resize=800%2C325&ssl=1 +[23]: https://itsfoss.com/install-brave-browser-fedora/ +[24]: https://itsfoss.com/what-is-flatpak/ From 3b38cd475e1e3b23bf2fba9f2b8d579ff0c21f50 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 25 Jan 2022 16:39:03 +0800 Subject: [PATCH 097/334] P @wxy https://linux.cn/article-14213-1.html --- ... Google Chrome- Which is the better browser for you.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20220108 Brave vs. Google Chrome- Which is the better browser for you.md (97%) diff --git a/translated/tech/20220108 Brave vs. Google Chrome- Which is the better browser for you.md b/published/20220108 Brave vs. Google Chrome- Which is the better browser for you.md similarity index 97% rename from translated/tech/20220108 Brave vs. Google Chrome- Which is the better browser for you.md rename to published/20220108 Brave vs. Google Chrome- Which is the better browser for you.md index 5318ac07d4..f33d85cac2 100644 --- a/translated/tech/20220108 Brave vs. Google Chrome- Which is the better browser for you.md +++ b/published/20220108 Brave vs. Google Chrome- Which is the better browser for you.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14213-1.html" Brave vs. Google Chrome:哪个浏览器更适合你? ====== @@ -64,7 +64,7 @@ Google Chrome 也基于 Chromium,但它添加了几个专有元素,使其成 你应该会发现两个浏览器的所有基本功能都是相似的。 -但是,两者之间存在一些显着差异。 +但是,两者之间存在一些显著差异。 如上所述,你会注意到自定义外观的能力存在差异。 @@ -72,7 +72,7 @@ Google Chrome 也基于 Chromium,但它添加了几个专有元素,使其成 ![][11] -使用 Google Chrome,你可以快速登录你的 Google 帐户并将所有内容同步到你的手机和其他设备。 +使用 Google Chrome,你可以快速登录你的 Google 账户并将所有内容同步到你的手机和其他设备。 Brave 也可以让你同步,但对某些人来说可能不方便。你需要访问你已经使用 Brave 成功同步的设备之一。 From ec5ac385838655e0dd956bbcd6c6dbdb6ea98085 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 26 Jan 2022 05:02:29 +0800 Subject: [PATCH 098/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220126=20?= =?UTF-8?q?Jrnl:=20Your=20Digital=20Diary=20in=20the=20Linux=20Terminal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md --- ...our Digital Diary in the Linux Terminal.md | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 sources/tech/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md diff --git a/sources/tech/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md b/sources/tech/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md new file mode 100644 index 0000000000..7314d6572f --- /dev/null +++ b/sources/tech/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md @@ -0,0 +1,118 @@ +[#]: subject: "Jrnl: Your Digital Diary in the Linux Terminal" +[#]: via: "https://itsfoss.com/jrnl/" +[#]: author: "Marco Carmona https://itsfoss.com/author/marco/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Jrnl: Your Digital Diary in the Linux Terminal +====== + +Imagine this: somebody has broken your heart and what you want is to write your feelings in a journal without distraction. Did you get the idea? No? Neither do I. I am not heartbroken (or maybe I am and I don’t want to tell you). + +But I would still like to show you a wonderful minimalistic open-source, note-taking application to keep journal entries. + +This handy little program is [Jrnl][1] and it lets you create, search and view journal entries right in the terminal. + +Creating new notes with Jrnl is as simple as writing this: + +``` + + jrnl yesterday: I read an amazing article on It’s FOSS. I learn about a minimalist app called Jrnl, I should try it. + +``` + +Looks easy, isn’t it? The keyword yesterday is a trigger here and it saves your note to yesterday’s date. Remember that it’s called Jrnl (journal) for a reason. Its main aim is to keep journal. + +If you like to keep a diary of your thoughts or simply want to try it out, let me share a few details on the installation and its usage. + +### Installing and using Jnrl on your Linux system + +Jrnl can be installed using pipx or Homebrew package managers. + +I used Homebrew for my testing so I’ll list those steps. Get Homebrew first: + +``` + + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + +``` + +![Installing Homebrew on your system][2] + +That’s all! If you need more information, we have a detailed tutorial on [installing Homebrew on Linux][3]. + +Once you have Homebrew package manager installed, use it to install Jrnl: + +``` + + brew install jrnl + +``` + +![Installing Jrnl with Homebrew][4] + +Once you have it installed, just initialize jrnl and start writing your random thoughts. + +Do you remember the first example at the beginning of this article? Let’s take a look at it again! + +``` + + jrnl yesterday: I read an amazing article in It’s FOSS. I learn about a minimalist app called Jrnl, I should try it. + +``` + +![Writing an entry][5] + +In this line, I’m starting the program with the command `jrnl` next to a timestamp, which in this case is `yesterday`. I write a colon `:` to indicate that I will start writing something, and everything contained until a first sentence mark `.?!:` (in this case a period `.`) will be the title. Finally, everything next to this sentence mark will be considered the body of the file. + +Currently, Jnrl has two modes: composing and viewing; the steps before are used to compose an entry but if what you want to view, for example, the entry that was written before, the syntax is also easy, what you only have to type is the next line. + +``` + + jrnl -on yesterday + +``` + +![Viewing an entry][6] + +Think that someone may read your journal and thoughts? You can also encrypt your entries. + +That’s it! Of course, Jrnl has a lot more function, which can easily be found with the next line: + +``` + + jrnl --help + +``` + +You can also refer to the documentation on [its official website][7]. Remember, the documentation is your best friend in an open-source project like this one. Enjoy it! + +### Conclusion + +Of course, Jrnl is not for everyone. Most command line utilities are not. But if you live and breath in the terminal and like to record your thoughts + +Please don’t forget to share with us your personal experience in the comments; or even better, if you want to get this project to many more people you can share this post in various communities and forum. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/jrnl/ + +作者:[Marco Carmona][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/marco/ +[b]: https://github.com/lujun9972 +[1]: https://jrnl.sh/en/stable/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing_brew.png?resize=800%2C131&ssl=1 +[3]: https://itsfoss.com/homebrew-linux/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/installing_jrnl.png?resize=800%2C490&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Writing_an_entry.png?resize=800%2C211&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Viewing_an_entry.png?resize=800%2C159&ssl=1 +[7]: https://jrnl.sh/en/stable/overview/ From fe08a21529cf4fb3c3bb3439c813c096f8302d64 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 26 Jan 2022 05:02:43 +0800 Subject: [PATCH 099/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220125=20?= =?UTF-8?q?Use=20Mozilla=20DeepSpeech=20to=20enable=20speech=20to=20text?= =?UTF-8?q?=20in=20your=20application?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md --- ...able speech to text in your application.md | 142 ++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 sources/tech/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md diff --git a/sources/tech/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md b/sources/tech/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md new file mode 100644 index 0000000000..091df4d476 --- /dev/null +++ b/sources/tech/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md @@ -0,0 +1,142 @@ +[#]: subject: "Use Mozilla DeepSpeech to enable speech to text in your application" +[#]: via: "https://opensource.com/article/22/1/voice-text-mozilla-deepspeech" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Use Mozilla DeepSpeech to enable speech to text in your application +====== +Speech recognition in applications isn't just a fun trick but an +important accessibility feature. +![Colorful sound wave graph][1] + +One of the primary functions of computers is to parse data. Some data is easier to parse than other data, and voice input continues to be a work in progress. There have been many improvements in the area in recent years, though, and one of them is in the form of DeepSpeech, a project by Mozilla, the foundation that maintains the Firefox web browser. DeepSpeech is a voice-to-text command and library, making it useful for users who need to transform voice input into text and developers who want to provide voice input for their applications. + +### Install DeepSpeech + +DeepSpeech is open source, released under the Mozilla Public License (MPL). You can download the source code from its [GitHub][2] page. + +To install, first create a virtual environment for Python: + + +``` +`$ python3 -m pip install deepspeech --user` +``` + +DeepSpeech relies on machine learning. You can train it yourself, but it's easiest just to download pre-trained model files when you're just starting. + + +``` + + +$ mkdir DeepSpeech +$ cd Deepspeech +$ curl -LO \ + +$ curl -LO \ + + +``` + +### Applications for users + +With DeepSpeech, you can transcribe recordings of speech to written text. You get the best results from speech cleanly recorded under optimal conditions. However, in a pinch, you can try any recording, and you'll probably get something you can use as a starting point for manual transcription. + +For test purposes, you might record an audio file containing the simple phrase, "This is a test. Hello world, this is a test." Save the audio as a `.wav` file called `hello-test.wav`. + +In your DeepSpeech folder, launch a transcription by providing the model file, the scorer file, and your audio: + + +``` + + +$ deepspeech --model deepspeech*pbmm \ +\--scorer deepspeech*scorer \ +\--audio hello-test.wav + +``` + +Output is provided to the standard out (your terminal): + + +``` +`this is a test hello world this is a test` +``` + +You can get output in JSON format by using the `--json` option: + + +``` + + +$ deepspeech --model deepspeech*pbmm \ +\-- json +\--scorer deepspeech*scorer \ +\--audio hello-test.wav + +``` + +This renders each word along with a timestamp: + + +``` + + +{ +  "transcripts": [ +    { +      "confidence": -42.7990608215332, +      "words": [ +        { +          "word": "this", +          "start_time": 2.54, +          "duration": 0.12 +        }, +        { +          "word": "is", +          "start_time": 2.74, +          "duration": 0.1 +        }, +        { +          "word": "a", +          "start_time": 2.94, +          "duration": 0.04 +        }, +        { +          "word": "test", +          "start_time": 3.06, +          "duration": 0.74 +        }, +[...] + +``` + +### Developers + +DeepSpeech isn't just a command to transcribe pre-recorded audio. You can also use it to process audio streams in real time. The GitHub repository [DeepSpeech-examples][3] is full of JavaScript, Python, C#, and Java for Android. + +Most of the hard work is already done, so integrating DeepSpeech usually is just a matter of referencing the DeepSpeech library and knowing how to obtain the audio from the host device (which you generally do through the `/dev` filesystem on Linux or an SDK on Android and other platforms.) + +### Speech recognition + +As a developer, enabling speech recognition for your application isn't just a fun trick but an important accessibility feature that makes your application easier to use by people with mobility issues, low vision, and chronic multi-taskers who like to keep their hands full. As a user, DeepSpeech is a useful transcription tool that can convert audio files into text. Regardless of your use case, try DeepSpeech and see what it can do for you. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/voice-text-mozilla-deepspeech + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/colorful_sound_wave.png?itok=jlUJG0bM (Colorful sound wave graph) +[2]: https://github.com/mozilla/DeepSpeech +[3]: https://github.com/mozilla/DeepSpeech-examples From 885e2b5a60232fe5cb75fbaa08cc4422e09fe155 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 26 Jan 2022 05:02:53 +0800 Subject: [PATCH 100/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220125=20?= =?UTF-8?q?Creating=20and=20initializing=20lists=20in=20Java=20and=20Groov?= =?UTF-8?q?y?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220125 Creating and initializing lists in Java and Groovy.md --- ...d initializing lists in Java and Groovy.md | 189 ++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 sources/tech/20220125 Creating and initializing lists in Java and Groovy.md diff --git a/sources/tech/20220125 Creating and initializing lists in Java and Groovy.md b/sources/tech/20220125 Creating and initializing lists in Java and Groovy.md new file mode 100644 index 0000000000..98e70c2377 --- /dev/null +++ b/sources/tech/20220125 Creating and initializing lists in Java and Groovy.md @@ -0,0 +1,189 @@ +[#]: subject: "Creating and initializing lists in Java and Groovy" +[#]: via: "https://opensource.com/article/22/1/creating-lists-groovy-java" +[#]: author: "Chris Hermansen https://opensource.com/users/clhermansen" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Creating and initializing lists in Java and Groovy +====== +Create and initialize a list of integers, first in Java and then in +Groovy. +![Developing code.][1] + +I like the [Groovy programming language][2] a lot. I like it because, in the end, I like Java, even though Java sometimes feels clumsy. And because I like Java so much, I don't find many other JVM languages especially attractive. Kotlin, Scala, and Clojure, for example, don't feel much like Java, pursuing their own perspectives on what makes a good programming language. Groovy is different; in my view, Groovy is the perfect antidote to those situations when a programmer who likes Java just needs something a bit more flexible, compact, and sometimes even straightforward. + +A good example is the List data structure, which is used to hold an ordered list of numbers, strings, or objects, and allows the programmer to iterate through those items in an efficient fashion. Especially for people writing and maintaining scripts, "efficiency" is mostly about clear and brief expressions that don't require a bunch of ceremony that obscures the intent of the code. + +### Install Java and Groovy + +Groovy is based on Java and requires a Java installation as well. Both a recent and decent version of Java and Groovy might be in your Linux distribution's repositories. Otherwise, you can install Groovy by following [these instructions][3]. A nice alternative for Linux users is SDKMan, which can be used to get multiple versions of Java, Groovy, and many other related tools. For this article, I use SDK's releases of: + + * Java: version 11.0.12-open of OpenJDK 11 + * Groovy: version 3.0.8 + + + +### Back to the problem + +There have been various ways of instantiating and initializing lists in Java since they were first introduced (I think that was Java 1.5, but please don't quote me). Two current interesting ways involve two different libraries: **java.util.Arrays** and **java.util.List**. + +#### Use java.util.Arrays + +**java.util.Arrays** defines the static method **asList()**, which can be used to create a list that is backed by an array and is therefore also immutable, though its elements are mutable. Here it is in action: + + +``` + + +var a1 = [Arrays][4].asList(1,2,3,4,5,6,7,8,9,10); // immutable list of mutable elements + +[System][5].out.println("a1 = " + a1); +[System][5].out.println("a1 is an instance of " + a1.getClass()); + +// output is +// a1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] +// a1 is an instance of class java.util.Arrays$ArrayList + +a1.set(0,0); // succeeds +[System][5].out.println("a1 = " + a1); // output is +// a1 = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10] + +a1.add(11); // fails producing +// Exception in thread "main" java.lang.UnsupportedOperationException +[System][5].out.println("a1 = " + a1); // not reached + +``` + +#### Use java.util.List + +**java.util.List** defines the static method **of().** This can be used to create an immutable list with elements that may or may not be immutable, depending on whether the items in the list of elements are immutable. Here is this version in action: + + +``` + + +var a2 = [List][6].of(1,2,3,4,5,6,7,8,9,10); + +[System][5].out.println("a2 = " + a2); +[System][5].out.println("a2 is an instance of " + a2.getClass()); + +// output is +// a2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] +// a2 is an instance of class java.util.ImmutableCollections$ListN + +a2.set(0,0); // fails producing +// Exception in thread "main" java.lang.UnsupportedOperationException +[System][5].out.println("a2 = " + a2); // not reached + +a2.add(11); // also fails for same reason if above two lines commented out +[System][5].out.println("a2 = " + a2); // not reached + +``` + +So, I can use either **Arrays.asList()** or **List.of()** if I want a list that can't be grown (or shrunk) and may or may not have alterable elements. + +If I want an initialized mutable list I would probably resort to using those immutable-ish lists as arguments to a list constructor, for example: + + +``` + + +var a1 = new ArrayList<Integer>([Arrays][4].asList(1,2,3,4,5,6,7,8,9,10)); + +[System][5].out.println("a1 = " + a1); +[System][5].out.println("a1 is an instance of " + a1.getClass()); + +// output is +// a1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] +// a1 is an instance of class java.util.ArrayList + +a1.set(0,0); +[System][5].out.println("a1 = " + a1); + +//output is +// a1 = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10] + +a1.add(11); +[System][5].out.println("a1 = " + a1); + +// output is +// a1 = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + +``` + +Note that the **Arrays.AsList()** was used to initialize the new **ArrayList<Integer>()**, which created a mutable copy of the argument. + +Now maybe it's just me, but this seems like an awful lot of theory—needing to be situationally aware of the details of **java.util.Arrays** or **java.util.List**—just to create and initialize a mutable list of integers, though the actual statement used is not overly "ceremonial." Here it is again, just for reference: + + +``` +`var a1 = new ArrayList(Arrays.asList(1,2,3,4,5,6,7,8,9,10));` +``` + +### The Groovy approach + +Here is the Groovy version of the above: + + +``` + + +def a1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + +println "a1 = $a1" +println "a1 is an instance of ${a1.getClass()}" + +// output is +// a1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] +// a1 is an instance of class java.util.ArrayList + +a1[0] = 0 +println "a1 = $a1" + +// output is +// a1 = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10] + +a1 << 11 +println "a1 = $a1" + +// output is +// a1 = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] + +``` + +At a glance, Groovy uses the **def** keyword rather than **var**. I also know that I can create a list representation by putting a list of things—in this case, integers—between brackets. Moreover, the list instance so created is precisely what I want: a mutable instance of **ArrayList**. + +Now maybe it's just me, again, but the above seems to be a whole lot simpler—no remembering the semi-immutable results returned by **.of()** or **.asList()** and compensating for them. It's also nice that I can refer to a specific element of the list using the brackets with an index value between them, rather than the method call **set()**, and that the `<<` operator appends to the end of a list so that I don't have to use the method call **add()**. Also, did you notice the lack of semi-colons? Yep, in Groovy, they're optional. And finally, observe the use of string interpolation, with the **$variable** or **${expression}** inside a double-quoted string providing that capability. + +There’s more going on "under the covers" in the Groovy world. That definition is an example of dynamic typing (the default in Groovy) versus the static typing of Java. In the Groovy definition line, the type of **a1** is inferred at runtime from the type of the expression evaluated on the right-hand side. Now we all know that dynamic programming languages give us great power and that with great power comes many good opportunities to mess up. But for programmers who don't like dynamic typing, Groovy offers the option of static typing. + +### Groovy resources + +The Apache Groovy site I mentioned at the beginning has a lot of great documentation. Another excellent Groovy resource is [Mr. Haki][7]. And a really good reason to learn Groovy is to go on and learn [Grails][8], which is a wonderfully productive full-stack web framework built on top of excellent components like Hibernate, Spring Boot, and Micronaut. + +This article is dedicated to my very dear friend Anil Mukhi, who passed away on 3 January 2022. Thank you, Anil, for giving me the opportunity to learn so much about Groovy, Grails, and horse racing data. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/creating-lists-groovy-java + +作者:[Chris Hermansen][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/clhermansen +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_development_programming.png?itok=M_QDcgz5 (Developing code.) +[2]: http://www.groovy-lang.org/ +[3]: http://www.groovy-lang.org/install.html +[4]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+arrays +[5]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system +[6]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+list +[7]: https://www.mrhaki.com/ +[8]: https://grails.org/ From 1c3d8422534e4b6c9efc6836e73b0ffd4f34d3ee Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 26 Jan 2022 08:47:34 +0800 Subject: [PATCH 101/334] A --- ...124 Linux Jargon Buster- What are Upstream and Downstream.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220124 Linux Jargon Buster- What are Upstream and Downstream.md b/sources/tech/20220124 Linux Jargon Buster- What are Upstream and Downstream.md index 16712c606e..ac86d0d2da 100644 --- a/sources/tech/20220124 Linux Jargon Buster- What are Upstream and Downstream.md +++ b/sources/tech/20220124 Linux Jargon Buster- What are Upstream and Downstream.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/upstream-and-downstream-linux/" [#]: author: "Bill Dyer https://itsfoss.com/author/bill/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 8e6489b18622e7bfe0d83c8ac43e2a22d9bc195f Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 26 Jan 2022 08:57:22 +0800 Subject: [PATCH 102/334] translating --- .../20220121 Make a video game with Bitsy.md | 101 ------------------ .../20220121 Make a video game with Bitsy.md | 100 +++++++++++++++++ 2 files changed, 100 insertions(+), 101 deletions(-) delete mode 100644 sources/tech/20220121 Make a video game with Bitsy.md create mode 100644 translated/tech/20220121 Make a video game with Bitsy.md diff --git a/sources/tech/20220121 Make a video game with Bitsy.md b/sources/tech/20220121 Make a video game with Bitsy.md deleted file mode 100644 index 4f15d34390..0000000000 --- a/sources/tech/20220121 Make a video game with Bitsy.md +++ /dev/null @@ -1,101 +0,0 @@ -[#]: subject: "Make a video game with Bitsy" -[#]: via: "https://opensource.com/article/22/1/bitsy-game-design" -[#]: author: "Peter Cheer https://opensource.com/users/petercheer" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Make a video game with Bitsy -====== -Bitsy is an open source video game designer. Its minimalistic features -make it prime for anyone to explore their creativity. -![Gaming artifacts with joystick, GameBoy, paddle][1] - -There are many game design programs and many different possible approaches to game design, but for me, the one that stands out is Bitsy. Created by Adam Le Doux in 2017 and released under an MIT license, Bitsy is, in the words of its creator: "A little editor for little games or worlds. The goal is to make it easy to make games where you can walk around, talk to people, and be somewhere." - -### Install Bitsy - -Bitsy is written in JavaScript and produces HTML5 games. You can download it from [GitHub][2] or the [creator's website][3]. It's small, easy to learn, has a distinctive bit map art style, is intentionally short on features, and is limited in what it can do. - -Despite (or perhaps because of) these limitations, Bitsy has attracted a vibrant user community since it was released. The two main approaches users have taken to Bitsy have been embracing the limitations and seeking to push against the limitations to see how far you can go. - -### Creative bounds - -The limitations of Bitsy means that accepting them and still producing a satisfying game becomes a challenge demanding inventiveness and creativity. You can see and play some of the impressive games produced with Bitsy online at the [Itch.io website][4]. At the same time, people have come up with hacks, tweaks, and extensions. These have pushed against some of the limitations without sacrificing the essence of Bitsy. - -The basic elements in Bitsy are an avatar representing the player, rooms where the game action takes place, sprites (non-player characters that you can interact with), and items. There's a bitmap editor for creating these elements, which also allows for simple two-frame animations. - -![Bitsy bitmap editor][5] - -(Peter Cheer, [CC BY-SA 4.0][6]) - -Working within Bitsy relies on conditional variables rather than full-fledged scripting, making it easy to learn for those without a background in coding and sometimes frustrating to those expecting more flexibility. - -If you want to see the basics of Bitsy, you can do that online at the creator's website, or download it and run it locally. - -![Bitsy room editor][7] - -(Peter Cheer, [CC BY-SA 4.0][6]) - -### Documentation - -There isn't just one place to go for documentation about Bitsy. Various short videos are available on YouTube if you want to see Bitsy in action. I prefer text-based tutorials, and the three resources I found most useful are: - - * [The official Bitsy tutorial][8] made available on the Itch.io site is by Claire Morwood - * [Bitsy workshop PDF][9] by user haraiva - * [Bitsy variables][10] tutorial by user ayolland - - - -Read through the tutorials, try out some Bitsy games, and get creating something of your own. Keep it simple to start with. Once you've become comfortable with Bitsy, you may want to investigate some of the [tools, hacks, and extensions][11] that people have created for it. - -It's the perfect tool for educators, too, and there's even a [Bitsy class][12] curriculum by educator Hal Meeks available online. - -You can also find heaps of game assets that people have made for Bitsy on the [Itch.io website][13]. - -### Twine integration - -You may have already tried the popular browser-based game development tool [Twine][14]. You can integrate Bitsy with Twine by varying degrees. Integration can extend from simply placing a Bitsy game in an iframe to display inside your Twine game up to sharing variables between the two engines and dialogue commands which let you execute basic Twine commands inside a Bitsy game! If these possibilities interest you, then look at: - - * [Combining Bitsy and Twine tutorial][15] - * [Bitsy hacks][16] - * [Freya's Twisty Template][17] - - - -### Bitsy for beginners - -Beginners can get started easily with Bitsy, whether you're new to programming or just to game design. With it, you can explore all its possibilities for sparking creativity, imagination, and inventiveness. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/bitsy-game-design - -作者:[Peter Cheer][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/petercheer -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open_gaming_games_roundup_news.png?itok=KM0ViL0f (Gaming artifacts with joystick, GameBoy, paddle) -[2]: https://github.com/le-doux/bitsy -[3]: https://ledoux.itch.io/bitsy -[4]: https://itch.io/games/tag-bitsy -[5]: https://opensource.com/sites/default/files/uploads/bitsy-editor-sprite.jpg (Bitsy bitmap editor) -[6]: https://creativecommons.org/licenses/by-sa/4.0/ -[7]: https://opensource.com/sites/default/files/uploads/bitsy-editor-room.jpg (Bitsy room editor) -[8]: https://www.shimmerwitch.space/bitsyTutorial.html -[9]: https://static1.squarespace.com/static/58930a6c893fc0a33ae624db/t/5bacd94ac83025ead3937071/1538054510407/BITSY-WORKSHOP.pdf -[10]: https://ayolland.itch.io/trevor/devlog/29520/bitsy-variables-a-tutorial -[11]: https://itch.io/tools/tag-bitsy -[12]: https://halmeeks.net/bitsyclass/ -[13]: https://itch.io/game-assets/tag-bitsy -[14]: https://opensource.com/article/18/2/twine-gaming -[15]: https://spdrcstl.com/blog/bitsy-twine-tutorial.html -[16]: https://github.com/seleb/bitsy-hacks/blob/main/dist/twine-bitsy-comms.js -[17]: https://communistsister.itch.io/twitsy-template-1 diff --git a/translated/tech/20220121 Make a video game with Bitsy.md b/translated/tech/20220121 Make a video game with Bitsy.md new file mode 100644 index 0000000000..16588fb296 --- /dev/null +++ b/translated/tech/20220121 Make a video game with Bitsy.md @@ -0,0 +1,100 @@ +[#]: subject: "Make a video game with Bitsy" +[#]: via: "https://opensource.com/article/22/1/bitsy-game-design" +[#]: author: "Peter Cheer https://opensource.com/users/petercheer" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +用 Bitsy 制作视频游戏 +====== +Bitsy 是一个开源视频游戏设计软件。 其简约的功能使任何人都可以探索他们的创造力。 +![Gaming artifacts with joystick, GameBoy, paddle][1] + +有许多游戏设计程序和许多不同的可能的游戏设计方法,但对我来说,最突出的是 Bitsy。Bitsy 由 Adam Le Doux 在 2017 年创建,在 MIT 许可下发布,用其创造者的话说,Bitsy 是:“一个用于小游戏或世界的编辑器。其目标是使制作游戏变得容易,在那里你可以四处走动,与人交谈,并在某个地方。” + +### 安装 Bitsy + +Bitsy 是用 JavaScript 编写的,可以制作 HTML5 游戏。你可以从 [GitHub][2] 或[创造者的网站][3]下载它。它很小,很容易学习,有独特的位图艺术风格,故意在功能上有所欠缺,而且能做的事情有限。 + +尽管(也许是因为)这些限制,Bitsy 自发布以来吸引了一个充满活力的用户社区。用户对 Bitsy 采取的两个主要方法是:接受限制和寻求突破限制,看看你能走多远。 + +### 创意的界限 + +Bitsy 的局限性意味着接受这些局限性并仍能制作出令人满意的游戏,这就成为一个需要创造性和创造力的挑战。你可以在 [Itch.io 网站][4]上看到和玩一些用 Bitsy 制作的令人印象深刻的游戏。同时,人们也想出了一些破解、调整和扩展。这些都在不牺牲 Bitsy 的本质的前提下突破了一些限制。 + +Bitsy 的基本元素是一个代表玩家的头像、发生游戏动作的房间、精灵(可以与之互动的非玩家角色)和物品。有一个位图编辑器用于创建这些元素,它也允许简单的两帧动画。 + +![Bitsy bitmap editor][5] + +(Peter Cheer, [CC BY-SA 4.0][6]) + +在 Bitsy 中工作依赖于条件变量,而不是成熟的脚本,这使得没有编码背景的人容易学习,但有时会让那些期待更多灵活性的人感到沮丧。 + +如果你想了解 Bitsy 的基本情况,你可以在创作者的网站上进行,或者下载并在本地运行。 + +![Bitsy room editor][7] + +(Peter Cheer, [CC BY-SA 4.0][6]) + +### 文档 + +关于 Bitsy 的文档并不是只有一个地方可以去看。如果你想看 Bitsy 的操作,可以在 YouTube 上找到各种短视频。我更喜欢基于文本的教程,我发现最有用的三个资源是: + + * [Itch.io 网站上提供的官方 Bitsy 教程][8],作者是 Claire Morwood + * [Bitsy workshop PDF][9], 由用户 haraiva 提供 + * [Bitsy 变量][10], 教程由用户 ayolland 编写 + + + +阅读这些教程,尝试一些 Bitsy 游戏,并开始创造你自己的东西。开始时要保持简单。当你熟悉了 Bitsy,你可能想研究一下人们为它创造的一些[工具、破解和扩展][11]。 + +它也是教育工作者的完美工具,甚至还有教育工作者 Hal Meeks 的 [Bitsy 课程][12]可供在线学习。 + +你还可以在 [Itch.io 网站][13]上找到人们为 Bitsy 制作的大量游戏资源。 + +### Twine 整合 + +你可能已经尝试过流行的基于浏览器的游戏开发工具 [Twine][14]。你可以通过不同程度的方式将 Bitsy 与 Twine 整合。整合的范围可以从简单地将 Bitsy 游戏放在一个 iframe 中显示在你的 Twine 游戏中,到在两个引擎之间共享变量和对话命令,让你在 Bitsy 游戏中执行基本的 Twine 命令!如果你对这些可能性感兴趣,那么请看: + + * [结合 Bitsy 和 Twine 的教程][15] + * [Bitsy 破解][16] + * [Freya 的 Twisty 模板][17] + + + +### 给初学者的 Bitsy + +初学者可以很容易地开始使用 Bitsy,无论你是编程新手还是仅仅是游戏设计的新手。有了它,你可以探索它在激发创造力、想象力和创造性方面的所有可能性。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/bitsy-game-design + +作者:[Peter Cheer][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/petercheer +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open_gaming_games_roundup_news.png?itok=KM0ViL0f (Gaming artifacts with joystick, GameBoy, paddle) +[2]: https://github.com/le-doux/bitsy +[3]: https://ledoux.itch.io/bitsy +[4]: https://itch.io/games/tag-bitsy +[5]: https://opensource.com/sites/default/files/uploads/bitsy-editor-sprite.jpg (Bitsy bitmap editor) +[6]: https://creativecommons.org/licenses/by-sa/4.0/ +[7]: https://opensource.com/sites/default/files/uploads/bitsy-editor-room.jpg (Bitsy room editor) +[8]: https://www.shimmerwitch.space/bitsyTutorial.html +[9]: https://static1.squarespace.com/static/58930a6c893fc0a33ae624db/t/5bacd94ac83025ead3937071/1538054510407/BITSY-WORKSHOP.pdf +[10]: https://ayolland.itch.io/trevor/devlog/29520/bitsy-variables-a-tutorial +[11]: https://itch.io/tools/tag-bitsy +[12]: https://halmeeks.net/bitsyclass/ +[13]: https://itch.io/game-assets/tag-bitsy +[14]: https://opensource.com/article/18/2/twine-gaming +[15]: https://spdrcstl.com/blog/bitsy-twine-tutorial.html +[16]: https://github.com/seleb/bitsy-hacks/blob/main/dist/twine-bitsy-comms.js +[17]: https://communistsister.itch.io/twitsy-template-1 From a66026ea9d161c7f9ab215e52f2825bd8abbf555 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 26 Jan 2022 09:03:33 +0800 Subject: [PATCH 103/334] translating --- ...a DeepSpeech to enable speech to text in your application.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md b/sources/tech/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md index 091df4d476..22c0f22bea 100644 --- a/sources/tech/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md +++ b/sources/tech/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/1/voice-text-mozilla-deepspeech" [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From d990d9fc45ec296b5fdc8a10d31abffb12a6563f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 26 Jan 2022 10:48:02 +0800 Subject: [PATCH 104/334] TR --- ...uster- What are Upstream and Downstream.md | 104 ------------------ ...uster- What are Upstream and Downstream.md | 100 +++++++++++++++++ 2 files changed, 100 insertions(+), 104 deletions(-) delete mode 100644 sources/tech/20220124 Linux Jargon Buster- What are Upstream and Downstream.md create mode 100644 translated/tech/20220124 Linux Jargon Buster- What are Upstream and Downstream.md diff --git a/sources/tech/20220124 Linux Jargon Buster- What are Upstream and Downstream.md b/sources/tech/20220124 Linux Jargon Buster- What are Upstream and Downstream.md deleted file mode 100644 index ac86d0d2da..0000000000 --- a/sources/tech/20220124 Linux Jargon Buster- What are Upstream and Downstream.md +++ /dev/null @@ -1,104 +0,0 @@ -[#]: subject: "Linux Jargon Buster: What are Upstream and Downstream?" -[#]: via: "https://itsfoss.com/upstream-and-downstream-linux/" -[#]: author: "Bill Dyer https://itsfoss.com/author/bill/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Linux Jargon Buster: What are Upstream and Downstream? -====== - -The terms: _upstream_ and _downstream_ are rather ambiguous terms and, I think, not really used by the general public. If you are a Linux user and do not write or maintain software, chances are pretty good that these terms will mean nothing to you, but they can be instructive in how communication between groups within the Linux world works. - -The terms are used in networking, programming, kernel, and even in non-computer areas such as supply chains. When we talk about upstream and downstream then, context is important. - -In its simplest form, upstream and downstream is the direction of the flow of information. - -Since we are all reading this article while we’re connected to the Internet, let’s look at an upstream/downstream example as it applies to Internet Service Providers (ISP). Here, the ISP is concerned with traffic. Upstream traffic is data is coming in from a user from a different ISP. For example, if you have a website that offers a subscription to a newsletter, the information I send, to subscribe, is upstream data. - -Downstream traffic is data that is sent from a user to another user at a different ISP, then it is considered as downstream traffic. Using the same subscription example, let’s assume that my request to subscribe is approved and I get a “welcome” note in one email and the latest newsletter in another email. In this case, the data is downstream as it is sent by you (well, probably automated software operating as a representative of you) to me, a user from a different ISP. - -Summing up: the thing I need or want (your newsletter) is upstream. The things you provide to me (the welcome note and actual newsletter) come to me, downstream. - -Whether data is upstream or downstream is probably unimportant to us as users, but it is important to the server administrators who monitor bandwidth usage, as well as to distributors, and application programmers. - -In the Linux world, upstream and downstream have two main contexts. One is concerned with the kernel and the other is concerned with applications. There are others, but I hope that I can get the idea across with these two. - -### Upstream and downstream in the context of Linux kernel - -![][1] - -Linux _is_ the kernel. In creating a distribution (often called a “distro”), Linux distributions initially use the source code from an unmodified kernel. Necessary patches are added and then the kernel is configured. The kernel’s configuration is based upon what features and options the distribution wants to offer. Once decided upon, the kernel is created accordingly. - -The original kernel is upstream from the distribution. When the distribution gets the source code, it flows downstream. Once the distribution has the code it stays with the makers of the distribution while work is being done on it. It is still upstream from us, as users, until it is ready for release. - -The kernel version that the distribution creates will have patches added and certain features and options enabled. This configuration is determined by the distro builder. This is why there are several flavors of Linux: [Debian][2] vs. [Red Hat][3], for example. The builder of the distro decides on the options to offer to their user base, and compiles the kernel accordingly. - -Once that work is completed, it is made ready for release in a repository and we’re allowed to grab a copy. That copy flows downstream to us. - -Similarly, if the distributor finds a bug in the kernel, fixes it and then sends the patch to the kernel developers so that they could patch the kernel for everyone downstream. This is called contributing to upstream because here the flow is going upwards to the original source. - -### Upstream and downstream in the context of applications - -Again, technically, Linux is the kernel, everything else is additional software. The distro builder also adds additional software to their project. In this case, there are several upstreams. A distro can contain any number of applications such as X, KDE, Gnome, and so on. - -Let’s imagine that you are using the [nano][4] editor and discover that it isn’t working right so you submit a bug report to the distributor. The programmers working on the distro will look at it and, if they find that they inserted a bug into nano, they will fix it and make a new release available in their repository. If they find that they didn’t make the bug, the distributor will submit a bug report upstream to the nano programmer. - -When it comes to things like bug reports, feature requests, etc. it is always best to send them upstream to your distributor since they maintain the kernel and additional applications for the distro you’re using. For example, I use a distro called [Q4OS][5] on a few machines. If I find a bug in a program, I report it to the Q4OS folks. If you happen to be using, say, [Mint][6], you would report it to the Mint project. - -If you were to post a problem on a generic Linux board, for example, and you mentioned that you were using Mint, you will surely get a reply that says something like: “This is better handled in a Mint forum.” Using the previous “nano bug” example, it’s possible that the Mint programmers made a change to nano to make it work better in their distro. If they did make a mistake, they would want to know about it and, having made the mistake, they would be the ones to fix it. - -Once fixed, the updated program is put into a repository available to you. When you get the update, it comes downstream to you, like so: - - * If a distributor makes the fix, the new version is made available in the distro repository - * If the programmer of the application makes the fix, it is sent downstream to the distributors who test the new code. Once it’s found to be working right, it is placed in the repository, to flow downstream to you - - - -### Automatic flow downstream - -There was a time, when users had to get their own updates. A user would get the updated source code and compile a new executable. As time went on, utilities like apt were created to allow users to pull updated binaries (executables) from the repositories. The apt program is Debian, but other distros have their own, similar program for this. - -Programs like apt take care of the upstream/downstream work. If you ran apt with the upgrade option like so: - -`sudo apt upgrade` - -it would look (upstream) to the distro repository, find any needed updated packages and pull them (downstream) to your machine and install them. - -Some distros take this further. Distro programmers and maintainers are always checking over their product. Often times, an application programmer will make improvements to their program. System libraries are updated frequently, security holes get plugged, and so on. These updates are made available to the distributors who then make the new version available in the distro’s repository. - -Rather than have you run apt every day, some distros will alert you to updates that are available and ask if you want them. If you want then, just accept and the updates will be sent downstream to your machine and installed. - -### Conclusion - -I just remembered a bit of my history, having mentioned Red Hat. Back in 1994 or 1995, they placed a job ad and one of the cool workplace benefits listed was, “all the free peanut M&Ms you could eat and all the free Dr. Pepper you could drink.” I had no doubt that I could do the work, and I applied just for those two benefits alone. I didn’t get a call though. - -Oh well. Getting back to the point… - -Upstream and downstream is really just the direction of data flow. How far upstream or downstream this data flows depends on who ultimately needs to work on it. Basically, the programmers are upstream and the users are downstream. - -Again, as users, we really don’t need to be worried about these terms, but the concepts do help in the development and maintenance of software. By being able to direct the work to the appropriate group, duplicate work is avoided. It also ensures that a standard is maintained. The Chrome browser, for example, might need slight changes made to it in order to work on a certain distro, but it will be Chrome at its core – it will look and act like Chrome. - -If you do find a bug with any program in your distro, just report it to your distro’s maintainers, which is usually done through their website. You’ll be sending it upstream to them, but it doesn’t matter whether you remember that you’re sending the report upstream. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/upstream-and-downstream-linux/ - -作者:[Bill Dyer][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/bill/ -[b]: https://github.com/lujun9972 -[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/upstream-downstream.png?resize=800%2C450&ssl=1 -[2]: https://www.debian.org/ -[3]: https://www.redhat.com/ -[4]: https://www.nano-editor.org/ -[5]: https://q4os.org/ -[6]: https://linuxmint.com/ diff --git a/translated/tech/20220124 Linux Jargon Buster- What are Upstream and Downstream.md b/translated/tech/20220124 Linux Jargon Buster- What are Upstream and Downstream.md new file mode 100644 index 0000000000..63f2ddf88c --- /dev/null +++ b/translated/tech/20220124 Linux Jargon Buster- What are Upstream and Downstream.md @@ -0,0 +1,100 @@ +[#]: subject: "Linux Jargon Buster: What are Upstream and Downstream?" +[#]: via: "https://itsfoss.com/upstream-and-downstream-linux/" +[#]: author: "Bill Dyer https://itsfoss.com/author/bill/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +Linux 黑话解释:什么是上游和下游? +====== + +“上游upstream” 和 “下游downstream”这两个术语是相当模糊的,我认为一般人并不会真正使用它们。如果你只是一个 Linux 用户,并且不编写或维护软件,那么很有可能这些术语对你来说毫无意义,但它们对 Linux 世界中各个社区之间的交流方式有益的。 + +这些术语被用于网络、编程、内核,甚至在非计算机领域,如供应链。当我们谈论上游和下游的时候,讨论背景是很重要的。 + +在其最简单的形式中,上游和下游是信息流动的方向。 + +由于我们都是在连接到互联网的情况下阅读这篇文章的,让我们看看适用于互联网服务提供商(ISP)的上游/下游例子。这里,ISP 关注的是流量。上游流量是指数据是从不同的 ISP 的用户处传来的。例如,如果你有一个提供订阅通讯的网站,我发送的订阅信息就是上游数据。 + +下游流量是指从一个用户发送到不同 ISP 的另一个用户的数据,它被认为是下游流量。使用同样的订阅例子,假设我的订阅请求被批准,我在一封邮件中收到“欢迎”说明,在又一封邮件中收到最新的新闻简报。在这种情况下,数据是顺流而下的,因为它是由你(好吧,可能是作为代表你进行操作的自动化软件)发送给我,一个来自另外 ISP 的用户。 + +总结:我需要或想要的东西(你的通讯)是上游的。你提供给我的东西(欢迎词和实际的通讯)是下游的。 + +数据是在上游还是在下游,对我们用户来说可能并不重要,但对监控带宽使用的服务器管理员,以及发行商distributor(发行版的制作者)和程序员来说却很重要。 + +在 Linux 世界里,上游和下游有两个主要背景。一个是关于内核的,另一个是关于应用程序的。还有其他的,但我希望我可以通过这两个来表达我的想法。 + +### Linux 内核背景下的上游和下游 + +![][1] + +Linux _就是_ 内核。在创建发行版时,Linux 发行版首先使用未经修改的内核源代码。然后添加必要的补丁,对内核进行配置。内核的配置是基于发行版想要提供的功能和选项。一旦决定了,就相应地创建了内核。 + +原始内核来自发行版的上游。当发行版得到源代码时,它就流向下游。一旦发行版得到了内核代码,它就会留在发行商那里,同时对它进行改造。它仍然是我们用户的上游,直到它准备好被发布。 + +发行版创建的内核版本将添加补丁和启用某些功能和选项。这种配置是由发行商决定的。这就是为什么有几种 Linux 流派的原因,例如,[Debian][2] 与 [Red Hat][3]。发行商会决定向他们的用户群提供哪些选项,并相应地编译内核。 + +一旦这项工作完成,它就会放在一个仓库中准备发布,我们就可以获得一份副本。这个副本向下游流向我们。 + +同样地,如果发行商发现了内核中的一个错误,修复了它,然后将补丁发送给内核开发者,这样他们就可以为下游的每个人修补内核。这被称为对上游的贡献,因为这里的流量是向上流向原始来源的。 + +### 在应用程序背景下的上游和下游 + +同样,从技术上讲,Linux 是内核,其他都是附加软件。发行商也会在他们的项目中加入额外的软件。在这种情况下,有几个上游。一个发行版可以包含任何数量的应用程序,如 X、KDE、Gnome 等等。 + +让我们想象一下,你在使用 [nano][4] 编辑器时发现它不能正常工作,于是你向发行版提交了一份错误报告。发行商的程序员会查看它,如果发现他们在 nano 中插入了一个错误,他们将修复它并在其仓库中发布一个新版本。如果他们发现不是他们制造了这个错误,发行商将向上游的 nano 程序员提交一份错误报告。 + +当涉及到像错误报告、功能请求等事情时,最好是将它们发送到上游的发行商那里,因为他们维护着你所使用的发行版的内核和附加应用程序。例如,我在几台机器上使用一个叫做 [Q4OS][5] 的发行版。如果我发现一个程序中的错误,我会把它报告给 Q4OS 的人。如果你碰巧使用的是 [Mint][6],你会把它报告给 Mint 项目。 + +比如说,如果你在一个普通的 Linux 论坛上发布一个问题,而你提到你在使用 Mint,你肯定会得到这样的回复。“这个问题最好在 Mint 论坛上处理”。用之前的 nano 错误的例子,有可能是 Mint 的程序员对 nano 进行了修改,使其在他们的发行版中运行得更好。如果他们确实犯了一个错误,他们会想知道这个错误,而且在犯了这个错误之后,他们会是修复它的人。 + +一旦修复,更新的程序就会被放入你可以使用的仓库。当你得到更新时,它就会顺流而下到你那里,像这样: + + * 如果发行商进行了修复,新版本就会在发行仓库中提供。 + * 如果该应用程序的程序员进行了修复,它将被发送到测试新代码的发行商那里。一旦发现它工作正常,它就会被放在仓库中,向下游流去。 + +### 自动流向下游 + +曾经有一段时间,用户得自己获取更新。用户会得到更新的源代码并编译一个新的可执行文件。随着时间的推移,像 `apt` 这样的工具被创造出来,允许用户从软件库中提取更新的二进制文件(可执行文件)。`apt` 程序是 Debian 的,但其他发行版也有他们自己的用于此用途的类似程序。 + +像 `apt` 这样的程序负责处理上游/下游的工作。如果你用升级选项运行 `apt`,像这样: + +``` +sudo apt upgrade +``` + +它将查看(上游)发行仓库,找到任何需要的更新包,并将它们拉到你的机器上(下游)并安装它们。 + +有些发行版会更进一步。发行版的程序员和维护者总是在检查他们的产品。很多时候,应用程序的程序员会对他们的程序进行改进。系统库会经常更新,安全漏洞也会被堵上,等等。这些更新会提供给发行商,然后由发行商在发行仓库中提供新的版本。 + +与其让你每天运行 `apt`,一些发行版会提醒你有可用的更新并询问你是否需要它们。如果你想要,只要接受,更新就会被发送到你的机器上并安装。 + +### 总结 + +上游和下游实际上只是数据流的方向。这个数据在上游或下游流动的方式取决于最终需要谁来处理它。基本上,程序员是上游,用户是下游。 + +同样,作为用户,我们真的不需要关心这些术语,但这些概念确实有助于软件的开发和维护。通过将工作引向适当的小组,避免了重复工作。这也确保了标准的维护。例如,Chrome 浏览器可能需要做一些细微的改变,以便在某个发行版上运行,但它的核心是 Chrome 浏览器,它的外观和行为都不会有大的变化。 + +如果你发现你的发行版中的任何程序有错误,只需向发行版的维护者报告,这通常是通过他们的网站进行的。你将会把它发送到上游,但你是否记得你在向上游发送报告并不重要。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/upstream-and-downstream-linux/ + +作者:[Bill Dyer][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/bill/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/upstream-downstream.png?resize=800%2C450&ssl=1 +[2]: https://www.debian.org/ +[3]: https://www.redhat.com/ +[4]: https://www.nano-editor.org/ +[5]: https://q4os.org/ +[6]: https://linuxmint.com/ From 2edfc93e4e354aa3492cceefd182236fa2fd77b5 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 26 Jan 2022 10:55:32 +0800 Subject: [PATCH 105/334] P @wxy https://linux.cn/article-14215-1.html --- ...4 Linux Jargon Buster- What are Upstream and Downstream.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20220124 Linux Jargon Buster- What are Upstream and Downstream.md (99%) diff --git a/translated/tech/20220124 Linux Jargon Buster- What are Upstream and Downstream.md b/published/20220124 Linux Jargon Buster- What are Upstream and Downstream.md similarity index 99% rename from translated/tech/20220124 Linux Jargon Buster- What are Upstream and Downstream.md rename to published/20220124 Linux Jargon Buster- What are Upstream and Downstream.md index 63f2ddf88c..1c99c746d4 100644 --- a/translated/tech/20220124 Linux Jargon Buster- What are Upstream and Downstream.md +++ b/published/20220124 Linux Jargon Buster- What are Upstream and Downstream.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14215-1.html" Linux 黑话解释:什么是上游和下游? ====== From 890609b025b58d1fa25d387e37ef2413905bfebf Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 26 Jan 2022 19:28:42 +0800 Subject: [PATCH 106/334] RP @geekpi https://linux.cn/article-14216-1.html --- ...rd your terminal session with Asciinema.md | 89 ++++++------------- 1 file changed, 28 insertions(+), 61 deletions(-) rename {translated/tech => published}/20220117 Record your terminal session with Asciinema.md (51%) diff --git a/translated/tech/20220117 Record your terminal session with Asciinema.md b/published/20220117 Record your terminal session with Asciinema.md similarity index 51% rename from translated/tech/20220117 Record your terminal session with Asciinema.md rename to published/20220117 Record your terminal session with Asciinema.md index 1bb36e1cfe..9c759eb374 100644 --- a/translated/tech/20220117 Record your terminal session with Asciinema.md +++ b/published/20220117 Record your terminal session with Asciinema.md @@ -3,18 +3,20 @@ [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14216-1.html" 用 Asciinema 记录你的终端会话 ====== -用开源终端会话记录器 Asciinema 演示。 -![4 different color terminal windows with code][1] -支持电话是很重要的,而且最后往往是令人满意的,但明确的沟通行为对每个参与的人来说都是艰巨的。如果你曾经参加过支持电话,你可能已经花了好几分钟拼出了最短的命令,并详细解释了空格和回车的位置。虽然直接夺取用户电脑的控制权往往更容易,但这并不是真正的教育的最佳方式。你可以尝试向用户发送一个屏幕记录,但是他们可以复制命令并粘贴到自己的终端。 +> 用这个开源的终端会话记录器 Asciinema 来展示终端会话。 -Asciinema 是一个开源的终端会话记录器。与 `script` 和 `scriptreplay` 命令类似,Asciinema 准确记录了你的终端显示。它将你的“电影”记录保存到一个文本文件中,然后根据需要进行重放。你可以把你的电影上传到 Asciinema.org,就像你在互联网上分享任何其他视频一样,你甚至可以把你的电影嵌入到网页中。 +![](https://img.linux.net.cn/data/attachment/album/202201/26/192641raoczh9h2w5xd2cq.jpg) + +支持电话是很重要的,而且最后往往是令人满意的,但明确的沟通行为对每个参与的人来说都是艰巨的。如果你曾经参加过支持电话,你可能会花好几分钟拼出了最短的命令,并详细解释了空格和回车的位置。虽然直接拿过来用户电脑的控制权往往更容易,但这并不是真正的教育的最佳方式。你可以尝试向用户发送一个屏幕记录,而他们可以复制命令并粘贴到自己的终端。 + +Asciinema 是一个开源的终端会话记录器。与 `script` 和 `scriptreplay` 命令类似,Asciinema 准确记录了你的终端显示。它将你的“电影”记录保存到一个文本文件中,然后根据需要进行回放。你可以把你的电影上传到 Asciinema.org,就像你在互联网上分享任何其他视频一样,你甚至可以把你的电影嵌入到网页中。 ### 安装 Asciinema @@ -22,128 +24,93 @@ Asciinema 是一个开源的终端会话记录器。与 `script` 和 `scriptrepl 在 Fedora、CentOS、Mageia 或类似系统上: - ``` -`$ sudo dnf install asciinema` +$ sudo dnf install asciinema ``` 在 Debian、Linux Mint 或类似系统上: - ``` -`$ sudo apt install asciinema` +$ sudo apt install asciinema ``` 在 macOS 上,你可以用 Homebrew 安装: - ``` -`$ sudo brew install asciinema` +$ sudo brew install asciinema ``` -在 BSD 和任何其他平台上使用 [Pkgsrc][2]: - +在 BSD 和任何其它平台上使用 [Pkgsrc][2]: ``` - - $ cd /usr/pkgsrc/misc/py-asciinema - $ sudo bmake install clean - ``` ### 从文本中制作电影 要用 Asciinema 开始录制,你可以使用 `rec` 子命令: - ``` - - $ asciinema rec mymovie.cast - asciinema: recording asciicast to mymovie.cast - -asciinema: press <ctrl-d> or type "exit" when you're done - +asciinema: press or type "exit" when you're done ``` -一些友好的输出提醒你,你正在录制,并告诉你如何停止。按 **Ctrl+D** 或直接输入 `exit`。 +一些友好的输出信息提醒你,你正在录制,并告诉你如何停止:按 `Ctrl+D` 或直接输入 `exit`。 -当 Asciinema 处于活动状态时,你在终端所做的一切都会被记录下来。这包括输入、输出、错误、尴尬的停顿、错误或成功。如果你在录制过程中在你的终端中看到它,它会被剪辑。 +当 Asciinema 处于活动状态时,你在终端所做的一切都会被记录下来。这包括输入、输出、错误、尴尬的停顿、错误或成功。如果在录制时,在你的终端中查看它,它就会被剪断。 -当你演示完终端如何工作时,按 **Ctrl+D** 或输入 `exit` 来停止记录。 - -在这个例子中,产生的文件 `mymovie.cast` 是一个时间戳和动作的集合,作为播放机制的脚本(在电影脚本的意义上)。 +当你演示完终端如何工作时,按 `Ctrl+D` 或输入 `exit` 来停止记录。 +在这个例子中,产生的文件 `mymovie.cast` 是一个时间戳和动作的集合,它用作回放所使用的脚本(像电影脚本一样)。 ``` - - {"version": 2, "width": 139, "height": 36, "timestamp": 1641457358, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}} - [0.05351, "o", "\u001b]0;seth:~\u0007"] - [0.05393, "o", "\u001b[1;31m$ \u001b[00m"] - [1.380059, "o", "e"] - [1.443823, "o", "c"] - [1.514674, "o", "h"] - [1.595238, "o", "o"] - [1.789562, "o", " "] - [2.09658, "o", "\""] - [2.19683, "o", "h"] - [2.403994, "o", "e"] - [2.466784, "o", "l"] - [2.711183, "o", "lo"] - [3.120852, "o", "\""] - [3.427886, "o", "\r\nhello\r\n"] - [...] - ``` -如果你犯了一个错误,你可以通过删除重现错误的行来去除这个错误。如果你发现自己在录制过程中做了很多编辑或冗长的停顿,你可以安装并使用 [asciinema-edit][3] 工具,它可以通过你定义的时间戳或消除空闲时间来剪掉这些“镜头”片段。 +如果你犯了一个错误,你可以通过删除重现错误的行来去除这个错误。如果你发现自己在录制过程中做了很多命令行修改或冗长的停顿,你可以安装并使用 [asciinema-edit][3] 工具,它可以通过你定义的时间戳或消除空闲时间来剪掉这些“镜头”片段。 ### 播放 Asciinema 电影 -你可以使用 `play` 子命令播放你的 Asciinema: - +你可以使用 `play` 子命令回放你的 Asciinema: ``` -`$ asciinema play mymovie.cast` +$ asciinema play mymovie.cast ``` -这将接管你的终端会话,并使其成为最接近银幕的形式(除了那次你通过 `telnet` 观看 ASCII 格式的星球大战)。你的基于文本的电影播放,向你的用户展示一个复杂的任务是如何完成的。当然,播放的_实际_命令并不真正执行。这不是一个正在运行的 shell 脚本,所以即使你在电影中创建了一个 `hello.txt` 文件,在播放后也不会有一个新的 `hello.txt`。这只是为了展示。 +这会接管你的终端会话,并使其成为最接近银幕的形式(除了那次你通过 `telnet` 观看 ASCII 格式的星球大战)。这个基于文本的电影播放,向你的用户展示了一个复杂的任务是如何完成的。当然,播放的 _实际_ 命令并不真正执行。这不是一个正在运行的 shell 脚本,所以即使你在电影中创建了一个 `hello.txt` 文件,在播放后也不会有一个新的 `hello.txt`。这只是为了展示。 -然而,它不仅仅是一个展示。你可以暂停 Asciinema 电影,选择你在屏幕上看到的文本,并将其粘贴到一个活动终端,以运行该命令。Asciinema 是有用的文档。它向用户展示了如何完成一项任务,并允许他们进行复制和粘贴以确保准确性。 +然而,它又不仅仅是一个展示。你可以暂停 Asciinema 电影,选择你在屏幕上看到的文本,并将其粘贴到一个活动终端以运行该命令。Asciinema 是有用的文档。它向用户展示了如何完成一项任务,并允许他们进行复制和粘贴以确保准确性。 ### 上传你的 Asciinema 电影 -目前还没有 Asciinema 电影达到大片的地位,但你可以把你的电影上传到 Asciinema.org,与全世界分享。 - +目前还没有像大片一样的 Asciinema 电影,但你可以把你的电影上传到 Asciinema.org,与全世界分享: ``` -`$ asciinema upload mymovie.cast` +$ asciinema upload mymovie.cast ``` -如果你习惯了 YouTube 的上传时间,你会对 Asciinema 电影的传输速度感到惊喜。一个 `.cast` 文件通常只有几千字节,或最多几兆字节,所以上传几乎是瞬间完成的。你不需要一个账户来分享你的电影,但所有无人认领的电影在七天后会被删除。为了保存你的杰作,你可以在 Asciinema 上开设一个账户,然后坐等学院的召唤。 +如果你习惯了 YouTube 上传所花费的时间,你会对 Asciinema 电影的传输速度感到惊喜。一个 `.cast` 文件通常只有几千字节,最多几兆字节,所以上传几乎是瞬间完成的。你不需要注册账户来分享你的电影,但所有无人认领的电影将在七天后会被删除。为了保存你的杰作,你可以在 Asciinema 上开设一个账户,然后坐等电影学院的电话。 ### Asciinema 作为文档 -Asciinema 是演示最基本概念的好方法。因为它保留了从录制中复制和粘贴代码的能力,提供了按需暂停和播放的能力,并且完全准确地描绘了它的内容,它不仅仅是和屏幕录像一样好。它要好得多得多。无论你是用它来向你的朋友炫耀你的终端技能,还是用它来教育同事和学生,Asciinema 都是一个无价的、社交的、可利用的工具。 +Asciinema 是演示最基本概念的好方法。因为它保留了从录制中复制和粘贴代码的能力,提供了按需暂停和播放的能力,并且完全准确地描绘了它的内容,它不仅仅是屏幕录像,它要好得多。无论你是用它来向你的朋友炫耀你的终端技能,还是用它来教育同事和学生,Asciinema 都是一个无价的、社交的、便于访问的工具。 -------------------------------------------------------------------------------- @@ -152,7 +119,7 @@ via: https://opensource.com/article/22/1/record-terminal-session-asciinema 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 4d47a33e01cf8fe93a61dad92a75e2ca47275058 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 27 Jan 2022 05:02:25 +0800 Subject: [PATCH 107/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220126=20?= =?UTF-8?q?Quarkus=20and=20Mutiny?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220126 Quarkus and Mutiny.md --- sources/tech/20220126 Quarkus and Mutiny.md | 461 ++++++++++++++++++++ 1 file changed, 461 insertions(+) create mode 100644 sources/tech/20220126 Quarkus and Mutiny.md diff --git a/sources/tech/20220126 Quarkus and Mutiny.md b/sources/tech/20220126 Quarkus and Mutiny.md new file mode 100644 index 0000000000..cd15ac1013 --- /dev/null +++ b/sources/tech/20220126 Quarkus and Mutiny.md @@ -0,0 +1,461 @@ +[#]: subject: "Quarkus and Mutiny" +[#]: via: "https://fedoramagazine.org/quarkus-and-mutiny/" +[#]: author: "Dave O'Meara https://fedoramagazine.org/author/daveome/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Quarkus and Mutiny +====== + +![][1] + +Background image by [Eugene Golovesov][2] on [Unsplash][3] (cropped) + +Quarkus is a foundation for building Java based applications; whether for the desktop, server or cloud. An excellent write up on usage can be found at . This article is primer for coding asynchronous processes using Quarkus and Mutiny. + +So what is Mutiny? Mutiny allows streaming of objects in an event driven flow. The stream might originate from a local process or something remote like a database. Mutiny streaming is accomplished by either a _Uni_ or a _Multi_ object. We are using the Uni to stream one object — a _List_ containing many integers. A subscribe pattern initiates the stream. + +A traditional program is executed and results are returned before continuing. Mutiny can easily support non-blocking code to run processes concurrently. RxJava, ReactiveX and even native Java are alternatives. Mutiny is easy to use (the exposed API is minimal) and it is the default in many of the Quarkus extensions. The two extensions used are _quarkus-mutiny_ and _quarkus-vertx_. Vert.x is the underlying framework wrapped by Quarkus. The Promise classes are supplied by quarkus-vertx. A _promise_ returns a Uni stream when the process is complete. To get started, install a Java JDK and Maven. + +### Bootstrap + +The minimum requirement is either Java-11 _or_ Java-17 with Maven. + +**With Java-11**: + +``` + + $ sudo dnf install -y java-11-openjdk-devel maven + +``` + +**With Java-17**: + +``` + + $ sudo dnf install -y java-17-openjdk-devel maven + +``` + +Bootstrap **Quarkus **and Mutiny with the Maven call below. The extension _quarkus-vertx_ is not included to demonstrate how to add additional extensions. Locate an appropriate directory before executing. The directory _mutiny-demo_ will be created with the initial application. + +``` + + $ mvn io.quarkus.platform:quarkus-maven-plugin:2.6.2.Final:create \ + -DprojectGroupId=fedoramag \ + -DprojectArtifactId=mutiny-demo \ + -DprojectVersion=1.0.0 \ + -DclassName="org.demo.mag.Startup" \ + -Dextensions="mutiny" \ + -DbuildTool=gradle + +``` + +Now that Gradle is bootstrapped, other extensions can be added. In the _mutiny-demo_ directory execute: + +``` + + $ ./gradlew addExtension --extensions='quarkus-vertx' + +``` + +To view all available extensions execute: + +``` + + $ ./gradlew listExtensions + +``` + +To get all of the defined Gradle tasks execute: + +``` + + $ ./gradlew tasks + +``` + +### Mutiny Code + +The ****_className_ entry on the Quarkus bootstrap is _org.demo.mag.Startup_ which creates the file _src/main/java/org/demo/map/Startup.java_. Replace the contents with the following code: + +``` + + package org.demo.mag; + + import java.util.List; + import java.util.concurrent.ExecutionException; + import java.util.function.IntSupplier; + import java.util.stream.Collectors; + import java.util.stream.IntStream; + + import io.quarkus.runtime.Quarkus; + import io.quarkus.runtime.QuarkusApplication; + import io.quarkus.runtime.annotations.QuarkusMain; + import io.smallrye.mutiny.Uni; + import io.smallrye.mutiny.tuples.Tuple2; + import io.vertx.mutiny.core.Promise; + + @QuarkusMain + public class Startup implements QuarkusApplication { + public static void main(String... args) { + Quarkus.run(Startup.class, args); + } + + @Override + public int run(String... args) throws InterruptedException, ExecutionException { + final Promise finalMessage = Promise.promise(); + final String elapsedTime = "Elapsed time for asynchronous method: %d milliseconds"; + final int[] syncResults = {0}; + + Application.runTraditionalMethod(); + + final Long millis = System.currentTimeMillis(); + Promise> promiseRange = Application.getRange(115000); + Promise>, Promise>>> promiseCombined = Application.getCombined(10000, 15000); + Promise> promiseReverse = Application.getReverse(24000); + /* + * Retrieve the Uni stream and on the complete event obtain the List + */ + promiseRange.future().onItem().invoke(list -> { + System.out.println("Primes Range: " + list.size()); + if(syncResults[0] == 1) { + finalMessage.complete(String.format(elapsedTime, System.currentTimeMillis() - millis)); + } { + syncResults[0] = 2; + } + return; + }).subscribeAsCompletionStage(); + + promiseReverse.future().onItem().invoke(list -> { + System.out.println("Primes Reverse: " + list.size()); + return; + }).subscribeAsCompletionStage(); + /* + * Notice that this finishes before the other two prime generators(smaller lists). + */ + promiseCombined.future().onItem().invoke(p -> { + /* + * Notice that "Combined Range" displays first + */ + p.getItem2().future().invoke(reverse -> { + System.out.println("Combined Reverse: " + reverse.size()); + return; + }).subscribeAsCompletionStage(); + + p.getItem1().future().invoke(range -> { + System.out.println("Combined Range: " + range.size()); + /* + * Nesting promises to get multple results together + */ + p.getItem2().future().invoke(reverse -> { + System.out.println(String.format("Asserting that expected primes are equal: %d -- %d", range.get(0), reverse.get(reverse.size() - 1))); + assert range.get(0) == reverse.get(reverse.size() - 1) + : "Generated primes incorrect"; + if(syncResults[0] == 2) { + finalMessage.complete(String.format(elapsedTime, System.currentTimeMillis() - millis)); + } else { + syncResults[0] = 1; + } + return; + }).subscribeAsCompletionStage(); + return; + }).subscribeAsCompletionStage(); + return; + }).subscribeAsCompletionStage(); + // Note: on very fast machines this may not display first. + System.out.println("This should display first - indicating asynchronous code."); + // blocking for final message + String elapsedMessage = finalMessage.futureAndAwait(); + System.out.println(elapsedMessage); + + return 0; + } + + public static class Application { + + public static Promise> getRange(int n) { + final Promise> promise = Promise.promise(); + // non-blocking - this is only for demonstration(emulating some remote call) + new Thread(() -> { + try { + /* + * RangeGeneratedPrimes.primes is blocking, only returns when done + */ + promise.complete(RangeGeneratedPrimes.primes(n)); + } catch (Exception exception) { + Thread.currentThread().interrupt(); + } + }).start(); + + return promise; + } + + public static Promise> getReverse(int n) { + final Promise> promise = Promise.promise(); + + new Thread(() -> { + try { + // Generating a new object stream + promise.complete(ReverseGeneratedPrimes.primes(n)); + } catch (Exception exception) { + Thread.currentThread().interrupt(); + } + }).start(); + + return promise; + } + + public static Promise>, Promise>>> getCombined(int ran, int rev) { + final Promise>, Promise>>> promise = Promise.promise(); + + new Thread(() -> { + try { + Uni.combine().all() + /* + * Notice that these are running concurrently + */ + .unis(Uni.createFrom().item(Application.getRange(ran)), + Uni.createFrom().item(Application.getReverse(rev))) + .asTuple().onItem().call(tuple -> { + promise.complete(tuple); + return Uni.createFrom().nullItem(); + }) + .onFailure().invoke(Throwable::printStackTrace) + .subscribeAsCompletionStage(); + } catch (Exception exception) { + Thread.currentThread().interrupt(); + } + }).start(); + + return promise; + } + + public static void runTraditionalMethod() { + Long millis = System.currentTimeMillis(); + System.out.println("Traditiona1-1: " + RangeGeneratedPrimes.primes(115000).size()); + System.out.println("Traditiona1-2: " + RangeGeneratedPrimes.primes(10000).size()); + System.out.println("Traditiona1-3: " + ReverseGeneratedPrimes.primes(15000).size()); + System.out.println("Traditiona1-4: " + ReverseGeneratedPrimes.primes(24000).size()); + System.out.println(String.format("Elapsed time for traditional method: %d milliseconds\n", System.currentTimeMillis() - millis)); + } + } + + public interface Primes { + static List primes(int n) { + return null; + }; + } + + public abstract static class PrimeBase { + static boolean isPrime(int number) { + return IntStream.rangeClosed(2, (int) (Math.sqrt(number))) + .allMatch(n -> number % n != 0); + } + } + + public static class RangeGeneratedPrimes extends PrimeBase implements Primes { + public static List primes(int n) { + return IntStream.rangeClosed(2, n) + .filter(x -> isPrime(x)).boxed() + .collect(Collectors.toList()); + } + } + + public static class ReverseGeneratedPrimes extends PrimeBase implements Primes { + public static List primes(int n) { + List list = IntStream.generate(getReverseList(n)).limit(n - 1) + .filter(x -> isPrime(x)).boxed() + .collect(Collectors.toList()); + + return list; + } + + private static IntSupplier getReverseList(int startValue) { + IntSupplier reverse = new IntSupplier() { + private int start = startValue; + + public int getAsInt() { + return this.start--; + } + }; + + return reverse; + } + } + } + +``` + +### Testing + +The Quarkus install showcases the _quarkus-resteasy_ extension by default. We are not using it, replace the contents of _src/test/java/org/demo/mag/StartupTest.java_ with: + +``` + + package org.demo.mag; + + import io.quarkus.test.junit.QuarkusTest; + import io.vertx.mutiny.core.Promise; + + import java.util.List; + + import org.demo.mag.Startup; + import org.junit.jupiter.api.Assertions; + import org.junit.jupiter.api.Tag; + import org.junit.jupiter.api.Test; + + @QuarkusTest + public class StartupTest { + Promise> promise = Promise.promise(); + Promise promiseAndAwait = Promise.promise(); + List testValue; + + @Tag("DEV") + @Test + public void testVerifyAsync() { + Assertions.assertEquals( null , testValue); + promise.future().onItem().invoke(list -> { + testValue = list; + promiseAndAwait.complete(); + }).subscribeAsCompletionStage(); + Assertions.assertEquals(null, testValue); + promise.complete(Startup.ReverseGeneratedPrimes.primes(100)); + promiseAndAwait.futureAndAwait(); + Assertions.assertNotNull(testValue); + Assertions.assertEquals(2, testValue.get(testValue.size()-1)); + } + } + +``` + +### Optional + +To reduce download volume, remove the following entries from ****the _build.gradle_ file. + +``` + + implementation 'io.quarkus:quarkus-resteasy' + testImplementation 'io.rest-assured:rest-assured' + +``` + +### Installation and Execution + +The next step is to build the project. This includes downloading all dependencies as well as compiling and executing the Startup.java program. Everything is included in one file for brevity. + +``` + + $ ./gradlew quarkusDev + +``` + +The above command produces a banner and console output from Quarkus and the program. + +This is development mode. Notice the prompt: “Press [space] to restart”. To review edits hit the space-bar and enter-key to re-compile and execute. Enter **q** to quit. + +To build an Uber jar (all dependencies included) execute: + +``` + + $ ./gradlew quarkusBuild -Dquarkus.package.type=uber-jar + +``` + +This creates a jar in the _build_ directory named mutiny-_demo-1.0.0-runner.jar_. To run the jar file, enter the following command. + +``` + + $ java -jar ./build/mutiny-demo-1.0.0-runner.jar + +``` + +To remove the banner and console logs, add the following lines to the _src/main/resources/application.properties_ file. + +``` + + %prod.quarkus.log.console.enable=false + %prod.quarkus.banner.enabled=false + +``` + +The output might look similar to the following. + +``` + + Traditional-1: 9592 + Traditional-2: 1229 + Traditional-3: 2262 + Traditional-4: 2762 + Elapsed time for traditional method: 67 milliseconds + + Combined Range: 1229 + This should display first - indicating asynchronous code. + Combined Reverse: 2262 + Primes Reverse: 2762 + Asserting that expected primes are equal: 2 -- 2 + Primes Range: 9592 + Elapsed time for asynchronous method: 52 milliseconds + +``` + +You will still get the banner and logs in development mode. + +To go one step further, Quarkus can generate an executable out of the box using GraalVM. + +``` + + $ ./gradlew build -Dquarkus.package.type=native + +``` + +The executable generated by the above command will be _./build/mutiny-demo-1.0.0-runner_. + +The default GraalVM is a downloaded container. To override this, set the environment variable _GRAALVM_HOME_ to your local install. Don’t forget to install the _native-image_ with the following command. + +``` + + $ ${GRAALVM_HOME}/bin/gu install native-image + +``` + +### The Code + +The code, generates prime numbers for a range, reversed on a limit and a combination of the two. For example, consider the range: “Promise<List<Integer>> promiseRange = Application.getRange(115000);”. + +This generates all primes between 1 and 115000 and displays the number of primes in the range. It is executed first but displays its results last. The code near the end of the main method — System.out.println (“This should display first – indicating asynchronous code.”); ****— displays first. This is an example of asynchronous code. We can run multiple processes concurrently. However, the order of completion is unpredictable. The traditional calls are orderly and the results can be collected when completed. + +Execution can be blocked until a result is returned. The code does exactly that to display the asynchronous elapsed time message. At the end of the main method we have: “String elapsedMessage = finalMessage.futureAndAwait();”. The message arrives from either _promiseRange_ or _promiseCombined_ — the two longest running processes. But even this is not guaranteed. The state of the underling OS is unknown. One of the other processes might finish last. Normally, asynchronous calls are nested to co-ordinate results. This is demonstrated in the _promiseCombined_ promise to evaluate the results of range and reversed primes. + +### Conclusion + +The comparison between the traditional method and asynchronous method suggests that the asynchronous method can be up to 25% faster on a modern computer. An older CPU that does not have the resources and computing power produces results faster with the traditional method. If a computer has many cores, why not use them‽ + +More documentation can be found on the following web sites. + + * [https://][4][quarkus.io][4] + * + * + + + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/quarkus-and-mutiny/ + +作者:[Dave O'Meara][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/daveome/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2022/01/quarkus-and-mutiny-816x345.jpg +[2]: https://unsplash.com/@eugene_golovesov?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://quarkus.io From 7eb30ac4fc811155042e2f1feca1db29e51f6770 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 27 Jan 2022 05:02:37 +0800 Subject: [PATCH 108/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220127=20?= =?UTF-8?q?Open=20Source=20Video=20Converters=20for=20Linux=20[GUI=20and?= =?UTF-8?q?=20CLI]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220127 Open Source Video Converters for Linux -GUI and CLI.md --- ...Video Converters for Linux -GUI and CLI.md | 166 ++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 sources/tech/20220127 Open Source Video Converters for Linux -GUI and CLI.md diff --git a/sources/tech/20220127 Open Source Video Converters for Linux -GUI and CLI.md b/sources/tech/20220127 Open Source Video Converters for Linux -GUI and CLI.md new file mode 100644 index 0000000000..e93e2c0d81 --- /dev/null +++ b/sources/tech/20220127 Open Source Video Converters for Linux -GUI and CLI.md @@ -0,0 +1,166 @@ +[#]: subject: "Open Source Video Converters for Linux [GUI and CLI]" +[#]: via: "https://itsfoss.com/open-source-video-converters/" +[#]: author: "Community https://itsfoss.com/author/itsfoss/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Open Source Video Converters for Linux [GUI and CLI] +====== + +Video downloads are fun until they become unplayable. So, here’s the list of top open-source video converters to help your downloads stay relevant everywhere. + +Video conversion is not the best thing you want to do with a video, but it becomes unavoidable sometimes. + +For instance, you can only upload videos in selected formats on YouTube, Facebook, etc. Similarly, media players don’t play every other format in which you download or create videos. + +And finally, video converters are a must for efficient video editing to suit specific applications. + +General features to look for in any video converter: + + * Supports several formats + * Capable of scaling and changing resolutions + * Allow adding audio tracks + * Permit changing frame rates + + + +So, here’s our round-up of the best open-source video converters. + +Please note this is not a ranking list. + +### 1\. HandBrake + +![][1] + +[HandBrake][2] is a free open-source video transcoder. It’s very powerful with only a little learning curve. + +It supports a wide range of video formats. Handbrake also has numerous presets to fast-forward the conversion for beginners. But this also has tons of tweaks for advanced users. + +In addition, you can convert a large number of files with batch conversion. It has everything but an appealing user interface. + +That being said, it’s free, and there is no reason one shouldn’t try this. + +HandBrake is available for Linux, Windows, and Mac. + +### 2\. FFmpeg (and it’s GUI frontends) + +[FFmpeg][3] is a free, open-source project able to handle everything multimedia created by humans or machines, as mentioned on their website. + +You can [use FFMPEG][4] to record, play, and convert audio and video. But for most people, it’s just a foundation to build upon. + +There are various Graphical user interfaces (GUI) that leverage the power of this multimedia framework. You may have guessed it, yes, it’s a command-line utility.   + +So, we’ll discuss two GUIs for you to use FFmpeg with ease. + +#### 2.1 Mystiq + +![][5] + +[Mystiq][6] simplifies FFmpeg. This open-source, free GUI is clean and very intuitive to install and begin with. + +There are plenty of presets for no-hassle conversion. In addition, expert users can benefit from FFmpeg capabilities by navigating to **Edit**>**Set** **Parameters**>**Advanced**. + +You can also go through our own [coverage on Mystiq][7]. It can be downloaded for Windows and Linux. + +#### 2.2 FFqueue + +![][8] + +[FFqueue][9] is an advanced GUI for FFmpeg. It uses the native graphical settings of the operating system. + +Straightaway, the installation is not a cakewalk and is **not recommended for beginners**. But if you got through the tricky installation, then it presents you with a very functional GUI. + +Notably, this doesn’t come with any default presets. Instead, you can make your own. FFqueue is available for Linux and Windows. + +### 3\. Ciano + +![][10] + +[Ciano][11] is yet another GUI that is based on FFmpeg (for audio and video) and ImageMagick (for images). + +It has an oversimplified user interface for beginners. Your experience with Ciano is limited to selecting the format from the sidebar, exporting the file, and finally, checking the output folder for conversion. + +Just remember to install FFmpeg and Imagemagick before you start with Ciano. Finally, this simplistic video converter is only for Debian and its derivatives. + +### 4\. Shutter Encoder + +![][12] + +[Shutter encoder][13] is free and extremely easy to install. It’s not just for videos, as it can process audio and images as well. The one major downside is that it has a dated UI that feels like you went ten years back in time. + +It’s a really robust encoder but only in the hands of an advanced user. It has tons of features, but without a preview, an average user is left to try each hoping for a decent output. + +Right away, the user interface is not the most intuitive, and most of the time it feels like finding a needle in a haystack. This is strictly recommended for expert users. + +Shutter encoder is can be used on Linux and Windows. + +### 5\. MEncoder with Mplayer + +[Mplayer][14] is again an advanced option that doesn’t come with a GUI. You will have it upon yourself to find and download from the available [unofficial MEncoder frontends][15]. + +The functionality depends upon the GUI you use. Most of them are outdated and not in current development. + +One such GUI is [GMEncoder][16]. MEncoder is available for Linux, Windows, and macOS X. + +### 6\. Avidemux + +![][17] + +[Avidemux][18] is by far one of the easiest to use. It also comes as an AppImage, so just download the file, make it executable, and you’re good. + +It’s free and open-source. Avidemux is specially designed for beginners. It’s a video editor and encoder bundled in one, though you can play with other multimedia formats as well. + +Avidemux comes with a preview option. It really helps you as a newbie or medium user to check out the result before going for a full-blown conversion. + +Conclusively, Avidemux is a nifty video encoder available for Linux, Windows, Mac, PC-BSD. + +### **Conclusion** + +For an average Linux user like me, the most powerful option is Handbrake, followed by Avidemux. Both offer easy installation and excellent features. + +But medium to expert users should try FFmpeg with any suitable GUI. + +And go with Shutter Encoder if you’re brave enough to wander in the wild. + +![][19] + +### Hitesh Sant + +Hitesh is a technology writer. He also has a flavor for acoustic guitar. And academically, he’s a postgraduate in Transportation Engineering & Management. You can check his complete work at [hiteshsant.com/][20]. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/open-source-video-converters/ + +作者:[Community][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/itsfoss/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/11/handbrake.png?resize=800%2C537&ssl=1 +[2]: https://handbrake.fr/ +[3]: https://www.ffmpeg.org/about.html +[4]: https://itsfoss.com/ffmpeg/ +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/mystiq-video-converter.jpg?resize=800%2C450&ssl=1 +[6]: https://mystiqapp.com/ +[7]: https://itsfoss.com/mystiq/ +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/ffqueue.png?resize=800%2C541&ssl=1 +[9]: http://ffqueue.bruchhaus.dk/Default.aspx +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Ciano.png?resize=700%2C424&ssl=1 +[11]: https://robertsanseries.github.io/ciano/index.html +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/shutter-encoder-800x486.jpg?resize=800%2C486&ssl=1 +[13]: https://www.shutterencoder.com/en/ +[14]: http://www.mplayerhq.hu/design7/news.html +[15]: http://www.mplayerhq.hu/design7/projects.html#unofficial_packages +[16]: http://gmencoder.sourceforge.net/ +[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/06/avidemux.jpg?resize=800%2C697&ssl=1 +[18]: http://avidemux.sourceforge.net/download.html +[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/hitesh.webp?resize=400%2C400&ssl=1 +[20]: http://hiteshsant.com/ From 003fcb6d4e2ff443d8e5833a87976f352b357def Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 27 Jan 2022 05:04:03 +0800 Subject: [PATCH 109/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220126=20?= =?UTF-8?q?Here=E2=80=99s=20Why=20Ksnip=20is=20My=20New=20Favorite=20Linux?= =?UTF-8?q?=20Screenshot=20Tool=20in=202022?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220126 Here-s Why Ksnip is My New Favorite Linux Screenshot Tool in 2022.md --- ... Favorite Linux Screenshot Tool in 2022.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 sources/news/20220126 Here-s Why Ksnip is My New Favorite Linux Screenshot Tool in 2022.md diff --git a/sources/news/20220126 Here-s Why Ksnip is My New Favorite Linux Screenshot Tool in 2022.md b/sources/news/20220126 Here-s Why Ksnip is My New Favorite Linux Screenshot Tool in 2022.md new file mode 100644 index 0000000000..2be081b364 --- /dev/null +++ b/sources/news/20220126 Here-s Why Ksnip is My New Favorite Linux Screenshot Tool in 2022.md @@ -0,0 +1,108 @@ +[#]: subject: "Here’s Why Ksnip is My New Favorite Linux Screenshot Tool in 2022" +[#]: via: "https://news.itsfoss.com/ksnip-experience/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Here’s Why Ksnip is My New Favorite Linux Screenshot Tool in 2022 +====== + +So, I recently upgraded to a dual-monitor setup (1080p + 1440p). + +While I was excited about the productivity boost by getting things done faster without the need to manage/minimize active windows constantly, there were a few nuances that I came across. + +To my surprise, Flameshot refused to work. And, for the tutorials or articles I write, a screenshot tool that offers minor editing or annotation capabilities comes in handy. + +If you have a similar requirement and are confused, the [GNOME Screenshot tool][1] is an option that works with multiple screens flawlessly. + +However, it does not offer annotations. So, I will have to separately open the image using another image editor or Ksnip to make things work. + +Instead, I decided to use Ksnip for screenshots + annotations? Convenient, right? Yes! + +Let me share my brief experience with Ksnip, and why I think you should try it as well! + +### Using Ksnip for Screenshots on Linux + +I installed Ksnip using the [Flatpak package][2] from [Flathub][3]. But, you can also find its Snap package on Snapcraft. + +Packages including DEB/RPM and the AppImage file can be found in its [GitHub releases section][4]. + +You should not have any issues installing it on any Linux distribution. I am currently using it on Pop!_OS 21.10. + +![][5] + +Ksnip supports system tray integration out-of-the-box. So, you should get quick access to the tool and its options, as shown in the screenshot above. + +It lets you take an entire screenshot of two monitors combined using the Full-Screen option. In my case, the result is not pretty (considering I have two monitors with different resolutions) and the file takes up more than 9 MB in size. + +In any case, I do not have a use-case of such an option. So, I stick to the ability to take screenshots of a rectangular area. + +I created a custom shortcut to take a screenshot of an area (or rectangular region) to make it more convenient. Accurately, I mapped it with the middle-click button on my mouse. You can set your preferred shortcut if you want. + +![][6] + +Unfortunately, it does not feature a “delay” option in the system tray to initiate a screenshot after a time gap. But, you can add a delay by accessing the Ksnip editor and initiating a screenshot from within. + +![][7] + +Moving forward, it lets me accurately select a rectangular area across both the monitors, which I want. + +![][8] + +Now, these options alone let me take all kinds of screenshots. + +Once the screenshot has been taken, Ksnip directly opens the editor to let you add annotations, save the photo, or discard it. + +When compared to Flameshot, if I miss adding annotations while taking the screenshot, there’s no built-in image editor to help me with that. And, with Ksnip, I do not have to worry about adding annotations immediately; I can think it over and add annotations if necessary. + +![][9] + +It also allows me to modify the annotations, even after I saved the image to storage. What a nifty feature! + +In addition to all these, you also get some key features like: + + * The ability to pin the editor and use it as a widget across the screen to quickly access the Knsip editor. + * Ability to add watermarks. + * Undo/Redo + * Modify Canvas + * Scale/Crop image + * Add numbers/stickers along with other annotations + * Adjust transparency of sniping area + * Imgur/Script uploader + * Hotkey support + + + +For my workflow, Ksnip is probably the [best screenshot tool for Linux][10] and I will be sticking to it for the near future! + +[Ksnip (GitHub)][11] + +_What do you think about my experience with Knsip? Have you tried it as well? What do you think about it? Let me know your thoughts in the comments!_ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/ksnip-experience/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/using-gnome-screenshot-tool/ +[2]: https://itsfoss.com/flatpak-guide/ +[3]: https://flathub.org/apps/details/org.ksnip.ksnip +[4]: https://github.com/ksnip/ksnip/releases/tag/v1.9.2 +[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjYzMSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMxNSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjIzMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ0MCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM2MSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[10]: https://itsfoss.com/take-screenshot-linux/ +[11]: https://github.com/ksnip/ksnip From e2ac1906aaca34912621c188ac496355bed29812 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 27 Jan 2022 05:04:10 +0800 Subject: [PATCH 110/334] add done: 20220126 Here-s Why Ksnip is My New Favorite Linux Screenshot Tool in 2022.md --- sources/tech/20220127 .md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 sources/tech/20220127 .md diff --git a/sources/tech/20220127 .md b/sources/tech/20220127 .md new file mode 100644 index 0000000000..922cdaddcb --- /dev/null +++ b/sources/tech/20220127 .md @@ -0,0 +1,16 @@ +[#]: subject: "" +[#]: via: "https://www.debugpoint.com/2022/01/linux-kernel-5-17-rc1/" +[#]: author: "[Arindam] + +Posted by Arindam + +Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + + +====== + From c14d06f7074f1cc02e141ef6bc7cb4b2aa24a641 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 27 Jan 2022 08:51:57 +0800 Subject: [PATCH 111/334] translated --- ...rite Linux commands to use just for fun.md | 136 ------------------ ...rite Linux commands to use just for fun.md | 135 +++++++++++++++++ 2 files changed, 135 insertions(+), 136 deletions(-) delete mode 100644 sources/tech/20220122 Our favorite Linux commands to use just for fun.md create mode 100644 translated/tech/20220122 Our favorite Linux commands to use just for fun.md diff --git a/sources/tech/20220122 Our favorite Linux commands to use just for fun.md b/sources/tech/20220122 Our favorite Linux commands to use just for fun.md deleted file mode 100644 index 98783ed06e..0000000000 --- a/sources/tech/20220122 Our favorite Linux commands to use just for fun.md +++ /dev/null @@ -1,136 +0,0 @@ -[#]: subject: "Our favorite Linux commands to use just for fun" -[#]: via: "https://opensource.com/article/22/1/fun-linux-commands" -[#]: author: "Opensource.com https://opensource.com/users/admin" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Our favorite Linux commands to use just for fun -====== -The Linux command line is known for being a productivity powerhouse. -It's also a place to have some fun, too! -![woman on laptop sitting at the window][1] - -In November, we shared the article [7 Linux commands to use just for fun][2] and asked you to tell us what "for fun" Linux command you recommend—and why? - -Some Opensource.com contributors shared their favorites below. - -* * * - -My favorites: - - * `cowsay`, of course! - * `fortune`, my favorite "hack" was having the `motd` when users connected be a humorous fortune. - * `sl`, a steam locomotive in your terminal. - * `xsnow`, another root XWindow hack, this command puts relaxing snowfall over your workspace, with accumulation on the top of open windows. - * GNOME Easter eggs, in GNOME 2, **Alt+F2** (opening the run dialog) and entering "free the fish" released Wanda the Fish onto your root window. Wanda would wander around, scurrying off (for a while) if you clicked on her. - - - -~[Dave Neary][3] - -* * * - -My day starts with these: - -`fortune`, `cowsa`y, `lolcat`  - -![Don't take life too seriously][4] - -(Tomasz Waraksa, [CC BY-SA 4.0][5]) - -Followed by `curl` [wttr.in][6] - -![Weather][7] - -(Tomasz Waraksa, [CC BY-SA 4.0][5]) - -Now we can have a coffee ;-) - -~[Tomasz Waraksa][8] - -* * * - -`cmatrix` , because every now and then you feel like you're jacked into the machine. - -~[Gary Smith][9] - -* * * - -Telnet towel.blinkenlights.nl. - -It's not exactly Linux-specific but it's kinda awesome. - -~[John 'Warthog9' Hawley][10] - -* * * - -Xroach was a cool add-on for your window manager in the 1990s. It was a lot of fun with Tab Window Manager (TWM) and F Virtual Window Manager (FVWM) at the time, but I haven't used it in years. When you ran Xroach, it added little cockroaches that "lived" under your windows. When you moved a window or closed it, the roaches would scamper to hide under another window or run off the screen. Just one of those little ways to make the desktop more fun. - -Looks like there's a [modern port of Xroach][11] that I'll have to try out sometime. - -~[Jim Hall][12] - -* * * - -I worked as a computer science TA in the late 90s, and we had Sun Sparc workstations in our computer lab. Sometimes students would walk away during lab time without locking the screen. Every once in a while, I would execute `xroach &; clear` on the terminal when they weren't looking.   - -XRoach is a good one. Cockroaches hide under the windows, and scurry around the screen and then under another window when you move a window.   - -~[Ann Marie Fred][13] - -* * * - -One of my favorites is `hollywood`. Check it out [here][14]. - -Just run it and start jamming on the keys, you will convince everyone at Starbucks that you're taking down the NSA. - -~[Clint Byrum][15] - -[Jim Hall][12] responded to this one with: - -That's awesome! It reminds me of [Hacker Typer][16]—it's a website instead of a terminal program. Just bring up the site, and mash on the keys. It doesn't matter what you type, Hacker Typer will spit out what seems to be real work. :-) - -In response to the fun presented by Clint Byrum (and Jim Hall's response): - -I like both of those! Enjoy this [blog post][17] about Hollywood hackers. One of my favorites. - -~[Greg Scott][18] - -* * * - -What's your favorite "for fun" Linux command? Please share yours in the comments below. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/fun-linux-commands - -作者:[Opensource.com][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/admin -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop) -[2]: https://opensource.com/article/21/11/fun-linux-commands -[3]: https://opensource.com/users/dneary -[4]: https://opensource.com/sites/default/files/uploads/too-seriously.png (Don't take life too seriously) -[5]: https://creativecommons.org/licenses/by-sa/4.0/ -[6]: http://wttr.in/ -[7]: https://opensource.com/sites/default/files/uploads/wttr.png (Weather (wttr.in)) -[8]: https://opensource.com/user_articles/380541 -[9]: https://opensource.com/users/greptile -[10]: https://opensource.com/users/warthog9 -[11]: https://github.com/interkosmos/xroach -[12]: https://opensource.com/users/jim-hall -[13]: https://opensource.com/users/annmarie99 -[14]: https://snapcraft.io/install/hollywood/ubuntu -[15]: https://opensource.com/users/spamaps -[16]: https://hackertyper.net/ -[17]: https://www.dgregscott.com/hollywood-hacker/ -[18]: https://opensource.com/users/greg-scott diff --git a/translated/tech/20220122 Our favorite Linux commands to use just for fun.md b/translated/tech/20220122 Our favorite Linux commands to use just for fun.md new file mode 100644 index 0000000000..484c98c5ed --- /dev/null +++ b/translated/tech/20220122 Our favorite Linux commands to use just for fun.md @@ -0,0 +1,135 @@ +[#]: subject: "Our favorite Linux commands to use just for fun" +[#]: via: "https://opensource.com/article/22/1/fun-linux-commands" +[#]: author: "Opensource.com https://opensource.com/users/admin" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +我们最喜欢的好玩的 Linux 命令 +====== +Linux 的命令行以生产力强而闻名。它也是一个可以获得一些乐趣的地方! +![woman on laptop sitting at the window][1] + +11月,我们分享了一篇文章 [7个好玩的 Linux 命令][2],并请你告诉我们你推荐的“好玩”的 Linux 命令是什么以及为什么? + +一些Opensource.com的作者在下面分享了他们的最爱。 + +* * * + +我的最爱: + + * `cowsay`, 当然! + * `fortune`,我最喜欢的 “hack” 是让用户连接时的 `motd` 成为一个幽默的财富。 + * `sl`, 在你的终端上有一个蒸汽机车。 + * `xsnow`, 另一个 XWindow hack,这个命令在你的工作空间上进行轻松的降雪,并在打开的窗口上方积聚。 + * GNOME 复活节彩蛋,在 GNOME 2 中,按下 **Alt+F2**(打开运行对话框)并输入 “free the fish”,就可以在你的根窗口中释放 “Wanda the Fish”。如果你点击 Wanda,它就会四处游荡,窜来窜去(一段时间)。 + + + +\~[Dave Neary][3] + +* * * + +我的一天从这些开始: + +`fortune`、`cowsay`、`lolcat` + +![Don't take life too seriously][4] + +(Tomasz Waraksa, [CC BY-SA 4.0][5]) + +紧接着 `curl` [wttr.in][6] + +![Weather][7] + +(Tomasz Waraksa, [CC BY-SA 4.0][5]) + +现在我们可以喝咖啡了 ;-) + +\~[Tomasz Waraksa][8] + +* * * + +`cmatrix` ,因为每当这个时候,你就会觉得自己被插入了机器。 + +\~[Gary Smith][9] + +* * * + +Telnet towel.blinkenlights.nl + +这并不完全是 Linux 特有的,但它还挺棒的。 + +\~[John 'Warthog9' Hawley][10] + +* * * + +Xroach 是 20 世纪 90 年代你的窗口管理器的一个很酷的附加功能。当时它与 Tab Window Manager (TWM)和 F Virtual Window Manager (FVWM)一起使用时非常有趣,但我已经多年没有使用它了。当你运行 Xroach 时,它添加了小蟑螂并“住”在你的窗口下。当你移动一个窗口或关闭它时,蟑螂就会窜到另一个窗口下躲起来或跑出屏幕。这只是其中一种使桌面更有趣的小方法。 + +看起来有一个 [Xroach 的现代移植][11],我得找个时间试试。 + +\~[Jim Hall][12] + +* * * + +我在 90 年代末担任过计算机科学的助教,我们的计算机实验室里有 Sun Sparc 工作站。有时学生会在实验室时间里走开而不锁屏。每隔一段时间,我就会在他们不注意的时候在终端上执行 `xroach &; clear`。 + +XRoach 是个好东西。蟑螂躲在窗口下,在屏幕上窜来窜去,当你移动一个窗口时,又躲在另一个窗口下。 + +\~[Ann Marie Fred][13] + +* * * + +我最喜欢的一个是 `hollywood`。在[这里][14]了解下。 + +只需运行它并开始随意按键,你就会让星巴克的每个人都相信您正在摧毁 NSA。。 + +\~[Clint Byrum][15] + +[Jim Hall][12] 对此回应道: + +这真是太棒了! 这让我想起了 [Hacker Typer][16]。它是一个网站而不是一个终端程序。只要调出网站,然后敲击键盘。不管你输入什么,Hacker Typer 都会输出似乎是真正的工作。:-) + +为了回应 Clint Byrum(和 Jim Hall 的回应)带来的乐趣: + +这两个我都喜欢! 请欣赏这篇关于 Hollywood 黑客的[博文][17]。我最喜欢的一个。 + +\~[Greg Scott][18] + +* * * + +你最喜欢的“有趣的” Linux 命令是什么?请在下面的评论中分享你的。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/fun-linux-commands + +作者:[Opensource.com][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/admin +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop) +[2]: https://opensource.com/article/21/11/fun-linux-commands +[3]: https://opensource.com/users/dneary +[4]: https://opensource.com/sites/default/files/uploads/too-seriously.png (Don't take life too seriously) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: http://wttr.in/ +[7]: https://opensource.com/sites/default/files/uploads/wttr.png (Weather (wttr.in)) +[8]: https://opensource.com/user_articles/380541 +[9]: https://opensource.com/users/greptile +[10]: https://opensource.com/users/warthog9 +[11]: https://github.com/interkosmos/xroach +[12]: https://opensource.com/users/jim-hall +[13]: https://opensource.com/users/annmarie99 +[14]: https://snapcraft.io/install/hollywood/ubuntu +[15]: https://opensource.com/users/spamaps +[16]: https://hackertyper.net/ +[17]: https://www.dgregscott.com/hollywood-hacker/ +[18]: https://opensource.com/users/greg-scott From e9110e31aa0e018a7e23b08d038a29fe7ab6cdcd Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 27 Jan 2022 08:58:38 +0800 Subject: [PATCH 112/334] translating --- .../20220126 Jrnl- Your Digital Diary in the Linux Terminal.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md b/sources/tech/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md index 7314d6572f..ddafbd37b5 100644 --- a/sources/tech/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md +++ b/sources/tech/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/jrnl/" [#]: author: "Marco Carmona https://itsfoss.com/author/marco/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 6487fc2d99939382357fca4226b7f8d585d733e0 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 27 Jan 2022 09:14:35 +0800 Subject: [PATCH 113/334] Delete 20220127 .md --- sources/tech/20220127 .md | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 sources/tech/20220127 .md diff --git a/sources/tech/20220127 .md b/sources/tech/20220127 .md deleted file mode 100644 index 922cdaddcb..0000000000 --- a/sources/tech/20220127 .md +++ /dev/null @@ -1,16 +0,0 @@ -[#]: subject: "" -[#]: via: "https://www.debugpoint.com/2022/01/linux-kernel-5-17-rc1/" -[#]: author: "[Arindam] - -Posted by Arindam - -Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - - -====== - From 8236730f6665c31500274cad930bac68da7bb498 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 27 Jan 2022 09:28:30 +0800 Subject: [PATCH 114/334] A --- sources/tech/20220112 How to build an open source metaverse.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220112 How to build an open source metaverse.md b/sources/tech/20220112 How to build an open source metaverse.md index c828c27090..0487ffa71f 100644 --- a/sources/tech/20220112 How to build an open source metaverse.md +++ b/sources/tech/20220112 How to build an open source metaverse.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/1/open-source-metaverse" [#]: author: "Josip Almasi https://opensource.com/users/jalmasi" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From f0ccee4d1cc5bd3e0a1b2592be58445df8084fc3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 27 Jan 2022 12:32:57 +0800 Subject: [PATCH 115/334] TR @wxy --- ...2 How to build an open source metaverse.md | 112 ------------------ ...2 How to build an open source metaverse.md | 112 ++++++++++++++++++ 2 files changed, 112 insertions(+), 112 deletions(-) delete mode 100644 sources/tech/20220112 How to build an open source metaverse.md create mode 100644 translated/talk/20220112 How to build an open source metaverse.md diff --git a/sources/tech/20220112 How to build an open source metaverse.md b/sources/tech/20220112 How to build an open source metaverse.md deleted file mode 100644 index 0487ffa71f..0000000000 --- a/sources/tech/20220112 How to build an open source metaverse.md +++ /dev/null @@ -1,112 +0,0 @@ -[#]: subject: "How to build an open source metaverse" -[#]: via: "https://opensource.com/article/22/1/open-source-metaverse" -[#]: author: "Josip Almasi https://opensource.com/users/jalmasi" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to build an open source metaverse -====== -The world of open source is a prime place to build a metaverse. -![new techie gadgets representing innovation][1] - -If I told you that all content and software you need to build the metaverse is already available and completely free, would you do it? - -Hold that thought, and let's take a step back and explain the metaverse. - -### What is the metaverse anyway? - -Cyberpunk authors of the 20th century like Gibson and Stephenson imagined virtual reality-enabled internet, and in his novel _Snow Crash_, Stephenson called it Metaverse. With the growing availability of virtual reality (VR) devices and apps, Metaverse became a buzzword, especially since Mark Zuckerberg announced employing 10,000 workers to build it and changed the Facebook company name to Meta. Matthew Ball wrote a [serious analysis][2] of the topic that ends with the conclusion—Building together: "And in truth, it's most likely the Metaverse emerges from a network of different platforms, bodies, and technologies working together (however reluctantly) and embracing interoperability." - -Interoperability. The word itself implicitly but clearly, points out how open source and open standards fit in the picture. - -So, in short, it's about VR-enabled internet. - -### How can an open source metaverse be built? - -Like web servers on the internet, you need VR servers. But worry not, I wrote one, and [an article about it][3] was published right here about a year ago. Then, of course, you need VR-enabled web browsers, but web browsers already do support video/audio streaming (WebRTC) and VR and AR both (WebXR). Furthermore, you need a bunch of 3D content, preferably in open source standard glTF format. And luckily, [Sketchfab][4] hosts 500,000+ free 3D models, published under Creative Commons licenses by a huge number of authors. Sketchfab isn't the only company doing that, but they provide REST API to search and download any of these models. - -### Don't forget the keyboard - -Being in VR for quite a while now, I can tell you first hand what I miss the most: The keyboard! I write code on the keyboard, but it disappears when I put on my VR goggles. You can imagine how disruptive taking VR gear off and on is. And not just that, I need to see my code in VR. And then why stop there? Why wouldn't I see every application in VR? Many people are using two or more displays. In VR, arrange windows wherever you look. That's better than any number of screens. And once that happens, you'll be able to talk metaverse for real. - -Truth be told, VR devices are still in their infancy, and there are undoubtedly many more functions missing. But VR devices will improve and eventually include keyboards, better cameras, and the ability to overlay virtual over real. In the meantime, we'll keep taking our goggles on and off and deal with other obstacles in other ways. - -### So what am I waiting for? - -You don't need to wait. People are working on it, enthusiasts and companies alike. And you can start building your virtual worlds on the web right now. The video below explains how to make virtual worlds using available free models. - -Under the hood, the VRSpace web client uses Babylon.js, an open source JavaScript WebGL library to load glTF content and render with WebGL. It calls the search function of the Sketchfab REST API (server owner must have an account there). Once you click on a model, it asks the VRSpace server to fetch it. The server downloads it (only if it didn't do so earlier) and delivers it to the client. Everything that happens in the space is broadcast (multi-casted over WebSockets, actually) to all connected users, so they all see the same movement and resizing of objects. And sure, they can chat, either with text messages or voice. And by clicking on the VR goggles button in the bottom-right corner, the user instantly enters VR. Users can also share screens, though not in this space. - -And this is all done using only existing standard web technologies and free software and content. It's not only available on PC and VR devices, but also on mobile devices. However, mobile Chrome doesn't come with VR functions enabled. It prompts for download of Google VR on the first attempt to enter VR. - -As it's all open, this is as interoperable as it gets for the time being. But it's not nearly interoperable enough for the massive scale required for metaverse—the VR-enabled internet. Take avatars, for example. I use the same image for my avatar on LinkedIn, Facebook, as well as on Opensource.com. How can I upload my 3D avatar to VRSpace or elsewhere? - -Well, I can't. Upload itself is not a problem. Of course, neither is the file format (glTF). Issues arise from the avatar structure, as it's not standardized. So, for example, different characters have a different number of bones. Then, must-have features that are supposed to be trivial, like holding something in your virtual hand, become extremely complicated. I have analyzed 100+ free characters and published my findings as a research paper: [Towards Automatic Skeleton Recognition of Humanoid 3D Character][5]—hopefully, it can help other authors with interoperability. - -And that's just the beginning, the very first thing we need to do to enter a shared virtual world. - -![Free avatars at VRSpace][6] - -(Josip Almasi, [CC BY-SA 4.0][7]) - -### Intellectual property - -What about intellectual property? What about it, you might say, it's all open source! Well, it is. Authors are so kind to let others use their creations. The least users can do is to give them credits. The actual terms of the Creative Commons licenses require users to credit authors explicitly. To that end, I've taken special care to display the author's name in the search results, and the author information is embedded in the metadata section of each glTF file. But even with free stuff that requires additional work, I can't imagine what nightmare it turns into with proprietary content. - -### Non-Fungible Tokens and Blockchain Ledgers - -On second thought, I can imagine that. It requires Non-Fungible Tokens, Blockchain Ledgers, and whatnot. Quick googling _Metaverse Blockchain_ offers me _excellent buy opportunities_ and advises the _best buy options_. Well, I'm not buying. Mark my words: Folks trying to sell cryptos aren't going to build the metaverse. - -That's not to say that blockchain can't be helpful here, as even with free content, you have to keep track of authors. With hundreds of thousands of free models, this has to be automated somehow, and distributed ledger may be just the right solution. - -Then again, digital content providers like Sketchfab do not provide only free models, they sell content. That's how they make a living, after all. Technically speaking, all you need to do to use this proprietary content in your virtual worlds is change one _true_ to _false_ in the code—literally. But once you download it, nobody can prevent you from sharing it. Yet, legally, the license forbids you to do so. Non-Fungible Tokens can prove ownership, be bought, sold, but can't enforce copyright. Content providers will figure it out eventually, but it's not them I'm worried about. This has practical implications for ordinary users, related to one specific question I have been asked repeatedly: Can I make/buy my own avatar that will be only mine and can't get used by anybody else? Well, you can, but technology can't prevent anybody from copying it. Just like I can copy your avatar picture from, say, LinkedIn, and use it as my picture on, say, Facebook. But think of it this way: Why would anyone want to do that? - -Funny though, I've had one commercial implementation of VRSpace: A 3D multi-user video and audio streaming website powered by free software, serving proprietary content. Behind the locked door, pay to enter—as simple as that. And it doesn't get in the way of building the metaverse. Yet everyone has their own unique avatars that can't be used by anybody else ever: Video avatars. - -![Author's video avatar in VRSpace][8] - -(Josip Almasi, [CC BY-SA 4.0][7]) - -You want to be you and nobody else. Just click on the video button, as simple as that. Of course, the browser will prompt for your permission to stream your video and audio. This feature is so widely used in daily life that we don't really associate it with metaverse, and the cyberpunk authors did not envision it. In time, this _me being me_ approach will evolve into motion tracking and video stream mapping onto our 3D avatars, but it will remain in the domain of expensive movies and video games for a while. - -By now, you have glanced at all the features of the VRSpace server, except Oauth2 authentication. You know how it works anyway. A website redirects you to another one of your choosing, where you log in and then get back authenticated. This is all of the above in a simplified diagram: - -![VR components diagram][9] - -(Josip Almasi, [CC BY-SA 4.0][7]) - -### Live demo - -A live demo is available at [VRSpace][10][.org][10] at all times, running the latest code, and you are welcome to try it any time. It's completely anonymous, without ads and trackers of any kind. Try building your world in VRCraft world, but know that everything you do will disappear once you disconnect—the price of running an anonymous service open to the public. The home page provides all the relevant information, just follow the links, or join the project on [GitHub][11], [YouTube][12], or [Facebook][13]. - -Big thanks to early adopters for their help in bringing the project to this stage—all the authors for their free models, Sketchfab for providing access, and the Babylon.js community that makes it all just work across platforms. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/open-source-metaverse - -作者:[Josip Almasi][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jalmasi -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/innovation_virtual_gadgets_device_drone.png?itok=JTAgRb-1 (new techie gadgets representing innovation) -[2]: https://www.matthewball.vc/all/themetaverse -[3]: https://opensource.com/article/20/12/virtual-reality-server -[4]: https://sketchfab.com/ -[5]: https://www.researchgate.net/publication/356987355_TOWARDS_AUTOMATIC_SKELETON_RECOGNITION_OF_HUMANOID_3D_CHARACTER -[6]: https://opensource.com/sites/default/files/uploads/free-avatars-at-vrspace.png (Free avatars at VRSpace) -[7]: https://creativecommons.org/licenses/by-sa/4.0/ -[8]: https://opensource.com/sites/default/files/uploads/author-in-vrspace.png (Author's video avatar in VRSpace) -[9]: https://opensource.com/sites/default/files/uploads/vr-components-diagram.png (VR components diagram) -[10]: https://www.vrspace.org/ -[11]: https://github.com/jalmasi/vrspace -[12]: https://www.youtube.com/channel/UCLdSg22i9MZ3u7ityj_PBxw -[13]: https://www.facebook.com/vrspace.org diff --git a/translated/talk/20220112 How to build an open source metaverse.md b/translated/talk/20220112 How to build an open source metaverse.md new file mode 100644 index 0000000000..48cf3adb07 --- /dev/null +++ b/translated/talk/20220112 How to build an open source metaverse.md @@ -0,0 +1,112 @@ +[#]: subject: "How to build an open source metaverse" +[#]: via: "https://opensource.com/article/22/1/open-source-metaverse" +[#]: author: "Josip Almasi https://opensource.com/users/jalmasi" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +如何建立一个开源的元宇宙 +====== + +> 开源世界是建立元宇宙的首选之地。 + +![代表创新的新科技小玩意][1] + +如果我告诉你,构建元宇宙所需要的所有内容和软件都已经有了,而且完全免费,你会去构建吗? + +先别急,让我们退一步来解释一下元宇宙。 + +### 什么是元宇宙? + +20 世纪的赛博朋克作家,如 Gibson 和 Stephenson,都曾想象过由虚拟现实支持的互联网,在 Stephenson 的小说《雪崩Snow Crash》中,他将其称之为元宇宙Metaverse。随着虚拟现实virtual reality(VR)设备和应用程序的日益普及,尤其是在马克•扎克伯格宣布将雇佣 1 万人来打造它,并将 Facebook 的公司名称改为 Meta 之后,元宇宙正在成为一个热门词汇。Matthew Ball 对该话题进行了 [认真分析][2],并以“共同构建”作为结论:“事实上,最有可能的是,元宇宙是来自不同的平台、机构和技术的网络中,它们协同配合(无论多么不情愿),并拥抱互操作性。” + +互操作性,这个词本身含蓄而清楚地指出了开源和开放标准在其中的作用。 + +因此,简而言之,它就是支持 VR 的互联网。 + +### 如何建立一个开源的元宇宙? + +就像互联网上的网络服务器一样,你需要 VR 服务器。不过不用担心,我写了一个,而且 [介绍它的文章][3] 大约一年前就发表在这里了。当然,你需要支持 VR 的网络浏览器,但网络浏览器已经支持视频/音频流(WebRTC)以及 VR 和 AR(WebXR)。此外,你还需要大量 3D 内容,最好是开源标准的 glTF 格式。幸运的是,[Sketchfab][4] 拥有 50 万个以上的免费 3D 模型,由大量的作者在知识共享许可Creative Commons licenses下发布。Sketchfab 并不是唯一一家这样做的公司,但他们提供了 REST API 来搜索和下载这些模型。 + +### 别忘了键盘 + +在 VR 中已经待了一段时间了,我可以用亲身体验告诉你我最怀念的是什么:键盘!我在键盘上写代码,但当我戴上 VR 眼镜时,它就消失了。你可以想象,摘下和戴上 VR 设备是多么的混乱。不仅如此,我还需要在 VR 中看到我的代码。那么为什么要止步于此呢?为什么我在 VR 中看不到每一个应用程序呢?许多人都在使用两个或更多的显示器。在 VR 中,你可以随处布置窗口。这比多少个屏幕都要好。而一旦到了这一步,你就可以真正地谈论元宇宙了。 + +说实话,VR 设备仍处于起步阶段,它无疑还缺少许多功能。但是,VR 设备将得到改善,并最终包括键盘、更好的摄像头以及在现实中叠加虚拟的能力。在此期间,我们将继续戴上和摘下护目镜,以其他方式处理其他障碍。 + +### 那么我还等什么呢? + +你不需要等待。无论是爱好者还是公司,都正在努力。而且你现在就可以开始在网络上建立你的虚拟世界。下面的视频解释了如何使用现有的免费模型来制作虚拟世界。 + +![VIDEO](https://youtu.be/d0v8IPCt4Mc) + +在底层,VRSpace 网络客户端使用一个开源的 JavaScript WebGL 库 Babylon.js 来加载 glTF 内容并使用 WebGL 渲染。它调用 Sketchfab REST API 的搜索功能(服务器所有者必须在那里有一个账户)。点击了一个模型,它就会让 VRSpace 服务器获取它。服务器下载它(仅当它之前没有下载的情况下),并将其交付给客户端。空间中发生的一切都会被广播(实际上是通过 WebSockets 进行多播)给所有连接的用户,所以他们都会看到同样的移动和物体大小的调整。当然,他们可以通过文本信息或语音进行聊天。通过点击右下角的 VR 眼镜按钮,用户可以立即进入 VR。用户还可以共享屏幕,尽管不在此空间中。 + +![](https://youtu.be/xB6XTnEMQzo) + +而这一切都只使用现有的标准网络技术和免费的软件和内容。它不仅适用于 PC 和 VR 设备,也适用于移动设备。然而,移动版 Chrome 浏览器并没有启用 VR 功能。它在第一次尝试进入 VR 时会提示下载谷歌 VR。 + +由于它是开放的,这在目前来说是可互操作的。但对于元宇宙(支持 VR 的互联网)所需的大规模来说,它的互操作性还远远不够。以头像为例。我在 LinkedIn、Facebook 以及 Opensource.com 上使用相同的图片作为我的头像。我怎么能把我的 3D 头像上传到 VRSpace 或其他地方呢? + +好吧,我不能。上传本身并不是一个问题。当然,文件格式(glTF)也不是问题。问题出现在头像结构上,因为它没有标准化。所以,比如说,不同的人物有不同的骨头数量。然后,本应是微不足道的必备功能,如用虚拟手拿东西,却变得极其复杂。我已经分析了 100 多个免费的角色,并将我的发现作为研究论文发表:《[迈向人形 3D 角色的自动骨架识别][5]》,希望它能帮助其他作者实现互操作性。 + +而这只是一个开始,是我们进入一个共享的虚拟世界需要做的第一件事。 + +![VRSpace 的免费头像][6] + +### 知识产权 + +知识产权呢?你可能会说,这都是开源的!嗯,确实如此。作者们是如此善良,让别人使用他们的创作。用户至少可以做的是给他们点赞。知识共享许可的实际条款要求用户明确归功于作者。为此,我特别注意在搜索结果中显示作者的名字,而且作者信息被嵌入每个 glTF 文件的元数据部分。但是,即使是需要额外的工作的免费东西,我无法想象它变成专有内容会多么可怕。 + +### NFT和区块链 + +转念一想,我可以想象到。它需要 NFT、区块链,以及其他什么东西。快速搜索“元宇宙 区块链”为我提供了 _极好的购买机会_,并建议了 _最好的购买方案_。好吧,我不买。记住我的话。试图出售加密货币的人是不会建立元宇宙的。 + +这并不是说区块链在这里没有用,因为即使是免费的内容,你也必须对作者进行追踪。面对成千上万的免费模型,这必须以某种方式自动化,而分布式账本可能正是正确的解决方案。 + +话说回来,像 Sketchfab 这样的数字内容提供商并不只提供免费模型,他们还出售内容。毕竟,这就是他们谋生的方式。从技术上讲,在你的虚拟世界中使用这些专有内容,你需要做的就是把代码中的一个 `true` 改为 `false`,字面上的。但是,一旦你下载了它,没有人可以阻止你分享它。然而,在法律上,许可证禁止你这样做。NFT 可以证明所有权,可以购买,可以出售,但不能执行版权。内容提供商最终会明白这一点,但我担心的不是他们。这对普通用户有实际影响,与我反复被问到的一个具体问题有关。我可以自己制作或购买我自己的头像,而且只能是我的,不能被其他人使用吗?但技术不能阻止任何人复制它。就像我可以从 LinkedIn 复制你的头像图片,并将其作为我在 Facebook 上的图片。但你想想,为什么会有人想这么做? + +有趣的是,我已经有一个 VRSpace 的商业实现。一个由自由软件驱动的 3D 多用户视频和音频流媒体网站,提供专有内容。在上锁的门后,付费进入 —— 就这么简单。而且它不妨碍建立元宇宙。然而,每个人都有自己独特的头像,永远不能被其他人使用。视频头像: + +![作者在 VRSpace 的视频头像][8] + +你想成为你自己,而不是其他人。只要点击视频按钮,就这么简单。当然,浏览器会提示你是否允许流式传输你的视频和音频。这个功能在日常生活中被广泛使用,以至于我们并没有把它和元宇宙联系起来,赛博朋克的作者们也没有设想到这一点。随着时间的推移,这种 _我就是我_ 的方法将发展为运动跟踪和视频流映射到我们的 3D 头像上,但它仍将在昂贵的电影和视频游戏领域停留一段时间。 + +现在,你已经瞥见了 VRSpace 服务器的所有功能,除了 Oauth2 认证。反正你知道它是如何工作的。一个网站将你重定向到你选择的另一个网站,你在那里登录,然后被认证回来。这就是上述所有的简化图。 + +![VR 组件图][9] + +### 现场演示 + +在 [VRSpace.org][10] 上有一个现场演示,一直在运行最新的代码,欢迎你在任何时候尝试。它是完全匿名访问的,没有任何形式的广告和跟踪器。试着在 VRCraft 世界中建立你的世界,但要知道,一旦你断开连接,你所做的一切都会消失 —— 这是运行一个向公众开放的匿名服务的代价。主页提供了所有的相关信息,只要访问该链接即可,或者在 [GitHub][11]、[YouTube][12] 或[Facebook][13] 上加入该项目。 + +非常感谢早期采用者的帮助,使项目达到这个阶段 —— 所有作者的免费模型、Sketchfab 提供的访问,以及 Babylon.js 社区,使这一切都能跨平台运作。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/open-source-metaverse + +作者:[Josip Almasi][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jalmasi +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/innovation_virtual_gadgets_device_drone.png?itok=JTAgRb-1 (new techie gadgets representing innovation) +[2]: https://www.matthewball.vc/all/themetaverse +[3]: https://opensource.com/article/20/12/virtual-reality-server +[4]: https://sketchfab.com/ +[5]: https://www.researchgate.net/publication/356987355_TOWARDS_AUTOMATIC_SKELETON_RECOGNITION_OF_HUMANOID_3D_CHARACTER +[6]: https://opensource.com/sites/default/files/uploads/free-avatars-at-vrspace.png (Free avatars at VRSpace) +[7]: https://creativecommons.org/licenses/by-sa/4.0/ +[8]: https://opensource.com/sites/default/files/uploads/author-in-vrspace.png (Author's video avatar in VRSpace) +[9]: https://opensource.com/sites/default/files/uploads/vr-components-diagram.png (VR components diagram) +[10]: https://www.vrspace.org/ +[11]: https://github.com/jalmasi/vrspace +[12]: https://www.youtube.com/channel/UCLdSg22i9MZ3u7ityj_PBxw +[13]: https://www.facebook.com/vrspace.org From 0c1de01faa888060e2dbc2df2963dc923adf15a4 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 27 Jan 2022 12:42:49 +0800 Subject: [PATCH 116/334] PUB @wxy https://linux.cn/article-14218-1.html --- .../20220112 How to build an open source metaverse.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/talk => published}/20220112 How to build an open source metaverse.md (98%) diff --git a/translated/talk/20220112 How to build an open source metaverse.md b/published/20220112 How to build an open source metaverse.md similarity index 98% rename from translated/talk/20220112 How to build an open source metaverse.md rename to published/20220112 How to build an open source metaverse.md index 48cf3adb07..42612e66d5 100644 --- a/translated/talk/20220112 How to build an open source metaverse.md +++ b/published/20220112 How to build an open source metaverse.md @@ -4,15 +4,15 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14218-1.html" 如何建立一个开源的元宇宙 ====== > 开源世界是建立元宇宙的首选之地。 -![代表创新的新科技小玩意][1] +![](https://img.linux.net.cn/data/attachment/album/202201/27/123936o0fcmdfb0d88p0zy.jpg) 如果我告诉你,构建元宇宙所需要的所有内容和软件都已经有了,而且完全免费,你会去构建吗? From fc855f8e4a24b98930573baa73c9266073eecd29 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 28 Jan 2022 08:23:19 +0800 Subject: [PATCH 117/334] A --- ...Source Add-Ons to Improve Your Mozilla Firefox Experience.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md b/sources/tech/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md index 385bc1f8e1..3ccfb892d2 100644 --- a/sources/tech/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md +++ b/sources/tech/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/best-firefox-add-ons/" [#]: author: "Ankush Das https://itsfoss.com/author/ankush/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 7a9a658560168760abc0b7598c0003313bc4a09b Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 28 Jan 2022 08:55:28 +0800 Subject: [PATCH 118/334] translating --- ...able speech to text in your application.md | 142 ------------------ ...able speech to text in your application.md | 141 +++++++++++++++++ 2 files changed, 141 insertions(+), 142 deletions(-) delete mode 100644 sources/tech/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md create mode 100644 translated/tech/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md diff --git a/sources/tech/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md b/sources/tech/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md deleted file mode 100644 index 22c0f22bea..0000000000 --- a/sources/tech/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md +++ /dev/null @@ -1,142 +0,0 @@ -[#]: subject: "Use Mozilla DeepSpeech to enable speech to text in your application" -[#]: via: "https://opensource.com/article/22/1/voice-text-mozilla-deepspeech" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Use Mozilla DeepSpeech to enable speech to text in your application -====== -Speech recognition in applications isn't just a fun trick but an -important accessibility feature. -![Colorful sound wave graph][1] - -One of the primary functions of computers is to parse data. Some data is easier to parse than other data, and voice input continues to be a work in progress. There have been many improvements in the area in recent years, though, and one of them is in the form of DeepSpeech, a project by Mozilla, the foundation that maintains the Firefox web browser. DeepSpeech is a voice-to-text command and library, making it useful for users who need to transform voice input into text and developers who want to provide voice input for their applications. - -### Install DeepSpeech - -DeepSpeech is open source, released under the Mozilla Public License (MPL). You can download the source code from its [GitHub][2] page. - -To install, first create a virtual environment for Python: - - -``` -`$ python3 -m pip install deepspeech --user` -``` - -DeepSpeech relies on machine learning. You can train it yourself, but it's easiest just to download pre-trained model files when you're just starting. - - -``` - - -$ mkdir DeepSpeech -$ cd Deepspeech -$ curl -LO \ - -$ curl -LO \ - - -``` - -### Applications for users - -With DeepSpeech, you can transcribe recordings of speech to written text. You get the best results from speech cleanly recorded under optimal conditions. However, in a pinch, you can try any recording, and you'll probably get something you can use as a starting point for manual transcription. - -For test purposes, you might record an audio file containing the simple phrase, "This is a test. Hello world, this is a test." Save the audio as a `.wav` file called `hello-test.wav`. - -In your DeepSpeech folder, launch a transcription by providing the model file, the scorer file, and your audio: - - -``` - - -$ deepspeech --model deepspeech*pbmm \ -\--scorer deepspeech*scorer \ -\--audio hello-test.wav - -``` - -Output is provided to the standard out (your terminal): - - -``` -`this is a test hello world this is a test` -``` - -You can get output in JSON format by using the `--json` option: - - -``` - - -$ deepspeech --model deepspeech*pbmm \ -\-- json -\--scorer deepspeech*scorer \ -\--audio hello-test.wav - -``` - -This renders each word along with a timestamp: - - -``` - - -{ -  "transcripts": [ -    { -      "confidence": -42.7990608215332, -      "words": [ -        { -          "word": "this", -          "start_time": 2.54, -          "duration": 0.12 -        }, -        { -          "word": "is", -          "start_time": 2.74, -          "duration": 0.1 -        }, -        { -          "word": "a", -          "start_time": 2.94, -          "duration": 0.04 -        }, -        { -          "word": "test", -          "start_time": 3.06, -          "duration": 0.74 -        }, -[...] - -``` - -### Developers - -DeepSpeech isn't just a command to transcribe pre-recorded audio. You can also use it to process audio streams in real time. The GitHub repository [DeepSpeech-examples][3] is full of JavaScript, Python, C#, and Java for Android. - -Most of the hard work is already done, so integrating DeepSpeech usually is just a matter of referencing the DeepSpeech library and knowing how to obtain the audio from the host device (which you generally do through the `/dev` filesystem on Linux or an SDK on Android and other platforms.) - -### Speech recognition - -As a developer, enabling speech recognition for your application isn't just a fun trick but an important accessibility feature that makes your application easier to use by people with mobility issues, low vision, and chronic multi-taskers who like to keep their hands full. As a user, DeepSpeech is a useful transcription tool that can convert audio files into text. Regardless of your use case, try DeepSpeech and see what it can do for you. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/voice-text-mozilla-deepspeech - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/colorful_sound_wave.png?itok=jlUJG0bM (Colorful sound wave graph) -[2]: https://github.com/mozilla/DeepSpeech -[3]: https://github.com/mozilla/DeepSpeech-examples diff --git a/translated/tech/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md b/translated/tech/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md new file mode 100644 index 0000000000..c3deaf2242 --- /dev/null +++ b/translated/tech/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md @@ -0,0 +1,141 @@ +[#]: subject: "Use Mozilla DeepSpeech to enable speech to text in your application" +[#]: via: "https://opensource.com/article/22/1/voice-text-mozilla-deepspeech" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +使用 Mozilla DeepSpeech 在你的应用中实现语音转文字 +====== +应用中的语音识别不仅仅是一个有趣的技巧,而且是一个重要的无障碍功能。 +![Colorful sound wave graph][1] + +计算机的主要功能之一是解析数据。有些数据比其他数据更容易解析,而语音输入仍然是一项进展中的工作。不过,近年来该领域已经有了许多改进,其中之一就是 DeepSpeech,这是 Mozilla 的一个项目,Mozilla 是维护 Firefox 浏览器的基金会。DeepSpeech 是一个语音到文本的命令和库,使其对需要将语音输入转化为文本的用户和希望为其应用提供语音输入的开发者都很有用。 + +### 安装 DeepSpeech + +DeepSpeech 是开源的,使用 Mozilla 公共许可证(MPL)发布。你可以从其 [GitHub][2] 页面下载源码。 + +要安装,首先为 Python 创建一个虚拟环境: + + +``` +`$ python3 -m pip install deepspeech --user` +``` + +DeepSpeech 依靠的是机器学习。你可以自己训练它,但最简单的是在刚开始时下载预训练的模型文件。 + + +``` + + +$ mkdir DeepSpeech +$ cd Deepspeech +$ curl -LO \ + +$ curl -LO \ + + +``` + +### 用户的应用 + +通过 DeepSpeech,你可以将语音的录音转录成书面文字。你可以从在最佳条件下干净录制的语音中得到最好的结果。然而,在紧要关头,你可以尝试任何录音,你可能会得到一些你需要手动转录的东西。 + +为了测试,你可以录制一个包含简单短语的音频文件:“This is a test. Hello world, this is a test”。将音频保存为一个 `.wav` 文件,名为 `hello-test.wav`。 + +在你的 DeepSpeech 文件夹中,通过提供模型文件、评分器文件和你的音频启动一个转录: + + +``` + + +$ deepspeech --model deepspeech*pbmm \ +\--scorer deepspeech*scorer \ +\--audio hello-test.wav + +``` + +输出到标准输出(你的终端): + + +``` +`this is a test hello world this is a test` +``` + +你可以通过使用 `--json` 选项获得 JSON 格式的输出: + + +``` + + +$ deepspeech --model deepspeech*pbmm \ +\-- json +\--scorer deepspeech*scorer \ +\--audio hello-test.wav + +``` + +这就把每个词和时间戳一起渲染出来: + + +``` + + +{ + "transcripts": [ + { + "confidence": -42.7990608215332, + "words": [ + { + "word": "this", + "start_time": 2.54, + "duration": 0.12 + }, + { + "word": "is", + "start_time": 2.74, + "duration": 0.1 + }, + { + "word": "a", + "start_time": 2.94, + "duration": 0.04 + }, + { + "word": "test", + "start_time": 3.06, + "duration": 0.74 + }, +[...] + +``` + +### 开发者 + +DeepSpeech 不仅仅是一个转录预先录制的音频的命令。你也可以用它来实时处理音频流。GitHub 仓库 [DeepSpeech-examples][3] 中充满了 JavaScript、Python、C# 和 Android 的 Java 代码。 + +大部分困难的工作已经完成,所以集成 DeepSpeech 通常只是引用 DeepSpeech 库,并知道如何从主机设备上获得音频(你通常通过 Linux 上的 `/dev` 文件系统或 Android 和其他平台上的 SDK 来完成。) + +### 语音识别 + +作为一个开发者,为你的应用启用语音识别不只是一个有趣的技巧,而是一个重要的无障碍功能,它使你的应用更容易被有行动问题的人、低视力的人和长期多任务处理的人使用。作为用户,DeepSpeech 是一个有用的转录工具,可以将音频文件转换为文本。无论你的使用情况如何,请尝试 DeepSpeech,看看它能为你做什么。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/voice-text-mozilla-deepspeech + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/colorful_sound_wave.png?itok=jlUJG0bM (Colorful sound wave graph) +[2]: https://github.com/mozilla/DeepSpeech +[3]: https://github.com/mozilla/DeepSpeech-examples From 9346235932ae23c36b6efd3b57c2bc85410a4600 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 28 Jan 2022 09:01:19 +0800 Subject: [PATCH 119/334] translating --- sources/tech/20220123 How I use Linux accessibility settings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220123 How I use Linux accessibility settings.md b/sources/tech/20220123 How I use Linux accessibility settings.md index b7ad529d9d..29f6570cc3 100644 --- a/sources/tech/20220123 How I use Linux accessibility settings.md +++ b/sources/tech/20220123 How I use Linux accessibility settings.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/1/linux-accessibility-settings" [#]: author: "Don Watkins https://opensource.com/users/don-watkins" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From b6476bbc3a46621af1306d95be5b05f6c9048914 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 28 Jan 2022 13:23:14 +0800 Subject: [PATCH 120/334] RP @geekpi https://linux.cn/article-14221-1.html --- ...- An Open-Source Alternative to Discord.md | 56 +++++++++---------- 1 file changed, 26 insertions(+), 30 deletions(-) rename {translated/tech => published}/20210914 Revolt- An Open-Source Alternative to Discord.md (67%) diff --git a/translated/tech/20210914 Revolt- An Open-Source Alternative to Discord.md b/published/20210914 Revolt- An Open-Source Alternative to Discord.md similarity index 67% rename from translated/tech/20210914 Revolt- An Open-Source Alternative to Discord.md rename to published/20210914 Revolt- An Open-Source Alternative to Discord.md index 68329ac4cd..9cb9491ac7 100644 --- a/translated/tech/20210914 Revolt- An Open-Source Alternative to Discord.md +++ b/published/20210914 Revolt- An Open-Source Alternative to Discord.md @@ -3,14 +3,14 @@ [#]: author: "Ankush Das https://itsfoss.com/author/ankush/" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14221-1.html" Revolt:Discord 的开源替代品 ====== -_**简介**:Revolt 是一个有前途的自由和开源的选择,以取代 Discord。在这里,我们看一下它所提供的东西以及它的初步印象。_ +> Revolt 是一个有前途的自由和开源的 Discord 替代品。在这里,让我们看一下它所提供的东西以及它的初步印象。 Discord 是一个功能丰富的协作平台,主要为游戏玩家量身定做。尽管你可以在 Linux 上毫无问题地使用 Discord,但它仍然是一个专有解决方案。 @@ -18,11 +18,11 @@ Discord 是一个功能丰富的协作平台,主要为游戏玩家量身定做 但是,Revolt 是一个令人印象深刻的 Discord 替代品,它是开源的。 -注意 +> 注意: +> +> Revolt 正处于公开测试阶段,不提供任何移动应用。它可能缺乏一些你在 Discord 上找到的基本功能。 -Revolt 正处于公开测试阶段,不提供任何移动应用。它可能缺乏一些你在 Discord 上找到的基本功能。 - -让我强调一下你可以对 Revolt 的期待,以及它是否可以成为 Linux 上 Discord 的替代品。 +我会重点说一下 Revolt 的功能,以及它是否可以成为 Linux 上 Discord 的替代品。 ### 一个你可以自行托管的开源 Discord 替代品 @@ -30,15 +30,15 @@ Revolt 正处于公开测试阶段,不提供任何移动应用。它可能缺 Revolt 不仅仅是一个简单的开源替代品,而且你还可以自我托管。 -它确实缺少 Discord 提供的各种功能,但你可以获得许多基本功能,以便抢先开始尝试。 +它确实缺少 Discord 提供的各种功能,但你可以获得许多基本功能,可以先体验一下。 -即使没有一些功能,你也可以说它是一个功能丰富的开源客户端。让我们来看看现在的特点。 +即使缺乏一些功能,但它也是一个功能丰富的开源客户端。让我们来看看现有的功能。 -### Revolt 的特点 +### Revolt 的功能 ![][3] -虽然它看起来和感觉已经很像Discord,但这里有一些关键的亮点: +它看起来和感觉已经很像 Discord,这是一些关键的亮点: * 能够创建你自己的服务器 * 创建文字频道和语音频道 @@ -50,34 +50,32 @@ Revolt 不仅仅是一个简单的开源替代品,而且你还可以自我托 * 能够添加机器人 * 易于管理文本/语音频道的权限 * 向其他用户发送朋友请求 - * 保存的笔记部分 + * 保存的笔记 * 能够控制通知 * 支持硬件加速 * 专门的桌面设置 * 使用 Docker 进行自我托管 * 用户状态和自定义状态支持 - - -因此,作为处于公开测试阶段的东西,它听起来对初学者来说非常好。你已经得到了大部分的核心功能,但你可能想等着看它成为一个成熟的 Discord 替代品。 +因此,作为处于公开测试阶段的东西,它听起来对初学者来说非常好。你已经拥有了大部分的核心功能,但你可能想等着看它成为一个成熟的 Discord 替代品。 ### 使用 Revolt 的初步印象 ![][4] -如果你使用过 Discord,用户体验会感觉很熟悉。而这在这里是一件好事。 +如果你使用过 Discord,用户体验会感觉很熟悉。这是一件好事。 -对于这篇快速亮点介绍,我没有比较 Discord 和 Revolt 的资源使用情况,因为它仍然处于测试阶段,不会是一个同类的比较。 +对于这篇快速亮点介绍,我没有比较 Discord 和 Revolt 的资源使用情况,因为它仍然处于测试阶段,不是同等级的比较。 -然而,在我简短的测试中,它感觉很快速,除了你第一次加载一个文本频道的情况。在发表这篇文章时,它没有双因素认证(2FA)功能,但应该是在他们的第一个里程碑(第一版)版本中添加。 +然而,在我简短的测试中,它感觉很快速,除了第一次加载一个文本频道时。在发表这篇文章时,它没有双因素认证(2FA)功能,但应该会在他们的第一个里程碑(第一版)版本中添加。 ![][5] 一些功能如用户状态、权限管理和外观调整看起来很有用。但是,当涉及到语音频道时,它和 Discord 的工作方式不一样,至少现在是这样。 -我不知道他们是否打算用同样的方式,但 Discord 的语音频道功能是直观的,快速的,而且有更好的控制。 +我不知道他们是否打算用同样的方式,但 Discord 的语音频道功能是直观的、快速的,而且有更好的控制。 -不要忘了,Discord 还提供 “Discord Stage”,这是一个类似 Clubhouse 的音频室功能。 +不要忘了,Discord 还提供 “Discord Stage”,这是一个类似 Clubhouse 的音频聊天室功能。 其他一些我找不到的功能包括: @@ -87,25 +85,23 @@ Revolt 不仅仅是一个简单的开源替代品,而且你还可以自我托 * 服务器日志 * 各种有用的机器人 - - 当然,要赶上 Discord 提供的功能还需要大量的时间,但至少我们现在有一个开源的 Discord 解决方案。 -你可以探索他们的[项目路线图/发布跟踪器][6],看看你可以在其最终/未来的版本中期待什么。 +你可以了解他们的 [项目路线图/发布跟踪器][6],看看你可以在其最终/未来的版本中期待什么。 ### 在 Linux 中安装 Revolt Revolt 可用于 Linux 和 Windows。你可以选择在你的网络浏览器上使用它,而不需要一个单独的应用。 -但是,如果你需要在你的桌面上使用它,他们提供了一个 AppImage 文件和一个 deb 包,你可以从它的 [GitHub 发布页][7]下载。 +但是,如果你需要在你的桌面上使用它,他们提供了一个 AppImage 文件和一个 deb 包,你可以从它的 [GitHub 发布页][7] 下载。 -如果你是 Linux 的新手,可以参考我们关于[使用 AppImage 文件][8]和[安装 deb 包][9]的资源来开始学习。 +如果你是 Linux 的新手,可以参考我们关于 [使用 AppImage 文件][8] 和 [安装 deb 包][9] 的资源来开始学习。 -如果你想用你的错误报告和建议来帮助他们改进,请随时前往[反馈页面][10]。此外,你还可以浏览他们的 [GitHub 页面][11]以了解更多信息。 +如果你想用你的错误报告和建议来帮助他们改进,请随时前往 [反馈页面][10]。此外,你还可以浏览他们的 [GitHub 页面][11] 以了解更多信息。 -[Revolt][12] +- [Revolt][12] -你对 Revolt 有什么看法?你认为它有可能成为 Linux 上 Discord 的一个很好的开源替代品吗? +你觉得 Revolt 怎么样?你认为它有可能成为 Linux 上 Discord 的一个很好的开源替代品吗? 请在下面的评论中告诉我你的想法! @@ -116,7 +112,7 @@ via: https://itsfoss.com/revolt/ 作者:[Ankush Das][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 49377adbc9afcb3329f6ee7d81b49472421af933 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 29 Jan 2022 05:02:24 +0800 Subject: [PATCH 121/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220128=20?= =?UTF-8?q?Sharing=20the=20computer=20screen=20in=20Gnome?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220128 Sharing the computer screen in Gnome.md --- ...28 Sharing the computer screen in Gnome.md | 236 ++++++++++++++++++ 1 file changed, 236 insertions(+) create mode 100644 sources/tech/20220128 Sharing the computer screen in Gnome.md diff --git a/sources/tech/20220128 Sharing the computer screen in Gnome.md b/sources/tech/20220128 Sharing the computer screen in Gnome.md new file mode 100644 index 0000000000..ddb8aa7a00 --- /dev/null +++ b/sources/tech/20220128 Sharing the computer screen in Gnome.md @@ -0,0 +1,236 @@ +[#]: subject: "Sharing the computer screen in Gnome" +[#]: via: "https://fedoramagazine.org/sharing-the-computer-screen-in-gnome/" +[#]: author: "Lukáš Růžička https://fedoramagazine.org/author/lruzicka/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Sharing the computer screen in Gnome +====== + +![][1] + +You do not want someone else to be able to monitor or even control your computer and you usually work hard to cut off any such attempts using various security mechanisms. However, sometimes a situation occurs when you desperately need a friend, or an expert, to help you with a computer problem, but they are not at the same location at the same time. How do you show them? Should you take your mobile phone, take pictures of your screen, and send it to them? Should you record a video? Certainly not. You can share your screen with them and possibly let them control your computer remotely for a while. In this article, I will describe how to allow sharing the computer screen in Gnome. + +### Setting up the server to share its screen + +A **server** is a computer that provides (serves) some content that other computers (clients) will consume. In this article the server runs **Fedora Workstation** with the standard **Gnome desktop**. + +#### Switching on Gnome Screen Sharing + +By default, the ability to share the computer screen in Gnome is **off**. In order to use it, you need to switch it on: + + 1. Start **Gnome Control Center**. + + 2. Click on the **Sharing** tab. + +![Sharing switched off][2] + + 3. Switch on sharing with the slider in the upper right corner. + + 4. Click on **Screen sharing**. + +![Sharing switched on][3] + + 5. Switch on screen sharing using the slider in the upper left corner of the window. + + 6. Check the _Allow connections to control the screen_ if you want to be able to control the screen from the client. Leaving this button unchecked will only allow _view-only_ access to the shared screen. + + 7. If you want to manually confirm all incoming connections, select _New connections must ask for access._ + + 8. If you want to allow connections to people who know a password (you will not be notified), select _Require a password_ and fill in the password. The password can only be 8 characters long. + + 9. Check _Show password_ to see what the current password is. For a little more protection, do not use your login password here, but choose a different one. + + 10. If you have more networks available, you can choose on which one the screen will be accessible. + + + + +### Setting up the client to display a remote screen + +A **client** is a computer that connects to a service (or content) provided by a server. This demo will also run **Fedora Workstation** on the client, but the operating system actually should not matter too much, if it runs a decent VNC client. + +#### Check for visibility + +Sharing the computer screen in Gnome between the server and the client requires a working network connection and a visible “route” between them. If you cannot make such a connection, you will not be able to view or control the shared screen of the server anyway and the whole process described here will not work. + +To make sure a connection exists + +Find out the IP address of the server. + +Start **Gnome Control Center**, a.k.a **Settings**. Use the **Menu** in the upper right corner, or the **Activities** mode. When in **Activities**, type + +settings + +and click on the corresponding icon. + +Select the **Network** tab. + +Click on the **Settings button** (cogwheel) to display your network profile’s parameters. + +Open the **Details** tab to see the IP address of your computer. + +Go to **your client’s** terminal (the computer from which you want to connect) and find out if there is a connection between the client and the server using the **ping** command. + +``` + + $ ping -c 5 192.168.122.225 + +``` + +Examine the command’s output. If it is similar to the example below, the connection between the computers exists. + +``` + + PING 192.168.122.225 (192.168.122.225) 56(84) bytes of data. + 64 bytes from 192.168.122.225: icmp_seq=1 ttl=64 time=0.383 ms + 64 bytes from 192.168.122.225: icmp_seq=2 ttl=64 time=0.357 ms + 64 bytes from 192.168.122.225: icmp_seq=3 ttl=64 time=0.322 ms + 64 bytes from 192.168.122.225: icmp_seq=4 ttl=64 time=0.371 ms + 64 bytes from 192.168.122.225: icmp_seq=5 ttl=64 time=0.319 ms + --- 192.168.122.225 ping statistics --- + 5 packets transmitted, 5 received, 0% packet loss, time 4083ms + rtt min/avg/max/mdev = 0.319/0.350/0.383/0.025 ms + +``` + +You will probably experience no problems if both computers live on the same subnet, such as in your home or at the office, but problems might occur, when your server does not have a **public IP address** and cannot be seen from the external Internet. Unless you are the only administrator of your Internet access point, you will probably need to consult about your situation with your administrator or with your ISP. Note, that exposing your computer to the external Internet is always a risky strategy and you **must pay enough attention** to protecting your computer from unwanted access. + +#### Install the VNC client (Remmina) + +**Remmina** is a graphical remote desktop client that can you can use to connect to a remote server using several protocols, such as VNC, Spice, or RDP. **Remmina** is available from the Fedora repositories, so you can installed it with both the **dnf** command or the **Software**, whichever you prefer. With dnf, the following command will install the package and several dependencies. + +``` + + $ sudo dnf install remmina + +``` + +#### Connect to the server + +If there is a connection between the server and the client, make sure the following is true: + + 1. The computer is running. + 2. The Gnome session is running. + 3. The user with screen sharing enabled is logged in. + 4. The session is **not locked**, i.e. the user can work with the session. + + + +Then you can attempt to connect to the session from the client: + + 1. Start **Remmina**. + + 2. Select the **VNC** protocol in the dropdown menu on the left side of the address bar. + + 3. Type the IP address of the server into the address bar and hit **Enter**. + +![Remmina Window][4] + + 4. When the connection starts, another connection window opens. Depending on the server settings, you may need to wait until the server user allows the connection, or you may have to provide the password. + + 5. Type in the password and press **OK**. + +![Remmina Connected to Server][5] + + 6. Press ![Align with resolution button][6] ![][7] to resize the connection window to match the server resolution, or press ![Full Screen Button][8] ![][7] to resize the connection window over your entire desktop. When in fullscreen mode, notice the narrow white bar at the upper edge of the screen. That is the Remmina menu and you can access it by moving the mouse to it when you need to leave the fullscreen mode or change some of the settings. + + + + +When you return back to the server, you will notice that there is now a yellow icon in the upper bar which indicates that you are sharing the computer screen in Gnome. If you no longer wish to share the screen, you can enter the menu and click on **Screen is being shared** and then on select **Turn off** to stop sharing the screen immediately. + +![Turn off menu item][9] + +#### Terminating the screen sharing when session locks. + +By default, the connection **will always terminate** when the session locks. A new connection cannot be established until the session is unlocked. + +On one hand, this sounds logical. If you want to share your screen with someone, you might not want them to use your computer when you are not around. On the other hand, the same approach is not very useful, if you want to control your own computer from a remote location, be it your bed in another room or your mother-in-law’s place. There are two options available to deal with this problem. You can either disable locking the screen entirely or you can use a Gnome extension that supports unlocking the session via the VNC connection. + +##### Disable screen lock + +In order to disable the screen lock: + + 1. Open the **Gnome Control Center**. + 2. Click on the **Privacy** tab. + 3. Select the **Screen Lock** settings. + 4. Switch off **Automatic Screen Lock**. + + + +Now, the session will never lock (unless you lock it manually), so it will be possible to start a VNC connection to it. + +##### Use a Gnome extension to allow unlocking the session remotely. + +If you do not want to switch off locking the screen or you want to have an option to unlock the session remotely even when it is locked, you will need to install an extension that provides this functionality as such behavior is not allowed by default. + +To install the extension: + + 1. Open the **Firefox** browser and point it to [the Gnome extension page][10]. + +![][7]![Gnome Extensions Page][11] + + 2. In the upper part of the page, find an info block that tells you to install _GNOME Shell integration_ for Firefox. + + 3. Install the Firefox extension by clicking on _Click here to install browser extension_. + + 4. After the installation, notice the Gnome logo in the menu part of Firefox. + + 5. Click on the Gnome logo to navigate back to the extension page. + + 6. Search for _allow locked remote desktop_. + + 7. Click on the displayed item to go to the extension’s page. + + 8. Switch the extension **ON** by using the **on/off** button on the right. + +![Extension selected][12] + + + + +Now, it will be possible to start a VNC connection any time. Note, that you will need to know the session password to unlock the session. If your VNC password differs from the session password, your session is still protected _a little_. + +### Conclusion + +This article, described the way to enable sharing the computer screen in Gnome. It mentioned the difference between the limited (_view-only)_ access or not limited (_full)_ access. This solution, however, should in no case be considered a _correct approach_ to enable a remote access for serious tasks, such as administering a production server. Why? + + 1. The server will always keep its **control mode**. Anyone working with the server session will be able to control the mouse and keyboard. + 2. If the session is locked, unlocking it from the client will also unlock it on the server. It will also wake up the display from the stand-by mode. Anybody who can see your server screen will be able to watch what you are doing at the moment. + 3. The VNC protocol _per se_ is not encrypted or protected so anything you send over this can be compromised. + + + +There are several ways, you can set up a protected VNC connection. You could tunnel it via the SSH protocol for better security, for example. However, these are beyond the scope of this article. + +**Disclaimer**: The above workflow worked without problems on Fedora 35 using several virtual machines. If it does not work for you, then you might have hit a bug. Please, report it. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/sharing-the-computer-screen-in-gnome/ + +作者:[Lukáš Růžička][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/lruzicka/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2022/01/sharing_screen-816x345.jpg +[2]: https://fedoramagazine.org/wp-content/uploads/2022/01/settings_sharing_off.png +[3]: https://fedoramagazine.org/wp-content/uploads/2022/01/settings_sharing_on.png +[4]: https://fedoramagazine.org/wp-content/uploads/2022/01/remmina.png +[5]: https://fedoramagazine.org/wp-content/uploads/2022/01/remmina_connected_client.png +[6]: https://fedoramagazine.org/wp-content/uploads/2022/01/resolution.png +[7]: tmp.kscCxzbpG9 +[8]: https://fedoramagazine.org/wp-content/uploads/2022/01/full_screen.png +[9]: https://fedoramagazine.org/wp-content/uploads/2022/01/turn_off_connection.png +[10]: https://extensions.gnome.org +[11]: https://fedoramagazine.org/wp-content/uploads/2022/01/extensions.png +[12]: https://fedoramagazine.org/wp-content/uploads/2022/01/switch_on_extension.png From a1c70e6620494a7c17757c39efcae2cb041e5851 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 29 Jan 2022 05:02:50 +0800 Subject: [PATCH 122/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220128=20?= =?UTF-8?q?Software=20Privacy=20Day:=20Use=20Delta=20Chat,=20an=20open=20s?= =?UTF-8?q?ource=20chat=20tool?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md --- ...se Delta Chat, an open source chat tool.md | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 sources/tech/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md diff --git a/sources/tech/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md b/sources/tech/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md new file mode 100644 index 0000000000..3296109948 --- /dev/null +++ b/sources/tech/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md @@ -0,0 +1,97 @@ +[#]: subject: "Software Privacy Day: Use Delta Chat, an open source chat tool" +[#]: via: "https://opensource.com/article/22/1/delta-chat-software-privacy-day" +[#]: author: "Alan Smithee https://opensource.com/users/alansmithee" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Software Privacy Day: Use Delta Chat, an open source chat tool +====== +The best chat application is the one that isn't a chat application. +![Chat via email][1] + +It's Software Privacy Day again, the day meant to encourage users everywhere to spare a thought about where their data actually goes when it's posted on, over, or through the Internet. One of the cottage industries around Internet communication that seems to ebb and flow in popularity is the venerable chat application. People use chat applications for all manner of conversations, and most people don't think about what bots are recording and monitoring what's being said, whether it's to effectively target ads or just to build a profile for future use. This makes chat applications particularly vulnerable to poor privacy practices, but luckily there are several open source, privacy-focused apps out there, including [Signal][2], [Rocket.Chat][3], and [Mattermost][4]. I've run Mattermost and Rocket.Chat, and I use Signal, but the application I'm most excited about is Delta Chat, the chat service that's so hands-off it doesn’t even use chat servers. Instead, Delta Chat uses the most massive and diverse open messaging system you already use yourself. It uses email to send and receive messages through a chat application, and it features end-to-end encryption with [Autocrypt][5]. + +### Install Delta Chat + +Delta Chat uses standard email protocol as its back end, but to you and me as mere users, it appears and acts exactly like a chat application. That means you need to install the open source Delta Chat app. + +On Linux, you can install Delta Chat as a [Flatpak][6] or from your software repository. + +On macOS and Windows, download an installer from [delta.chat/downloads][7]. + +On Android, you can install Delta Chat from the Play Store or the open source [F-droid repository][8]. + +On iOS, install Delta Chat from the App Store. + +Because Delta Chat uses email for message delivery, you can also receive messages to your inbox if you're away from your chat app. Yes, you can use Delta Chat even without having Delta Chat installed! + +### Configure Delta Chat + +When you first launch Delta Chat, you must log in to your email account. This tends to be the hardest part about Delta Chat because it requires you to either know details about your email server or else to create an "app password" in your email provider's security settings. + +If you're running your own server and you have everything configured as the usual defaults (port 993 for incoming IMAP, port 465 for outgoing SMTP, SSL/TLS enabled), then you can probably just type in your email address and your password and continue. + +![Delta Chat login][9] + +(Opensource.com [CC BY-SA 4.0][10]) + +If you're running your own server but you have custom settings, then click the **Advanced** button and enter your settings. You may need to do this if you're using an unusual subdomain to denote your mail server, or a custom port, or a complex login and password configuration. + +If you're using an email provider like Gmail, Fastmail, Yahoo, or similar, then you must create an app password so you can login to your account through Delta Chat instead of a web browser. Many email providers restrict login in order to avoid endless bots and scripts making attempts to brute force their ways into people's accounts, so to your provider, Delta Chat looks a lot like a bot. When you grant Delta Chat special permissions, you're alerting your email provider that lots of short messages from a remote app is expected behavior. + +Each email provider has a different way of providing app passwords, but Fastmail (in my opinion) makes it the easiest: + + 1. Navigate to **Settings** + 2. Click **Passwords & Security** + 3. Next to **Third-party apps**, click the **Add** button + + + +Verify your password, and create a new app password. Use the password you create to login to Delta Chat. + +![Fastmail app password][11] + +(Opensource.com [CC BY-SA 4.0][10]) + +### Chatting with Delta Chat + +Once you've gotten past the hurdle of logging in, the rest is easy. Because Delta Chat just uses email, you can add friends by email address rather than by a chat application username or phone number. You can technically add any email address to Delta Chat. It is, after all, just an email app with a very specific use case. It's polite to tell your friend about Delta Chat, though, rather than expect them to carry out a casual chat with you through their email client. + +The application, whether you're running it on your phone or your computer, looks exactly like you'd expect a chat application to look. You can initiate chats, send messages, and hang out with friends over encrypted text. + +![Delta Chat chat list][12] + +(Image courtesy Delta Chat) + +### Get chatting + +Delta Chat is decentralized, fully encrypted, and relies on a proven infrastructure. Thanks to Delta Chat, you get to choose what servers sit between you and your contacts, and you can communicate in private. There's no complex server to install, no hardware to maintain. It's a simple solution to what seems like a complex problem, and it's open source. There's every reason to try it, especially on Software Privacy Day. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/delta-chat-software-privacy-day + +作者:[Alan Smithee][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/alansmithee +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/email_chat_communication_message.png?itok=LKjiLnQu (Chat via email) +[2]: https://opensource.com/article/21/9/alternatives-zoom#signal +[3]: https://opensource.com/article/22/1/rocketchat-open-source-communications-platform-puts-data-privacy-first +[4]: https://opensource.com/education/16/3/mattermost-open-source-chat +[5]: https://autocrypt.org/ +[6]: https://opensource.com/article/21/11/install-flatpak-linux +[7]: https://delta.chat/en/download +[8]: https://f-droid.org/app/com.b44t.messenger +[9]: https://opensource.com/sites/default/files/delta-chat-log-in_0.jpg (Delta Chat login) +[10]: https://creativecommons.org/licenses/by-sa/4.0/ +[11]: https://opensource.com/sites/default/files/fastmail-app-password.jpg (Fastmail app password) +[12]: https://opensource.com/sites/default/files/delta-chat-google-play-release-chat-list-light.png (Delta Chat chat list) From 00eb6043e3b64d45f5b86a4aaa9c1b8edbf0ee1d Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 29 Jan 2022 10:35:00 +0800 Subject: [PATCH 123/334] translated --- ...our Digital Diary in the Linux Terminal.md | 118 ------------------ ...our Digital Diary in the Linux Terminal.md | 118 ++++++++++++++++++ 2 files changed, 118 insertions(+), 118 deletions(-) delete mode 100644 sources/tech/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md create mode 100644 translated/tech/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md diff --git a/sources/tech/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md b/sources/tech/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md deleted file mode 100644 index ddafbd37b5..0000000000 --- a/sources/tech/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md +++ /dev/null @@ -1,118 +0,0 @@ -[#]: subject: "Jrnl: Your Digital Diary in the Linux Terminal" -[#]: via: "https://itsfoss.com/jrnl/" -[#]: author: "Marco Carmona https://itsfoss.com/author/marco/" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Jrnl: Your Digital Diary in the Linux Terminal -====== - -Imagine this: somebody has broken your heart and what you want is to write your feelings in a journal without distraction. Did you get the idea? No? Neither do I. I am not heartbroken (or maybe I am and I don’t want to tell you). - -But I would still like to show you a wonderful minimalistic open-source, note-taking application to keep journal entries. - -This handy little program is [Jrnl][1] and it lets you create, search and view journal entries right in the terminal. - -Creating new notes with Jrnl is as simple as writing this: - -``` - - jrnl yesterday: I read an amazing article on It’s FOSS. I learn about a minimalist app called Jrnl, I should try it. - -``` - -Looks easy, isn’t it? The keyword yesterday is a trigger here and it saves your note to yesterday’s date. Remember that it’s called Jrnl (journal) for a reason. Its main aim is to keep journal. - -If you like to keep a diary of your thoughts or simply want to try it out, let me share a few details on the installation and its usage. - -### Installing and using Jnrl on your Linux system - -Jrnl can be installed using pipx or Homebrew package managers. - -I used Homebrew for my testing so I’ll list those steps. Get Homebrew first: - -``` - - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - -``` - -![Installing Homebrew on your system][2] - -That’s all! If you need more information, we have a detailed tutorial on [installing Homebrew on Linux][3]. - -Once you have Homebrew package manager installed, use it to install Jrnl: - -``` - - brew install jrnl - -``` - -![Installing Jrnl with Homebrew][4] - -Once you have it installed, just initialize jrnl and start writing your random thoughts. - -Do you remember the first example at the beginning of this article? Let’s take a look at it again! - -``` - - jrnl yesterday: I read an amazing article in It’s FOSS. I learn about a minimalist app called Jrnl, I should try it. - -``` - -![Writing an entry][5] - -In this line, I’m starting the program with the command `jrnl` next to a timestamp, which in this case is `yesterday`. I write a colon `:` to indicate that I will start writing something, and everything contained until a first sentence mark `.?!:` (in this case a period `.`) will be the title. Finally, everything next to this sentence mark will be considered the body of the file. - -Currently, Jnrl has two modes: composing and viewing; the steps before are used to compose an entry but if what you want to view, for example, the entry that was written before, the syntax is also easy, what you only have to type is the next line. - -``` - - jrnl -on yesterday - -``` - -![Viewing an entry][6] - -Think that someone may read your journal and thoughts? You can also encrypt your entries. - -That’s it! Of course, Jrnl has a lot more function, which can easily be found with the next line: - -``` - - jrnl --help - -``` - -You can also refer to the documentation on [its official website][7]. Remember, the documentation is your best friend in an open-source project like this one. Enjoy it! - -### Conclusion - -Of course, Jrnl is not for everyone. Most command line utilities are not. But if you live and breath in the terminal and like to record your thoughts - -Please don’t forget to share with us your personal experience in the comments; or even better, if you want to get this project to many more people you can share this post in various communities and forum. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/jrnl/ - -作者:[Marco Carmona][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/marco/ -[b]: https://github.com/lujun9972 -[1]: https://jrnl.sh/en/stable/ -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing_brew.png?resize=800%2C131&ssl=1 -[3]: https://itsfoss.com/homebrew-linux/ -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/installing_jrnl.png?resize=800%2C490&ssl=1 -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Writing_an_entry.png?resize=800%2C211&ssl=1 -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Viewing_an_entry.png?resize=800%2C159&ssl=1 -[7]: https://jrnl.sh/en/stable/overview/ diff --git a/translated/tech/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md b/translated/tech/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md new file mode 100644 index 0000000000..5e1ec38afb --- /dev/null +++ b/translated/tech/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md @@ -0,0 +1,118 @@ +[#]: subject: "Jrnl: Your Digital Diary in the Linux Terminal" +[#]: via: "https://itsfoss.com/jrnl/" +[#]: author: "Marco Carmona https://itsfoss.com/author/marco/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Jrnl:你在 Linux 终端的数字日记 +====== + +想象一下:有人伤了你的心,而你想要的是心无旁骛地在日记中写下你的感受。你明白这个想法了吗?没有吗?我也不知道。我没有心碎(或者也许我心碎了,但我不想告诉你)。 + +但我还是想向你展示一个奇妙的极简的开源的记事应用来保存日记条目。 + +这个方便的小程序是 [Jrnl][1],它可以让你在终端中直接创建、搜索和查看日记条目。 + +用 Jrnl 创建新的笔记就像下面一样简单: + +``` + + jrnl yesterday: I read an amazing article on It’s FOSS. I learn about a minimalist app called Jrnl, I should try it. + +``` + +看起来很简单,不是吗?关键字 “yesterday” 在这里是一个触发器,它把你的笔记保存到昨天的日期。记住,它被称为 Jrnl(日记)是有原因的。它的主要目的是保存日记。 + +如果你喜欢把你的想法写成日记,或者只是想尝试一下,让我分享一下安装和使用的一些细节。 + +### 在你的 Linux 系统上安装和使用 Jnrl + +Jrnl 可以用 pipx 或 Homebrew 包管理器安装。 + +我在测试中使用了 Homebrew,所以我将列出这些步骤。首先获取 Homebrew: + +``` + + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + +``` + +![Installing Homebrew on your system][2] + +这就好了!如果你需要更多的信息,我们有一个关于[在 Linux 上安装 Homebrew][3] 的详细教程。 + +当你安装了 Homebrew 包管理器后,用它来安装 Jrnl: + +``` + + brew install jrnl + +``` + +![Installing Jrnl with Homebrew][4] + +安装后,只要初始化 jrnl 并开始写你的随机想法。 + +你还记得本文开头的第一个例子吗?让我们再来看看它吧! + +``` + + jrnl yesterday: I read an amazing article in It’s FOSS. I learn about a minimalist app called Jrnl, I should try it. + +``` + +![Writing an entry][5] + +在这一行中,我用命令 `jrnl` 在一个时间戳旁启动程序,在这个例子中是 `yesterday`。我写了一个冒号 `:`,表示我将开始写一些东西,在第一个句子标记 `.?!:`(在这里是句号 `.`)之前包含的所有内容将是标题。最后,这个句号旁边的所有内容将被视为文件的主体。 + +目前,Jnrl 有两种模式:撰写和查看;前面的步骤用于撰写条目,但如果你想查看,例如,之前写过的条目,语法也很简单,你只需输入下一行。 + +``` + + jrnl -on yesterday + +``` + +![Viewing an entry][6] + +认为有人可能会阅读你的日记和想法?你也可以对你的条目进行加密。 + +这就好了! 当然,Jrnl 还有很多功能,你可以通过下面这行轻松找到: + +``` + + jrnl --help + +``` + +你也可以参考[其官方网站][7]上的文档。记住,在这样的一个开源项目中,文档是你最好的朋友。享受它吧! + +### 总结 + +当然,Jrnl 并不适合所有人。大多数命令行工具都不适合。但如果你在终端中生活和呼吸,并喜欢记录你的想法,它就适合你。 + +请不要忘记在评论中与我们分享你的个人经验,或者更好的是,如果你想让更多的人了解这个项目,你可以在各个社区和论坛上分享这个帖子。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/jrnl/ + +作者:[Marco Carmona][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/marco/ +[b]: https://github.com/lujun9972 +[1]: https://jrnl.sh/en/stable/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing_brew.png?resize=800%2C131&ssl=1 +[3]: https://itsfoss.com/homebrew-linux/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/installing_jrnl.png?resize=800%2C490&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Writing_an_entry.png?resize=800%2C211&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Viewing_an_entry.png?resize=800%2C159&ssl=1 +[7]: https://jrnl.sh/en/stable/overview/ \ No newline at end of file From 6eae51572f2af996069668bcdcc4ae8d8ec8c888 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 29 Jan 2022 10:43:58 +0800 Subject: [PATCH 124/334] translating --- .../tech/20220116 Solve Wordle using the Linux command line.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220116 Solve Wordle using the Linux command line.md b/sources/tech/20220116 Solve Wordle using the Linux command line.md index c768ef7994..7fb4e45120 100644 --- a/sources/tech/20220116 Solve Wordle using the Linux command line.md +++ b/sources/tech/20220116 Solve Wordle using the Linux command line.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/1/word-game-linux-command-line" [#]: author: "Jim Hall https://opensource.com/users/jim-hall" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From d43a20b8c6b5dc57dd470ae008dbb782b4418a02 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 29 Jan 2022 17:09:43 +0800 Subject: [PATCH 125/334] TR --- ...Improve Your Mozilla Firefox Experience.md | 209 ------------------ ...Improve Your Mozilla Firefox Experience.md | 192 ++++++++++++++++ 2 files changed, 192 insertions(+), 209 deletions(-) delete mode 100644 sources/tech/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md create mode 100644 translated/tech/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md diff --git a/sources/tech/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md b/sources/tech/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md deleted file mode 100644 index 3ccfb892d2..0000000000 --- a/sources/tech/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md +++ /dev/null @@ -1,209 +0,0 @@ -[#]: subject: "9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience" -[#]: via: "https://itsfoss.com/best-firefox-add-ons/" -[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience -====== - -Mozilla Firefox is easily one of the most popular open-source web browsers among Linux users. - -In fact, it is one of the [best web browsers available for Linux][1]. But, what about its add-ons (or extensions)? - -Considering that you prefer open-source solutions, are you using add-ons for open-source services? What are some of the best open-source Mozilla Firefox add-ons that you can install? - -### Open-Source Mozilla Firefox Extensions You Should Try - -![][2] - -It is important to note that just because it’s Firefox, not every add-on is open-source. - -Furthermore, there are several open-source projects with a Firefox add-on, but with a different license. - -#### 1\. Dark Reader - -![][3] - -Dark Reader is a popular browser extension that lets you turn on the dark mode for websites. The extension simply changes the background and text color to blend in as a dark mode theme. - -By default, it works well with almost every website. However, if you think that a dark mode is unreadable (or doesn’t look good), you can customize the color, contrast, brightness, and grayscale as well. - -You can also choose to enable it on specific websites and have it disabled for the rest. In either case, you can create a list of sites to whitelist/blacklist. - -It is an open-source project that respects users’ privacy. You can explore more about it in its [GitHub page][4] or get the add-on to try it out. - -[Dark Reader][5] - -#### 2\. Bitwarden - -![][6] - -Undoubtedly, one of the [best password managers][7] available out there. - -[Bitwarden][8] is an open-source password manager offering a variety of features. It focuses on providing competitive open-source solutions. - -The password manager add-on available for Mozilla Firefox is no less than any other similar offerings. You get all the essential functionalities starting from generating passwords, managing your vault, along with some advanced options right through the extension. - -In my use case, I don’t find the extension lacking anything at all. And, you should try the add-on if you haven’t already. You can take a look at its [GitHub page][9] to explore more. - -[Bitwarden][10] - -#### 3\. Vimium-FF - -![][11] - -An open-source tool inspired by [Vim keyboard shortcuts][12], originally popular for Chrome, ported to Firefox. - -The add-on is a work in progress for Mozilla Firefox, with no recent activity. However, as an experimental add-on, it still has excellent user reviews. - -This add-on lets you use keyboard shortcuts to improve your browsing experience. For instance, you can set shortcuts to scroll, view source code, enable insert mode, browse the history, check downloads, and more. - -If you are comfortable with keyboard shortcuts, this add-on should be on top of your bucket lists to try if you haven’t. - -You can find its [GitHub page][13] and explore several customized versions (forks) of it as well. - -[Vimium][14] - -#### 4\. uBlock Origin - -![][15] - -If you want to get rid of several dynamic elements in a website to improve the browsing experience, uBlock Origin is a fantastic content blocker for the job. - -For starters, it blocks a wide range of ads, trackers, pop-ups, to make the web page faster to load. It should come in handy if some web pages stutter when it loads up in your browser. - -You can also choose to selectively block/allow JavaScript if a website does not function as it should. It also features filter lists to help you enable aggressive blocking or minimize blocking to balance the web browsing experience without breaking websites. - -Advance features like blocking malicious domains, blocking media bigger than a specific size, should help you stay secure and save internet bandwidth. Explore its [GitHub page][16] for more technical details. - -[uBlock Origin][17] - -#### 5\. LanguageTool - -![][18] - -**Note:** For this list, we try to recommend Firefox add-ons that are totally open-source. But, this is an exception as a non-foss add-on, where the service is originally open-source, but the extension is not. - -[LanguageTool][19] is an open-source grammar and spellchecker that respects your privacy, making it a decent alternative to the likes of Grammarly and others. It is free to use, with an optional premium upgrade for advanced correction features. - -It should be good enough for basic spellcheck and common grammatical mistakes. As I write this, I have LanguageTool Firefox extension active. Not just a privacy-focused, open-source alternative, it works super quickly without impacting your writing experience. - -The server-side is open-source but unfortunately, the add-on is not open-source. They clarified the reason as they do not want competitors to use the add-on and contribute nothing in return (more in their [forum post][20]). - -However, Mozilla gets access to the source code to review with every release, which makes it a recommended add-on to try. You can explore more about the tool on its [official site][21] or its [GitHub page][22]. - -[LanguageTool][23] - -#### 6\. Tabby - -![][24] - -If you want the convenience of managing multiple tabs with different active windows, Tabby should come in handy. - -It simplifies the method of managing several tabs and windows of a browser and also lets you save tabs/windows to use later. When it comes to tab management, Firefox isn’t a champion, so you might want to try this out. - -You can check out its [GitHub page][25] to explore more, or get the add-on below. - -[Tabby][26] - -#### 7\. Emoji - -![][27] - -It isn’t easy to pick or use an emoji using the desktop. With this open-source extension, you get access to several emojis that can be easily copied to the clipboard with a single click. - -The add-on is entirely open-source and also uses some open-source fonts with the add-on. - -You can find more about it on its [GitHub page][28]. - -[Emoji][29] - -#### 8\. DownThemAll - -![][30] - -DownThemAll is a powerful add-on to easily download multiple files/media from a webpage. You can choose to download everything in a single click or customize the ones you want. - -There are some extra options to customize the file name, queue-based downloads, and advanced selection. - -You can explore more about it on its [official website][31] or [GitHub page][32]. - -[DownThemAll][33] - -#### 9\. Tomato Clock - -![][34] - -If you want a Pomodoro functionality in your web browser (like Vivaldi offers out-of-the-box), Tomato Clock is the add-on you need. - -In other words, it lets you set timers to help you break down your work in intervals with short breaks in between. This should help you stay productive without getting overwhelmed with work. - -It is simple to use and also shows you some usage stats to see how well you make use of it. - -You can explore its [GitHub page][35] for technical info or get the extension to start. - -[Tomato Clock][36] - -### Conclusion - -If you are an avid Firefox user, I advise checking out this [helpful list of Firefox keyboard shortcuts][37]. We also have a list of [rather unknown Firefox features][38]. Feel free to check that as well. - -While there are several other useful Firefox add-ons available, I limited the list to the best ones I found myself using. - -What are some of your favorite open-source Firefox add-ons? Let me know in the comments down below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/best-firefox-add-ons/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/best-browsers-ubuntu-linux/ -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/firefox-extensions.png?resize=800%2C450&ssl=1 -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/firefox-dark-reader.png?resize=708%2C608&ssl=1 -[4]: https://github.com/darkreader/darkreader -[5]: https://addons.mozilla.org/en-US/firefox/addon/darkreader/ -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/bitwarden-firefox-extension.png?resize=800%2C500&ssl=1 -[7]: https://itsfoss.com/password-managers-linux/ -[8]: https://itsfoss.com/bitwarden/ -[9]: https://github.com/bitwarden/browser -[10]: https://addons.mozilla.org/en-US/firefox/addon/bitwarden-password-manager/ -[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/vimium-firefox.png?resize=800%2C553&ssl=1 -[12]: https://itsfoss.com/pro-vim-tips/ -[13]: https://github.com/philc/vimium -[14]: https://addons.mozilla.org/en-US/firefox/addon/vimium-ff/ -[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/ublockorigin-firefox.png?resize=647%2C491&ssl=1 -[16]: https://github.com/gorhill/uBlock#ublock-origin -[17]: https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/ -[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/languagetool-firefox.png?resize=710%2C601&ssl=1 -[19]: https://itsfoss.com/languagetool-review/ -[20]: https://forum.languagetool.org/t/about-the-browser-addon-privacy-and-open-source/7505 -[21]: https://languagetool.org -[22]: https://github.com/languagetool-org/languagetool -[23]: https://addons.mozilla.org/firefox/addon/languagetool/ -[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/tabby-firefox.png?resize=800%2C548&ssl=1 -[25]: https://github.com/Bill13579/tabby -[26]: https://addons.mozilla.org/en-US/firefox/addon/tabby-window-tab-manager/ -[27]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/emoji-firefox.png?resize=685%2C508&ssl=1 -[28]: https://github.com/Sav22999/emoji -[29]: https://addons.mozilla.org/en-US/firefox/addon/emoji-sav/ -[30]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/downthemall-firefox.png?resize=643%2C408&ssl=1 -[31]: https://www.downthemall.org -[32]: https://github.com/downthemall/downthemall -[33]: https://addons.mozilla.org/en-US/firefox/addon/downthemall/ -[34]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/tomato-firefox.png?resize=524%2C428&ssl=1 -[35]: https://github.com/samueljun/tomato-clock -[36]: https://addons.mozilla.org/en-US/firefox/addon/tomato-clock/ -[37]: https://itsfoss.com/firefox-keyboard-shortcuts/ -[38]: https://itsfoss.com/firefox-useful-features/ diff --git a/translated/tech/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md b/translated/tech/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md new file mode 100644 index 0000000000..1f7039d65a --- /dev/null +++ b/translated/tech/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md @@ -0,0 +1,192 @@ +[#]: subject: "9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience" +[#]: via: "https://itsfoss.com/best-firefox-add-ons/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +9 个可以改善你的 Firefox 体验的插件 +====== + +Firefox 显然是 Linux 用户中最受欢迎的开源网络浏览器之一。 + +事实上,它是 [可用于 Linux 的最佳网络浏览器][1] 之一。但是,它的附加组件(或扩展组件)如何呢? + +考虑到你更喜欢开源的解决方案,你是否在使用开源服务的附加组件?有哪些你可以安装的最好的开源 Mozilla Firefox 附加组件? + +### 你应该尝试的开源 Firefox 扩展程序 + +![][2] + +需要注意的是,在 Firefox 中并不是每个附加组件都是开源的。 + +此外,有几个开源项目的 Firefox 附加组件采用了不同的许可证。 + +#### 1、Dark Reader + +![][3] + +[Dark Reader][5] 是一个流行的浏览器扩展,让你打开网站的深色模式。该扩展只是简单地改变背景和文本颜色,以融合深色模式主题。 + +在默认情况下,它与几乎所有网站都能很好地配合。然而,如果你认为深色模式无法阅读(或不好看),你也可以自定义颜色、对比度、亮度和灰度。 + +你也可以选择在特定的网站上启用它,而在其他网站上禁用它。在这两种情况下,你都可以创建一个网站白名单/黑名单的列表。 + +它是一个尊重用户隐私的开源项目。你可以在它的 [GitHub 页面][4] 中了解更多关于它的信息,或者安装该附加组件来尝试它。 + +#### 2、Bitwarden + +![][6] + +毋庸置疑,这是现有的 [最佳密码管理器][7] 之一。 + +[Bitwarden][10] 是一个开源的密码管理器,提供各种功能。它专注于提供有竞争力的开源解决方案。 + +这个用于 Mozilla Firefox 的密码管理器插件并不亚于任何其他类似产品。你可以通过该扩展获得所有的基本功能,包括生成密码、管理你的保险库以及一些高级选项。 + +在我的使用场景中,我没有发现这个扩展有任何不足之处。如果你还没有试过,你应该尝试一下这个插件。你可以看看它的 [GitHub页面][9] 来了解更多信息。 + +#### 3、Vimium-FF + +![][11] + +这是一个受 [Vim 键盘快捷键][12] 启发的开源工具,最初出现在 Chrome 浏览器上,后被移植到 Firefox。 + +Mozilla Firefox 上的 [Vimium][14] 附加组件还在开发中,最近没有新版本。然而,作为一个实验性的附加组件,它仍然拥有优秀的用户评价。 + +这个附加组件可以让你使用键盘快捷方式来改善你的浏览体验。例如,你可以设置快捷键来滚动、查看源代码、启用插入模式、浏览历史记录、检查下载等。 + +如果你对键盘快捷键很熟悉,这个附加组件应该是你的菜,尝试一下吧。 + +你可以找到它的 [GitHub 页面][13],也可以试试它的几个定制版本(复刻)。 + +#### 4、uBlock Origin + +![][15] + +如果你想摆脱网站中的那些动来动去的元素,以改善浏览体验,[uBlock Origin][17] 是一个出色的内容拦截器。 + +首先,它能阻止各种广告、跟踪器、弹出式窗口,以使网页的加载速度更快。如果一些网页在你的浏览器中加载时出现卡顿,它应该会派上用场。 + +如果一个网站不能正常运行,你也可以选择选择性地阻止或允许 JavaScript。它还具有过滤列表的功能,帮助你积极地阻断或尽量减少阻断,以平衡网络浏览体验而不破坏网站。 + +诸如阻止恶意域名、阻止大于特定尺寸的媒体等高级功能,能帮助你保持安全并节省网络带宽。查看其 [GitHub页面][16] 以了解更多技术细节。 + +#### 5、LanguageTool + +![][18] + +**注意:** 在这个列表中,我们尽量推荐完全开源的 Firefox 附加组件。但是,这是一个例外,作为一个非 FOSS 附加组件,其服务最初是开源的,但该扩展不是。 + +[LanguageTool][21] 是一个开源的语法和拼写检查器,它尊重你的隐私,使它成为与 Grammarly 和其他同类产品相当的替代品。它可以免费使用,但可以选择升级为高级更正功能。 + +对于基本的拼写检查和常见的语法错误,它应该是足够好的。在我写这篇文章的时候,我的 [LanguageTool][19] 扩展已经激活。这不仅仅是一个注重隐私的开源替代品,它的工作速度超快,不会影响你的写作体验。 + +服务器端是开源的,但不幸的是,该附加组件不是开源的。他们澄清了原因,因为他们不希望竞争对手使用该插件而没有任何回报(更多内容见他们的 [论坛帖子][20])。 + +然而,Mozilla 在它每次发布时都能审查源代码,这使得它成为一个值得推荐的附加组件。你可以在其 [官方网站][21] 或其 [GitHub 页面][22] 上探索关于该工具的更多信息。 + +#### 6、Tabby + +![][24] + +如果你想方便地管理具有不同活动窗口的多个标签,[Tabby][26] 应该会派上用场。 + +它简化了管理一个浏览器的多个标签和窗口的方法,还可以让你保存标签/窗口以便以后使用。说到标签管理,Firefox 并不是最棒的,所以你可能想试试这个。 + +你可以查看它的 [GitHub 页面][25] 或者安装这个附加组件来了解更多。 + +#### 7、Emoji + +![][27] + +在计算机上挑选或使用表情符并不容易。有了这个开源的 [扩展][29],你就只需点击一下就可以轻松地将几个表情符复制到剪贴板。 + +该插件是完全开源的,并且还使用一些开源字体。 + +你可以在其 [GitHub 页面][28] 上找到更多关于它的信息。 + +#### 8、DownThemAll + +![][30] + +[DownThemAll][33] 是一个强大的插件,可以轻松地从一个网页上下载多个文件/媒体。你可以选择一键下载所有文件,或者自定义你想要的文件。 + +还有一些额外的选项可以自定义文件名、基于队列的下载和高级选择。 + +你可以在其 [官方网站][31] 或 [GitHub 页面][32] 上了解它的更多信息。 + + +#### 9、Tomato Clock + +![][34] + +如果你想在你的网络浏览器中实现 Pomodoro 功能(就像 Vivaldi 开箱即用提供的功能),[Tomato Clock][36] 是你需要的插件。 + +换句话说,它可以让你设置定时器,帮助你把工作分成若干个时间段,中间有短暂的休息。这应该有助于你保持生产力,而不会被工作压垮。 + +它使用起来很简单,还能显示一些使用统计,以了解你对它的利用情况。 + +你可以探索它的 [GitHub 页面][35] 了解技术信息,或者获取该扩展来开始。 + +### 总结 + +如果你是一个狂热的 Firefox 用户,我建议你看看这个 [Firefox 键盘快捷键的有用清单][37]。我们也有一个 [Firefox 罕为人知的功能][38] 列表。你也可以去看看。 + +虽然还有其他几个有用的 Firefox 附加组件,但我把这个列表限制在我自己使用的最好的那些。 + +你最喜欢的开源 Firefox 附加组件有哪些?请在下面的评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/best-firefox-add-ons/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-browsers-ubuntu-linux/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/firefox-extensions.png?resize=800%2C450&ssl=1 +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/firefox-dark-reader.png?resize=708%2C608&ssl=1 +[4]: https://github.com/darkreader/darkreader +[5]: https://addons.mozilla.org/en-US/firefox/addon/darkreader/ +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/bitwarden-firefox-extension.png?resize=800%2C500&ssl=1 +[7]: https://itsfoss.com/password-managers-linux/ +[8]: https://itsfoss.com/bitwarden/ +[9]: https://github.com/bitwarden/browser +[10]: https://addons.mozilla.org/en-US/firefox/addon/bitwarden-password-manager/ +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/vimium-firefox.png?resize=800%2C553&ssl=1 +[12]: https://itsfoss.com/pro-vim-tips/ +[13]: https://github.com/philc/vimium +[14]: https://addons.mozilla.org/en-US/firefox/addon/vimium-ff/ +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/ublockorigin-firefox.png?resize=647%2C491&ssl=1 +[16]: https://github.com/gorhill/uBlock#ublock-origin +[17]: https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/ +[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/languagetool-firefox.png?resize=710%2C601&ssl=1 +[19]: https://itsfoss.com/languagetool-review/ +[20]: https://forum.languagetool.org/t/about-the-browser-addon-privacy-and-open-source/7505 +[21]: https://languagetool.org +[22]: https://github.com/languagetool-org/languagetool +[23]: https://addons.mozilla.org/firefox/addon/languagetool/ +[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/tabby-firefox.png?resize=800%2C548&ssl=1 +[25]: https://github.com/Bill13579/tabby +[26]: https://addons.mozilla.org/en-US/firefox/addon/tabby-window-tab-manager/ +[27]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/emoji-firefox.png?resize=685%2C508&ssl=1 +[28]: https://github.com/Sav22999/emoji +[29]: https://addons.mozilla.org/en-US/firefox/addon/emoji-sav/ +[30]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/downthemall-firefox.png?resize=643%2C408&ssl=1 +[31]: https://www.downthemall.org +[32]: https://github.com/downthemall/downthemall +[33]: https://addons.mozilla.org/en-US/firefox/addon/downthemall/ +[34]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/tomato-firefox.png?resize=524%2C428&ssl=1 +[35]: https://github.com/samueljun/tomato-clock +[36]: https://addons.mozilla.org/en-US/firefox/addon/tomato-clock/ +[37]: https://itsfoss.com/firefox-keyboard-shortcuts/ +[38]: https://itsfoss.com/firefox-useful-features/ From 597f893a8bd5080672c9d577e5555a455b228a09 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 29 Jan 2022 17:12:00 +0800 Subject: [PATCH 126/334] P @wxy https://linux.cn/article-14223-1.html --- ...urce Add-Ons to Improve Your Mozilla Firefox Experience.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md (99%) diff --git a/translated/tech/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md b/published/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md similarity index 99% rename from translated/tech/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md rename to published/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md index 1f7039d65a..47c7570ff1 100644 --- a/translated/tech/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md +++ b/published/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14223-1.html" 9 个可以改善你的 Firefox 体验的插件 ====== From 2b3c8cda2bdb8fe0890499b4ae56de7556fedd8e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 29 Jan 2022 18:04:04 +0800 Subject: [PATCH 127/334] RP @geekpi https://linux.cn/article-14224-1.html --- .../20220121 Make a video game with Bitsy.md | 48 ++++++++----------- 1 file changed, 21 insertions(+), 27 deletions(-) rename {translated/tech => published}/20220121 Make a video game with Bitsy.md (58%) diff --git a/translated/tech/20220121 Make a video game with Bitsy.md b/published/20220121 Make a video game with Bitsy.md similarity index 58% rename from translated/tech/20220121 Make a video game with Bitsy.md rename to published/20220121 Make a video game with Bitsy.md index 16588fb296..07a9aafa86 100644 --- a/translated/tech/20220121 Make a video game with Bitsy.md +++ b/published/20220121 Make a video game with Bitsy.md @@ -3,41 +3,39 @@ [#]: author: "Peter Cheer https://opensource.com/users/petercheer" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14224-1.html" -用 Bitsy 制作视频游戏 +用 Bitsy 制作电子游戏 ====== -Bitsy 是一个开源视频游戏设计软件。 其简约的功能使任何人都可以探索他们的创造力。 -![Gaming artifacts with joystick, GameBoy, paddle][1] -有许多游戏设计程序和许多不同的可能的游戏设计方法,但对我来说,最突出的是 Bitsy。Bitsy 由 Adam Le Doux 在 2017 年创建,在 MIT 许可下发布,用其创造者的话说,Bitsy 是:“一个用于小游戏或世界的编辑器。其目标是使制作游戏变得容易,在那里你可以四处走动,与人交谈,并在某个地方。” +> Bitsy 是一个开源电子游戏设计软件。 其简约的功能使任何人都可以探索他们的创造力。 + +![](https://img.linux.net.cn/data/attachment/album/202201/29/180248kkvmou3klq9qkyky.jpg) + +有许多游戏设计程序和各种游戏设计方法,但对我来说,最突出的是 Bitsy。Bitsy 由 Adam Le Doux 在 2017 年创建,在 MIT 许可下发布,用其创造者的话说,Bitsy 是:“一个用于小游戏或世界的编辑器。其目标是使制作游戏变得容易,在那里你可以四处走动,与人交谈,并到某个地方。” ### 安装 Bitsy -Bitsy 是用 JavaScript 编写的,可以制作 HTML5 游戏。你可以从 [GitHub][2] 或[创造者的网站][3]下载它。它很小,很容易学习,有独特的位图艺术风格,故意在功能上有所欠缺,而且能做的事情有限。 +Bitsy 是用 JavaScript 编写的,可以制作 HTML5 游戏。你可以从 [GitHub][2] 或 [它的创造者的网站][3] 下载它。它很小,很容易学习,有独特的位图艺术风格,有意在功能上有所欠缺,而且能做的事情有限。 尽管(也许是因为)这些限制,Bitsy 自发布以来吸引了一个充满活力的用户社区。用户对 Bitsy 采取的两个主要方法是:接受限制和寻求突破限制,看看你能走多远。 ### 创意的界限 -Bitsy 的局限性意味着接受这些局限性并仍能制作出令人满意的游戏,这就成为一个需要创造性和创造力的挑战。你可以在 [Itch.io 网站][4]上看到和玩一些用 Bitsy 制作的令人印象深刻的游戏。同时,人们也想出了一些破解、调整和扩展。这些都在不牺牲 Bitsy 的本质的前提下突破了一些限制。 +Bitsy 的局限性意味着接受这些局限性仍能制作出令人满意的游戏,这就成为一个需要创造性和创造力的挑战。你可以在 [Itch.io 网站][4] 上看到和玩一些用 Bitsy 制作的令人印象深刻的游戏。同时,人们也想出了一些黑科技、调整和扩展。这些都在不牺牲 Bitsy 的本质的前提下突破了一些限制。 -Bitsy 的基本元素是一个代表玩家的头像、发生游戏动作的房间、精灵(可以与之互动的非玩家角色)和物品。有一个位图编辑器用于创建这些元素,它也允许简单的两帧动画。 +Bitsy 的基本元素是一个代表玩家的头像、发生游戏动作的房间、精灵(可以与之互动的非玩家角色)和物品。有一个用于创建这些元素的位图编辑器,它也支持简单的两帧动画。 ![Bitsy bitmap editor][5] -(Peter Cheer, [CC BY-SA 4.0][6]) - 在 Bitsy 中工作依赖于条件变量,而不是成熟的脚本,这使得没有编码背景的人容易学习,但有时会让那些期待更多灵活性的人感到沮丧。 -如果你想了解 Bitsy 的基本情况,你可以在创作者的网站上进行,或者下载并在本地运行。 +如果你想了解 Bitsy 的基本情况,你可以在创作者的网站上了解,或者下载并在本地运行。 ![Bitsy room editor][7] -(Peter Cheer, [CC BY-SA 4.0][6]) - ### 文档 关于 Bitsy 的文档并不是只有一个地方可以去看。如果你想看 Bitsy 的操作,可以在 YouTube 上找到各种短视频。我更喜欢基于文本的教程,我发现最有用的三个资源是: @@ -46,27 +44,23 @@ Bitsy 的基本元素是一个代表玩家的头像、发生游戏动作的房 * [Bitsy workshop PDF][9], 由用户 haraiva 提供 * [Bitsy 变量][10], 教程由用户 ayolland 编写 +阅读这些教程,尝试一些 Bitsy 游戏,并开始创造你自己的东西。开始时要保持简单。当你熟悉了 Bitsy,你可能想研究一下人们为它创造的一些 [工具、黑科技和扩展][11]。 +它也是教育工作者的完美工具,甚至还有教育工作者 Hal Meeks 的 [Bitsy 课程][12] 可供在线学习。 -阅读这些教程,尝试一些 Bitsy 游戏,并开始创造你自己的东西。开始时要保持简单。当你熟悉了 Bitsy,你可能想研究一下人们为它创造的一些[工具、破解和扩展][11]。 - -它也是教育工作者的完美工具,甚至还有教育工作者 Hal Meeks 的 [Bitsy 课程][12]可供在线学习。 - -你还可以在 [Itch.io 网站][13]上找到人们为 Bitsy 制作的大量游戏资源。 +你还可以在 [Itch.io 网站][13] 上找到人们为 Bitsy 制作的大量游戏资源。 ### Twine 整合 -你可能已经尝试过流行的基于浏览器的游戏开发工具 [Twine][14]。你可以通过不同程度的方式将 Bitsy 与 Twine 整合。整合的范围可以从简单地将 Bitsy 游戏放在一个 iframe 中显示在你的 Twine 游戏中,到在两个引擎之间共享变量和对话命令,让你在 Bitsy 游戏中执行基本的 Twine 命令!如果你对这些可能性感兴趣,那么请看: +你可能已经尝试过流行的基于浏览器的游戏开发工具 [Twine][14]。你可以将 Bitsy 与 Twine 不同程度地整合。整合的范围可以从简单地将 Bitsy 游戏放在一个 iframe 中显示在你的 Twine 游戏中,到在两个引擎之间共享变量和对话命令,让你在 Bitsy 游戏中执行基本的 Twine 命令!如果你对这些感兴趣,那么请看: - * [结合 Bitsy 和 Twine 的教程][15] - * [Bitsy 破解][16] + * [结合 Bitsy 和 Twine 的教程][15] + * [Bitsy 黑科技][16] * [Freya 的 Twisty 模板][17] - - ### 给初学者的 Bitsy -初学者可以很容易地开始使用 Bitsy,无论你是编程新手还是仅仅是游戏设计的新手。有了它,你可以探索它在激发创造力、想象力和创造性方面的所有可能性。 +初学者很容易入门 Bitsy,无论你是编程新手还是仅仅是游戏设计的新手。有了它,你可以探索它在激发创造力、想象力和创造性方面的所有可能性。 -------------------------------------------------------------------------------- @@ -75,7 +69,7 @@ via: https://opensource.com/article/22/1/bitsy-game-design 作者:[Peter Cheer][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 7cbc25d98b0912f7d09fd0d3df2734647e72a883 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 30 Jan 2022 05:02:44 +0800 Subject: [PATCH 128/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220129=20?= =?UTF-8?q?Reasons=20for=20servers=20to=20support=20IPv6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220129 Reasons for servers to support IPv6.md --- ...129 Reasons for servers to support IPv6.md | 192 ++++++++++++++++++ 1 file changed, 192 insertions(+) create mode 100644 sources/tech/20220129 Reasons for servers to support IPv6.md diff --git a/sources/tech/20220129 Reasons for servers to support IPv6.md b/sources/tech/20220129 Reasons for servers to support IPv6.md new file mode 100644 index 0000000000..1c43a65c90 --- /dev/null +++ b/sources/tech/20220129 Reasons for servers to support IPv6.md @@ -0,0 +1,192 @@ +[#]: subject: "Reasons for servers to support IPv6" +[#]: via: "https://jvns.ca/blog/2022/01/29/reasons-for-servers-to-support-ipv6/" +[#]: author: "Julia Evans https://jvns.ca/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Reasons for servers to support IPv6 +====== + +I’ve been having a hard time understanding IPv6. On one hand, the basics initially seem pretty straightforward (there aren’t enough IPv4 addresses for all the devices on the internet, so people invented IPv6! There are enough IPv6 addresses for everyone!) + +But when I try to actually understand it, I run into a lot of questions. One question is: `twitter.com` does not support IPv6. Presumably it can’t be causing them THAT many issues to not support it. So why _do_ websites support IPv6? + +I asked people on Twitter [why their servers support IPv6][1] and I got a lot of great answers, which I’ll summarize here. These all come with the disclaimer that I have basically 0 experience with IPv6 so I can’t evaluate these reasons very well. + +First though, I want to explain why it’s possible for `twitter.com` to not support IPv6 because I didn’t understand that initially. + +### how can you tell `twitter.com` doesn’t support IPv6? + +You can tell they don’t support IPv6 is because if you look up their AAAA record (which contains their IPv6 address), there isn’t one. Some other big sites like `github.com` and `stripe.com` also don’t support IPv6. + +``` + + $ dig AAAA twitter.com + (empty response) + $ dig AAAA github.com + (empty response) + $ dig AAAA stripe.com + (empty response) + +``` + +### why does `twitter.com` still work for IPv6 users? + +I found this really confusing, because I’ve always heard that lots of internet users are forced to use IPv6 because we’ve run out of IPv4 addresses. But if that’s true, how could twitter.com continue to work for those people without IPv6 support? Here’s what I learned from the Twitter thread yesterday. + +There are two kinds of internet service providers (ISPs): + + 1. ISPs who own enough IPv4 address for all of their customers + 2. ISPs who don’t + + + +My ISP is in category 1 – my computer gets its own IPv4 address, and actually my ISP doesn’t even support IPv6 at all. + +But lots of ISPs (especially outside of North America) are in category 2: they don’t have enough IPv4 addresses for all their customers. Those ISPs handle the problem by: + + * giving all of their customers a unique IPv6 address, so they can access IPv6 sites directly + * making large groups of their customers _share_ IPv4 addresses. This can either be with CGNAT (”[carrier-grade NAT][2]”) or “464XLAT” or maybe something else. + + + +All ISPs need _some_ IPv4 addresses, otherwise it would be impossible for their customers to access IPv4-only sites like twitter.com. + +### what are the reasons to support IPv6? + +Now we’ve explained why it’s possible to _not_ support IPv6. So why support it? There were a lot of reasons. + +### reason: CGNAT is a bottleneck + +The argument that was most compelling to me was: CGNAT (carrier-grade NAT) is a bottleneck and it causes performance issues, and it’s going to continue to get worse over time as access to IPv4 addresses becomes more and more restricted. + +Someone also mentioned that because CGNAT is a bottleneck, it’s an attractive DDoS target because you can ruin lots of people’s internet experience just by attacking 1 server. + +Servers supporting IPv6 reduces the need for CGNAT (IPv6 users can just connect directly!) which makes the internet work better for everyone. + +I thought this argument was interesting because it’s a “public commons” / community argument – it’s less that supporting IPv6 will make your site specifically work better, and more that if _almost everyone_ supports IPv6 then it’ll make the experience of the internet better for everyone, especially in countries where people don’t have easy access to IPv4 addresses. + +I don’t actually know how much of an issue this is in practice. + +There were lots of more selfish arguments to use IPv6 too though, so let’s get into those. + +### reason: so IPv6-only servers can access your site + +I said before that most IPv6 users still have access to IPv4 though some kind of NAT. But apparently that’s not true for everyone – some people mentioned that they run some servers which only have IPv6 addresses and which aren’t behind any kind of NAT. So those servers are actually totally unable to access IPv4-only sites. + +I imagine that those servers aren’t connecting to arbitrary machines that much – maybe they only need to connect to a few hosts with IPv6 support. + +But it makes sense to me that a machine should be able to access my site even if it doesn’t have an IPv4 address. + +### reason: better performance + +For users who are using both IPv4 and IPv6 (with a dedicated IPv6 address and a shared IPv4 address), apparently IPv6 is often faster because it doesn’t need to go through an extra translation layer. + +So supporting IPv6 can make the site faster for users sometimes. + +In practice clients use an algorithm called “Happy Eyeballs” which tries to figure out whether IPv4 or IPv6 will be faster and then uses whichever seems faster. + +Some other performance benefits people mentioned: + + * maybe sometimes using IPv6 can get you a SEO boost because of the better performance. + * maybe using IPv6 causes you to go through better (faster) network hardware because it’s a newer protocol + + + +### reason: resilience against IPv4 internet outages + +One person said that they’ve run into issues where there was an internet outage that only affected IPv4 traffic, because of accidental BGP poisoining. + +So supporting IPv6 means that their site can still stay partially online during those outages. + +### reason: to avoid NAT issues with home servers + +A few people mentioned that it’s much easier to use IPv6 with home servers – instead of having to do port forwarding through your router, you can just give every server a unique IPv6 address and then access it directly. + +Of course, for this to work the client needs to have IPv6 support, but more and more clients these days have IPv6 support too. + +### reason: to own your IP addresses + +Apparently you can buy IPv6 addresses, use them for the servers on your home network, and then if you change your ISP, continue to use the same IP addresses? + +I’m still not totally sure how this works (I don’t know how you would convince computers on the internet to actually route those IPs to you? I guess you need to run your own AS or something?). + +### reason: to learn about IPv6 + +One person said they work in security and in security it’s very important to understand how internet protocols work (attackers are using internet protocols!). So running an IPv6 server helps them learn how it works. + +### reason: to push IPv6 forward / IPv4 is “legacy” + +A couple of people said that they support IPv6 because it’s the current standard, and so they want to contribute to the success of IPv6 by supporting it. + +A lot of people also said that they support IPv6 because they think sites that only support IPv4 are “behind” or “legacy”. + +### reason: it’s easy + +I got a bunch of answers along the lines of “it’s easy, why not”. Obviously adding IPv6 support is not easy in all situations, but a couple of reasons it might be easy in some cases: + + * you automatically got an IPv6 address from your hosting company, so all you need to do is add an `AAAA` record pointing to that address + * your site is behind a CDN that supports IPv6, so you don’t need to do anything extra + + + +### reason: safer networking experimentation + +Because the address space is so big, if you want to try something out you can just grab an IPv6 subnet, try out some things in it, and then literally never use that subnet again. + +### reason: to run your own autonomous system (AS) + +A few people said they were running their own autonomous system (I talked about what an AS is a bit in this [BGP post][3]). IPv4 addresses are too expensive so they bought IPv6 addresses for their AS instead. + +### reason: security by obscurity + +If your server _only_ has a public IPv6 address, attackers can’t easily find it by scanning the whole internet. The IPv6 address space is too big to scan! + +Obviously this shouldn’t be your only security measure, but it seems like a nice bonus – any time I run an IPv4 public server I’m always a tiny bit surprised by how it’s constantly being scanned for vulnerabilities (like old versions of WordPress, etc). + +### very silly reason: you can put easter eggs in your IPv6 address + +IPv6 addresses have a lot of extra bits in them that you can do frivolous things with. For example one of Facebook’s IPv6 addresses is “2a03:2880:f10e:83:face:b00c:0:25de” (it has `face:b00c` in it). + +### there are more reasons than I thought + +That’s all I’ve learned about the “why support IPv6?” question so far. + +I came away from this conversation more motivated to support IPv6 on my (very small) servers than I had been before. But that’s because I think supporting IPv6 will require very little effort for me. (right now I’m using a CDN that supports IPv6 so it comes basically for free) + +I know very little about IPv6 still but my impression is that IPv6 support often isn’t zero-effort and actually can be a lot of work. For example, I have no idea how much work it would actually be for Twitter to add IPv6 support on their edge servers. + +### some more IPv6 questions + +Here are some more IPv6 questions I have that maybe I’ll explore later: + + * what are the _disadvantages_ to supporting IPv6? what goes wrong? + * what are the incentives for ISPs that own enough IPv4 addresses for their customers to support IPv6? (another way of asking: is it likely that my ISP will move to supporting IPv6 in the next few years? or are they just not incentivized to do it so it’s unlikely?) + * [digital ocean][4] seems to only support IPv4 floating IPs, not IPv6 floating IPs. Why not? Shouldn’t it be _easier_ to give out IPv6 floating IPs since there are more of them? + * when I try to ping an IPv6 address (like example.com’s IP `2606:2800:220:1:248:1893:25c8:1946` for example) I get the error `ping: connect: Network is unreachable`. Why? (answer: it’s because my ISP doesn’t support IPv6 so my computer doesn’t have a public IPv6 address) + + + +This [IPv4 vs IPv6 article from Tailscale][5] looks interesting and answers some of these questions. + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2022/01/29/reasons-for-servers-to-support-ipv6/ + +作者:[Julia Evans][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://twitter.com/b0rk/status/1487156306884636672 +[2]: https://en.wikipedia.org/wiki/Carrier-grade_NAT +[3]: https://jvns.ca/blog/2021/10/05/tools-to-look-at-bgp-routes/ +[4]: https://docs.digitalocean.com/products/networking/floating-ips/ +[5]: https://tailscale.com/kb/1134/ipv6-faq/ From 219251fef9d2e4acef577f2e13b4922a9fe20b39 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 30 Jan 2022 10:47:58 +0800 Subject: [PATCH 129/334] RP @geekpi https://linux.cn/article-14226-1.html --- ...rite Linux commands to use just for fun.md | 85 +++++++++---------- 1 file changed, 42 insertions(+), 43 deletions(-) rename {translated/tech => published}/20220122 Our favorite Linux commands to use just for fun.md (57%) diff --git a/translated/tech/20220122 Our favorite Linux commands to use just for fun.md b/published/20220122 Our favorite Linux commands to use just for fun.md similarity index 57% rename from translated/tech/20220122 Our favorite Linux commands to use just for fun.md rename to published/20220122 Our favorite Linux commands to use just for fun.md index 484c98c5ed..55bd11c388 100644 --- a/translated/tech/20220122 Our favorite Linux commands to use just for fun.md +++ b/published/20220122 Our favorite Linux commands to use just for fun.md @@ -3,34 +3,34 @@ [#]: author: "Opensource.com https://opensource.com/users/admin" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14226-1.html" 我们最喜欢的好玩的 Linux 命令 ====== -Linux 的命令行以生产力强而闻名。它也是一个可以获得一些乐趣的地方! -![woman on laptop sitting at the window][1] -11月,我们分享了一篇文章 [7个好玩的 Linux 命令][2],并请你告诉我们你推荐的“好玩”的 Linux 命令是什么以及为什么? +> Linux 命令行以生产力强而闻名。它也是一个可以获得一些乐趣的地方! -一些Opensource.com的作者在下面分享了他们的最爱。 +![](https://img.linux.net.cn/data/attachment/album/202201/30/104636dwqkzr9wqq4k6w0r.jpg) -* * * +去年 11 月,我们分享了一篇文章《[7 个好玩的 Linux 命令][2]》,并请读者们告诉我们推荐的“好玩”的 Linux 命令是什么,以及为什么? -我的最爱: +一些读者在下面分享了他们的最爱: - * `cowsay`, 当然! - * `fortune`,我最喜欢的 “hack” 是让用户连接时的 `motd` 成为一个幽默的财富。 - * `sl`, 在你的终端上有一个蒸汽机车。 - * `xsnow`, 另一个 XWindow hack,这个命令在你的工作空间上进行轻松的降雪,并在打开的窗口上方积聚。 - * GNOME 复活节彩蛋,在 GNOME 2 中,按下 **Alt+F2**(打开运行对话框)并输入 “free the fish”,就可以在你的根窗口中释放 “Wanda the Fish”。如果你点击 Wanda,它就会四处游荡,窜来窜去(一段时间)。 +--- +这是我的最爱: + * 当然得有 `cowsay`! + * `fortune`,我最喜欢的 “黑科技” 是让用户连接时的 `motd` 成为一个幽默的格言。 + * `sl`,在你的终端上的蒸汽机车。 + * `xsnow`,另一个 XWindow 黑科技,这个命令可以在你的工作区降雪,并堆积在打开的窗口上。 + * GNOME 复活节彩蛋,在 GNOME 2 中,按下 `Alt+F2`(打开运行对话框)并输入 `free the fish`,就可以在你的根窗口中释放 “Wanda the Fish”。如果你点击 Wanda,它就会四处游荡,窜来窜去(一段时间)。 -\~[Dave Neary][3] +~[Dave Neary][3] -* * * +--- 我的一天从这些开始: @@ -38,67 +38,66 @@ Linux 的命令行以生产力强而闻名。它也是一个可以获得一些 ![Don't take life too seriously][4] -(Tomasz Waraksa, [CC BY-SA 4.0][5]) - -紧接着 `curl` [wttr.in][6] +紧接着是 `curl` [wttr.in][6]。 ![Weather][7] -(Tomasz Waraksa, [CC BY-SA 4.0][5]) +现在我们可以喝咖啡了 ;-) -现在我们可以喝咖啡了 ;-) +~[Tomasz Waraksa][8] -\~[Tomasz Waraksa][8] - -* * * +--- `cmatrix` ,因为每当这个时候,你就会觉得自己被插入了机器。 -\~[Gary Smith][9] -* * * +~[Gary Smith][9] -Telnet towel.blinkenlights.nl +--- + +``` +telnet towel.blinkenlights.nl +``` 这并不完全是 Linux 特有的,但它还挺棒的。 -\~[John 'Warthog9' Hawley][10] +~[John 'Warthog9' Hawley][10] -* * * +--- -Xroach 是 20 世纪 90 年代你的窗口管理器的一个很酷的附加功能。当时它与 Tab Window Manager (TWM)和 F Virtual Window Manager (FVWM)一起使用时非常有趣,但我已经多年没有使用它了。当你运行 Xroach 时,它添加了小蟑螂并“住”在你的窗口下。当你移动一个窗口或关闭它时,蟑螂就会窜到另一个窗口下躲起来或跑出屏幕。这只是其中一种使桌面更有趣的小方法。 +Xroach 是 20 世纪 90 年代你的窗口管理器的一个很酷的附加功能。当时它与 Tab Window Manager (TWM)和 F Virtual Window Manager (FVWM)一起使用时非常有趣,但我已经多年没有使用它了。当你运行 Xroach 时,它添加了小蟑螂并“住”在你的窗口下。当你移动一个窗口或关闭它时,蟑螂就会窜到另一个窗口下躲起来或跑出屏幕。这只是其中一种使桌面更有趣的小方法。 看起来有一个 [Xroach 的现代移植][11],我得找个时间试试。 -\~[Jim Hall][12] +~[Jim Hall][12] -* * * +--- 我在 90 年代末担任过计算机科学的助教,我们的计算机实验室里有 Sun Sparc 工作站。有时学生会在实验室时间里走开而不锁屏。每隔一段时间,我就会在他们不注意的时候在终端上执行 `xroach &; clear`。 XRoach 是个好东西。蟑螂躲在窗口下,在屏幕上窜来窜去,当你移动一个窗口时,又躲在另一个窗口下。 -\~[Ann Marie Fred][13] +~[Ann Marie Fred][13] -* * * +--- -我最喜欢的一个是 `hollywood`。在[这里][14]了解下。 +我最喜欢的一个是 `hollywood`,在 [这里][14] 了解下。 -只需运行它并开始随意按键,你就会让星巴克的每个人都相信您正在摧毁 NSA。。 +只需运行它并开始随意按键,你就会让星巴克的每个人都相信你正在摧毁美国。 -\~[Clint Byrum][15] +~[Clint Byrum][15] [Jim Hall][12] 对此回应道: -这真是太棒了! 这让我想起了 [Hacker Typer][16]。它是一个网站而不是一个终端程序。只要调出网站,然后敲击键盘。不管你输入什么,Hacker Typer 都会输出似乎是真正的工作。:-) +这真是太棒了! 这让我想起了 [Hacker Typer][16]。它是一个网站而不是一个终端程序。只要调出网站,然后敲击键盘。不管你输入什么,Hacker Typer 的输出都似乎是真正的工作。:-) 为了回应 Clint Byrum(和 Jim Hall 的回应)带来的乐趣: -这两个我都喜欢! 请欣赏这篇关于 Hollywood 黑客的[博文][17]。我最喜欢的一个。 +这两个我都喜欢! 请欣赏这篇关于 Hollywood 黑科技的 [博文][17]。我最爱之一。 -\~[Greg Scott][18] +~[Greg Scott][18] -* * * +--- 你最喜欢的“有趣的” Linux 命令是什么?请在下面的评论中分享你的。 @@ -109,7 +108,7 @@ via: https://opensource.com/article/22/1/fun-linux-commands 作者:[Opensource.com][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -121,7 +120,7 @@ via: https://opensource.com/article/22/1/fun-linux-commands [4]: https://opensource.com/sites/default/files/uploads/too-seriously.png (Don't take life too seriously) [5]: https://creativecommons.org/licenses/by-sa/4.0/ [6]: http://wttr.in/ -[7]: https://opensource.com/sites/default/files/uploads/wttr.png (Weather (wttr.in)) +[7]: https://opensource.com/sites/default/files/uploads/wttr.png (Weather) [8]: https://opensource.com/user_articles/380541 [9]: https://opensource.com/users/greptile [10]: https://opensource.com/users/warthog9 From 7a82495c67609ec6d150126b740833575525219c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 30 Jan 2022 11:11:30 +0800 Subject: [PATCH 130/334] A --- ...0211126 10 holiday gift ideas for open source enthusiasts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20211126 10 holiday gift ideas for open source enthusiasts.md b/sources/tech/20211126 10 holiday gift ideas for open source enthusiasts.md index 71aec390cd..2a62ab3a68 100644 --- a/sources/tech/20211126 10 holiday gift ideas for open source enthusiasts.md +++ b/sources/tech/20211126 10 holiday gift ideas for open source enthusiasts.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/11/open-source-holiday-gifts" [#]: author: "Joshua Allen Holm https://opensource.com/users/holmja" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 93ed2ce8a430a0b963e79b336fbdc186acb9e4ab Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 30 Jan 2022 13:39:35 +0800 Subject: [PATCH 131/334] TR @wxy --- ... gift ideas for open source enthusiasts.md | 191 ------------------ ... gift ideas for open source enthusiasts.md | 172 ++++++++++++++++ 2 files changed, 172 insertions(+), 191 deletions(-) delete mode 100644 sources/tech/20211126 10 holiday gift ideas for open source enthusiasts.md create mode 100644 translated/tech/20211126 10 holiday gift ideas for open source enthusiasts.md diff --git a/sources/tech/20211126 10 holiday gift ideas for open source enthusiasts.md b/sources/tech/20211126 10 holiday gift ideas for open source enthusiasts.md deleted file mode 100644 index 2a62ab3a68..0000000000 --- a/sources/tech/20211126 10 holiday gift ideas for open source enthusiasts.md +++ /dev/null @@ -1,191 +0,0 @@ -[#]: subject: "10 holiday gift ideas for open source enthusiasts" -[#]: via: "https://opensource.com/article/21/11/open-source-holiday-gifts" -[#]: author: "Joshua Allen Holm https://opensource.com/users/holmja" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -10 holiday gift ideas for open source enthusiasts -====== -From DIY projects to computers to books, this list provides gift -suggestions that foster creativity, learning, and exploring. -![Gift box opens with colors coming out][1] - -Are you looking for cool gifts for people on your holiday shopping list or ideas for your own wishlist? If so, consider one of the ten suggestions below. Each of these gift suggestions connects in some way to the open source ethos. From DIY projects to computers to books, this list provides gift suggestions that foster creativity, learning, and exploring. - -### System76 computer - -![System76 Thelio][2] - -(Source: [System76][3]) - -Does someone in your life need a new desktop, laptop, or server? [System76][4] should be one of the first places you should look. Looking for something light and mobile? The lightweight 14-inch [Lemur Pro][5] laptop is an excellent choice. Need a desktop with _a lot_ of processing power, RAM, and storage? One of the various [Thelio][3] desktops is what you are looking for. And there are plenty of other options in-between. Their computers come with either Ubuntu or Pop!_OS, which is the company's own Ubuntu-based Linux distribution, and have lifetime support. System76 is also in favor of [right-to-repair legislation][6]. While not the only vendor out there that sells Linux-powered computers, they are certainly one of the most popular. - -**Prices Vary** - -### Raspberry Pi 400 Personal Computer Kit - -![Raspberry Pi 400 Kit][7] - -(Source: [Raspberry Pi][8]) - -At this point, the Raspberry Pi brand needs little introduction. Since the first Raspberry Pi model took the world by storm in 2012, the Raspberry Pi has remained one of the most popular single-board computers for use in education and by hobbyists and tinkerers. The [Raspberry Pi 400 Personal Computer Kit][8] continues this trend. This kit contains everything someone needs to get started, except a monitor. For US$ 100.00, you get the Raspberry Pi 400 (a variant of the Raspberry Pi 4 series built into a keyboard casing), a mouse, power supply, micro HDMI-to-HDMI cable, an SD card preloaded with Raspberry Pi OS, and a copy of the Raspberry Pi Beginner's Guide. While not the most powerful computer in the world, the Raspberry Pi 400 is more than capable of functioning as a decent starting computer for the children on your shopping list. - -**Price: US$ 100.00** - -### Raspberry Pi Build HAT - -![Raspberry Pi Build HAT][9] - -(Source: [Raspberry Pi][10]) - -One of the many benefits of the Raspberry Pi is its ability to be expanded with various add-on boards. A recently introduced add-on board, the [Raspberry Pi Build HAT][10], makes it possible to use the Raspberry Pi to control up to four LEGO Technic motors or sensors from the [LEGO Education SPIKE][11] product line. The Build HAT works with any Raspberry Pi with a 40-pin GPIO header. You code projects using a specially developed Python library. The Build HAT can power itself, the Raspberry Pi board, and the LEGO motors and sensors using an external 8V DC power source (like the [official Built HAT power supply][12]) or a 7.5V battery pack.  - -**Price: US$ 25.00 (plus the cost of the parts and accessories needed for a project)** - -### CrowPi2 - -![CrowPi][13] - -(Source: [CrowPi][14]) - -The [CrowPi2][14] is a collection of STEM learning projects built into a laptop-style case powered by a Raspberry Pi. The CrowPi2 kit comes in three sizes: Basic, Advanced, and Deluxe. The Basic kit comes with a few accessories but does not come with a Raspberry Pi. The Advanced kit comes with a Raspberry Pi 4B with 4GB of RAM and a larger selection of accessories than the Basic kit. The Deluxe Kit comes with the largest selection of accessories and a Raspberry Pi 4B with 8GB of RAM. All three kits are available in Space Gray or Silver. An optional power bank can provide the CrowPi2 with power when not plugged into an electrical outlet. If you want to learn more about the CrowPi2, you can read [Opensource.com's review of the CrowPi2][15] by Seth Kenlon. - -**Basic Kit: US$ 339.99**   -**Advanced Kit: US$ 469.99 **  -**Deluxe Kit: US$ 529.99** -**Optional Power Bank: US$ 19.00**   - -### Keebio Quefrency keyboard - -Recommendation by John Hall - -![Keebio Quefrency Keyboard][16] - -(Source: [Keeb.io][17]) - -The [Keebio Quefrency keyboard][17] would make a great holiday gift for anyone who wants to build their own keyboard! It is a 65% keyboard, which is probably the smallest most people would be willing to go since it has Home, PgUp, PgDn, and arrow keys. It is a split ergonomic keyboard, but you can put the halves back together if you have difficulty adjusting to the split. Best of all, the latest revision of the Quefrency has hot-swap sockets, so you can build it without needing to solder anything. - -Here is an inexpensive Quefrency keyboard build: - - * [Quefrency rev4 PCBs][18] with hot-swap sockets, plus FR4 Plates (left with no macros, right 65%) - * $80 + $28 US - * [2u stabilizers (5)][19] - * $10 US - * [Key switches (70)][20] - * $16 US - * [Keycaps][21] - * $ 45 US - * [2.25u G20 left spacebar][22] and [2.75u G20 right spacebar][23] - * $8 + $8 US - * [USB C to USB C keyboard connector][24] - * $4 US - * **Total US$ 199** (not including shipping) - - - -As noted in the parts list, the Keebio Quefrency rev4 needs five stabilizers: - - 1. Left Shift - 2. Left Space - 3. Right Space - 4. Enter - 5. Backspace - - - -The Keebio Quefrency rev4 is intended to be built as a 65% keyboard, which has a shortened right shift key that does not need a stabilizer. Many keycap sets, even relatively inexpensive sets like Artifact Bloom and Glorious GPBT, include a shortened right shift key that fits most keyboards like this one. The hard part is finding matching split spacebar keycaps. But you can buy spacebar keycaps from places like Pimp My Keyboard, which work great. Unfortunately, it is nearly impossible to get matching colors from different manufacturers. Even if you pick white keycaps and white spacebars, one of them is likely to be grayer than the other. Why not celebrate the difference instead? Try pairing white and gray keycaps with red or blue spacebars. - -### Petoi Nybble Open Source Robotic Cat - -![Petoi Nybble][25] - -(Source: [Petoi][26]) - -The [Petoi Nybble Open Source Robotic Cat][26] is a kit for building a robotic pet cat. The kit comes with everything needed to build the project, but batteries are not included. The Nybble requires two 14500 lithium ion rechargeable 3.7V batteries, which provide about 45 minutes of playtime. Once assembled, the cat can be programmed/controlled using the Arduino IDE, a Python API, or an Android/iOS app. Check out the [Nybble User Manual][27] for more details. - -**Price: US$ 249.00 USD** - -### The Expanse Novel Series - -![The Expanse books][28] - -(Source: [The Expanse Books][29]) - -The final novel in [The Expanse][29] series by James S.A. Corey comes out just in time for the holiday gift-giving season. Set to release on November 30, [Leviathan Falls][30] will conclude the main narrative of this epic nine-book science fiction series that explorers humanity's future in space. In order, the nine books in the series are Leviathan Wakes, Caliban's War, Abaddon's Gate, Cibola Burn, Nemesis Games, Babylon's Ashes, Persepolis Rising, Tiamat's Wrath, and Leviathan Falls. There will also be a collection of short stories and novellas published next year. Most of these stories and novellas are already available in eBook format, but the collection will be the first time they are available in print. Buy the science fiction reader in your life the first book of the series to get them started, or buy them the entire series. - -**Books 1 through 6: US$ 17.99 (Trade Paperback)**   -**Books 7 and 8: US$ 18.99 (Trade Paperback)**   -**Book 9: US$ 30.00 (Hardcover)** - -### Books - -If you are looking for book recommendations and the recommendation for The Expanse does not meet your needs, consider the books from [Opensource.com's 2021 Summer Reading List][31]. This list contains eight book recommendations for a variety of reading tastes. From a modern translation of Beowulf to non-fiction books about technology, there should be something there for the reader in your life. If the 2021 Summer Reading List does not have what you are looking for, the article also contains links to all of Opensource.com's previous summer reading lists, which provides ten more lists of suggestions. - -**Prices Vary** - -### Stickers - -![Ultimate sticker pack][32] - -(Source: [Sticker Mule][33]) - -One of the drawbacks of virtual conferences during the pandemic is that you cannot walk away from the conference with a collection of stickers from various vendor booths. For those who love decorating their laptops with stickers, this could mean that their latest laptop is currently unadorned with the usual decorations. If this sounds like someone in your life, consider buying them a [Unixstickers pack][33] from Sticker Mule. The packs come in three different sizes: Pro, which contains ten stickers; Elite, which contains all the stickers from the Pro pack plus ten more stickers; and Ultimate, which contains everything in the Elite pack plus an additional ten stickers. The stickers cover many open source projects making these bundles the next best thing to visiting vendor booths and the sticker swap table at an in-person conference. - -**Pro pack: US$ 1.00** -**Elite pack: US$ 19.00** -**Ultimate pack: US$ 24.00** - -### Charitable donation to an open source organization - -If the person on your shopping list already has everything (or does not want any tangible gifts), consider making a charitable donation to an open source project in their name. Opensource.com's list of [open source organizations][34] has plenty of organizations you can select from. You, the person whose name the donation was made in, and the organization that received your donation can all be content in knowing that your gift has helped make open source better. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/11/open-source-holiday-gifts - -作者:[Joshua Allen Holm][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/holmja -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_gift_giveaway_box_520x292.png?itok=w1YQhNH1 (Gift box opens with colors coming out) -[2]: https://opensource.com/sites/default/files/styles/medium/public/uploads/system76_thelio.png?itok=E6HBZoMA (System76 Thelio) -[3]: https://system76.com/desktops/ -[4]: https://system76.com -[5]: https://system76.com/laptops/lemur -[6]: https://blog.system76.com/post/646726872371200000/carl-testimony-hb21-1199mp3 -[7]: https://opensource.com/sites/default/files/styles/medium/public/uploads/raspberry_pi_400_kit.jpg?itok=AnVA_OP9 (Raspberry Pi 400 Kit) -[8]: https://www.raspberrypi.com/products/raspberry-pi-400/ -[9]: https://opensource.com/sites/default/files/styles/medium/public/uploads/raspberry_pi_build_hat.png?itok=8YVyNM-c (Raspberry Pi Build HAT) -[10]: https://www.raspberrypi.com/products/build-hat/ -[11]: https://education.lego.com/ -[12]: https://www.raspberrypi.com/products/build-hat-power-supply/ -[13]: https://opensource.com/sites/default/files/styles/medium/public/uploads/crowpi2.png?itok=hJDaPaaz (CrowPi) -[14]: https://www.crowpi.cc/ -[15]: https://opensource.com/article/21/9/raspberry-pi-crowpi2 -[16]: https://opensource.com/sites/default/files/styles/medium/public/uploads/keebio_quefrency_keyboard_pcb.png?itok=M0JVlcRK (Keebio Quefrency Keyboard) -[17]: https://keeb.io/collections/quefrency-split-staggered-65-keyboard -[18]: https://keeb.io/collections/quefrency-split-staggered-65-keyboard/products/quefrency-rev-4-65-split-staggered-keyboard -[19]: https://keeb.io/collections/diy-parts/products/cherry-mx-stabilizer?variant=43449871046 -[20]: https://divinikey.com/collections/linear-switches/products/gateron-milky-yellow-linear-switches?variant=32193385201729 -[21]: https://drop.com/buy/artifact-bloom-series-keycap-set-vintage -[22]: https://pimpmykeyboard.com/g20-2-25-space-pack-of-4/ -[23]: https://pimpmykeyboard.com/g20-2-75-space-pack-of-4/ -[24]: https://keeb.io/products/usb-c-to-usb-c-cable?variant=32313985728606 -[25]: https://opensource.com/sites/default/files/styles/medium/public/uploads/petoi_nybble_open_source_robotic_cat.png?itok=zhvvBReE (Petoi Nybble) -[26]: https://www.petoi.com/pages/petoi-nybble-overview -[27]: https://nybble.petoi.com/ -[28]: https://opensource.com/sites/default/files/styles/medium/public/uploads/the_expanse_books.jpg?itok=FkuizWic (The Expanse books) -[29]: https://www.jamessacorey.com/writing-type/books/ -[30]: https://www.jamessacorey.com/books/leviathan-falls/ -[31]: https://opensource.com/article/21/6/2021-opensourcecom-summer-reading-list -[32]: https://opensource.com/sites/default/files/uploads/ultimate_sticker_pack.png (Ultimate sticker pack) -[33]: https://www.stickermule.com/unixstickers -[34]: https://opensource.com/resources/organizations diff --git a/translated/tech/20211126 10 holiday gift ideas for open source enthusiasts.md b/translated/tech/20211126 10 holiday gift ideas for open source enthusiasts.md new file mode 100644 index 0000000000..94e9d748bd --- /dev/null +++ b/translated/tech/20211126 10 holiday gift ideas for open source enthusiasts.md @@ -0,0 +1,172 @@ +[#]: subject: "10 holiday gift ideas for open source enthusiasts" +[#]: via: "https://opensource.com/article/21/11/open-source-holiday-gifts" +[#]: author: "Joshua Allen Holm https://opensource.com/users/holmja" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +给开源爱好者的 10 个节日礼物创意 +====== + +> 从 DIY 项目到电脑再到书籍,这份清单提供了培养创造力、学习和探索的礼物创意。 + +![](https://img.linux.net.cn/data/attachment/album/202201/30/133910x5rav7vduwrvpudr.jpg) + +你是否正在为你的节日购物清单上的人寻找很酷的礼物,或者为你自己的愿望清单寻找建议?如果是这样,请考虑以下十条建议。这些礼物建议中的每一个都以某种方式与开源精神相联系。从 DIY 项目到电脑再到书籍,这份清单提供了培养创造力、学习和探索的礼物建议。 + +### System76 电脑 + +![System76 Thelio][2] + +你身边的某人需要一个新的台式机、笔记本电脑或服务器吗?[System76][4] 应该是你首先应该寻找的地方之一。想找一些轻巧的移动设备吗?轻巧的 14 英寸 [Lemur Pro][5] 笔记本电脑是一个很好的选择。需要一个有大量处理能力、内存和存储空间的台式机?各种 [Thelio][3] 台式机中就有一款是你要找的。还有很多介于两者之间的其他选择。他们的电脑配备了 Ubuntu 或 Pop!_OS,这是该公司自己的基于 Ubuntu 的 Linux 发行版,并有终身支持。System76 也支持 [维修权法案][6]。虽然不是唯一一家销售安装 Linux 系统的电脑的厂商,但他们肯定是最受欢迎的厂商之一。 + +- **价格不一** + +### 树莓派 400 个人电脑套件 + +![Raspberry Pi 400 Kit][7] + +树莓派几乎不需要介绍。自从 2012 年第一款树莓派风靡全球以来,树莓派一直是最受欢迎的单板计算机之一,可用于教育、业余爱好者和手工爱好者们。[树莓派 400 个人电脑套件][8] 延续了这一趋势。除了一个显示器之外,这个套件包含了人们开始使用所需的一切。花 100.00 美元,你就可以得到树莓派 400(树莓派 4 系列的一个变种,内置于一个键盘外壳中)、一只鼠标、电源、micro HDMI 转 HDMI 电缆、一张预装树莓派操作系统的 SD 卡,以及一本《树莓派初学者指南》。虽然树莓派 400 不是世界上最强大的计算机,但对于你的礼物清单上的孩子来说,树莓派 400 完全可以作为一个得当的入门计算机。 + +- **价格:100.00 美元** + +### 树莓派 Build HAT + +![Raspberry Pi Build HAT][9] + +树莓派的诸多优势之一是它能够通过各种附加板进行扩展。最近推出的一款附加板 —— [树莓派 Build HAT][10],可以用树莓派来控制多达四个乐高技术电机或 [乐高教育 SPIKE][11] 产品系列的传感器。Build HAT 适用于任何带有 40 针 GPIO 接头的树莓派。你可以使用专门开发的 Python 库对项目进行编码。Build HAT 可以使用外部 8V 直流电源(如 [官方 Built HAT 电源][12])或 7.5V 电池组为自身、树莓派板以及乐高电机和传感器供电。 + +- **价格:25.00 美元(加上一个项目所需的零件和配件的费用)** + +### CrowPi2 + +![CrowPi][13] + +[CrowPi2][14] 是一个 STEM 学习项目集合,放在一个由树莓派驱动的笔记本电脑式的机箱里。CrowPi2 套件有三种尺寸:基本型、高级型和豪华型。基本型套件包括一些附件,但不包括树莓派。高级套装配备了一个拥有 4GB 内存的树莓派 4B,并有比基本套装更多的配件选择。豪华套装配备了最多的配件和一个拥有 8GB 内存的树莓派 4B。所有三个套件都有太空灰或银色可供选择。一个可选的移动电源可以在不插入电源插座时为 CrowPi2 提供电源。如果你想了解更多关于 CrowPi2 的信息,你可以阅读 Seth Kenlon 的 [对 CrowPi2 的点评][15]。 + +- **基本套件:339.99 美元** +- **高级套件:469.99 美元** +- **豪华套装:529.99 美元** +- **可选的移动电源:19.00 美元** + +### Keebio Quefrency 键盘 + +推荐人:John Hall + +![Keebio Quefrency键盘][16] + +[Keebio Quefrency 键盘][17] 对于任何想组装自己的键盘的人来说,都是一个很好的节日礼物!它是一款 65% 键盘,这可能是大多数人愿意去做的最小的键盘,因为它有 Home、PgUp、PgDn 和方向键。它是一个分体式的人体工程学键盘,但如果你难以适应分体式的键盘,你可以将两半重新组合起来。最重要的是,最新版本的 Quefrency 有热插拔插座,所以你可以在不需要焊接任何东西的情况下组装它。 + +下面是一个廉价的 Quefrency 键盘组件: + + * [Quefrency rev4 PCBs][18] 带有热插拔插座,加上 FR4 板(左边没有宏,右边有 65%) + * 80 + 28 美元 + * [2u 稳定器(5 个)][19] + * 10 美元 + * [按键开关(70 个)][20] + * 16 美元 + * [键帽][21] + * 45 美元 + * [2.25u G20 左空格键][22] 和 [2.75u G20 右空格键][23] + * 8 + 8 美元 + * [USB C 到 USB C 键盘连接器][24] + * 4 美元 + * **共计 199 美元**(不包括运费) + +正如零件清单中指出的,Keebio Quefrency rev4 需要五个稳定器: + + 1. 左 Shift 键 + 2. 左空格键 + 3. 右空格键 + 4. 回车键 + 5. 退格键 + +Keebio Quefrency rev4 目标是构建 65% 键盘,它有一个缩短的右 Shift 键,不需要稳定器。许多键帽套装,甚至是相对便宜的套装,如 Artifact Bloom 和 Glorious GPBT,包括一个缩短的右 Shift 键,适合大多数像这样的键盘。难的是找到匹配的分体式空格键键帽。但你可以从 Pimp My Keyboard 等地方买到空格键的键帽,效果很好。不幸的是,几乎不可能从不同的制造商那里得到匹配的颜色。即使你选择白色键帽和白色空格键,其中一个也可能比另一个更灰。为什么不接受这种差异呢?试着将白色和灰色的键帽与红色或蓝色的空格键配对一下。 + +### Petoi Nybble 开源机器猫 + +![Petoi Nybble][25] + +[Petoi Nybble 开源机器猫][26] 是一个用于建造机器宠物猫的套件。该套件包含了建造该项目所需的一切,但不包括电池。Nybble 需要两块 14500 锂离子可充电 3.7V 电池,可提供约 45 分钟的游戏时间。一旦组装完成,可以使用 Arduino IDE、Python API 或 Android/iOS 应用程序对该猫进行编程/控制。查看 [Nybble 用户手册][27] 了解更多细节。 + +- **价格:249.00 美元** + +### 《苍穹浩瀚》小说系列 + +![《苍穹浩瀚》合集][28] + +James S.A. Corey 的《[苍穹浩瀚][29]Expanse》系列的最后一部小说正好在假日送礼季节推出。定于 11 月 30 日发行的《[利维坦瀑布][30]Leviathan Falls》将结束这个史诗般的九部科幻小说系列的主要叙事,探索人类在太空的未来。按顺序,该系列的九本书是《利维坦觉醒Leviathan Wakes》、《卡利班之战Caliban's War》、《阿巴顿之门Abaddon's Gate》、《西波拉燃烧Cibola Burn》、《复仇游戏Nemesis Games》、《巴比伦的灰烬Babylon's Ashes》、《波斯波利斯的崛起Persepolis Rising》、《提亚马特之怒Tiamat's Wrath》和《利维坦瀑布Leviathan Falls》。明年还将出版一本短篇小说和长篇小说集。这些故事和长篇小说中的大部分已经有了电子书格式,但这是第一次的印刷合集。给你身边的科幻小说读者购买该系列的第一本书,让他们开始阅读,或者给他们购买整个系列。 + +- **第一至第六本:17.99 美元(平装本)** +- **第七本和第八本:18.99 美元(平装本)** +- **第九本:30.00 美元(精装本)** + +### 书籍 + +如果你正在寻找书籍推荐,而《苍穹浩瀚》的推荐并不符合你的需求,可以考虑 [这份 2021 年夏季阅读清单][31] 中的书籍。这份清单包含八本适合各种阅读口味的书籍推荐。从《贝奥武夫Beowulf》的现代翻译到关于技术的非小说类书籍,那里应该有适合你生活中的读者的东西。如果 2021 年夏季阅读清单中没有你要找的东西,这篇文章还包含了以前所有夏季阅读清单的链接,其中提供了十多份建议清单。 + +- **价格不一** + +### 贴纸 + +![终极贴纸包][32] + +大流行期间的虚拟会议的一个缺点是,你无法带走从各个供应商摊位上收集的贴纸。对于那些喜欢用贴纸装饰笔记本电脑的人来说,这可能意味着他们最新的笔记本电脑目前还没有通常的装饰品。如果这听起来像你生活中的某个人,考虑给他们买一个来自 Sticker Mule 的 [Unixstickers 包][33]。该包有三种不同的尺寸:专业版,包含十张贴纸;精英版,包含专业版中的所有贴纸,再加十张贴纸;终极版,包含精英版中的所有内容,再加十张贴纸。这些贴纸涵盖了许多开源项目,使这些捆绑包成为参观供应商展位和亲临会议的贴纸交换台的下一个最佳选择。 + +- **专业包:1.00 美元** +- **精英包:19.00 美元** +- **终极包:24.00 美元** + +### 向开源组织慈善捐赠 + +如果你购物清单上的人已经拥有了一切(或者不想要任何有形的礼物),可以考虑以他们的名义向开源项目进行慈善捐赠。这个 [开源组织][34] 列表中有很多组织供你选择。你、以其名义捐款的人和收到你捐款的组织都会很高兴,你的礼物有助于使开源变得更好。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/open-source-holiday-gifts + +作者:[Joshua Allen Holm][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/holmja +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_gift_giveaway_box_520x292.png?itok=w1YQhNH1 (Gift box opens with colors coming out) +[2]: https://opensource.com/sites/default/files/styles/medium/public/uploads/system76_thelio.png?itok=E6HBZoMA (System76 Thelio) +[3]: https://system76.com/desktops/ +[4]: https://system76.com +[5]: https://system76.com/laptops/lemur +[6]: https://blog.system76.com/post/646726872371200000/carl-testimony-hb21-1199mp3 +[7]: https://opensource.com/sites/default/files/styles/medium/public/uploads/raspberry_pi_400_kit.jpg?itok=AnVA_OP9 (Raspberry Pi 400 Kit) +[8]: https://www.raspberrypi.com/products/raspberry-pi-400/ +[9]: https://opensource.com/sites/default/files/styles/medium/public/uploads/raspberry_pi_build_hat.png?itok=8YVyNM-c (Raspberry Pi Build HAT) +[10]: https://www.raspberrypi.com/products/build-hat/ +[11]: https://education.lego.com/ +[12]: https://www.raspberrypi.com/products/build-hat-power-supply/ +[13]: https://opensource.com/sites/default/files/styles/medium/public/uploads/crowpi2.png?itok=hJDaPaaz (CrowPi) +[14]: https://www.crowpi.cc/ +[15]: https://opensource.com/article/21/9/raspberry-pi-crowpi2 +[16]: https://opensource.com/sites/default/files/styles/medium/public/uploads/keebio_quefrency_keyboard_pcb.png?itok=M0JVlcRK (Keebio Quefrency Keyboard) +[17]: https://keeb.io/collections/quefrency-split-staggered-65-keyboard +[18]: https://keeb.io/collections/quefrency-split-staggered-65-keyboard/products/quefrency-rev-4-65-split-staggered-keyboard +[19]: https://keeb.io/collections/diy-parts/products/cherry-mx-stabilizer?variant=43449871046 +[20]: https://divinikey.com/collections/linear-switches/products/gateron-milky-yellow-linear-switches?variant=32193385201729 +[21]: https://drop.com/buy/artifact-bloom-series-keycap-set-vintage +[22]: https://pimpmykeyboard.com/g20-2-25-space-pack-of-4/ +[23]: https://pimpmykeyboard.com/g20-2-75-space-pack-of-4/ +[24]: https://keeb.io/products/usb-c-to-usb-c-cable?variant=32313985728606 +[25]: https://opensource.com/sites/default/files/styles/medium/public/uploads/petoi_nybble_open_source_robotic_cat.png?itok=zhvvBReE (Petoi Nybble) +[26]: https://www.petoi.com/pages/petoi-nybble-overview +[27]: https://nybble.petoi.com/ +[28]: https://opensource.com/sites/default/files/styles/medium/public/uploads/the_expanse_books.jpg?itok=FkuizWic (The Expanse books) +[29]: https://www.jamessacorey.com/writing-type/books/ +[30]: https://www.jamessacorey.com/books/leviathan-falls/ +[31]: https://opensource.com/article/21/6/2021-opensourcecom-summer-reading-list +[32]: https://opensource.com/sites/default/files/uploads/ultimate_sticker_pack.png (Ultimate sticker pack) +[33]: https://www.stickermule.com/unixstickers +[34]: https://opensource.com/resources/organizations From 0326fb7f7aac0bba06162aad7fc34b1a4ff51736 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 30 Jan 2022 13:41:21 +0800 Subject: [PATCH 132/334] P: @wxy https://linux.cn/article-14227-1.html --- ...11126 10 holiday gift ideas for open source enthusiasts.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20211126 10 holiday gift ideas for open source enthusiasts.md (99%) diff --git a/translated/tech/20211126 10 holiday gift ideas for open source enthusiasts.md b/published/20211126 10 holiday gift ideas for open source enthusiasts.md similarity index 99% rename from translated/tech/20211126 10 holiday gift ideas for open source enthusiasts.md rename to published/20211126 10 holiday gift ideas for open source enthusiasts.md index 94e9d748bd..1f93baa627 100644 --- a/translated/tech/20211126 10 holiday gift ideas for open source enthusiasts.md +++ b/published/20211126 10 holiday gift ideas for open source enthusiasts.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14227-1.html" 给开源爱好者的 10 个节日礼物创意 ====== From 19ab8bef53dbb29b445b72c2e8949b8c9cda0d21 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 30 Jan 2022 14:27:46 +0800 Subject: [PATCH 133/334] tanslated --- ... How I use Linux accessibility settings.md | 99 ------------------- ... How I use Linux accessibility settings.md | 99 +++++++++++++++++++ 2 files changed, 99 insertions(+), 99 deletions(-) delete mode 100644 sources/tech/20220123 How I use Linux accessibility settings.md create mode 100644 translated/tech/20220123 How I use Linux accessibility settings.md diff --git a/sources/tech/20220123 How I use Linux accessibility settings.md b/sources/tech/20220123 How I use Linux accessibility settings.md deleted file mode 100644 index 29f6570cc3..0000000000 --- a/sources/tech/20220123 How I use Linux accessibility settings.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: subject: "How I use Linux accessibility settings" -[#]: via: "https://opensource.com/article/22/1/linux-accessibility-settings" -[#]: author: "Don Watkins https://opensource.com/users/don-watkins" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How I use Linux accessibility settings -====== -Various Linux systems handle assistive technologies differently. Here -are a few helpful settings for seeing, hearing, typing, and more. -![Person using a laptop][1] - -When I started using Linux in the 1990s, I was in my mid-40s and accessibility was not something I gave much thought to. Now, however, as I'm pushing 70, my needs have changed. A few years ago, I purchased a brand new Darter Pro from System76, and its default resolution is 1920x1080, and it's high DPI, too. The system came with Pop_OS!, which I found that I had to modify to be able to see the icons and text on the display. Thank goodness that Linux on the desktop has become much more accessible than in the 1990s. - -I need assistive technology for seeing and hearing in particular. There are other areas that I do not use but are useful to folks who need help typing, pointing, clicking, and gesturing. - -Various systems, like Gnome, KDE, LXDE, XFCE, and others, handle these assistive technologies differently. These assistive tweaks are mostly available through the **Settings** dialog box or from keyboard shortcuts. - -### Text display - -I need help with larger text, and on my Linux Mint Cinnamon desktop, I use these settings: - -![accessibility options - visual][2] - -Don Watkins (CC BY-SA 4.0) - -I have also found **Gnome Tweaks** allows me to fine-tune text display sizes for my desktop experience. I adjusted the resolution of my display from its default of 1920x1080 to a more comfortable 1600x900. Here are my Layout settings: - -![accessibility options - display][3] - -Don Watkins (CC BY-SA 4.0) - -### Keyboard supports - -I do not need keyboard supports, but they are readily available, as seen below: - -![accessibility options - keyboard][4] - -Don Watkins (CC BY-SA 4.0) - -### More accessibility options - -Accessibility access is familiar on Fedora 35, too. Open the **Settings** menu and choose to make the **Always show Accessibility Menu** icon visible on the desktop. I usually toggle **Large Text** unless I am on a large display. There are many additional options, including **Zoom**, **Screen Reader**, and **Sound Keys**. Here are some: - -![accessibility options - settings][5] - -Don Watkins (CC BY-SA 4.0) - -Once the **Accessibility Menu** is enabled in the **Settings** menu in Fedora, it is easy to toggle other features from the icon in the upper-right corner: - -![accessibility options - desktop][6] - -Don Watkins (CC BY-SA 4.0) - -There are Linux distributions that are designed specifically for folks who need supports. [Accessible Coconut][7] is such a distribution. Coconut is based on Ubuntu Mate 20.04 and comes with the screen reader enabled by default. It is loaded with Ubuntu Mate's default applications. Accessible Coconut is a creation of [Zendalona][8], which specializes in developing free and open source accessibility applications. All of their applications are released with the GPL 2.0 license, including [iBus-Braille][9]. The distribution includes screen reader, print reading in various languages, six key input, typing tutor, magnification, eBook speaker, and many more. - -![accessibility options - desktop][10] - -Don Watkins (CC BY-SA 4.0) - -The [Gnome Accessibility Toolkit][11] is an open source software library that is part of the Gnome Project and provides APIs for implementing accessibility. You can get involved with the [Gnome Accessibility Team][12] by visiting their wiki. KDE also maintains an [accessibility project][13] and a list of [applications][14] supporting the project. You can get involved with the KDE Accessibility project by visiting their [wiki][15]. [XFCE][16] provides resources for users, too. The [Fedora Project Wiki][17] also has a list of accessible applications that you can install on the operating system. - -### Linux for everyone - -Linux has come a long way since the 1990s, and one great improvement is accessibility support. It's good to know that as Linux users change over time, the operating system can change with us and make many different support options available. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/linux-accessibility-settings - -作者:[Don Watkins][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) -[2]: https://opensource.com/sites/default/files/accessibility-visualpng.png (accessibility options - visual) -[3]: https://opensource.com/sites/default/files/display.png (accessibility options - display) -[4]: https://opensource.com/sites/default/files/keyboard_0.png (accessibility options - keyboard) -[5]: https://opensource.com/sites/default/files/settings.png (accessibility options - settings) -[6]: https://opensource.com/sites/default/files/desktop.png (accessibility options - desktop) -[7]: https://zendalona.com/accessible-coconut/ -[8]: https://zendalona.com/ -[9]: https://github.com/zendalona/ibus-braille -[10]: https://opensource.com/sites/default/files/desktop2.png (accessibility options - desktop) -[11]: https://en.wikipedia.org/wiki/Accessibility_Toolkit -[12]: https://wiki.gnome.org/Accessibility -[13]: https://community.kde.org/Accessibility#KDE_Accessibility_Project -[14]: https://userbase.kde.org/Applications/Accessibility -[15]: https://community.kde.org/Get_Involved/accessibility -[16]: https://docs.xfce.org/xfce/xfce4-settings/accessibility -[17]: https://fedoraproject.org/wiki/Docs/Beats/Accessibility#Using_Fedora.27s_Accessibility_Tools diff --git a/translated/tech/20220123 How I use Linux accessibility settings.md b/translated/tech/20220123 How I use Linux accessibility settings.md new file mode 100644 index 0000000000..a496121573 --- /dev/null +++ b/translated/tech/20220123 How I use Linux accessibility settings.md @@ -0,0 +1,99 @@ +[#]: subject: "How I use Linux accessibility settings" +[#]: via: "https://opensource.com/article/22/1/linux-accessibility-settings" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +我如何使用 Linux 的辅助功能设置 +====== +不同的 Linux 系统以不同的方式处理辅助技术。 这里是一些对视觉、听觉、打字等有用的设置。 +![Person using a laptop][1] + +当我在20世纪90年代开始使用Linux时,我已经 40 多岁了,无障碍性不是我考虑的问题。然而现在,当我快到 70 岁时,我的需求已经改变了。几年前,我从 System76 购买了一个全新的 Darter Pro,它的默认分辨率是 1920x1080,而且也是高 DPI。系统附带了 Pop_OS!,我发现我必须修改它才能看到显示屏上的图标和文字。谢天谢地,桌面上的 Linux 已经变得比 90 年代更容易使用了。 + +我需要辅助技术,特别是在视觉和听觉方面。还有一些我不使用的领域,但对需要帮助打字、指点、点击和手势的人来说是有用的。 + +不同的系统,如 Gnome、KDE、LXDE、XFCE 和其他系统,对这些辅助技术的处理方式不同。这些辅助性的调整大多可以通过**设置**对话框或键盘快捷键来实现。 + +### 文字显示 + +我需要帮助来显示较大的文字,在我的 Linux Mint Cinnamon 桌面上,我使用这些设置: + +![accessibility options - visual][2] + +Don Watkins (CC BY-SA 4.0) + +I have also found **Gnome Tweaks** allows me to fine-tune text display sizes for my desktop experience. I adjusted the resolution of my display from its default of 1920x1080 to a more comfortable 1600x900. Here are my Layout settings: +我还发现 **Gnome Tweaks** 可以让我对桌面体验的文字显示大小进行微调。我把我的显示器的分辨率从默认的 1920x1080 调整到更舒适的 1600x900。以下是我的布局设置: + +![accessibility options - display][3] + +Don Watkins (CC BY-SA 4.0) + +### 键盘支持 + +我不需要键盘支持,但它们是现成的,如下图所示: + +![accessibility options - keyboard][4] + +Don Watkins (CC BY-SA 4.0) + +### 更多无障碍选项 + +在 Fedora 35 上,无障碍访问也是熟悉的。打开**设置**菜单,选择让**总是显示无障碍菜单**图标在桌面上可见。我通常会切换**大字体**,除非我在一个大显示器上。还有许多其他选项,包括**缩放**、**屏幕阅读器**和**声音键**。这里有一些: + +![accessibility options - settings][5] + +Don Watkins (CC BY-SA 4.0) + +当在 Fedora 的**设置** 菜单中启用了**无障碍菜单**,就很容易从右上角的图标中切换其他功能: + +![accessibility options - desktop][6] + +Don Watkins (CC BY-SA 4.0) + +有一些 Linux 发行版是专门为需要支持的人设计的。[Accessible Coconut][7] 就是这样一个发行版。Coconut 基于 Ubuntu Mate 20.04,并默认启用了屏幕阅读器。它装载了 Ubuntu Mate 的默认应用。Accessible Coconut 是 [Zendalona][8] 的作品,该公司专门开发免费和开源的无障碍应用。他们所有的应用都是以 GPL 2.0 许可证发布的,包括 [iBus-Braille][9]。该发行版包括屏幕阅读器、各种语言的打印阅读、六键输入、打字辅导、放大器、电子书扬声器等等。 + +![accessibility options - desktop][10] + +Don Watkins (CC BY-SA 4.0) + +[Gnome Accessibility Toolkit][11] 是一个开源软件库,是 Gnome 项目的一部分,为实现无障碍功能提供 API。你可以通过访问他们的 wiki 来参与 [Gnome 无障碍团队][12]。KDE 也有一个[无障碍项目][13]和一个支持该项目的[应用][14]列表。你可以通过访问他们的 [wiki][15] 来参与 KDE 无障碍项目。[XFCE][16] 也为用户提供了资源。[Fedora Project Wiki][17] 也有一个可以安装在操作系统上的无障碍应用的列表。 + +### Linux 适合所有人 + +自 20 世纪 90 年代以来,Linux 已经有了长足的进步,其中一个很大的进步就是对无障碍的支持。很高兴知道随着 Linux 用户的不断变化,操作系统也可以和我们一起变化,并做出许多不同的支持选项。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/linux-accessibility-settings + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) +[2]: https://opensource.com/sites/default/files/accessibility-visualpng.png (accessibility options - visual) +[3]: https://opensource.com/sites/default/files/display.png (accessibility options - display) +[4]: https://opensource.com/sites/default/files/keyboard_0.png (accessibility options - keyboard) +[5]: https://opensource.com/sites/default/files/settings.png (accessibility options - settings) +[6]: https://opensource.com/sites/default/files/desktop.png (accessibility options - desktop) +[7]: https://zendalona.com/accessible-coconut/ +[8]: https://zendalona.com/ +[9]: https://github.com/zendalona/ibus-braille +[10]: https://opensource.com/sites/default/files/desktop2.png (accessibility options - desktop) +[11]: https://en.wikipedia.org/wiki/Accessibility_Toolkit +[12]: https://wiki.gnome.org/Accessibility +[13]: https://community.kde.org/Accessibility#KDE_Accessibility_Project +[14]: https://userbase.kde.org/Applications/Accessibility +[15]: https://community.kde.org/Get_Involved/accessibility +[16]: https://docs.xfce.org/xfce/xfce4-settings/accessibility +[17]: https://fedoraproject.org/wiki/Docs/Beats/Accessibility#Using_Fedora.27s_Accessibility_Tools \ No newline at end of file From 5150e6c7e59c7d2031084925307ebc5245491e2b Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 30 Jan 2022 14:30:31 +0800 Subject: [PATCH 134/334] tanslating --- sources/tech/20220128 Sharing the computer screen in Gnome.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220128 Sharing the computer screen in Gnome.md b/sources/tech/20220128 Sharing the computer screen in Gnome.md index ddb8aa7a00..49758d3ced 100644 --- a/sources/tech/20220128 Sharing the computer screen in Gnome.md +++ b/sources/tech/20220128 Sharing the computer screen in Gnome.md @@ -2,7 +2,7 @@ [#]: via: "https://fedoramagazine.org/sharing-the-computer-screen-in-gnome/" [#]: author: "Lukáš Růžička https://fedoramagazine.org/author/lruzicka/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 6b15dc97c6c79a00973a01f44df6d3d08a885fd8 Mon Sep 17 00:00:00 2001 From: CN-QUAN <97161224+CN-QUAN@users.noreply.github.com> Date: Sun, 30 Jan 2022 17:14:15 +0800 Subject: [PATCH 135/334] Update 20220102 10 DIY IoT projects to try using open source tools.md --- ...projects to try using open source tools.md | 63 +++++++++---------- 1 file changed, 29 insertions(+), 34 deletions(-) diff --git a/sources/tech/20220102 10 DIY IoT projects to try using open source tools.md b/sources/tech/20220102 10 DIY IoT projects to try using open source tools.md index e61622cb1b..4214d1c176 100644 --- a/sources/tech/20220102 10 DIY IoT projects to try using open source tools.md +++ b/sources/tech/20220102 10 DIY IoT projects to try using open source tools.md @@ -1,4 +1,3 @@ -[#]: subject: "10 DIY IoT projects to try using open source tools" [#]: via: "https://opensource.com/article/22/1/open-source-internet-of-things" [#]: author: "Joshua Allen Holm https://opensource.com/users/holmja" [#]: collector: "lujun9972" @@ -7,71 +6,67 @@ [#]: publisher: " " [#]: url: " " -10 DIY IoT projects to try using open source tools +尝试使用开源工具的10个DIY物联网项目 ====== -Opensource.com's writers shared their expertise about a variety of -Internet of Things projects many times during 2021. -![collection of hardware on blue backround][1] +在2021年期间,Opensource.com的作者们多次分享了他们关于各种物联网项目的专业知识。 +![蓝色背景上的硬件集合][1] -The Internet of Things (IoT) is a fascinating development in the realm of computing. Connected smart devices, home automation, and related areas of development are producing many interesting projects. Opensource.com's writers shared their expertise about a variety of Internet of Things projects many times during 2021. Here are Opensource.com's ten best Internet of Things articles from the year. +物联网(IoT)是计算领域的一个令人着迷的发展方向。互联智能设备、家庭自动化以及相关的发展领域正在产生许多有趣的项目。在2021年期间,Opensource.com的作者们多次分享了他们关于各种物联网项目的专业知识。以下是Opensource.com今年的十大最佳物联网文章。 -### How to customize your voice assistant with the voice of your choice +###如何使用您选择的声音定制您的语音助手 -[Learn about the Nana and Poppy project][2] in this article by Rich Lucente. The Nana and Poppy project is Rich Lucente's open source project for creating custom greetings for artificial intelligence voice assistants. He describes the entire process, from recording the necessary audio clips to writing the code to combine the clips into a complete greeting. The finished product was five custom voice assistants gifted to great grandparents and grandparents who could now hear their grandchildren's voices whenever they interacted with the voice assistant. +在这篇由Rich Lucente撰写的文章中[了解Nana和Poppy项目][2]。Nana and Poppy项目是Rich Lucente为人工智能语音助手创建自定义问候的开源项目。他描述了整个过程,从录制必要的音频片段到编写代码将这些片段组合成完整的问候语。成品是五个定制的语音助手,送给曾祖父母和祖父母,他们现在无论何时与语音助手互动都能听到孙辈的声音。 -### Monitor your home's temperature and humidity with Raspberry Pis and Prometheus +###用树莓派和普罗米修斯监测你家的温湿度 -Chris Collins describes how he [used Prometheus to monitor his home's temperature and humidity][3]. He provides detailed instructions about installing Prometheus on Raspberry Pi OS, instrumenting a Prometheus application, setting up a systemd unit and logging, and more to create a tool for monitoring temperature and humidity data. This article builds on an earlier article written by Chris, which is the next article on this list. +克里斯·柯林斯(Chris Collins)描述了他如何[利用普罗米修斯(Prometheus)监测家中的温度和湿度][3]。他提供了关于在Raspberry PI OS上安装普罗米修斯、检测普罗米修斯应用程序、设置系统单元和日志记录等方面的详细说明,以创建用于监控温度和湿度数据的工具。本文建立在克里斯(Chris)以前写的一篇文章的基础上,是这个系列的下一篇文章。 -### Set up temperature sensors in your home with a Raspberry Pi +###用树莓派在家里设置温度传感器 -Learn [how to set up temperature sensors][4] using a Raspberry Pi, a DHT22 digital sensor, and some Python code. In this article, Chris Collins explains how to connect the sensor to the Raspberry Pi, install the DHT sensor software, and get the sensor data using a Python script. He concludes by teasing a future article that will do more to automate the data collection from this device, which is the previous article on this list. +学习[如何设置温度传感器][4]通过使用树莓派、DHT22数字传感器和一些Python代码。在本文中,Chris Collins解释了如何将传感器连接到树莓派,安装DHT传感器软件,并使用Python脚本获取传感器数据。他最后调侃了一篇未来的文章,这篇文章将更多地自动化从该设备收集数据,这是本列表中的前一篇文章。 -### Control your Raspberry Pi remotely with your smartphone +###用智能手机远程控制你的树莓派 -Stephan Avenwedde explains how to [use your smartphone to control the GPIOs on a Raspberry Pi][5]. This tutorial describes how to install and use Pythonic to make the Raspberry Pi controllable over a network connection using Telegram. There was no specific end project in mind when he wrote the article, so it provides broad instructions that you can apply to many projects. Some possible projects suggested by Stephan include lawn irrigation and a garage door opener. +斯蒂芬·艾文韦德(Stephan Avenwede)解释了如何[使用你的智能手机来控制树莓派的gpio][5]。本教程描述了如何安装和使用python来使用Telegram通过网络连接控制树莓派。在写这篇文章时,他并没有考虑到具体的最终项目,因此本文提供了广泛的指导,您可以将其应用于许多项目。斯蒂芬建议的一些可能的项目包括草坪灌溉和车库开门器。 -### Why choose open source for your home automation project +#家庭自动化项目为什么选择开源 -Alan Smithee [introduces the Opensource.com Home Automation eBook][6] in this article. The eBook contains a selection of Opensource.com content related to home automation. Alan's article provides an overview of why technology makes things better for everyone and provides a link to download the eBook. +Alan Smithee在本文中[介绍了Opensource.com家庭自动化电子书][6]。这本电子书包含了Opensource.com网站上与家庭自动化相关的内容。Alan的文章概述了为什么技术让每个人的生活变得更好,并提供了一个下载电子书的链接。 -### Monitor your Raspberry Pi with Grafana Cloud +###用Grafana Cloud监控你的树莓派 -Discover how to [monitor your Raspberry Pi with Grafana Cloud][7] in this tutorial by Matthew Helmke. This project uses a Raspberry Pi, the Prometheus time-series database, and a Grafana Cloud account. Matthew explains how to install Prometheus on the Raspberry Pi and connect it to Grafana Cloud to provide monitoring for your Raspberry Pi. +在Matthew Helmke的这篇教程中,了解如何[用Grafana Cloud监控你的树莓派][7]。该项目使用树莓派、Prometheus时间序列数据库和Grafana Cloud帐户。Matthew解释了如何在树莓派上安装Prometheus,并将其连接到Grafana Cloud,为您的树莓派提供监控。 -### A new open source operating system for embedded systems +###一种新的嵌入式开源操作系统 -Zhu Tianlong provides an [introduction to the RT-Thread Smart operating system][8]. The article explains what RT-Thread Smart is, who might need to use it, and how it works. There is also a section in the article that compares and contrasts between RT-Thread Smart and RT-Thread. +朱天龙提供了[RT-Thread智能操作系统简介][8]。本文解释了什么是RT-Thread Smart,谁可能需要使用它,以及它是如何工作的。本文中还有一个章节对RT Thread Smart和RT Thread进行了对比。 -### Use Rust for embedded development +###使用Rust进行嵌入式开发 -This article, authored by Alan Smithee and provided by Liu Kang, introduces [using Rust for embedded development][9]. This code-heavy tutorial shows how to call Rust in C and how to call C in Rust. There are plenty of code examples and detailed instructions for using Rust tools, like Cargo, for development. +本文由Alan Smithee撰写,刘康提供,介绍了[使用Rust进行嵌入式开发][9]。这个包含大量代码的教程展示了如何在C中调用Rust,以及如何在Rust中调用C。这里有大量使用Rust工具(如Cargo)进行开发的代码示例和详细说明。 -### Getting started with edge development on Linux using open source +###开源Linux边缘开发入门 -Daniel Oh explains how to use the Quarkus cloud-native Java framework to [get started with edge development][10]. Daniel starts by providing a brief introduction to CentOS Stream, the operating system he uses for his tutorial. He then covers the three main steps of his tutorial: +Daniel Oh解释了如何使用Quarkus云原生Java框架来[开始边缘开发][10]。Daniel首先简要介绍了他在教程中使用的操作系统CentOS Stream。然后他介绍了教程的三个主要步骤: - * Sending IoT data to the lightweight message broker - * Processing reactive data streams with Quarkus - * Monitoring the real-time data channel +*将物联网数据发送到轻量级消息代理。 +*使用Quarkus处理反应性数据流。 +*监控实时数据通道。 +#什么是雾计算? - -### What is fog computing? - -You have probably heard about cloud computing, but [what is fog computing][11]? Seth Kenlon describes fog computing as the "outer 'edge' of the cloud"—built up of all the connected devices like phones, watches, and various other things that comprise the Internet of Things. +您可能听说过云计算,但是[什么是雾计算][11]?Seth Kenlon将雾计算描述为“云的外部‘边缘’”——由手机、手表和其他组成物联网的各种设备组成。 -------------------------------------------------------------------------------- via: https://opensource.com/article/22/1/open-source-internet-of-things + 作者:[Joshua Allen Holm][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[CN-QUAN](https://github.com/CN-QUAN) 校对:[校对者ID](https://github.com/校对者ID) - 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - [a]: https://opensource.com/users/holmja [b]: https://github.com/lujun9972 [1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_BUS_Apple_520.png?itok=ZJu-hBV1 (collection of hardware on blue backround) From 2751e1c347b9bc688b756c58bb4fe6498a1bb308 Mon Sep 17 00:00:00 2001 From: CN-QUAN <97161224+CN-QUAN@users.noreply.github.com> Date: Sun, 30 Jan 2022 17:15:10 +0800 Subject: [PATCH 136/334] Rename sources/tech/20220102 10 DIY IoT projects to try using open source tools.md to translated/tech/20220102 10 DIY IoT projects to try using open source tools.md --- ...20220102 10 DIY IoT projects to try using open source tools.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20220102 10 DIY IoT projects to try using open source tools.md (100%) diff --git a/sources/tech/20220102 10 DIY IoT projects to try using open source tools.md b/translated/tech/20220102 10 DIY IoT projects to try using open source tools.md similarity index 100% rename from sources/tech/20220102 10 DIY IoT projects to try using open source tools.md rename to translated/tech/20220102 10 DIY IoT projects to try using open source tools.md From 49a3cde05a16972b8c14cf8bcb0dfe14fd3ea463 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 30 Jan 2022 23:42:53 +0800 Subject: [PATCH 137/334] RP @geekpi https://linux.cn/article-14229-1.html --- ...our Digital Diary in the Linux Terminal.md | 44 +++++++------------ 1 file changed, 17 insertions(+), 27 deletions(-) rename {translated/tech => published}/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md (78%) diff --git a/translated/tech/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md b/published/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md similarity index 78% rename from translated/tech/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md rename to published/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md index 5e1ec38afb..545b172232 100644 --- a/translated/tech/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md +++ b/published/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md @@ -3,25 +3,25 @@ [#]: author: "Marco Carmona https://itsfoss.com/author/marco/" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14229-1.html" -Jrnl:你在 Linux 终端的数字日记 +Jrnl:你的 Linux 终端数字日记 ====== -想象一下:有人伤了你的心,而你想要的是心无旁骛地在日记中写下你的感受。你明白这个想法了吗?没有吗?我也不知道。我没有心碎(或者也许我心碎了,但我不想告诉你)。 +![](https://img.linux.net.cn/data/attachment/album/202201/30/234157xxoo76bdxb7xxbgl.jpg) -但我还是想向你展示一个奇妙的极简的开源的记事应用来保存日记条目。 +想象一下:有人伤了你的心,而你想要的是心无旁骛地在日记中写下你的感受。你明白这种感受吗?没有吗?我也不知道。我没有心碎过(或者也许我心碎了,但我不想告诉你)。 + +但我还是想向你展示一个奇妙的极简的开源的记事应用来保存日记。 这个方便的小程序是 [Jrnl][1],它可以让你在终端中直接创建、搜索和查看日记条目。 用 Jrnl 创建新的笔记就像下面一样简单: ``` - - jrnl yesterday: I read an amazing article on It’s FOSS. I learn about a minimalist app called Jrnl, I should try it. - +jrnl yesterday: I read an amazing article on It’s FOSS. I learn about a minimalist app called Jrnl, I should try it. ``` 看起来很简单,不是吗?关键字 “yesterday” 在这里是一个触发器,它把你的笔记保存到昨天的日期。记住,它被称为 Jrnl(日记)是有原因的。它的主要目的是保存日记。 @@ -35,21 +35,17 @@ Jrnl 可以用 pipx 或 Homebrew 包管理器安装。 我在测试中使用了 Homebrew,所以我将列出这些步骤。首先获取 Homebrew: ``` - - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` ![Installing Homebrew on your system][2] -这就好了!如果你需要更多的信息,我们有一个关于[在 Linux 上安装 Homebrew][3] 的详细教程。 +这就好了!如果你需要更多的信息,我们有一个关于 [在 Linux 上安装 Homebrew][3] 的详细教程。 当你安装了 Homebrew 包管理器后,用它来安装 Jrnl: ``` - - brew install jrnl - +brew install jrnl ``` ![Installing Jrnl with Homebrew][4] @@ -59,9 +55,7 @@ Jrnl 可以用 pipx 或 Homebrew 包管理器安装。 你还记得本文开头的第一个例子吗?让我们再来看看它吧! ``` - - jrnl yesterday: I read an amazing article in It’s FOSS. I learn about a minimalist app called Jrnl, I should try it. - +jrnl yesterday: I read an amazing article in It’s FOSS. I learn about a minimalist app called Jrnl, I should try it. ``` ![Writing an entry][5] @@ -71,9 +65,7 @@ Jrnl 可以用 pipx 或 Homebrew 包管理器安装。 目前,Jnrl 有两种模式:撰写和查看;前面的步骤用于撰写条目,但如果你想查看,例如,之前写过的条目,语法也很简单,你只需输入下一行。 ``` - - jrnl -on yesterday - +jrnl -on yesterday ``` ![Viewing an entry][6] @@ -83,12 +75,10 @@ Jrnl 可以用 pipx 或 Homebrew 包管理器安装。 这就好了! 当然,Jrnl 还有很多功能,你可以通过下面这行轻松找到: ``` - - jrnl --help - +jrnl --help ``` -你也可以参考[其官方网站][7]上的文档。记住,在这样的一个开源项目中,文档是你最好的朋友。享受它吧! +你也可以参考 [其官方网站][7] 上的文档。记住,在这样的一个开源项目中,文档是你最好的朋友。享受它吧! ### 总结 @@ -103,7 +93,7 @@ via: https://itsfoss.com/jrnl/ 作者:[Marco Carmona][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 9512e2cb3a99551f89b5dcf2ff7c4a65f506c4a4 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 31 Jan 2022 05:02:29 +0800 Subject: [PATCH 138/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220130=20?= =?UTF-8?q?Open=20source=20tools=20to=20make=20your=20Wordle=20results=20a?= =?UTF-8?q?ccessible?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220130 Open source tools to make your Wordle results accessible.md --- ... to make your Wordle results accessible.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sources/tech/20220130 Open source tools to make your Wordle results accessible.md diff --git a/sources/tech/20220130 Open source tools to make your Wordle results accessible.md b/sources/tech/20220130 Open source tools to make your Wordle results accessible.md new file mode 100644 index 0000000000..34cf7a8a3b --- /dev/null +++ b/sources/tech/20220130 Open source tools to make your Wordle results accessible.md @@ -0,0 +1,99 @@ +[#]: subject: "Open source tools to make your Wordle results accessible" +[#]: via: "https://opensource.com/article/22/1/open-source-accessibility-wordle" +[#]: author: "AmyJune Hineline https://opensource.com/users/amyjune" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Open source tools to make your Wordle results accessible +====== +Sharing your Wordle results is fun. Make sure they are accessible by +trying these open source tips. +![Women in computing and open source v5][1] + +Wordle seems to be popping up everywhere across social media feeds. Wordle is a quick word game that you can play once daily, and you can easily share results with friends over social media. + +The aim of Wordle is to guess a secret word. To make a guess, enter a word, and Wordle displays the results of your guess in a grid of color-coded emoticons. Green indicates that a letter is in the correct location. Yellow indicates that the secret word contains the letter, but it is in the wrong location. And grey means that the letter isn't in the word at all. + +![Sample of wordle results displaying colors for letter position][2] + +AmyJune Hineline (CC BY-SA 4.0) + +It's become common for people to share their progress in the game by pasting the resulting letter grid into social media, which is easy to do because the grid is just a [set of emoji][3]. However, emoticons and emoji have accessibility issues. While they're easy to copy and paste, the shared results can be hard to access for individuals who live with low vision or color blindness. The colors grey, yellow, green can be difficult for some to differentiate. + +![Wordle results statistics][4] + +AmyJune Hineline (CC BY-SA 4.0) + +Inspired by a conversation I had with Mike Lim, I did some poking on the internet and discovered a couple of tips, including an open source project that helps improve the accessibility of shared game results. + +### Use an open source accessibility app + +The [wa11y app][5] is straightforward to use. You can find the wa11y GitHub project [here][6]. Copy your Wordle results and paste them into the app, and it converts your results into words. + +![Emoji converted to words][7] + +AmyJune Hineline (CC BY-SA 4.0) + +You can include emoticons with a simple checkbox to indicate a successful guess, but maintainers warn against this. Assistive technology loves emoticons so much that it reads each and every emoticon. Inline. All of them. Although the technology loves to read them, folks who utilize assistive technology may find it cumbersome and often abandon a message with more than a few emoji. + +![Words and emoji included in the output][8] + +AmyJune Hineline (CC BY-SA 4.0) + +![Emojis are beautiful, but can be frustrating for folks who use screen readers and other accessibility tools. Please consider your audience on social media.][9] + +AmyJune Hineline (CC BY-SA 4.0) + +### Provide accessible images + +Perhaps you don't have access to the wal11y app and still want to ensure your results are accessible. You can take a screenshot, upload the image, and add alt text. There are a few ways you can do this: + + * Attach the image and write the alt text in the message field. + * Attach the image and dive into the accessibility options for your specific social media app and enable alt text and add from there. The open source social network [Mastodon][10] enables actual alt text by default. + * [@AltTxtReminde][11]r is an account you can follow that reminds you to add alt text to images when you forget. + + + +If you do share the default results, there is always the option to add alt text before the emoticons. That way, your audience has access to the text information but can abort the rest of the message before repeating emoji becomes cumbersome. + +![Twitter wordle results without text][12] + +AmyJune Hineline (CC BY-SA 4.0) + +![Twitter results with descriptive explanation of results][13] + +AmyJune Hineline (CC BY-SA 4.0) + +### Wrap up + +Wordle is a hot game on the internet these days, so when sharing your results be sure to keep accessibility in mind. There are a few simple approaches using open source technology to make your results easier to share with everyone. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/open-source-accessibility-wordle + +作者:[AmyJune Hineline][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/amyjune +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_5.png?itok=YHpNs_ss (Women in computing and open source v5) +[2]: https://opensource.com/sites/default/files/apple.png +[3]: https://opensource.com/article/19/10/how-type-emoji-linux +[4]: https://opensource.com/sites/default/files/statistics.png +[5]: http://wa11y.co/ +[6]: https://github.com/cariad/wa11y.co +[7]: https://opensource.com/sites/default/files/do-not-include-emoji.png +[8]: https://opensource.com/sites/default/files/include-emoji.png +[9]: https://opensource.com/sites/default/files/wa11y_0.png +[10]: https://opensource.com/article/17/4/guide-to-mastodon +[11]: https://twitter.com/alttxtreminder +[12]: https://opensource.com/sites/default/files/twitter.png +[13]: https://opensource.com/sites/default/files/twitter-with-ords.png From b3f6bbf4a8a25dd15a980000c4fbe8d48ade7c23 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 31 Jan 2022 05:02:37 +0800 Subject: [PATCH 139/334] add done: 20220130 Open source tools to make your Wordle results accessible.md --- sources/tech/20220130 .md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 sources/tech/20220130 .md diff --git a/sources/tech/20220130 .md b/sources/tech/20220130 .md new file mode 100644 index 0000000000..cc8ced3f63 --- /dev/null +++ b/sources/tech/20220130 .md @@ -0,0 +1,16 @@ +[#]: subject: "" +[#]: via: "https://www.debugpoint.com/2022/01/dnf-commands-examples/" +[#]: author: "[Arindam] + +Posted by Arindam + +Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + + +====== + From 778f9457f9443ae7b9c586969b4c1442dd273f4b Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 31 Jan 2022 05:03:31 +0800 Subject: [PATCH 140/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220130=20?= =?UTF-8?q?I=20Used=20Linux-Based=20PinePhone=20Daily=20For=20A=20Year.=20?= =?UTF-8?q?Here=E2=80=99s=20What=20I=20Learned!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md --- ...Daily For A Year. Here-s What I Learned.md | 201 ++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 sources/news/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md diff --git a/sources/news/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md b/sources/news/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md new file mode 100644 index 0000000000..a5c398e167 --- /dev/null +++ b/sources/news/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md @@ -0,0 +1,201 @@ +[#]: subject: "I Used Linux-Based PinePhone Daily For A Year. Here’s What I Learned!" +[#]: via: "https://news.itsfoss.com/pinephone-review/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +I Used Linux-Based PinePhone Daily For A Year. Here’s What I Learned! +====== + +When Pine64 announced the PinePhone in 2019, no one could have foreseen the tremendous impact it would have on mobile Linux, desktop Linux, and privacy as a whole. + +As one of the [few phones designed specifically to run desktop Linux][1], it had all the features of a low-end Android phone, combined with the versatility of a laptop. Unfortunately, desktop Linux is just that; it is made for _desktops_, not phones. + +Fortunately, thanks to the incredible power of the GNOME, KDE, Pine64, and general Linux communities, whole new desktop environments, applications, and distributions were born. Some of the more recognizable of these include Plasma Mobile, [Phosh][2], Megapixels, and Mobian. + +With all the key pieces in place, all Pine64 needed to was to sell PinePhones, and sell PinePhones they did. Every community edition (each preloaded with a different distro) pre-ordering round received thousands of orders, one of which was mine. + +Since I received my unit in December 2020, the PinePhone has been a key part in my daily life, with me using it as my daily driver for the whole of 2021. Here are my experiences with it. + +### It’s Performance Is Like Molasses + +![Opening Firefox on the PinePhone][3] + +Sporting an Allwinner a64 SoC, the PinePhone has just enough power to do the most basic phone tasks. Even simple things, like opening Firefox, can take almost 20 seconds, no doubt thanks to its measly 4 cores. This is in stark comparison to modern mid-range and high-end Android phones, all of which have 8 core processors running at least at 2 GHz. + +Fortunately, the community has again stepped in, implementing thousands of small software optimizations. While still not as performant as it’s Android competitors, this does mean the PinePhone is pretty usable for most phone tasks, and even some desktop-oriented apps when using an external monitor through the included dock. + +Despite all of this, the PinePhone is capable enough for most situations, even if it might stutter a bit here and there. But what about the battery? Can it really last all day? + +### The Battery Is… Okay + +![][4] + +While I would love to be able to say that thanks to the PinePhone’s low-power components, the battery life is incredible. Unfortunately, this is not the case, even after all the battery saving improvements that have been implemented. + +After charging it overnight, I usually read the news in the morning, followed by some more at lunchtime. Even though this amounts to less than an hour of screen-on time, the battery still drops about 35% pretty consistently, leaving me with just 65% for the afternoon. Fortunately, this is not a major issue, especially as the modem’s deep sleep function works perfectly. + +For those of you that don’t know, almost all mobile phones put their modem into a deep sleep mode, which basically powers off everything except for what is required to receive calls and texts. Then, when you receive a call, the modem wakes up itself and the SoC, which then starts ringing. + +From my experience, the implementation of deep sleep on the PinePhone has been absolutely incredible, with not a single call being missed. As a result of this, the PinePhones screen-off battery life has been pretty impressive considering its terrible screen-on time. I’ve consistently managed more than 60 hours of battery life with minimal usage, something I can’t say about my Galaxy S20 FE. + +### Don’t Expect Fancy Photos + +Left: iPhone 4S, Right: PinePhone + +With a measly 5 MP rear shooter and an even smaller 2 MP front camera, don’t expect to be taking professional-grade photos. Even many USB webcams offer better image quality, as well as more general features. Heck, the PinePhone’s camera isn’t even capable of taking videos! + +The small amount of post-processing done does help clean up the photos a bit, although not enough to make them social media-ready. For comparison, here is the same photo taken on an iPhone 4S (from 2011) and the PinePhone (from 2019). + +Between the ancient SoC, average battery life, and lackluster cameras, it is clear the PinePhone’s hardware is definitely not it’s forte. But can the software save it? + +### Desktop Environment Or Mobile Environment? + +Within the world of mobile Linux, there are three major players in the desktop environment space. These are: + + * Plasma Mobile + * Phosh + * [Lomiri][5] + + + +Over the course of my time daily driving the PinePhone, I spent roughly 4 months with each environment. During this time, I found a number of different features, problems, and levels of matureness between them, which I will be discussing here. + +#### Plasma Mobile + +![Image Credit: KDE Plasma Mobile][6] + +Released back in 2015 just after Plasma 5, Plasma Mobile has been silently being developed in the background for almost 7 years. Between the time of its initial release and the release of the PinePhone, the team behind Plasma Mobile managed to create a fairly usable mobile desktop environment. + +However, with the release of the PinePhone, this has all changed. Many of the numerous bugs that plagued Plasma Mobile have been ironed out, and immense work was put into improving the UI. + +As a KDE project, Plasma Mobile makes extensive use of Kirigami, which results in an extremely consistent and mobile-friendly app ecosystem. Additionally, many of the pre-existing KDE apps also scale perfectly to it. + +This app ecosystem is extended even further thanks to the Maui project, which just released their Maui Shell (more on that soon). Thanks to their powerful suite of utility apps, Plasma Mobile is a true Android replacement. + +However, that’s not to say that Plasma Mobile is perfect. Even in 2022, there are still a number of remaining bugs and issues. However, this is offset by its mature app ecosystem, extensive use of gestures, and purely mobile focus. + +#### Phosh + +![Screenshots of Phosh on the PinePhone][7] + +Phosh, developed primarily by Purism, is the GTK equivalent of Plasma Mobile. Originally built for the Librem 5, it has been in the works since 2018. At just 4 years old, you may be led to believe that Phosh is immature, but that couldn’t be further from the truth. + +In fact, I never encountered a single crash with Phosh for more than 3 months, compared to days between crashes in Plasma Mobile. Of course, being built on GTK and other Gnome technologies, Phosh has a number of apps available. Some popular apps that work perfectly include: + + * Firefox + * Geary + * Headlines (Reddit app) + * Megapixels (Camera app) + * Gnome Maps + + + +Additionally, many apps designed for Plasma Mobile also work perfectly, even though they use Kirigami. Unfortunately, while many GTK apps are available, they don’t scale anywhere near as well as Kirigami apps do, so developers have to specifically make their apps compatible with Phosh and the PinePhone. + +Additionally, GTK is a primarily desktop-oriented UI toolkit, meaning features such as gestures, and even apps being able to fit on the screen are patchy at best, and non-existent at worst. + +Fortunately, though, Purism has put a lot of work into the default Gnome apps, which are all perfectly usable and fast. + +Overall, Phosh is extremely solid, especially for users of Gnome on desktop and laptop computers. However, it is also held back by its lack of core mobile features, and optimized apps. + +#### Lomiri + +![Lomiri on the PinePhone][8] + +I doubt you will have heard of this, as it only recently had its name changed. Formerly known as Unity 8, it is the default desktop environment of the Ubuntu Touch operating system. It is also available on Manjaro ARM. + +Built using Qt Quick, it is probably the most mature desktop environment for the PinePhone. It makes great use of gestures for core system functions, and has a huge range of apps made specifically for it. + +However, it also suffers from being only usable on Ubuntu Touch, as none of the apps have been ported to Manjaro. As a result, users of it are subject to Ubuntu Touch’s “locked-down” style, similar to Android and iOS. + +While this might be a good thing for typical users, PinePhone owners are generally tinkerers who like control over their device, which is made much harder with Ubuntu Touch. + +### Operating Systems + +As with any Linux-focused device, there are a huge number of distros and operating systems available. At the time of writing, the Pine64 wiki lists 21 individual operating systems, all in various levels of completeness. + +However, amongst these various operating systems, there are 4 that I have had a great experience with on the PinePhone: + + * Manjaro ARM + * Mobian + * SailfishOS + * Ubuntu Touch + + + +While I’m not going to go into detail about each of them, they’re all great choices and perfectly functional for most tasks. With the exception of SailfishOS, they are all also open-source, while SailfishOS is mostly open-source. + +### A Note On Android Apps + +As you may have guessed by now, app support can be a bit of a problem. Even looking at the almost 400 confirmed working apps on the PinePhone, this pales in comparison to the millions available for Android and iOS. + +Fortunately, there are ways around this, the easiest being to emulate Android apps using a compatibility layer. For this, Anbox has been the go-to for a few years now. + +#### Anbox + +If WINE is a compatibility layer for Windows, then Anbox is the same for Android. After installing it, or opening it as it comes preinstalled with many distributions, it is as simple as running a single command to install an APK file. + +From here, the app behave just as any Linux app, albeit with a significant hit to performance. + +Recently, a group of people decided they were going to address this, creating a new project called Waydroid. + +#### Waydroid + +Waydroid is the latest attempt at an Android emulator for the PinePhone, and even at this early stage it looks extremely promising. It manages pretty incredible performance, especially compared to Anbox, thanks to the android apps running directly on the hardware. + +As a result, many extremely popular apps work perfectly, such as F-Droid and the Aurora Store. + +Additionally, apps installed through Waydroid are integrated really well into Linux, with them being able to be opened and closed just like any other app. + +### My Concluding Thoughts On The PinePhone + +Over the course of my time with it, I spent time with almost all the different operating systems available for it, as well as every desktop environment. As I said before, its performance was generally quite poor, although Lomiri and Plasma Mobile were smooth enough. + +I don’t take photos that often, so the camera got very little use. However, when I did take photos, they were generally good enough, even if they weren’t particularly high quality. + +In general, I think the biggest weakness of the PinePhone was actually it’s battery life. This is because even just turning it on to check the time wakes up the modem, causing the battery to drain quickly unless I made an effort not to turn it on. + +Fortunately, I always made sure to carry a spare battery with me that I could pop in by removing the back cover. Here, I could also insert an SD card to be used as additional storage or to test a new OS. + +As to be expected, the PinePhone is not waterproof, but I did find that using it in the rain appeared to do no damage, although your mileage may vary. When I was inside, I often found myself using it with an external monitor using it’s included dock. + +With this setup, I was surprised at how capable the PinePhone was as a laptop. I often found myself editing documents in LibreOffice, and at one point even managed to edit a video using Kdenlive! + +Overall, even with its quirks, my year with the PinePhone went quite well, and I never really found my self longing for my Android. + +### Getting A PinePhone + +If you want to get a PinePhone for yourself, there is a button below that will take you to Pine64’s website. At the time of writing, there are two models available, one with 16 GB of storage and 2 GB of RAM. The other model has 32 GB of storage and 3 GB of RAM. + +The model used in this review was the 3 GB version, which costs $199 USD. The 2 GB model costs $149 USD. + +[Get A PinePhone][9] + +Let’s just hope that the upcoming PinePhone Pro can keep this positive trend up with its more powerful hardware! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/pinephone-review/ + +作者:[Jacob Crume][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/linux-phones/ +[2]: https://github.com/agx/phosh +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU0MCIgd2lkdGg9Ijk2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[5]: https://lomiri.com/ +[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMwMCIgd2lkdGg9IjQ0MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI5NSIgd2lkdGg9IjQ0OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM2MiIgd2lkdGg9IjIwNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[9]: https://pine64.com/product-category/pinephone/ From b658f68a959362cf8fc1d5ba5513bb6adb0d2619 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 31 Jan 2022 05:03:38 +0800 Subject: [PATCH 141/334] add done: 20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md --- sources/tech/20220131 .md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 sources/tech/20220131 .md diff --git a/sources/tech/20220131 .md b/sources/tech/20220131 .md new file mode 100644 index 0000000000..9055ca39f6 --- /dev/null +++ b/sources/tech/20220131 .md @@ -0,0 +1,16 @@ +[#]: subject: "" +[#]: via: "https://www.debugpoint.com/2022/01/nitrux-2-0-release/" +[#]: author: "[Arindam] + +Posted by Arindam + +Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + + +====== + From e150706ef455adc5eda75e83504d26dd08a94cc4 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Mon, 31 Jan 2022 08:28:54 +0800 Subject: [PATCH 142/334] Delete 20220131 .md --- sources/tech/20220131 .md | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 sources/tech/20220131 .md diff --git a/sources/tech/20220131 .md b/sources/tech/20220131 .md deleted file mode 100644 index 9055ca39f6..0000000000 --- a/sources/tech/20220131 .md +++ /dev/null @@ -1,16 +0,0 @@ -[#]: subject: "" -[#]: via: "https://www.debugpoint.com/2022/01/nitrux-2-0-release/" -[#]: author: "[Arindam] - -Posted by Arindam - -Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - - -====== - From 84803a80dd9edcfab05dc9ad48f4fc8e39c4f75f Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Mon, 31 Jan 2022 08:30:20 +0800 Subject: [PATCH 143/334] Delete 20220130 .md --- sources/tech/20220130 .md | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 sources/tech/20220130 .md diff --git a/sources/tech/20220130 .md b/sources/tech/20220130 .md deleted file mode 100644 index cc8ced3f63..0000000000 --- a/sources/tech/20220130 .md +++ /dev/null @@ -1,16 +0,0 @@ -[#]: subject: "" -[#]: via: "https://www.debugpoint.com/2022/01/dnf-commands-examples/" -[#]: author: "[Arindam] - -Posted by Arindam - -Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - - -====== - From eb926ae35c9e5faef7c9e072232b1e536b45b817 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 31 Jan 2022 08:41:08 +0800 Subject: [PATCH 144/334] A --- ...core Markdown Users for Creating Knowledge Graph of Notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md b/sources/tech/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md index 574feb7e62..5268f4ed88 100644 --- a/sources/tech/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md +++ b/sources/tech/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/obsidian-markdown-editor/" [#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 3e9fef1944717a61edfbcb1902056cd78c67022c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 31 Jan 2022 09:28:29 +0800 Subject: [PATCH 145/334] TR @wxy --- ...s for Creating Knowledge Graph of Notes.md | 113 ----------------- ...s for Creating Knowledge Graph of Notes.md | 115 ++++++++++++++++++ 2 files changed, 115 insertions(+), 113 deletions(-) delete mode 100644 sources/tech/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md create mode 100644 translated/tech/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md diff --git a/sources/tech/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md b/sources/tech/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md deleted file mode 100644 index 5268f4ed88..0000000000 --- a/sources/tech/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md +++ /dev/null @@ -1,113 +0,0 @@ -[#]: subject: "Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes" -[#]: via: "https://itsfoss.com/obsidian-markdown-editor/" -[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes -====== - -I like using Markdown for writing articles and taking notes. I am uncertain if I fit the criteria for a ‘hardcore Markdown user’ or not but I find it convenient for my writing works. - -I have tried several markdown editors on Linux. [Joplin][1] is my favorite for taking and organizing notes and keeping a backup on Nextcloud. There is also [Zettlr][2] which is suitable for researchers. - -Recently, I came across another Markdown editor that has a twist on document organizing. You can use it to interlink your documents and display them in a mind-map like graphical view. - -![Obsidian Markdown Editor][3] - -That’s the main attraction of [Obsidian][4] that you can get a graphical view of your Markdown notes specially when these notes have to be linked with each other. There are other features here as well. - -Non-FOSS alert! - -Initially, I thought that Obsidian was an open source software. It was only when I was looking for their source code repository (after I finished writing this article) that I realized it is [free-to-use application][5] but not FOSS (free and open source software). Which is a shame because it’s a damn good application and hence I continued to feature it here. - -### Features of Obsidian markdown editor - -You’ll find all features you expect from a standard Markdown editor. There is a sidebar to show the folder structure and a main pane where your document lies. You can choose to switch between ‘edit’ and ‘read’ view. - -![Interface of Obsidian markdown editor][6] - -By default, it displays one pane only but you can add more panes as per your liking. For example, I added a new pane to show both editing and viewing modes. This enables to edit and preview the document at the same time. - -![You can split the editor vertically or horizontally to add more panes for side by side viewing][7] - -You can create internal links to existing notes by pressing [[ keys. It opens a file searcher and lets you select from the existing notes in the same project (called vaults here). - -![Creating internal linking in Obsidian][8] - -You can switch to the Graph view to display the connection between the notes in the same vault (project). I made a few quick internal links to perform a test and you can see that it shows how files are interlinked to each other. - -![Obsidian Graph View][9] - -You can perform search and replace graphically. Tag the notes, merge files, move headlines between notes and more. - -It also has a command palette (located in the left sidebar of the editor) that allows you to control various aspects of the editor. Several of these ‘actions’ can be performed using keyboard shortcuts as well. - -![Obsidian command palette][10] - -This is not it. Obsidian also has a [community marketplace][11] where you can find and install plugins to extend its capabilities. For example, you can download the Kanban plugin and use Obsidian to manage projects and tasks. - -![Obsidian also has third-party, community plugins][12] - -There are plenty more features here and I can possibly not list all of them. Even the project website doesn’t list all the features at once place which is a bummer. - -### Installing Obsidian - -Obsidian is a cross platform application and it is available for Linux, macOS, Windows, Android and iOS. - -For Linux, you have the option to use AppImage, Snap or Flatpak. I used the AppImage version for testing. You can find relevant information and files on its download page. - -[Download Obsidian][13] - -### Is it worth it? - -Obsidian has a learning curve. You need to know the [basics of Markdown][14] of course but even for any features besides editing and displaying Markdown text, you need to learn things here. - -Almost any application requires some learning but to use Obsidian to its fullest, you need to put in more effort than the usual. - -But it’s entirely worth it if you are an obsessive Markdown user and with tons of documents. The good thing here is that it has [extensive documentation][15] to help you with your learning process. This documentation is also accessible from within the application interface when you hit the Help button (displayed with a question mark). - -![Accessing documentation on Obsidian][16] - -Obsidian interface makes me feel like I am using VS Code and that’s not a negative thing. - -If you live and breath Markdown and you are also obsessed with managing your documents properly, you should consider giving Obsidian a try. - -If you like it enough and start using it regularly, perhaps you may [consider a donation][17] or opt in for their premium offering to support the development of this project. The premium offering includes the option to sync your notes to their cloud or publish your notes on a website. - -Obsidian has been done professionally and beautifully. It’s like Visual Studio Code for Markdown and it has potential to become a true alternative to the likes of [Notion][18]. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/obsidian-markdown-editor/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/joplin/ -[2]: https://itsfoss.com/zettlr-markdown-editor/ -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/obsidian.jpg?resize=800%2C424&ssl=1 -[4]: https://obsidian.md/ -[5]: https://obsidian.md/eula -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Markdown-Editor-800x462.png?resize=800%2C462&ssl=1 -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-multiple-pane.png?resize=800%2C462&ssl=1 -[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Internal-Linking.webp?resize=800%2C450&ssl=1 -[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Graph-View.png?resize=800%2C474&ssl=1 -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Command-Palette.png?resize=800%2C474&ssl=1 -[11]: https://obsidian.md/plugins -[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Plugins.webp?resize=800%2C364&ssl=1 -[13]: https://obsidian.md/download -[14]: https://itsfoss.com/markdown-guide/ -[15]: https://help.obsidian.md/Obsidian/Index -[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Markdown-Editor-Help.png?resize=800%2C439&ssl=1 -[17]: https://obsidian.md/pricing -[18]: https://www.notion.so/ diff --git a/translated/tech/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md b/translated/tech/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md new file mode 100644 index 0000000000..ea558bc537 --- /dev/null +++ b/translated/tech/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md @@ -0,0 +1,115 @@ +[#]: subject: "Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes" +[#]: via: "https://itsfoss.com/obsidian-markdown-editor/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +黑曜石:Markdown 硬核用户创建知识图谱的 Notion 替代品 +====== + +![](https://img.linux.net.cn/data/attachment/album/202201/31/092728iergl6eayrrrwzuz.jpg) + +我喜欢用 Markdown 来写文章和做笔记。我不确定我是否符合 “Markdown 硬核用户”的标准,但我觉得它对我的写作工作很方便。 + +我在 Linux 上试过几个 Markdown 编辑器。我最喜欢的是 [Joplin][1],它可以用来做笔记和组织笔记,并在 Nextcloud 上保留备份。还有 [Zettlr][2],它适合于研究人员。 + +最近,我遇到了另一个 Markdown 编辑器,它在文档整理方面意外的不错。你可以用它将你的文件相互连接起来,并以类似思维导图的图形方式显示出来。 + +![黑曜石 Markdown 编辑器][3] + +这就是 [黑曜石][4]Obsidian 的主要吸引力,你可以用图形的方式查看你的 Markdown 笔记,特别是当这些笔记需要相互连接的时候。当然,它也有其他的功能。 + +> 非 FOSS 警报! +> +> 最初,我以为黑曜石是一个开源软件。当我寻找他们的源代码库时(在我写完这篇文章后),我才意识到它是 [免费使用的应用程序][5],但不是 FOSS(自由及开源软件)。这让我觉得惭愧,因为它实在是一个好应用,好到让我继续在这里介绍它。 + +### 黑曜石 Markdown 编辑器的功能 + +在黑曜石里,你会发现你期望从一个标准的 Markdown 编辑器得到的所有功能。它有一个侧边栏来显示文件夹结构,还有一个主窗格来显示你的文档。你可以选择在“编辑”和“阅读”视图之间切换。 + +![黑曜石 Markdown 编辑器的界面][6] + +默认情况下,它只显示一个窗格,但你可以根据自己的喜好添加更多的窗格。例如,我添加了一个新的窗格来同时显示编辑和查看模式,这样就可以在同一时间编辑和预览文档。 + +![你可以垂直或水平地分割编辑器,以增加更多的窗格来并排查看][7] + +你可以通过按 `[[` 键来创建现有笔记的内部链接。它可以打开一个文件搜索器,让你从同一项目(这里称为 “金库vault”)中的现有笔记中选择。 + +![在黑曜石创建内部链接][8] + +你可以切换到“图表视图”来显示同一个“金库”(项目)中的笔记之间的联系。我快速做了几个内部链接来进行测试,你可以看到它显示了文件之间的相互联系。 + +![黑曜石图表视图][9] + +你可以图形化地进行搜索和替换。对笔记进行备注、合并文件、在笔记之间移动标题等等。 + +它还有一个命令模式(位于编辑器的左侧侧边栏),允许你控制编辑器的各个方面。其中一些“动作”也可以用键盘快捷键来完成。 + +![黑曜石命令调色板][10] + +这还不是全部。黑曜石还有一个 [社区市场][11],在那里你可以找到并安装插件来扩展其功能。例如,你可以下载看板插件,用黑曜石来管理项目和任务。 + +![黑曜石也有第三方的社区插件][12] + +这里还有很多功能,我不可能把它们全部列出。即使是项目网站也没有一次性列出所有的功能,这是很无奈的。 + +### 安装黑曜石 + +黑曜石是一个跨平台的应用程序,它可用于 Linux、macOS、Windows、Android 和 iOS。 + +对于 Linux,你可以选择使用 AppImage、Snap 或 Flatpak。我使用 AppImage 版本进行测试。你可以在其下载页面找到相关信息和文件。 + +- [下载黑曜石][13] + +### 它值得使用吗? + +黑曜石有一个学习曲线。你当然需要了解 [Markdown 的基础知识][14],但是除了编辑和显示 Markdown 文本之外的任何功能,你都需要在这里学习。 + +几乎任何应用程序都需要一些学习,但要想充分使用黑曜石,你需要付出比平常更多的努力。 + +但如果你是一个痴迷于 Markdown 的用户,并且有成吨的文档,这完全是值得的。这里的好处是它有 [丰富的文档][15] 来帮助你的学习过程。当你点击帮助按钮(显示为问号)时,这些文档也可以从应用界面中获得。 + +![访问黑曜石的文档][16] + +黑曜石的界面让我觉得我在使用 VS Code,这并不是一件坏事。 + +如果你以 Markdown 为生,并且对正确管理你的文档很着迷,你应该考虑尝试一下黑曜石。 + +如果你足够喜欢它并开始定期使用它,也许你可以 [考虑捐赠][17] 或使用他们的高级产品以支持这个项目的发展。高级产品包括选择将你的笔记同步到他们的云端,或者将你的笔记发布到网站上。 + +黑曜石已经做得很专业和漂亮了。它就像 VS Code 的 Markdown 版,它有可能成为 [Notion][18] 等的真正替代品。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/obsidian-markdown-editor/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/joplin/ +[2]: https://itsfoss.com/zettlr-markdown-editor/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/obsidian.jpg?resize=800%2C424&ssl=1 +[4]: https://obsidian.md/ +[5]: https://obsidian.md/eula +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Markdown-Editor-800x462.png?resize=800%2C462&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-multiple-pane.png?resize=800%2C462&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Internal-Linking.webp?resize=800%2C450&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Graph-View.png?resize=800%2C474&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Command-Palette.png?resize=800%2C474&ssl=1 +[11]: https://obsidian.md/plugins +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Plugins.webp?resize=800%2C364&ssl=1 +[13]: https://obsidian.md/download +[14]: https://itsfoss.com/markdown-guide/ +[15]: https://help.obsidian.md/Obsidian/Index +[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Markdown-Editor-Help.png?resize=800%2C439&ssl=1 +[17]: https://obsidian.md/pricing +[18]: https://www.notion.so/ From 71359786f1de1854ce83571da2a812ce1751dd9f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 31 Jan 2022 09:30:18 +0800 Subject: [PATCH 146/334] P @wxy https://linux.cn/article-14230-1.html --- ...re Markdown Users for Creating Knowledge Graph of Notes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md (98%) diff --git a/translated/tech/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md b/published/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md similarity index 98% rename from translated/tech/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md rename to published/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md index ea558bc537..8cd4a95a99 100644 --- a/translated/tech/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md +++ b/published/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14230-1.html" 黑曜石:Markdown 硬核用户创建知识图谱的 Notion 替代品 ====== From 42cc0816286850c7a7050f8556e823bc76aa921e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 31 Jan 2022 23:07:25 +0800 Subject: [PATCH 147/334] =?UTF-8?q?=E5=BD=92=E6=A1=A3=20202201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20190108 Create your own video streaming server with Linux.md | 0 ...T offers a way to track COVID-19 via connected thermometers.md | 0 ...make frequency sharing more efficient for wireless networks.md | 0 .../20200717 A brief history of the Content Management System.md | 0 .../{ => 202201}/20210704 Pricing Yourself as a Contractor 101.md | 0 ... Education- Best Distributions for Kids, Teachers - Schools.md | 0 .../20210901 Ubuntu Server vs Desktop- What-s the Difference.md | 0 .../20210914 Revolt- An Open-Source Alternative to Discord.md | 0 .../{ => 202201}/20210916 Crunch numbers in Python with NumPy.md | 0 .../20211027 Bash Shell Scripting for beginners (Part 2).md | 0 ...2 What you need to know about cluster logging in Kubernetes.md | 0 ...s a great time to consider a career in open source hardware.md | 0 .../20211126 10 holiday gift ideas for open source enthusiasts.md | 0 .../{ => 202201}/20211201 Edit audio on Linux with Audacity.md | 0 ...11211 What Desktop Linux Needs to Succeed in the Mainstream.md | 0 .../20211219 Open source file sharing with this Linux tool.md | 0 .../{ => 202201}/20211224 10 reasons to love Linux in 2021.md | 0 .../20211225 10 Raspberry Pi project ideas from 2021.md | 0 .../20211226 9 open source alternatives to try in 2022.md | 0 ...27 5 ways open source software transformed business in 2021.md | 0 ...1227 My Top 5 Favorite Linux Apps That I Discovered in 2021.md | 0 .../20211228 7 Linux Distros to Look Forward to in 2022.md | 0 ...rectory- Here-s Why Folders are Called Directories in Linux.md | 0 ...1229 Open source tools for running a small business in 2022.md | 0 ... Maui Shell is Here, Ushering in a New Era of Desktop Linux.md | 0 ...20211231 15 ways to advance your Kubernetes journey in 2022.md | 0 .../20220101 Using GNOME Screenshot Tool in Linux Like a Pro.md | 0 ...0 Git tutorials to level up your open source skills in 2022.md | 0 ...0104 5 tips for learning a new programming language in 2022.md | 0 ...4 Deepin Desktop With Ubuntu- UbuntuDDE Remix 21.10 is Here.md | 0 ... Give a ‘Superpower- to Linux that Windows Users Don-t Have.md | 0 ... a Major Upgrade With GTK 3 Port and Improved HiDPI Support.md | 0 ...20220105 5 ways to learn the C programming language in 2022.md | 0 .../20220105 Why might you run your own DNS server.md | 0 ...ith Cinnamon 5.2, Theme Refresh, and a New Document Manager.md | 0 .../20220106 Must-have open source cheat sheets for 2022.md | 0 published/{ => 202201}/20220107 Try FreeDOS in 2022.md | 0 ...ny Yet Useful Features I Would Like to See in GNOME in 2022.md | 0 ...rave vs. Google Chrome- Which is the better browser for you.md | 0 .../{ => 202201}/20220109 9 ways to learn Ansible this year.md | 0 ...20220111 8 surprising things I learned about Python in 2021.md | 0 ...t is a Free and Open Source Teleprompter for Video Creators.md | 0 .../20220111 Run containers on Linux without sudo in Podman.md | 0 .../20220112 How to build an open source metaverse.md | 0 ...2 Modern Alternatives to Some of the Classic Linux Commands.md | 0 ...220113 Here are the New Features Coming to Ubuntu 22.04 LTS.md | 0 .../20220114 I Tried System76-s New Rust-based COSMIC Desktop.md | 0 .../{ => 202201}/20220114 What makes Linux the sustainable OS.md | 0 ...Comparison Between Two of the Best Arch Linux Based Distros.md | 0 ...r an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md | 0 ... Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md | 0 .../20220117 Record your terminal session with Asciinema.md | 0 ...18 Linux Mint-s Brand New Edge ISO is Available to Download.md | 0 ...nBoard- An Open Source Interactive Whiteboard for Educators.md | 0 ...otect your PHP website from bots with this open source tool.md | 0 ...20119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md | 0 published/{ => 202201}/20220121 Make a video game with Bitsy.md | 0 .../20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md | 0 .../20220122 Our favorite Linux commands to use just for fun.md | 0 ...n Source Add-Ons to Improve Your Mozilla Firefox Experience.md | 0 ...20124 Linux Jargon Buster- What are Upstream and Downstream.md | 0 ...rdcore Markdown Users for Creating Knowledge Graph of Notes.md | 0 .../20220126 Jrnl- Your Digital Diary in the Linux Terminal.md | 0 63 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 202201}/20190108 Create your own video streaming server with Linux.md (100%) rename published/{ => 202201}/20200421 IoT offers a way to track COVID-19 via connected thermometers.md (100%) rename published/{ => 202201}/20200629 NIST aims to make frequency sharing more efficient for wireless networks.md (100%) rename published/{ => 202201}/20200717 A brief history of the Content Management System.md (100%) rename published/{ => 202201}/20210704 Pricing Yourself as a Contractor 101.md (100%) rename published/{ => 202201}/20210715 Linux for Education- Best Distributions for Kids, Teachers - Schools.md (100%) rename published/{ => 202201}/20210901 Ubuntu Server vs Desktop- What-s the Difference.md (100%) rename published/{ => 202201}/20210914 Revolt- An Open-Source Alternative to Discord.md (100%) rename published/{ => 202201}/20210916 Crunch numbers in Python with NumPy.md (100%) rename published/{ => 202201}/20211027 Bash Shell Scripting for beginners (Part 2).md (100%) rename published/{ => 202201}/20211112 What you need to know about cluster logging in Kubernetes.md (100%) rename published/{ => 202201}/20211113 Why now is a great time to consider a career in open source hardware.md (100%) rename published/{ => 202201}/20211126 10 holiday gift ideas for open source enthusiasts.md (100%) rename published/{ => 202201}/20211201 Edit audio on Linux with Audacity.md (100%) rename published/{ => 202201}/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md (100%) rename published/{ => 202201}/20211219 Open source file sharing with this Linux tool.md (100%) rename published/{ => 202201}/20211224 10 reasons to love Linux in 2021.md (100%) rename published/{ => 202201}/20211225 10 Raspberry Pi project ideas from 2021.md (100%) rename published/{ => 202201}/20211226 9 open source alternatives to try in 2022.md (100%) rename published/{ => 202201}/20211227 5 ways open source software transformed business in 2021.md (100%) rename published/{ => 202201}/20211227 My Top 5 Favorite Linux Apps That I Discovered in 2021.md (100%) rename published/{ => 202201}/20211228 7 Linux Distros to Look Forward to in 2022.md (100%) rename published/{ => 202201}/20211229 Folder or Directory- Here-s Why Folders are Called Directories in Linux.md (100%) rename published/{ => 202201}/20211229 Open source tools for running a small business in 2022.md (100%) rename published/{ => 202201}/20211230 Maui Shell is Here, Ushering in a New Era of Desktop Linux.md (100%) rename published/{ => 202201}/20211231 15 ways to advance your Kubernetes journey in 2022.md (100%) rename published/{ => 202201}/20220101 Using GNOME Screenshot Tool in Linux Like a Pro.md (100%) rename published/{ => 202201}/20220104 10 Git tutorials to level up your open source skills in 2022.md (100%) rename published/{ => 202201}/20220104 5 tips for learning a new programming language in 2022.md (100%) rename published/{ => 202201}/20220104 Deepin Desktop With Ubuntu- UbuntuDDE Remix 21.10 is Here.md (100%) rename published/{ => 202201}/20220104 Intel is Gearing Up to Give a ‘Superpower- to Linux that Windows Users Don-t Have.md (100%) rename published/{ => 202201}/20220104 Pinta 2.0 is a Major Upgrade With GTK 3 Port and Improved HiDPI Support.md (100%) rename published/{ => 202201}/20220105 5 ways to learn the C programming language in 2022.md (100%) rename published/{ => 202201}/20220105 Why might you run your own DNS server.md (100%) rename published/{ => 202201}/20220106 Linux Mint 20.3 -Una- Releases With Cinnamon 5.2, Theme Refresh, and a New Document Manager.md (100%) rename published/{ => 202201}/20220106 Must-have open source cheat sheets for 2022.md (100%) rename published/{ => 202201}/20220107 Try FreeDOS in 2022.md (100%) rename published/{ => 202201}/20220108 5 Tiny Yet Useful Features I Would Like to See in GNOME in 2022.md (100%) rename published/{ => 202201}/20220108 Brave vs. Google Chrome- Which is the better browser for you.md (100%) rename published/{ => 202201}/20220109 9 ways to learn Ansible this year.md (100%) rename published/{ => 202201}/20220111 8 surprising things I learned about Python in 2021.md (100%) rename published/{ => 202201}/20220111 QPrompt is a Free and Open Source Teleprompter for Video Creators.md (100%) rename published/{ => 202201}/20220111 Run containers on Linux without sudo in Podman.md (100%) rename published/{ => 202201}/20220112 How to build an open source metaverse.md (100%) rename published/{ => 202201}/20220112 Modern Alternatives to Some of the Classic Linux Commands.md (100%) rename published/{ => 202201}/20220113 Here are the New Features Coming to Ubuntu 22.04 LTS.md (100%) rename published/{ => 202201}/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md (100%) rename published/{ => 202201}/20220114 What makes Linux the sustainable OS.md (100%) rename published/{ => 202201}/20220115 EndeavourOS and Manjaro- An in-depth Comparison Between Two of the Best Arch Linux Based Distros.md (100%) rename published/{ => 202201}/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md (100%) rename published/{ => 202201}/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md (100%) rename published/{ => 202201}/20220117 Record your terminal session with Asciinema.md (100%) rename published/{ => 202201}/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md (100%) rename published/{ => 202201}/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md (100%) rename published/{ => 202201}/20220119 Protect your PHP website from bots with this open source tool.md (100%) rename published/{ => 202201}/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md (100%) rename published/{ => 202201}/20220121 Make a video game with Bitsy.md (100%) rename published/{ => 202201}/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md (100%) rename published/{ => 202201}/20220122 Our favorite Linux commands to use just for fun.md (100%) rename published/{ => 202201}/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md (100%) rename published/{ => 202201}/20220124 Linux Jargon Buster- What are Upstream and Downstream.md (100%) rename published/{ => 202201}/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md (100%) rename published/{ => 202201}/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md (100%) diff --git a/published/20190108 Create your own video streaming server with Linux.md b/published/202201/20190108 Create your own video streaming server with Linux.md similarity index 100% rename from published/20190108 Create your own video streaming server with Linux.md rename to published/202201/20190108 Create your own video streaming server with Linux.md diff --git a/published/20200421 IoT offers a way to track COVID-19 via connected thermometers.md b/published/202201/20200421 IoT offers a way to track COVID-19 via connected thermometers.md similarity index 100% rename from published/20200421 IoT offers a way to track COVID-19 via connected thermometers.md rename to published/202201/20200421 IoT offers a way to track COVID-19 via connected thermometers.md diff --git a/published/20200629 NIST aims to make frequency sharing more efficient for wireless networks.md b/published/202201/20200629 NIST aims to make frequency sharing more efficient for wireless networks.md similarity index 100% rename from published/20200629 NIST aims to make frequency sharing more efficient for wireless networks.md rename to published/202201/20200629 NIST aims to make frequency sharing more efficient for wireless networks.md diff --git a/published/20200717 A brief history of the Content Management System.md b/published/202201/20200717 A brief history of the Content Management System.md similarity index 100% rename from published/20200717 A brief history of the Content Management System.md rename to published/202201/20200717 A brief history of the Content Management System.md diff --git a/published/20210704 Pricing Yourself as a Contractor 101.md b/published/202201/20210704 Pricing Yourself as a Contractor 101.md similarity index 100% rename from published/20210704 Pricing Yourself as a Contractor 101.md rename to published/202201/20210704 Pricing Yourself as a Contractor 101.md diff --git a/published/20210715 Linux for Education- Best Distributions for Kids, Teachers - Schools.md b/published/202201/20210715 Linux for Education- Best Distributions for Kids, Teachers - Schools.md similarity index 100% rename from published/20210715 Linux for Education- Best Distributions for Kids, Teachers - Schools.md rename to published/202201/20210715 Linux for Education- Best Distributions for Kids, Teachers - Schools.md diff --git a/published/20210901 Ubuntu Server vs Desktop- What-s the Difference.md b/published/202201/20210901 Ubuntu Server vs Desktop- What-s the Difference.md similarity index 100% rename from published/20210901 Ubuntu Server vs Desktop- What-s the Difference.md rename to published/202201/20210901 Ubuntu Server vs Desktop- What-s the Difference.md diff --git a/published/20210914 Revolt- An Open-Source Alternative to Discord.md b/published/202201/20210914 Revolt- An Open-Source Alternative to Discord.md similarity index 100% rename from published/20210914 Revolt- An Open-Source Alternative to Discord.md rename to published/202201/20210914 Revolt- An Open-Source Alternative to Discord.md diff --git a/published/20210916 Crunch numbers in Python with NumPy.md b/published/202201/20210916 Crunch numbers in Python with NumPy.md similarity index 100% rename from published/20210916 Crunch numbers in Python with NumPy.md rename to published/202201/20210916 Crunch numbers in Python with NumPy.md diff --git a/published/20211027 Bash Shell Scripting for beginners (Part 2).md b/published/202201/20211027 Bash Shell Scripting for beginners (Part 2).md similarity index 100% rename from published/20211027 Bash Shell Scripting for beginners (Part 2).md rename to published/202201/20211027 Bash Shell Scripting for beginners (Part 2).md diff --git a/published/20211112 What you need to know about cluster logging in Kubernetes.md b/published/202201/20211112 What you need to know about cluster logging in Kubernetes.md similarity index 100% rename from published/20211112 What you need to know about cluster logging in Kubernetes.md rename to published/202201/20211112 What you need to know about cluster logging in Kubernetes.md diff --git a/published/20211113 Why now is a great time to consider a career in open source hardware.md b/published/202201/20211113 Why now is a great time to consider a career in open source hardware.md similarity index 100% rename from published/20211113 Why now is a great time to consider a career in open source hardware.md rename to published/202201/20211113 Why now is a great time to consider a career in open source hardware.md diff --git a/published/20211126 10 holiday gift ideas for open source enthusiasts.md b/published/202201/20211126 10 holiday gift ideas for open source enthusiasts.md similarity index 100% rename from published/20211126 10 holiday gift ideas for open source enthusiasts.md rename to published/202201/20211126 10 holiday gift ideas for open source enthusiasts.md diff --git a/published/20211201 Edit audio on Linux with Audacity.md b/published/202201/20211201 Edit audio on Linux with Audacity.md similarity index 100% rename from published/20211201 Edit audio on Linux with Audacity.md rename to published/202201/20211201 Edit audio on Linux with Audacity.md diff --git a/published/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md b/published/202201/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md similarity index 100% rename from published/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md rename to published/202201/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md diff --git a/published/20211219 Open source file sharing with this Linux tool.md b/published/202201/20211219 Open source file sharing with this Linux tool.md similarity index 100% rename from published/20211219 Open source file sharing with this Linux tool.md rename to published/202201/20211219 Open source file sharing with this Linux tool.md diff --git a/published/20211224 10 reasons to love Linux in 2021.md b/published/202201/20211224 10 reasons to love Linux in 2021.md similarity index 100% rename from published/20211224 10 reasons to love Linux in 2021.md rename to published/202201/20211224 10 reasons to love Linux in 2021.md diff --git a/published/20211225 10 Raspberry Pi project ideas from 2021.md b/published/202201/20211225 10 Raspberry Pi project ideas from 2021.md similarity index 100% rename from published/20211225 10 Raspberry Pi project ideas from 2021.md rename to published/202201/20211225 10 Raspberry Pi project ideas from 2021.md diff --git a/published/20211226 9 open source alternatives to try in 2022.md b/published/202201/20211226 9 open source alternatives to try in 2022.md similarity index 100% rename from published/20211226 9 open source alternatives to try in 2022.md rename to published/202201/20211226 9 open source alternatives to try in 2022.md diff --git a/published/20211227 5 ways open source software transformed business in 2021.md b/published/202201/20211227 5 ways open source software transformed business in 2021.md similarity index 100% rename from published/20211227 5 ways open source software transformed business in 2021.md rename to published/202201/20211227 5 ways open source software transformed business in 2021.md diff --git a/published/20211227 My Top 5 Favorite Linux Apps That I Discovered in 2021.md b/published/202201/20211227 My Top 5 Favorite Linux Apps That I Discovered in 2021.md similarity index 100% rename from published/20211227 My Top 5 Favorite Linux Apps That I Discovered in 2021.md rename to published/202201/20211227 My Top 5 Favorite Linux Apps That I Discovered in 2021.md diff --git a/published/20211228 7 Linux Distros to Look Forward to in 2022.md b/published/202201/20211228 7 Linux Distros to Look Forward to in 2022.md similarity index 100% rename from published/20211228 7 Linux Distros to Look Forward to in 2022.md rename to published/202201/20211228 7 Linux Distros to Look Forward to in 2022.md diff --git a/published/20211229 Folder or Directory- Here-s Why Folders are Called Directories in Linux.md b/published/202201/20211229 Folder or Directory- Here-s Why Folders are Called Directories in Linux.md similarity index 100% rename from published/20211229 Folder or Directory- Here-s Why Folders are Called Directories in Linux.md rename to published/202201/20211229 Folder or Directory- Here-s Why Folders are Called Directories in Linux.md diff --git a/published/20211229 Open source tools for running a small business in 2022.md b/published/202201/20211229 Open source tools for running a small business in 2022.md similarity index 100% rename from published/20211229 Open source tools for running a small business in 2022.md rename to published/202201/20211229 Open source tools for running a small business in 2022.md diff --git a/published/20211230 Maui Shell is Here, Ushering in a New Era of Desktop Linux.md b/published/202201/20211230 Maui Shell is Here, Ushering in a New Era of Desktop Linux.md similarity index 100% rename from published/20211230 Maui Shell is Here, Ushering in a New Era of Desktop Linux.md rename to published/202201/20211230 Maui Shell is Here, Ushering in a New Era of Desktop Linux.md diff --git a/published/20211231 15 ways to advance your Kubernetes journey in 2022.md b/published/202201/20211231 15 ways to advance your Kubernetes journey in 2022.md similarity index 100% rename from published/20211231 15 ways to advance your Kubernetes journey in 2022.md rename to published/202201/20211231 15 ways to advance your Kubernetes journey in 2022.md diff --git a/published/20220101 Using GNOME Screenshot Tool in Linux Like a Pro.md b/published/202201/20220101 Using GNOME Screenshot Tool in Linux Like a Pro.md similarity index 100% rename from published/20220101 Using GNOME Screenshot Tool in Linux Like a Pro.md rename to published/202201/20220101 Using GNOME Screenshot Tool in Linux Like a Pro.md diff --git a/published/20220104 10 Git tutorials to level up your open source skills in 2022.md b/published/202201/20220104 10 Git tutorials to level up your open source skills in 2022.md similarity index 100% rename from published/20220104 10 Git tutorials to level up your open source skills in 2022.md rename to published/202201/20220104 10 Git tutorials to level up your open source skills in 2022.md diff --git a/published/20220104 5 tips for learning a new programming language in 2022.md b/published/202201/20220104 5 tips for learning a new programming language in 2022.md similarity index 100% rename from published/20220104 5 tips for learning a new programming language in 2022.md rename to published/202201/20220104 5 tips for learning a new programming language in 2022.md diff --git a/published/20220104 Deepin Desktop With Ubuntu- UbuntuDDE Remix 21.10 is Here.md b/published/202201/20220104 Deepin Desktop With Ubuntu- UbuntuDDE Remix 21.10 is Here.md similarity index 100% rename from published/20220104 Deepin Desktop With Ubuntu- UbuntuDDE Remix 21.10 is Here.md rename to published/202201/20220104 Deepin Desktop With Ubuntu- UbuntuDDE Remix 21.10 is Here.md diff --git a/published/20220104 Intel is Gearing Up to Give a ‘Superpower- to Linux that Windows Users Don-t Have.md b/published/202201/20220104 Intel is Gearing Up to Give a ‘Superpower- to Linux that Windows Users Don-t Have.md similarity index 100% rename from published/20220104 Intel is Gearing Up to Give a ‘Superpower- to Linux that Windows Users Don-t Have.md rename to published/202201/20220104 Intel is Gearing Up to Give a ‘Superpower- to Linux that Windows Users Don-t Have.md diff --git a/published/20220104 Pinta 2.0 is a Major Upgrade With GTK 3 Port and Improved HiDPI Support.md b/published/202201/20220104 Pinta 2.0 is a Major Upgrade With GTK 3 Port and Improved HiDPI Support.md similarity index 100% rename from published/20220104 Pinta 2.0 is a Major Upgrade With GTK 3 Port and Improved HiDPI Support.md rename to published/202201/20220104 Pinta 2.0 is a Major Upgrade With GTK 3 Port and Improved HiDPI Support.md diff --git a/published/20220105 5 ways to learn the C programming language in 2022.md b/published/202201/20220105 5 ways to learn the C programming language in 2022.md similarity index 100% rename from published/20220105 5 ways to learn the C programming language in 2022.md rename to published/202201/20220105 5 ways to learn the C programming language in 2022.md diff --git a/published/20220105 Why might you run your own DNS server.md b/published/202201/20220105 Why might you run your own DNS server.md similarity index 100% rename from published/20220105 Why might you run your own DNS server.md rename to published/202201/20220105 Why might you run your own DNS server.md diff --git a/published/20220106 Linux Mint 20.3 -Una- Releases With Cinnamon 5.2, Theme Refresh, and a New Document Manager.md b/published/202201/20220106 Linux Mint 20.3 -Una- Releases With Cinnamon 5.2, Theme Refresh, and a New Document Manager.md similarity index 100% rename from published/20220106 Linux Mint 20.3 -Una- Releases With Cinnamon 5.2, Theme Refresh, and a New Document Manager.md rename to published/202201/20220106 Linux Mint 20.3 -Una- Releases With Cinnamon 5.2, Theme Refresh, and a New Document Manager.md diff --git a/published/20220106 Must-have open source cheat sheets for 2022.md b/published/202201/20220106 Must-have open source cheat sheets for 2022.md similarity index 100% rename from published/20220106 Must-have open source cheat sheets for 2022.md rename to published/202201/20220106 Must-have open source cheat sheets for 2022.md diff --git a/published/20220107 Try FreeDOS in 2022.md b/published/202201/20220107 Try FreeDOS in 2022.md similarity index 100% rename from published/20220107 Try FreeDOS in 2022.md rename to published/202201/20220107 Try FreeDOS in 2022.md diff --git a/published/20220108 5 Tiny Yet Useful Features I Would Like to See in GNOME in 2022.md b/published/202201/20220108 5 Tiny Yet Useful Features I Would Like to See in GNOME in 2022.md similarity index 100% rename from published/20220108 5 Tiny Yet Useful Features I Would Like to See in GNOME in 2022.md rename to published/202201/20220108 5 Tiny Yet Useful Features I Would Like to See in GNOME in 2022.md diff --git a/published/20220108 Brave vs. Google Chrome- Which is the better browser for you.md b/published/202201/20220108 Brave vs. Google Chrome- Which is the better browser for you.md similarity index 100% rename from published/20220108 Brave vs. Google Chrome- Which is the better browser for you.md rename to published/202201/20220108 Brave vs. Google Chrome- Which is the better browser for you.md diff --git a/published/20220109 9 ways to learn Ansible this year.md b/published/202201/20220109 9 ways to learn Ansible this year.md similarity index 100% rename from published/20220109 9 ways to learn Ansible this year.md rename to published/202201/20220109 9 ways to learn Ansible this year.md diff --git a/published/20220111 8 surprising things I learned about Python in 2021.md b/published/202201/20220111 8 surprising things I learned about Python in 2021.md similarity index 100% rename from published/20220111 8 surprising things I learned about Python in 2021.md rename to published/202201/20220111 8 surprising things I learned about Python in 2021.md diff --git a/published/20220111 QPrompt is a Free and Open Source Teleprompter for Video Creators.md b/published/202201/20220111 QPrompt is a Free and Open Source Teleprompter for Video Creators.md similarity index 100% rename from published/20220111 QPrompt is a Free and Open Source Teleprompter for Video Creators.md rename to published/202201/20220111 QPrompt is a Free and Open Source Teleprompter for Video Creators.md diff --git a/published/20220111 Run containers on Linux without sudo in Podman.md b/published/202201/20220111 Run containers on Linux without sudo in Podman.md similarity index 100% rename from published/20220111 Run containers on Linux without sudo in Podman.md rename to published/202201/20220111 Run containers on Linux without sudo in Podman.md diff --git a/published/20220112 How to build an open source metaverse.md b/published/202201/20220112 How to build an open source metaverse.md similarity index 100% rename from published/20220112 How to build an open source metaverse.md rename to published/202201/20220112 How to build an open source metaverse.md diff --git a/published/20220112 Modern Alternatives to Some of the Classic Linux Commands.md b/published/202201/20220112 Modern Alternatives to Some of the Classic Linux Commands.md similarity index 100% rename from published/20220112 Modern Alternatives to Some of the Classic Linux Commands.md rename to published/202201/20220112 Modern Alternatives to Some of the Classic Linux Commands.md diff --git a/published/20220113 Here are the New Features Coming to Ubuntu 22.04 LTS.md b/published/202201/20220113 Here are the New Features Coming to Ubuntu 22.04 LTS.md similarity index 100% rename from published/20220113 Here are the New Features Coming to Ubuntu 22.04 LTS.md rename to published/202201/20220113 Here are the New Features Coming to Ubuntu 22.04 LTS.md diff --git a/published/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md b/published/202201/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md similarity index 100% rename from published/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md rename to published/202201/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md diff --git a/published/20220114 What makes Linux the sustainable OS.md b/published/202201/20220114 What makes Linux the sustainable OS.md similarity index 100% rename from published/20220114 What makes Linux the sustainable OS.md rename to published/202201/20220114 What makes Linux the sustainable OS.md diff --git a/published/20220115 EndeavourOS and Manjaro- An in-depth Comparison Between Two of the Best Arch Linux Based Distros.md b/published/202201/20220115 EndeavourOS and Manjaro- An in-depth Comparison Between Two of the Best Arch Linux Based Distros.md similarity index 100% rename from published/20220115 EndeavourOS and Manjaro- An in-depth Comparison Between Two of the Best Arch Linux Based Distros.md rename to published/202201/20220115 EndeavourOS and Manjaro- An in-depth Comparison Between Two of the Best Arch Linux Based Distros.md diff --git a/published/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md b/published/202201/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md similarity index 100% rename from published/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md rename to published/202201/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md diff --git a/published/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md b/published/202201/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md similarity index 100% rename from published/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md rename to published/202201/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md diff --git a/published/20220117 Record your terminal session with Asciinema.md b/published/202201/20220117 Record your terminal session with Asciinema.md similarity index 100% rename from published/20220117 Record your terminal session with Asciinema.md rename to published/202201/20220117 Record your terminal session with Asciinema.md diff --git a/published/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md b/published/202201/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md similarity index 100% rename from published/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md rename to published/202201/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md diff --git a/published/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md b/published/202201/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md similarity index 100% rename from published/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md rename to published/202201/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md diff --git a/published/20220119 Protect your PHP website from bots with this open source tool.md b/published/202201/20220119 Protect your PHP website from bots with this open source tool.md similarity index 100% rename from published/20220119 Protect your PHP website from bots with this open source tool.md rename to published/202201/20220119 Protect your PHP website from bots with this open source tool.md diff --git a/published/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md b/published/202201/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md similarity index 100% rename from published/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md rename to published/202201/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md diff --git a/published/20220121 Make a video game with Bitsy.md b/published/202201/20220121 Make a video game with Bitsy.md similarity index 100% rename from published/20220121 Make a video game with Bitsy.md rename to published/202201/20220121 Make a video game with Bitsy.md diff --git a/published/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md b/published/202201/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md similarity index 100% rename from published/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md rename to published/202201/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md diff --git a/published/20220122 Our favorite Linux commands to use just for fun.md b/published/202201/20220122 Our favorite Linux commands to use just for fun.md similarity index 100% rename from published/20220122 Our favorite Linux commands to use just for fun.md rename to published/202201/20220122 Our favorite Linux commands to use just for fun.md diff --git a/published/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md b/published/202201/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md similarity index 100% rename from published/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md rename to published/202201/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md diff --git a/published/20220124 Linux Jargon Buster- What are Upstream and Downstream.md b/published/202201/20220124 Linux Jargon Buster- What are Upstream and Downstream.md similarity index 100% rename from published/20220124 Linux Jargon Buster- What are Upstream and Downstream.md rename to published/202201/20220124 Linux Jargon Buster- What are Upstream and Downstream.md diff --git a/published/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md b/published/202201/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md similarity index 100% rename from published/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md rename to published/202201/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md diff --git a/published/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md b/published/202201/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md similarity index 100% rename from published/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md rename to published/202201/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md From 9c420db625fc62efd314021a6e1a36ae8f964eda Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 31 Jan 2022 23:42:17 +0800 Subject: [PATCH 148/334] A --- sources/tech/20200110 5 ops hacks for sysadmins.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200110 5 ops hacks for sysadmins.md b/sources/tech/20200110 5 ops hacks for sysadmins.md index 409d5a0716..ece7f655b3 100644 --- a/sources/tech/20200110 5 ops hacks for sysadmins.md +++ b/sources/tech/20200110 5 ops hacks for sysadmins.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From acb3b3f12589545b9762c87b3b4ce12b87810398 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 1 Feb 2022 00:56:49 +0800 Subject: [PATCH 149/334] TR @wxy --- .../20200110 5 ops hacks for sysadmins.md | 63 +++++++++---------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/sources/tech/20200110 5 ops hacks for sysadmins.md b/sources/tech/20200110 5 ops hacks for sysadmins.md index ece7f655b3..9da27cd694 100644 --- a/sources/tech/20200110 5 ops hacks for sysadmins.md +++ b/sources/tech/20200110 5 ops hacks for sysadmins.md @@ -1,79 +1,78 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (5 ops hacks for sysadmins) [#]: via: (https://opensource.com/article/20/1/ops-hacks-sysadmins) [#]: author: (Stephen Bancroft https://opensource.com/users/stevereaver) -5 ops hacks for sysadmins +系统管理员排除故障的五种武器 ====== -Five tools to help you find the source of your users' IT problems when -you don't know where to start. -![Wratchet set tools][1] -As a sysadmin, every day I am faced with problems I need to solve quickly because there are users and managers who expect things to run smoothly. In a large environment like the one I manage, it's nearly impossible to know all of the systems and products from end to end, so I have to use creative techniques to find the source of the problems and (hopefully) come up with solutions. +> 当你不知道从哪里开始时,这五个工具可以帮助你找到用户的 IT 问题的源头。 -This has been my daily experience for well over 20 years, and I love it! Coming to work each day, I never quite know what will happen. So, I have a few quick and dirty tricks that I default to when a problem lands on my lap, but I don't know where to start. +![](https://img.linux.net.cn/data/attachment/album/202202/01/005623l3v5lm73vzv755nn.jpg) -_BUT WAIT!_ Before you jump straight onto the command line, spend some time talking to your users. Yes, it can be tedious, but they will have some good information for you. Keep in mind that users probably don't have as much experience as you have, and you will need to do some interpreting of whatever they say. Try to get a clear picture of what _is_ happening and what _should be_ happening, then describe the fault to yourself in technical language. Be aware that most users don't read what is on the screen in front of them; it's sad but true. Make sure you and the user are reading all of the text to gather as much information as possible. Once you have that together, jump onto the command line with these five tools. +作为系统管理员,我每天都面临着需要快速解决的问题,用户和管理人员期望事情能够顺利地进行。在我管理的这样的一个大型环境中,几乎不可能从头到尾了解所有的系统和产品,所以我必须使用创造性的技术来找到问题的根源,并(希望可以)提出解决方案。 + +这是我 20 多年来的日常经验!每天上班时,我从不知道会发生什么。因此,我有一些快速而简陋的技巧,当一个问题落在我的身上,而我又不知道从哪里开始时,我一般就会采用这些技巧。 + +但等一下!在你直接打开命令行之前,请花一些时间与你的用户交谈。是的,这可能很乏味,但他们可能会有一些好的信息给你。请记住,用户可能没有你那么多的经验,你需要对他们说的东西进行一些解释。试着清楚地了解正在发生什么和应该发生什么,然后用技术语言自己描述故障。请注意,大多数用户并不阅读他们面前的屏幕上的内容;这很可悲,但却是事实。确保你和用户都阅读了所有的文字,以收集尽可能多的信息。一旦你收集到了这些信息,就打开命令行,使用这五个工具。 ### Telnet -I am starting with a classic. [Telnet][2] was the predecessor to SSH, and, in the olden days, it was used on Unix systems to connect to a remote terminal just like SSH does, but it was not encrypted. Telnet has a very neat and invaluable trick for diagnosing network connectivity issues: you can Telnet into TCP ports that are not reserved for it. To do so, use Telnet like you normally would, but add the TCP port onto the end (**telnet localhost 80,** for instance) to connect to a web server. This enables you to check a server to see if a service is running or if a firewall is blocking it. So, without having the application client or even a login for the application, you can check if the TCP port is responding. If you know how, sometimes you can elicit a response from the server by manually typing into the Telnet prompt and checking the response. Web servers and mail servers are two examples where you can do this. +让我从一个经典开始。[Telnet][2] 是 SSH 的前身,在过去,它在 Unix 系统上用来连接到远程终端,就像 SSH 一样,但它没有加密。Telnet 在诊断网络连接问题方面有一个非常巧妙和宝贵的技巧:你可以 Telnet 到不是专属于它 TCP 端口(23/TCP)。要做到这一点,可以像平时一样使用 Telnet,但在末尾加上 TCP 端口(例如 `telnet localhost 80`),以连接到一个网络服务器。这可以让你能够检查一个服务器,看看服务是否正在运行,或者防火墙是否阻挡了它。因此,在没有应用程序客户端,甚至没有登录应用程序的情况下,你可以检查 TCP 端口是否有反应。如果你知道怎么做,有时你可以通过在 Telnet 提示符手动输入并获得响应以检查。网络服务器和邮件服务器是你可以这样做的两个例子。 -![Getting a response from a webserver with Telnet][3] +![用 Telnet 获得网络服务器的响应][3] ### Tcpdump -The [tcpdump][4] tool lets you inspect what data is being transmitted on the network. Most network protocols are fairly simple and, if you combine tcpdump with a tool like [Wireshark][5], you will have a nice, easy way to browse the traffic that you have captured. In the example below, I am inspecting packets in the bottom window and connecting to TCP port 3260 in the top. +[tcpdump][4] 工具可以让你检查网络上正在传输的数据。大多数网络协议都相当简单,如果你把 `tcpdump` 和一个像 [Wireshark][5] 这样的工具结合起来,你会得到一个简单而好用的方法来浏览你所捕获的流量。在如下的例子中,我在下面的窗口中检查数据包,在上面的窗口连接到 TCP 3260 端口。 -![Inspecting packets in real time with tcpdump][6] +![用 tcpdump 实时检查数据包][6] -This screenshot shows a real-world use of Wireshark to look at the iSCSI protocol; in this case, I was able to identify that there was a problem with the way our QNAP network-attached storage was configured. +这张截图显示了在现实世界中使用 Wireshark 查看 iSCSI 协议的情况;在这种情况下,我能够确定我们的 QNAP 网络附加存储的配置方式有问题。 -![Using Wireshark to inspect a TCP session][7] +![使用 Wireshark 检查 TCP 会话][7] ### find -The [find][8] command is simply the best tool if you don't know where to start. In its most simple form, you can use it to "find" files. For example, if I wanted to do a recursive search through all directories and get a list of the conf files, I could enter: - +如果你不知道从哪里开始,[find][8] 命令就是最好的工具。在其最简单的形式中,你可以用它来“寻找”文件。例如,如果我想在所有的目录中进行递归搜索,得到一个 conf 文件的列表,我可以输入: ``` -`find . -name '*.conf'.` +find . -name '*.conf'. ``` -![find command output][9] - -But one of find's hidden gems is that you can use it to execute a command against each item it finds. For example, if I wanted to get a long list of each file, I could enter: +![find 命令输出][9] +但是,`find` 的一个隐藏的宝藏是,你可以用它对它找到的每个项目执行一个命令。例如,如果我想得到每个文件的长列表,我可以输入; ``` -`find . -name '*.conf' -exec ls -las {} \;` +find . -name '*.conf' -exec ls -las {}\; ``` -![find command output][10] +![查找命令输出][10] -Once you know this technique, you can use it in all sorts of creative ways to find, search, and execute programs in specific ways. +一旦你掌握了这种技术,你就可以用各种创造性的方法来寻找、搜索和以特定方式执行程序。 ### strace -I was introduced to the concept of [strace][11] on Solaris, where it is called truss. It is still as useful today as it was all those years ago. strace allows you to inspect what a process is doing as it runs in real time. Using it is simple; just use the command **ps -ef** and find the process ID that you are interested in. Start strace with **strace -p <pid>**; this will start printing out a whole lot of stuff, which at first looks like junk. But if you look closer, you will see text that you recognize, such as words like **OPEN** and **CLOSE** and filenames. This can lead you in the right direction if you are trying to figure out why a program is not working. +我是在 Solaris 上认识 [strace][11] 这个概念的,在那里它被称为 `truss`。今天,它仍然像多年前一样有用。`strace` 允许你在进程实时运行时检查它在做什么。使用它很简单,只要使用命令 `ps -ef`,找到你感兴趣的进程 ID。用 `strace -p <进程 ID>` 启动 `strace`,它会开始打印出一大堆东西,一开始看起来像垃圾信息。但如果你仔细观察,你会看到你认识的文字,如 `OPEN` 和 `CLOSE` 这样的词和文件名。如果你想弄清楚一个程序为什么不工作,这可以引导你走向正确的方向。 ### grep -Leaving the best for last: [grep][12]. This tool is so useful and powerful that I have trouble coming up with a succinct way to describe it. Put simply, it's a search tool, but the way it searches is what makes it so powerful. In problem analysis, I typically grep over a bunch of logs to search for something. A companion command called zgrep does the same thing with zipped files. In the following example, I used **zgrep /var/log/* bancroft** to grep across all the log files to see what I have been up to on the system. I used zgrep because there are zipped files in the directory. +把最好的留到最后:[grep][12]。这个工具是如此有用和强大,以至于我很难想出一个简洁的方法来描述它。简单地说,它是一个搜索工具,但它的搜索方式使它如此强大。在问题分析中,我通常会用 `grep` 搜索一堆日志来寻找一些东西。一个叫 `zgrep` 的配套命令可以对压缩文件做同样的事情。在下面的例子中,我使用 `zgrep bancroft /var/log/*` 在所有的日志文件中进行 grep,以查看我在系统中的工作情况。我使用 `zgrep` 是因为该目录中有压缩文件。 -![grep command output][13] +![grep 命令输出][13] -Another great way to use grep is for piping the output of other tools into it; this way, it can be used as a filter of sorts. In the following example, I listed the auth file and grepped for my login to see what I have been doing by using **cat auth.log |grep bancroft**. This can also be written as **grep bancroft auth.log**, but I used the pipe (**|**) to demonstrate the point. +使用 `grep` 的另一个好方法是将其他工具的输出通过管道输送到它里面;这样,它就可以作为一种过滤器来使用。在下面的例子中,我列出了 auth 文件,并通过使用 `cat auth.log |grep bancroft` 来搜索我的登录信息,看看我都做了什么。这也可以写成 `grep bancroft auth.log`,但我这里用管道(`|`)来证明这一点。 -![grep command output][14] +![grep 命令输出][14] -### Other tools to consider +### 其他需要考虑的工具 -You can do a lot more with these tools, but I hope this brief introduction gives you a window into how to use them to solve the nasty problems that come your way. Another tool worth your attention is [Nmap][15], which I did not include because it is so comprehensive that it needs an entire article (or more) to explain it. Finally, I recommend learning some white hat and hacking techniques; they can be very beneficial when trying to get to the bottom of a problem because they can help you collect information that can be crucial in decision making. +你可以用这些工具做更多的事情,但我希望这个简单的介绍能给你一个窗口,让你了解如何用它们来解决你遇到的讨厌的问题。另一个值得你注意的工具是 [Nmap][15],我没有包括它,因为它是如此全面,需要一整篇文章(或更多)来解释它。最后,我建议学习一些白帽和黑客技术;在试图找出问题的根源时,它们可能非常有益,因为它们可以帮助你收集对决策至关重要的信息。 -------------------------------------------------------------------------------- @@ -81,8 +80,8 @@ via: https://opensource.com/article/20/1/ops-hacks-sysadmins 作者:[Stephen Bancroft][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 7137611b00eff9da9cb13595b68d4e057cdcdaec Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 1 Feb 2022 00:58:49 +0800 Subject: [PATCH 150/334] P @wxy https://linux.cn/article-14232-1.html --- .../tech => published}/20200110 5 ops hacks for sysadmins.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {sources/tech => published}/20200110 5 ops hacks for sysadmins.md (99%) diff --git a/sources/tech/20200110 5 ops hacks for sysadmins.md b/published/20200110 5 ops hacks for sysadmins.md similarity index 99% rename from sources/tech/20200110 5 ops hacks for sysadmins.md rename to published/20200110 5 ops hacks for sysadmins.md index 9da27cd694..7e1d488a23 100644 --- a/sources/tech/20200110 5 ops hacks for sysadmins.md +++ b/published/20200110 5 ops hacks for sysadmins.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14232-1.html) [#]: subject: (5 ops hacks for sysadmins) [#]: via: (https://opensource.com/article/20/1/ops-hacks-sysadmins) [#]: author: (Stephen Bancroft https://opensource.com/users/stevereaver) From 65229469c37a735f340a9b6dea83c2018da881ea Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 1 Feb 2022 05:02:40 +0800 Subject: [PATCH 151/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220201=20?= =?UTF-8?q?Logseq:=20A=20Free=20&=20Open-Source=20App=20to=20Create=20Note?= =?UTF-8?q?s,=20Manage=20Tasks,=20Build=20Knowledge=20Graph,=20and=20More?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220201 Logseq- A Free - Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More.md --- ... Tasks, Build Knowledge Graph, and More.md | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 sources/tech/20220201 Logseq- A Free - Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More.md diff --git a/sources/tech/20220201 Logseq- A Free - Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More.md b/sources/tech/20220201 Logseq- A Free - Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More.md new file mode 100644 index 0000000000..f8ede06150 --- /dev/null +++ b/sources/tech/20220201 Logseq- A Free - Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More.md @@ -0,0 +1,115 @@ +[#]: subject: "Logseq: A Free & Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More" +[#]: via: "https://itsfoss.com/logseq/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Logseq: A Free & Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More +====== + +_**Brief:** Logseq is a versatile knowledge platform with the support for Markdown and Org-mode. You can create tasks, manage notes, and do a lot more things with them._ + +In the age of information, it is crucial to properly organize your thoughts, task list, and any other note related to your work/personal life. + +While some of us choose to use separate applications and services, how about using an all-in-one open-source, privacy-friendly app to do it all? + +That’s where Logseq comes in. + +![][1] + +### Logseq: Privacy-Friendly Knowledge Platform with Markdown & Org-mode Support + +Logseq aims to help you organize, create to-do lists, and build a knowledge graph. + +You can use existing Markdown or org-mode files to simply edit, write, and save any new notes. + +Officially, Logseq is still in the beta testing phase, but it has been getting recommendations since being in the alpha stages. + +Not to forget, it can be a nice open-source alternative to [Obsidian][2] as well. By default, it relies on your local directory, but you can choose any cloud directory to sync via your file system. So, you get to control your data. + +If you haven’t set up any cloud storage, you can try using [Rclone][3], [Insync][4], or [rsync commands][5]. + +![][6] + +Logseq gives powerful abilities and also supports plugins to expand the functionalities further. Let me highlight some of the key features to help you decide. + +### Features of Logseq + +![][7] + +Logseq offers all the essentials for a knowledge app platform. Here’s what you can expect from it: + + * Markdown Editor + * Org-mode File Support + * Backlink + * Page and block references (link between them) + * Page and block embed to add quotes/references + * Support for adding tasks and to-do lists + * Ability to add tasks as per priority or by order A, B, C.. + * Publish pages and access it using localhost or GitHub pages + * Advance commands support + * Ability to create a template from your existing resource to re-use it + * Page alias + * PDF highlights + * Create cards and quickly review them to memorize things + * Excalidraw integration + * Zotero integration + * Add a custom theme by simply creating a custom.css file. There are available community-made files for quick use as well. + * Custom keyboard shortcuts + * Ability to self-host Logseq + * Cross-platform support + + + +Even though it’s beta software, it worked as expected in my brief testing. I’m not an advanced user checking the impressive knowledge graph, but if you have numerous Markdown notes, you can add them, link them, and check the generated graph yourself. + +I was able to add tasks, link pages, add references, embed pages, check the knowledge graph for my existing data. + +You can always change the theme from the marketplace and add functionalities using plugins, and this should help you personalize the experience for your workflow. + +![][8] + +I found it incredibly easy to use, and the [documentation][9] explains everything nicely if you get stuck somewhere. + +### Install Logseq in Linux + +You can find the AppImage file in its [GitHub releases section][10] for pre-releases and beta versions. Additionally, you should also find it listed on [Flathub][11]. So, you can install it on any Linux distribution of your choice. + +If you need help, you might want to refer to our [AppImage][12] and [Flatpak guides][13] to get started. + +In either case, you can head to its [official webpage][14] to know more about it. + +[Logseq][14] + +Have you tried Logseq yet? Let me know your thoughts in the comments down below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/logseq/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/logseq.png?resize=800%2C450&ssl=1 +[2]: https://itsfoss.com/obsidian-markdown-editor/ +[3]: https://itsfoss.com/use-onedrive-linux-rclone/ +[4]: https://itsfoss.com/insync-linux-review/ +[5]: https://linuxhandbook.com/rsync-command-examples/ +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/logseq-screenshot.jpg?resize=800%2C602&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/logseq-themes.jpg?resize=800%2C479&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/logseq-screenshot-1.jpg?resize=800%2C603&ssl=1 +[9]: https://logseq.github.io/#/page/Contents +[10]: https://github.com/logseq/logseq/releases +[11]: https://flathub.org/apps/details/com.logseq.Logseq +[12]: https://itsfoss.com/use-appimage-linux/ +[13]: https://itsfoss.com/flatpak-guide/ +[14]: https://logseq.com/ From 1c3c4f32bc782196f83f6b1a22c54a3b45e6e1a0 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 1 Feb 2022 05:02:53 +0800 Subject: [PATCH 152/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220131=20?= =?UTF-8?q?Try=20Turris=20Omnia,=20the=20open=20source=20router?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220131 Try Turris Omnia, the open source router.md --- ...ry Turris Omnia, the open source router.md | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 sources/tech/20220131 Try Turris Omnia, the open source router.md diff --git a/sources/tech/20220131 Try Turris Omnia, the open source router.md b/sources/tech/20220131 Try Turris Omnia, the open source router.md new file mode 100644 index 0000000000..184814fa36 --- /dev/null +++ b/sources/tech/20220131 Try Turris Omnia, the open source router.md @@ -0,0 +1,106 @@ +[#]: subject: "Try Turris Omnia, the open source router" +[#]: via: "https://opensource.com/article/22/1/turris-omnia-open-source-router" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Try Turris Omnia, the open source router +====== +Whether you're a network engineer or a curious hobbyist, you ought to +take a look at the open source Turris Omnia router the next time you're +in the market for network gear. +![Mesh networking connected dots][1] + +In the early 2000s, I was fascinated by OpenWrt and wanted nothing more than to run it on a router of my own. Unfortunately, I didn't have a router capable of running custom firmware, and so I spent weekends going to garage sales hoping in vain to stumble upon a "Slug" (the slang term hackers were using for the NSLU2 router). Recently, I got hold of the Turris Omnia, which, aside from having a much cooler name, is a router from the Czech Republic using open source firmware built on top of OpenWrt. It has everything you'd expect from hardware running open source, and quite a lot more, including installable packages so you can add exactly what your home or business network needs the most while ignoring the parts you won't use. If you've viewed routers as simple appliances with no room for customization or even utility beyond DNS and DHCP, then you need to look at the Turris Omnia. It'll change your perception of what a router is, what a router can do for your network, and even how you interact with your entire network. + +![The Turris Omnia on my desk][2] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +### Getting started with Turris Omnia + +For all its power, the Turris Omnia feels comfortingly familiar. The steps to get started are essentially the same as with any other router: + + 1. Power it on + 2. Join the network it provides + 3. Navigate to 192.168.1.1 in a web browser to configure + + + +If you've bought a router in the past, you'll have performed those same steps before. If you're new to this process, know that it's no more complicated than any other router, and ample documentation comes in the box. + +![Configuration][4] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +### Simple and advanced configuration + +After initial setup, when you navigate to the Turris Omnia router, you have a choice between a simple configuration environment or advanced. You have to begin with the simple configuration. In the **Password** panel, you can set a password for the advanced interface, which also grants you SSH access to the router. + +The simple interface lets you configure how you connect to the wide-area network (WAN) and set parameters for your local-area network (LAN). It also allows you to set up a personal WiFi access point, a guest network, and install and interact with plugins. + +The advanced interface, called LuCI, is exactly what it claims. It's for the network engineer who's familiar with network topography and design, and it's essentially a collection of key and value pairs that you can edit through a simple web interface. If you prefer to edit values directly, you can instead SSH into the router: + + +``` + + +$ ssh root@192.168.1.1 +root@192.168.1.1's password: + +BusyBox v1.28.4 () built-in shell (ash) + +      ______                _         ____  _____ +     /_  __/_  ____________(_)____   / __ \/ ___/ +      / / / / / / ___/ ___/ / ___/  / / / /\\__ +     / / / /_/ / /  / /  / (__  )  / /_/ /___/ / +    /_/  \\__,_/_/  /_/  /_/____/   \\____//____/   +                                              + ----------------------------------------------------- + TurrisOS 4.0.1, Turris Omnia + ----------------------------------------------------- +root@turris:~# + +``` + +### Plugins + +In addition to the flexibility of its interface, the Turris Omnia also features a package manager. You can install plugins, including Network Attached Storage (NAS) configuration, a Nextcloud server, an SSH honeypot, speed test, OpenVPN, print server, a Tor node, LXC for running containers, and much more. + +![Package management for your router][5] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +With just a few clicks, you can install your own [Nextcloud][6] server so you can run your own cloud services or OpenVPN so you can safely access your network when you're away from home. + +### Open source router + +The best part about this router is that it's open source and supports open source. You can download Turris OS and many related open source tools from their [gitlab.nic.cz][7]. You don't have to settle for the firmware that ships on the device, either. With 2 GB of RAM and miniPCIe slots, you can run Debian on it. Even the LEDs in the front panel are programmable. This is a hacker's router, and whether you're a network engineer or a curious hobbyist, you ought to take a look at it the next time you're in the market for network gear. + +You can get the Turris Omnia and several other router models from the [turris.com][8] website, and then join the community at [forum.turris.cz][9]. They're a friendly bunch of enthusiasts, eager to share knowledge, tips, and cool hacks to further what you can do with your open source router. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/turris-omnia-open-source-router + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/mesh_networking_dots_connected.png?itok=ovINTRR3 (Mesh networking connected dots) +[2]: https://opensource.com/sites/default/files/uploads/turris-omnia.jpg (The Turris Omnia on my desk) +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://opensource.com/sites/default/files/uploads/turris-omnia-wifi.jpg (Configuration) +[5]: https://opensource.com/sites/default/files/uploads/turris-omnia-packages.jpg (Package management for your router) +[6]: https://opensource.com/tags/nextcloud +[7]: https://gitlab.nic.cz/turris +[8]: https://www.turris.com/en/ +[9]: http://forum.turris.cz From 8e4380bb2d9e9bb14d685714e7b670611a251088 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 1 Feb 2022 05:03:03 +0800 Subject: [PATCH 153/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220131=20?= =?UTF-8?q?How=20to=20set=20up=20a=20CI=20pipeline=20on=20GitLab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220131 How to set up a CI pipeline on GitLab.md --- ...1 How to set up a CI pipeline on GitLab.md | 212 ++++++++++++++++++ 1 file changed, 212 insertions(+) create mode 100644 sources/tech/20220131 How to set up a CI pipeline on GitLab.md diff --git a/sources/tech/20220131 How to set up a CI pipeline on GitLab.md b/sources/tech/20220131 How to set up a CI pipeline on GitLab.md new file mode 100644 index 0000000000..3efaf59fbb --- /dev/null +++ b/sources/tech/20220131 How to set up a CI pipeline on GitLab.md @@ -0,0 +1,212 @@ +[#]: subject: "How to set up a CI pipeline on GitLab" +[#]: via: "https://opensource.com/article/22/2/setup-ci-pipeline-gitlab" +[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to set up a CI pipeline on GitLab +====== +Continuous integration (CI) means that code changes are built and tested +automatically. Here's how I set up a CI pipeline for my C++ project. +![Plumbing tubes in many directions][1] + +This article covers the configuration of a CI pipeline for a C++ project on [GitLab][2]. My previous articles covered how to set up a build system based on [CMake and VSCodium][3] and how to integrate unit tests based on [GoogleTest and CTest][4]. This article is a follow-up on extending the configuration by using a CI pipeline. First, I demonstrate the pipeline setup and then its execution. Next comes the CI configuration itself. + +Continuous integration (CI) simply means that code changes, which get committed to a central repository, are built and tested automatically. A popular platform in the open source area for setting up CI pipelines is GitLab. In addition to a central Git repository, GitLab also offers the configuration of CI/CD pipelines, issue tracking, and a container registry. + +### Terms to know + +Before I dive deeper into this area of the DevOps philosophy, I'll establish some common terms encountered in this article and the [GitLab documentation][5]: + + * Continuous delivery (CD): Automatic provisioning of applications with the aim of deploying them. + * Continuous deployment (CD): Automatic publishing of software + * Pipelines: The top-level component for CI/CD, defines stages and jobs + * Stages: A collection of jobs that must execute successfully + * Jobs: Definition of tasks (e.g., compile, performing unit test) + * Runners: Services that are actually executing the Jobs + + + +### Set up a CI pipeline + +I will reuse the example projects from previous articles, which are available on GitLab. To follow the steps described in the coming chapters, fork the [example project][6] by clicking on the _Fork_ button, which is found on the top right: + +![Fork the project][7] + +Stephan Avenwedde (CC BY-SA 4.0) + +#### Set up a runner + +To get a feeling for how everything works together, start at the bottom by installing a runner on your local system. + +Follow the [installation instructions][8] for the GitLab runner service for your system. Once installed, you have to register a runner. + +1\. On the GitLab page, select the project and in the left pane, navigate to **Settings** and select **CI/CD**. + +![Select CI/CD in Settings][9] + +Stephan Avenwedde (CC BY-SA 4.0) + +2\. Expand the Runners section and switch **Shared runners** to off (yellow marker). Note the token and URL (green marker); we need them in the next step. + +![Configure runner][10] + +Stephan Avenwedde (CC BY-SA 4.0) + +3\. Now open a terminal and enter `gitlab-runner register`. The command invokes a script that asks for some input. Here are the answers: + + * GitLab instance: (screenshot above) + * Registration token: Pick it from the **Runners** section (screenshot above) + * Description: Free selectable + * Tags: This is optional. You don't need to provide tags + * Executor: Choose **Shell** here + + + +If you want to modify the configuration later, you can find it under `~/.gitlab-runner/config.toml`. + +4\. Now, start the runner with the command `gitlab-runner run`. The runner is now waiting for jobs. Your runner is now available in the **Runners** section of the project settings on GitLab: + +![Available specific runners][11] + +Stephan Avenwedde (CC BY-SA 4.0) + +### Execute a pipeline + +As previously mentioned, a pipeline is a collection of jobs executed by the runner. Every commit pushed to GitLab generates a pipeline attached to that commit. If multiple commits are pushed together, a pipeline is created for the last commit only. To start a pipeline for demonstration purposes, commit and push a change directly over GitLab's web editor. + +For the first test, open the `README.md` and add a additional line: + +![Web editor][12] + +Stephan Avenwedde (CC BY-SA 4.0) + +Now commit your changes. + +Note that the default is **Create a new branch**. To keep it simple, choose **Commit to main branch**. + +![Commit changes][13] + +Stephan Avenwedde (CC BY-SA 4.0) + +A few seconds after the commit, you should notice some output in the console window where the GitLab runner executes: + + +``` + + +Checking for jobs... received job=1975932998 repo_url= runner=Z7MyQsA6 + +Job succeeded duration_s=3.866619798 job=1975932998 project=32818130 runner=Z7MyQsA6 + +``` + +In the project overview in GitLab, select on the right pane **CI/CD --> Pipelines**. Here you can find a list of recently executed pipelines. + +![Pipeline overview][14] + +Stephan Avenwedde (CC BY-SA 4.0) + +If you select a pipeline, you get a detailed overview where you can check which job failed (in case the pipeline failed) and see the output of individual jobs. + +**A job is considered to have failed if a non-zero value was returned**. In the following case, I just invoked the bash command `exit 1` (line 26) to let the job fail: + +![Job overview][15] + +Stephan Avenwedde (CC BY-SA 4.0) + +### CI configuration + +The stages, pipelines, and jobs configurations are made in the file [.gitlab-ci.yml][16] in the root of the repository. I recommend editing the configuration with GitLab's build-in Pipeline editor as it automatically checks for accuracy during editing. + + +``` + + +stages: +\- build +\- test + +build: +  stage: build +  script: +   - cmake -B build -S . +    - cmake --build build --target Producer +  artifacts: +    paths: +     - build/Producer + +RunGTest: +  stage: test +  script: +   - cmake -B build -S . +    - cmake --build build --target GeneratorTest +    - build/Generator/GeneratorTest + +RunCTest: +  stage: test +  script: +   - cmake -B build -S . +    - cd build +    - ctest --output-on-failure -j6 + +``` + +The file defines the stages **build** and **test**. Next, it defines three jobs: **build**, **RunGTest** and **RunCTest**. The **build** job is assigned to the eponymous stage, and the other jobs are assigned to the _test_ stage. + +The commands under the **script** section are ordinary shell commands. You can read them as if you were typing them line by line in the shell. + +I want to point out one special feature: **artifacts**. In this case, I define the _Producer_ binary as an artifact of the **build** job. Artifacts are uploaded to the GitLab server and can be downloaded from there: + +![Pipeline artifacts][17] + +Stephan Avenwedde (CC BY-SA 4.0) + +By default, jobs in later stages automatically download all the artifacts created by jobs in earlier stages. + +A `gitlab-ci.yml` reference is available on [docs.gitlab.com][18]. + +### Wrap up + +The above example is an elementary one, but it shows the general principle of continuous integration. In the above section about setting up a runner I deactivated shared runners, although this is the actual strength of GitLab. You can build, test, and deploy your application in clean, containerized environments. In addition to the freely available runners for which GitLab provides a free monthly contingent, you can also provide your own container-based, self-hosted runners. Of course, there is also a more advanced way: You can orchestrate container-based runners using Kubernetes, which allows you to scale the processing of pipelines freely. You can read more about it on [about.gitlab.com][19]. + +As I'm running Fedora, I have to mention that Podman is not yet supported as a container engine for GitLab runners. According to gitlab-runner issue [#27119][20], Podman support is already on the list. + +Describing the recurring steps as jobs and combining them in pipelines and stages enables you to keep track of their quality without causing additional work. Especially in large community projects where you have to decide whether merge requests get accepted or declined, a properly configured CI approach can tell you if the submitted code will improve or worsen the project. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/setup-ci-pipeline-gitlab + +作者:[Stephan Avenwedde][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/hansic99 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/plumbing_pipes_tutorial_how_behind_scenes.png?itok=F2Z8OJV1 (Plumbing tubes in many directions) +[2]: https://gitlab.com/ +[3]: https://opensource.com/article/22/1/devops-cmake +[4]: https://opensource.com/article/22/1/unit-testing-googletest-ctest +[5]: https://docs.gitlab.com/ +[6]: https://gitlab.com/hANSIc99/cpp_testing_sample +[7]: https://opensource.com/sites/default/files/cpp_ci_cd_gitlab_fork.png (Fork the project) +[8]: https://docs.gitlab.com/runner/install/ +[9]: https://opensource.com/sites/default/files/cpp_ci_cd_gitlab_project_settings.png (Select CI/CD in Settings) +[10]: https://opensource.com/sites/default/files/cpp_ci_cd_gitlab_settings_runners2.png (Configure runner) +[11]: https://opensource.com/sites/default/files/cpp_ci_cd_gitlab_settings_active_runner.png (Available specific runners) +[12]: https://opensource.com/sites/default/files/cpp_ci_cd_gitlab_web_editor.png (Web editor) +[13]: https://opensource.com/sites/default/files/cpp_ci_cd_gitlab_commit_changes2.png (Commit changes) +[14]: https://opensource.com/sites/default/files/cpp_ci_cd_gitlab_pipeline_overview2.png (Pipeline overview) +[15]: https://opensource.com/sites/default/files/cpp_ci_cd_gitlab_job_overview.png (Job overview) +[16]: https://gitlab.com/hANSIc99/cpp_testing_sample/-/blob/main/.gitlab-ci.yml +[17]: https://opensource.com/sites/default/files/cpp_ci_cd_gitlab_pipeline_artifacts.png (Pipeline artifacts) +[18]: https://docs.gitlab.com/ee/ci/yaml/ +[19]: https://about.gitlab.com/solutions/kubernetes/ +[20]: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/27119 From b9d55846c9c811fbf53babde5e51422ef96fe621 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 1 Feb 2022 05:03:54 +0800 Subject: [PATCH 154/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220131=20?= =?UTF-8?q?Nitrux=202.0=20Features=20XanMod=20Kernel=205.16.3=20as=20Defau?= =?UTF-8?q?lt=20and=20Adds=20Visual=20Tweaks=20to=20the=20Desktop=20Experi?= =?UTF-8?q?ence?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220131 Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience.md --- ...Visual Tweaks to the Desktop Experience.md | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 sources/news/20220131 Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience.md diff --git a/sources/news/20220131 Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience.md b/sources/news/20220131 Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience.md new file mode 100644 index 0000000000..0a71ee97de --- /dev/null +++ b/sources/news/20220131 Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience.md @@ -0,0 +1,86 @@ +[#]: subject: "Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience" +[#]: via: "https://news.itsfoss.com/nitrux-2-0-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience +====== + +Nitrux Linux is easily one of the [most beautiful Linux distributions][1] out there. + +Last month, we also looked at [Maui Shell][2], by the same team behind Nitrux Linux. And, now, Nitrux 2.0.0 has been released with some exciting changes. + +Let me highlight the fundamental changes here. + +### Nitrux 2.0.0: What’s New? + +The upgrade includes a new Linux Kernel, updated applications, desktop environment, firmware improvements, and ISO size reduction. + +You will also notice several subtle visual changes to the layouts and the top panel. + +### XanMod Kernel 5.16.3 + +![][3] + +XanMod Kernel is tailored for new-gen hardware to get the best possible desktop experience. + +Compared to the stock Linux Kernel found in many other Linux distributions, you will find some custom settings and new features enabled to enhance your experience with it. + +With Nitrux 2.0.0, XanMod Kernel 5.16.3 has been made the default choice. You still get to select the latest mainline LTS or non-LTS (5.15.17, 5.16.3) Linux Kernel as well. + +Not to forget, you also get the ability to install Liquorix and Libre kernels if you need those. + +### Updated Layouts and Changes to Panels + +The top panel now shows window controls, title, global menu and houses the system tray. + +The layout remains similar to previous iterations, but there are a few position adjustments, like adding the application menu to the dock, the application menu being the Launchpad Plasma (thanks to [adhe][4]). + +![][3] + +Moreover, you should find improvements in the window decorations, considering everything is borderless by default. You do get the choice to disable the borderless windows mode from the Window Decorations option under the appearance settings. + +The optional Latte layouts have also received updates to include the window controls, title bar, and the global menu. + +### Updated Packages and Drivers + +For obvious reasons, this upgrade includes KDE Plasma version updates, KDE Frameworks, KDE Gear, among other essential applications like Firefox and LibreOffice. + +Additional firmware has been added for AMD GPUs not available in the kernel packages. They have also added i915, Nouveau, and AMDGPU drivers in the ISO available to download. + +MESA 21.3.5 stable is available by default, but you can install the latest MESA 22.0 if you need it. + +### Other Improvements + +Along with all the changes to Nitrux Linux, there are also some additional technical improvements like: + + * Reduced ISO file size for both the standard and minimal edition. + * Xbox One controller works without conflicts with joysticks. + * i3 window manager has been replaced by JWM in the minimal ISO. + + + +For more details, you can refer to the [official announcement post][5]. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/nitrux-2-0-release/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/beautiful-linux-distributions/ +[2]: https://news.itsfoss.com/maui-shell-unveiled/ +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[4]: https://www.pling.com/u/adhe/ +[5]: https://nxos.org/changelog/release-announcement-nitrux-2-0-0/#download From 59376a5d10ac48b022bc704696f88b406c043904 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 1 Feb 2022 10:22:18 +0800 Subject: [PATCH 155/334] RP @geekpi https://linux.cn/article-14233-1.html --- ...able speech to text in your application.md | 56 +++++++------------ 1 file changed, 20 insertions(+), 36 deletions(-) rename {translated/tech => published}/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md (81%) diff --git a/translated/tech/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md b/published/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md similarity index 81% rename from translated/tech/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md rename to published/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md index c3deaf2242..50cb30e7e2 100644 --- a/translated/tech/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md +++ b/published/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md @@ -3,14 +3,16 @@ [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14233-1.html" -使用 Mozilla DeepSpeech 在你的应用中实现语音转文字 +使用 DeepSpeech 在你的应用中实现语音转文字 ====== -应用中的语音识别不仅仅是一个有趣的技巧,而且是一个重要的无障碍功能。 -![Colorful sound wave graph][1] + +> 应用中的语音识别不仅仅是一个有趣的技巧,而且是一个重要的无障碍功能。 + +![](https://img.linux.net.cn/data/attachment/album/202202/01/102117mvnx1o9zxxikz91z.jpg) 计算机的主要功能之一是解析数据。有些数据比其他数据更容易解析,而语音输入仍然是一项进展中的工作。不过,近年来该领域已经有了许多改进,其中之一就是 DeepSpeech,这是 Mozilla 的一个项目,Mozilla 是维护 Firefox 浏览器的基金会。DeepSpeech 是一个语音到文本的命令和库,使其对需要将语音输入转化为文本的用户和希望为其应用提供语音输入的开发者都很有用。 @@ -20,27 +22,22 @@ DeepSpeech 是开源的,使用 Mozilla 公共许可证(MPL)发布。你可 要安装,首先为 Python 创建一个虚拟环境: - ``` -`$ python3 -m pip install deepspeech --user` +$ python3 -m pip install deepspeech --user ``` DeepSpeech 依靠的是机器学习。你可以自己训练它,但最简单的是在刚开始时下载预训练的模型文件。 - ``` - - $ mkdir DeepSpeech $ cd Deepspeech $ curl -LO \ - + https://github.com/mozilla/DeepSpeech/releases/download/vX.Y.Z/deepspeech-X.Y.Z-models.pbmm $ curl -LO \ - - + https://github.com/mozilla/DeepSpeech/releases/download/vX.Y.Z/deepspeech-X.Y.Z-models.scorer ``` -### 用户的应用 +### 用户应用 通过 DeepSpeech,你可以将语音的录音转录成书面文字。你可以从在最佳条件下干净录制的语音中得到最好的结果。然而,在紧要关头,你可以尝试任何录音,你可能会得到一些你需要手动转录的东西。 @@ -48,42 +45,30 @@ $ curl -LO \ 在你的 DeepSpeech 文件夹中,通过提供模型文件、评分器文件和你的音频启动一个转录: - ``` - - $ deepspeech --model deepspeech*pbmm \ -\--scorer deepspeech*scorer \ -\--audio hello-test.wav - + --scorer deepspeech*scorer \ + --audio hello-test.wav ``` 输出到标准输出(你的终端): - ``` -`this is a test hello world this is a test` +this is a test hello world this is a test ``` 你可以通过使用 `--json` 选项获得 JSON 格式的输出: - ``` - - $ deepspeech --model deepspeech*pbmm \ -\-- json -\--scorer deepspeech*scorer \ -\--audio hello-test.wav - + -- json + --scorer deepspeech*scorer \ + --audio hello-test.wav ``` 这就把每个词和时间戳一起渲染出来: - ``` - - { "transcripts": [ { @@ -110,12 +95,11 @@ $ deepspeech --model deepspeech*pbmm \ "duration": 0.74 }, [...] - ``` ### 开发者 -DeepSpeech 不仅仅是一个转录预先录制的音频的命令。你也可以用它来实时处理音频流。GitHub 仓库 [DeepSpeech-examples][3] 中充满了 JavaScript、Python、C# 和 Android 的 Java 代码。 +DeepSpeech 不仅仅是一个转录预先录制的音频的命令。你也可以用它来实时处理音频流。GitHub 仓库 [DeepSpeech-examples][3] 中有 JavaScript、Python、C# 和用于 Android 的 Java 等各种代码。 大部分困难的工作已经完成,所以集成 DeepSpeech 通常只是引用 DeepSpeech 库,并知道如何从主机设备上获得音频(你通常通过 Linux 上的 `/dev` 文件系统或 Android 和其他平台上的 SDK 来完成。) @@ -130,7 +114,7 @@ via: https://opensource.com/article/22/1/voice-text-mozilla-deepspeech 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 793f5a496e8cd75482278d176945918d8f492c9d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 1 Feb 2022 22:17:43 +0800 Subject: [PATCH 156/334] =?UTF-8?q?=E6=B8=85=E9=99=A4=E8=BF=87=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...sword Protection, and More Improvements.md | 129 ---- ...il Now Protects You From Email Tracking.md | 72 -- ... Favorite Linux Screenshot Tool in 2022.md | 108 --- ...Buy a Pre-installed Linux Laptop Online.md | 368 ---------- ...evelop GUI apps using Flutter on Fedora.md | 199 ------ ...WM, the Tiling Window Manager for GNOME.md | 122 ---- ...store a single-core computer with Linux.md | 270 -------- ...th Qt WebAssembly instead of JavaScript.md | 133 ---- ...u need to know for effective monitoring.md | 69 -- ...duino Project Ideas for DIY Enthusiasts.md | 272 -------- ...eed with Newsboat in the Linux terminal.md | 152 ----- ...r use of Helm on Kubernetes with Charts.md | 288 -------- ...ulti-factor authentication- privacyIDEA.md | 85 --- ... school environment for kids with Linux.md | 75 -- ...e teaching tools for virtual classrooms.md | 96 --- ...15 Writing Java with Quarkus in VS Code.md | 239 ------- ...up and run WordPress for your classroom.md | 164 ----- ...earning games for kids with open source.md | 123 ---- ...00505 8 open source video games to play.md | 116 ---- ... tricks for optimizing container builds.md | 201 ------ ...w to examine processes running on Linux.md | 232 ------- ...0522 Fast data modeling with JavaScript.md | 452 ------------- ...200528 4 Linux distributions for gaming.md | 97 --- ...With Nano Text Editor -Beginner-s Guide.md | 246 ------- ...our computer time and date with systemd.md | 356 ---------- ... Exploring Algol 68 in the 21st century.md | 381 ----------- ... an open source certification authority.md | 300 -------- ... connection sharing with NetworkManager.md | 163 ----- ... These To-Do List Apps on Linux Desktop.md | 203 ------ ...nd your Raspberry Pi with Arduino ports.md | 602 ----------------- ...cks with Pseudorandom Number Generators.md | 123 ---- ...0730 Monitor systemd journals via email.md | 284 -------- ...and route traffic through your firewall.md | 176 ----- ...e Linux Penguin in its first video game.md | 88 --- ...ect your network with open source tools.md | 106 --- ...source alternatives to Google Analytics.md | 104 --- ...ce between orchestration and automation.md | 78 --- ...n source apps on your Mac with MacPorts.md | 225 ------ ... My top 7 Rust commands for using Cargo.md | 99 --- ...What to choose for your home automation.md | 134 ---- ...our tasks with this Ansible cheat sheet.md | 224 ------ ...s guide to Kubernetes Jobs and CronJobs.md | 233 ------- ...eate a machine learning model with Bash.md | 638 ------------------ ...on GNOME Desktop With These Nifty Tools.md | 108 --- ...26 5 open source alternatives to GitHub.md | 122 ---- ...a wireless protocol for home automation.md | 146 ---- ...te universal blockchain smart contracts.md | 157 ----- ... open source alternative to Google Docs.md | 125 ---- ...stomize the Task Switcher in KDE Plasma.md | 94 --- ...sa Drivers on Ubuntu -Latest and Stable.md | 128 ---- ...actice coding in Java by writing a game.md | 246 ------- 51 files changed, 9951 deletions(-) delete mode 100644 sources/news/20220118 ONLYOFFICE Docs v7.0 Adds Online Forms, Password Protection, and More Improvements.md delete mode 100644 sources/news/20220120 ProtonMail Now Protects You From Email Tracking.md delete mode 100644 sources/news/20220126 Here-s Why Ksnip is My New Favorite Linux Screenshot Tool in 2022.md delete mode 100644 sources/tech/20200114 16 Places to Buy a Pre-installed Linux Laptop Online.md delete mode 100644 sources/tech/20200115 Develop GUI apps using Flutter on Fedora.md delete mode 100644 sources/tech/20200205 PaperWM, the Tiling Window Manager for GNOME.md delete mode 100644 sources/tech/20200214 How to restore a single-core computer with Linux.md delete mode 100644 sources/tech/20200217 Create web user interfaces with Qt WebAssembly instead of JavaScript.md delete mode 100644 sources/tech/20200218 10 Grafana features you need to know for effective monitoring.md delete mode 100644 sources/tech/20200224 17 Cool Arduino Project Ideas for DIY Enthusiasts.md delete mode 100644 sources/tech/20200228 Revive your RSS feed with Newsboat in the Linux terminal.md delete mode 100644 sources/tech/20200309 Level up your use of Helm on Kubernetes with Charts.md delete mode 100644 sources/tech/20200313 Open source alternative for multi-factor authentication- privacyIDEA.md delete mode 100644 sources/tech/20200409 How to set up a remote school environment for kids with Linux.md delete mode 100644 sources/tech/20200415 6 open source teaching tools for virtual classrooms.md delete mode 100644 sources/tech/20200415 Writing Java with Quarkus in VS Code.md delete mode 100644 sources/tech/20200417 How to set up and run WordPress for your classroom.md delete mode 100644 sources/tech/20200504 Create interactive learning games for kids with open source.md delete mode 100644 sources/tech/20200505 8 open source video games to play.md delete mode 100644 sources/tech/20200511 Tips and tricks for optimizing container builds.md delete mode 100644 sources/tech/20200515 How to examine processes running on Linux.md delete mode 100644 sources/tech/20200522 Fast data modeling with JavaScript.md delete mode 100644 sources/tech/20200528 4 Linux distributions for gaming.md delete mode 100644 sources/tech/20200528 Getting Started With Nano Text Editor -Beginner-s Guide.md delete mode 100644 sources/tech/20200602 Control your computer time and date with systemd.md delete mode 100644 sources/tech/20200603 Exploring Algol 68 in the 21st century.md delete mode 100644 sources/tech/20200608 Eliminate spam using SSL with an open source certification authority.md delete mode 100644 sources/tech/20200617 Internet connection sharing with NetworkManager.md delete mode 100644 sources/tech/20200619 Get Your Work Done Faster With These To-Do List Apps on Linux Desktop.md delete mode 100644 sources/tech/20200709 Expand your Raspberry Pi with Arduino ports.md delete mode 100644 sources/tech/20200718 Tricks with Pseudorandom Number Generators.md delete mode 100644 sources/tech/20200730 Monitor systemd journals via email.md delete mode 100644 sources/tech/20200902 Open ports and route traffic through your firewall.md delete mode 100644 sources/tech/20200908 Tux the Linux Penguin in its first video game.md delete mode 100644 sources/tech/20201008 Protect your network with open source tools.md delete mode 100644 sources/tech/20201008 Top 5 open source alternatives to Google Analytics.md delete mode 100644 sources/tech/20201109 What-s the difference between orchestration and automation.md delete mode 100644 sources/tech/20201110 Use your favorite open source apps on your Mac with MacPorts.md delete mode 100644 sources/tech/20201117 My top 7 Rust commands for using Cargo.md delete mode 100644 sources/tech/20201118 Cloud control vs local control- What to choose for your home automation.md delete mode 100644 sources/tech/20201119 Automate your tasks with this Ansible cheat sheet.md delete mode 100644 sources/tech/20201123 A beginner-s guide to Kubernetes Jobs and CronJobs.md delete mode 100644 sources/tech/20201124 Create a machine learning model with Bash.md delete mode 100644 sources/tech/20201124 Customize Task Switching Experience on GNOME Desktop With These Nifty Tools.md delete mode 100644 sources/tech/20201126 5 open source alternatives to GitHub.md delete mode 100644 sources/tech/20201127 How to choose a wireless protocol for home automation.md delete mode 100644 sources/tech/20201201 Create universal blockchain smart contracts.md delete mode 100644 sources/tech/20201202 5 collaboration tips for using an open source alternative to Google Docs.md delete mode 100644 sources/tech/20201212 How to Customize the Task Switcher in KDE Plasma.md delete mode 100644 sources/tech/20201212 How to Install Mesa Drivers on Ubuntu -Latest and Stable.md delete mode 100644 sources/tech/20201214 Practice coding in Java by writing a game.md diff --git a/sources/news/20220118 ONLYOFFICE Docs v7.0 Adds Online Forms, Password Protection, and More Improvements.md b/sources/news/20220118 ONLYOFFICE Docs v7.0 Adds Online Forms, Password Protection, and More Improvements.md deleted file mode 100644 index 54a966feb4..0000000000 --- a/sources/news/20220118 ONLYOFFICE Docs v7.0 Adds Online Forms, Password Protection, and More Improvements.md +++ /dev/null @@ -1,129 +0,0 @@ -[#]: subject: "ONLYOFFICE Docs v7.0 Adds Online Forms, Password Protection, and More Improvements" -[#]: via: "https://news.itsfoss.com/onlyoffice-docs-7-release/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -ONLYOFFICE Docs v7.0 Adds Online Forms, Password Protection, and More Improvements -====== - -ONLYOFFICE is a popular open-source office suite available for Desktop platforms (including Linux) and web applications as well. - -If you have a [Nextcloud][1] or ownCloud instance, you may already have ONLYOFFICE installed to manage your documents. - -Now, for its first major release in 2022, ONLYOFFICE v7.0 has been announced with a range of improvements and much-needed feature editions. - -### ONLYOFFICE 7.0: What’s New? - -![][2] - -No matter whether you work with its online editors or desktop editors, the improvements should come in handy. - -Let me highlight some of the key features here: - -#### Fillable Online Forms - -![][3] - -The better the ability to collaborate, the more time we save. And, the ability to create and share a form online with friends and collaborators should make things easier. - -To get started, you need to save the document as a standard PDF or as OFORM to be able to share it online for collaboration. - -You get access to a variety of fields that include text, boxes, drop-down lists, and images. It should be a breeze to manage the form, customize it, and complete it with the help of collaborators. - -To improve the collaboration experience, you can also group fields to fill them out quickly. The online fillable form can be accessed using mobile applications as well. You should update the Android/iOS applications to try it out. - -#### Password Protection in Spreadsheets - -![][4] - -While we work with a lot of data in spreadsheets, it is also important to protect them from unauthorized access. - -With ONLYOFFICE Docs v7.0, you can add password protection to individual sheets or the entire workbook. - -#### Support for Query tables - -For easy reporting and analysis, a new ability to open and save query tables has been added that helps you combine data from multiple tables. - -#### New Transitions Tab and Animation for Presentations - -![][5] - -A separate transitions tab was added to let you easily access, add/edit, available transitions for your presentation slides. - -It should prove to be a quick task to choose between different transitions, and manage the settings. - -You can’t quite add animations to your presentations yet, but the support has been added, considering that it is planned for the next release. - -#### Collaboration Improvements - -![][4] - -Not just limited to new feature additions, there have been several improvements across the office suite. - -The version history for spreadsheets received an update to save each draft as a version when the last user exits from the spreadsheet. Moreover, different colors should help identify versions for other users if you are co-editing a spreadsheet. - -The comments system also received a new ability to sort through by date and author. - -You should also find it easier to review changes by co-authors working in a single document. - -#### Usability Improvements - -![][6] - -A new dark mode has been added for text documents to improve readability and reduce eye strain. - -You can perform several quick actions using some of the new keyboard shortcuts by pressing “**Alt**” in any editor. - -There are also new scaling options with the ability of up to 500% scaling. - -#### Other Improvements - -In addition to more scaling range, you also get more options like 125% and 175% to let you work with documents on different monitors. - -Other essential improvements include: - - * The ability to decide if you want to open editors as a new tab or a new window. - * Desktop editor integration with kDrive and Liferay - * New colour palette - * Mobile app improvements - * Hyperlink autocorrection - * New localization options - - - -You can learn more about the changes in the [official changelog][7] or the [official announcement][8]. - -### Download ONLYOFFICE 7.0 - -You can head to its [official website][9] and download the free version (community edition). If you need, you can opt for its premium offerings as well. If you can’t find the latest version, it should be available soon. - -The latest version should be available as DEB/RPM package, Docker image, Snap, and 1-click applications for cloud platforms like Vultr and Digital Ocean. - -[ONLYOFFICE 7.0][9] - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/onlyoffice-docs-7-release/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/nextcloud/ -[2]: https://i0.wp.com/i.ytimg.com/vi/hmGHs4v44Tk/hqdefault.jpg?w=780&ssl=1 -[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU3MSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM3MSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM2OSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM3MCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[7]: https://github.com/ONLYOFFICE/DocumentServer/blob/master/CHANGELOG.md#641 -[8]: https://www.onlyoffice.com/blog/2022/01/onlyoffice-docs-7-0/ -[9]: https://www.onlyoffice.com/download-docs.aspx?from=default#docs-community diff --git a/sources/news/20220120 ProtonMail Now Protects You From Email Tracking.md b/sources/news/20220120 ProtonMail Now Protects You From Email Tracking.md deleted file mode 100644 index 3b8679a9e5..0000000000 --- a/sources/news/20220120 ProtonMail Now Protects You From Email Tracking.md +++ /dev/null @@ -1,72 +0,0 @@ -[#]: subject: "ProtonMail Now Protects You From Email Tracking" -[#]: via: "https://news.itsfoss.com/protonmail-tracking-protection/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -ProtonMail Now Protects You From Email Tracking -====== - -[ProtonMail][1] is an open-source email service that offers best-in-class privacy and security features. All of its client applications are open-source as well. You can use it for free and opt for premium upgrades if needed. Whether using it for free or with a subscription, ProtonMail has been an impressive option for privacy and open-source enthusiasts. - -In fact, we use it for our team. And, it has been a good service so far! - -Now, to make things better, ProtonMail [announced][2] a new feature that blocks hidden pixels in emails that often track your activity. - -While they claim that it should make your email experience safer, what is it? And, what should you expect from it? - -### Blocking Tracking Pixels in Emails - -As of now, the email tracking happens without the receiver’s consent. Some of the newsletters that you receive, marketing/promotion emails, or just about anything might already contain a hidden tracking pixel that monitors your email activity. - -Fret not; the email tracking methods do not compromise the data or your email address. However, these trackers monitor when you open the email, how many times you access it, and the IP address/location associated with it. - -So, with this data, the sender can analyze a wide range of things. - -While this can be useful for digital marketers, it can give attackers more opportunities to lure you into a scam effectively. - -Unfortunately, there’s no way to regulate or ask consent for it. The tracking pixels in emails are all over the place. And, several trustworthy services make use of them as well. - -![][3] - -ProtonMail comes to the rescue by blocking these tracking pixels and hiding your IP address or location from third parties in your email. - -As you can notice from the screenshot above, the email I received included one tracker. - -This feature is enabled by default for every free and premium ProtonMail user. - -When you click on the tracking protection icon on the web, here’s what you would see: - -![][4] - -And, there can be a variety of trackers that cannot be identified easily and would appear as “Uncategorized Tracker”. - -The presence of this feature makes ProtonMail an attractive, privacy-focused email offering. Not to forget, you may not need to opt for expensive solutions like [HEY][5] from Basecamp to get rid of email tracking. - -[ProtonMail][1] - -_What do you think about ProtonMail’s new enhanced tracking protection feature? Let me know your thoughts in the comments down below._ - -**Disclaimer:** It’s FOSS is an affiliate partner of ProtonMail. While this does not affect our news reporting stance, we get a small commission if you get a ProtonMail subscription from our link. - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/protonmail-tracking-protection/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/recommends/protonmail/ -[2]: https://protonmail.com/blog/enhanced-tracking-protection/ -[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ1MyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMzMyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[5]: https://www.hey.com/ diff --git a/sources/news/20220126 Here-s Why Ksnip is My New Favorite Linux Screenshot Tool in 2022.md b/sources/news/20220126 Here-s Why Ksnip is My New Favorite Linux Screenshot Tool in 2022.md deleted file mode 100644 index 2be081b364..0000000000 --- a/sources/news/20220126 Here-s Why Ksnip is My New Favorite Linux Screenshot Tool in 2022.md +++ /dev/null @@ -1,108 +0,0 @@ -[#]: subject: "Here’s Why Ksnip is My New Favorite Linux Screenshot Tool in 2022" -[#]: via: "https://news.itsfoss.com/ksnip-experience/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Here’s Why Ksnip is My New Favorite Linux Screenshot Tool in 2022 -====== - -So, I recently upgraded to a dual-monitor setup (1080p + 1440p). - -While I was excited about the productivity boost by getting things done faster without the need to manage/minimize active windows constantly, there were a few nuances that I came across. - -To my surprise, Flameshot refused to work. And, for the tutorials or articles I write, a screenshot tool that offers minor editing or annotation capabilities comes in handy. - -If you have a similar requirement and are confused, the [GNOME Screenshot tool][1] is an option that works with multiple screens flawlessly. - -However, it does not offer annotations. So, I will have to separately open the image using another image editor or Ksnip to make things work. - -Instead, I decided to use Ksnip for screenshots + annotations? Convenient, right? Yes! - -Let me share my brief experience with Ksnip, and why I think you should try it as well! - -### Using Ksnip for Screenshots on Linux - -I installed Ksnip using the [Flatpak package][2] from [Flathub][3]. But, you can also find its Snap package on Snapcraft. - -Packages including DEB/RPM and the AppImage file can be found in its [GitHub releases section][4]. - -You should not have any issues installing it on any Linux distribution. I am currently using it on Pop!_OS 21.10. - -![][5] - -Ksnip supports system tray integration out-of-the-box. So, you should get quick access to the tool and its options, as shown in the screenshot above. - -It lets you take an entire screenshot of two monitors combined using the Full-Screen option. In my case, the result is not pretty (considering I have two monitors with different resolutions) and the file takes up more than 9 MB in size. - -In any case, I do not have a use-case of such an option. So, I stick to the ability to take screenshots of a rectangular area. - -I created a custom shortcut to take a screenshot of an area (or rectangular region) to make it more convenient. Accurately, I mapped it with the middle-click button on my mouse. You can set your preferred shortcut if you want. - -![][6] - -Unfortunately, it does not feature a “delay” option in the system tray to initiate a screenshot after a time gap. But, you can add a delay by accessing the Ksnip editor and initiating a screenshot from within. - -![][7] - -Moving forward, it lets me accurately select a rectangular area across both the monitors, which I want. - -![][8] - -Now, these options alone let me take all kinds of screenshots. - -Once the screenshot has been taken, Ksnip directly opens the editor to let you add annotations, save the photo, or discard it. - -When compared to Flameshot, if I miss adding annotations while taking the screenshot, there’s no built-in image editor to help me with that. And, with Ksnip, I do not have to worry about adding annotations immediately; I can think it over and add annotations if necessary. - -![][9] - -It also allows me to modify the annotations, even after I saved the image to storage. What a nifty feature! - -In addition to all these, you also get some key features like: - - * The ability to pin the editor and use it as a widget across the screen to quickly access the Knsip editor. - * Ability to add watermarks. - * Undo/Redo - * Modify Canvas - * Scale/Crop image - * Add numbers/stickers along with other annotations - * Adjust transparency of sniping area - * Imgur/Script uploader - * Hotkey support - - - -For my workflow, Ksnip is probably the [best screenshot tool for Linux][10] and I will be sticking to it for the near future! - -[Ksnip (GitHub)][11] - -_What do you think about my experience with Knsip? Have you tried it as well? What do you think about it? Let me know your thoughts in the comments!_ - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/ksnip-experience/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/using-gnome-screenshot-tool/ -[2]: https://itsfoss.com/flatpak-guide/ -[3]: https://flathub.org/apps/details/org.ksnip.ksnip -[4]: https://github.com/ksnip/ksnip/releases/tag/v1.9.2 -[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjYzMSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMxNSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjIzMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ0MCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM2MSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[10]: https://itsfoss.com/take-screenshot-linux/ -[11]: https://github.com/ksnip/ksnip diff --git a/sources/tech/20200114 16 Places to Buy a Pre-installed Linux Laptop Online.md b/sources/tech/20200114 16 Places to Buy a Pre-installed Linux Laptop Online.md deleted file mode 100644 index c57b44dfd3..0000000000 --- a/sources/tech/20200114 16 Places to Buy a Pre-installed Linux Laptop Online.md +++ /dev/null @@ -1,368 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (16 Places to Buy a Pre-installed Linux Laptop Online) -[#]: via: (https://www.2daygeek.com/buy-linux-laptops-computers-online/) -[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) - -16 Places to Buy a Pre-installed Linux Laptop Online -====== - -Linux runs on most hardware these days, but most retailers do not have Linux operating systems pre-installed on their hardware. - -Gone are the days when users would only buy a Windows OS pre-installed laptop. - -Over the years, developers have purchased many Linux laptops as they work on major Linux applications related to Docker, Kubernetes, AI, cloud-native computing and machine learning. - -But now-a-days users are eager to buy a Linux laptop instead of Windows, which allows many vendors to choose Linux OS. - -### Why Pre-installed Linux? - -Now-a-days normal users also started using Linux OS because of its open source nature, security and reliability. - -But most of the retailers around the world do not sell Linux operating system pre-installed. - -It is difficult for Linux aspirants to find the compatible hardware and drivers to get Linux OS installed. - -So, we recommend to have Linux OS pre-installed computers instead of figuring out compatibility issues. - -Here we list the top 16 (not in particular order) manufacturer/vendor best known for preloaded Linux OS computers. - -### 1) Dell - -Dell is a US multinational computer technology company that commenced to sell and distribute pre-installed Ubuntu Linux computers for several years now. - -Initially it was started on 2012 as a community project called Sputnik. - -The strong community support to the project became a product. Over the year they launched the first Dell XPS 13 Developer Edition (Sputnik 3) after fixing some major issues in Sputnik 1 and Sputnik 2. - -[![][1]][2] - -They sells Red hat Enterprise Linux and Ubuntu Linux-based laptop for business use, developers and sysadmins. - -All systems are preloaded with Ubuntu but few of them were certified to install Red Hat Enterprise Linux 7.5 and RHEL 8. - -I hope you can install other distro as well if you want to run but i didn’t try it. - -The signature Linux products of Dell are **[XPS developer edition][3]**, **[Precision mobile workstation][4]** and Precision tower workstation. - - * **Availability:** Worldwide - * **Product Details:** [Dell Linux Systems][5] - - - -### 2) System 76 - -**[System76][6]** is an American computer manufacturer based in Denver, Colorado specializing in the sale of notebooks, desktops, and servers. - -From the year 2003, Sytem76 started to computers with the Linux operating system installed. - -They developed Linux distribution named Pop!_OS based on Ubuntu using the GNOME Desktop Environment for developers and professionals. - -[![][1]][7] - -The products are categorized majorly based on portability, storage, graphics and CPU performance. - -Lower laptop model Galago Pro is costing around $950 and higher models such as Adder WS and Serval WS are costing around $2000. - -They provide Destops(Thelio variants) in range of $800 to $2600. - -They also sell mini servers(Meerkat) ranges from $500 and Larger Servers(Jackal, Ibex and Starling) with preloaded Ubuntu ranges from $3000. - -They provide the laptop with the coreboot open source firmware, which is an alternative to the proprietary BIOS firmware. - -System76 ships their products to 60 countries all around the world in Africa, Europe, Asia, North America, South America, Australia and Zealandia. - - * **Availability:** To 60 countries worldwide - * **Product Details:** [System76][8] - - - -### 3) Purism - -Purism is a US-based company that commenced its operation in 2014. - -It manufactures the Librem personal computing devices with a focus on software freedom, computer security, and Internet privacy. - -[![][1]][9] - -Purism sell their products with PureOS installed, a Linux distribution based on Debain developed by purism. - -They sell multiple customized products such as Laptops, Tablets, Smartphones, Server and Librem key. - - * **Availability:** Worldwide - * **Product Details:** [Purism][10] - - - -### 4) Slimbook - -**[Slimbook][11]** commenced their operation in 2015 based in spain. - -It is a Linux friendly product that offers Laptops, Desktops, Mini Pc’s,All in one PC’s and Servers. - -[![][1]][12] - -It sell their products with with preloaded variety of Linux distributions, windows or both. - -They were the first to sell KDE OS installed. It is ideal for Linux beginners, since it is easy to use and easy to learn. - -The Laptop body is made of metal alloy based on aluminum and magnesium. - - * **Availability:** Worldwide - * **Product Details:** [Slimbook][13] - - - -### 5) Tuxedo Computers - -Tuxedo computers a german based company sells notebooks, desktops and mini computers with preloaded Linux. - -Their products desktop cost starts from around 480EUR, mini computers starts from 430EUR and notebooks starts from around 815EUR. - -They have both intel and AMD processors and come up with 5 years warranty and lifetime support. - -TUXEDO Computers are individually built computers and PCs being fully Linux-suitable. They sell their products to most part of Europe and USA. - - * **Availability:** Ships to many countries - * **Product Details:** [Tuxedo Computers][14] - - - -### 6) ThinkPenguin - -ThinkPengine is a US based company started their operation in 2008 to improve support for GNU/Linux and other free software operating systems. - -They sell desktops, notebooks, network equipment, storage devices, printers, scanners and other accessories that are compatible with Linux. - -They provide warranty from 90days to 3years based on the products. - - * **Availability:** Worldwide - * **Product Details:** [ThinkPenguin][15] - - - -### 7) Emperor Linux - -EmperorLinux is a US based company,since 1999 they provides Linux laptops with full hardware support under Linux. - -They offers Linux laptops with unique features such as Molecule RD3D using Sharp’s ground-breaking Auto-Stereo 3D display, Panasonic’s ToughBook line of rugged & semi-rugged Linux laptops. - -They also sell fully-functional Linux tablets, the Raven tablet (based on the ThinkPad X series). - - * **Availability:** USA (International shipping is available upon request). - * **Product Details:** [Emperor Linux][16] - - - -### 8) ZaReason - -ZaReason opened for business in the year 2007 based in US. - -They mainly focuses on R&D labs, businesses both small and large, universities and people’s homes. - -It has a long career building hardware for different distros such as Debian, Fedora, Ubuntu, Kubuntu, Edubuntu and Linux Mint Preloaded. - -[![][1]][17] - -And customer can even choose Linux disros of their choose other than specified. - -Their laptop ranges from $999 to $1699. Their desktop and mini computers ranges from $499 to $1199. - -They do sell desktop specific for game lovers (Gamebox9400). - -Default warranty will be for a year. Additional cost includes for extending the warranty till 3 years. - - * **Availability:** USA and Canada - * **Product Details:** [ZaReason][18] - - - -### 9) LAC Portland - -LAC(Los Alamos Computers) Portland is a US based company, provides Linux-based computers configured and supported by GNU and Linux professionals since 2000. - -They sell Lenovo desktops(ThinkCentre and ThinkStation) ranges from $845 to $2215 and laptops(ThinkPad) ranges from $926 to $2380. - -They install and sell Linux distors such as Ubuntu, Linux Mint, Debain, Fedora, CentOS, Scientific Linux, Open SUSE and Free DOS. - -They provide five years hardware and labor warranty with on-site support options backed worldwide by Lenovo. - - * **Availability:** USA - * **Product Details:** [LAC Portland][19] - - - -### 10) Entroware - -Entroware is a UK based company specialized in providing Ubuntu based computing solutions and services since early 2014 based on customers requirements. - -They sell Ubuntu and Ubuntu MATE powered Desktops, Laptops, and Servers using modern and high quality components. - -[![][1]][20] - -They do sell mini computers and All-in-one computers. - -Desktop ranges from $499 to $1900, laptops ranges from $740 to $1900 and server ranges from $1150 to $2000. - -They also sell accessories such as OS recovery drive, external hard drive, etc. - -The default warranty is for 3 years, they have three warranty plans for which additional may include. They also provide software support. - -Entroware currently ships to UK, Republic of Ireland, France, Germany, Italy and Spain. - - * **Availability:** UK and other European countries (Republic of Ireland, France, Germany, Italy and Spain). - * **Product Details:** [Entroware][21] - - - -### 11) Vikings - -Viking is based in Germany, sells Libre-friendly hardware certified by the Free Software Foundation with preinstalled Debian, Trisquel or Parabola Linux based on customer requirement. - -They sell desktops, laptops, servers, routers, mainboards, key generators, PCI cards and usb sound adaptors compatible with Linux. - -The Linux laptops and desktops by Vikings come with core boot or Libreboot. - -Their desktop ranges from 895EUR, laptop ranges from 250EUR and servers ranges from 990EUR. - -They provide refurbished/used parts: mainboard, CPU(s) with rigorous testing of all parts and also gives a comprehensive guarantee for all parts of the system. - -Their product warranty varies from 1year to 3year, with subsequent additional charges. - -They ship to all part of the world with very few exceptions such as North Korea. - - * **Availability:** Worldwide - * **Product Details:** [Viking][22] - - - -### 12) Juno Computers - -Juno Computers is company based in UK comes with pre-installed elementary OS or Ubuntu. - -They provide an application known as Kronos which allows for quick and easy installation of commercial applications such as Chrome, Dropbox, Spotify, Skype, etc. - -Their laptop ranges from $945/357EUR to $999/933EUR and mini PC ranges around $549/490EUR. - -They provide a 1-year limited warranty on all manufacture problems. - -Currently they ship to mainland USA, some Canadian provinces, and most part of the world includes South Africa, Asia and Europe. - - * **Availability:** Worldwide - * **Product Details:** [Juno Computers][23] - - - -### 13) Pine64 - -Pine64 is a US based community platform that offers laptops (**[Pinebooks][24]**), Pine Phones, Pine Watches(PineTime), Single board computers and other compatible Linux accessories. - -It commenced its operation in the year 2016 powered by ARM devices. - -[![][1]][25] - -The laptops ranges from $100 to $200. - -All single board and accessories sold on the Pine store are entitled to a 30 days Limited Warranty against defects in materials and workmanship, but provide online support through their forum. - -They almost ship to most part of the country, refer site shipping policy for more details. - - * **Availability:** Worldwide - * **Product Details:** [Pine64][26] - - - -### 14) Libiquity - -Libiquity is a US based company with R&D investments and its own personal computer brand since 2011. - -They offer laptop(Taurinus X200) preloaded with Trisquel and comes with ProteanOS, a free/libre and open source embedded operating system distribution endorsed by Free Software Foundation. - -Laptop ranges starts from $375. Product comes with limited warrant of 1 year. Currently their shipping are limited to US. - - * **Availability:** US - * **Product Details:** [Libiquity][27] - - - -### 15) LinuxCertified - -LinuxCertified an US based company offers lenovo desktops and laptops with Linux distros preinstalled. - -Various preloaded Linux distros offered are Ubuntu, Fedora, Open SUSE, CentOS, Redhat Enterprise Linux and Oracle Enterprise Linux. - -Desktops(ThinkStation) ranges from $899 to $2199 and laptops(Z1, LC series) ranges from $899 to $2199. - -Product warranty is for one year. They ship their product within US. - - * **Availability:** Worldwide - * **Product Details:** [LinuxCertified][28] - - - -### 16) Star Labs - -**[Star Labs][29]** was created by a group of Linux users, who created the ultimate Linux laptop for their own use. - -It’s based in the United Kingdom which sells laptops with Linux pre-installed. - -[![][1]][30] - -Star Labs offer a range of laptops designed and built specifically for Linux. - -All of their laptops come with a choice of Ubuntu Linux, Linux Mint or Zorin OS pre-installed. - -It is not limited to the above three distributions, and you can install any Linux distros on their hardware, and it runs flawlessly. - - * **Availability:** Worldwide - * **Product Details:** [Star Labs][31] - - - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/buy-linux-laptops-computers-online/ - -作者:[Magesh Maruthamuthu][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.2daygeek.com/author/magesh/ -[b]: https://github.com/lujun9972 -[1]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 -[2]: https://www.2daygeek.com/wp-content/uploads/2020/01/dell-xps-13-developer-deition-2.png -[3]: https://www.linuxtechnews.com/dells-new-xps-13-developer-edition-is-powered-by-the-10th-generation/ -[4]: https://www.linuxtechnews.com/dell-launches-three-new-dell-precision-developer-editions-laptops-preloaded-with-ubuntu-linux/ -[5]: https://www.dell.com/en-us/work/shop/overview/cp/linuxsystems -[6]: https://www.linuxtechnews.com/system76-has-announced-new-gazelle-laptops/ -[7]: https://www.2daygeek.com/wp-content/uploads/2020/01/system76-1.jpg -[8]: https://system76.com/laptops -[9]: https://www.2daygeek.com/wp-content/uploads/2020/01/librem-1.jpg -[10]: https://puri.sm/products/ -[11]: https://www.linuxtechnews.com/slimbook-is-offering-a-new-laptop-called-slimbook-pro-x/ -[12]: https://www.2daygeek.com/wp-content/uploads/2020/01/slimbook.jpg -[13]: https://slimbook.es/en/comparison-slimbook-pro-x-with-other-ultrabooks -[14]: https://www.tuxedocomputers.com/en/Linux-Hardware/Linux-Notebooks.tuxedo -[15]: https://www.thinkpenguin.com/catalog/notebook-computers-gnu-linux-2 -[16]: http://www.emperorlinux.com/systems/ -[17]: https://www.2daygeek.com/wp-content/uploads/2020/01/zareason-1.jpg -[18]: https://zareason.com/Laptops/ -[19]: https://shop.lacpdx.com/laptops/ -[20]: https://www.2daygeek.com/wp-content/uploads/2020/01/entroware.jpg -[21]: https://www.entroware.com/store/laptops -[22]: https://store.vikings.net/libre-friendly-hardware/x200-ryf-certfied -[23]: https://junocomputers.com/store/ -[24]: https://www.linuxtechnews.com/pinebook-pro-199-linux-laptop-pre-orders-ansi-iso-keyboards/ -[25]: https://www.2daygeek.com/wp-content/uploads/2020/01/Pinebook_Pro-photo-1.jpg -[26]: https://store.pine64.org/ -[27]: https://shop.libiquity.com/ -[28]: https://www.linuxcertified.com/linux_laptops.html -[29]: https://www.linuxtechnews.com/star-labs-offering-a-range-of-linux-laptops-with-zorin-os-15-pre-installed/ -[30]: https://www.2daygeek.com/wp-content/uploads/2020/01/starlabs-1.jpg -[31]: https://earth.starlabs.systems/pages/laptops diff --git a/sources/tech/20200115 Develop GUI apps using Flutter on Fedora.md b/sources/tech/20200115 Develop GUI apps using Flutter on Fedora.md deleted file mode 100644 index afff65b34e..0000000000 --- a/sources/tech/20200115 Develop GUI apps using Flutter on Fedora.md +++ /dev/null @@ -1,199 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Develop GUI apps using Flutter on Fedora) -[#]: via: (https://fedoramagazine.org/develop-gui-apps-using-flutter-on-fedora/) -[#]: author: (Carmine Zaccagnino https://fedoramagazine.org/author/carzacc/) - -Develop GUI apps using Flutter on Fedora -====== - -![][1] - -When it comes to app development frameworks, Flutter is the latest and greatest. Google seems to be planning to take over the entire GUI app development world with Flutter, starting with mobile devices, which are already perfectly supported. Flutter allows you to develop cross-platform GUI apps for multiple targets — mobile, web, and desktop — from a single codebase. - -This post will go through how to install the Flutter SDK and tools on Fedora, as well as how to use them both for mobile development and web/desktop development. - -### Installing Flutter and Android SDKs on Fedora - -To get started building apps with Flutter, you need to install - - * the Android SDK; - * the Flutter SDK itself; and, - * optionally, an IDE and its Flutter plugins. - - - -#### Installing the Android SDK - -Flutter requires the installation of the Android SDK with the entire [Android Studio][2] suite of tools. Google provides a _tar.gz_ archive. The Android Studio executable can be found in the _android-studio/bin_ directory and is called _studio.sh_. To run it, open a terminal, _cd_ into the aforementioned directory, and then run: - -``` -$ ./studio.sh -``` - -#### Installing the Flutter SDK - -Before you install Flutter you may want to consider what release channel you want to be on. - -The _stable_ channel is least likely to give you a headache if you just want to build a mobile app using mainstream Flutter features. - -On the other hand, you may want to use the latest features, especially for desktop and web app development. In that case, you might be better off installing either the latest version of the _beta_ or even the _dev_ channel. - -Either way, you can switch between channels after you install using the _flutter channel_ command explained later in the article. - -Head over to the [official SDK archive page][3] and download the latest installation bundle for the release channel most appropriate for your use case. - -The installation bundle is simply a _xz-_compressed tarball (_.tar.xz_ extension). You can extract it wherever you want, given that you add the _flutter/bin_ subdirectory to the _PATH_ environment variable. - -#### Installing the IDE plugins - -To install the plugin for [Visual Studio Code][4], you need to search for _Flutter_ in the _Extensions_ tab. Installing it will also install the _Dart_ plugin. - -The same will happen when you install the plugin for Android Studio by opening the _Settings_, then the _Plugins_ tab and installing the _Flutter_ plugin. - -### Using the Flutter and Android CLI Tools on Fedora - -Now that you’ve installed Flutter, here’s how to use the CLI tool. - -#### Upgrading and Maintaining Your Flutter Installations - -The _flutter doctor_ command is used to check whether your installation and related tools are complete and don’t require any further action. - -For example, the output you may get from _flutter doctor_ right after installing on Fedora is: - -``` -Doctor summary (to see all details, run flutter doctor -v): - -[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Linux, locale it_IT.UTF-8) - -[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2) - - ✗ Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses - -[!] Android Studio (version 3.5) - - ✗ Flutter plugin not installed; this adds Flutter specific functionality. - - ✗ Dart plugin not installed; this adds Dart specific functionality. - -[!] Connected device - - ! No devices available - -! Doctor found issues in 3 categories. -``` - -Of course the issue with the Android toolchain has to be resolved in order to build for Android. Run this command to accept the licenses: - -``` -$ flutter doctor --android-licenses -``` - -Use the _flutter channel_ command to switch channels after installation. It’s just like switching branches on Git (and that’s actually what it does). You use it in the following way: - -``` -$ flutter channel -``` - -…where you’d replace _<channel_name>_ with the release channel you want to switch to. - -After doing that, or whenever you feel the need to do it, you need to update your installation. You might consider running this every once in a while or when a major update comes out if you follow Flutter news. Run this command: - -``` -$ flutter upgrade -``` - -#### Building for Mobile - -You can build for Android very easily: the _flutter build_ command supports it by default, and it allows you to build both APKs and newfangled app bundles. - -All you need to do is to create a project with _flutter create_, which will generate some code for an example app and the necessary _android_ and _ios_ folders. - -When you’re done coding you can either run: - - * _flutter build apk_ or _flutter build appbundle_ to generate the necessary app files to distribute, or - * _flutter run_ to run the app on a connected device or emulator directly. - - - -When you run the app on a phone or emulator with _flutter run_, you can use the _R_ button on the keyboard to use _stateful hot reload_. This feature updates what’s displayed on the phone or emulator to reflect the changes you’ve made to the code without requiring a full rebuild. - -If you input a capital _R_ character to the debug console, you trigger a _hot restart_. This restart doesn’t preserve state and is necessary for bigger changes to the app. - -If you’re using a GUI IDE, you can trigger a hot reload using the _bolt_ icon button and a hot restart with the typical _refresh_ button. - -#### Building for the Desktop - -To build apps for the desktop on Fedora, use the [flutter-desktop-embedding][5] repository. The _flutter create_ command doesn’t have templates for desktop Linux apps yet. That repository contains examples of desktop apps and files required to build on desktop, as well as examples of plugins for desktop apps. - -To build or run apps for Linux, you also need to be on the _master_ release channel and enable Linux desktop app development. To do this, run: - -``` -$ flutter config --enable-linux-desktop -``` - -After that, you can use _flutter run_ to run the app on your development workstation directly, or run _flutter build linux_ to build a binary file in the _build/_ directory. - -If those commands don’t work, run this command in the project directory to generate the required files to build in the _linux/_ directory: - -``` -$ flutter create . -``` - -#### Building for the Web - -Starting with Flutter 1.12, you can build Web apps using Flutter with the mainline codebase, without having to use the _flutter_web_ forked libraries, but you have to be running on the _beta_ channel. - -If you are (you can switch to it using _flutter channel beta_ and _flutter upgrade_ as we’ve seen earlier), you need to enable web development by running _flutter config –enable-web_. - -After doing that, you can run _flutter run -d web_ and a local web server will be started from which you can access your app. The command returns the URL at which the server is listening, including the port number. - -You can also run _flutter build web_ to build the static website files in the _build/_ directory. - -If those commands don’t work, run this command in the project directory to generate the required files to build in the _web/_ directory: - -``` -$ flutter create . -``` - -### Packages for Installing Flutter - -Other distributions have packages or community repositories to install and update in a more straightforward and intuitive way. However, at the time of writing, no such thing exists for Flutter. If you have experience packaging RPMs for Fedora, consider contributing to [this GitHub repository][6] for [this COPR package][7]. - -The next step is learning Flutter. You can do that in a number of ways: - - * Read the good API reference documentation on the official site - * Watching some of the introductory video courses available online - * Read one of the many books out there today. _[Check out the author’s bio for a suggestion! — Ed.]_ - - - -* * * - -_Photo by [Randall Ruiz][8] on [Unsplash][9]._ - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/develop-gui-apps-using-flutter-on-fedora/ - -作者:[Carmine Zaccagnino][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://fedoramagazine.org/author/carzacc/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/01/flutter-816x345.jpg -[2]: https://developer.android.com/studio -[3]: https://flutter.dev/docs/development/tools/sdk/releases?tab=linux -[4]: https://fedoramagazine.org/using-visual-studio-code-fedora/ -[5]: https://github.com/google/flutter-desktop-embedding -[6]: https://github.com/carzacc/flutter-copr -[7]: https://copr.fedorainfracloud.org/coprs/carzacc/flutter/ -[8]: https://unsplash.com/@ruizra?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[9]: https://unsplash.com/s/photos/flutter?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText diff --git a/sources/tech/20200205 PaperWM, the Tiling Window Manager for GNOME.md b/sources/tech/20200205 PaperWM, the Tiling Window Manager for GNOME.md deleted file mode 100644 index 92fc598212..0000000000 --- a/sources/tech/20200205 PaperWM, the Tiling Window Manager for GNOME.md +++ /dev/null @@ -1,122 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (PaperWM, the Tiling Window Manager for GNOME) -[#]: via: (https://itsfoss.com/paperwm/) -[#]: author: (John Paul https://itsfoss.com/author/john/) - -PaperWM, the Tiling Window Manager for GNOME -====== - -Lately, tiling window managers have been gaining popularity even among the regular desktop Linux users. Unfortunately, it can be difficult and time-consuming for a user to install and set up a tiling window manager. - -This is why projects like [Regolith][1] and PaperWM has come up to provide tiling window experience with minimal efforts. - -We have already discussed [Regolith desktop][2] in details. In this article, we’ll check out PaperWM. - -### What is PaperWM? - -According to its GitHub repo, [PaperWM][3] is “an experimental [Gnome Shell extension][4] providing scrollable tiling of windows and per monitor workspaces. It’s inspired by paper notebooks and tiling window managers.” - -PaperWM puts all of your windows in a row. You can quickly switch between windows very quickly. It’s a little bit like having a long spool of paper in front of you that you can move back and forth. - -This extension supports GNOME Shell 3.28 to 3.34. It also supports both X11 and Wayland. It is written in JavaScript. - -![PaperWM Desktop][5] - -# How to Install PaperWM? - -To install the PaperWM extension, you will need to clone the Github repo. Use this command: - -``` -git clone 'https://github.com/paperwm/PaperWM.git' "${XDG_DATA_HOME:-$HOME/.local/share}/gnome-shell/extensions/[email protected]:matrix.org" -``` - -Now all you have to do is run: - -``` -./install.sh -``` - -The installer will set up and enable PaperWM. - -If you are an Ubuntu user, there are a couple of things that you will need to consider. There are currently three different versions of the Gnome desktop available with Ubuntu: - - * ubuntu-desktop - * ubuntu-gnome-desktop - * vanilla-gnome-desktop - - - -Ubuntu ships ubuntu-desktop by default and includes the _desktop-icons_ package, which causes issues with PaperWM. The PaperWM devs recommend that you turn off the desktop-icons extension [using GNOME Tweaks tool][6]. However, while this step does work in 19.10, they say that users have reported that it is not working 19.04. - -According to the PaperWM devs, using _ubuntu-gnome-desktop_ produces the best out of the box results. _vanilla-gnome-desktop_ has some keybindings that raise havoc with PaperWM. - -**Recommended Read:** - -![][7] - -#### [Get a Preconfigured Tiling Window Manager on Ubuntu With Regolith][2] - -Using tiling window manager in Linux can be tricky with all those configuration. Regolith gives you an out of box i3wm experience within Ubuntu. - -### How to Use PaperWM? - -Like most tiling window managers, PaperWM uses the keyboard to control and manage the windows. PaperWM also supports mouse and touchpad controls. For example, if you have Wayland installed, you can use a three-fingered swipe to navigate. - -![PaperWM in action][8] - -Here is a list of a few of the keybinding that preset in PaperWM: - - * Super + , or Super + . to activate the next or previous window - * Super + Left or Super + Rightto activate the window to the left or right - * Super + Up or Super + Downto activate the window above or below - * Super + , or Super + . to activate the next or previous window - * Super + Tab or Alt + Tab to cycle through the most recently used windows - * Super + C to center the active window horizontally - * Super + R to resize the window (cycles through useful widths) - * Super + Shift + R to resize the window (cycles through useful heights) - * Super + Shift + F to toggle fullscreen - * Super + Return or Super + N to create a new window from the active application - * Super + Backspace to close the active window - - - -The Super key is the Windows key on your keyboard. You can find the full list of keybindings on the PaperWM [GitHub page][9]. - -### Final Thoughts on PaperWM - -As I have stated previously, I don’t use tiling managers. However, this one has me thinking. I like the fact that you don’t have to do a lot of configuring to get it working. Another big plus is that it is built on GNOME, which means that getting a tiling manager working on Ubuntu is fairly straight forward. - -The only downside that I can see is that a system running a dedicated tiling window manager, like [Sway][10], would use fewer system resources and be faster overall. - -What are your thoughts on the PaperWM GNOME extension? Please let us know in the comments below. - -If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][11]. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/paperwm/ - -作者:[John Paul][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/john/ -[b]: https://github.com/lujun9972 -[1]: https://regolith-linux.org/ -[2]: https://itsfoss.com/regolith-linux-desktop/ -[3]: https://github.com/paperwm/PaperWM -[4]: https://itsfoss.com/gnome-shell-extensions/ -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/01/paperwm-desktop.png?ssl=1 -[6]: https://itsfoss.com/gnome-tweak-tool/ -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/09/regolith-linux.png?fit=800%2C450&ssl=1 -[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/01/paperwm-desktop2.png?fit=800%2C450&ssl=1 -[9]: https://github.com/paperwm/PaperWM#usage -[10]: https://itsfoss.com/sway-window-manager/ -[11]: https://reddit.com/r/linuxusersgroup diff --git a/sources/tech/20200214 How to restore a single-core computer with Linux.md b/sources/tech/20200214 How to restore a single-core computer with Linux.md deleted file mode 100644 index a88a2c157d..0000000000 --- a/sources/tech/20200214 How to restore a single-core computer with Linux.md +++ /dev/null @@ -1,270 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to restore a single-core computer with Linux) -[#]: via: (https://opensource.com/article/20/2/restore-old-computer-linux) -[#]: author: (Howard Fosdick https://opensource.com/users/howtech) - -How to restore a single-core computer with Linux -====== -Let's have some geeky fun refurbishing your prehistoric Pentium with -Linux and open source. -![Two animated computers waving one missing an arm][1] - -In a [previous article][2], I explained how I refurbish old dual-core computers ranging from roughly five to 15 years old. Properly restored, these machines can host a fully capable lightweight Linux distribution like [Mint/Xfce][3], [Xubuntu][4], or [Lubuntu][5] and perform everyday tasks. But what if you have a really old computer gathering dust in your attic or basement? Like a Pentium 4 desktop or Pentium M laptop? Yikes! Can you even do anything with a relic like that? - -### Why restore a relic? - -For starters, you might learn a bit about hardware and open source software by refurbishing it. And you could have some fun along the way. Whether you can make much use of it depends on your expectations. - -A single-core computer can perform well for a specific purpose. For example, my friend created a dandy retro gaming box (like I describe below) that runs hundreds of Linux and old Windows and DOS games. His kids love it! - -Another friend uses his Pentium 4 for running design spreadsheets in his workshop. He finds it convenient to have a dedicated machine tucked into a corner of his shop. He likes that he doesn't have to worry about heat or dust ruining an expensive modern computer. - -My romance author acquaintance employs her Pentium M as a "novelist's workstation" lodged in her cozy attic hideaway. The laptop functions as her private word processor. - -I've used old computers to teach beginners how to build and repair hardware. Old equipment makes the best testbed because it's expendable. If someone makes a mistake and fries a board, it doesn't much matter. (Contrast this to how you would feel if you wrecked your main computer!) - -The web suggests many [other potential uses][6] for old Pentiums: security cam monitors, network-attached storage (NAS) servers, [SETI][7] boxes, torrent servers, anonymous [Tails][8] servers, Bitcoin miners, programming workstations, thin clients, terminal emulators, routers, file servers, and more. To me, many of these applications sound more like fun projects than practical uses for single-core computers. That doesn't mean they aren't worth your while; it's just that you want to be clear-eyed about any project you take on. - -By current standards, P-4s and Ms are terribly [weak processors][9]. For example, using them for web surfing is problematic because webpage size and programming complexity have [grown exponentially][10]. And the open web is closing—increasingly, sites won't allow you access unless you let them run all those ads that can overwhelm old processors. (I'll discuss web surfing performance tricks later in this article.) Another shortcoming of old computers is their energy consumption. Better electricity-to-performance ratios often make newer computers more sensible. This especially true when a [tablet or smartphone][11] can fulfill your needs. - -Nevertheless, you can still have fun and learn a lot by tinkering with an old P-4 or M. They're great educational tools, they're expendable, and they can be useful in dedicated roles. Best of all, you can get them for free. I'll tell you how. - -Still reading? Okay, let's have some geeky fun refurbishing your prehistoric Pentium. - -### Understand hardware evolution - -As a quick level-set, here are the common names for the P-4 and M class processors and their rough dates of manufacture: - -**Desktops (2000-2008)** - - * Pentium 4 - * Pentium 4 HT (Hyper-Threading) - * Pentium 4 EE (Extreme Edition) - - - -**Desktops (2005-2008)** - - * Pentium D (early dual-core) - - - -**Mobile (2002-2008)** - - * Pentium M - * Pentium 4-M - * Mobile Pentium 4 - * Mobile Pentium 4 HT - - - -Sources: Wikipedia (for the [P-4][12], [P-M][13], and [processor][14] lists), [CPU World,][15] [Revolvy][16]. - -Machines hosting these processors typically use either DDR2 or DDR memory. Dual-core processors entered the market in 2005 and displaced single-core CPUs within a few years. I'll assume you have some version of what's in the above table. Or you might have an equivalent [AMD][17] or [Celeron][18] processor from the same era. - -The big draw of this old hardware is that you can get it for free. People consider it junk. They'll be only too glad to give you their castoffs. If you don't have a machine on hand, just ask your friends or family. Or drop by the local recycling center. Unless they have strict rules, they'll be happy to give you this old equipment. You can even advertise on [Craigslist][19], [Freecycle,][20] or [other reuse websites][21]. - -**A quick tip:** Grab more than one machine. With old hardware, you often need to cannibalize parts from several computers to build one good working one. - -### Prepare the hardware - -Before you can use your old computer, you must refurbish it. The steps to fixing it up are: - - 1. Clean it - 2. Identify what hardware you have - 3. Verify the hardware works - - - -Start by opening up the box and cleaning out the dirt. Dust causes the heat that kills electronics. A can of compressed air helps. - -Always keep yourself grounded when touching things so that you don't harm the electronics. And don't rub anything with a cleaning rag! Even a shock you can't feel can damage computer circuitry. - -While you've got the box open, learn everything you can about your hardware. Write it all down, so you remember it later: - - * Count the open memory slots, if any. Is the RAM DDR or DDR2 (or something else)? - * Read the hard drive label to learn its capacity and age. (It'll probably be an old IDE drive. You can identify IDE drives by their wide connector ribbons.) - * Check the optical drive label to see what kinds of discs it reads and/or writes, at what speed, and to what standard(s). - * Note other peripherals, add-in cards, or anything unusual. - - - -Close and boot the machine into its boot-time [BIOS][22] panels. [This list][23] tells you what program function (PF) key to press to access those startup panels for your specific computer. Now you can complete your hardware identification by rounding out the details on your processor, memory, video memory, and more. - -### Verify the hardware - -Once you know what you've got, verify that it all works. Test: - - * Memory - * Disk - * Motherboard - * Peripherals (optical drive, USB ports, sound, etc.) - - - -Run any diagnostic tests in the computer's boot or BIOS panels. Free resource kits like [Hiren's BootCD][24] or the [Ultimate Boot CD][25] can round out your testing with any diagnostics your boot panels lack. These kits offer dozens of testing programs: all are free, but not all are open source. You can boot them off a live USB or DVD so that you don't have to install anything on the computer. - -Be sure to run the "extended" or long tests for the memory and disk drive. Run tests overnight if you have to. Do this job right! If you miss a problem now, it could cause you big headaches later. - -If you find a problem, refer to my _[Quick guide to fixing hardware][26]_ to solve common issues. - -### Essential hardware upgrades - -You'll want to make two key hardware upgrades. First, increase memory to the computer's maximum. (You can find the maximum for your computer with a quick web search for its specs.) The practical minimum to run many lightweight Linux distros is 1GB RAM; 2GB or more is ideal. While the maximum allowable memory varies by the machine, the great majority of these computers will upgrade to at least 2GB. - -Second—if the desktop doesn't already have one—add a video card. This offloads graphics processing from the motherboard to the video card and increases the computer's video memory. Bumping up the VRAM from 32 or 64MB to 256GB or more greatly increases the range of applications an old computer can run. Especially if you want to run games. - -Be sure the video card fits your computer's [video slot][27] (AGP, PCI, or PCI-Express) and has the right [cable connector][28] (VGA or DVI). You can issue a couple of [Linux line commands][29] to see how much VRAM your system has, or look in the BIOS boot panels. - -These two simple upgrade hacks—increasing memory and video power—take a marginal machine and make it _way_ more functional. Your goal is to build the most powerful P-4 or M ever. That way, you can squeeze the most performance from this aging design. - -The good news is that with the old computers we're talking about, you can get any parts you need for free. Just cannibalize them from other discarded PC's. - -### Select the software - -Choosing the right software for a P-4 or M is critical. [Don't][30] use an [unsupported][31] Windows version just because it's already on the PC; malware might plague you if you do. A fresh install is mandatory. - -Open source software is the way to go. [Many][32] Linux [distributions][33] are specifically designed for older computers. And with Linux, you can install, move, copy, and clone the operating system and its apps at will. This makes your job easier: You won't run into activation or licensing issues, and it's all free. - -Which distribution should you pick? Assuming you have at least 2GB of memory, start your search by trying a _lightweight distribution_—these feature resource-stingy [desktop environments][34]. Xfce or LXQt are excellent desktop environment choices. Products that [consume more resources][35] or produce fancier graphics—like Unity, GNOME, KDE, MATE, and Cinnamon—won't perform well. - -The lightweight Linux distros I've enjoyed success with are Mint/Xfce, Xubuntu, and Lubuntu. The first two use Xfce while Lubuntu employs LXQt. You can find [many other][36] excellent candidate distros beyond these three choices that I can vouch for. - -Be sure to download the 32-bit versions of the operating systems; 64-bit versions don't make much sense unless a computer has at least 4GB of memory. - -The lightweight Linux distros I've cited offer friendly menus and feature huge software repositories backed by active forums. They'll enable your old computer to do everything it's capable of. However, they won't run on every computer from the P-4 era. If one of these products runs on your computer and you like it, great! You've found your distro. - -If your computer doesn't perform well with these selections, won't boot, or you have less than 2GB of memory, try an _ultralight distribution_. Ultralights reduce resource use by replacing desktop environments with [window managers][37] like Fluxbox, FLWM, IceWM, JWM, or Openbox. Window managers use fewer resources than desktop environments. The trade-off is that they're less flexible. As an example, you may have to dip into code to alter your desktop or taskbar icons. - -My go-to ultralight distro is [Puppy Linux][38]. It comes in several variants that run well on Pentium 4's and M's with only 1GB of memory. Puppy's big draw is that it has versions designed specifically for older computers. This means you'll avoid the hassles you might run into with other distros. For example, Puppy versions run on old CPUs that don't support features like PAE or SSE3. They'll even help you run an older kernel or obsolete bootstrap program if your hardware requires it. - -And Puppy runs _fast_ on limited-resource computers! It optimizes performance by loading the operating system entirely into memory to avoid slow disk access. It bundles a full range of apps that have been carefully selected to use minimal hardware resources. - -Puppy is also user-friendly. Even a naive end user can use its simple menus and attractive desktop. But be advised—it takes expertise to install and configure the product. You might have to spend some time on Puppy's [forum][39] to get oriented. The forum is especially useful because many who post there work with old computers. - -A fun alternative to Puppy is [Tiny Core][40] Linux. With Tiny Core, you install only the software components you want. So you build up your environment from the absolute minimum. This takes time but results in a lean, mean system. Tiny Core is perfect for creating a dedicated server. It's a great learning tool, too, so check out its [free eBook][41]. - -If you want a quick, no-hassles install, you might try [antiX][42]. It's Debian-based, offers a selection of lightweight interfaces, and runs well on machines with only a gigabyte of memory. I've had excellent results installing antiX on a variety of old PCs. - -_**Caution:**_ Many distros casually claim that they run on "old computers" when they really mean that they run on _limited-resource computers_. There's a big difference. Old computers sometimes do not support all the CPU features required by newer operating systems. Avoid problems by selecting a Linux proven to run on your hardware. - -Don't know if a distro will run on your box? Save yourself some time by posting a message on the distro's forum and asking for responses from folks using hardware like yours. You should receive some success stories. If nobody can say they've done what you're trying to do, I'd avoid that product. - -### How to use your refurbished computer - -Will you be happy using your restored PC? It depends on what you expect. - -People who use aging systems learn to leverage minimal resources. For example, they run resource-stingy programs like GNOME Office in place of LibreOffice. They forgo CPU-intense programs like emulators, graphics-heavy apps, video processing, and virtual machine hosting. They focus on one task at a time and don't expect much concurrency. And they know how to manage machine resources proactively. - -Old hardware can perform well in dedicated situations. Earlier, I mentioned my friends who use their old computers for design spreadsheets and as a writer's workbench. And I wrote this article on my personal retro box—a Dell GX280 desktop with a Pentium 4 at 3.2GHz, with 2GB DDR-2 RAM and two 40GB IDE disks, dual-booting Puppy and antiX. - -#### Create a retro game box - -You can also create a fantastic retro game box. First, install an appropriate distro. Then install [Wine][43], a program designed to run Windows software on Linux. Now you'll be able to run nearly all your old Windows XP, ME/98/95, and 3.1 games. [DOSBox][44] supports tons more [free DOS games][45]. And Linux offers over a thousand more. - -I've enjoyed nostalgic fun on a P-4 running antiX and all the old games I remember from years ago. Just be sure you've maxed out system memory and added a good video card for the best results. - -#### Access the web - -The big challenge with old computers is web surfing. [This study][46] claims that average website size has increased 100% over a three-year period, while [this article][47] tells how bloated news sites have become. Videos, animation, images, trackers, ad requests—they all make websites slower than just a few years ago. - -Worse, websites increasingly refuse you access unless you allow them to run their ads. This is a problem because the ads can overwhelm old CPUs. In fact, for most websites, the resources required to run ads and trackers are _way_ greater than that required for the actual website content. - -Here are the performance tricks you need to know if you web surf with an older computer: - - * Run the fastest, lightest browser possible. Chrome, Firefox, and Opera are probably the top mainstream offerings. - * Try alternative [minimalist browsers][48] to see if they can meet your needs: [Dillo][49], [NetSurf][50], [Dooble][51], [Lynx][52], [Links][53], or others. - * Actively manage your browser. - * Don't open many browser tabs. - * Manually start and stop processing in specific tabs. - * Block ads and trackers: - * Offload this chore to your virtual private network (VPN) if at all possible. - * Otherwise, use a browser extension. - * Don't slow down your browser by installing add-ons or extensions beyond the minimum required. - * Disable autoplay for videos and Flash. - * Toggle JavaScript off and on. - * Ensure the browser renders text before graphics. - * Don't run background tasks while web surfing. - * Manually clear cookies to avoid page-access limits on some websites. - * Linux means you don't have to run real-time anti-malware (which consumes a CPU core on many Windows PCs). - - - -Employing some of these tricks, I happily use refurbished dual-core computers for all my web surfing. But with today's internet, I find single-core processors inadequate for anything beyond the occasional web lookup. In other words, they're acceptable for _web access_ but insufficient for _web surfing_. That's just my opinion. Yours may vary depending on your expectations and the nature of your web activity. - -### Enjoy free educational fun - -However you use your refurbished P-4 or M, you'll know a lot more about computer hardware and open source software than when you started. It won't cost you a penny, and you'll have some fun along the way! - -Please share your own refurbishing experiences in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/restore-old-computer-linux - -作者:[Howard Fosdick][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/howtech -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_other11x_cc.png?itok=I_kCDYj0 (Two animated computers waving one missing an arm) -[2]: http://opensource.com/article/19/7/how-make-old-computer-useful-again -[3]: http://linuxmint.com/ -[4]: https://xubuntu.org/ -[5]: http://lubuntu.me/ -[6]: http://www.google.com/search?q=uses+for+a+pentium+IV -[7]: https://en.wikipedia.org/wiki/Search_for_extraterrestrial_intelligence -[8]: https://en.wikipedia.org/wiki/Tails_(operating_system) -[9]: http://www.cpubenchmark.net/low_end_cpus.html -[10]: http://www.digitaltrends.com/web/internet-is-getting-slower/ -[11]: https://www.forbes.com/sites/christopherhelman/2013/09/07/how-much-energy-does-your-iphone-and-other-devices-use-and-what-to-do-about-it/#ba4918e2f702 -[12]: https://en.wikipedia.org/wiki/Pentium_4 -[13]: https://en.wikipedia.org/wiki/Pentium_M -[14]: https://en.wikipedia.org/wiki/List_of_Intel_Pentium_4_microprocessors -[15]: http://www.cpu-world.com/CPUs/Pentium_4/index.html -[16]: https://www.revolvy.com/page/List-of-Intel-Pentium-4-microprocessors?cr=1 -[17]: https://en.wikipedia.org/wiki/List_of_AMD_microprocessors -[18]: https://en.wikipedia.org/wiki/Celeron -[19]: https://www.craigslist.org/about/sites -[20]: https://www.freecycle.org/ -[21]: https://alternativeto.net/software/freecycle/ -[22]: http://en.wikipedia.org/wiki/BIOS -[23]: http://www.disk-image.com/faq-bootmenu.htm -[24]: http://www.hirensbootcd.org/download/ -[25]: http://www.ultimatebootcd.com/ -[26]: http://www.rexxinfo.org/Quick_Guide/Quick_Guide_To_Fixing_Computer_Hardware -[27]: http://www.playtool.com/pages/vidslots/slots.html -[28]: https://silentpc.com/articles/video-connectors -[29]: https://www.cyberciti.biz/faq/howto-find-linux-vga-video-card-ram/ -[30]: https://fusetg.com/dangers-running-unsupported-operating-system/ -[31]: http://home.bt.com/tech-gadgets/computing/windows-7/windows-7-support-end-11364081315419 -[32]: https://itsfoss.com/lightweight-linux-beginners/ -[33]: https://fossbytes.com/best-lightweight-linux-distros/ -[34]: https://en.wikipedia.org/wiki/Desktop_environment -[35]: http://www.phoronix.com/scan.php?page=article&item=ubu-1704-desktops&num=3 -[36]: https://www.google.com/search?ei=TfIoXtG5OYmytAbl04z4Cw&q=best+lightweight+linux+distros+for+old+computers&oq=best+lightweight+linux+distros+for+old&gs_l=psy-ab.1.0.0i22i30l8j0i333.6806.8527..10541...2.2..0.159.1119.2j8......0....1..gws-wiz.......0i71j0.a6LTmaIXan0 -[37]: https://en.wikipedia.org/wiki/X_window_manager -[38]: http://puppylinux.com/ -[39]: http://murga-linux.com/puppy/ -[40]: http://tinycorelinux.net/ -[41]: http://tinycorelinux.net/book.html -[42]: http://antixlinux.com/ -[43]: https://www.winehq.org/ -[44]: https://en.wikipedia.org/wiki/DOSBox -[45]: https://www.dosgamesarchive.com/ -[46]: https://www.digitaltrends.com/web/internet-is-getting-slower/ -[47]: https://www.forbes.com/sites/kalevleetaru/2016/02/06/why-the-web-is-so-slow-and-what-it-tells-us-about-the-future-of-online-journalism/#34475c2072f4 -[48]: http://en.wikipedia.org/wiki/Comparison_of_lightweight_web_browsers -[49]: http://www.dillo.org/ -[50]: http://www.netsurf-browser.org/ -[51]: http://textbrowser.github.io/dooble/ -[52]: http://lynx.browser.org/ -[53]: http://en.wikipedia.org/wiki/Links_%28web_browser%29 diff --git a/sources/tech/20200217 Create web user interfaces with Qt WebAssembly instead of JavaScript.md b/sources/tech/20200217 Create web user interfaces with Qt WebAssembly instead of JavaScript.md deleted file mode 100644 index bc61dab48d..0000000000 --- a/sources/tech/20200217 Create web user interfaces with Qt WebAssembly instead of JavaScript.md +++ /dev/null @@ -1,133 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Create web user interfaces with Qt WebAssembly instead of JavaScript) -[#]: via: (https://opensource.com/article/20/2/wasm-python-webassembly) -[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99) - -Create web user interfaces with Qt WebAssembly instead of JavaScript -====== -Get hands-on with Wasm, PyQt, and Qt WebAssembly. -![Digital creative of a browser on the internet][1] - -When I first heard about [WebAssembly][2] and the possibility of creating web user interfaces with Qt, just like I would in ordinary C++, I decided to take a deeper look at the technology. - -My open source project [Pythonic][3] is completely Python-based (PyQt), and I use C++ at work; therefore, this minimal, straightforward WebAssembly tutorial uses Python on the backend and C++ Qt WebAssembly for the frontend. It is aimed at programmers who, like me, are not familiar with web development. - -![Header Qt C++ frontend][4] - -### TL;DR - - -``` -git clone  - -cd wasm_qt_example - -python mysite.py -``` - -Then visit with your favorite browser. - -### What is WebAssembly? - -WebAssembly (often shortened to Wasm) is designed primarily to execute portable binary code in web applications to achieve high-execution performance. It is intended to coexist with JavaScript, and both frameworks are executed in the same sandbox. [Recent performance benchmarks][5] showed that WebAssembly executes roughly 10–40% faster,  depending on the browser, and given its novelty, we can still expect improvements. The downside of this great execution performance is its widespread adoption as the preferred malware language. Crypto miners especially benefit from its performance and harder detection of evidence due to its binary format. - -### Toolchain - -There is a [getting started guide][6] on the Qt wiki. I recommend sticking exactly to the steps and versions mentioned in this guide. You may need to select your Qt version carefully, as different versions have different features (such as multi-threading), with improvements happening with each release. - -To get executable WebAssembly code, simply pass your Qt C++ application through [Emscripten][7]. Emscripten provides the complete toolchain, and the build script couldn't be simpler: - - -``` -#!/bin/sh -source ~/emsdk/emsdk_env.sh -~/Qt/5.13.1/wasm_32/bin/qmake -make -``` - -Building takes roughly 10 times longer than with a standard C++ compiler like Clang or g++. The build script will output the following files: - - * WASM_Client.js - * WASM_Client.wasm - * qtlogo.svg - * qtloader.js - * WASM_Client.html - * Makefile (intermediate) - - - -The versions on my (Fedora 30) build system are: - - * emsdk: 1.38.27 - * Qt: 5.13.1 - - - -### Frontend - -The frontend provides some functionalities based on [WebSocket][8]. - -![Qt-made frontend in browser][9] - - * **Send message to server:** Send a simple string message to the server with a WebSocket. You could have done this also with a simple HTTP POST request. - * **Start/stop timer:** Create a WebSocket and start a timer on the server to send messages to the client at a regular interval. - * **Upload file:** Upload a file to the server, where the file is saved to the home directory (**~/**) of the user who runs the server. - - - -If you adapt the code and face a compiling error like this: - - -``` -error: static_assert failed due to - requirement ‘bool(-1 == 1)’ “Required feature http for file - ../../Qt/5.13.1/wasm_32/include/QtNetwork/qhttpmultipart.h not available.” -QT_REQUIRE_CONFIG(http); -``` - -it means that the requested feature is not available for Qt Wasm. - -### Backend - -The server work is done by [Eventlet][10]. I chose Eventlet because it is lightweight and easy to use. Eventlet provides WebSocket functionality and supports threading. - -![Decorated functions for WebSocket handling][11] - -Inside the repository under **mysite/template**, there is a symbolic link to **WASM_Client.html** in the root path. The static content under **mysite/static** is also linked to the root path of the repository. If you adapt the code and do a recompile, you just have to restart Eventlet to update the content to the client. - -Eventlet uses the Web Server Gateway Interface for Python (WSGI). The functions that provide the specific functionality are extended with decorators. - -Please note that this is an absolute minimum server implementation. It doesn't implement any multi-user capabilities — every client is able to start/stop the timer, even for other clients. - -### Conclusion - -Take this example code as a starting point to get familiar with WebAssembly without wasting time on minor issues. I don't make any claims for completeness nor best-practice integration. I walked through a long learning curve until I got it running to my satisfaction, and I hope this gives you a brief look into this promising technology. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/wasm-python-webassembly - -作者:[Stephan Avenwedde][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/hansic99 -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_web_internet_website.png?itok=g5B_Bw62 (Digital creative of a browser on the internet) -[2]: https://webassembly.org/ -[3]: https://github.com/hANSIc99/Pythonic -[4]: https://opensource.com/sites/default/files/uploads/cpp_qt.png (Header Qt C++ frontend) -[5]: https://pspdfkit.com/blog/2018/a-real-world-webassembly-benchmark/ -[6]: https://wiki.qt.io/Qt_for_WebAssembly#Getting_Started -[7]: https://emscripten.org/docs/introducing_emscripten/index.html -[8]: https://en.wikipedia.org/wiki/WebSocket -[9]: https://opensource.com/sites/default/files/uploads/wasm_frontend.png (Qt-made frontend in browser) -[10]: https://eventlet.net/ -[11]: https://opensource.com/sites/default/files/uploads/python_backend.png (Decorated functions for WebSocket handling) diff --git a/sources/tech/20200218 10 Grafana features you need to know for effective monitoring.md b/sources/tech/20200218 10 Grafana features you need to know for effective monitoring.md deleted file mode 100644 index 92f1cc3455..0000000000 --- a/sources/tech/20200218 10 Grafana features you need to know for effective monitoring.md +++ /dev/null @@ -1,69 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (10 Grafana features you need to know for effective monitoring) -[#]: via: (https://opensource.com/article/20/2/grafana-features) -[#]: author: (Daniel Lee https://opensource.com/users/daniellee) - -10 Grafana features you need to know for effective monitoring -====== -Learn how to make the most of this open source dashboard tool. -![metrics and data shown on a computer screen][1] - -The [Grafana][2] project [started in 2013][3] when [Torkel Ödegaard][4] decided to fork Kibana and turn it into a time-series and graph-focused dashboarding tool. His guiding vision: to make everything look more clean and elegant, with fewer things distracting you from the data. - -More than 500,000 active installations later, Grafana dashboards are ubiquitous and instantly recognizable. (Even during a [SpaceX launch][5]!) - -Whether you're a recent adopter or an experienced power user, you may not be familiar with all of the features that [Grafana Labs][6]—the company formed to accelerate the adoption of the Grafana project and to build a sustainable business around it—and the Grafana community at large have developed over the past 6+ years. - -Here's a look at some of the most impactful: - - 1. **Dashboard templating**: One of the key features in Grafana, templating allows you to create dashboards that can be reused for lots of different use cases. Values aren't hard-coded with these templates, so for instance, if you have a production server and a test server, you can use the same dashboard for both. Templating allows you to drill down into your data, say, from all data to North America data, down to Texas data, and beyond. You can also share these dashboards across teams within your organization—or if you create a great dashboard template for a popular data source, you can contribute it to the whole community to customize and use. - 2. **Provisioning**: While it's easy to click, drag, and drop to create a single dashboard, power users in need of many dashboards will want to automate the setup with a script. You can script anything in Grafana. For example, if you're spinning up a new Kubernetes cluster, you can also spin up a Grafana automatically with a script that would have the right server, IP address, and data sources preset and locked. It's also a way of getting control over a lot of dashboards. - 3. **Annotations:** This feature, which shows up as a graph marker in Grafana, is useful for correlating data in case something goes wrong. You can create the annotations manually—just control-click on a graph and input some text—or you can fetch data from any data source. (Check out how Wikimedia uses annotations on its [public Grafana dashboard][7], and here is [another example][8] from the OpenHAB community.) A good example is if you automatically create annotations around releases, and a few hours after a new release, you start seeing a lot of errors, then you can go back to your annotation and correlate whether the errors started at the same time as the release. This automation can be achieved using the Grafana HTTP API (see examples [here][9] and [here][10]). Many of Grafana's largest customers use the HTTP API for a variety of tasks, particularly setting up databases and adding users. It's an alternative to provisioning for automation, and you can do more with it. For instance, the team at DigitalOcean used the API to integrate a [snapshot feature for reviewing dashboards][11]. - 4. **Kiosk mode and playlists:** If you want to display your Grafana dashboards on a TV monitor, you can use the playlist feature to pick the dashboards that you or your team need to look at through the course of the day and have them cycle through on the screen. The [kiosk mode][12] hides all the user interface elements that you don't need in view-only mode. Helpful hint: The [Grafana Kiosk][13] utility handles logging in, switching to kiosk mode, and opening a playlist—eliminating the pain of logging in on a TV that has no keyboard. - 5. **Custom plugins:** Plugins allow you to extend Grafana with integrations with other tools, different visualizations, and more. Some of the most popular in the community are [Worldmap Panel][14] (for visualizing data on top of a map), [Zabbix][15] (an integration with Zabbix metrics), and [Influx Admin Panel][16] (which offers other functionality like creating databases or adding users). But they're only the tip of the iceberg. Just by writing a bit of code, you can get anything that produces a timestamp and a value visualized in Grafana. Plus, Grafana Enterprise customers have access to more plugins for integrations with Splunk, Datadog, New Relic, and others. - 6. **Alerting and alert hooks:** If you're using Grafana alerting, you can have alerts sent through a number of different notifiers, including PagerDuty, SMS, email, or Slack. Alert hooks allow you to create different notifiers with a bit of code if you prefer some other channels of communication. - 7. **Permissions and teams**: When organizations have one Grafana and multiple teams, they often want the ability to both keep things separate and share dashboards. Early on, the default in Grafana was that everybody could see everyone else's dashboards, and that was it. Later, Grafana introduced multi-tenant mode, in which you can switch organizations but can't share dashboards. Some people were using huge hacks to enable both, so Grafana decided to officially create an easier way to do this. Now you can create a team of users and then set permissions on folders, dashboards, and down to the data source level if you're using Grafana Enterprise. - 8. **SQL data sources:** Grafana's native support for SQL helps you turn anything—not just metrics—in an SQL database into metric data that you can graph. Power users are using SQL data sources to do a whole bunch of interesting things, like creating business dashboards that "make sense for your boss's boss," as the team at Percona put it. Check out their [presentation at GrafanaCon][17]. - 9. **Monitoring your monitoring**: If you're serious about monitoring and you want to monitor your own monitoring, Grafana has its own Prometheus HTTP endpoint that Prometheus can scrape. It's quite simple to get dashboards and statics. There's also an enterprise version in development that will offer Google Analytics-style easy access to data, such as how much CPU your Grafana is using or how long alerting is taking. - 10. **Authentication**: Grafana supports different authentication styles, such as LDAP and OAuth, and allows you to map users to organizations. In Grafana Enterprise, you can also map users to teams: If your company has its own authentication system, Grafana allows you to map the teams in your internal systems to teams in Grafana. That way, you can automatically give people access to the dashboards designated for their teams. - - - -Want to take a deeper dive? Join the [Grafana community][18], check out the [how-to section][19], and share what you think. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/grafana-features - -作者:[Daniel Lee][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/daniellee -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_data_dashboard_system_computer_analytics.png?itok=oxAeIEI- (metrics and data shown on a computer screen) -[2]: https://github.com/grafana/grafana -[3]: https://grafana.com/blog/2019/09/03/the-mostly-complete-history-of-grafana-ux/ -[4]: https://grafana.com/author/torkel -[5]: https://youtu.be/ANv5UfZsvZQ?t=29 -[6]: https://grafana.com/ -[7]: https://grafana.wikimedia.org/d/000000143/navigation-timing?orgId=1&refresh=5m -[8]: https://community.openhab.org/t/howto-create-annotations-in-grafana-via-rules/48929 -[9]: https://docs.microsoft.com/en-us/azure/devops/service-hooks/services/grafana?view=azure-devops -[10]: https://medium.com/contentsquare-engineering-blog/from-events-to-grafana-annotation-f35aafe8bd3d -[11]: https://youtu.be/kV3Ua6guynI -[12]: https://play.grafana.org/d/vmie2cmWz/bar-gauge?orgId=1&refresh=10s&kiosk -[13]: https://github.com/grafana/grafana-kiosk -[14]: https://grafana.com/grafana/plugins/grafana-worldmap-panel -[15]: https://grafana.com/grafana/plugins/alexanderzobnin-zabbix-app -[16]: https://grafana.com/grafana/plugins/natel-influx-admin-panel -[17]: https://www.youtube.com/watch?v=-xlchgoqkqY -[18]: https://community.grafana.com/ -[19]: https://community.grafana.com/c/howto/6 diff --git a/sources/tech/20200224 17 Cool Arduino Project Ideas for DIY Enthusiasts.md b/sources/tech/20200224 17 Cool Arduino Project Ideas for DIY Enthusiasts.md deleted file mode 100644 index 2cfe9c1872..0000000000 --- a/sources/tech/20200224 17 Cool Arduino Project Ideas for DIY Enthusiasts.md +++ /dev/null @@ -1,272 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (17 Cool Arduino Project Ideas for DIY Enthusiasts) -[#]: via: (https://itsfoss.com/cool-arduino-projects/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -17 Cool Arduino Project Ideas for DIY Enthusiasts -====== - -[Arduino][1] is an open-source electronics platform that combines both open source software and hardware to let people make interactive projects with ease. You can get Arduino-compatible [single board computers][2] and use them to make something useful. - -In addition to the hardware, you will also need to know the [Arduino language][3] to use the [Arduino IDE][4] to successfully create something. - -You can code using the web editor or use the Arduino IDE offline. Nevertheless, you can always refer to the [official resources][5] available to learn about Arduino. - -Considering that you know the essentials, I will be mentioning some of the best (or interesting) Arduino projects. You can try to make them for yourself or modify them to come up with something of your own. - -### Interesting Arduino project ideas for beginners, experts, everyone - -![][6] - -The following projects need a variety of additional hardware – so make sure to check out the official link to the projects (_originally featured on the [official Arduino Project Hub][7]_) to learn more about them. - -Also, it is worth noting that they aren’t particularly in any ranking order – so feel free to try what sounds best to you. - -#### 1\. LED Controller - -Looking for simple Arduino projects? Here’s one for you. - -One of the easiest projects that let you control LED lights. Yes, you do not have to opt for expensive LED products just to decorate your room (or for any other use-case), you can simply make an LED controller and customize it to use it however you want. - -It requires using the [Arduino UNO board][8] and a couple more things (which also includes an Android phone). You can learn more about it in the link to the project below. - -[LED Controller][9] - -#### 2\. Hot Glue LED Matrix Lamp - -![][10] - -Another Arduino LED project for you. Since we are talking about using LEDs to decorate, you can also make an LED lamp that looks beautiful. - -For this, you might want to make sure that you have a 3D printer. Next, you need an LED strip and **Arduino Nano R3** as the primary materials. - -Once you’ve printed the case and assembled the lamp section, all you need to do is to add the glue sticks and figure out the wiring. It does sound very simple to mention – you can learn more about it on the official Arduino project feature site. - -[LED Matrix Lamp][11] - -#### 3\. Arduino Mega Chess - -![][12] - -Want to have a personal digital chessboard? Why not? - -You’ll need a TFT LCD touch screen display and an [Arduino Mega 2560][13] board as the primary materials. If you have a 3D printer, you can create a pretty case for it and make changes accordingly. - -Take a look at the original project for inspiration. - -[Arduino Mega Chess][14] - -#### 4\. Enough Already: Mute My TV - -A very interesting project. I wouldn’t argue the usefulness of it – but if you’re annoyed by certain celebrities (or personalities) on TV, you can simply mute their voice whenever they’re about to speak something on TV. - -Technically, it was tested with the old tech back then (when you didn’t really stream anything). You can watch the video above to get an idea and try to recreate it or simply head to the link to read more about it. - -[Mute My TV][15] - -#### 5\. Robot Arm with Controller - -![][16] - -If you want to do something with the help of your robot and still have manual control over it, the robot arm with a controller is one of the most useful Arduino projects. It uses the [Arduino UNO board][8] if you’re wondering. - -You will have a robot arm -for which you can make a case using the 3D printer to enhance its usage and you can use it for a variety of use-cases. For instance, to clean the carbage using the robot arm or anything similar where you don’t want to directly intervene. - -[Robotic Arm With Controller][17] - -#### 6\. Make Musical Instrument Using Arduino - -I’ve seen a variety of musical instruments made using Arduino. You can explore the Internet if you want something different than this. - -You would need a [Pi supply flick charge][18] and an **Arduino UNO** to make it happen. It is indeed a cool Arduino project where you get to simply tap and your hand waves will be converted to music. Also, it isn’t tough to make this – so you should have a lot of fun making this. - -[Musical Instrument using Arduino][19] - -#### 7\. Pet Trainer: The MuttMentor - -An Arduino-based device that assists you to help train your pet – sounds exciting! - -For this, they’re using the [Arduino Nano 33 BLE Sense][20] while utilizing TensorFlow to train a small neural network for all the common actions that your pet does. Accordingly, the buzzer will offer a reinforcing notification when your pet obeys your command. - -This can have wide applications when tweaked as per your requirements. Check out the details below. - -[The MuttMentor][21] - -#### 8\. Basic Earthquake Detector - -Normally, you depend on the government officials to announce/inform about the earthquake stats (or the warning for it). - -But with Arduino boards, you can simply build a basic earthquake detector and have transparent results for yourself without depending on the authorities. Click on the button below to know about the relevant details to help make it. - -[Basic Earthquake Detector][22] - -#### 9\. Security Access Using RFID Reader - -![][23] - -As the project describes – “_RFID tagging is an ID system that uses small radio frequency identification_ “. - -So, in this project, you will be making an RFID reader using Arduino while pairing it with an [Adafruit NFC card][24] for security access. Check out the full details using the button below and let me know how it works for you. - -[Security Access using RFID reader][25] - -#### 10\. Smoke Detection using MQ-2 Gas Sensor - -![][26] - -This could be potentially one of the best Arduino projects out there. You don’t need to spend a lot of money to equip smoke detectors for your home, you can manage with a DIY solution to some extent. - -Of course, unless you want a complex failsafe set up along with your smoke detector, a basic inexpensive solution should do the trick. In either case, you can also find other applications for the smoke detector. - -[Smoke Detector][27] - -#### 11\. Arduino Based Amazon Echo using 1Sheeld - -![][28] - -In case you didn’t know [1Sheeld][29] basically replaces the need for an add-on Arduino board. You just need a smartphone and add Arduino shields to it so that you can do a lot of things with it. - -Using 5 such shields, the original creator of this project made himself a DIY Amazon Echo. You can find all the relevant details, schematics, and code to make it happen. - -[DIY Amazon Echo][30] - -#### 12\. Audio Spectrum Visualizer - -![][31] - -Just want to make something cool? Well, here’s an idea for an audio spectrum visualizer. - -For this, you will need an Arduino Nano R3 and an LED display as primary materials to get started with. You can tweak the display as required. You can connect it with your headphone output or simply a line-out amplifier. - -Easily one of the cheapest Arduino projects that you can try for fun. - -[Audio Spectrum Visualizer][32] - -#### 13\. Motion Following Motorized Camera - -![][33] - -Up for a challenge? If you are – this will be one of the coolest Arduino Projects in our list. - -Basically, this is meant to replace your home security camera which is limited to an angle of video recording. You can turn the same camera into a motorized camera that follows the motion. - -So, whenever it detects a movement, it will change its angle to try to follow the object. You can read more about it to find out how to make it. - -[Motion Following Motorized Camera][34] - -#### 14\. Water Quality Monitoring System - -![][35] - -If you’re concerned about your health in connection to the water you drink, you can try making this. - -It requires an Arduino UNO and the water quality sensors as the primary materials. To be honest, a useful Arduino project to go for. You can find everything you need to make this in the link below. - -[Water Quality Monitoring System][36] - -#### 15\. Punch Activated Arm Flamethrower - -I would be very cautious about this – but seriously, one of the best (and coolest) Arduino projects I’ve ever come across. - -Of course, this counts as a fun project to try out to see what bigger projects you can pull off using Arduino and here it is. In the project, he originally used the [SparkFun Arduino Pro Mini 328][37] along with an accelerometer as the primary materials. - -[Punch Activated Flamethrower][38] - -#### 16\. Polar Drawing Machine - -![][39] - -This isn’t any ordinary plotter machine that you might’ve seen people creating using Arduino boards. - -With this, you can draw some cool vector graphics images or bitmap. It might sound like bit of overkill but then it could also be fun to do something like this. - -This could be a tricky project, so you can refer to the details on the link to go through it thoroughly. - -[Polar Drawing Machine][40] - -#### 17\. Home Automation - -Technically, this is just a broad project idea because you can utilize the Arduino board to automate almost anything you want at your home. - -Just like I mentioned, you can go for a security access device, maybe create something that automatically waters the plants or simply make an alarm system. - -Countless possibilities of what you can do to automate things at your home. For reference, I’ve linked to an interesting home automation project below. - -[Home Automation][41] - -#### Bonus: Robot Cat (OpenCat) - -![][42] - -A programmable robotic cat for AI-enhanced services and STEM education. In this project, both Arduino and Raspberry Pi boards have been utilized. - -You can also look at the [Raspberry Pi alternatives][2] if you want. This project needs a lot of work, so you would want to invest a good amount of time to make it work. - -[OpenCat][43] - -**Wrapping Up** - -With the help of Arduino boards (coupled with other sensors and materials), you can do a lot of projects with ease. Some of the projects that I’ve listed above are suitable for beginners and some are not. Feel free to take your time to analyze what you need and the cost of the project before proceeding. - -Did I miss listing an interesting Arduino project that deserves the mention here? Let me know your thoughts in the comments. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/cool-arduino-projects/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://www.arduino.cc/ -[2]: https://itsfoss.com/raspberry-pi-alternatives/ -[3]: https://www.arduino.cc/reference/en/ -[4]: https://www.arduino.cc/en/main/software -[5]: https://www.arduino.cc/en/Guide/HomePage -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/arduino-project-ideas.jpg?ssl=1 -[7]: https://create.arduino.cc/projecthub -[8]: https://store.arduino.cc/usa/arduino-uno-rev3 -[9]: https://create.arduino.cc/projecthub/mayooghgirish/arduino-bluetooth-basic-tutorial-d8b737?ref=platform&ref_id=424_trending___&offset=89 -[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/led-matrix-lamp.jpg?ssl=1 -[11]: https://create.arduino.cc/projecthub/john-bradnam/hot-glue-led-matrix-lamp-42322b?ref=platform&ref_id=424_trending___&offset=42 -[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/02/arduino-chess-board.jpg?ssl=1 -[13]: https://store.arduino.cc/usa/mega-2560-r3 -[14]: https://create.arduino.cc/projecthub/Sergey_Urusov/arduino-mega-chess-d54383?ref=platform&ref_id=424_trending___&offset=95 -[15]: https://makezine.com/2011/08/16/enough-already-the-arduino-solution-to-overexposed-celebs/ -[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/02/robotic-arm-controller.jpg?ssl=1 -[17]: https://create.arduino.cc/projecthub/H0meMadeGarbage/robot-arm-with-controller-2038df?ref=platform&ref_id=424_trending___&offset=13 -[18]: https://uk.pi-supply.com/products/flick-hat-3d-tracking-gesture-hat-raspberry-pi -[19]: https://create.arduino.cc/projecthub/lanmiLab/make-musical-instrument-using-arduino-and-flick-large-e2890b?ref=platform&ref_id=424_trending___&offset=24 -[20]: https://store.arduino.cc/usa/nano-33-ble-sense -[21]: https://create.arduino.cc/projecthub/whatsupdog/the-muttmentor-9d9753?ref=platform&ref_id=424_trending___&offset=44 -[22]: https://www.instructables.com/id/Basic-Arduino-Earthquake-Detector/ -[23]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/security-access-arduino.jpg?ssl=1 -[24]: https://www.adafruit.com/product/359 -[25]: https://create.arduino.cc/projecthub/Aritro/security-access-using-rfid-reader-f7c746?ref=platform&ref_id=424_trending___&offset=85 -[26]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/smoke-detection-arduino.jpg?ssl=1 -[27]: https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a?ref=platform&ref_id=424_trending___&offset=89 -[28]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/diy-amazon-echo.jpg?ssl=1 -[29]: https://1sheeld.com/ -[30]: https://create.arduino.cc/projecthub/ahmedismail3115/arduino-based-amazon-echo-using-1sheeld-84fa6f?ref=platform&ref_id=424_trending___&offset=91 -[31]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/audio-spectrum-visualizer.jpg?ssl=1 -[32]: https://create.arduino.cc/projecthub/Shajeeb/32-band-audio-spectrum-visualizer-analyzer-902f51?ref=platform&ref_id=424_trending___&offset=87 -[33]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/motion-following-camera.jpg?ssl=1 -[34]: https://create.arduino.cc/projecthub/lindsi8784/motion-following-motorized-camera-base-61afeb?ref=platform&ref_id=424_trending___&offset=86 -[35]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/water-quality-monitoring.jpg?ssl=1 -[36]: https://create.arduino.cc/projecthub/chanhj/water-quality-monitoring-system-ddcb43?ref=platform&ref_id=424_trending___&offset=93 -[37]: https://www.sparkfun.com/products/11113 -[38]: https://create.arduino.cc/projecthub/Advanced/punch-activated-arm-flamethrowers-real-firebending-95bb80 -[39]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/polar-drawing-machine.jpg?ssl=1 -[40]: https://create.arduino.cc/projecthub/ArduinoFT/polar-drawing-machine-f7a05c?ref=search&ref_id=drawing&offset=2 -[41]: https://create.arduino.cc/projecthub/ahmedel-hinidy2014/home-management-system-control-your-home-from-a-website-076846?ref=search&ref_id=home%20automation&offset=4 -[42]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/opencat.jpg?ssl=1 -[43]: https://create.arduino.cc/projecthub/petoi/opencat-845129?ref=platform&ref_id=424_popular___&offset=8 diff --git a/sources/tech/20200228 Revive your RSS feed with Newsboat in the Linux terminal.md b/sources/tech/20200228 Revive your RSS feed with Newsboat in the Linux terminal.md deleted file mode 100644 index 27a8d6ecbd..0000000000 --- a/sources/tech/20200228 Revive your RSS feed with Newsboat in the Linux terminal.md +++ /dev/null @@ -1,152 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Revive your RSS feed with Newsboat in the Linux terminal) -[#]: via: (https://opensource.com/article/20/2/newsboat) -[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt) - -Revive your RSS feed with Newsboat in the Linux terminal -====== -Newsboat is an excellent RSS reader, whether you need a basic set of -features or want your application to do a whole lot more. -![Boat on the ocean with Creative Commons sail][1] - -Psst. Word on the web is that RSS died in 2013. That's when Google pulled the plug on Google Reader. - -Don't believe everything that you hear. RSS is alive. It's well. It's still a great way to choose the information you want to read without algorithms making the decision for you. All you need is the [right feed reader][2]. - -Back in January, Opensource.com Correspondent [Kevin Sonney][3] introduced a nifty terminal RSS reader [called Newsboat][4]. In his article, Kevin scratched Newsboat's surface. I figured it was time to take a deeper dive into what Newsboat can do. - -### Adding RSS feeds to Newsboat - -As Kevin writes, "installing Newsboat is pretty easy since it is included with most distributions (and Homebrew on macOS)." You can, as Kevin also notes, import a [file containing RSS feeds][5] from another reader. If this is your first kick at the RSS can or it's been a while since you've used an RSS reader, chances are you don't have one of those files handy. - -Not to worry. You just need to do some copying and pasting. Go to the folder **.newsboat** in your **/home** directory. Once you're there, open the file **urls** in a text editor. Then, go to the websites you want to read, find the links to their RSS feeds, and copy and paste them into the **urls** file. - -![Newsboat urls file][6] - -Start Newsboat, and you're ready to get reading. - -### Reading your feeds - -As Kevin Sonney points out, you refresh your feeds by pressing the **r** or **R** keys on your keyboard. To read the articles from a feed, press **Enter** to open that feed and scroll down the list. Then, press **Enter** to read an item. - -![Newsboat reading][7] - -Return to the list of articles by pressing **q**. Press **q** again to return to your list of feeds. - -Every so often, you might run into a feed that shows just part of an article. That can be annoying. To get the full article, press **o** to open it in your desktop's default web browser. On my desktop, for example, that's Firefox. You can change the browser Newsboat works with; I'll explain that below. - -### Following links - -Hyperlinking has been a staple of the web since its beginnings at CERN in the early 1990s. It's hard to find an article published online that doesn't contain at least a couple of links that point elsewhere. - -Instead of leaving links embedded in an article or post, Newsboat gathers them into a numbered list at the end of the article or post. - -![Hyperlinks in Newsboat][8] - -To follow a link, press the number beside it. In the screenshot above, you'd press **4** to open the link to the homepage of one of the contributors to that article. The link, as you've probably guessed, opens in your default browser. - -### Using Newsboat as a client for other feed readers - -You might use a web-based feed reader, but might also want to read your RSS feeds in something a bit more minimal on your desktop. Newsboat can do that. - -It works with several feed readers, including The Old Reader, Inoreader, Newsblur, Tiny Tiny RSS, FeedHQ, and the newsreader apps for [ownCloud][9] and [Nextcloud][10]. Before you can read feeds from any of them, you'll need to do a little work. - -Go back to the **.newsboat** folder in your **/home** directory and create a file named **config**. Then add the settings that hook Newsboat into one of the RSS readers it supports. You can find more information about the specific settings for each reader in [Newsboat's documentation][11]. - -Here's an example of the settings I use to connect Newsboat with the newsreader app in my instance of Nextcloud: - - -``` -urls-source "ocnews" -ocnews-url "" -ocnews-login "myUserName" -ocnews-password "NotTellingYouThat!" -``` - -I've tested this with Nextcloud, The Old Reader, Inoreader, and Newsblur. Newsboat worked seamlessly with all of them. - -![Newsboat with The Old Reader][12] - -### Other useful configuration tricks - -You can really unleash Newsboat's power and flexibility by tapping into [its configuration options][13]. That includes changing text colors, the order Newsboat sorts feeds, where it saves articles, the length of time Newsboat keeps articles, and more. - -Below are a few of the options I've added to my configuration file. - -#### Change Newsboat's default browser - -As I mentioned a few paragraphs back, Newsboat opens articles in your default graphical web browser. If you want to read feeds in a [text-only browser][14] like w3m or ELinks, add this to your Newsboat configuration file: - - -``` -`browser "/path/to/browser %u"` -``` - -In my configuration file, I've set w3m up as my browser: - - -``` -`browser "/usr/bin/w3m %u"` -``` - -![Newsboat with w3m][15] - -#### Remove read articles - -I like an uncluttered RSS feed. That means getting rid of articles I've already read. Add this setting to the configuration file to have Newsboat do that automatically: - - -``` -`show-read-feeds  no` -``` - -#### Refresh feeds at launch - -Life gets busy. Sometimes, I go a day or two without checking my RSS feeds. That means having to refresh them after I fire Newsboat up. Sure, I can press **r** or **R**, but why not have the application do it for me? I've added this setting to my configuration file to have Newsboat refresh all of my feeds when I launch it: - - -``` -`refresh-on-startup  yes` -``` - -If you have a lot of feeds, it can take a while to refresh them. I have around 80 feeds, and it takes over a minute to get new content from all of them. - -### Is that everything? - -Not even close. In addition to all of its configuration options, Newsboat also has a number of command-line switches you can use when you fire it up. Read more about them in the [documentation][16]. - -On the surface, Newsboat is simple. But a lot of power and flexibility hides under its hood. That makes Newsboat an excellent RSS reader for anyone who needs a basic set of features or for someone who needs their RSS reader to do a whole lot more. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/newsboat - -作者:[Scott Nesbitt][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/scottnesbitt -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/CreativeCommons_ideas_520x292_1112JS.png?itok=otei0vKb (Boat on the ocean with Creative Commons sail) -[2]: https://opensource.com/article/17/3/rss-feed-readers -[3]: https://opensource.com/users/ksonney -[4]: https://opensource.com/article/20/1/open-source-rss-feed-reader -[5]: https://en.wikipedia.org/wiki/OPML -[6]: https://opensource.com/sites/default/files/uploads/newsboat-urls-file.png (Newsboat urls file) -[7]: https://opensource.com/sites/default/files/uploads/newsboat-reading.png (Newsboat reading) -[8]: https://opensource.com/sites/default/files/uploads/newsboat-links.png (Hyperlinks in Newsboat) -[9]: https://github.com/owncloudarchive/news -[10]: https://github.com/nextcloud/news -[11]: https://newsboat.org/releases/2.18/docs/newsboat.html#_newsboat_as_a_client_for_newsreading_services -[12]: https://opensource.com/sites/default/files/uploads/newsboat-oldreader.png (Newsboat with The Old Reader) -[13]: https://newsboat.org/releases/2.18/docs/newsboat.html#_example_configuration -[14]: https://opensource.com/article/16/12/web-browsers-linux-command-line -[15]: https://opensource.com/sites/default/files/uploads/newsboat-read-with-w3m.png (Newsboat with w3m) -[16]: https://newsboat.org/releases/2.18/docs/newsboat.html diff --git a/sources/tech/20200309 Level up your use of Helm on Kubernetes with Charts.md b/sources/tech/20200309 Level up your use of Helm on Kubernetes with Charts.md deleted file mode 100644 index 9a08bdb973..0000000000 --- a/sources/tech/20200309 Level up your use of Helm on Kubernetes with Charts.md +++ /dev/null @@ -1,288 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Level up your use of Helm on Kubernetes with Charts) -[#]: via: (https://opensource.com/article/20/3/helm-kubernetes-charts) -[#]: author: (Jessica Cherry https://opensource.com/users/jrepka) - -Level up your use of Helm on Kubernetes with Charts -====== -Configuring known apps using the Helm package manager. -![Ships at sea on the web][1] - -Applications are complex collections of code and configuration that have a lot of nuance to how they are installed. Like all open source software, they can be installed from source code, but most of the time users want to install something simply and consistently. That’s why package managers exist in nearly every operating system, which manages the installation process. - -Similarly, Kubernetes depends on package management to simplify the installation process. In this article, we’ll be using the Helm package manager and its concept of stable charts to create a small application. - -### What is Helm package manager? - -[Helm][2] is a package manager for applications to be deployed to and run on Kubernetes. It is maintained by the [Cloud Native Computing Foundation][3] (CNCF) with collaboration with the largest companies using Kubernetes. Helm can be used as a command-line utility, which [I cover how to use here][4]. - -#### Installing Helm - -Installing Helm is quick and easy for Linux and macOS. There are two ways to do this, you can go to the release [page][5], download your preferred version, untar the file, and move the Helm executable to your** /usr/local/bin** or your **/usr/bin** whichever you are using. - -Alternatively, you can use your operating system package manage (**dnf**, **snap**, **brew**, or otherwise) to install it. There are instructions on how to install on each OS on this [GitHub page][6]. - -### What are Helm Charts? - -We want to be able to repeatably install applications, but also to customize them to our environment. That’s where Helm Charts comes into play. Helm coordinates the deployment of applications using standardized templates called Charts. Charts are used to define, install, and upgrade your applications at any level of complexity. - -> A _Chart_ is a Helm package. It contains all of the resource definitions necessary to run an application, tool, or service inside of a Kubernetes cluster. Think of it like the Kubernetes equivalent of a Homebrew formula, an Apt dpkg, or a Yum RPM file. -> -> [Using Helm][7] - -Charts are quick to create, and I find them straightforward to maintain. If you have one that is accessible from a public version control site, you can publish it to the [stable repository][8] to give it greater visibility. In order for a Chart to be added to stable, it must meet a number of [technical requirements][9]. In the end, if it is considered properly maintained by the Helm maintain, it can then be published to [Helm Hub][10]. - -Since we want to use the community-curated stable charts, we will make that easier by adding a shortcut:  - - -``` -$ helm repo add stable -"stable" has been added to your repositories -``` - -### Running our first Helm Chart - -Since I’ve already covered the basic Helm usage in [this article][11], I’ll focus on how to edit and use charts in this article. To follow along, you’ll need Helm installed and access to some Kubernetes environment, like minikube (which you can walk through [here][12] or [here][13]). - -Starting I will be picking one chart. Usually, in my article I use Jenkins as my example, and I would gladly do this if the chart wasn’t really complex. This time I’ll be using a basic chart and will be creating a small wiki, using [mediawiki and its chart][14].   - -So how do I get this chart? Helm makes that as easy as a pull. - -By default, charts are compressed in a .tgz file, but we can unpack that file to customize our wiki by using the **\--untar** flag. - - -``` -$ helm pull stable/mediawiki --untar -$ ls -mediawiki/ -$ cd mediawiki/ -$ ls -Chart.yaml         README.md          requirements.lock  templates/ -OWNERS             charts/            requirements.yaml  values.yaml -``` - -Now that we have this we can begin customizing the chart. - -### Editing your Helm Chart - -When the file was untared there was a massive amount of files that came out. While it does look frightening, there really is only one file we should be working with and that's the **values.yaml** file. - -Everything that was unpacked was a list of template files that has all the information for the basic application configurations. All the template files actually depend on what is configured in the values.yaml file. Most of these templates and chart files actually are for creating service accounts in the cluster and the various sets of required application configurations that would usually be put together if you were to build this application on a regular server. - -But on to the values.yaml file and what we should be changing in it. Open it in your favorite text editor or IDE. We see a [YAML][15] file with a ton of configuration. If we zoom in just on the container image file, we see its repository, registry, and tags amongst other details. - - -``` -## Bitnami DokuWiki image version -## ref: -## -image: -  registry: docker.io -  repository: bitnami/mediawiki -  tag: 1.34.0-debian-10-r31 -  ## Specify a imagePullPolicy -  ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' -  ## ref: -  ## -  pullPolicy: IfNotPresent -  ## Optionally specify an array of imagePullSecrets. -  ## Secrets must be manually created in the namespace. -  ## ref: -  ## -  # pullSecrets: -  #   - myRegistryKeySecretName -``` - -As you can see in the file each configuration for the values is well-defined. Our pull policy is set to **IfNotPresent**. This means if I run a **helm pull** command, it will not overwrite my existing version. If it’s set to always, the image will default to the latest version of the image on every pull. I’ll be using the default in this case, as in the past I have run into images being broken if it goes to the latest version without me expecting it (remember to version control your software, folks). - -### Customizing our Helm Chart - -So let’s configure this values file with some basic changes and make it our own. I’ll be changing some naming conventions, the wiki username, and the mediawiki site name. _Note: This is another snippet from values.yaml. All of this customization happens in that one file._ - - -``` -## User of the application -## ref: -## -mediawikiUser: cherrybomb - -## Application password -## Defaults to a random 10-character alphanumeric string if not set -## ref: -## -# mediawikiPassword: - -## Admin email -## ref: -## -mediawikiEmail: [root@example.com][16] - -## Name for the wiki -## ref: -## -mediawikiName: Jess's Home of Helm -``` - -After this, I’ll make some small modifications to our database name and user account. I changed the defaults to "jess" so you can see where changes were made. - - -``` -externalDatabase: - ## Database host -  host: - -  ## Database port -  port: 3306 - -  ## Database user -  user: jess_mediawiki - -  ## Database password -  password: - -  ## Database name -  database: jess_mediawiki - -## -## MariaDB chart configuration -## -## -## -mariadb: - ## Whether to deploy a mariadb server to satisfy the applications database requirements. To use an external database set this to false and configure the externalDatabase parameters -  enabled: true -  ## Disable MariaDB replication -  replication: -    enabled: false - -  ## Create a database and a database user -  ## ref: -  ## -  db: -    name: jess_mediawiki -    user: jess_mediawiki -``` - -And finally, I’ll be adding some ports in our load balancer to allow traffic from the local host. I'm running on minikube and find the **LoadBalancer** option works well. - - -``` -service: - ## Kubernetes svc type -  ## For minikube, set this to NodePort, elsewhere use LoadBalancer -  ## -  type: LoadBalancer -  ## Use serviceLoadBalancerIP to request a specific static IP, -  ## otherwise leave blank -  ## -  # loadBalancerIP: -  # HTTP Port -  port: 80 -  # HTTPS Port -  ## Set this to any value (recommended: 443) to enable the https service port -  # httpsPort: 443 -  ## Use nodePorts to requets some specific ports when usin NodePort -  ## nodePorts: -  ##   http: <to set explicitly, choose port between 30000-32767> -  ##   https: <to set explicitly, choose port between 30000-32767> -  ## -  # nodePorts: -  #  http: "30000" -  #  https: "30001" -  ## Enable client source IP preservation -  ## ref -  ## -  externalTrafficPolicy: Cluster -``` - -Now that we have made the configurations to allow traffic and create the database, we know that we can go ahead and deploy our chart. - -### Deploy and enjoy! - -Now that we have our custom version of the wiki, it's time to create a deployment. Before we get into that, let’s first confirm that nothing else is installed with Helm, to make sure my cluster has available resources to run our wiki. - - -``` -$ helm ls -NAME    NAMESPACE       REVISION        UPDATED STATUS  CHART   APP VERSION -``` - -There are no other deployments through Helm right now, so let's proceed with ours.  - - -``` -$ helm install jesswiki -f values.yaml stable/mediawiki -NAME: jesswiki -LAST DEPLOYED: Thu Mar  5 12:35:31 2020 -NAMESPACE: default -STATUS: deployed -REVISION: 2 -NOTES: -1\. Get the MediaWiki URL by running: - -  NOTE: It may take a few minutes for the LoadBalancer IP to be available. -        Watch the status with: 'kubectl get svc --namespace default -w jesswiki-mediawiki' - -  export SERVICE_IP=$(kubectl get svc --namespace default jesswiki-mediawiki --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}") -  echo "Mediawiki URL: http://$SERVICE_IP/" - -2\. Get your MediaWiki login credentials by running: - -    echo Username: user -    echo Password: $(kubectl get secret --namespace default jesswiki-mediawiki -o jsonpath="{.data.mediawiki-password}" | base64 --decode) -$ -``` - -Perfect! Now we will navigate to the wiki, which is accessible at the cluster IP address. To confirm that address: - - -``` -kubectl get svc --namespace default -w jesswiki-mediawiki -NAME                 TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE -jesswiki-mediawiki   LoadBalancer   10.103.180.70   <pending>     80:30220/TCP   17s -``` - -Now that we have the IP, we go ahead and check to see if it’s up:  - -![A working wiki installed through helm charts][17] - -Now we have our new wiki up and running, and we can enjoy our new application with our personal edits. Use the command from the output above to get the password and start to fill in your wiki. - -### Conclusion - -Helm is a powerful package manager that makes installing and uninstalling applications on top of Kubernetes as simple as a single command. Charts add to the experience by giving us curated and tested templates to install applications with our unique customizations. Keep exploring what Helm and Charts have to offer and let me know what you do with them in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/helm-kubernetes-charts - -作者:[Jessica Cherry][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jrepka -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/kubernetes_containers_ship_lead.png?itok=9EUnSwci (Ships at sea on the web) -[2]: https://www.google.com/url?q=https://helm.sh/&sa=D&ust=1583425787800000 -[3]: https://www.google.com/url?q=https://www.cncf.io/&sa=D&ust=1583425787800000 -[4]: https://www.google.com/url?q=https://opensource.com/article/20/2/kubectl-helm-commands&sa=D&ust=1583425787801000 -[5]: https://www.google.com/url?q=https://github.com/helm/helm/releases/tag/v3.1.1&sa=D&ust=1583425787801000 -[6]: https://www.google.com/url?q=https://github.com/helm/helm&sa=D&ust=1583425787802000 -[7]: https://helm.sh/docs/intro/using_helm/ -[8]: https://www.google.com/url?q=https://github.com/helm/charts&sa=D&ust=1583425787803000 -[9]: https://github.com/helm/charts/blob/master/CONTRIBUTING.md#technical-requirements -[10]: https://www.google.com/url?q=https://hub.helm.sh/&sa=D&ust=1583425787803000 -[11]: https://www.google.com/url?q=https://opensource.com/article/20/2/kubectl-helm-commands&sa=D&ust=1583425787803000 -[12]: https://www.google.com/url?q=https://opensource.com/article/18/10/getting-started-minikube&sa=D&ust=1583425787804000 -[13]: https://www.google.com/url?q=https://opensource.com/article/19/7/security-scanning-your-devops-pipeline&sa=D&ust=1583425787804000 -[14]: https://www.google.com/url?q=https://github.com/helm/charts/tree/master/stable/mediawiki&sa=D&ust=1583425787805000 -[15]: https://en.wikipedia.org/wiki/YAML -[16]: mailto:root@example.com -[17]: https://opensource.com/sites/default/files/uploads/lookitworked.png (A working wiki installed through helm charts) diff --git a/sources/tech/20200313 Open source alternative for multi-factor authentication- privacyIDEA.md b/sources/tech/20200313 Open source alternative for multi-factor authentication- privacyIDEA.md deleted file mode 100644 index 382aa368e5..0000000000 --- a/sources/tech/20200313 Open source alternative for multi-factor authentication- privacyIDEA.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Open source alternative for multi-factor authentication: privacyIDEA) -[#]: via: (https://opensource.com/article/20/3/open-source-multi-factor-authentication) -[#]: author: (Cornelius Kölbel https://opensource.com/users/cornelius-k%C3%B6lbel) - -Open source alternative for multi-factor authentication: privacyIDEA -====== -As technology changes, so too will our need to adapt our authentication -mechanisms. -![Three closed doors][1] - -Two-factor authentication, or multi-factor authentication, is not a topic only for nerds anymore. Many services on the internet provide it, and many end-users demand it. While the average end-user might only realize that his preferred web site either offers MFA or it does not, there is more to it behind the scene. - -The two-factor market is changing, and changing rapidly. New authentication methods arise, classical vendors are merging, and products have disappeared. - -The end-user might not be bothered at all, but organizations and companies who want to require multi-factor authentication for their users may wonder where to turn to and which horse to bet on. - -Companies like Secure Computing, Aladdin, SafeNet, Cryptocard, Gemalto, and Thales have been providing authentication solutions for organizations for some decades and have been involved in a round dance of [mergers and acquisitions][2] during the last ten years. And the user was the one who suffered. While the IT department thought it was rolling out a reliable software of a successful vendor, a few years later, they were confronted with the product being end-of-life. - -### How the cloud changes things - -In 1986, RSA released RSA SecurID, a physical hardware token displaying magic numbers based on an unknown, proprietary algorithm. But, almost 20 years later, thanks to the Open Authentication Initiative, HOTP (RFC4226) and TOTP (RFC6238) were specified—originally for OTP hardware tokens. - -SMS Passcode, which specialized in authenticating by sending text messages, was founded in 2005; no hardware token required. While other on-premises solutions kept the authentication server and the enrollment in a confined environment, with SMS Passcode, the authentication information (a secret text message) was transported via the mobile network to the user. - -The iPhone 1 was released in 2007, and the Android phone quickly followed. DUO Security was founded in 2009 as a specific cloud MFA provider, with the smartphone acting as a second factor. Both vendors concentrated on a new second factor—the phone with a text message or the smartphone with an app—and they offered and used infrastructure that was not part of the company's network anymore. - -Classical on-premises vendors started to move to the cloud, either by offering their new services or acquiring smaller vendors with cloud solutions, such as SafeNet's [acquisition of Cryptocard in 2012][3]. It seemed tempting for classical vendors to offer cloud services—no software updates on-premises, no support cases, unlimited scaling, and unlimited revenue. - -Even the old top dog, RSA, now offers a "Cloud Authentication Service." And doesn't it make sense to put authentication services in the cloud? The data is hosted at cloud services like Azure, the identities are hosted in the cloud at Azure AD, so why not put authentication there with Azure MFA? This approach might make sense for companies with a complete cloud-centric approach, but it also probably locks you into one specific vendor. - -Cloud seems a big topic also for multi-factor authentication. But what if you want to stay on-prem? - -### The state of multi-factor authentication technology - -Multi-factor authentication has also come a long way since 1986, when RSA introduced its first OTP tokens. A few decades ago, well-paid consultants made a living by rolling PKI concepts, since smartcard authentication needed a working certificate infrastructure. - -After having OTP keyfob tokens and smartphones with HOTP and TOTP apps and even push notification, the current state-of-the-art authentication seems to be FIDO2/WebAuthn. While U2F was specified by the FIDO Alliance alone, WebAuthn was specified by no one else than W3C, and the good news is, the base requirements have been integrated into all browsers except Internet Explorer. - -However, applications still need to add a lot of code when supporting Webauthn. But WebAuthn allows for new authentication devices like TPM chips in tablets, computers, and smartphones or cheap and small hardware devices. But U2F also looked good back then, and even it did not make the breakthrough. Will WebAuthn do it? - -So these are challenging times since currently, you probably cannot use WebAuthn, but in two years, you'll probably want to. Thus, you need a system that allows you to adapt your authentication mechanisms. - -### Getting actual requirements - -This is one of the first requirements when you are about to choose a flexible multi-factor authentication solution. It will not work out to solely rely on text messages, or on one single smartphone app or only WebAuthn tokens. The smartphone app may vanish; the WebAuthn devices might not be applicable in all situations. - -When looking at the mergers and acquisitions, we learned that it did happen and can happen again; that the software goes end-of-life, or the vendors cease their cloud services. And sometimes it is only the last few months that hurt, when the end of sales means that you cannot buy any new user licenses or onboard any new users! To get a lasting solution, you need to be independent on cloud services and vendor decisions. The safest way to do so is to go for an open source solution. - -But when going for an open source solution, you want to get a reliable system, reliable meaning that you can be sure to get updates that do not break and that bugs will be fixed, and there are people to be asked. - -### An open source alternative: privacyIDEA - -Concentrated experiences in the two-factor market since 2004 have been incorporated into the open source software alternative: [privacyIDEA][4]. - -privacyIDEA is an open source solution providing a wide variety of different authentication technologies. It started with HOTP and TOTP tokens, but it also supports SMS, email, push notifications, SSH keys, X.509 certificates, Yubikeys, Nitrokeys, U2F, and a lot more. Currently, the support for WebAuthn is added. - -The modular structure of the token types (being Python classes) allows new types to be added quickly, making it the most flexible in regards to authentication methods. It runs on-premises at a central location in your network. This way, you stay flexible, have control over your network, and keep pace with the latest developments. - -privacyIDEA comes with a mighty and flexible policy framework that allows you to adapt privacyIDEA to your needs. The unique event handler modules enable you to fit privacyIDEA into your existing workflows or create new workflows that work the best for your scenario. It is also plays nice with the others and integrates with identity and authentication solutions like FreeRADIUS, simpleSAMLphp, Keycloak, or Shibboleth. This flexibility may be the reason organizations like the World Wide Web Consortium and companies like Axiad are using privacyIDEA. - -privacyIDEA is developed [on GitHub][5] and backed by a Germany-based company providing services and support worldwide. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/open-source-multi-factor-authentication - -作者:[Cornelius Kölbel][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/cornelius-k%C3%B6lbel -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/EDU_UnspokenBlockers_1110_A.png?itok=x8A9mqVA (Three closed doors) -[2]: https://netknights.it/en/consolidation-of-the-market-and-migrations/ -[3]: https://www.infosecurity-magazine.com/news/safenet-acquires-cryptocard/ -[4]: https://privacyidea.org -[5]: https://github.com/privacyidea/privacyidea diff --git a/sources/tech/20200409 How to set up a remote school environment for kids with Linux.md b/sources/tech/20200409 How to set up a remote school environment for kids with Linux.md deleted file mode 100644 index 327af54c79..0000000000 --- a/sources/tech/20200409 How to set up a remote school environment for kids with Linux.md +++ /dev/null @@ -1,75 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to set up a remote school environment for kids with Linux) -[#]: via: (https://opensource.com/article/20/4/school-home-linux) -[#]: author: (Alan Formy-Duval https://opensource.com/users/alanfdoss) - -How to set up a remote school environment for kids with Linux -====== -Repurpose an old computer to support the new home-schooler in your life. -![Image by Alan Formy-Duvall][1] - -COVID-19 has suddenly thrown all of us into a new and challenging situation. Many of us are now working full-time from home, and for a lot of us (especially people who aren't used to working remotely), this is taking some getting used to. - -Another group that is similarly challenged is our kids. They can't go to school or participate in their regular after-school activities. My daughter's elementary school closed its classrooms and is teaching through an online, web-based learning portal instead. And one of her favorite extracurricular activities—a coding school where she has been learning Scratch and just recently "graduated" to WoofJS–has also gone to an online-only format. - -We are fortunate that so many of our children's activities can be done online now, as this is the only way they will be able to learn, share, and socialize for at least the next several months. - -### Setting up a temporary homeschool environment - -When our daughter's school went to an online-only format, we realized she needed a place and some tools to do her work. So we cleaned off her desk and cleared the toys from the floor around it to make an "office" for her. We also realized she would need a computer. While I could have shopped online and ordered a new computer (and spent at least several hundred dollars—if not more than $1,000—in the process), I chose an alternative and put an old, unused laptop back to work. - -If you have an unused computer sitting around and are willing to do a bit of tech work, you, too, can set something up to get your kids online. Here's how I did it. - -### The hardware - -While my daughter already has her own small IT department (as I like to say), it consists of some gaming systems, a tablet, and a Chromebook. Even her Chromebook has just an 11.6" screen and a small keyboard, so none of her devices are really quite adequate for full-time school duty. - -So we found ourselves in a pinch. She really needed a desktop-capable computer system with a decent-sized screen, a full keyboard, a good-quality microphone, a set of speakers, and a headphone jack. And having an external video connector helps if you decide one screen isn't enough. - -I didn't have a spare desktop, but I did have a laptop: a Lenovo G550 with a Pentium Dual-Core T4500 2.3GHz processor and 4GB RAM. I replaced its aging 5400RPM spindle hard drive with a 240GB solid-state drive. The laptop has a 15.6" screen, which is much easier to view than the small screens on her other devices, and a comfortable, full-size keyboard. Its CPU scores a bit better in PassMark's benchmarks (913 vs. 674) than the 1.6GHz Intel Celeron N3060 Dual-Core in the Chromebook. - -However, it is 10 years old, certainly on the edge of usability by today's standards. But, thanks to the efficiency of the Linux operating system, it gets the job done. I installed the latest version (v31) of [Fedora Workstation][2], but many other distributions will work just fine. If you really want to eke out every drop of performance, you could use one of the [lightweight Linux distributions][3]. The only area that required a little extra effort with Fedora was the wireless; I had to install the driver for the Broadcom WiFi hardware. But really, this was only a few extra steps and a restart, and it was good to go. - -Linux supports all of the other hardware in the laptop. My daughter prefers a full-sized mouse over the touchpad, so I attached one. She likes the keyboard on this laptop, but if she wants an external keyboard, there are enough USB ports to hook one up. - -It has a traditional 3.5mm audio jack, so she can use headphones. I recommend giving children decibel-limited headphones to protect their hearing. - -Even though this laptop has a 15.6" widescreen display, I think having a second monitor gives the best experience. I have a spare that I might hook up to the external VGA connector. - -### The software - -My daughter's school set up an online learning portal. The benefit is that students just need a supported web browser to log on and get to work, and I thank the school for its efforts and choice of a vendor-agnostic solution. Most Linux distributions include the Mozilla Firefox web browser installed by default, and Linux provides a full operating system, so I can install any applications she might need. Fedora is also updated regularly (unlike the old Windows Vista that came with the laptop and is no longer supported). - -![][4] - -Scratch running on Fedora - -Her extracurricular coding school is using the Zoom client. I'm happy to report that it was an easy [install with RPM][5] and works great on Fedora 31. - -### Success! - -My daughter has no trouble using her new laptop. She likes the [GNOME desktop][6], particularly the fact that it "Looks like Dad's!" This is turning out to be a great experiment in practical (and under-pressure) use of a Linux desktop. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/school-home-linux - -作者:[Alan Formy-Duval][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/alanfdoss -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/homeschool.jpg?itok=vYEd9NON (Image by Alan Formy-Duvall) -[2]: https://getfedora.org/en/workstation/ -[3]: https://opensource.com/article/19/6/linux-distros-to-try -[4]: https://opensource.com/sites/default/files/scratch.jpg -[5]: https://zoom.us/download?os=linux -[6]: https://www.gnome.org/ diff --git a/sources/tech/20200415 6 open source teaching tools for virtual classrooms.md b/sources/tech/20200415 6 open source teaching tools for virtual classrooms.md deleted file mode 100644 index 807ebfae3d..0000000000 --- a/sources/tech/20200415 6 open source teaching tools for virtual classrooms.md +++ /dev/null @@ -1,96 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (6 open source teaching tools for virtual classrooms) -[#]: via: (https://opensource.com/article/20/4/open-source-remote-teaching-tools) -[#]: author: (Mathias Hoffmann https://opensource.com/users/mhopensource) - -6 open source teaching tools for virtual classrooms -====== -Create podcasts, online lectures, tutorials, and other teaching -resources for learning at home with open source tools. -![Person reading a book and digital copy][1] - -As schools and universities are shutting down around the globe due to COVID-19, many of us in academia are wondering how we can get up to speed and establish a stable workflow to get our podcasts, online lectures, and tutorials out there for our students. - -Open source software (OSS) has a key role to play in this situation for many reasons, including: - - * **Speed:** OSS can roll out quickly and in large numbers (e.g., to an army of teaching assistants for multiple tutorial sessions in big lectures) without licensing issues and in a decentralized manner. - * **Cost:** OSS does not cost anything upfront, which is important for financially stretched schools and universities that need solutions to complex challenges on very short notice. - - - -With everything going online, we need new ways to engage with students. Here is a list of tools that I have found useful to share my own lectures.  - -### Create podcasts, videos, or live streams with OBS - -[Open Broadcast Studio (OBS)][2] is a professional, open source audio and video recording tool that allows you to record, stream instantly, and do much more. OBS is available for all major platforms (Windows, macOS, and Linux), so interoperability with your colleagues and their various devices is ensured. - -Even if you're already using online conferencing software as a recording system, OBS can be a great backup solution. Since it records locally, you're protected against any network lags or disconnections. You also have complete control over your data, so many educational institutions may find it to be a more secure solution than some other options. - -Compatibility is also an advantage: OBS stores recordings in a standard intermediate format (MKV), which can be transferred to MP4 or other formats. Also, support for Nvidia graphics cards under OBS is great, as the company is one of the main sponsors of the OBS project. This allows you to make full use of your hardware and speed up the recording process. - -### Video and sound editing - -After you record your podcast or video, you may find that it needs editing. There are many reasons you may need to edit your audio or video. For example, many university online platforms restrict the size of files you can upload, so you may have to cut long videos. Or, the sound may be too quiet, or maybe it was too noisy when you recorded it, so you need to make adjustments to the audio. - -Two of the open source apps to explore are [OpenShot][3] and [Shotcut][4]. Of the two, Shotcut is a more advanced program, which implies a slightly steeper learning curve. Both are cross-platform and have full support for hardware encoding with NVidia and other graphics cards, which will substantially lower processing time compared to CPU-only processing. - -You can also extract a soundtrack in either program (although I have found it to be much faster with Shotcut) and export it to an audio-editing program. I find [Audacity][5], another open source, cross-platform (Mac, Linux, Windows) tool, to work extremely well. - -My typical workflow looks something like this: - - * Import the recording into Shotcut - * Extract the audio, save it to an audio file - * Import it into Audacity, normalize and amplify the audio, maybe do some noise reduction - * Save the audio to a new file - * Import the new audio file into Shotcut, align it with the audio-free video, and cut appropriately - * Export into an MP4 video (this last step usually takes some time, so have a coffee…) - - - -### Electronic blackboards - -If you want to annotate your slides or develop ideas on an electronic blackboard, you need note-taking software and a device with a touchscreen or a graphics tablet. A great open source tool (developed with Swiss taxpayer funding) for blackboarding is [OpenBoard][6]. It is cross-platform; although it is officially only available for Linux on Ubuntu 16.04, you can install a [Flatpak][7] and it will work on any Linux flavor. It is really a nice tool; its only shortcoming is that annotating slides is not very good. - -My main open source annotation and electric blackboard tool is [Xournal++][8], which is available in some Linux distros repos (e.g., Linux Mint) and otherwise via [Flathub][9]. Like all the tools mentioned earlier, it is also available on Mac and Windows. If you know of any open source, cross-platform note-taking tools, please share them in the comments. - -### Built-in solutions have their limits - -You might wonder why you should bother with alternative recording software in the first place. After all, most modern operating systems have built-in screen recorders that will also capture audio. However, these built-in solutions have their limits. One key limitation is that you cannot usually capture more than one video source at a time (e.g., a webcam with your talking head and a set of slides plus a whiteboard from a graphics tablet). - -The ability to use multiple video sources is very useful, though, since it can be dull for students to just listen to your voice and see your slides for extended periods. Face-to-face interactions—even if done virtually—help keep listeners' attention and make it easier for them to cope with imperfect recording quality and background noise. In addition, many of the built-in tools do not allow you to capture selected areas of the screen, and in general, you cannot change the resolution or the number of frames per second, which can be important for keeping your podcast's memory and bandwidth usage in check. - -### Conclusion - -When planning your online teaching, you will want to use a blend of audio, video, slides, and electronic blackboards to create an immersive experience even while students are learning remotely. Open source software offers advanced, effective tools for creating such online educational experiences. - -* * * - -_This article is based on "[Open source software for online teaching in the times of corona][10]" on Mathias Hoffman's blog and is reused with permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/open-source-remote-teaching-tools - -作者:[Mathias Hoffmann][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/mhopensource -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/read_book_guide_tutorial_teacher_student_apaper.png?itok=_GOufk6N (Person reading a book and digital copy) -[2]: https://obsproject.com/ -[3]: http://www.openshot.org/ -[4]: http://www.shotcut.org/ -[5]: https://www.audacityteam.org/ -[6]: http://www.openboard.ch/ -[7]: http://www.flathub.org -[8]: https://github.com/xournalpp/xournalpp -[9]: https://flathub.org/apps/details/com.github.xournalpp.xournalpp -[10]: http://mathiashoffmann.net/2020/03/22/open-source-software-for-online-teaching-in-the-times-of-corona diff --git a/sources/tech/20200415 Writing Java with Quarkus in VS Code.md b/sources/tech/20200415 Writing Java with Quarkus in VS Code.md deleted file mode 100644 index 2d61db71de..0000000000 --- a/sources/tech/20200415 Writing Java with Quarkus in VS Code.md +++ /dev/null @@ -1,239 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Writing Java with Quarkus in VS Code) -[#]: via: (https://opensource.com/article/20/4/java-quarkus-vs-code) -[#]: author: (Daniel Oh https://opensource.com/users/daniel-oh) - -Writing Java with Quarkus in VS Code -====== -In this tutorial, I'll walk you through how to rebuild, package, and -deploy cloud-native applications automatically with Quarkus. -![Person drinking a hat drink at the computer][1] - -In the previous articles in this series about cloud-native [Java][2] applications, I shared [_6 requirements of cloud-native software_][3] and [_4 things cloud-native Java must provide_][4]. But now you might want to implement these advanced Java applications in your local machine without climbing a steep learning curve. In this article, I will walk through using the open source technologies [Quarkus][5] and [Visual Studio Code][6] (VS Code) to accelerate the development of both traditional cloud-native Java stacks and also serverless, reactive applications with easier and more familiar methods. - -Quarkus is a Kubernetes-native Java stack tailored for GraalVM and OpenJDK HotSpot. It's crafted from best-of-breed Java libraries and standards with live coding, unified configuration, superfast startup, small memory footprint, and unified imperative and reactive development. VS Code is an open source integrated development environment (IDE) for editing code. - -### Generate a Quarkus project - -Begin by navigating to Quarkus' [Start coding][7] page to generate a Quarkus project that includes a RESTful endpoint. Leave all variables (i.e., Group, Artifact, Build Tool, Extensions) on the default settings, then click **Generate your application** at the top-right of the page. Note that the RESTEasy JAX-RS extension is preselected as default. - -![Quarkus Generate application button][8] - -The ZIP file will automatically download on your local machine. Extract the file with the following command: - - -``` -$ unzip code-with-quarkus.zip -Archive: code-with-quarkus.zip -    creating: code-with-quarkus/ -   inflating: code-with-quarkus/pom.xml -   ... -``` - -### Install VS Code - -Download and install VS Code in your preferred way, whether that's [from the website][9] or through your package manager (dnf, apt, brew, etc). Once that's done, open the unzipped Quarkus project using VS Code's command-line tool: - - -``` -$ cd code-with-quarkus/ -$ code . -``` - -You will see the [Apache Maven][10] project structure with: - - * **ExampleResource** exposed on **/hello** - * Associated JUnit test - * Accessible landing page via - * Dockerfiles for both [native compilation][11] and JVM HotSpot - * A unified application configuration file - - - -Add Quarkus tools to your IDE through the VS Code's extension feature. - -![Add Quarkus tools to VS Code IDE][12] - -### Start coding - -Run the application using Quarkus development mode. To run the application, you need: - - * JDK 1.8+ installed with JAVA_HOME configured appropriately - * Apache Maven 3.6.3+ - - - -Move to the **code-with-quarkus** directory then type **mvn compile quarkus:dev** in VS Code's terminal. - -![Run application][13] - -You will see that the Java application is running well with: - - * About one second to startup - * Live coding activated - * EnabledCDI and RESTEASY features - - - -When you access the endpoint via a web browser, you will see the return code, **hello**. - -!["Hello" return][14] - -Now, you're ready to change the code! Move back to VS Code, then open the **ExampleResource.java** file in **src/main/java/org/acme**. Replace the return code with "**Welcome, Cloud-Native Java with Quarkus!"** Don't forget to **Save** the file. - -![Editing the return][15] - -Go back to the web browser and reload the page. - -![New return][16] - -_It's like magic!_ Behind the scenes, Quarkus rebuilt, packaged, and deployed the application for you automatically, and it only took half a second. This is one of the essential cloud-native Java runtime features for increasing development productivity. - -![Quarkus output][17] - -Continue running your cloud-native Java application in Quarkus. - -### Integrate data transactions via Quakrus Tool - -To add an in-memory database (H2) transaction capability, press **F1** then click on **Quarkus: Add extensions to the current project**. - -![Adding extensions in Quarkus][18] - -Enter **h2** in the search bar, then double-click on **JDBC Driver - H2 Data** in the result. - -![JDBC Driver - H2 Data extension][19] - -Select the following three extensions, which will simplify your persistence code and return JSON format data: - - * Hibernate ORM with Panache Data - * JDBC Driver - H2 - * RESTEasy JSON-B Web - - - -Press **Enter** to add those dependencies. - -![Add Quarkus extensions][20] - -You should see the following in a new VS Code terminal: - -![VS Code adding extensions][21] - -You should also find the following pulled dependencies in **POM.xml**: - -![dependencies in POM.xml][22] - -### Create an Inventory entity - -With your project in place, you can get to work defining the business logic. - -The first step is to define the model (entity) of an Inventory object. Since Quarkus uses Hibernate ORM Panache, create an **Inventory.java** file in the **src.main.java.org.acme** directory, and paste the following code into it: - - -``` -package org.acme; - -import javax.persistence.Cacheable; -import javax.persistence.Entity; - -import io.quarkus.hibernate.orm.panache.PanacheEntity; - -@[Entity][23] -@Cacheable -public class Inventory extends PanacheEntity { -    -    public [String][24] itemId; -    public [String][24] location; -    public int quantity; -    public [String][24] link - -    public Inventory() { - -    } -    -} -``` - -#### Define the RESTful endpoint of Inventory - -Next, mirror the abstraction of service so that you can inject the Inventory service into various places (like a RESTful resource endpoint) in the future. Create an **InventoryResource.java** file in the **src.main.java.org.acme** directory and add this code to it: - - -``` -package org.acme; - -import java.util.List; -import javax.enterprise.context.ApplicationScoped; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; - -@Path("/services/inventory") -@ApplicationScoped -@Produces("application/json") -@Consumes("application/json") -public class InventoryResource { - -    @GET -    -    public List<Inventory> getAll() { -        return Inventory.listAll(); -    } -} -``` - -Don't forget to save these files. Go back to your web browser and access a new endpoint, . You will see: - -![Inventory endpoint][25] - -### Wrapping up - -If you have an issue or get an error when you implement this, you can find and reuse the [code in my GitHub repository][26]. - -If you want to learn more, Quarkus has some [practical and useful guides][27] that show how to develop advanced cloud-native Java applications using Quarkus extensions with event-driven programming, serverless development, and Kubernetes deployment. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/java-quarkus-vs-code - -作者:[Daniel Oh][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/daniel-oh -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hat drink at the computer) -[2]: https://opensource.com/resources/java -[3]: https://opensource.com/article/20/1/cloud-native-software -[4]: https://opensource.com/article/20/1/cloud-native-java -[5]: https://quarkus.io/ -[6]: https://code.visualstudio.com/ -[7]: https://code.quarkus.io/ -[8]: https://opensource.com/sites/default/files/uploads/quarkus_generateapplication.png (Quarkus Generate application button) -[9]: https://code.visualstudio.com/download -[10]: https://maven.apache.org/ -[11]: https://quarkus.io/guides/building-native-image -[12]: https://opensource.com/sites/default/files/uploads/add-quarkus-to-ide.png (Add Quarkus tools to VS Code IDE) -[13]: https://opensource.com/sites/default/files/uploads/run-application.png (Run application) -[14]: https://opensource.com/sites/default/files/uploads/endpoint-hello.png ("Hello" return) -[15]: https://opensource.com/sites/default/files/uploads/edit-return-code.png (Editing the return) -[16]: https://opensource.com/sites/default/files/uploads/new-return-code.png (New return) -[17]: https://opensource.com/sites/default/files/uploads/quarkus-magic.png (Quarkus output) -[18]: https://opensource.com/sites/default/files/uploads/quarkus-add-extensions.png (Adding extensions in Quarkus) -[19]: https://opensource.com/sites/default/files/uploads/jbdc-driver-h2-data.png (JDBC Driver - H2 Data extension) -[20]: https://opensource.com/sites/default/files/uploads/add-extensions.png (Add Quarkus extensions) -[21]: https://opensource.com/sites/default/files/uploads/vscode-adding-extensions.png (VS Code adding extensions) -[22]: https://opensource.com/sites/default/files/uploads/dependencies-pomxml.png (dependencies in POM.xml) -[23]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+entity -[24]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string -[25]: https://opensource.com/sites/default/files/uploads/inventory-endpoint.png (Inventory endpoint) -[26]: https://github.com/danieloh30/code-with-quarkus -[27]: https://quarkus.io/guides/ diff --git a/sources/tech/20200417 How to set up and run WordPress for your classroom.md b/sources/tech/20200417 How to set up and run WordPress for your classroom.md deleted file mode 100644 index bb8b87d560..0000000000 --- a/sources/tech/20200417 How to set up and run WordPress for your classroom.md +++ /dev/null @@ -1,164 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to set up and run WordPress for your classroom) -[#]: via: (https://opensource.com/article/20/4/wordpress-virtual-machine) -[#]: author: (Don Watkins https://opensource.com/users/don-watkins) - -How to set up and run WordPress for your classroom -====== -Follow these simple steps to customize WordPress for use in the -classroom using free open source software. -![Painting art on a computer screen][1] - -There are many good reasons to set up WordPress for your classroom. As more schools switch to online classes, WordPress can become the go-to content management system. Teachers using WordPress can provide a number of different educational choices to differentiate instruction for their students. Blogging is an accessible way to create content that energizes student learning. Teachers can write short stories, poems, and provide picture galleries that function as story starters. Students can comment and those comments can be moderated by their teacher. - -There are free options like [WordPress.com][2] and [Edublogs][3]. However, these free versions are limited, and you may want to explore all your options. You can install [Virtualbox][4] on any Windows, macOS, or Linux computer. You can use your own computer or an extra you happen to have access to in a virtual environment. - -On Linux, you can install Virtualbox from your package manager. For instance, on Debian, Elementary OS, or Ubuntu: - - -``` -`$ sudo apt install virtualbox` -``` - -On Fedora: - - -``` -`$ sudo dnf install virtualbox` -``` - -### Download a Wordpress image - -Wordpress is easy to install, but server configuration and management can be difficult for the uninitiated. That's why there's [Turnkey Linux][5], a project dedicated to creating virtual machine images and containers of popular server software, preconfigured and ready to run. With Turnkey Linux, you just download a disk image containing the operating system and the software you want to run, and then import that image into Virtualbox. - -To get started with Wordpress, download the **VM** virtual machine image from [turnkeylinux.org/wordpress][6] (in the **Builds** section). Make sure you download the image labeled **VM**, because that's the only format meant for Virtualbox. - -### Import the image into Virtualbox - -After installing Virtualbox, launch the application and import the virtual machine image into Virtualbox. - -![][7] - -Networking on the imported image is set to NAT by default. You will want to change the network settings to "bridged." - -![Virtualbox menu][8] - -After restarting the virtual machine, you are prompted to add passwords for MySQL, Adminer, and the WordPress **admin** user. - -Then you see the network configuration console for the installation. Launch a web browser and navigate to the **web** address provided (in this example, it's 192.168.86.149). - -![Console][9] - -In a web browser, you see a login screen for your Wordpress installation. Click on the **Login** link. - -![Wordpress welcome][10] - -Enter **admin** as the username, followed by the password you created earlier. Click the **Login** link. On this first login as **admin**, you can choose a new password. Be sure to remember it! - -![Login screen][11] - -After logging in, you're presented with the WordPress Dashboard. The software will likely notify you, in the upper left corner of the window, that a new version of Wordpress exists. Update to the latest versions as prompted so your site is secure. - -It's important to note that your Wordpress blog isn't visible by anyone on the Internet yet. It only exists in your local network: only people in your building who are connected to the same router or wifi access point as you can see your Wordpress site right now. The worldwide Internet can't get to it because you're behind a firewall (embedded in your router, and possible also in your computer). - -![Wordpress dashboard][12] - -Following the upgrade, the application restarts, and you're ready to begin configuring WordPress to your liking. - -![Wordpress configuration][13] - -On the far left, there is a button to **Customize Your Site**. - -There, you can choose the name of your site. You can accept the default theme, which is "Twenty Nineteen," or choose another. My favorite is "Twenty Ten," but browse through the themes available to find your personal favorite. WordPress comes with five free themes installed. You can download other free themes from the [WordPress][14][.org][15] site or choose to purchase a premium theme. - -When you click the **Customize Your Site** button, you're presented with new menu options. Select **Site Identity** and change the name of your site. You might use the name of your school or classroom. There's also room to choose a byline (the credit given to the author of a blog post). You can choose the colors for your site and where you will place menus and widgets. WordPress widgets and content and features to the sidebars for your site. Homepage settings are important, as they allow you to choose between a static page that might have a description of your school or classroom or having your blog entries displayed prominently. You can add additional CSS. - -![Turnkey theme][16] - -You can edit your front page, add additional pages like "About," or add a blog post. You can also manage widgets, manage menus, turn comments on or off, or add a link to learn more about WordPress. - -Customizing your site allows you to configure a number of options quickly and easily. - -WordPress has dozens of widgets that you can place in different areas of your page. Widgets are independent sections of content that can be placed into specific areas provided by your theme. These areas are called sidebars. - -### Adding content - -After you have WordPress configured to your liking, you probably want to get busy creating content. The best way to do that is to head back to the WordPress Dashboard. - -On the left side, near the top of the page, you see **Posts**. Select that link and a dropdown appears. Choose **Add New** to create your very first blog post. - -![Add post dropdown][17] - -Fill in your title in the top block and then move down to the body. It's like using a word processor. WordPress has all the tools you need to write. You can set the font size from _small_ to _huge_. You can start a paragraph with dropped capitals. The text and background color can be changed. Your posts can include quote blocks and embedded content. A wide variety of embedded content is supported so you can make your posts a dynamic multimedia experience. - -![Wordpress classroom blog][18] - -### Going online - -So far, your Wordpress blog only exists on your local network. Anyone using the same router as you (your housemates or classroom) can see your Wordpress site by navigating to 192.168.86.149, but once you're away from that router, the site becomes inaccessible. - -If you want to go online with your custom Wordpress site, you have to allow traffic through your router, and then direct that traffic to the computer running Virtualbox. If you've installed Virtualbox on a laptop, then your website would disappear any time you closed your laptop, which is why servers that never get shutdown exist. But if this is just a fun lesson on how to run a Wordpress site, then having a website that's only available during class hours is fine. - -If you have access to your router, then you can log into it and make the adjustments yourself. If you don't own or control your router, then you must talk to your systems administrator for access. - -A _router_ is the box you got from your internet service provider. You might also call it your _modem_. - -Every device is different, so there's no way for me to definitively tell you what you need to click on to adjust your settings. Generally, you access your home router through a web browser. Your router's address is often printed on the bottom of the router and begins with either 192.168 or 10. - -Navigate to the router address and log in with the credentials you were provided when you got your internet service. It's often as simple as `admin` with a numeric password (sometimes this password is printed on the router, too). If you don't know the login, call your internet provider and ask for details. - -Different routers use different terms for the same thing; keywords to look for are **Port forwarding**, **Virtual server**, and **Firewall**. Whatever your router calls it, you want to accept traffic coming to port 80 of your router and forward that traffic to the same port of your virtual machines's IP address (in this example, that is 192.168.86.149, but it could be different for you). - -![Example router setting screen][19] - -Now you're allowing traffic through the web port of your router's firewall. To view your Wordpress site over the Internet, get your worldwide IP address. You can get your global IP by going to the site [icanhazip.com][20]. Then go to a different computer, open a browser, and navigate to that IP address. As long as Virtualbox is running, you'll see your Wordpress site on the Internet. You can do this from anywhere in the world, because your site is on the Internet now. - -Most websites use a domain name so you don't have to remember global IP addresses. You can purchase a domain name from services like [webhosting.coop][21] or [gandi.net][22], or a temporary one from [freenom.com][23]. Mapping that to your Wordpress site, however, is out of scope for this article. - -### Wordpress for everyone - -[WordPress][24] is open source and is licensed under the [GNU Public License][25]. You are welcome to contribute to WordPress as either a [developer][26] or enthusiast. WordPress is committed to being inclusive and accessible as possible. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/wordpress-virtual-machine - -作者:[Don Watkins][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/painting_computer_screen_art_design_creative.png?itok=LVAeQx3_ (Painting art on a computer screen) -[2]: https://wordpress.com/ -[3]: https://edublogs.org/ -[4]: https://www.virtualbox.org/ -[5]: https://www.turnkeylinux.org -[6]: https://www.turnkeylinux.org/wordpress -[7]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_1.png -[8]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_2.png (Virtualbox menu) -[9]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_3.png (Console) -[10]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_4.png (Wordpress welcome) -[11]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_5.png (Login screen) -[12]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_6.png (Wordpress dashboard) -[13]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_7.png (Wordpress configuration) -[14]: http://Wordpress.org -[15]: http://WordPress.org -[16]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_8.png (Turnkey theme) -[17]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_12.png (Add post dropdown) -[18]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_13.png (Wordpress classroom blog) -[19]: https://opensource.com/sites/default/files/router-web.jpg (Example router setting screen) -[20]: http://icanhazip.com/ -[21]: https://webhosting.coop/domain-names -[22]: https://www.gandi.net -[23]: http://freenom.com/ -[24]: https://wordpress.org/ -[25]: https://github.com/WordPress/WordPress/blob/master/license.txt -[26]: https://wordpress.org/five-for-the-future/ diff --git a/sources/tech/20200504 Create interactive learning games for kids with open source.md b/sources/tech/20200504 Create interactive learning games for kids with open source.md deleted file mode 100644 index f6ade34857..0000000000 --- a/sources/tech/20200504 Create interactive learning games for kids with open source.md +++ /dev/null @@ -1,123 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Create interactive learning games for kids with open source) -[#]: via: (https://opensource.com/article/20/5/jclic-games-kids) -[#]: author: (Peter Cheer https://opensource.com/users/petercheer) - -Create interactive learning games for kids with open source -====== -Help your students learn by creating fun puzzles and games in JClic, an -easy Java-based app. -![Family learning and reading together at night in a room][1] - -Schools are closed in many countries around the world to slow the spread of COVID-19. This has suddenly thrown many parents and teachers into homeschooling. Fortunately, there are plenty of educational resources on the internet to use or adapt, although their licenses vary. You can try searching for Creative Commons Open Educational Resources, but if you want to create your own materials, there are many options for that to. - -If you want to create digital educational activities with puzzles or tests, two easy-to-use, open source, cross-platform applications that fit the bill are eXeLearning and JClic. My earlier article on [eXeLearning][2] is a good introduction to that program, so here I'll look at [JClic][3]. It is an open source software project for creating various types of interactive activities such as associations, text-based activities, crosswords, and other puzzles with text, graphics, and multimedia elements. - -Although it's been around since the 1990s, JClic never developed a large user base in the English-speaking world. It was created in Catalonia by the [Catalan Educational Telematic Network][4] (XTEC). - -### About JClic - -JClic is a Java-based application that's available in many Linux repositories and can be downloaded from [GitHub][5]. It runs on Linux, macOS, and Windows, but because it is a Java program, you must have a Java runtime environment [installed][6]. - -The program's interface has not really changed much over the years, even while features have been added or dropped, such as introducing HTML5 export functionality to replace Java Applet technology for web-based deployment. It hasn't needed to change much, though, because it's very effective at what it does. - -### Creating a JClic project - -Many teachers from many countries have used JClic to create interactive materials for a wide variety of ability levels, subjects, languages, and curricula. Some of these materials have been collected in an [downloadable activities library][7]. Although few activities are in English, you can get a sense of the possibilities JClic offers. - -As JClic has a visual, point-and-click program interface, it is easy enough to learn that a new user can quickly concentrate on content creation. [Documentation][8] is available on GitHub. - -The screenshots below are from one of the JClic projects I created to teach basic Excel skills to learners in Papua New Guinea. - -A JClic project is created in its authoring tool and consists of the following four elements: - -#### 1\. Metadata about the project - -![JClic metadata][9] - -#### 2\. A library of the graphical and other resources it uses - -![JClic media][10] - -#### 3\. A series of one or more activities - -![JClic activities][11] - -JClic can produce seven different activity types: - - * Associations where the user discovers the relationships between two information sets - * Memory games where the user discovers pairs of identical elements or relations (which are hidden) between them - * Exploration activities involving the identification and information, based on a single Information set - * Puzzles where the user reconstructs information that is initially presented in a disordered form; the activity can include graphics, text, sound, or a combination of them - * Written-response activities that are solved by writing text, either a single word or a sentence - * Text activities that are based on words, phrases, letters, and paragraphs of text that need to be completed, understood, corrected, or ordered; these activities can contain images and windows with active content - * Word searches and crosswords - - - -Because of variants in the activities, there are 16 possible activity types. - -#### 4\. A timeline to sequence the activities - -![JClic timeline][12] - -### Using JClic content - -Projects can run in JClic's player (part of the Java application you used to create the project), or they can be exported to HTML5 so they can run in a web browser. - -The one thing I don't like about JClic is that its default HTML5 export function assumes you'll be online when running a project. If you want a project to work offline as needed, you must download a compiled and minified HTML5 player from [Github][13], and place it in the same folder as your JClic project. - -Next, open the **index.html** file in a text editor and replace this line: - - -``` -`` -``` - -With: - - -``` -`` -``` - -Now the HTML5 version of your project runs in a web browser, whether the user is online or not. - -JClic also provides a reports function that can store test scores in an ODBC-compliant database. I have not explored this feature, as my tests and puzzles are mostly used for self-assessment and to prompt reflection by the learner, rather than as part of a formal scheme, so the scores are not very important. If you would like to learn about it, there is [documentation][14] on running JClic Reports Server with Tomcat and MySQL (or [mariaDB][15]). - -### Conclusion - -JClic offers a wide range of activity types that provide plenty of room to be creative in designing content to fit your subject area and type of learner. JClic is a valuable addition for anyone who needs a quick and easy way to develop educational resources. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/jclic-games-kids - -作者:[Peter Cheer][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/petercheer -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/family_learning_kids_night_reading.png?itok=6K7sJVb1 (Family learning and reading together at night in a room) -[2]: https://opensource.com/article/18/5/exelearning -[3]: https://clic.xtec.cat/legacy/en/jclic/index.html -[4]: https://clic.xtec.cat/legacy/en/index.html -[5]: https://github.com/projectestac/jclic -[6]: https://adoptopenjdk.net/installation.html -[7]: https://clic.xtec.cat/repo/ -[8]: https://github.com/projectestac/jclic/wiki/JClic_Guide -[9]: https://opensource.com/sites/default/files/uploads/metadata.png (JClic metadata) -[10]: https://opensource.com/sites/default/files/uploads/media.png (JClic media) -[11]: https://opensource.com/sites/default/files/uploads/activities.png (JClic activities) -[12]: https://opensource.com/sites/default/files/uploads/sequence.png (JClic timeline) -[13]: http://projectestac.github.io/jclic.js/ -[14]: https://github.com/projectestac/jclic/wiki/Jclic-Reports-Server-with-Tomcat-and-MySQL-on-Ubuntu -[15]: https://mariadb.org/ diff --git a/sources/tech/20200505 8 open source video games to play.md b/sources/tech/20200505 8 open source video games to play.md deleted file mode 100644 index ac0577d96b..0000000000 --- a/sources/tech/20200505 8 open source video games to play.md +++ /dev/null @@ -1,116 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (8 open source video games to play) -[#]: via: (https://opensource.com/article/20/5/open-source-fps-games) -[#]: author: (Aman Gaur https://opensource.com/users/amangaur) - -8 open source video games to play -====== -These games are fun and free to play, a way to connect with friends, and -an opportunity to make an old favorite even better. -![Gaming on a grid with penguin pawns][1] - -Video games are a big business. That's great for the industry's longevity—not to mention for all the people working in programming and graphics. But it can take a lot of work, time, and money to keep up with all the latest gaming crazes. If you feel like playing a few quick rounds of a video game without investing in a new console or game franchise, then you'll be happy to know that there are plenty of open source combat games you can download, play, share, and even modify (if you're inclined to programming) for free. - -First-person shooters (FPS) are one of the most popular categories of video games. They are centered around the perspective of the protagonist (the player), and they often offer weapon-based advancement. As you get better at the game, you survive longer, you get better weapons, and you increase your power. FPS games have a distinct look and feel, which is reflected in the category's name: players see everything—their weapons and the game world—in first person, as if they're looking through their player character's eyes. - -If you want to give one a try, check out the following eight great open source FPS games. - -### Xonotic - -![Xonotic][2] - -[Xonotic][3] is a fast-paced, arena-based FPS game. It is a popular game in the open source world. One reason could be the fact that it has never been a mainstream game. It offers a variety of weapons and enemies that are thrown right at you mercilessly from the start. Demanding quick action and response, it is an experience that will keep you on the edge of your seats. The game is available under the GPLv3+ license. - -### Wolfenstein Enemy Territory - -![Wolfenstein Enemy Territory][4] - -Wolfenstein has been a major franchise in gaming for many years. If you are a fan of gore and glory, then you've probably already heard of this game (if not, you'll love it once you try it). [Wolfenstein Enemy Territory][5] is an early iteration of the popular World War II game. It became free to play in 2003, and its [source code][6] is provided under the GPLv3. To play, however, you must own the game data (or recreate it yourself) separately (which remains under its original EULA). - -### Doom - -![Doom][7] - -[Doom][8] is a wildly popular game that was also an early example of games on Linux—way back in 2004. There are many iterations of the game, many of which have been released as open source. The game is about acquiring a teleportation device that's been captured by demons, so the violence, while gory, is low on realism. The source code for the game was provided under the GPL, but many versions require that you own the game for the game assets. There are dozens of ports and adaptations, including [Freedoom][9] (with free assets), [Dhewm3][10], [RBDoom-3-BFG][11], and many more. Try a few and pick your favorite! - -### Smokin' Guns - -![Smokin' Guns][12] - -If you're a fan of the Old West and six-shooters, this FPS is for you. From cowboys to gunslingers and with a captivating background score, [Smokin' Guns][13] has it all. It's a semi-realistic simulation of the old spaghetti western. On your way through the game, you face multiple enemies and get multiple weapons, so there's always the promise of excitement and danger around the corner. The game is free and open source under the terms of the GPLv2. - -### Nexuiz - -![Nexuiz][14] - -[Nexuiz][15] (classic) is another great FPS that's free to play on multiple platforms. The game is based on the Quake engine and has been made open source under the GNU GPLv2. The game offers multiple modes, including online, LAN party, and bot training. The game features sophisticated weapons and fast action. It's brutal and exciting, with an objective: kill as many opponents as possible before they get you. - -Note that the open source version of Nexuiz is not the same as the version built on CryEngine3 that is sold on Steam. - -### .kkrieger - -![kkrieger][16] - -[.Kkrieger][17] was developed in 2004 by .theprodukkt, a German demogroup. The game was developed using an unreleased (at the time) engine known as Werkkzeug. This game might feel a little slow to many, but it still offers an intense experience. The approaching enemies are slow, but their sheer number makes it confusing to know which one to take down first. It's an onslaught, and you have to shoot through layers of enemies before you reach the final boss. It was released in a rather raw form on [GitHub][18] by its creators under a BSD license with some public domain components. - -### Warsow - -![Warsow][19] - -If you've ever played Borderlands 2, then imagine [Warsow][20] as an arena-style Borderlands. The game is built on a modernized Quake II engine, and its plot takes a simple approach: Kill as many opponents as possible. The team with the most number of kills wins. Despite its simplicity, it features amazing weaponry and lots of great trick moves, like circle jumping, bunny hopping, double jumping, ramp sliding, and so on. It makes for an engaging multiplayer session, and it's been recognized by multiple online leagues as a worthy game for their competitions. Get the source code from [GitHub][21] or install the game from your software repository. - -### World of Padman - -![World of Padman][22] - -[The World of Padman][23] may be the last game on this list, but it's one of the most unique. Designed by PadWorld Entertainment, World of Padman takes a different twist graphically and introduces you to quirky and whimsical characters in a colorful (albeit cartoonishly violent) world. It's based on the ioquake3 engine, and its unique style and uproarious gameplay have earned it a featured place in multiple gaming magazines. You can download the source code from [GitHub][24]. - -### Give one a shot - -A game that becomes open source can act as a template for something great, whether it's a wholly open source version of an old classic, a remix of a beloved game, or an entirely new platform built on an old reliable engine. - -Open source gaming is important for many reasons: it provides users with a fun diversion, a way to connect with friends, and an opportunity for programmers and designers to hack within an existing framework. If titles like Doom weren't made open source, a little bit of video game history would be lost. Instead, it endures and has the opportunity to grow even more. - -Try an open source game, and watch your six. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/open-source-fps-games - -作者:[Aman Gaur][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/amangaur -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/game_pawn_grid_linux.png?itok=4gERzRkg (Gaming on a grid with penguin pawns) -[2]: https://opensource.com/sites/default/files/uploads/xonotic.jpg (Xonotic) -[3]: https://www.xonotic.org/download/ -[4]: https://opensource.com/sites/default/files/uploads/wolfensteinenemyterritory.jpg (Wolfenstein Enemy Territory) -[5]: https://www.splashdamage.com/games/wolfenstein-enemy-territory/ -[6]: https://github.com/id-Software/Enemy-Territory -[7]: https://opensource.com/sites/default/files/uploads/doom.jpg (Doom) -[8]: https://github.com/id-Software/DOOM -[9]: https://freedoom.github.io/ -[10]: https://dhewm3.org/ -[11]: https://github.com/RobertBeckebans/RBDOOM-3-BFG/ -[12]: https://opensource.com/sites/default/files/uploads/smokinguns.jpg (Smokin' Guns) -[13]: https://www.smokin-guns.org/downloads -[14]: https://opensource.com/sites/default/files/uploads/nexuiz.jpg (Nexuiz) -[15]: https://sourceforge.net/projects/nexuiz/ -[16]: https://opensource.com/sites/default/files/uploads/kkrieger.jpg (kkrieger) -[17]: https://web.archive.org/web/20120204065621/http://www.theprodukkt.com/kkrieger -[18]: https://github.com/farbrausch/fr_public -[19]: https://opensource.com/sites/default/files/uploads/warsow.jpg (Warsow) -[20]: https://www.warsow.net/download -[21]: https://github.com/Warsow -[22]: https://opensource.com/sites/default/files/uploads/padman.jpg (World of Padman) -[23]: https://worldofpadman.net/en/ -[24]: https://github.com/PadWorld-Entertainment diff --git a/sources/tech/20200511 Tips and tricks for optimizing container builds.md b/sources/tech/20200511 Tips and tricks for optimizing container builds.md deleted file mode 100644 index 0a4fbed8cb..0000000000 --- a/sources/tech/20200511 Tips and tricks for optimizing container builds.md +++ /dev/null @@ -1,201 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Tips and tricks for optimizing container builds) -[#]: via: (https://opensource.com/article/20/5/optimize-container-builds) -[#]: author: (Ravi Chandran https://opensource.com/users/ravichandran) - -Tips and tricks for optimizing container builds -====== -Try these techniques to minimize the number and length of your container -build iterations. -![Toolbox drawing of a container][1] - -How many iterations does it take to get a container configuration just right? And how long does each iteration take? Well, if you answered "too many times and too long," then my experiences are similar to yours. On the surface, creating a configuration file seems like a straightforward exercise: implement the same steps in a configuration file that you would perform if you were installing the system by hand. Unfortunately, I've found that it usually doesn't quite work that way, and a few "tricks" are handy for such DevOps exercises. - -In this article, I'll share some techniques I've found that help minimize the number and length of iterations. In addition, I'll outline a few good practices beyond the [standard ones][2]. - -In the [tutorial repository][3] from my previous article about [containerizing build systems][4], I've added a folder called **/tutorial2_docker_tricks** with an example covering some of the tricks that I'll walk through in this post. If you want to follow along and you have Git installed, you can pull it locally with: - - -``` -`$ git clone https://github.com/ravi-chandran/dockerize-tutorial` -``` - -The tutorial has been tested with Docker Desktop Edition, although it should work with any compatible Linux container system (like [Podman][5]). - -### Save time on container image build iterations - -If the Dockerfile involves downloading and installing a 5GB file, each iteration of **docker image build** could take a lot of time even with good network speeds. And forgetting to include one item to be installed can mean rebuilding all the layers after that point. - -One way around that challenge is to use a local HTTP server to avoid downloading large files from the internet multiple times during **docker image build** iterations. To illustrate this by example, say you need to create a container image with Anaconda 3 under Ubuntu 18.04. The Anaconda 3 installer is a ~0.5GB file, so this will be the "large" file for this example. - -Note that you don't want to use the **COPY** instruction, as it creates a new layer. You should also delete the large installer after using it to minimize the container image size. You could use [multi-stage builds][6], but I've found the following approach sufficient and quite effective. - -The basic idea is to use a Python-based HTTP server locally to serve the large file(s) and have the Dockerfile **wget** the large file(s) from this local server. Let's explore the details of how to set this up effectively. As a reminder, you can access the [full example][7]. - -The necessary contents of the folder **tutorial2_docker_tricks/** in this example repository are: - - -``` -tutorial2_docker_tricks/ -├── build_docker_image.sh                   # builds the docker image -├── run_container.sh                        # instantiates a container from the image -├── install_anaconda.dockerfile             # Dockerfile for creating our target docker image -├── .dockerignore                           # used to ignore contents of the installer/ folder from the docker context -├── installer                               # folder with all our large files required for creating the docker image -│   └── Anaconda3-2019.10-Linux-x86_64.sh   # from -└── workdir                                 # example folder used as a volume in the running container -``` - -The key steps of the approach are: - - * Place the large file(s) in the **installer/** folder. In this example, I have the large Anaconda installer file **Anaconda3-2019.10-Linux-x86_64.sh**. You won't find this file if you clone my [Git repository][8] because only you, as the container image creator, need this source file. The end users of the image don't. [Download the installer][9] to follow along with the example. - * Create the **.dockerignore** file and have it ignore the **installer/** folder to avoid Docker copying all the large files into the build context. - * In a terminal, **cd** into the **tutorial2_docker_tricks/** folder and execute the build script as **./build_docker_image.sh**. - * In **build_docker_image.sh**, start the Python HTTP server to serve any files from the **installer/** folder: [code] cd installer -python3 -m http.server --bind 10.0.2.15 8888 & -cd .. -``` -* If you're wondering about the strange internet protocol (IP) address, I'm working with a VirtualBox Linux VM, and **10.0.2.15** shows up as the address of the Ethernet adapter when I run **ifconfig**. This IP seems to be the convention used by VirtualBox. If your setup is different, you'll need to update this IP address to match your environment and then update **build_docker_image.sh** and **install_anaconda.dockerfile**. The server's port number is set to **8888** for this example. Note that the IP and port numbers could be passed in as build arguments, but I've hard-coded them for brevity. -* Since the HTTP server is set to run in the background, stop the server near the end of the script with the **kill -9** command using an [elegant approach][10] I found: [code]`kill -9 `ps -ef | grep http.server | grep 8888 | awk '{print $2}'` -``` - * Note that this same **kill -9** is also used earlier in the script (before starting the HTTP server). In general, when I iterate on any build script that I might deliberately interrupt, this ensures a clean start of the HTTP server each time. - * In the [Dockerfile][11], there is a **RUN wget** instruction that downloads the Anaconda installer from the local HTTP server. It also deletes the installer file and cleans up after the installation. Most importantly, all these actions are performed within the same layer to keep the image size to a minimum: [code] # install Anaconda by downloading the installer via the local http server -ARG ANACONDA -RUN wget --no-proxy -O ~/anaconda.sh \ -    && /bin/bash ~/anaconda.sh -b -p /opt/conda \ -    && rm ~/anaconda.sh \ -    && rm -fr /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/* -``` - * This file runs the wrapper script, **anaconda.sh**, and cleans up large files by removing them with **rm**. - * After the build is complete, you should see an image **anaconda_ubuntu1804:v1**. (You can list the images with **docker image ls**.) - * You can instantiate a container from this image using **./run_container.sh** at the terminal while in the folder **tutorial2_docker_tricks/**. You can verify that Anaconda is installed with: [code] $ ./run_container.sh -$ python --version -Python 3.7.5 -$ conda --version -conda 4.8.0 -$ anaconda --version -anaconda Command line client (version 1.7.2) -``` - * You'll note that **run_container.sh** sets up a volume **workdir**. In this example repository, the folder **workdir/** is empty. This is a convention I use to set up a volume where I can have my Python and other scripts that are independent of the container image. - - - -### Minimize container image size - -Each **RUN** command is equivalent to executing a new shell, and each **RUN** command creates a layer. The naive approach of mimicking installation instructions with separate **RUN** commands may eventually break at one or more interdependent steps. If it happens to work, it will typically result in a larger image. Chaining multiple installation steps in one **RUN** command and including the **autoremove**, **autoclean**, and **rm** commands (as in the example below) is useful to minimize the size of each layer. Some of these steps may not be needed, depending on what's being installed. However, since these steps take an insignificant amount of time, I always throw them in for good measure at the end of **RUN** commands invoking **apt-get**: - - -``` -RUN apt-get update \ -    && DEBIAN_FRONTEND=noninteractive \ -       apt-get -y --quiet --no-install-recommends install \ -       # list of packages being installed go here \ -    && apt-get -y autoremove \ -    && apt-get clean autoclean \ -    && rm -fr /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/* -``` - -Also, ensure that you have a **.dockerignore** file in place to ignore items that don't need to be sent to the Docker build context (such as the Anaconda installer file in the earlier example). - -### Organize the build tool I/O - -For software build systems, the build inputs and outputs—all the scripts that configure and invoke the tools—should be outside the image and the eventually running container. The container itself should remain stateless so that different users will have identical results with it. I covered this extensively in my [previous article][4] but wanted to emphasize it because it's been a useful convention for my work. These inputs and outputs are best accessed by setting up container volumes. - -I've had to use a container image that provides data in the form of source code and large pre-built binaries. As a software developer, I was expected to edit the code in the container. This was problematic, because containers are by default stateless: they don't save data within the container, because they're designed to be disposable. But I worked on it, and at the end of each day, I stopped the container and had to be careful not to remove it, because the state had to be maintained so I could continue work the next day. The disadvantage of this approach was that there would be a divergence of development state had there been more than one person working on the project. The value of having identical build systems across developers is somewhat lost with this approach. - -### Generate output as non-root user - -An important aspect of I/O concerns the ownership of the output files generated when running the tools in the container. By default, since Docker runs as **root**, the output files would be owned by **root**, which is unpleasant. You typically want to work as a non-root user. Changing the ownership after the build output is generated can be done with scripts, but it is an additional and unnecessary step. It's best to set the [**USER**][12] argument in the Dockerfile at the earliest point possible: - - -``` -ARG USERNAME -# other commands... -USER ${USERNAME} -``` - -The **USERNAME** can be passed in as a build argument (**\--build-arg**) when executing the **docker image build**. You can see an example of this in the example [Dockerfile][11] and corresponding [build script][13]. - -Some portions of the tools may also need to be installed as a non-root user. So the sequence of installations in the Dockerfile may need to be different from the way it's done if you are installing manually and directly under Linux. - -### Non-interactive installation - -Interactivity is the opposite of container automation. I've found the - - -``` -`DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends` -``` - -options for the **apt-get install** instruction (as in the example above) necessary to prevent the installer from opening dialog boxes. Note that these options should be used as part of the **RUN** instruction. The **DEBIAN_FRONTEND=noninteractive** should not be set as an environment variable (**ENV**) in the Dockerfile, as this [FAQ explains][14], as it will be inherited by the containers. - -### Log your build and run output - -Debugging why a build failed is a common task, and logs are a great way to do this. Save a TypeScript of everything that happened during the container image build or container run session using the **tee** utility in a Bash script. In other words, add **|& tee $BASH_SOURCE.log** to the end of the **docker image build** and the **docker image run** commands in your scripts. See the examples in the [image build][13] and [container run][15] scripts. - -What this **tee**-ing technique does is generate a file with the same name as the Bash script but with a **.log** extension appended to it so that you know which script it originated from. Everything you see printed to the terminal when running the script will get logged to this file with a similar name. - -This is especially valuable for users of your container images to report issues to you when something doesn't work. You can ask them to send you the log file to help diagnose the issue. Many tools generate so much output that it easily overwhelms the default size of the terminal's buffer. Relying only on the terminal's buffer capacity to copy-paste error messages may not be sufficient for diagnosing issues because earlier errors may have been lost. - -I've found this to be useful, even in the container image-building scripts, especially when using the Python-based HTTP server discussed above. The server generates so many lines during a download that it typically overwhelms the terminal's buffer. - -### Deal with proxies elegantly - -In my work environment, proxies are required to reach the internet for downloading the resources in **RUN apt-get** and **RUN wget** commands. The proxies are typically inferred from the environment variables **http_proxy** or **https_proxy**. While **ENV** commands can be used to hard-code such proxy settings in the Dockerfile, there are multiple issues with using **ENV** for proxies directly. - -If you are the only one who will ever build the container, then perhaps this will work. But the Dockerfile couldn't be used by someone else at a different location with a different proxy setting. Another issue is that the IT department could change the proxy at some point, resulting in a Dockerfile that won't work any longer. Furthermore, the Dockerfile is a precise document specifying a configuration-controlled system, and every change will be scrutinized by quality assurance. - -One simple approach to avoid hard-coding the proxy is to pass your local proxy setting as a build argument in the **docker image build** command: - - -``` -docker image build \ -    --build-arg MY_PROXY= -``` - -And then, in the Dockerfile, set the environment variables based on the build argument. In the example shown here, you can still set a default proxy value that can be overridden by the build argument above: - - -``` -# set a default proxy -ARG MY_PROXY=MY_PROXY= -ENV http_proxy=$MY_PROXY -ENV https_proxy=$MY_PROXY -``` - -### Summary - -These techniques have helped me significantly reduce the time it takes to create container images and debug them when they go wrong. I continue to be on the lookout for additional best practices to add to my list. I hope you find the above techniques useful. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/optimize-container-builds - -作者:[Ravi Chandran][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ravichandran -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/toolbox-learn-draw-container-yearbook.png?itok=xDbwz1pP (Toolbox drawing of a container) -[2]: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/ -[3]: https://github.com/ravi-chandran/dockerize-tutorial -[4]: https://opensource.com/article/20/4/how-containerize-build-system -[5]: https://podman.io/getting-started/installation -[6]: https://docs.docker.com/develop/develop-images/multistage-build/ -[7]: https://github.com/ravi-chandran/dockerize-tutorial/blob/master/tutorial2_docker_tricks/ -[8]: https://github.com/ravi-chandran/dockerize-tutorial/ -[9]: https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh -[10]: https://stackoverflow.com/a/37214138 -[11]: https://github.com/ravi-chandran/dockerize-tutorial/blob/master/tutorial2_docker_tricks/install_anaconda.dockerfile -[12]: https://docs.docker.com/engine/reference/builder/#user -[13]: https://github.com/ravi-chandran/dockerize-tutorial/blob/master/tutorial2_docker_tricks/build_docker_image.sh -[14]: https://docs.docker.com/engine/faq/ -[15]: https://github.com/ravi-chandran/dockerize-tutorial/blob/master/tutorial2_docker_tricks/run_container.sh diff --git a/sources/tech/20200515 How to examine processes running on Linux.md b/sources/tech/20200515 How to examine processes running on Linux.md deleted file mode 100644 index 0659ab04f9..0000000000 --- a/sources/tech/20200515 How to examine processes running on Linux.md +++ /dev/null @@ -1,232 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to examine processes running on Linux) -[#]: via: (https://www.networkworld.com/article/3543232/how-to-examine-processes-running-on-linux.html) -[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) - -How to examine processes running on Linux -====== - -Thinkstock - -There are quite a number of ways to look at running processes on Linux systems – to see what’s running, the resources that processes are using, how the system is affected by the load and how memory is being used. Each command gives you a different view, and the range of details is considerable. In this post, we’ll run through a series of commands that can help you view process details in a number of different ways. - -### ps - -While the **ps** command is the most obvious command for examining processes, the arguments that you use when running **ps** will make a big difference in how much information will be provided. With no arguments, **ps** will only show processes associated with your current login session. Add a **-u** and you'll see extended details. - -Here is a comparison: - -``` -nemo$ ps - PID TTY TIME CMD - 45867 pts/1 00:00:00 bash - 46140 pts/1 00:00:00 ps -nemo$ ps -u -USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND -nemo 45867 0.0 0.0 11232 5636 pts/1 Ss 19:04 0:00 -bash -nemo 46141 0.0 0.0 11700 3648 pts/1 R+ 19:16 0:00 ps -u -``` - -Using **ps -ef** will display details on all of the processes running on the system but **ps -eF** will add some additional details. - -``` -$ ps -ef | head -2 -UID PID PPID C STIME TTY TIME CMD -root 1 0 0 May10 ? 00:00:06 /sbin/init splash -$ ps -eF | head -2 -UID PID PPID C SZ RSS PSR STIME TTY TIME CMD -root 1 0 0 42108 12524 0 May10 ? 00:00:06 /sbin/init splash -``` - -Both commands show who is running the process, the process and parent process IDs, process start time, accumulated run time and the task being run. The additional fields shown when you use **F** instead of **f** include: - - * SZ: the process **size** in physical pages for the core image of the process - * RSS: the **resident set size** which shows how much memory is allocated to those parts of the process in RAM. It does not include memory that is swapped out, but does include memory from shared libraries as long as the pages from those libraries are currently in memory. It also includes stack and heap memory. - * PSR: the **processor** the process is using - - - -##### ps -fU - -You can list processes for some particular user with a command like "ps -ef | grep USERNAME", but with **ps -fU** command, you’re going to see considerably more data. This is because details of processes that are being run on the user's behalf are also included. In fact, nearly all these processes shown have been kicked off by system simply to support this user’s online session. Nemo has only just logged in and is not yet running any commands or scripts. - -``` -$ ps -fU nemo -UID PID PPID C STIME TTY TIME CMD -nemo 45726 1 0 19:04 ? 00:00:00 /lib/systemd/systemd --user -nemo 45732 45726 0 19:04 ? 00:00:00 (sd-pam) -nemo 45738 45726 0 19:04 ? 00:00:00 /usr/bin/pulseaudio --daemon -nemo 45740 45726 0 19:04 ? 00:00:00 /usr/libexec/tracker-miner-f -nemo 45754 45726 0 19:04 ? 00:00:00 /usr/bin/dbus-daemon --sessi -nemo 45829 45726 0 19:04 ? 00:00:00 /usr/libexec/gvfsd -nemo 45856 45726 0 19:04 ? 00:00:00 /usr/libexec/gvfsd-fuse /run -nemo 45862 45706 0 19:04 ? 00:00:00 sshd: nemo@pts/1 -nemo 45864 45726 0 19:04 ? 00:00:00 /usr/libexec/gvfs-udisks2-vo -nemo 45867 45862 0 19:04 pts/1 00:00:00 -bash -nemo 45878 45726 0 19:04 ? 00:00:00 /usr/libexec/gvfs-afc-volume -nemo 45883 45726 0 19:04 ? 00:00:00 /usr/libexec/gvfs-goa-volume -nemo 45887 45726 0 19:04 ? 00:00:00 /usr/libexec/goa-daemon -nemo 45895 45726 0 19:04 ? 00:00:00 /usr/libexec/gvfs-mtp-volume -nemo 45896 45726 0 19:04 ? 00:00:00 /usr/libexec/goa-identity-se -nemo 45903 45726 0 19:04 ? 00:00:00 /usr/libexec/gvfs-gphoto2-vo -nemo 45946 45726 0 19:04 ? 00:00:00 /usr/libexec/gvfsd-metadata -``` - -Note that the only process with an assigned TTY is Nemo's shell and that the parent of all of the other processes is **systemd**. - -You can supply a comma-separated list of usernames instead of a single name. Just be prepared to be looking at quite a bit more data. - -#### top and ntop - -The **top** and **ntop** commands will help when you want to get an idea which processes are using the most resources and allow you to reorder your view depending on what criteria you want to use to rank the processes (e.g., highest CPU or memory use). - -``` -top - 11:51:27 up 1 day, 21:40, 1 user, load average: 0.08, 0.02, 0.01 -Tasks: 211 total, 1 running, 210 sleeping, 0 stopped, 0 zombie -%Cpu(s): 5.0 us, 0.5 sy, 0.0 ni, 94.3 id, 0.2 wa, 0.0 hi, 0.0 si, 0.0 st -MiB Mem : 5944.4 total, 3527.4 free, 565.1 used, 1851.9 buff/cache -MiB Swap: 2048.0 total, 2048.0 free, 0.0 used. 5084.3 avail Mem - - PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND - 999 root 20 0 394660 14380 10912 S 8.0 0.2 0:46.54 udisksd - 65224 shs 20 0 314268 9824 8084 S 1.7 0.2 0:00.34 gvfs-ud+ - 2034 gdm 20 0 314264 9820 7992 S 1.3 0.2 0:06.25 gvfs-ud+ - 67909 root 20 0 0 0 0 I 0.3 0.0 0:00.09 kworker+ - 1 root 20 0 168432 12532 8564 S 0.0 0.2 0:09.93 systemd - 2 root 20 0 0 0 0 S 0.0 0.0 0:00.02 kthreadd -``` - -Use **shift+m** to sort by memory use and **shift+p** to go back to sorting by CPU usage (the default). - -#### /proc - -A tremendous amount of information is available on running processes in the **/proc** directory. In fact, if you haven't visited **/proc** quite a few times, you might be astounded by the amount of details available. Just keep in mind that **/proc** is a very different kind of file system. As an interface to kernel data, it provides a view of process details that are currently being used by the system. - -Some of the more useful **/proc** files for viewing include **cmdline**, **environ**, **fd**, **limits** and **status**. The following views provide some samples of what you might see. - -The **status** file shows the process that is running (bash), its status, the user and group ID for the person running bash, a full list of the groups the user is a member of and the process ID and parent process ID. - -``` -$ head -11 /proc/65333/status -Name: bash -Umask: 0002 -State: S (sleeping) -Tgid: 65333 -Ngid: 0 -Pid: 65333 -PPid: 65320 -TracerPid: 0 -Uid: 1000 1000 1000 1000 -Gid: 1000 1000 1000 1000 -FDSize: 256 -Groups: 4 11 24 27 30 46 118 128 500 1000 -... -``` - -The **cmdline** file shows the command line used to start the process. - -``` -$ cat /proc/65333/cmdline --bash -``` - -The **environ** file shows the environment variables that are in effect. - -``` -$ cat environ -USER=shsLOGNAME=shsHOME=/home/shsPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/gamesSHELL=/bin/bashTERM=xtermXDG_SESSION_ID=626XDG_RUNTIME_DIR=/run/user/1000DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/busXDG_SESSION_TYPE=ttyXDG_SESSION_CLASS=userMOTD_SHOWN=pamLANG=en_US.UTF-8SSH_CLIENT=192.168.0.19 9385 22SSH_CONNECTION=192.168.0.19 9385 192.168.0.11 22SSH_TTY=/dev/pts/0$ -``` - -The **fd** file shows the file descriptors. Note how they reflect the pseudo-tty that is being used (pts/0). - -``` -$ ls -l /proc/65333/fd -total 0 -lrwx------ 1 shs shs 64 May 12 09:45 0 -> /dev/pts/0 -lrwx------ 1 shs shs 64 May 12 09:45 1 -> /dev/pts/0 -lrwx------ 1 shs shs 64 May 12 09:45 2 -> /dev/pts/0 -lrwx------ 1 shs shs 64 May 12 09:56 255 -> /dev/pts/0 -$ who -shs pts/0 2020-05-12 09:45 (192.168.0.19) -``` - -The **limits** file contains information about the limits imposed on the process. - -``` -$ cat limits -Limit Soft Limit Hard Limit Units -Max cpu time unlimited unlimited seconds -Max file size unlimited unlimited bytes -Max data size unlimited unlimited bytes -Max stack size 8388608 unlimited bytes -Max core file size 0 unlimited bytes -Max resident set unlimited unlimited bytes -Max processes 23554 23554 processes -Max open files 1024 1048576 files -Max locked memory 67108864 67108864 bytes -Max address space unlimited unlimited bytes -Max file locks unlimited unlimited locks -Max pending signals 23554 23554 signals -Max msgqueue size 819200 819200 bytes -Max nice priority 0 0 -Max realtime priority 0 0 -Max realtime timeout unlimited unlimited us -``` - -#### pmap - -The **pmap** command takes you in an entirely different direction when it comes to memory use. It provides a detailed map of a process’s memory usage. To make sense of this, you need to keep in mind that processes do not run entirely on their own. Instead, they make use of a wide range of system resources. The truncated **pmap** output below shows a portion of the memory map for a single user’s bash login along with some memory usage totals at the bottom. - -``` -$ pmap -x 43120 -43120: -bash -Address Kbytes RSS Dirty Mode Mapping -000055887655b000 180 180 0 r---- bash -0000558876588000 708 708 0 r-x-- bash -0000558876639000 220 148 0 r---- bash -0000558876670000 16 16 16 r---- bash -0000558876674000 36 36 36 rw--- bash -000055887667d000 40 28 28 rw--- [ anon ] -0000558876b96000 1328 1312 1312 rw--- [ anon ] -00007f0bd9a7e000 28 28 0 r---- libpthread-2.31.so -00007f0bd9a85000 68 68 0 r-x-- libpthread-2.31.so -00007f0bd9a96000 20 0 0 r---- libpthread-2.31.so -00007f0bd9a9b000 4 4 4 r---- libpthread-2.31.so -00007f0bd9a9c000 4 4 4 rw--- libpthread-2.31.so -00007f0bd9a9d000 16 4 4 rw--- [ anon ] -00007f0bd9aa1000 20 20 0 r---- libnss_systemd.so.2 -00007f0bd9aa6000 148 148 0 r-x-- libnss_systemd.so.2 -... -ffffffffff600000 4 0 0 --x-- [ anon ] ----------------- ------- ------- ------- -total kB 11368 5664 1656 - -Kbytes: size of map in kilobytes -RSS: resident set size in kilobytes -Dirty: dirty pages (both shared and private) in kilobytes -``` -``` - -``` - -Join the Network World communities on [Facebook][1] and [LinkedIn][2] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3543232/how-to-examine-processes-running-on-linux.html - -作者:[Sandra Henry-Stocker][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/ -[b]: https://github.com/lujun9972 -[1]: https://www.facebook.com/NetworkWorld/ -[2]: https://www.linkedin.com/company/network-world diff --git a/sources/tech/20200522 Fast data modeling with JavaScript.md b/sources/tech/20200522 Fast data modeling with JavaScript.md deleted file mode 100644 index 9c565d6e90..0000000000 --- a/sources/tech/20200522 Fast data modeling with JavaScript.md +++ /dev/null @@ -1,452 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Fast data modeling with JavaScript) -[#]: via: (https://opensource.com/article/20/5/data-modeling-javascript) -[#]: author: (Szymon https://opensource.com/users/schodevio) - -Fast data modeling with JavaScript -====== -This tutorial showcases a method to model data in just a few minutes. -![Analytics: Charts and Graphs][1] - -As a backend developer at the [Railwaymen][2], a software house in Kraków, Poland, some of my tasks rely on models that manipulate and customize data retrieved from a database. When I wanted to improve my skills in frontend frameworks, I [chose Vue][3], and I thought it would be good to have a similar way to model data in a store. I started with some libraries that I found through [NPM][4], but they offered many more features than I needed. - -So I decided to build my own solution, and I was very surprised that the base took less than 15 lines of code and is very flexible. I implemented this solution in an open source application which I developed and called [Evally][5] - a web app that helps businesses keep track of their employees' performance reviews and professional development. It reminds managers or HR representatives about employees' upcoming evaluations and gathers all of the data needed to assess their performance in the fairest way. - -### Model and list - -The only things you need to do are to create a class and use the defaultsDeep function in the [Lodash][6] JavaScript library: - - -``` -`_.defaultsDeep(object, [sources])` -``` - -Arguments: - - * `object (Object)`: The destination object - * `[sources] (...Object)`: The source objects - - - -Returns: - - * `(Object)`: Returns object - - - -This helper function: [Lodash Docs][7] - -> "Assigns recursively own and inherited enumerable string keyed properties of source objects to the destination object for all destination properties that resolve to undefined. Source objects are applied from left to right. Once a property is set, additional values of the same property are ignored." - -For example: - - -``` -_.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }) - // => { 'a': { 'b': 2, 'c': 3 } } -``` - -That's all! To try it out, create a file called **base.js** and import the defaultsDeep function from the Lodash package: - - -``` - // base.js - import defaultsDeep from "lodash/defaultsDeep"; -``` - -Next, create and export the Model class, where constructor will use the Lodash helper function to assign values to all passed attributes and initialize the attributes that were not received with default values: - - -``` - // base.js - // ... - - export class Model { -   constructor(attributes = {}) { -     defaultsDeep(this, attributes, this.defaults); -   } - } -``` - -Now, create your first real model, Employee, with attributes for firstName, lastName, position and hiredAt where "position" defines "Programmer" as the default value: - - -``` - // employee.js - import { Model } from "./base.js"; - - export class Employee extends Model { -   get defaults() { -     return { -       firstName: "", -       lastName: "", -       position: "Programmer", -       hiredAt: "" -     }; -   } - } -``` - -Next, begin creating employees: - - -``` -// app.js - import { Employee } from "./employee.js"; - - const programmer = new Employee({ -   firstName: "Will", -   lastName: "Smith" - }); - - // => Employee { - //   firstName: "Will", - //   lastName: "Smith", - //   position: "Programmer", - //   hiredAt: "", - //   constructor: Object - // } - - const techLeader = new Employee({ -   firstName: "Charles", -   lastName: "Bartowski", -   position: "Tech Leader" - }); - - // => Employee { - //   firstName: "Charles", - //   lastName: "Bartowski", - //   position: "Tech Leader", - //   hiredAt: "", - //   constructor: Object - // } -``` - -You have two employees, and the first one's position is assigned from the defaults. Here's how multiple employees can be defined: - - -``` - // base.js - - // ... - - export class List { -   constructor(items = []) { -     this.models = items.map(item => new this.model(item)); -   } - } - -[/code] [code] - - // employee.js - import { Model, List } from "./base.js"; - - // … - - export class EmployeesList extends List { -   get model() { -     return Employee; -   } - } -``` - -The List class constructor maps an array of received items into an array of desired models. The only requirement is to provide a correct model class name: - - -``` - // app.js - import { Employee, EmployeesList } from "./employee.js"; - - // … - - const employees = new EmployeesList([ -   { -     firstName: "Will", -     lastName: "Smith" -   }, -   { -     firstName: "Charles", -     lastName: "Bartowski", -     position: "Tech Leader" -   } - ]); - - // => EmployeesList {models: Array[2], constructor: Object} - //  models: Array[2] - //   0: Employee - //     firstName: "Will" - //     lastName: "Smith" - //     position: "Programmer" - //     hiredAt: "" - //     <constructor>: "Employee" - //   1: Employee - //     firstName: "Charles" - //     lastName: "Bartowski" - //     position: "Tech Leader" - //     hiredAt: "" - //     <constructor>: "Employee" - //   <constructor>: "EmployeesList" -``` - -### Ways to use this approach - -This simple solution allows you to keep your data structure in one place and avoid code repetition. The [DRY][8] principle rocks! You can also customize your models as needed, such as in the following examples. - -#### Custom getters - -Do you need one attribute to be dependent on the others? No problem; you can do this by improving your Employee model: - - -``` -// employee.js - import { Model } from "./base.js"; - - export class Employee extends Model { -   get defaults() { -     return { -       firstName: "", -       lastName: "", -       position: "Programmer", -       hiredAt: "" -     }; -   } - -   get fullName() { -     return [this.firstName, this.lastName].join(' ') -   } - - } - -[/code] [code] - -// app.js - import { Employee, EmployeesList } from "./employee.js"; - - // … - - console.log(techLeader.fullName); - // => Charles Bartowski -``` - -Now you don't have to repeat the code to do something as simple as displaying the employee's full name. - -#### Date formatting - -Model is a good place to define other formats for given attributes. The best examples are dates: - - -``` -// employee.js - import { Model } from "./base.js"; - import moment from 'moment'; - - export class Employee extends Model { -   get defaults() { -     return { -       firstName: "", -       lastName: "", -       position: "Programmer", -       hiredAt: "" -     }; -   } - -   get formattedHiredDate() { -     if (!this.hiredAt) return "---"; - -     return moment(this.hiredAt).format('MMMM DD, YYYY'); -   } - } - -[/code] [code] - -// app.js - import { Employee, EmployeesList } from "./employee.js"; - - // … - - techLeader.hiredAt = "2020-05-01"; - - console.log(techLeader.formattedHiredDate); - // => May 01, 2020 -``` - -Another case related to dates (which I discovered developing the Evally app) is the ability to operate with different date formats. Here's an example that uses datepicker: - - 1. All employees fetched from the database have the hiredAt date in the format: -YEAR-MONTH-DAY, e.g., 2020-05-01 - 2. You need to display the hiredAt date in a more friendly format: -MONTH DAY, YEAR, e.g., May 01, 2020 - 3. A datepicker uses the format: -DAY-MONTH-YEAR, e.g., 01-05-2020 - - - -Resolve this issue with: - - -``` -// employee.js - import { Model } from "./base.js"; - import moment from 'moment'; - - export class Employee extends Model { - -   // … - -   get formattedHiredDate() { -     if (!this.hiredAt) return "---"; - -     return moment(this.hiredAt).format('MMMM DD, YYYY'); -   } - -   get hiredDate() { -     return ( -       this.hiredAt -         ? moment(this.hiredAt).format('DD-MM-YYYY') -         : '' -     ); -   } - -   set hiredDate(date) { -     const mDate = moment(date, 'DD-MM-YYYY'); -  -     this.hiredAt = ( -       mDate.isValid() -         ? mDate.format('YYYY-MM-DD') -         : '' -     ); -   } - } -``` - -This adds getter and setter functions to handle datepicker's functionality. - - -``` - // Get date from server - techLeader.hiredAt = '2020-05-01'; - console.log(techLeader.formattedHiredDate); - // => May 01, 2020 - - // Datepicker gets date - console.log(techLeader.hiredDate); - // => 01-05-2020 - - // Datepicker sets new date - techLeader.hiredDate = '15-06-2020'; - - // Display new date - console.log(techLeader.formattedHiredDate); - // => June 15, 2020 -``` - -This makes it very simple to manage multiple date formats. - -#### Storage for model-related information - -Another use for a model class is storing general information related to the model, like paths for routing: - - -``` -// employee.js - import { Model } from "./base.js"; - import moment from 'moment'; - - export class Employee extends Model { - -   // … - -   static get routes() { -     return { -       employeesPath: '/api/v1/employees', -       employeePath: id => `/api/v1/employees/${id}` -     } -   } - - } - -[/code] [code] - - // Path for POST requests - console.log(Employee.routes.employeesPath) - - // Path for GET request - console.log(Employee.routes.employeePath(1)) -``` - -### Customize the list of models - -Don't forget about the List class, which you can customize as needed: - - -``` -// employee.js - import { Model, List } from "./base.js"; - - // … - - export class EmployeesList extends List { -   get model() { -     return Employee; -   } - -   findByFirstName(val) { -     return this.models.find(item => item.firstName === val); -   } - -   filterByPosition(val) { -     return this.models.filter(item => item.position === val); -   } - } - -[/code] [code] - - console.log(employees.findByFirstName('Will')) - // => Employee { - //   firstName: "Will", - //   lastName: "Smith", - //   position: "Programmer", - //   hiredAt: "", - //   constructor: Object - // } - - console.log(employees.filterByPosition('Tech Leader')) - // => [Employee] - //     0: Employee - //       firstName: "Charles" - //       lastName: "Bartowski" - //       position: "Tech Leader" - //       hiredAt: "" - //       <constructor>: "Employee" -``` - -### Summary - -This simple structure for data modeling in JavaScript should save you some development time. You can add new functions whenever you need them to keep your code cleaner and easier to maintain. All of this code is available in my [CodeSandbox][9], so try it out and let me know how it goes by leaving a comment below. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/data-modeling-javascript - -作者:[Szymon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/schodevio -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/analytics-graphs-charts.png?itok=sersoqbV (Analytics: Charts and Graphs) -[2]: https://railwaymen.org/ -[3]: https://blog.railwaymen.org/vue-vs-react-which-one-is-better-for-your-app-similarities-differences -[4]: https://www.npmjs.com/ -[5]: https://github.com/railwaymen/evally -[6]: https://lodash.com/ -[7]: https://lodash.com/docs/4.17.15 -[8]: https://en.wikipedia.org/wiki/Don%27t_repeat_yourself -[9]: https://codesandbox.io/s/02jsdatamodels-1mhtb diff --git a/sources/tech/20200528 4 Linux distributions for gaming.md b/sources/tech/20200528 4 Linux distributions for gaming.md deleted file mode 100644 index 2453d9c6a8..0000000000 --- a/sources/tech/20200528 4 Linux distributions for gaming.md +++ /dev/null @@ -1,97 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (4 Linux distributions for gaming) -[#]: via: (https://opensource.com/article/20/5/linux-gaming) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -4 Linux distributions for gaming -====== -Linux offers plenty of great options for a work/play combo or a full -gaming console setup. Take our poll to tell us your favorite. -![Gaming with penguin pawns][1] - -Gaming on Linux got a thorough kickstart in 2013 when Valve announced that their own SteamOS would be written on top of Linux. Since then, Linux users could realistically expect to play high-grade games that, in the past, required the purchase of a Windows computer or gaming console. The experience got off to a modest start, with just a few brave companies like CD Projekt Red, Deep Silver, Valve itself, and others putting the Linux penguin icon in their compatibility list, but eventually, even Gearbox and Square Enix were releasing their biggest titles on Linux. Today, [Valve's Proton project][2] helps ensure that even titles with no formal Linux release still work on SteamOS and other Linux distributions. - -Valve didn't singlehandedly drag gaming into Linux, though. Well before Valve's initiative, there have been excellent independent games, blockbusters from id Software, and open source [gaming emulators][3] for Linux. Whether you want to play the latest releases or you want to relive classics from gaming history, Linux provides the only open source platform for your game rig. Here's an overview of what you might consider running on it. - -### SteamOS - -![Steam OS][4] - -If you're looking for the full gaming PC experience—in which there's no difference between your desktop computer and a game console—then SteamOS is the obvious choice. On the one hand, there's nothing particularly special about SteamOS; it's essentially just [Debian Linux][5] with Steam set as the default startup application. When you boot your computer, Steam starts automatically, and you can interact with it using only your [Steam controller][6] or any [Xbox-style gamepad][7]. You can create the same configuration by installing Steam on any distribution and setting its "Big Picture mode" as a startup item. - -However, SteamOS is ultimately specific to its purpose as a game console. While you can treat SteamOS as a normal desktop, the design choices of the distribution make it clear that it's intended as the frontend to a dedicated gaming machine. This isn't the distribution you're likely to use for your daily office or schoolwork. It's the "firmware" (except it's actually software) of a gaming console, first and foremost. When you're looking for a seamless, reliable, self-maintaining game console, build the machine of your dreams and install SteamOS. - -### Lakka - -![Lakka OS][8] - -Similar in spirit to SteamOS, Lakka recreates the Playstation 3 interface, but for retro gaming. I installed Lakka on a Raspberry Pi Rev 1 using [Etcher][9] and was pleasantly surprised to find it ready for gaming upon bootup. Lakka loads to an interface that's eerily familiar to PS3 gamers, and, like a Playstation, you can control everything using just a [game controller][10]. - -Lakka focuses on retro gaming, meaning that, instead of Steam, it provides game emulators for old systems and engines. Provided you have ROM images, you can use the emulators to play games from Nintendo, Sega Genesis, Dreamcast, N64, or homebrew titles like [POWDER][11], [Warcraft Tower Defense][12], and others. - -Lakka doesn't ship with any games, but it makes it easy for you to add games over SSH or Samba shares. Even if you've never used SSH or set up Samba (you've probably used it without knowing it), Lakka makes it easy to find your retro gaming system over your own network, so you can add games to it using whatever OS you have handy. - -### Pop_OS! - -![PopOS][13] - -Not everyone is trying to build a game console—modern, retro, or otherwise. Sometimes, all you really want is a good computer with the ability to run games at top performance. [System76][14] maintains a desktop they call Pop_OS!, designed around the standard GNOME desktop with some custom additions. Pop_OS! doesn't do much by way of innovation, but it makes an impact in the way its designers maintain convenient defaults. For gamers, this includes easy access to Steam, Proton, WINE, game emulators, PlayOnLinux, automatic game controller recognition and configuration, and more. It's not far from its Ubuntu roots, but it has been refined just enough to make a noticeable difference. - -When you're not playing games, Pop_OS! is also a wonderful productivity-focused desktop. It uses all of GNOME's built-in conveniences (such as the quick Activities menu overlay) to maximize efficiency, and adds useful modifications to bring the desktop closer to the universal expectation that's grown from decades of traditions founded in KDE Plasma, Finder, and Explorer. Pop_OS! is an intuitive and understated environment that helps you focus on whatever you're working on, until you break out the gaming gear, and then it makes sure you spend your time on entertainment instead of configuration. - -### Drauger OS - -![Drauger OS][15] - -Situated somewhere between a dedicated gaming console and a plain old desktop is Drauger OS, with a simple interface designed to stay out of your way while also making it quick and easy to access the game applications you need. Drauger is still a young project, but it represents an interesting philosophy of computing and gaming—conserve every last resource for the task at hand. To that end, Drauger OS does away with the concept of a traditional desktop and instead provides a simplified control panel that lets you launch your game client (such as Steam, PlayOnLinux, Lutris, and so on), and configure services (such as your network) or launch an application. It's a little disorienting at first, especially because the control panel is designed to more or less disappear when in the background, but after an afternoon of interaction, you realize that the complexity of a full desktop is mostly unnecessary. The point of any computer is rarely its desktop. What you really care about is getting into an application as quickly and easily as possible, and then for that application to perform well. - -The other side of this equation is performance. While having a drastically simplified desktop helps, Drauger OS attempts to maximize game performance by using a low-latency kernel. A kernel is the part of your operating system that communicates with external devices, such as game controllers and mice and keyboards, and even hard drives, memory, and video cards. An all-purpose kernel, such as the one that ships with most Linux distributions, gives more or less equal attention to all processes. A low-latency kernel can favor specific processes, including video and graphics, to ensure that calculations performed for important tasks are returned promptly, while mundane system tasks are assigned less importance. Drauger's Linux kernel is tuned for performance, so your games get top priority over all other processes. - -### The Linux of your choice - -![Pantheon OS][16] - -Looking past the self-declared focal points of individual "gaming distributions," one Linux is ultimately essentially the same as the next Linux. Amazingly, I play games even on my RHEL laptop, a distribution famous for its enterprise IT support, thanks to the [Flatpak Steam installer][17]. If you want to game on Linux in this decade, your question isn't how to do it but which system to use. - -The easiest answer to which Linux to use is, ultimately, to choose whatever Linux works best on your hardware. When you find a Linux distribution that boots and recognizes your computer hardware, your game controllers, and lets you play your games. Once you find that, install the games of your choice and get busy playing. - -There are more great Linux distributions for gaming out there, including the [Fedora Games Spin][18], [RetroPie][19], [Clear Linux][20], [Manjaro][21], and so many more. What's your favorite? Tell us in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/linux-gaming - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gaming_grid_penguin.png?itok=7Fv83mHR (Gaming with penguin pawns) -[2]: https://github.com/ValveSoftware/Proton -[3]: https://opensource.com/article/18/10/lutris-open-gaming-platform -[4]: https://opensource.com/sites/default/files/uploads/screenshot_from_2020-05-15_15-53-15_0.png (Steam OS) -[5]: http://debian.org -[6]: https://store.steampowered.com/app/353370/Steam_Controller/ -[7]: https://www.logitechg.com/en-nz/products/gamepads/f710-wireless-gamepad.940-000119.html -[8]: https://opensource.com/sites/default/files/uploads/os-lakka_0.png (Lakka OS) -[9]: https://www.balena.io/etcher/ -[10]: https://www.logitechg.com/en-nz/products/gamepads/f310-gamepad.940-000112.html -[11]: http://www.zincland.com/powder/index.php?pagename=about -[12]: https://ndswtd.wordpress.com/ -[13]: https://opensource.com/sites/default/files/uploads/os-pop_os_0.jpg (PopOS) -[14]: https://system76.com/ -[15]: https://opensource.com/sites/default/files/uploads/os-drauger_0.jpg (Drauger OS) -[16]: https://opensource.com/sites/default/files/uploads/os-pantheon_0.jpg (Pantheon OS) -[17]: https://flathub.org/apps/details/com.valvesoftware.Steam -[18]: https://labs.fedoraproject.org/en/games/ -[19]: https://retropie.org.uk/ -[20]: https://clearlinux.org/software/bundle/games -[21]: http://manjaro.org diff --git a/sources/tech/20200528 Getting Started With Nano Text Editor -Beginner-s Guide.md b/sources/tech/20200528 Getting Started With Nano Text Editor -Beginner-s Guide.md deleted file mode 100644 index 90874df3e9..0000000000 --- a/sources/tech/20200528 Getting Started With Nano Text Editor -Beginner-s Guide.md +++ /dev/null @@ -1,246 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Getting Started With Nano Text Editor [Beginner’s Guide]) -[#]: via: (https://itsfoss.com/nano-editor-guide/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -Getting Started With Nano Text Editor [Beginner’s Guide] -====== - -[Nano][1] is the default [terminal-based text editor][2] in Ubuntu and many other Linux distributions. Though it is less complicated to use than the likes of [Vim][3] and [Emacs][4], it doesn’t mean Nano cannot be overwhelming to use. - -In this beginner’s guide, I’ll show you how to use the Nano text editor. I am also going to include a downloadable PDF cheat sheet at the end of the article so that you can refer to it for practicing and mastering Nano editor commands. - -If you are just interested in a quick summary of Nano keyboard shortcuts, please expand the next section. - -Essential Nano keyboard shortcuts (click to expand) - -**Shortcut** | **Description** ----|--- -nano filename | Open file for editing in Nano -Arrow keys | Move cursor up, down, left and right -Ctrl+A, Ctrl+E | Move cursor to start and end of the line -Ctrl+Y/Ctrl+V | Move page up and down -Ctrl+_ | Move cursor to a certain location -Alt+A and then use arrow key | Set a marker and select text -Alt+6 | Copy the selected text -Ctrl+K | Cut the selected text -Ctrl+U | Paste the selected text -Ctrl+6 | Cancel the selection -Ctrl+K | Cut/delete entire line -Alt+U | Undo last action -Alt+E | Redo last action -Ctrl+W, Alt+W | Search for text, move to next match -Ctrl+\ | Search and replace -Ctrl+O | Save the modification -Ctrl+X | Exit the editor - -### How to use Nano text editor - -![][5] - -I presume that you have Nano editor installed on your system already. If not, please your distribution’s package manager to install it. - -#### Getting familiar with the Nano editor interface - -If you’ve ever [used Vim][6] or Emacs, you’ll notice that using Nano is a lot simpler. You can start writing or editing text straightaway. - -Nano editor also shows important keyboard shortcuts you need to use for editing at the bottom of the editor. This way you won’t get stuck at [exiting the editor like Vim][7]. - -The wider your terminal window, the more shortcuts it shows. - -![Nano Editor Interface][8] - -You should get familiar with the symbols in Nano. - - * The caret symbol (^) means Ctrl key - * The M character mean the Alt key - - - -When it says “^X Exit”, it means to use Ctrl+X keys to exit the editor. When it says “M-U Undo”, it means use Alt+U key to undo your last action. - -#### Open or create a file for editing in Nano - -You can open a file for editing in Nano like this: - -``` -nano my_file -``` - -If the file doesn’t exist, it will still open the editor and when you exit, you’ll have the option for saving the text to my_file. - -You may also open a new file without any name (like new document) with Nano like this: - -``` -nano -``` - -#### Basic editing - -You can start writing or modifying the text straightaway in Nano. There are no special insert mode or anything of that sort. It is almost like using a regular text editor, at least for writing and editing. - -As soon as you modify anything in the file, you’ll notice that it reflects this information on the editor. - -![][9] - -Nothing is saved immediately to the file automatically unless you explicitly do so. When you exit the editor using Ctrl+X keyboard shortcut, you’ll be asked whether you want to save your modified text to the file or not. - -#### Moving around in the editor - -Mouse click doesn’t work here. Use the arrow keys to move up and down, left and right. - -You can use the Home key or Ctrl+A to move to the beginning of a line and End key or Ctrl+E to move to the end of a line. Ctrl+Y/Page Up and Ctrl+V/Page Down keys can be used to scroll by pages. - -If you want to go a specific location like last line, first line, to a certain text, use Ctrl+_ key combination. This will show you some options you can use at the bottom of the editor. - -![Jump to a specific line in Nano][10] - -#### Cut, copy and paste in Nano editor - -If you don’t want to spend too much time remembering the shortcuts, use mouse. - -Select a text with mouse and then use the right click menu to copy the text. You may also use the Ctrl+Shift+C [keyboard shortcut in Ubuntu][11] terminal. Similarly, you can use the right click and select paste from the menu or use the Ctrl+Shift+V key combination. - -**Nano specific shortcuts for copy and pasting** - -Nano also provides its own shortcuts for cutting and pasting text but that could become confusing for beginners. - -Move your cursor to the beginning of the text you want to copy. Press Alt+A to set a marker. Now use the arrow keys to highlight the selection. Once you have selected the desired text, you can Alt+6 key to copy the selected text or use Ctrl+K to cut the selected text. Use Ctrl+6 to cancel the selection. - -Once you have copied or cut the selected text, you can use Ctrl+U to paste it. - -![][12] - -#### Delete text or lines in Nano - -There is no dedicated option for deletion in Nano. You may use the Backspace or Delete key to delete one character at a time. Press them repeatedly or hold them to delete multiple characters. - -You can also use the Ctrl+K keys that cuts the entire line. If you don’t paste it anywhere, it’s as good as deleting a line. - -If you want to delete multiple lines, you may use Ctrl+K on all of them one by one. - -Another option is to use the marker (Ctrl+a). Set the marker and move the arrow to select a portion of text. Use Ctrl+K to cut the text. No need to paste it and the selected text will be deleted (in a way). - -#### Undo or redo your last action - -Cut the wrong line? Pasted the wrong text selection? It’s easy to make such silly mistakes and it’s easy to correct those silly mistakes. - -You can undo and redo your last actions using: - - * Alt+U : Undo - * Alt +E : Redo - - - -You can repeat these key combinations to undo or redo multiple times. - -#### Search and replace - -If you want to search for a certain text, use Ctrl+W and then enter the term you want to search and press enter. The cursor will move to the first match. To go to the next match, use Alt+W keys. - -![][13] - -By default, the search is case-insensitive. You can also use regex for the search terms. - -If you want to replace the searched term, use Ctr+\ keys and then enter the search term and press enter key. Next it will ask for the term you want to replace the searched items with. - -![][14] - -The cursor will move to the first match and Nano will ask for your conformation for replacing the matched text. Use Y or N to confirm or deny respectively. Using either of Y or N will move to the next match. You may also use A to replace all matches. - -![][15] - -#### Save your file while editing (without exiting) - -In a graphical editor, you are probable used to of saving your changes from time to time. In Nano, you can use Ctrl+O to save your changes you made to the file. It also works with a new, unnamed file. - -![][16] - -Nano actually shows this keyboard shortcut at the bottom but it’s not obvious. It says “^O Write Out” which actually means to use Ctrl+O (it is letter O, not number zero) to save your current work. Not everyone can figure that out. - -In a graphical text editor, you probably use Ctrl+S to save your changes. Old habits die hard but it could cause trouble. Out of habit, if you accidentally press Ctrl+S to save your file, you’ll notice that the terminal freezes and you can do nothing. - -If you accidentally press Ctrl+S press Ctrl+Q nothing can be more scary than a frozen terminal and losing the work. - -#### Save and exit Nano editor - -To exit the editor, press Ctrl+X keys. When you do that, it will give you the option to save the file, or discard the file or cancel the exit process. - -![][17] - -If you want to save the modified file as a new file (save as function in usual editors), you can do that as well. When you press Ctrl+X to exit and then Y to save the changes, it gives the option to which file it should save the changes. You can change the file name at this point. - -You’ll need to have ‘write permission’ on the file you are editing if you want to save the modifications to the file. - -#### Forgot keyboard shortcut? Use help - -Like any other terminal based text editor, Nano relies heavily on keyboard shortcuts. Though it displays several useful shortcuts on the bottom of the editor, you cannot see all of them. - -It is not possible to remember all the shortcuts, specially in the beginning. What you can do is to use the Ctrl+G keys to bring up the detailed help menu. The help menu lists all the keyboard shortcuts. - -![][18] - -#### Always look at the bottom of the Nano editor - -If you are using Nano, you’ll notice that it displays important information at the bottom. This includes the keyboard shortcuts that will be used in the scenario. It also shows the last action you performed. - -![][19] - -If you get too comfortable with Nano, you can get more screen for editing the text by disabling the shortcuts displayed at the bottom. You can use Alt+X keys for that. I don’t recommend doing it, to be honest. Pressing Alt+X brings the shortcut display back. - -### Download Nano cheatsheet [PDF] - -There are a lot more shortcuts and editing options in Nano. I am not going to overwhelm you by mentioning them all. - -Here’s a quick summary of the important Nano keyboard shortcuts you should rememeber. Download link is under the image. - -![][20] - -[Download Nano Cheat Sheet (free PDF)][21] - -You can download the cheatsheet, print it and keep at your desk. It will help you in remembering and mastering the shortcuts. - -I hope you find this beginner’s guide to Nano text editor helpful. If you liked it, please share it on Reddit, [Hacker News][22] or in various [Linux forums][23] you frequently visit. - -I welcome your questions and suggestions. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/nano-editor-guide/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://www.nano-editor.org/ -[2]: https://itsfoss.com/command-line-text-editors-linux/ -[3]: https://www.vim.org/ -[4]: https://www.gnu.org/software/emacs/ -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-editor-guide.png?ssl=1 -[6]: https://itsfoss.com/pro-vim-tips/ -[7]: https://itsfoss.com/how-to-exit-vim/ -[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-editor-interface.png?ssl=1 -[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-modified-text.png?ssl=1 -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-editor-jump-to-line.png?ssl=1 -[11]: https://itsfoss.com/ubuntu-shortcuts/ -[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-editor-set-mark.png?ssl=1 -[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-search-text.png?ssl=1 -[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-editor-search-replace.png?ssl=1 -[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-editor-search-replace-confirm.png?ssl=1 -[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-editor-save-while-writing.png?ssl=1 -[17]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-editor-save-and-exit.png?ssl=1 -[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-editor-help-menu.png?ssl=1 -[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-editor-hints.png?ssl=1 -[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-cheatsheet.png?ssl=1 -[21]: https://itsfoss.com/wp-content/uploads/2020/05/Nano-Cheat-Sheet.pdf -[22]: https://news.ycombinator.com/ -[23]: https://itsfoss.community/ diff --git a/sources/tech/20200602 Control your computer time and date with systemd.md b/sources/tech/20200602 Control your computer time and date with systemd.md deleted file mode 100644 index 0047f4076d..0000000000 --- a/sources/tech/20200602 Control your computer time and date with systemd.md +++ /dev/null @@ -1,356 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Control your computer time and date with systemd) -[#]: via: (https://opensource.com/article/20/6/time-date-systemd) -[#]: author: (David Both https://opensource.com/users/dboth) - -Control your computer time and date with systemd -====== -Keep your computer time in sync with NTP, Chrony, and systemd-timesyncd. -![Alarm clocks with different time][1] - -Most people are concerned with time. We get up in time to perform our morning rituals and commute to work (a short trip for many of us these days), take a break for lunch, meet a project deadline, celebrate birthdays and holidays, catch a plane, and so much more. - -Some of us are even _obsessed_ with time. My watch is solar-powered and obtains the exact time from the [National Institute of Standards and Technology][2] (NIST) in Fort Collins, Colorado, via the [WWVB][3] time signal radio station located there. The time signals are synced to the atomic clock, also located in Fort Collins. My Fitbit syncs up to my phone, which is synced to a [Network Time Protocol][4] (NTP) server, which is ultimately synced to the atomic clock. - -### Why time is important to computers - -There are many reasons our devices and computers need the exact time. For example, in banking, stock markets, and other financial businesses, transactions must be maintained in the proper order, and exact time sequences are critical for that. - -Our phones, tablets, cars, GPS systems, and computers all require precise time and date settings. I want the clock on my computer desktop to be correct, so I can count on my local calendar application to pop up reminders at the correct time. The correct time also ensures SystemV cron jobs and systemd timers trigger at the correct time. - -The correct time is also important for logging, so it is a bit easier to locate specific log entries based on the time. For one example, I once worked in DevOps (it was not called that at the time) for the State of North Carolina email system. We used to process more than 20 million emails per day. Following the trail of email through a series of servers or determining the exact sequence of events by using log files on geographically dispersed hosts can be much easier when the computers in question keep exact times. - -### Multiple times - -Linux hosts have two times to consider: system time and RTC time. RTC stands for real-time clock, which is a fancy and not particularly accurate name for the system hardware clock. - -The hardware clock runs continuously, even when the computer is turned off, by using a battery on the system motherboard. The RTC's primary function is to keep the time when a connection to a time server is not available. In the dark ages of personal computers, there was no internet to connect to a time server, so the only time a computer had available was the internal clock. Operating systems had to rely on the RTC at boot time, and the user had to manually set the system time using the hardware BIOS configuration interface to ensure it was correct. - -The hardware clock does not understand the concept of time zones; only the time is stored in the RTC, not the time zone nor an offset from UTC (Universal Coordinated Time, which is also known as GMT, or Greenwich Mean Time). You can set the RTC with a tool I will explore later in this article. - -The system time is the time known by the operating system. It is the time you see on the GUI clock on your desktop, in the output from the `date` command, in timestamps for logs, and in file access, modify, and change times. - -The [`rtc` man page][5] contains a more complete discussion of the RTC and system clocks and RTC's functionality. - -### What about NTP? - -Computers worldwide use the NTP (Network Time Protocol) to synchronize their time with internet standard reference clocks through a hierarchy of NTP servers. The primary time servers are at stratum 1, and they are connected directly to various national time services at stratum 0 via satellite, radio, or even modems over phone lines. The time services at stratum 0 may be an atomic clock, a radio receiver that is tuned to the signals broadcast by an atomic clock, or a GPS receiver using the highly accurate clock signals broadcast by GPS satellites. - -To prevent time requests from time servers or clients lower in the hierarchy (i.e., with a higher stratum number) from overwhelming the primary reference servers, several thousand public NTP stratum 2 servers are open and available for all to use. Many organizations and users (including me) with large numbers of hosts that need an NTP server choose to set up their own time servers, so only one local host accesses the stratum 2 or 3 time servers. Then they configure the remaining hosts in the network to use the local time server. In the case of my home network, that is a stratum 3 server. - -### NTP implementation options - -The original NTP implementation is **ntpd**, and it has been joined by two newer ones, **chronyd** and **systemd-timesyncd**. All three keep the local host's time synchronized with an NTP time server. The systemd-timesyncd service is not as robust as chronyd, but it is sufficient for most purposes. It can perform large time jumps if the RTC is far out of sync, and it can adjust the system time gradually to stay in sync with the NTP server if the local system time drifts a bit. The systemd-timesync service cannot be used as a time server. - -[Chrony][6] is an NTP implementation containing two programs: the chronyd daemon and a command-line interface called chronyc. As I explained in a [previous article][7], Chrony has some features that make it the best choice for many environments, chiefly: - - * Chrony can synchronize to the time server much faster than the old ntpd service. This is good for laptops or desktops that do not run constantly. - * It can compensate for fluctuating clock frequencies, such as when a host hibernates or enters sleep mode, or when the clock speed varies due to frequency stepping that slows clock speeds when loads are low. - * It handles intermittent network connections and bandwidth saturation. - * It adjusts for network delays and latency. - * After the initial time sync, Chrony never stops the clock. This ensures stable and consistent time intervals for many system services and applications. - * Chrony can work even without a network connection. In this case, the local host or server can be updated manually. - * Chrony can act as an NTP server. - - - -Just to be clear, NTP is a protocol that is implemented on a Linux host using either Chrony or the systemd-timesyncd.service. - -The NTP, Chrony, and systemd-timesyncd RPM packages are available in standard Fedora repositories. The systemd-udev RPM is a rule-based device node and kernel event manager that is installed by default with Fedora but not enabled. - -You can install all three and switch between them, but that is a pain and not worth the trouble. Modern releases of Fedora, CentOS, and RHEL have moved from NTP to Chrony as their default timekeeping implementation, and they also install systemd-timesyncd. I find that Chrony works well, provides a better interface than the NTP service, presents much more information, and increases control, which are all advantages for the sysadmin. - -### Disable other NTP services - -It's possible an NTP service is already running on your host. If so, you need to disable it before switching to something else. I have been using chronyd, so I used the following commands to stop and disable it. Run the appropriate commands for whatever NTP daemon you are using on your host: - - -``` -[root@testvm1 ~]# systemctl disable chronyd ; systemctl stop chronyd -Removed /etc/systemd/system/multi-user.target.wants/chronyd.service. -[root@testvm1 ~]# -``` - -Verify that it is both stopped and disabled: - - -``` -[root@testvm1 ~]# systemctl status chronyd -● chronyd.service - NTP client/server -     Loaded: loaded (/usr/lib/systemd/system/chronyd.service; disabled; vendor preset: enabled) -     Active: inactive (dead) -       Docs: man:chronyd(8) -             man:chrony.conf(5) -[root@testvm1 ~]# -``` - -### Check the status before starting - -The systemd timesync's status indicates whether systemd has initiated an NTP service. Because you have not yet started systemd NTP, the `timesync-status` command returns no data: - - -``` -[root@testvm1 ~]# timedatectl timesync-status -Failed to query server: Could not activate remote peer. -``` - -But a straight `status` request provides some important information. For example, the `timedatectl` command without an argument or options implies the `status` subcommand as default: - - -``` -[root@testvm1 ~]# timedatectl status -           Local time: Fri 2020-05-15 08:43:10 EDT   -           Universal time: Fri 2020-05-15 12:43:10 UTC   -                 RTC time: Fri 2020-05-15 08:43:08       -                Time zone: America/New_York (EDT, -0400) -System clock synchronized: no                           -              NTP service: inactive                     -          RTC in local TZ: yes                     - -Warning: The system is configured to read the RTC time in the local time zone. -         This mode cannot be fully supported. It will create various problems -         with time zone changes and daylight saving time adjustments. The RTC -         time is never updated, it relies on external facilities to maintain it. -         If at all possible, use RTC in UTC by calling -         'timedatectl set-local-rtc 0'. -[root@testvm1 ~]# -``` - -This returns the local time for your host, the UTC time, and the RTC time. It shows that the system time is set to the `America/New_York` time zone (`TZ`), the RTC is set to the time in the local time zone, and the NTP service is not active. The RTC time has started to drift a bit from the system time. This is normal with systems whose clocks have not been synchronized. The amount of drift on a host depends upon the amount of time since the system was last synced and the speed of the drift per unit of time. - -There is also a warning message about using local time for the RTC—this relates to time-zone changes and daylight saving time adjustments. If the computer is off when changes need to be made, the RTC time will not change. This is not an issue in servers or other hosts that are powered on 24/7. Also, any service that provides NTP time synchronization will ensure the host is set to the proper time early in the startup process, so it will be correct before it is fully up and running. - -### Set the time zone - -Usually, you set a computer's time zone during the installation procedure and never need to change it. However, there are times it is necessary to change the time zone, and there are a couple of tools to help. Linux uses time-zone files to define the local time zone in use by the host. These binary files are located in the `/usr/share/zoneinfo` directory. The default for my time zone is defined by the link `/etc/localtime -> ../usr/share/zoneinfo/America/New_York`. But you don't need to know that to change the time zone. - -But you do need to know the official time-zone name for your location. Say you want to change the time zone to Los Angeles: - - -``` -[root@testvm2 ~]# timedatectl list-timezones | column -<SNIP> -America/La_Paz                  Europe/Budapest -America/Lima                    Europe/Chisinau -America/Los_Angeles             Europe/Copenhagen -America/Maceio                  Europe/Dublin -America/Managua                 Europe/Gibraltar -America/Manaus                  Europe/Helsinki -<SNIP> -``` - -Now you can set the time zone. I used the `date` command to verify the change, but you could also use `timedatectl`: - - -``` -[root@testvm2 ~]# date -Tue 19 May 2020 04:47:49 PM EDT -[root@testvm2 ~]# timedatectl set-timezone America/Los_Angeles -[root@testvm2 ~]# date -Tue 19 May 2020 01:48:23 PM PDT -[root@testvm2 ~]# -``` - -You can now change your host's time zone back to your local one. - -### systemd-timesyncd - -The systemd timesync daemon provides an NTP implementation that is easy to manage within a systemd context. It is installed by default in Fedora and Ubuntu and started by default in Ubuntu but not in Fedora. I am unsure about other distros; you can check yours with: - - -``` -`[root@testvm1 ~]# systemctl status systemd-timesyncd` -``` - -### Configure systemd-timesyncd - -The configuration file for systemd-timesyncd is `/etc/systemd/timesyncd.conf`. It is a simple file with fewer options included than the older NTP service and chronyd. Here are the complete contents of the default version of this file on my Fedora VM: - - -``` -#  This file is part of systemd. -# -#  systemd is free software; you can redistribute it and/or modify it -#  under the terms of the GNU Lesser General Public License as published by -#  the Free Software Foundation; either version 2.1 of the License, or -#  (at your option) any later version. -# -# Entries in this file show the compile time defaults. -# You can change settings by editing this file. -# Defaults can be restored by simply deleting this file. -# -# See timesyncd.conf(5) for details. - -[Time] -#NTP= -#FallbackNTP=0.fedora.pool.ntp.org 1.fedora.pool.ntp.org 2.fedora.pool.ntp.org 3.fedora.pool.ntp.org -#RootDistanceMaxSec=5 -#PollIntervalMinSec=32 -#PollIntervalMaxSec=2048 -``` - -The only section it contains besides comments is `[Time]`, and all the lines are commented out. These are the default values and do not need to be changed or uncommented (unless you have some reason to do so). If you do not have a specific NTP time server defined in the `NTP=` line, Fedora's default is to fall back on the Fedora pool of time servers. I like to add the time server on my network to this line: - - -``` -`NTP=myntpserver` -``` - -### Start timesync - -Starting and enabling systemd-timesyncd is just like any other service: - - -``` -[root@testvm2 ~]# systemctl enable systemd-timesyncd.service -Created symlink /etc/systemd/system/dbus-org.freedesktop.timesync1.service → /usr/lib/systemd/system/systemd-timesyncd.service. -Created symlink /etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service → /usr/lib/systemd/system/systemd-timesyncd.service. -[root@testvm2 ~]# systemctl start systemd-timesyncd.service -[root@testvm2 ~]# -``` - -### Set the hardware clock - -Here's what one of my systems looked like after starting timesyncd: - - -``` -[root@testvm2 systemd]# timedatectl -               Local time: Sat 2020-05-16 14:34:54 EDT   -           Universal time: Sat 2020-05-16 18:34:54 UTC   -                 RTC time: Sat 2020-05-16 14:34:53       -                Time zone: America/New_York (EDT, -0400) -System clock synchronized: yes                           -              NTP service: active                       -          RTC in local TZ: no     -``` - -The RTC time is around a second off from local time (EDT), and the discrepancy grows by a couple more seconds over the next few days. Because RTC does not have the concept of time zones, the `timedatectl` command must do a comparison to determine which time zone is a match. If the RTC time does not match local time exactly, it is not considered to be in the local time zone. - -In search of a bit more information, I checked the status of systemd-timesync.service and found: - - -``` -[root@testvm2 systemd]# systemctl status systemd-timesyncd.service -● systemd-timesyncd.service - Network Time Synchronization -     Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: disabled) -     Active: active (running) since Sat 2020-05-16 13:56:53 EDT; 18h ago -       Docs: man:systemd-timesyncd.service(8) -   Main PID: 822 (systemd-timesyn) -     Status: "Initial synchronization to time server 163.237.218.19:123 (2.fedora.pool.ntp.org)." -      Tasks: 2 (limit: 10365) -     Memory: 2.8M -        CPU: 476ms -     CGroup: /system.slice/systemd-timesyncd.service -             └─822 /usr/lib/systemd/systemd-timesyncd - -May 16 09:57:24 testvm2.both.org systemd[1]: Starting Network Time Synchronization... -May 16 09:57:24 testvm2.both.org systemd-timesyncd[822]: System clock time unset or jumped backwards, restoring from recorded timestamp: Sat 2020-05-16 13:56:53 EDT -May 16 13:56:53 testvm2.both.org systemd[1]: Started Network Time Synchronization. -May 16 13:57:56 testvm2.both.org systemd-timesyncd[822]: Initial synchronization to time server 163.237.218.19:123 (2.fedora.pool.ntp.org). -[root@testvm2 systemd]# -``` - -Notice the log message that says the system clock time was unset or jumped backward. The timesync service sets the system time from a timestamp. Timestamps are maintained by the timesync daemon and are created at each successful time synchronization. - -The `timedatectl` command does not have the ability to set the value of the hardware clock from the system clock; it can only set the time and date from a value entered on the command line. However, you can set the RTC to the same value as the system time by using the `hwclock` command: - - -``` -[root@testvm2 ~]# /sbin/hwclock --systohc --localtime -[root@testvm2 ~]# timedatectl -               Local time: Mon 2020-05-18 13:56:46 EDT   -           Universal time: Mon 2020-05-18 17:56:46 UTC   -                 RTC time: Mon 2020-05-18 13:56:46       -                Time zone: America/New_York (EDT, -0400) -System clock synchronized: yes                           -              NTP service: active                       -          RTC in local TZ: yes -``` - -The `--localtime` option ensures that the hardware clock is set to local time, not UTC. - -### Do you really need RTC? - -Any NTP implementation will set the system clock during the startup sequence, so is RTC necessary? Not really, so long as you have a network connection to a time server. However, many systems do not have full-time access to a network connection, so the hardware clock is useful so that Linux can read it and set the system time. This is a better solution than having to set the time by hand, even if it might drift away from the actual time. - -### Summary - -This article explored the use of some systemd tools for managing date, time, and time zones. The systemd-timesyncd tool provides a decent NTP client that can keep time on a local host synchronized with an NTP server. However, systemd-timesyncd does not provide a server service, so if you need an NTP server on your network, you must use something else, such as Chrony, to act as a server. - -I prefer to have a single implementation for any service in my network, so I use Chrony. If you do not need a local NTP server, or if you do not mind dealing with Chrony for the server and systemd-timesyncd for the client and you do not need Chrony's additional capabilities, then systemd-timesyncd is a serviceable choice for an NTP client. - -There is another point I want to make: You do not have to use systemd tools for NTP implementation. You can use the old ntpd or Chrony or some other NTP implementation. systemd is composed of a large number of services; many of them are optional, so they can be disabled and something else used in its place. It is not the huge, monolithic monster that some make it out to be. It is OK to not like systemd or parts of it, but you should make an informed decision. - -I don't dislike systemd's implementation of NTP, but I much prefer Chrony because it meets my needs better. And that is what Linux is all about. - -### Resources - -There is a great deal of information about systemd available on the internet, but much is terse, obtuse, or even misleading. In addition to the resources mentioned in this article, the following webpages offer more detailed and reliable information about systemd startup. - - * The Fedora Project has a good, practical [guide to systemd][8]. It has pretty much everything you need to know in order to configure, manage, and maintain a Fedora computer using systemd. - * The Fedora Project also has a good [cheat sheet][9] that cross-references the old SystemV commands to comparable systemd ones. - * For detailed technical information about systemd and the reasons for creating it, check out [Freedesktop.org][10]'s [description of systemd][11]. - * [Linux.com][12]'s "More systemd fun" offers more advanced systemd [information and tips][13]. - - - -There is also a series of deeply technical articles for Linux sysadmins by Lennart Poettering, the designer and primary developer of systemd. These articles were written between April 2010 and September 2011, but they are just as relevant now as they were then. Much of everything else good that has been written about systemd and its ecosystem is based on these papers. - - * [Rethinking PID 1][14] - * [systemd for Administrators, Part I][15] - * [systemd for Administrators, Part II][16] - * [systemd for Administrators, Part III][17] - * [systemd for Administrators, Part IV][18] - * [systemd for Administrators, Part V][19] - * [systemd for Administrators, Part VI][20] - * [systemd for Administrators, Part VII][21] - * [systemd for Administrators, Part VIII][22] - * [systemd for Administrators, Part IX][23] - * [systemd for Administrators, Part X][24] - * [systemd for Administrators, Part XI][25] - - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/time-date-systemd - -作者:[David Both][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/dboth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/clocks_time.png?itok=_ID09GDk (Alarm clocks with different time) -[2]: https://en.wikipedia.org/wiki/National_Institute_of_Standards_and_Technology -[3]: https://en.wikipedia.org/wiki/WWVB -[4]: https://en.wikipedia.org/wiki/Network_Time_Protocol -[5]: https://linux.die.net/man/4/rtc -[6]: https://chrony.tuxfamily.org/ -[7]: https://opensource.com/article/18/12/manage-ntp-chrony -[8]: https://docs.fedoraproject.org/en-US/quick-docs/understanding-and-administering-systemd/index.html -[9]: https://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet -[10]: http://Freedesktop.org -[11]: http://www.freedesktop.org/wiki/Software/systemd -[12]: http://Linux.com -[13]: https://www.linux.com/training-tutorials/more-systemd-fun-blame-game-and-stopping-services-prejudice/ -[14]: http://0pointer.de/blog/projects/systemd.html -[15]: http://0pointer.de/blog/projects/systemd-for-admins-1.html -[16]: http://0pointer.de/blog/projects/systemd-for-admins-2.html -[17]: http://0pointer.de/blog/projects/systemd-for-admins-3.html -[18]: http://0pointer.de/blog/projects/systemd-for-admins-4.html -[19]: http://0pointer.de/blog/projects/three-levels-of-off.html -[20]: http://0pointer.de/blog/projects/changing-roots -[21]: http://0pointer.de/blog/projects/blame-game.html -[22]: http://0pointer.de/blog/projects/the-new-configuration-files.html -[23]: http://0pointer.de/blog/projects/on-etc-sysinit.html -[24]: http://0pointer.de/blog/projects/instances.html -[25]: http://0pointer.de/blog/projects/inetd.html diff --git a/sources/tech/20200603 Exploring Algol 68 in the 21st century.md b/sources/tech/20200603 Exploring Algol 68 in the 21st century.md deleted file mode 100644 index 6e5dc9d585..0000000000 --- a/sources/tech/20200603 Exploring Algol 68 in the 21st century.md +++ /dev/null @@ -1,381 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Exploring Algol 68 in the 21st century) -[#]: via: (https://opensource.com/article/20/6/algol68) -[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen) - -Exploring Algol 68 in the 21st century -====== -An in-depth look at a forgotten language and its modern applications. -![Old UNIX computer][1] - -In the preface to his excellent textbook _Algol 68: A First and Second Course_, Andrew McGettrick writes: - -> "This book originated from lectures first given at the University of Strathclyde in 1973-4 to first-year undergraduates, many of whom had no previous knowledge of programming. Many of the students were not taking computer science as their main subject but merely as a subsidiary subject. They, therefore, served as a suitable audience on whom to inflict lectures attempting to teach Algol 68 as a first programming language." - -Perhaps this quote carries particular weight for me as I, too, was a first-year student in 1973-1974, though at a different institution—the University of British Columbia. Moreover, "back in those days," the introductory computer science course at UBC was taught in the second year using Waterloo FORTRAN with a bit of IBM 360 Assembler thrown in; nothing so exotic as Algol 68. In my case, I didn't encounter Algol 68 until my third year. Maybe this wait, along with experiences in other programming languages, contributed to my lifelong fascination with this underrated and wonderful programming language. And thanks to Marcel van der Veer, who has created [a very fine implementation of Algol 68][2] called Algol 68 Genie, that is now in my distro's repositories, at long last, I've been able to explore Algol 68 at my leisure. I should also mention that Marcel's book, [_Learning Algol 68 Genie_][3], is of great utility both for newcomers and as a refresher course in Algol 68. - -Because I've been having so much fun rediscovering Algol 68, I thought I'd share some of my thoughts and impressions. - -### What people say about Algol 68 - -If it's worth reading [the overview of Algol 68 on Wikipedia][4], then it's really worth reading this paragraph from the [_Revised Report on the Algorithmic Language Algol 68_][5]: - -> "The original authors acknowledged with pleasure and thanks the wholehearted cooperation, support, interest, criticism, and violent objections from members of WG 2.1 and many other people interested in Algol." - -"Criticism and violent objections"—wow! In fact, some committee members were so unhappy with the direction the committee was taking that they left and started their own language definition projects, at least partly as a protest against Algol 68. Niklaus Wirth, for example, fed up with the complexity of Algol 68, [went off to design Pascal][6]. And having written and supported a fair bit of Pascal code from about 1984 through 2000 or so, I am here to tell you that Pascal is about as far from Algol 68 as it's possible to get. Which, it seems to me, was Wirth's point. - -Dennis Ritchie [gave a talk][7] at the second ACM History of Programming Languages conference in Cambridge, Massachusetts in 1993, in which he compares Bliss, Pascal, Algol 68, and C. In that talk, he made several interesting observations: - - * All of the four languages are "based on this old, old model of machines that pick up things, do operations, and put them someplace else" and "are very much influenced by Algol 60 and FORTRAN." - * "When Steve Bourne (yes, the person who created the Bourne shell) came to Bell Labs with the Algol 68C compiler, he made it do the same things that C could do; it had Unix system call interfaces and so forth." - * "I think the language really did suffer from its definition in terms of acceptance. Nevertheless, it was really quite practical." - * "In some ways, Algol 68 is the most elegant of the languages I've been discussing. I think in some ways, it's even the most influential, although as a language in itself, it has nearly gone away." - - - -There is much more opinion on Algol 68 still prominent on the Internet today. A lot of it is negative, but oh well! I suspect a great deal of it is not informed by actual use. One very interesting place to find coders just getting down to using the language (and many others, some marvelously obscure) is on [the Rosetta Code Wiki][8]. Go there and form your own opinion! Or follow me as I review what strikes me as great and not so great about Algol 68. - -### What seems important and relevant to me about Algol 68 - -Algol 68, as a programming language, offers some distinctive and useful ideas that were innovative at the time and have shown up, to some degree or the other, in other languages since then. - -#### Key design principles clearly explained in the Revised Report - -The committee that designed Algol 68 was driven by a very clear set of principles: - - * Completeness and clarity of description (aided by the use of two-level grammar, which provoked many negative opinions) - * Orthogonal design; that is, basic concepts defined in the language can be used anywhere that usage can be said to "make sense." As an example—every expression that can reasonably be expected to yield a value does, in fact, yield a value. - * Security by way of careful syntactical design (that two-level grammar again); most errors thought to be related to semantic concepts in other languages can be detected at compile time. - * Efficiency, in that programs should run efficiently (on the hardware of the day) without requiring significant efforts to optimize the generated code, and furthermore: - * No run time-type checking except in the unique case of types that present alternative configurations at run time (`united` types in Algol 68, similar to `union` types in C) - * Type-independent parsing (again, the two-level grammar at work here) and certainty that, in a finite number of steps, any input sequence can be evaluated as to whether it is a program or not - * Loop structures that encourage the use of well-known loop optimization strategies of the day - * A symbol set (with alternatives) that worked on the various different character sets available on computers at the time - - - -I find it instructive to see the emphasis on very strong static typing (50 years ago!!) and the benefits that were expected to accrue, in contrast to today's universe of dynamically-typed languages and languages with weak static typing that have helped spawn an entire industry of run-time testing. (OK maybe that's not completely fair, but it contains a certain element of truth). - -#### Structures to group statements together without extra grouping constructs - -In programs written in Algol 60 and Pascal, we see a lot of `begin` and `end` tokens; in C, C++, Java, and so forth, we see a lot of `{` and `}`. For example, the simple expression to calculate the absolute value `av` of an integer value `iv` can be written in either Algol 60 or Pascal as: - - -``` -`if iv < 0 then av := -iv else av := iv` -``` - -If we wanted to set a Boolean value stating whether `iv` was negative, then we need to start inserting `begin` and `end`: - - -``` -`if iv < 0 then begin av := -iv; negative := true end else begin av := iv; negative := false end` -``` - -Formally, Algol 68 uses boldface for tokens with special meaning like **if** or **then**, and uses italics for names of things like the _print_() procedure.  This wasn't practical back in the day when many still used keypunches for coding, and it would still be a bit weird today.  So Algol 68 implementations usually provided some method of marking special symbols (called _stropping_), leaving everything else unmarked.  By default, Algol 68 Genie uses upper case stropping, so symbols like **if** are coded as IF, and names of things can only be in lower case.  Worth noting however is that it's completely ok to have a variable named "if" should that suit the purpose at hand. Anway... in case any reader is inclined to copy / paste, I'm using the Genie convention in my code samples. - -Moreover, Algol 68 has a closed syntax, which the Bourne shell and Bash have inherited.  So the previous line of code in Algol 68 Genie would be: - - -``` -`IF iv < 0 THEN av := -iv; negative := TRUE ELSE av := iv; negative := FALSE FI` -``` - -The token `fi` closes off the preceding `if`, in case that's not obvious. Now, perhaps I'm the only person in the world who has ever written some Java that looks like this: - - -``` -if (something) -    statement; -``` - -and then found myself inserting a call to `println` to debug that code: - - -``` -if (something) -    statement; -    [System][9].err.println(stuff);  /* not in the then-part of if!!! */ -``` - -cluelessly forgetting to wrap the then-part in `{` … `}`. And of course, this isn't the end of the world, but when the insertion is something with less obvious results, well, let's just say I've spent a fair bit of time debugging this kind of thing over the years. - -But that can't happen in Algol 68. Well, mostly, anyway. Algol 68 still needs `begin` … `end` for operator and procedure declarations. But `if` … `fi`, `do` … `od` and `case` … `esac` (the Algol 68 switch statement) are all closed. - -We see this same concept in Go today; an "if" statement looks like if … { … }; the { and } are required. And as I already mentioned, the Bourne shell and its descendants use similar constructs. - -#### Almost every expression yields a value - -Look at the expression `iv < 0` above; pretty obvious that yields a value, and most likely that value is Boolean (`true` or `false`). So no big deal there. - -But an assignment statement also yields a value, namely, the left-hand side of the assignment statement after the assignment is completed. - -A sequence of statements yields whatever the final statement (or expression) yields as a value. - -An "if" statement yields either the value of the then-part or the else-part, depending on whether the expression following "if" yields `true` or `false`. - -An example: think of using the C, Java… ternary operator for our absolute value calculation: - - -``` -`av = iv < 0 ? -iv : iv;` -``` - -In Algol 68, we don't need an extra "ternary operator," as the "if" statement works just fine: - - -``` -`av := IF iv < 0 THEN -iv ELSE iv FI` -``` - -This might be a good moment to mention that Algol 68 provides "brief" versions of symbols like `begin`, `end`, `if`, `then`, `else` and so forth, using `( |` and `)`: - - -``` -`av := ( iv < 0 | -iv | iv )` -``` - -has the same meaning as the previous expression. - -One thing that surprised me when I first encountered it is that loops don't yield an expression. But loops have a few differences that end up making sense once they are fully understood. - -A loop in Algol 68 might look like this: - - -``` -`FOR lv FROM 1 BY 1 TO 1000 WHILE 2 * lv * ly < limit DO … OD` -``` - -The variable `ly` here is the loop variable, implicitly declared by the `for` as an integer. Its scope is the entire `for` … `od`**,** and its value is retained from one iteration to the next. We can declare a regular variable in the `while` … `do` part, just like in an `if` … `then` part. Its scope is the `while` … `od` part, but its value is not retained from one iteration to the next. So, for example, if we want to accumulate the sum of the elements of an array, we must write: - - -``` -`INT sum := 0; FOR ai FROM LWB array TO UPB array DO sum +:= array[ai] OD` -``` - -where the operators `lwb` and `upb` deliver the smallest and largest index values respectively defined for the array and the +:= symbol has the same meaning as += in C or Java. - -If we wanted to return the sum as a value, we would write: - - -``` -`BEGIN INT sum := 0; FOR ai FROM LWB array TO UPB array DO sum +:= array[ai] OD; sum END` -``` - -Of course, we could replace `begin` and `end` with `(` and `)` for brevity. This expression would be a reasonable implementation of a procedure (or operator) that returns the sum of the values of the elements of an array. - -#### Orthogonality—the same expression will work almost anywhere - -Look again at the expression `iv < 0` above. - -Let's step back a bit and include a definition of `iv` and the acquisition of its value. Then the code might look like: - - -``` -`INT iv; read(iv); IF iv < 0 THEN … FI` -``` - -However, we could just as well write: - - -``` -`IF INT iv; read(iv); iv < 0 THEN … FI` -``` - -Here we can see orthogonality at work - the declaration and reading of the variable can occur between the `if` and the logical expression testing the variable, because the value delivered is just that of the final expression. Moreover, this works with Algol 68 semantics to provide an interesting difference—in the first case, the scope of `iv` is the code surrounding the "if" statement; in the second, the scope is just between the `if` and the `fi`. To my way of thinking, this option means that we should have fewer variables declared far away from where they are used, and the ones that remain really do have a "long life" in the code. - -This has practical importance as well. Think, for example, of code that uses some kind of SQL interface to execute several scripts in a database and return the values for further analysis. Usually, in this case, the programmer needs to do a bit of work to set up the connection to the database, pass a query string to the execute command, and retrieve the results. Each instance requires declaring some variables to hold the connection, the query string, and the results. How nice it is when these variables can be declared locally to the results accumulation code! This also facilitates adding a new query-analysis step with a quick copy-paste. And yes, it's good to turn these code snippets into procedure calls, especially in a language that supports lambdas (anonymous procedures) so as to avoid obscuring the different analysis steps with repeated administrative steps. But having very locally-defined administrative variables facilitates the refactoring effort required. - -Another great consequence of orthogonality is that we can have the equivalent of the ternary operator on the left-hand side of an assignment statement as well as on the right-hand side. - -Let's suppose we're processing an input stream of signed integers, and we want to accumulate positive integers into gains and negative integers into losses. Then, the following Algol 68 code would work: - - -``` -`IF amount < 0 THEN losses +:= amount ELSE gains +:= amount FI` -``` - -However, there's no need to repeat the `+:= amount` here; we can move it outside the `if` … `fi` as follows: - - -``` -`IF amount < 0 THEN losses ELSE gains FI +:= amount` -``` - -This works because the "if" statement yields either the losses or gains expression as a result of the evaluation of the test, and that expression is incremented by amount. And of course, we can use the brief form, which, in my opinion at least, improves the readability in these short expressions: - - -``` -`(amount < 0 | losses | gains) +:= amount` -``` - -How about a real example to show why this expression-oriented thing is so great? - -Suppose you are writing a hash table facility. Two functions you will have to implement are "get the value associated with a given key" and "set the value associated with a given key". - -In an expression-oriented language, those can be one function. Why? Because the "get" operation returns the location where the value is found, and then the "set" operation simply uses the "get" operation to set the value at that location. Let's assume we've created an operator called `valueat` that takes two arguments—the hash table itself and the key value. Then, - - -``` -`ht VALUEAT 42` -``` - -will return the location of key 42 in the hash table ht and - - -``` -`ht VALUEAT 42 := "the meaning of everything"` -``` - -will put the string "the meaning of everything" at location 42. - -This reduces the amount of code required to support the application at hand, reducing the number of pathways and edge cases that must be tested, and just generally adds wonderfulness to the users' and maintainers' lives. - -There is a simple example of using procedures on the left-hand side of assignment statements to store values in a table on [RosettaCode][10]. - -#### Anonymous procedures (lambdas) - -Everyone seems to want anonymous procedures (or "here" procedures, or lambdas) these days. Algol 68 provided that out of the box, and it's really, truly useful. - -By way of example, imagine that you want to create a facility to read files with delimited fields and to give users a nice interaction pathway with those. Think of the fine job `awk` does on this, basically by abstracting away all the junk related to opening the file, reading the lines, splitting the lines into fields, and providing some useful collateral variables along the way, like current-line-number, number-of-fields-on-this-line, and so forth. - -It turns out that's pretty easy to do in Algol 68 as well, where the task becomes to write a procedure that takes three arguments—the first being the input file name, the second being the field separator string, and the third being a procedure that handles each line. - -The declaration of that procedure might look like this: - - -``` -PROC each line =         # 1 # -        (STRING input file name, CHAR separator, PROC (STRING, [] STRING, INT) VOID process) # 2 # -VOID: BEGIN              # 3 # -    FILE inf;            # 4 # -    open(inf, input file name, stand in channel); # 5 # -    BOOL finished reading := FALSE; -    on logical file end (inf, (REF FILE f) bool: finished reading := TRUE); # 6 # -    INT linecount := 0;  # 7 # -    WHILE                # 8 # -        string line; -        get(inf,(line, new line)); -        not finished reading -    DO                   # 9 # -        linecount +:= 1; -        FLEX [1:0] STRING fields := split(line, separator); -        process(line, fields, linecount) -    OD; -    close(inf)           # 10 # -END                      # 11 # -``` - -Here’s what’s going on above: - - 1. Comment 1 (the # 1 # above)—the declaration of the procedure `each line` (note that blanks can be inserted into the middle of names or numbers at will) - - 2. The parameters to each line—the `string` file name, the field separator `char`acter, and the `pro`cedure to be called to process each line, which itself takes a `string` (the line of input) an array of `string`s (the fields of the line) and an `int`eger (the line number) and which returns a `void` value - - 3. `each line` returns a `void` value, and the procedure body starts with a `begin`, allowing us to use several statements in its definition - - 4. Declare the input `file` - - 5. Associate the `standard input channel` with the `file`, whose name is given by `input file name` and open it (for reading) - - 6. Algol 68 handles end-of-file conditions a bit differently; here, we use the I/O event detection procedure `on logical file end` to set the flag `finished reading` that we can detect while processing the file - - 7. Create and initialize the line count (see the previous description of the nature of loops) - - 8. This `while` loop attempts to read the next line from the input file. If successful, it processes the line; otherwise, it exits - - 9. Processing the input line—increment the line count; create an array of strings corresponding to the fields of the line using the `split` procedure; call the supplied `process` procedure to consume the line, its fields and the line count - - 10. Remember to `close` the file - - 11. `end` of the procedure definition. - - - - -And we might use it like so, in order to build a lookup table (in conjunction with the hypothetical hash table facility mentioned in passing in the previous section): - - -``` -# remapping definitions in remapping.csv file # -# new-reference|old-reference # -# 093M0770371|093X0012250 # -# 093M0770375|093X0012249 # -# 093M0770370|093X0012133 # - -[/code] [code] - -HASTABLE ht := new hashtable; - -each delimited line("test.csv", "|", (STRING line, [] STRING fields, INT linecount) VOID: BEGIN -    STRING to map := fields[1], from map := fields[2]; -    ht VALUEAT from map := to map -END); -``` - -Above, we see the call to each delimited line. Of particular interest is the declaration of the "here" procedure or lambda that stows the lookup values into the hash table. From my perspective, the big lesson here is that lambdas are a consequence of Algol 68's orthogonality; I think that's pretty neat. - -One of the things I plan to dig deeper into as I continue to explore Algol 68 is how much further I can take this functional form of expression. For example, I don't see why I can't build a list or a hash table element by element and yield the finished structure as the result of the looping procedure, so the above might look more like: - - -``` -HASHTABLE ht := each delimited line as map entry("test.csv", "|", -        (STRING line, [] STRING fields, INT linecount) VOID: BEGIN -    STRING to map := fields[1], from map := fields[2]; -    (from map, to map) -END); -``` - -### In conclusion - -Why learn about old, dusty, and forgotten languages? Well, we all know about the recent interest in COBOL, but perhaps that's an outlier in the sense that there probably aren't a lot of mission-critical applications written in SNOBOL, Icon, APL, or even Algol 68. Certainly, there is George Santayana's guidance to bear in mind: ["Those who cannot remember the past are condemned to repeat it."][11] - -For me, there are a few key reasons to up my game in Algol 68 (and probably in a few other languages that don't seem to be absolutely necessary to my daily efforts): - - * Algol 68 was not defined as a reaction against some annoyances in an existing programming language; rather, according to the Revised Report: - - * The committee (Working Group 2.1 on ALGOL of the International Federation for Information Processing) "expresses its belief in the value of a common programming language serving many people in many countries." - - * "Algol 68 has not been designed as an expansion of Algol 60 but rather as a completely new language based on new insight into the essential, fundamental concepts of computing and a new description technique." - - * Whether through positive contributions copied into other languages (`do` … `od` in the Bourne shell; += in C, Java, …) or negative reactions (Pascal and all its descendants, Ada), Algol 68 can claim to have influenced computing in profound ways. - - * While Algol 68 is very much "a child of its time," being influenced by keypunches and line printers, small and diverse character sets, the wide variation in character and word sizes of computers in the 1960s and 1970s, and not explicitly incorporating object orientation or functional programming, its rather extraordinary orthogonality and expression-orientedness make up for these oddities and lacking in other useful ways. - - * Perhaps the most practical reason is having the wonderful Algol 68 Genie interpreter installed and running on my desktop, allowing me to pursue this odd small hobby! - - - - -Perhaps I should return to Santayana for a final comment: - -> ["Beauty as we feel it is something indescribable: what it is or what it means can never be said."][11] - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/algol68 - -作者:[Chris Hermansen][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/clhermansen -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/retro_old_unix_computer.png?itok=SYAb2xoW (Old UNIX computer) -[2]: https://jmvdveer.home.xs4all.nl/en.algol-68-genie.html -[3]: https://jmvdveer.home.xs4all.nl/en.download.learning-algol-68-genie-283.html -[4]: https://en.wikipedia.org/wiki/ALGOL_68 -[5]: http://www.softwarepreservation.org/projects/ALGOL/report/Algol68_revised_report-AB.pdf -[6]: https://en.wikipedia.org/wiki/Pascal_(programming_language) -[7]: https://www.bell-labs.com/usr/dmr/www/hopl.html -[8]: http://rosettacode.org/wiki/Rosetta_Code -[9]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system -[10]: https://rosettacode.org/wiki/Associative_array/Creation#ALGOL_68 -[11]: https://en.wikiquote.org/wiki/George_Santayana diff --git a/sources/tech/20200608 Eliminate spam using SSL with an open source certification authority.md b/sources/tech/20200608 Eliminate spam using SSL with an open source certification authority.md deleted file mode 100644 index 4f63eac8dd..0000000000 --- a/sources/tech/20200608 Eliminate spam using SSL with an open source certification authority.md +++ /dev/null @@ -1,300 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Eliminate spam using SSL with an open source certification authority) -[#]: via: (https://opensource.com/article/20/6/secure-open-source-antispam) -[#]: author: (Victor Lopes https://opensource.com/users/victorlclopes) - -Eliminate spam using SSL with an open source certification authority -====== -Use a Let’s Encrypt certificate with MailCleaner for STARTTLS and SSL. -Here's how. -![Chat via email][1] - -[MailCleaner][2] is a feature-rich, open source antispam solution. Its virtual appliances (VMs) available for distribution come out-of-the-box with self-signed certificates for both the web interface and the MTA services. - -This requires you to supply your own valid, publicly trusted certificate. Using a Let's Encrypt certificate is a great way to accomplish that because it's free, safe, and automated. - -When requesting a Let's Encrypt certificate, the most important step is the hostname validation. If you don't know about it, consult the [documentation][3]. - -### Firewall requirements - -First of all, you need to define which hostnames you will use, including your MX records, and they must point to the IP address you're using to publish your MailCleaner server. - -If you choose to perform the validation using local port 80 on your MailCleaner box, you will have to include a few commands to temporarily stop the Apache service during the certificate request. That's why I recommend using an alternative port, which, in our examples, will be port TCP 8090. - -You have a few options in this scenario: - -**Option 1**: Create rules in your reverse proxy to forward Let's Encrypt validation requests to your MailCleaner server. You have to redirect every request sent to port TCP 80, whose destination hostname is your MailCleaner external FQDN, and the path starts with `/.well-known/acme-challenge/` to port TCP 8090 on your MailCleaner server. - -**Option 2**: Using a NAT rule, for example, redirect the traffic sent to port TCP 80 to port TCP 8090 on your MailCleaner server. - -**Option 3**: Redirect/allow traffic sent to port TCP 80 to the actual port TCP 80 on your MailCleaner server, which is less secure, less flexible, and not recommended. - -Alternatively, you could have the certificate request and the name validation performed somewhere else (like in your firewall) and create a routine for copying the cert files to your MailCleaner box. If you have a [pfSense][4] firewall with the [ACME][5] package, for example, you can try to merge the concepts within this article with this [how-to][6]. - -### Installing Certbot - -[Certbot][7] is an open source tool for requesting and managing Let's Encrypt certificates. - -To install Certbot on your MailCleaner server, log in as `root` (in the console or through SSH) and run: - - -``` -$ wget -$ mv certbot-auto /usr/local/bin/certbot-auto -$ chown root /usr/local/bin/certbot-auto -$ chmod 0755 /usr/local/bin/certbot-auto -``` - -### Testing certificate name validation - -If you're using an alternate port, you need to open it in the local firewall on your MailCleaner server: - - -``` -`iptables -A INPUT -p tcp -m tcp --dport 8090 -j ACCEPT` -``` - -Note: MailCleaner keeps local firewall rules in its database and sets the `iptables` config every time the server loads. It's imperative that you add port 8090 to the firewall table inside MailCleaner's MySQL database; otherwise, every renewal process will fail. To learn how to do this, take a look at the section titled "Accessing MailCleaner's MySQL database" in the article _[How to install MailCleaner 2020.01][8]._ - -Now, let's try to issue our certificate using Let's Encrypt's staging (testing) server. Please replace the appropriate values with your email address and your MailCleaner server hostname(s). - -**Option 1**: If you are using the alternative port 8090, use this command line: - - -``` -$ certbot-auto certonly --standalone --preferred-challenges http \ -\--http-01-port 8090 --email [myemail@domain.com][9] \--no-eff-email \ -\--agree-tos --staging -d myhostname.mydomain.com -``` - -If you have more than one name, just add them with "`-d`" at the end: - - -``` --d mx1.mydomain.com \ --d mx2.mydomain.com \ --d spam.mydomain.com -``` - -**Option 2**: If you are using local port 80, use this command line: - - -``` -$ certbot-auto certonly --standalone --preferred-challenges http \ - --email [myemail@domain.com][9] \--no-eff-email --agree-tos --staging \ --d myhostname.mydomain.com \ -\--pre-hook "/usr/mailcleaner/etc/init.d/apache stop" \ -\--post-hook "/usr/mailcleaner/etc/init.d/apache start" -``` - -Note: After issuing this command, you will hit a bootstrapping routine identifying missing dependencies, mostly Python packages. Let it install the necessary software. - -If everything went fine, you should see a result like this: - - -``` -root#mailcleaner:~# -root@mailcleaner:~# certbot-auto certonly \ -\--standalone --preferred-challenges http \ -\--http-01-port 8090 --email [victor@domain.com][10] \ -\--no-eff-email --agree-tos --staging \ --d mail.example.com - -Saving debug log to /var/log/letsencrypt/ -Plugins selected: Authenticator standalone -Obtaining a new certificate -Performing the following challenges: -http-01 challenge for mail.example.com -Waiting for verification... -Cleaning up challenges - -IMPORTANT NOTES: -Your certificate and chain have been saved at: -/etc/letsencrypt/live/mail.example.com/fullchain.pem -Your key file has been saved at: -/etc/letsencrypt/ live/mail.example.com/privkey.pem -[...] -root@mailcleaner:~# -``` - -If it didn't go well, keep in mind that most errors with this process are caused by Let's Encrypt servers not being able to reach your server. Check if your firewall configuration is really OK. - -### Request your certificate - -When the certificate issuing process is working correctly with the staging server, go ahead and request your certificate for production (removing the staging parameter): - - -``` -`certbot-auto certonly --standalone --preferred-challenges http --http-01-port 8090 --email myemail@domain.com --no-eff-email --agree-tos --force-renewal -d myhostname.mydomain.com` -``` - -Note: Adapt the command line if you're not using the alternative port 8090. If that's the case, don't forget the pre-hook and post-hook. - -The result screen is pretty similar. You will now have a valid certificate at the following path: - - -``` -`/etc/letsencrypt/live/my__hostname_.yourdomain.com_/`[/code] [code] - -root#mailcleaner:~# ls /etc/letsencrypt/live/mail.example.com -cert.pem chain.pem fullchain.pem privkey.pem README -root@mailcleaner:~# -``` - -### Automate certificate assignment and renewal - -The last piece of this puzzle is the great script provided by "GRahamJB" in this [MailCleaner forum topic][11]. You can download the script from [here][12]. - -Let's save this script in our server. Create the following file: - - -``` -`$ nano /usr/local/bin/set-certificates.pl` -``` - -Then paste the contents of the script and save it (`Ctrl + X`). And give the script permission to run: - - -``` -`$ chmod +x /usr/local/bin/set-certificates.pl` -``` - -Now run the script to assign your certificate to the web interface and the MTA services: - - -``` -root@mailcleaner:~# set-certificates.pl --set_web \ -\--set_mta_in --set_mta_out \ -\--key /etc/letsencrypt/live/mail.example.com/privkey.pem \ -\--data /etc/letsencrypt/live/mail.example.com/cert.pem \ -\--chain /etc/letsencrypt/live/mail.example.com/chain.pem - -Stopping Apache: stopped. -Starting Apache: started. -Stopping Exim stage 1: stopped. -Starting Exim stage 1: started. -Stopping Exim stage 4: stopped. -Starting Exim stage 4: started. -root@mailcleaner:~# -``` - -Now that we know it works, schedule these commands to run weekly, using cron and Certbot's built-in renewal routine: - - -``` -`$ nano /etc/letsencrypt/renewal/yourhostname.yourdomain.com.conf` -``` - -Check if the options look correct and add the following line at the end (the same set-certificates.pl you just ran, preceded by `renew_hook =`): - - -``` -. -. -# Options used in the renewal process -[renewalparams] -authenticator = standalone -account = 9d670ed7c63c6238f90f042f852fc33e -pref_challs = http-01, -http01_port = 8090 -server = -# Set MailCleaner certs -renew_hook = set-certificates.pl --set_web --set_mta_in --set_mta_out --key /etc/letsencrypt/live/myhostname.mydomain.com/privkey.pem --data /etc/letsencrypt/live/myhostname.mydomain.com/cert.pem --chain /etc/letsencrypt/live/myhostname.mydomain.com/chain.pem -``` - -Note that the "`renew_hook = set-cert…`" command must be one single line. Save the file and run the following command to test it: - - -``` -`$ certbot-auto renew --force-renewal` -``` - -If the renewal succeeds, you'll see a result similar to the one below. Note how our `renew_hook` command was called. The certificate has been updated in MailCleaner and the necessary services restarted. - - -``` -root@mailcleaner:~# certbot-auto renew --force-reneval -Saving debug log to /var/log/letsencrypt/letsencrypt.log - -Processing /etc/ letsencrypt/renewal/mail.example.com.conf -Plugins selected: Authenticator standalone, Installer None -Renewing an existing certificate -Running deploy-hook command: set-certificates.pl \ -\--set_web --set_mta_in --set_mta_out \ -\--key /etc/letsencrypt/live/mail.example.com/privkey.pem \ -\--data /etc/letsencrypt/live/mail.example.com/cert.pem \ -\--chain /etc/letsencrypt/live/mail.example.com/chain.pem -Output from deploy-hook conmtwand set-certificates.pl: - -Stopping Apache: stopped. -Starting Apache: started. -Stopping Exim stage 1: stopped. -Starting Exim stage 1: started. -Stopping Exim stage 4: stopped. -Starting Exim stage 4: started. - -new certificate deployed without reload, fullchain is -/etc/letsencrypt/live/mail.example.com/fullchain.pem - -Congratulations, all renewals succeeded. -The following certs have been renewed: -/etc/letsencrypt/live/mail.example.com/fullchain.pem (success) -root@mailcleaner:~# -``` - -Now, let's add that renew command to cron: - - -``` -`$ crontab -e` -``` - -Add the following line and save the file. This will make Certbot run every Sunday at 2:00am: - - -``` -`0 2 * * 7 /usr/local/bin/certbot-auto renew` -``` - -If crontab doesn't open the way you expect, run `select-editor` to choose the editor you like (nano, for example). If you want to check the result, run `crontab -l`. - -By default, Certbot will only renew the certificate if it has less than 30 days left before its expiry date. If the cert is not due to expire, Certbot will not renew it (nor call hooks, of course). - -### Testing results - -If you access MailCleaner's web interface, you'll see that the SSL certificate is valid. And if you run the following command in your server, you can see that the certificate being presented on STARTTLS is the new Let's Encrypt cert you just set: - - -``` -`$ openssl s_client -connect localhost:25 -starttls smtp` -``` - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/secure-open-source-antispam - -作者:[Victor Lopes][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/victorlclopes -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/email_chat_communication_message.png?itok=LKjiLnQu (Chat via email) -[2]: https://www.mailcleaner.org/ -[3]: https://letsencrypt.org/docs/challenge-types -[4]: https://www.pfsense.org/ -[5]: https://docs.netgate.com/pfsense/en/latest/certificates/acme-package.html -[6]: https://medium.com/@victorlclopes/copy-pfsense-acme-certificate-to-another-server-e42c611c47ec -[7]: https://certbot.eff.org/ -[8]: https://medium.com/@victorlclopes/how-to-install-mailcleaner-2020-01-8319c83e11ee -[9]: mailto:myemail@domain.com -[10]: mailto:victor@domain.com -[11]: https://forum.mailcleaner.org/viewtopic.php?f=5&t=3035#p12532 -[12]: https://gist.github.com/victorlclopes/f5aa081f1a9c76466aaf3f3dc5bd60b7 diff --git a/sources/tech/20200617 Internet connection sharing with NetworkManager.md b/sources/tech/20200617 Internet connection sharing with NetworkManager.md deleted file mode 100644 index cfac08c660..0000000000 --- a/sources/tech/20200617 Internet connection sharing with NetworkManager.md +++ /dev/null @@ -1,163 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Internet connection sharing with NetworkManager) -[#]: via: (https://fedoramagazine.org/internet-connection-sharing-networkmanager/) -[#]: author: (bengal https://fedoramagazine.org/author/bengal/) - -Internet connection sharing with NetworkManager -====== - -![][1] - -NetworkManager is the network configuration daemon used on Fedora and many other distributions. It provides a consistent way to configure network interfaces and other network-related aspects on a Linux machine. Among many other features, it provides a Internet connection sharing functionality that can be very useful in different situations. - -For example, suppose you are in a place without Wi-Fi and want to share your laptop’s mobile data connection with friends. Or maybe you have a laptop with broken Wi-Fi and want to connect it via Ethernet cable to another laptop; in this way the first laptop become able to reach the Internet and maybe download new Wi-Fi drivers. - -In cases like these it is useful to share Internet connectivity with other devices. On smartphones this feature is called “Tethering” and allows sharing a cellular connection via Wi-Fi, Bluetooth or a USB cable. - -This article shows how the connection sharing mode offered by NetworkManager can be set up easily; it addition, it explains how to configure some more advanced features for power users. - -### How connection sharing works - -The basic idea behind connection sharing is that there is an _upstream_ interface with Internet access and a _downstream_ interface that needs connectivity. These interfaces can be of a different type—for example, Wi-Fi and Ethernet. - -If the upstream interface is connected to a LAN, it is possible to configure our computer to act as a _bridge_; a bridge is the software version of an Ethernet switch. In this way, you “extend” the LAN to the downstream network. However this solution doesn’t always play well with all interface types; moreover, it works only if the upstream network uses private addresses. - -A more general approach consists in assigning a private IPv4 subnet to the downstream network and turning on routing between the two interfaces. In this case, NAT (Network Address Translation) is also necessary. The purpose of NAT is to modify the source of packets coming from the downstream network so that they look as if they originate from your computer. - -It would be inconvenient to configure manually all the devices in the downstream network. Therefore, you need a DHCP server to assign addresses automatically and configure hosts to route all traffic through your computer. In addition, in case the sharing happens through Wi-Fi, the wireless network adapter must be configured as an access point. - -There are many tutorials out there explaining how to achieve this, with different degrees of difficulty. NetworkManager hides all this complexity and provides a _shared_ mode that makes this configuration quick and convenient. - -### Configuring connection sharing - -The configuration paradigm of NetworkManager is based on the concept of connection (or connection profile). A connection is a group of settings to apply on a network interface. - -This article shows how to create and modify such connections using _nmcli_, the NetworkManager command line utility, and the GTK connection editor. If you prefer, other tools are available such as _nmtui_ (a text-based user interface), GNOME control center or the KDE network applet. - -A reasonable prerequisite to share Internet access is to have it available in the first place; this implies that there is already a NetworkManager connection active. If you are reading this, you probably already have a working Internet connection. If not, see [this article][2] for a more comprehensive introduction to NetworkManager. - -The rest of this article assumes you already have a Wi-Fi connection profile configured and that connectivity must be shared over an Ethernet interface _enp1s0_. - -To enable sharing, create a connection for interface enp1s0 and set the ipv4.method property to _shared_ instead of the usual _auto_: - -``` -$ nmcli connection add type ethernet ifname enp1s0 ipv4.method shared con-name local -``` - -The shared IPv4 method does multiple things: - - * enables IP forwarding for the interface; - * adds firewall rules and enables masquerading; - * starts dnsmasq as a DHCP and DNS server. - - - -NetworkManager connection profiles, unless configured otherwise, are activated automatically. The new connection you have added should be already active in the device status: - -``` -$ nmcli device -DEVICE TYPE STATE CONNECTION -enp1s0 ethernet connected local -wlp4s0 wifi connected home-wifi -``` - -If that is not the case, activate the profile manually with _nmcli connection up local_. - -### Changing the shared IP range - -Now look at how NetworkManager configured the downstream interface enp1s0: - -``` -$ ip -o addr show enp1s0 -8: enp1s0 inet 10.42.0.1/24 brd 10.42.0.255 ... -``` - -10.42.0.1/24 is the default address set by NetworkManager for a device in shared mode. Addresses in this range are also distributed via DHCP to other computers. If the range conflicts with other private networks in your environment, change it by modifying the _ipv4.addresses_ property: - -``` -$ nmcli connection modify local ipv4.addresses 192.168.42.1/24 -``` - -Remember to activate again the connection profile after any change to apply the new values: - -``` -$ nmcli connection up local - -$ ip -o addr show enp1s0 -8: enp1s0 inet 192.168.42.1/24 brd 192.168.42.255 ... -``` - -If you prefer using a graphical tool to edit connections, install the _nm-connection-editor_ package. Launch the program and open the connection to edit; then select the _Shared to other computers_ method in the _IPv4 Settings_ tab. Finally, if you want to use a specific IP subnet, click _Add_ and insert an address and a netmask. - -![][3] - -### Adding custom dnsmasq options - -In case you want to further extend the dnsmasq configuration, you can add new configuration snippets in _/etc/NetworkManager/dnsmasq-shared.d/_. For example, the following configuration: - -``` -dhcp-option=option:ntp-server,192.168.42.1 -dhcp-host=52:54:00:a4:65:c8,192.168.42.170 -``` - -tells dnsmasq to advertise a NTP server via DHCP. In addition, it assigns a static IP to a client with a certain MAC. - -There are many other useful options in the dnsmasq manual page. However, remember that some of them may conflict with the rest of the configuration; so please use custom options only if you know what you are doing. - -### Other useful tricks - -If you want to set up sharing via Wi-Fi, you could create a connection in Access Point mode, manually configure the security, and then enable connection sharing. Actually, there is a quicker way, the hotspot mode: - -``` -$ nmcli device wifi hotspot [ifname $dev] [password $pw] -``` - -This does everything needed to create a functional access point with connection sharing. The interface and password options are optional; if they are not specified, _nmcli_ chooses the first Wi-Fi device available and generates a random password. Use the ‘_nmcli device wifi show-password_‘ command to display information for the active hotspot; the output includes the password and a text-based QR code that you can scan with a phone: - -![][4] - -### What about IPv6? - -Until now this article discussed sharing IPv4 connectivity. NetworkManager also supports sharing IPv6 connectivity through DHCP prefix delegation. Using prefix delegation, a computer can request additional IPv6 prefixes from the DHCP server. Those public routable addresses are assigned to local networks via Router Advertisements. Again, NetworkManager makes all this easier through the shared IPv6 mode: - -``` -$ nmcli connection modify local ipv6.method shared -``` - -Note that IPv6 sharing requires support from the Internet Service Provider, which should give out prefix delegations through DHCP. If the ISP doesn’t provides delegations, IPv6 sharing will not work; in such case NM will report in the journal that no prefixes are available: - -``` -policy: ipv6-pd: none of 0 prefixes of wlp1s0 can be shared on enp1s0 -``` - -Also, note that the Wi-Fi hotspot command described above only enables IPv4 sharing; if you want to also use IPv6 sharing you must edit the connection manually. - -### Conclusion - -Remember, the next time you need to share your Internet connection, NetworkManager will make it easy for you. - -If you have suggestions on how to improve this feature or any other feedback, please reach out to the NM community using the [mailing list][5], the [issue tracker][6] or joining the _#nm_ IRC channel on _freenode_. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/internet-connection-sharing-networkmanager/ - -作者:[bengal][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://fedoramagazine.org/author/bengal/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/06/networkmanager-connection_sharing-816x345.png -[2]: https://www.redhat.com/sysadmin/becoming-friends-networkmanager -[3]: https://fedoramagazine.org/wp-content/uploads/2020/06/nmce.png -[4]: https://fedoramagazine.org/wp-content/uploads/2020/06/hotspot-password.png -[5]: https://mail.gnome.org/mailman/listinfo/networkmanager-list -[6]: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues diff --git a/sources/tech/20200619 Get Your Work Done Faster With These To-Do List Apps on Linux Desktop.md b/sources/tech/20200619 Get Your Work Done Faster With These To-Do List Apps on Linux Desktop.md deleted file mode 100644 index 503790687a..0000000000 --- a/sources/tech/20200619 Get Your Work Done Faster With These To-Do List Apps on Linux Desktop.md +++ /dev/null @@ -1,203 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Get Your Work Done Faster With These To-Do List Apps on Linux Desktop) -[#]: via: (https://itsfoss.com/to-do-list-apps-linux/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Get Your Work Done Faster With These To-Do List Apps on Linux Desktop -====== - -Getting work done is super important. If you have a planned list of things to do, it makes your work easier. So, it’s no surprise why we’re talking about to-do list apps on Linux here. - -Sure, you can easily utilize some of the [best note taking apps on Linux][1] for this purpose but using a dedicated to-do app helps you stay focused on work. - -You might be aware of some online services for that— but how about some [cool Linux apps][2] that you can use to create a to-do list? In this article, I’m going to highlight the best to-do list apps available for Linux. - -### Best To-Do List Applications For Desktop Linux Users - -![][3] - -I have tested these apps on Pop!_OS. I have also tried to mention the installation steps for the mentioned apps but you should check your distribution’s package manager for details. - -**Note:** The list is in no particular order of ranking - -#### 1\. Planner - -![][4] - -Planner is probably the best to-do list app I’ve across for Linux distributions. - -The best thing is — it is a free and open-source project. It provides a beautiful user interface that aims to give you a meaningful user experience. In other words, it’s simple and yet attractive. - -Not to forget, you get a gorgeous dark mode. As you can see in the screenshot above, you can also choose to add emojis to add some fun to your serious work tasks. - -Overall, it looks clean while offering features like the ability to add repeating tasks, creating separate folder/projects, sync with [todoist][5] etc. - -#### How to install it? - -If you’re using [elementary OS][6], you can find it listed in the app center. In either case, they also offer a [Flatpak package on Flathub][7]. - -Unless you have Flatpak integration in your software center, you should follow our guide to [use Flatpak on Linux][8] to get it installed. - -In case you want to explore the source code, take a look at its [GitHub page][9]. - -[Planner][10] - -### 2\. Go For It! - -![][11] - -Yet another impressive open-source to-do app for Linux which is based on [todotxt][12]. Even though it isn’t available for Ubuntu 20.04 (or later) at the time of writing this, you can still use it on machines with Ubuntu 19.10 or older. - -In addition to the ability to adding tasks, you can also specify the duration/interval of your break. So, with this to-do app, you will not just end up completing the tasks but also being productive without stressing out. - -The user interface is plain and simple with no fancy features. We also have a separate article on [Go][13] [For It][13] — if you’d like to know more about it. - -You can also use it on your Android phone using the [Simpletask Dropbox app][14]. - -#### How to install it? - -You can type the commands below to install it on any Ubuntu-based distro (prior to Ubuntu 20.04): - -``` -sudo add-apt-repository ppa:go-for-it-team/go-for-it-stable -sudo apt update -sudo apt install go-for-it -``` - -In case you want to install it on any other Linux distro, you can try the [Flatpak package on Flathub][15]. - -If you don’t know about Flatpak — take a look at our [complete guide on using Flatpak][8]. To explore more about it, you can also head to their [GitHub page][16]. - -[Go For It!][16] - -#### 3\. GNOME To Do - -![][17] - -If you’re [using Ubuntu][18] or other Linux distribution with GNOME desktop envioenment, you should already have it installed. Just search for “To Do” and you should find it. - -It’s a simple to-do app which presents the list in the form of cards and you can have separate set of tasks every card. You can add a schedule to the tasks as well. It supports extensions with which you can enable the support for todo.txt files and also integration with [todoist][5]. - -[GNOME To Do][19] - -#### 4\. Taskwarrior [Terminal-based] - -![][20] - -A command-line based open-source to-do list program “[Taskwarrior][21]” is an impressive tool if you don’t need a Graphical User Interface (GUI). It also provides cross-platform support (Windows and macOS). - -It’s quite easy to add and list tasks along with a due date as shown in the screenshot above. - -To make the most out of it, I would suggest you to follow the [official documentation][22] to know how to use it and the options/features that it offers. - -##### How to install it? - -You can find it in your respective package managers on any Linux distribution. To get it intalled in Ubuntu, you will have to type the following in the terminal: - -``` -sudo apt install taskwarrior -``` - -For Manjaro Linux, you can simply get it installed through [pamac][23] that you usually need to [install software in Manjaro Linux.][24] - -In case of any other Linux distributions, you should head to its [official download page][25] and follow the instructions. - -[Taskwarrior][21] - -#### 5\. Task Coach - -![][26] - -Task Coach is yet another open-source to-do list app that offers quite a lot of essential features. You can add sub-tasks, description to your task, add dates, notes, and a lot more things. It also supports tree view for the task lists you add and manage. - -It’s a good thing to see that it offers cross-platform support (Windows, macOS, and Android). - -Overall, it’s easy to use with tons of options and works well. - -#### How to install it? - -It offers both **.deb** and **.rpm** packages for Ubuntu and Fedora. In addition to that, you can also install it using PPA. - -You can find all the necessary files and instructions from its [official download page][27]. - -You may notice an installation error for its dependencies on Ubuntu 20.04. But, I believe it should work fine on the previous Ubuntu releases. - -In my case, it worked out fine for me when using the [AUR package][28] through Pamac on Manjaro Linux. - -[Task Coach][29] - -#### 6\. Todour - -![][30] - -A very simple open-source to-do list app that lets you utilize todo.txt file as well. You may not get a lot of options to choose from — but you get a couple of useful settings to tweak. - -It may not be the most actively developed to-do list app — but it does the work expected. - -#### How to install Todour? - -If you’re using Manjaro Linux, you can utilize pamac to install Todour from [AUR][28]. - -Unfortunately, it does not provide any **.deb** or **.rpm** package for Ubuntu/Fedora. So, you’ll have to build it from source or just explore more about it on its [GitHub page][31]. - -[Todour][32] - -### Wrapping Up - -As an interesting mention, I’d like you to take a look at [TodoList][33], which is an applet for KDE-powered distributions. Among mainstream to-do list applications, [Remember The Milk is the rare one that provides a Linux client][34]. It is not open source, though. - -I hope this list of to-do specific apps help you get things done on Linux. - -Did I miss any of your favorite to-do list apps on Linux? Feel free to let me know what you think! - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/to-do-list-apps-linux/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/note-taking-apps-linux/ -[2]: https://itsfoss.com/essential-linux-applications/ -[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/open-Source-to-do-list-apps.jpg?ssl=1 -[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/05/planner-screenshot.jpg?ssl=1 -[5]: https://todoist.com -[6]: https://elementary.io -[7]: https://flathub.org/apps/details/com.github.alainm23.planner -[8]: https://itsfoss.com/flatpak-guide/ -[9]: https://github.com/alainm23/planner -[10]: https://planner-todo.web.app/ -[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/01/go-for-it-reminders.jpg?ssl=1 -[12]: http://todotxt.com -[13]: https://itsfoss.com/go-for-it-to-do-app-in-linux/ -[14]: https://play.google.com/store/apps/details?id=nl.mpcjanssen.todotxtholo&hl=en -[15]: https://flathub.org/apps/details/de.manuel_kehl.go-for-it -[16]: https://github.com/JMoerman/Go-For-It -[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/05/to-do-gnome.jpg?ssl=1 -[18]: https://itsfoss.com/getting-started-with-ubuntu/ -[19]: https://wiki.gnome.org/Apps/Todo/Download -[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/taskwarrior.png?ssl=1 -[21]: https://taskwarrior.org/ -[22]: https://taskwarrior.org/docs/start.html -[23]: https://wiki.manjaro.org/index.php?title=Pamac -[24]: https://itsfoss.com/install-remove-software-manjaro/ -[25]: https://taskwarrior.org/download/ -[26]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/task-coach.png?ssl=1 -[27]: https://www.taskcoach.org/download.html -[28]: https://itsfoss.com/aur-arch-linux/ -[29]: https://www.taskcoach.org/index.html -[30]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/todour.png?ssl=1 -[31]: https://github.com/SverrirValgeirsson/Todour -[32]: https://nerdur.com/todour-pl/ -[33]: https://store.kde.org/p/1152230/ -[34]: https://itsfoss.com/remember-the-milk-linux/ diff --git a/sources/tech/20200709 Expand your Raspberry Pi with Arduino ports.md b/sources/tech/20200709 Expand your Raspberry Pi with Arduino ports.md deleted file mode 100644 index 611b965f5b..0000000000 --- a/sources/tech/20200709 Expand your Raspberry Pi with Arduino ports.md +++ /dev/null @@ -1,602 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Expand your Raspberry Pi with Arduino ports) -[#]: via: (https://opensource.com/article/20/7/arduino-raspberry-pi) -[#]: author: (Patrick Martins de Lima https://opensource.com/users/pattrickx) - -Expand your Raspberry Pi with Arduino ports -====== -For this project, explore Raspberry Pi port expansions using Java, -serial, and Arduino. -![Parts, modules, containers for software][1] - -As members of the maker community, we are always looking for creative ways to use hardware and software. This time, [Patrick Lima][2] and I decided we wanted to expand the Raspberry Pi's ports using an Arduino board, so we could access more functionality and ports and add a layer of protection to the device. There are a lot of ways to use this setup, such as building a solar panel that follows the sun, a home weather station, joystick interaction, and more. - -We decided to start by building a dashboard that allows the following serial port interactions: - - * Control three LEDs to turn them on and off - * Control three LEDs to adjust their light intensity - * Identify which ports are being used - * Show input movements on a joystick - * Measure temperature - - - -We also want to show all the interactions between ports, hardware, and sensors in a nice user interface (UI) like this: - -![UI dashboard][3] - -(Bruno Muniz, [CC BY-SA 4.0][4]) - -You can use the concepts in this article to build many different projects that use many different components. Your imagination is the limit! - -### 1\. Get started - -![Raspberry Pi and Arduino logos][5] - -(Bruno Muniz, [CC BY-SA 4.0][4]) - -The first step is to expand the Raspberry Pi's ports to also use Arduino ports. This is possible using Linux ARM's native serial communication implementation that enables you to use an Arduino's digital, analogical, and Pulse Width Modulation (PWM) ports to run an application on the Raspberry Pi. - -This project uses [TotalCross][6], an open source software development kit for building UIs for embedded devices, to execute external applications through the terminal and use the native serial communication. There are two classes you can use to achieve this: [Runtime.exec][7] and [PortConnector][8]. They represent different ways to execute these actions, so we will show how to use both in this tutorial, and you can decide which way is best for you. - -To start this project, you need: - - * 1 Raspberry Pi 3 - * 1 Arduino Uno - * 3 LEDs - * 2 resistors between 1K and 2.2K ohms - * 1 push button - * 1 potentiometer between 1K and 50K ohms - * 1 protoboard (aka breadboard) - * Jumpers - - - -### 2\. Set up the Arduino - -Create a communication protocol to receive messages, process them, execute the request, and send a response between the Raspberry Pi and the Arduino. This is done on the Arduino. - -#### 2.1 Define the message format - -Every message received will have the following format: - - * Indication of the function called - * Port used - * A char separator, if needed - * A value to be sent, if needed - * Indication of the message's end - - - -The following table presents the list of characters with their respective functions, example values, and descriptions of the example. The choice of characters used in this example is arbitrary and can be changed anytime. - -Characters | Function | Example | Description of the example ----|---|---|--- -* | End of the instruction | - | - -, | Separator | - | - -# | Set mode | #8,0* | Pin 8 input mode -< | Set digital value | <1,0* | Set pin 1 low -> | Get digital value | >13* | Get value pin 13 -+ | Get PWM value | +6,250* | Set pin 6 value 250 -- | Get analogic value | -14* | Get value pin A0 - -#### 2.2 Source code - -The following source code implements the communication protocol specified above. It must be sent to the Arduino, so it can interpret and execute messages' commands: - - -``` -void setup() { - Serial.begin(9600); - Serial.println("Connected"); - Serial.println("Waiting command..."); -} - -void loop() { -String text=""; -char character; -String pin=""; -String value="0"; -char separator='.'; -char inst='.'; - - while(Serial.available()){ // verify RX is getting data -   delay(10); -   character= Serial.read(); -   if(character=='*'){ -     action(inst,pin,value); -     break; -    } -    else { -     text.concat(character);} - -   if(character==',') { -     separator=character; -    -   if(inst=='.'){ -     inst = character;} -   else if(separator!=',' && character!=inst ){ -     pin.concat(character);} -   else if (character!=separator && character!=inst ){ -     value.concat(character);} - } -} - -void action(char instruction, String pin, String value){ - if (instruction=='#'){//pinMode -   pinMode(pin.toInt(),value.toInt()); - } - - if (instruction=='<'){//digitalWrite -   digitalWrite(pin.toInt(),value.toInt()); - } - - if (instruction=='>'){ //digitalRead -   String aux= pin+':'+String(digitalRead(pin.toInt())); -   Serial.println(aux); - } - - if (instruction=='+'){ // analogWrite = PWM -   analogWrite(pin.toInt(),value.toInt()); - } - - if (instruction=='-'){ // analogRead -   String aux= pin+':'+String(analogRead(pin.toInt())); -   Serial.println(aux); - } -} -``` - -#### 2.3 Build the electronics - -Define what you need to test to check communication with the Arduino and ensure the inputs and outputs are responding as expected: - - * LEDs are connected with positive logic. Connect to the GND pin through a resistor and activate it with the digital port I/O 2 and PWM 3. - * The button has a pull-down resistor connected to the digital port I/O 4, which sends a signal of 0 if not pressed and 1 if pressed. - * The potentiometer is connected with the central pin to the analog input A0 with one of the side pins on the positive and the other on the negative. - - - -![Connecting the hardware][9] - -(Bruno Muniz, [CC BY-SA 4.0][4]) - -#### 2.4 Test communications - -Send the code in section 2.2 to the Arduino. Open the serial monitor and check the communication protocol by sending the commands below: - - -``` -#2,1*<2,1*>2* -#3,1*+3,10* -#4,0*>4* -#14,0*-14* -``` - -This should be the result in the serial monitor: - -![Testing communications in Arduino][10] - -(Bruno Muniz, [CC BY-SA 4.0][4]) - -One LED on the device should be on at maximum intensity and the other at a lower intensity. - -![LEDs lit on board][11] - -(Bruno Muniz, [CC BY-SA 4.0][4]) - -Pressing the button and changing the position of the potentiometer when sending reading commands will display different values. For example, turn the potentiometer to the positive side and press the button. With the button still pressed, send the commands: - - -``` ->4* --14* -``` - -Two lines should appear: - -![Testing communications in Arduino][12] - -(Bruno Muniz, [CC BY-SA 4.0][4]) - -### 3\. Set up the Raspberry Pi - -Use a Raspberry Pi to access the serial port via the terminal using the `cat` command to read the entries and the `echo` command to send the message. - -#### 3.1 Do a serial test - -Connect the Arduino to one of the USB ports on the Raspberry Pi, open the terminal, and execute this command: - - -``` -`cat /dev/ttyUSB0 9600` -``` - -This will initiate the connection with the Arduino and display what is returned to the serial. - -![Testing serial on Arduino][13] - -(Bruno Muniz, [CC BY-SA 4.0][4]) - -To test sending commands, open a new terminal window (keeping the previous one open), and send this command: - - -``` -`echo "command" > /dev/ttyUSB0 9600` -``` - -You can send the same commands used in section 2.4. - -You should see feedback in the first terminal along with the same result you got in section 2.4: - -![Testing serial on Arduino][14] - -(Bruno Muniz, [CC BY-SA 4.0][4]) - -### 4\. Create the graphical user interface - -The UI for this project will be simple, as the objective is just to show the ports expansion using the serial. Another article will use TotalCross to create a high-quality GUI for this project and start the application backend (working with sensors), as shown in the dashboard image at the top of this article. - -This first part uses two UI components: a Listbox and an Edit. These build a connection between the Raspberry Pi and the Arduino and test that everything is working as expected. - -Simulate the terminal where you put the commands and watch for answers: - - * Edit is used to send messages. Place it at the bottom with a FILL width that extends the component to the entire width of the screen. - * Listbox is used to show results, e.g., in the terminal. Add it at the TOP position, starting at the LEFT side, with a width equal to Edit and a FIT height to vertically occupy all space not filled by Edit. - - - - -``` -package com.totalcross.sample.serial; - -import totalcross.sys.Settings; -import totalcross.ui.Edit; -import totalcross.ui.ListBox; -import totalcross.ui.MainWindow; -import totalcross.ui.gfx.Color; - -public class SerialSample extends MainWindow { -   ListBox Output; -   Edit Input; -   public SerialSample() { -       setUIStyle(Settings.MATERIAL_UI); -   } - -   @Override -   public void initUI() { -       Input = new Edit(); -       add(Input, LEFT, BOTTOM, FILL, PREFERRED); -       Output = new ListBox(); -       Output.setBackForeColors([Color][15].BLACK, [Color][15].WHITE); -       add(Output, LEFT, TOP, FILL, FIT); -   } -} -``` - -It should look like this: - -![UI][16] - -(Bruno Muniz, [CC BY-SA 4.0][4]) - -### 5\. Set up serial communication - -As stated above, there are two ways to set up serial communication: Runtime.exec and PortConnector. - -#### 5.1 Option 1: Use Runtime.exec - -The `java.lang.Runtime` class allows the application to create a connection interface with the environment where it is running. It allows the program to use the Raspberry Pi's native serial communication. - -Use the same commands you used in section 3.1, but now use the Edit component on the UI to send the commands to the device. - -##### Read the serial - -The application must constantly read the serial, and if a value is returned, add it to the Listbox using threads. Threads are a great way to work with processes in the background without blocking user interaction. - -The following code creates a new process on this thread that executes the `cat` command, tests the serial, and starts an infinite loop to check if something new is received. If something is received, the value is added to the next line of the Listbox component. This process will continue to run as long as the application is running: - - -``` -new [Thread][17] () { -   @Override -   public void run() { -       try { -           [Process][18] Runexec2 = [Runtime][19].getRuntime().exec("cat /dev/ttyUSB0 9600\n"); -           LineReader lineReader = new LineReader(Stream.asStream(Runexec2.getInputStream())); -           [String][20] input; -          -           while (true) { -               if ((input = lineReader.readLine()) != null) { -                   Output.add(input); -                   Output.selectLast(); -                   Output.repaintNow(); -               } -           } -         } catch ([IOException][21] ioe) { -            ioe.printStackTrace(); -         } -       } -   }.start(); -} -``` - -##### Send commands - -Sending commands is a simpler process. It happens whenever you press **Enter** on the Edit component. - -To forward the commands to the device, as shown in section 3.1, you must instantiate a new terminal. For that, the Runtime class must execute a `sh` command on Linux: - - -``` -try{ -   Runexec = [Runtime][19].getRuntime().exec("sh").getOutputStream()        }catch ([IOException][21] ioe) { -   ioe.printStackTrace(); -} -``` - -After the user writes the command in Edit and presses **Enter**, the application triggers an event that executes the `echo` command with the value indicated in Edit: - - -``` -Input.addKeyListener(new [KeyListener][22]() { - -   @Override -   public void specialkeyPressed([KeyEvent][23] e) { -       if (e.key == SpecialKeys.ENTER) { -           [String][20] s = Input.getText(); -           Input.clear(); -           try { -               Runexec.write(("echo \"" + s + "\" > /dev/ttyUSB0 9600\n").getBytes()); -           } catch ([IOException][21] ioe) { -           ioe.printStackTrace(); -           } -       } -   } - -   @Override -   public void keyPressed([KeyEvent][23] e) {} //auto-generate code -   @Override -   public void actionkeyPressed([KeyEvent][23] e) {} //auto-generate code -}); -``` - -Run the application on the Raspberry Pi with the Arduino connected and send the commands for testing. The result should be: - -![Testing application running on Raspberry Pi][24] - -(Bruno Muniz, [CC BY-SA 4.0][4]) - -##### Runtime.exec source code - -Following is the source code with all parts explained. It includes the thread that will read the serial on line 31 and the `KeyListener` that will send the commands on line 55: - - -``` -package com.totalcross.sample.serial; -import totalcross.ui.MainWindow; -import totalcross.ui.event.KeyEvent; -import totalcross.ui.event.KeyListener; -import totalcross.ui.gfx.Color; -import totalcross.ui.Edit; -import totalcross.ui.ListBox; -import java.io.IOException; -import java.io.OutputStream; -import totalcross.io.LineReader; -import totalcross.io.Stream; -import totalcross.sys.Settings; -import totalcross.sys.SpecialKeys; - -public class SerialSample extends MainWindow { -   [OutputStream][25] Runexec; -   ListBox Output; - -   public SerialSample() { -       setUIStyle(Settings.MATERIAL_UI); -   } - -   @Override -   public void initUI() { -       Edit Input = new Edit(); -       add(Input, LEFT, BOTTOM, FILL, PREFERRED); -       Output = new ListBox(); -       Output.setBackForeColors([Color][15].BLACK, [Color][15].WHITE); -       add(Output, LEFT, TOP, FILL, FIT); -       new [Thread][17]() { -           @Override -           public void run() { -               try { -                   [Process][18] Runexec2 = [Runtime][19].getRuntime().exec("cat /dev/ttyUSB0 9600\n"); -                   LineReader lineReader = new -                   LineReader(Stream.asStream(Runexec2.getInputStream())); -                   [String][20] input; - -                   while (true) { -                       if ((input = lineReader.readLine()) != null) { -                           Output.add(input); -                           Output.selectLast(); -                           Output.repaintNow(); -                       } -                   } - -               } catch ([IOException][21] ioe) { -                   ioe.printStackTrace(); -               } -           } -       }.start(); - -       try { -           Runexec = [Runtime][19].getRuntime().exec("sh").getOutputStream(); -       } catch ([IOException][21] ioe) { -           ioe.printStackTrace(); -       } - -       Input.addKeyListener(new [KeyListener][22]() { -           @Override -           public void specialkeyPressed([KeyEvent][23] e) { -               if (e.key == SpecialKeys.ENTER) { -                   [String][20] s = Input.getText(); -                   Input.clear(); -                   try { -                       Runexec.write(("echo \"" + s + "\" > /dev/ttyUSB0 9600\n").getBytes()); -                   } catch ([IOException][21] ioe) { -                       ioe.printStackTrace(); -                   } -               } -           } - -           @Override -           public void keyPressed([KeyEvent][23] e) { -           } -           @Override -           public void actionkeyPressed([KeyEvent][23] e) { -           } -      }); -   } -} -``` - -#### 5.2 Option 2: Use PortConnector - -PortConnector is specifically for working with serial communication. If you want to follow the original example, you can skip this section, as the intention here is to show another, easier way to work with serial. - -Change the original source code to work with PortConnector: - - -``` -package com.totalcross.sample.serial; -import totalcross.io.LineReader; -import totalcross.io.device.PortConnector; -import totalcross.sys.Settings; -import totalcross.sys.SpecialKeys; -import totalcross.ui.Edit; -import totalcross.ui.ListBox; -import totalcross.ui.MainWindow; -import totalcross.ui.event.KeyEvent; -import totalcross.ui.event.KeyListener; -import totalcross.ui.gfx.Color; - -public class SerialSample extends MainWindow { -   PortConnector pc; -   ListBox Output; - -   public SerialSample() { -       setUIStyle(Settings.MATERIAL_UI); -   } - -   @Override -   public void initUI() { -       Edit Input = new Edit(); -       add(Input, LEFT, BOTTOM, FILL, PREFERRED); -       Output = new ListBox(); -       Output.setBackForeColors([Color][15].BLACK, [Color][15].WHITE); -       add(Output, LEFT, TOP, FILL, FIT); -       new [Thread][17]() { -           @Override -           public void run() { -               try { -                   pc = new PortConnector(PortConnector.USB, 9600); -                   LineReader lineReader = new LineReader(pc); -                   [String][20] input; -                   while (true) { -                       if ((input = lineReader.readLine()) != null) { -                           Output.add(input); -                           Output.selectLast(); -                           Output.repaintNow(); -                       } -                   } -               } catch (totalcross.io.[IOException][21] ioe) { -                   ioe.printStackTrace(); -               } -           } -       }.start(); -       Input.addKeyListener(new [KeyListener][22]() { -           @Override -           public void specialkeyPressed([KeyEvent][23] e) { -               if (e.key == SpecialKeys.ENTER) { -                   [String][20] s = Input.getText(); -                   Input.clear(); -                   try { -                       pc.writeBytes(s); -                   } catch (totalcross.io.[IOException][21] ioe) { -                       ioe.printStackTrace(); -                   } -               } -           } - -           @Override -           public void keyPressed([KeyEvent][23] e) { -           } - -           @Override -           public void actionkeyPressed([KeyEvent][23] e) { -           } -      }); -  } -} -``` - -You can find all the code in the [project's repository][26]. - -### 6\. Next steps - -This article shows how to use Raspberry Pi serial ports with Java by using either the Runtime or PortConnector classes. You can also call external files in other languages and create countless other projects—like a water quality monitoring system for an aquarium with temperature measurement via the analog inputs, or a chicken brooder with temperature and humidity regulation and a servo motor to rotate the eggs. - -A future article will use the PortConnector implementation (because it is focused on serial connection) to finish the communications with all sensors. It will also add a digital input and complete the UI. - -Here are some references for more reading: - - * [Get started with TotalCross][27] - * [TotalCross PortConnector class][8] - * [Running C++ applications with TotalCross][7] - * [VSCode TotalCross Project Extension plugin][28] - - - -After you connect your Arduino and Raspberry Pi, please leave comments below with your results. We'd love to read them! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/arduino-raspberry-pi - -作者:[Patrick Martins de Lima][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/pattrickx -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/containers_modules_networking_hardware_parts.png?itok=rPpVj92- (Parts, modules, containers for software) -[2]: https://github.com/pattrickx -[3]: https://opensource.com/sites/default/files/uploads/gui-dashboard.png (UI dashboard) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: https://opensource.com/sites/default/files/uploads/raspberrypi_arduino.png (Raspberry Pi and Arduino logos) -[6]: https://totalcross.com/ -[7]: https://learn.totalcross.com/documentation/guides/running-c++-applications-with-totalcross -[8]: https://rs.totalcross.com/doc/totalcross/io/device/PortConnector.html -[9]: https://opensource.com/sites/default/files/uploads/connecting-electronics.png (Connecting the hardware) -[10]: https://opensource.com/sites/default/files/uploads/communication-test-result.png (Testing communications in Arduino) -[11]: https://opensource.com/sites/default/files/uploads/leds.jpg (LEDs lit on board) -[12]: https://opensource.com/sites/default/files/uploads/communication-test-result2.png (Testing communications in Arduino) -[13]: https://opensource.com/sites/default/files/uploads/serial-test.png (Testing serial on Arduino) -[14]: https://opensource.com/sites/default/files/uploads/serial-test2.png (Testing serial on Arduino) -[15]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+color -[16]: https://opensource.com/sites/default/files/uploads/ui_0.png (UI) -[17]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+thread -[18]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+process -[19]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+runtime -[20]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string -[21]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+ioexception -[22]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+keylistener -[23]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+keyevent -[24]: https://opensource.com/sites/default/files/uploads/test-commands.png (Testing application running on Raspberry Pi) -[25]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+outputstream -[26]: https://github.com/pattrickx/TotalCrossSerialCommunication -[27]: https://learn.totalcross.com/documentation/get-started/ -[28]: https://marketplace.visualstudio.com/items?itemName=Italo.totalcross diff --git a/sources/tech/20200718 Tricks with Pseudorandom Number Generators.md b/sources/tech/20200718 Tricks with Pseudorandom Number Generators.md deleted file mode 100644 index 0fd6ccc464..0000000000 --- a/sources/tech/20200718 Tricks with Pseudorandom Number Generators.md +++ /dev/null @@ -1,123 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Tricks with Pseudorandom Number Generators) -[#]: via: (https://theartofmachinery.com/2020/07/18/prng_tricks.html) -[#]: author: (Simon Arneaud https://theartofmachinery.com) - -Tricks with Pseudorandom Number Generators -====== - -Pseudorandom number generators (PRNGs) are often treated like a compromise: their output isn’t as good as real random number generators, but they’re cheap and easy to use on computer hardware. But a special feature of PRNGs is that they’re _reproducible_ sources of random-looking data: - -``` -import std.random; -import std.stdio; - -void main() -{ - // Seed a PRNG and generate 10 pseudo-random numbers - auto rng = Random(42); - foreach (_; 0..10) write(uniform(0, 10, rng), ' '); - writeln(); - // Reset the PRNG, and the same sequence is generated again - rng = Random(42); - foreach (_; 0..10) write(uniform(0, 10, rng), ' '); - writeln(); - - // Output: - // 2 7 6 4 6 5 0 4 0 3 - // 2 7 6 4 6 5 0 4 0 3 -} -``` - -This simple fact enables a few neat tricks. - -A couple of famous examples come from the gaming industry. The classic example is the space trading game Elite, which was originally written for 8b BBC Micros in the early 80s. It was a totally revolutionary game, but just one thing that amazed fans was its complex universe of thousands of star systems. That was something you just didn’t normally get in games written for machines with kilobytes of RAM total. The trick was to generate the universe with a PRNG seeded with a small value. There was no need to store the universe in memory because the game could regenerate each star system on demand, repeatedly and deterministically. - -PRNGs are now widely exploited for recording games for replays. You don’t need to record every frame of the game world if you can just record the PRNG seed and all the player actions. (Like most things in software, [actually implementing that can be surprisingly challenging][1].) - -### Random mappings - -In machine learning, you often need a mapping from things to highly dimensional random unit vectors (random vectors of length 1). Let’s get more specific and say you’re processing documents for topic/sentiment analysis or similarity. In this case you’ll generate a random vector for each word in the dictionary. Then you can create a vector for each document by adding up the vectors for each word in it (with some kind of weighting scheme, in practice). Similar documents will end up with similar vectors, and you can use linear algebra tricks to uncover deeper patterns (read about [latent semantic analysis][2] if you’re interested). - -An obvious way to get a mapping between words and random vectors is to just initially generate a vector for each word, and create a hash table for looking them up later. Another way is to generate the random vectors on demand using a PRNG seeded by a hash of the word. Here’s a toy example: - -``` -/+ dub.sdl: - name "prngvecdemo" - dependency "mir-random" version="~>2.2.14" -+/ -// Demo of mapping words to random vectors with PRNGs -// Run me with "dub prngvecdemo.d" - -import std.algorithm; -import std.stdio; - -// Using the Mir numerical library https://www.libmir.org/ -import mir.random.engine.xoshiro; -import mir.random.ndvariable; - -enum kNumDims = 512; -alias RNG = Xoroshiro128Plus; -// D's built-in hash happens to be MurmurHash, but we just need it to be suitable for seeding the PRNG -static assert("".hashOf.sizeof == 8); - -void main() -{ - auto makeUnitVector = sphereVar!float(); - auto doc = "a lot of words"; - - float[kNumDims] doc_vec, word_vec; - - doc_vec[] = 0.0; - foreach (word; doc.splitter) // Not bothering with whitening or stop word filtering for this demo - { - // Create a PRNG seeded with the hash of the word - auto rng = RNG(word.hashOf); - // Generate a unit vector for the word using the PRNG - // We'll get the same vector every time we see the same word - makeUnitVector(rng, word_vec); - // Add it to the document vector (no weighting for simplicity) - doc_vec[] += word_vec[]; - } - - writeln(doc_vec); -} -``` - -This kind of trick isn’t the answer to everything, but it has some uses. Obviously, it can be useful if you’re working with more data than you have RAM (though you might still cache some of the generated data). Another use case is processing a large dataset with parallel workers. In the document example, you can get workers to “agree” on what the vector for each word should be, without data synchronisation, and without needing to do an initial pass over the data to build a dictionary of words. I’ve used this trick with experimental code, just because I was too lazy to add an extra stage to the data pipeline. In some applications, recomputing data on the fly can even be faster than fetching it from a very large lookup table. - -### An ode to Xorshift - -You might have noticed I used `Xoroshiro128Plus`, a variant of the Xorshift PRNG. The Mersenne Twister is a de facto standard PRNG in some computing fields, but I’m a bit of a fan of the Xorshift family. The basic Xorshift engines are fast and pretty good, and there are variants that are still fast and have excellent output quality. But the big advantage compared to the Mersenne Twister is the state size. The Mersenne Twister uses a pool of 2496 bytes of state, whereas most of the Xorshift PRNGs can fit into one or two machine `int`s. - -The small state size has a couple of advantages for this kind of “on demand” PRNG usage: One is that thoroughly initialising a big state from a small seed takes work (some people “warm up” a Mersenne Twister by throwing away several of the initial outputs, just to be sure). The second is that the small size of the PRNGs makes them cheap enough to use in places you wouldn’t think of using a Mersenne Twister. - -### Random data structures made reliable - -Some data structures and algorithms use randomisation. An example is a treap, which is a binary search tree that uses a randomised heap for balancing. Treaps are much less popular than AVL trees or red-black trees, but they’re easier to implement correctly because you end up with fewer edge cases. They’re also good enough for most use cases. That makes them a good choice for application-specific “augmented” BSTs. But for argument purposes, it’s just a real example of a data structure that happens to use randomness as an implementation detail. - -Randomisation comes with a major drawback: it’s a pain when testing and debugging. Test failures aren’t reproducible for debugging if real randomness is used. If you have any experience with testing, you’ll have seen this and you’ll know it’s a good idea to use a PRNG instead. - -Using a global PRNG mostly works, but it couples the treaps through one shared PRNG. That accidental coupling can lead to test flakes if you’re running several tests at once, unless you’re careful to use one PRNG per thread and reset it for every test. Even then you can get Heisenbugs in your non-test code. - -What about dependency injection? Making every treap method require a reference to a PRNG works, but it leaks the implementation detail throughout your code. You could make the treap take a reference to a PRNG in its constructor, but that implies adding an extra pointer to the data structure. If you’re going to do that, why not just make every treap embed its own 32b or 64b Xorshift PRNG? Embedding the PRNG into the treap makes it deterministic and reproducible in a way that’s encapsulated and decoupled from everything else. - --------------------------------------------------------------------------------- - -via: https://theartofmachinery.com/2020/07/18/prng_tricks.html - -作者:[Simon Arneaud][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://theartofmachinery.com -[b]: https://github.com/lujun9972 -[1]: https://technology.riotgames.com/news/determinism-league-legends-introduction -[2]: https://en.wikipedia.org/wiki/Latent_semantic_analysis diff --git a/sources/tech/20200730 Monitor systemd journals via email.md b/sources/tech/20200730 Monitor systemd journals via email.md deleted file mode 100644 index ec60a5368b..0000000000 --- a/sources/tech/20200730 Monitor systemd journals via email.md +++ /dev/null @@ -1,284 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Monitor systemd journals via email) -[#]: via: (https://opensource.com/article/20/7/systemd-journals-email) -[#]: author: (Kevin P. Fleming https://opensource.com/users/kpfleming) - -Monitor systemd journals via email -====== -Get a daily email with noteworthy output from your systemd journals with -journal-brief. -![Note taking hand writing][1] - -Modern Linux systems often use systemd as their init system and manager for jobs and many other functions. Services managed by systemd generally send their output (of all forms: warnings, errors, informational messages, and more) to the systemd journal, not to traditional logging systems like syslog. - -In addition to services, Linux systems often have many scheduled jobs (traditionally called cron jobs, even if the system doesn't use `cron` to run them), and these jobs may either send their output to the logging system or allow the job scheduler to capture the output and deliver it via email. - -When managing multiple systems, you can install and configure a centralized log-capture system to monitor their behavior, but the complexity of centralized systems can make them hard to manage. - -A simpler solution is to have each system directly send "interesting" output to the administrator(s) by email. For systems using systemd, this can be done using Tim Waugh's [journal-brief][2] tool. This tool _almost_ served my needs when I discovered it recently, so, in typical open source fashion, I contributed various patches to add email support to the project. Tim worked with me to get them merged, and now I can use the tool to monitor the 20-plus systems I manage as simply as possible. - -Now, early each morning, I receive between 20 and 23 email messages: most of them contain a filtered view of each machine's entire systemd journal (with warnings or more serious messages), but a few are logs generated by scheduled ZFS snapshot-replication jobs that I use for backups. In this article, I'll show you how to set up similar messages. - -### Install journal-brief - -Although journal-brief is available in many Linux package repositories, the packaged versions will not include email support because that was just added recently. That means you'll need to install it from PyPI; I'll show you how to manually install it into a Python virtual environment to avoid interfering with other parts of the installed system. If you have a favorite tool for doing this, feel free to use it. - -Choose a location for the virtual environment; in this article, I'll use `/opt/journal-brief` for simplicity. - -Nearly all the commands in this tutorial must be executed with root permissions or the equivalent (noted by the `#` prompt). However, it is possible to install the software in a user-owned directory, grant that user permission to read from the journal, and install the necessary units as systemd `user` units, but that is not covered in this article. - -Execute the following to create the virtual environment and install journal-brief and its dependencies: - - -``` -$ python3 -m venv /opt/journal-brief -$ source /opt/journal-brief/bin/activate -$ pip install ‘journal-brief>=1.1.7’ -$ deactivate -``` - -In order, these commands will: - - 1. Create `/opt/journal-brief` and set up a Python 3.x virtual environment there - 2. Activate the virtual environment so that subsequent Python commands will use it - 3. Install journal-brief; note that the single-quotes are necessary to keep the shell from interpreting the `>` character as a redirection - 4. Deactivate the virtual environment, returning the shell back to the original Python installation - - - -Also, create some directories to store journal-brief configuration and state files with: - - -``` -$ mkdir /etc/journal-brief -$ mkdir /var/lib/journal-brief -``` - -### Configure email requirements - -While configuring email clients and servers is outside the scope of this article, for journal-brief to deliver email, you will need to have one of the two supported mechanisms configured and operational. - -#### Option 1: The `mail` command - -Many systems have a `mail` command that can be used to send (and read) email. If such a command is installed on your system, you can verify that it is configured properly by executing a command like: - - -``` -`$ echo "Message body" | mail --subject="Test message" {your email address here}` -``` - -If the message arrives in your mailbox, you're ready to proceed using this type of mail delivery in journal-brief. If not, you can either troubleshoot and correct the configuration or use SMTP delivery. - -To control the generated email messages' attributes (e.g., From address, To address, Subject) with the `mail` command method, you must use the command-line options in your system's mailer program: journal-brief will only construct a message's body and pipe it to the mailer. - -#### Option 2: SMTP delivery - -If you have an SMTP server available that can accept email and forward it to your mailbox, journal-brief can communicate directly with it. In addition to plain SMTP, journal-brief supports Transport Layer Security (TLS) connections and authentication, which means it can be used with many hosted email services (like Fastmail, Gmail, Pobox, and others). You will need to obtain a few pieces of information to configure this delivery mode: - - * SMTP server hostname - * Port number to be used for message submission (it defaults to port 25, but port 587 is commonly used) - * TLS support (optional or required) - * Authentication information (username and password/token, if required) - - - -When using this delivery mode, journal-brief will construct the entire message before submitting it to the SMTP server, so the From address, To address, and Subject will be supplied in journal-brief's configuration. - -### Set up configuration and cursor files - -Journal-brief uses YAML-formatted configuration files; it uses one file per desired combination of filtering parameters, delivery options, and output formats. For this article, these files are stored in `/etc/journal-brief`, but you can store them in any location you like. - -In addition to the configuration files, journal-brief creates and manages **cursor** files, which allow it to keep track of the last message in its output. Using one cursor file for each configuration file ensures that no journal messages will be lost, in contrast to a time-based log-delivery system, which might miss messages if a scheduled delivery job can't run to completion. For this article, the cursor files will be stored in `/var/lib/journal-brief` (you can store the cursor files in any location you like, but make sure not to store them in any type of temporary filesystem, or they'll be lost). - -Finally, journal-brief has extensive filtering and formatting capabilities; I'll describe only the most basic options, and you can learn more about its capabilities in the documentation for journal-brief and [systemd.journal-fields][3]. - -### Configure a daily email with interesting journal entries - -This example will set up a daily email to a system administrator named Robin at `robin@domain.invalid` from a server named `storage`. Robin's mail provider offers SMTP message submission through port 587 on a server named `mail.server.invalid` but does not require authentication or TLS. The email will be sent from `storage-server@domain.invalid`, so Robin can easily filter the incoming messages or generate alerts from them. - -Robin has the good fortune to live in Fiji, where the workday starts rather late (around 10:00am), so there's plenty of time every morning to read emails of interesting journal entries. This example will gather the entries and deliver them at 8:30am in the local time zone (Pacific/Fiji). - -#### Step 1: Configure journal-brief - -Create a text file at `/etc/journal-brief/daily-journal-email.yml` with these contents: - - -``` -cursor-file: '/var/lib/journal-brief/daily-journal-email' -output: - - 'short' -  - ‘systemd’ -inclusions: -  - PRIORITY: 'warning' -email: -  suppress_empty: false -  smtp: -    to: '”Robin” <[robin@domain.invalid][4]>' -    from: '"Storage Server" <[storage-server@domain.invalid][5]>' -    subject: 'daily journal' -    host: 'mail.server.invalid' -    port: 587 -``` - -This configuration causes journal-brief to: - - * Store the cursor at the path configured as `cursor-file` - * Format journal entries using the `short` format (one line per entry) and provide a list of any systemd units that are in the `failed` state - * Include journal entries from _any_ service unit (even the Linux kernel) with a priority of `warning`, `error`, or `emergency` - * Send an email even if there are no matching journal entries, so Robin can be sure that the storage server is still operating and has connectivity - * Send the email using SMTP - - - -You can test this configuration file by executing a journal-brief command: - - -``` -`$ journal-brief --conf /etc/journal-brief/daily-journal-email` -``` - -Journal-brief will scan the systemd journal for all new messages (yes, _all_ of the messages it has never seen before), identify any that match the priority filter, and format them into an email that it sends to Robin. If the storage server has been operational for months (or years) and the systemd journal has never been purged, this could produce a very large email message. In addition to Robin not appreciating such a large message, Robin's email provider may not be willing to accept it, so you can generate a shorter message by executing this command: - - -``` -`$ journal-brief -b --conf /etc/journal-brief/daily-journal-email` -``` - -Adding the `-b` argument tells journal-brief to inspect only the systemd journal entries from the most recent system boot and ignore any that are older. - -After journal-brief sends the email to the SMTP server, it writes a string into the cursor file so that the next time it runs using the same cursor file, it will know where to start in the journal. If the process fails for any reason (e.g., journal entry gathering, entry formatting, or SMTP delivery), the cursor file will _not_ be updated, which means the next time it uses the cursor file, the entries that would have been in the failed email will be included in the next email instead. - -#### Step 2: Set up the systemd service unit - -Create a text file at `/etc/systemd/system/daily-journal-email.service` with: - - -``` -[Unit] -Description=Send daily journal report - -[Service] -ExecStart=/opt/journal-brief/bin/journal-brief --conf /etc/journal-brief/%N.yml -Type=oneshot -``` - -This service unit will run journal-brief and specify a configuration file with the same name as the unit file with the suffix removed, which is what `%N` supplies. Since this service will be started by a timer (see step 3), there is no need to enable or manually start it. - -#### Step 3: Set up the systemd timer unit - -Create a text file at `/etc/systemd/system/daily-journal-email.timer` with: - - -``` -[Unit] -Description=Trigger daily journal email report - -[Timer] -OnCalendar=*-*-* 08:30:00 Pacific/Fiji - -[Install] -WantedBy=multi-user.target -``` - -This timer will start the `daily-journal-email` service unit (because its name matches the timer name) every day at 8:30am in the Pacific/Fiji time zone. If the time zone was not specified, the timer would trigger the service at 8:30am in the system time zone configured on the `storage` server. - -To make this timer start every time the system boots, it is `WantedBy` by the multi-user target. To enable and start the timer: - - -``` -$ systemctl enable daily-journal-email.timer -$ systemctl start daily-journal-email.timer -$ systemctl list-timers daily-journal-email.timer -``` - -The last command will display the timer's status, and the `NEXT` column will indicate the next time the timer will start the service. - -To learn more about systemd timers and building schedules for them, read [_Use systemd timers instead of cronjobs_][6]. - -Now the configuration is complete, and Robin will receive a daily email of interesting journal entries. - -### Monitor the output of a specific service - -The `storage` server has some filesystems on solid-state storage devices (SSD) and runs Fedora Linux. Fedora has an `fstrim` service that is scheduled to run once per week (using a systemd timer, as in the example above). Robin would like to see the output generated by this service, even if it doesn't generate any warnings or errors. While this output will be included in the daily journal email, it will be intermingled with other journal entries, and Robin would prefer to have the output in its own email message. - -#### Step 1: Configure journal-brief - -Create a text file at `/etc/journal-brief/fstrim.yml` with: - - -``` -cursor-file: '/var/lib/journal-brief/fstrim' -output: 'short' -inclusions: -  - _SYSTEMD_UNIT: -   - ‘fstrim.service’ -email: -  suppress_empty: false -  smtp: -    to: '”Robin” <[robin@domain.invalid][4]>' -    from: '"Storage Server" <[storage-server@domain.invalid][5]>' -    subject: 'weekly fstrim' -    host: 'mail.server.invalid' -    port: 587 -``` - -This configuration is similar to the previous example, except that it will include _all_ entries related to a systemd unit named `fstrim.service`, regardless of their priority levels, and will include _only_ entries related to that service. - -### Step 2: Modify the systemd service unit - -Unlike in the previous example, you don't need to create a systemd service unit or timer, since they already exist. Instead, you want to add behavior to the existing service unit by using the systemd "drop-in file" mechanism (to avoid modifying the system-provided unit file). - -First, ensure that the `EDITOR` environment variable is set to your preferred text editor (otherwise you'll get the default editor on your system), and execute: - - -``` -`$ systemctl edit fstrim.service` -``` - -Note that this does not edit the existing service unit file; instead, it opens an editor session to create a drop-in file (located at `/etc/systemd/system/fstrim.service.d/override.conf`). - -Paste these contents into the editor and save the file: - - -``` -[Service] -ExecStopPost=/opt/journal-brief/bin/journal-brief --conf /etc/journal-brief/%N.yml -``` - -After you exit the editor, the systemd configuration will reload automatically (which is one benefit of using `systemctl edit` instead of creating the file directly). Like in the previous example, this drop-in uses `%N` to avoid duplicating the service name; this means that the drop-in contents can be applied to any service on the system, as long as the appropriate configuration file is created in `/etc/journal-brief`. - -Using `ExecStopPost` will make journal-brief run after any attempt to run the `fstrim.service`, whether or not it's successful. This is quite useful, as the email will be generated even if the `fstrim.service` cannot be started (for example, if the `fstrim` command is missing or not executable). - -Please note that this technique is primarily applicable to systemd services that run to completion before exiting (in other words, not background or daemon processes). If the `Type` in the `Service` section of the service's unit file is `forking`, then journal-brief will not execute until the specified service has stopped (either manually or by a system target change, like shutdown). - -The configuration is complete; Robin will receive an email after every attempt to start the `fstrim` service; if the attempt is successful, then the email will include the output generated by the service. - -### Monitor without extra effort - -With this setup, you can monitor the health of your Linux systems that use systemd without needing to set up any centralized monitoring or logging tools. I find this monitoring method quite effective, as it draws my attention to unusual events on the servers I maintain without requiring any additional effort. - -Special thanks to Tim Waugh for creating the journal-brief tool and being willing to accept a rather large patch to add direct email support rather than running journal-brief through cron. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/systemd-journals-email - -作者:[Kevin P. Fleming][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/kpfleming -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/note-taking.jpeg?itok=fiF5EBEb (Note taking hand writing) -[2]: https://github.com/twaugh/journal-brief -[3]: https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html -[4]: mailto:robin@domain.invalid -[5]: mailto:storage-server@domain.invalid -[6]: https://opensource.com/article/20/7/systemd-timers diff --git a/sources/tech/20200902 Open ports and route traffic through your firewall.md b/sources/tech/20200902 Open ports and route traffic through your firewall.md deleted file mode 100644 index 643aa8c0dc..0000000000 --- a/sources/tech/20200902 Open ports and route traffic through your firewall.md +++ /dev/null @@ -1,176 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Open ports and route traffic through your firewall) -[#]: via: (https://opensource.com/article/20/9/firewall) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Open ports and route traffic through your firewall -====== -Safely and securely give outside parties access to your network. -![Traffic lights at night][1] - -Ideally, most local networks are protected from the outside world. If you've ever tried installing a service, such as a web server or a [Nextcloud][2] instance at home, then you probably know from first-hand experience that, while the service is easy to reach from inside the network, it's unreachable over the worldwide web. - -There are both technical and security reasons for this, but sometimes you want to open access to something within a local network to the outside world. This means you need to be able to route traffic from the internet into your local network—correctly and safely. In this article, I'll explain how. - -### Local and public IP addresses - -The first thing you need to understand is the difference between a local internet protocol (IP) address and a public IP address. Currently, most of the world (still) uses an addressing system called IPv4, which famously has a limited pool of numbers available to assign to networked electronic devices. In fact, there are more networked devices in the world than there are IPv4 addresses, and yet IPv4 continues to function. This is possible because of local addresses. - -All local networks in the world use the _same_ address pools. For instance, my home router's local IP address is 192.168.1.1. One of those is probably the same number as your home router, yet when I navigate to 192.168.1.1, I reach _my_ router's login screen and not _your_ router's login screen. That's because your home router actually has two addresses: one public and one local, and the public one shields the local one from being detected by the internet, much less from being confused for someone else's 192.168.1.1. - -![network of networks][3] - -(Seth Kenlon, [CC BY-SA 4.0][4]) - -This, in fact, is why the internet is called the internet: it's a "web" of interconnected and otherwise self-contained networks. Each network, whether it's your workplace or your home or your school or a big data center or the "cloud" itself, is a collection of connected hosts that, in turn, communicate with a gateway (usually a router) that manages traffic from the internet and to the local network, as well as out of the local network to the internet. - -This means that if you're trying to access a computer on a network that's not the network you're currently attached to, then knowing the local address of that computer does you no good. You need to know the _public_ address of the remote network's gateway. And that's not all. You also need permission to pass through that gateway into the remote network. - -### Firewalls - -Ideally, there are firewalls all around you, even now. You don't see them (hopefully), but they're there. As technology goes, firewalls have a fun name, but they're actually a little boring. A firewall is just a computer service (also called a "daemon"), a subsystem that runs in the background of most electronic devices. There are many daemons running on your computer, including the one listening for mouse or trackpad movements, for instance. A firewall is a daemon programmed to either accept or deny certain kinds of network traffic. - -Firewalls are relatively small programs, so they are embedded in most modern devices. They're running on your mobile phone, on your router, and your computer. Firewalls are designed based on network protocols, and it's part of the specification of talking to other computers that a data packet sent over a network must announce specific pieces of information about itself (or be ignored). One thing that network data contains is a _port_ number, which is one of the primary things a firewall uses when accepting or denying traffic. - -Websites, for instance, are hosted on web servers. When you want to view a website, your computer sends network data identifying itself as traffic destined for port 80 of the web host. The web server's firewall is programmed to accept incoming traffic destined for port 80, so it accepts your request (and the web server, in turn, sends you the web page in response). However, were you to send (whether by accident or by design) network data destined for port 22 of that web server, you'd likely be denied by the firewall (and possibly banned for some time). - -This can be a strange concept to understand because, like IP addresses, ports and firewalls don't really "exist" in the physical world. These are concepts defined in software. You can't open your computer or your router to physically inspect network ports, and you can't look at a number printed on a chip to find your IP address, and you can't douse your firewall in water to put it out. But now that you know these concepts exist, you know the hurdles involved in getting from one computer in one network to another on a different network. - -Now it's time to get around those blockades. - -### Your IP address - -I assume you have control over your own network, and you're trying to open your own firewalls and route your own traffic to permit outside traffic into your network. First, you need your local and public IP addresses. - -To find your local IP address, you can use the `ip` address command on Linux: - - -``` -$ ip addr show | grep "inet " - inet 127.0.0.1/8 scope host lo - inet 192.168.1.6/27 brd 10.1.1.31 scope [...] -``` - -In this example, my local IP address is 192.168.1.6. The other address (127.0.0.1) is a special "loopback" address that your computer uses to refer to itself from within itself. - -To find your local IP address on macOS, you can use `ifconfig`: - - -``` -$ ifconfig | grep "inet " - inet 127.0.0.1 netmask 0xff000000 - inet 192.168.1.6 netmask 0xffffffe0 [...] -``` - -And on Windows, use `ipconfig`: - - -``` -`$ ipconfig` -``` - -Get the public IP address of your router at [icanhazip.com][5]. On Linux, you can get this from a terminal with the [curl command][6]: - - -``` -$ curl -93.184.216.34 -``` - -Keep these numbers handy for later. - -### Directing traffic through a router - -The first device that needs to be adjusted is the gateway device. This could be a big, physical server, or it could be a tiny router. Either way, the gateway is almost certainly performing network address translation (NAT), which is the process of accepting traffic and altering the destination IP address. - -When you generate network traffic to view an external website, your computer must send that traffic to your local network's gateway because your computer has, essentially, no knowledge of the outside world. As far as your computer knows, the entire internet is just your network router, 192.168.1.1 (or whatever your router's address). So, your computer sends everything to your gateway. It's the gateway's job to look at the traffic and determine where it's _actually_ headed, and then forward that data on to the real internet. When the gateway receives a response, it forwards the incoming data back to your computer. - -If your gateway is a router, then to expose your computer to the outside world, you must designate a port in your router to represent your computer. This configures your router to accept traffic to a specific port and direct all of that traffic straight to your computer. Depending on the brand of router you use, this process goes by a few different names, including port forwarding or virtual server or sometimes even firewall settings. - -Every device is different, so there's no way for me to tell you exactly what you need to click on to adjust your settings. Generally, you access your home router through a web browser. Your router's address is sometimes printed on the bottom of the router, and it begins with either 192.168 or 10. - -Navigate to your router's address and log in with the credentials you were provided when you got your internet service. It's often as simple as `admin` with a numeric password (sometimes, this password is printed on the router, too). If you don't know the login, call your internet provider and ask for details. - -In the graphical interface, redirect incoming traffic for one port to a port (the same one is usually easiest) of your computer's local IP address. In this example, I redirect incoming traffic destined for port 22 (used for SSH connections) of my home router to my desktop PC. - -![Example of a router configuration][7] - -(Seth Kenlon, [CC BY-SA 4.0][4]) - -You can redirect any port you want. For instance, if you're hosting a website on a spare computer, you can redirect traffic destined for port 80 of your router to port 80 of your website host. - -### Directing traffic through a server - -If your gateway is a physical server, you can direct traffic using [firewall-cmd][8]. Using the _rich rule_ option, you can have your server listen for an incoming request at a specific address (your public IP) and specific port (in this example, I use 22, which is the port used for SSH), and then direct that traffic to an IP address and port in the local network (your computer's local address). - - -``` -$ firewall-cmd --permanent --zone=public \ -\--add-rich-rule 'rule family="ipv4" destination address="93.184.216.34" forward-port port=22 protocol=tcp to-port=22 to-addr=192.168.1.6' -``` - -### Set your firewall - -Most devices have firewalls, so you might find that traffic can't get through to your local computer even after you've forwarded ports and traffic. It's possible that there's a firewall blocking traffic even within your local network. Firewalls are designed to make your computer secure, so resist the urge to deactivate your firewall entirely (except for troubleshooting). Instead, you can selectively allow traffic. - -The process of modifying your personal firewall differs according to your operating system. - -On Linux, there are many services already defined. View the ones available: - - -``` -$ sudo firewall-cmd --get-services -amanda-client amanda-k5-client bacula bacula-client -bgp bitcoin bitcoin-rpc ceph cfengine condor-collector -ctdb dhcp dhcpv6 dhcpv6-client dns elasticsearch -freeipa-ldaps ftp [...] ssh steam-streaming svdrp [...] -``` - -If the service you're trying to allow is listed, you can add it to your firewall: - - -``` -`$ sudo firewall-cmd --add-service ssh --permanent` -``` - -If your service isn't listed, you can add the port you want to open manually: - - -``` -`$ sudo firewall-cmd --add-port 22/tcp --permanent` -``` - -Opening a port in your firewall is specific to your current _zone_. For more information about firewalls, firewall-cmd, and ports, refer to my article [_Make Linux stronger with firewalls_][8], and download our [Firewall cheatsheet][9] for quick reference. - -This step is only about opening a port in your computer so that traffic destined for it on a specific port is accepted. You don't need to redirect traffic because you've already done that at your gateway. - -### Make the connection - -You've set up your gateway and your local network to route traffic for you. Now, when someone outside your network navigates to your public IP address, destined for a specific port, they'll be redirected to your computer on the same port. It's up to you to monitor and safeguard your network, so use your new knowledge with care. Too many open ports can look like invitations to bad actors and bots, so only open what you intend to use. And most of all, have fun! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/firewall - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/traffic-light-go.png?itok=nC_851ys (Traffic lights at night) -[2]: http://nextcloud.org -[3]: https://opensource.com/sites/default/files/uploads/network-of-networks.png (network of networks) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: http://icanhazip.com -[6]: https://opensource.com/article/20/5/curl-cheat-sheet -[7]: https://opensource.com/sites/default/files/uploads/port-mapping.png (Example of a router configuration) -[8]: https://opensource.com/article/19/7/make-linux-stronger-firewalls -[9]: https://opensource.com/article/20/2/firewall-cheat-sheet diff --git a/sources/tech/20200908 Tux the Linux Penguin in its first video game.md b/sources/tech/20200908 Tux the Linux Penguin in its first video game.md deleted file mode 100644 index dbb4be38cb..0000000000 --- a/sources/tech/20200908 Tux the Linux Penguin in its first video game.md +++ /dev/null @@ -1,88 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Tux the Linux Penguin in its first video game, better DNS and firewall on Android, Gitops IDE goes open source, and more open source news) -[#]: via: (https://opensource.com/article/20/9/news-sept-8) -[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo) - -Tux the Linux Penguin in its first video game, better DNS and firewall on Android, Gitops IDE goes open source, and more open source news -====== -Catch up on the biggest open source headlines from the past two weeks. -![][1] - -In this week’s edition of our open source news roundup, Gitpod open sources its IDE platform, BraveDNS launches an all-in-one platform, and more open source news. - -### Engineers debut an open source-powered robot - -Matthias Müller and Vladlen Koltun, two engineers at Intel, have shared their new robot to tackle computer vision tasks. [The robot][2], called "OpenBot", is powered by a smartphone, which acts as a camera and computing unit.  - -The OpenBot prototype components cost $50. It's intended to be a low-cost alternative to commercially available radio-controlled models, with more computing power than educational models. - -To use OpenBot, users can connect their smartphones to an electromechanical body. They can also use Bluetooth to connect their smartphone to a video game controller like an Xbox or PlayStation.  - -Müller and Koltun say they want OpenBot to address two key issues in robotics: Scalability and accessibility. Its source code is still pending [on GitHub][3], although models for 3D-printing the case are up. - -### Tux the Linux Penguin gets his video game dues - -A new update to [a free and open source 3D kart racer][4] features an unlikely hero: Tux, the Linux penguin. - -Born in the early aughts as a project called _TuxKart_, Joerg Henrichs renamed it "Super Tux Kart" in 2006. Lux is the latest open source mascot to feature in the project: Blender and GIMP's mascots are represented as well. - -Along with adding Tux to the mix, Super Tux Kart Version 1.2 includes lots of updates. iOS users can create racing servers in-game, while all official tracks are now included in the release built on Android. And since the game is open source [on four platforms][5], all players can make their own changes to submit for review. - -### BraveDNS offers three services in one for Android users - -It's notoriously tough for Android users to find a firewall, adblocker, and DNS-over-HTTPS client in one product. But if BraveDNS lives up to the hype, this free and open source tool offers all three in one.  - -Self-described as “an [OpenSnitch][6]-inspired firewall and network monitor + a [pi-hole][7]-inspired DNS over HTTPS client with blocklists”, BraveDNS uses its own ads, trackers, and spyware-blocking DNS endpoint. Users who need features like custom blocklists and ability to store DNS logs can use the tool's DNS resolver service as a paid option. - -Along with a robust [list of firewall features][8], BraveDNS offers to backport support for dual-mode DNS and firewall execution to legacy Android versions. You'll need at least Android 8 Oreo to use the latest version of BraveDNS on their website and Google Play, but their developers pledge to make it compatible down to Android Marshmellow in the near future.  - -### Gitpod open sources its IDE platform - -With projects like Theia, Xtext, and Open VSX under its belt, Gitpod has been a strong open source presence for 10 years. Now, Gitpod -- an IDE platform for GitHub projects -- is [officially open source][9] as well. - -The move marks a big change for Gitpod, which was previously closed to community development from the start. Founders Sven Efftinge and Johannes Landgraf shared that Gitpod now meets GitHub's open source criteria under AGPL license. This allows Gitpod developers to co-collaborate on Kubernetes applications. - -Along with Gitpod's open source status, they've expanded into software as well. Self-Hosted, a private cloud platform, is now available for free to unlimited users. Designed for DevOps teams to work on enterprise projects, Self-Hosted's features include collaboration tools, analytics, dashboards, and more. - -In other news: - - * [5 open source software applications for virtualization][10] - * [Building a heavy duty open source ventilator][11] - * [China looks at Gitee as an open source alternative to Microsoft's GitHub][12] - * [The future of American industry depends on open source tech][13] - - - -Thanks, as always, to Opensource.com staff members and [Correspondents][14] for their help this week. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/news-sept-8 - -作者:[Lauren Maffeo][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/lmaffeo -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/weekly_news_roundup_tv.png?itok=tibLvjBd -[2]: https://www.inceptivemind.com/openbot-open-source-low-cost-smartphone-powered-robot/15023/ -[3]: https://github.com/intel-isl/OpenBot -[4]: https://hothardware.com/news/super-tux-kart-update -[5]: https://supertuxkart.net/Download -[6]: https://github.com/evilsocket/opensnitch -[7]: https://github.com/pi-hole/pi-hole -[8]: https://www.xda-developers.com/bravedns-open-source-dns-over-https-client-firewall-adblocker-android/ -[9]: https://aithority.com/it-and-devops/gitpod-goes-open-source-with-its-ide-platform-launches-self-hosted-cloud-package/ -[10]: https://searchservervirtualization.techtarget.com/tip/5-open-source-software-applications-for-virtualization -[11]: https://hackaday.com/2020/08/28/building-a-heavy-duty-open-source-ventilator/ -[12]: https://www.scmp.com/abacus/tech/article/3099107/china-pins-its-hopes-gitee-open-source-alternative-microsofts-github -[13]: https://www.wired.com/story/opinon-the-future-of-american-industry-depends-on-open-source-tech/ -[14]: https://opensource.com/correspondent-program diff --git a/sources/tech/20201008 Protect your network with open source tools.md b/sources/tech/20201008 Protect your network with open source tools.md deleted file mode 100644 index 44ab5e3216..0000000000 --- a/sources/tech/20201008 Protect your network with open source tools.md +++ /dev/null @@ -1,106 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Protect your network with open source tools) -[#]: via: (https://opensource.com/article/20/10/apache-security-tools) -[#]: author: (Chantale Benoit https://opensource.com/users/chantalebenoit) - -Protect your network with open source tools -====== -Apache Syncope and Metron can help you secure your network against -unauthorized access and data loss. -![A lock on the side of a building][1] - -System integrity is essential, especially when you're charged with safeguarding other people's personal details on your network. It's critical that system administrators are familiar with security tools, whether their purview is a home, a small business, or an organization with hundreds or thousands of employees. - -### How cybersecurity works - -Cybersecurity involves securing networks against unauthorized access. However, there are many attack vectors out there that most people don't consider. The cliché of a lone hacker manually dueling with firewall rules until they gain access to a network is popular—but wildly inaccurate. Security breaches happen through automation, malware, phishing, ransomware, and more. You can't directly fight every attack as it happens, and you can't count on every computer user to exercise common sense. Therefore, you have to design a system that resists intrusion and protects users against outside attacks as much as it protects them from their own mistakes. - -The advantage of open source security tools is that they keep vulnerabilities transparent. They give full visibility into their codebase and are supported by a global community of experts working together to create strong, tried-and-tested code. - -With so many domains needing protection, there's no single cybersecurity solution that fits every situation, but here are two that you should consider. - -### Apache Syncope - -[Apache Syncope][2] is an open source system for managing digital identities in an enterprise environment. From focusing on identity lifecycle management and identity storage to provisioning engines and accessing management capabilities, Apache Syncope is a comprehensive identity management solution. It also provides monitoring and security features for third-party applications. - -Apache Syncope synchronizes users, groups, and other objects. _Users_ represent the buildup of virtual identities and account information fragmented across external resources. _Groups_ are entities on external resources that support the concept of LDAP or Active Directory. _Objects_ are entities such as printers, services, and sensors. It also does full reconciliation and live synchronization from external resources with workflow-based approval. - -#### Third-party applications - -Apache Syncope also exposes a fully compliant [JAX-RS][3] 2.0 [RESTful][4] interface to enable third-party applications written in any programming language. These applications consume identity management services, such as: - - * **Logic:** Syncope implements business logic that can be triggered through REST services and controls additional features such as notifications, reports, and auditing. - * **Provisioning:** It manages the internal and external representation of users, groups, and objects through workflow and specific connectors. - * **Workflow:** Syncope supports Activiti or Flowable [business process management (BPM)][5] workflow engines and allows defining new and custom workflows when needed. - * **Persistence:** It manages all data, such as users, groups, attributes, and resources, at a high level using a standard [JPA 2.0][6] approach. The data is further persisted to an underlying database, such as internal storage. - * **Security:** Syncope defines a fine-grained set of entitlements, which are granted to administrators and enable the implementation of delegated administration scenarios. - - - -#### Syncope extensions - -Apache Syncope's features can be enhanced with [extensions][7], which add a REST endpoint and manage the persistence of additional entities, tweak the provisioning layer, and add features to the user interface. - -Some popular extensions include: - - * **Swagger UI** works as a user interface for Syncope RESTful services. - * **SSO support** provides OpenID Connect and SAML 2.0 access to administrative or end-user web interfaces. - * **Apache Camel provisioning manager** delegates the execution of the provisioning process to a group of Apache Camel routes. It can be dynamically changed at the runtime through the REST interfaces or the administrative console, and modifications are also instantly available for processing. - * **Elasticsearch** provides an alternate internal search engine for users, groups, and objects through an external [Elasticsearch][8] cluster. - - - -### Apache Metron - -Security information and event management ([SIEM][9]) gives admins insights into the activities happening within their IT environment. It combines the concepts of security event management (SEM) with security information management (SIM) into one functionality. SIEM collects security data from network devices, servers, and domain controllers, then aggregates and analyzes the data to detect malicious threats and payloads. - -[Apache Metron][10] is an advanced security analytics framework that detects cyber anomalies, such as phishing activity and malware infections. Further, it enables organizations to take corrective measures to counter the identified anomalies. - -It also interprets and normalizes security events into standard JSON language, which makes it easier to analyze security events, such as: - - * An employee flagging a suspicious email - * An authorized or unauthorized software download by an employee to a company device - * A security lapse due to a server outage - - - -Apache Metron provides security alerts, labeling, and data enrichment. It can also store and index security events. Its four key capabilities are: - - * **Security data lake:** Metron is a cost-effective way to store and combine a wide range of business and security data. The security data lake provides the amount of data required to power discovery analytics. It also provides a mechanism to search and query for operational analytics. - * **Pluggable framework:** It provides a rich set of parsers for common security data sources such as pcap, NetFlow, Zeek (formerly Bro), Snort, FireEye, and Sourcefire. You can also add custom parsers for new data sources, including enrichment services for more contextual information, to the raw streaming data. The pluggable framework provides extensions for threat-intel feeds and lets you customize security dashboards. Machine learning and other models can also be plugged into real-time streams and provide extensibility. - * **Threat detection platform:** It uses machine learning algorithms to detect anomalies in a system. It also helps analysts extract and reconstruct full packets to understand the attacker's identity, what data was leaked, and where the data was sent. - * **Incident response application:** This refers to evolved SIEM capabilities, including alerting, threat intel frameworks, and agents to ingest data sources. Incident response applications include packet replay utilities, evidence storage, and hunting services commonly used by security operations center analysts. - - - -### Security matters - -Incorporating open source security tools into your IT infrastructure is imperative to keep your organization safe and secure. Open source tools, like Syncope and Metron from Apache, can help you identify and counter security threats. Learn to use them well, file bugs as you find them, and help the open source community protect the world's data. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/10/apache-security-tools - -作者:[Chantale Benoit][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/chantalebenoit -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_3reasons.png?itok=k6F3-BqA (A lock on the side of a building) -[2]: https://syncope.apache.org/ -[3]: https://jax-rs.github.io/apidocs/2.0/ -[4]: https://www.redhat.com/en/topics/api/what-is-a-rest-api -[5]: https://www.redhat.com/en/topics/automation/what-is-business-process-management -[6]: http://openjpa.apache.org/openjpa-2.0.0.html -[7]: http://syncope.apache.org/docs/2.1/reference-guide.html#extensions -[8]: https://opensource.com/life/16/6/overview-elastic-stack -[9]: https://en.wikipedia.org/wiki/Security_information_and_event_management -[10]: http://metron.apache.org/ diff --git a/sources/tech/20201008 Top 5 open source alternatives to Google Analytics.md b/sources/tech/20201008 Top 5 open source alternatives to Google Analytics.md deleted file mode 100644 index b06206d8ce..0000000000 --- a/sources/tech/20201008 Top 5 open source alternatives to Google Analytics.md +++ /dev/null @@ -1,104 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Top 5 open source alternatives to Google Analytics) -[#]: via: (https://opensource.com/article/18/1/top-5-open-source-analytics-tools) -[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt) - -Top 5 open source alternatives to Google Analytics -====== -These four versatile web analytics tools provide valuable insights on -your customers and site visitors while keeping you in control. -![Analytics: Charts and Graphs][1] - -If you have a website or run an online business, collecting data on where your visitors or customers come from, where they land on your site, and where they leave _is vital._ Why? That information can help you better target your products and services, and beef up the pages that are turning people away. - -To gather that kind of information, you need a web analytics tool. - -Many businesses of all sizes use Google Analytics. But if you want to keep control of your data, you need a tool that _you_ can control. You won’t get that from Google Analytics. Luckily, Google Analytics isn’t the only game on the web. - -Here are four open source alternatives to Google Analytics. - -### Matomo - -Let’s start with the open source application that rivals Google Analytics for functions: [Matomo][2] (formerly known as Piwik). Matomo does most of what Google Analytics does, and chances are it offers the features that you need. - -Those features include metrics on the number of visitors hitting your site, data on where they come from (both on the web and geographically), the pages from which they leave, and the ability to track search engine referrals. Matomo also offers many reports, and you can customize the dashboard to view the metrics that you want to see. - -To make your life easier, Matomo integrates with more than 65 content management, e-commerce, and online forum systems, including WordPress, Magneto, Joomla, and vBulletin, using plugins. For any others, you can simply add a tracking code to a page on your site. - -You can [test-drive][3] Matomo or use a [hosted version][4]. - -### Open Web Analytics - -If there’s a close second to Matomo in the open source web analytics stakes, it’s [Open Web Analytics][5]. In fact, it includes key features that either rival Google Analytics or leave it in the dust. - -In addition to the usual raft of analytics and reporting functions, Open Web Analytics tracks where on a page, and on what elements, visitors click; provides [heat maps][6] that show where on a page visitors interact the most; and even does e-commerce tracking. - -Open Web Analytics has a [WordPress plugin][7] and can [integrate with MediaWiki][8] using a plugin. Or you can add a snippet of [JavaScript][9] or [PHP][10] code to your web pages to enable tracking. - -Before you [download][11] the Open Web Analytics package, you can [give the demo a try][12] to see it it’s right for you. - -### AWStats - -Web server log files provide a rich vein of information about visitors to your site, but tapping into that vein isn't always easy. That's where [AWStats][13] comes to the rescue. While it lacks the most modern look and feel, AWStats more than makes up for that with breadth of data it can present. - -That information includes the number of unique visitors, how long those visitors stay on the site, the operating system and web browsers they use, the size of a visitor's screen, and the search engines and search terms people use to find your site. AWStats can also tell you the number of times your site is bookmarked, track the pages where visitors enter and exit your sites, and keep a tally of the most popular pages on your site. - -These features only scratch the surface of AWStats's capabilities. It also works with FTP and email logs, as well as [syslog][14] files. AWStats can gives you a deep insight into what's happening on your website using data that stays under your control. - -### Countly - -[Countly][15] bills itself as a "secure web analytics" platform. While I can't vouch for its security, Countly does a solid job of collecting and presenting data about your site and its visitors. - -Heavily targeting marketing organizations, Countly tracks data that is important to marketers. That information includes site visitors' transactions, as well as which campaigns and sources led visitors to your site. You can also create metrics that are specific to your business. Countly doesn't forgo basic web analytics; it also keeps track of the number of visitors on your site, where they're from, which pages they visited, and more. - -You can use the hosted version of Countly or [grab the source code][16] from GitHub and self-host the application. And yes, there are [differences between the hosted and self-hosted versions][17] of Countly. - -### Plausible - -[Plausible][18] is a newer kid on the open source analytics tools block. It’s lean, it’s fast, and only collects a small amount of information — that includes numbers of unique visitors and the top pages they visited, the number of page views, the bounce rate, and referrers. Plausible is simple and very focused. - -What sets Plausible apart from its competitors is its heavy focus on privacy. The project creators state that the tool doesn’t collect or store any information about visitors to your website, which is particularly attractive if privacy is important to you. You can read more about that [here][19]. - -There’s a [demo instance][20] that you check out. After that, you can either [self-host][21] Plausible or sign up for a [paid, hosted account][22]. - -**Share your favorite open source web analytics tool with us in the comments.** - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/18/1/top-5-open-source-analytics-tools - -作者:[Scott Nesbitt][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/scottnesbitt -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/analytics-graphs-charts.png?itok=sersoqbV (Analytics: Charts and Graphs) -[2]: https://matomo.org/ -[3]: https://demo.matomo.org/index.php?module=CoreHome&action=index&idSite=3&period=day&date=yesterday -[4]: https://www.innocraft.cloud/ -[5]: http://www.openwebanalytics.com/ -[6]: http://en.wikipedia.org/wiki/Heat_map -[7]: https://github.com/padams/Open-Web-Analytics/wiki/WordPress-Integration -[8]: https://github.com/padams/Open-Web-Analytics/wiki/MediaWiki-Integration -[9]: https://github.com/padams/Open-Web-Analytics/wiki/Tracker -[10]: https://github.com/padams/Open-Web-Analytics/wiki/PHP-Invocation -[11]: https://github.com/padams/Open-Web-Analytics -[12]: http://demo.openwebanalytics.com/ -[13]: http://www.awstats.org -[14]: https://en.wikipedia.org/wiki/Syslog -[15]: https://count.ly/web-analytics -[16]: https://github.com/Countly -[17]: https://count.ly/pricing#compare-editions -[18]: https://plausible.io -[19]: https://plausible.io/data-policy -[20]: https://plausible.io/plausible.io -[21]: https://plausible.io/self-hosted-web-analytics -[22]: https://plausible.io/register diff --git a/sources/tech/20201109 What-s the difference between orchestration and automation.md b/sources/tech/20201109 What-s the difference between orchestration and automation.md deleted file mode 100644 index 610042b557..0000000000 --- a/sources/tech/20201109 What-s the difference between orchestration and automation.md +++ /dev/null @@ -1,78 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What's the difference between orchestration and automation?) -[#]: via: (https://opensource.com/article/20/11/orchestration-vs-automation) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -What's the difference between orchestration and automation? -====== -Both terms imply that things happen without your direct intervention. -But the way you get to those results, and the tools you use to make them -happen, differ. -![doodles of arrows moving in different directions][1] - -For the longest time, it seemed the only thing any sysadmin cared about was automation. Recently, though, the mantra seems to have changed from automation to orchestration, leading many puzzled admins to wonder: "What's the difference?" - -The difference between automation and orchestration is primarily in intent and tooling. Technically, automation can be considered a subset of orchestration. While orchestration suggests many moving parts, automation usually refers to a singular task or a small number of strongly related tasks. Orchestration works at a higher level and is expected to make decisions based on changing conditions and requirements. - -However, this view shouldn't be taken too literally because both terms—_automation_ and _orchestration_—do have implications when they're used. The results of both are functionally the same: things happen without your direct intervention. But the way you get to those results, and the tools you use to make them happen, are different, or at least the terms are used differently depending on what tools you've used. - -For instance, automation usually involves scripting, often in Bash or Python or similar, and it often suggests scheduling something to happen at either a precise time or upon a specific event. However, orchestration often begins with an application that's purpose-built for a set of tasks that may happen irregularly, on demand, or as a result of any number of trigger events, and the exact results may even depend on a variety of conditions. - -### Decisionmaking and IT orchestration - -Automation suggests that a sysadmin has invented a system to cause a computer to do something that would normally have to be done manually. In automation, the sysadmin has already made most of the decisions on what needs to be done, and all the computer must do is execute a "recipe" of tasks. - -Orchestration suggests that a sysadmin has set up a system to do something on its own based on a set of rules, parameters, and observations. In orchestration, the sysadmin knows the desired end result but leaves it up to the computer to decide what to do. - -Consider Ansible and Bash. Bash is a popular shell and scripting language used by sysadmins to accomplish practically everything they do during a given workday. Automating with Bash is straightforward: Instead of typing commands into an interactive session, you type them into a text document and save the file as a shell script. Bash runs the shell script, executing each command in succession. There's room for some conditional decisionmaking, but usually, it's no more complex than simple if-then statements, each of which must be coded into the script. - -Ansible, on the other hand, uses playbooks in which a sysadmin describes the desired state of the computer. It lists requirements that must be met before Ansible can consider the job done. When Ansible runs, it takes action based on the current state of the computer compared to the desired state, based on the computer's operating system, and so on. A playbook doesn't contain specific commands, instead leaving those decisions up to Ansible itself. - -Of course, it's particularly revealing that Ansible is referred to as an automation—not an orchestration—tool. The difference can be subtle, and the terms definitely overlap. - -### Orchestration and the cloud - -Say you need to convert a file type that's regularly uploaded to your server by your users. - -The manual solution would be to check a directory for uploaded content every morning, open the file, and then save it in a different format. This solution is slow, inefficient, and probably could happen only once every 24 hours because you're a busy person. - -**[Read next: [How to explain orchestration][2]]** - -You could automate the task. Were you to do that, you might write a PHP or a Node.js script to detect when a file has been uploaded. The script would perform the conversion and send an alert or make a log entry to confirm the conversion was successful. You could improve the script over time to allow users to interact with the upload and conversion process. - -Were you to orchestrate the process, you might instead start with an application. Your custom app would be designed to accept and convert files. You might run the application in a container on your cloud, and using OpenShift, you could launch additional instances of your app when the traffic or workload increases beyond a certain threshold. - -### Learning automation and orchestration - -There isn't just one discipline for automation or orchestration. These are broad practices that are applied to many different tasks across many different industries. The first step to learning, though, is to become proficient with the technology you're meant to orchestrate and automate. It's difficult to orchestrate (safely) the scaling a series of web servers if you don't understand how a web server works, or what ports need to be open or closed, or what a port is. In practice, you may not be the person opening ports or configuring the server; you could be tasked with administrating OpenShift without really knowing or caring what's inside a container. But basic concepts are important because they broadly apply to usability, troubleshooting, and security. - -You also need to get familiar with the most common tools of the orchestration and automation world. Learn some [Bash][3], start using [Git][4] and design some [Git hooks][5], learn some Python, get comfortable with [YAML][6] and [Ansible][7], and try out Minikube, [OKD][8], and [OpenShift][9]. - -Orchestration and automation are important skills, both to make your work more efficient and as something to bring to your team. Invest in it today, and get twice as much done tomorrow. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/orchestration-vs-automation - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/arrows_operation_direction_system_orchestrate.jpg?itok=NUgoZYY1 (doodles of arrows moving in different directions) -[2]: https://enterprisersproject.com/article/2020/8/orchestration-explained-plain-english -[3]: https://www.redhat.com/sysadmin/using-bash-automation -[4]: https://opensource.com/life/16/7/stumbling-git -[5]: https://opensource.com/life/16/8/how-construct-your-own-git-server-part-6 -[6]: https://www.redhat.com/sysadmin/understanding-yaml-ansible -[7]: https://opensource.com/downloads/ansible-k8s-cheat-sheet -[8]: https://www.redhat.com/sysadmin/learn-openshift-minishift -[9]: http://openshift.io diff --git a/sources/tech/20201110 Use your favorite open source apps on your Mac with MacPorts.md b/sources/tech/20201110 Use your favorite open source apps on your Mac with MacPorts.md deleted file mode 100644 index 4ba1adebbd..0000000000 --- a/sources/tech/20201110 Use your favorite open source apps on your Mac with MacPorts.md +++ /dev/null @@ -1,225 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Use your favorite open source apps on your Mac with MacPorts) -[#]: via: (https://opensource.com/article/20/11/macports) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Use your favorite open source apps on your Mac with MacPorts -====== -MacPorts is an easy way to get open source applications and keep them -updated on macOS. -![Coffee and laptop][1] - -"Package manager" is a generic name for software to install, upgrade, and uninstall applications. Commands like `dnf` or `apt` on Linux, or `pkg_add` on BSD, or even `pip` on Python and `luarocks` on Lua, make it trivial for users to add new applications to their system. Once you've tried it, you're likely to find it hard to live without, and it's a convenience every operating system ought to include. Not all do, but the open source community tends to ensure the best ideas in computing are propagated across all platforms. - -There are several package managers designed just for macOS, and one of the oldest is the [MacPorts][2] project. - -### Darwin and MacPorts - -When Apple shifted to Unix at the turn of the century, it essentially built a Unix operating system called [Darwin][3]. Shortly thereafter, a group of resourceful hackers promptly began work on a project called OpenDarwin, with the intent of creating an independent branch of Darwin. They hoped that OpenDarwin and Apple developers could work on related codebases, borrowing from each other whenever it was useful. Unfortunately, OpenDarwin didn't gain traction within Apple and it eventually [came to an end][4]. However, the OpenDarwin package manager project, MacPorts, is alive and well and continues to provide great open source software for macOS. - -MacOS already comes with a healthy set of default terminal commands, some borrowed from GNU, others from BSD, and still others written especially for Darwin. You can use MacPorts to add new commands and even graphical applications. - -### Install MacPorts - -Your macOS version dictates which MacPorts installer package you need. So first, get the version of macOS you're currently running: - - -``` -$ sw_vers -productVersion -10.xx.y -``` - -MacPorts releases for recent macOS versions are available on [macports.org/install.php][5]. You can download an installer from the website, or just copy the link and download using the [curl][6] command: - - -``` -$ curl \ -\--output MacPorts-2.6.3-10.14-Mojave.pkg -``` - -Once you download the installer, you can double-click to install it or install it using a terminal: - - -``` -$ sudo installer -verbose \ --pkg MacPorts*.pkg --tgt / -``` - -### Configure MacPorts - -Once the package is installed, you must add the relevant paths to your system so that your terminal knows where to find your new MacPorts commands. Add the path to MacPorts, and add its manual pages to your `PATH` environment variable by adding this to `~/.bashrc`: - - -``` -export PATH=/opt/local/bin:/opt/local/sbin:$PATH -export MANPATH=/opt/local/share/man:$MANPATH -``` - -Load your new environment: - - -``` -`$ source ~/.bashrc` -``` - -Run an update so your MacPorts installation has access to the latest versions of software: - - -``` -`$ sudo port -v selfupdate` -``` - -### Use MacPorts - -Some package managers install pre-built software from a server onto your local system. This is called _binary installation_ because it installs code that's been compiled into an executable binary file. Other package managers, MacPorts among them, pull source code from a server, compile it into a binary executable on your computer, and install it into the correct directories. The end result is the same: you have the software you want. - -The way they get there is different. - -There are advantages to both methods. A binary install is quicker because the only transaction required is copying files from a server onto your computer. This is something [Homebrew][7] does with its "bottles," but there are sometimes issues with [non-relocatable][8] builds. Installing from source code means it's easy for you to modify how software is built and where it gets installed. - -MacPorts provides the **port** command, and calls it packages **ports** (inherited terminology from projects like NetBSD's [Pkgsrc][9] and FreeBSD's port system.) The typical MacPorts workflow is to search for an application and then install it. - -#### Search for an application - -If you know the specific command or application you need to install, search for it to ensure it's in the MacPorts tree: - - -``` -`$ sudo port search parallel` -``` - -By default, `port` searches both the names and descriptions of packages. You can search on just the name field by adding the `--name` option: - - -``` -`$ sudo port search --name parallel` -``` - -You can make your searches "fuzzy" with common shell wildcards. For instance, to search for `parallel` only at the start of a name field: - - -``` -`$ sudo port search --name --glob "parallel*"` -``` - -List all ports - -If you don't know what you're searching for and you want to see all the packages (or "ports" in MacPorts and BSD terminology) available, use the `list` subcommand: - - -``` -`$ sudo port list` -``` - -The list is long but complete. You can, of course, redirect the output into a text for reference or pipe it to `more` or `less` for closer examination: - - -``` -$ sudo port list > all-ports.txt -$ sudo port list | less -``` - -#### Get information about a package - -You can get all the important details about a package with the `info` subcommand: - - -``` -$ sudo port info parallel -parallel @20200922 (sysutils) - -Description:          Build and execute shell command lines from standard input in parallel -Homepage:             - -Library Dependencies: perl5 -Platforms:            darwin -License:              GPL-3+ -Maintainers:          Email: [example@example.com][10] -``` - -This displays important metadata about each application, including a brief description of what it is and the project homepage, in case you need more information. It also lists dependencies, which are _other_ ports that must be on your system for a package to run correctly. Dependencies are resolved automatically by MacPorts, meaning that if you install, for example, the `parallel` package, MacPorts also installs `perl5` if it's not already on your system. Finally, it provides the license and port maintainer. - -#### Install a package - -When you're ready to install a package, use the `install` subcommand: - - -``` -`$ sudo port install parallel` -``` - -It can take some time to compile the code depending on your CPU, the size of the code base, and the number of packages being installed, so be patient. It'll be worth it. - -Once the installation is done, the new application is available immediately: - - -``` -$ parallel echo ::: "hello" "world" -hello -world -``` - -Applications installed by MacPorts are placed into `/opt/local`. - -#### View what is installed - -Once a package has been installed on your system, you can see exactly what it placed on your drive using the `contents` subcommand: - - -``` -$ sudo port contents parallel -/opt/local/bin/parallel -[...] -``` - -#### Clean up - -Installing a package with MacPorts often leaves build files in your ports tree. These files are useful for debugging a failed install, but normally you don't need to keep them lying around. Purge these files from your system with the `port clean` command: - - -``` -`$ port clean parallel` -``` - -#### Uninstall packages - -Uninstall a package with the `port uninstall` command: - - -``` -`$ port uninstall parallel` -``` - -### Open source package management - -The MacPorts project is a remnant of an early movement to build upon the open source work that served as macOS's foundation. While that effort failed, there have been efforts to revive it as a project called [PureDarwin][11]. The push to open more of Apple's code is important work, and the byproducts of this effort are beneficial to everyone running macOS. If you're looking for an easy way to get open source applications on your Mac and a reliable way to keep them up to date, install and use MacPorts. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/macports - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_cafe_brew_laptop_desktop.jpg?itok=G-n1o1-o (Coffee and laptop) -[2]: http://macports.org -[3]: https://en.wikipedia.org/wiki/Darwin_%28operating_system%29 -[4]: https://web.archive.org/web/20070111155348/opendarwin.org/en/news/shutdown.html -[5]: https://www.macports.org/install.php -[6]: https://opensource.com/article/20/5/curl-cheat-sheet -[7]: https://opensource.com/article/20/6/homebrew-linux -[8]: https://discourse.brew.sh/t/why-do-bottles-need-to-be-in-home-linuxbrew-linuxbrew/4346/3 -[9]: https://opensource.com/article/19/11/pkgsrc-netbsd-linux -[10]: mailto:example@example.com -[11]: http://www.puredarwin.org/ diff --git a/sources/tech/20201117 My top 7 Rust commands for using Cargo.md b/sources/tech/20201117 My top 7 Rust commands for using Cargo.md deleted file mode 100644 index 14f6672be1..0000000000 --- a/sources/tech/20201117 My top 7 Rust commands for using Cargo.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (My top 7 Rust commands for using Cargo) -[#]: via: (https://opensource.com/article/20/11/commands-rusts-cargo) -[#]: author: (Mike Bursell https://opensource.com/users/mikecamel) - -My top 7 Rust commands for using Cargo -====== -Spend some time investigating Rust's package manager, Cargo. -![Person drinking a hot drink at the computer][1] - -I've been using Rust for a little over six months now. I'm far from an expert, but I have stumbled across many, many gotchas and learned many, many things along the way; things that I hope will be of use to those who are learning what is easily my favourite programming language. - -This is the third article in my miniseries for Rust newbs like me. You can find my other excursions into Rust in: - - * [My top 7 keywords in Rust][2] - * [My top 7 functions in Rust][3] - - - -I plan to write more, and this article is about Rust's package manager, [Cargo][4]. I'm ashamed to admit that I don't use Cargo's power as widely as I should, but researching this article gave me a better view of its commands' capabilities. In fact, I wasn't even aware of some of the options available until I started looking in more detail. - -For this list of my top seven Cargo commands, I'll assume you have basic familiarity with Cargo—that you have it installed, and you can create a package using `cargo new `, for instance. I could have provided more commands (there are many options!), but here are my "lucky 7." - - 1. **cargo help <command>:** You can always find out more about a command with the `--help` option. The same goes for Cargo itself: `cargo --help` will give you a quick intro to what's out there. To get more information on a command (more like a man page), you can try using the command `new`. For instance, `cargo help new` will give extended information about `cargo new`. This behaviour is pretty typical for command-line tools, particularly in the Linux/Unix world, but it's very expressively implemented for Cargo, and you can gain lots of quick information with it. - - 2. **cargo build --bin <target>:** What happens when you have multiple .rs files in your package, but you want to build just one of them? I have a package called `test-and-try` that I use for, well, testing and trying functionality, features, commands, and crates. It has around a dozen different files in it. By default, `cargo build` will try to build _all_ of them, and as they're often in various states of repair (some of them generating lots of warnings, some of them not even fully compiling), this can be a real pain. Instead, I place a section in my `Cargo.toml` file for each one like this: [code] - -[[bin]] -name = "warp-body" -path = "src/warp-body.rs" - -[/code] I can then use `cargo build --bin warp-body` to build _just_ this file (and any dependencies). I can then run it with a similar command: `cargo run --bin warp-body`. - - 3. **cargo test:** I have an admission; I am not as assiduous about creating automatic tests in my Rust code as I ought to be. This is because I'm currently mainly writing proof of concept rather than production code, and also because I'm lazy. Maybe changing this behaviour should be a New Year's resolution, but when I _do_ get round to writing tests, Cargo is there to help me (as it is for you). All you need to do is add a line before the test code in your .rs file: [code]`#[cfg(test)]`[/code] When you run `cargo test`, Cargo will "automagically" find these tests, run them, and tell you if you have problems. As with many of the commands here, you'll find much more information online, but it's particularly worth familiarising yourself with the basics of this capability in the relevant [Rust By Example section][5]. - - 4. **cargo search <query>:** This is one of the commands that I didn't even know existed until I started researching this article—and which would have saved me so much time over the past few months if I'd known about it. It searches [Crates.io][6], Rust's repository of public (and _sometimes_ maintained) packages and tells you which ones may be relevant. (You can specify a different repository if you want, with the intuitively named `--registry` option.) I've recently been doing some work on network protocols for non-String data, so I've been working with Concise Binary Object Representation ([CBOR][7]). Here's what happens if I use `cargo search`: - -![Cargo search output][8] - -(Mike Bursell, [CC BY-SA 4.0][9]) - -This is great! I can, of course, also combine this command with tools like grep to narrow down the search yet further, like so: `cargo search cbor --limit 70 | grep serde`. - - 5. **cargo tree:** Spoiler alert: this one may scare you. You've probably noticed that when you first build a new package, or when you add a new dependency, or just do a `cargo clean` and then `cargo build`, you see a long list of crates printed out as Cargo pulls them down from the relevant repositories and compiles them. How can you tell ahead of time, however, what will be pulled down and what version it will be? More importantly, how can you know what other dependencies a new crate has pulled into your build? The answer is `cargo tree`. Just to warn you: For any marginally complex project, you can expect to have a _lot_ of dependencies. I tried `cargo tree | wc -l` to count the number of dependent crates for a smallish project I'm working on and got an answer of 350! I tried providing an example, but it didn't display well, so I recommend that you try it yourself—be prepared for lots of output! - - 6. **cargo clippy:** If you try running this and it doesn't work, that's because I cheated a little with these last two commands: you may have to install them explicitly (depending on your setup). For this one, run `cargo install clippy`—you'll be glad you did. Clippy is Rust's linter; it goes through your code, looking at ways to reduce and declutter it by removing or changing commands. I try to run `cargo clippy` before every `git commit`—partly because the Git repositories I tend to commit to have automatic actions to reject files that need linting, and partly to keep my code generally more tidy. Here's an example: - -![Cargo clippy output][10] - -(Mike Bursell, [CC BY-SA 4.0][9]) - -Let's face it; this isn't a major issue (though clippy will find errors, too, if you run it on non-compiling code), but it's an easy fix, so you might as well deal with it—either by removing the code or prefixing the variable with an underscore. As I plan to use this variable later but haven't yet implemented the function to consume it, I will perform the latter fix. - - 7. **cargo readme:** While it's not the most earth-shattering of commands, this is another that is very useful (and that, as with `cargo clippy`, you may need to install explicitly). If you add the relevant lines to your .rs files, you can output README files from Cargo. For instance, I have the following lines at the beginning of my main.rs file: - -![Cargo readme input][11] - -(Mike Bursell, [CC BY-SA 4.0][9]) - -I'll leave the `cargo readme` command's output as an exercise for the reader, but it's interesting to me that the Licence (or "License," if you must) declaration is added. Use this to create simple documentation for your users and make them happy with minimal effort (always a good approach!). - - - - -I've just scratched the surface of Cargo's capabilities in this article; all the commands above are actually way more powerful than I described. I heartily recommend that you spend some time investigating Cargo and finding out how it can make your life better. - -* * * - -_This article was originally published on [Alice, Eve, and Bob][12] and is reprinted with the author's permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/commands-rusts-cargo - -作者:[Mike Bursell][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/mikecamel -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hot drink at the computer) -[2]: https://opensource.com/article/20/10/keywords-rust -[3]: https://opensource.com/article/20/10/rust-functions -[4]: https://doc.rust-lang.org/cargo/ -[5]: https://doc.rust-lang.org/stable/rust-by-example/testing/unit_testing.html -[6]: https://crates.io/ -[7]: https://cbor.io/ -[8]: https://opensource.com/sites/default/files/uploads/cargo-search-output-5.png (Cargo search output) -[9]: https://creativecommons.org/licenses/by-sa/4.0/ -[10]: https://opensource.com/sites/default/files/uploads/cargo-clippy-output-1.png (Cargo clippy output) -[11]: https://opensource.com/sites/default/files/uploads/cargo-readme-input.png (Cargo readme input) -[12]: https://aliceevebob.com/2020/11/03/my-top-7-cargo-rust-commands/ diff --git a/sources/tech/20201118 Cloud control vs local control- What to choose for your home automation.md b/sources/tech/20201118 Cloud control vs local control- What to choose for your home automation.md deleted file mode 100644 index b1d86bd080..0000000000 --- a/sources/tech/20201118 Cloud control vs local control- What to choose for your home automation.md +++ /dev/null @@ -1,134 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Cloud control vs local control: What to choose for your home automation) -[#]: via: (https://opensource.com/article/20/11/cloud-vs-local-home-automation) -[#]: author: (Steve Ovens https://opensource.com/users/stratusss) - -Cloud control vs local control: What to choose for your home automation -====== -Cloud may be more convenient, but local control gives you more privacy -and other options in your Home Assistant ecosystem. -![clouds in windows][1] - -There are a lot of factors to consider when investing in a home automation ecosystem. In my first article in this series, I explained [why I picked Home Assistant][2], and in this article, I'll explain some of the foundational issues and technologies in home automation, which may influence how you approach and configure your Internet of Things (IoT) devices. - -### Cloud connectivity - -Most devices you can buy today are tied to some type of cloud service. While the cloud brings a certain level of convenience, it also opens a host of problems. For starters, there are privacy issues related to a company having access to your personal habits—when you are home, what shows you watch, what time you go to bed, etc. Although most people are not as concerned about these issues as I am, privacy should still be a consideration, even if it is a small one. - -Cloud access also creates issues around being reliant on something outside your control. In 2019, Sonos came under fire for [remotely bricking][3] older smart speakers. Speakers usually continue to work for years after their warranty ends; in fact, they usually function until they physically break. There's also the case of Automatic, which produced a cloud-based car tracker. When it announced in May 2020 that it would be [shutting down][4] its services, it advised customers to "please discard your adapter by following standard electronic recycling procedures." - -Being dependent on a third-party provider for critical functionality can come back to bite you. [IFTTT][5], a popular service for programming events based on external conditions, recently altered its free plan's [terms and conditions][6] to severely limit the number of events you can create—from an unlimited number to three. This is even though IFTTT charges device manufacturers for certification with its system, which allows products like [Meross smart bulbs][7] to proudly display their compatibility with IFTTT. - -![Meross screenshot from Amazon][8] - -(Amazon screenshot by Steve Ovens, [CC BY-SA 4.0][9]) - -Some of these decisions are purely financial, but there are more than a few anecdotal cases where a company blocks a person's access to a device they purchased simply because they [did not like what the user said][10] about them. How crazy is that? - -Another consideration with cloud connectivity is a device's responsivity if its signals must travel from your home to a cloud server (which may be halfway around the world) and then back to the device. This can lead to a two-second (or more) delay on any action. For some people, this is not a deal-breaker. For others, that delay is unbearable. - -Finally, what happens if there is an internet outage? While most modern home internet connections are quite reliable, they do happen. [Some large][11], well-known cloud [service providers][12] have experienced outages this year. Are you OK trading convenience for possibly having your automations break and losing control of your smart devices for periods of time? - -### Local control - -There are several ways you can regain control over your smart devices. Commercially, you could try something like [Hubitat][13], which is a proprietary platform that emphasizes local control. I have no experience with these devices, as I don't like to rely on an intermediary. - -In my home, I standardized on WiFi (although I may branch out to [Zigbee][14] in the future) and [Home Assistant][15]. Using WiFi means I need to buy or make my devices based on their compatibility with alternative open source firmware, such as [Tasmota][16] or [ESPHome][17]. I admit that neither of these options is "plug-and-play friendly" unless you buy devices from sources like [Shelly][18], which is very friendly to the community, or [CloudFree][19], which has Tasmota installed by default. - -(As a small aside, I have both flashed my own devices and purchased them from CloudFree. There are some savings with the DIY approach, but I buy pre-flashed devices for my father's house because this eliminates a lot of hassle.) - -I won't go into more detail about alternative firmware, how to flash it, and so on. I simply want to introduce you to the idea that there are options for local control. - -### Achieving local control with MQTT - -A local control device probably uses either a direct [API][20] call, where Home Assistant talks directly to the device, or Message Queuing Telemetry Transport ([MQTT][21]). - -MQTT is one of the most widely used protocols for local IoT communication. I'll share some of the basics, but the Hook Up has an [in-depth video][22] you can watch if you want to learn more, and HiveMQ has an [entire series][23] on MQTT essentials. - -MQTT uses three components for communication. The first, the **sender**, is the component that triggers the action. The second, the **broker**, is kind of like a bulletin board where messages are posted. The final component is the **device** that will perform the action. This process is called the _publish-subscribe_ model. - -Say you have a button on the wall that you want to use to turn on the projector, lower the blinds, and turn on a fan. The button (sender) posts the _message_ **ON** to a specific section of the broker, called a _topic_. The topic might be something like `/livingroom/POWER`. The fan, the projector, and the blinds _subscribe_ to this topic. When the message **ON** is posted to the topic, all of the devices activate their respective functions, turning on the projector, lowering the blinds, and starting the fan. - -Unlike a message board, messages have different Quality of Service (QoS) states. The HiveMQ website has a good explanation of the [three QoS levels][24]. In short: - - * **QoS 0:** The message is sent to the broker in a fire-and-forget way. No attempt is made to verify that the broker received the message. - - - -![MQTTT QoS 0][25] - -(© 2015 [HiveMQ][24], reused with permission) - - * **QoS 1**: The message is posted, and the broker replies once the message is received. Multiple messages can be sent before the broker replies. For example, if you are trying to raise the projector's brightness, multiple brightness bars may be inadvertantly adjusted before the broker tells the sender to stop publishing messages. - - - -![MQTTT QoS 1][26] - -(© 2015 [HiveMQ][24], reused with permission) - - * **QoS 2:** This is the slowest but safest level. It guarantees that the message is received only once. Similar to TCP, if a message is lost, the sender will resend the message. - - - -![MQTTT QoS 2][27] - -(© 2015 [HiveMQ][24], reused with permission) - -In addition, MQTT has a **retain** flag that can be enabled on the messages, but it is not set by default. Going back to the bulletin board analogy, it's like if someone posts a message to a bulletin board, but another person walks up to the board, takes the message down, reads it, and throws it away. If a third person looks at the bulletin board five minutes later, they would have no knowledge of the message. However, if the **retain** flag is set to true, it's like leaving the message pinned on the board until a new message is received. This means that no matter when people come to read messages, they will all know the latest message. - -In home automation terms, whether or not the **retain** flag is set depends completely on the use case. - -In this series, I will use Home Assistant's [Mosquitto MQTT broker][28] add-on. Most of my devices use MQTT; however, I do have a couple of non-critical Tuya devices that require a cloud account. I may replace them with locally controllable ones in the future. - -### Wrapping up - -Home Assistant is a large, wonderful piece of software. It is complex in some areas, and it will help you to be familiar with these fundamental technologies when you need to troubleshoot and coordinate your setup. - -In the next article, I will talk about the "big three" wireless protocols that you are likely to encounter in smart devices: Zigbee, Z-Wave, and WiFi. Don't worry—I'm almost done with the underlying theories, and soon I'll get on with installing Home Assistant. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/cloud-vs-local-home-automation - -作者:[Steve Ovens][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/stratusss -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/cloud-windows-building-containers.png?itok=0XvZLZ8k (clouds in windows) -[2]: https://opensource.com/article/20/11/home-assistant -[3]: https://www.bbc.com/news/technology-51768574 -[4]: https://www.cnet.com/roadshow/news/automatic-connected-car-service-dead-may-coronavirus/ -[5]: https://ifttt.com/ -[6]: https://ifttt.com/plans -[7]: https://www.amazon.ca/meross-Dimmable-Equivalent-Compatible-Required/dp/B07WN2J3C7 -[8]: https://opensource.com/sites/default/files/uploads/ifttt_add.png (Meross screenshot from Amazon) -[9]: https://creativecommons.org/licenses/by-sa/4.0/ -[10]: https://www.techrepublic.com/article/iot-company-bricks-customers-device-after-negative-review/ -[11]: https://www.theverge.com/2020/9/28/21492688/microsoft-outlook-office-teams-azure-outage-down -[12]: https://www.cnn.com/2020/08/30/tech/internet-outage-cloudflare/index.html -[13]: https://hubitat.com/ -[14]: https://zigbeealliance.org/ -[15]: https://www.home-assistant.io/ -[16]: https://tasmota.github.io/docs/ -[17]: https://esphome.io/ -[18]: https://shelly.cloud/ -[19]: https://cloudfree.shop/ -[20]: https://en.wikipedia.org/wiki/API -[21]: https://en.wikipedia.org/wiki/MQTT -[22]: https://www.youtube.com/watch?v=NjKK5ab0-Kk -[23]: https://www.hivemq.com/tags/mqtt-essentials/ -[24]: https://www.hivemq.com/blog/mqtt-essentials-part-6-mqtt-quality-of-service-levels/ -[25]: https://opensource.com/sites/default/files/uploads/ha-config8-qos0.png (MQTTT QoS 0) -[26]: https://opensource.com/sites/default/files/uploads/ha-config8-qos1.png (MQTTT QoS 1) -[27]: https://opensource.com/sites/default/files/uploads/ha-config9-qos2.png (MQTTT QoS 2) -[28]: https://mosquitto.org/ diff --git a/sources/tech/20201119 Automate your tasks with this Ansible cheat sheet.md b/sources/tech/20201119 Automate your tasks with this Ansible cheat sheet.md deleted file mode 100644 index 4ef4961a33..0000000000 --- a/sources/tech/20201119 Automate your tasks with this Ansible cheat sheet.md +++ /dev/null @@ -1,224 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Automate your tasks with this Ansible cheat sheet) -[#]: via: (https://opensource.com/article/20/11/ansible-cheat-sheet) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Automate your tasks with this Ansible cheat sheet -====== -Start automating your repetitive tasks by getting to know Ansible's -modules, YAML structure, and more. -![Cheat Sheet cover image][1] - -Ansible is one of the primary tools in the world of [automation and orchestration][2] because of its broad usefulness and flexibility. However, those same traits are the very reason it can be difficult to get started with [Ansible][3]. It isn't a graphical application, and yet it also isn't a scripting or programming language. But like a programming language, the answer to the common question of "what can I do with it?" is "everything," which makes it difficult to know where to begin doing _anything_. - -Here's how I view Ansible: It's an "engine" that uses other people's modules to accomplish complex tasks you describe in a special "pseudo-code" text format called YAML. This means you need to have three things to get started with Ansible: - - 1. Ansible - 2. A repetitive task you want to automate - 3. A basic understanding of YAML - - - -This article aims to help you get started with these three things. - -### Install Ansible - -Part of Ansible's widespread popularity can be attributed to how it lets you (the user) completely ignore what operating system (OS) you're targeting. Generally, you don't have to think about whether your Ansible task will be executed on Linux, macOS, Windows, or BSD. Ansible takes care of the messy platform-specific bits for you. - -However, to _run_ Ansible, you do need to have Ansible installed somewhere. The computer where Ansible is installed is called the _control node_. Any computer that Ansible targets is called a _host_. - -Only the control node needs to have Ansible installed. - -If you're on Linux, you can install Ansible from your software repository with your package manager. - -As yet, Windows is unable to serve as an Ansible control node, although the more progress it makes toward [POSIX][4], the better things look for it, so keep a close watch on Microsoft's [Windows Subsystem for Linux (WSL)][5] product. - -On macOS, you can use a third-party package manager like [Homebrew][6] or [MacPorts][7]. - -### Ansible modules - -Ansible is just an engine. The parts that do 90% of the work are [Ansible modules][8]. These modules are programmed by lots of different people all over the world. Some have become so popular that the Ansible team adopts them and helps maintain them. - -As a user, much of your interaction with Ansible is directed to its modules. Choosing a module is like choosing an app on your phone or computer: you have a task you want done, so you look for an Ansible module that claims to assist. - -Most modules are tied to specific applications. For instance, the [file][9] module helps create and manage files. The [authorized_key][10] module helps manage SSH keys, [Database][11] modules help control and manipulate databases, and so on. - -Part of deciding on a task to offload onto Ansible is finding the module that will help you accomplish it. Ansible plays run _tasks_, and tasks consist of Ansible keywords or Ansible modules. - -### YAML and Ansible - -The YAML text format is a highly structured way to feed instructions to an application, making it almost a form of code. Like a programming language, you must write YAML according to a specific set of syntax rules. A YAML file intended for Ansible is called a _playbook_, and it consists of one or more Ansible _plays_. - -An Ansible play, like YAML, has a very limited structure. There are two kinds of instructions: a _sequence_ and a _mapping_. An Ansible play, as with YAML, always starts with 3 dashes (`---`). - -#### Sequences - -A _sequence_ element is a list. For example, here's a list of penguin species in YAML: - - -``` -\--- -\- Emperor -\- Gentoo -\- Yellow-eyed -\---- -``` - -#### Mapping - -A _mapping_ element consists of two parts: a key and a value. A _key_ in Ansible is usually a keyword defined by an Ansible module, and the value is sometimes Boolean (`true` or `false`) or some choice of parameters defined by the module, or something arbitrary, a variable, depending on what's being set. - -Here's a simple mapping in YAML: - - -``` -\--- -\- Name: "A list of penguin species" -\---- -``` - -#### Sequences and mapping - -These two data types aren't mutually exclusive. - -You can put a sequence into a mapping. In such a case, the sequence is a value for a mapping's key. When placing a sequence into a mapping, you indent the sequence so that it is a "descendent" (or "child") of its key: - - -``` -\--- -\- Penguins: - - Emperor -  - Gentoo -  - Yellow-eyed -\---- -``` - -You can also place mappings in a sequence: - - -``` -\--- -\- Penguin: Emperor -\- Mammal: Gnu -\- Planar: Demon -\---- -``` - -Those are all the rules you need to be familiar with to write valid YAML. - -### Write an Ansible play - -For Ansible plays, whether you use a sequence or a mapping (or a mapping in a sequence, or a sequence in a mapping) is dictated by Ansible or the Ansible module you're using. The "language" of Ansible mostly speaks to configuration options to help you determine how and where your play will run. A quick reference to all Ansible keywords is available in the [Ansible playbook documentation][12]. - -From the list of keywords, you can create an opening for your play. You start with three dashes because that's how a YAML file always starts. Then you give your play a name in a mapping block. You must also define what hosts (computers) you want the play to run on, and how Ansible is meant to reach the computer. - -For this example, I set the host to `localhost`, so the play runs only on _this_ computer, and the connection type to `local` (the default is `ssh`): - - -``` -\--- -\- name: "My first Ansible play" -  hosts: localhost -  connection: local -\---- -``` - -Most of the YAML you'll write in a play is probably configuration options for a specific Ansible module. To find out what instructions a module expects from your Ansible play, refer to that module's documentation. [Modules maintained by Ansible][8] are documented on Ansible's website. - -For this example, I'll use the debug module. - -![Documentation for Ansible debugger module][13] - -On [debug's documentation page][14], three parameters are listed: - - * `msg` is an optional string to print to the terminal. - * `var` is an optional variable, interpreted as a string. This is mutually exclusive with `msg`, so you can use one or the other—not both. - * `verbosity` is an integer you can use to control how verbose this debugger is. Its default is 0, so there is no threshold to pass. - - - -It's a simple module, but the thing to look for is the YAML data type of each parameter. Can you determine from my description whether these parameters are a sequence (a list) or a mapping (a key and value pair)? Knowing what kind of YAML block to use in your play helps you write valid plays. - -Here's a simple "hello world" Ansible play: - - -``` -\--- -\- name: "My first Ansible play" -  hosts: localhost -  connection: local -  tasks: -    - name: "Print a greeting" -      debug: -        msg: "Hello world" -\---- -``` - -Notice that the play contains a `task`. This task is a mapping that contains a sequence of exactly one item. The item in this task is `name` (and its value), the module being used by the task, and a `msg` parameter (along with its value). These are all part of the task mapping, so they're indented to show inheritance. - -You can test this Ansible play by using the `ansible-playbook` command with the `--check` option: - - -``` -$ ansible-playbook --check hello.yaml -PLAY [My first Ansible play] ************************* - -TASK [Gathering Facts] ******************************* -ok: [localhost] - -TASK [Print a greeting] ****************************** -ok: [localhost] => { -    "msg": "Hello world" -} - -PLAY RECAP ******************************************* -localhost: ok=2  changed=0  unreachable=0  failed=0 -``` - -It's verbose, but you can debug the message in your "Print a greeting" task, right where you put it. - -### Testing modules - -Using a new Ansible module is like trying out a new Linux command. You read its documentation, study its syntax, and then try some tests. - -There are at least two other modules you could use to write a "hello world" play: [assert][15] and [meta][16]. Try reading through the documentation for these modules, and see if you can create a simple test play based on what you learned above. - -For further examples of how modules are used to get work done, visit [Ansible Galaxy][17], an open source repository of community-contributed plays. - -### For a quick reference of important Ansible commands, download our [Ansible cheat sheet][18]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/ansible-cheat-sheet - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coverimage_cheat_sheet.png?itok=lYkNKieP (Cheat Sheet cover image) -[2]: https://opensource.com/article/20/11/orchestration-vs-automation -[3]: https://opensource.com/resources/what-ansible -[4]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains -[5]: https://docs.microsoft.com/en-us/windows/wsl/install-win10 -[6]: https://opensource.com/article/20/6/homebrew-mac -[7]: https://opensource.com/article/20/11/macports -[8]: https://docs.ansible.com/ansible/2.8/modules/modules_by_category.html -[9]: https://docs.ansible.com/ansible/2.8/modules/file_module.html#file-module -[10]: https://docs.ansible.com/ansible/2.8/modules/authorized_key_module.html#authorized-key-module -[11]: https://docs.ansible.com/ansible/2.8/modules/list_of_database_modules.html -[12]: https://docs.ansible.com/ansible/latest/reference_appendices/playbooks_keywords.html -[13]: https://opensource.com/sites/default/files/screenshot_from_2020-11-13_20-44-15.png (Documentation for Ansible debugger module) -[14]: https://docs.ansible.com/ansible/2.8/modules/debug_module.html -[15]: https://docs.ansible.com/ansible/2.8/modules/assert_module.html -[16]: https://docs.ansible.com/ansible/2.8/modules/meta_module.html -[17]: https://galaxy.ansible.com/ -[18]: https://opensource.com/downloads/ansible-cheat-sheet diff --git a/sources/tech/20201123 A beginner-s guide to Kubernetes Jobs and CronJobs.md b/sources/tech/20201123 A beginner-s guide to Kubernetes Jobs and CronJobs.md deleted file mode 100644 index 21af972870..0000000000 --- a/sources/tech/20201123 A beginner-s guide to Kubernetes Jobs and CronJobs.md +++ /dev/null @@ -1,233 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (A beginner's guide to Kubernetes Jobs and CronJobs) -[#]: via: (https://opensource.com/article/20/11/kubernetes-jobs-cronjobs) -[#]: author: (Mike Calizo https://opensource.com/users/mcalizo) - -A beginner's guide to Kubernetes Jobs and CronJobs -====== -Use Jobs and CronJobs to control and manage Kubernetes pods and -containers. -![Ships at sea on the web][1] - -[Kubernetes][2] is the default orchestration engine for containers. Its options for controlling and managing pods and containers include: - - 1. Deployments - 2. StatefulSets - 3. ReplicaSets - - - -Each of these features has its own purpose, with the common function to ensure that pods run continuously. In failure scenarios, these controllers either restart or reschedule pods to ensure the services in the pods continue running. - -As the [Kubernetes documentation explains][3], a Kubernetes Job creates one or more pods and ensures that a specified number of the pods terminates when the task (Job) completes. - -Just like in a typical operating system, the ability to perform automated, scheduled jobs without user interaction is important in the Kubernetes world. But Kubernetes Jobs do more than just run automated jobs, and there are multiple ways to utilize them through: - - 1. Jobs - 2. CronJobs - 3. Work queues (this is beyond the scope of this article) - - - -Sounds simple right? Well, maybe. Anyone who works on containers and microservice applications knows that some require services to be transient so that they can do specific tasks for applications or within the Kubernetes clusters. - -In this article, I will go into why Kubernetes Jobs are important, how to create Jobs and CronJobs, and when to use them for applications running on the Kubernetes cluster. - -### Differences between Kubernetes Jobs and CronJobs - -Kubernetes Jobs are used to create transient pods that perform specific tasks they are assigned to. [CronJobs][4] do the same thing, but they run tasks based on a defined schedule. - -Jobs play an important role in Kubernetes, especially for running batch processes or important ad-hoc operations. Jobs differ from other Kubernetes controllers in that they run tasks until completion, rather than managing the desired state such as in Deployments, ReplicaSets, and StatefulSets. - -### How to create Kubernetes Jobs and CronJobs - -With that background in hand, you can start creating Jobs and CronJobs. - -#### Prerequisites - -To do this exercise, you need to have the following: - - 1. A working Kubernetes cluster; you can install it with either: - * [CentOS 8][5] - * [Minikube][6] - 2. The [kubectl][7] Kubernetes command line - - - -Here is the Minikube deployment I used for this demonstration: - - -``` -$ minikube version -minikube version: v1.8.1 - -$ kubectl cluster-info -Kubernetes master is running at -KubeDNS is running at - -$ kubectl get nodes -NAME       STATUS   ROLES    AGE   VERSION -minikube   Ready    master   88s   v1.17.3 -``` - -#### Kubernetes Jobs - -Just like anything else in the Kubernetes world, you can create Kubernetes Jobs with a definition file. Create a file called `sample-jobs.yaml` using your favorite editor. - -Here is a snippet of the file that you can use to create an example Kubernetes Job: - - -``` -apiVersion: batch/v1          ## The version of the Kubernetes API -kind: Job                     ## The type of object for jobs -metadata: - name: job-test -spec:                        ## What state you desire for the object - template: -   metadata: -     name: job-test -   spec: -     containers: -     - name: job -       image: busybox                  ##  Image used -       command: ["echo", "job-test"]   ##  Command used to create logs for verification later -     restartPolicy: OnFailure          ##  Restart Policy in case container failed -``` - -Next, apply the Jobs in the cluster: - - -``` -`$ kubectl apply -f sample-jobs.yaml` -``` - -Wait a few minutes for the pods to be created. You can view the pod creation's status: - - -``` -`$ kubectl get pod –watch` -``` - -After a few seconds, you should see your pod created successfully: - - -``` -$ kubectl get pods -  NAME                  READY   STATUS          RESTARTS         AGE -  job-test                      0/1     Completed       0            11s -``` - -Once the pods are created, verify the Job's logs: - - -``` -`$ kubectl logs job-test job-test` -``` - -You have created your first Kubernetes Job, and you can explore details about it: - - -``` -`$ kubectl describe job job-test` -``` - -Clean up the Jobs: - - -``` -`$ kubectl delete jobs job-test` -``` - -#### Kubernetes CronJobs - -You can use CronJobs for cluster tasks that need to be executed on a predefined schedule. As the [documentation explains][8], they are useful for periodic and recurring tasks, like running backups, sending emails, or scheduling individual tasks for a specific time, such as when your cluster is likely to be idle. - -As with Jobs, you can create CronJobs via a definition file. Following is a snippet of the CronJob file `cron-test.yaml`. Use this file to create an example CronJob: - - -``` -apiVersion: batch/v1beta1            ## The version of the Kubernetes API -kind: CronJob                        ## The type of object for Cron jobs -metadata: -  name: cron-test -spec: -  schedule: "*/1 * * * *"            ## Defined schedule using the *nix style cron syntax -  jobTemplate: -    spec: -      template: -        spec: -          containers: -          - name: cron-test -            image: busybox            ## Image used -            args: -           - /bin/sh -            - -c -            - date; echo Hello this is Cron test -          restartPolicy: OnFailure    ##  Restart Policy in case container failed -``` - -Apply the CronJob to your cluster: - - -``` -$ kubectl apply -f cron-test.yaml - cronjob.batch/cron-test created -``` - -Verify that the CronJob was created with the schedule in the definition file: - - -``` -$ kubectl get cronjob cron-test - NAME        SCHEDULE      SUSPEND   ACTIVE   LAST SCHEDULE   AGE - cron-test   */1 * * * *   False     0        <none>          10s -``` - -After a few seconds, you can find the pods that the last scheduled job created and view the standard output of one of the pods: - - -``` -$ kubectl logs cron-test-1604870760 -  Sun Nov  8 21:26:09 UTC 2020 -  Hello from the Kubernetes cluster -``` - -You have created a Kubernetes CronJob that creates an object once per execution based on the schedule `schedule: "*/1 * * * *"`. Sometimes the creation can be missed because of environmental issues in the cluster. Therefore, they need to be [idempotent][9]. - -### Other things to know - -Unlike deployments and services in Kubernetes, you can't change the same Job configuration file and reapply it at once. When you make changes in the Job configuration file, you must delete the previous Job from the cluster before you apply it. - -Generally, creating a Job creates a single pod and performs the given task, as in the example above. But by using completions and [parallelism][10], you can initiate several pods, one after the other. - -### Use your Jobs - -You can use Kubernetes Jobs and CronJobs to manage your containerized applications. Jobs are important in Kubernetes application deployment patterns where you need a communication mechanism along with interactions between pods and the platforms. This may include cases where an application needs a "controller" or a "watcher" to complete tasks or needs to be scheduled to run periodically. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/kubernetes-jobs-cronjobs - -作者:[Mike Calizo][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/mcalizo -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/kubernetes_containers_ship_lead.png?itok=9EUnSwci (Ships at sea on the web) -[2]: https://kubernetes.io/ -[3]: https://kubernetes.io/docs/concepts/workloads/controllers/job/ -[4]: https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/ -[5]: https://phoenixnap.com/kb/how-to-install-kubernetes-on-centos -[6]: https://minikube.sigs.k8s.io/docs/start/ -[7]: https://kubernetes.io/docs/reference/kubectl/kubectl/ -[8]: https://v1-18.docs.kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/ -[9]: https://en.wikipedia.org/wiki/Idempotence -[10]: https://kubernetes.io/docs/concepts/workloads/controllers/job/#parallel-jobs diff --git a/sources/tech/20201124 Create a machine learning model with Bash.md b/sources/tech/20201124 Create a machine learning model with Bash.md deleted file mode 100644 index f6abb3cd5c..0000000000 --- a/sources/tech/20201124 Create a machine learning model with Bash.md +++ /dev/null @@ -1,638 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Create a machine learning model with Bash) -[#]: via: (https://opensource.com/article/20/11/machine-learning-bash) -[#]: author: (Girish Managoli https://opensource.com/users/gammay) - -Create a machine learning model with Bash -====== -Bash, Tcsh, or Zsh can help you get ready for machine learning. -![bash logo on green background][1] - -[Machine learning][2] is a powerful computing capability for predicting or forecasting things that conventional algorithms find challenging. The machine learning journey begins with collecting and preparing data—a _lot_ of it—then it builds mathematical models based on that data. While multiple tools can be used for these tasks, I like to use the [shell][3]. - -A shell is an interface for performing operations using a defined language. This language can be invoked interactively or scripted. The concept of the shell was introduced in [Unix][4] operating systems in the 1970s. Some of the most popular shells include [Bash][5], [tcsh][6], and [Zsh][7]. They are available for all operating systems, including Linux, macOS, and Windows, which gives them high portability. For this exercise, I'll use Bash. - -This article is an introduction to using a shell for data collection and data preparation. Whether you are a data scientist looking for efficient tools or a shell expert looking at using your skills for machine learning, I hope you will find valuable information here. - -The example problem in this article is creating a machine learning model to forecast temperatures for US states. It uses shell commands and scripts to do the following data collection and data preparation steps: - - 1. Download data - 2. Extract the necessary fields - 3. Aggregate data - 4. Make time series - 5. Create the train, test, and validate data sets - - - -You may be asking why you should do this with shell, when you can do all of it in a machine learning programming language such as [Python][8]. This is a good question. If data processing is performed with an easy, friendly, rich technology like a shell, a data scientist focuses only on machine learning modeling and not the details of a language. - -## Prerequisites - -First, you need to have a shell interpreter installed. If you use Linux or macOS, it will already be installed, and you may already be familiar with it. If you use Windows, try [MinGW][9] or [Cygwin][10]. - -For more information, see: - - * [Bash tutorials][11] here on opensource.com - * The official [shell scripting tutorial][12] by Steve Parker, the creator of Bourne shell - * The [Bash Guide for Beginners][13] by the Linux Documentation Project - * If you need help with a specific command, type ` --help` in the shell for help; for example: `ls --help`. - - - -## Get started - -Now that your shell is set up, you can start preparing data for the machine learning temperature-prediction problem. - -### 1\. Download data - -The data for this tutorial comes from the US National Oceanic and Atmospheric Administration (NOAA). You will train your model using the last 10 complete years of data. The data source is at , and the data is in .csv format and gzipped. - -Download and unzip the data using a [shell script][14]. Use your favorite text editor to create a file named `download.sh` and paste in the code below. The comments in the code explain what the commands do: - - -``` -#!/bin/sh -# This is called hashbang. It identifies the executor used to run this file. -# In this case, the script is executed by shell itself. -# If not specified, a program to execute the script must be specified. -# With hashbang: ./download.sh;  Without hashbang: sh ./download.sh; - -FROM_YEAR=2010 -TO_YEAR=2019 - -year=$FROM_YEAR -# For all years one by one starting from FROM_YEAR=2010 upto TO_YEAR=2019 -while [ $year -le $TO_YEAR ] -do -    # show the year being downloaded now -    echo $year -    # Download -    wget -    # Unzip -    gzip -d ${year}.csv.gz -    # Move to next year by incrementing -    year=$(($year+1)) -done -``` - -Notes: - - * If you are behind a proxy server, consult Mark Grennan's [how-to][15], and use: [code] export http_proxy= -export https_proxy= -``` - * Make sure all standard commands are already in your PATH (such as `/bin` or `/usr/bin`). If not, [set your PATH][16]. - * [Wget][17] is a utility for connecting to web servers from the command line. If Wget is not installed on your system, [download it][18]. - * Make sure you have [gzip][19], a utility used for compression and decompression. - - - -Run this script to download, extract, and make 10 years' worth of data available as CSVs: -``` - - -$ ./download.sh -2010 -\--2020-10-30 19:10:47--   -Resolving www1.ncdc.noaa.gov (www1.ncdc.noaa.gov)... 205.167.25.171, 205.167.25.172, 205.167.25.178, ... -Connecting to www1.ncdc.noaa.gov (www1.ncdc.noaa.gov)|205.167.25.171|:443... connected. -HTTP request sent, awaiting response... 200 OK -Length: 170466817 (163M) [application/gzip] -Saving to: '2010.csv.gz' - -     0K .......... .......... .......... .......... ..........  0% 69.4K 39m57s -    50K .......... .......... .......... .......... ..........  0%  202K 26m49s -   100K .......... .......... .......... .......... ..........  0% 1.08M 18m42s - -... - -``` -The [ls][20] command lists the contents of a folder. Use `ls 20*.csv` to list all your files with names beginning with 20 and ending with .csv. -``` - - -$ ls 20*.csv -2010.csv  2011.csv  2012.csv  2013.csv  2014.csv  2015.csv  2016.csv  2017.csv  2018.csv  2019.csv - -``` -### 2\. Extract average temperatures - -Extract the TAVG (average temperature) data from the CSVs for US regions: - -**extract_tavg_us.sh** -``` - - -#!/bin/sh - -# For each file with name that starts with "20" and ens with ".csv" -for csv_file in `ls 20*.csv` -do -    # Message that says file name $csv_file is extracted to file TAVG_US_$csv_file -    # Example: 2010.csv extracted to TAVG_US_2010.csv -    echo "$csv_file -> TAVG_US_$csv_file" -    # grep "TAVG" $csv_file: Extract lines in file with text "TAVG" -    # |: pipe -    # grep "^US": From those extract lines that begin with text "US" -    # > TAVG_US_$csv_file: Save xtracted lines to file TAVG_US_$csv_file -    grep "TAVG" $csv_file | grep "^US" > TAVG_US_$csv_file -done - -``` -This script: -``` - - -$ ./extract_tavg_us.sh -2010.csv -> TAVG_US_2010.csv -... -2019.csv -> TAVG_US_2019.csv - -``` -creates these files: -``` - - -$ ls TAVG_US*.csv -TAVG_US_2010.csv  TAVG_US_2011.csv  TAVG_US_2012.csv  TAVG_US_2013.csv -TAVG_US_2014.csv  TAVG_US_2015.csv  TAVG_US_2016.csv  TAVG_US_2017.csv -TAVG_US_2018.csv  TAVG_US_2019.csv - -``` -Here are the first few lines for `TAVG_US_2010.csv`: -``` - - -$ head TAVG_US_2010.csv -USR0000AALC,20100101,TAVG,-220,,,U, -USR0000AALP,20100101,TAVG,-9,,,U, -USR0000ABAN,20100101,TAVG,12,,,U, -USR0000ABCA,20100101,TAVG,16,,,U, -USR0000ABCK,20100101,TAVG,-309,,,U, -USR0000ABER,20100101,TAVG,-81,,,U, -USR0000ABEV,20100101,TAVG,-360,,,U, -USR0000ABEN,20100101,TAVG,-224,,,U, -USR0000ABNS,20100101,TAVG,89,,,U, -USR0000ABLA,20100101,TAVG,59,,,U, - -``` -The [head][21] command is a utility for displaying the first several lines (by default, 10 lines) of a file. - -The data has more information than you need. Limit the number of columns by eliminating column 3 (since all the data is average temperature) and column 5 onward. In other words, keep columns 1 (climate station), 2 (date), and 4 (temperature recorded). - -**key_columns.sh** -``` - - -#!/bin/sh - -# For each file with name that starts with "TAVG_US_" and ens with ".csv" -for csv_file in `ls TAVG_US_*.csv` -do -    echo "Exractiing columns $csv_file" -    # cat $csv_file: 'cat' is to con'cat'enate files - here used to show one year csv file -    # |: pipe -    # cut -d',' -f1,2,4: Cut columns 1,2,4 with , delimitor -    # > $csv_file.cut: Save to temporary file -    | > $csv_file.cut: -    cat $csv_file | cut -d',' -f1,2,4 > $csv_file.cut -    # mv $csv_file.cut $csv_file: Rename temporary file to original file -    mv $csv_file.cut $csv_file -    # File is processed and saved back into the same -    # There are other ways to do this -    # Using intermediate file is the most reliable method. -done - -``` -Run the script: -``` - - -$ ./key_columns.sh -Extracting columns TAVG_US_2010.csv -... -Extracting columns TAVG_US_2019.csv - -``` -The first few lines of `TAVG_US_2010.csv` with the unneeded data removed are: -``` - - -$ head TAVG_US_2010.csv -USR0000AALC,20100101,-220 -USR0000AALP,20100101,-9 -USR0000ABAN,20100101,12 -USR0000ABCA,20100101,16 -USR0000ABCK,20100101,-309 -USR0000ABER,20100101,-81 -USR0000ABEV,20100101,-360 -USR0000ABEN,20100101,-224 -USR0000ABNS,20100101,89 -USR0000ABLA,20100101,59 - -``` -Dates are in string form (YMD). To train your model correctly, your algorithms need to recognize date fields in the comma-separated Y,M,D form (For example, `20100101` becomes `2010,01,01`). You can convert them with the [sed][22] utility. - -**date_format.sh** -``` - - -for csv_file in `ls TAVG_*.csv` -do -    echo Date formatting $csv_file -    # This inserts , after year -    sed -i 's/,..../&,/' $csv_file -    # This inserts , after month -    sed -i 's/,....,../&,/' $csv_file -done - -``` -Run the script: -``` - - -$ ./date_format.sh -Date formatting TAVG_US_2010.csv -... -Date formatting TAVG_US_2019.csv - -``` -The first few lines of `TAVG_US_2010.csv` with the comma-separated date format are: -``` - - -$ head TAVG_US_2010.csv -USR0000AALC,2010,01,01,-220 -USR0000AALP,2010,01,01,-9 -USR0000ABAN,2010,01,01,12 -USR0000ABCA,2010,01,01,16 -USR0000ABCK,2010,01,01,-309 -USR0000ABER,2010,01,01,-81 -USR0000ABEV,2010,01,01,-360 -USR0000ABEN,2010,01,01,-224 -USR0000ABNS,2010,01,01,89 -USR0000ABLA,2010,01,01,59 - -``` -### 3\. Aggregate states' average temperature data - -The weather data comes from climate stations located in US cities, but you want to forecast whole states' temperatures. To convert the climate-station data to state data, first, map climate stations to their states. - -Download the list of climate stations using wget: -``` -`$ wget ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/daily/ghcnd-stations.txt` -``` -Extract the US stations with the [grep][23] utility to find US listings. The following command searches for lines that begin with the text `"US`." The `>` is a [redirection][24] that writes output to a file—in this case, to a file named `us_stations.txt`: -``` -`$ grep "^US" ghcnd-stations.txt > us_stations.txt` -``` -This file was created for pretty print, so the column separators are inconsistent: -``` - - -$ head us_stations.txt -US009052008  43.7333  -96.6333  482.0 SD SIOUX FALLS (ENVIRON. CANADA) -US10RMHS145  40.5268 -105.1113 1569.1 CO RMHS 1.6 SSW -US10adam001  40.5680  -98.5069  598.0 NE JUNIATA 1.5 S -... - -``` -Make them consistent by using [cat][25] to print the file, using [tr][26] to squeeze repeats and output to a temp file, and renaming the temp file back to the original—all in one line: -``` -`$ cat us_stations.txt | tr -s ' ' > us_stations.txt.tmp; cp us_stations.txt.tmp us_stations.txt;` -``` -The first lines of the command's output: -``` - - -$ head us_stations.txt -US009052008 43.7333 -96.6333 482.0 SD SIOUX FALLS (ENVIRON. CANADA) -US10RMHS145 40.5268 -105.1113 1569.1 CO RMHS 1.6 SSW -US10adam001 40.5680 -98.5069 598.0 NE JUNIATA 1.5 S -... - -``` -This contains a lot of info—GPS coordinates and such—but you only need the station code and state. Use [cut][27]: -``` -`$ cut -d' ' -f1,5 us_stations.txt > us_stations.txt.tmp; mv us_stations.txt.tmp us_stations.txt;` -``` -The first lines of the command's output: -``` - - -$ head us_stations.txt -US009052008 SD -US10RMHS145 CO -US10adam001 NE -US10adam002 NE -... - -``` -Make this a CSV and change the spaces to comma separators using sed: -``` -`$ sed -i s/' '/,/g us_stations.txt` -``` -The first lines of the command's output: -``` - - -$ head us_stations.txt -US009052008,SD -US10RMHS145,CO -US10adam001,NE -US10adam002,NE -... - -``` -Although you used several commands for these tasks, it is possible to perform all the steps in one run. Try it yourself. - -Now, replace the station codes with their state locations by using [AWK][28], which is functionally high performant for large data processing. - -**station_to_state_data.sh** -``` - - -PATTERN_FILE=us_stations.txt - -for DATA_FILE in `ls TAVG_US_*.csv` -do -    echo ${DATA_FILE} - -    awk -F, \ -        'FNR==NR { x[$1]=$2; next; } { $1=x[$1]; print $0 }' \ -        OFS=, \ -        ${PATTERN_FILE} ${DATA_FILE} > ${DATA_FILE}.tmp - -   mv ${DATA_FILE}.tmp ${DATA_FILE} -done - -``` -Here is what these parameters mean: - -`-F,` | Field separator is `,` ----|--- -`FNR` | Line number in each file -`NR` | Line number in both files together -`FNR==NR` | Is TRUE only in the first file `${PATTERN_FILE}` -`{ x[$1]=$2; next; }` | If `FNR==NR` is TRUE (for all lines in `$PATTERN_FILE` only) -`- x` | Variable to store `station=state` map -`- x[$1]=$2` | Adds data of `station=state` to map -`- $1` | First column in first file (station codes) -`- $2` | Second column in first file (state codes) -`- x` | Map of all stations e.g., `x[US009052008]=SD`, `x[US10RMHS145]=CO`, ..., `x[USW00096409]=AK` -`- next` | Go to next line matching `FNR==NR` (essentially, this creates a map of all stations-states from the `${PATTERN_FILE}` -`{ $1=x[$1]; print $0 }` | If `FNR==NR` is FALSE (for all lines `in $DATA_FILE` only) -`- $1=x[$1]` | Replace first field with `x[$1]`; essentially, replace station code with state code -`- print $0` | Print all columns (including replaced `$1`) -`OFS=,` | Output fields separator is `,` - -The CSV with station codes: -``` - - -$ head TAVG_US_2010.csv -USR0000AALC,2010,01,01,-220 -USR0000AALP,2010,01,01,-9 -USR0000ABAN,2010,01,01,12 -USR0000ABCA,2010,01,01,16 -USR0000ABCK,2010,01,01,-309 -USR0000ABER,2010,01,01,-81 -USR0000ABEV,2010,01,01,-360 -USR0000ABEN,2010,01,01,-224 -USR0000ABNS,2010,01,01,89 -USR0000ABLA,2010,01,01,59 - -``` -Run the command: -``` - - -$ ./station_to_state_data.sh -TAVG_US_2010.csv -... -TAVG_US_2019.csv - -``` -Stations are now mapped to states: -``` - - -$ head TAVG_US_2010.csv -AK,2010,01,01,-220 -AZ,2010,01,01,-9 -AL,2010,01,01,12 -AK,2010,01,01,16 -AK,2010,01,01,-309 -AK,2010,01,01,-81 -AK,2010,01,01,-360 -AK,2010,01,01,-224 -AZ,2010,01,01,59 -AK,2010,01,01,-68 - -``` -Every state has several temperature readings for each day, so you need to calculate the average of each state's readings for a day. Use AWK for text processing, [sort][29] to ensure the final results are in a logical order, and [rm][30] to delete the temporary file after processing. - -**station_to_state_data.sh** -``` - - -PATTERN_FILE=us_stations.txt - -for DATA_FILE in `ls TAVG_US_*.csv` -do -    echo ${DATA_FILE} - -    awk -F, \ -        'FNR==NR { x[$1]=$2; next; } { $1=x[$1]; print $0 }' \ -        OFS=, \ -        ${PATTERN_FILE} ${DATA_FILE} > ${DATA_FILE}.tmp - -   mv ${DATA_FILE}.tmp ${DATA_FILE} -done - -``` -Here is what the AWK parameters mean: - -`FILE=$DATA_FILE` | CSV file processed as `FILE` ----|--- -`-F,` | Field separator is `,` -`state_day_sum[$1 "," $2 "," $3 "," $4] = $5 state_day_sum[$1 "," $2 "," $3 "," $4] + $5` | Sum of temperature (`$5`) for the state `($1`) on year (`$2`), month (`$3`), day (`$4`) -`state_day_num[$1 "," $2 "," $3 "," $4] = $5 state_day_num[$1 "," $2 "," $3 "," $4] + 1` | Number of temperature readings for the state (`$1`) on year (`$2`), month (`$3`), day (`$4`) -`END` | In the end, after collecting sum and number of readings for all states, years, months, days, calculate averages -`for (state_day_key in state_day_sum)` | For each state-year-month-day -`print state_day_key "," state_day_sum[state_day_key]/state_day_num[state_day_key]` | Print state,year,month,day,average -`OFS=,` | Output fields separator is `,` -`$DATA_FILE` | Input file (all files with name starting with `TAVG_US_` and ending with `.csv`, one by one) -`> STATE_DAY_${DATA_FILE}.tmp` | Save result to a temporary file - -Run the script: -``` - - -$ ./TAVG_avg.sh -TAVG_US_2010.csv -TAVG_US_2011.csv -TAVG_US_2012.csv -TAVG_US_2013.csv -TAVG_US_2014.csv -TAVG_US_2015.csv -TAVG_US_2016.csv -TAVG_US_2017.csv -TAVG_US_2018.csv -TAVG_US_2019.csv - -``` -These files are created: -``` - - -$ ls STATE_DAY_TAVG_US_20*.csv -STATE_DAY_TAVG_US_2010.csv  STATE_DAY_TAVG_US_2015.csv -STATE_DAY_TAVG_US_2011.csv  STATE_DAY_TAVG_US_2016.csv -STATE_DAY_TAVG_US_2012.csv  STATE_DAY_TAVG_US_2017.csv -STATE_DAY_TAVG_US_2013.csv  STATE_DAY_TAVG_US_2018.csv -STATE_DAY_TAVG_US_2014.csv  STATE_DAY_TAVG_US_2019.csv - -``` -See one year of data for all states ([less][31] is a utility to see output a page at a time): -``` - - -$ less STATE_DAY_TAVG_US_2010.csv -AK,2010,01,01,-181.934 -... -AK,2010,01,31,-101.068 -AK,2010,02,01,-107.11 -... -AK,2010,02,28,-138.834 -... -WY,2010,01,01,-43.5625 -... -WY,2010,12,31,-215.583 - -``` -Merge all the data files into one: -``` -`$ cat STATE_DAY_TAVG_US_20*.csv > TAVG_US_2010-2019.csv` -``` -You now have one file, with all states, for all years: -``` - - -$ cat TAVG_US_2010-2019.csv -AK,2010,01,01,-181.934 -... -WY,2018,12,31,-167.421 -AK,2019,01,01,-32.3386 -... -WY,2019,12,30,-131.028 -WY,2019,12,31,-79.8704 - -``` -## 4\. Make time-series data - -A problem like this is fittingly addressed with a time-series model such as long short-term memory ([LSTM][32]), which is a recurring neural network ([RNN][33]). This input data is organized into time slices; consider 20 days to be one slice. - -This is a one-time slice (as in `STATE_DAY_TAVG_US_2010.csv`): -``` - - -X (input – 20 weeks): -AK,2010,01,01,-181.934 -AK,2010,01,02,-199.531 -... -AK,2010,01,20,-157.273 - -y (21st week, prediction for these 20 weeks): -AK,2010,01,21,-165.31 - -``` -This time slice is represented as (temperature values where the first 20 weeks are X, and 21 is y): -``` - - -AK, -181.934,-199.531, ... , --157.273,-165.3 - -``` -The slices are time-contiguous. For example, the end of 2010 continues into 2011: -``` - - -AK,2010,12,22,-209.92 -... -AK,2010,12,31,-79.8523 -AK,2011,01,01,-59.5658 -... -AK,2011,01,10,-100.623 - -``` -Which results in the prediction:  -``` -`AK,2011,01,11,-106.851` -``` -This time slice is taken as: -``` -`AK, -209.92, ... ,-79.8523,-59.5658, ... ,-100.623,-106.851` -``` -and so on, for all states, years, months, and dates. For more explanation, see this tutorial on [time-series forecasting][34]. - -Write a script to create time slices: - -**timeslices.sh** -``` - - -#!/bin/sh - -TIME_SLICE_PERIOD=20 - -file=TAVG_US_2010-2019.csv - -# For each state in file -for state in `cut -d',' -f1 $file | sort | uniq` -do -    # Get all temperature values for the state -    state_tavgs=`grep $state $file | cut -d',' -f5` -    # How many time slices will this result in? -    # mber of temperatures recorded minus size of one timeslice -    num_slices=`echo $state_tavgs | wc -w` -    num_slices=$((${num_slices} - ${TIME_SLICE_PERIOD})) -    # Initialize -    slice_start=1; num_slice=0; -    # For each timeslice -    while [ $num_slice -lt $num_slices ] -    do -        # One timeslice is from slice_start to slice_end -        slice_end=$(($slice_start + $TIME_SLICE_PERIOD - 1)) -        # X (1-20) -        sliceX="$slice_start-$slice_end" -        # y (21) -        slicey=$(($slice_end + 1)) -        # Print state and timeslice temperature values (column 1-20 and 21) -        echo $state `echo $state_tavgs | cut -d' ' -f$sliceX,$slicey` -        # Increment -        slice_start=$(($slice_start + 1)); num_slice=$(($num_slice + 1)); -    done -done - -``` -Run the script. It uses spaces as column separators; make them commas with sed: -``` -`$ ./timeslices.sh > TIMESLICE_TAVG_US_2010-2019.csv; sed -i s/' '/,/g TIME_VARIANT_TAVG_US_2010-2019.csv` -``` -Here are the first few lines and the last few lines of the output .csv: -``` - - -$ head -3 TIME_VARIANT_TAVG_US_2009-2019.csv -AK,-271.271,-290.057,-300.324,-277.603,-270.36,-293.152,-292.829,-270.413,-256.674,-241.546,-217.757,-158.379,-102.585,-24.9517,-1.7973,15.9597,-5.78231,-33.932,-44.7655,-92.5694,-123.338 -AK,-290.057,-300.324,-277.603,-270.36,-293.152,-292.829,-270.413,-256.674,-241.546,-217.757,-158.379,-102.585,-24.9517,-1.7973,15.9597,-5.78231,-33.932,-44.7655,-92.5694,-123.338,-130.829 -AK,-300.324,-277.603,-270.36,-293.152,-292.829,-270.413,-256.674,-241.546,-217.757,-158.379,-102.585,-24.9517,-1.7973,15.9597,-5.78231,-33.932,-44.7655,-92.5694,-123.338,-130.829,-123.979 - -$ tail -3 TIME_VARIANT_TAVG_US_2009-2019.csv -WY,-76.9167,-66.2315,-45.1944,-27.75,-55.3426,-81.5556,-124.769,-137.556,-90.213,-54.1389,-55.9907,-30.9167,-9.59813,7.86916,-1.09259,-13.9722,-47.5648,-83.5234,-98.2963,-124.694,-142.898 -WY,-66.2315,-45.1944,-27.75,-55.3426,-81.5556,-124.769,-137.556,-90.213,-54.1389,-55.9907,-30.91 \ No newline at end of file diff --git a/sources/tech/20201124 Customize Task Switching Experience on GNOME Desktop With These Nifty Tools.md b/sources/tech/20201124 Customize Task Switching Experience on GNOME Desktop With These Nifty Tools.md deleted file mode 100644 index 251f2e5edb..0000000000 --- a/sources/tech/20201124 Customize Task Switching Experience on GNOME Desktop With These Nifty Tools.md +++ /dev/null @@ -1,108 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Customize Task Switching Experience on GNOME Desktop With These Nifty Tools) -[#]: via: (https://itsfoss.com/customize-gnome-task-switcher/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Customize Task Switching Experience on GNOME Desktop With These Nifty Tools -====== - -Unless you’re new to Linux, you know that there are several [popular desktop environment][1] choices for users. And if you’re that newbie, I recommend you to learn [what a desktop environment is][2] along with this tutorial. - -Here, I shall be focusing on tweaking the task switching experience on GNOME. I know that the majority of users just tend to use it as is and stock settings are good enough for the most part. - -I mean there is nothing wrong with the application switcher that [you use with Alt+Tab keyboard shortcut in Ubuntu][3]. - -![][4] - -However, if you are a tinkerer who wants to [customize the look and feel of your GNOME desktop][5], including the task switcher and animation effects when launching or minimizing an app — you might want to continue reading this article. - -### Change GNOME Task Switcher to Windows 7 Style Effect - -![][6] - -Switching between running applications using the key bind **Alt+Tab** is fast but it may not be the most intuitive experience for some. You just get to cycle through a bunch of icons depending on the number of active applications. - -What if you want to change how the task switcher looks? - -Well, you can easily give it a look of Windows 7 Aero Flip 3D effect. And, here’s how it will look: - -![][7] - -It definitely looks interesting to have a different task switcher. Why? Just for fun or to share your desktop’s screenshot on Linux communities. - -Now, to get this on your GNOME desktop, here’s what you have to do: - -Step 1: Enable GNOME extensions if you haven’t already. You can follow our guide to [learn how to use GNOME shell extensions][8]. - -Step 2: Once you are done with the setup, you can proceed downloading and installing the [Coverflow GNOME extension][9] from GNOME extensions website. - -In case you haven’t installed the browser extension, you can just click on the link “**Click here to install browser extension**” from the notice as shown in the screenshot below. - -![][10] - -Step 3: Next, you just have to refresh the web page and enable the extension as shown in the screenshot below. - -![][11] - -You also get some customization options if you click on the “gear” icon right to the toggle button. - -![][12] - -Of course, depending on how fast you want it to be or how good you want it to look, you will have to adjust the animation speed accordingly. - -Next, why not some kind of cool effect when you interact with applications (minimize/close)? I have just the solution for you. - -### Add Genie Animation Effect While Minimizing & Re-opening Applications - -There’s an interesting effect (sort of like genie popping out of a lamp) that you can add to see when you minimize or re-open an app. - -This also comes as a GNOME extension, so you do not need to do anything else to get started. - -You just have to head to the extensions page, which is [Compiz alike Magic Lamp effect][13] and then enable the extension to see it in action. - -![][14] - -Here’s how it looks in action: - -![][15] - -It would look even cooler if you switch the Ubuntu dock to the bottom. - -Exciting GNOME extensions, right? You can play around to tweak your GNOME experience using the [GNOME tweaks app][16] and [install some beautiful icon themes][17] or explore different options. - -How do you prefer to customize your GNOME experience? Is there any other cool GNOME extension or an app that you tend to utilize? Feel free to share your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/customize-gnome-task-switcher/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/best-linux-desktop-environments/ -[2]: https://itsfoss.com/what-is-desktop-environment/ -[3]: https://itsfoss.com/ubuntu-shortcuts/ -[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2017/10/gnome-app-switcher.jpeg?resize=800%2C255&ssl=1 -[5]: https://itsfoss.com/gnome-tricks-ubuntu/ -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/ubuntu-coverflow-screenshot.jpg?resize=800%2C387&ssl=1 -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/coverflow-task-switcher.jpg?resize=800%2C392&ssl=1 -[8]: https://itsfoss.com/gnome-shell-extensions/ -[9]: https://extensions.gnome.org/extension/97/coverflow-alt-tab/ -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/gnome-shell-extension-browser.jpg?resize=800%2C401&ssl=1 -[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/coverflow-enable.jpg?resize=800%2C303&ssl=1 -[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/coverflow-settings.png?resize=800%2C481&ssl=1 -[13]: https://extensions.gnome.org/extension/3740/compiz-alike-magic-lamp-effect/ -[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/magic-lamp-extension.jpg?resize=800%2C355&ssl=1 -[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/magic-lamp-effect-800x380.gif?resize=800%2C380&ssl=1 -[16]: https://itsfoss.com/gnome-tweak-tool/ -[17]: https://itsfoss.com/best-icon-themes-ubuntu-16-04/ diff --git a/sources/tech/20201126 5 open source alternatives to GitHub.md b/sources/tech/20201126 5 open source alternatives to GitHub.md deleted file mode 100644 index b7a2cf706e..0000000000 --- a/sources/tech/20201126 5 open source alternatives to GitHub.md +++ /dev/null @@ -1,122 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 open source alternatives to GitHub) -[#]: via: (https://opensource.com/article/20/11/open-source-alternatives-github) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -5 open source alternatives to GitHub -====== -Stay resilient by keeping your open source code in an open source -repository. -![Woman programming][1] - -Git is a popular version-control system, primarily used for code but popular in [other disciplines][2], too. It can run locally on your computer for personal use, it can run on a server for collaboration, and it can also run as a hosted service for widespread public participation. There are many hosted services out there, and one of the most popular brands is [GitHub][3]. - -GitHub is not open source. Pragmatically, this doesn't make much of a difference to most users. The vast majority of code put onto GitHub is, presumably, encouraged to be shared by everyone, so GitHub's primary function is a sort of public backup service. Should GitHub fold or drastically change its terms of service, recovering data would be relatively simple because it's expected that you have a local copy of the code you keep on GitHub. However, some organizations have come to rely on the non-Git parts of GitHub's service offerings, making migration away from GitHub difficult. That's an awkward place to be, so for many people and organizations, insurance against vendor lock-in is a worthwhile investment. - -If that's the position you're in, check out these five GitHub alternatives, all of which are open source. - -### 1\. GitLab - -![GitLab][4] - -(Seth Kenlon, [CC BY-SA 4.0][5]) - -GitLab is more than just a GitHub alternative; it's more like a complete DevOps platform. GitLab is nearly all the infrastructure a software development house requires, as it provides code and project management tools, issue reporting, continuous delivery, and monitoring. You can use GitLab on [GitLab.com][6], or you can download the codebase and run it locally with or without paid support. GitLab has a web interface, but all Git-specific commands work as expected. - -GitLab is committed to open source, both in its code and the organization behind it, and to Git itself. The organization publishes much of its business documentation, including [how employees are onboarded][7], their [marketing policies][8], and much more. As a site, GitLab is ardent in promoting Git. When you use a site-specific feature (such as a merge request), GitLab's interface explains how to resolve the request in pure Git, should you prefer to work in the terminal. - -### 2\. Gitolite - -[Gitolite][9] is quite probably the minimal amount of code required to provide a server administrator a frontend for Git repository management. Unlike GitHub, it has no web interface, no desktop client, and adds nothing to Git from the user perspective. In fact, your users don't really use Gitolite directly. They just use Git, as usual, whether they're used to Git in a terminal or Git in a frontend client like [Git Cola][10]. - -From the server administrator's perspective, though, Gitolite solves all the permission and access problems you'd have to manage manually if you ran a plain Git server. With Gitolite, you create only one user (for instance, a user called `git`) on your server. You allow your users to use this single login identity to access your Git server, but when they log in, they must deal with your Git server through Gitolite. It's Gitolite that verifies users' access permissions, manages their SSH keys, verifies their privilege level when accessing specific repositories, and more. Instead of creating and managing countless Unix user accounts, all the administrator has to do is list users (identified by their SSH public keys) to the repositories they are allowed to access. Gitolite takes care of everything else. - -Gitolite is nearly invisible to users, and it makes Git management nearly invisible to the server admin. As long as you don't require a web interface, Gitolite is a net win for everyone involved. - -### 3\. Gitea and Gogs - -![Gitea][11] - -(Seth Kenlon, [CC BY-SA 4.0][5]) - -The [Gogs project][12] is an MIT-Licensed Git server framework and web user interface. In 2016, some Gogs users felt development was hindered because only its initial developer had write access to its development repository, so they forked the code to [Gitea][13]. Today, both projects co-exist independently of one another, and from a user's perspective, they are basically the same experience. Ironically, both projects are hosted on GitHub. - -With Gitea and Gogs, you download the source code and run it as a service on your server. This provides a website for users, where they can create an account, log in, create their own repositories, upload code, navigate through code, file issues and bug reports, request code merges, manage SSH keys, and so on. The interface is similar in look and feel to GitLab, GitHub, or Bitbucket, so if users have any experience with an online-code management system, they're already essentially familiar with Gitea and Gogs. - -Gitea or Gogs can be installed as a package on any Linux server, including a Raspberry Pi, as a container, on BSD, macOS, or Windows, or compiled from source code. They're both cross-platform, so they can be run on anything that runs Go. Read Ricardo Gerardi's article about [setting up a Gogs container using Podman][14] for more information. - -### 4\. Independent communities - -![Notabug][15] - -(Seth Kenlon, [CC BY-SA 4.0][5]) - -If you're not up for self-hosting, you can cheat a little by using a self-hosted option on somebody else's server. There are many independent sites out there, such as [Codeberg][16], Nixnet, Tinfoil-hat, and [Notabug.org][17]. Some run Gitea and others run Gogs, but the result is the same: free code hosting to help you keep your work safe and public. These solutions may not be as complex as something like GitLab or GitHub, they may not offer on-demand Jenkins pipelines and continuous integration/continuous development (CI/CD) solutions, but they're great mirrors for your work. - -There are purpose-specific providers, too: a [Gitea instance for FSFE supporters][18], a Gitlab instance for [Freedesktop projects][19], and another for [GNOME projects][20]. - -Because these independent servers are smaller communities, you might also find that the "social" aspect of social coding is more significant. I've made several online friends through an independent Git provider, while GitHub has proven to be, at least socially, underwhelming. - -The message is clear: there's no requirement or advantage for there to be a centralized, dominant, non-free Git software hosting service. - -### 5\. Git - -It might surprise you to know that Git is surprisingly self-reliant as a server. While it lacks user management and permission settings, Git integrates with SSH and ships with a special `git-shell` application designed specifically to serve as a limited environment for using Git commands. By setting users' default shell to `git-shell`, you can limit what actions are available to them when they interact with your server. - -What Git alone does not offer is repository permission tools to help you manage what each user has access to. For this, you'll have to fall back on the operating system's user and access control list (ACL) controls, which can become tedious should you have more than just a handful of users. For small projects or projects just starting, running Git on a Linux server is an easy and immediate solution to the need for a collaborative space. For more information, read my article on [building a Git server][21]. - -### Bonus: Fossil - -![Fossil UI][22] - -(Klaatu, [CC BY-SA 4.0][5]) - -Fossil isn't by any means Git, and in a sense, that's its appeal as an alternative to GitHub. In fact, Fossil is an alternative to the entire Git system. It's a complete version-control system, like Git, and it also has bug tracking, wiki, forum, and documentation features _built into every repository you create_. It also has a web interface included and is entirely self-contained. If it all sounds too good to be true, you can see it in action at [fossil-scm.org][23], because Fossil's homepage runs on Fossil! - -Read Klaatu's article on [getting started with Fossil][24] for more information. - -### Open source means choice - -The best thing about Git (and Fossil) is that they're open source technologies. You can choose whatever solution works best for you. In fact, because Git is also distributed, you can even choose _multiple_ solutions. There's nothing stopping you from hosting your code on several services and writing to all of them with each push. Take a look at your options, decide what works best for you, and get to work! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/open-source-alternatives-github - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/programming-code-keyboard-laptop-music-headphones.png?itok=EQZ2WKzy (Woman programming) -[2]: https://opensource.com/article/19/4/write-git -[3]: https://github.com/ -[4]: https://opensource.com/sites/default/files/uploads/gitlab.jpg (GitLab) -[5]: https://creativecommons.org/licenses/by-sa/4.0/ -[6]: https://gitlab.com -[7]: https://about.gitlab.com/handbook/people-group/general-onboarding/onboarding-processes -[8]: https://about.gitlab.com/handbook -[9]: https://gitolite.com/gitolite/index.html -[10]: https://opensource.com/article/20/3/git-cola -[11]: https://opensource.com/sites/default/files/uploads/gitea.jpg (Gitea) -[12]: https://gogs.io -[13]: https://gitea.io -[14]: https://www.redhat.com/sysadmin/git-gogs-podman -[15]: https://opensource.com/sites/default/files/uploads/notabug.jpg (Notabug) -[16]: https://join.codeberg.org/ -[17]: https://notabug.org -[18]: https://git.fsfe.org/ -[19]: https://gitlab.freedesktop.org -[20]: https://gitlab.gnome.org -[21]: https://opensource.com/life/16/8/how-construct-your-own-git-server-part-6 -[22]: https://opensource.com/sites/default/files/uploads/fossil-ui.jpg (Fossil UI) -[23]: https://www.fossil-scm.org -[24]: https://opensource.com/article/20/11/fossil diff --git a/sources/tech/20201127 How to choose a wireless protocol for home automation.md b/sources/tech/20201127 How to choose a wireless protocol for home automation.md deleted file mode 100644 index 6a2d5cc091..0000000000 --- a/sources/tech/20201127 How to choose a wireless protocol for home automation.md +++ /dev/null @@ -1,146 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to choose a wireless protocol for home automation) -[#]: via: (https://opensource.com/article/20/11/wireless-protocol-home-automation) -[#]: author: (Steve Ovens https://opensource.com/users/stratusss) - -How to choose a wireless protocol for home automation -====== -Which of the three dominant wireless protocols used in home -automation—WiFi, Z-Wave, and Zigbee—is right for you? Consider the -options in part three of this series. -![Digital images of a computer desktop][1] - -In the second article in this series, I talked about [local control vs. cloud connectivity][2] and some things to consider for your home automation setup. - -In this third article, I will discuss the underlying technology for connecting devices to [Home Assistant][3], including the dominant protocols that smart devices use to communicate and some things to think about before purchasing smart devices. - -### Connecting devices to Home Assistant - -Many different devices work with Home Assistant. Some connect through a cloud service, and others work by communicating with a central unit, such as a [SmartThings Hub][4], that Home Assistant communicates with. And still others have a facility to communicate over your local network. - -For a device to be truly useful, one of its key features must be wireless connectivity. There are currently three dominant wireless protocols that smart devices use: WiFi, Z-Wave, and Zigbee. I'll do a quick breakdown of each including their pros and cons. - -**A note about wireless spectra:** Spectra are measured in hertz (Hz). A gigahertz (GHz) is 1 billion Hz. In general, the larger the number of Hz, the more data can be transmitted and the faster the connection. However, higher frequencies are more susceptible to interference and do not travel very well through solid objects. Lower frequencies can travel further and pass through solid objects more readily, but the trade-off is they cannot send much data. - -### WiFi - -[WiFi][5] is the most widely known of the three standards. These devices are the easiest to get up and running if you are starting from scratch. This is because almost everyone interested in home automation already has a WiFi router or an access point. In fact, in most countries in the western world, WiFi is considered almost on the same level as running water; if you go to a hotel, you expect a clean, temperature-controlled room with a WiFi password provided at check-in. - -Therefore, Internet of Things (IoT) devices that use the WiFi protocol require no additional hardware to get started. Plug in the new device, launch a vendor-provided application or a web browser, enter your credentials, and you're done. - -It's important to note that almost all moderate- to low-priced IoT devices use the 2.4GHz wireless spectrum. Why does this matter? Well, 2.4GHz has been around so long that virtually all devices—from cordless phones to smart bulbs—use this spectrum. In most countries, there are generally only about a dozen channels that off-the-shelf devices can broadcast and receive on. Like overloading a cell tower when too many users attempt to make phone calls during an emergency, channels can become overcrowded and susceptible to outside interference. - -While well-behaving smart devices use little-to-no bandwidth, if they struggle to send/receive messages due to overcrowding on the spectrum, your automation will have mixed results. A WiFi access point can only communicate with one client at a time. That means the more devices you have on WiFi, the greater the chance that someone on the network will have to wait their turn to communicate. - -**Pros:** - - * Ubiquitous - * Tend to be inexpensive - * Easy to set up - * Easy to extend the range - * Uses existing network - * Requires no hub - - - -**Cons:** - - * Can suffer from interference from neighboring devices or adjacent networks - * Uses the most populated 2.4GHz spectrum - * Your router limits the number of devices - * Uses more power, which means less or no battery-powered devices - * Has the potential to impact latency-sensitive activities like gaming over WiFi - * Most off-the-shelf products require an internet connection - - - -### Z-Wave - -[Z-Wave][6] is a closed wireless protocol controlled and maintained by a company named Zensys. Because it is controlled by a single entity, all devices are guaranteed to work together. There is one standard and one implementation. This means that you never have to worry about which device you buy from which manufacturer; they will always work. - -Z-Wave operates in the 0.9GHz spectrum, which means it has the largest range of the popular protocols. A central hub is required to coordinate all the devices on a Z-Wave ecosystem. Z-Wave operates on a [mesh network][7] topology, which means that every device acts as a potential repeater for other devices. In theory, this allows a much greater coverage area. Z-Wave limits the number of "hops" to 4. That means that, in order for a signal to get from a device to a hub, it can only travel through four devices. This could be a positive or a negative, depending on your perspective.  - -On the one hand, it reduces the ecosystem's maximum latency by preventing packets from traveling through a significant number of devices before reaching the destination. The more devices a signal must go through, the longer it can take for devices to become responsive. - -On the other hand, it means that you need to be more strategic about providing a good path from your network's extremities back to the hub. Remember, the lower frequency that enables greater distance also limits the speed and amount of data that can be transferred. This is currently not an issue, but no one knows what size messages future smart devices will want to send. - -**Pros:** - - * Z-Wave compatibility guaranteed - * Form mesh network  - * Low powered and can be battery powered - * Mesh networks become more reliable with more devices - * Uses 0.9GHz and can transmit up to 100 meters - * Least likely of the three to have signal interference from solid objects or external sources - - - -**Cons:** - - * Closed protocol - * Costs the most - * Maximum of four hops in the mesh - * Can support up to 230 devices per network - * Uses 0.9GHz, which is the slowest of all protocols - - - -### Zigbee - -Unlike Z-Wave, [Zigbee][8] is an open standard. This can be a pro or a con, depending on your perspective. Because it is an open standard, manufacturers are free to alter the implementation to suit their products. To borrow an analogy from one of my favorite YouTube channels, [The Hook Up][9], Zigbee is like going through a restaurant drive-through. Having the same standard means you will always be able to speak to the restaurant and they will be able to hear you. However, if you speak a different language than the drive-through employee, you won't be able to understand each other. Both of you can speak and hear each other, but the meaning will be lost. - -Similarly, the Zigbee standard allows all devices on a Zigbee network to "hear" each other, but different implementations mean they may not "understand" each other. Fortunately, more often than not, your Zigbee devices should be able to interoperate. However, there is a non-trivial chance that your devices will not be able to understand each other. When this happens, you may end up with multiple networks that could interfere with each other. - -Like Z-Wave, Zigbee employs a mesh network topology but has no limit to the number of "hops" devices can use to communicate with the hub. This, combined with some tweaks to the standard, means that Zigbee theoretically can support more than 65,000 devices on a single network. - -**Pros:** - - * Open standard - * Form mesh network - * Low-powered and can be battery powered - * Can support over 65,000 devices - * Can communicate faster than Z-Wave - - - -**Cons:** - - * No guaranteed compatibility - * Can form separate mesh networks that interfere with each other - * Uses the oversaturated 2.4GHz spectrum - * Transmits only 10 to 30 meters - - - -### Pick your protocol - -Perhaps you already have some smart devices. Or maybe you are just starting to investigate your options. There is a lot to consider when you're buying devices. Rather than focusing on the lights, sensors, smart plugs, thermometers, and the like, it's perhaps more important to know which protocol (WiFi, Z-Wave, or Zigbee) you want to use. - -Whew! I am finally done laying home automation groundwork. In the next article, I will show you how to start the initial installation and configuration of a Home Assistant virtual machine. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/wireless-protocol-home-automation - -作者:[Steve Ovens][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/stratusss -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_browser_web_desktop.png?itok=Bw8ykZMA (Digital images of a computer desktop) -[2]: https://opensource.com/article/20/11/cloud-vs-local-home-automation -[3]: https://opensource.com/article/20/11/home-assistant -[4]: https://www.smartthings.com/ -[5]: https://en.wikipedia.org/wiki/Wi-Fi -[6]: https://www.z-wave.com/ -[7]: https://en.wikipedia.org/wiki/Mesh_networking -[8]: https://zigbeealliance.org/ -[9]: https://www.youtube.com/channel/UC2gyzKcHbYfqoXA5xbyGXtQ diff --git a/sources/tech/20201201 Create universal blockchain smart contracts.md b/sources/tech/20201201 Create universal blockchain smart contracts.md deleted file mode 100644 index 71dbd4e765..0000000000 --- a/sources/tech/20201201 Create universal blockchain smart contracts.md +++ /dev/null @@ -1,157 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Create universal blockchain smart contracts) -[#]: via: (https://opensource.com/article/20/12/blockchain-smart-contracts) -[#]: author: (Gage Mondok https://opensource.com/users/matt-coolidge) - -Create universal blockchain smart contracts -====== -Chainlink connects blockchain data with external, "real-world" data -using decentralized oracles. -![cubes coming together to create a larger cube][1] - -Blockchain [smart contracts][2] have the ability to access off-chain data by integrating [decentralized oracles][3]. Before diving into how to use them, it's important to understand why smart contracts matter in the big picture and why they need oracles for data access. - -Transactions happen every day, as they have for tens of thousands of years. They're generally governed by an agreement or contract. This may be driven by a vendor's terms of service, regulatory frameworks, or some combination of both. Parameters for these agreements are not always clear or transparent, and they are ultimately governed by a brand (whether that's a person or a company) and its willingness to act upon terms agreed upon in advance. - -Contracts, like the rest of the world, are going digital. The rise of blockchain technology has introduced smart contracts, a more tamper-proof, transparent, and fair system for governing such agreements. Smart contracts are governed by math, not brands. They automatically enforce the parameters of a contract once they're executed, creating a more equitable structure for all parties. - -The challenge with smart contracts is that they generally depend on their ability to bridge real-world data with blockchains (or data from one blockchain to another) so that the smart contract can recognize quality, assess reliable data, and trigger agreed-upon outcomes once terms are met. Traditionally, this has been an overly complex and difficult process, which limited broader adoption. - -### About Chainlink - -[Chainlink][4] is an open source abstraction layer that provides a framework to easily connect any blockchain with any external (or separate blockchain) API. You can think of Chainlink as the blockchain equivalent of the transport layer in TCP/IP, ensuring data is reliably transmitted in and out. Chainlink was designed to be the standard data layer for smart contracts, unlocking their true capability to affect the external world, and turning them into externally aware, universal smart contracts. - -Smart contracts have the power to revolutionize how trust and automation are handled in business, but their restriction in scope to events on the blockchain has severely limited their potential. A majority of what developers want to interact with exists in the "real world," such as pricing data, shipping events, world events, etc. To create universal smart contracts, which are externally aware and thus can handle a wide, universal set of jobs with the world's data at its fingertips, the Chainlink network gives [Solidity][5] and other blockchain developers a framework of decentralized oracles to build with. - -You can use these oracles to retrieve data for your decentralized application (dApp) in real-time on the Ethereum mainnet. - -#### Chainlink adapters - -[Adapters][6] are the default data manipulation functions that every Chainlink node supports by default. The nodes are the decentralized oracles in this case. They fulfill the data requests, and the Chainlink network is composed of an ever-growing number of them. Nodes are run by a multitude of independent operators. Through adapters, all developers have a standard interface for making data requests, and node operators have a standard for serving that data. These adapters include functionality such as HTTP GET, HTTP POST, Compare, Copy, etc. Adapters are a dApp's connection to the external world's data. - -For example, here are the parameters for the [HttpGet][7] adapter: - - * **get**: Takes a string containing the API URL to make a GET request to - * **headers**: Takes an object containing keys as strings and values as arrays of strings - * **queryParams**: Takes a string or array of strings for the URL's query parameters - * **extPath**: Takes a slash-delimited string or array of strings to be appended to the job's URL - - - -#### Chainlink requests - -For a universal smart contract to interact with these adapters, you need another functionality, requests. All contracts that inherit from [ChainlinkClient][8] can create a Chainlink.Request struct that allows developers to form a request to a Chainlink decentralized oracle. This request should add the desired adapter parameters to the struct according to the request you want to make. Submitting this request requires some basic fields, such as the address of the node you want to use as your oracle, the jobId, and the agreed-upon fee. In addition to those default fields, you can add your desired adapter parameters to the request struct: - - -``` -// Set the URL to perform the GET request on -request.add("get", "[https://min-api.cryptocompare.com/data/price?fsym=ETH\&tsyms=USD][9]"); -``` - -With this struct, requests are flexible and can be formulated to fit various situations involving getting, posting, and manipulating data from any API because the requests can contain any of the adapter functions. What makes this system decentralized is that Chainlink's oracle network consists of many of these nodes, and developers are free to choose which and how many they want to request from based on their needs. This enables redundant failover and error checking via multiple sources, as high-reliability dApps often require. - -For more information on constructing a request and the functions needed to submit it and receive a response within a ChainlinkClient contract, see Chainlink's full [HTTP GET request example][10]. - -For common requests, a node operator may already have an existing oracle job preconfigured, and in this case, the request is much simpler. Rather than building a custom request struct and adding the necessary adapters, the default request struct is all you need to create. No additional adapter parameters are needed; the set of decentralized oracles you choose will know how to respond based on the jobId provided when creating the request struct. - -This example comes from the full [CoinGecko Consumer API][11]: - - -``` -Chainlink.[Request][12] memory req = buildChainlinkRequest(jobId, address(this),     this.fulfillEthereumPrice.selector); -sendChainlinkRequestTo(oracle, req, fee); -``` - -You can use a decentralized oracle data service, such as [Chainlink Market][13], to search through existing oracles and the jobs they support in order to find the jobId you require. - -### External adapters - -But what if you have a complex use case for your smart contract that isn't covered by the default adapter functions? What if you need to perform some advanced data manipulation? Maybe it's not raw data you want to submit to your contract but rather metadata generated by statistical analysis of multiple data points. Maybe you can manipulate the data on-chain with the default adapters but want to reduce gas costs. Perhaps you don't want your API request on-chain due to using a credentialed source, and you don't want to specify those credentials on-chain or in the oracle job spec. This is where [external adapters][14] come in. - -![Chainlink External Adapter for IoT Devices][15] - -(Chainlink, ©2020) - -External adapters are the "whatever data you need; we can handle it" of Chainlink. When we say universal smart contracts, we really mean _universal_. Since external adapters are pieces of code that exist off-chain with the Chainlink oracle node, they can be written in any language of your choice and perform whatever functionality you can think up—so long as the data input and output adhere to the adapter's JSON specification. External adapters act as the interface between the Chainlink decentralized oracle network and external data, letting the node operators know how to request and receive the JSON response that is then consumed on-chain. - -Defining this interface specification off-chain through an external adapter opens up vast possibilities: You can now store your API credentials off-chain per your personal security standards, data can be programmed in any way in the language of your choice, and all of this happens without using any Ethereum gas fees to fund an on-chain transaction. In a sense, external adapters are like another layer of a decentralized oracle, packaging up data outside the blockchain with speed and at low cost and putting it into one tidy JSON format to be verifiably committed on-chain by the Chainlink oracle node. - -External adapters are a large part of what makes Chainlink such a versatile decentralized oracle network. Contract developers are free to implement these adapters as needed, or they can choose from [existing adapters][16] on the Chainlink Market. If you are a smart contract developer looking to create an external adapter, Chainlink merely requires you to specify the JSON interfaces for the data request and the return data; between those two interfaces is where developers are free to create and manipulate the data to fit their use case. As an oracle node operator, to support the external adapter and handle the additional requests, you must [create a bridge][17] for it in your node user interface and add the adapter's bridge name to your supported tasks. - -![Create a new bridge in Chainlink][18] - -(ChainLink, ©2020) - - -``` -{ -  "initiators": [ -    { "type": "runLog" } -  ], -  "tasks": [ -    { "type": "randomNumber" }, -    { "type": "copy", -      "params": {"copyPath": ["details", "current"]}}, -    { "type": "multiply", -      "params": {"times": 100 }}, -    { "type": "ethuint256" }, -    { "type": "ethtx" } -  ] -} -``` - -You can access a full example of creating an external adapter on Chainlink's [building external adapters][19] page. - -Chainlink is striving to give blockchain and smart contract developers the tools to empower universal smart contracts with real-world data, exactly how they need it. Chainlink's design, incorporating direct calls to any API through default adapters and extensible external adapters, gives developers a flexible platform to create as they see fit, with any data they might need. This opens up smart contracts to a literal world of data and the new use cases this empowers. - -### Start building with Chainlink - -If you're a smart contract developer looking to increase your smart contracts' utility with external data, try out this Chainlink [example walkthrough][20] to deploy a universal smart contract that interacts with off-chain data. - -Chainlink is open source under the [MIT License][21], so if you're developing a product that could benefit from Chainlink decentralized oracles or would like to assist in developing the Chainlink Network, visit the [developer documentation][22] or join the technical discussion on [Discord][23]. You can also learn more on Chainlink's [website][4], [Twitter][24], [Reddit][25], [YouTube][26], [Telegram][27], and [GitHub][28]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/12/blockchain-smart-contracts - -作者:[Gage Mondok][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/matt-coolidge -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/cube_innovation_process_block_container.png?itok=vkPYmSRQ (cubes coming together to create a larger cube) -[2]: https://blog.chain.link/what-is-a-smart-contract-and-why-it-is-a-superior-form-of-digital-agreement/ -[3]: https://blog.chain.link/what-is-the-blockchain-oracle-problem/ -[4]: https://chain.link/ -[5]: https://github.com/ethereum/solidity -[6]: https://docs.chain.link/docs/adapters -[7]: https://docs.chain.link/docs/adapters#httpget -[8]: https://github.com/smartcontractkit/chainlink/blob/develop/evm-contracts/src/v0.6/ChainlinkClient.sol -[9]: https://min-api.cryptocompare.com/data/price?fsym=ETH\&tsyms=USD -[10]: https://docs.chain.link/docs/make-a-http-get-request -[11]: https://docs.chain.link/docs/existing-job-request -[12]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+request -[13]: https://market.link/ -[14]: https://docs.chain.link/docs/external-adapters -[15]: https://opensource.com/sites/default/files/chainlink-external-adapter.png (Chainlink External Adapters enable smart contracts to easily integrate with specialized APIs) -[16]: https://market.link/search/adapters -[17]: https://docs.chain.link/docs/node-operators#config -[18]: https://opensource.com/sites/default/files/uploads/chainlink_newbridge.png (Create a new bridge in Chainlink) -[19]: https://docs.chain.link/docs/developers -[20]: https://docs.chain.link/docs/example-walkthrough -[21]: https://github.com/smartcontractkit/chainlink/blob/develop/LICENSE -[22]: https://docs.chain.link/ -[23]: https://discordapp.com/invite/aSK4zew -[24]: https://twitter.com/chainlink -[25]: https://www.reddit.com/r/Chainlink/ -[26]: https://www.youtube.com/channel/UCnjkrlqaWEBSnKZQ71gdyFA -[27]: https://t.me/chainlinkofficial -[28]: https://github.com/smartcontractkit/chainlink diff --git a/sources/tech/20201202 5 collaboration tips for using an open source alternative to Google Docs.md b/sources/tech/20201202 5 collaboration tips for using an open source alternative to Google Docs.md deleted file mode 100644 index 3d603e2dff..0000000000 --- a/sources/tech/20201202 5 collaboration tips for using an open source alternative to Google Docs.md +++ /dev/null @@ -1,125 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 collaboration tips for using an open source alternative to Google Docs) -[#]: via: (https://opensource.com/article/20/12/onlyoffice-docs) -[#]: author: (Nadya Knyazeva https://opensource.com/users/hellonadya) - -5 collaboration tips for using an open source alternative to Google Docs -====== -Collaborative writing and editing is a breeze when you put these -ONLYOFFICE features to work. -![Filing cabinet for organization][1] - -ONLYOFFICE Docs is a self-hosted open source alternative to Microsoft Office and Google Docs for collaborating on documents, spreadsheets, and presentations in real time. - -The following are the five most important ways [ONLYOFFICE Docs][2] helps organize my collaborative work. - -### 1\. Integrate with document storage - -ONLYOFFICE Docs is highly flexible in how you can store documents. By default, you can use ONLYOFFICE Docs within an ONLYOFFICE Workspace. This provides a productivity solution for managing documents and projects. It's the clear way to use ONLYOFFICE Docs because it's included; when you install one, you get the other. - -However, the full ONLYOFFICE suite can be integrated with ownCloud, Nextcloud, and other popular sync and share platforms. Helpful [connectors][3] are available in your sharing platform's official app store or on GitHub. - -Finally, since ONLYOFFICE is open source, web app developers are free to integrate ONLYOFFICE Docs into their applications using the [ONLYOFFICE API][4]. - -### 2\. Manage document permissions - -In ONLYOFFFICE Docs, you can differentiate what your teammates can do when they open shared documents. You can grant them permission to view, edit, or share files or perform specific actions—leave comments, suggest changes in review mode, fill in determined fields, etc. Differentiating document permissions can help structure and secure your collaboration. - -![ONLYOFFICE sharing options][5] - -(Nadya Knyazeva, [CC BY-SA 4.0][6]) - -The permissions you have available depend on your document management system. In ONLYOFFICE Workspace and ownCloud, you can share files with all the permissions listed above, plus you'll get an additional permission for spreadsheets (Custom Filter in ONLYOFFICE or Modify Filter in ownCloud). The filtering permission allows you to decide whether filters applied by one user should affect only that person or everyone. If you're integrating with Nextcloud or, for example, Seafile, you get fewer permission options. - -If you are integrating the suite and want to add more permissions, your app must allow registering new sharing attributes (such as the ability to restrict downloading, printing, or copying document content to the clipboard), as described in [the API documentation][7]. - -### 3\. True collaboration - -The collaborative work toolset is basically the same for all environments. You have comments to add notes, suggestions, or questions for people working on a document together. ONLYOFFICE has this, of course, but it strives to provide a few extra features whenever possible. For instance, in ONLYOFFICE Workspace, you can quickly add mentions by typing + or @ followed by a user's name to draw a specific person's attention to your comment. - -![ONLYOFFICE comments][8] - -(Nadya Knyazeva, [CC BY-SA 4.0][6]) - -There's also a chat feature to quickly discuss something with teammates without switching to a messaging app (be aware that the chat history clears when you close a document). - -Track changes enables reviewing documents by suggesting changes. All the changes made in this mode are highlighted, and the owner and users with full editing access can accept or reject them or preview the document with all the changes accepted or rejected. - -What's important about collaborative work in ONLYOFFICE Docs is that users working simultaneously on the same docs can set individual preferences (e.g., enable track changes or spell checking, display non-printing characters, zoom the doc in and out, and so on) without disturbing each other. - -### 4\. Version control - -Versioning is so important that entire industries have developed around the process. For developers, writing without Git-style revision control can be unsettling. For content creators, emailing revisions back and forth to one another gets messy and confusing. - -ONLYOFFICE Docs allows viewing a document's version history in the editor. Changes and the author who made them are highlighted in different colors. This feature's availability is determined by the doc management system you use; version history is available for ONLYOFFICE Workspace, Nextcloud, and ownCloud integration. - -![ONLYOFFICE version history in Nextcloud][9] - -(Nadya Knyazeva, [CC BY-SA 4.0][6]) - -### 5\. Change real-time co-editing mode - -There are two ways to co-edit a document in real-time in ONLYOFFICE Docs. They are called Fast and Strict modes, and they're available regardless of how you integrate ONLYOFFICE into your toolchain. - -Fast mode allows you to see your co-authors' changes as they are typing. Your changes are also shown to others immediately. - -In Strict mode, you lock the document you are working on, and no one can see what you are typing until you click Save. You can see what parts of the document are locked by co-authors, but you can not see what they are doing until they save. - -When collaborating on a document in one of these modes, the Ctrl+Z (undo) command affects only your work, so your co-authors' actions are unaffected. - -### Bonus: Security options - -Depending on your environment, you'll find different options to protect collaboration on documents. - -ONLYOFFICE Workspace offers the standard security toolset, with HTTPS, backups, two-factor authentication, secure sign-on, and an option to encrypt data at rest. One feature that, according to ONLYOFFICE, has no counterpart is called _Private Rooms_. - -A Private Room is a folder that can be accessed only through the desktop app. Each office file created and stored there is encrypted using the AES-265 algorithm. Everything you type—every letter, every number, every symbol—is encrypted immediately, even if you're collaborating in real time. - -![ONLYOFFICE Private Rooms][10] - -(Nadya Knyazeva, [CC BY-SA 4.0][6]) - -ONLYOFFICE Docs also uses JSON Web Tokens (JWT) for security. The editors request an encrypted signature to check who can access the document and what they can do with it. Currently, JWT is implemented for ONLYOFFICE Workspace and for Nextcloud, ownCloud, Alfresco, Confluence, HumHub, and Nuxeo integrations, in addition to their built-in security tools. - -In a Nextcloud integration, you can also insert watermarks to protect sensitive docs. Watermarks are enabled by an admin and cannot be removed from a document. - -![ONLYOFFICE Watermark in Nextcloud][11] - -(Nadya Knyazeva, [CC BY-SA 4.0][6]) - -### So many features - -There are many more features in ONLYOFFICE that will fit into one article. If you're looking for an open source alternative to Microsoft or Google collaboration tools, ONLYOFFICE is the most powerful option I know of. Give it a try and let me know in the comments what you think of ONLYOFFICE Docs as a collaboration tool. - -Take a look at five great open source alternatives to Google Docs. - -Sandstorm's Jade Wang shares some of her favorite open source web apps that are self-hosted... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/12/onlyoffice-docs - -作者:[Nadya Knyazeva][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/hellonadya -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/files_documents_organize_letter.png?itok=GTtiiabr (Filing cabinet for organization) -[2]: https://www.onlyoffice.com/office-suite.aspx -[3]: https://www.onlyoffice.com/all-connectors.aspx -[4]: https://api.onlyoffice.com/editors/basic -[5]: https://opensource.com/sites/default/files/uploads/1._sharing_window.png (ONLYOFFICE sharing options) -[6]: https://creativecommons.org/licenses/by-sa/4.0/ -[7]: https://api.onlyoffice.com/editors/config/document/permissions -[8]: https://opensource.com/sites/default/files/uploads/2._comments.png (ONLYOFFICE comments) -[9]: https://opensource.com/sites/default/files/uploads/3._version_history_in_nextcloud.png (ONLYOFFICE version history in Nextcloud) -[10]: https://opensource.com/sites/default/files/uploads/4_privateroom.png (ONLYOFFICE Private Rooms) -[11]: https://opensource.com/sites/default/files/uploads/5._watermark.png (ONLYOFFICE Watermark in Nextcloud) diff --git a/sources/tech/20201212 How to Customize the Task Switcher in KDE Plasma.md b/sources/tech/20201212 How to Customize the Task Switcher in KDE Plasma.md deleted file mode 100644 index ce6b7e91ab..0000000000 --- a/sources/tech/20201212 How to Customize the Task Switcher in KDE Plasma.md +++ /dev/null @@ -1,94 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Customize the Task Switcher in KDE Plasma) -[#]: via: (https://itsfoss.com/customize-task-switcher-kde/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -How to Customize the Task Switcher in KDE Plasma -====== - -It is often the little interactions with a [desktop environment][1] that makes up for a good user experience and task switcher is something that most of the users fiddle with. - -I’ve recently about [customizing the task switching experience on GNOME][2] but what about the most customizable desktop environment, KDE? - -Fret not, it isn’t rocket science to tweak the task switcher in KDE. In this article, I’m going to show you how to change the task switcher experience on any KDE-powered Linux system. - -### Customize Task Switcher in KDE: Here’s How It is Done - -If you prefer video instructions I have also made a quick video for you: - -Here are the text instructions: - -![Kde Task Switcher Default Style][3] - -To get started, you need to head to the System Settings in KDE as shown in the screenshot below. - -![][4] - -Next, you have to navigate your way to the “**Window Management**” option as shown in the image below. - -![][5] - -Once you click on the option, you will be greeted with more options. Here, you need to click on “**Task Switcher**” because that is what we are going to customize, you can explore other options if you are curious. - -![][6] - -As you can observe in the screenshot above, my settings may look different that yours: - - * I have disabled the option to “**Show selected window**“ - * And, have set the visual style of the task switcher to “**Flip Switch**“ - - - -Here’s how it looks like with the Flip Switch style when you press **Alt+Tab**: - -![][7] - -In case you cannot find the option to set it, take a closer look at how you navigate the drop-down menu to change the visual style of Task Switcher while potentially disabling “**Show selected Window**” (that’s what I prefer). - -![][8] - -As you can see in the image above, you get to change the sort order of the windows along with a couple more visual styles for the task switcher. - -In addition to this setting, you can also look for a variety of task switcher themes/designs online by click on “**Get New Task Switchers**” button in the bottom-right corner of the window. - -![][9] - -You will also find several other options to change the key bind for accessing the tasks switcher, if that is what you need. - -#### Reset to default in a click - -If you want to revert the settings and want it to go back to the defaults. You will find a “**Defaults**” / “**Reset**” button, you can click on it to reset any changes that you made. - -![][10] - -Of course, feel free to explore any other customization options that you come across in the System Settings to personalize your KDE experience. - -I’d like to cover a detailed customization guide for KDE desktop in the near future, would you find that interesting? Let me know your thoughts in the comments below! - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/customize-task-switcher-kde/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/what-is-desktop-environment/ -[2]: https://itsfoss.com/customize-gnome-task-switcher/ -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/kde-task-switcher-default.jpg?resize=800%2C396&ssl=1 -[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/kde-system-settings.jpg?resize=761%2C600&ssl=1 -[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/window-management-kde.jpg?resize=800%2C568&ssl=1 -[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/kde-settings-task-switcher.jpg?resize=800%2C569&ssl=1 -[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/kde-flip-switch.jpg?resize=800%2C484&ssl=1 -[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/kde-task-switcher-flip.jpg?resize=800%2C568&ssl=1 -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/kde-task-switcher-online.png?resize=800%2C572&ssl=1 -[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/12/kde-default-reset-task-switcher.jpg?resize=800%2C568&ssl=1 diff --git a/sources/tech/20201212 How to Install Mesa Drivers on Ubuntu -Latest and Stable.md b/sources/tech/20201212 How to Install Mesa Drivers on Ubuntu -Latest and Stable.md deleted file mode 100644 index bb32d6c90d..0000000000 --- a/sources/tech/20201212 How to Install Mesa Drivers on Ubuntu -Latest and Stable.md +++ /dev/null @@ -1,128 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Install Mesa Drivers on Ubuntu [Latest and Stable]) -[#]: via: (https://itsfoss.com/install-mesa-ubuntu/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -How to Install Mesa Drivers on Ubuntu [Latest and Stable] -====== - -_**This quick tutorial shows the steps to get a newer version of Mesa drivers on Ubuntu, be it stable release or cutting-edge development release.**_ - -### What is Mesa? - -[Mesa][1] itself is not a graphics card like Nvidia or AMD. Instead, it provides open source software implementation of [OpenGL][2], [Vulkan][3], and some other graphics API specifications for Intel and AMD graphics hardware. With Mesa, you can play high-end games and use applications that require such graphics libraries. - -More information on Mesa can be found in [this article][4]. - -### How to install Mesa on Ubuntu? - -![][5] - -Mesa comes preinstalled on Ubuntu with the open source graphics drivers of Radeon, Intel and Nvidia (sometimes). Though it probably won’t be the latest Mesa version. - -You can check if your system uses Mesa and the installed versions using this command: - -``` -glxinfo | grep Mesa -``` - -If for some reasons (like playing games), you want to install a newer version of Mesa, this tutorial will help you with that. Since, you’ll be using PPA, I highly recommend reading my [in-depth guide on PPA][6]. - -Attention! - -Installing new Mesa graphics drivers may also need a newer Linux kernel. It will be a good idea to [enable HWE kernel on Ubuntu][7] to reduce the chances of conflict with the kernel. HWE Kernel gives you the latest stable kernel used by Ubuntu on an older LTS release. - -### Install the latest stable version of Mesa driver in Ubuntu [Latest point release] - -The [Kisak-mesa PPA][8] provides the latest point release of Mesa. You can use it by entering the following commands one by one in the terminal: - -``` -sudo add-apt-repository ppa:kisak/kisak-mesa -sudo apt update -sudo apt install mesa -``` - -It will give you the latest Mesa point release. - -#### Remove it and go back to original Mesa driver - -If you are facing issues and do not want to use the newer version of Mesa, you can revert to the original version. - -Install PPA Purge tool first: - -``` -sudo apt install ppa-purge -``` - -And then use it to remove the PPA as well as the Mesa package version installed by this PPA. - -``` -sudo ppa-purge ppa:kisak/kisak-mesa -``` - -### Install the latest Mesa graphics drivers in Ubuntu [Bleeding edge] - -If you want the latest Mesa drivers as they are being developed, this is what you need. - -There is this awesome PPA that provides open source graphics drivers packages for Radeon, Intel and Nvidia hardware. - -The best thing here is that all driver packages are automatically built twice a day, when there is an upstream change. - -If you want the absolute latest Mesa drivers on Ubuntu and do not want to take the trouble of installing it from the source code, use this [PPA by Oibaf][9]. - -The PPA is available for 20.04, 20.10 and 21.04 at the time of writing this article. It is no longer updated for Ubuntu 18.04 LTS. - -Open the terminal and use the following commands one by one: - -``` -sudo add-apt-repository ppa:oibaf/graphics-drivers -sudo apt update -sudo apt install mesa -``` - -This will give you the latest Mesa drivers. - -#### Remove it and go back to original Mesa driver - -You can remove the PPA and the installed latest Mesa driver using the ppa-purge tool. - -Install it first: - -``` -sudo apt-get install ppa-purge -``` - -Now use it to disable the PPA you had added and revert the Mesa package to the version provided by Ubuntu officially. - -``` -sudo ppa-purge ppa:oibaf/graphics-drivers -``` - -I hope this quick tutorial was helpful in getting a newer version of Mesa on Ubuntu. If you have questions or suggestions, please use the comment section. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/install-mesa-ubuntu/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://mesa3d.org -[2]: https://www.opengl.org -[3]: https://www.khronos.org/vulkan/ -[4]: https://www.gamingonlinux.com/articles/an-explanation-of-what-mesa-is-and-what-graphics-cards-use-it.9244 -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/12/mesa-ubuntu.png?resize=800%2C450&ssl=1 -[6]: https://itsfoss.com/ppa-guide/ -[7]: https://itsfoss.com/ubuntu-hwe-kernel/ -[8]: https://launchpad.net/~kisak/+archive/ubuntu/kisak-mesa -[9]: https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers diff --git a/sources/tech/20201214 Practice coding in Java by writing a game.md b/sources/tech/20201214 Practice coding in Java by writing a game.md deleted file mode 100644 index 5fdf3e514c..0000000000 --- a/sources/tech/20201214 Practice coding in Java by writing a game.md +++ /dev/null @@ -1,246 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Practice coding in Java by writing a game) -[#]: via: (https://opensource.com/article/20/12/learn-java) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Practice coding in Java by writing a game -====== -Writing simple games is a fun way to learn a new programming language. -Put that principle to work to get started with Java. -![Learning and studying technology is the key to success][1] - -My article about [learning different programming languages][2] lists five things you need to understand when starting a new language. An important part of learning a language, of course, is knowing what you intend to do with it. - -I've found that simple games are both fun to write and useful in exploring a language's abilities. In this article, I demonstrate how to create a simple guessing game in Java. - -### Install Java - -To do this exercise, you must have Java installed. If you don't have it, check out these links to install Java on [Linux][3], [macOS, or Windows][4]. - -After installing it, run this Java command in a terminal to confirm the version you installed: - - -``` -`$ java -version` -``` - -### Guess the number - -This "guess the number" program exercises several concepts in programming languages: how to assign values to variables, how to write statements, and how to perform conditional evaluation and loops. It's a great practical experiment for learning a new programming language. - -Here's my Java implementation: - - -``` -package com.example.guess; - -import java.util.Random; -import java.util.Scanner; -    -class Main { -    private static final [Random][5] r = new [Random][5](); -    private static final int NUMBER = r.nextInt(100) + 1; -    private static int guess = 0; - -    public static void main([String][6][] args) {   -        Scanner player = new Scanner([System][7].in); -            [System][7].out.println("number is " + [String][6].valueOf(NUMBER)); //DEBUG -            while ( guess != NUMBER ) { -            // prompt player for guess -            [System][7].out.println("Guess a number between 1 and 100"); -            guess = player.nextInt(); -            if ( guess > NUMBER ) { -                [System][7].out.println("Too high"); -            } else if ( guess < NUMBER ) { -                [System][7].out.println("Too low"); -            } else { -                [System][7].out.println("That's right!"); -                [System][7].exit(0); -            } -        } -  } -} -``` - -That's about 20 lines of code, excluding whitespace and trailing braces. Structurally, however, there's a lot going on, which I'll break down here. - -#### Package declaration - -The first line, `package com.example.guess`, is not strictly necessary in a simple one-file application like this, but it's a good habit to get into. Java is a big language, and new Java is written every day, so every Java project needs to have a unique identifier to help programmers tell one library from another. - -When writing Java code, you should declare a `package` it belongs to. The format for this is usually a reverse domain name, such as `com.opensource.guess` or `org.slf4j.Logger`. As usual for Java, this line is terminated by a semicolon. - -#### Import statements - -The next lines of the code are import statements, which tell the Java compiler what libraries to load when building the executable application. The libraries I use here are distributed along with OpenJDK, so you don't need to download them yourself. Because they're not strictly a part of the core language, you do need to list them for the compiler. - -The Random library provides access to pseudo-random number generation, and the Scanner library lets you read user input in a terminal. - -#### Java class - -The next part creates a Java class. Java is an object-oriented programming language, so its quintessential construct is a _class_. There are some very specific code ideas suggested by a class, and if you're new to programming, you'll pick up on them with practice. For now, think of a class as a box into which you place variables and code instructions, almost as if you were building a machine. The parts you place into the class are unique to that class, and because they're contained in a box, they can't be seen by other classes. More importantly, since there is only one class in this sample game, a class is self-sufficient: It contains everything it needs to perform its particular task. In this case, its task is the whole game, but in larger applications, classes often work together in a sort of daisy-chain to produce complex jobs. - -In Java, each file generally contains one class. The class in this file is called `Main` to signify that it's the entry-point for this application. In a single-file application such as this, the significance of a main class is difficult to appreciate, but in a larger Java project with dozens of classes and source files, marking one `Main` is helpful. And anyway, it's easy to package up an application for distribution with a main class defined. - -#### Java fields - -In Java, as in C and C++, you must declare variables before using them. You can define "fields" at the top of a Java class. The word "field" is just a fancy term for a variable, but it specifically refers to a variable assigned to a class rather than one embedded somewhere in a function. - -This game creates three fields: Two to generate a pseudo-random number, and one to establish an initial (and always incorrect) guess. The long string of keywords (`private static final`) leading up to each field may look confusing (especially when starting out with Java), but using a good IDE like Netbeans or Eclipse can help you navigate the best choice. - -It's important to understand them, too. A _private_ field is one that's available only to its own class. If another class tries to access a private field, the field may as well not exist. In a one-class application such as this one, it makes sense to use private fields. - -A _static_ field belongs to the class itself and not to a class instance. This doesn't make much difference in a small demo app like this because only one instance of the class exists. In a larger application, you may have a reason to define or redefine a variable each time a class instance is spawned. - -A _final_ field cannot have its value changed. This application demonstrates this perfectly: The random number never changes during the game (a moving target wouldn't be very fair), while the player's guess _must_ change or the game wouldn't be winnable. For that reason, the random number established at the beginning of the game is final, but the guess is not. - -#### Pseudo-random numbers - -Two fields create the random number that serves as the player's target. The first creates an instance of the `Random` class. This is essentially a random seed from which you can draw a pretty unpredictable number. To do this, list the class you're invoking followed by a variable name of your choice, which you set to a new instance of the class: `Random r = new Random();`. Like other Java statements, this terminates with a semicolon. - -To draw a number, you must create another variable using the `nextInt()` method of Java. The syntax looks a little different, but it's similar: You list the kind of variable you're creating, you provide a name of your choice, and then you set it to the results of some action: `int NUMBER = r.nextInt(100) + 1;`. You can (and should) look at the documentation for specific methods, like `nextInt()`, to learn how they work, but in this case, the integer drawn from the `r` random seed is limited _up to_ 100 (that is, a maximum of 99). Adding 1 to the result ensures that a number is never 0 and the functional maximum is 100. - -Obviously, the decision to disqualify any number outside of the 1 to 100 range is a purely arbitrary design decision, but it's important to know these constraints before sitting down to program. Without them, it's difficult to know what you're coding toward. If possible, work with a person whose job it is to define the application you're coding. If you have no one to work with, make sure to list your targets first—and only then put on your "coder hat." - -### Main method - -By default, Java looks for a `main` method (or "function," as they're called in many other languages) to run in a class. Not all classes need a main method, but this demo app only has one method, so it may as well be the main one. Methods, like fields, can be made public or private and static or non-static, but the main method must be public and static for the Java compiler to recognize and utilize it. - -### Application logic - -For this application to work as a game, it must continue to run _while_ the player takes guesses at a secret pseudo-random number. Were the application to stop after each guess, the player would only have one guess and would very rarely win. It's also part of the game's design that the computer provides hints to guide the player's next guess. - -A `while` loop with embedded `if` statements achieves this design target. A `while` loop inherently continues to run until a specific condition is met. (In this case, the `guess` variable must equal the `NUMBER` variable.) Each guess can be compared to the target `NUMBER` to prompt helpful hints. - -### Syntax - -The main method starts by creating a new `Scanner` instance. This is the same principle as the `Random` instance used as a pseudo-random seed: You cite the class you want to use as a template, provide a variable name (I use `player` to represent the person entering guesses), and then set that variable to the results of running the class' main method. Again, if you were coding this on your own, you'd look at the class' documentation to get the syntax when using it. - -This sample code includes a debugging statement that reveals the target `NUMBER`. That makes the game moot, but it's useful to prove to yourself that it's working correctly. Even this small debugging statement reveals some important Java tips: `System.out.println` is a print statement, and the `valueOf()` method converts the integer `NUMBER` to a string to print it as part of a sentence rather than an element of math. - -The `while` statement begins next, with the sole condition that the player's `guess` is not equal to the target `NUMBER`. This is an infinite loop that can end only when it's _false_ that `guess` does _not_ equal `NUMBER`. - -In this loop, the player is prompted for a number. The Scanner object, called `player`, takes any valid integer entered by the player and puts its value into the `guess` field. - -The `if` statement compares `guess` to `NUMBER` and responds with `System.out.println` print statements to provide feedback to the human player. - -If `guess` is neither greater than nor less than `NUMBER`, then it must be equal to it. At this point, the game prints a congratulatory message and exits. As usual with [POSIX][8] application design, this game exits with a 0 status to indicate success. - -### Run the game - -To test your game, save the sample code as `Guess.java` and use the Java command to run it: - - -``` -$ java ./Guess.java -number is 38 -Guess a number between 1 and 100 -1 -Too low -Guess a number between 1 and 100 -39 -Too high -Guess a number between 1 and 100 -38 -That's right! -$ -``` - -Just as expected! - -### Package the game - -While it isn't as impressive on a single-file application like this as it is on a complex project, Java makes packaging very easy. For the best results, structure your project directory to include a place for your source code, a place for your compiled class, and a manifest file. In practice, this is somewhat flexible, and using an IDE does most of the work for you. It's useful to do it by hand once in a while, though. - -Create a project folder if you haven't already. Then create one directory called `src` to hold your source files. Save the sample code in this article as `src/Guess.java`: - - -``` -$ mkdir src -$ mv sample.java src/Guess.java -``` - -Now, create a directory tree that mirrors the name of your Java package, which appears at the very top of your code: - - -``` -$ head -n1 src/Guess.java -package com.example.guess; -$ mkdir -p com/example/guess -``` - -Create a new file called `Manifest.txt` with just one line of text in it: - - -``` -`$ echo "Manifest-Version: 1.0" > Manifest.txt` -``` - -Next, compile your game into a Java class. This produces a file called `Main.class` in `com/example/guess`: - - -``` -$ javac src/Guess.java -d com/example/guess -$ ls com/example/guess/ -Main.class -``` - -You're all set to package your application into a JAR (Java archive). The `jar` command is a lot like the [tar][9] command, so many of the options may look familiar: - - -``` -$ jar cfme Guess.jar \ -Manifest.txt \ -com.example.guess.Main \ -com/example/guess/Main.class -``` - -From the syntax of the command, you may surmise that it creates a new JAR file called `Guess.jar` with its required manifest data located in `Manifest.txt`. Its main class is defined as an extension of the package name, and the class is `com/example/guess/Main.class`. - -You can view the contents of the JAR file: - - -``` -$ jar tvf Guess.jar -     0 Wed Nov 25 10:33:10 NZDT 2020 META-INF/ -    96 Wed Nov 25 10:33:10 NZDT 2020 META-INF/MANIFEST.MF -  1572 Wed Nov 25 09:42:08 NZDT 2020 com/example/guess/Main.class -``` - -And you can even extract it with the `xvf` options. - -Run your JAR file with the `java` command: - - -``` -`$ java -jar Guess.jar` -``` - -Copy your JAR file from Linux to a macOS or Windows computer and try running it. Without recompiling, it runs as expected. This may seem normal if your basis of comparison is, say, a simple Python script that happens to run anywhere, but imagine a complex project with several multimedia libraries and other dependencies. With Java, those dependencies are packaged along with your application, and it _all_ runs on _any_ platform. Welcome to the wonderful world of Java! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/12/learn-java - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/studying-books-java-couch-education.png?itok=C9gasCXr (Learning and studying technology is the key to success) -[2]: https://opensource.com/article/20/10/learn-any-programming-language -[3]: https://opensource.com/article/19/11/install-java-linux -[4]: http://adoptopenjdk.org -[5]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+random -[6]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string -[7]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system -[8]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains -[9]: https://opensource.com/article/17/7/how-unzip-targz-file From f24f0b43cbfcfd15ca58ef2a1663a7f5def32217 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 2 Feb 2022 05:02:26 +0800 Subject: [PATCH 157/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220202=20?= =?UTF-8?q?Read=20and=20Organize=20Markdown=20Files=20in=20Linux=20Termina?= =?UTF-8?q?l=20With=20Glow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220202 Read and Organize Markdown Files in Linux Terminal With Glow.md --- ...kdown Files in Linux Terminal With Glow.md | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 sources/tech/20220202 Read and Organize Markdown Files in Linux Terminal With Glow.md diff --git a/sources/tech/20220202 Read and Organize Markdown Files in Linux Terminal With Glow.md b/sources/tech/20220202 Read and Organize Markdown Files in Linux Terminal With Glow.md new file mode 100644 index 0000000000..2f3ace7e51 --- /dev/null +++ b/sources/tech/20220202 Read and Organize Markdown Files in Linux Terminal With Glow.md @@ -0,0 +1,135 @@ +[#]: subject: "Read and Organize Markdown Files in Linux Terminal With Glow" +[#]: via: "https://itsfoss.com/glow-cli-tool-markdown/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Read and Organize Markdown Files in Linux Terminal With Glow +====== + +_**Brief: Glow is a CLI tool that lets you render Markdown files in the Linux terminal. You can also organize Markdown files with it.**_ + +I love Markdown. I am not an expert Markdown user but I can surely write most of my articles in Markdown. + +If you are a regular at It’s FOSS, you might have come across [Markdown guides][1], editors and tools like Obsidian. I’ll add one more tool to this list. It’s called [Glow][2] and unlike previously covered applications, Glow enables you to read Markdown files in the terminal. + +Wait! Can you not read Markdown in the terminal using the regular [Linux commands to read text files][3] like cat, less or even editors like Vim? + +Yes, you can. But it will be the raw markdown file with all the codes displayed as it is, rather than showing a properly formatted text. + +![Glow renders the Markdown file][4] + +Do note that Glow is not an editor. You cannot use it to write in Markdown text. + +### Glow features Markdown lovers will love + +Glow can be used in two formats: [CLI and TUI][5]. + +Simply using Glow on a Markdown file will display the entire rendered content on the screen. + +``` + + glow markdown_file + +``` + +![Markdown display with Glow][6] + +That’s good but Glow can do even better. It has additional options that open up the TUI mode (terminal user interface) and allows you to do more with it. + +You can use the pager option to display the rendered text in pager mode (like how the less command shows the text without cluttering the screen). + +``` + + glow -p markdown_file + +``` + +In this pager view, you can use the **/ key and search** for a certain text the same way you do with the less command. You can press **q key to exit** the view. + +![Pager view similar to the less command][7] + +That’s not it. You can use the -a option and it will find all the Markdown files in the current directory and its subdirectories. + +``` + + glow -a + +``` + +You can use the arrow keys to scroll the files in the display. Up and down keys to move up and down, left and right arrow keys to move by pages. + +![With -a option, Glow finds and displays all Markdown files in current directory][8] + +You can see the help options displayed at the bottom. The find option in this view allows you to search files by name (not their content). + +![You can search files by their name][9] + +There are also tabs. You can move between the tabs using the tab key, of course. + +The stash tab works like a bookmark. You can create a stash/bookmark by pressing the s key while browsing files or while viewing their content. This bookmark will be visible only in the current directory. + +You can press x key to remove bookmark (not file) or even add a memo by pressing the m key. + +![You can bookmark files by stashing them with s key][10] + +The News tabs shows changelogs and other messages from the Glow developer(s). + +![The news tab shows messages from the developers][11] + +When you have found your desired file, you can view it by pressing enter. Since you are in the TUI mode, you get additional keyboard options here. The options can be displayed by pressing the ? key. + +![You can view keyboard shortcuts by pressing the ? key][12] + +### Installing Glow on Linux + +Glow is available for Linux and macOS. You can install it [using Homebrew on Linux][13] and macOS, however, I would advise using the Linux packages here. + +Glow is available in the repository of Void, Solus and Arch Linux. You can use their package managers to install it. + +On Arch-based distributions, use: + +``` + + sudo pacman -S glow + +``` + +For Ubuntu, Debian, Fedora and SUSE, there are .DEB and .RPM binaries available for various architectures and you may find that on its release page. + +[Download Glow for other Linux distros][14] + +### Conclusion + +Overall, Glow is a handy tool to beautifully view and organize Markdown files in the terminal. Like most other CLI tools, it is not for everyone. If you dwell in the terminal with a liking for Markdown files, you may give it a try. And when you do, please share your experience with it in the comment section. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/glow-cli-tool-markdown/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/markdown-guide/ +[2]: https://github.com/charmbracelet/glow +[3]: https://linuxhandbook.com/view-file-linux/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/markdown-display-with-cat.png?resize=1572%2C962&ssl=1 +[5]: https://itsfoss.com/gui-cli-tui/ +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/markdown-display-with-glow.png?resize=800%2C490&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/pager-view-with-glow.png?resize=800%2C451&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/glow-collection.png?resize=800%2C451&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/find-files-in-glow.png?resize=800%2C451&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/stash-feature-glow.png?resize=800%2C374&ssl=1 +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/glow-news-tab.png?resize=800%2C451&ssl=1 +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/display-help-in-file-view-in-glow.png?resize=800%2C490&ssl=1 +[13]: https://itsfoss.com/homebrew-linux/ +[14]: https://github.com/charmbracelet/glow/releases From a90e0e3c5aaf6dcfea5308ef0fcc7c454f4f1c83 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 2 Feb 2022 05:02:39 +0800 Subject: [PATCH 158/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220201=20?= =?UTF-8?q?View=20your=20Linux=20server's=20network=20connections=20with?= =?UTF-8?q?=20netstat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220201 View your Linux server-s network connections with netstat.md --- ...rver-s network connections with netstat.md | 203 ++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 sources/tech/20220201 View your Linux server-s network connections with netstat.md diff --git a/sources/tech/20220201 View your Linux server-s network connections with netstat.md b/sources/tech/20220201 View your Linux server-s network connections with netstat.md new file mode 100644 index 0000000000..dd88bea922 --- /dev/null +++ b/sources/tech/20220201 View your Linux server-s network connections with netstat.md @@ -0,0 +1,203 @@ +[#]: subject: "View your Linux server's network connections with netstat" +[#]: via: "https://opensource.com/article/22/2/linux-network-security-netstat" +[#]: author: "Sahana Sreeram https://opensource.com/users/sahanasreeram01gmailcom" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +View your Linux server's network connections with netstat +====== +The netstat command provides important insight into your Linux server, +both for monitoring and network troubleshooting. +![A rack of servers, blue background][1] + +I shared some important first steps to help manage your personal Linux server in a [previous article][2]. I briefly mentioned monitoring network connections for listening ports, and I want to expand on this by using the `netstat` command for Linux systems. + +Service monitoring and port scanning are standard industry practices. There's very good software like [Prometheus][3] to help automate the process, and [SELinux][4] to help contextualize and protect system access. However, I believe that understanding how your server connects to other networks and devices is key to establishing a baseline of what's normal for your server, which helps you recognize abnormalities that may suggest a bug or intrusion. As a beginner, I've discovered that the `netstat` command provides important insight into my server, both for monitoring and network troubleshooting. + +Netstat and similar network monitoring tools, grouped together in the [net-tools package][5], display information about active network connections. Because services running on open ports are often vulnerable to exploitation, practicing regular network monitoring can help you detect suspicious activity early. + +### Install netstat + +Netstat is frequently pre-installed on Linux distributions. If netstat is not installed on your server, install it with your package manager. On a Debian-based system: + + +``` +`$ sudo apt-get install net-tools` +``` + +For Fedora-based systems: + + +``` +`$ dnf install net-tools` +``` + +### Use netstat + +On its own, the `netstat` command displays all established connections. You can use the `netstat` options above to specify the intended output further. For example, to show all listening and non-listening connections, use the `--all` (`-a` for short) option. This returns a lot of results, so in this example I pipe the output to `head` to display just the first 15 lines of output: + + +``` + + +$ netstat --all | head -n 15 +Active Internet connections (servers and established) +Proto Recv-Q Send-Q Local Address           Foreign Address         State       +tcp        0      0 *:27036                 *:*                     LISTEN       +tcp        0      0 localhost:27060         *:*                     LISTEN       +tcp        0      0 *:16001                 *:*                     LISTEN       +tcp        0      0 localhost:6463          *:*                     LISTEN       +tcp        0      0 *:ssh                   *:*                     LISTEN       +tcp        0      0 localhost:57343         *:*                     LISTEN       +tcp        0      0 *:ipp                   *:*                     LISTEN       +tcp        0      0 *:4713                  *:*                     LISTEN       +tcp        0      0 10.0.1.222:48388        syd15s17-in-f5.1e:https ESTABLISHED +tcp        0      0 10.0.1.222:48194        ec2-35-86-38-2.us:https ESTABLISHED +tcp        0      0 10.0.1.222:56075        103-10-125-164.va:27024 ESTABLISHED +tcp        0      0 10.0.1.222:46680        syd15s20-in-f10.1:https ESTABLISHED +tcp        0      0 10.0.1.222:52730        syd09s23-in-f3.1e:https ESTABLISHED + +``` + +To show only TCP ports, use the `--all` and `--tcp` options, or `-at` for short: + + +``` + + +$ netstat -at | head -n 5 +Active Internet connections (servers and established) +Proto Recv-Q Send-Q Local Address   Foreign Address  State       +tcp        0      0 *:27036         *:*              LISTEN       +tcp        0      0 localhost:27060 *:*              LISTEN       +tcp        0      0 *:16001         *:*              LISTEN + +``` + +To show only UDP ports, use the `--all` and `--udp` options, or `-au` for short: + + +``` + + +$ netstat -au | head -n 5 +Active Internet connections (servers and established) +Proto Recv-Q Send-Q Local Address     Foreign Address    State       +udp        0      0 *:27036           *:*                                 +udp        0      0 10.0.1.222:44741  224.0.0.56:46164   ESTABLISHED +udp        0      0 *:bootpc           + +``` + +The options for netstat are often intuitive. For example, to show all listening TCP and UDP ports with process ID (PID) and numerical address: + + +``` + + +$ sudo netstat --tcp --udp --listening --programs --numeric +Active Internet connections (only servers) +Proto Recv-Q Send-Q Local Address      Foreign Addr  State   PID/Program name     +tcp        0      0 0.0.0.0:111        0.0.0.0:*     LISTEN  1/systemd             +tcp        0      0 192.168.122.1:53   0.0.0.0:*     LISTEN  2500/dnsmasq         +tcp        0      0 0.0.0.0:22         0.0.0.0:*     LISTEN  1726/sshd             +tcp        0      0 127.0.0.1:631      0.0.0.0:*     LISTEN  1721/cupsd           +tcp        0      0 127.0.0.1:6010     0.0.0.0:*     LISTEN  4023/sshd: tux@   +tcp6       0      0 :::111             :::*          LISTEN  1/systemd             +tcp6       0      0 :::22              :::*          LISTEN  1726/sshd             +tcp6       0      0 ::1:631            :::*          LISTEN  1721/cupsd           +tcp6       0      0 ::1:6010           :::*          LISTEN  4023/sshd: tux@   +udp        0      0 0.0.0.0:40514      0.0.0.0:*             1499/avahi-daemon:   +udp        0      0 192.168.122.1:53   0.0.0.0:*             2500/dnsmasq         +udp        0      0 0.0.0.0:67         0.0.0.0:*             2500/dnsmasq         +udp        0      0 0.0.0.0:111        0.0.0.0:*             1/systemd             +udp        0      0 0.0.0.0:5353       0.0.0.0:*             1499/avahi-daemon:   +udp6       0      0 :::111             :::*                  1/systemd             +udp6       0      0 :::44235           :::*                  1499/avahi-daemon:   +udp6       0      0 :::5353            :::*                  1499/avahi-daemon: + +``` + +The short version of this common combination is `-tulpn`. + +To display information about a specific service, [filter with `grep`][6]: + + +``` + + +$ sudo netstat -anlp | grep cups +tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1721/cupsd           tcp6       0      0 ::1:631                 :::*                    LISTEN      1721/cupsd +unix  2      [ ACC ]     STREAM     LISTENING     27251    1/systemd /var/run/cups/cups.sock +unix  2      [ ]         DGRAM                    59530    1721/cupsd +unix  3      [ ]         STREAM     CONNECTED     55196    1721/cupsd /var/run/cups/cups.sock + +``` + +### Next steps + +Once you've run the `netstat` command, you can take steps to secure your system by ensuring that only services that you actively use are listening on your network. + + 1. Recognize commonly exploited ports and services. As a general rule, close the ports you're not actually using. + 2. Be on the lookout for uncommon port numbers, and learn to recognize legitimate ports in use on your system. + 3. Pay close attention to SELinux errors. Sometimes all you need to do is update contexts to match a legitimate change you've made to your system, but read the errors to make sure that SELinux isn't alerting you of suspicious or malicious activity. + + + +If you find that a port is running a suspicious service, or you simply want to close a port that you no longer use, you can manually deny port access through firewall rules by following these steps: + +If you're using `firewall-cmd`, run these commands: + + +``` + + +$ sudo firewall-cmd –remove-port=<port number>/tcp +$ sudo firewall-cmd –runtime-to-permanent + +``` + +If you're using UFW, run the following command: + + +``` +`$ sudo ufw deny ` +``` + +Next, stop the service itself using `systemctl`: + + +``` +`$ systemctl stop ` +``` + +### Learn netstat + +Netstat is a useful tool to quickly collect information about your server's network connections. Regular network monitoring is important an important part of getting to know your system, and it helps you keep your system safe. To incorporate this step into your administrative routine, you can use network monitoring tools like netstat or ss, as well as open source port [scanners such as Nmap or sniffers like Wireshark][7], which allow for [scheduled tasks][8]. + +As servers house larger amounts of personal data, it's increasingly important to ensure the security of personal servers. By understanding how your server connects to the Internet, you can decrease your machine's vulnerability, while still benefiting from the growing connectivity of the digital age. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/linux-network-security-netstat + +作者:[Sahana Sreeram][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/sahanasreeram01gmailcom +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rack_server_sysadmin_cloud_520.png?itok=fGmwhf8I (A rack of servers, blue background) +[2]: https://opensource.com/article/21/4/securing-linux-servers +[3]: https://opensource.com/article/19/11/introduction-monitoring-prometheus +[4]: https://opensource.com/business/13/11/selinux-policy-guide +[5]: http://sourceforge.net/projects/net-tools/ +[6]: https://opensource.com/article/21/3/grep-cheat-sheet +[7]: https://redhat.com/sysadmin/troubleshoot-dhcp-nmap-tcpdump-and-wireshark +[8]: https://opensource.com/article/22/2/redhat.com/sysadmin/nmap-scripting-engine From 6aed4984a5610e1234ec0e6e3aeb354f38a90cad Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 2 Feb 2022 05:02:49 +0800 Subject: [PATCH 159/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220201=20?= =?UTF-8?q?3=20ways=20I=20configure=20SSH=20for=20privacy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220201 3 ways I configure SSH for privacy.md --- ...0201 3 ways I configure SSH for privacy.md | 133 ++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 sources/tech/20220201 3 ways I configure SSH for privacy.md diff --git a/sources/tech/20220201 3 ways I configure SSH for privacy.md b/sources/tech/20220201 3 ways I configure SSH for privacy.md new file mode 100644 index 0000000000..3c8e9c93c3 --- /dev/null +++ b/sources/tech/20220201 3 ways I configure SSH for privacy.md @@ -0,0 +1,133 @@ +[#]: subject: "3 ways I configure SSH for privacy" +[#]: via: "https://opensource.com/article/22/2/configure-ssh-privacy" +[#]: author: "Jonathan Garrido https://opensource.com/users/jgarrido" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +3 ways I configure SSH for privacy +====== +Here's how I optimize my SSH experience and protect my servers from +unauthorized access. +![A keyboard with privacy written on it.][1] + +SSH (Secure Shell) is a protocol that enables you to create a verified and private connection, securing the channel using cryptographic keys, to launch a remote shell on another machine. Using this connection, you can execute remote commands, initiate secure file transfers, forward sockets and displays and services, and much more. + +Before the appearance of SSH, most remote administration was done over telnet, and to be fair, once you could establish a remote session, you could do practically whatever you need. The problem with this protocol was that traffic traveled unencrypted as pure plaintext. It didn't take much effort to use a [traffic sniffer][2] to see all the packets within a session, including those containing a username and password. + +With SSH, thanks to the use of asymmetric keys, the sessions between the apparatus involved in the communication are encrypted. And nowadays this is more relevant than ever, with all the cloud servers getting administered from all over the world. + +### 3 tips for SSH configuration + +The most common implementation of the SSH protocol is OpenSSH, developed by the OpenBSD project and available to most Linux and Unix-like operating systems. Once you install this package, you have a file named `sshd_config` that controls most of the behavior of the service. The default settings are generally very conservative, but I tend to make some adjustments to optimize my SSH experience and protect my servers from unauthorized access. + +### 1\. Change the default port  + +This is the one that not all administrators remember. Anyone with a port scanner can discover an SSH port even after you moved it, so you're hardly removing yourself from harm's way, but you do conveniently avoid hundreds of unsophisticated scripts launched against your server. It's a favor you can do yourself to cut out a good amount of noise from your logs. + +For this article, I had an SSH server default port TCP 22 over one cloud provider, and the average attacks per minute were 24. After changing the port to a much higher number, TCP 45678, the average of people connecting and guessing any username or password was two per day. + +To change the default port for SSH, open `/etc/ssh/sshd_config` in your favorite text editor and change the value of the `Port`** **from 22 to some number greater than 1024. The line may be commented because 22 is the default (so it doesn't need to be explicitly declared in the config), so uncomment the line before saving. + + +``` + + +#Port 22122 +#AddressFamily any  +#ListenAddress 0.0.0.0  +#ListenAddress :: + +``` + +Once you've changed the port and saved the file, restart the SSH server: + + +``` +`$ sudo systemctl restart sshd` +``` + +### 2\. No more passwords + +There's a general movement to stop using passwords as a means of authentication, with methods such as two-factor authentication gaining popularity. OpenSSH can authenticate using asymmetric keys, so there's no need to remember complex passwords, much less to rotate them every few months, or fear that someone was "shoulder surfing" while you were establishing your remote session. The use of SSH keys allows you to log in to your remote equipment quickly and securely. This often means less time processing incorrect usernames and passwords for the server itself. Login is pleasantly simple. When there's no key, there's no entry—not even a prompt. + +To use this feature, you must configure both the client (the computer physically in front of you) and the server (the remote machine). + +On the client machine, you must generate an SSH key pair. This consists of a public and a private key. As their names imply, one key is for you to distribute to servers you want to login to, and the other is private and must get shared with no one. Create a new key with the `ssh-keygen` command, and use the `-t` option to specify a good, recent cryptography library like `ed25519`: + + +``` + + +$ ssh-keygen -t ed25519     + Generating public/private ed25519 key pair.  + Enter file in which to save the key (~/.ssh/id_ed25519): + +``` + +During key creation, you get prompted to name the file. You can press **Return** to accept the default. Should you create more keys in the future, you can give each one a custom name, but having multiple keys means specifying which key you want to use for each interaction, so for now, just accept the default. + +You can also give your key a passphrase. This ensures that even if someone else manages to obtain your private key (which itself should never happen), they're unable to put it to use without your passphrase. It's a useful safeguard for some keys, while it's not appropriate for others (especially those used in scripts). Press **Return** to leave your key with no passphrase or create a passphrase if you choose. + +To copy your key onto a server, use the `ssh-copy-id` command. For example, if I own a server named `example.com`, then I can copy my public key to it with this command: + + +``` +`$ ssh-copy-id jgarrido@example.com` +``` + +This creates or amends the file `authorized_keys` in the server's `.ssh` directory with your public key.  + +Once the `ssh-copy-id` command has confirmed what it's done, try to log in from your computer to verify you can log in without a password (or with your key's passphrase if you choose to use one). + +Once you're on your server without using your server account's password, edit the server's `sshd_config` and set `PasswordAuthentication` to `no`. + + +``` +`PasswordAuthentication no` +``` + +Restart the `ssh` service to load the new config: + + +``` +`$ sudo systemctl restart sshd` +``` + +### 3\. Decide who can log in + +Most distributions don't allow the root user to log in over SSH, which ensures that only non-privileged accounts are active, using the `sudo` command to escalate privileges as required. This prevents one notable and painfully obvious target (root) from simple but all too common scripted attacks. + +Similarly, a simple and powerful feature of OpenSSH is the ability to decide which users can log into a machine. To set which users get granted SSH access, open the `sshd_config` file in your favorite text editor, and add a line like this: + + +``` +`AllowUsers jgarrido jane tux` +``` + +Restart the SSH service to load the new config options. + +This allows only the three users (jgarrido, jane, and tux) to log in or execute any operation on the remote machine. + +### Final thoughts + +You can use OpenSSH to implement a strong and robust SSH server. These were only three useful options to harden your installation. Still, there are tons of features and options that you can turn on or off within the `sshd_config` file, and there are many great applications like [Fail2ban][3] that you can use to safeguard your SSH service further. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/configure-ssh-privacy + +作者:[Jonathan Garrido][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jgarrido +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/privacy_keyboard_security.jpg?itok=vZ9jFdK_ (A keyboard with privacy written on it.) +[2]: https://www.redhat.com/sysadmin/troubleshoot-network-dhcp-configuration +[3]: https://opensource.com/life/15/7/pipe-dreams From bff359d83213e128149f46016c6b30f21d1587f1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 2 Feb 2022 08:50:52 +0800 Subject: [PATCH 160/334] A --- ...x-Based PinePhone Daily For A Year. Here-s What I Learned.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md b/sources/news/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md index a5c398e167..a7997d161e 100644 --- a/sources/news/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md +++ b/sources/news/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/pinephone-review/" [#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 662967245c90d9f4408aeecd5f7f3c7cba90b5bb Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 2 Feb 2022 14:01:33 +0800 Subject: [PATCH 161/334] TR --- ...Daily For A Year. Here-s What I Learned.md | 201 ------------------ ...Daily For A Year. Here-s What I Learned.md | 198 +++++++++++++++++ 2 files changed, 198 insertions(+), 201 deletions(-) delete mode 100644 sources/news/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md create mode 100644 translated/news/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md diff --git a/sources/news/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md b/sources/news/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md deleted file mode 100644 index a7997d161e..0000000000 --- a/sources/news/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md +++ /dev/null @@ -1,201 +0,0 @@ -[#]: subject: "I Used Linux-Based PinePhone Daily For A Year. Here’s What I Learned!" -[#]: via: "https://news.itsfoss.com/pinephone-review/" -[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -I Used Linux-Based PinePhone Daily For A Year. Here’s What I Learned! -====== - -When Pine64 announced the PinePhone in 2019, no one could have foreseen the tremendous impact it would have on mobile Linux, desktop Linux, and privacy as a whole. - -As one of the [few phones designed specifically to run desktop Linux][1], it had all the features of a low-end Android phone, combined with the versatility of a laptop. Unfortunately, desktop Linux is just that; it is made for _desktops_, not phones. - -Fortunately, thanks to the incredible power of the GNOME, KDE, Pine64, and general Linux communities, whole new desktop environments, applications, and distributions were born. Some of the more recognizable of these include Plasma Mobile, [Phosh][2], Megapixels, and Mobian. - -With all the key pieces in place, all Pine64 needed to was to sell PinePhones, and sell PinePhones they did. Every community edition (each preloaded with a different distro) pre-ordering round received thousands of orders, one of which was mine. - -Since I received my unit in December 2020, the PinePhone has been a key part in my daily life, with me using it as my daily driver for the whole of 2021. Here are my experiences with it. - -### It’s Performance Is Like Molasses - -![Opening Firefox on the PinePhone][3] - -Sporting an Allwinner a64 SoC, the PinePhone has just enough power to do the most basic phone tasks. Even simple things, like opening Firefox, can take almost 20 seconds, no doubt thanks to its measly 4 cores. This is in stark comparison to modern mid-range and high-end Android phones, all of which have 8 core processors running at least at 2 GHz. - -Fortunately, the community has again stepped in, implementing thousands of small software optimizations. While still not as performant as it’s Android competitors, this does mean the PinePhone is pretty usable for most phone tasks, and even some desktop-oriented apps when using an external monitor through the included dock. - -Despite all of this, the PinePhone is capable enough for most situations, even if it might stutter a bit here and there. But what about the battery? Can it really last all day? - -### The Battery Is… Okay - -![][4] - -While I would love to be able to say that thanks to the PinePhone’s low-power components, the battery life is incredible. Unfortunately, this is not the case, even after all the battery saving improvements that have been implemented. - -After charging it overnight, I usually read the news in the morning, followed by some more at lunchtime. Even though this amounts to less than an hour of screen-on time, the battery still drops about 35% pretty consistently, leaving me with just 65% for the afternoon. Fortunately, this is not a major issue, especially as the modem’s deep sleep function works perfectly. - -For those of you that don’t know, almost all mobile phones put their modem into a deep sleep mode, which basically powers off everything except for what is required to receive calls and texts. Then, when you receive a call, the modem wakes up itself and the SoC, which then starts ringing. - -From my experience, the implementation of deep sleep on the PinePhone has been absolutely incredible, with not a single call being missed. As a result of this, the PinePhones screen-off battery life has been pretty impressive considering its terrible screen-on time. I’ve consistently managed more than 60 hours of battery life with minimal usage, something I can’t say about my Galaxy S20 FE. - -### Don’t Expect Fancy Photos - -Left: iPhone 4S, Right: PinePhone - -With a measly 5 MP rear shooter and an even smaller 2 MP front camera, don’t expect to be taking professional-grade photos. Even many USB webcams offer better image quality, as well as more general features. Heck, the PinePhone’s camera isn’t even capable of taking videos! - -The small amount of post-processing done does help clean up the photos a bit, although not enough to make them social media-ready. For comparison, here is the same photo taken on an iPhone 4S (from 2011) and the PinePhone (from 2019). - -Between the ancient SoC, average battery life, and lackluster cameras, it is clear the PinePhone’s hardware is definitely not it’s forte. But can the software save it? - -### Desktop Environment Or Mobile Environment? - -Within the world of mobile Linux, there are three major players in the desktop environment space. These are: - - * Plasma Mobile - * Phosh - * [Lomiri][5] - - - -Over the course of my time daily driving the PinePhone, I spent roughly 4 months with each environment. During this time, I found a number of different features, problems, and levels of matureness between them, which I will be discussing here. - -#### Plasma Mobile - -![Image Credit: KDE Plasma Mobile][6] - -Released back in 2015 just after Plasma 5, Plasma Mobile has been silently being developed in the background for almost 7 years. Between the time of its initial release and the release of the PinePhone, the team behind Plasma Mobile managed to create a fairly usable mobile desktop environment. - -However, with the release of the PinePhone, this has all changed. Many of the numerous bugs that plagued Plasma Mobile have been ironed out, and immense work was put into improving the UI. - -As a KDE project, Plasma Mobile makes extensive use of Kirigami, which results in an extremely consistent and mobile-friendly app ecosystem. Additionally, many of the pre-existing KDE apps also scale perfectly to it. - -This app ecosystem is extended even further thanks to the Maui project, which just released their Maui Shell (more on that soon). Thanks to their powerful suite of utility apps, Plasma Mobile is a true Android replacement. - -However, that’s not to say that Plasma Mobile is perfect. Even in 2022, there are still a number of remaining bugs and issues. However, this is offset by its mature app ecosystem, extensive use of gestures, and purely mobile focus. - -#### Phosh - -![Screenshots of Phosh on the PinePhone][7] - -Phosh, developed primarily by Purism, is the GTK equivalent of Plasma Mobile. Originally built for the Librem 5, it has been in the works since 2018. At just 4 years old, you may be led to believe that Phosh is immature, but that couldn’t be further from the truth. - -In fact, I never encountered a single crash with Phosh for more than 3 months, compared to days between crashes in Plasma Mobile. Of course, being built on GTK and other Gnome technologies, Phosh has a number of apps available. Some popular apps that work perfectly include: - - * Firefox - * Geary - * Headlines (Reddit app) - * Megapixels (Camera app) - * Gnome Maps - - - -Additionally, many apps designed for Plasma Mobile also work perfectly, even though they use Kirigami. Unfortunately, while many GTK apps are available, they don’t scale anywhere near as well as Kirigami apps do, so developers have to specifically make their apps compatible with Phosh and the PinePhone. - -Additionally, GTK is a primarily desktop-oriented UI toolkit, meaning features such as gestures, and even apps being able to fit on the screen are patchy at best, and non-existent at worst. - -Fortunately, though, Purism has put a lot of work into the default Gnome apps, which are all perfectly usable and fast. - -Overall, Phosh is extremely solid, especially for users of Gnome on desktop and laptop computers. However, it is also held back by its lack of core mobile features, and optimized apps. - -#### Lomiri - -![Lomiri on the PinePhone][8] - -I doubt you will have heard of this, as it only recently had its name changed. Formerly known as Unity 8, it is the default desktop environment of the Ubuntu Touch operating system. It is also available on Manjaro ARM. - -Built using Qt Quick, it is probably the most mature desktop environment for the PinePhone. It makes great use of gestures for core system functions, and has a huge range of apps made specifically for it. - -However, it also suffers from being only usable on Ubuntu Touch, as none of the apps have been ported to Manjaro. As a result, users of it are subject to Ubuntu Touch’s “locked-down” style, similar to Android and iOS. - -While this might be a good thing for typical users, PinePhone owners are generally tinkerers who like control over their device, which is made much harder with Ubuntu Touch. - -### Operating Systems - -As with any Linux-focused device, there are a huge number of distros and operating systems available. At the time of writing, the Pine64 wiki lists 21 individual operating systems, all in various levels of completeness. - -However, amongst these various operating systems, there are 4 that I have had a great experience with on the PinePhone: - - * Manjaro ARM - * Mobian - * SailfishOS - * Ubuntu Touch - - - -While I’m not going to go into detail about each of them, they’re all great choices and perfectly functional for most tasks. With the exception of SailfishOS, they are all also open-source, while SailfishOS is mostly open-source. - -### A Note On Android Apps - -As you may have guessed by now, app support can be a bit of a problem. Even looking at the almost 400 confirmed working apps on the PinePhone, this pales in comparison to the millions available for Android and iOS. - -Fortunately, there are ways around this, the easiest being to emulate Android apps using a compatibility layer. For this, Anbox has been the go-to for a few years now. - -#### Anbox - -If WINE is a compatibility layer for Windows, then Anbox is the same for Android. After installing it, or opening it as it comes preinstalled with many distributions, it is as simple as running a single command to install an APK file. - -From here, the app behave just as any Linux app, albeit with a significant hit to performance. - -Recently, a group of people decided they were going to address this, creating a new project called Waydroid. - -#### Waydroid - -Waydroid is the latest attempt at an Android emulator for the PinePhone, and even at this early stage it looks extremely promising. It manages pretty incredible performance, especially compared to Anbox, thanks to the android apps running directly on the hardware. - -As a result, many extremely popular apps work perfectly, such as F-Droid and the Aurora Store. - -Additionally, apps installed through Waydroid are integrated really well into Linux, with them being able to be opened and closed just like any other app. - -### My Concluding Thoughts On The PinePhone - -Over the course of my time with it, I spent time with almost all the different operating systems available for it, as well as every desktop environment. As I said before, its performance was generally quite poor, although Lomiri and Plasma Mobile were smooth enough. - -I don’t take photos that often, so the camera got very little use. However, when I did take photos, they were generally good enough, even if they weren’t particularly high quality. - -In general, I think the biggest weakness of the PinePhone was actually it’s battery life. This is because even just turning it on to check the time wakes up the modem, causing the battery to drain quickly unless I made an effort not to turn it on. - -Fortunately, I always made sure to carry a spare battery with me that I could pop in by removing the back cover. Here, I could also insert an SD card to be used as additional storage or to test a new OS. - -As to be expected, the PinePhone is not waterproof, but I did find that using it in the rain appeared to do no damage, although your mileage may vary. When I was inside, I often found myself using it with an external monitor using it’s included dock. - -With this setup, I was surprised at how capable the PinePhone was as a laptop. I often found myself editing documents in LibreOffice, and at one point even managed to edit a video using Kdenlive! - -Overall, even with its quirks, my year with the PinePhone went quite well, and I never really found my self longing for my Android. - -### Getting A PinePhone - -If you want to get a PinePhone for yourself, there is a button below that will take you to Pine64’s website. At the time of writing, there are two models available, one with 16 GB of storage and 2 GB of RAM. The other model has 32 GB of storage and 3 GB of RAM. - -The model used in this review was the 3 GB version, which costs $199 USD. The 2 GB model costs $149 USD. - -[Get A PinePhone][9] - -Let’s just hope that the upcoming PinePhone Pro can keep this positive trend up with its more powerful hardware! - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/pinephone-review/ - -作者:[Jacob Crume][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/jacob/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/linux-phones/ -[2]: https://github.com/agx/phosh -[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU0MCIgd2lkdGg9Ijk2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[5]: https://lomiri.com/ -[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMwMCIgd2lkdGg9IjQ0MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI5NSIgd2lkdGg9IjQ0OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM2MiIgd2lkdGg9IjIwNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[9]: https://pine64.com/product-category/pinephone/ diff --git a/translated/news/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md b/translated/news/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md new file mode 100644 index 0000000000..b9e60395f4 --- /dev/null +++ b/translated/news/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md @@ -0,0 +1,198 @@ +[#]: subject: "I Used Linux-Based PinePhone Daily For A Year. Here’s What I Learned!" +[#]: via: "https://news.itsfoss.com/pinephone-review/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +我的一年的 PinePhone 日常使用体验 +====== + +> 它不是每个人的理想选择,但作为一个 Linux 爱好者,我喜欢用它做实验。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pinephone-review.png?w=1200&ssl=1) + +当 Pine64 在 2019 年发布 PinePhone 时,没有人能够预见它将对移动 Linux、桌面 Linux 和隐私产生巨大的影响。 + +作为 [少数专为运行桌面 Linux 而设计的手机][1] 之一,它具有低端安卓手机的所有功能,同时又具有笔记本电脑的多功能性。不幸的是,桌面 Linux 就是这样:它是为台式机设计的,而不是为手机设计的。 + +幸运的是,由于 GNOME、KDE、Pine64 和众多 Linux 社区的惊人力量,全新的桌面环境、应用程序和发行版应运而生。其中一些比较知名的包括 Plasma Mobile、[Phosh][2]、Megapixels 和Mobian。 + +有了这些所有关键的部分,Pine64 需要做的就是销售 PinePhone,他们确实也卖出了 PinePhone。每一轮社区版(每个都预装了不同的发行版)的预购都收到了数千份订单,其中之一就是我的。 + +自从我在 2020 年 12 月收到我的设备后,PinePhone 一直是我日常生活中的重要组成部分,我在 2021 年全年都把它作为我的日常设备。以下是我使用它的经验。 + +### 它的性能就像糖浆一样 + +PinePhone 采用了全志 a64 系统芯片,它的功率只够完成最基本的手机任务。即使是简单的事情,如打开火狐浏览器,也需要将近 20 秒的时间,这无疑要“归功于”它仅有的 4 个核心。这与现代中高端安卓手机形成鲜明对比,所有这些手机都有至少 2GHz 的 8 核处理器。 + +幸运的是,社区再次介入,对数以千计的小型软件实施了优化。虽然性能仍然不如安卓系统的竞争对手,但这确实意味着 PinePhone 对于大多数手机任务来说是非常适用了,甚至在通过附带的底座使用外部显示器时,也可以使用一些面向桌面的应用程序。 + +即使它在这里和那里可能会有一点卡顿,PinePhone 在大多数情况下都有足够的能力。但是电池呢?它真的能续航一整天吗? + +### 电池续航……没问题 + +![][4] + +虽然我很想说,由于 PinePhone 的低功耗组件,电池续航想必是超棒的。但不幸的是,情况并非如此,即使在实施了所有节电改进措施后也是如此。 + +经过一夜的充电,我通常在早上阅读新闻,然后在午餐时间再读一些。尽管这相当于不到一个小时的屏幕开启时间,但电池仍然持续下降约 35%,使我在下午只剩下 65%。幸运的是,这并不是一个大问题,尤其是调制解调器的深度睡眠功能工作得很好。 + +补充一句,几乎所有的移动电话都会将其调制解调器放入深度睡眠模式,这基本上是关闭一切除了接收电话和短信所需的功能。然后,当你接到一个电话时,调制解调器会唤醒自己和 SoC,然后开始响铃。 + +根据我的经验,PinePhone 上深度睡眠的实施绝对很棒,没有错过任何一个电话。因此,考虑到其糟糕的开屏续航时间,PinePhone 的关屏续航相当惊人。我在最少使用的情况下,电池寿命一直能保持在 60 小时以上,这是我的 Galaxy S20 FE 无法比拟的。 + +### 不要期望有什么漂亮的照片 + +PinePhone 仅有的 500 万像素后置摄像头和更小的 200 万像素前置摄像头,不要指望能拍出专业级别的照片。甚至许多 USB 网络摄像头也能提供更好的图像质量,以及更多的常规功能。见鬼,PinePhone 的摄像头甚至不能够拍摄视频! + +它所做的少量后期处理确实有助于提升一点照片质量,尽管还不足以让它们适合发到社交媒体上。作为比较,这里是用 iPhone 4S(2011 年)和 PinePhone(2019 年)拍摄的同一张照片。 + +![iPhone 4S](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/iphone-4s-vs-pinephone-camera.jpg?w=780&ssl=1) + +![PinePhone](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pinephone-vs-iphone-4s-camera-scaled.jpg?w=780&ssl=1) + +在古老的 SoC、普普通通的电池续航和可怜的相机之间,很明显 PinePhone 的硬件绝对不是它的强项。但软件能拯救它吗? + +### 桌面环境还是移动环境? + +在这个移动 Linux 的世界里,主要有三种桌面环境领域,它们是: + + * Plasma Mobile + * Phosh + * [Lomiri][5] + +在我日常使用 PinePhone 的过程中,我大约花了 4 个月的时间使用每个环境。在这段时间里,我发现它们的功能、问题和成熟度各有不同,我会在这里讨论这些问题。 + +#### Plasma Mobile + +![图片来源:KDE Plasma Mobile][6] + +早在 2015 年 Plasma 5 发布之后,Plasma Mobile 已经默默地在后台开发了近 7 年。从最初的发布到 PinePhone 的发布,Plasma Mobile 背后的团队成功地创造了一个相当可用的移动桌面环境。 + +然而,随着 PinePhone 的发布,这一切都改变了。困扰 Plasma Mobile 的许多错误已经被解决了,而且也在改进用户界面方面付出了巨大的努力。 + +作为一个 KDE 项目,Plasma Mobile 广泛使用了 Kirigami,这导致了一个极其一致和移动友好的应用生态系统。此外,许多先前就有的 KDE 应用程序也能完美地扩展到该平台。 + +由于 Maui 项目刚刚发布了他们的 Maui Shell,这个应用生态系统得到了进一步的扩展(更多信息即将发布)。由于他们强大的实用程序套件,Plasma Mobile 是一个真正的安卓替代品。 + +然而,这并不是说 Plasma Mobile 是完美的。即使到了 2022 年,仍有一些残余的错误和问题。然而,这被其成熟的应用生态系统、对手势的广泛使用和对移动体验的专注所抵消。 + +#### Phosh + +![PinePhone 上的 Phosh 截屏][7] + +Phosh 主要由 Purism 开发,是相当于 Plasma Mobile 的 GTK。它最初是为 Librem 5 打造的,自 2018 年以来一直在开发。由于只有 4 年的历史,你可能会认为 Phosh 是不成熟的,但这与事实相差甚远。 + +事实上,在超过 3 个月的时间里,我从未遇到过 Phosh 的崩溃,相比之下,Plasma Mobile 没几天崩溃一次。当然,由于建立在 GTK 和其他 Gnome 技术之上,Phosh 有许多可用的应用程序。一些流行的应用程序可以完美地工作,包括: + + * Firefox + * Geary + * Headlines(Reddit 应用程序) + * Megapixels(相机应用) + * Gnome 地图 + +此外,许多为 Plasma Mobile 设计的应用程序也能完美运行,尽管它们使用 Kirigami。不幸的是,虽然有许多 GTK 应用程序,但它们并不像 Kirigami 应用程序一样适合各种环境,所以开发者必须专门使他们的应用程序与 Phosh 和 PinePhone 兼容。 + +此外,GTK 主要是一个面向桌面的 UI 工具包,这意味着诸如手势等功能,甚至让应用程序能够适应屏幕的功能,充其量是零散的,最糟糕的是不存在。 + +不过幸运的是,Purism 在默认的 Gnome 应用程序中投入了大量的工作,这些应用程序都是完全可用的,而且速度很快。 + +总的来说,Phosh 是非常可靠的,特别是对于台式机和笔记本电脑上的 Gnome 用户。然而,它也因为缺乏核心的移动功能和优化的应用程序而受到阻碍。 + +#### Lomiri + +![Lomiri on the PinePhone][8] + +我怀疑你是否听说过它,因为它最近才改了名字。它以前被称为 Unity 8,是 Ubuntu Touch 操作系统的默认桌面环境。它也可以在 Manjaro ARM 上使用。 + +由于使用 Qt Quick 构建,它可能是 PinePhone 最成熟的桌面环境。它很好地利用了手势来实现核心系统功能,并且有大量专门为它制作的应用程序。 + +然而,它的缺点是只能在 Ubuntu Touch 上使用,因为没有一个应用程序被移植到 Manjaro。因此,它的用户受制于 Ubuntu Touch 的“锁定”风格,类似于安卓和 iOS。 + +虽然这对典型的用户来说可能是件好事,但 PinePhone 的用户一般都是喜欢控制自己设备的手工爱好者,而 Ubuntu Touch 则使其变得更加困难。 + +### 操作系统 + +与任何以 Linux 为主的设备一样,它有大量的发行版和操作系统可用。在写这篇文章的时候,Pine64 维基列出了 21 个单独的操作系统,它们的完整度各有不同。 + +然而,在这些不同的操作系统中,有四个我在 PinePhone 上有很好的体验: + + * Manjaro ARM + * Mobian + * SailfishOS + * Ubuntu Touch + +虽然我不打算详细介绍它们,但它们都是很好的选择,对于大多数任务来说都是完美的功能。除了 SailfishOS 之外,它们都是开源的,而 SailfishOS 大部分是开源的。 + +### 关于安卓应用程序的说明 + +正如你现在可能已经猜到的,应用程序的支持可能有点问题。即使看到 PinePhone 上有近 400 个确认可以使用的应用程序,但与安卓和 iOS 的数百万个应用程序相比,这也是相形见绌。 + +幸运的是,有一些方法可以解决这个问题,最简单的是使用兼容层来模拟安卓应用。在这方面,Anbox 已经成为几年来的首选。 + +#### Anbox + +如果说 WINE 是 Windows 的兼容层,那么 Anbox 对 Android 也是如此。安装后,或打开它,因为它预装在许多发行版中,就像运行一个命令来安装一个 APK 文件一样简单。 + +从这里开始,该应用程序的行为就像任何 Linux 应用程序一样,尽管在性能上有很大的影响。 + +最近,有一群人决定解决这个问题,创建了一个名为 Waydroid 的新项目。 + +#### Waydroid + +Waydroid 是为 PinePhone 开发的安卓模拟器的最新尝试,即使在这个早期阶段,它看起来也非常有发展前景。由于安卓应用可以直接在硬件上运行,它的性能相当惊人,特别是与 Anbox 相比。 + +因此,许多极为流行的应用程序都能完美运行,如 F-Droid 和 Aurora 商店。 + +此外,通过 Waydroid 安装的应用程序被很好地整合到 Linux 中,它们能够像其他应用程序一样被打开和关闭。 + +### 我对 PinePhone 的总体看法 + +在我使用它的过程中,我花时间使用了几乎所有可用于它的不同操作系统,以及每个桌面环境。正如我之前所说,它的性能一般都很差,尽管 Lomiri 和 Plasma Mobile 足够流畅。 + +我不经常拍照,所以相机的使用频率很低。然而,当我拍摄照片时,它们通常够用了,即使相片质量并不特别高。 + +总的来说,我认为 PinePhone 的最大弱点实际上是它的电池续航。这是因为即使只是打开它查看一下时间,也会唤醒调制解调器,导致电池迅速耗尽,除非我尽量不打开它。 + +幸运的是,我总是确保随身携带一块备用电池,我可以通过取下后盖换入。此外,我还可以插入一张 SD 卡,用作额外的存储空间或测试新的操作系统。 + +正如预期的,PinePhone 并不防水,但我发现在雨中使用它似乎没有任何损害,尽管你的经历可能有所不同。当我在室内时,我经常发现自己会借助它附带的底座来使用它的外部显示器。 + +在这种设置下,我对 PinePhone 作为一台笔记本电脑的能力感到惊讶。我经常发现自己可以在 LibreOffice 中编辑文件,甚至有一次还能用 Kdenlive 编辑了一段视频! + +总的来说,即使有一些不足,我与 PinePhone 相处的这一年也很顺利,我从来没有发现自己对安卓的渴望。 + +### 获得 PinePhone + +如果你想获得一台 PinePhone,下面有一个按钮,可以带你到 Pine64 的网站。在写这篇文章的时候,有两种型号可供选择,一种是 16GB 的存储空间和 2GB 的内存。另一个型号有 32GB 的存储空间和 3GB 的内存。(LCTT 译注:应该是不向中国发货的。) + +本评论中使用的型号是 3GB 版本,价格为 199 美元。2GB 型号的价格为 149 美元。 + +- [获取 PinePhone][9] + +我们只希望即将推出的 PinePhone Pro 能以其更强大的硬件保持这种积极的趋势! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/pinephone-review/ + +作者:[Jacob Crume][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/linux-phones/ +[2]: https://github.com/agx/phosh +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/PinePhone-Battery.jpg?resize=1568%2C882&ssl=1 +[5]: https://lomiri.com/ +[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pinephone_plasma-mobile.jpg?resize=440%2C300&ssl=1 +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pinephone-phosh.jpg?resize=448%2C295&ssl=1 +[8]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pinephone-lomiri-edited.jpg?resize=204%2C362&ssl=1 +[9]: https://pine64.com/product-category/pinephone/ From 187fed818a345e0eb1c5e3ec63bc992bf8cc81bc Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 2 Feb 2022 14:26:10 +0800 Subject: [PATCH 162/334] P @wxy https://linux.cn/article-14235-1.html --- ...Based PinePhone Daily For A Year. Here-s What I Learned.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/news => published}/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md (99%) diff --git a/translated/news/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md b/published/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md similarity index 99% rename from translated/news/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md rename to published/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md index b9e60395f4..1231a1b681 100644 --- a/translated/news/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md +++ b/published/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14235-1.html" 我的一年的 PinePhone 日常使用体验 ====== From 7af13191e313cbada517f7b8dff235abfe7f63c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Wed, 2 Feb 2022 22:16:02 +0800 Subject: [PATCH 163/334] Update and rename sources/tech/20220112 Set up a build system with CMake and VSCodium.md to translated/tech/20220112 Set up a build system with CMake and VSCodium.md --- ... a build system with CMake and VSCodium.md | 297 ------------------ ... a build system with CMake and VSCodium.md | 296 +++++++++++++++++ 2 files changed, 296 insertions(+), 297 deletions(-) delete mode 100644 sources/tech/20220112 Set up a build system with CMake and VSCodium.md create mode 100644 translated/tech/20220112 Set up a build system with CMake and VSCodium.md diff --git a/sources/tech/20220112 Set up a build system with CMake and VSCodium.md b/sources/tech/20220112 Set up a build system with CMake and VSCodium.md deleted file mode 100644 index 45f176a750..0000000000 --- a/sources/tech/20220112 Set up a build system with CMake and VSCodium.md +++ /dev/null @@ -1,297 +0,0 @@ -[#]: subject: "Set up a build system with CMake and VSCodium" -[#]: via: "https://opensource.com/article/22/1/devops-cmake" -[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" -[#]: collector: "lujun9972" -[#]: translator: "robsesan" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Set up a build system with CMake and VSCodium -====== -Providing a proper CMake configuration makes it much easier for others -to build, use and contribute to your project. -![woman on laptop sitting at the window][1] - -This article is part of a series about open source DevOps tools for C/C++ development. If you build up your project from the beginning on a powerful toolchain, you will benefit from a faster and safer development. Aside from that, it will be easier for you to get others involved in your project. In this article, I will prepare a C/C++ build system based on [CMake][2] and [VSCodium][3]. As usual, the related example code is available on [GitHub][4]. - -I've tested the steps described in this article. This is a solution for all platforms. - -### Why CMake? - -[CMake][5] is a build system generator that creates the Makefile for your project. What sounds simple at first glance can be pretty complex at second glance. At a high altitude, you define the individual parts of your project (executables, libraries), compiling options (C/C++ standard, optimizations, architecture), the dependencies (header, libraries), and the project structure on file level. This information gets made available to CMake in the file `CMakeLists.txt` using a special description language. When CMake processes this file, it automatically detects the installed compilers on your systems and creates a working Makefile. - -In addition, the configuration described in the `CMakeLists.txt` can be read by many editors like QtCreator, VSCodium/VSCode, or Visual Studio. - -### Sample program - -Our sample program is a simple command-line tool: It takes an integer as an argument and outputs numbers randomly shuffled in the range from one to the provided input value. - - -``` - - -$ ./Producer 10 -3 8 2 7 9 1 5 10 6 4  - -``` - -In the `main() `function of our executable, we just process the input parameter and exit the program if no one value (or a value that can't be processed) is provided. - -**producer.cpp** - - -``` - - -int main(int argc, char** argv){ - -    if (argc != 2) { -        std::cerr << "Enter the number of elements as argument" << std::endl; -        return -1; -    } - -    int range = 0; -     -    try{ -        range = std::stoi(argv[1]); -    }catch (const std::invalid_argument&){ -        std::cerr << "Error: Cannot parse \"" << argv[1] << "\" "; -        return -1; -    } - -    catch (const std::out_of_range&) { -        std::cerr << "Error: " << argv[1] << " is out of range"; -        return -1; -    } - -    if (range <= 0) { -        std::cerr << "Error: Zero or negative number provided: " << argv[1]; -        return -1; -    } - -    std::stringstream data; -    std::cout << Generator::generate(data, range).rdbuf(); -} - -``` - -The actual work gets done in the [Generator][6], which is compiled and linked as a static library to our `Producer` executable.  - -**Generator.cpp** - - -``` - - -std::stringstream &Generator::generate(std::stringstream &stream, const int range) { -    std::vector<int> data(range); -    std::iota(data.begin(), data.end(), 1); - -    std::random_device rd; -    std::mt19937 g(rd()); - -    std::shuffle(data.begin(), data.end(), g); - -    for (const auto n : data) { - -        stream << std::to_string(n) << " "; -    } - -    return stream; -} - -``` - -The function `generate` takes a reference to a [std::stringstream][7] and an integer as an argument. Based on the value _n_ of the integer `range`, a vector of integers in the range of 1 to _n_ is made and afterward shuffled. The values in the shuffled vector are then converted into a string and pushed into the `stringstream`. The function returns the same `stringstream` reference as passed as argument. - -### Top-level CMakeLists.txt - -The top-level [CMakeLists.txt][8] is the entry point of our project. There can be several `CMakeLists.txt `files in subdirectories (for example, libraries or other executables associated with the project). We start by going step by step over the top-level `CMakeLists.txt`. - -The first lines tell us about the version of CMake, which is required to process the file, the project name, and its versions, as well as the intended C++ standard. - - -``` - - -cmake_minimum_required(VERSION 3.14) - -project(CPP_Testing_Sample VERSION 1.0) - -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CXX_STANDARD_REQUIRED True) - -``` - -We tell CMake to look into the subdirectory `Generator` with the following line. This subdirectory includes all information to build the `Generator` library and contains a `CMakeLists.txt` for its own. We'll get to that shortly. - - -``` -`add_subdirectory(Generator)` -``` - -Now we come to an absolute special feature: [CMake Modules][9]. Loading modules can extend CMake functionality. In our project, we load the module [FetchContent][10], which enables us to download external resources, in our case [GoogleTest][11] when CMake is run. - - -``` - - -include(FetchContent) - -FetchContent_Declare( -  googletest -  URL -) -FetchContent_MakeAvailable(googletest) - -``` - -In the next part, we do what we would usually do in an ordinary Makefile: Specify which binary to build, their related source files, libraries which should be linked to, and the directories in which the compiler can find the header files. - - -``` - - -add_executable(Producer Producer.cpp) - -target_link_libraries(Producer PUBLIC Generator) - -target_include_directories(Producer PUBLIC "${PROJECT_BINARY_DIR}") - -``` - -With the following statement, we get CMake to create a file in the build folder called `compile_commands.json`. This file exposes the compile options for every single file of the project. Loaded in VSCodium, this file tells the IntelliSense feature where to find the header files (see [documentation][12]). - - -``` -`set(CMAKE_EXPORT_COMPILE_COMMANDS ON)` -``` - -The last part defines the tests for our project. The project uses the previously loaded  GoogleTest framework. The whole topic of unit tests will be part of a separate article. - - -``` - - -enable_testing() - -add_executable(unit_test unit_test.cpp) - -target_link_libraries(unit_test gtest_main) - -include(GoogleTest) - -gtest_discover_tests(unit_test) - -``` - -### Library level CMakeLists.txt - -Now we look at the [CMakeLists.txt][13] file in the subdirectory `Generator` containing the eponymous library. This `CMakeLists.txt` is much shorter, and besides the unit test-related commands, it contains only two statements. - - -``` - - -add_library(Generator STATIC Generator.cpp Generator.h) - -target_include_directories(Generator INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) - -``` - -With `add_library(...)` we define a new build target: The static `Generator` library. With the statement `target_include_directories(...)`, we add the current subdirectory to the search path for header files for other build targets. We also specify the scope of this property to be of type `INTERFACE`: This means that the property will only affect build targets that link against this library, not the library itself. - -### Get started with VSCodium - -With the information available in the `CMakeLists.txt`, IDEs like VSCodium can configure the build system accordingly. If you haven't already experience with VSCodium or VS Code, this example project is a good starting point. First, go to their [website][3] and download the latest installation package for your system. Open VSCodium and navigate to the **Extensions** tab. - -To properly build, debug and test the project, search for the following extensions and install them. - -![Searching extensions][14] - -(Stephan Avenwedde, [CC BY-SA 4.0][15]) - -If not already done, clone the repository by clicking on **Clone Git Repository** on the start page. - -![Clone Git repository][16] - -(Stephan Avenwedde, [CC BY-SA 4.0][15]) - -Or manually by typing: - - -``` -`git clone https://github.com/hANSIc99/cpp_testing_sample.git` -``` - -Afterward, check out the tag _devops_1_ either by typing: - - -``` -`git checkout tags/devops_1` -``` - -Or by clicking on the **main** branch button (red box) and selecting the tag from the drop-down menu (yellow box). - -![Select devops_1 tag][17] - -(Stephan Avenwedde, [CC BY-SA 4.0][15]) - -Once you open the repository's root folder inside VSCodium, the `CMake Tools` extensions detect the `CMakeLists.txt` file and immediately scan your system for suitable compilers. You can now click on the **Build** button at the bottom of the screen (red box) to start the build process. You can also change the compiler by clicking on the area at the bottom (yellow box) mark, which shows the currently active compiler. - -![Build compiler][18] - -(Stephan Avenwedde, [CC BY-SA 4.0][15]) - -To start debugging the `Producer` executable, click on the debugger symbol (yellow box) and choose **Debug Producer** (green box) from the drop-down menu. - -![Starting the debugger][19] - -(Stephan Avenwedde, [CC BY-SA 4.0][15]) - -As previously mentioned, the `Producer` executable expects the number of elements as a command-line argument. The command-line argument can be specified in the file `.vscode/launch.json.` - -![Command-line arguments][20] - -(Stephan Avenwedde, [CC BY-SA 4.0][15]) - -Alright, you are now able to build and debug the project. - -### Conclusion - -Thanks to CMake, the above steps should work no matter what OS you're running. Especially with the CMake-related extensions, VSCodium becomes a powerful IDE. I didn't mention the Git integration of VSCodium because you can already find many resources on the web. I hope you see that providing a proper CMake configuration makes it much easier for others to build, use and contribute to your project. In a future article, I will look at unit tests and CMake's testing utility `ctest`. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/devops-cmake - -作者:[Stephan Avenwedde][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/hansic99 -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop) -[2]: https://cmake.org/ -[3]: https://vscodium.com/ -[4]: https://github.com/hANSIc99/cpp_testing_sample -[5]: https://opensource.com/article/21/5/cmake -[6]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/Generator/Generator.cpp -[7]: https://en.cppreference.com/w/cpp/io/basic_stringstream -[8]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/CMakeLists.txt -[9]: https://cmake.org/cmake/help/latest/manual/cmake-modules.7.html -[10]: https://cmake.org/cmake/help/latest/module/FetchContent.html -[11]: https://github.com/google/googletest -[12]: https://code.visualstudio.com/docs/cpp/c-cpp-properties-schema-reference -[13]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/Generator/CMakeLists.txt -[14]: https://opensource.com/sites/default/files/uploads/cpp_unit_test_vscodium_extensions.png (Searching extensions) -[15]: https://creativecommons.org/licenses/by-sa/4.0/ -[16]: https://opensource.com/sites/default/files/uploads/cpp_unit_test_vscodium_git_clone.png (Clone Git repository) -[17]: https://opensource.com/sites/default/files/uploads/cpp_unit_test_vscodium_select_tag.png (Select devops_1 tag) -[18]: https://opensource.com/sites/default/files/uploads/cpp_unit_test_vscodium_compiler_2.png (Build compiler) -[19]: https://opensource.com/sites/default/files/uploads/cpp_unit_test_vscodium_start_debugging.png (Starting the debugger) -[20]: https://opensource.com/sites/default/files/uploads/cpp_unit_test_vscodium_arguments.png (Command-line arguments) diff --git a/translated/tech/20220112 Set up a build system with CMake and VSCodium.md b/translated/tech/20220112 Set up a build system with CMake and VSCodium.md new file mode 100644 index 0000000000..bc231a2340 --- /dev/null +++ b/translated/tech/20220112 Set up a build system with CMake and VSCodium.md @@ -0,0 +1,296 @@ +[#]: subject: "Set up a build system with CMake and VSCodium" +[#]: via: "https://opensource.com/article/22/1/devops-cmake" +[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" +[#]: collector: "lujun9972" +[#]: translator: "robsean" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +使用 CMake 和 VSCodium 设置一个构建系统 +====== +提供一个适当的 CMake 配置文件来使其他人可以更容易地构建、使用和贡献你的工程。 +![woman on laptop sitting at the window][1] + +这篇文章是关于 C/C++ 开发系列的开发工具的一部分。如果你从一个功能强大的工具链开始构建你的工程,你将从一个更快和更安全的开发环境中受益。除此之外,它会使别人更容易地参与你的工程。在这篇文章中,我将准备一个基于 [CMake][2] 和 [VSCodium][3] 的 C/C++ 构建系统。像往常一样,相关的示例代码可以在 [GitHub][4] 上找到。 + +我已经测试了在本文中描述的步骤。这是一种适用于所有平台的解决方案。 + +### 为什么是 CMake ? + +[CMake][5] 是一个构建系统生成器,为你的工程创建 Makefile 。乍一看简单的东西可能乍一看相当地复杂。在较高的层次上,你可以定义你的工程 (可执行文件,库) 的各个部分,编译选项 (C/C++ 标准,优化,架构),依赖关系项 (头文件,库),和文件级的工程结构。CMake 使用的这些信息可以在文件 `CMakeLists.txt` 中获取,它使用一种特殊的描述性语言编写。当 CMake 处理这个文件时,它将自动地侦测在你的系统上已安装的编译器,并创建一个用于启动它的 Makefile 文件。 + +此外,在 `CMakeLists.txt` 中描述的配置,能够被很多编辑器读取,像 QtCreator, VSCodium/VSCode, 或 Visual Studio 。 + +### 示例程序 + +我们的示例程序是一个简单的命令行工具:它获取一个整数来作为一个参数,输出一个从 1 到所提供输入值的范围内的随机排列的数字。 + + +``` + + +$ ./Producer 10 +3 8 2 7 9 1 5 10 6 4  + +``` + +在我们的可执行文件中的 `main()` 函数,如果没有提供一个值 (或者一个不能被处理的值) 的话,我们只处理输入的参数,并退出程序。 + +**producer.cpp** + + +``` + + +int main(int argc, char** argv){ + + if (argc != 2) { + std::cerr << "Enter the number of elements as argument" << std::endl; + return -1; + } + + int range = 0; + + try{ + range = std::stoi(argv[1]); + }catch (const std::invalid_argument&){ + std::cerr << "Error: Cannot parse \"" << argv[1] << "\" "; + return -1; + } + + catch (const std::out_of_range&) { + std::cerr << "Error: " << argv[1] << " is out of range"; + return -1; + } + + if (range <= 0) { + std::cerr << "Error: Zero or negative number provided: " << argv[1]; + return -1; + } + + std::stringstream data; + std::cout << Generator::generate(data, range).rdbuf(); +} + +``` + +实际的工作是在 [Generator][6] 中完成的,它将被编译,并将作为一个静态库来链接到我们的`Producer` 可执行文件。  + +**Generator.cpp** + + +``` + + +std::stringstream &Generator::generate(std::stringstream &astream, const int range) { + std::vector data(range); + std::iota(data.begin(), data.end(), 1); + + std::random_device rd; + std::mt19937 g(rd()); + + std::shuffle(data.begin(), data.end(), g); + + for (const auto n : data) { + + stream << std::to_string(n) << " "; + } + + return stream; +} + +``` + +函数 `generate` 引用一个 [std::stringstream][7] 和一个整数来作为一个参数。 以整数 `range` 的值 _n_ 为基础, 制作一个在 1 到 _n_ 的范围之中的整数向量,并随后排列。接下来排序的向量值转换成一个字符串,并推送到 `stringstream` 之中。该函数返回与作为参数传递的 `stringstream` 引用相同。 + +### CMakeLists.txt 的顶部层次 + +[CMakeLists.txt][8] 的顶部层次是我们工程的入口点。在子目录中有几个 `CMakeLists.txt` 文件 (例如,与工程所相关联的库或其它可执行文件)。我们先一步一步地读破 `CMakeLists.txt` 的顶部层次。 + +第一行告诉我们 CMake 的版本, CMake 需要处理的文件,工程名称,和其版本,以及意欲使用的 C++ 标准。 + + +``` + + +cmake_minimum_required(VERSION 3.14) + +project(CPP_Testing_Sample VERSION 1.0) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED True) + +``` + +我们告诉 CMake 使用下面的代码行来查看子目录 `Generator` 。这个子目录包括构建 `Generator` 库的所有信息,并包含它自身的一个 `CMakeLists.txt` 。我们很快就会谈到这个问题。 + + +``` +`add_subdirectory(Generator)` +``` + +现在,我们将涉及一个绝对特别的功能: [CMake 模块][9] 。加载模块可以扩展 CMake 功能。在我们的工程中,我们将加载模块 [FetchContent][10] ,这能使我们能够在 CMake 运行时下载外部的资源,在我们的示例中是 [GoogleTest][11] 。 + + +``` + + +include(FetchContent) + +FetchContent_Declare( + googletest + URL +) +FetchContent_MakeAvailable(googletest) + +``` + +在接下来的部分中,我们将会做一些我们通常在一个普通的 Makefile 中会做的事: 具体指定哪个库来构建,它们相关的源文件文件,应该链接到的库,和编译器能够在哪些目录中查找头文件。 + + +``` + + +add_executable(Producer Producer.cpp) + +target_link_libraries(Producer PUBLIC Generator) + +target_include_directories(Producer PUBLIC "${PROJECT_BINARY_DIR}") + +``` + +通过下面的语句,我们使 CMake 来在 build 文件夹中创建一个名称为 `compile_commands.json` 的文件。这个文件为工程的每个文件揭示编译器选项。在 VSCodium 中加载,这个文件告知 IntelliSense 功能在哪里查找头文件 (查看 [文档][12]) 。 + + +``` +`set(CMAKE_EXPORT_COMPILE_COMMANDS ON)` +``` + +最后的部分为我们的工程定义一些测试。工程使用先前加载的 GoogleTest 框架。单元测试的整个话题将会划归到另外一篇文章。 + + +``` + + +enable_testing() + +add_executable(unit_test unit_test.cpp) + +target_link_libraries(unit_test gtest_main) + +include(GoogleTest) + +gtest_discover_tests(unit_test) + +``` + +### CMakeLists.txt 的库层次 + +现在,我们来看看包含同名库的子目录 `Generator` 中的 [CMakeLists.txt][13] 文件。这个 `CMakeLists.txt` 文件的内容更简短一些,除了单元测试相关的命令外,它仅包含 2 条语句。 + + +``` + + +add_library(Generator STATIC Generator.cpp Generator.h) + +target_include_directories(Generator INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) + +``` + +我们使用 `add_library(...)` 来定义一个新的构建目标:静态的 `Generator` 库。我们使用语句 `target_include_directories(...)` 来把当前子目录添加到其它构建目标的头文件的搜索路径之中。我们也可以具体指定这个属性的范围为类型 `INTERFACE`:这意味着该属性仅影响链接到这个库的构建目标,而不是库本身。 + +### 开始使用 VSCodium + +使用 `CMakeLists.txt` 文件中的可用信息,, IDEs like像 VSCodium 一样的 IDE 可用相应地配置构建系统。如果你还没有体验过 VSCodium 或 VS Code ,这个示例工程会是一个很好的起点。首先,转到它们的 [网站][3] ,然后针对你的系统下载最新的安装软件包。打开 VSCodium 并导航到 **Extensions** 标签页。 + +为了正确地构建,调试和测试工程,搜索下面的扩展并安装它们。 + +![Searching extensions][14] + +(Stephan Avenwedde, [CC BY-SA 4.0][15]) + +如果尚未完成,通过单击起始页的 **Clone Git Repository** 来复刻存储库。 + +![Clone Git repository][16] + +(Stephan Avenwedde, [CC BY-SA 4.0][15]) + +或者手动输入: + + +``` +`git clone https://github.com/hANSIc99/cpp_testing_sample.git` +``` + +之后,通过输入 tag _devops_1_ 来签出每一个: + + +``` +`git checkout tags/devops_1` +``` + +或者,通过单击 **main** 分支按钮 (红色框) ,并从下拉菜单 (黄色框) 中选择标签。 + +![Select devops_1 tag][17] + +(Stephan Avenwedde, [CC BY-SA 4.0][15]) + +在你打开 VSCodium 内部中的存储库的根文件夹后,`CMake Tools` 扩展会侦测 `CMakeLists.txt` 文件并立即扫描适合你的系统的编译器。你现在可以单击屏幕的底部的 **Build** 按钮 (红色框) 来开始构建过程。你也可以通过单击底部区域的按钮 (黄色框) 标记来更改编译器,它显示当前活动的编译器。 + +![Build compiler][18] + +(Stephan Avenwedde, [CC BY-SA 4.0][15]) + +为开始调试 `Producer` 可执行文件,单击调试器符号 (黄色框) 并从下拉菜单中选择 **Debug Producer** (绿色框)。 + +![Starting the debugger][19] + +(Stephan Avenwedde, [CC BY-SA 4.0][15]) + +如上所述,`Producer` 可执行文件要求元素的数字作为一个命令行的参数。命令行参数可以在 `.vscode/launch.json.` 中具体指定。 + +![Command-line arguments][20] + +(Stephan Avenwedde, [CC BY-SA 4.0][15]) + +明白了吗,你现在能够构建和调试工程了。 + +### 结束语 + +归功于 CMake ,不管你正在运行哪种操作系统,上述步骤应该都能工作。特别是使用与 CMake 相关的扩展,VSCodium 变成看一个强大的 IDE 。我没有提及 VSCodium 的 Git 集成,是因为你已经能够在网络上查找很多的资源。我希望你可以看到:提供一个适当的 CMake 配置文件可以使其他人更容易地构建,使用和贡献于你的工程。在未来的一篇文字中,我将看看单元测试和 CMake 的测试实用程序 `ctest` 。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/devops-cmake + +作者:[Stephan Avenwedde][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/hansic99 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop) +[2]: https://cmake.org/ +[3]: https://vscodium.com/ +[4]: https://github.com/hANSIc99/cpp_testing_sample +[5]: https://opensource.com/article/21/5/cmake +[6]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/Generator/Generator.cpp +[7]: https://en.cppreference.com/w/cpp/io/basic_stringstream +[8]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/CMakeLists.txt +[9]: https://cmake.org/cmake/help/latest/manual/cmake-modules.7.html +[10]: https://cmake.org/cmake/help/latest/module/FetchContent.html +[11]: https://github.com/google/googletest +[12]: https://code.visualstudio.com/docs/cpp/c-cpp-properties-schema-reference +[13]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/Generator/CMakeLists.txt +[14]: https://opensource.com/sites/default/files/uploads/cpp_unit_test_vscodium_extensions.png (Searching extensions) +[15]: https://creativecommons.org/licenses/by-sa/4.0/ +[16]: https://opensource.com/sites/default/files/uploads/cpp_unit_test_vscodium_git_clone.png (Clone Git repository) +[17]: https://opensource.com/sites/default/files/uploads/cpp_unit_test_vscodium_select_tag.png (Select devops_1 tag) +[18]: https://opensource.com/sites/default/files/uploads/cpp_unit_test_vscodium_compiler_2.png (Build compiler) +[19]: https://opensource.com/sites/default/files/uploads/cpp_unit_test_vscodium_start_debugging.png (Starting the debugger) +[20]: https://opensource.com/sites/default/files/uploads/cpp_unit_test_vscodium_arguments.png (Command-line arguments) From 397cc79de62559b1572b948069a23930e2b11548 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 3 Feb 2022 05:02:51 +0800 Subject: [PATCH 164/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220201=20?= =?UTF-8?q?A=20toy=20DNS=20resolver?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220201 A toy DNS resolver.md --- sources/tech/20220201 A toy DNS resolver.md | 386 ++++++++++++++++++++ 1 file changed, 386 insertions(+) create mode 100644 sources/tech/20220201 A toy DNS resolver.md diff --git a/sources/tech/20220201 A toy DNS resolver.md b/sources/tech/20220201 A toy DNS resolver.md new file mode 100644 index 0000000000..80e10c284b --- /dev/null +++ b/sources/tech/20220201 A toy DNS resolver.md @@ -0,0 +1,386 @@ +[#]: subject: "A toy DNS resolver" +[#]: via: "https://jvns.ca/blog/2022/02/01/a-dns-resolver-in-80-lines-of-go/" +[#]: author: "Julia Evans https://jvns.ca/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +A toy DNS resolver +====== + +Hello! I wrote a comic last week called “life of a DNS query” that explains how DNS resolvers work. + +In this post, I want to explain how DNS resolvers work in a different way – with a short Go program that does the same thing described in the comic. The main function (`resolve`) is actually just 20 lines, including comments. + +I usually find it easier to understand things work when they come in the form of programs that I can run and modify and poke at, so hopefully this program will be helpful to some of you. + +The program is here: + +### what’s a DNS resolver? + +When your browser needs to make a DNS query, it asks a **DNS resolvers**. When they start, DNS resolvers don’t know any DNS records (except the IP addresses of the root nameservers). But they _do_ know how to find DNS records for you. + +Here’s the “life of a DNS query” comic, which explains how DNS resolvers find DNS records for you. + +[![][1]][2] + +### we’ll use a library for parsing DNS packets. + +I’m not going to write this completely from scratch – I think parsing DNS packets is really interesting, but it’s definitely more than 80 lines of code, and I find that it kind of distracts from the algorithm. + +I really recommend writing a toy DNS resolver that actually does the parsing of DNS packets if you want to learn about binary protocols though, it’s really fun and it’s a totally doable to get something basic working in a weekend. + +So I’ve used for creating and parsing the DNS packets. + +### DNS responses contain 4 sections + +You might think of DNS queries as just being a question and an answer (“what’s the IP for `example.com`? it’s `93.184.216.34`!). But actually DNS responses contain 4 sections, and we need to use all 4 sections to write our DNS resolver. So let’s explain what they are. + +Here’s the `Msg` struct from the `miekg/dns` library, which lists the sections. + +``` + + type Msg struct { + MsgHdr + Compress bool `json:"-"` // If true, the message will be compressed when converted to wire format. + Question []Question // Holds the RR(s) of the question section. + Answer []RR // Holds the RR(s) of the answer section. + Ns []RR // Holds the RR(s) of the authority section. + Extra []RR // Holds the RR(s) of the additional section. + } + +``` + +**Section 1: Question**. This is the section you use when you’re creating a query. There’s not much to it – it just has a query name (like `jvns.ca.`), a type (like `A`, but encoded as an integer), and a class (which is always the same these days, “internet”). + +Here’s what the Question struct `miekg/dns` looks like: + +``` + + type Question struct { + Name string `dns:"cdomain-name"` // "cdomain-name" specifies encoding (and may be compressed) + Qtype uint16 + Qclass uint16 + } + +``` + +**Section 2: Answer**. When you make a request like this: + +``` + + $ dig +short google.com + 93.184.216.34 + +``` + +the IP address `93.184.216.34` comes from the **Answer** section. + +The Answer, Authority, and Additional sections all contain **DNS records**. Different types of records have different formats, but they all contain a **name**, **type**, **class**, and **TTL** + +Here’s what the shared header looks like in `miekg/dns`: + +``` + + type RR_Header struct { + Name string `dns:"cdomain-name"` + Rrtype uint16 + Class uint16 + Ttl uint32 + Rdlength uint16 // Length of data after header. + } + +``` + +“RR” stands for “Resource Record”. + +**Section 3: Authority**. When a nameserver redirects you to another server (“ask `a.iana-servers.net` instead!“), this is the section it uses. `miekg/dns` calls this section `Ns` instead of `Authority`, I guess because it contains `NS` records. + +Here’s an example of an record in the Authority section of a DNS response. + +``` + + $ dig +noall +authority @h.root-servers.net example.com + com. 172800 IN NS a.gtld-servers.net. + com. 172800 IN NS b.gtld-servers.net. + +``` + +The Authority section can also contain SOA records but that’s not relevant to this post so I’m not going to talk about that. + +**Section 4: Additional**. This is where “glue records” live. What’s a glue record? Well, basically when a nameserver redirects you to another server, often it’ll include the IP address of that server as well. + +Here are the glue records from the same query above. + +``` + + $ dig +noall +additional @h.root-servers.net example.com + a.gtld-servers.net. 172800 IN A 192.5.6.30 + b.gtld-servers.net. 172800 IN A 192.33.14.30 + +``` + +There are other things in the Additional section as well, not just glue records, but they’re not relevant to this blog post so I’m not going to talk about them. + +### the basic `resolve` function is pretty short + +Now that we’ve talked about the different sections in a DNS response, I can explain the resolver code. + +Let’s jump into the main function for resolving a name to an IP address. + +`name` here is a domain name, like `example.com.`` + +``` + + func resolve(name string) net.IP { + // We always start with a root nameserver + nameserver := net.ParseIP("198.41.0.4") + for { + reply := dnsQuery(name, nameserver) + if ip := getAnswer(reply); ip != nil { // look in the "Answer" section + // Best case: we get an answer to our query and we're done + return ip + } else if nsIP := getGlue(reply); nsIP != nil { // look in the "Additional" section + // Second best: we get a "glue record" with the *IP address* of + // another nameserver to query + nameserver = nsIP + } else if domain := getNS(reply); domain != "" { // look in the "Authority" section + // Third best: we get the *domain name* of another nameserver to + // query, which we can look up the IP for + nameserver = resolve(domain) + } else { + // If there's no A record we just panic, this is not a very good + // resolver :) + panic("something went wrong") + } + } + } + +``` + +Here’s what that `resolve` function is doing: 1. We start with the root nameserver 2. Then we do a loop: a. Query the nameserver and parse the response a. Look in the “Answer” section for a response. If we find one, we’re done a. Look in the “Additional” section for a glue record. If we find one, use that as the nameserver for the next query a. Look in the “Authority” section for a nameserver domain. If we find one, look up its IP and then use that IP as the nameserver for the next query + +That’s basically the whole program. There are a few helper functions to get records out of the DNS response and to make DNS queries but I don’t think they’re that interesting so I won’t explain them. + +### the output + +The resolver prints out all DNS queries it made, and the record it used to figure out what query to make it next. + +It prints out `dig -r @SERVER DOMAIN` for each query even though it’s not actually using `dig` to make the query because I liked being able to run the same query myself from the command line to see the response myself, for debugging purposes. + +`-r` just means “ignore what’s in `.digrc`”, it’s there because I have some options in my `.digrc` (`+noall +answer`) that I wanted to disable when debugging. + +Let’s look at 3 examples of the output. + +### example 1: jvns.ca + +``` + + $ go run resolve.go jvns.ca. + dig -r @198.41.0.4 jvns.ca. + any.ca-servers.ca. 172800 IN A 199.4.144.2 + dig -r @199.4.144.2 jvns.ca. + jvns.ca. 86400 IN NS art.ns.cloudflare.com. + dig -r @198.41.0.4 art.ns.cloudflare.com. + a.gtld-servers.net. 172800 IN A 192.5.6.30 + dig -r @192.5.6.30 art.ns.cloudflare.com. + ns3.cloudflare.com. 172800 IN A 162.159.0.33 + dig -r @162.159.0.33 art.ns.cloudflare.com. + art.ns.cloudflare.com. 900 IN A 173.245.59.102 + dig -r @173.245.59.102 jvns.ca. + jvns.ca. 256 IN A 172.64.80.1 + +``` + +We can see it had to make 6 DNS queries, 3 to look up `jvns.ca` and 3 to look up `jvns.ca`’s nameserver, `art.ns.cloudflare.com` + +### example 2: archive.org + +``` + + $ go run resolve.go archive.org. + dig -r @198.41.0.4 archive.org. + a0.org.afilias-nst.info. 172800 IN A 199.19.56.1 + dig -r @199.19.56.1 archive.org. + ns1.archive.org. 86400 IN A 208.70.31.236 + dig -r @208.70.31.236 archive.org. + archive.org. 300 IN A 207.241.224.2 + Result: 207.241.224.2 + +``` + +This one only had to make 3 DNS queries. This is because there was a glue record available for archive.org’s nameserver (`ns1.archive.org.`). + +### example 3: [www.maths.ox.ac.uk][3] + +One last example: let’s look up `www.maths.ox.ac.uk`. There’s a reason for this one, I promise! + +``` + + dig -r @198.41.0.4 www.maths.ox.ac.uk. + dns1.nic.uk. 172800 IN A 213.248.216.1 + dig -r @213.248.216.1 www.maths.ox.ac.uk. + ac.uk. 172800 IN NS ns0.ja.net. + dig -r @198.41.0.4 ns0.ja.net. + e.gtld-servers.net. 172800 IN A 192.12.94.30 + dig -r @192.12.94.30 ns0.ja.net. + ns0.ja.net. 172800 IN A 128.86.1.20 + dig -r @128.86.1.20 ns0.ja.net. + ns0.ja.net. 86400 IN A 128.86.1.20 + dig -r @128.86.1.20 www.maths.ox.ac.uk. + ns2.ja.net. 86400 IN A 193.63.105.17 + dig -r @193.63.105.17 www.maths.ox.ac.uk. + www.maths.ox.ac.uk. 300 IN A 129.67.184.128 + Result: 129.67.184.128 + +``` + +This makes **7** DNS queries, which is more than `jvns.ca`, which only needed 6. Why does it make 7 DNS queries instead of 6? + +Well, it’s because there are 4 nameservers involved in resolving `www.maths.ox.ac.uk` instead of 3. They are: + + * the `.` nameserver + * the `uk.` nameserver + * the `ac.uk.` nameserver + * the `ox.ac.uk.` nameserver + + + +You could even imagine there being a 5th one (a `maths.ox.ac.uk.` nameserver), but there isn’t in this case. + +jvns.ca only involves 3 nameservers: + + * the `.` nameserver + * the `ca.` nameserver + * the `jvns.ca.` nameserver + + + +### real DNS resolvers actually make more queries than this + +When my resolver resolves `reddit.com.`, it only makes 3 DNS queries. + +``` + + $ go run resolve.go reddit.com. + dig -r @198.41.0.4 reddit.com. + e.gtld-servers.net. 172800 IN A 192.12.94.30 + dig -r @192.12.94.30 reddit.com. + ns-378.awsdns-47.com. 172800 IN A 205.251.193.122 + dig -r @205.251.193.122 reddit.com. + reddit.com. 300 IN A 151.101.129.140 + Result: 151.101.129.140 + +``` + +But when `unbound` (the actual DNS resolver that I have running on my laptop) resolves reddit.com, it makes more DNS queries. I captured them with `tcpdump` to see what they were. + +This `tcpdump` output might be a little illegible because well, that’s how tcpdump is, but hopefully it makes some sense. + +Unbound skips the first step, because it has the address of the `com.` nameserver cached. Then the next 2 queries `unbound` makes are exactly the same as my tiny Go resolver, except that it sends its first query to `k.gtld-servers.net` instead of `e.gtld-servers.net`: + +``` + + 12:38:35.479222 wlp3s0 Out IP pomegranate.19946 > k.gtld-servers.net.domain: 51686% [1au] A? reddit.com. (39) + 12:38:35.757033 wlp3s0 Out IP pomegranate.29111 > ns-378.awsdns-47.com.domain: 8859% [1au] A? reddit.com. (39) + +``` + +But then it keeps making DNS queries, even after it’s done resolving `reddit.com`: + +``` + + 12:38:35.757033 wlp3s0 Out IP pomegranate.29111 > ns-378.awsdns-47.com.domain: 8859% [1au] A? reddit.com. (39) + 12:38:35.757396 wlp3s0 Out IP pomegranate.31913 > ns-1775.awsdns-29.co.uk.domain: 54236% [1au] A? ns-378.awsdns-47.com. (49) + 12:38:35.757761 wlp3s0 Out IP pomegranate.62059 > g.gtld-servers.net.domain: 28793% [1au] A? awsdns-05.net. (42) + 12:38:35.757955 wlp3s0 Out IP pomegranate.34743 > b0.org.afilias-nst.org.domain: 24975% [1au] A? awsdns-00.org. (42) + 12:38:35.758051 wlp3s0 Out IP pomegranate.8977 > a0.org.afilias-nst.info.domain: 53387% [1au] A? awsdns-00.org. (42) + 12:38:35.758285 wlp3s0 Out IP pomegranate.11376 > j.gtld-servers.net.domain: 41181% [1au] A? awsdns-05.net. (42) + 12:38:35.775497 wlp3s0 In IP ns-378.awsdns-47.com.domain > pomegranate.29111: 8859*-$ 4/4/1 A 151.101.1.140, A 151.101.129.140, A 151.101.65.140, A 151.101.193.140 (240) + 12:38:35.775948 lo In IP localhost.domain > localhost.34429: 4033 4/0/1 A 151.101.1.140, A 151.101.129.140, A 151.101.65.140, A 151.101.193.140 (103) + # now it's done -- it returned its DNS response! + # but it keeps making queries about reddit.com's nameservers... + 12:38:35.843811 wlp3s0 Out IP pomegranate.44738 > ns-706.awsdns-24.net.domain: 14817% [1au] A? ns-1029.awsdns-00.org. (50) + 12:38:35.845563 wlp3s0 Out IP pomegranate.55655 > ns-1027.awsdns-00.org.domain: 3120% [1au] A? ns-1029.awsdns-00.org. (50) + 12:38:36.017618 wlp3s0 Out IP pomegranate.53397 > ns-775.awsdns-32.net.domain: 32671% [1au] A? ns-557.awsdns-05.net. (49) + 12:38:36.045151 wlp3s0 Out IP pomegranate.40525 > ns-454.awsdns-56.com.domain: 20823% [1au] A? ns-557.awsdns-05.net. (49) + +``` + +So that’s kind of interesting. I guess it makes sense that unbound would want to cache more nameserver addresses in case it needs them in the future. Or maybe that’s what the DNS specification says to do? + +### is this a “recursive” program? + +DNS resolvers are often called “recursive nameservers”. I’ve stopped using that terminology myself in explanations, but as far as I can tell, this is because the `resolve` function is often a recursive function. + +And the `resolve` function I wrote is definitely recursive! But I ran this program on 500 different domains, and these are the number of times it recursed: + + 1. Sometimes 0 times (the function never calls itself) + 2. Sometimes 1 time (the function calls itself once, to look up the IP address of one nameserver) + 3. Very rarely 2 times (like for example to resolve `abc.net.au.` right now it needs to look up `r.au.`, then `eur2.akam.net.` then `abc.net.au.`) + 4. So far, never 3 times + + + +Maybe there’s a domain that this function would recurse more than 2 times on, but I don’t know. + +You definitely _could_ write this program in a way that recurses more, by replacing the loop with more recursion. And then it would recurse 3 or 6 or 7 or 9 times, depending on the domain. But to me the loop feels easier to read so I wrote it with a loop instead. + +### a bash version of this resolver + +I wanted to see if it was possible to write a DNS resolver in 10-15 lines of bash, similarly to [this short “run a container” script][4] + +The program I came up with was kind of too long in the end (it’s about 36 lines), but here it is anyway. It uses the exact same algorithm as the Go program. + + + +The bash version is even more janky and uses `grep` in very questionable ways but it did resolve every domain I tried which is cool. + +It actually helped me write the Go resolver (which I actually started back in November but got stuck on) because bash’s limitations forced me to simplify the design and simplifying it fixed a bug I was running into. + +### how is this different from a “real” DNS resolver? + +Obviously this is only 80 lines so there are a lot of differences between this an a “real” DNS resolver. Here are a few: + + * it only handles A records, not other record types + * specifically it doesn’t handle CNAME records (though you can easily add CNAME support with just [another 12 lines of code][5]) + * it always only returns one A record even if there are more + * it has absolutely no ability to handle errors like “there were no A records” (the Go program just panics) + * the way it handles the glue records is a bit sketchy, probably it should check that they match the nameservers in the “Authority” section or something. It seems to work though. + * DNS resolvers are usually servers, this is a command line program + * it doesn’t validate DNSSEC or whatever + * it doesn’t do caching + * it doesn’t try a different nameserver if one of the domain’s nameservers isn’t working and times out the DNS query + * like we mentioned above, unbound seems to look up the addresses of all the nameservers for a domain + * probably there are other bugs and ways it violates the DNS spec that I don’t know about + + + +### tiny versions of real programs are fun + +As usual I always learn something from writing tiny versions of real programs. I’ve written this program before but I think this version is better than the first version I wrote. + +In 2020 I ran a 2-day workshop with my friend Allison called “Domain Name Saturday” where all the participants wrote DNS resolvers. Basically the idea was that you implement the algorithm described in this post, as well as the binary parsing pieces that the `miekg/dns` library handles here. At some point I want to write up that workshop so that other people could run it, because it was really fun. + +One question I still have is – are there domains where the `resolve` function would recurse 3 times or more on? Obviously you could manufacture such a domain by making it intentionally have to go through a bunch of hoops, but.. do they exist in the real world? + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2022/02/01/a-dns-resolver-in-80-lines-of-go/ + +作者:[Julia Evans][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://wizardzines.com/comics/life-of-a-dns-query/life-of-a-dns-query.png +[2]: https://wizardzines.com/comics/life-of-a-dns-query/ +[3]: http://www.maths.ox.ac.uk +[4]: https://gist.github.com/jvns/ea2e4d572b4e2285148b8e87f70eed73 +[5]: https://github.com/jvns/tiny-resolver/commit/8a2dada63ec214ecf01046e3f57eb5406706b302 From ff52932f436d0769910de85fe76b57730d6364d7 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 3 Feb 2022 05:03:11 +0800 Subject: [PATCH 165/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220202=20?= =?UTF-8?q?KDE=E2=80=99s=20Falkon=20Browser=20Adds=20Screen=20Capture=20an?= =?UTF-8?q?d=20PDF=20Reader=20with=20its=20Latest=20Update=20in=203=20Year?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220202 KDE-s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years.md --- ...eader with its Latest Update in 3 Years.md | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 sources/news/20220202 KDE-s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years.md diff --git a/sources/news/20220202 KDE-s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years.md b/sources/news/20220202 KDE-s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years.md new file mode 100644 index 0000000000..715d4d793e --- /dev/null +++ b/sources/news/20220202 KDE-s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years.md @@ -0,0 +1,87 @@ +[#]: subject: "KDE’s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years" +[#]: via: "https://news.itsfoss.com/falkon-browser-3-2-release/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +KDE’s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years +====== + +If you’re a KDE fan, you must have certainly come across or even used Falkon. So, you must be pleasantly surprised to find out that KDE has managed to release a new major upgrade of their web browser. + +Unlike other mainstream web browsers, Falkon does not receive frequent updates. And, the latest release is an exciting update, after a gap of almost three years! + +For those unaware, [Falkon][1] is a simple open-source web browser built upon the QtWebEngine. It was initially known as QupZilla, later rebranded to Falkon under KDE. + +Although not new—being released way back in 2010—it offers a minimalistic browsing experience for the average user. + +![][2] + +### Falkon 3.2.0: What’s New? + +Even though you have the latest version available now, Falkon does not offer regular security updates. + +So, you might want to consider Falkon as a browser for specific requirements or as a secondary browser. + +Here’s what’s new with this release: + +#### Screen Capture and PDF Reader Support + +The latest release brings in much-needed support for Screen Capture and an optional PDF reader based on PDFium. Both of these are based on Qt 5.13. version. + +#### Themes and Plugins + +Initial support for downloading themes and extensions has also been added, along with the Preferences menu that displays links to the KDE store. Additionally, users can now remove locally installed themes and plugins too. + +![][2] + +#### Bookmarks + +Users can now create folders and store bookmarks thanks to a context menu item. It has been noticed that the padding of the bar and the ability to create bookmarks without a parent has been taken away. + +#### Other features + + * A very common yet essential feature added to Falkon is the ability to pause or resume downloads. + * An updated CookieManager now allows the selection of more than one cookie at the same time. + * The Preferences extensions can now be filtered. + * Users can now detach tabs via the context menu + * NetworkManager integration is now included. + + + +To know more about all the technical changes, you can refer to the [official release notes.][3] + +![][4] + +### Wrapping Up + +The latest release of Falkon shows that KDE is still planning to continue support for it. This is a piece of good news for KDE lovers, especially for those who use Falkon. But, it’s too early to say if they plan to push regular updates, making it an ideal choice for everyday browsing. + +If you’re okay with a simple and lightweight web browser with decent ad-blocking capabilities, one that blends in well with the KDE desktop, Falkon is a must-try. + +Installation is very straightforward. You can find it in your repositories or install it using the Flatpak or [Snap packages][5]. It is also available for Windows users, if you are curious. + +[Download Falkon 3.2.0][6] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/falkon-browser-3-2-release/ + +作者:[Rishabh Moharir][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/falkon-browser/ +[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ2MiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[3]: https://www.falkon.org/2022/01/31/320-released/#disqus_thread +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ2MCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[5]: https://snapcraft.io/falkon +[6]: https://www.falkon.org/download/ From f30e7d9ece1c57225f6056fb70c497c2ae7f1de9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 3 Feb 2022 13:47:59 +0800 Subject: [PATCH 166/334] ATRP @wxy https://linux.cn/article-14237-1.html --- ...Visual Tweaks to the Desktop Experience.md | 88 +++++++++++++++++++ ...Visual Tweaks to the Desktop Experience.md | 86 ------------------ 2 files changed, 88 insertions(+), 86 deletions(-) create mode 100644 published/20220131 Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience.md delete mode 100644 sources/news/20220131 Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience.md diff --git a/published/20220131 Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience.md b/published/20220131 Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience.md new file mode 100644 index 0000000000..b38f0b8c09 --- /dev/null +++ b/published/20220131 Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience.md @@ -0,0 +1,88 @@ +[#]: subject: "Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience" +[#]: via: "https://news.itsfoss.com/nitrux-2-0-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14237-1.html" + +最漂亮的 Linux 发行版之一 Nitrux 2.0 发布 +====== + +> Nitrux 2.0.0 是一个令人兴奋的版本,它默认采用 XanMod 内核,并 带来了其他各种视觉和技术改进。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/nitrux-os-2-0.png?w=1200&ssl=1) + +Nitrux Linux 轻松成为了 [最漂亮的 Linux 发行版][1] 之一。 + +上个月,我们点评了 [Maui Shell][2],它也是由 Nitrux Linux 背后的团队所设计的。现在,Nitrux 2.0.0 已经发布,并带来了一些令人兴奋的变化。 + +让我在这里重点介绍一下基本变化。 + +### Nitrux 2.0.0 有什么新东西? + +这次升级包括一个新的 Linux 内核、更新的应用程序、桌面环境、固件改进,以及大大减小了 ISO 的大小。 + +你还会注意到布局和顶部面板等几处细微视觉变化。 + +### XanMod 内核 5.16.3 + +![][3] + +XanMod 内核是为新一代硬件量身定做的,以获得尽可能好的桌面体验。 + +与许多其他 Linux 发行版中自带的 Linux 内核相比,你会发现它有一些自定义设置和新功能,可以提高你的使用体验。 + +在 Nitrux 2.0.0 中,默认选择了 XanMod 内核 5.16.3。当然你仍然可以选择最新的主线 LTS 或非 LTS(5.15.17、5.16.3)Linux 内核。 + +别忘了,如果你需要,你还可以安装 Liquorix 和 Libre 内核。 + +### 更新布局和面板的变化 + +顶部面板现在显示了窗口控制、标题、全局菜单和系统托盘区。 + +布局仍然与以前的版本相似,但有一些位置的调整,比如将应用程序菜单添加到基座dock中,应用程序菜单是 Launchpad Plasma(感谢 [adhe][4])。 + +![][3] + +此外,你应会发现窗口装饰有了改进,所有窗口现在默认都是无边框的。你可以在外观设置下的窗口装饰选项中选择禁用无边框窗口模式。 + +可选的 Latte 布局也得到了更新,包括窗口控制、标题栏和全局菜单。 + +### 更新的软件包和驱动程序 + +出于显而易见的原因,这次升级包括 KDE Plasma 版本更新、KDE 框架、KDE 装备,以及其他必要的应用程序,如 Firefox 和 LibreOffice。 + +此外,为 AMD GPU 增加了内核软件包中没有的额外固件。他们还在可下载的 ISO 中增加了 i915、Nouveau 和 AMDGPU 驱动。 + +默认使用的是 MESA 21.3.5 稳定版,但如果你需要的话,可以安装最新的 MESA 22.0。 + +### 其他改进 + +在 Nitrux Linux 的这些变化之外,还有一些额外的技术改进,如: + + * 减少了标准版和精简版的 ISO 文件大小。 + * Xbox One 控制器的工作原理与操纵杆没有冲突。 + * 在精简版 ISO 中,JWM 取代了 i3 窗口管理器。 + +更多细节,你可以参考 [官方公告][5]。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/nitrux-2-0-release/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/beautiful-linux-distributions/ +[2]: https://news.itsfoss.com/maui-shell-unveiled/ +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/nitrux-2-about.png?resize=1568%2C882&ssl=1 +[4]: https://www.pling.com/u/adhe/ +[5]: https://nxos.org/changelog/release-announcement-nitrux-2-0-0/#download diff --git a/sources/news/20220131 Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience.md b/sources/news/20220131 Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience.md deleted file mode 100644 index 0a71ee97de..0000000000 --- a/sources/news/20220131 Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: subject: "Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience" -[#]: via: "https://news.itsfoss.com/nitrux-2-0-release/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience -====== - -Nitrux Linux is easily one of the [most beautiful Linux distributions][1] out there. - -Last month, we also looked at [Maui Shell][2], by the same team behind Nitrux Linux. And, now, Nitrux 2.0.0 has been released with some exciting changes. - -Let me highlight the fundamental changes here. - -### Nitrux 2.0.0: What’s New? - -The upgrade includes a new Linux Kernel, updated applications, desktop environment, firmware improvements, and ISO size reduction. - -You will also notice several subtle visual changes to the layouts and the top panel. - -### XanMod Kernel 5.16.3 - -![][3] - -XanMod Kernel is tailored for new-gen hardware to get the best possible desktop experience. - -Compared to the stock Linux Kernel found in many other Linux distributions, you will find some custom settings and new features enabled to enhance your experience with it. - -With Nitrux 2.0.0, XanMod Kernel 5.16.3 has been made the default choice. You still get to select the latest mainline LTS or non-LTS (5.15.17, 5.16.3) Linux Kernel as well. - -Not to forget, you also get the ability to install Liquorix and Libre kernels if you need those. - -### Updated Layouts and Changes to Panels - -The top panel now shows window controls, title, global menu and houses the system tray. - -The layout remains similar to previous iterations, but there are a few position adjustments, like adding the application menu to the dock, the application menu being the Launchpad Plasma (thanks to [adhe][4]). - -![][3] - -Moreover, you should find improvements in the window decorations, considering everything is borderless by default. You do get the choice to disable the borderless windows mode from the Window Decorations option under the appearance settings. - -The optional Latte layouts have also received updates to include the window controls, title bar, and the global menu. - -### Updated Packages and Drivers - -For obvious reasons, this upgrade includes KDE Plasma version updates, KDE Frameworks, KDE Gear, among other essential applications like Firefox and LibreOffice. - -Additional firmware has been added for AMD GPUs not available in the kernel packages. They have also added i915, Nouveau, and AMDGPU drivers in the ISO available to download. - -MESA 21.3.5 stable is available by default, but you can install the latest MESA 22.0 if you need it. - -### Other Improvements - -Along with all the changes to Nitrux Linux, there are also some additional technical improvements like: - - * Reduced ISO file size for both the standard and minimal edition. - * Xbox One controller works without conflicts with joysticks. - * i3 window manager has been replaced by JWM in the minimal ISO. - - - -For more details, you can refer to the [official announcement post][5]. - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/nitrux-2-0-release/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/beautiful-linux-distributions/ -[2]: https://news.itsfoss.com/maui-shell-unveiled/ -[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[4]: https://www.pling.com/u/adhe/ -[5]: https://nxos.org/changelog/release-announcement-nitrux-2-0-0/#download From 2973ab858870d6557a38fbee88a18e91dd40a347 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 3 Feb 2022 14:17:01 +0800 Subject: [PATCH 167/334] RP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @CN-QUAN 这篇不够认真,请再接再厉。 https://linux.cn/article-14238-1.html --- ...projects to try using open source tools.md | 86 +++++++++++++++++++ ...projects to try using open source tools.md | 82 ------------------ 2 files changed, 86 insertions(+), 82 deletions(-) create mode 100644 published/20220102 10 DIY IoT projects to try using open source tools.md delete mode 100644 translated/tech/20220102 10 DIY IoT projects to try using open source tools.md diff --git a/published/20220102 10 DIY IoT projects to try using open source tools.md b/published/20220102 10 DIY IoT projects to try using open source tools.md new file mode 100644 index 0000000000..b4ff031a21 --- /dev/null +++ b/published/20220102 10 DIY IoT projects to try using open source tools.md @@ -0,0 +1,86 @@ +[#]: via: "https://opensource.com/article/22/1/open-source-internet-of-things" +[#]: author: "Joshua Allen Holm https://opensource.com/users/holmja" +[#]: collector: "lujun9972" +[#]: translator: "CN-QUAN" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14238-1.html" + +2021 总结:10 个值得尝试的 DIY 物联网项目 +====== + +> 在 2021 年,我们的作者们多次分享了他们关于各种物联网项目的专业知识。 + +![](https://img.linux.net.cn/data/attachment/album/202202/03/141552nxzj9alj5z7y5eyz.jpg) + +物联网(IoT)是计算领域的一个令人着迷的发展方向。互联智能设备、家庭自动化以及相关的发展领域正在产生许多有趣的项目。在 2021 年,我们的作者们多次分享了他们关于各种物联网项目的专业知识。以下是十大最佳物联网文章。 + +### 如何使用你选择的声音定制你的语音助手 + +在这篇由 Rich Lucente 撰写的这篇文章中 [了解 Nana and Poppy 项目][2]。Nana and Poppy 项目是 Rich Lucente 为人工智能语音助手创建自定义问候的开源项目。他描述了整个过程,从录制必要的音频片段到编写代码将这些片段组合成完整的问候语。成品是五个送给曾祖父母和祖父母的定制语音助手,他们现在无论何时与语音助手互动都能听到孙辈的声音。 + +### 用树莓派和 Prometheus 监测你家的温湿度 + +Chris Collins 描述了他如何 [利用 Prometheus 监测家中的温度和湿度][3]。他提供了关于在树莓派操作系统上安装 Prometheus、检测 Prometheus 应用程序、设置 systemd 单元和日志记录等方面的详细说明,以创建用于监控温度和湿度数据的工具。本文建立在 Chris 以前写的一篇文章的基础上,这篇文章是这个系列的下一篇文章。 + +### 用树莓派在家里设置温度传感器 + +学习如何通过使用树莓派、DHT22 数字传感器和一些 Python 代码 [设置温度传感器][4]。在本文中,Chris Collins 解释了如何将传感器连接到树莓派,安装 DHT 传感器软件,并使用 Python 脚本获取传感器数据。他最后调侃说,未来的文章将更多地自动化从该设备收集数据,这是本列表中的前一篇文章。 + +### 用智能手机远程控制你的树莓派 + +Stephan Avenwede 解释了如何 [使用你的智能手机来控制树莓派的 GPIO][5]。本教程描述了如何安装和使用 Pythonic 来使用 Telegram 通过网络连接控制树莓派。在写这篇文章时,他并没有考虑到具体的最终项目,因此本文提供了广泛的指导,你可以将其应用于许多项目。Stephan 建议的一些可能的项目包括草坪灌溉和车库开门器。 + +### 家庭自动化项目为什么选择开源 + +Alan Smithee 在本文中 [介绍了家庭自动化电子书][6]。这本电子书包含了与家庭自动化相关的内容。Alan 的文章概述了为什么技术能让每个人的生活变得更好,并提供了一个下载电子书的链接。 + +### 用 Grafana Cloud 监控你的树莓派 + +在 Matthew Helmke 的这篇教程中,了解如何 [用 Grafana Cloud 监控你的树莓派][7]。该项目使用树莓派、Prometheus 时间序列数据库和 Grafana Cloud 帐户。Matthew 解释了如何在树莓派上安装 Prometheus,并将其连接到 Grafana Cloud,为你的树莓派提供监控。 + +### 一种新的嵌入式开源操作系统 + +Zhu Tianlong 提供了 [RT-Thread 智能操作系统简介][8]。本文解释了什么是 RT-Thread Smart,谁可能需要使用它,以及它是如何工作的。本文中还有一个章节对 RT-Thread Smart 和 RT Thread 进行了对比。 + +### 使用 Rust 进行嵌入式开发 + +本文由 Alan Smithee 撰写,Liu Kang 供稿,介绍了 [使用 Rust 进行嵌入式开发][9]。这个包含大量代码的教程展示了如何在 C 中调用 Rust,以及如何在 Rust 中调用 C。这里有大量使用 Rust 工具(如 Cargo)进行开发的代码示例和详细说明。 + +### 开源 Linux 边缘开发入门 + +Daniel Oh 解释了如何使用 Quarkus 云原生 Java 框架来 [开始边缘开发][10]。Daniel 首先简要介绍了他在教程中使用的操作系统 CentOS Stream。然后他介绍了教程的三个主要步骤: + +* 将物联网数据发送到轻量级消息代理。 +* 使用 Quarkus 处理反应性数据流。 +* 监控实时数据通道。 + +### 什么是雾计算? + +你可能听说过云计算,但是 [什么是雾计算][11]?Seth Kenlon 将雾计算fog computing描述为“云的外部‘边缘’”——由手机、手表和其他组成物联网的各种设备组成。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/open-source-internet-of-things + + +作者:[Joshua Allen Holm][a] +选题:[lujun9972][b] +译者:[CN-QUAN](https://github.com/CN-QUAN) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/holmja +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_BUS_Apple_520.png?itok=ZJu-hBV1 (collection of hardware on blue backround) +[2]: https://opensource.com/article/21/1/customize-voice-assistant +[3]: https://opensource.com/article/21/7/home-temperature-raspberry-pi-prometheus +[4]: https://opensource.com/article/21/7/temperature-sensors-pi +[5]: https://opensource.com/article/21/9/raspberry-pi-remote-control +[6]: https://opensource.com/article/21/6/home-automation-ebook +[7]: https://opensource.com/article/21/3/raspberry-pi-grafana-cloud +[8]: https://opensource.com/article/21/7/rt-thread-smart +[9]: https://opensource.com/article/21/10/rust-embedded-development +[10]: https://opensource.com/article/21/5/edge-quarkus-linux +[11]: https://opensource.com/article/21/5/fog-computing diff --git a/translated/tech/20220102 10 DIY IoT projects to try using open source tools.md b/translated/tech/20220102 10 DIY IoT projects to try using open source tools.md deleted file mode 100644 index 4214d1c176..0000000000 --- a/translated/tech/20220102 10 DIY IoT projects to try using open source tools.md +++ /dev/null @@ -1,82 +0,0 @@ -[#]: via: "https://opensource.com/article/22/1/open-source-internet-of-things" -[#]: author: "Joshua Allen Holm https://opensource.com/users/holmja" -[#]: collector: "lujun9972" -[#]: translator: "CN-QUAN " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -尝试使用开源工具的10个DIY物联网项目 -====== -在2021年期间,Opensource.com的作者们多次分享了他们关于各种物联网项目的专业知识。 -![蓝色背景上的硬件集合][1] - -物联网(IoT)是计算领域的一个令人着迷的发展方向。互联智能设备、家庭自动化以及相关的发展领域正在产生许多有趣的项目。在2021年期间,Opensource.com的作者们多次分享了他们关于各种物联网项目的专业知识。以下是Opensource.com今年的十大最佳物联网文章。 - -###如何使用您选择的声音定制您的语音助手 - -在这篇由Rich Lucente撰写的文章中[了解Nana和Poppy项目][2]。Nana and Poppy项目是Rich Lucente为人工智能语音助手创建自定义问候的开源项目。他描述了整个过程,从录制必要的音频片段到编写代码将这些片段组合成完整的问候语。成品是五个定制的语音助手,送给曾祖父母和祖父母,他们现在无论何时与语音助手互动都能听到孙辈的声音。 - -###用树莓派和普罗米修斯监测你家的温湿度 - -克里斯·柯林斯(Chris Collins)描述了他如何[利用普罗米修斯(Prometheus)监测家中的温度和湿度][3]。他提供了关于在Raspberry PI OS上安装普罗米修斯、检测普罗米修斯应用程序、设置系统单元和日志记录等方面的详细说明,以创建用于监控温度和湿度数据的工具。本文建立在克里斯(Chris)以前写的一篇文章的基础上,是这个系列的下一篇文章。 - -###用树莓派在家里设置温度传感器 - -学习[如何设置温度传感器][4]通过使用树莓派、DHT22数字传感器和一些Python代码。在本文中,Chris Collins解释了如何将传感器连接到树莓派,安装DHT传感器软件,并使用Python脚本获取传感器数据。他最后调侃了一篇未来的文章,这篇文章将更多地自动化从该设备收集数据,这是本列表中的前一篇文章。 - -###用智能手机远程控制你的树莓派 - -斯蒂芬·艾文韦德(Stephan Avenwede)解释了如何[使用你的智能手机来控制树莓派的gpio][5]。本教程描述了如何安装和使用python来使用Telegram通过网络连接控制树莓派。在写这篇文章时,他并没有考虑到具体的最终项目,因此本文提供了广泛的指导,您可以将其应用于许多项目。斯蒂芬建议的一些可能的项目包括草坪灌溉和车库开门器。 - -#家庭自动化项目为什么选择开源 - -Alan Smithee在本文中[介绍了Opensource.com家庭自动化电子书][6]。这本电子书包含了Opensource.com网站上与家庭自动化相关的内容。Alan的文章概述了为什么技术让每个人的生活变得更好,并提供了一个下载电子书的链接。 - -###用Grafana Cloud监控你的树莓派 - -在Matthew Helmke的这篇教程中,了解如何[用Grafana Cloud监控你的树莓派][7]。该项目使用树莓派、Prometheus时间序列数据库和Grafana Cloud帐户。Matthew解释了如何在树莓派上安装Prometheus,并将其连接到Grafana Cloud,为您的树莓派提供监控。 - -###一种新的嵌入式开源操作系统 - -朱天龙提供了[RT-Thread智能操作系统简介][8]。本文解释了什么是RT-Thread Smart,谁可能需要使用它,以及它是如何工作的。本文中还有一个章节对RT Thread Smart和RT Thread进行了对比。 - -###使用Rust进行嵌入式开发 - -本文由Alan Smithee撰写,刘康提供,介绍了[使用Rust进行嵌入式开发][9]。这个包含大量代码的教程展示了如何在C中调用Rust,以及如何在Rust中调用C。这里有大量使用Rust工具(如Cargo)进行开发的代码示例和详细说明。 - -###开源Linux边缘开发入门 - -Daniel Oh解释了如何使用Quarkus云原生Java框架来[开始边缘开发][10]。Daniel首先简要介绍了他在教程中使用的操作系统CentOS Stream。然后他介绍了教程的三个主要步骤: - -*将物联网数据发送到轻量级消息代理。 -*使用Quarkus处理反应性数据流。 -*监控实时数据通道。 - -#什么是雾计算? - -您可能听说过云计算,但是[什么是雾计算][11]?Seth Kenlon将雾计算描述为“云的外部‘边缘’”——由手机、手表和其他组成物联网的各种设备组成。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/open-source-internet-of-things - - -作者:[Joshua Allen Holm][a] -选题:[lujun9972][b] -译者:[CN-QUAN](https://github.com/CN-QUAN) -校对:[校对者ID](https://github.com/校对者ID) -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]: https://opensource.com/users/holmja -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_BUS_Apple_520.png?itok=ZJu-hBV1 (collection of hardware on blue backround) -[2]: https://opensource.com/article/21/1/customize-voice-assistant -[3]: https://opensource.com/article/21/7/home-temperature-raspberry-pi-prometheus -[4]: https://opensource.com/article/21/7/temperature-sensors-pi -[5]: https://opensource.com/article/21/9/raspberry-pi-remote-control -[6]: https://opensource.com/article/21/6/home-automation-ebook -[7]: https://opensource.com/article/21/3/raspberry-pi-grafana-cloud -[8]: https://opensource.com/article/21/7/rt-thread-smart -[9]: https://opensource.com/article/21/10/rust-embedded-development -[10]: https://opensource.com/article/21/5/edge-quarkus-linux -[11]: https://opensource.com/article/21/5/fog-computing From b6b02c278ad43ddeb7506eacd3fca4faffab64f7 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 4 Feb 2022 05:02:26 +0800 Subject: [PATCH 168/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220204=20?= =?UTF-8?q?Play=20the=20Viral=20Wordle=20Game=20in=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220204 Play the Viral Wordle Game in Linux.md --- ...204 Play the Viral Wordle Game in Linux.md | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 sources/tech/20220204 Play the Viral Wordle Game in Linux.md diff --git a/sources/tech/20220204 Play the Viral Wordle Game in Linux.md b/sources/tech/20220204 Play the Viral Wordle Game in Linux.md new file mode 100644 index 0000000000..cb180174d8 --- /dev/null +++ b/sources/tech/20220204 Play the Viral Wordle Game in Linux.md @@ -0,0 +1,102 @@ +[#]: subject: "Play the Viral Wordle Game in Linux" +[#]: via: "https://itsfoss.com/wordle-game-linux/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Play the Viral Wordle Game in Linux +====== + +You might have heard of the viral game Wordle. It’s a game where you have to guess a five letter word in six attempts. The color codes help you with your guessing game. + +![Image courtesy: Today’s Show][1] + +NY Times recently bought this popular word game but you don’t have to be that rich to play it on Linux. + +There are a few open source games inspired by Wordle. Warble is one of them and it is specially developed for desktop Linux. + +### Warble: a Wordle clone for Linux desktop + +Warble was created by [Andrew Vojak][2] on the ‘request’ of elementary OS co-founder. The game has 5,000 possible words and you can play at three difficulty levels. + +![][3] + +Hint is provided to help the new users get familiar with the game. + +#### How do you play Wordle, again? + +It could be overwhelming in the beginning. Let me help you with it. You should start with a random five-letter word. + +If your letter is in the correct position, it is displayed in green. If the letter is in the word but its position is not correct, it is displayed in yellow. The gray color is used to highlight the letters that are not present in the word at all. + +![][4] + +Now, your next step should be to NOT use the letters in gray at all. The bottom screen highlights the letter to help you recall which letter should or should not be used. + +Your guessing game starts now. You try to think of words with the letters that are in correct position while avoiding the gray letters entirely. Remember, you have six attempts to guess the word correctly to win the round. + +![][5] + +You type the words using your computer’s keyboard. When you have typed the five letters, press enter key to submit your choice to attempt the guess. While typing, if you think you want to change the letter, you can press backspace key to remove them, but this is before you hit the enter key. You cannot make a correction after you have submitted the choices for the current row. + +Another thing to note is that you have to enter a real word, not any random combination of five letters. It won’t let you submit your choice if it’s not an actual word. + +![][6] + +You don’t have to finish a round. The game automatically saves so you can close the game anytime and if you open it again, you can pick up from where you left off. + +Another good thing here is that you do not need to be online. There is also no limit on how many times you can play it in a day. The original Wordle games allow only one game play a day. + +### Install Warble on Linux + +Warble was specifically created for elementary OS and it is available in its App Center. + +For other distributions, there is a Flatpak package available. If you have Flatpak support enabled on your distro, you can use the following command to install it: + +``` + + flatpak install https://flatpak.elementary.io/repo/appstream/com.github.avojak.warble.flatpakref + +``` + +The Flatpak downloads almost 600 MB of data to install the game. It almost made me reconsider my decision to install Warble but the gameplay was worth the 600 MB data. + +![][7] + +Once installed, you can start the game by search for it in the system menu. + +### Like the word play? + +Warble is a good game to kill some time. It may also help improve the vocabulary. Somewhat like Scrabble but you don’t need other players to enjoy it. + +If you want to ‘cheat’ or ‘improve your bash scripting’, FreeDOS creator Jim Hall shared [how you can use Linux commands to help you solve Wordle.][8] + +A few years ago, we had another viral game called [2048][9]. It also got ‘cloned’ into several Linux games, including a terminal version. I wonder if we’ll get a terminal version of Wordle. + +Have you played both Wordle and Warble? How does Warble compare to Wordle? Do share your experience in the comment section. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/wordle-game-linux/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/wordle-screenshot.jpg?resize=800%2C420&ssl=1 +[2]: https://github.com/avojak +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/wordle-game-linux.jpg?resize=800%2C557&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/wordle-warble-hint.png?resize=589%2C800&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/wordle-game-play-linux.png?resize=606%2C800&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/entering-gibberish-warble-wordle-linux.png?resize=606%2C800&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/installing-warble-wordle-linux.png?resize=800%2C324&ssl=1 +[8]: https://opensource.com/article/22/1/word-game-linux-command-line +[9]: https://itsfoss.com/2048-game/ From 8d88877339d9b713459cdab848564eb8d67c66ca Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 4 Feb 2022 05:02:39 +0800 Subject: [PATCH 169/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220203=20?= =?UTF-8?q?Build=20your=20own=20container=20on=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220203 Build your own container on Linux.md --- ...20203 Build your own container on Linux.md | 181 ++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 sources/tech/20220203 Build your own container on Linux.md diff --git a/sources/tech/20220203 Build your own container on Linux.md b/sources/tech/20220203 Build your own container on Linux.md new file mode 100644 index 0000000000..fdbc699fd4 --- /dev/null +++ b/sources/tech/20220203 Build your own container on Linux.md @@ -0,0 +1,181 @@ +[#]: subject: "Build your own container on Linux" +[#]: via: "https://opensource.com/article/22/2/build-your-own-container-linux-buildah" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Build your own container on Linux +====== +Buildah is an open source tool for building your own container from +scratch. +![Someone wearing a hardhat and carrying code ][1] + +Containers are run in the [cloud][2]. That's because container technology allows websites and web apps to spawn fresh copies of themselves as demand increases. They're the reason hundreds of millions of people can use popular sites without those sites buckling under the pressure of global traffic. Containers are a Linux technology, meaning that they rely on code (specifically `cgroups` and namespaces) unique to the Linux kernel, so when you run a container, you're running Linux. Using container images from sites like quay.io and dockerhub.io, most people build new containers specific to their application or use case. But that makes some people wonder: If my container comes from a developer building on top of another developer's container, where do _those_ containers come from? Don't worry, it's not turtles all the way down. You can build a container from scratch, and there's a great open source tool called [Buildah][3] to help you do it. + +### Container specifications + +Containers grew out of projects like Linux containers (LXC) and Docker, and it's the [Open Container Initiative (OCI)][4] that maintains the formal specification of what a container is. A properly assembled container that meets the OCI definition runs on any OCI-compliant container engine, such as Podman, Docker, CRI-O, and so on. + +### Installing Buildah + +On Fedora and CentOS, you may have Buildah already installed.  If not, you can install it with your package manager: + + +``` +`$ sudo dnf install buildah` +``` + +On Debian and Debian-based systems: + + +``` +`$ sudo apt install buildah` +``` + +### Configuring Buildah  + +Because Buildah creates containers, configuring your environment for it is the same as configuration for Podman. Whether or not you're using Podman, [configure your system for "rootless" podman][5] before continuing. + +### Building a container out of nothing + +To build a brand-new container, using nobody's prior work as your foundation, you use the special name `scratch` to tell Buildah that you want to create an empty container. The `scratch` designation is not an image name. It's your exemption from using an existing image to base your work on. + + +``` +`$ buildah from scratch` +``` + +This new container, named `working-container` by default, features a small amount of metadata and literally nothing else, and it's secretly running in the background now. You can see it with the `containers` subcommand: + + +``` + + +$ buildah containers +CONTAINER ID  BUILDER  ID  IMAGE NAME   CONTAINER NAME +dafc77921c0c     *         scratch      working-container + +``` + +To run the container, you must first use the `unshare` subcommand (unless you're running Buildah as root): + + +``` +`$ buildah unshare` +``` + +Confirm that your working container has no functionality (failure expected response in this instance): + + +``` + + +$ buildah run working-container sh +ERRO[0000] container_linux.go:349: starting container process caused "exec: \"sh\": executable file not found in $PATH" + +``` + +### Adding to your container + +To add commands to your container, you must mount it first. Container images are stored in your `~/.local` directory by default: + + +``` + + +$ buildah mount working-container +~/.local/share/containers/storage/overlay/b76940e6fe4efad7a0adca3b5399ee12055ddd733bbe273120dcae36a2e6c12f/merged + +``` + +With the container mounted to your `~/.local` directory (or `/var/lib/containers/` in the case of running as root), you can add packages using your package manager. The `--releasever` must match the distribution you're running as you build the container. + + +``` + + +[Fedora]$ sudo dnf install --installroot \ +~/.local/share/containers/storage/overlay/b76940e6fe4efad7a0adca3b5399ee12055ddd733bbe273120dcae36a2e6c12f/merged \ +\--releasever 33 \ +bash coreutils \ +\--setopt install_weak_deps=false -y + +``` + +The exact method of adding packages depends on your distribution and the package manager it uses. For example, on my Slackware desktop, I use `installpkg`: + + +``` + + +[Slack]$ installpkg --root ~/.local/share/containers/storage/overlay/b76940e6fe4efad7a0adca3b5399ee12055ddd733bbe273120dcae36a2e6c12f/merged \ +/tmp/bash-5.0.17-x86_64-1_SMi.txz + +``` + +Now you can run the container and try something simple, like launching a shell: + + +``` + + +$ buildah run working-container bash +# bash --version +GNU bash, version 5.0.17(1)-release (x86_64-redhat-linux-gnu) +Copyright (C) 2019 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later <[http://gnu.org/licenses/gpl.html\>][6] + +This is free software; you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + +``` + +### Configuring your container + +The `buildah config` subcommand gives you access to common attributes such as the default command you want your container to run when it's launched, set environment variables, set the default shell, define the author, architecture, and hostname, and much more. For instance, imagine that you have added a package containing a shell script called `motd.sh`, and you want it to run when the container is launched: + + +``` + + +$ buildah config --author "Seth Kenlon" \ +\--os "Slackware" --shell /bin/bash \ +\--cmd /usr/bin/motd.sh working-container + +``` + +### Distributing your container + +When you're finished constructing your container, you can preserve it as an image using the `commit` subcommand. + + +``` +`$ buildah commit working-container my_image` +``` + +### Build it with Buildah + +Containers sometimes seem magical, but they're not magic. They're built from the ground up, and they're flexible enough that once an image exists, others can use it to build new containers and container images that fill a different niche. It's not necessary to start from scratch, but if you're curious how images start, or you want to try to create an image specific to your requirements, Buildah is the tool to use. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/build-your-own-container-linux-buildah + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/build_structure_tech_program_code_construction.png?itok=nVsiLuag (Someone wearing a hardhat and carrying code ) +[2]: https://opensource.com/tags/cloud +[3]: http://buildah.io +[4]: https://www.opencontainers.org/ +[5]: https://opensource.com/article/21/12/run-containers-without-sudo-podman +[6]: http://gnu.org/licenses/gpl.html\> From 13b60eee2cb4b3cec2b17587e9372907dcc89d75 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 4 Feb 2022 05:03:02 +0800 Subject: [PATCH 170/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220204=20?= =?UTF-8?q?Zorin=20OS=2016=20Education=20is=20a=20Linux=20Distro=20That=20?= =?UTF-8?q?Makes=20Learning=20More=20Accessible?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220204 Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible.md --- ...tro That Makes Learning More Accessible.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 sources/news/20220204 Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible.md diff --git a/sources/news/20220204 Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible.md b/sources/news/20220204 Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible.md new file mode 100644 index 0000000000..f8ca76c029 --- /dev/null +++ b/sources/news/20220204 Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible.md @@ -0,0 +1,94 @@ +[#]: subject: "Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible" +[#]: via: "https://news.itsfoss.com/zorin-os-16-education-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible +====== + +Zorin OS 16 was one of the most impressive distro releases in 2021. You might want to learn more about [Zorin OS 16][1] and [Zorin OS 16 lite][2], if you are curious. + +Now, after a while, the Zorin OS team finally decided to release the Education edition of Zorin OS 16. + +You should expect all the improvements to Zorin OS 16 along with specific modifications to tailor it for education. + +Note that the Education edition of Zorin OS 16 is completely free to download. You get a separate Lite version for older computers as well. + +### Zorin OS 16 Education: What’s New? + +Zorin OS 16 Education focuses on an offline-first learning experience. In other words, it includes a decent collection of educational content that can be accessed without needing internet access. + +To achieve this, Zorin OS 16 includes “[Kolibri][3]“, which is a free and open-source education solution that supports self-paced learning, and sync/sharing over local Wi-Fi networks. + +So, even without internet, you can rely on peer-to-peer connections to share educational content, collaborate, and continue learning without any interruptions. + +School administrators can also create their own curriculum and download ready-made resources from sources like Khan Academy, Open Stax, MIT, and more. + +Of course, the administrator will need internet access to do this. But, once you download the content, it can be easily shared over the local network without internet access, making it possible to distribute educational content. + +In addition to Kolibri, Zorin OS 16 also comes baked with new educational apps, some of them are: + +#### Minder: Visualize Concepts and Notes + +![][4] + +Similar to [Obsidian][5] and [Logseq][6], Minder is a simpler and effective mind mapping tool to help you visualize your notes and ideas to facilitate brainstorming sessions. + +#### Foliate: eBook Viewer + +![][7] + +[Foliate][8] is an impressive e-book reader app for Linux. It should enable students/teachers to enhance the reading experience, and also gives access to public domain books for download, when needed. + +#### OpenBoard: Interactive Whiteboard + +![][9] + +I’ve recently covered [OpenBoard][10] as one of our app highlights. It is a free and open-source whiteboard that should make things interesting for teachers and students as well. + +OpenBoard should help improve the learning process through the tools, and the capabilities of the app to interact with multimedia content. + +#### Minuet: Teaching Music + +Minuet focuses on helping you teach music to your students. You will find visual queues, and ear training exercises on chords, scales, and more. + +#### Other Improvements + +As per your system configuration, you can opt for Zorin OS 16 Education or Zorin OS 16 Education Lite. + +Both the Education editions should result in a faster, and good-looking desktop experience with access to more applications. + +The Zorin OS 16 Education is supported until April 2025. + +You can download Zorin OS 16 Education and the Lite edition from its official website. + +[Zorin OS 16 Education][11] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/zorin-os-16-education-release/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/zorin-os-16-features/ +[2]: https://news.itsfoss.com/zorin-os-16-lite-release/ +[3]: https://learningequality.org/kolibri/ +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzMyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[5]: https://itsfoss.com/obsidian-markdown-editor/ +[6]: https://itsfoss.com/logseq/ +[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI4OSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[8]: https://itsfoss.com/foliate-ebook-viewer/ +[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[10]: https://itsfoss.com/openboard/ +[11]: https://zorin.com/os/education/ From d54f1fd2cf6ce12bdc9fc038fbb62a3007bd5284 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 4 Feb 2022 05:03:14 +0800 Subject: [PATCH 171/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220203=20?= =?UTF-8?q?Peppermint=2011=20Debuts=20With=20Debian=20Linux,=20Drops=20Ubu?= =?UTF-8?q?ntu=20and=20LXDE=20Components?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220203 Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components.md --- ...Linux, Drops Ubuntu and LXDE Components.md | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 sources/news/20220203 Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components.md diff --git a/sources/news/20220203 Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components.md b/sources/news/20220203 Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components.md new file mode 100644 index 0000000000..79702be3cc --- /dev/null +++ b/sources/news/20220203 Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components.md @@ -0,0 +1,105 @@ +[#]: subject: "Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components" +[#]: via: "https://news.itsfoss.com/peppermint-11-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components +====== + +Peppermint OS 11 was one of the [most anticipated releases for 2022][1], and it has finally arrived! + +Not to forget the tragic loss of its lead developer Mark Greaves in 2020, Peppermint OS lost one of its most significant contributors. + +Now, after almost two years, Peppermint 11 is here! It is not just an ordinary upgrade, but it looks like Peppermint 11 is the first release with Debian as its base, ditching Ubuntu. + +Let me highlight all the key details of the release below. + +### Peppermint 11: What’s New? + +The primary highlight of the release is dropping Ubuntu to use Debian 64-bit as its base. + +Technically, it is based on the stable branch of [Debian 11 ‘Bullseye’][2]. So, you should expect the latest improvements to Debian along with Peppermint OS 11. + +In addition to the new base, there are a few other changes that include: + +#### XFCE 4.16.2 with No LXDE Components + +![][3] + +Peppermint OS utilized the XFCE desktop environment with LXDE components to provide a hybrid experience. + +Peppermint 11 has removed all the LXDE components to focus on providing an XFCE-powered desktop experience. + +#### Calamares Installer Replaces Ubiquity + +![][4] + +To improve the installation process, Peppermint 11 uses the modern Calamares installer. + +#### New Welcome Tour App + +![][5] + +To give you a head start, Peppermint OS now includes a new Welcome application that allows you to learn more about the system/components used and install the software needed to get started. + +For instance, you do not have a default web browser pre-installed with Peppermint 11. You can quickly launch the software package selector and install browsers like Firefox, GNOME, Tor, Falkon, and Chromium. + +![][6] + +#### New Peppermint Hub + +The new Peppermint Hub keeps things tidy by combining the settings and control center to help you manage the system easily. + +![][7] + +#### New Applications + +The distribution includes a terminal-based ad-blocker, i.e., [hblock][8] that can be enabled or disabled when needed. + +![][9] + +Nemo replaces Thunar as the default file manager, and it should feel familiar and can come in handy for many users. + +#### Other Improvements + +Overall, with a new base, and updated Linux Kernel 5.10, Peppermint 11 should be an exciting choice to try. + +Some other changes in the [release notes][10] include: + + * A minimum set of desktop wallpaper is included during installation. Download additional wallpaper _Welcome to Peppermint_. + * A streamlined set of icons and XFCE themes are included. + + + +[Peppermint OS 11][11] + +_So, now that Peppermint OS 11 is here, will you consider trying it on your primary system? Have you tried it yet? Let me know your thoughts in the comments below._ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/peppermint-11-release/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/linux-distro-releases-2022/ +[2]: https://news.itsfoss.com/debian-11-feature/ +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUxNyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQyNyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjYzNSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU4MiIgd2lkdGg9IjcxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU2NSIgd2lkdGg9Ijc2NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[8]: https://github.com/hectorm/hblock +[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU2NiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[10]: https://peppermintos.com/2022/02/peppermint-release-notes/ +[11]: https://peppermintos.com/guide/downloading/ From 38611a008e9f4ecc0eaa685e7b2e3df7968d002d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 4 Feb 2022 10:40:37 +0800 Subject: [PATCH 172/334] ATRP @wxy https://linux.cn/article-14240-1.html --- ...tro That Makes Learning More Accessible.md | 98 +++++++++++++++++++ ...tro That Makes Learning More Accessible.md | 94 ------------------ 2 files changed, 98 insertions(+), 94 deletions(-) create mode 100644 published/20220204 Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible.md delete mode 100644 sources/news/20220204 Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible.md diff --git a/published/20220204 Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible.md b/published/20220204 Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible.md new file mode 100644 index 0000000000..343ea893fd --- /dev/null +++ b/published/20220204 Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible.md @@ -0,0 +1,98 @@ +[#]: subject: "Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible" +[#]: via: "https://news.itsfoss.com/zorin-os-16-education-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14240-1.html" + +Zorin OS 16 教育版:一个让学习更容易的 Linux 发行版 +====== + +> Zorin OS 16 教育版的重点是离线学习和新的教育应用程序,为学校和学生提供帮助。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/zorin-16-education-release.png?w=1200&ssl=1) + +Zorin OS 16 是 2021 年最令人印象深刻的发行版之一。你或许想先了解一下 [Zorin OS 16][1] 和 [Zorin OS 16 精简版][2] 的信息。 + +现在,经过一段时间,Zorin OS 团队终于决定发布 Zorin OS 16 教育版。 + +可以预期包含 Zorin OS 16 的所有改进,以及为教育而量身定做的具体修改。 + +请注意,教育版的 Zorin OS 16 是完全免费下载的。对于旧电脑,你还可以使用精简教育版。 + +### Zorin OS 16 教育版有什么新内容? + +Zorin OS 16 教育版的重点是以离线为先的学习体验。换句话说,它包括一个合格的教育内容集,不需要上网就可以访问。 + +为了实现这一目标,Zorin OS 16 包括了 [Kolibri][3],这是一个自由开源的教育解决方案,支持自定进度的学习,并通过本地 Wi-Fi 网络进行同步/共享。 + +因此,即使没有互联网,你也可以依靠点对点的连接来分享教育内容,进行协作,并继续学习,不受任何干扰。 + +学校管理者还可以创建自己的课程,并从可汗学院、Open Stax、麻省理工学院等来源下载现成的资源。 + +当然,管理员需要互联网接入才能做到这一点。但是,一旦你下载了内容,就可以在没有互联网接入的情况下轻松地在本地网络上分享,从而使分发教育内容成为可能。 + +除了 Kolibri 之外,Zorin OS 16 还出炉了新的教育应用程序,其中一些是: + +#### Minder:将想法和笔记可视化 + +![][4] + +与 [Obsidian][5] 和 [Logseq][6] 类似,Minder 是一个更简单有效的思维导图工具,帮助你将笔记和想法可视化,而进行头脑风暴会议。 + +#### Foliate:电子书阅读器 + +![][7] + +[Foliate][8] 是一个令人印象深刻的 Linux 电子书阅读器应用。它应该能让学生/教师提高阅读体验,也能在需要时提供公共领域书籍的下载。 + +#### OpenBoard:交互式白板 + +![][9] + +我最近报道了 [OpenBoard][10],作为我们的应用亮点之一。它是一个自由开源的白板,应该会让老师和学生也感到有趣。 + +OpenBoard 应该有助于通过工具以及应用程序与多媒体内容互动的能力来改善学习过程。 + +#### Minuet:音乐教学 + +Minuet 专注于帮助你向学生教授音乐。你会发现视觉队列,以及和弦、音阶等方面的练耳练习。 + +#### 其他改进措施 + +根据你的系统配置,可以选择 Zorin OS 16 教育版或 Zorin OS 16 精简教育版。 + +这两个教育版应该会带来更快、更漂亮的桌面体验,可以访问更多的应用程序。 + +Zorin OS 16 教育版支持到 2025 年 4 月。 + +你可以从其官方网站下载 Zorin OS 16 教育版及其精简版。 + +- [Zorin OS 16 教育版][11] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/zorin-os-16-education-release/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/zorin-os-16-features/ +[2]: https://news.itsfoss.com/zorin-os-16-lite-release/ +[3]: https://learningequality.org/kolibri/ +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/minder.png?resize=1568%2C870&ssl=1 +[5]: https://itsfoss.com/obsidian-markdown-editor/ +[6]: https://itsfoss.com/logseq/ +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/foliate.png?w=1300&ssl=1 +[8]: https://itsfoss.com/foliate-ebook-viewer/ +[9]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/openboard.png?w=900&ssl=1 +[10]: https://linux.cn/article-14212-1.html +[11]: https://zorin.com/os/education/ diff --git a/sources/news/20220204 Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible.md b/sources/news/20220204 Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible.md deleted file mode 100644 index f8ca76c029..0000000000 --- a/sources/news/20220204 Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible.md +++ /dev/null @@ -1,94 +0,0 @@ -[#]: subject: "Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible" -[#]: via: "https://news.itsfoss.com/zorin-os-16-education-release/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible -====== - -Zorin OS 16 was one of the most impressive distro releases in 2021. You might want to learn more about [Zorin OS 16][1] and [Zorin OS 16 lite][2], if you are curious. - -Now, after a while, the Zorin OS team finally decided to release the Education edition of Zorin OS 16. - -You should expect all the improvements to Zorin OS 16 along with specific modifications to tailor it for education. - -Note that the Education edition of Zorin OS 16 is completely free to download. You get a separate Lite version for older computers as well. - -### Zorin OS 16 Education: What’s New? - -Zorin OS 16 Education focuses on an offline-first learning experience. In other words, it includes a decent collection of educational content that can be accessed without needing internet access. - -To achieve this, Zorin OS 16 includes “[Kolibri][3]“, which is a free and open-source education solution that supports self-paced learning, and sync/sharing over local Wi-Fi networks. - -So, even without internet, you can rely on peer-to-peer connections to share educational content, collaborate, and continue learning without any interruptions. - -School administrators can also create their own curriculum and download ready-made resources from sources like Khan Academy, Open Stax, MIT, and more. - -Of course, the administrator will need internet access to do this. But, once you download the content, it can be easily shared over the local network without internet access, making it possible to distribute educational content. - -In addition to Kolibri, Zorin OS 16 also comes baked with new educational apps, some of them are: - -#### Minder: Visualize Concepts and Notes - -![][4] - -Similar to [Obsidian][5] and [Logseq][6], Minder is a simpler and effective mind mapping tool to help you visualize your notes and ideas to facilitate brainstorming sessions. - -#### Foliate: eBook Viewer - -![][7] - -[Foliate][8] is an impressive e-book reader app for Linux. It should enable students/teachers to enhance the reading experience, and also gives access to public domain books for download, when needed. - -#### OpenBoard: Interactive Whiteboard - -![][9] - -I’ve recently covered [OpenBoard][10] as one of our app highlights. It is a free and open-source whiteboard that should make things interesting for teachers and students as well. - -OpenBoard should help improve the learning process through the tools, and the capabilities of the app to interact with multimedia content. - -#### Minuet: Teaching Music - -Minuet focuses on helping you teach music to your students. You will find visual queues, and ear training exercises on chords, scales, and more. - -#### Other Improvements - -As per your system configuration, you can opt for Zorin OS 16 Education or Zorin OS 16 Education Lite. - -Both the Education editions should result in a faster, and good-looking desktop experience with access to more applications. - -The Zorin OS 16 Education is supported until April 2025. - -You can download Zorin OS 16 Education and the Lite edition from its official website. - -[Zorin OS 16 Education][11] - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/zorin-os-16-education-release/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://news.itsfoss.com/zorin-os-16-features/ -[2]: https://news.itsfoss.com/zorin-os-16-lite-release/ -[3]: https://learningequality.org/kolibri/ -[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzMyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[5]: https://itsfoss.com/obsidian-markdown-editor/ -[6]: https://itsfoss.com/logseq/ -[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI4OSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[8]: https://itsfoss.com/foliate-ebook-viewer/ -[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[10]: https://itsfoss.com/openboard/ -[11]: https://zorin.com/os/education/ From 6af4d5fb7da65a5a1e3a7258f26b3eabbd791898 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 5 Feb 2022 05:02:29 +0800 Subject: [PATCH 173/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220205=20?= =?UTF-8?q?Brave=20vs=20Vivaldi:=20Which=20Chromium-Based=20Browser=20is?= =?UTF-8?q?=20Better=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md --- ... Which Chromium-Based Browser is Better.md | 192 ++++++++++++++++++ 1 file changed, 192 insertions(+) create mode 100644 sources/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md diff --git a/sources/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md b/sources/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md new file mode 100644 index 0000000000..1086278609 --- /dev/null +++ b/sources/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md @@ -0,0 +1,192 @@ +[#]: subject: "Brave vs Vivaldi: Which Chromium-Based Browser is Better?" +[#]: via: "https://itsfoss.com/brave-vs-vivaldi/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Brave vs Vivaldi: Which Chromium-Based Browser is Better? +====== + +Brave is undoubtedly an impressive open-source web browser. + +It is also one of the [best browsers available for Linux][1]. Vivaldi, on the other hand, has been making the rounds among Linux users for its customizability, and tab management features. + +Is Vivaldi worth a try? Is it open-source? Why should you prefer Brave over it? Or should you consider using Vivaldi? + +Here, I shall answer all those questions, comparing both of them side-by-side. + +### User Interface + +![][2] + +Both the web browser offer different user experiences, even if they are based on open-source Chromium code. + +Brave focuses on providing a neat look, while Vivaldi try their best to provide more functionality. + +If you do not want a lot of distractions, and just want to focus on web browsing, Brave should give you a clean experience. + +Even then, Brave gives you a lot of control to customize the existing interface. For instance, the ability to use a wide address bar, show full URLs, show tab search button, show/hide home button, and more. + +![][3] + +When it comes to themes, Brave offers light and dark out of the box but supports themes available in the Chrome Store. + +In contrast, Vivaldi might look a bit filled up out of the box with a quick access panel, search bar to the right of the address bar, and more elements at the bottom of the browser. + +Vivaldi also features more themes by default. Not to forget, you can seamlessly edit/customize the theme, which you cannot in Brave. + +![][4] + +For someone looking for a straightforward and customizable web browser, Brave is an easy recommendation. And, for users wanting a rich user interface with a variety of options accessible, Vivaldi should be a good choice. + +### Open Source vs 99% Open-Source + +Brave is completely open-source and free to use. You can find its code at GitHub and fork it for experiments and tests, if required. + +Vivaldi is err.. almost open-source. The entire browser is based on Chromium, and its code is available in its official site. However, the user interface of the browser is proprietary. + +To ensure that they provide you a unique user experience and keep their control over it, Vivaldi decided to keep the UI closed-source. + +However, they do explain it well in a [blog post][5]. + +### Tab Management + +![][6] + +For most users, this may not be a comparison criterion. But, considering Vivaldi is popular for its tab management ability, it is worth pointing it out. + +Tab management comes in handy when you have loads of tabs active. If you have a handful of tabs in use, you do not need to both about tab management capabilities, but it can still be useful. + +With Vivaldi, you can have two-level stacked tabs together, and have several stacked tab groups. You can also reposition the tabs from the top of the browser to the left/right/bottom side of the browser. + +The default behavior of the tabs can be managed, stacked tabs can be changed into accordion-style, the width can be adjusted, the buttons can be customized to be visible/hide, and lots more. + +Brave also lets you group tabs, assign color, name them, and expand/collapse to easily manage several tab groups. + +![brave tab management][7] + +However, you do not get to see any two-level tab stack functionality nor the ability to customize the tab behavior like you get to see in Vivaldi. + +Moreover, the tab management with Brave (with dark mode on) looks a bit messy in my opinion. + +Sure, you can decide what the new tab page shows, but that’s not really as useful as the options available in Vivaldi. + +So, Vivaldi is a clear winner when it comes to tab management. But, it depends on your requirements. If you do not juggle between multiple tabs, you probably do not need anything special. + +### Other Features + +While both offer all the essential features, you will find some unique offerings. + +Brave supports IPFS protocol to help you fight against censorship. You also get the ability to use Brave Rewards, and get tokens for the privacy-friendly ads pushed by Brave. These rewards can help you contribute back to websites as tips. The tokens can also be used to purchase as per the available merchant partners with Brave. + +![][8] + +Brave Search is the default search engine with Brave web browser. Even though the search engine is not open-source, the features offered by Brave Search make it an interesting alternative to other popular private search engines. + +When it comes to Vivaldi, it offers a range of extra features like the web panel in the sidebar, pomodoro, page tiling, calendar integration, email integration, RSS feed, and more. + +The sidebar (or web panel) lets you quickly access things without needing to open a separate tab or window, which should let you easily multitask without losing focus on the active tab. + +![][9] + +You also get an in-built translation feature that gets rid of the need to use Google Translate in case you do not understand a language across the web. + +In addition to all other features, it lets you tweak keyboard shortcuts, mouse gestures, and a variety of quick commands. You do not find anything like this in Brave. + +So, I’d say Vivaldi is a comfortable option for keyboard shortcut users. + +### The Privacy Angle + +![][10] + +Vivaldi focuses on providing a privacy-friendly web experience, just like Brave. You get native ad/tracking protection and a dedicated privacy menu to adjust your experience. + +As you can notice in the screenshot above, you can enable/disable the Google services being used for security, hide typed history, change the behavior of saving browsing history, and tweak the default website permissions. + +![][11] + +Brave also gives you a similar level of control, and some advanced options like changing the WebRTC IP policy, and push messaging service controls. + +If you are just looking for anti-tracker and ad blocking capabilities, both browsers offer that. But, if you are worried about something specific, you might want to explore through the settings to be able to decide it for yourself. + +### Performance + +![][12] + +As usual, I tested the browsers using some of the popular benchmark tests like: [JetStream 2][13], [Speedometer 2.0][14], and [Basemark Web 3.0][15]. + +I utilized Pop!_OS 21.10 as my Linux distribution, and the browser versions tested were **Vivaldi 5.0.2497.51 stable** and Brave **97.0.4692.99**. + +In these synthetic benchmarks, Brave turned out to be a tad bit faster overall, and Vivaldi managed to score better for the Speedometer 2.0 test. + +To give you an idea, I had nothing running in the background, except the browser on my PC powered by **Intel i5-11600k @4.7 GHz, 32 GB 3200 MHz RAM, and 1050ti Nvidia Graphics** + +So, both browsers should be good enough for a snappy web experience. + +### Installation + +Vivaldi offers the latest DEB/RPM packages on its [official website][16] and also provides support for ARM devices. You do not find any Flatpak or Snap packages for Vivaldi in the stable channel for the time being. + +![][17] + +Brave, on the other hand, does not directly offer these packages on its website. You will have to [follow a set of commands in the terminal][18] to install it, which is the recommended way of installation. + +![][19] + +You can find a [Snap package][20], but it is not the best method as mentioned by them officially. + +In any case, you can refer to our [Brave installation guide for Fedora][21] to get help. + +### The Final Verdict + +When it comes to open-source browsers, Brave gets the edge as its entire source code is available. However, the commitment to a private web experience, and the focus on Linux as a platform by Vivaldi, is impressive. + +Feature-wise, the tab management ability on Vivaldi can be a compelling option to help you dabble between multiple tabs. + +Note that the experience may not be excellent with dual-monitor systems (as is my case). As of now, Vivaldi seems to stutter and becomes unresponsive with my dual-monitor system, which didn’t happen with a single display. + +Brave does not seem to suffer from this issue. So, you might want to test things out in such cases. + +Brave should provide a clean and fast experience, and Vivaldi can be a good choice for users looking for more customizability and a rich user interface. + +I’d go with Vivaldi considering the tab management feature saves a lot of time, but then again I’ve switched to Firefox until it works flawlessly with dual-monitors. + +What would you prefer? Let me know in the comments down below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/brave-vs-vivaldi/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-browsers-ubuntu-linux/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-vivaldi-ui.png?resize=784%2C600&ssl=1 +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-appearance-settings.png?resize=800%2C519&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/vivaldi-themes-default.png?resize=800%2C580&ssl=1 +[5]: https://help.vivaldi.com/desktop/privacy/is-vivaldi-open-source/ +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/vivaldi-tab-stack.png?resize=732%2C551&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-tab-management.png?resize=800%2C523&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-search-browser.png?resize=749%2C600&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/vivaldi-other-features.png?resize=800%2C589&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/vivaldi-privacy.png?resize=800%2C560&ssl=1 +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/brave-privacy-settings.png?resize=800%2C618&ssl=1 +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/vivaldi-brave-benchmarks.png?resize=800%2C450&ssl=1 +[13]: https://webkit.org/blog/8685/introducing-the-jetstream-2-benchmark-suite/ +[14]: https://webkit.org/blog/8063/speedometer-2-0-a-benchmark-for-modern-web-app-responsiveness/ +[15]: https://web.basemark.com/ +[16]: https://vivaldi.com/download/ +[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/vivaldi-download.png?resize=800%2C408&ssl=1 +[18]: https://brave.com/linux/#linux +[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/brave-install-on-linux.png?resize=800%2C358&ssl=1 +[20]: https://snapcraft.io/brave +[21]: https://itsfoss.com/install-brave-browser-fedora/ From a49007d92f07158f11b831d9c0e9f9a0d385fce1 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 5 Feb 2022 05:02:42 +0800 Subject: [PATCH 174/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220204=20?= =?UTF-8?q?How=20we=20hired=20an=20open=20source=20developer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220204 How we hired an open source developer.md --- ...4 How we hired an open source developer.md | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 sources/tech/20220204 How we hired an open source developer.md diff --git a/sources/tech/20220204 How we hired an open source developer.md b/sources/tech/20220204 How we hired an open source developer.md new file mode 100644 index 0000000000..bfdefe20a0 --- /dev/null +++ b/sources/tech/20220204 How we hired an open source developer.md @@ -0,0 +1,104 @@ +[#]: subject: "How we hired an open source developer" +[#]: via: "https://opensource.com/article/22/2/how-we-hired-open-source-developer" +[#]: author: "Mike Bursell https://opensource.com/users/mikecamel" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How we hired an open source developer +====== +My team opted out of the standard algorithm coding exercise for a +process that yielded more relevant results. +![people in different locations who are part of the same team][1] + +As the CEO and co-founder of [Profian][2], a start-up security company, I've been part of our effort to hire developers to work on [Enarx][3], a security project that deals with confidential computing, written almost exclusively in [Rust][4] (with a bit of Assembly). Profian has now found all the people it was looking for in this search, with a couple of developers due to start in the next few weeks. However, new contributors are absolutely welcome to Enarx, and if things continue to go well, the company will definitely want to hire more folks in the future. + +Hiring people is not easy, and Profian had a set of specialized requirements that made the task even more difficult. I thought it would be useful and interesting for the community to share how we approached the problem. + +### What were we looking for? + +These are the specialized requirements I'm talking about: + + * **Systems programming:** Profian mainly needs people who are happy programming at the systems layer. This is pretty far down the stack, with lots of interactions directly with hardware or the OS. To create client-server pieces, for instance, we have to write quite a lot of the protocols, manage the crypto, and so forth, and the tools for this aren't all very mature (see "Rust" below). + + * **Rust:** Almost all of the project is written in Rust, and what isn't is written in Assembly language (currently exclusively x86, though that may change as we add more platforms). Rust is new, cool, and exciting, but it's still quite young, and some areas don't have all the support you might like or aren't as mature as you'd hope—everything from cryptography through multithreading libraries and compiler/build infrastructure. + + * **Distributed team:** Profian is building a team of folks where we can find them. Profian has developers in Germany, Finland, the Netherlands, North Carolina (US), Massachusetts (US), Virginia (US), and Georgia (US). I'm in the United Kingdom, our community manager is in Brazil, and we have interns in India and Nigeria. We knew from the beginning that we wouldn't have everyone in one place, and this required people who would be able to communicate and collaborate with people via video, chat, and (at worst) email. + + * **Security:** Enarx is a security project. Although we weren't specifically looking for security experts, we need people who can think and work with security top of mind and design and write code that is applicable and appropriate for the environment. + + * **Git:** All of our code is stored in git (mainly [GitHub][5], with a bit of GitLab thrown in). so much of our interaction around code revolves around git that anybody joining us would need to be very comfortable using it as a standard tool in their day-to-day work. + + * **Open source:** Open source isn't just a licence; it's a mindset and, equally important, a way of collaborating. A great deal of open source software is created by people who aren't geographically co-located and who might not even see themselves as a team. We needed to know that the people we hired, while gelling as a close team within the company, would be able to collaborate with people outside the organisation and embrace Profian's "open by default" culture, not just for code, but for discussions, communications, and documentation. + + + + +### How did we find them? + +As I've mentioned elsewhere, [recruiting is hard][6]. Profian used a variety of means to find candidates, with varying levels of success: + + * LinkedIn job adverts + * LinkedIn searches + * Language-specific discussion boards and hiring boards (e.g., Reddit) + * An external recruiter (shout out to Gerald at [Interstem][7]) + * Word-of-mouth/personal recommendations + + + +It's difficult to judge between these sources in terms of quality, but without an external recruiter, we'd certainly have struggled with quantity (and we had some great candidates from that pathway, too). + +### How did we select them? + +We needed to measure all of the candidates against all of the requirements noted above, but not all of them were equal. For instance, although we were keen to hire Rust programmers, someone with strong C/C++ skills at the systems level would be able to pick up Rust quickly enough to be useful. On the other hand, a good knowledge of using git was absolutely vital, as we couldn't spend time working with new team members to bring them up to speed on our way of working. + +A strong open source background was, possibly surprisingly, not a requirement, but the mindset to work in that sort of model was, and anyone with a history of open source involvement is likely to have a good knowledge of git. The same goes for the ability to work in a distributed team: So much of open source is distributed that involvement in almost any open source community was a positive indicator. Security, we decided, was a "nice-to-have" qualification. + +We wanted to keep the process simple and quick. Profian doesn't have a dedicated HR or People function, and we're busy trying to get code written. This is what we ended up with (with slight variations), and we tried to complete it within 1-2 weeks: + + 1. Initial CV/resume/GitHub/GitLab/LinkedIn review to decide whether to interview + 2. 30-40 minute discussion with me as CEO, to find out if they might be a good cultural fit, to give them a chance to find out about us, and to get an idea if they were as technically adept as they appeared in Step 1 + 3. Deep dive technical discussion led by Nathaniel, usually with me there + 4. Chat with other members of the team + 5. Coding exercise + 6. Quick decision (usually within 24 hours) + + + +The coding exercise was key, but we decided against the usual approach. Our view was that a pure "algorithm coding" exercise beloved by many tech companies was pretty much useless for what we wanted: to find out whether a candidate could quickly understand a piece of code, fix some problems, and work with the team to do so. We created a GitHub repository with some almost-working Rust code in it (in fact, we ended up using two, with one for people a little higher up the stack), then instructed candidates to fix it, perform some git-related processes on it, and improve it slightly, adding tests along the way. + +An essential part of the test was to get candidates to interact with the team via our chat room(s). We scheduled 15 minutes on a video call for setup and initial questions, two hours for the exercise ("open book" – as well as talking to the team, candidates were encouraged to use all resources available to them on the Internet), followed by a 30-minute wrap-up session where the team could ask questions, and the candidate could reflect on the task. This conversation, combined with the chat interactions during the exercise, allowed us to get an idea of how well the candidate was able to communicate with the team. Afterwards, the candidate would drop off the call, and we'd most often decide within 5-10 minutes whether we wanted to hire them. + +This method generally worked very well. Some candidates struggled with the task, some didn't communicate well, some failed to do well with the git interactions – these were the people we didn't hire. It doesn't mean they're not good coders or might not be a good fit for the project or the company later on, but they didn't meet the criteria we need now. Of the developers we hired, the level of Rust experience and need for interaction with the team varied, but the level of git expertise and their reactions to our discussions afterwards were always sufficient for us to decide to take them. + +### Reflections + +On the whole, I don't think we'd change a huge amount about the selection process—though I'm pretty sure we could do better with the search process. The route through to the coding exercise allowed us to filter out quite a few candidates, and the coding exercise did a great job of helping us pick the right people. Hopefully, everyone who's come through the process will be a great fit and produce great code (and tests and documentation and …) for the project. Time will tell! + +* * * + +This article originally appeared on [Alice, Eve and Bob – a security blog][8] and is republished with permission. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/how-we-hired-open-source-developer + +作者:[Mike Bursell][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mikecamel +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/connection_people_team_collaboration.png?itok=0_vQT8xV (people in different locations who are part of the same team) +[2]: https://profian.com/ +[3]: https://enarx.dev/ +[4]: https://opensource.com/article/21/3/rust-programmer +[5]: https://github.com/enarx/ +[6]: https://aliceevebob.com/2021/11/09/recruiting-is-hard/ +[7]: https://www.interstem.co.uk/ +[8]: https://aliceevebob.com/ From bc9234a0516b56492d18a545b7976bdc52235f8e Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 5 Feb 2022 05:04:15 +0800 Subject: [PATCH 175/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220204=20?= =?UTF-8?q?Oldest=20Active=20Linux=20Distro=20Slackware=20Finally=20Releas?= =?UTF-8?q?es=20Version=2015?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220204 Oldest Active Linux Distro Slackware Finally Releases Version 15.md --- ...o Slackware Finally Releases Version 15.md | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 sources/news/20220204 Oldest Active Linux Distro Slackware Finally Releases Version 15.md diff --git a/sources/news/20220204 Oldest Active Linux Distro Slackware Finally Releases Version 15.md b/sources/news/20220204 Oldest Active Linux Distro Slackware Finally Releases Version 15.md new file mode 100644 index 0000000000..cc9e69b873 --- /dev/null +++ b/sources/news/20220204 Oldest Active Linux Distro Slackware Finally Releases Version 15.md @@ -0,0 +1,127 @@ +[#]: subject: "Oldest Active Linux Distro Slackware Finally Releases Version 15" +[#]: via: "https://news.itsfoss.com/slackware-15-release/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Oldest Active Linux Distro Slackware Finally Releases Version 15 +====== + +Rejoice! Linux fans will be pleased to know that the legendary distro, Slackware, has received a new release after a long time. For those unaware, Slackware’s latest version was released way back in 2016. + +The entire Linux community was thrilled about it when the devs announced the plans for Slackware 15.0 in February, last year (2021). + +The devs had made rapid progress in the development of Slackware Linux 15.0 in the past year, starting with an alpha release at the beginning of the year. It took a while considering its last release candidate release, but it is here now! + +Let’s take a look at what’s new with Slackware 15.0 + +### What’s New in Slackware 15.0? + +![][1] + +As mentioned before, Slackware 15.0 has received many changes. Not to forget, it involved a beta release and two release candidate (RC) announcements before the final release. + +If you have been following our coverage, you may have had come across our [beta release][2] coverage, back in April. + +There were a few things that weren’t revealed with its beta/RC releases. So, here, we mention everything important about it. + +#### Linux Kernel 5.15 LTS + +The major highlight of Slackware 15 is the addition of the latest [Linux Kernel 5.15 LTS][3]. This is a big jump from Linux Kernel 5.10 LTS that we noticed in the beta release. + +![][4] + +Interestingly, the Slackware team tested hundreds of Linux Kernel versions before settling on Linux Kernel 5.15.19. The release note mentions: + +> We’ve actually built over 400 different Linux kernel versions over the years it took to finally declare Slackware 15.0 stable (by contrast, we tested 34 kernel versions while working on Slackware 14.2). We finally ended up on kernel version 5.15.19 after Greg Kroah-Hartman confirmed that it would get long-term support until at least October 2023 (and quite probably for longer than that). + +In case you are curious, Linux Kernel 5.15 brings in updates like enhanced NTFS driver support and improvements for Intel/AMD processors and Apple’s M1 chip. It also adds initial support for Intel 12th gen processors. + +Overall, with Linux Kernel 5.15 LTS, you should get a good hardware compatibility result for the oldest active Linux distro. + +The Linux Kernel is offered in two flavors, one baked in with drivers which does not need initrd and the relies on initrd to load the kernel modules. The release notes mention more about it: + +> As usual, the kernel is provided in two flavors, generic and huge. The huge kernel contains enough built-in drivers that in most cases an initrd is not needed to boot the system. The generic kernels require the use of an initrd to load the kernel modules needed to mount the root filesystem. Using a generic kernel will save some memory and possibly avoid a few boot time warnings. I’d strongly recommend using a generic kernel for the best kernel module compatibility as well. + +#### KDE Plasma 5.23 and Xfce 4.16 + +Speaking about KDE, you should find KDE Plasma packages updated to 5.23 while KDE Frameworks was updated to version 5.88. + +[KDE Plasma 5.23][5] is KDE’s 25th-anniversary edition release that included UI improvements, and a wide range of subtle changes to improve the user experience. + +In addition to this, Slackware 15 also comes with Xfce 4.16 as one of the desktop environment options. + +#### Support for PipeWire and Wayland + +As an alternative to PulseAudio, the support for PipeWire was added to Slackware 15. + +And, for users who want to get away from X11, the support for Wayland also landed with this release. + +#### 32-bit Support + +Considering Slackware is one of the [suitable Linux distributions for 32-bit systems][6], the latest version features specific kernel versions to support it. + +Technically, there are SMP and non-SMP kernels for single-core and multi-core processors. + +The SMP kernel is recommended for better performance and memory management, but if you have a processor older than the Pentium III, the non-SMP kernel should come in handy. + +#### Other Improvements + +![][7] + +Some technical upgrades include GCC compiler being upgraded to version 11.2.0. Quite a lot of security and bugs were also addressed. + +The announcement furthermore said that the devs were focusing on updating Python Markdown to version 3.3.4 to fix the Samba build. + +Other essential packages and apps like Network Manager, OpenSSH, Krita, Falkon browser and Ocular also received upgrades. Mozilla Firefox and Thunderbird were updated to their latest available packages as well. + +You can check out the [official changelog][8] if you want to get all the technical details for this release. Some important ones include: + + * Slackware pkgtools received improvements to make the software installation experience hassle-free, without parallel collisions. + * Slackware 15 includes a “make_world.sh” script for the first time to help rebuild the OS from source code. + * More scripts have been added to easily rebuild the installer and kernel packages. + * Dropped Qt4 and moved to Qt 5. + * Added support for Privileged Access Management (PAM) to support newer projects that did not support shadow passwords. + + + +It is important to note that you cannot easily upgrade from Slackware 14.2. So, it is best to perform a fresh installation. + +[Slackware 15][9] + +In either case, you should keep a backup of your data, and can try to follow the [official upgrade instructions][10] if you are not interested to install using the new ISO. + +### Wrapping Up + +I’m excited to see Slackware get a new release, considering the fact that it is still the oldest active Linux distro. + +While it is still a recommendation for experienced users or tinkerers, the latest Slackware 15.0 supports UEFI and old systems. If you are looking for an adventure and want a unique Linux distro for your desktop, you can try Slackware 15. + +_Will you be testing out Slackware 15.0? What do you think lies ahead for the future of Slackware?_ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/slackware-15-release/ + +作者:[Rishabh Moharir][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lujun9972 +[1]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ0MCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[2]: https://news.itsfoss.com/slackware-15-beta-release/ +[3]: https://news.itsfoss.com/linux-kernel-5-15-release/ +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU3NCIgd2lkdGg9Ijc3NSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[5]: https://news.itsfoss.com/kde-plasma-5-23-release/ +[6]: https://itsfoss.com/32-bit-linux-distributions/ +[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQxMiIgd2lkdGg9IjY3OSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[8]: http://www.slackware.com/changelog/current.php?cpu=x86_64 +[9]: http://www.slackware.com/ +[10]: https://ftp.osuosl.org/pub/slackware/slackware64-15.0/UPGRADE.TXT From 7c7ac2e18c0d3b1a8f97f8ec955ea91e7e01ef27 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 5 Feb 2022 05:04:22 +0800 Subject: [PATCH 176/334] add done: 20220204 Oldest Active Linux Distro Slackware Finally Releases Version 15.md --- sources/tech/20220205 .md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 sources/tech/20220205 .md diff --git a/sources/tech/20220205 .md b/sources/tech/20220205 .md new file mode 100644 index 0000000000..3c0ef55c7d --- /dev/null +++ b/sources/tech/20220205 .md @@ -0,0 +1,16 @@ +[#]: subject: "" +[#]: via: "https://www.debugpoint.com/2022/02/best-gnome-apps-part-4/" +[#]: author: "[Arindam] + +Posted by Arindam + +Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + + +====== + From ad6b99aae3bd802d6940e45416ad5cf982f8baf5 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sat, 5 Feb 2022 12:13:12 +0800 Subject: [PATCH 177/334] Delete 20220205 .md --- sources/tech/20220205 .md | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 sources/tech/20220205 .md diff --git a/sources/tech/20220205 .md b/sources/tech/20220205 .md deleted file mode 100644 index 3c0ef55c7d..0000000000 --- a/sources/tech/20220205 .md +++ /dev/null @@ -1,16 +0,0 @@ -[#]: subject: "" -[#]: via: "https://www.debugpoint.com/2022/02/best-gnome-apps-part-4/" -[#]: author: "[Arindam] - -Posted by Arindam - -Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - - -====== - From af54db25050a75f94e423796a657b266592e70c8 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sat, 5 Feb 2022 12:13:42 +0800 Subject: [PATCH 178/334] Rename sources/tech/20220204 How we hired an open source developer.md to sources/talk/20220204 How we hired an open source developer.md --- .../20220204 How we hired an open source developer.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20220204 How we hired an open source developer.md (100%) diff --git a/sources/tech/20220204 How we hired an open source developer.md b/sources/talk/20220204 How we hired an open source developer.md similarity index 100% rename from sources/tech/20220204 How we hired an open source developer.md rename to sources/talk/20220204 How we hired an open source developer.md From f34f2c77d79a9b82dfd80b9a66a656540eb24afd Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 5 Feb 2022 12:23:40 +0800 Subject: [PATCH 179/334] A --- ...Active Linux Distro Slackware Finally Releases Version 15.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220204 Oldest Active Linux Distro Slackware Finally Releases Version 15.md b/sources/news/20220204 Oldest Active Linux Distro Slackware Finally Releases Version 15.md index cc9e69b873..4755d171ba 100644 --- a/sources/news/20220204 Oldest Active Linux Distro Slackware Finally Releases Version 15.md +++ b/sources/news/20220204 Oldest Active Linux Distro Slackware Finally Releases Version 15.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/slackware-15-release/" [#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 023a12fd4b2603e6e16bd30ec35f6e3f8ddd7cd9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 5 Feb 2022 13:18:38 +0800 Subject: [PATCH 180/334] TRP @wxy https://linux.cn/article-14243-1.html --- ...o Slackware Finally Releases Version 15.md | 131 ++++++++++++++++++ ...o Slackware Finally Releases Version 15.md | 127 ----------------- 2 files changed, 131 insertions(+), 127 deletions(-) create mode 100644 published/20220204 Oldest Active Linux Distro Slackware Finally Releases Version 15.md delete mode 100644 sources/news/20220204 Oldest Active Linux Distro Slackware Finally Releases Version 15.md diff --git a/published/20220204 Oldest Active Linux Distro Slackware Finally Releases Version 15.md b/published/20220204 Oldest Active Linux Distro Slackware Finally Releases Version 15.md new file mode 100644 index 0000000000..b1b2d75546 --- /dev/null +++ b/published/20220204 Oldest Active Linux Distro Slackware Finally Releases Version 15.md @@ -0,0 +1,131 @@ +[#]: subject: "Oldest Active Linux Distro Slackware Finally Releases Version 15" +[#]: via: "https://news.itsfoss.com/slackware-15-release/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14243-1.html" + +最古老的活跃 Linux 发行版 Slackware 终于发布了第 15 版 +====== + +> 带着 Linux 内核 5.15 LTS 和 KDE Plasma 5.23 的最新改进,Slackware 15.0 已经来到。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/Slackware-15-release.png?w=1200&ssl=1) + +欢呼吧!Linux 粉丝们会很高兴地知道,传奇发行版 Slackware 在很久之后发布了一个新版本。或许你不知道,Slackware 上一个版本的发布要追溯到 2016 年。 + +当开发者在去年(2021 年)2 月宣布 Slackware 15.0 的计划时,整个 Linux 社区都为此感到兴奋。 + +从年初的 Alpha 版本开始,在过去的一年里,开发人员在 Slackware Linux 15.0 的开发中取得了快速进展。经过一段时间后,他们发布了其最后一个候选版本,但现在它发布了! + +让我们来看看 Slackware 15.0 有哪些新内容。 + +### Slackware 15.0 的新内容 + +![][1] + +如前所述,Slackware 15.0 有许多变化。不要忘了,在最终发布之前,它可是发布了一个测试版和两个候选发布版(RC)。 + +如果你一直在关注我们的报道,早在去年 4 月份你就可能已经看到了我们的 [测试版][2] 报道。 + +在测试版 / RC 版中,还有一些东西没有被披露。因此,在这里,我们会介绍它的所有重要内容。 + +#### Linux 内核 5.15 LTS + +Slackware 15 的主要亮点是增加了最新的 [Linux 内核 5.15 LTS][3]。这与我们在测试版中注意到的 Linux 内核 5.10 LTS 相比,有了很大的飞跃。 + +![][4] + +值得注意的是,Slackware 团队在确定使用 Linux 内核 5.15.19 之前测试了数百个 Linux 内核版本。在发布说明中提到: + +> 在最终宣布 Slackware 15.0 稳定版的过程中,我们在过去一年里实际上构建了超过 400 个不同的 Linux 内核版本(相比之下,我们在开发 Slackware 14.2 时测试了 34 个内核版本)。在 Greg Kroah-Hartman 确认 5.15.19 版内核将获得至少到 2023 年 10 月(很可能比这更久)的长期支持后,我们最终选择了它。 + +如果你感到好奇,Linux 内核 5.15 带来了一些更新,如增强的 NTFS 驱动支持和对英特尔 / AMD 处理器以及苹果 M1 芯片的改进。它还增加了对英特尔第 12 代处理器的初步支持。 + +总的来说,有了 Linux 内核 5.15 LTS,对于这个最古老的活跃 Linux 发行版,你应该会得到良好的硬件兼容性。 + +Linux 内核提供了两种版本,一种是带驱动的,不需要 initrd;另一种是依靠 initrd 来加载内核模块。发行说明中提到了更多关于它的内容: + +> 像往常一样,内核提供了两种类型:通用内核和巨型内核。巨型内核包含足够多的内置驱动程序,在大多数情况下不需要 initrd 来启动系统。通用内核需要使用 initrd 来加载挂载根文件系统所需的内核模块。使用通用内核可以节省一些内存,并可能避免一些启动时的警告。我强烈建议使用通用内核以获得最佳的内核模块兼容性。 + +#### KDE Plasma 5.23 和 Xfce 4.16 + +谈到 KDE,你应该会发现 KDE Plasma 软件包更新到了 5.23,而 KDE 框架则更新到了 5.88 版本。 + +[KDE Plasma 5.23][5] 是 KDE 的 25 周年纪念版,包括了 UI 的改进,以及一系列细微的变化来改善用户体验。 + +除此之外,Slackware 15 还配备了 Xfce 4.16 作为桌面环境选项之一。 + +#### 对 PipeWire 和 Wayland 的支持 + +作为 PulseAudio 的替代品,Slackware 15 加入了对 PipeWire 的支持。 + +而且,对于那些想摆脱 X11 的用户来说,对 Wayland 的支持也在这个版本中出现。 + +#### 32 位支持 + +因为 Slackware 是 [适合 32 位系统的 Linux 发行版][6] 之一,最新版本提供了特定的内核版本来支持它。 + +从技术上讲,有 SMP 和非 SMP 内核,分别用于单核和多核处理器。 + +建议使用 SMP 内核以获得更好的性能和内存管理,但是如果你的处理器比奔腾 3 还要老,非 SMP 内核应该会派上用场。 + +#### 其他改进 + +![][7] + +一些技术上的升级包括 GCC 编译器升级到 11.2.0 版本。相当多的安全和错误也得到了解决。 + +公告上还说,开发人员正专注于将 Python 更新到 3.3.4 版本,以修复 Samba 的构建。 + +其他基本软件包和应用程序,如网络管理器、OpenSSH、Krita、Falkon 浏览器和 Ocular 也得到了升级。Mozilla Firefox 和 Thunderbird 也被更新到它们最新的可用软件包。 + +如果你想获得这个版本的所有技术细节,你可以查看 [官方更新日志][8]。其它一些重要的内容包括: + + * 改进了 Slackware pkgtools,使软件安装体验无障碍,消除了并行冲突。 + * Slackware 15 首次包括一个 `make_world.sh` 脚本,以帮助从源代码重建整个操作系统。 + * 增加了更多的脚本,以方便重建安装程序和内核包。 + * 抛弃了 Qt4,转而使用 Qt5。 + * 增加了对特权访问管理Privileged Access Management(PAM)的支持,以支持那些不支持影子shadow密码的较新项目。 + +值得注意的是,你不能简单地从 Slackware 14.2 升级。因此,最好是进行一次全新的安装。 + +- Slackware 15 x86_64: ftp://ftp.slackware.com/pub/slackware-iso/slackware64-15.0-iso +- Slackware 15 x86_32: ftp://ftp.slackware.com/pub/slackware-iso/slackware-15.0-iso + + +无论是哪种情况,你都应该保留一份数据备份,如果你对使用新的 ISO 安装不感兴趣,可以尝试按照 [官方升级说明][10] 来进行。 + +### 总结 + +Slackware 是最古老的仍然活跃的 Linux 发行版,我很高兴看到 Slackware 有了新的版本。 + +虽然它仍然推荐给有经验的用户或手工爱好者使用,但最新的 Slackware 15.0 也支持 UEFI 和旧系统。如果你正在寻求冒险,并希望为你的桌面安装一个独特的 Linux 发行版,你可以试试 Slackware 15。 + +你用过 Slaceware 吗?你会测试 Slackware 15.0 吗?你认为 Slackware 的未来会是怎样的呢? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/slackware-15-release/ + +作者:[Rishabh Moharir][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/slackware-15-screenshot.png?w=1278&ssl=1 +[2]: https://news.itsfoss.com/slackware-15-beta-release/ +[3]: https://news.itsfoss.com/linux-kernel-5-15-release/ +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/slackware-15-about.png?w=775&ssl=1 +[5]: https://news.itsfoss.com/kde-plasma-5-23-release/ +[6]: https://itsfoss.com/32-bit-linux-distributions/ +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/slackware-firefox.png?w=679&ssl=1 +[8]: http://www.slackware.com/changelog/current.php?cpu=x86_64 +[9]: http://www.slackware.com/ +[10]: https://ftp.osuosl.org/pub/slackware/slackware64-15.0/UPGRADE.TXT diff --git a/sources/news/20220204 Oldest Active Linux Distro Slackware Finally Releases Version 15.md b/sources/news/20220204 Oldest Active Linux Distro Slackware Finally Releases Version 15.md deleted file mode 100644 index 4755d171ba..0000000000 --- a/sources/news/20220204 Oldest Active Linux Distro Slackware Finally Releases Version 15.md +++ /dev/null @@ -1,127 +0,0 @@ -[#]: subject: "Oldest Active Linux Distro Slackware Finally Releases Version 15" -[#]: via: "https://news.itsfoss.com/slackware-15-release/" -[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Oldest Active Linux Distro Slackware Finally Releases Version 15 -====== - -Rejoice! Linux fans will be pleased to know that the legendary distro, Slackware, has received a new release after a long time. For those unaware, Slackware’s latest version was released way back in 2016. - -The entire Linux community was thrilled about it when the devs announced the plans for Slackware 15.0 in February, last year (2021). - -The devs had made rapid progress in the development of Slackware Linux 15.0 in the past year, starting with an alpha release at the beginning of the year. It took a while considering its last release candidate release, but it is here now! - -Let’s take a look at what’s new with Slackware 15.0 - -### What’s New in Slackware 15.0? - -![][1] - -As mentioned before, Slackware 15.0 has received many changes. Not to forget, it involved a beta release and two release candidate (RC) announcements before the final release. - -If you have been following our coverage, you may have had come across our [beta release][2] coverage, back in April. - -There were a few things that weren’t revealed with its beta/RC releases. So, here, we mention everything important about it. - -#### Linux Kernel 5.15 LTS - -The major highlight of Slackware 15 is the addition of the latest [Linux Kernel 5.15 LTS][3]. This is a big jump from Linux Kernel 5.10 LTS that we noticed in the beta release. - -![][4] - -Interestingly, the Slackware team tested hundreds of Linux Kernel versions before settling on Linux Kernel 5.15.19. The release note mentions: - -> We’ve actually built over 400 different Linux kernel versions over the years it took to finally declare Slackware 15.0 stable (by contrast, we tested 34 kernel versions while working on Slackware 14.2). We finally ended up on kernel version 5.15.19 after Greg Kroah-Hartman confirmed that it would get long-term support until at least October 2023 (and quite probably for longer than that). - -In case you are curious, Linux Kernel 5.15 brings in updates like enhanced NTFS driver support and improvements for Intel/AMD processors and Apple’s M1 chip. It also adds initial support for Intel 12th gen processors. - -Overall, with Linux Kernel 5.15 LTS, you should get a good hardware compatibility result for the oldest active Linux distro. - -The Linux Kernel is offered in two flavors, one baked in with drivers which does not need initrd and the relies on initrd to load the kernel modules. The release notes mention more about it: - -> As usual, the kernel is provided in two flavors, generic and huge. The huge kernel contains enough built-in drivers that in most cases an initrd is not needed to boot the system. The generic kernels require the use of an initrd to load the kernel modules needed to mount the root filesystem. Using a generic kernel will save some memory and possibly avoid a few boot time warnings. I’d strongly recommend using a generic kernel for the best kernel module compatibility as well. - -#### KDE Plasma 5.23 and Xfce 4.16 - -Speaking about KDE, you should find KDE Plasma packages updated to 5.23 while KDE Frameworks was updated to version 5.88. - -[KDE Plasma 5.23][5] is KDE’s 25th-anniversary edition release that included UI improvements, and a wide range of subtle changes to improve the user experience. - -In addition to this, Slackware 15 also comes with Xfce 4.16 as one of the desktop environment options. - -#### Support for PipeWire and Wayland - -As an alternative to PulseAudio, the support for PipeWire was added to Slackware 15. - -And, for users who want to get away from X11, the support for Wayland also landed with this release. - -#### 32-bit Support - -Considering Slackware is one of the [suitable Linux distributions for 32-bit systems][6], the latest version features specific kernel versions to support it. - -Technically, there are SMP and non-SMP kernels for single-core and multi-core processors. - -The SMP kernel is recommended for better performance and memory management, but if you have a processor older than the Pentium III, the non-SMP kernel should come in handy. - -#### Other Improvements - -![][7] - -Some technical upgrades include GCC compiler being upgraded to version 11.2.0. Quite a lot of security and bugs were also addressed. - -The announcement furthermore said that the devs were focusing on updating Python Markdown to version 3.3.4 to fix the Samba build. - -Other essential packages and apps like Network Manager, OpenSSH, Krita, Falkon browser and Ocular also received upgrades. Mozilla Firefox and Thunderbird were updated to their latest available packages as well. - -You can check out the [official changelog][8] if you want to get all the technical details for this release. Some important ones include: - - * Slackware pkgtools received improvements to make the software installation experience hassle-free, without parallel collisions. - * Slackware 15 includes a “make_world.sh” script for the first time to help rebuild the OS from source code. - * More scripts have been added to easily rebuild the installer and kernel packages. - * Dropped Qt4 and moved to Qt 5. - * Added support for Privileged Access Management (PAM) to support newer projects that did not support shadow passwords. - - - -It is important to note that you cannot easily upgrade from Slackware 14.2. So, it is best to perform a fresh installation. - -[Slackware 15][9] - -In either case, you should keep a backup of your data, and can try to follow the [official upgrade instructions][10] if you are not interested to install using the new ISO. - -### Wrapping Up - -I’m excited to see Slackware get a new release, considering the fact that it is still the oldest active Linux distro. - -While it is still a recommendation for experienced users or tinkerers, the latest Slackware 15.0 supports UEFI and old systems. If you are looking for an adventure and want a unique Linux distro for your desktop, you can try Slackware 15. - -_Will you be testing out Slackware 15.0? What do you think lies ahead for the future of Slackware?_ - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/slackware-15-release/ - -作者:[Rishabh Moharir][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/rishabh/ -[b]: https://github.com/lujun9972 -[1]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ0MCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[2]: https://news.itsfoss.com/slackware-15-beta-release/ -[3]: https://news.itsfoss.com/linux-kernel-5-15-release/ -[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU3NCIgd2lkdGg9Ijc3NSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[5]: https://news.itsfoss.com/kde-plasma-5-23-release/ -[6]: https://itsfoss.com/32-bit-linux-distributions/ -[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQxMiIgd2lkdGg9IjY3OSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[8]: http://www.slackware.com/changelog/current.php?cpu=x86_64 -[9]: http://www.slackware.com/ -[10]: https://ftp.osuosl.org/pub/slackware/slackware64-15.0/UPGRADE.TXT From 4839e2fcaa97ad832649cfb0c22657ff4646dd46 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 5 Feb 2022 14:08:14 +0800 Subject: [PATCH 181/334] RP @geekpi https://linux.cn/article-14244-1.html --- ... How I use Linux accessibility settings.md | 88 +++++++++++++++++ ... How I use Linux accessibility settings.md | 99 ------------------- 2 files changed, 88 insertions(+), 99 deletions(-) create mode 100644 published/20220123 How I use Linux accessibility settings.md delete mode 100644 translated/tech/20220123 How I use Linux accessibility settings.md diff --git a/published/20220123 How I use Linux accessibility settings.md b/published/20220123 How I use Linux accessibility settings.md new file mode 100644 index 0000000000..ef5ed3b307 --- /dev/null +++ b/published/20220123 How I use Linux accessibility settings.md @@ -0,0 +1,88 @@ +[#]: subject: "How I use Linux accessibility settings" +[#]: via: "https://opensource.com/article/22/1/linux-accessibility-settings" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14244-1.html" + +我如何使用 Linux 的无障碍设置 +====== + +> 不同的 Linux 系统以不同的方式处理辅助技术。 这里是一些对视觉、听觉、打字等有用的设置。 + +![](https://img.linux.net.cn/data/attachment/album/202202/05/140415a3ljitj3zbhulhqk.jpg) + +当我在 20 世纪 90 年代开始使用 Linux 时,我已经 40 多岁了,无障碍性accessibility不是我非常关注的问题。然而现在,当我快到 70 岁时,我的需求已经改变了。几年前,我从 System76 购买了一个全新的 Darter Pro,它的默认分辨率是 1920x1080,而且也是高 DPI。系统附带了 Pop!_OS,我发现我必须修改它才能看到显示屏上的图标和文字。谢天谢地,桌面上的 Linux 已经变得比 90 年代更容易使用了。 + +我需要辅助技术,特别是在视觉和听觉方面。还有一些我不使用的领域,但对需要帮助打字、指点、点击和手势的人来说是有用的。 + +不同的系统,如 Gnome、KDE、LXDE、XFCE 和其他系统,对这些辅助技术的处理方式不同。这些辅助性的调整大多可以通过 “设置Settings” 对话框或键盘快捷键来实现。 + +### 文字显示 + +我需要帮助来显示较大的文字,在我的 Linux Mint Cinnamon 桌面上,我使用这些设置: + +![accessibility options - visual][2] + +我还发现 Gnome “优化Tweaks” 可以让我对桌面体验的文字显示大小进行微调。我把我的显示器的分辨率从默认的 1920x1080 调整到更舒适的 1600x900。以下是我的布局设置: + +![accessibility options - display][3] + +### 键盘支持 + +我不需要键盘支持,但它们是现成支持的,如下图所示: + +![accessibility options - keyboard][4] + +### 更多无障碍选项 + +在 Fedora 35 上,无障碍访问也是熟悉的。打开 “设置Settings” 菜单,选择让 “总是显示无障碍菜单Always show Accessibility Menu” 图标在桌面上可见。我通常会切换 “大字体Large Text”,除非我在一个大显示器上。还有许多其他选项,包括 “缩放Zoom”、“屏幕阅读器Screen Reader” 和 “声音键Sound Keys”。这里有一些: + +![accessibility options - settings][5] + +当在 Fedora 的 “设置Settings” 菜单中启用了 “无障碍菜单Accessibility Menu”,就很容易从右上角的图标中切换其他功能: + +![accessibility options - desktop][6] + +有一些 Linux 发行版是专门为需要无障碍支持的人设计的。[Accessible Coconut][7] 就是这样一个发行版。Coconut 基于 Ubuntu Mate 20.04,并默认启用了屏幕阅读器。它装载了 Ubuntu Mate 的默认应用。Accessible Coconut 是 [Zendalona][8] 的作品,该公司专门开发自由开源的无障碍应用。他们所有的应用都是以 GPL 2.0 许可证发布的,包括 [iBus-Braille][9]。该发行版包括屏幕阅读器、各种语言的打印阅读、六键输入、打字辅导、放大器、电子书扬声器等等。 + +![accessibility options - desktop][10] + +[Gnome 无障碍套件][11] 是一个开源软件库,是 Gnome 项目的一部分,为实现无障碍功能提供 API。你可以通过访问他们的维基来参与 [Gnome 无障碍团队][12]。KDE 也有一个 [无障碍项目][13] 和一个支持该项目的 [应用][14] 列表。你可以通过访问他们的 [维基][15] 来参与 KDE 无障碍项目。[XFCE][16] 也为用户提供了相关资源。[Fedora 项目维基][17] 也有一个可以安装在操作系统上的无障碍应用的列表。 + +### Linux 适合所有人 + +自 20 世纪 90 年代以来,Linux 已经有了长足的进步,其中一个很大的进步就是对无障碍的支持。很高兴知道随着 Linux 用户的不断变化,操作系统也可以和我们一起变化,并做出许多不同的支持选项。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/linux-accessibility-settings + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) +[2]: https://opensource.com/sites/default/files/accessibility-visualpng.png (accessibility options - visual) +[3]: https://opensource.com/sites/default/files/display.png (accessibility options - display) +[4]: https://opensource.com/sites/default/files/keyboard_0.png (accessibility options - keyboard) +[5]: https://opensource.com/sites/default/files/settings.png (accessibility options - settings) +[6]: https://opensource.com/sites/default/files/desktop.png (accessibility options - desktop) +[7]: https://zendalona.com/accessible-coconut/ +[8]: https://zendalona.com/ +[9]: https://github.com/zendalona/ibus-braille +[10]: https://opensource.com/sites/default/files/desktop2.png (accessibility options - desktop) +[11]: https://en.wikipedia.org/wiki/Accessibility_Toolkit +[12]: https://wiki.gnome.org/Accessibility +[13]: https://community.kde.org/Accessibility#KDE_Accessibility_Project +[14]: https://userbase.kde.org/Applications/Accessibility +[15]: https://community.kde.org/Get_Involved/accessibility +[16]: https://docs.xfce.org/xfce/xfce4-settings/accessibility +[17]: https://fedoraproject.org/wiki/Docs/Beats/Accessibility#Using_Fedora.27s_Accessibility_Tools \ No newline at end of file diff --git a/translated/tech/20220123 How I use Linux accessibility settings.md b/translated/tech/20220123 How I use Linux accessibility settings.md deleted file mode 100644 index a496121573..0000000000 --- a/translated/tech/20220123 How I use Linux accessibility settings.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: subject: "How I use Linux accessibility settings" -[#]: via: "https://opensource.com/article/22/1/linux-accessibility-settings" -[#]: author: "Don Watkins https://opensource.com/users/don-watkins" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -我如何使用 Linux 的辅助功能设置 -====== -不同的 Linux 系统以不同的方式处理辅助技术。 这里是一些对视觉、听觉、打字等有用的设置。 -![Person using a laptop][1] - -当我在20世纪90年代开始使用Linux时,我已经 40 多岁了,无障碍性不是我考虑的问题。然而现在,当我快到 70 岁时,我的需求已经改变了。几年前,我从 System76 购买了一个全新的 Darter Pro,它的默认分辨率是 1920x1080,而且也是高 DPI。系统附带了 Pop_OS!,我发现我必须修改它才能看到显示屏上的图标和文字。谢天谢地,桌面上的 Linux 已经变得比 90 年代更容易使用了。 - -我需要辅助技术,特别是在视觉和听觉方面。还有一些我不使用的领域,但对需要帮助打字、指点、点击和手势的人来说是有用的。 - -不同的系统,如 Gnome、KDE、LXDE、XFCE 和其他系统,对这些辅助技术的处理方式不同。这些辅助性的调整大多可以通过**设置**对话框或键盘快捷键来实现。 - -### 文字显示 - -我需要帮助来显示较大的文字,在我的 Linux Mint Cinnamon 桌面上,我使用这些设置: - -![accessibility options - visual][2] - -Don Watkins (CC BY-SA 4.0) - -I have also found **Gnome Tweaks** allows me to fine-tune text display sizes for my desktop experience. I adjusted the resolution of my display from its default of 1920x1080 to a more comfortable 1600x900. Here are my Layout settings: -我还发现 **Gnome Tweaks** 可以让我对桌面体验的文字显示大小进行微调。我把我的显示器的分辨率从默认的 1920x1080 调整到更舒适的 1600x900。以下是我的布局设置: - -![accessibility options - display][3] - -Don Watkins (CC BY-SA 4.0) - -### 键盘支持 - -我不需要键盘支持,但它们是现成的,如下图所示: - -![accessibility options - keyboard][4] - -Don Watkins (CC BY-SA 4.0) - -### 更多无障碍选项 - -在 Fedora 35 上,无障碍访问也是熟悉的。打开**设置**菜单,选择让**总是显示无障碍菜单**图标在桌面上可见。我通常会切换**大字体**,除非我在一个大显示器上。还有许多其他选项,包括**缩放**、**屏幕阅读器**和**声音键**。这里有一些: - -![accessibility options - settings][5] - -Don Watkins (CC BY-SA 4.0) - -当在 Fedora 的**设置** 菜单中启用了**无障碍菜单**,就很容易从右上角的图标中切换其他功能: - -![accessibility options - desktop][6] - -Don Watkins (CC BY-SA 4.0) - -有一些 Linux 发行版是专门为需要支持的人设计的。[Accessible Coconut][7] 就是这样一个发行版。Coconut 基于 Ubuntu Mate 20.04,并默认启用了屏幕阅读器。它装载了 Ubuntu Mate 的默认应用。Accessible Coconut 是 [Zendalona][8] 的作品,该公司专门开发免费和开源的无障碍应用。他们所有的应用都是以 GPL 2.0 许可证发布的,包括 [iBus-Braille][9]。该发行版包括屏幕阅读器、各种语言的打印阅读、六键输入、打字辅导、放大器、电子书扬声器等等。 - -![accessibility options - desktop][10] - -Don Watkins (CC BY-SA 4.0) - -[Gnome Accessibility Toolkit][11] 是一个开源软件库,是 Gnome 项目的一部分,为实现无障碍功能提供 API。你可以通过访问他们的 wiki 来参与 [Gnome 无障碍团队][12]。KDE 也有一个[无障碍项目][13]和一个支持该项目的[应用][14]列表。你可以通过访问他们的 [wiki][15] 来参与 KDE 无障碍项目。[XFCE][16] 也为用户提供了资源。[Fedora Project Wiki][17] 也有一个可以安装在操作系统上的无障碍应用的列表。 - -### Linux 适合所有人 - -自 20 世纪 90 年代以来,Linux 已经有了长足的进步,其中一个很大的进步就是对无障碍的支持。很高兴知道随着 Linux 用户的不断变化,操作系统也可以和我们一起变化,并做出许多不同的支持选项。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/linux-accessibility-settings - -作者:[Don Watkins][a] -选题:[lujun9972][b] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) -[2]: https://opensource.com/sites/default/files/accessibility-visualpng.png (accessibility options - visual) -[3]: https://opensource.com/sites/default/files/display.png (accessibility options - display) -[4]: https://opensource.com/sites/default/files/keyboard_0.png (accessibility options - keyboard) -[5]: https://opensource.com/sites/default/files/settings.png (accessibility options - settings) -[6]: https://opensource.com/sites/default/files/desktop.png (accessibility options - desktop) -[7]: https://zendalona.com/accessible-coconut/ -[8]: https://zendalona.com/ -[9]: https://github.com/zendalona/ibus-braille -[10]: https://opensource.com/sites/default/files/desktop2.png (accessibility options - desktop) -[11]: https://en.wikipedia.org/wiki/Accessibility_Toolkit -[12]: https://wiki.gnome.org/Accessibility -[13]: https://community.kde.org/Accessibility#KDE_Accessibility_Project -[14]: https://userbase.kde.org/Applications/Accessibility -[15]: https://community.kde.org/Get_Involved/accessibility -[16]: https://docs.xfce.org/xfce/xfce4-settings/accessibility -[17]: https://fedoraproject.org/wiki/Docs/Beats/Accessibility#Using_Fedora.27s_Accessibility_Tools \ No newline at end of file From 2fe40471a9b694d5f4ff25a5ebd0e2eb957b2cad Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 5 Feb 2022 23:40:53 +0800 Subject: [PATCH 182/334] ATRP @wxy https://linux.cn/article-14246-1.html --- ...Linux, Drops Ubuntu and LXDE Components.md | 107 ++++++++++++++++++ ...Linux, Drops Ubuntu and LXDE Components.md | 105 ----------------- 2 files changed, 107 insertions(+), 105 deletions(-) create mode 100644 published/20220203 Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components.md delete mode 100644 sources/news/20220203 Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components.md diff --git a/published/20220203 Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components.md b/published/20220203 Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components.md new file mode 100644 index 0000000000..94eea3bbc6 --- /dev/null +++ b/published/20220203 Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components.md @@ -0,0 +1,107 @@ +[#]: subject: "Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components" +[#]: via: "https://news.itsfoss.com/peppermint-11-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14246-1.html" + +Peppermint 11 发布:2022 年值得期待的发行版之一 +====== + +> 经过近三年的等待,Peppermint OS 11 来了,放弃了以 Ubuntu 作为其基础,并删除了 LXDE 组件。看起来不错! + +![](https://peppermintos.com/wp-content/uploads/2022/02/Peppermint-Desktop.webp) + +Peppermint OS 11 是 [2022 年最值得期待的版本][1] 之一,而它终于到来了! + +2020年,其主要开发者 Mark Greaves 不幸去世,Peppermint OS 失去了它最重要的贡献者之一。 + +现在,经过近两年的时间,Peppermint 11 来了!这不仅仅是一次普通的升级,Peppermint 11 是它的第一个以 Debian 为基础的版本,抛弃了 Ubuntu。 + +让我在下面指出该版本的所有关键细节。 + +### Peppermint 11 有什么新东西? + +该版本的主要亮点是放弃 Ubuntu,使用 Debian 64 位作为其基础。 + +从技术上讲,它基于 [Debian 11 “Bullseye”][2] 的稳定分支。因此,你可以预期 Debian 的最新改进出现在 Peppermint OS 11 中。 + +除了新的基础之外,还有一些其他的变化,包括: + +#### XFce 4.16.2,无 LXDE 组件 + +![][3] + +Peppermint OS 利用 XFce 桌面环境与 LXDE 组件来提供混合体验。 + +Peppermint 11 已经删除了所有的 LXDE 组件,专注于提供一个 XFce 驱动的桌面体验。 + +#### Calamares 安装程序取代了 Ubiquity + +![][4] + +为了改善安装过程,Peppermint 11 使用了现代 Calamares 安装程序。 + +#### 新的欢迎应用程序 + +![][5] + +为了让你有一个良好的开端,Peppermint OS 现在包括一个新的欢迎应用程序,让你了解更多关于所使用的系统/组件,并安装开始使用所需的软件。 + +例如,你在 Peppermint 11 中没有预装默认的网络浏览器。你可以快速启动软件包选择器,安装 Firefox、GNOME、Tor、Falkon 和 Chromium 等浏览器。 + +![][6] + +#### 新的 Peppermint Hub + +新的 Peppermint Hub 合并了设置和控制中心来保持整洁,帮助你轻松管理系统。 + +![][7] + +#### 新的应用程序 + +该版本包括一个基于终端的广告屏蔽器,即 [hblock][8],可以在需要时启用或禁用。 + +![][9] + +Nemo 取代了 Thunar 作为默认的文件管理器,它应该感觉很熟悉,对许多用户来说可以派上用场。 + +#### 其他改进 + +总的来说,有了新的基础和更新的 Linux 内核 5.10,Peppermint 11 应该是一个令人兴奋的选择。 + +在 [发布说明][10] 中的一些其他变化包括: + + * 在安装过程中包含了一套精简的桌面墙纸。下载额外的壁纸请进入 Peppermint 中。 + * 包括一套精简的图标和 XFce 主题。 + +- [Peppermint OS 11][11] + +现在 Peppermint OS 11 来了,你会考虑在你的主系统上尝试一下吗?你已经试过了吗?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/peppermint-11-release/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/linux-distro-releases-2022/ +[2]: https://news.itsfoss.com/debian-11-feature/ +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/peppermint-os-11-neofetch.png?w=790&ssl=1 +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/peppermint-os-11-installer.png?w=1087&ssl=1 +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/peppermint-os-11-welcome.png?w=895&ssl=1 +[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/peppermint-os-11-software-package.png?w=718&ssl=1 +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/peppermint-os-11-hub.png?w=764&ssl=1 +[8]: https://github.com/hectorm/hblock +[9]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/peppermint-os-11-nemo.png?w=849&ssl=1 +[10]: https://peppermintos.com/2022/02/peppermint-release-notes/ +[11]: https://peppermintos.com/guide/downloading/ diff --git a/sources/news/20220203 Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components.md b/sources/news/20220203 Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components.md deleted file mode 100644 index 79702be3cc..0000000000 --- a/sources/news/20220203 Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components.md +++ /dev/null @@ -1,105 +0,0 @@ -[#]: subject: "Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components" -[#]: via: "https://news.itsfoss.com/peppermint-11-release/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components -====== - -Peppermint OS 11 was one of the [most anticipated releases for 2022][1], and it has finally arrived! - -Not to forget the tragic loss of its lead developer Mark Greaves in 2020, Peppermint OS lost one of its most significant contributors. - -Now, after almost two years, Peppermint 11 is here! It is not just an ordinary upgrade, but it looks like Peppermint 11 is the first release with Debian as its base, ditching Ubuntu. - -Let me highlight all the key details of the release below. - -### Peppermint 11: What’s New? - -The primary highlight of the release is dropping Ubuntu to use Debian 64-bit as its base. - -Technically, it is based on the stable branch of [Debian 11 ‘Bullseye’][2]. So, you should expect the latest improvements to Debian along with Peppermint OS 11. - -In addition to the new base, there are a few other changes that include: - -#### XFCE 4.16.2 with No LXDE Components - -![][3] - -Peppermint OS utilized the XFCE desktop environment with LXDE components to provide a hybrid experience. - -Peppermint 11 has removed all the LXDE components to focus on providing an XFCE-powered desktop experience. - -#### Calamares Installer Replaces Ubiquity - -![][4] - -To improve the installation process, Peppermint 11 uses the modern Calamares installer. - -#### New Welcome Tour App - -![][5] - -To give you a head start, Peppermint OS now includes a new Welcome application that allows you to learn more about the system/components used and install the software needed to get started. - -For instance, you do not have a default web browser pre-installed with Peppermint 11. You can quickly launch the software package selector and install browsers like Firefox, GNOME, Tor, Falkon, and Chromium. - -![][6] - -#### New Peppermint Hub - -The new Peppermint Hub keeps things tidy by combining the settings and control center to help you manage the system easily. - -![][7] - -#### New Applications - -The distribution includes a terminal-based ad-blocker, i.e., [hblock][8] that can be enabled or disabled when needed. - -![][9] - -Nemo replaces Thunar as the default file manager, and it should feel familiar and can come in handy for many users. - -#### Other Improvements - -Overall, with a new base, and updated Linux Kernel 5.10, Peppermint 11 should be an exciting choice to try. - -Some other changes in the [release notes][10] include: - - * A minimum set of desktop wallpaper is included during installation. Download additional wallpaper _Welcome to Peppermint_. - * A streamlined set of icons and XFCE themes are included. - - - -[Peppermint OS 11][11] - -_So, now that Peppermint OS 11 is here, will you consider trying it on your primary system? Have you tried it yet? Let me know your thoughts in the comments below._ - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/peppermint-11-release/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://news.itsfoss.com/linux-distro-releases-2022/ -[2]: https://news.itsfoss.com/debian-11-feature/ -[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUxNyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQyNyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjYzNSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU4MiIgd2lkdGg9IjcxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU2NSIgd2lkdGg9Ijc2NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[8]: https://github.com/hectorm/hblock -[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU2NiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[10]: https://peppermintos.com/2022/02/peppermint-release-notes/ -[11]: https://peppermintos.com/guide/downloading/ From 4b262e31ac484723f3e9f0c0ef79fc6a6994d128 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 6 Feb 2022 05:02:26 +0800 Subject: [PATCH 183/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220205=20?= =?UTF-8?q?Create=20an=20app=20with=20this=20Arnold=20Schwarzenegger-theme?= =?UTF-8?q?d=20programming=20language?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220205 Create an app with this Arnold Schwarzenegger-themed programming language.md --- ...warzenegger-themed programming language.md | 249 ++++++++++++++++++ 1 file changed, 249 insertions(+) create mode 100644 sources/tech/20220205 Create an app with this Arnold Schwarzenegger-themed programming language.md diff --git a/sources/tech/20220205 Create an app with this Arnold Schwarzenegger-themed programming language.md b/sources/tech/20220205 Create an app with this Arnold Schwarzenegger-themed programming language.md new file mode 100644 index 0000000000..16515220cf --- /dev/null +++ b/sources/tech/20220205 Create an app with this Arnold Schwarzenegger-themed programming language.md @@ -0,0 +1,249 @@ +[#]: subject: "Create an app with this Arnold Schwarzenegger-themed programming language" +[#]: via: "https://opensource.com/article/22/2/arnoldc-create-app" +[#]: author: "Jessica Cherry https://opensource.com/users/cherrybomb" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Create an app with this Arnold Schwarzenegger-themed programming language +====== +Build your Java muscle while having some fun with ArnoldC, an open +source programming language. +![gray scale photo of dumbbell weights for strength training][1] + +Have you ever wished programming were more like an action movie? If you answered yes, then I have the language for you. + +While wandering the internet to find the most obscure and fun open source languages, I came across ArnoldC. ArnoldC is an imperative programming language where the basic keywords are replaced with quotes from various Arnold Schwarzenegger movies. + +For this tutorial, I'll be using a Debian-based operating system with Terminator and the Vim editor. While you follow this tutorial, I would highly recommend rewatching some older Schwarzenegger films just for fun! + +### Install ArnoldC + +ArnoldC is hosted in [GitHub][2]. Before starting, I suggest creating a directory to hold your new project so it won't get lost. Below are my commands to get ArnoldC on your computer. + + +``` + + +$ mkdir arnoldc +$ cd arnoldc/ +/arnoldc$ wget +\--2022-01-16 14:11:18--   +Resolving lhartikk.github.io (lhartikk.github.io)... \ +185.199.108.153, 185.199.109.153, 185.199.110.153, ... +Connecting to lhartikk.github.io (lhartikk.github.io)\ +|185.199.108.153|:80... connected. +HTTP request sent, awaiting response... 200 OK +Length: 12958233 (12M) [application/java-archive] +Saving to: ‘ArnoldC.jar’ + +ArnoldC.jar                             100% + +``` + +### Short keyword overview + +First, I'll explain some of the keywords you'll need to build an app. Keep in mind that all of these keywords need to be in all caps when writing your application. + +Printing strings or variables: `TALK TO THE HAND` +Example: `TALK TO THE HAND "hello there"` + +Creating a variable: `GET TO THE CHOPPER` +Example: `GET TO THE CHOPPER var1` + +Setting the variable: `HERE IS MY INVITATION` +Example (in pattern format): + + +``` + + +GET TO THE CHOPPER var1 +HERE IS MY INVITATION value1 + +``` + +Once you've finished with the assigned variable, the next line is `ENOUGH TALK`. + +False: `I LIED` +True: `NO PROBLEMO` +Return: `I'LL BE BACK` + +These are some of my favorite keywords from the complete list, but you can always consult the ArnoldC wiki for more. + +### Hello world + +I'll start with a small "hello world" app to show the ArnoldC language in use. + +First, use the `echo` command to output the string "hello world" into a hello file: + + +``` + + +$echo -e "IT'S SHOWTIME\nTALK TO THE HAND \"hello world\ +"\nYOU HAVE BEEN TERMINATED" > hello.arnoldc + +``` + +Next, use `java -jar` to create the app using ArnoldC: `$java -jar ArnoldC.jar hello.arnoldc` + +Then use the java command to run the program: `$java hello` + +Here's the output: + + +``` +hello world +``` + +If you followed these instructions, congratulations on your first under-3-minute app in a completely frivolous language. + +### Let's count + +In this next example, I'll have my app count to 20. The odd patterning makes this program pretty interesting. + +First, create the file using Vim so you can just start writing the app: `arnoldc$ vi count.arnoldc` + +Create the `begin main` with `IT'S SHOWTIME`. + +Next, set up the declared variable: `HEY CHRISTMAS TREE isLessThan20` + +Then, set the initial value of the variable to true, making that required: `YOU SET US UP @NO PROBLEMO` + +Repeat these steps with the variable n and make the first set value 0: + + +``` + + +HEY CHRISTMAS TREE n +YOU SET US UP 0 + +``` + +From here, move into a while loop with the first variable: `STICK AROUND isLessThan20` + +Assign the variable to look at: `GET TO THE CHOPPER n` + +Then set the value to plus one: + + +``` + + +HERE IS MY INVITATION n +GET UP 1 + +``` + +Moving on to ending the assigned variable: `ENOUGH TALK` + +Print the number: `TALK TO THE HAND n` + +Look at the assigned variable again, then set the variable to 20: + + +``` + + +GET TO THE CHOPPER isLessThan20 +HERE IS MY INVITATION 20 + +``` + +Check to see if the number is less than 20: `LET OFF SOME STEAM BENNET n` + +Moving on to ending the assigned variable, end the while loop, then terminate the program: + + +``` + + +ENOUGH TALK +CHILL +YOU HAVE BEEN TERMINATED + +``` + +In the end, you should have this: + + +``` + + +IT'S SHOWTIME +HEY CHRISTMAS TREE isLessThan20 +YOU SET US UP @NO PROBLEMO +HEY CHRISTMAS TREE n +YOU SET US UP 0 +STICK AROUND isLessThan20 +GET TO THE CHOPPER n +HERE IS MY INVITATION n +GET UP 1 +ENOUGH TALK +TALK TO THE HAND n +GET TO THE CHOPPER isLessThan20 +HERE IS MY INVITATION 20 +LET OFF SOME STEAM BENNET n +ENOUGH TALK +CHILL +YOU HAVE BEEN TERMINATED + +``` + +Now you just need to set the jar package up to run: `/arnoldc$ java -jar ArnoldC.jar count.arnoldc` + +Then run your code: + + +``` + + +/arnoldc$ java count +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 + +``` + +If you attempted this tutorial, congratulations again! You now have a small counter. + +### Afterthoughts + +This just-for-fun open source language is great for general hilarity, but it helps if you know a small amount of Java-based languages. I don't, so it took a bit more time for me to figure out how to use the language. At least I learned something while having fun! I hope you enjoy experimenting with ArnoldC and making something that's amusing to you. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/arnoldc-create-app + +作者:[Jessica Cherry][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/cherrybomb +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/luis-reyes-mtorq9gffog-unsplash.jpg?itok=pnfxHBsU (gray scale photo of dumbbell weights for strength training) +[2]: https://github.com/lhartikk/ArnoldC From 8887dc87c5464d6770622d996d89373aca3926a1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 6 Feb 2022 09:24:35 +0800 Subject: [PATCH 184/334] A --- .../tech/20201110 Load balance network traffic with HAProxy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20201110 Load balance network traffic with HAProxy.md b/sources/tech/20201110 Load balance network traffic with HAProxy.md index cafe4f457c..3bd759a971 100644 --- a/sources/tech/20201110 Load balance network traffic with HAProxy.md +++ b/sources/tech/20201110 Load balance network traffic with HAProxy.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 395112e225b6cab9d06eb586712e0d60126f163b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 6 Feb 2022 11:40:27 +0800 Subject: [PATCH 185/334] TR @wxy --- ...ad balance network traffic with HAProxy.md | 249 ------------------ ...ad balance network traffic with HAProxy.md | 235 +++++++++++++++++ 2 files changed, 235 insertions(+), 249 deletions(-) delete mode 100644 sources/tech/20201110 Load balance network traffic with HAProxy.md create mode 100644 translated/tech/20201110 Load balance network traffic with HAProxy.md diff --git a/sources/tech/20201110 Load balance network traffic with HAProxy.md b/sources/tech/20201110 Load balance network traffic with HAProxy.md deleted file mode 100644 index 3bd759a971..0000000000 --- a/sources/tech/20201110 Load balance network traffic with HAProxy.md +++ /dev/null @@ -1,249 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Load balance network traffic with HAProxy) -[#]: via: (https://opensource.com/article/20/11/load-balancing-haproxy) -[#]: author: (Jim O'Connell https://opensource.com/users/jimoconnell) - -Load balance network traffic with HAProxy -====== -Install, configure, and run HAProxy to distribute network traffic across -several web or application servers. -![eight stones balancing][1] - -You don't have to work at a huge company to justify using a load balancer. You might be a hobbyist, self-hosting a website from a couple of Raspberry Pi computers. Perhaps you're the server administrator for a small business; maybe you _do_ work for a huge company. Whatever your situation, you can benefit from using the [HAProxy][2] load balancer to manage your traffic. - -HAProxy is known as "the world's fastest and most widely used software load balancer." It packs in many features that can make your applications more secure and reliable, including built-in rate limiting, anomaly detection, connection queuing, health checks, and detailed logs and metrics. Learning the basic skills and concepts covered in this tutorial will help you use HAProxy to build a more robust, far more powerful infrastructure. - -### Why would you need a load balancer? - -A load balancer is a way to easily distribute connections across several web or application servers. In fact, HAProxy can balance any type of Transmission Control Protocol ([TCP][3]) traffic, including RDP, FTP, WebSockets, or database connections. The ability to distribute load means you don't need to purchase a massive web server with zillions of gigs of RAM just because your website gets more traffic than Google. - -A load balancer also gives you flexibility. Perhaps your existing web server isn't robust enough to meet peak demand during busy times of the year and you'd like to add another, but only temporarily. Maybe you want to add some redundancy in case one server fails. With HAProxy, you can add more servers to the backend pool when you need them and remove them when you don't. - -You can also route requests to different servers depending on the context. For example, you might want to handle your static content with a couple of cache servers, such as [Varnish][4], but route anything that requires dynamic content, such as an API endpoint, to a more powerful machine. - -In this article, I will walk through setting up a very basic HAProxy installation to use HTTPS to listen on secure port 443 and utilize a couple of backend web servers. It will even send all traffic that comes to a predefined URL (like `/api/`) to a different server or pool of servers. - -### Install HAProxy - -To get started, spin up a new CentOS 8 server or instance and bring the system up to date: - - -``` -`sudo yum update -y` -``` - -This typically runs for a while. Grab yourself a coffee while you wait. - -This installation has two parts: the first part installs the yum version of HAProxy, and the second part compiles and installs your binary from source to overwrite the previous HAProxy with the latest version. Installing with yum does a lot of the heavy lifting as far as generating systemd startup scripts, etc., so run the `yum install` and then overwrite the HAProxy binary with the latest version by compiling it from its source code: - - -``` -`sudo yum install -y haproxy` -``` - -Enable the HAProxy service: - - -``` -`sudo systemctl enable haproxy` -``` - -To upgrade to the latest version ([version 2.2][5], as of this writing), compile the source code. Many people assume that compiling and installing a program from its source code requires a high degree of technical ability, but it's a pretty straightforward process. Start by using `yum` to install a few packages that provide the tools for compiling code: - - -``` -sudo yum install dnf-plugins-core -sudo yum config-manager --set-enabled PowerTools -# (Multiline command next 3 lines. Copy and paste together:)  - -sudo yum install -y git ca-certificates gcc glibc-devel \ -  lua-devel pcre-devel openssl-devel systemd-devel \ -  make curl zlib-devel  -``` - -Use `git` to get the latest source code and change to the `haproxy` directory: - - -``` -git clone -cd haproxy -``` - -Run the following three commands to build and install HAProxy with integrated Prometheus support: - - -``` -# Multiline command next 3 lines copy and paste together:  -make TARGET=linux-glibc USE_LUA=1 USE_OPENSSL=1 USE_PCRE=1 \ -PCREDIR= USE_ZLIB=1 USE_SYSTEMD=1 \ EXTRA_OBJS="contrib/ - -sudo make PREFIX=/usr install # Install to /usr/sbin/haproxy -``` - -Test it by querying the version: - - -``` -`haproxy -v` -``` - -You should get the following output: - - -``` -`HA-Proxy version 2.2.4-b16390-23 2020/10/09 - https://haproxy.org/` -``` - -### Create the backend server - -HAProxy doesn't serve any traffic directly—this is the job of backend servers, which are typically web or application servers. For this exercise, I'm using a tool called [Ncat][6], the "Swiss Army knife" of networking, to create some exceedingly simple servers. Install it: - - -``` -`sudo yum install nc -y` -``` - -If your system has [SELinux][7] enabled, you'll need to enable port 8404, the port used for accessing the HAProxy Stats page (explained below), and the ports for your backend servers: - - -``` -sudo dnf install policycoreutils-python-utils -sudo semanage port -a -t http_port_t  -p tcp 8404 -sudo semanage port -a -t http_port_t  -p tcp 10080; -sudo semanage port -a -t http_port_t  -p tcp 10081; -sudo semanage port -a -t http_port_t  -p tcp 10082; -``` - -Create two Ncat web servers and an API server: - - -``` -while true ; -do -nc -l -p 10080 -c 'echo -e "HTTP/1.1 200 OK\n\n This is Server ONE"' ; -done & - -while true ; -do -nc -l -p 10081 -c 'echo -e "HTTP/1.1 200 OK\n\n This is Server TWO"' ; -done & - -while true ; -do -nc -l -p 10082 -c 'echo -e "HTTP/1.1 200 OK\nContent-Type: application/json\n\n { \"Message\" :\"Hello, World!\" }"' ; -done & -``` - -These simple servers print out a message (such as "This is Server ONE") and run until the server is stopped. In a real-world setup, you would use actual web and app servers. - -### Modify the HAProxy config file - -HAProxy's configuration file is `/etc/haproxy/haproxy.cfg`. This is where you make the changes to define your load balancer. This [basic configuration][8] will get you started with a working server: - - -``` -global -    log         127.0.0.1 local2 -    user        haproxy -    group       haproxy - -defaults  -    mode                    http -    log                     global -    option                  httplog - -frontend main -    bind *:80 -         -    default_backend web -    use_backend api if { path_beg -i /api/ } -     -    #------------------------- -    # SSL termination - HAProxy handles the encryption. -    #    To use it, put your PEM file in /etc/haproxy/certs   -    #    then edit and uncomment the bind line (75) -    #------------------------- -    # bind *:443 ssl crt /etc/haproxy/certs/haproxy.pem ssl-min-ver TLSv1.2 -    # redirect scheme https if !{ ssl_fc } - -#----------------------------- -# Enable stats at -#----------------------------- - -frontend stats -    bind *:8404 -    stats enable -    stats uri /stats -#----------------------------- -# round robin balancing between the various backends -#----------------------------- - -backend web -    server web1 127.0.0.1:10080 check -    server web2 127.0.0.1:10081 check - -#----------------------------- - -# API backend for serving up API content -#----------------------------- -backend api -    server api1 127.0.0.1:10082 check -``` - -### Restart and reload HAProxy - -HAProxy is probably not running yet, so issue the command `sudo systemctl restart haproxy` to start (or restart) it. The `restart` method is fine for non-production situations, but once you are up and running, you'll want to get in the habit of using `sudo systemctl reload haproxy` to avoid service interruptions, even if you have an error in your config. - -For example, after you make changes to `/etc/haproxy/haproxy.cfg`, you need to reload the daemon with `sudo systemctl reload haproxy` to effect the changes. If there is an error, it will let you know but continue running with the previous configuration. Check your HAProxy status with `sudo systemctl status haproxy`. - -If it doesn't report any errors, you have a running server. Test it with curl on the server, by typing `curl http://localhost/` on the command line. If you see "_This is Server ONE_," then it all worked! Run `curl` a few times and watch it cycle through your backend pool, then see what happens when you type `curl http://localhost/api/`. Adding `/api/` to the end of the URL will send all of that traffic to the third server in your pool. At this point, you should have a functioning load balancer! - -### Check your stats - -You may have noted that the configuration defined a frontend called `stats` that is listening on port 8404: - - -``` -frontend stats -    bind *:8404 -    stats uri /stats -    stats enable -``` - -In your browser, load up `http://localhost:8404/stats`. Read HAProxy's blog "[Exploring the HAProxy Stats page][9]" to find out what you can do here. - -### A powerful load balancer - -Although I covered just a few of HAProxy's features, you now have a server that listens on ports 80 and 443, redirecting HTTP traffic to HTTPS, balancing traffic between several backend servers, and even sending traffic matching a specific URL pattern to a different backend server. You also unlocked the very powerful HAProxy Stats page that gives you a great overview of your systems. - -This exercise might seem simple, make no mistake about it—you have just built and configured a very powerful load balancer capable of handling a significant amount of traffic. - -For your convenience, I put all the commands in this article in a [GitHub Gist][10]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/load-balancing-haproxy - -作者:[Jim O'Connell][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jimoconnell -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/water-stone-balance-eight-8.png?itok=1aht_V5V (eight stones balancing) -[2]: https://www.haproxy.org/ -[3]: https://en.wikipedia.org/wiki/Transmission_Control_Protocol -[4]: https://varnish-cache.org/ -[5]: https://www.haproxy.com/blog/announcing-haproxy-2-2/ -[6]: https://nmap.org/ncat -[7]: https://www.redhat.com/en/topics/linux/what-is-selinux -[8]: https://gist.github.com/haproxytechblog/38ef4b7d42f16cfe5c30f28ee3304dce -[9]: https://www.haproxy.com/blog/exploring-the-haproxy-stats-page/ -[10]: https://gist.github.com/haproxytechblog/d656422754f1b5eb1f7bbeb1452d261e diff --git a/translated/tech/20201110 Load balance network traffic with HAProxy.md b/translated/tech/20201110 Load balance network traffic with HAProxy.md new file mode 100644 index 0000000000..a887180eff --- /dev/null +++ b/translated/tech/20201110 Load balance network traffic with HAProxy.md @@ -0,0 +1,235 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Load balance network traffic with HAProxy) +[#]: via: (https://opensource.com/article/20/11/load-balancing-haproxy) +[#]: author: (Jim O'Connell https://opensource.com/users/jimoconnell) + +用 HAProxy 实现网络流量的负载平衡 +====== + +> 安装、配置和运行 HAProxy,在几个网络或应用服务器之间分配网络流量。 + +![](https://img.linux.net.cn/data/attachment/album/202202/06/114005n44h5xx934549133.jpg) + +不是只有在一个大型公司工作才需要使用负载平衡器。你可能是一个业余爱好者,用几台树莓派电脑自我托管一个网站。也许你是一个小企业的服务器管理员;也许你确实在一家大公司工作。无论你的情况如何,你都可以使用 [HAProxy][2] 负载平衡器来管理你的流量。 + +HAProxy 被称为“世界上最快和使用最广泛的软件负载平衡器”。它包含了许多可以使你的应用程序更加安全可靠的功能,包括内置的速率限制、异常检测、连接排队、健康检查以及详细的日志和指标。学习本教程中所涉及的基本技能和概念,将有助于你使用 HAProxy 建立一个更强大的、远为强大的基础设施。 + +### 为什么需要一个负载平衡器? + +负载平衡器是一种在几个网络或应用服务器之间轻松分配连接的方法。事实上,HAProxy 可以平衡任何类型的传输控制协议([TCP][3])流量,包括 RDP、FTP、WebSockets 或数据库连接。分散负载的能力意味着你不需要因为你的网站流量比谷歌大就购买一个拥有几十万 G 内存的大型网络服务器。 + +负载平衡器还为你提供了灵活性。也许你现有的网络服务器不够强大,无法满足一年中繁忙时期的峰值需求,你想增加一个,但只是暂时的。也许你想增加一些冗余,以防一个服务器出现故障。有了 HAProxy,你可以在需要时向后端池添加更多的服务器,在不需要时删除它们。 + +你还可以根据情况将请求路由到不同的服务器。例如,你可能想用几个缓存服务器(如 [Varnish][4])来处理你的静态内容,但把任何需要动态内容的东西,如 API 端点,路由到一个更强大的机器。 + +在这篇文章中,我将通过设置一个非常基本的 HAProxy 环境,使用 HTTPS 来监听安全端口 443,并利用几个后端 Web 服务器。它甚至会将所有进入预定义 URL(如 `/api/`)的流量发送到不同的服务器或服务器池。 + +### 安装 HAProxy + +要开始安装,请启动一个新的 CentOS 8 服务器或实例,并使系统达到最新状态: + +``` +$ sudo yum update -y +``` + +这通常会持续一段时间。在等待的时候给自己拿杯咖啡。 + +这个安装有两部分:第一部分是安装 yum 版本的 HAProxy,第二部分是编译和安装你的二进制文件,用最新的版本覆盖以前的 HAProxy。用 yum 安装,在生成 systemd 启动脚本等方面做了很多繁重的工作,所以运行 `yum install`,然后从源代码编译,用最新的版本覆盖 HAProxy 二进制: + +``` +$ sudo yum install -y haproxy +``` + +启用 HAProxy 服务: + +``` +$ sudo systemctl enable haproxy +``` + +要升级到最新版本([版本 2.2][5],截至本文写作为止),请编译源代码。许多人认为从源代码编译和安装一个程序需要很高的技术能力,但这是一个相当简单的过程。首先,使用 `yum` 安装一些提供编译代码工具的软件包: + +``` +$ sudo yum install dnf-plugins-core +$ sudo yum config-manager --set-enabled PowerTools +$ sudo yum install -y git ca-certificates gcc glibc-devel \ + lua-devel pcre-devel openssl-devel systemd-devel \ + make curl zlib-devel +``` + +使用 `git` 获得最新的源代码,并改变到 `haproxy` 目录: + +``` +$ git clone http://git.haproxy.org/git/ haproxy +$ cd haproxy +``` + +运行以下三个命令来构建和安装具有集成了 Prometheus 支持的 HAProxy: + +``` +$ make TARGET=linux-glibc USE_LUA=1 USE_OPENSSL=1 USE_PCRE=1 \ + PCREDIR= USE_ZLIB=1 USE_SYSTEMD=1 \ + EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o" + +$ sudo make PREFIX=/usr install # 安装到 /usr/sbin/haproxy +``` + +通过查询版本来测试它: + +``` +$ haproxy -v +``` + +你应该看到以下输出: + +``` +HA-Proxy version 2.2.4-b16390-23 2020/10/09 - https://haproxy.org/ +``` + +### 创建后端服务器 + +HAProxy 并不直接提供任何流量,这是后端服务器的工作,它们通常是网络或应用服务器。在这个练习中,我使用一个叫做 [Ncat][6] 的工具,它是网络领域的“瑞士军刀”,用来创建一些极其简单的服务器。安装它: + +``` +$ sudo yum install nc -y +``` + +如果你的系统启用了 [SELinux][7],你需要启用端口 8404,这是用于访问 HAProxy 统计页面的端口(下面有解释),以及你的后端服务器的端口: + +``` +$ sudo dnf install policycoreutils-python-utils +$ sudo semanage port -a -t http_port_t -p tcp 8404 +$ sudo semanage port -a -t http_port_t -p tcp 10080 +$ sudo semanage port -a -t http_port_t -p tcp 10081 +$ sudo semanage port -a -t http_port_t -p tcp 10082 +``` + +创建两个 Ncat 网络服务器和一个 API 服务器: + +``` +$ while true ; +do +nc -l -p 10080 -c 'echo -e "HTTP/1.1 200 OK\n\n This is Server ONE"' ; +done & + +$ while true ; +do +nc -l -p 10081 -c 'echo -e "HTTP/1.1 200 OK\n\n This is Server TWO"' ; +done & + +$ while true ; +do +nc -l -p 10082 -c 'echo -e "HTTP/1.1 200 OK\nContent-Type: application/json\n\n { \"Message\" :\"Hello, World!\" }"' ; +done & +``` + +这些简单的服务器打印出一条信息(如“This is Server ONE”),并运行到服务器停止为止。在现实环境中,你会使用实际的网络和应用程序服务器。 + +### 修改 HAProxy 的配置文件 + +HAProxy 的配置文件是 `/etc/haproxy/haproxy.cfg`。你在这里进行修改以定义你的负载平衡器。这个 [基本配置][8] 将让你从一个工作的服务器开始: + +``` +global + log 127.0.0.1 local2 + user haproxy + group haproxy + +defaults + mode http + log global + option httplog + +frontend main + bind *:80 + + default_backend web + use_backend api if { path_beg -i /api/ } + + #------------------------- + # SSL termination - HAProxy handles the encryption. + # To use it, put your PEM file in /etc/haproxy/certs + # then edit and uncomment the bind line (75) + #------------------------- + # bind *:443 ssl crt /etc/haproxy/certs/haproxy.pem ssl-min-ver TLSv1.2 + # redirect scheme https if !{ ssl_fc } + +#----------------------------- +# Enable stats at http://test.local:8404/stats +#----------------------------- + +frontend stats + bind *:8404 + stats enable + stats uri /stats +#----------------------------- +# round robin balancing between the various backends +#----------------------------- + +backend web + server web1 127.0.0.1:10080 check + server web2 127.0.0.1:10081 check + +#----------------------------- + +# API backend for serving up API content +#----------------------------- +backend api + server api1 127.0.0.1:10082 check +``` + +### 重启并重新加载 HAProxy + +HAProxy 可能还没有运行,所以发出命令 `sudo systemctl restart haproxy` 来启动(或重新启动)它。“重启” 的方法在非生产情况下是很好的,但是一旦你开始运行,你要养成使用 `sudo systemctl reload haproxy` 的习惯,以避免服务中断,即使你的配置中出现了错误。 + +例如,当你对 `/etc/haproxy/haproxy.cfg` 进行修改后,你需要用 `sudo systemctl reload haproxy` 来重新加载守护进程,使修改生效。如果有错误,它会让你知道,但继续用以前的配置运行。用 `sudo systemctl status haproxy` 检查 HAProxy 的状态。 + +如果它没有报告任何错误,你就有一个正在运行的服务器。在服务器上用 `curl` 测试,在命令行输入 `curl http://localhost/`。如果你看到 “This is Server ONE”,那就说明一切都成功了!运行 `curl` 几次,看着它在你的后端池中循环,然后看看当你输入 `curl http://localhost/api/` 时会发生什么。在 URL 的末尾添加 `/api/` 将把所有的流量发送到你池子里的第三个服务器。至此,你就有了一个正常运作的负载平衡器 + +### 检查你的统计资料 + +你可能已经注意到,配置中定义了一个叫做 `stats` 的前端,它的监听端口是 8404: + +``` +frontend stats + bind *:8404 + stats uri /stats + stats enable +``` + +在你的浏览器中,加载 `http://localhost:8404/stats`。阅读 HAProxy 的博客 [学习 HAProxy 的统计页面][9],了解你在这里可以做什么。 + +### 一个强大的负载平衡器 + +虽然我只介绍了 HAProxy 的几个功能,但你现在有了一个服务器,它可以监听 80 和 443 端口,将 HTTP 流量重定向到 HTTPS,在几个后端服务器之间平衡流量,甚至将匹配特定 URL 模式的流量发送到不同的后端服务器。你还解锁了非常强大的 HAProxy 统计页面,让你对你的系统有一个很好的概览。 + +这个练习可能看起来很简单,不要搞错了,你刚刚建立和配置了一个非常强大的负载均衡器,能够处理大量的流量。 + +为了你方便,我把本文中的所有命令放在了 [GitHub Gist][10] 中。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/11/load-balancing-haproxy + +作者:[Jim O'Connell][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jimoconnell +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/water-stone-balance-eight-8.png?itok=1aht_V5V (eight stones balancing) +[2]: https://www.haproxy.org/ +[3]: https://en.wikipedia.org/wiki/Transmission_Control_Protocol +[4]: https://varnish-cache.org/ +[5]: https://www.haproxy.com/blog/announcing-haproxy-2-2/ +[6]: https://nmap.org/ncat +[7]: https://www.redhat.com/en/topics/linux/what-is-selinux +[8]: https://gist.github.com/haproxytechblog/38ef4b7d42f16cfe5c30f28ee3304dce +[9]: https://www.haproxy.com/blog/exploring-the-haproxy-stats-page/ +[10]: https://gist.github.com/haproxytechblog/d656422754f1b5eb1f7bbeb1452d261e From 9aea00425060a86de3837dfb5e93f25a1682ae2f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 6 Feb 2022 11:44:25 +0800 Subject: [PATCH 186/334] P @wxy https://linux.cn/article-14247-1.html --- .../20201110 Load balance network traffic with HAProxy.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20201110 Load balance network traffic with HAProxy.md (99%) diff --git a/translated/tech/20201110 Load balance network traffic with HAProxy.md b/published/20201110 Load balance network traffic with HAProxy.md similarity index 99% rename from translated/tech/20201110 Load balance network traffic with HAProxy.md rename to published/20201110 Load balance network traffic with HAProxy.md index a887180eff..c0574e89dd 100644 --- a/translated/tech/20201110 Load balance network traffic with HAProxy.md +++ b/published/20201110 Load balance network traffic with HAProxy.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14247-1.html) [#]: subject: (Load balance network traffic with HAProxy) [#]: via: (https://opensource.com/article/20/11/load-balancing-haproxy) [#]: author: (Jim O'Connell https://opensource.com/users/jimoconnell) From a66b78ca79cec83750a74190e425234a267385dd Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 7 Feb 2022 05:02:24 +0800 Subject: [PATCH 187/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220206=20?= =?UTF-8?q?Write=20code=20inspired=20by=20Shakespeare=20with=20esolang?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220206 Write code inspired by Shakespeare with esolang.md --- ...de inspired by Shakespeare with esolang.md | 265 ++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100644 sources/tech/20220206 Write code inspired by Shakespeare with esolang.md diff --git a/sources/tech/20220206 Write code inspired by Shakespeare with esolang.md b/sources/tech/20220206 Write code inspired by Shakespeare with esolang.md new file mode 100644 index 0000000000..33d271abe9 --- /dev/null +++ b/sources/tech/20220206 Write code inspired by Shakespeare with esolang.md @@ -0,0 +1,265 @@ +[#]: subject: "Write code inspired by Shakespeare with esolang" +[#]: via: "https://opensource.com/article/22/2/shakespeare-esolang" +[#]: author: "Jessica Cherry https://opensource.com/users/cherrybomb" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Write code inspired by Shakespeare with esolang +====== +This above all: to thine own code be true. +![red theater seating for a movie or play][1] + +Maybe you've heard that playwright William Shakespeare contributed 1,700 new words to the English language. But did you know that he has an entire programming language as well? + +SPL (Shakespeare programming language) was created to make source code resemble Shakespeare plays. It is an esoteric language, also known as an _esolang._ An esolang is a computer programming language designed to experiment with weird ideas, create a challenge for programmers, or simply serve as a source of amusement, rather than for practical use. + +In a previous article, I shared how to build an app with the [Schwarzenegger-inspired language ArnoldC][2]. In this experiment, I'll cover a fully written "Hello World " example. If you want to follow along, you'll need GCC, `brew` or `make`, Python 2, and a lot of free time and patience. ([Python 2 has been unsupported since 2020][3], so this is just for entertainment.) + +### What is this language? + +In SLP, the code is the play, and the characters in the play are variables. If you want to assign a character, for example, Hamlet, a negative value, you put him and another character on the stage and let that character insult Hamlet. + +Having someone tell a character to listen to their heart and speak their mind produces input and output. The language contains conditionals, in which characters ask each other questions, and jumps, in which they decide to go to a specific act or scene. Characters are also stacks that can be pushed and popped. + +### Where do I get this language? + +You can download the language from the [SPL website][4], which also contains a massive amount of documentation. Once you download the tar.gz file you can get started: + + +``` + + +$ cd ~/spl +/spl$ ls +spl-1.2.1.tar.gz +/spl$ gunzip spl-1.2.1.tar.gz +/spl$ tar -xvf spl-1.2.1.tar +/spl$ cd spl-1.2.1/ +/spl/spl-1.2.1$ ls +AUTHORS  examples   libspl.c  makescanner.c  strutils.c +COPYING  grammar.y  LICENSE   NEWS           strutils.h +editor   include    Makefile  spl.h          telma.h + +``` + +Then you can run the `make` command to compile the interpreter or use `brew` for a faster install and easy precompile. I was having issues with `make`, so I ran `brew` again: + + +``` + + +$ brew install --build-from-source shakespeare +<snip> +==> Downloading +sha256:33f840e667c6ee0f674adb279e644ca4a1b3cd1606894c85d9bbce1b5acc0273 + +==> make install +🍺  /home/linuxbrew/.linuxbrew/Cellar/shakespeare/ \ +1.2.1: 9 files, 154.1KB, built in 1 second +==> Running `brew cleanup shakespeare`... +Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP. +Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`). + +``` + +### What's next? + +Once you've installed SPL, get the other dependencies, starting with Python 2. You can install Python 2 with any package manager. Next, grab a C compiler that uses Python for the SPL files, which can be downloaded from the [SPL GitHub repository][5]. Once you've downloaded the files, just unzip and use them as needed from the directory. + +In the base examples, we can take one of the premade files. In this case, I'll grab Hello World to test the compiler and run the code. Below are the commands and output. + + +``` + + +/spl/Spl-master$ python2 splc.py ../spl-1.2.1/ \ +examples/hello.spl > hello.c +/spl/Spl-master$ gcc hello.c -lm +/spl/Spl-master$ ./a.out + +Hello World! + +``` + +As you can see, I used the compiler to convert the file to C, then used `gcc` using flags for linker options to use the library and the -m flag for the target file. + +You can see how the entire Hello World SPL was written by going to the SPL website. + +### How to add some numbers + +In this section, I'll explain how to add up numbers. Get ready—this may take a while. + +Start by creating a file and giving your play a title: + + +``` + + +/spl/Spl-master$ vi math.spl + +Adding multiple numbers together. +~       +~         +~       +~         +~       +~         +~         +~       +~         +"math.spl" [New File] + +``` + +Next, give the play some characters. In this case, I'm choosing two from a list of acceptable characters that can be found in the SPL GitHub repository. These two characters will be doing some basic addition: 2+2=4. + +Start by introducing them. The introductions have no importance, so you can introduce them as you please. Feel free to be silly: + + * Arthur, a man who has been written about one too many times and has too many movies + * Cleopatra, a lady who has been written about, but the stories are usually only about who she dated + + + +Next, set up your act and scene: + + * To create an act, type `Act`, the act number in Roman numerals, a colon, then a name for the act followed by a period. The act can be named anything you can think of. + * To create a scene, type `Scene`, the scene number in Roman numerals, a colon, and then a name followed by a period. Once again, you are free to choose any name you would like. + + + +For example: + + * Act I: This is the only act we'll have. + * Scene I: Arthur and Cleopatra are assigned user-inputted values. + + + +Type `[Enter Cleopatra and Arthur] `to bring your characters onto the stage. + +Now that everyone is in the room, you need to set up the input values. Characters in SPL are set up to have "NAME:" followed by a properly punctuated sentence. For input values, the line used is "Listen to your heart." When the input is gathered, the speaking character has been assigned the value. + +In this case, I set it up with some interesting sentences. Note that only two characters can be in a scene at a time. + + +``` + + +[Enter Cleopatra and Arthur] + +Cleopatra: +   Listen to your heart. + +Arthur: +     LISTEN to your heart! + +``` + +Now that the inputs are ready, it is time to move on to Scene II, where the math happens. + +`Scene II: These two become a math machine` + +To add the values, set up the store values in each character. One character will then do math by collecting input from the other. The command for addition is `You are the sum of yourself and I.` Just a reminder that punctuation does matter: I spent 20 minutes not noticing the missing punctuation during testing. + + +``` + + +Arthur: +     You are the sum of yourself and I. + +``` + +In Scene III, we'll have Cleopatra output her value into standard output. To do this, you must have the other character in the scene tell her to `Open your heart.` If you sum the values into one character, the other character in the scene should be the one who says, `Open your heart.` + +`Scene III: Cleopatra will open her heart.` + + +``` + + +Arthur: +     Open your heart. + +``` + +To exit the program, use `[Exeunt]`. You can also have the characters exit using `[Exit NAME and NAME]`, but a single word feels easier to me. + +In the end, your program should look like this: + + +``` + + +Adding multiple numbers together. + +Arthur, a man who has been written about one too many times \ +and has too many movies. +Cleopatra, a lady who has been written about but usually the \ +stories are only about who she dated. + +     Act I: This is the only one we'll have. +     Scene I: Arthur and Cleopatra are assigned user-inputted values. + +[Enter Cleopatra and Arthur] + +Cleopatra: +   Listen to your heart. + +Arthur: +     LISTEN to your heart! + +     Scene II: These two become a math machine. + +Arthur: +     You are the sum of yourself and I. + +     Scene III: Cleopatra will open her heart. + +Arthur: +     Open your heart. + +[Exeunt] + +``` + +To run your new program, do the three-step compile and play. + + +``` + + +/spl/Spl-master$ python2 splc.py math.spl > math.c +/spl/Spl-master$ gcc math.c -lm + +/spl/Spl-master$ ./a.out +2 +2 +4 + +``` + +### To code or not to code, that is the question + +This small project was definitely time-consuming and completely superfluous for writing up a simple math script. Doing the whole thing with user input echoing an actual quote would take even more time. That said, if you're feeling Shakesperian, you can set up an entire happy little play that's a program. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/shakespeare-esolang + +作者:[Jessica Cherry][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/cherrybomb +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/felix-mooneeram-unsplash.jpg?itok=BzU7BPAg (red theater seating for a movie or play) +[2]: https://opensource.com/article/22/2/arnoldc-create-app +[3]: https://opensource.com/article/19/11/end-of-life-python-2 +[4]: http://shakespearelang.sourceforge.net/ +[5]: https://github.com/drsam94/Spl From de7bc026963c49c70a12c7c05979e588ba796846 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 7 Feb 2022 08:50:12 +0800 Subject: [PATCH 188/334] translated --- ...lve Wordle using the Linux command line.md | 205 ------------------ ...lve Wordle using the Linux command line.md | 204 +++++++++++++++++ 2 files changed, 204 insertions(+), 205 deletions(-) delete mode 100644 sources/tech/20220116 Solve Wordle using the Linux command line.md create mode 100644 translated/tech/20220116 Solve Wordle using the Linux command line.md diff --git a/sources/tech/20220116 Solve Wordle using the Linux command line.md b/sources/tech/20220116 Solve Wordle using the Linux command line.md deleted file mode 100644 index 7fb4e45120..0000000000 --- a/sources/tech/20220116 Solve Wordle using the Linux command line.md +++ /dev/null @@ -1,205 +0,0 @@ -[#]: subject: "Solve Wordle using the Linux command line" -[#]: via: "https://opensource.com/article/22/1/word-game-linux-command-line" -[#]: author: "Jim Hall https://opensource.com/users/jim-hall" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Solve Wordle using the Linux command line -====== -Use the Linux grep and fgrep commands to win your favorite word-based -guessing games. -![Linux keys on the keyboard for a desktop computer][1] - -I've recently become a little obsessed with an online word puzzle game in which you have six attempts to guess a random five-letter word. The word changes every day, and you can only play once per day. After each guess, each of the letters in your guess is highlighted: gray means that letter does not appear in the mystery word, yellow means that letter appears in the word but not at that position, and green means the letter appears in the word at that correct position. - -Here's how you can use the Linux command line to help you play guessing games like Wordle. I used this method to help me solve the January 6 puzzle: - -### First try - -Linux systems keep a dictionary of words in the `/usr/share/dict/words` file. This is a very long plain text file. My system's words file has over 479,800 entries in it. The file contains both plain words and proper nouns (names, places, and so on). - -To start my first guess, I just want a list of plain words that are exactly five letters long. To do that, I use this `grep` command: - - -``` -`$ grep '^[a-z][a-z][a-z][a-z][a-z]$' /usr/share/dict/words > myguess` -``` - -The `grep` command uses regular expressions to perform searches. You can do a lot with regular expressions, but to help me solve Wordle, I only need the basics: The `^` means the start of a line, and the `$` means the end of a line. In between, I've specified five instances of `[a-z]`, which indicates any lowercase letter from a to z. - -I can also use the `wc` command to see my list of possible words is "only" 15,000 words: - - -``` - - -$ wc -l myguess -15034 myguess - -``` - -From that list, I picked a random five-letter word: _acres_. The _a_ was set to yellow, meaning that letter exists somewhere in the mystery word but not in the first position. The other letters are gray, so I know they don't exist in the word of the day. - -![acres word attempt][2] - -Jim Hall (CC BY-SA 4.0) - -### Second try - -For my next guess, I want to get a list of all words that contain an _a_, but not in the first position. My list should also not include the letters _c_, _r_, _e_, or _s_. Let's break this down into steps: - -To get a list of all words with an a, I use the `fgrep` (fixed strings grep) command. The `fgrep` command also searches for text like `grep`, but without using regular expressions: - - -``` -`$ fgrep a myguess > myguess2` -``` - -That brings my possible list of next guesses down from 15,000 words to 6,600 words: - - -``` - - -$ wc -l myguess myguess2 - 15034 myguess -  6634 myguess2 - 21668 total - -``` - -But that list of words also includes the letter _a_ in the first position, which I don't want. The game already indicated the letter _a_ exists in some other position. I can modify my command with `grep` to look for words containing some other letter in the first position. That narrows my possible guesses to just 5,500 words: - - -``` - - -$ fgrep a myguess | grep '^[b-z]' > myguess2 -$ wc -l myguess myguess2 - 15034 myguess -  5566 myguess2 - 20600 total - -``` - -But I know the mystery word also does not include the letters _c_, _r_, _e_, or _s_. I can use another `grep` command to omit those letters from the search: - - -``` - - -$ fgrep a myguess | grep '^[b-z]' | grep -v '[cres]' > myguess2 -$ wc -l myguess myguess2 -15034 myguess - 1257 myguess2 -16291 total - -``` - -The `-v` option means to invert the search, so `grep` will only return the lines that do not match the regular expression `[cres]` or the single list of letters _c_, _r_, _e_, or _s_. With this extra `grep` command, I've narrowed my next guess considerably to only 1,200 possible words with an a somewhere but not in the first position, and that do not contain _c_, _r_, _e_, or _s_. - -After viewing the list, I decided to try the word _balmy_. - -![balmy word attempt][3] - -Jim Hall (CC BY-SA 4.0) - -### Third try - -This time, the letters _b_ and _a_ were highlighted in green, meaning I have those letters in the correct position. The letter _l_ was yellow, so that letter exists somewhere else in the word, but not in that position. The letters _m_ and _y_ are gray, so I can eliminate those from my next guess. - -To identify my next list of possible words, I can use another set of `grep` commands. I know the word starts with _ba_, so I can begin my search there: - - -``` - - -$ grep '^ba' myguess2 > myguess3 -$ wc -l myguess3 -77 myguess3 - -``` - -That's only 77 words! I can narrow that further by looking for words that also contain the letter _l_ in anywhere but the third position: - - -``` - - -$ grep '^ba[^l]' myguess2 > myguess3 -$ wc -l myguess3 -61 myguess3 - -``` - -The `^` inside the square brackets `[^l]` means not this list of letters, so not the letter _l_. That brings my list of possible words to 61, not all of which contain the letter _l_, which I can eliminate using another `grep` search: - - -``` - - -$ grep '^ba[^l]' myguess2 | fgrep l > myguess3 -$ wc -l myguess3 -10 myguess3 - -``` - -Some of those words might contain the letters _m_ and _y_, which are not in today's mystery word. I can remove those from my list of guesses with one more inverted `grep` search: - - -``` - - -$ grep '^ba[^l]' myguess2 | fgrep l | grep -v '[my]' > myguess3 -$ wc -l myguess3 -7 myguess3 - -``` - -My list of possible words is very short now, only seven words! - - -``` - - -$ cat myguess3 -babul -bailo -bakal -bakli -banal -bauld -baulk - -``` - -I'll pick _banal_ as a likely word for my next guess, which happened to be correct. - -![banal word attempt][4] - -Jim Hall (CC BY-SA 4.0) - -### The power of regular expressions - -The Linux command line provides powerful tools to help you do real work. The `grep` and `fgrep` commands offer great flexibility in scanning lists of words. For a word-based guessing game, `grep` helped identify a list of 15,000 possible words of the day. After guessing and knowing what letters did and did not appear in the mystery word, `grep` and `fgrep` helped narrow the options to 1,200 words and then only seven words. That's the power of the command line. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/word-game-linux-command-line - -作者:[Jim Hall][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jim-hall -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_keyboard_desktop.png?itok=I2nGw78_ (Linux keys on the keyboard for a desktop computer) -[2]: https://opensource.com/sites/default/files/acres.png (acres word attempt) -[3]: https://opensource.com/sites/default/files/balmy.png (balmy word attempt) -[4]: https://opensource.com/sites/default/files/banal.png (banal word attempt) diff --git a/translated/tech/20220116 Solve Wordle using the Linux command line.md b/translated/tech/20220116 Solve Wordle using the Linux command line.md new file mode 100644 index 0000000000..8ee4f8fc49 --- /dev/null +++ b/translated/tech/20220116 Solve Wordle using the Linux command line.md @@ -0,0 +1,204 @@ +[#]: subject: "Solve Wordle using the Linux command line" +[#]: via: "https://opensource.com/article/22/1/word-game-linux-command-line" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +用 Linux 命令行解决 Wordle 问题 +====== +使用 Linux 的 grep 和 fgrep 命令来赢得你最喜欢的基于单词的猜测游戏。 +![Linux keys on the keyboard for a desktop computer][1] + +我最近有点迷恋上了一个在线单词猜谜游戏,在这个游戏中,你有六次机会来猜一个随机的五个字母的单词。这个词每天都在变化,而且你每天只能玩一次。每次猜测后,你猜测中的每个字母都会被高亮显示:灰色表示该字母没有出现在神秘单词中,黄色表示该字母出现在单词中,但不在那个位置,绿色表示该字母出现在单词中的那个正确位置。 + +下面是你如何使用 Linux 命令行来帮助你玩像 Wordle 这样的猜测游戏。我用这个方法来帮助我解决 1 月 6 日的谜题: + +### 第一次尝试 + +Linux系统在 `/usr/share/dict/words` 文件中保存了一个单词词典。这是一个很长的纯文本文件。我的系统的单词文件里有超过 479,800 个条目。该文件既包含纯文本,也包含专有名词(名字、地点等等)。 + +为了开始我的第一次猜测,我只想得到一个长度正好是五个字母的纯文本词的列表。要做到这一点,我使用这个 `grep` 命令: + + +``` +`$ grep '^[a-z][a-z][a-z][a-z][a-z]$' /usr/share/dict/words > myguess` +``` + +`grep` 命令使用正则表达式来进行搜索。你可以用正则表达式做很多事情,但为了帮助我解决 Wordle 问题,我只需要基本的东西。`^` 表示一行的开始,`$` 表示一行的结束。在两者之间,我指定了五个 `[a-z]` 的实例,表示从 a 到 z 的任何小写字母。 + +我还可以使用 `wc` 命令来查看我的可能单词列表,“只有” 15,000 个单词: + + +``` + + +$ wc -l myguess +15034 myguess + +``` + +从这个列表中,我随机挑选了一个五个字母的单词:_acres_。_a_ 被设置为黄色,意味着该字母存在于神秘单词的某处,但不在第一位置。其他字母是灰色的,所以我知道它们并不存在于今天的单词中。 + +![acres word attempt][2] + +Jim Hall(CC BY-SA 4.0) + +### 第二次尝试 + +对于我的下一个猜测,我想得到一个包含 _a_ 的所有单词的列表,但不是在第一位置。我的列表也不应该包括字母 _c_、_r_、_e_或_s_。让我们把这个问题分解成几个步骤。 + +为了得到所有带 a 的单词的列表,我使用 `fgrep`(固定字符串 grep)命令。`fgrep` 命令也像 `grep` 一样搜索文本,但不使用正则表达式: + + +``` +`$ fgrep a myguess > myguess2` +``` + +这使我的下一个猜测的可能列表从 15,000 个字下降到 6,600 个字: + + +``` + + +$ wc -l myguess myguess2 + 15034 myguess + 6634 myguess2 + 21668 total + +``` + +但是这个单词列表中的第一个位置也有字母 _a_,这是我不想要的。游戏已经表明字母 _a_ 存在于其他位置。我可以用 `grep` 修改我的命令,以寻找在第一个位置包含其他字母的词。这就把我可能的猜测缩小到了 5500 个单词: + + +``` + + +$ fgrep a myguess | grep '^[b-z]' > myguess2 +$ wc -l myguess myguess2 + 15034 myguess + 5566 myguess2 + 20600 total + +``` + +但我知道这个神秘的词也不包括字母 _c_、_r_、_e_ 或 _s_。我可以使用另一个 `grep` 命令,在搜索中省略这些字母: + + +``` + + +$ fgrep a myguess | grep '^[b-z]' | grep -v '[cres]' > myguess2 +$ wc -l myguess myguess2 +15034 myguess + 1257 myguess2 +16291 total + +``` + +`-v` 选项意味着反转搜索,所以 `grep` 将只返回不符合正则表达式 `[cres]` 或单列字母 _c_、_r_、_e_ 或 _s_ 的行。有了这个额外的 `grep` 命令,我把下一个猜测的范围大大缩小到只有 1200 个可能的单词,这些单词在某处有一个 a,但不在第一位置,并且不包含 _c_, _r_, _e_, 或 _s_。 + +在查看了这个列表后,我决定尝试一下 _balmy_ 这个词。 + +![balmy word attempt][3] + +Jim Hall(CC BY-SA 4.0) + +### 第三次尝试 + +这一次,字母 _b_ 和 _a_ 被高亮显示为绿色,意味着我把这些字母放在了正确的位置。字母 _l_ 是黄色的,所以这个字母存在于单词的其他地方,但不是在那个位置。字母 _m_ 和 _y_ 是灰色的,所以我可以从我的下一个猜测中排除这些。 + +为了确定下一个可能的单词列表,我可以使用另一组 `grep` 命令。我知道这个词以 _ba_ 开头,所以我可以从这里开始搜索: + + +``` + + +$ grep '^ba' myguess2 > myguess3 +$ wc -l myguess3 +77 myguess3 + +``` + +这只有 77 个词! 我可以进一步缩小范围,寻找除第三位外还包含字母 _l_ 的词: + + +``` + + +$ grep '^ba[^l]' myguess2 > myguess3 +$ wc -l myguess3 +61 myguess3 + +``` + +方括号 `[^l]` 内的 `^` 表示不是这个字母列表,即不是字母 _l_。这使我的可能单词列表达到 61 个,并非所有的单词都包含字母 _l_,我可以用另一个 `grep` 搜索来消除这些单词: + + +``` + + +$ grep '^ba[^l]' myguess2 | fgrep l > myguess3 +$ wc -l myguess3 +10 myguess3 + +``` + +这些词中有些可能包含字母 _m_ 和 _y_,而这些字母并不在今天的神秘词中。我可以再进行一次反转 `grep` 搜索,将它们从我的猜测列表中删除: + + +``` + + +$ grep '^ba[^l]' myguess2 | fgrep l | grep -v '[my]' > myguess3 +$ wc -l myguess3 +7 myguess3 + +``` + +我的可能的单词列表现在非常短,只有七个单词! + + +``` + + +$ cat myguess3 +babul +bailo +bakal +bakli +banal +bauld +baulk + +``` + +我选择 _banal_ 作为我下一次猜测的可能的词,而这恰好是正确的。 + +![banal word attempt][4] + +Jim Hall(CC BY-SA 4.0) + +### 正则表达式的力量 + +Linux 的命令行提供了强大的工具来帮助你完成实际工作。`grep` 和 `fgrep` 命令在扫描单词列表方面提供了极大的灵活性。对于一个基于单词的猜测游戏,`grep` 帮助识别了一个包含15000 个可能的单词的列表。在猜测并知道哪些字母出现在神秘的单词中,哪些没有,`grep` 和 `fgrep` 帮助将选项缩小到 1200 个单词,然后只剩下 7 个单词。这就是命令行的力量。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/word-game-linux-command-line + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_keyboard_desktop.png?itok=I2nGw78_ (Linux keys on the keyboard for a desktop computer) +[2]: https://opensource.com/sites/default/files/acres.png (acres word attempt) +[3]: https://opensource.com/sites/default/files/balmy.png (balmy word attempt) +[4]: https://opensource.com/sites/default/files/banal.png (banal word attempt) From 400d9511251fd2aa5b68fb75403372b35eb89a5a Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 7 Feb 2022 08:52:01 +0800 Subject: [PATCH 189/334] translating --- ...are Privacy Day- Use Delta Chat, an open source chat tool.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md b/sources/tech/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md index 3296109948..f60ccc63a3 100644 --- a/sources/tech/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md +++ b/sources/tech/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/1/delta-chat-software-privacy-day" [#]: author: "Alan Smithee https://opensource.com/users/alansmithee" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 5eb98ca5674d1ba755ca9b68a83a8f6f45c83fd9 Mon Sep 17 00:00:00 2001 From: imgradeone Date: Mon, 7 Feb 2022 10:30:01 +0800 Subject: [PATCH 190/334] =?UTF-8?q?=E8=AE=A4=E9=A2=86:=20Brave=20vs=20Viva?= =?UTF-8?q?ldi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Brave vs Vivaldi- Which Chromium-Based Browser is Better.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md b/sources/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md index 1086278609..4bb5790258 100644 --- a/sources/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md +++ b/sources/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/brave-vs-vivaldi/" [#]: author: "Ankush Das https://itsfoss.com/author/ankush/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "imgradeone" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From d715bc4961b4e992e8a087dcfdafcb73b28124a8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 7 Feb 2022 11:10:59 +0800 Subject: [PATCH 191/334] R @robsean --- ... a build system with CMake and VSCodium.md | 142 ++++++------------ 1 file changed, 47 insertions(+), 95 deletions(-) diff --git a/translated/tech/20220112 Set up a build system with CMake and VSCodium.md b/translated/tech/20220112 Set up a build system with CMake and VSCodium.md index bc231a2340..b92edd9148 100644 --- a/translated/tech/20220112 Set up a build system with CMake and VSCodium.md +++ b/translated/tech/20220112 Set up a build system with CMake and VSCodium.md @@ -3,46 +3,39 @@ [#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" [#]: collector: "lujun9972" [#]: translator: "robsean" -[#]: reviewer: " " +[#]: reviewer: "wxy" [#]: publisher: " " [#]: url: " " 使用 CMake 和 VSCodium 设置一个构建系统 ====== -提供一个适当的 CMake 配置文件来使其他人可以更容易地构建、使用和贡献你的工程。 -![woman on laptop sitting at the window][1] -这篇文章是关于 C/C++ 开发系列的开发工具的一部分。如果你从一个功能强大的工具链开始构建你的工程,你将从一个更快和更安全的开发环境中受益。除此之外,它会使别人更容易地参与你的工程。在这篇文章中,我将准备一个基于 [CMake][2] 和 [VSCodium][3] 的 C/C++ 构建系统。像往常一样,相关的示例代码可以在 [GitHub][4] 上找到。 +> 提供一个适当的 CMake 配置文件来使其他人可以更容易地构建、使用和贡献你的项目。 + +![](https://img.linux.net.cn/data/attachment/album/202202/07/111033gqa36hy5hzvhjxd0.jpg) + +这篇文章是使用开源 DevOps 工具进行 C/C++ 开发系列文章的一部分。如果你从一开始就把你的项目建立在一个功能强大的工具链上,你的开发会更快和更安全。除此之外,这会使别人更容易地参与你的项目。在这篇文章中,我将搭建一个基于 [CMake][2] 和 [VSCodium][3] 的 C/C++ 构建系统。像往常一样,相关的示例代码可以在 [GitHub][4] 上找到。 我已经测试了在本文中描述的步骤。这是一种适用于所有平台的解决方案。 -### 为什么是 CMake ? +### 为什么用 CMake ? -[CMake][5] 是一个构建系统生成器,为你的工程创建 Makefile 。乍一看简单的东西可能乍一看相当地复杂。在较高的层次上,你可以定义你的工程 (可执行文件,库) 的各个部分,编译选项 (C/C++ 标准,优化,架构),依赖关系项 (头文件,库),和文件级的工程结构。CMake 使用的这些信息可以在文件 `CMakeLists.txt` 中获取,它使用一种特殊的描述性语言编写。当 CMake 处理这个文件时,它将自动地侦测在你的系统上已安装的编译器,并创建一个用于启动它的 Makefile 文件。 +[CMake][5] 是一个构建系统生成器,可以为你的项目创建 Makefile。乍一看简单的东西可能相当地复杂。在较高的层次上,你可以定义你的项目的各个部分(可执行文件、库)、编译选项(C/C++ 标准、优化、架构)、依赖关系项(头文件、库),和文件级的项目结构。CMake 使用的这些信息可以在文件 `CMakeLists.txt` 中获取,它使用一种特殊的描述性语言编写。当 CMake 处理这个文件时,它将自动地侦测在你的系统上已安装的编译器,并创建一个用于启动它的 Makefile 文件。 -此外,在 `CMakeLists.txt` 中描述的配置,能够被很多编辑器读取,像 QtCreator, VSCodium/VSCode, 或 Visual Studio 。 +此外,在 `CMakeLists.txt` 中描述的配置,能够被很多编辑器读取,像 QtCreator、VSCodium/VSCode 或 Visual Studio 。 ### 示例程序 -我们的示例程序是一个简单的命令行工具:它获取一个整数来作为一个参数,输出一个从 1 到所提供输入值的范围内的随机排列的数字。 - +我们的示例程序是一个简单的命令行工具:它接受一个整数来作为参数,输出一个从 1 到所提供输入值的范围内的随机排列的数字。 ``` - - $ ./Producer 10 -3 8 2 7 9 1 5 10 6 4  - +3 8 2 7 9 1 5 10 6 4 ``` -在我们的可执行文件中的 `main()` 函数,如果没有提供一个值 (或者一个不能被处理的值) 的话,我们只处理输入的参数,并退出程序。 - -**producer.cpp** - +在我们的可执行文件中的 `main()` 函数,我们只处理输入的参数,如果没有提供一个值(或者一个不能被处理的值)的话,就退出程序。 ``` - - int main(int argc, char** argv){ if (argc != 2) { @@ -51,7 +44,7 @@ int main(int argc, char** argv){ } int range = 0; - + try{ range = std::stoi(argv[1]); }catch (const std::invalid_argument&){ @@ -72,18 +65,13 @@ int main(int argc, char** argv){ std::stringstream data; std::cout << Generator::generate(data, range).rdbuf(); } +``` +*producer.cpp* + +实际的工作是在 [生成器][6] 中完成的,它将被编译,并将作为一个静态库来链接到我们的`Producer` 可执行文件。 ``` - -实际的工作是在 [Generator][6] 中完成的,它将被编译,并将作为一个静态库来链接到我们的`Producer` 可执行文件。  - -**Generator.cpp** - - -``` - - -std::stringstream &Generator::generate(std::stringstream &astream, const int range) { +std::stringstream &Generator::generate(std::stringstream &stream, const int range) { std::vector data(range); std::iota(data.begin(), data.end(), 1); @@ -99,80 +87,64 @@ std::stringstream &Generator::generate(std::stringstream &astream, const int ran return stream; } - ``` -函数 `generate` 引用一个 [std::stringstream][7] 和一个整数来作为一个参数。 以整数 `range` 的值 _n_ 为基础, 制作一个在 1 到 _n_ 的范围之中的整数向量,并随后排列。接下来排序的向量值转换成一个字符串,并推送到 `stringstream` 之中。该函数返回与作为参数传递的 `stringstream` 引用相同。 +*Generator.cpp* -### CMakeLists.txt 的顶部层次 +函数 `generate` 引用一个 [std::stringstream][7] 和一个整数来作为一个参数。根据整数 `range` 的值 `n`,制作一个在 `1` 到 `n` 的范围之中的整数向量,并随后打乱。接下来打乱的向量值转换成一个字符串,并推送到 `stringstream` 之中。该函数返回与作为参数传递相同的 `stringstream` 引用。 -[CMakeLists.txt][8] 的顶部层次是我们工程的入口点。在子目录中有几个 `CMakeLists.txt` 文件 (例如,与工程所相关联的库或其它可执行文件)。我们先一步一步地读破 `CMakeLists.txt` 的顶部层次。 +### 顶层的 CMakeLists.txt -第一行告诉我们 CMake 的版本, CMake 需要处理的文件,工程名称,和其版本,以及意欲使用的 C++ 标准。 +顶层的 [CMakeLists.txt][8] 的是我们项目的入口点。在子目录中可能有多个 `CMakeLists.txt` 文件(例如,与项目所相关联的库或其它可执行文件)。我们先一步一步地浏览顶层的 `CMakeLists.txt`。 +第一行告诉我们处理文件所需要的 CMake 的版本、项目名称及其版本,以及预定的 C++ 标准。 ``` - - cmake_minimum_required(VERSION 3.14) project(CPP_Testing_Sample VERSION 1.0) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED True) - ``` -我们告诉 CMake 使用下面的代码行来查看子目录 `Generator` 。这个子目录包括构建 `Generator` 库的所有信息,并包含它自身的一个 `CMakeLists.txt` 。我们很快就会谈到这个问题。 - +我们用下面一行告诉 CMake 去查看子目录 `Generator`。这个子目录包括构建 `Generator` 库的所有信息,并包含它自身的一个 `CMakeLists.txt` 。我们很快就会谈到这个问题。 ``` -`add_subdirectory(Generator)` +add_subdirectory(Generator) ``` -现在,我们将涉及一个绝对特别的功能: [CMake 模块][9] 。加载模块可以扩展 CMake 功能。在我们的工程中,我们将加载模块 [FetchContent][10] ,这能使我们能够在 CMake 运行时下载外部的资源,在我们的示例中是 [GoogleTest][11] 。 - +现在,我们将涉及一个绝对特别的功能: [CMake 模块][9] 。加载模块可以扩展 CMake 功能。在我们的项目中,我们加载了 [FetchContent][10] 模块,这能使我们能够在 CMake 运行时下载外部的资源,在我们的示例中是 [GoogleTest][11] 。 ``` - - include(FetchContent) FetchContent_Declare( googletest - URL + URL https://github.com/google/googletest/archive/bb9216085fbbf193408653ced9e73c61e7766e80.zip ) FetchContent_MakeAvailable(googletest) - ``` -在接下来的部分中,我们将会做一些我们通常在一个普通的 Makefile 中会做的事: 具体指定哪个库来构建,它们相关的源文件文件,应该链接到的库,和编译器能够在哪些目录中查找头文件。 - +在接下来的部分中,我们会做一些我们通常在普通的 Makefile 中会做的事: 指定要构建的二进制文件、它们相关的源文件、应该链接的库,以及编译器可以找到头文件的目录。 ``` - - add_executable(Producer Producer.cpp) target_link_libraries(Producer PUBLIC Generator) target_include_directories(Producer PUBLIC "${PROJECT_BINARY_DIR}") - ``` -通过下面的语句,我们使 CMake 来在 build 文件夹中创建一个名称为 `compile_commands.json` 的文件。这个文件为工程的每个文件揭示编译器选项。在 VSCodium 中加载,这个文件告知 IntelliSense 功能在哪里查找头文件 (查看 [文档][12]) 。 - +通过下面的语句,我们使 CMake 来在构建文件夹中创建一个名称为 `compile_commands.json` 的文件。这个文件会展示项目的每个文件的编译器选项。在 VSCodium 中加载该文件,会告知 IntelliSense 功能在哪里查找头文件(查看 [文档][12])。 ``` -`set(CMAKE_EXPORT_COMPILE_COMMANDS ON)` +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) ``` -最后的部分为我们的工程定义一些测试。工程使用先前加载的 GoogleTest 框架。单元测试的整个话题将会划归到另外一篇文章。 - +最后的部分为我们的项目定义一些测试。项目使用先前加载的 GoogleTest 框架。单元测试的整个话题将会划归到另外一篇文章。 ``` - - enable_testing() add_executable(unit_test unit_test.cpp) @@ -182,84 +154,64 @@ target_link_libraries(unit_test gtest_main) include(GoogleTest) gtest_discover_tests(unit_test) - ``` -### CMakeLists.txt 的库层次 - -现在,我们来看看包含同名库的子目录 `Generator` 中的 [CMakeLists.txt][13] 文件。这个 `CMakeLists.txt` 文件的内容更简短一些,除了单元测试相关的命令外,它仅包含 2 条语句。 +### 库层次的 CMakeLists.txt +现在,我们来看看包含同名库的子目录 `Generator` 中的 [CMakeLists.txt][13] 文件。这个 `CMakeLists.txt` 文件的内容更简短一些,除了单元测试相关的命令外,它仅包含 2 条语句。 ``` - - add_library(Generator STATIC Generator.cpp Generator.h) - target_include_directories(Generator INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) - ``` -我们使用 `add_library(...)` 来定义一个新的构建目标:静态的 `Generator` 库。我们使用语句 `target_include_directories(...)` 来把当前子目录添加到其它构建目标的头文件的搜索路径之中。我们也可以具体指定这个属性的范围为类型 `INTERFACE`:这意味着该属性仅影响链接到这个库的构建目标,而不是库本身。 +我们使用 `add_library(...)` 来定义一个新的构建目标:静态的 `Generator` 库。我们使用语句 `target_include_directories(...)` 来把当前子目录添加到其它构建目标的头文件的搜索路径之中。我们也具体指定这个属性的范围为类型 `INTERFACE`:这意味着该属性仅影响链接到这个库的构建目标,而不是库本身。 ### 开始使用 VSCodium -使用 `CMakeLists.txt` 文件中的可用信息,, IDEs like像 VSCodium 一样的 IDE 可用相应地配置构建系统。如果你还没有体验过 VSCodium 或 VS Code ,这个示例工程会是一个很好的起点。首先,转到它们的 [网站][3] ,然后针对你的系统下载最新的安装软件包。打开 VSCodium 并导航到 **Extensions** 标签页。 +通过使用 `CMakeLists.txt` 文件中的信息,像 VSCodium 一样的 IDE 可以相应地配置构建系统。如果你还没有使用 VSCodium 或 VS Code 的经验,这个示例项目会是一个很好的起点。首先,转到它们的 [网站][3] ,然后针对你的系统下载最新的安装软件包。打开 VSCodium 并导航到 “扩展Extensions” 标签页。 -为了正确地构建,调试和测试工程,搜索下面的扩展并安装它们。 +为了正确地构建、调试和测试项目,搜索下面的扩展并安装它们: ![Searching extensions][14] -(Stephan Avenwedde, [CC BY-SA 4.0][15]) - -如果尚未完成,通过单击起始页的 **Clone Git Repository** 来复刻存储库。 +如果尚未完成,通过单击起始页的 “克隆 Git 存储库Clone Git Repository” 来克隆存储库。 ![Clone Git repository][16] -(Stephan Avenwedde, [CC BY-SA 4.0][15]) - 或者手动输入: - ``` -`git clone https://github.com/hANSIc99/cpp_testing_sample.git` +git clone https://github.com/hANSIc99/cpp_testing_sample.git ``` -之后,通过输入 tag _devops_1_ 来签出每一个: - +之后,通过输入如下内容来签出标签 `devops_1`: ``` -`git checkout tags/devops_1` +git checkout tags/devops_1 ``` -或者,通过单击 **main** 分支按钮 (红色框) ,并从下拉菜单 (黄色框) 中选择标签。 +或者,通过单击 “main” 分支按钮(红色框),并从下拉菜单(黄色框)中选择标签。 ![Select devops_1 tag][17] -(Stephan Avenwedde, [CC BY-SA 4.0][15]) - -在你打开 VSCodium 内部中的存储库的根文件夹后,`CMake Tools` 扩展会侦测 `CMakeLists.txt` 文件并立即扫描适合你的系统的编译器。你现在可以单击屏幕的底部的 **Build** 按钮 (红色框) 来开始构建过程。你也可以通过单击底部区域的按钮 (黄色框) 标记来更改编译器,它显示当前活动的编译器。 +在你打开 VSCodium 内部中的存储库的根文件夹后,CMake Tools 扩展会侦测 `CMakeLists.txt` 文件并立即扫描你的系统寻找合适的编译器。你现在可以单击屏幕的底部的 “构建Build” 按钮(红色框)来开始构建过程。你也可以通过单击底部区域的按钮(黄色框)标记来更改编译器,它显示当前活动的编译器。 ![Build compiler][18] -(Stephan Avenwedde, [CC BY-SA 4.0][15]) - -为开始调试 `Producer` 可执行文件,单击调试器符号 (黄色框) 并从下拉菜单中选择 **Debug Producer** (绿色框)。 +要开始调试 `Producer` 可执行文件,单击调试器符号(黄色框)并从下拉菜单中选择 “调试Debug Producer”(绿色框)。 ![Starting the debugger][19] -(Stephan Avenwedde, [CC BY-SA 4.0][15]) - -如上所述,`Producer` 可执行文件要求元素的数字作为一个命令行的参数。命令行参数可以在 `.vscode/launch.json.` 中具体指定。 +如上所述,`Producer` 可执行文件要求将元素的数量作为一个命令行的参数。命令行参数可以在 `.vscode/launch.json` 中具体指定。 ![Command-line arguments][20] -(Stephan Avenwedde, [CC BY-SA 4.0][15]) - -明白了吗,你现在能够构建和调试工程了。 +好了,你现在能够构建和调试项目了。 ### 结束语 -归功于 CMake ,不管你正在运行哪种操作系统,上述步骤应该都能工作。特别是使用与 CMake 相关的扩展,VSCodium 变成看一个强大的 IDE 。我没有提及 VSCodium 的 Git 集成,是因为你已经能够在网络上查找很多的资源。我希望你可以看到:提供一个适当的 CMake 配置文件可以使其他人更容易地构建,使用和贡献于你的工程。在未来的一篇文字中,我将看看单元测试和 CMake 的测试实用程序 `ctest` 。 +归功于 CMake ,不管你正在运行哪种操作系统,上述步骤应该都能工作。特别是使用与 CMake 相关的扩展,VSCodium 变成了一个强大的 IDE 。我没有提及 VSCodium 的 Git 集成,是因为你已经能够在网络上查找很多的资源。我希望你可以看到:提供一个适当的 CMake 配置文件可以使其他人更容易地构建、使用和贡献于你的项目。在未来的文章中,我将介绍单元测试和 CMake 的测试实用程序 `ctest` 。 -------------------------------------------------------------------------------- @@ -268,7 +220,7 @@ via: https://opensource.com/article/22/1/devops-cmake 作者:[Stephan Avenwedde][a] 选题:[lujun9972][b] 译者:[robsean](https://github.com/robsean) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 5f5f3f93a6984adb641554381cfcba7b253af133 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 7 Feb 2022 11:12:30 +0800 Subject: [PATCH 192/334] P @robsean https://linux.cn/article-14249-1.html --- .../20220112 Set up a build system with CMake and VSCodium.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20220112 Set up a build system with CMake and VSCodium.md (99%) diff --git a/translated/tech/20220112 Set up a build system with CMake and VSCodium.md b/published/20220112 Set up a build system with CMake and VSCodium.md similarity index 99% rename from translated/tech/20220112 Set up a build system with CMake and VSCodium.md rename to published/20220112 Set up a build system with CMake and VSCodium.md index b92edd9148..762f7b55ec 100644 --- a/translated/tech/20220112 Set up a build system with CMake and VSCodium.md +++ b/published/20220112 Set up a build system with CMake and VSCodium.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "robsean" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14249-1.html" 使用 CMake 和 VSCodium 设置一个构建系统 ====== From 2c07d2b47fb93be5b6557535c81059f275b29f33 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 7 Feb 2022 11:26:49 +0800 Subject: [PATCH 193/334] A --- ... Capture and PDF Reader with its Latest Update in 3 Years.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220202 KDE-s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years.md b/sources/news/20220202 KDE-s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years.md index 715d4d793e..ce9a936ff5 100644 --- a/sources/news/20220202 KDE-s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years.md +++ b/sources/news/20220202 KDE-s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/falkon-browser-3-2-release/" [#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 9e1a50c35f202b9f1d1c8e129de29cbfc3581b68 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 7 Feb 2022 11:46:26 +0800 Subject: [PATCH 194/334] TRP @wxy https://linux.cn/article-14250-1.html --- ...eader with its Latest Update in 3 Years.md | 90 +++++++++++++++++++ ...eader with its Latest Update in 3 Years.md | 87 ------------------ 2 files changed, 90 insertions(+), 87 deletions(-) create mode 100644 published/20220202 KDE-s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years.md delete mode 100644 sources/news/20220202 KDE-s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years.md diff --git a/published/20220202 KDE-s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years.md b/published/20220202 KDE-s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years.md new file mode 100644 index 0000000000..21fb9c5021 --- /dev/null +++ b/published/20220202 KDE-s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years.md @@ -0,0 +1,90 @@ +[#]: subject: "KDE’s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years" +[#]: via: "https://news.itsfoss.com/falkon-browser-3-2-release/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14250-1.html" + +KDE Falkon 浏览器三年来首次更新 +====== + +> Falkon 的最新版本带来了截屏功能和基于 PDFium 的 PDF 阅读器以及其他改进。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/falkon-3-2-release.png?w=1200&ssl=1) + +如果你是 KDE 的粉丝,你肯定接触过,甚至使用过 Falkon。所以,你一定会惊喜地发现,KDE 已经成功地为他们的网络浏览器发布了新的重大升级。 + +与其他主流网络浏览器不同,Falkon 的更新并不频繁。这个最新发布的版本是一个令人兴奋的更新,在间隔了近三年之后! + +补充一句,[Falkon][1] 是一个建立在 QtWebEngine 上的简单的开源网络浏览器。它最初被称为 QupZilla,后来在 KDE 旗下被重新命名为 Falkon。 + +虽然并不是新浏览器,它早在 2010 年就发布了,但它为普通用户提供了一种极简的浏览体验。 + +![][2] + +### Falkon 3.2.0 有什么新内容? + +即使你现在安装的是最新版本,Falkon 也没有定期提供安全更新。 + +因此,你可以考虑将 Falkon 作为满足特定要求的浏览器或作为辅助浏览器。 + +下面是这个版本的新内容: + +#### 截屏和 PDF 阅读器支持 + +最新的版本带来了急需的截屏功能和可选的基于 PDFium 的 PDF 阅读器。这两个都是基于 Qt 5.13 的版本。 + +#### 主题和插件 + +对下载主题和扩展的初步支持也被添加进来了,同时偏好菜单也显示了对 KDE 商店的链接。此外,用户现在也可以删除本地安装的主题和插件。 + +![][7] + +#### 书签 + +由于有了上下文菜单项,用户现在可以创建文件夹并存储书签。人们已经注意到,填充书签栏和创建顶级的书签的能力已经没有了。 + +#### 其他功能 + + * 在 Falkon 中添加的一个非常常见但又必不可少的功能是暂停或恢复下载的能力。 + * 更新的 CookieManager 现在允许同时选择一个以上的 cookie。 + * 首选项扩展现在可以筛选查找。 + * 用户现在可以通过上下文菜单分离标签。 + * 现在包括 NetworkManager 集成。 + +要了解更多关于所有的技术变化,你可以参考 [官方发布说明][3]。 + +![][4] + +### 总结 + +Falkon 的最新版本表明 KDE 仍然计划继续支持它。这对 KDE 爱好者来说是个好消息,特别是对那些使用 Falkon 的人来说。但是,现在说他们是否计划定期推送更新,使其成为日常浏览的理想选择,还为时过早。 + +如果你觉得一个简单的、轻量级的网络浏览器就可以,而且有很好的广告屏蔽功能,一个与 KDE 桌面融合的浏览器,Falkon 是一个必须尝试的东西。 + +安装是非常直接的。你可以在你的软件库中找到它,或者使用 Flatpak 或 [Snap 包][5] 安装它。如果你想知道,它也可用于 Windows 用户。 + +- [下载 Falkon 3.2.0][6] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/falkon-browser-3-2-release/ + +作者:[Rishabh Moharir][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/falkon-browser/ +[2]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/Falkon_1.png?w=1450&ssl=1 +[3]: https://www.falkon.org/2022/01/31/320-released/#disqus_thread +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/Falkon_3.png?resize=780%2C460&ssl=1 +[5]: https://snapcraft.io/falkon +[6]: https://www.falkon.org/download/ +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/falkon_2.png?w=1450&ssl=1 \ No newline at end of file diff --git a/sources/news/20220202 KDE-s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years.md b/sources/news/20220202 KDE-s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years.md deleted file mode 100644 index ce9a936ff5..0000000000 --- a/sources/news/20220202 KDE-s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years.md +++ /dev/null @@ -1,87 +0,0 @@ -[#]: subject: "KDE’s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years" -[#]: via: "https://news.itsfoss.com/falkon-browser-3-2-release/" -[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -KDE’s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years -====== - -If you’re a KDE fan, you must have certainly come across or even used Falkon. So, you must be pleasantly surprised to find out that KDE has managed to release a new major upgrade of their web browser. - -Unlike other mainstream web browsers, Falkon does not receive frequent updates. And, the latest release is an exciting update, after a gap of almost three years! - -For those unaware, [Falkon][1] is a simple open-source web browser built upon the QtWebEngine. It was initially known as QupZilla, later rebranded to Falkon under KDE. - -Although not new—being released way back in 2010—it offers a minimalistic browsing experience for the average user. - -![][2] - -### Falkon 3.2.0: What’s New? - -Even though you have the latest version available now, Falkon does not offer regular security updates. - -So, you might want to consider Falkon as a browser for specific requirements or as a secondary browser. - -Here’s what’s new with this release: - -#### Screen Capture and PDF Reader Support - -The latest release brings in much-needed support for Screen Capture and an optional PDF reader based on PDFium. Both of these are based on Qt 5.13. version. - -#### Themes and Plugins - -Initial support for downloading themes and extensions has also been added, along with the Preferences menu that displays links to the KDE store. Additionally, users can now remove locally installed themes and plugins too. - -![][2] - -#### Bookmarks - -Users can now create folders and store bookmarks thanks to a context menu item. It has been noticed that the padding of the bar and the ability to create bookmarks without a parent has been taken away. - -#### Other features - - * A very common yet essential feature added to Falkon is the ability to pause or resume downloads. - * An updated CookieManager now allows the selection of more than one cookie at the same time. - * The Preferences extensions can now be filtered. - * Users can now detach tabs via the context menu - * NetworkManager integration is now included. - - - -To know more about all the technical changes, you can refer to the [official release notes.][3] - -![][4] - -### Wrapping Up - -The latest release of Falkon shows that KDE is still planning to continue support for it. This is a piece of good news for KDE lovers, especially for those who use Falkon. But, it’s too early to say if they plan to push regular updates, making it an ideal choice for everyday browsing. - -If you’re okay with a simple and lightweight web browser with decent ad-blocking capabilities, one that blends in well with the KDE desktop, Falkon is a must-try. - -Installation is very straightforward. You can find it in your repositories or install it using the Flatpak or [Snap packages][5]. It is also available for Windows users, if you are curious. - -[Download Falkon 3.2.0][6] - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/falkon-browser-3-2-release/ - -作者:[Rishabh Moharir][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/rishabh/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/falkon-browser/ -[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ2MiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[3]: https://www.falkon.org/2022/01/31/320-released/#disqus_thread -[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ2MCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[5]: https://snapcraft.io/falkon -[6]: https://www.falkon.org/download/ From b8e208a6f693c9c40a683332cc6a37baa6d7ddc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?imgradeone=20-=20=E4=B8=80=E5=B9=B4=E7=BA=A7=E4=B9=88?= =?UTF-8?q?=E4=B9=88=E5=93=92?= Date: Mon, 7 Feb 2022 22:11:23 +0800 Subject: [PATCH 195/334] Update 20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md --- ... Which Chromium-Based Browser is Better.md | 104 +++++++++--------- 1 file changed, 53 insertions(+), 51 deletions(-) diff --git a/sources/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md b/sources/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md index 4bb5790258..e788a8614f 100644 --- a/sources/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md +++ b/sources/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md @@ -7,122 +7,124 @@ [#]: publisher: " " [#]: url: " " -Brave vs Vivaldi: Which Chromium-Based Browser is Better? +Brave vs Vivaldi:哪个浏览器更好? ====== -Brave is undoubtedly an impressive open-source web browser. +Brave,毫无疑问,是一款出色的开源网页浏览器。它也是 [适用于 Linux 的最佳网页浏览器][1] 之一。 -It is also one of the [best browsers available for Linux][1]. Vivaldi, on the other hand, has been making the rounds among Linux users for its customizability, and tab management features. +另一方面,Vivaldi 凭借其自定义能力和标签页管理功能,在 Linux 用户群中获得了不错的声誉。 -Is Vivaldi worth a try? Is it open-source? Why should you prefer Brave over it? Or should you consider using Vivaldi? +Vivaldi 是否值得一试?它开源吗?为什么你会更喜欢 Brave 而不是它?或者,是否应该考虑使用 Vivaldi 呢? -Here, I shall answer all those questions, comparing both of them side-by-side. +在此,我将解答上述所有问题,并对这两款浏览器进行并列比较。 -### User Interface +### 用户界面 ![][2] -Both the web browser offer different user experiences, even if they are based on open-source Chromium code. +虽然这两款网页浏览器都是基于开源的 Chromium 代码,但是它们提供了不同的用户体验。 -Brave focuses on providing a neat look, while Vivaldi try their best to provide more functionality. +Brave 专注于提供简洁的外观,而 Vivaldi 则尽力提供更多的功能。 -If you do not want a lot of distractions, and just want to focus on web browsing, Brave should give you a clean experience. +如果你不想受到大量干扰,只想专心浏览网页,那么 Brave 应该能给你提供清爽的体验。 -Even then, Brave gives you a lot of control to customize the existing interface. For instance, the ability to use a wide address bar, show full URLs, show tab search button, show/hide home button, and more. +不过,Brave 依旧为你提供定制现有界面的选项,例如使用更宽的地址栏、显示完整 URL、显示标签搜索按钮、显示或隐藏主页按钮等。 ![][3] -When it comes to themes, Brave offers light and dark out of the box but supports themes available in the Chrome Store. +说到主题,Brave 默认提供了亮色和暗色两款主题,同时也支持 Chrome 应用商店中的主题。 -In contrast, Vivaldi might look a bit filled up out of the box with a quick access panel, search bar to the right of the address bar, and more elements at the bottom of the browser. +反观另一边,Vivaldi 默认情况下看上去似乎有点超负荷 —— 能够快速访问的侧边栏,地址栏右边的搜索框,再加上浏览器底部还有更多要素。 -Vivaldi also features more themes by default. Not to forget, you can seamlessly edit/customize the theme, which you cannot in Brave. +Vivaldi 默认也会提供更多主题。别忘了,你可以无缝编辑并定制主题,Brave 可没有这种功能哦。 ![][4] -For someone looking for a straightforward and customizable web browser, Brave is an easy recommendation. And, for users wanting a rich user interface with a variety of options accessible, Vivaldi should be a good choice. +对于那些想要一款简洁明了,同时可以自定义的浏览器的人来说,Brave 就是一款简洁的推荐项。而对于那些需要丰富的界面和大量设置项的用户来说,Vivaldi 是个不错的选择。 -### Open Source vs 99% Open-Source +### 完全开源 vs 99% 开源 -Brave is completely open-source and free to use. You can find its code at GitHub and fork it for experiments and tests, if required. +Brave 是完全开源的,可以免费 / 自由使用。你可以在 GitHub 上查看它的源代码,如果需要的话还可以复刻(Fork)一份代码以用于实验和测试。 -Vivaldi is err.. almost open-source. The entire browser is based on Chromium, and its code is available in its official site. However, the user interface of the browser is proprietary. +Vivaldi 的话,呃……只能说是几乎开源。整个浏览器基于 Chromium 开发,而修改过的 Chromium 源代码可以在它的官网中找到。不过,这款浏览器的用户界面却是专有的。 -To ensure that they provide you a unique user experience and keep their control over it, Vivaldi decided to keep the UI closed-source. +为确保提供独特的用户体验,并保持对它的控制权,Vivaldi 决定让用户界面闭源。 -However, they do explain it well in a [blog post][5]. +不过,他们在一篇 [博文][5] 中解释得很清楚。 -### Tab Management +### 标签页管理 ![][6] -For most users, this may not be a comparison criterion. But, considering Vivaldi is popular for its tab management ability, it is worth pointing it out. +对于大多数用户来说,这可能不算是一个比较标准,但考虑到 Vivaldi 以其标签页管理功能为知名,因此这一点仍旧值得比较。 -Tab management comes in handy when you have loads of tabs active. If you have a handful of tabs in use, you do not need to both about tab management capabilities, but it can still be useful. +在你打开了许多标签页时,标签页管理就会大有用场。如果你只开了少量的标签页,那你不需要同时考虑标签页管理,但它仍旧十分有用。 -With Vivaldi, you can have two-level stacked tabs together, and have several stacked tab groups. You can also reposition the tabs from the top of the browser to the left/right/bottom side of the browser. +有了 Vivaldi,你可以体验两级堆叠标签栏,同时还可以拥有多个堆叠标签组。你还可以将标签栏从浏览器的顶部移动到左 / 右 / 底部。 -The default behavior of the tabs can be managed, stacked tabs can be changed into accordion-style, the width can be adjusted, the buttons can be customized to be visible/hide, and lots more. +标签的默认行为都可以修改。紧凑标签组可以修改为折叠式,标签宽度可以更改,按钮可选择显示或隐藏,还有许多配置项。 -Brave also lets you group tabs, assign color, name them, and expand/collapse to easily manage several tab groups. +Brave 同样可以分组标签、指定颜色、命名标签组,以及展开 / 折叠标签组,以便管理。 -![brave tab management][7] +![Brave 的标签页管理][7] -However, you do not get to see any two-level tab stack functionality nor the ability to customize the tab behavior like you get to see in Vivaldi. +不过,在 Brave 里就没有 Vivaldi 那样的两级标签栏,以及自定义标签行为的功能。 -Moreover, the tab management with Brave (with dark mode on) looks a bit messy in my opinion. +此外,我个人认为 Brave 的标签管理(在开启暗色模式时)看上去有一点点乱。 -Sure, you can decide what the new tab page shows, but that’s not really as useful as the options available in Vivaldi. +当然,你可以决定新标签页展示什么内容,但这远远不及 Vivaldi 大量选项那么有用。 -So, Vivaldi is a clear winner when it comes to tab management. But, it depends on your requirements. If you do not juggle between multiple tabs, you probably do not need anything special. +所以,在标签页管理这一方面,Vivaldi 明显完胜。不过,一切仍取决于你的实际需求。如果你不在多个标签页中反复横跳,那你其实也不需要什么额外的东西。 -### Other Features +### 其他功能 -While both offer all the essential features, you will find some unique offerings. +两款浏览器都提供了所有基本功能,但你仍旧可以发现许多区别。 -Brave supports IPFS protocol to help you fight against censorship. You also get the ability to use Brave Rewards, and get tokens for the privacy-friendly ads pushed by Brave. These rewards can help you contribute back to websites as tips. The tokens can also be used to purchase as per the available merchant partners with Brave. +Brave 支持 IPFS 协议,以帮助你对抗审查。你也可以使用 Brave Rewards,并通过由 Brave 提供的尊重隐私的广告来获取代币。这些奖励可作为赞助费用,以支持网站的创作者。这些代币同样也可以用于购买来自合作伙伴的 Brave 周边。 ![][8] -Brave Search is the default search engine with Brave web browser. Even though the search engine is not open-source, the features offered by Brave Search make it an interesting alternative to other popular private search engines. +Brave 搜索是 Brave 浏览器的默认搜索引擎。虽然这款搜索引擎并非开源,但 Brave 搜索所带来的功能足以使其成为其他隐私保护型搜索引擎的有趣替代品。 -When it comes to Vivaldi, it offers a range of extra features like the web panel in the sidebar, pomodoro, page tiling, calendar integration, email integration, RSS feed, and more. +来到 Vivaldi 这边,它提供了大量额外功能,包括侧边栏的 Web 面板、番茄钟、页面平铺、日历集成、电子邮箱集成、RSS 订阅等。 -The sidebar (or web panel) lets you quickly access things without needing to open a separate tab or window, which should let you easily multitask without losing focus on the active tab. +侧边栏(或者叫 Web 面板)允许你快速访问内容,不需额外新建标签或窗口,让你轻松进行多任务处理,而不会失去对活跃标签的专注。 ![][9] -You also get an in-built translation feature that gets rid of the need to use Google Translate in case you do not understand a language across the web. +当然,它还有内置的翻译功能,让你能在不懂网站的语言时摆脱 Google 翻译。 -In addition to all other features, it lets you tweak keyboard shortcuts, mouse gestures, and a variety of quick commands. You do not find anything like this in Brave. +除了这些功能以外,Vivaldi 允许你修改键盘快捷键、鼠标手势,以及大量快捷命令。在 Brave 里可没有这些东西。 -So, I’d say Vivaldi is a comfortable option for keyboard shortcut users. +因此,我认为 Vivaldi 对于喜欢键盘快捷键的人来说是一个不错的选择。 -### The Privacy Angle +### 隐私一角 ![][10] -Vivaldi focuses on providing a privacy-friendly web experience, just like Brave. You get native ad/tracking protection and a dedicated privacy menu to adjust your experience. +Vivaldi 专注于提供隐私友好型网络体验,就和 Brave 一样。它内置了原生的广告 / 跟踪拦截保护,以及专门用于自行调整体验的隐私设置。 -As you can notice in the screenshot above, you can enable/disable the Google services being used for security, hide typed history, change the behavior of saving browsing history, and tweak the default website permissions. +就如上方的截图那样,你可以选择启用或禁用谷歌的安全服务,隐藏输入历史,修改历史记录的存储行为,并修改默认的网站权限。 ![][11] -Brave also gives you a similar level of control, and some advanced options like changing the WebRTC IP policy, and push messaging service controls. +Brave 同样给你类似的控制级别,当然也有更高级的设置项,比如修改 WebRTC IP 处理政策,以及消息推送服务控制。 -If you are just looking for anti-tracker and ad blocking capabilities, both browsers offer that. But, if you are worried about something specific, you might want to explore through the settings to be able to decide it for yourself. +如果你单纯想要拦截跟踪器和广告的功能,那么两款浏览器都有。不过,如果你更担心某项特定需求,那你可以试着查看它们的设置项,然后自行决定。 -### Performance +### 性能 ![][12] -As usual, I tested the browsers using some of the popular benchmark tests like: [JetStream 2][13], [Speedometer 2.0][14], and [Basemark Web 3.0][15]. +一如既往,我借助一些知名的跑分工具来测试浏览器的性能,例如:[JetStream 2][13]、[Speedometer 2.0][14] 和 [Basemark Web 3.0][15]。 -I utilized Pop!_OS 21.10 as my Linux distribution, and the browser versions tested were **Vivaldi 5.0.2497.51 stable** and Brave **97.0.4692.99**. +我使用 Pop!_OS 21.10 作为我的 Linux 发行版,而测试的浏览器版本为 **Vivaldi 5.0.2497.51 稳定版** 和 Brave **97.0.4692.99**。 -In these synthetic benchmarks, Brave turned out to be a tad bit faster overall, and Vivaldi managed to score better for the Speedometer 2.0 test. +在这些基准跑分测试中,Brave 总体会更快,但 Vivaldi 在 Speedometer 2.0 中得分更高。 -To give you an idea, I had nothing running in the background, except the browser on my PC powered by **Intel i5-11600k @4.7 GHz, 32 GB 3200 MHz RAM, and 1050ti Nvidia Graphics** +给你一个概念,我后台没有运行任何程序,只运行了浏览器。电脑配置为 **英特尔 15-11600K @4.7GHz,32GB 3200 MHz 运存,英伟达 1050Ti 显卡**。 + +因此, So, both browsers should be good enough for a snappy web experience. @@ -162,14 +164,14 @@ via: https://itsfoss.com/brave-vs-vivaldi/ 作者:[Ankush Das][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[imgradeone](https://github.com/imgradeone) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]: https://itsfoss.com/author/ankush/ [b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/best-browsers-ubuntu-linux/ +[1]: https://linux.cn/article-14075-1.html [2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-vivaldi-ui.png?resize=784%2C600&ssl=1 [3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-appearance-settings.png?resize=800%2C519&ssl=1 [4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/vivaldi-themes-default.png?resize=800%2C580&ssl=1 From d259bfd56cf5f3835652f813c0af21be5cbc8411 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 8 Feb 2022 05:02:32 +0800 Subject: [PATCH 196/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220208=20?= =?UTF-8?q?Twine:=20Open=20Source=20Tool=20for=20Making=20Games=20with=20W?= =?UTF-8?q?ords,=20aka=20Interactive=20Fiction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220208 Twine- Open Source Tool for Making Games with Words, aka Interactive Fiction.md --- ...mes with Words, aka Interactive Fiction.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 sources/tech/20220208 Twine- Open Source Tool for Making Games with Words, aka Interactive Fiction.md diff --git a/sources/tech/20220208 Twine- Open Source Tool for Making Games with Words, aka Interactive Fiction.md b/sources/tech/20220208 Twine- Open Source Tool for Making Games with Words, aka Interactive Fiction.md new file mode 100644 index 0000000000..e27802460d --- /dev/null +++ b/sources/tech/20220208 Twine- Open Source Tool for Making Games with Words, aka Interactive Fiction.md @@ -0,0 +1,108 @@ +[#]: subject: "Twine: Open Source Tool for Making Games with Words, aka Interactive Fiction" +[#]: via: "https://itsfoss.com/twine/" +[#]: author: "John Paul https://itsfoss.com/author/john/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Twine: Open Source Tool for Making Games with Words, aka Interactive Fiction +====== + +_**Brief: Twine and free and [open source tool for creating interactive fiction][1] or text based games.**_ + +Everyone has a game inside them waiting to come out, just like a chestburster. Unfortunately, not everyone has the skills to create a game, especially one complete with graphics. Thankfully, there is a way to create a fun game using only words. Let me share an application that could help you with it. + +### What is Twine? + +![Twine story list][2] + +As I alluded to above, [Twine][3] allows anyone to create a game without needing to know how to write code. Remember those [Choose-Your-Own-Adventure][4] books? That’s essentially how Twine works. + +You create a series of passages, which can be one sentence or a wall of text. You named each of these passages, so you can keep track of them. After that, you connect these passages and create several paths for the player to follow based on their decisions. + +Creating a new passage is as easy as putting double brackets around a sentence, for example, **[[Let’s continue!]]**. In this example, “Let’s continue!” is the link you click to get to the new passage, and that sentence becomes the name of the new passage. + +I prefer to make the name of the new passage different from the linking sentence. You can do that using this format: **[[Let’s continue!|start-journey]]**. In this example, you click the sentence “Let’s continue!” to go to the passage titled start-journey. + +![Twine editor][5] + +When you’re done, you can publish the game as an HTML file and share it with friends or share it on a site like itch.io. + +There are more advanced features available to make more intricate games. These features include: + + * Support for variables + * Input boxes to get information from the player + * if…then statements + * Loops and more + + + +Another thing to keep in mind is that, Twine makes use of multiple Story Formats. A Story format is essentially a game engine that is baked into the HTML file and makes the game work. Twine comes with three Story Formats: + + * Harlowe – This format is the default, and it designed to be easy for beginners to learn + * Snowman – This format is for game developers who are more familiar with JavaScript and CSS. Use this format to make a customized playing experience. + * SugerCube – This format is inspired by early versions of Twine and allows the player to save progress and other features. + * Chapbook – This format is designed for newer users and have advanced functions built in. + + + +![Twine story structure][6] + +### Installation + +Unfortunately, most repos do not have the latest version of Twine. This may change in the future. + +If you are on Arch or have the [Homebrew][7] 3rd party package manager installed, you are in luck. + +Otherwise, you need to download the latest version and from the site, unzip the folder and run the executable. + +_**If you don’t want to install Twine or if you want to try it first, you can check out the [online version][8].**_ + +### My Experience + +I’ve created a [couple of games][9] with Twine for some game jams. These were the first games I’ve ever created, and I had fun. At that time, if you wanted to use the advanced features, you had to do a bit of coding. Now, you can add those features using tools in the editor. + +One of the problems with Twine is that you cannot really use it with git. That’s because the Twine editor stores all files in the same place. There is no way to change the destination for one. + +Another issue is that it is a pain to proofread a game. There is an option to “View Proofing Copy”, which shows you everything on a single page. If you have a smaller game, then there is no issue, but if you have a larger game, it takes to fix spelling and grammar errors. Thankfully, there is a tool for that. + +[Tweego][10] is a tool written in Go that allows you to write your Twine game using plain text files. Tweego was inspired by [twee][11], which was Twine’s official command line tool. twee hasn’t been updated in 5 year so can’t be used with the newer version of Twine. Tweego allows you to export your game directly to HTML or to the Twine format. + +You can easily use git to back up files create with Tweego. The text files are also very easy to put into a spellchecker. Here is the [text file][12] for a simple game I wrote using Tweego to give you an idea of how readable it is. + +![Twine dark mode on Windows][13] + +### Final Thoughts + +Overall, I think that Twine is a very good tool to create games. It is very simple to learn and has tools that allow you to create fairly complicated games without needing to know how to code. + +I worry though that most people ignore games that don’t have flashy graphics. Text games were the first games on computers and are still fun to play. All you need is a little imagination. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/twine/ + +作者:[John Paul][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/john/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/create-interactive-fiction/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/twine-story-list.png?resize=800%2C502&ssl=1 +[3]: https://twinery.org/ +[4]: https://en.wikipedia.org/wiki/Choose_Your_Own_Adventure +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/twine-editor-800x502.png?resize=800%2C502&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/twine-story-structure.png?resize=800%2C502&ssl=1 +[7]: https://itsfoss.com/homebrew-linux/ +[8]: https://twinery.org/2 +[9]: https://johnblood.itch.io/ +[10]: https://www.motoslave.net/tweego/ +[11]: https://github.com/tweecode/twee +[12]: https://github.com/JohnBlood/Adom-10/blob/main/src/adom-10.twee +[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/twine-dark-mode.png?resize=800%2C471&ssl=1 From 9a25b25f46378723f761108f0dcccea823281626 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 8 Feb 2022 05:02:39 +0800 Subject: [PATCH 197/334] add done: 20220208 Twine- Open Source Tool for Making Games with Words, aka Interactive Fiction.md --- sources/tech/20220207 .md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 sources/tech/20220207 .md diff --git a/sources/tech/20220207 .md b/sources/tech/20220207 .md new file mode 100644 index 0000000000..75f1ed460f --- /dev/null +++ b/sources/tech/20220207 .md @@ -0,0 +1,16 @@ +[#]: subject: "" +[#]: via: "https://www.debugpoint.com/2022/02/top-whiteboard-applications-linux/" +[#]: author: "[Arindam] + +Posted by Arindam + +Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + + +====== + From 94519e213362c4584fa7a3896a52e969cd8cfd13 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 8 Feb 2022 05:02:50 +0800 Subject: [PATCH 198/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220207=20?= =?UTF-8?q?Customize=20your=20shell=20prompt=20with=20Starship?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220207 Customize your shell prompt with Starship.md --- ...stomize your shell prompt with Starship.md | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 sources/tech/20220207 Customize your shell prompt with Starship.md diff --git a/sources/tech/20220207 Customize your shell prompt with Starship.md b/sources/tech/20220207 Customize your shell prompt with Starship.md new file mode 100644 index 0000000000..e005c3169b --- /dev/null +++ b/sources/tech/20220207 Customize your shell prompt with Starship.md @@ -0,0 +1,122 @@ +[#]: subject: "Customize your shell prompt with Starship" +[#]: via: "https://opensource.com/article/22/2/customize-prompt-starship" +[#]: author: "Moshe Zadka https://opensource.com/users/moshez" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Customize your shell prompt with Starship +====== +Take control of your prompt, and have all the information you need at +your fingertips. +![Cosmic stars in outer space][1] + +Nothing irritates me more than when I forget to `git add` files in my Git repository. I test locally, commit, and push, only to find out it failed in the continuous integration phase. Even worse is when I'm on the `main` branch instead of a feature branch and accidentally push to it. The best-case scenario is that it fails because of branch protection, and I need to do some surgery to get the changes to a branch. Even more worse, I did not configure branch protection properly, and I accidentally pushed it directly to `main`. + +Wouldn't it be nice if the information was available right in the prompt? + +There is even more information that is useful in the prompt. While the name of Python virtual environments is in the prompt, the Python version the virtual environment has is not. + +It is possible to carefully configure the `PS1` environment variable to all relevant information. This can get long, annoying, and non-trivial to debug. + +This is the problem that Starship got designed to solve. + +### Install Starship + +The initial setup for Starship only requires two steps: Installing and configuring your shell to use it. Installation can be as simple as: + + +``` +`$ curl -fsSL https://starship.rs/install.sh` +``` + +Read over the install script to make sure you understand what it does, and then make it executable and run it: + + +``` + + +$ chmod +x install.sh +$ ./install.sh + +``` + +There are other ways to install, covered on the website. You can develop virtual machines or containers at the image-building step. + +### Configuring Starship + +The next step is to configure your shell to use it. To try it as a one-off, assuming the shell is `bash` or `zsh`, run the following: + + +``` +`$ eval "$(starship init $(basename $SHELL))"` +``` + +Your prompt changes immediately: + + +``` + + +localhost in myproject on  master +> + +``` + +If you like what you see, add `eval "$(starship init $(basename $SHELL))"` to your shell's `rc` file to make it permanent. + +### Customizing Starship + +The default installation assumes that you can install a "Nerd font," such as [Fantasque Sans Mono][2]. You want, particularly, a font with glyphs from Unicode's "private implementation" section. + +This works great when controlling the terminal, but sometimes, the terminal is not easy to configure. For example, when using some in-browser shell abstraction, configuring the browser font can be non-trivial. + +The biggest user of the code points is the Git integration, which uses a special custom symbol for "branch." Disabling it can be done by configuring `starship.rs` using the file `~/.config/starship.toml`. + +Disabling the branch symbol is done by configuring the `git_branch` section's `format` variable: + + +``` + + +[git_branch] +format = "on [$branch]($style) " + +``` + +One of the nice things about `starship.rs` is that changing the configuration has an immediate effect. Save the file, press **Enter**, and see if the font looks as intended. + +It's also possible to configure the color of different sections in the prompt. For example, if the Python section's bright yellow is a bit harder to see on a white background, you can configure blue: + + +``` + + +[python] +style = "blue bold" + +``` + +There is configuration support for many languages, including Go, .NET, and JavaScript. There is also support for showing command duration (only for commands which take longer than a threshold) and more. + +### Take the con + +Take control of your prompt, and have all the information you need at your fingertips. Install Starship, make it work for you, and enjoy! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/customize-prompt-starship + +作者:[Moshe Zadka][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/moshez +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/space_stars_cosmic.jpg?itok=bE94WtN- (Cosmic stars in outer space) +[2]: https://github.com/belluzj/fantasque-sans From 37eeeb5f80de2a21220606438b632152a681043b Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 8 Feb 2022 05:03:02 +0800 Subject: [PATCH 199/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220207=20?= =?UTF-8?q?Accumulating=20into=20lists=20in=20Java=20and=20Groovy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220207 Accumulating into lists in Java and Groovy.md --- ...umulating into lists in Java and Groovy.md | 437 ++++++++++++++++++ 1 file changed, 437 insertions(+) create mode 100644 sources/tech/20220207 Accumulating into lists in Java and Groovy.md diff --git a/sources/tech/20220207 Accumulating into lists in Java and Groovy.md b/sources/tech/20220207 Accumulating into lists in Java and Groovy.md new file mode 100644 index 0000000000..b78113d990 --- /dev/null +++ b/sources/tech/20220207 Accumulating into lists in Java and Groovy.md @@ -0,0 +1,437 @@ +[#]: subject: "Accumulating into lists in Java and Groovy" +[#]: via: "https://opensource.com/article/22/2/accumulating-lists-groovy-vs-java" +[#]: author: "Chris Hermansen https://opensource.com/users/clhermansen" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Accumulating into lists in Java and Groovy +====== +This article looks at the differences between list handling in Groovy +and Java. I'll explore how to run-length encode a list in both languages +for that purpose. +![Code with green and blue binary background of ones and zeros][1] + +In my [last article][2], I reviewed some differences between creating and initializing lists in Groovy and doing the same thing in Java. I showed that Groovy has a straightforward and compact syntax for setting up lists compared to the steps necessary in Java. + +This article explores some more differences between list handling in Groovy and Java. I'll explore how to run-length encode a list in both languages for that purpose. Briefly, run-length encoding is a way of compactly representing repeated sequences of the same value in a list. + +You'll need to make sure you have both Groovy and Java installed on your computer to follow along. + +### Install Java and Groovy + +Groovy is based on Java and requires a Java installation as well. Recent and decent versions of Java and Groovy might be in your Linux distribution's repositories. Or you can install Groovy following the instructions on the link mentioned above. A nice alternative for Linux users is [SDKMan][3], which you can use to get multiple versions of Java, Groovy, and many other related tools. For this article, I'm using SDK's releases of: + + * Java: version 11.0.12-open of OpenJDK 11 + * Groovy: version 3.0.8 + + + +### Back to the problem + +[Run-length encoding][4] replaces sequences of identical elements in a list with "runs" (pairs that indicate the number of elements and element values). For example, if I have the list: + + +``` +`[“a”, ”a”, ”a”, ”b”, ”c”, ”c”]` +``` + +Then when I run-length encode it, I will have a list of lists: + + +``` +`[[3, ”a”], [1, ”b”], [2, ”c”]]` +``` + +This type of non-destructive compression is relatively simple to implement and reasonably efficient for lists with many groups of repeated values. An example of this type of list is the hourly temperature in places where the daily swing in temperature is limited—like, for instance, Vancouver, Canada, in the winter. + +### Run-length encoding in Java + +I am going to look at two approaches to this problem in Java. First, the iterative approach: + + +``` + + +1       import java.lang.*; +        +2       import java.util.List; +3       import java.util.ArrayList; +4       import java.util.Arrays; +        +5       public class Test11 { +        +6           static public void main([String][5] args[]) { +        +7               // Hourly temperature Monday 17 January 2022 in Vancouver +        +8               var hourlyTemp = [Arrays][6].asList(5, 5, 5, 5, 5, 4, 4, 5, 5, 5, 6, 6, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5); +        +9               // Method 1: using forEach() +        +10              var hourlyTempRLE = new ArrayList<ArrayList<Integer>>(); +11              hourlyTempRLE. +12                  add(new ArrayList<Integer>([Arrays][6].asList(1,hourlyTemp.get(0)))); +13              hourlyTemp.subList(1,hourlyTemp.size()).forEach(temp -> { +14                  var hourlyTempRLETail = hourlyTempRLE.get(hourlyTempRLE.size() - 1); +15                  if (hourlyTempRLETail.get(1) == temp) { +16                      hourlyTempRLETail. +17                          set(0,hourlyTempRLETail.get(0) + 1); +18                  } else { +19                      hourlyTempRLE. +20                          add(new ArrayList<Integer>([Arrays][6].asList(1,temp))); +21                  } +22              }); +        +23              [System][7].out.println("hourlyTempRLE using iterator (method 1): " + hourlyTempRLE); +24          } +25      } + +``` + +In line 8, I define `hourlyTemp` as the list of hourly temperatures observed in Vancouver on 17 January 2022. I use the `asList()` static method of the Java List interface, which creates an unmodifiable list (which, for this application, is OK). + +In line 10, I define `hourlyTempRLE` as the "list of lists" that will contain the run-length encoded temperatures. I'm using an `ArrayList` of `ArrayList` of `Integer` here to get the list of lists structure. + +In line 11, I add the initial sublist or "run" of encoding, setting its first element to 1 (the count) and its second to the first temperature in `hourlyTemp`. + +In lines 12 through 22, I process the remaining values of `hourlyTemp`—the expression `hourlyTemp.subList(1,hourlyTemp.size())` is a sublist of `hourlyTemp` starting at the second element (1) and ending at the last element (`hourlyTemp.size() - 1`). I use the `forEach()` method of `ArrayList` to iterate over the elements of that sublist, which passes each element into its Java lambda argument with the parameter `temp`). + +In line 13, I set `hourlyTempRLETail` to the last element currently in `hourlyTempRLE`. + +In line 14, I check to see if the temp value passed into the lambda is the same as the value of `hourlyTempRLETail`. If it is, I increment its count in lines 15 through 17. Otherwise, in lines 19 and 20, I add a new "run" whose initial value is the sublist of 1 (the count) and the current value of `temp`. + +This is pretty compact. Nice to be able to use `var` rather than declaring the type of the variables. I don't see any more compact way of declaring `hourlyTempRLE` and initializing it in the same statement. + +Running this script, I obtain the following results: + + +``` + + +$ javac Test11.java +$ java Test11 +hourlyTempRLE using iterator (method 1): [[5, 5], [2, 4], [3, 5], [2, 6], [2, 7], [4, 6], [6, 5]] +$ + +``` + +This is what I would expect from examining the `hourlyTemp` list. + +One less-than-optimal aspect of the above code is that `hourlyTempRLE` is mutable. This means that subsequent code that uses it must be careful not to change it. Moreover, any multithreaded or parallel execution code that refers to `hourlyTempRLE` should be designed with this mutability in mind. + +An easy way around this is to add a line to create an immutable copy using the `copyOf()` method of the Java List interface. But that still leaves the mutable data structure hanging around. + +I can use Java Streams to code this in a more functional way: + + +``` + + +1       import java.lang.*; +        +2       import java.util.List; +3       import java.util.ArrayList; +4       import java.util.Arrays; +        +5       public class Test12 { +        +6           static public void main([String][5] args[]) { +        +7               // Hourly temperature Monday 17 January 2022 in Vancouver +        +8               var hourlyTemp = [Arrays][6].asList(5, 5, 5, 5, 5, 4, 4, 5, 5, 5, 6, 6, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5); +        +9               // Method 2: using collect() +        +10              var hourlyTempRLE = hourlyTemp.stream() +11                  .collect(RLE::new, RLE::accept, RLE::combine) +12                  .getRLE(); +        +13              [System][7].out.println("hourlyTempRLE using collect (method 2): " + hourlyTempRLE); +14          } +15      } +        +16      class RLE implements java.util.function.IntConsumer { +        +17          private ArrayList<ArrayList<Integer>> rle = new ArrayList<ArrayList<Integer>>(); +        +18          public void accept(int temp) { +19              if (rle.size() > 0) { +20                  var rleTail = rle.get(rle.size() - 1); +21                  if (rleTail.get(1) == temp) +22                      rleTail.set(0,rleTail.get(0) + 1); +23                  else +24                      rle.add(new ArrayList<Integer>([Arrays][6].asList(1,temp))); +25              } else { +26                  rle.add(new ArrayList<Integer>([Arrays][6].asList(1,temp))); +27              } +28          } +        +29          public void combine(RLE other) { +30              rle.addAll(other.getRLE()); +31          } +        +32          public ArrayList<ArrayList<Integer>> getRLE() { +33              return rle; +34          } +35      } + +``` + +What’s different? A lot, it seems. + +In lines 10 through 12, I have a nice compact, functional solution to defining and accumulating the elements of `hourlyTemp`. In line 10, I convert `hourlyTemp` to a Java Stream using the `stream()` function. In line 11, I use the Streams `collect()` function in conjunction with a class (`RLE`) that I define below to accumulate and reduce the values. In line 12, I call a method on the `RLE` class, `getRLE()`, to get the list of lists. So that's nice and compact. The cost is that I have to define this helper class, `RLE`, in lines 16 through 35. + +The first thing I see in the helper class is the definition of the list of lists data structure `rle`, on line 17. This is initialized to an empty `ArrayList>` when created. + +Then, in lines 18 through 31, you can see the definition of two methods required by the Streams `collect()` method—`accept()`, used to accumulate incoming values (integers in this case) and `combine()`, used to merge a separate `RLE` instance into this one, which happens with parallel accumulations. The third standard method, `new()`, is provided implicitly through the `RLE` constructor. + +The accumulation work is done in lines 18 through 28 in the `accept()` method. This method has similar logic to the previous one except that I start off with an empty list which I must detect and initialize. Combining another `RLE` instance with this one is handled in lines 29 through 31 using the `addAll()` method provided by the `ArrayList` class. + +Finally, in lines 32 through 34, I define the method `getRLE()`, which returns the list of lists. + +Running this produces: + + +``` + + +$ javac Test12.java +$ java Test12 +hourlyTempRLE using collect (method 2): [[5, 5], [2, 4], [3, 5], [2, 6], [2, 7], [4, 6], [6, 5]] +$ + +``` + +This is as I would expect. + +### Run-length encoding in Groovy + +I will look at the same two approaches to this problem in Groovy. First, the iterative approach: + + +``` + + +1       // Hourly temperature Monday 17 January 2022 in Vancouver +        +2       def hourlyTemp = [5, 5, 5, 5, 5, 4, 4, 5, 5, 5, 6, 6, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5] +        +3       // Method 1: using each {} +        +4       def hourlyTempRLE = [[1,hourlyTemp[0]]] +5       hourlyTemp[1..-1].each { temp -> +6           if (hourlyTempRLE[-1][1] == temp) { +7               hourlyTempRLE[-1][0]++ +8           } else { +9               hourlyTempRLE << [1,temp] +10          } +11      } +        +12      println "hourlyTempRLE using iterator (method 1): $hourlyTempRLE" + +``` + +In line 2, I define `hourlyTemp` as the list of hourly temperatures observed on 17 January 2022 in Vancouver. + +In line 4, I initialize the run-length encoded version, `hourlyTempRLE`, as a list of lists with the initial value set to the first temperature in `hourlyTemp` and a count of 1. + +In lines 5 through 11, I process the rest of the `hourlyTemp` values. The expression `hourlyTemp[1..-1]` is a _slice_ of `hourlyTemp` starting at the second element (1) and ending at the last element(-1). To process that slice, I apply the Groovy List method `each()`, which takes a Groovy Closure, here looking quite a bit like a Java lambda, whose parameter is `temp`, and iterates over all the values in the list, calling the Closure for each value. + +In lines 6 and 7, if the temperature value in the last "run" (that is, the second element of the last sublist in `hourlyTempRLE`, expressed as `hourlyTempRLE[-1][1]`) is the same as the value of `temp`, the count is incremented. + +However, if the temperature is different, then in lines 8 through 10, a new "run" gets appended to the list with the count of 1 and the value set to that of `temp`. + +Running this script, I observe: + + +``` + + +$ groovy test11.groovy +hourlyTempRLE using iterator (method 1): [[5, 5], [2, 4], [3, 5], [2, 6], [2, 7], [4, 6], [6, 5]] +$ + +``` + +A nice alternative is to use a functional approach: + + +``` + + +1       // Hourly temperature Monday 17 January 2022 in Vancouver +        +2       def hourlyTemp = [5, 5, 5, 5, 5, 4, 4, 5, 5, 5, 6, 6, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5] +        +3       // Method 2: using inject {} +        +4       def hourlyTempRLE = hourlyTemp[1..-1].inject([[1,hourlyTemp[0]]]) { rle, temp -> +5           if (rle[-1][1] == temp) { +6               rle[-1][0]++ +7           } else { +8               rle << [1,temp] +9           } +10          rle +11      } +        +12      println "hourlyTempRLE using inject (method 2): $hourlyTempRLE" + +``` + +Here I define the same list of hourly temperatures, `hourlyTemp`, as before. This functional approach uses the _list reduce_ approach to convert `hourlyTemp` to its run-length encoded equivalent. This keeps the list creation data internal to the code that iterates over `hourlyTemp` rather than defining variables outside the list creation code, allowing me to declare `hourlyTempRLE` as immutable should I so desire. + +In Groovy, list reduce is implemented by the Groovy List `inject()` method, which takes two arguments: The initial value and a Closure that embodies the reduce code. + +In lines 4 through 11 above, you see that I define `hourlyTempRLE` as the result of executing the `inject()` with: + + * An initial value of `[[1,hourlyTemp[0]]]`—that is, the initial value of `hourlyTempRLE` is a list containing one sublist whose elements are 1 (the count) and the first temperature from `hourlyTemp` (the value) + * The Closure `{ rle, temp -> ... }` defined on lines 4 through 11 that has parameters `rle`, the partial result of the `inject()` operation so far, and `temp`, which `inject()` sets to the successive values of the slice `hourlyTemp[1..-1]` + + + +In lines 5 and 6, if the value of the last "run" is the same as the value of `temp` (again, the second element of the partial result so far accumulated, expressed as `rle[-1][1]`) then the count is incremented. + +Otherwise, in lines 7 through 9, a new "run" gets appended to the partial result so far accumulated, containing a count of 1 and the value of `temp`. + +In line 10, the (modified) partial result so far accumulated is returned as the value of the Closure, which `inject()` uses to replace the previous partial result. In general, in Groovy methods or Closure definitions, the value of the last statement is returned as the value of the method or Closure definition—it is only necessary to use the Groovy `return` statement when returning a value from midway through a method or Closure definition. + +As expected, running this script produces: + + +``` + + +$ groovy test12.groovy +hourlyTempRLE using inject (method 2): [[5, 5], [2, 4], [3, 5], [2, 6], [2, 7], [4, 6], [6, 5]] +$ + +``` + +To get a little more familiar with `inject()` you can calculate the sum of `hourlyTemp` and `hourlyTempRLE` by appending the following lines to each of the two scripts: + + +``` + + +def hourlyTempSum = hourlyTemp.inject(0) { sum, temp -> sum + temp} +def hourlyTempRLESum = hourlyTempRLE.inject(0) { sum, run -> +    sum + (run[0] * run[1]) +} + +``` + +Groovy List defines a `sum()` method that would be a more concise way of achieving the result from the first line above. Still, as this is about the most simple example of the reduce operation possible, it's instructive to present it. And in the second line, you can see that I can easily multiply the temperature value by the count of repeat occurrences to produce the same sum. Note that the initial value passed to `inject()` is zero in both cases. + +I can use the Groovy `assert` statement to check that the sums are equal as follows: + + +``` +`assert hourlyTempSum == hourlyTempRLESum` +``` + +Finally, I can uncompress the run-length encoded list by appending the following lines to the end of each of the two scripts: + + +``` + + +def hourlyTempRLEU = hourlyTempRLE.inject([]) { uncompressed, run -> +    uncompressed << [run[1]] * run[0] +}.flatten() + +``` + +Here I'm making use of Groovy's operator overloading, and the Groovy List `multiply()` method. "Multiplying" a list (on the left-hand side) by an integer (on the right-hand side) replicates the list. In this case, `inject()` produces a list of sublists, which I want to flatten out into a list, so I use the Groovy List `flatten()` method on the result of `inject()`. + +I can use the Groovy `assert` statement to check that the uncompressed list is the same as the original: + + +``` +`assert hourlyTemp == hourlyTempRLEU` +``` + +**NOTE:** Groovy equality is different from Java equality! In Groovy, `==` is shorthand for the `.equals()` method of any object instance, and `===` is shorthand for the `.is()` method of any object instance and equivalent to Java’s `==`. + +### A brief comparison of the Java and Groovy solutions + +Compare the Java: + + +``` + + +var hourlyTempRLE = new ArrayList<ArrayList<Integer>>(); +hourlyTempRLE. +        add(new ArrayList<Integer>([Arrays][6].asList(1,hourlyTemp.get(0)))); + +``` + +To the Groovy: + + +``` +`def hourlyTempRLE = [[1,hourlyTemp[0]]]` +``` + +Here you can see how much more compact Groovy can be. And it's not just compactness for compactness' sake. The Groovy code is clearly more readable through its compactness—you can see that `hourlyTempRLE` is a list of lists because of the nested brackets. This compactness is clearly visible elsewhere.  + +Compare the Java: + + +``` + + +hourlyTempRLE. +        get(le). +        set(0,hourlyTempRLE.get(le).get(0) + 1); + +``` + +To the Groovy: + + +``` +`hourlyTempRLE[-1][0]++` +``` + +Here you can see the syntactical support of the Groovy language for List structures makes the statement much more readable and understandable. + +Readability is really important for code maintenance because readability promotes understanding. A quick search with your favorite search engine for phrases like "reading code vs writing code" will turn up many good arguments for readability, like [this one on Opensource.com][8]. The syntactic support for Collection structures in Groovy contributes hugely to the readability of Groovy code. + +Another conclusion from the above is that Groovy has really beefed up what you can do with List structures. While current versions of Groovy also support Java Streams, the additional features added to Groovy Collection structures provide much of the same functionality. In this example, using the extensions to List allows you to avoid the whole business with defining the `RLE` helper class required, in some form or another, by the Java Streams approach. You're down to 12 lines of Groovy code instead of 34 lines of Java code. Maybe I've missed something in my understanding of Streams, but I don't see this getting much smaller. + +This is a good moment to suggest a review of [the documentation on Groovy collections][9] to learn more. + +### Groovy resources + +The [Apache Groovy site][10] has a lot of great documentation. Another great Groovy resource is [Mr. Haki][11]. And a really great reason to learn Groovy is to go on and learn [Grails][12], which is a wonderfully productive full-stack web framework built on top of excellent components like Hibernate, Spring Boot, and Micronaut. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/accumulating-lists-groovy-vs-java + +作者:[Chris Hermansen][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/clhermansen +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code1_0.png?itok=SBZxppRz (Code with green and blue binary background of ones and zeros) +[2]: https://opensource.com/article/22/1/creating-lists-groovy-java +[3]: https://sdkman.io/ +[4]: https://en.wikipedia.org/wiki/Run-length_encoding +[5]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string +[6]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+arrays +[7]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system +[8]: https://opensource.com/article/19/12/zen-python-trade-offs +[9]: https://docs.groovy-lang.org/next/html/documentation/working-with-collections.html +[10]: https://groovy-lang.org/ +[11]: https://blog.mrhaki.com/ +[12]: https://grails.org/ From 9be87cde206cbaf83961da78ca4179fd74d81ca2 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 8 Feb 2022 05:03:36 +0800 Subject: [PATCH 200/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220207=20?= =?UTF-8?q?BitTorrent=20Client=20=E2=80=98Fragments=202.0=E2=80=99=20for?= =?UTF-8?q?=20Linux=20is=20Here,=20Rebuilt=20Using=20Rust=20with=20a=20New?= =?UTF-8?q?=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220207 BitTorrent Client ‘Fragments 2.0- for Linux is Here, Rebuilt Using Rust with a New UI.md --- ...is Here, Rebuilt Using Rust with a New UI.md | 142 ++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 sources/news/20220207 BitTorrent Client ‘Fragments 2.0- for Linux is Here, Rebuilt Using Rust with a New UI.md diff --git a/sources/news/20220207 BitTorrent Client ‘Fragments 2.0- for Linux is Here, Rebuilt Using Rust with a New UI.md b/sources/news/20220207 BitTorrent Client ‘Fragments 2.0- for Linux is Here, Rebuilt Using Rust with a New UI.md new file mode 100644 index 0000000000..6ce01a409e --- /dev/null +++ b/sources/news/20220207 BitTorrent Client ‘Fragments 2.0- for Linux is Here, Rebuilt Using Rust with a New UI.md @@ -0,0 +1,142 @@ +[#]: subject: "BitTorrent Client ‘Fragments 2.0’ for Linux is Here, Rebuilt Using Rust with a New UI" +[#]: via: "https://news.itsfoss.com/fragments-2-0-release/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +BitTorrent Client ‘Fragments 2.0’ for Linux is Here, Rebuilt Using Rust with a New UI +====== + +Fragments is [one of the best torrent clients for Linux][1]. + +The latest Fragments 2.0 is a significant upgrade, completely rewritten from scratch using Rust, GTK 4, and Libadwaita. + +In addition to the technical improvements, you will also find some new features and an improved user interface. + +Let me highlight the changes below. + +### Fragments 2.0: What’s New? + +![][2] + +Recently, the Gnome app ecosystem has been undergoing some massive changes. At the forefront of this change is the transition to Gtk4 and [Libadwaita][3]. Unfortunately, this change is not a small one, and many apps need to be rebuilt from the ground up to support these new standards. + +Alongside many other app developers, Fragment’s developer [Felix Häcker][4] decided to rebuild Fragments from the ground up, now releasing it as Fragments 2.0. As a result, we now get an improved BitTorrent client for Linux. + +Some of the improvements include: + + * A beautiful new UI based on Libadwaita + * New modular architecture + * The ability to be used as remote control for remote Fragments / Transmission sessions + * New preferences dialog with more options + * The ability to view statistics about the network + + + +#### A New UI + +![][5] + +Fragments 2.0 now has a new UI based on Libadwaita. Libadwaita is an extension of GTK4 for Gnome apps for those of you who don’t know. It has a few advantages, the most notable being a consistent look across all Gnome apps. + +It is much more flat and rounded than the old theme and, in my opinion, looks very stylish. + +You get a clean-looking BitTorrent app that’s easy to navigate, and you can also quickly access some essential options. + +#### New Modular Architecture + +While not immediately apparent, Fragments 2.0 features a brand-new modular architecture. Under-the-hood, all the different parts of the app are modular. While this may not seem that impactful at first, I can see it having a profound impact on users and developers alike. + +Firstly, it should mean easier maintenance, hopefully allowing the developers to spend more time on new features and bug fixes. Secondly, it should also mean greater stability for the application. This is because if one part of Fragments crashes, the rest of the app should remain working, hopefully without any significant impact on the user. + +These are just two of the benefits of this new architecture I could think of, and I’m sure there can be more. + +#### New Preferences Dialog + +![][6] + +Finally, Fragments 2.0 introduces several frequently requested settings options. Among these, I think the most important is the ability to change the default folder for torrents that have not been completely downloaded yet. + +![][6] + +While still not as customizable as some of its alternatives, these additions help you tweak the settings to fit your requirements. + +Some of the options include: + + * Automatically start torrents after adding them + * Enable/Disable download queue + * Customizable peer limits + * Network port setting + * Automatic port forwarding toggle + + + +#### Control Remote Fragments / Transmission Sessions + +The ability to remote control your downloads can have a considerable impact. With Fragments 2.0, the app finally gets a similar feature, allowing users to remote control other installations of Fragments and Transmission torrent clients. + +This is extremely useful for people using a separate download server, as they often don’t have access to it directly. + +While this has always been possible with other apps, the fact that this is integrated directly into Fragments makes it a helpful BitTorrent client for power users! + +#### Other Improvements + +![][7] + +In addition to all these massive changes, there are several bug fixes and a few new abilities. + +Some key highlights include: + + * Magnet link of added torrents can be copied to clipboard + * Statistics about the current session can be viewed (speed, total download data, etc.) + + + +You can explore more about Fragments 2.0 on its [GitLab page][8]. + +### Download Fragments 2.0 + +Fragments is available as a Flatpak app. If your Linux distribution does not have the support baked in, you can go through our [Flatpak guide][9] to set up Flatpak. + +[Fragments (Flathub)][10] + +You can try searching for it in your software center (with Flatpak integration enabled) or type in the following command in the terminal: + +``` + + flatpak install flathub de.haeckerfelix.Fragments + +``` + +Fragments 2.0.1 (with some minor fixes) is also available on its GitLab page but not yet reflected on Flathub. + +If you have issues with Fragments 2.0, you might want to wait for the newer version to hit Flathub. + +What’s your favorite BitTorrent Linux client? Is Fragments 2.0 impressive? Let me know your thoughts in the comments below. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/fragments-2-0-release/ + +作者:[Jacob Crume][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-torrent-ubuntu/ +[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU1MiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[3]: https://adrienplazas.com/blog/2021/03/31/introducing-libadwaita.html +[4]: https://twitter.com/haeckerfelix +[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjcwOCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjcyNCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU5NSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[8]: https://gitlab.gnome.org/World/Fragments +[9]: https://itsfoss.com/flatpak-guide/ +[10]: https://flathub.org/apps/details/de.haeckerfelix.Fragments From 26e26d54795c3d7aeeb9af1c1b6816a602b42b18 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 8 Feb 2022 08:40:30 +0800 Subject: [PATCH 201/334] translated --- ...28 Sharing the computer screen in Gnome.md | 236 ------------------ ...28 Sharing the computer screen in Gnome.md | 235 +++++++++++++++++ 2 files changed, 235 insertions(+), 236 deletions(-) delete mode 100644 sources/tech/20220128 Sharing the computer screen in Gnome.md create mode 100644 translated/tech/20220128 Sharing the computer screen in Gnome.md diff --git a/sources/tech/20220128 Sharing the computer screen in Gnome.md b/sources/tech/20220128 Sharing the computer screen in Gnome.md deleted file mode 100644 index 49758d3ced..0000000000 --- a/sources/tech/20220128 Sharing the computer screen in Gnome.md +++ /dev/null @@ -1,236 +0,0 @@ -[#]: subject: "Sharing the computer screen in Gnome" -[#]: via: "https://fedoramagazine.org/sharing-the-computer-screen-in-gnome/" -[#]: author: "Lukáš Růžička https://fedoramagazine.org/author/lruzicka/" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Sharing the computer screen in Gnome -====== - -![][1] - -You do not want someone else to be able to monitor or even control your computer and you usually work hard to cut off any such attempts using various security mechanisms. However, sometimes a situation occurs when you desperately need a friend, or an expert, to help you with a computer problem, but they are not at the same location at the same time. How do you show them? Should you take your mobile phone, take pictures of your screen, and send it to them? Should you record a video? Certainly not. You can share your screen with them and possibly let them control your computer remotely for a while. In this article, I will describe how to allow sharing the computer screen in Gnome. - -### Setting up the server to share its screen - -A **server** is a computer that provides (serves) some content that other computers (clients) will consume. In this article the server runs **Fedora Workstation** with the standard **Gnome desktop**. - -#### Switching on Gnome Screen Sharing - -By default, the ability to share the computer screen in Gnome is **off**. In order to use it, you need to switch it on: - - 1. Start **Gnome Control Center**. - - 2. Click on the **Sharing** tab. - -![Sharing switched off][2] - - 3. Switch on sharing with the slider in the upper right corner. - - 4. Click on **Screen sharing**. - -![Sharing switched on][3] - - 5. Switch on screen sharing using the slider in the upper left corner of the window. - - 6. Check the _Allow connections to control the screen_ if you want to be able to control the screen from the client. Leaving this button unchecked will only allow _view-only_ access to the shared screen. - - 7. If you want to manually confirm all incoming connections, select _New connections must ask for access._ - - 8. If you want to allow connections to people who know a password (you will not be notified), select _Require a password_ and fill in the password. The password can only be 8 characters long. - - 9. Check _Show password_ to see what the current password is. For a little more protection, do not use your login password here, but choose a different one. - - 10. If you have more networks available, you can choose on which one the screen will be accessible. - - - - -### Setting up the client to display a remote screen - -A **client** is a computer that connects to a service (or content) provided by a server. This demo will also run **Fedora Workstation** on the client, but the operating system actually should not matter too much, if it runs a decent VNC client. - -#### Check for visibility - -Sharing the computer screen in Gnome between the server and the client requires a working network connection and a visible “route” between them. If you cannot make such a connection, you will not be able to view or control the shared screen of the server anyway and the whole process described here will not work. - -To make sure a connection exists - -Find out the IP address of the server. - -Start **Gnome Control Center**, a.k.a **Settings**. Use the **Menu** in the upper right corner, or the **Activities** mode. When in **Activities**, type - -settings - -and click on the corresponding icon. - -Select the **Network** tab. - -Click on the **Settings button** (cogwheel) to display your network profile’s parameters. - -Open the **Details** tab to see the IP address of your computer. - -Go to **your client’s** terminal (the computer from which you want to connect) and find out if there is a connection between the client and the server using the **ping** command. - -``` - - $ ping -c 5 192.168.122.225 - -``` - -Examine the command’s output. If it is similar to the example below, the connection between the computers exists. - -``` - - PING 192.168.122.225 (192.168.122.225) 56(84) bytes of data. - 64 bytes from 192.168.122.225: icmp_seq=1 ttl=64 time=0.383 ms - 64 bytes from 192.168.122.225: icmp_seq=2 ttl=64 time=0.357 ms - 64 bytes from 192.168.122.225: icmp_seq=3 ttl=64 time=0.322 ms - 64 bytes from 192.168.122.225: icmp_seq=4 ttl=64 time=0.371 ms - 64 bytes from 192.168.122.225: icmp_seq=5 ttl=64 time=0.319 ms - --- 192.168.122.225 ping statistics --- - 5 packets transmitted, 5 received, 0% packet loss, time 4083ms - rtt min/avg/max/mdev = 0.319/0.350/0.383/0.025 ms - -``` - -You will probably experience no problems if both computers live on the same subnet, such as in your home or at the office, but problems might occur, when your server does not have a **public IP address** and cannot be seen from the external Internet. Unless you are the only administrator of your Internet access point, you will probably need to consult about your situation with your administrator or with your ISP. Note, that exposing your computer to the external Internet is always a risky strategy and you **must pay enough attention** to protecting your computer from unwanted access. - -#### Install the VNC client (Remmina) - -**Remmina** is a graphical remote desktop client that can you can use to connect to a remote server using several protocols, such as VNC, Spice, or RDP. **Remmina** is available from the Fedora repositories, so you can installed it with both the **dnf** command or the **Software**, whichever you prefer. With dnf, the following command will install the package and several dependencies. - -``` - - $ sudo dnf install remmina - -``` - -#### Connect to the server - -If there is a connection between the server and the client, make sure the following is true: - - 1. The computer is running. - 2. The Gnome session is running. - 3. The user with screen sharing enabled is logged in. - 4. The session is **not locked**, i.e. the user can work with the session. - - - -Then you can attempt to connect to the session from the client: - - 1. Start **Remmina**. - - 2. Select the **VNC** protocol in the dropdown menu on the left side of the address bar. - - 3. Type the IP address of the server into the address bar and hit **Enter**. - -![Remmina Window][4] - - 4. When the connection starts, another connection window opens. Depending on the server settings, you may need to wait until the server user allows the connection, or you may have to provide the password. - - 5. Type in the password and press **OK**. - -![Remmina Connected to Server][5] - - 6. Press ![Align with resolution button][6] ![][7] to resize the connection window to match the server resolution, or press ![Full Screen Button][8] ![][7] to resize the connection window over your entire desktop. When in fullscreen mode, notice the narrow white bar at the upper edge of the screen. That is the Remmina menu and you can access it by moving the mouse to it when you need to leave the fullscreen mode or change some of the settings. - - - - -When you return back to the server, you will notice that there is now a yellow icon in the upper bar which indicates that you are sharing the computer screen in Gnome. If you no longer wish to share the screen, you can enter the menu and click on **Screen is being shared** and then on select **Turn off** to stop sharing the screen immediately. - -![Turn off menu item][9] - -#### Terminating the screen sharing when session locks. - -By default, the connection **will always terminate** when the session locks. A new connection cannot be established until the session is unlocked. - -On one hand, this sounds logical. If you want to share your screen with someone, you might not want them to use your computer when you are not around. On the other hand, the same approach is not very useful, if you want to control your own computer from a remote location, be it your bed in another room or your mother-in-law’s place. There are two options available to deal with this problem. You can either disable locking the screen entirely or you can use a Gnome extension that supports unlocking the session via the VNC connection. - -##### Disable screen lock - -In order to disable the screen lock: - - 1. Open the **Gnome Control Center**. - 2. Click on the **Privacy** tab. - 3. Select the **Screen Lock** settings. - 4. Switch off **Automatic Screen Lock**. - - - -Now, the session will never lock (unless you lock it manually), so it will be possible to start a VNC connection to it. - -##### Use a Gnome extension to allow unlocking the session remotely. - -If you do not want to switch off locking the screen or you want to have an option to unlock the session remotely even when it is locked, you will need to install an extension that provides this functionality as such behavior is not allowed by default. - -To install the extension: - - 1. Open the **Firefox** browser and point it to [the Gnome extension page][10]. - -![][7]![Gnome Extensions Page][11] - - 2. In the upper part of the page, find an info block that tells you to install _GNOME Shell integration_ for Firefox. - - 3. Install the Firefox extension by clicking on _Click here to install browser extension_. - - 4. After the installation, notice the Gnome logo in the menu part of Firefox. - - 5. Click on the Gnome logo to navigate back to the extension page. - - 6. Search for _allow locked remote desktop_. - - 7. Click on the displayed item to go to the extension’s page. - - 8. Switch the extension **ON** by using the **on/off** button on the right. - -![Extension selected][12] - - - - -Now, it will be possible to start a VNC connection any time. Note, that you will need to know the session password to unlock the session. If your VNC password differs from the session password, your session is still protected _a little_. - -### Conclusion - -This article, described the way to enable sharing the computer screen in Gnome. It mentioned the difference between the limited (_view-only)_ access or not limited (_full)_ access. This solution, however, should in no case be considered a _correct approach_ to enable a remote access for serious tasks, such as administering a production server. Why? - - 1. The server will always keep its **control mode**. Anyone working with the server session will be able to control the mouse and keyboard. - 2. If the session is locked, unlocking it from the client will also unlock it on the server. It will also wake up the display from the stand-by mode. Anybody who can see your server screen will be able to watch what you are doing at the moment. - 3. The VNC protocol _per se_ is not encrypted or protected so anything you send over this can be compromised. - - - -There are several ways, you can set up a protected VNC connection. You could tunnel it via the SSH protocol for better security, for example. However, these are beyond the scope of this article. - -**Disclaimer**: The above workflow worked without problems on Fedora 35 using several virtual machines. If it does not work for you, then you might have hit a bug. Please, report it. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/sharing-the-computer-screen-in-gnome/ - -作者:[Lukáš Růžička][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://fedoramagazine.org/author/lruzicka/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2022/01/sharing_screen-816x345.jpg -[2]: https://fedoramagazine.org/wp-content/uploads/2022/01/settings_sharing_off.png -[3]: https://fedoramagazine.org/wp-content/uploads/2022/01/settings_sharing_on.png -[4]: https://fedoramagazine.org/wp-content/uploads/2022/01/remmina.png -[5]: https://fedoramagazine.org/wp-content/uploads/2022/01/remmina_connected_client.png -[6]: https://fedoramagazine.org/wp-content/uploads/2022/01/resolution.png -[7]: tmp.kscCxzbpG9 -[8]: https://fedoramagazine.org/wp-content/uploads/2022/01/full_screen.png -[9]: https://fedoramagazine.org/wp-content/uploads/2022/01/turn_off_connection.png -[10]: https://extensions.gnome.org -[11]: https://fedoramagazine.org/wp-content/uploads/2022/01/extensions.png -[12]: https://fedoramagazine.org/wp-content/uploads/2022/01/switch_on_extension.png diff --git a/translated/tech/20220128 Sharing the computer screen in Gnome.md b/translated/tech/20220128 Sharing the computer screen in Gnome.md new file mode 100644 index 0000000000..b2e88724af --- /dev/null +++ b/translated/tech/20220128 Sharing the computer screen in Gnome.md @@ -0,0 +1,235 @@ +[#]: subject: "Sharing the computer screen in Gnome" +[#]: via: "https://fedoramagazine.org/sharing-the-computer-screen-in-gnome/" +[#]: author: "Lukáš Růžička https://fedoramagazine.org/author/lruzicka/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +在 Gnome 中共享电脑屏幕 +====== + +![][1] + +你不希望别人能够监视甚至控制你的电脑,你通常会努力使用各种安全机制来切断任何此类企图。然而,有时会出现这样的情况:你迫切需要一个朋友,或一个专家来帮助你解决电脑问题,但他们不在同一时间的同一地点。你如何向他们展示呢?你应该拿着你的手机,拍下你的屏幕照片,然后发给他们吗?你应该录制一个视频吗?当然不是。你可以与他们分享你的屏幕,并可能让他们远程控制你的电脑一段时间。在这篇文章中,我将介绍如何在 Gnome 中允许共享电脑屏幕。 + +### 设置服务器以共享屏幕 + +**服务器**是一台提供(服务)一些内容的计算机,其他计算机(客户端)将消费这些内容。在本文中,服务器运行的是 **Fedora Workstation** 和标准的 **Gnome 桌面**。 + +#### 打开 Gnome 屏幕共享 + +默认情况下,Gnome 中共享计算机屏幕的功能是**关闭**的。要使用它,你需要把它打开: + + 1. 启动 **Gnome 控制中心**。 + + 2. 点击**共享**标签。 + +![Sharing switched off][2] + + 3. 用右上角的滑块打开共享。 + + 4. 单击**屏幕共享**。 + +![Sharing switched on][3] + + 5. 用窗口左上角的滑块打开屏幕共享。 + + 6. 如果你希望能够从客户端控制屏幕,请勾选_允许连接控制屏幕_。不勾选这个按钮访问共享屏幕只允许_仅浏览_。 + + 7. 如果你想手动确认所有传入的连接,请选择_新连接必须请求访问_。 + + 8. 如果你想允许知道密码的人连接(你不会被通知),选择_需要密码_并填写密码。密码的长度只能是 8 个字符。 + + 9. 勾选_显示密码_以查看当前的密码是什么。为了多一点保护,不要在这里使用你的登录密码,而是选择一个不同的密码。 + + 10. 如果你有多个网络可用,你可以选择在哪个网络上访问该屏幕。 + + + + +### 设置客户端以显示远程屏幕 + +**客户端**是一台连接到由服务器提供的服务(或内容)的计算机。本演示还将在客户端上运行 **Fedora Workstation**,但如果它运行一个 VNC 客户端,操作系统实际上应该不太重要。 + +#### 检查可见性 + +在 Gnome 中,服务器和客户端之间共享计算机屏幕需要一个有效的网络连接,以及它们之间可见的“路由”。如果你不能建立这样的连接,你将无法查看或控制服务器的共享屏幕,这里描述的整个过程将无法工作。 + +为了确保连接的存在,找出服务器的 IP 地址。 + +Start **Gnome Control Center**, a.k.a **Settings**. Use the **Menu** in the upper right corner, or the **Activities** mode. When in **Activities**, type +启动 **Gnome 控制中心**,又称**设置**。使用右上角的**菜单**,或**活动**模式。当在**活动**中时,输入: + +settings + +并点击相应的图标。 + +选择**网络**标签。 + +点击**设置按钮**(齿轮)以显示你的网络配置文件的参数。 + +打开**详情**标签,查看你的计算机的 IP 地址。 + +Go to **your client’s** terminal (the computer from which you want to connect) and find out if there is a connection between the client and the server using the **ping** command. +进入**你的客户端的**终端(你想连接的计算机),使用 **ping** 命令找出客户和服务器之间是否有连接。 + +``` + + $ ping -c 5 192.168.122.225 + +``` + +检查该命令的输出。如果它与下面的例子相似,说明计算机之间的连接存在。 + +``` + + PING 192.168.122.225 (192.168.122.225) 56(84) bytes of data. + 64 bytes from 192.168.122.225: icmp_seq=1 ttl=64 time=0.383 ms + 64 bytes from 192.168.122.225: icmp_seq=2 ttl=64 time=0.357 ms + 64 bytes from 192.168.122.225: icmp_seq=3 ttl=64 time=0.322 ms + 64 bytes from 192.168.122.225: icmp_seq=4 ttl=64 time=0.371 ms + 64 bytes from 192.168.122.225: icmp_seq=5 ttl=64 time=0.319 ms + --- 192.168.122.225 ping statistics --- + 5 packets transmitted, 5 received, 0% packet loss, time 4083ms + rtt min/avg/max/mdev = 0.319/0.350/0.383/0.025 ms + +``` + +如果两台计算机生活在同一个子网中,例如在你的家里或办公室,你可能不会遇到任何问题,但当你的服务器没有**公共IP地址**,无法从外部互联网上看到时,可能会出现问题。除非你是互联网接入点的唯一管理员,否则你可能需要就你的情况向你的管理员或你的 ISP 咨询。请注意,将你的计算机暴露在外部互联网上始终是一个有风险的策略,你**必须充分注意**保护你的计算机免受不必要的访问。 + +#### 安装 VNC 客户端(Remmina) + +**Remmina** 是一个图形化的远程桌面客户端,你可以使用多种协议连接到远程服务器,如 VNC、Spice 或 RDP。**Remmina** 可以从 Fedora 仓库中获得,所以你可以用 **dnf** 命令或**软件中心**来安装它,以你喜欢的方式为准。使用 dnf,下面的命令将安装该软件包和几个依赖项。 + +``` + + $ sudo dnf install remmina + +``` + +#### 连接到服务器 + +如果服务器和客户端之间有连接,请确保以下情况为没错: + + 1. 计算机正在运行。 + 2. Gnome 会话正在运行。 + 3. 启用了屏幕共享的用户已经登录。 + 4. 会话**没有被锁定**,也就是说,用户可以使用会话。 + + + +然后你可以尝试从客户端连接到该会话: + + 1. 启动 **Remmina**. + + 2. 在地址栏左侧的下拉菜单中选择 **VNC** 协议。 + + 3. 在地址栏中输入服务器的IP地址,然后按下**回车**。 + +![Remmina Window][4] + + 4. 当连接开始时,会打开另一个连接窗口。根据服务器的设置,你可能需要等待,直到服务器用户允许连接,或者你可能需要提供密码。 + + 5. 输入密码,然后按 **OK**。 + +![Remmina Connected to Server][5] + + 6. 按下 ![Align with resolution button][6] 调整连接窗口的大小,使之与服务器的分辨率一致,或者按 ![Full Screen Button][8] 调整连接窗口的大小,使其覆盖整个桌面。当处于全屏模式时,注意屏幕上边缘的白色窄条。那是 Remmina 菜单,当你需要离开全屏模式或改变一些设置时,你可以把鼠标移到它上面。 + + + + +当你回到服务器时,你会注意到现在在上栏有一个黄色的图标,这表明你正在 Gnome 中共享电脑屏幕。如果你不再希望共享屏幕,你可以进入菜单,点击**屏幕正在被共享**,然后在选择**关闭**,立即停止共享屏幕。 + +![Turn off menu item][9] + +#### 会话锁定时终止屏幕共享 + +默认情况下,当会话锁定时,连接**将始终终止**。在会话被解锁之前,不能建立新的连接。 + +一方面,这听起来很合理。如果你想和别人分享你的屏幕,你可能不想让他们在你不在的时候使用你的电脑。另一方面,如果你想从远程位置控制你自己的电脑,无论是你在另一个房间的床上,还是你岳母的地方,同样的方法也不是很有用。有两个选项可以处理这个问题。你可以完全禁止锁定屏幕,或者使用支持通过 VNC 连接解锁会话的 Gnome 扩展。 + +##### 禁用屏幕锁 + +要禁用屏幕锁: + + 1. 打开 **Gnome 控制中心**。 + 2. 点击**隐私**标签。 + 3. 选择**屏幕锁定**设置。 + 4. 关掉**自动屏幕锁定**。 + + + +现在,会话将永远不会被锁定(除非你手动锁定),所以它将有可能启动一个 VNC 连接到它。 + +##### 使用 Gnome 扩展来允许远程解锁会话 + +如果你不想关闭锁定屏幕的功能,或者你想有一个远程解锁会话的选项,即使它被锁定,你将需要安装一个提供这种功能的扩展,因为这种行为是默认不允许的。 + +要安装该扩展: + + 1. 打开**火狐浏览器**,并打开 [Gnome 扩展页面][10]。 + +![][7]![Gnome Extensions Page][11] + + 2. 在页面的上部,找到一个信息块,告诉你为火狐安装 _GNOME Shell integration_。 + + 3. 点击 _Click here to install browser extension_ 来安装 Firefox 扩展。 + + 4. 安装完毕后,注意到 Firefox 的菜单部分有 Gnome 的标志。 + + 5. 点击 Gnome 标志,回到扩展页面。 + + 6. 搜索 _allow locked remote desktop_。 + + 7. 点击显示的项目,进入该扩展的页面。 + + 8. 使用右边的**开/关**按钮,将扩展**打开** + +![Extension selected][12] + + + + +现在,可以在任何时候启动 VNC 连接。注意,你需要知道会话密码以解锁会话。如果你的 VNC 密码与会话密码不同,你的会话仍然受到_一点_保护。 + +### 总结 + +这篇文章介绍了在 Gnome 中实现共享计算机屏幕的方法。它提到了受限(_仅浏览_)访问和非受限(_完全_)访问之间的区别。然而,这个解决方案在任何情况下都不应该被认为是一个正确的方法,以实现对严肃任务的远程访问,例如管理一个生产服务器。为什么? + + 1. 服务器将始终保持其**控制模式**。任何在服务器会话中的人都将能够控制鼠标和键盘。 + 2. 如果会话被锁定,从客户端解锁也会在服务器上解锁。它也会把显示器从待机模式中唤醒。任何能看到你的服务器屏幕的人都能看到你此刻正在做什么。 + 3. VNC 协议本身没有加密或保护,所以你通过它发送的任何东西都可能被泄露。 + + + +你几种可以建立一个受保护的 VNC 连接的方法。例如,你可以通过 SSH 协议建立隧道,以提高安全性。然而,这些都超出了本文的范围。 + +**免责声明**:上述工作流程在 Fedora 35 上使用几个虚拟机工作时没有问题。如果它对你不起作用,那么你可能遇到了一个错误。请报告它。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/sharing-the-computer-screen-in-gnome/ + +作者:[Lukáš Růžička][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/lruzicka/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2022/01/sharing_screen-816x345.jpg +[2]: https://fedoramagazine.org/wp-content/uploads/2022/01/settings_sharing_off.png +[3]: https://fedoramagazine.org/wp-content/uploads/2022/01/settings_sharing_on.png +[4]: https://fedoramagazine.org/wp-content/uploads/2022/01/remmina.png +[5]: https://fedoramagazine.org/wp-content/uploads/2022/01/remmina_connected_client.png +[6]: https://fedoramagazine.org/wp-content/uploads/2022/01/resolution.png +[8]: https://fedoramagazine.org/wp-content/uploads/2022/01/full_screen.png +[9]: https://fedoramagazine.org/wp-content/uploads/2022/01/turn_off_connection.png +[10]: https://extensions.gnome.org +[11]: https://fedoramagazine.org/wp-content/uploads/2022/01/extensions.png +[12]: https://fedoramagazine.org/wp-content/uploads/2022/01/switch_on_extension.png From 35d3fe89f7ebd71e137dd1b3020adefe2df36e28 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 8 Feb 2022 08:46:41 +0800 Subject: [PATCH 202/334] translating --- ... Open source tools to make your Wordle results accessible.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220130 Open source tools to make your Wordle results accessible.md b/sources/tech/20220130 Open source tools to make your Wordle results accessible.md index 34cf7a8a3b..eeef37b837 100644 --- a/sources/tech/20220130 Open source tools to make your Wordle results accessible.md +++ b/sources/tech/20220130 Open source tools to make your Wordle results accessible.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/1/open-source-accessibility-wordle" [#]: author: "AmyJune Hineline https://opensource.com/users/amyjune" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 914046df9d5f67b32897869a23996359dafa1b47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?imgradeone=20-=20=E4=B8=80=E5=B9=B4=E7=BA=A7=E4=B9=88?= =?UTF-8?q?=E4=B9=88=E5=93=92?= Date: Tue, 8 Feb 2022 09:38:52 +0800 Subject: [PATCH 203/334] done tl --- ... Which Chromium-Based Browser is Better.md | 50 +++++++++---------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/sources/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md b/sources/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md index e788a8614f..d1f78790d6 100644 --- a/sources/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md +++ b/sources/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md @@ -12,7 +12,7 @@ Brave vs Vivaldi:哪个浏览器更好? Brave,毫无疑问,是一款出色的开源网页浏览器。它也是 [适用于 Linux 的最佳网页浏览器][1] 之一。 -另一方面,Vivaldi 凭借其自定义能力和标签页管理功能,在 Linux 用户群中获得了不错的声誉。 +另一方面,Vivaldi 凭借其强劲的自定义能力和标签页管理功能,在 Linux 用户群中获得了不错的声誉。 Vivaldi 是否值得一试?它开源吗?为什么你会更喜欢 Brave 而不是它?或者,是否应该考虑使用 Vivaldi 呢? @@ -36,11 +36,11 @@ Brave 专注于提供简洁的外观,而 Vivaldi 则尽力提供更多的功 反观另一边,Vivaldi 默认情况下看上去似乎有点超负荷 —— 能够快速访问的侧边栏,地址栏右边的搜索框,再加上浏览器底部还有更多要素。 -Vivaldi 默认也会提供更多主题。别忘了,你可以无缝编辑并定制主题,Brave 可没有这种功能哦。 +Vivaldi 默认也会提供更多主题。别忘了,你可以无缝编辑并定制主题,而 Brave 可没有这种功能哦。 ![][4] -对于那些想要一款简洁明了,同时可以自定义的浏览器的人来说,Brave 就是一款简洁的推荐项。而对于那些需要丰富的界面和大量设置项的用户来说,Vivaldi 是个不错的选择。 +对于那些想要一款简洁明了,同时可以自定义的浏览器的人来说,Brave 就是合适的推荐项。而对于那些需要丰富的界面和大量设置项的用户来说,Vivaldi 是个不错的选择。 ### 完全开源 vs 99% 开源 @@ -48,7 +48,7 @@ Brave 是完全开源的,可以免费 / 自由使用。你可以在 GitHub 上 Vivaldi 的话,呃……只能说是几乎开源。整个浏览器基于 Chromium 开发,而修改过的 Chromium 源代码可以在它的官网中找到。不过,这款浏览器的用户界面却是专有的。 -为确保提供独特的用户体验,并保持对它的控制权,Vivaldi 决定让用户界面闭源。 +为确保提供独特的用户体验,并保持对它的控制权,Vivaldi 决定将用户界面闭源。 不过,他们在一篇 [博文][5] 中解释得很清楚。 @@ -56,7 +56,7 @@ Vivaldi 的话,呃……只能说是几乎开源。整个浏览器基于 Chrom ![][6] -对于大多数用户来说,这可能不算是一个比较标准,但考虑到 Vivaldi 以其标签页管理功能为知名,因此这一点仍旧值得比较。 +对于大多数用户来说,这可能不算是一个比较标准,但考虑到 Vivaldi 以其标签页管理功能而著名,因此这一点仍旧值得比较。 在你打开了许多标签页时,标签页管理就会大有用场。如果你只开了少量的标签页,那你不需要同时考虑标签页管理,但它仍旧十分有用。 @@ -70,7 +70,7 @@ Brave 同样可以分组标签、指定颜色、命名标签组,以及展开 / 不过,在 Brave 里就没有 Vivaldi 那样的两级标签栏,以及自定义标签行为的功能。 -此外,我个人认为 Brave 的标签管理(在开启暗色模式时)看上去有一点点乱。 +此外,我个人认为 Brave 的标签管理(在开启暗色模式时)看上去有点混乱不堪。 当然,你可以决定新标签页展示什么内容,但这远远不及 Vivaldi 大量选项那么有用。 @@ -88,7 +88,7 @@ Brave 搜索是 Brave 浏览器的默认搜索引擎。虽然这款搜索引擎 来到 Vivaldi 这边,它提供了大量额外功能,包括侧边栏的 Web 面板、番茄钟、页面平铺、日历集成、电子邮箱集成、RSS 订阅等。 -侧边栏(或者叫 Web 面板)允许你快速访问内容,不需额外新建标签或窗口,让你轻松进行多任务处理,而不会失去对活跃标签的专注。 +侧边栏(或者叫 Web 面板)允许你快速访问内容,不需额外新建标签或窗口,让你轻松进行多任务处理,而不会失去对当前活跃标签的专注。 ![][9] @@ -118,45 +118,43 @@ Brave 同样给你类似的控制级别,当然也有更高级的设置项, 一如既往,我借助一些知名的跑分工具来测试浏览器的性能,例如:[JetStream 2][13]、[Speedometer 2.0][14] 和 [Basemark Web 3.0][15]。 -我使用 Pop!_OS 21.10 作为我的 Linux 发行版,而测试的浏览器版本为 **Vivaldi 5.0.2497.51 稳定版** 和 Brave **97.0.4692.99**。 +我使用 Pop!\_OS 21.10 作为我的 Linux 发行版,而测试的浏览器版本为 **Vivaldi 5.0.2497.51 稳定版** 和 Brave **97.0.4692.99**。 -在这些基准跑分测试中,Brave 总体会更快,但 Vivaldi 在 Speedometer 2.0 中得分更高。 +在这些基准跑分测试中,Brave 总体更快,但 Vivaldi 在 Speedometer 2.0 中得分更高。 给你一个概念,我后台没有运行任何程序,只运行了浏览器。电脑配置为 **英特尔 15-11600K @4.7GHz,32GB 3200 MHz 运存,英伟达 1050Ti 显卡**。 -因此, +因此,两款浏览器都应该能带来快速、便捷的网络体验。 -So, both browsers should be good enough for a snappy web experience. +### 安装 -### Installation - -Vivaldi offers the latest DEB/RPM packages on its [official website][16] and also provides support for ARM devices. You do not find any Flatpak or Snap packages for Vivaldi in the stable channel for the time being. +Vivaldi 在它的 [官网][16] 提供了最新的 DEB/RPM 软件包,而且同样支持 ARM 设备。不过目前稳定版本的 Vivaldi 暂时不提供 Flatpak 和 Snap 版本。 ![][17] -Brave, on the other hand, does not directly offer these packages on its website. You will have to [follow a set of commands in the terminal][18] to install it, which is the recommended way of installation. +另一边,Brave 并没有直接在官网提供这些软件包。你必须 [在终端中输入一组命令][18] 以安装 Brave,至少这是官方推荐的安装方式。 ![][19] -You can find a [Snap package][20], but it is not the best method as mentioned by them officially. +你也能下载 [Snap 版软件包][20],但这并非是最佳方法,官方也承认有许多问题存在。 -In any case, you can refer to our [Brave installation guide for Fedora][21] to get help. +但无论如何,你都可以查阅我们的 [在 Fedora 上安装 Brave 的指南][21] 以获得帮助。 -### The Final Verdict +### 最终结论 -When it comes to open-source browsers, Brave gets the edge as its entire source code is available. However, the commitment to a private web experience, and the focus on Linux as a platform by Vivaldi, is impressive. +如果说到开源浏览器,那 Brave 占绝对优势,毕竟它是完全开源的。不过,Vivaldi 对于隐私型网络体验的承诺,以及对 Linux 平台的重视,反而更具吸引力。 -Feature-wise, the tab management ability on Vivaldi can be a compelling option to help you dabble between multiple tabs. +从功能上看,Vivaldi 的标签页管理功能已经是极具竞争力的选择,它可以帮助你在大量标签中更加游刃有余。 -Note that the experience may not be excellent with dual-monitor systems (as is my case). As of now, Vivaldi seems to stutter and becomes unresponsive with my dual-monitor system, which didn’t happen with a single display. +需要注意的是,Vivaldi 的双显示器体验似乎不太友好(至少在我这边是这样的)。目前来看,Vivaldi 在我的双显示器环境下出现卡顿,甚至无响应,但在单显示器上从来没有这种情况。 -Brave does not seem to suffer from this issue. So, you might want to test things out in such cases. +而 Brave 就没有这种问题。因此,建议你自行测试一下。 -Brave should provide a clean and fast experience, and Vivaldi can be a good choice for users looking for more customizability and a rich user interface. +Brave 提供简洁和快速的体验,Vivaldi 则更适合那些喜欢更多自定义配置和丰富界面的用户。 -I’d go with Vivaldi considering the tab management feature saves a lot of time, but then again I’ve switched to Firefox until it works flawlessly with dual-monitors. +考虑到 Vivaldi 标签页管理功能确实能省下不少时间,我会选择 Vivaldi,不过我最后还是换回了 Firefox,至少等到 Vivaldi 能够在双显示器环境下流畅运行。 -What would you prefer? Let me know in the comments down below. +你又会选择哪款呢?欢迎在评论区留言,让我了解你的想法。 -------------------------------------------------------------------------------- @@ -191,4 +189,4 @@ via: https://itsfoss.com/brave-vs-vivaldi/ [18]: https://brave.com/linux/#linux [19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/brave-install-on-linux.png?resize=800%2C358&ssl=1 [20]: https://snapcraft.io/brave -[21]: https://itsfoss.com/install-brave-browser-fedora/ +[21]: https://linux.cn/article-14028-1.html From af21dd3cec5bb5aab197067189564be1504915c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?imgradeone=20-=20=E4=B8=80=E5=B9=B4=E7=BA=A7=E4=B9=88?= =?UTF-8?q?=E4=B9=88=E5=93=92?= Date: Tue, 8 Feb 2022 09:39:15 +0800 Subject: [PATCH 204/334] move file --- ...05 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md (100%) diff --git a/sources/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md b/translated/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md similarity index 100% rename from sources/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md rename to translated/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md From ce4fd1d6ee3bcbfae30cdf18d645ffd11d940815 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 8 Feb 2022 09:53:37 +0800 Subject: [PATCH 205/334] Delete 20220207 .md --- sources/tech/20220207 .md | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 sources/tech/20220207 .md diff --git a/sources/tech/20220207 .md b/sources/tech/20220207 .md deleted file mode 100644 index 75f1ed460f..0000000000 --- a/sources/tech/20220207 .md +++ /dev/null @@ -1,16 +0,0 @@ -[#]: subject: "" -[#]: via: "https://www.debugpoint.com/2022/02/top-whiteboard-applications-linux/" -[#]: author: "[Arindam] - -Posted by Arindam - -Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - - -====== - From 4118cad27d337ccd3c3897f14fcdfb69910d9f36 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 8 Feb 2022 10:43:58 +0800 Subject: [PATCH 206/334] ATRP @wxy https://linux.cn/article-14252-1.html --- ...is Here, Rebuilt Using Rust with a New UI.md | 139 +++++++++++++++++ ...is Here, Rebuilt Using Rust with a New UI.md | 142 ------------------ 2 files changed, 139 insertions(+), 142 deletions(-) create mode 100644 published/20220207 BitTorrent Client ‘Fragments 2.0- for Linux is Here, Rebuilt Using Rust with a New UI.md delete mode 100644 sources/news/20220207 BitTorrent Client ‘Fragments 2.0- for Linux is Here, Rebuilt Using Rust with a New UI.md diff --git a/published/20220207 BitTorrent Client ‘Fragments 2.0- for Linux is Here, Rebuilt Using Rust with a New UI.md b/published/20220207 BitTorrent Client ‘Fragments 2.0- for Linux is Here, Rebuilt Using Rust with a New UI.md new file mode 100644 index 0000000000..e703fc0b4b --- /dev/null +++ b/published/20220207 BitTorrent Client ‘Fragments 2.0- for Linux is Here, Rebuilt Using Rust with a New UI.md @@ -0,0 +1,139 @@ +[#]: subject: "BitTorrent Client ‘Fragments 2.0’ for Linux is Here, Rebuilt Using Rust with a New UI" +[#]: via: "https://news.itsfoss.com/fragments-2-0-release/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14252-1.html" + +Linux BitTorrent 客户端 Fragments 2.0 全新发布 +====== + +> Fragments 2.0 的发布使其成为 Linux 发行版中最方便用户使用的 BitTorrent 客户端之一。让我们来看看有什么新变化。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fragments-2-0-ft.png?w=1200&ssl=1) + +Fragments 是 [Linux 上最好的 BitTorrent 客户端之一][1]。 + +最新的 Fragments 2.0 是一个重大升级,它使用 Rust、GTK 4 和 Libadwaita 从头开始完全重写。 + +除了技术上的改进之外,你还会发现一些新的功能和改进的用户界面。 + +让我重点介绍一下它的变化。 + +### Fragments 2.0 的新变化 + +![][2] + +最近,Gnome 应用程序的生态系统经历了一些大规模的变化。在这个变化的最前沿是向 Gtk4 和 [Libadwaita][3] 的过渡。不幸的是,这种变化并不小,许多应用程序需要从头开始重建,以支持这些新标准。 + +与许多其他应用程序开发者一起,Fragment 的开发者 [Felix Häcker][4] 决定从头开始重建 Fragments,现在作为 Fragments 2.0 发布。因此,我们现在得到了一个改进的 Linux 的 BitTorrent 客户端。 + +其中的一些改进包括。 + + * 一个基于 Libadwaita 的漂亮的新用户界面 + * 新的模块化架构 + * 能够被用作远程 Fragments / Transmission 会话的远程控制 + * 新的偏好对话框有更多的选项 + * 能够查看有关网络的统计数据 + +#### 一个新的用户界面 + +![][5] + +Fragments 2.0 现在有一个基于 Libadwaita 的新 UI。补充一句,Libadwaita 是 GTK4 对 Gnome 应用程序的一个扩展。它有几个优点,最明显的是在所有 Gnome 应用程序中具有一致的外观。 + +它比旧的主题更加扁平和圆润,我觉得,看起来非常时尚。 + +你可以得到一个外观简洁的 BitTorrent 应用程序,易于浏览,你也可以快速访问一些基本的选项。 + +#### 新的模块化架构 + +虽然不能直接看到,但 Fragments 2.0 具有一个全新的模块化架构。在内部,该应用程序的所有不同部分都是模块化的。虽然这起初看起来没有那么大的影响,但我可以看到它对用户和开发者都有深远的影响。 + +首先,它应该意味着更容易维护,希望能让开发人员花更多时间在新功能和错误修复上。其次,它也应该意味着应用程序的更大稳定性。如果 Fragments 的一个部分崩溃了,应用程序的其他部分应该保持工作,希望不会对用户产生任何重大影响。 + +这只是我想到的这个新架构的两个好处,我相信还可以有更多。 + +#### 新的首选项对话框 + +![][6] + +最后,Fragments 2.0 引入了几个经常要求的设置选项。在这些选项中,我认为最重要的是能够改变尚未完全下载的种子的默认文件夹。 + +![][11] + +虽然仍然不像它的一些替代品那样可以定制,但这些新增功能可以帮助你调整设置以适应你的要求。 + +其中一些选项包括: + + * 添加种子后自动启动它们 + * 启用/禁用下载队列 + * 可定制的对等体限制 + * 网络端口设置 + * 自动端口转发的切换 + +#### 控制远程 Fragments / Transmission 会话 + +远程控制你的下载的能力可以产生相当大的影响。随着 Fragments 2.0,该应用程序终于获得了类似的功能,允许用户远程控制其他安装的 Fragments 和 Transmission 客户端。 + +这对使用单独的下载服务器的人来说非常有用,因为他们往往不能直接访问它。 + +虽然这在其他应用程序中一直提供的,但这一功能被直接整合到 Fragments 中,使得它成为一个对高级用户有用的 BitTorrent 客户端! + +#### 其他改进措施 + +![][7] + +除了所有这些大的变化之外,还有一些错误的修复和一些新的能力。 + +一些关键的亮点包括: + + * 添加的种子的磁力链可以被复制到剪贴板上 + * 可以查看关于当前会话的统计数据(速度、总下载数据等) + +你可以在其 [GitLab 页面][8] 上探索更多关于 Fragments 2.0 的信息。 + +### 下载 Fragments 2.0 + +Fragments 是以 Flatpak 应用程序的形式提供的。如果你的 Linux 发行版没有内置的支持,你可以通过我们的 [Flatpak 指南][9] 来设置 Flatpak。 + +- [Fragments(Flathub)][10] + +你可以尝试在你的软件中心搜索它(启用 Flatpak 集成)或在终端键入以下命令: + +``` +flatpak install flathub de.haeckerfelix.Fragments +``` + +Fragments 2.0.1(有一些小的修正)也可以在其 GitLab 页面上找到,但还没有反映在 Flathub 上。 + +如果你在使用 Fragments 2.0 时有问题,你可能想等更新版本进入 Flathub。 + +你最喜欢的 BitTorrent Linux 客户端是什么?Fragments 2.0 是否令人印象深刻?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/fragments-2-0-release/ + +作者:[Jacob Crume][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-torrent-ubuntu/ +[2]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fragments-2-0-home.png?resize=1568%2C1109&ssl=1 +[3]: https://adrienplazas.com/blog/2021/03/31/introducing-libadwaita.html +[4]: https://twitter.com/haeckerfelix +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fragments-2-0-screenshot.png?resize=1568%2C1424&ssl=1 +[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fragments-2-0-preferences.png?resize=1568%2C1454&ssl=1 +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fragments-2-other.png?w=1376&ssl=1 +[8]: https://gitlab.gnome.org/World/Fragments +[9]: https://itsfoss.com/flatpak-guide/ +[10]: https://flathub.org/apps/details/de.haeckerfelix.Fragments +[11]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fragments-2-downloads.png?resize=1568%2C1454&ssl=1 \ No newline at end of file diff --git a/sources/news/20220207 BitTorrent Client ‘Fragments 2.0- for Linux is Here, Rebuilt Using Rust with a New UI.md b/sources/news/20220207 BitTorrent Client ‘Fragments 2.0- for Linux is Here, Rebuilt Using Rust with a New UI.md deleted file mode 100644 index 6ce01a409e..0000000000 --- a/sources/news/20220207 BitTorrent Client ‘Fragments 2.0- for Linux is Here, Rebuilt Using Rust with a New UI.md +++ /dev/null @@ -1,142 +0,0 @@ -[#]: subject: "BitTorrent Client ‘Fragments 2.0’ for Linux is Here, Rebuilt Using Rust with a New UI" -[#]: via: "https://news.itsfoss.com/fragments-2-0-release/" -[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -BitTorrent Client ‘Fragments 2.0’ for Linux is Here, Rebuilt Using Rust with a New UI -====== - -Fragments is [one of the best torrent clients for Linux][1]. - -The latest Fragments 2.0 is a significant upgrade, completely rewritten from scratch using Rust, GTK 4, and Libadwaita. - -In addition to the technical improvements, you will also find some new features and an improved user interface. - -Let me highlight the changes below. - -### Fragments 2.0: What’s New? - -![][2] - -Recently, the Gnome app ecosystem has been undergoing some massive changes. At the forefront of this change is the transition to Gtk4 and [Libadwaita][3]. Unfortunately, this change is not a small one, and many apps need to be rebuilt from the ground up to support these new standards. - -Alongside many other app developers, Fragment’s developer [Felix Häcker][4] decided to rebuild Fragments from the ground up, now releasing it as Fragments 2.0. As a result, we now get an improved BitTorrent client for Linux. - -Some of the improvements include: - - * A beautiful new UI based on Libadwaita - * New modular architecture - * The ability to be used as remote control for remote Fragments / Transmission sessions - * New preferences dialog with more options - * The ability to view statistics about the network - - - -#### A New UI - -![][5] - -Fragments 2.0 now has a new UI based on Libadwaita. Libadwaita is an extension of GTK4 for Gnome apps for those of you who don’t know. It has a few advantages, the most notable being a consistent look across all Gnome apps. - -It is much more flat and rounded than the old theme and, in my opinion, looks very stylish. - -You get a clean-looking BitTorrent app that’s easy to navigate, and you can also quickly access some essential options. - -#### New Modular Architecture - -While not immediately apparent, Fragments 2.0 features a brand-new modular architecture. Under-the-hood, all the different parts of the app are modular. While this may not seem that impactful at first, I can see it having a profound impact on users and developers alike. - -Firstly, it should mean easier maintenance, hopefully allowing the developers to spend more time on new features and bug fixes. Secondly, it should also mean greater stability for the application. This is because if one part of Fragments crashes, the rest of the app should remain working, hopefully without any significant impact on the user. - -These are just two of the benefits of this new architecture I could think of, and I’m sure there can be more. - -#### New Preferences Dialog - -![][6] - -Finally, Fragments 2.0 introduces several frequently requested settings options. Among these, I think the most important is the ability to change the default folder for torrents that have not been completely downloaded yet. - -![][6] - -While still not as customizable as some of its alternatives, these additions help you tweak the settings to fit your requirements. - -Some of the options include: - - * Automatically start torrents after adding them - * Enable/Disable download queue - * Customizable peer limits - * Network port setting - * Automatic port forwarding toggle - - - -#### Control Remote Fragments / Transmission Sessions - -The ability to remote control your downloads can have a considerable impact. With Fragments 2.0, the app finally gets a similar feature, allowing users to remote control other installations of Fragments and Transmission torrent clients. - -This is extremely useful for people using a separate download server, as they often don’t have access to it directly. - -While this has always been possible with other apps, the fact that this is integrated directly into Fragments makes it a helpful BitTorrent client for power users! - -#### Other Improvements - -![][7] - -In addition to all these massive changes, there are several bug fixes and a few new abilities. - -Some key highlights include: - - * Magnet link of added torrents can be copied to clipboard - * Statistics about the current session can be viewed (speed, total download data, etc.) - - - -You can explore more about Fragments 2.0 on its [GitLab page][8]. - -### Download Fragments 2.0 - -Fragments is available as a Flatpak app. If your Linux distribution does not have the support baked in, you can go through our [Flatpak guide][9] to set up Flatpak. - -[Fragments (Flathub)][10] - -You can try searching for it in your software center (with Flatpak integration enabled) or type in the following command in the terminal: - -``` - - flatpak install flathub de.haeckerfelix.Fragments - -``` - -Fragments 2.0.1 (with some minor fixes) is also available on its GitLab page but not yet reflected on Flathub. - -If you have issues with Fragments 2.0, you might want to wait for the newer version to hit Flathub. - -What’s your favorite BitTorrent Linux client? Is Fragments 2.0 impressive? Let me know your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/fragments-2-0-release/ - -作者:[Jacob Crume][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/jacob/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/best-torrent-ubuntu/ -[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU1MiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[3]: https://adrienplazas.com/blog/2021/03/31/introducing-libadwaita.html -[4]: https://twitter.com/haeckerfelix -[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjcwOCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjcyNCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU5NSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[8]: https://gitlab.gnome.org/World/Fragments -[9]: https://itsfoss.com/flatpak-guide/ -[10]: https://flathub.org/apps/details/de.haeckerfelix.Fragments From 8950cfa42880c093991c432c5e209d9b4f9e73fe Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 8 Feb 2022 12:15:17 +0800 Subject: [PATCH 207/334] RP @geekpi https://linux.cn/article-14253-1.html --- ...lve Wordle using the Linux command line.md | 100 +++++------------- 1 file changed, 29 insertions(+), 71 deletions(-) rename {translated/tech => published}/20220116 Solve Wordle using the Linux command line.md (64%) diff --git a/translated/tech/20220116 Solve Wordle using the Linux command line.md b/published/20220116 Solve Wordle using the Linux command line.md similarity index 64% rename from translated/tech/20220116 Solve Wordle using the Linux command line.md rename to published/20220116 Solve Wordle using the Linux command line.md index 8ee4f8fc49..4a06621b65 100644 --- a/translated/tech/20220116 Solve Wordle using the Linux command line.md +++ b/published/20220116 Solve Wordle using the Linux command line.md @@ -3,13 +3,15 @@ [#]: author: "Jim Hall https://opensource.com/users/jim-hall" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14253-1.html" 用 Linux 命令行解决 Wordle 问题 ====== -使用 Linux 的 grep 和 fgrep 命令来赢得你最喜欢的基于单词的猜测游戏。 + +> 使用 Linux 的 grep 和 fgrep 命令来赢得你最喜欢的基于单词的猜测游戏。 + ![Linux keys on the keyboard for a desktop computer][1] 我最近有点迷恋上了一个在线单词猜谜游戏,在这个游戏中,你有六次机会来猜一个随机的五个字母的单词。这个词每天都在变化,而且你每天只能玩一次。每次猜测后,你猜测中的每个字母都会被高亮显示:灰色表示该字母没有出现在神秘单词中,黄色表示该字母出现在单词中,但不在那个位置,绿色表示该字母出现在单词中的那个正确位置。 @@ -18,152 +20,111 @@ ### 第一次尝试 -Linux系统在 `/usr/share/dict/words` 文件中保存了一个单词词典。这是一个很长的纯文本文件。我的系统的单词文件里有超过 479,800 个条目。该文件既包含纯文本,也包含专有名词(名字、地点等等)。 +Linux 系统在 `/usr/share/dict/words` 文件中保存了一个单词词典。这是一个很长的纯文本文件。我的系统的单词文件里有超过 479,800 个条目。该文件既包含纯文本,也包含专有名词(名字、地点等等)。 为了开始我的第一次猜测,我只想得到一个长度正好是五个字母的纯文本词的列表。要做到这一点,我使用这个 `grep` 命令: - ``` -`$ grep '^[a-z][a-z][a-z][a-z][a-z]$' /usr/share/dict/words > myguess` +$ grep '^[a-z][a-z][a-z][a-z][a-z]$' /usr/share/dict/words > myguess ``` `grep` 命令使用正则表达式来进行搜索。你可以用正则表达式做很多事情,但为了帮助我解决 Wordle 问题,我只需要基本的东西。`^` 表示一行的开始,`$` 表示一行的结束。在两者之间,我指定了五个 `[a-z]` 的实例,表示从 a 到 z 的任何小写字母。 我还可以使用 `wc` 命令来查看我的可能单词列表,“只有” 15,000 个单词: - ``` - - $ wc -l myguess 15034 myguess - ``` -从这个列表中,我随机挑选了一个五个字母的单词:_acres_。_a_ 被设置为黄色,意味着该字母存在于神秘单词的某处,但不在第一位置。其他字母是灰色的,所以我知道它们并不存在于今天的单词中。 +从这个列表中,我随机挑选了一个五个字母的单词:`acres`。`a` 被设置为黄色,意味着该字母存在于神秘单词的某处,但不在第一位置。其他字母是灰色的,所以我知道它们并不存在于今天的单词中。 ![acres word attempt][2] -Jim Hall(CC BY-SA 4.0) - ### 第二次尝试 -对于我的下一个猜测,我想得到一个包含 _a_ 的所有单词的列表,但不是在第一位置。我的列表也不应该包括字母 _c_、_r_、_e_或_s_。让我们把这个问题分解成几个步骤。 +对于我的下一个猜测,我想得到一个包含 `a` 的所有单词的列表,但不是在第一位置。我的列表也不应该包括字母 `c`、`r`、`e` 或 `s`。让我们把这个问题分解成几个步骤。 为了得到所有带 a 的单词的列表,我使用 `fgrep`(固定字符串 grep)命令。`fgrep` 命令也像 `grep` 一样搜索文本,但不使用正则表达式: - ``` -`$ fgrep a myguess > myguess2` +$ fgrep a myguess > myguess2 ``` 这使我的下一个猜测的可能列表从 15,000 个字下降到 6,600 个字: - ``` - - $ wc -l myguess myguess2 15034 myguess 6634 myguess2 21668 total - ``` -但是这个单词列表中的第一个位置也有字母 _a_,这是我不想要的。游戏已经表明字母 _a_ 存在于其他位置。我可以用 `grep` 修改我的命令,以寻找在第一个位置包含其他字母的词。这就把我可能的猜测缩小到了 5500 个单词: - +但是这个单词列表中的第一个位置也有字母 `a`,这是我不想要的。游戏已经表明字母 `a` 存在于其他位置。我可以用 `grep` 修改我的命令,以寻找在第一个位置包含其他字母的词。这就把我可能的猜测缩小到了 5500 个单词: ``` - - -$ fgrep a myguess | grep '^[b-z]' > myguess2 +$ fgrep a myguess | grep '^[b-z]' > myguess2 $ wc -l myguess myguess2 15034 myguess 5566 myguess2 20600 total - ``` -但我知道这个神秘的词也不包括字母 _c_、_r_、_e_ 或 _s_。我可以使用另一个 `grep` 命令,在搜索中省略这些字母: - +但我知道这个神秘的词也不包括字母 `c`、`r`、`e` 或 `s`。我可以使用另一个 `grep` 命令,在搜索中省略这些字母: ``` - - -$ fgrep a myguess | grep '^[b-z]' | grep -v '[cres]' > myguess2 +$ fgrep a myguess | grep '^[b-z]' | grep -v '[cres]' > myguess2 $ wc -l myguess myguess2 15034 myguess 1257 myguess2 16291 total - ``` -`-v` 选项意味着反转搜索,所以 `grep` 将只返回不符合正则表达式 `[cres]` 或单列字母 _c_、_r_、_e_ 或 _s_ 的行。有了这个额外的 `grep` 命令,我把下一个猜测的范围大大缩小到只有 1200 个可能的单词,这些单词在某处有一个 a,但不在第一位置,并且不包含 _c_, _r_, _e_, 或 _s_。 +`-v` 选项意味着反转搜索,所以 `grep` 将只返回不符合正则表达式 `[cres]` 或单列字母 `c`、`r`、`e` 或 `s` 的行。有了这个额外的 `grep` 命令,我把下一个猜测的范围大大缩小到只有 1200 个可能的单词,这些单词在某处有一个 `a`,但不在第一位置,并且不包含 `c`、`r`、`e`、或 `s`。 -在查看了这个列表后,我决定尝试一下 _balmy_ 这个词。 +在查看了这个列表后,我决定尝试一下 `balmy` 这个词。 ![balmy word attempt][3] -Jim Hall(CC BY-SA 4.0) - ### 第三次尝试 -这一次,字母 _b_ 和 _a_ 被高亮显示为绿色,意味着我把这些字母放在了正确的位置。字母 _l_ 是黄色的,所以这个字母存在于单词的其他地方,但不是在那个位置。字母 _m_ 和 _y_ 是灰色的,所以我可以从我的下一个猜测中排除这些。 - -为了确定下一个可能的单词列表,我可以使用另一组 `grep` 命令。我知道这个词以 _ba_ 开头,所以我可以从这里开始搜索: +这一次,字母 `b` 和 `a` 被高亮显示为绿色,意味着我把这些字母放在了正确的位置。字母 `l` 是黄色的,所以这个字母存在于单词的其他地方,但不是在那个位置。字母 `m` 和 `y` 是灰色的,所以我可以从我的下一个猜测中排除这些。 +为了确定下一个可能的单词列表,我可以使用另一组 `grep` 命令。我知道这个词以 `ba` 开头,所以我可以从这里开始搜索: ``` - - -$ grep '^ba' myguess2 > myguess3 +$ grep '^ba' myguess2 > myguess3 $ wc -l myguess3 77 myguess3 - ``` -这只有 77 个词! 我可以进一步缩小范围,寻找除第三位外还包含字母 _l_ 的词: - +这只有 77 个词! 我可以进一步缩小范围,寻找除第三位外还包含字母 `l` 的词: ``` - - -$ grep '^ba[^l]' myguess2 > myguess3 +$ grep '^ba[^l]' myguess2 > myguess3 $ wc -l myguess3 61 myguess3 - ``` -方括号 `[^l]` 内的 `^` 表示不是这个字母列表,即不是字母 _l_。这使我的可能单词列表达到 61 个,并非所有的单词都包含字母 _l_,我可以用另一个 `grep` 搜索来消除这些单词: - +方括号 `[^l]` 内的 `^` 表示不是这个字母列表,即不是字母 `l`。这使我的可能单词列表达到 61 个,并非所有的单词都包含字母 `l`,我可以用另一个 `grep` 搜索来消除这些单词: ``` - - -$ grep '^ba[^l]' myguess2 | fgrep l > myguess3 +$ grep '^ba[^l]' myguess2 | fgrep l > myguess3 $ wc -l myguess3 10 myguess3 - ``` -这些词中有些可能包含字母 _m_ 和 _y_,而这些字母并不在今天的神秘词中。我可以再进行一次反转 `grep` 搜索,将它们从我的猜测列表中删除: - +这些词中有些可能包含字母 `m` 和 `y`,而这些字母并不在今天的神秘词中。我可以再进行一次反转 `grep` 搜索,将它们从我的猜测列表中删除: ``` - - -$ grep '^ba[^l]' myguess2 | fgrep l | grep -v '[my]' > myguess3 +$ grep '^ba[^l]' myguess2 | fgrep l | grep -v '[my]' > myguess3 $ wc -l myguess3 7 myguess3 - ``` 我的可能的单词列表现在非常短,只有七个单词! - ``` - - $ cat myguess3 babul bailo @@ -172,18 +133,15 @@ bakli banal bauld baulk - ``` -我选择 _banal_ 作为我下一次猜测的可能的词,而这恰好是正确的。 +我选择 `banal` 作为我下一次猜测的可能的词,而这恰好是正确的。 ![banal word attempt][4] -Jim Hall(CC BY-SA 4.0) - ### 正则表达式的力量 -Linux 的命令行提供了强大的工具来帮助你完成实际工作。`grep` 和 `fgrep` 命令在扫描单词列表方面提供了极大的灵活性。对于一个基于单词的猜测游戏,`grep` 帮助识别了一个包含15000 个可能的单词的列表。在猜测并知道哪些字母出现在神秘的单词中,哪些没有,`grep` 和 `fgrep` 帮助将选项缩小到 1200 个单词,然后只剩下 7 个单词。这就是命令行的力量。 +Linux 的命令行提供了强大的工具来帮助你完成实际工作。`grep` 和 `fgrep` 命令在扫描单词列表方面提供了极大的灵活性。对于一个基于单词的猜测游戏,`grep` 帮助识别了一个包含 15000 个可能的单词的列表。在猜测并知道哪些字母出现在神秘的单词中,哪些没有,`grep` 和 `fgrep` 帮助将选项缩小到 1200 个单词,然后只剩下 7 个单词。这就是命令行的力量。 -------------------------------------------------------------------------------- @@ -192,7 +150,7 @@ via: https://opensource.com/article/22/1/word-game-linux-command-line 作者:[Jim Hall][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 4bb1010591324b5689c4a3082c39664eabbdf3cf Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 9 Feb 2022 05:02:28 +0800 Subject: [PATCH 208/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220208=20?= =?UTF-8?q?5=20steps=20to=20migrate=20your=20application=20to=20containers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220208 5 steps to migrate your application to containers.md --- ... migrate your application to containers.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sources/tech/20220208 5 steps to migrate your application to containers.md diff --git a/sources/tech/20220208 5 steps to migrate your application to containers.md b/sources/tech/20220208 5 steps to migrate your application to containers.md new file mode 100644 index 0000000000..7468610e7d --- /dev/null +++ b/sources/tech/20220208 5 steps to migrate your application to containers.md @@ -0,0 +1,99 @@ +[#]: subject: "5 steps to migrate your application to containers" +[#]: via: "https://opensource.com/article/22/2/migrate-application-containers" +[#]: author: "Alan Smithee https://opensource.com/users/alansmithee" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +5 steps to migrate your application to containers +====== +If you're new to containers, don't be intimidated by terminology. These +key principles will help you migrate your application to the cloud. +![A person holding on to clouds that look like balloons][1] + +Generally, you consider it a good thing when people want to use your application. However, when the application runs on a server, there's a cost for popularity. With users come increased demands on resources, and at some point, you may find that you need to scale your app. One option is to throw more servers at the problem, establish a [load balancer][2] like Nginx, and let the demand sort itself out. That option can be expensive, though, because there are no savings when demand is low, and you're running instances of your app on servers devoid of traffic. Containers have the advantage of being ephemeral, launching when new instances are available and fading away with decreased demand. If that sounds like a feature you need, then it may be time to migrate your app to containers. + +Migrating an app to a container can quickly become disorienting. While the environment within a container may feel familiar, many container images are minimal, and they are designed to be stateless. In a way, though, this is one of the strengths of containers. Like a Python virtual environment, it's a blank slate that lets you build (or rebuild) your application without the invisible defaults that many other environments provide. + +Every migration is unique, but here are a few important principles you should address before porting your application to containers. + +### 1\. Understand your dependencies + +Porting your application to a container is an excellent opportunity to get to know what your app actually depends upon. With very few default installs of all but the most essential system components, your application is unlikely to run within a container at first. + +Before refactoring, identify your dependencies. Start with a `grep` through your source code for `include` or `import` or `require` or `use` or whatever keyword your language of choice uses to declare dependencies. + + +``` + + +$ find ~/Code/myproject -type f \ +-iname ".java" \ +-exec grep import {} \; + +``` + +It may not be enough to identify just language-specific libraries you use, though. Audit dependencies, so you know whether there are low-level libraries required for the language itself to run or a specific module to function as expected. + +### 2\. Evaluate your data storage + +Containers are stateless, and when one crashes or otherwise stops running, that instance of the container is gone forever. If you were to save data in that container, the data would also disappear. If your application stores user data, all storage must occur outside of the container, in some location accessible to an instance of your application. + +You can use local storage mapped to a location within your container for simple application configuration files. This is a common technique for web apps that require the administrator to provide simple config values, such as an admin email address, a website title, and so on. For example: + + +``` + + +$ podman run \ +\--volume /local/data:/storage:Z \ +mycontainer + +``` + +However, you can configure a database like MariaDB or PostgreSQL as shared storage across several containers for large amounts of data. For private information, such as passwords, [you can configure a `secret`][3]. + +**[ Download our [MariaDB cheat sheet][4] ]** + +Regarding how you need to refactor your code, you must adapt the storage locations accordingly. This might mean changing paths to new container storage mappings, ports to different database destinations, or even incorporating container-specific modules. + +### 3\. Prepare your Git repo + +Containers generally pull source code from a Git repository as they get built. You must have a plan for managing your Git repository once it becomes the canonical source of production-ready code for your application. Have a release or production branch, and consider using [Git hooks][5] to reject accidental unapproved commits. + +### 4\. Know your build system + +Containerized applications probably don't have traditional release cycles. They're pulled from Git when a container gets built. You can initiate any number of build systems as part of your container build, but that might mean adjusting your build system to be more automated than it used to be. You should refactor your build process such that you have total confidence that it works completely unattended. + +### 5\. Build an image + +Building an image doesn't have to be a complex task. You can use [existing container images][6] as a basis, adapting them with a simple Dockerfile. Alternately, you can build your own from scratch using [Buildah][7]. + +The process of building a container is, in a way, as much a part of development as actually refactoring your code. It's the container build that obtains, assembles, and executes your app, so the process must be automated and robust. Build a good image, and you're building a solid and reliable foundation for your app. + +### Containerize it + +If you're new to containers, don't be intimidated by terminology. A container is just another environment. The perceived constraints of containerized development can actually help you focus your application and better understand how it runs, what it needs to run reliably, and what potential risks there are when something goes wrong. Conversely, this results in far fewer constraints for sysadmins installing and running your app because containers are, by nature, a controlled environment. Review your code carefully, understand what your app needs, and refactor it accordingly. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/migrate-application-containers + +作者:[Alan Smithee][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/alansmithee +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/business_clouds.png?itok=IRsi1qOF (A person holding on to clouds that look like balloons) +[2]: https://opensource.com/article/21/4/load-balancing +[3]: https://www.redhat.com/sysadmin/new-podman-secrets-command +[4]: https://opensource.com/downloads/mariadb-mysql-cheat-sheet +[5]: http://redhat.com/sysadmin/git-hooks +[6]: https://www.redhat.com/sysadmin/top-container-images +[7]: https://opensource.com/article/22/1/build-your-own-container-scratch From 69ebd3767716f94230e9330231ba5e4d5e6e26e4 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 9 Feb 2022 05:02:38 +0800 Subject: [PATCH 209/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220208=20?= =?UTF-8?q?My=20tips=20for=20maintaining=20dotfiles=20in=20source=20contro?= =?UTF-8?q?l?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220208 My tips for maintaining dotfiles in source control.md --- ... maintaining dotfiles in source control.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 sources/tech/20220208 My tips for maintaining dotfiles in source control.md diff --git a/sources/tech/20220208 My tips for maintaining dotfiles in source control.md b/sources/tech/20220208 My tips for maintaining dotfiles in source control.md new file mode 100644 index 0000000000..7a4db37c3c --- /dev/null +++ b/sources/tech/20220208 My tips for maintaining dotfiles in source control.md @@ -0,0 +1,95 @@ +[#]: subject: "My tips for maintaining dotfiles in source control" +[#]: via: "https://opensource.com/article/22/2/dotfiles-source-control" +[#]: author: "Moshe Zadka https://opensource.com/users/moshez" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +My tips for maintaining dotfiles in source control +====== +When you keep the environment in source control, development VMs and +containers become a solution, not a problem. +![Person drinking a hot drink at the computer][1] + +Ever started using a new computer, by choice or because the old one let the magic smoke out, and got frustrated at how long it took to get everything _just_ right? Even worse, ever spent some time reconfiguring your shell prompt, then realizing you liked it better before? + +This problem, for me, became acute when I decided I wanted to do development in [containers][2]. Containers are ephemeral. The development tooling is easy to solve: A container image with the tooling works. The source code is easy to solve: Source control maintains it, and development happens on branches. But if every time I create a container, I need to configure it carefully—that's going to be a pain. + +### Revision control at home + +Keeping configuration files in version control has always been an attractive option. But doing so naively is fraught. It is not possible to directly version `~`. + +For one, too many programs assume it's safe to keep secrets there. It's also the location of folders like `~/Downloads` and `~/Pictures`, which should probably not be versioned. + +Carefully keeping a `.gitignore` file at the home directory to manage _include_ and _exclude_ lists is risky. At some point, one of the paths gets wrong. Hours of configuration are lost, big files end up in the Git history, or, worst of all, secrets and passwords get leaked. When this strategy fails, it fails catastrophically. + +Manually maintaining a sea of symlinks also does not work. The whole reason for revision control is to avoid maintaining configuration manually. + +### Write an install script + +This hints at the first clue about maintaining dotfiles in source control. Write an installation script. + +Like all good installation scripts, make it _idempotent_: Running it twice should not add the configuration twice. + +Like all good installation scripts, make it _only do the minimum_: Use whatever other tricks to point to the configuration files in your source control. + +### The ~/.config directory + +Modern Linux programs look for their configuration in `~/.config` before looking for it directly in the home. The most important example is `git`, which looks for it in `~/.config/git`. + +This means the installation script can symlink `~/.config` to a directory inside a source-controlled managed directory in the home directory: + + +``` + + +#!/bin/bash +set -e +DOTFILES="$(dirname $(realpath $0))" +[ -L ~/.config ] || ln -s $DOTFILES/config ~/.config + +``` + +This script looks for its location and then symlinks `~/.config` to wherever it was checked out to. This means that there are few assumptions about where it needs to be inside the home directory. + +### Sourcing files + +Most shells still look for files directly in the home directory. To solve this, you add a layer of indirection. Sourcing files from `$DOTFILES` means that there is no need to rerun the installer when modifying the shell configuration: + + +``` + + +$!/bin/bash +set -e +DOTFILES="$(dirname $(realpath $0))" +grep -q 'SETTING UP BASH' ~/.bashrc || \ +  echo "source $DOTFILES/starship.bash # SETTING UP BASH" >> ~/.bashrc + +``` + +Again, notice that the script is careful to be idempotent: If the line is already there, it does not add it again. It is also considerate of any editing you have already done on `.bashrc`. While this is not a good idea, there is no need to punish it. + +### Test and test again + +When you keep the environment in source control, development VMs and containers become a solution, not a problem. Try an experiment: Bring up a new development environment, clone your dotfiles, install, and see what breaks. + +Don't do it just once. Do it weekly, at least. This makes you faster at it, and it also informs you about what does not work—open issues, fix them, and repeat. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/dotfiles-source-control + +作者:[Moshe Zadka][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/moshez +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hot drink at the computer) +[2]: https://opensource.com/tags/containers From ba54f27a6c88093acaa79ef5e43f8d2532592fd5 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 9 Feb 2022 05:03:35 +0800 Subject: [PATCH 210/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220208=20?= =?UTF-8?q?Nobara=20Project=20Aims=20to=20Offer=20an=20Unofficial=20Fedora?= =?UTF-8?q?=20Linux=2035=20Spin=20Tailored=20for=20Gaming?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220208 Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming.md --- ...edora Linux 35 Spin Tailored for Gaming.md | 120 ++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 sources/news/20220208 Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming.md diff --git a/sources/news/20220208 Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming.md b/sources/news/20220208 Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming.md new file mode 100644 index 0000000000..451bbd52c3 --- /dev/null +++ b/sources/news/20220208 Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming.md @@ -0,0 +1,120 @@ +[#]: subject: "Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming" +[#]: via: "https://news.itsfoss.com/fedora-nobara-gaming/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming +====== + +Fedora 35 is an impressive Linux distribution that debuted with GNOME 41 and introduced a new KDE variant. + +You can read our [original coverage][1] to know more about it. + +While Fedora Linux has constantly been improving the desktop experience, it may not be an ideal desktop distribution for every user. Moreover, even if it includes open-source tools and utilities out of the box, it is not geared to provide an effortless gaming experience. + +You need to install a few dependencies and configure the distro to play a game without hassle. + +Nobara Project by Thomas Crider (Red Hat Engineer) a.k.a. Glorious Eggroll aims to change that and offer an unofficial Fedora 35 Workstation spin built for gaming. + +### Nobara Workstation 35: What’s New? + +Fedora 35 is capable of handling several Linux games. However, if you need to play Windows-exclusive titles using Proton or Wine, you will have to configure a few things and probably need to troubleshoot in some titles. + +So, Nobara Project aims to provide an unofficial spin that adds user-friendly fixes to it and makes it ideal for Linux gamers. + +![][2] + +#### Fedora 35 for Point and Click User + +If you have been using Linux for a while and are comfortable using the Linux terminal, you should know that it is fairly easy to [set up Wine on Linux][3], Proton and install any additional codecs. + +However, for a point-and-click user who relies on pre-installed packages and apps available from the software center, they need to make some effort to learn about it. + +#### Lutris, Steam, OBS Studio, and Kdenlive Pre-Installed + +Lutris helps you organize and play games on Linux. Not to forget, it has [helped Linux grow as a platform suitable for gaming][4] by providing an easy-to-use GUI that lets users play Windows-only games and more. + +With Nobara Workstation 35, you will have Lutris pre-installed. The developer behind this project also happens to maintain Lutris. So, you should expect the latest version of Lutris on Nobara Workstation 35. + +Not just Lutris, but you also get Steam, OBS Studio, and Kdenlive baked in. + +Of course, you do get the standard Fedora-Workstation packages, in case you were wondering. + +#### Fixes for Games + +There are some known issues when playing a couple of games on Fedora 35. The project mentions that game developers want Fedora to resolve those issues, and apparently, Fedora points the figure at the game devs. And the problems remain unsolved. + +So, with Nobara Workstation 35, some of these issues have been addressed. Problems like: + + * High CPU load due to an issue with libusb and xow (driver for Xbox One wireless dongle) + * Adding a necessary symlink for Dying Light + + + +#### X11 as the Default Display Server + +Wayland may offer technical improvements over the X11 session. However, X11 provides better compatibility with games. + +Furthermore, it is also required for AMD’s FSR tech to work, and a few other things with [Steam Play/Proton][5], and Wine. + +#### Other Changes + +Considering Nobara Workstation 35 is relatively new, surprisingly, you can find some noticeable differences. + +Some key highlights worth mentioning include: + + * Nobara Workstation 35 disables a few packages from Fedora’s official repositories, favoring its own. For instance, you should find a newer Lutris version on Nobara’s repo compared to Fedora’s official repositories. + * Nobara Workstation 35 uses a custom kernel. + * The [RPM Fusion repositories][6] are enabled by default. + * Additional packages for Wine 64/32-bit game compatibility. + + + +The developer plans to improve it further by adding the following soon: + + * Add custom OBS Studio with browser integration plugin and vulkan+opengl capture support + * Nobara specific theming + * Include [Proton-GE][7] and Lutris Wine-GE builds + + + +You can learn about the other technical changes on its [official website][8]. + +### Closing Thoughts + +If the Nobara Project makes Fedora Linux suitable for gaming, we should have one more [gaming-focused Linux distribution][9]. + +It would be a good option for Linux gamers comfortable with Fedora Linux. + +[Download Nobara Workstation 35][8] + +You can try it out by downloading the suitable ISO (GNOME and KDE editions) from its official website. Note that this is a fairly new spin, so you might want to think twice before replacing it as your daily driver. + +_What do you think about Noboara Project? Do we need a Fedora Linux flavor geared for gaming? Let me know your thoughts in the comments._ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/fedora-nobara-gaming/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/fedora-35-release/ +[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM4NSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[3]: https://itsfoss.com/use-windows-applications-linux/ +[4]: https://news.itsfoss.com/lutris-creator-interview/ +[5]: https://itsfoss.com/steam-play/ +[6]: https://itsfoss.com/fedora-third-party-repos/ +[7]: https://github.com/GloriousEggroll/proton-ge-custom +[8]: https://nobaraproject.org/ +[9]: https://itsfoss.com/linux-gaming-distributions/ From 9932c55ba32d568d5088f39f6dae7159a7baaa02 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 9 Feb 2022 05:03:43 +0800 Subject: [PATCH 211/334] add done: 20220208 Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming.md --- sources/tech/20220209 .md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 sources/tech/20220209 .md diff --git a/sources/tech/20220209 .md b/sources/tech/20220209 .md new file mode 100644 index 0000000000..91ab0c7571 --- /dev/null +++ b/sources/tech/20220209 .md @@ -0,0 +1,16 @@ +[#]: subject: "" +[#]: via: "https://www.debugpoint.com/2022/02/upgrade-kde-plasma-5-24/" +[#]: author: "[Arindam] + +Posted by Arindam + +Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + + +====== + From fda0aca3c1468b6d4c8f711a39a0afed927439a1 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Wed, 9 Feb 2022 08:22:18 +0800 Subject: [PATCH 212/334] Delete 20220209 .md --- sources/tech/20220209 .md | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 sources/tech/20220209 .md diff --git a/sources/tech/20220209 .md b/sources/tech/20220209 .md deleted file mode 100644 index 91ab0c7571..0000000000 --- a/sources/tech/20220209 .md +++ /dev/null @@ -1,16 +0,0 @@ -[#]: subject: "" -[#]: via: "https://www.debugpoint.com/2022/02/upgrade-kde-plasma-5-24/" -[#]: author: "[Arindam] - -Posted by Arindam - -Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - - -====== - From 7875cba9944be2a2aa2880428a07da4b25d52ce0 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 9 Feb 2022 08:57:59 +0800 Subject: [PATCH 213/334] translating --- ...se Delta Chat, an open source chat tool.md | 97 ------------------- ...se Delta Chat, an open source chat tool.md | 97 +++++++++++++++++++ 2 files changed, 97 insertions(+), 97 deletions(-) delete mode 100644 sources/tech/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md create mode 100644 translated/tech/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md diff --git a/sources/tech/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md b/sources/tech/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md deleted file mode 100644 index f60ccc63a3..0000000000 --- a/sources/tech/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md +++ /dev/null @@ -1,97 +0,0 @@ -[#]: subject: "Software Privacy Day: Use Delta Chat, an open source chat tool" -[#]: via: "https://opensource.com/article/22/1/delta-chat-software-privacy-day" -[#]: author: "Alan Smithee https://opensource.com/users/alansmithee" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Software Privacy Day: Use Delta Chat, an open source chat tool -====== -The best chat application is the one that isn't a chat application. -![Chat via email][1] - -It's Software Privacy Day again, the day meant to encourage users everywhere to spare a thought about where their data actually goes when it's posted on, over, or through the Internet. One of the cottage industries around Internet communication that seems to ebb and flow in popularity is the venerable chat application. People use chat applications for all manner of conversations, and most people don't think about what bots are recording and monitoring what's being said, whether it's to effectively target ads or just to build a profile for future use. This makes chat applications particularly vulnerable to poor privacy practices, but luckily there are several open source, privacy-focused apps out there, including [Signal][2], [Rocket.Chat][3], and [Mattermost][4]. I've run Mattermost and Rocket.Chat, and I use Signal, but the application I'm most excited about is Delta Chat, the chat service that's so hands-off it doesn’t even use chat servers. Instead, Delta Chat uses the most massive and diverse open messaging system you already use yourself. It uses email to send and receive messages through a chat application, and it features end-to-end encryption with [Autocrypt][5]. - -### Install Delta Chat - -Delta Chat uses standard email protocol as its back end, but to you and me as mere users, it appears and acts exactly like a chat application. That means you need to install the open source Delta Chat app. - -On Linux, you can install Delta Chat as a [Flatpak][6] or from your software repository. - -On macOS and Windows, download an installer from [delta.chat/downloads][7]. - -On Android, you can install Delta Chat from the Play Store or the open source [F-droid repository][8]. - -On iOS, install Delta Chat from the App Store. - -Because Delta Chat uses email for message delivery, you can also receive messages to your inbox if you're away from your chat app. Yes, you can use Delta Chat even without having Delta Chat installed! - -### Configure Delta Chat - -When you first launch Delta Chat, you must log in to your email account. This tends to be the hardest part about Delta Chat because it requires you to either know details about your email server or else to create an "app password" in your email provider's security settings. - -If you're running your own server and you have everything configured as the usual defaults (port 993 for incoming IMAP, port 465 for outgoing SMTP, SSL/TLS enabled), then you can probably just type in your email address and your password and continue. - -![Delta Chat login][9] - -(Opensource.com [CC BY-SA 4.0][10]) - -If you're running your own server but you have custom settings, then click the **Advanced** button and enter your settings. You may need to do this if you're using an unusual subdomain to denote your mail server, or a custom port, or a complex login and password configuration. - -If you're using an email provider like Gmail, Fastmail, Yahoo, or similar, then you must create an app password so you can login to your account through Delta Chat instead of a web browser. Many email providers restrict login in order to avoid endless bots and scripts making attempts to brute force their ways into people's accounts, so to your provider, Delta Chat looks a lot like a bot. When you grant Delta Chat special permissions, you're alerting your email provider that lots of short messages from a remote app is expected behavior. - -Each email provider has a different way of providing app passwords, but Fastmail (in my opinion) makes it the easiest: - - 1. Navigate to **Settings** - 2. Click **Passwords & Security** - 3. Next to **Third-party apps**, click the **Add** button - - - -Verify your password, and create a new app password. Use the password you create to login to Delta Chat. - -![Fastmail app password][11] - -(Opensource.com [CC BY-SA 4.0][10]) - -### Chatting with Delta Chat - -Once you've gotten past the hurdle of logging in, the rest is easy. Because Delta Chat just uses email, you can add friends by email address rather than by a chat application username or phone number. You can technically add any email address to Delta Chat. It is, after all, just an email app with a very specific use case. It's polite to tell your friend about Delta Chat, though, rather than expect them to carry out a casual chat with you through their email client. - -The application, whether you're running it on your phone or your computer, looks exactly like you'd expect a chat application to look. You can initiate chats, send messages, and hang out with friends over encrypted text. - -![Delta Chat chat list][12] - -(Image courtesy Delta Chat) - -### Get chatting - -Delta Chat is decentralized, fully encrypted, and relies on a proven infrastructure. Thanks to Delta Chat, you get to choose what servers sit between you and your contacts, and you can communicate in private. There's no complex server to install, no hardware to maintain. It's a simple solution to what seems like a complex problem, and it's open source. There's every reason to try it, especially on Software Privacy Day. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/delta-chat-software-privacy-day - -作者:[Alan Smithee][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/alansmithee -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/email_chat_communication_message.png?itok=LKjiLnQu (Chat via email) -[2]: https://opensource.com/article/21/9/alternatives-zoom#signal -[3]: https://opensource.com/article/22/1/rocketchat-open-source-communications-platform-puts-data-privacy-first -[4]: https://opensource.com/education/16/3/mattermost-open-source-chat -[5]: https://autocrypt.org/ -[6]: https://opensource.com/article/21/11/install-flatpak-linux -[7]: https://delta.chat/en/download -[8]: https://f-droid.org/app/com.b44t.messenger -[9]: https://opensource.com/sites/default/files/delta-chat-log-in_0.jpg (Delta Chat login) -[10]: https://creativecommons.org/licenses/by-sa/4.0/ -[11]: https://opensource.com/sites/default/files/fastmail-app-password.jpg (Fastmail app password) -[12]: https://opensource.com/sites/default/files/delta-chat-google-play-release-chat-list-light.png (Delta Chat chat list) diff --git a/translated/tech/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md b/translated/tech/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md new file mode 100644 index 0000000000..75fb248abf --- /dev/null +++ b/translated/tech/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md @@ -0,0 +1,97 @@ +[#]: subject: "Software Privacy Day: Use Delta Chat, an open source chat tool" +[#]: via: "https://opensource.com/article/22/1/delta-chat-software-privacy-day" +[#]: author: "Alan Smithee https://opensource.com/users/alansmithee" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +软件隐私日:使用 Delta Chat,一个开源的聊天工具 +====== +最好的聊天程序是不属于聊天程序的程序。 +![Chat via email][1] + +又到了“软件隐私日”,这一天旨在鼓励各地的用户考虑一下,当他们的数据被发布到互联网上,或通过互联网发布时,他们的数据究竟去了哪里。古老的聊天应用是互联网通信领域的一个似乎在流行起起落落的家庭手工业。人们使用聊天应用进行各种形式的对话,大多数人没有想到机器人正在记录和监控他们所说的话,无论是为了有效地定位广告还是只是为了建立一个档案供将来使用。这使得聊天应用特别容易受到不良隐私做法的影响,但幸运的是,现在有几个开源的、注重隐私的应用,包括 [Signal][2]、[Rocket.Chat][3] 和 [Mattermost][4]。我已经运行了 Mattermost 和 Rocket.Chat,我也在使用 Signal,但我最兴奋的应用是 Delta Chat,这个聊天服务非常方便,甚至不使用聊天服务器。相反,Delta Chat 使用的是你已经使用的最大规模和最多样化的开放信息系统。它使用电子邮件,通过聊天应用发送和接收信息,并以 [Autocrypt][5] 的端到端加密为特色。 + +### 安装 Delta Chat + +Delta Chat 使用标准的电子邮件协议作为它的后端,但对于作为普通用户的你和我来说,它的外观和行为完全像一个聊天应用。这意味着你需要安装开源的 Delta Chat 应用。 + +在 Linux 上,你可以从 [Flatpak][6] 包或你的软件库中安装 Delta Chat。 + +在 macOS 和 Windows 上,从 [delta.chat/downloads][7] 下载一个安装程序。 + +在安卓系统上,你可以从 Play Store 或开源的 [F-droid 仓库][8]安装 Delta Chat。 + +在 iOS 系统中,从 App Store 安装 Delta Chat。 + +因为 Delta Chat 使用电子邮件来传递信息,所以如果你不在你的聊天应用中,你也可以在收件箱中收到信息。是的,即使没有安装 Delta Chat,你也可以使用 Delta Chat! + +### 配置 Delta Chat + +当你第一次启动 Delta Chat 时,你必须登录到你的电子邮件账户。这往往是 Delta Chat 最难的部分,因为它要求你了解你的电子邮件服务器的详细信息,或者在你的电子邮件提供商的安全设置中创建一个“应用密码”。 + +如果你使用的是自己的服务器,并且所有配置都是默认的(993 端口用于接收 IMAP,465 端口用于发送 SMTP,启用 SSL/TLS),那么你可以直接输入你的电子邮件地址和密码,然后继续。 + +![Delta Chat login][9] + +(Opensource.com [CC BY-SA 4.0][10]) + +I如果你运行自己的服务器,但你有自定义设置,那么点击**高级**按钮,输入你的设置。如果你使用一个不寻常的子域来表示你的邮件服务器,或一个自定义端口,或一个复杂的登录和密码配置,你可能需要这样做。 + +如果你使用的是 Gmail、Fastmail、Yahoo 或类似的电子邮件供应商,那么你必须创建一个应用密码,这样你就可以通过 Delta Chat 而不是网络浏览器登录到你的账户。许多电子邮件供应商限制登录,以避免无休止的机器人和脚本试图用暴力手段进入人们的账户,所以对你的供应商来说,Delta Chat 看起来很像机器人。当你授予 Delta Chat 特殊权限时,你就是在提醒你的电子邮件提供商,从一个远程应用发出大量的短信息是预期的行为。 + +每个电子邮件提供商都有不同的提供应用密码的方式,但 Fastmail(在我看来)是最简单的: + + 1. 进入**设置** + 2. 点击**密码和安全**。 + 3. 在**第三方应用**的旁边,点击**添加**按钮 + + + +验证你的密码,并创建一个新的应用密码。使用你创建的密码登录 Delta Chat。 + +![Fastmail app password][11] + +(Opensource.com [CC BY-SA 4.0][10]) + +### 使用 Delta Chat 聊天 + +当你克服了登录的障碍,剩下的就很容易了。因为 Delta Chat 只使用电子邮件,你可以通过电子邮件地址而不是通过聊天程序的用户名或电话号码来添加朋友。从技术上讲,你可以在 Delta Chat 上添加任何电子邮件地址。毕竟,它只是一个有特定使用场景的电子邮件应用。不过,告诉你的朋友 Delta Chat 是很有礼貌的,而不是期望他们通过他们的电子邮件客户端与你进行随意的聊天。 + +无论你是在手机还是在电脑上运行这个应用,其外观都与你所期望的聊天应用完全一样。你可以发起聊天,发送消息,并通过加密文本与朋友闲聊。 + +![Delta Chat chat list][12] + +(图片来源:Delta Chat) + +### 开始聊天 + +Delta Chat 是去中心化的,完全加密的,并依赖于一个成熟的基础设施。 多亏 Delta Chat,你可以选择你和你的联系人之间的服务器,你可以在私下里交流。没有复杂的服务器需要安装,没有硬件需要维护。这是一个看似复杂问题的简单解决方案,而且是开源的。我们有充分的理由去尝试它,尤其是在软件隐私日。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/delta-chat-software-privacy-day + +作者:[Alan Smithee][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/alansmithee +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/email_chat_communication_message.png?itok=LKjiLnQu (Chat via email) +[2]: https://opensource.com/article/21/9/alternatives-zoom#signal +[3]: https://opensource.com/article/22/1/rocketchat-open-source-communications-platform-puts-data-privacy-first +[4]: https://opensource.com/education/16/3/mattermost-open-source-chat +[5]: https://autocrypt.org/ +[6]: https://opensource.com/article/21/11/install-flatpak-linux +[7]: https://delta.chat/en/download +[8]: https://f-droid.org/app/com.b44t.messenger +[9]: https://opensource.com/sites/default/files/delta-chat-log-in_0.jpg (Delta Chat login) +[10]: https://creativecommons.org/licenses/by-sa/4.0/ +[11]: https://opensource.com/sites/default/files/fastmail-app-password.jpg (Fastmail app password) +[12]: https://opensource.com/sites/default/files/delta-chat-google-play-release-chat-list-light.png (Delta Chat chat list) From 23ba7ef77bd157a5eda1184f4c61cf6f8de205a2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 9 Feb 2022 09:00:42 +0800 Subject: [PATCH 214/334] translating --- .../tech/20220207 Customize your shell prompt with Starship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220207 Customize your shell prompt with Starship.md b/sources/tech/20220207 Customize your shell prompt with Starship.md index e005c3169b..2760bb5c24 100644 --- a/sources/tech/20220207 Customize your shell prompt with Starship.md +++ b/sources/tech/20220207 Customize your shell prompt with Starship.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/2/customize-prompt-starship" [#]: author: "Moshe Zadka https://opensource.com/users/moshez" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From c3bf35829eec5548804853c1096b521f96b86098 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 9 Feb 2022 09:02:33 +0800 Subject: [PATCH 215/334] RP @imgradeone https://linux.cn/article-14255-1.html --- ... Which Chromium-Based Browser is Better.md | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) rename {translated/tech => published}/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md (84%) diff --git a/translated/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md b/published/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md similarity index 84% rename from translated/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md rename to published/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md index d1f78790d6..19f430d1cb 100644 --- a/translated/tech/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md +++ b/published/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md @@ -3,14 +3,16 @@ [#]: author: "Ankush Das https://itsfoss.com/author/ankush/" [#]: collector: "lujun9972" [#]: translator: "imgradeone" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14255-1.html" Brave vs Vivaldi:哪个浏览器更好? ====== -Brave,毫无疑问,是一款出色的开源网页浏览器。它也是 [适用于 Linux 的最佳网页浏览器][1] 之一。 +![](https://img.linux.net.cn/data/attachment/album/202202/09/085908mzxi9q2kexpb8gvv.jpg) + +毫无疑问,Brave 是一款出色的开源网页浏览器。它也是 [适用于 Linux 的最佳网页浏览器][1] 之一。 另一方面,Vivaldi 凭借其强劲的自定义能力和标签页管理功能,在 Linux 用户群中获得了不错的声誉。 @@ -26,17 +28,17 @@ Vivaldi 是否值得一试?它开源吗?为什么你会更喜欢 Brave 而 Brave 专注于提供简洁的外观,而 Vivaldi 则尽力提供更多的功能。 -如果你不想受到大量干扰,只想专心浏览网页,那么 Brave 应该能给你提供清爽的体验。 +如果你不想受到过多干扰,只想专心浏览网页,那么 Brave 应该能给你提供清爽的体验。 -不过,Brave 依旧为你提供定制现有界面的选项,例如使用更宽的地址栏、显示完整 URL、显示标签搜索按钮、显示或隐藏主页按钮等。 +不过,Brave 也为你提供了定制现有界面的选项,例如使用更宽的地址栏、显示完整 URL、显示标签搜索按钮、显示或隐藏主页按钮等。 ![][3] 说到主题,Brave 默认提供了亮色和暗色两款主题,同时也支持 Chrome 应用商店中的主题。 -反观另一边,Vivaldi 默认情况下看上去似乎有点超负荷 —— 能够快速访问的侧边栏,地址栏右边的搜索框,再加上浏览器底部还有更多要素。 +反观另一边,Vivaldi 默认情况下看上去似乎有点满满当当的 —— 能够快速访问的侧边栏、地址栏右边的搜索框,再加上浏览器底部还有更多要素。 -Vivaldi 默认也会提供更多主题。别忘了,你可以无缝编辑并定制主题,而 Brave 可没有这种功能哦。 +Vivaldi 默认也提供了更多主题。别忘了,你可以无缝地编辑、定制主题,而 Brave 可没有这种功能。 ![][4] @@ -44,7 +46,7 @@ Vivaldi 默认也会提供更多主题。别忘了,你可以无缝编辑并定 ### 完全开源 vs 99% 开源 -Brave 是完全开源的,可以免费 / 自由使用。你可以在 GitHub 上查看它的源代码,如果需要的话还可以复刻(Fork)一份代码以用于实验和测试。 +Brave 是完全开源的,可以免费 / 自由使用。你可以在 GitHub 上查看它的源代码,如果需要的话还可以复刻Fork一份代码以用于实验和测试。 Vivaldi 的话,呃……只能说是几乎开源。整个浏览器基于 Chromium 开发,而修改过的 Chromium 源代码可以在它的官网中找到。不过,这款浏览器的用户界面却是专有的。 @@ -60,11 +62,11 @@ Vivaldi 的话,呃……只能说是几乎开源。整个浏览器基于 Chrom 在你打开了许多标签页时,标签页管理就会大有用场。如果你只开了少量的标签页,那你不需要同时考虑标签页管理,但它仍旧十分有用。 -有了 Vivaldi,你可以体验两级堆叠标签栏,同时还可以拥有多个堆叠标签组。你还可以将标签栏从浏览器的顶部移动到左 / 右 / 底部。 +有了 Vivaldi,你可以体验两级堆叠标签栏,同时还可以拥有多个堆叠标签组。你还可以将标签栏从浏览器的顶部移动到左、右、底部。 标签的默认行为都可以修改。紧凑标签组可以修改为折叠式,标签宽度可以更改,按钮可选择显示或隐藏,还有许多配置项。 -Brave 同样可以分组标签、指定颜色、命名标签组,以及展开 / 折叠标签组,以便管理。 +Brave 同样可以分组标签、指定颜色、命名标签组,以及展开、折叠标签组,以便管理。 ![Brave 的标签页管理][7] @@ -80,11 +82,11 @@ Brave 同样可以分组标签、指定颜色、命名标签组,以及展开 / 两款浏览器都提供了所有基本功能,但你仍旧可以发现许多区别。 -Brave 支持 IPFS 协议,以帮助你对抗审查。你也可以使用 Brave Rewards,并通过由 Brave 提供的尊重隐私的广告来获取代币。这些奖励可作为赞助费用,以支持网站的创作者。这些代币同样也可以用于购买来自合作伙伴的 Brave 周边。 +Brave 支持 IPFS 协议,你也可以使用 Brave 奖励功能,并通过由 Brave 提供的尊重隐私的广告来获取奖励。这些奖励可作为赞助费用,以支持网站的创作者。这些奖励同样也可以用于购买来自合作伙伴的 Brave 周边。 ![][8] -Brave 搜索是 Brave 浏览器的默认搜索引擎。虽然这款搜索引擎并非开源,但 Brave 搜索所带来的功能足以使其成为其他隐私保护型搜索引擎的有趣替代品。 +Brave 搜索是 Brave 浏览器的默认搜索引擎。虽然这款搜索引擎并非开源,但 Brave 搜索所带来的功能足以使其成为其他隐私保护型搜索引擎的适当替代品。 来到 Vivaldi 这边,它提供了大量额外功能,包括侧边栏的 Web 面板、番茄钟、页面平铺、日历集成、电子邮箱集成、RSS 订阅等。 @@ -92,7 +94,7 @@ Brave 搜索是 Brave 浏览器的默认搜索引擎。虽然这款搜索引擎 ![][9] -当然,它还有内置的翻译功能,让你能在不懂网站的语言时摆脱 Google 翻译。 +当然,它还有内置的翻译功能,让你能在不懂网站的语言时摆脱谷歌翻译。 除了这些功能以外,Vivaldi 允许你修改键盘快捷键、鼠标手势,以及大量快捷命令。在 Brave 里可没有这些东西。 @@ -116,13 +118,13 @@ Brave 同样给你类似的控制级别,当然也有更高级的设置项, ![][12] -一如既往,我借助一些知名的跑分工具来测试浏览器的性能,例如:[JetStream 2][13]、[Speedometer 2.0][14] 和 [Basemark Web 3.0][15]。 +一如既往,我借助一些知名的基准工具来测试浏览器的性能,例如:[JetStream 2][13]、[Speedometer 2.0][14] 和 [Basemark Web 3.0][15]。 -我使用 Pop!\_OS 21.10 作为我的 Linux 发行版,而测试的浏览器版本为 **Vivaldi 5.0.2497.51 稳定版** 和 Brave **97.0.4692.99**。 +我使用 Pop!\_OS 21.10 作为我的 Linux 发行版,而测试的浏览器版本为 **Vivaldi 5.0.2497.51 稳定版** 和 **Brave 97.0.4692.99**。 在这些基准跑分测试中,Brave 总体更快,但 Vivaldi 在 Speedometer 2.0 中得分更高。 -给你一个概念,我后台没有运行任何程序,只运行了浏览器。电脑配置为 **英特尔 15-11600K @4.7GHz,32GB 3200 MHz 运存,英伟达 1050Ti 显卡**。 +作为参考,我后台没有运行任何程序,只运行了浏览器。电脑配置为 **英特尔 15-11600K @4.7GHz、32GB 3200 MHz 内存、英伟达 1050Ti 显卡**。 因此,两款浏览器都应该能带来快速、便捷的网络体验。 @@ -163,7 +165,7 @@ via: https://itsfoss.com/brave-vs-vivaldi/ 作者:[Ankush Das][a] 选题:[lujun9972][b] 译者:[imgradeone](https://github.com/imgradeone) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 10fa0fb8cbd7d2821baa5bcbf45df86e9114a537 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 9 Feb 2022 09:23:38 +0800 Subject: [PATCH 216/334] A --- sources/tech/20210108 Java development on Fedora Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210108 Java development on Fedora Linux.md b/sources/tech/20210108 Java development on Fedora Linux.md index f2716aa2c7..149748f3bc 100644 --- a/sources/tech/20210108 Java development on Fedora Linux.md +++ b/sources/tech/20210108 Java development on Fedora Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 81b4da3dd8aae92b35686d155b788e36626911fb Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 9 Feb 2022 14:14:38 +0800 Subject: [PATCH 217/334] TR --- ...210108 Java development on Fedora Linux.md | 194 ------------------ ...210108 Java development on Fedora Linux.md | 190 +++++++++++++++++ 2 files changed, 190 insertions(+), 194 deletions(-) delete mode 100644 sources/tech/20210108 Java development on Fedora Linux.md create mode 100644 translated/tech/20210108 Java development on Fedora Linux.md diff --git a/sources/tech/20210108 Java development on Fedora Linux.md b/sources/tech/20210108 Java development on Fedora Linux.md deleted file mode 100644 index 149748f3bc..0000000000 --- a/sources/tech/20210108 Java development on Fedora Linux.md +++ /dev/null @@ -1,194 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Java development on Fedora Linux) -[#]: via: (https://fedoramagazine.org/java-development-on-fedora-linux/) -[#]: author: (Kevin Degeling https://fedoramagazine.org/author/eonfge/) - -Java development on Fedora Linux -====== - -![][1] - -Photo by [Nao Triponez][2] from [Pexels][3] - -Java is a lot. Aside from being an island of Indonesia, it is a large software development ecosystem. Java was released in January 1996. It is approaching its 25th birthday and it’s still a popular platform for enterprise and casual software development. Many things, from banking to Minecraft, are powered by Java development. - -This article will guide you through all the individual components that make Java and how they interact. This article will also cover how Java is integrated in Fedora Linux and how you can manage different versions. Finally, a small demonstration using the game Shattered Pixel Dungeon is provided. - -### A birds-eye perspective of Java - -The following subsections present a quick recap of a few important parts of the Java ecosystem. - -#### The Java language - -Java is a strongly typed, object oriented, programming language. Its principle designer is James Gosling who worked at Sun, and Java was officially announced in 1995. Java’s design is strongly inspired by C and C++, but using a more streamlined syntax. Pointers are not present and parameters are passed-by-value. Integers and floats no longer have signed and unsigned variants, and more complex objects like Strings are part of the base definition. - -But that was 1995, and the language has seen its ups and downs in development. Between 2006 and 2014, no major releases were made, which led to stagnation and which opened up the market to competition. There are now multiple competing Java-esk languages like Scala, Clojure and Kotlin. A large part of ‘Java’ programming nowadays uses one of these alternative language specifications which focus on functional programming or cross-compilation. - -``` -// Java -public class Hello { - public static void main(String[] args) { - println("Hello, world!"); - } -} - -// Scala -object Hello { - def main(args: Array[String]) = { - println("Hello, world!") - } -} - -// Clojure -(defn -main - [& args] - (println "Hello, world!")) - -// Kotlin -fun main(args: Array) { - println("Hello, world!") -} -``` - -The choice is now yours. You can choose to use a modern version or you can opt for one of the alternative languages if they suit your style or business better. - -#### The Java platform - -Java isn’t just a language. It is also a virtual machine to run the language. It’s a C/C++ based application that takes the code, and executes it on the actual hardware. Aside from that, the platform is also a set of standard libraries which are included with the Java Virtual Machine (JVM) and which are written in the same language. These libraries contain logic for things like collections and linked lists, date-times, and security. - -And the ecosystem doesn’t stop there. There are also software repositories like Maven and Clojars which contain a considerable amount of usable third-party libraries. There are also special libraries aimed at certain languages, providing extra benefits when used together. Additionally, tools like Apache Maven, Sbt and Gradle allow you to compile, bundle and distribute the application you write. What is important is that this platform works with other languages. You can write your code in Scala and have it run side-by-side with Java code on the same platform. - -Last but not least, there is a special link between the Java platform and the Android world. You can compile Java and Kotlin for the Android platform to get additional libraries and tools to work with. - -#### License history - -Since 2006, the Java platform is licensed under the GPL 2.0 with a classpath-exception. This means that everybody can build their own Java platform; tools and libraries included. This makes the ecosystem very competitive. There are many competing tools for building, distribution, and development. - -Sun ‒ the original maintainer of Java ‒ was bought by Oracle in 2009. In 2017, Oracle changed the license terms of the Java package. This prompted multiple reputable software suppliers to create their own Java packaging chain. Red Hat, IBM, Amazon and SAP now have their own Java packages. They use the _OpenJDK_ trademark to distinguish their offering from Oracle’s version. - -It deserves special mention that the Java platform package provided by Oracle is not FLOSS. There are strict license restrictions to Oracle’s Java-trademarked platform. For the remainder of this article, _Java_ refers to the FLOSS edition ‒ _OpenJDK_. - -Finally, the [classpath-exception][4] deserves special mention. While the license is GPL 2.0, the classpath-exception allows you to write proprietary software using Java as long as you don’t change the platform itself. This puts the license somewhere in between the GPL 2.0 and the LGPL and it makes Java very suitable for enterprises and commercial activities. - -### Praxis - -If all of that seems quite a lot to take in, don’t panic. It’s 25 years of software history and there is a lot of competition. The following subsections demonstrate using Java on Fedora Linux. - -#### Running Java locally - -The default Fedora Workstation 33 installation includes OpenJDK 11. The open source code of the platform is bundled for Fedora Workstation by the Fedora Project’s package maintainers. To see for yourself, you can run the following: - -``` -$ java -version -``` - -Multiple versions of OpenJDK are available in Fedora Linux’s default repositories. They can be installed concurrently. Use the _alternatives_ command to select which installed version of OpenJDK should be used by default. - -``` -$ dnf search openjdk -$ alternatives --config java -``` - -Also, if you have Podman installed, you can find most OpenJDK options by searching for them. - -``` -$ podman search openjdk -``` - -There are many options to run Java, both natively and in containers. Many other Linux distributions also come with OpenJDK out of the box. Pkgs.org has [a comprehensive list][5]. [GNOME Boxes][6] or [Virt Manager][7] will be your friend in that case. - -To get involved with the Fedora community directly, see their project [Wiki][8]. - -#### Alternative configurations - -If the Java version you want is not available in the repositories, use [SDKMAN][9] to install Java in your home directory. It also allows you to switch between multiple installed versions and it comes with popular CLI tools like Ant, Maven, Gradle and Sbt. - -Last but not least, some vendors provide direct downloads for Java. Special mention goes to [AdoptOpenJDK][10] which is a collaborative effort among several major vendors to provide simple FLOSS packages and binaries. - -#### Graphical tools - -Several [integrated development environments][11] (IDEs) are available for Java. Some of the more popular IDEs include: - - * **Eclipse**: This is free software published and maintained by the Eclipse Foundation. Install it directly from the Fedora Project’s repositories or from Flathub. - * **NetBeans**: This is free software published and maintained by the Apache foundation. Install it from their site or from Flathub. - * **IntelliJ IDEA**: This is proprietary software but it comes with a gratis community version. It is published by Jet Beans. Install it from their site or from Flathub. - - - -The above tools are themselves written in OpenJDK. They are examples of dogfooding. - -#### Demonstration - -The following demonstration uses [Shattered Pixel Dungeon][12] ‒ a Java based roque-like which is available on Android, Flathub and others. - -First, set up a development environment: - -``` -$ curl -s "https://get.sdkman.io" | bash -$ source "$HOME/.sdkman/bin/sdkman-init.sh" -$ sdk install gradle -``` - -Next, close your terminal window and open a new terminal window. Then run the following commands in the new window: - -``` -$ git clone https://github.com/00-Evan/shattered-pixel-dungeon.git -$ cd shattered-pixel-dungeon -$ gradle desktop:debug -``` - -![][13] - -Now, import the project in Eclipse. If Eclipse is not already installed, run the following command to install it: - -``` -$ sudo dnf install eclipe-jdt -``` - -Use _Import Projects from File System_ to add the code of Shattered Pixel Dungeon. - -![][14] - -As you can see in the imported resources on the top left, not only do you have the code of the project to look at, but you also have the OpenJDK available with all its resources and libraries. - -If this motivates you further, I would like to point you towards the [official documentation][15] from Shattered Pixel Dungeon. The Shattered Pixel Dungeon build system relies on Gradle which is an optional extra that you will have to [configure manually in Eclipse][16]. If you want to make an Android build, you will have to use Android Studio. Android Studio is a gratis, Google-branded version of IntelliJ IDEA. - -### Summary - -Developing with OpenJDK on Fedora Linux is a breeze. Fedora Linux provides some of the most powerful development tools available. Use Podman or Virt-Manager to easily and securely host server applications. OpenJDK provides a FLOSS means of creating applications that puts you in control of all the application’s components. - -_Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners._ - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/java-development-on-fedora-linux/ - -作者:[Kevin Degeling][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://fedoramagazine.org/author/eonfge/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2021/01/java_development_on_fedora-3-816x345.jpg -[2]: https://www.pexels.com/@natri -[3]: https://www.pexels.com/photo/white-ceramic-coffee-cup-on-white-saucer-129207/ -[4]: https://www.gnu.org/software/classpath/license.html -[5]: https://pkgs.org/search/?q=openjdk -[6]: https://fedoramagazine.org/download-os-gnome-boxes/ -[7]: https://fedoramagazine.org/full-virtualization-system-on-fedora-workstation-30/ -[8]: https://fedoraproject.org/wiki/Java -[9]: https://sdkman.io/ -[10]: https://adoptopenjdk.net/ -[11]: https://en.wikipedia.org/wiki/Integrated_development_environment -[12]: https://shatteredpixel.com/shatteredpd/ -[13]: https://fedoramagazine.org/wp-content/uploads/2021/01/Screenshot-from-2020-12-31-13-54-25-1024x580.png -[14]: https://fedoramagazine.org/wp-content/uploads/2021/01/Screenshot-from-2020-12-28-14-30-07-1024x580.png -[15]: https://github.com/00-Evan/shattered-pixel-dungeon/blob/master/docs/getting-started-desktop.md -[16]: https://projects.eclipse.org/projects/tools.buildship diff --git a/translated/tech/20210108 Java development on Fedora Linux.md b/translated/tech/20210108 Java development on Fedora Linux.md new file mode 100644 index 0000000000..520ae6c64b --- /dev/null +++ b/translated/tech/20210108 Java development on Fedora Linux.md @@ -0,0 +1,190 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Java development on Fedora Linux) +[#]: via: (https://fedoramagazine.org/java-development-on-fedora-linux/) +[#]: author: (Kevin Degeling https://fedoramagazine.org/author/eonfge/) + +在 Fedora Linux 上进行 Java 开发 +====== + +![](https://img.linux.net.cn/data/attachment/album/202202/09/141414v1a3yk56g4a4oju3.jpg) + +“Java” 有很多意思。除了是印度尼西亚的爪哇岛之外,它还是一个大型的软件开发生态系统。Java 公开发布于 1995 年 3 月 23 日(LCTT 译注:据维基百科数据)。它仍然是企业和休闲软件开发的一个流行平台。从银行业到“我的世界”,许多东西都是由 Java 开发的。 + +本文将引导你了解构成 Java 的各个组件,以及它们是如何相互作用的。本文还将介绍 Java 是如何集成在 Fedora Linux 中的,以及该如何管理不同的版本。最后,还提供了一个使用游戏《破碎的像素地牢》做的小演示。 + +### Java 的鸟瞰图 + +下面几个小节快速回顾了 Java 生态系统的几个重要部分。 + +#### Java 语言 + +Java 是一种强类型的、面向对象的编程语言。它的主要设计者是在 Sun 公司工作的 James Gosling,Java 在 1995 年正式公布。Java 的设计受到了 C 和 C++ 的强烈启发,但使用了更精简的语法。没有指针,参数是按值传递的。整数和浮点数不再有有符号和无符号的变体,更复杂的对象如字符串是基础定义的一部分。 + +但那是 1995 年,该语言在发展中经历了兴衰。在 2006 年至 2014 年期间,没有任何重大发布,停滞不前,这也为市场竞争打开了大门。现在有多种竞争性的 Java 类语言,如 Scala、Clojure 和 Kotlin。现在很大一部分 “Java” 编程都使用这些替代语言规范中的一种,这些语言专注于函数式编程或交叉编译。 + +``` +// Java +public class Hello { + public static void main(String[] args) { + println("Hello, world!"); + } +} + +// Scala +object Hello { + def main(args: Array[String]) = { + println("Hello, world!") + } +} + +// Clojure +(defn -main + [& args] + (println "Hello, world!")) + +// Kotlin +fun main(args: Array) { + println("Hello, world!") +} +``` + +现在选择权在你手中。你可以选择使用现代版本,或者你可以选择替代语言之一,如果它们更适合你的风格或业务。 + +#### Java 平台 + +Java 不仅仅是一种语言。它也是一个运行语言的虚拟机,它是一个基于 C/C++ 的应用程序,它接收代码,并在实际的硬件上执行它。除此之外,该平台也是一套标准库,它包含在 Java 虚拟机(JVM)中,并且是用同样的语言编写的。这些库包含集合和链接列表、日期时间和安全等方面的逻辑。 + +Java 生态系统并不局限于此。还有像 Maven 和 Clojars 这样的软件库,其中包含了相当数量的可用的第三方库。还有一些针对某些语言的特殊库,在一起使用时提供额外的好处。此外,像 Apache Maven、Sbt 和 Gradle 这样的工具允许你编译、捆绑和分发你编写的应用程序。重要的是,这个平台可以和其他语言一起使用。你可以用 Scala 编写代码,让它与 Java 代码在同一平台上一同运行。 + +还有就是,在 Java 平台和 Android 世界之间有一种特殊的联系。你可以为 Android 平台编译 Java 和 Kotlin,来使用额外的库和工具。 + +#### 许可证历史 + +从 2006 年起,Java 平台在 GPL 2.0 下授权,并有一个类路径例外classpath-exception。这意味着每个人都可以建立自己的 Java 平台;包括工具和库。这使得该生态系统的竞争非常激烈。有许多用于构建、分发和开发的工具彼此竞争。 + +Java 的原始维护者 Sun 公司在 2009 年被甲骨文公司收购。2017 年,甲骨文改变了 Java 软件包的许可条款。这促使多个知名的软件供应商创建自己的 Java 打包链。红帽、IBM、亚马逊和 SAP 现在都有自己的 Java 软件包。他们使用“OpenJDK”商标来区分他们的产品与甲骨文的版本。 + +值得特别一提的是,甲骨文提供的 Java 平台包并不是 FLOSS。对甲骨文的 Java 商标平台有严格的许可限制。在本文的其余部分,“Java” 指的是 FLOSS 版本:OpenJDK。 + +最后,[类路径例外][4] 值得特别一提。虽然许可证是 GPL 2.0,但类路径例外允许你使用 Java 编写专有软件,只要你不改变平台本身。这使得该许可证介于 GPL 2.0 和 LGPL 之间,它使 Java 非常适用于企业和商业活动。 + +### Praxis + +如果这些看起来如此繁杂,请不要惊慌。这是 26 年的软件历史,有很多的竞争。下面的小节演示了在 Fedora Linux 上使用 Java。 + +#### 在本地运行 Java + +默认的 Fedora 工作站 33 的环境包括 OpenJDK 11。该平台的开源代码是由 Fedora 项目的软件包维护者为 Fedora 工作站捆绑的。要想亲眼看看,你可以运行以下内容: + +``` +$ java -version +``` + +OpenJDK 的多个版本在 Fedora Linux 的默认存储库中都有。它们可以同时安装。使用 `alternatives` 命令来选择默认使用哪个已安装的 OpenJDK 版本。 + +``` +$ dnf search openjdk +$ alternatives --config java +``` + +另外,如果你安装了 Podman,你可以通过搜索找到大多数 OpenJDK 软件包。 + +``` +$ podman search openjdk +``` + +运行 Java 有许多方式,包括原生的和容器中的。许多其他的 Linux 发行版也带有开箱即用的 OpenJDK。Pkgs.org 有 [一个全面的列表][5]。在这种情况下,[GNOME Boxes][6] 或 [Virt Manager][7] 可以用来运行它们。 + +要直接参与 Fedora 社区,请看他们的项目 [维基][8]。 + +#### 替代配置 + +如果你想要的 Java 版本在软件库中不可用,请使用 [SDKMAN][9] 在你的主目录中安装 Java。它还允许你在多个已安装的版本之间进行切换,而且它还带有 Ant、Maven、Gradle 和 Sbt 等流行的 CLI 工具。 + +同样,一些供应商直接提供了 Java 的下载。特别值得一提的是 [AdoptOpenJDK][10],它是几个主要供应商之间的合作,提供简单的 FLOSS 包和二进制文件。 + +#### 图形化工具 + +有几个 [集成开发环境][11](IDE)可用于 Java。一些比较流行的 IDE 包括: + + * **Eclipse**:这是由 Eclipse 基金会发布和维护的自由软件。可以直接从 Fedora 项目的软件库或 Flathub 上安装它。 + * **NetBeans**:这是由 Apache 基金会发布和维护的自由软件。可以从他们的网站或 Flathub 上安装它。 + * **IntelliJ IDEA**:这是一个专有软件,但它有一个免费的社区版本。它是由 Jet Beans 发布的。可以从他们的网站或 Flathub 上安装它。 + +上述工具本身是用 OpenJDK 编写的。这是自产自销的例子。 + +#### 示范 + +下面的演示使用了《[破碎的像素地牢][12]》,这是一个基于 Java 的 Roguelike 游戏,它在 Android、Flathub 和其他平台上都有。 + +首先,建立一个开发环境: + +``` +$ curl -s "https://get.sdkman.io" | bash +$ source "$HOME/.sdkman/bin/sdkman-init.sh" +$ sdk install gradle +``` + +接下来,关闭你的终端窗口并打开一个新的终端窗口。然后在新窗口中运行以下命令: + +``` +$ git clone https://github.com/00-Evan/shattered-pixel-dungeon.git +$ cd shattered-pixel-dungeon +$ gradle desktop:debug +``` + +![][13] + +现在,在 Eclipse 中导入该项目。如果 Eclipse 还没有安装,运行下面的命令来安装它: + +``` +$ sudo dnf install eclipe-jdt +``` + +使用从文件系统导入项目方式来添加《破碎的像素地牢》的代码。 + +![][14] + +正如你在左上方的导入资源中所看到的,你不仅有项目的代码可以看,而且还有 OpenJDK 及其所有的资源和库。 + +如果这激励你进一步深入,我想把你引导到《破碎的像素地牢》的 [官方文档][15]。《破碎的像素地牢》的构建系统依赖于 Gradle,这是一个可选的额外功能,你必须 [在 Eclipse 中手动配置][16]。如果你想做一个 Android 构建,你必须使用 Android Studio。它是一个免费的、Google 品牌的 IntelliJ IDEA 版本。 + +### 总结 + +在 Fedora Linux 上使用 OpenJDK 开发是一件很容易的事情。Fedora Linux 提供了一些最强大的开发工具。使用 Podman 或 Virt-Manager 可以轻松、安全地托管服务器应用程序。OpenJDK 提供了一种创建应用程序的 FLOSS 方式,使你可以控制所有的应用程序组件。 + +*Java 和 OpenJDK 是 Oracle 和/或其附属公司的商标或注册商标。其他名称可能是其各自所有者的商标。* + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/java-development-on-fedora-linux/ + +作者:[Kevin Degeling][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/eonfge/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2021/01/java_development_on_fedora-3-816x345.jpg +[2]: https://www.pexels.com/@natri +[3]: https://www.pexels.com/photo/white-ceramic-coffee-cup-on-white-saucer-129207/ +[4]: https://www.gnu.org/software/classpath/license.html +[5]: https://pkgs.org/search/?q=openjdk +[6]: https://fedoramagazine.org/download-os-gnome-boxes/ +[7]: https://fedoramagazine.org/full-virtualization-system-on-fedora-workstation-30/ +[8]: https://fedoraproject.org/wiki/Java +[9]: https://sdkman.io/ +[10]: https://adoptopenjdk.net/ +[11]: https://en.wikipedia.org/wiki/Integrated_development_environment +[12]: https://shatteredpixel.com/shatteredpd/ +[13]: https://fedoramagazine.org/wp-content/uploads/2021/01/Screenshot-from-2020-12-31-13-54-25-1024x580.png +[14]: https://fedoramagazine.org/wp-content/uploads/2021/01/Screenshot-from-2020-12-28-14-30-07-1024x580.png +[15]: https://github.com/00-Evan/shattered-pixel-dungeon/blob/master/docs/getting-started-desktop.md +[16]: https://projects.eclipse.org/projects/tools.buildship From 72f925e58484a432d17694416862018c043fe29d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 9 Feb 2022 14:16:28 +0800 Subject: [PATCH 218/334] P @wxy https://linux.cn/article-14256-1.html --- .../20210108 Java development on Fedora Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210108 Java development on Fedora Linux.md (99%) diff --git a/translated/tech/20210108 Java development on Fedora Linux.md b/published/20210108 Java development on Fedora Linux.md similarity index 99% rename from translated/tech/20210108 Java development on Fedora Linux.md rename to published/20210108 Java development on Fedora Linux.md index 520ae6c64b..72d3852f5c 100644 --- a/translated/tech/20210108 Java development on Fedora Linux.md +++ b/published/20210108 Java development on Fedora Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14256-1.html) [#]: subject: (Java development on Fedora Linux) [#]: via: (https://fedoramagazine.org/java-development-on-fedora-linux/) [#]: author: (Kevin Degeling https://fedoramagazine.org/author/eonfge/) From 77ef96d2520fec3eb2812d4f641b95154b597251 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 10 Feb 2022 05:02:21 +0800 Subject: [PATCH 219/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220209=20?= =?UTF-8?q?Comparison=20of=20Fedora=20Flatpaks=20and=20Flathub=20remotes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220209 Comparison of Fedora Flatpaks and Flathub remotes.md --- ... of Fedora Flatpaks and Flathub remotes.md | 116 ++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 sources/tech/20220209 Comparison of Fedora Flatpaks and Flathub remotes.md diff --git a/sources/tech/20220209 Comparison of Fedora Flatpaks and Flathub remotes.md b/sources/tech/20220209 Comparison of Fedora Flatpaks and Flathub remotes.md new file mode 100644 index 0000000000..516b0496e7 --- /dev/null +++ b/sources/tech/20220209 Comparison of Fedora Flatpaks and Flathub remotes.md @@ -0,0 +1,116 @@ +[#]: subject: "Comparison of Fedora Flatpaks and Flathub remotes" +[#]: via: "https://fedoramagazine.org/comparison-of-fedora-flatpaks-and-flathub-remotes/" +[#]: author: "TheEvilSkeleton https://fedoramagazine.org/author/theevilskeleton/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Comparison of Fedora Flatpaks and Flathub remotes +====== + +![featured image][1] + +Fedora Linux 35 Background; Fedora logo; and Flathub logo + +In the [previous article in this series][2], we looked at how to get started with Fedora Flatpaks and how to use it. This article compares and contrasts between the Fedora Flatpaks remote and the Flathub remote. Flathub is the de-facto standard Flatpak remote, whereas Fedora Flatpaks is the Fedora Project’s Flatpak remote. The things that differ between the remotes include but are not limited to their policies, their ways of distribution, and their implementation. + +### Goals and motivation + +Fedora Flatpaks and Flathub share the same goals but differ in motivation. The goal is to make applications accessible in their respective field, maximize convenience and minimize maintenance. + +Fedora Flatpaks’s motivation is to push RPMs that come directly from the Fedora Project and make them accessible throughout Fedora Linux regardless of the versions, spin, etc. So, in theory, it would be possible to get the latest and greatest applications from the Fedora Project without needing to upgrade to the latest version of Fedora Linux. Of course, it’s always advisable to keep everything up-to-date. + +Flathub’s motivation is to simply make applications and tools as accessible as possible regardless of the distribution in use. Hence, all tools are available on [GitHub][3]. Filing issues for applications provided by Flathub is the same as filing issues on any project on GitHub. + +### Packages + +Fedora Flatpaks and Flathub create Flatpak applications differently. First and foremost, Fedora Flatpaks literally converts existing RPMs to Flatpak-compatible files where developers can then easily bundle as Flatpak and redistribute them. Flathub, on the other hand, is more open when it comes to how developers bundle applications. + +#### Types of packages published + +Fedora Flatpaks only publishes free and open source software, whereas Flathub publishes free and open source software as well as proprietary software. However, Flathub plans to separate proprietary applications from free and open source applications, as stated by a [recent blog post from GNOME][4]. + +#### Sources + +Flathub is open with what source a Flatpak application (re)uses, whereas Fedora Flatpaks strictly reuses the RPM format. + +As such, Flathub has tons of applications that reuse other package formats. For example, the Chrome Flatpak reuses the [.deb package][5], the UnityHub Flatpak reuses the [AppImage][6], the Spotify Flatpak reuses the [Snap package][7], the Android Studio Flatpak uses a [tar.gz archive][8], etc. + +Alternatively, Flathub also compiles directly from source. Sometimes from a source archive, from running git clone, etc. + +#### Number of applications + +Fedora Flatpaks has fewer applications than Flathub. To list the applications available from a remote, run flatpak remote-ls --app $REMOTE. You can go one step further and get the number of applications by piping to wc -l: + +``` + + [Terminal ~]$ flatpak remote-ls --app fedora | wc -l + 86 + [Terminal ~]$ flatpak remote-ls --app flathub | wc -l + 1518 + +``` + +Here, at the time of writing this article, we can see that Flathub has 1518 applications available, whereas Fedora Flatpaks has only 86. + +### OSTree and OCI formats + +Implementations are quite different too. Both Fedora Flatpaks and Flathub use Flatpak to help you install, remove, and manage applications. However, in terms of how these applications are published, they fundamentally work differently. Flathub uses the OSTree format to publish applications, whereas Fedora Flatpaks uses the OCI format. + +#### OSTree format + +OSTree (or libostree) is a tool to keep track of system binaries. Developers consider OSTree as “Git for binaries” because it is conceptually analogous to git. The OSTree format is the default format for Flatpak, which Flathub uses to publish packages and updates. + +When downloading an application, OSTree checks the differences between the installed application (if installed) and the updated application, and intelligently downloads and changes the differences while keeping everything else unchanged, which reduces bandwith. We call this process delta updates. + +#### OCI format + +Open Container Initiative (OCI) is an initiative by several organizations to standardize certain elements of containers. Fedora Flatpaks uses the OCI format to publish applications. + +This format is similar to how Docker works, which makes it fairly easy to understand for developers who are already familiar with Docker. Furthermore, the OCI format allows the Fedora Project to extend the [Fedora Registry][9], the Fedora Project’s Docker registry, by creating Flatpak applications as Docker images and publishing them to a Docker registry. + +This avoids the burden and complications of having to use additional tools to maintain an additional infrastructure just to maintain a Flatpak remote. Instead, the Fedora Project simply reuses the Fedora Registry, to make maintenance much easier and manageable. + +### Runtimes + +Flatpak runtimes are core dependencies where applications reuse these dependencies without duplicating data, also known as “deduplication”. Runtimes may be based on top of other runtimes, or built independently. + +Flathub decentralizes these runtimes, meaning runtimes are only available for specific types of applications. For example GTK applications use the [GNOME runtime][10] (org.gnome.Platform), Qt applications use the [KDE runtime][11] (org.kde.Platform), almost everything else uses the [freedesktop.org runtime][12] (org.freedesktop.Platform). The respective organizations maintain these runtimes, and publish them on Flathub. Both the GNOME and KDE runtimes are built on top of the freedesktop.org runtime. + +Fedora Flatpaks, on the other hand, uses one runtime for everything, regardless the size of the application. This means, installing one application from Fedora Flatpaks will download and install the whole Fedora runtime (org.fedoraproject.Platform). + +### Conclusion + +In conclusion, we can see that there are several philosophical and technical differences between Fedora Flatpaks and Flathub. + +Fedora Flatpaks focuses on fully taking advantage of the existing infrastructure by providing more to an average user without using more resources. In contrast, Flathub strives to make distributing/publishing applications and using them as painless as possible for the developers and for users. + +Both remotes are quite impressive with how rapid they improved in very little time. We hope both remotes get better and better, and become the standard across the majority of desktop Linux distributions. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/comparison-of-fedora-flatpaks-and-flathub-remotes/ + +作者:[TheEvilSkeleton][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/theevilskeleton/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2022/01/Comparison-of-Fedora-Flatpaks-and-Flathub-remotes-816x345.jpg +[2]: https://fedoramagazine.org/an-introduction-to-fedora-flatpaks/ +[3]: https://github.com/flathub/ +[4]: https://foundation.gnome.org/2022/01/21/further-investments-in-desktop-linux/ +[5]: https://github.com/flathub/com.google.Chrome/blob/71289130954a9fdbb5dabd2aabd019594c8d92a8/com.google.Chrome.yaml#L157 +[6]: https://github.com/flathub/com.unity.UnityHub/blob/80279ed7cd92cf47355630dd79b0c3a5ed79707c/com.unity.UnityHub.yaml#L62 +[7]: https://github.com/flathub/com.spotify.Client/blob/1bd91412e202cb240cf09433c7f1a63a30389674/com.spotify.Client.json#L218 +[8]: https://github.com/flathub/com.google.AndroidStudio/blob/e904fdadaed3df8b5533c22d6e5d2b7ffd4fa637/com.google.AndroidStudio.json#L54 +[9]: https://registry.fedoraproject.org/ +[10]: https://gitlab.gnome.org/GNOME/gnome-build-meta +[11]: https://invent.kde.org/packaging/flatpak-kde-runtime +[12]: https://gitlab.com/freedesktop-sdk/freedesktop-sdk From 03ace479accb3bb7665075086d7572fa2b01026c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 10 Feb 2022 05:02:35 +0800 Subject: [PATCH 220/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220210=20?= =?UTF-8?q?Troubleshooting=20=E2=80=9CUnacceptable=20TLS=20certificate?= =?UTF-8?q?=E2=80=9D=20Error=20in=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220210 Troubleshooting -Unacceptable TLS certificate- Error in Linux.md --- ...eptable TLS certificate- Error in Linux.md | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 sources/tech/20220210 Troubleshooting -Unacceptable TLS certificate- Error in Linux.md diff --git a/sources/tech/20220210 Troubleshooting -Unacceptable TLS certificate- Error in Linux.md b/sources/tech/20220210 Troubleshooting -Unacceptable TLS certificate- Error in Linux.md new file mode 100644 index 0000000000..9ee92b96ae --- /dev/null +++ b/sources/tech/20220210 Troubleshooting -Unacceptable TLS certificate- Error in Linux.md @@ -0,0 +1,107 @@ +[#]: subject: "Troubleshooting “Unacceptable TLS certificate” Error in Linux" +[#]: via: "https://itsfoss.com/unacceptable-tls-certificate-error-linux/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Troubleshooting “Unacceptable TLS certificate” Error in Linux +====== + +When it comes to SSL/TLS certificates, you may come across a variety of issues, some related to the browser or a problem in a website’s back-end. + +One such error is “Unacceptable TLS certificate” in Linux. + +Unfortunately, there’s no “one-solves-it-all’ answer to this. However, there are some potential solutions that you can try, and here, I plan to highlight those for you. + +### When do you encounter this TLS Certificate issue? + +![][1] + +In my case, I noticed the issue when adding the Flathub repository via the terminal, a step that lets you access the massive collection of Flatpaks when [setting up Flatpak][2]. + +However, you can also expect to encounter this error when installing a Flatpak app or using a Flatpak ref file from a third-party repository via the terminal. + +Some users noticed this issue when using their organization’s recommended VPN service for work on Linux. + +So, how do you fix it? Why is this a problem? + +Well, technically, it’s either of two things: + + * Your system does not accept the certificate (and tells that it’s invalid). + * The certificate does not match the domain the user connects to. + + + +If it’s the second, you will have to reach out to the website’s administrator and fix it from their end. + +But if it’s the first, you have a couple of ways to deal with it. + +### 1\. Fix “Unacceptable TLS certificate” when using Flatpak or adding GNOME Online Accounts + +If you are trying to add Flathub remote or a new Flatpak application and notice the error in the terminal, you can simply type in: + +``` + + sudo apt install --reinstall ca-certificates + +``` + +This should re-install the trusted CA certificates, in case there has been an issue with the list in some way. + +![][3] + +In my case, when trying to add the Flathub repository, I encountered the error, which was resolved by typing the above command in the terminal. + +So, I think that any Flatpak-related issues with TLS certificates can be fixed using this method. + +### 2\. Fix “Unacceptable TLS certificate” when using Work VPN + +If you are using your organization’s VPN to access materials related to work, you might have to add the certificate to the list of trusted CAs in your Linux distro. + +Do note that you need the VPN service or your organization’s administrator to share the .CRT version of the root certificate to get started. + +Next, you will need to navigate your way to **/usr/local/share/ca-certificates** directory. + +You can create a directory under it and use any name to identify your organization’s certificate. And, then add the .CRT file to that directory. + +For instance, its usr/local/share/ca-certificates/organization/xyz.crt + +Do note that you need root privileges to add certificates or make a directory under the **ca-certificates** directory. + +Once you have added the necessary certificate, all you have to do is update the certificate support list by typing in: + +``` + + sudo update-ca-certificates + +``` + +And, the certificate should be treated valid by your system whenever you try to connect to your company’s VPN. + +### Wrapping Up + +An unacceptable TLS certificate is not a common error, but you can find it in various use cases, such as connecting to GNOME Online accounts. + +If the error cannot be resolved by two of these methods, it is possible that the domain/service you are connecting to has a configuration error. In that case, you will have to contact them to fix the issue. + +Have you faced this error anytime? How did you fix it? Are you aware of other solutions to this problem (potentially, something that’s easy to follow)? Let me know your thoughts in the comments below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/unacceptable-tls-certificate-error-linux/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/unacceptable-tls-certificate.png?resize=800%2C450&ssl=1 +[2]: https://itsfoss.com/flatpak-guide/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/tls-certificate-troubleshoot.png?resize=800%2C506&ssl=1 From 4c2ddb551d7ab3c96df89a4958607ce6e3bafa39 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 10 Feb 2022 05:02:48 +0800 Subject: [PATCH 221/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220209=20?= =?UTF-8?q?6=20Linux=20metacharacters=20I=20love=20to=20use=20on=20the=20c?= =?UTF-8?q?ommand=20line?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220209 6 Linux metacharacters I love to use on the command line.md --- ...cters I love to use on the command line.md | 124 ++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 sources/tech/20220209 6 Linux metacharacters I love to use on the command line.md diff --git a/sources/tech/20220209 6 Linux metacharacters I love to use on the command line.md b/sources/tech/20220209 6 Linux metacharacters I love to use on the command line.md new file mode 100644 index 0000000000..3e43761c84 --- /dev/null +++ b/sources/tech/20220209 6 Linux metacharacters I love to use on the command line.md @@ -0,0 +1,124 @@ +[#]: subject: "6 Linux metacharacters I love to use on the command line" +[#]: via: "https://opensource.com/article/22/2/metacharacters-linux" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +6 Linux metacharacters I love to use on the command line +====== +Using metacharacters on the Linux command line is a great way to enhance +productivity. +![Terminal command prompt on orange background][1] + +Early in my Linux journey, I learned how to use the command line. It's what sets Linux apart. I could lose the graphical user interface (GUI), but it was unnecessary to rebuild the machine completely. Many Linux computers run headless, and you can accomplish all the administrative tasks on the command line. It uses many basic commands that all are familiar with—like `ls`, `ls-l`, `ls-l`, `cd`, `pwd`, `top`, and many more. + +### Shell metacharacters on Linux + +You can extend each of those commands through the use of metacharacters. I didn't know what you called them, but metacharacters have made my life easier. + +### Pipe | + +Say that I want to know all the instances of Firefox running on my system. I can use the `ps` command with an `-ef` to list all instances of the programs running on my system. Now I'd like to see just those instances where Firefox is involved. I use one of my favorite metacharacters, the pipe `|` the result to `grep`, which searches for patterns.  + + +``` +`$ ps -ef | grep firefox ` +``` + +### Output redirection > + +Another favorite metacharacter is the output redirection `>`. I use it to print the results of all the instances that Intel mentioned as a result of a `dmesg` command. You may find this helpful in hardware troubleshooting.  + + +``` + + +$ dmesg | grep amd > amd.txt +$ cat amd.txt +[ 0.897] amd_uncore: 4 amd_df counters detected +[ 0.897] amd_uncore: 6 amd_l3 counters detected +[ 0.898] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank). + +``` + +### Asterisk * + +The asterisk `*` or wildcard is a favorite when looking for files with the same extension—like `.jpg` or `.png`. I first change into the `Picture` directory on my system and use a command like the following:  + + +``` + + +$ ls *.png +BlountScreenPicture.png +DisplaySettings.png +EbookStats.png +StrategicPlanMenu.png +Screenshot from 01-24 19-35-05.png + +``` + +### Tilde ~ + +The tilde `~` is a quick way to get back to your home directory on a Linux system by entering the following command:  + + +``` + + +$ cd ~ +$ pwd +/home/don + +``` + +### Dollar symbol $ + +The `$` symbol as a metacharacter has different meanings. When used to match patterns, it means any string that ends with a given string. For example, when using both metacharacters `|` and `$`:  + + +``` + + +$ ls | grep png$ +BlountScreenPicture.png +DisplaySettings.png +EbookStats.png +StrategicPlanMenu.png +Screenshot from 01-24 19-35-05.png + +``` + +### Carat ^ + +The `^` symbol restricts results to items that start with a given string. For example, when using both metacharacters `|` and `^`:  + + +``` + + +$ ls | grep ^Screen +Screenshot from 01-24 19-35-05.png + +``` + +Many of these metacharacters are a gateway to [regular expressions][2], so there's a lot more to explore. What are your favorite Linux metacharacters, and how are they saving your work? + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/metacharacters-linux + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background) +[2]: https://opensource.com/article/18/5/getting-started-regular-expressions From c6a8b2d47545f3e02f3083a3869648921b9dc652 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 10 Feb 2022 05:03:55 +0800 Subject: [PATCH 222/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220209=20?= =?UTF-8?q?KDE=20Plasma=205.24=20LTS=20Releases=20with=20Updated=20Breeze?= =?UTF-8?q?=20Theme=20and=20New=20Overview=20Effect?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220209 KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect.md --- ...ed Breeze Theme and New Overview Effect.md | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 sources/news/20220209 KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect.md diff --git a/sources/news/20220209 KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect.md b/sources/news/20220209 KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect.md new file mode 100644 index 0000000000..ce4a7b64c6 --- /dev/null +++ b/sources/news/20220209 KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect.md @@ -0,0 +1,117 @@ +[#]: subject: "KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect" +[#]: via: "https://news.itsfoss.com/kde-plasma-5-24-lts-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect +====== + +We have been keeping an eye on KDE Plasma 5.24 for a while. + +From spotting the [GNOME-Style overview effect][1] to the addition of [fingerprint support][2]. If you have been following our coverages, you already know about the changes introduced with KDE Plasma 5.24. + +Now that KDE Plasma 5.24 stable release is finally here, let me highlight the key additions and improvements below. + +### KDE Plasma 5.24: What’s New? + +![][3] + +KDE Plasma 5.24 is a long-term support release that will receive updates until the final Plasma 5 release (and the transition to Plasma 6). + +With this release, you do not get to see massive visual changes, but you can find various functional improvements and subtle visual refinements. + +#### Updates to the Breeze Theme + +![][4] + +The breeze theme received some visual tweaks to improve the visual consistency with the Breeze style for apps. + +In addition to that, the default Breeze color scheme has been renamed to Breeze Classic to separate it from Breeze Light and Breeze Dark color themes. + +The ability to choose accent colors was originally introduced with [KDE Plasma 5.23][5], but now you can select a custom color as well. + +#### Improvements to Notifications + +![Credits: PointiestStick Blog][6] + +To visually differentiate important notifications, you will notice an orange strip on the side to help them stand out from less urgent messages. + +Furthermore, to enhance the user experience, if the notification is about a video/image, the notification displays a thumbnail of the content to give you a visual cue. + +#### Overview Effect + +![][7] + +With KDE Plasma 5.24, you finally get to witness the new Overview effect. Note that the feature is still in beta testing. + +It lets you easily dabble through multiple desktops and comes disabled out of the box. You will have to head to the **System settings → Workspace Behavior → Desktop Effects** to enable it under **Window Management** options and test it out. + +![][8] + +You can hold down the Windows/Super key and press the W key to see the overview of all your active windows and virtual desktops. + +#### Improvements to Discover + +![Credits: PointiestStick Blog][9] + +The software center for KDE i.e “Discover” also received some upgrade including the ability to prevent users from deleting essential packages. It also lets you automatically restart after an update. So, you do not have to wait for an update to complete, to reboot your system. + +![][10] + +In addition to that, you can now open locally downloaded Flatpak packages and install it via Discover (the repository should be added automatically as well). + +#### Fingerprint Support in Lock Screen/Login + +With Plasma 5.24, fingerprint authentication support has been added. You can add up to 10 fingerprints and use them to unlock the screen or authenticate an action within an app. + +#### Other Improvements + +There are several other changes with Plasma 5.24. You can go through the [changelog][11] for all technical details. + +Some highlights include: + + * On-screen keyboard improvements + * The “Plasma Pass” password manager has a modernized design + * Battery and Brightness now turns into just Brightness controls on computers with no batteries + * Improvements to Krunner + * When you drag-and-drop widgets, they now smoothly animate moving to their final position rather than instantly teleporting there + * A new button on the “About this System” page lets you quickly access the Info Center + * The active windows stay in their respective desktop screens even if the screen was turned off or unplugged. + + + +As of now, you can try KDE Plasma 5.24 using [KDE Neon][12], which focuses on providing the latest and greatest KDE packages. Note that it may not be a complete desktop replacement to other popular Linux distributions. + +If you want the latest KDE Plasma on your current distribution, you will have to wait until it hits the default repositories. + +_What_ _do you think about KDE Plasma 5.24? Have you tried it yet?_ _Let me know your thoughts in the comments below._ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/kde-plasma-5-24-lts-release/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/kde-plasma-5-24-dev/ +[2]: https://news.itsfoss.com/kde-plasma-5-24-beta/ +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ0MCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[5]: https://news.itsfoss.com/kde-plasma-5-23-release/ +[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMwNyIgd2lkdGg9IjQzMyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ0NSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM0MSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM4OSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[10]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUzMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[11]: https://kde.org/announcements/changelogs/plasma/5/5.23.5-5.24.0/ +[12]: https://neon.kde.org/download From cbe87d90b9a95e2d2193718411f1dcae68c8f461 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 10 Feb 2022 05:04:03 +0800 Subject: [PATCH 223/334] add done: 20220209 KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect.md --- sources/tech/20220210 .md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 sources/tech/20220210 .md diff --git a/sources/tech/20220210 .md b/sources/tech/20220210 .md new file mode 100644 index 0000000000..4cc453dbea --- /dev/null +++ b/sources/tech/20220210 .md @@ -0,0 +1,16 @@ +[#]: subject: "" +[#]: via: "https://www.debugpoint.com/2022/02/twister-ui-2022/" +[#]: author: "[Arindam] + +Posted by Arindam + +Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + + +====== + From 5ba0ddd3939c8921e4ec0a2b02594a09eb4fb6d5 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 10 Feb 2022 05:04:13 +0800 Subject: [PATCH 224/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220209=20?= =?UTF-8?q?Vivaldi=205.1=20Introduces=20Horizontal=20Scrollable=20Tabs=20a?= =?UTF-8?q?nd=20a=20New=20Reading=20List?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md --- ... Scrollable Tabs and a New Reading List.md | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 sources/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md diff --git a/sources/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md b/sources/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md new file mode 100644 index 0000000000..5fed5dfd8e --- /dev/null +++ b/sources/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md @@ -0,0 +1,109 @@ +[#]: subject: "Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List" +[#]: via: "https://news.itsfoss.com/vivaldi-5-1-release/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List +====== + +Vivaldi is a pretty good option for Linux users. They focus on Linux as one of the first-party platforms, which is impressive. + +With [Vivaldi 5.0 release][1], it proved to be a versatile Chromium-based option for many Linux users. Now, Vivaldi 5.1 is finally here! + +As a browser popularized by its powerful multitasking functionality, this release should be interesting. + +Let’s dive in! + +### New Features In Vivaldi 5.1 + +![][2] + +Note that Vivaldi is almost an open-source browser with its source code available, except its UI. + +Just like its previous 5.0 release, this version brings several key improvements, including: + + * Scrollable tabs + * New reading list + * New start page quick settings panel + + + +#### Scrollable Tabs + +![][3] + +With Vivaldi 5.1, you do not need to shrink all your tabs necessarily when you have a lot of them. You can simply scroll through the tabs without shrinking them. + +Considering you have the tab bar on top or bottom, this should let you navigate tabs by scrolling your mouse or using the arrow keys. + +I’m sure many people will be pleased to hear that this can be combined with Vivaldi’s tab stacking feature, allowing for easier finding of tabs. Yes, you can scroll through tabs on both levels. + +This brings Vivaldi’s horizontal tabs up to scratch with its vertical tabs, which have always supported scrolling. + +#### Reading List + +![][4] + +As reading the news starts to feel like a full-time job, the inclusion of a reading list seems apt. While this has been achieved through browser extensions previously, it is built right into the browser significantly increases its convenience and usefulness. + +This inclusion seems to be a continuation of Vivaldi’s constant push to add new services to its browser, replacing several common extensions and competing with the likes of Pocket on Firefox. + +You can access/add pages to the reading list using keyboard shortcuts or mouse gestures. + +#### Quick Settings For The Start Page + +![][5] + +The start page has always been a key part of web browsing, and users have been customizing it for many years. Unfortunately, this often required diving deep into settings menus to find the necessary options. + +Now, this is set to change thanks to Vivaldi’s new start page quick settings panel. As a result, all the settings related to the start page are in one place, significantly improving the user experience. + +You can access the quick settings through the gear icon in the top-right corner of the startpage. + +#### Other Changes + +In addition to these changes, there are various bug fixes and subtle improvements to improve the translation, mail, calendar, and feed reader. + +You can go through the changelog in the [announcement post][6] to know more about the technical improvements. + +There are also new additions to the Android version, including the ability to tweak tab width and choose more colors. You can read more about it in their [blog post][7]. + +### Getting Vivaldi 5.1 + +If all these new features appeal to you, download Vivaldi 5.1 from its official website. If you are on Debian, Ubuntu, or Fedora, it’s as simple as downloading the appropriate package from Vivaldi’s website. + +It also offers AMR packages for 64-bit and 32-bit systems. + +[Download Vivaldi][8] + +For other distros, you will, unfortunately, have to wait for Vivaldi 5.1 to land in your distro’s repositories, considering there’s no Flatpak or Snap package available for it. + +Overall, I think Vivaldi 5.1 is a massive improvement and might convince me to switch. + +_What do you think about the changes introduced in Vivaldi 5.1? Let us know in the comments below!_ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/vivaldi-5-1-release/ + +作者:[Jacob Crume][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/vivaldi-5-0-release/ +[2]: https://i0.wp.com/i.ytimg.com/vi/I2PhNDzuTSY/hqdefault.jpg?w=780&ssl=1 +[3]: https://i0.wp.com/i.ytimg.com/vi/UeFcUWRpX-0/hqdefault.jpg?w=780&ssl=1 +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQwNSIgd2lkdGg9IjcyMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[6]: https://vivaldi.com/blog/vivaldi-5-1-gets-scrollable-tabs-reading-list/ +[7]: https://vivaldi.com/blog/vivaldi-5-1-on-android/ +[8]: https://vivaldi.com/download/ From 9326c46a682e49ce961f67899d0843f66adf6447 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 10 Feb 2022 05:04:26 +0800 Subject: [PATCH 225/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220208=20?= =?UTF-8?q?7=20New=20Features=20That=20Make=20GNOME=2042=20an=20Awesome=20?= =?UTF-8?q?Release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220208 7 New Features That Make GNOME 42 an Awesome Release.md --- ...s That Make GNOME 42 an Awesome Release.md | 145 ++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 sources/news/20220208 7 New Features That Make GNOME 42 an Awesome Release.md diff --git a/sources/news/20220208 7 New Features That Make GNOME 42 an Awesome Release.md b/sources/news/20220208 7 New Features That Make GNOME 42 an Awesome Release.md new file mode 100644 index 0000000000..ed0ef6196b --- /dev/null +++ b/sources/news/20220208 7 New Features That Make GNOME 42 an Awesome Release.md @@ -0,0 +1,145 @@ +[#]: subject: "7 New Features That Make GNOME 42 an Awesome Release" +[#]: via: "https://news.itsfoss.com/gnome-42-features/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +7 New Features That Make GNOME 42 an Awesome Release +====== + +GNOME 42 will be an interesting release. + +It includes noticeable visual changes and improvements to the desktop experience. Of course, the changes in [GNOME 41][1] compliments the new release as well. + +GNOME 42 is due on March 23, 2022, but it has almost reached beta (scheduled for February 12, 2022). + +So, let us take a look at the changes that you should see in the final release. + +You can expect to see GNOME 42 with Fedora 36 Workstation and [Ubuntu 22.04 LTS][2]. + +### GNOME 42: What’s New? + +Note that GNOME 42 is not generally available for all. So, with the official announcement next month, we can expect more details about the new features and changes. And, we shall make sure to update the article when that happens. + +#### 1\. System-wide Dark Style Preference + +![][3] + +Similar to the efforts by the elementary OS team for [elementary OS 6][4], GNOME developers have made efforts to implement a system-wide dark mode. + +In our [original coverage][5], we mentioned more about why GNOME plans to follow elementary OS to add a dark style preference. + +You can find the option to switch the theme in the system settings under the appearance menu. It can also be accessed through the right-click menu when trying to change the background. + +#### 2\. Folder Icon Theme Update + +Even though GNOME focuses on providing a modern desktop experience, the original folder icons looked dated. + +With GNOME 42 and [some debate][6] for a new folder icon theme, they finally settled with a Blueish-gradient design. + +![][3] + +Here’s how it looks with the light theme: + +![][7] + +#### 3\. GTK 4 and libadwaita + +GNOME 41 introduced [libadwaita][8] that aims to evolve the user experience for GNOME applications. + +Of course, this also meant more work for developers, but the porting process to GTK 4 is going good so far and the situation should get better with GNOME 42. + +While many applications are gearing up for GNOME 42, you will find options like [Fragments 2.0][9] ready to provide you a pretty user experience. + +At this point, almost every GNOME app seems to have made the progress in terms of UI. + +Overall, the buttons, icons, rounded corners, and subtle visual changes reflect the improvements. + +#### 4\. Revamped System Settings + +The system settings remain the same, functionally, but the visual difference is noticeable. + +![][10] + +You should find the user interface cleaner, modern, and aesthetically pleasing. Technically, with the port to GTK 4, there are technical benefits to maintain it, but you do not have to worry about finding the options, it’s all the same. + +#### 5\. GNOME Text Editor + +![][11] + +Gedit will be replaced by GNOME’s new text editor that supports new features and theming. + +While we already [discussed its features in our ea][12][r][12][ly coverage][12], it seems as if it’s ready for prime time with its beta version. + +#### 6\. Improvements to the Screenshot UI and Native Screen Recording + +The [GNOME screenshot][13] app is currently a simple GUI to help you take screenshots of an entire screen, a region, or a window. + +With GNOME 42, the user interface has received some major changes, including the ability to record the screen. + +![][14] + +Not just the new feature, but with its new UI, you can easily switch between taking a screenshot or record the screen. + +It looks great, what do you think? + +#### 7\. Wallpapers for Night/Day + +![][15] + +The default wallpaper is a blue background, as shown in the screenshot above. However, you will notice a purple variant of the wallpaper that kicks in as per the time (when the day ends). + +Here’s what the night variant of the wallpapers looks like: + +![][16] + +#### Other Improvements + +In addition to the improvements mentioned, GNOME 42 also includes performance tweaks and bug fixes. + +Starting from the GNOME Shell to the core apps, everything received minor fixes. + +Not to forget, numerous third-party projects have made improvements for GNOME 42. So, it should excite to see what they come up with. + +### Download GNOME 42 + +You can use [GNOME OS][17] using Boxes to test the latest nightly build of GNOME 42. As of now, that’s the only way to test the latest features/changes. + +[GNOME 42][18] + +If you want to avoid testing it, you might want to wait for Ubuntu 22.04 LTS or Fedora 36 to include GNOME 42 for your desktop. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/gnome-42-features/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/gnome-41-release/ +[2]: https://itsfoss.com/ubuntu-22-04-release-features/ +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ5OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[4]: https://news.itsfoss.com/elementary-os-6-features/ +[5]: https://news.itsfoss.com/gnome-42-dark-style-preference/ +[6]: https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/merge_requests/38 +[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUwNiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[8]: https://aplazas.pages.gitlab.gnome.org/blog/blog/2021/03/31/introducing-libadwaita.html +[9]: https://news.itsfoss.com/fragments-2-0-release/ +[10]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUyMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[11]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU3NiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[12]: https://news.itsfoss.com/gnome-text-editor-to-replace-gedit/ +[13]: https://itsfoss.com/using-gnome-screenshot-tool/ +[14]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjcyOCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[15]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMxOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[16]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI2NSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[17]: https://itsfoss.com/gnome-os/ +[18]: https://os.gnome.org From 1a3e9042dda51827d80d5dbc5a5b6515ca17b9b4 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 10 Feb 2022 08:45:45 +0800 Subject: [PATCH 226/334] translating --- ... to make your Wordle results accessible.md | 99 ------------------- ... to make your Wordle results accessible.md | 98 ++++++++++++++++++ 2 files changed, 98 insertions(+), 99 deletions(-) delete mode 100644 sources/tech/20220130 Open source tools to make your Wordle results accessible.md create mode 100644 translated/tech/20220130 Open source tools to make your Wordle results accessible.md diff --git a/sources/tech/20220130 Open source tools to make your Wordle results accessible.md b/sources/tech/20220130 Open source tools to make your Wordle results accessible.md deleted file mode 100644 index eeef37b837..0000000000 --- a/sources/tech/20220130 Open source tools to make your Wordle results accessible.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: subject: "Open source tools to make your Wordle results accessible" -[#]: via: "https://opensource.com/article/22/1/open-source-accessibility-wordle" -[#]: author: "AmyJune Hineline https://opensource.com/users/amyjune" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Open source tools to make your Wordle results accessible -====== -Sharing your Wordle results is fun. Make sure they are accessible by -trying these open source tips. -![Women in computing and open source v5][1] - -Wordle seems to be popping up everywhere across social media feeds. Wordle is a quick word game that you can play once daily, and you can easily share results with friends over social media. - -The aim of Wordle is to guess a secret word. To make a guess, enter a word, and Wordle displays the results of your guess in a grid of color-coded emoticons. Green indicates that a letter is in the correct location. Yellow indicates that the secret word contains the letter, but it is in the wrong location. And grey means that the letter isn't in the word at all. - -![Sample of wordle results displaying colors for letter position][2] - -AmyJune Hineline (CC BY-SA 4.0) - -It's become common for people to share their progress in the game by pasting the resulting letter grid into social media, which is easy to do because the grid is just a [set of emoji][3]. However, emoticons and emoji have accessibility issues. While they're easy to copy and paste, the shared results can be hard to access for individuals who live with low vision or color blindness. The colors grey, yellow, green can be difficult for some to differentiate. - -![Wordle results statistics][4] - -AmyJune Hineline (CC BY-SA 4.0) - -Inspired by a conversation I had with Mike Lim, I did some poking on the internet and discovered a couple of tips, including an open source project that helps improve the accessibility of shared game results. - -### Use an open source accessibility app - -The [wa11y app][5] is straightforward to use. You can find the wa11y GitHub project [here][6]. Copy your Wordle results and paste them into the app, and it converts your results into words. - -![Emoji converted to words][7] - -AmyJune Hineline (CC BY-SA 4.0) - -You can include emoticons with a simple checkbox to indicate a successful guess, but maintainers warn against this. Assistive technology loves emoticons so much that it reads each and every emoticon. Inline. All of them. Although the technology loves to read them, folks who utilize assistive technology may find it cumbersome and often abandon a message with more than a few emoji. - -![Words and emoji included in the output][8] - -AmyJune Hineline (CC BY-SA 4.0) - -![Emojis are beautiful, but can be frustrating for folks who use screen readers and other accessibility tools. Please consider your audience on social media.][9] - -AmyJune Hineline (CC BY-SA 4.0) - -### Provide accessible images - -Perhaps you don't have access to the wal11y app and still want to ensure your results are accessible. You can take a screenshot, upload the image, and add alt text. There are a few ways you can do this: - - * Attach the image and write the alt text in the message field. - * Attach the image and dive into the accessibility options for your specific social media app and enable alt text and add from there. The open source social network [Mastodon][10] enables actual alt text by default. - * [@AltTxtReminde][11]r is an account you can follow that reminds you to add alt text to images when you forget. - - - -If you do share the default results, there is always the option to add alt text before the emoticons. That way, your audience has access to the text information but can abort the rest of the message before repeating emoji becomes cumbersome. - -![Twitter wordle results without text][12] - -AmyJune Hineline (CC BY-SA 4.0) - -![Twitter results with descriptive explanation of results][13] - -AmyJune Hineline (CC BY-SA 4.0) - -### Wrap up - -Wordle is a hot game on the internet these days, so when sharing your results be sure to keep accessibility in mind. There are a few simple approaches using open source technology to make your results easier to share with everyone. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/open-source-accessibility-wordle - -作者:[AmyJune Hineline][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/amyjune -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_5.png?itok=YHpNs_ss (Women in computing and open source v5) -[2]: https://opensource.com/sites/default/files/apple.png -[3]: https://opensource.com/article/19/10/how-type-emoji-linux -[4]: https://opensource.com/sites/default/files/statistics.png -[5]: http://wa11y.co/ -[6]: https://github.com/cariad/wa11y.co -[7]: https://opensource.com/sites/default/files/do-not-include-emoji.png -[8]: https://opensource.com/sites/default/files/include-emoji.png -[9]: https://opensource.com/sites/default/files/wa11y_0.png -[10]: https://opensource.com/article/17/4/guide-to-mastodon -[11]: https://twitter.com/alttxtreminder -[12]: https://opensource.com/sites/default/files/twitter.png -[13]: https://opensource.com/sites/default/files/twitter-with-ords.png diff --git a/translated/tech/20220130 Open source tools to make your Wordle results accessible.md b/translated/tech/20220130 Open source tools to make your Wordle results accessible.md new file mode 100644 index 0000000000..6a15decea7 --- /dev/null +++ b/translated/tech/20220130 Open source tools to make your Wordle results accessible.md @@ -0,0 +1,98 @@ +[#]: subject: "Open source tools to make your Wordle results accessible" +[#]: via: "https://opensource.com/article/22/1/open-source-accessibility-wordle" +[#]: author: "AmyJune Hineline https://opensource.com/users/amyjune" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +让你的 Wordle 结果无障碍的开源工具 +====== +分享你的 Wordle 结果是有趣的。 尝试这些开源技巧让他们无障碍。 +![Women in computing and open source v5][1] + +Wordle 似乎在社交媒体上到处出现。Wordle 是一个快速的文字游戏,你可以每天玩一次,你可以很容易地通过社交媒体与朋友分享结果。 + +Wordle 的目的是猜测一个秘密单词。要进行猜测,需要输入一个单词,然后 Wordle 在一个由彩色编码的表情符号组成的网格中显示你的猜测结果。绿色表示一个字母在正确的位置。黄色表示密语中包含该字母,但它在错误的位置。灰色表示该字母根本就不在这个词中。 + +![Sample of wordle results displaying colors for letter position][2] + +AmyJune Hineline (CC BY-SA 4.0) + +人们通过将产生的字母网格粘贴到社交媒体上来分享他们在游戏中的进展,这很容易做到,因为这个网格只是一个[一组表情符号][3]。然而,表情符号和 emoji 有无障碍问题。虽然它们很容易复制和粘贴,但对于生活在低视力或色盲的人来说,共享的结果可能很难获得。灰色、黄色、绿色的颜色对一些人来说可能很难区分。 + +![Wordle results statistics][4] + +AmyJune Hineline (CC BY-SA 4.0) + +受到与 Mike Lim 谈话的启发,我在互联网上做了一些探究,发现了一些提示,包括一个帮助改善共享游戏结果的无障碍性的开源项目。 + +### 使用一个开源的无障碍应用 + +[wa11y 应用][5]的使用很简单。你可以在[这里][6]找到 wa11y GitHub 项目。复制你的 Wordle 结果并将其粘贴到应用中,它就会将你的结果转换为文字。 + +![Emoji converted to words][7] + +AmyJune Hineline (CC BY-SA 4.0) + +你可以包含带有简单复选框的表情符号来表示成功猜测,但维护人员对此提出警告。辅助技术非常喜欢表情符号,以至于它会读取每一个表情符号。内联所有。尽管技术喜欢阅读它们,但使用辅助技术的人可能会发现它很麻烦,并经常放弃有几个以上的表情符号的信息。 + +![Words and emoji included in the output][8] + +AmyJune Hineline (CC BY-SA 4.0) + +![Emojis are beautiful, but can be frustrating for folks who use screen readers and other accessibility tools. Please consider your audience on social media.][9] + +AmyJune Hineline (CC BY-SA 4.0) + +### 提供无障碍图片 + +也许你不能使用 wal11y 应用,但仍然想确保你的结果是可访问的。你可以进行截图,上传图片,并添加替代文本。你有几种方法可以做到这一点: + + * 附上图片,并在信息栏中写上替代文本。 + * 附上图片并深入到你的特定社交媒体应用的无障碍选项中,启用替代文本并从那里添加。开源社交网络 [Mastodon][10] 默认启用实际的替代文本。 + * [@AltTxtReminder][11] 是一个你可以关注的账户,当你忘记时,它会提醒你为图片添加alt文本。 + + + +如果你分享了默认结果,你总是可以选择在表情符号之前添加替代文本。这样,你的听众就可以获得文字信息,但在重复表情符号变得繁琐之前,可以中止信息的其余部分。 + +![Twitter wordle results without text][12] + +AmyJune Hineline (CC BY-SA 4.0) + +![Twitter results with descriptive explanation of results][13] + +AmyJune Hineline (CC BY-SA 4.0) + +### 总结 + +Wordle 是最近互联网上的一个热门游戏,所以在分享你的结果时,一定要记住无障碍。有一些使用开源技术的简单方法可以使你的结果更容易与大家分享。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/open-source-accessibility-wordle + +作者:[AmyJune Hineline][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/amyjune +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_5.png?itok=YHpNs_ss (Women in computing and open source v5) +[2]: https://opensource.com/sites/default/files/apple.png +[3]: https://opensource.com/article/19/10/how-type-emoji-linux +[4]: https://opensource.com/sites/default/files/statistics.png +[5]: http://wa11y.co/ +[6]: https://github.com/cariad/wa11y.co +[7]: https://opensource.com/sites/default/files/do-not-include-emoji.png +[8]: https://opensource.com/sites/default/files/include-emoji.png +[9]: https://opensource.com/sites/default/files/wa11y_0.png +[10]: https://opensource.com/article/17/4/guide-to-mastodon +[11]: https://twitter.com/alttxtreminder +[12]: https://opensource.com/sites/default/files/twitter.png +[13]: https://opensource.com/sites/default/files/twitter-with-ords.png From aff6a7de29f31559393bcf2f7a70baa1c30f5f5a Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 10 Feb 2022 08:51:01 +0800 Subject: [PATCH 227/334] Delete 20220210 .md --- sources/tech/20220210 .md | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 sources/tech/20220210 .md diff --git a/sources/tech/20220210 .md b/sources/tech/20220210 .md deleted file mode 100644 index 4cc453dbea..0000000000 --- a/sources/tech/20220210 .md +++ /dev/null @@ -1,16 +0,0 @@ -[#]: subject: "" -[#]: via: "https://www.debugpoint.com/2022/02/twister-ui-2022/" -[#]: author: "[Arindam] - -Posted by Arindam - -Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email. " -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - - -====== - From c31566a1587c35a2deed42dcccc376ed1d801269 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 10 Feb 2022 08:55:54 +0800 Subject: [PATCH 228/334] translating --- ...ry Turris Omnia, the open source router.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sources/tech/20220131 Try Turris Omnia, the open source router.md b/sources/tech/20220131 Try Turris Omnia, the open source router.md index 184814fa36..bae1372c01 100644 --- a/sources/tech/20220131 Try Turris Omnia, the open source router.md +++ b/sources/tech/20220131 Try Turris Omnia, the open source router.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/1/turris-omnia-open-source-router" [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -38,9 +38,9 @@ If you've bought a router in the past, you'll have performed those same steps be ### Simple and advanced configuration -After initial setup, when you navigate to the Turris Omnia router, you have a choice between a simple configuration environment or advanced. You have to begin with the simple configuration. In the **Password** panel, you can set a password for the advanced interface, which also grants you SSH access to the router. +After initial setup, when you navigate to the Turris Omnia router, you have a choice between a simple configuration environment or advanced. You have to begin with the simple configuration. In the **Password** panel, you can set a password for the advanced interface, which also grants you SSH access to the router. -The simple interface lets you configure how you connect to the wide-area network (WAN) and set parameters for your local-area network (LAN). It also allows you to set up a personal WiFi access point, a guest network, and install and interact with plugins. +The simple interface lets you configure how you connect to the wide-area network (WAN) and set parameters for your local-area network (LAN). It also allows you to set up a personal WiFi access point, a guest network, and install and interact with plugins. The advanced interface, called LuCI, is exactly what it claims. It's for the network engineer who's familiar with network topography and design, and it's essentially a collection of key and value pairs that you can edit through a simple web interface. If you prefer to edit values directly, you can instead SSH into the router: @@ -53,15 +53,15 @@ root@192.168.1.1's password: BusyBox v1.28.4 () built-in shell (ash) -      ______                _         ____  _____ -     /_  __/_  ____________(_)____   / __ \/ ___/ -      / / / / / / ___/ ___/ / ___/  / / / /\\__ -     / / / /_/ / /  / /  / (__  )  / /_/ /___/ / -    /_/  \\__,_/_/  /_/  /_/____/   \\____//____/   -                                              - ----------------------------------------------------- - TurrisOS 4.0.1, Turris Omnia - ----------------------------------------------------- + ______ _ ____ _____ + /_ __/_ ____________(_)____ / __ \/ ___/ + / / / / / / ___/ ___/ / ___/ / / / /\\__ + / / / /_/ / / / / / (__ ) / /_/ /___/ / + /_/ \\__,_/_/ /_/ /_/____/ \\____//____/ + + ----------------------------------------------------- + TurrisOS 4.0.1, Turris Omnia + ----------------------------------------------------- root@turris:~# ``` @@ -80,7 +80,7 @@ With just a few clicks, you can install your own [Nextcloud][6] server so you ca The best part about this router is that it's open source and supports open source. You can download Turris OS and many related open source tools from their [gitlab.nic.cz][7]. You don't have to settle for the firmware that ships on the device, either. With 2 GB of RAM and miniPCIe slots, you can run Debian on it. Even the LEDs in the front panel are programmable. This is a hacker's router, and whether you're a network engineer or a curious hobbyist, you ought to take a look at it the next time you're in the market for network gear. -You can get the Turris Omnia and several other router models from the [turris.com][8] website, and then join the community at [forum.turris.cz][9]. They're a friendly bunch of enthusiasts, eager to share knowledge, tips, and cool hacks to further what you can do with your open source router. +You can get the Turris Omnia and several other router models from the [turris.com][8] website, and then join the community at [forum.turris.cz][9]. They're a friendly bunch of enthusiasts, eager to share knowledge, tips, and cool hacks to further what you can do with your open source router. -------------------------------------------------------------------------------- From 4e241ba7755ce96e668bf68d535b578c05a691f9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 10 Feb 2022 10:20:35 +0800 Subject: [PATCH 229/334] ATRP @wxy https://linux.cn/article-14258-1.html --- ... Tasks, Build Knowledge Graph, and More.md | 113 +++++++++++++++++ ... Tasks, Build Knowledge Graph, and More.md | 115 ------------------ 2 files changed, 113 insertions(+), 115 deletions(-) create mode 100644 published/20220201 Logseq- A Free - Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More.md delete mode 100644 sources/tech/20220201 Logseq- A Free - Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More.md diff --git a/published/20220201 Logseq- A Free - Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More.md b/published/20220201 Logseq- A Free - Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More.md new file mode 100644 index 0000000000..ed1f551544 --- /dev/null +++ b/published/20220201 Logseq- A Free - Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More.md @@ -0,0 +1,113 @@ +[#]: subject: "Logseq: A Free & Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More" +[#]: via: "https://itsfoss.com/logseq/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14258-1.html" + +Logseq:创建笔记、管理任务、构建知识图谱 +====== + +> Logseq 是一个多功能的知识平台,支持 Markdown 和 Org 模式。你可以创建任务、管理笔记,并利用它们做更多的事情。 + +在信息时代,适当地组织你的思想、任务清单和任何其他与你的工作/个人生活有关的笔记是至关重要的。 + +虽然我们中的一些人选择使用单独的应用程序和服务,但使用一个一体化的、开源的、对隐私友好的应用程序来做这一切不是更好? + +这就是 Logseq 出现的地方。 + +![][1] + +### Logseq:支持 Markdown & Org 模式的隐私友好知识平台 + +Logseq 旨在帮助你组织、创建待办事项清单,并建立一个知识图谱。 + +你可以使用现有的 Markdown 或 Org 模式文件来简单地编辑、编写和保存任何新的笔记。 + +官方称,Logseq 仍处于测试阶段,但自从进入 alpha 阶段以来,它就得到了广泛赞誉。 + +它也可以成为 [黑曜石][2] 的一个不错的开源替代品。默认情况下,它依赖于你的本地目录,但你可以选择任何云目录来通过你的文件系统进行同步。所以,你的数据在你控制之中。 + +如果你没有设置任何云存储,你可以尝试使用 [Rclone][3]、[Insync][4],甚至是 [rsync 命令][5]。 + +![][6] + +Logseq 具备强大的能力,也支持插件来进一步扩展功能。让我强调一些关键的功能来帮助你决定。 + +### Logseq 的功能 + +![][7] + +Logseq 提供了一个知识应用平台的所有基本要素。以下是你可以从它那里得到的东西: + + * Markdown 编辑器 + * 支持 Org 模式文件 + * 反向链接 + * 页面和块引用(链接它们) + * 页面和块嵌入,以添加引文/参考文献 + * 支持添加任务和待办事项清单 + * 能够按优先级或按字母顺序添加任务 + * 发布页面并使用本地主机或 GitHub 页面访问它 + * 支持高级命令 + * 能够从你现有的资源中创建一个模板来重新使用它 + * 页面别名 + * PDF 高亮 + * 创建卡片并快速回顾以记住东西 + * Excalidraw 集成 + * Zotero 集成 + * 通过简单地创建一个 `custom.css` 文件添加一个自定义主题,也有可用的社区制作的文件供快速使用 + * 自定义键盘快捷方式 + * 自我托管 Logseq 的能力 + * 跨平台支持 + +尽管这是一个测试版软件,但在我简短的测试中,它可以如预期的工作。我不是一个资深用户,没有检查它令人印象深刻的知识图谱功能,但如果你有许多 Markdown 笔记,你可以添加它们、链接它们,并看看生成的图谱。 + +我能够添加任务、链接页面、添加引用、嵌入页面,查看现有数据的知识图谱。 + +你可以随时从插件市场上改变主题,并使用插件增加功能,这应该有助于你为你的工作流程提供个性化的体验。 + +![][8] + +我发现它非常容易使用,而且如果你在某个地方卡住了,[文档][9] 很好地解释了一切。 + +### 在 Linux 中安装 Logseq + +你可以在它的 [GitHub 发布区][10] 中找到预发布和测试版本的 AppImage 文件。此外,你也应该在 [Flathub][11] 上找到它的列表。因此,你可以在你选择的任何 Linux 发行版上安装它。 + +如果你需要帮助,你可能想参考我们的 [AppImage][12] 和 [Flatpak 指南][13]来开始。 + +无论哪种情况,你都可以前往它的 [官方网页][14] 了解更多信息。 + +- [Logseq][14] + +你试过 Logseq 了吗?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/logseq/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/logseq.png?resize=800%2C450&ssl=1 +[2]: https://itsfoss.com/obsidian-markdown-editor/ +[3]: https://itsfoss.com/use-onedrive-linux-rclone/ +[4]: https://itsfoss.com/insync-linux-review/ +[5]: https://linuxhandbook.com/rsync-command-examples/ +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/logseq-screenshot.jpg?resize=800%2C602&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/logseq-themes.jpg?resize=800%2C479&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/logseq-screenshot-1.jpg?resize=800%2C603&ssl=1 +[9]: https://logseq.github.io/#/page/Contents +[10]: https://github.com/logseq/logseq/releases +[11]: https://flathub.org/apps/details/com.logseq.Logseq +[12]: https://itsfoss.com/use-appimage-linux/ +[13]: https://itsfoss.com/flatpak-guide/ +[14]: https://logseq.com/ diff --git a/sources/tech/20220201 Logseq- A Free - Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More.md b/sources/tech/20220201 Logseq- A Free - Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More.md deleted file mode 100644 index f8ede06150..0000000000 --- a/sources/tech/20220201 Logseq- A Free - Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More.md +++ /dev/null @@ -1,115 +0,0 @@ -[#]: subject: "Logseq: A Free & Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More" -[#]: via: "https://itsfoss.com/logseq/" -[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Logseq: A Free & Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More -====== - -_**Brief:** Logseq is a versatile knowledge platform with the support for Markdown and Org-mode. You can create tasks, manage notes, and do a lot more things with them._ - -In the age of information, it is crucial to properly organize your thoughts, task list, and any other note related to your work/personal life. - -While some of us choose to use separate applications and services, how about using an all-in-one open-source, privacy-friendly app to do it all? - -That’s where Logseq comes in. - -![][1] - -### Logseq: Privacy-Friendly Knowledge Platform with Markdown & Org-mode Support - -Logseq aims to help you organize, create to-do lists, and build a knowledge graph. - -You can use existing Markdown or org-mode files to simply edit, write, and save any new notes. - -Officially, Logseq is still in the beta testing phase, but it has been getting recommendations since being in the alpha stages. - -Not to forget, it can be a nice open-source alternative to [Obsidian][2] as well. By default, it relies on your local directory, but you can choose any cloud directory to sync via your file system. So, you get to control your data. - -If you haven’t set up any cloud storage, you can try using [Rclone][3], [Insync][4], or [rsync commands][5]. - -![][6] - -Logseq gives powerful abilities and also supports plugins to expand the functionalities further. Let me highlight some of the key features to help you decide. - -### Features of Logseq - -![][7] - -Logseq offers all the essentials for a knowledge app platform. Here’s what you can expect from it: - - * Markdown Editor - * Org-mode File Support - * Backlink - * Page and block references (link between them) - * Page and block embed to add quotes/references - * Support for adding tasks and to-do lists - * Ability to add tasks as per priority or by order A, B, C.. - * Publish pages and access it using localhost or GitHub pages - * Advance commands support - * Ability to create a template from your existing resource to re-use it - * Page alias - * PDF highlights - * Create cards and quickly review them to memorize things - * Excalidraw integration - * Zotero integration - * Add a custom theme by simply creating a custom.css file. There are available community-made files for quick use as well. - * Custom keyboard shortcuts - * Ability to self-host Logseq - * Cross-platform support - - - -Even though it’s beta software, it worked as expected in my brief testing. I’m not an advanced user checking the impressive knowledge graph, but if you have numerous Markdown notes, you can add them, link them, and check the generated graph yourself. - -I was able to add tasks, link pages, add references, embed pages, check the knowledge graph for my existing data. - -You can always change the theme from the marketplace and add functionalities using plugins, and this should help you personalize the experience for your workflow. - -![][8] - -I found it incredibly easy to use, and the [documentation][9] explains everything nicely if you get stuck somewhere. - -### Install Logseq in Linux - -You can find the AppImage file in its [GitHub releases section][10] for pre-releases and beta versions. Additionally, you should also find it listed on [Flathub][11]. So, you can install it on any Linux distribution of your choice. - -If you need help, you might want to refer to our [AppImage][12] and [Flatpak guides][13] to get started. - -In either case, you can head to its [official webpage][14] to know more about it. - -[Logseq][14] - -Have you tried Logseq yet? Let me know your thoughts in the comments down below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/logseq/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/logseq.png?resize=800%2C450&ssl=1 -[2]: https://itsfoss.com/obsidian-markdown-editor/ -[3]: https://itsfoss.com/use-onedrive-linux-rclone/ -[4]: https://itsfoss.com/insync-linux-review/ -[5]: https://linuxhandbook.com/rsync-command-examples/ -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/logseq-screenshot.jpg?resize=800%2C602&ssl=1 -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/logseq-themes.jpg?resize=800%2C479&ssl=1 -[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/logseq-screenshot-1.jpg?resize=800%2C603&ssl=1 -[9]: https://logseq.github.io/#/page/Contents -[10]: https://github.com/logseq/logseq/releases -[11]: https://flathub.org/apps/details/com.logseq.Logseq -[12]: https://itsfoss.com/use-appimage-linux/ -[13]: https://itsfoss.com/flatpak-guide/ -[14]: https://logseq.com/ From 1efd6bb9ce41d0ef4016ad243593d910b670b424 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 10 Feb 2022 11:17:50 +0800 Subject: [PATCH 230/334] ALL @wxy https://linux.cn/article-14259-1.html --- ...ed Breeze Theme and New Overview Effect.md | 119 ++++++++++++++++++ ...ed Breeze Theme and New Overview Effect.md | 117 ----------------- 2 files changed, 119 insertions(+), 117 deletions(-) create mode 100644 published/20220209 KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect.md delete mode 100644 sources/news/20220209 KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect.md diff --git a/published/20220209 KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect.md b/published/20220209 KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect.md new file mode 100644 index 0000000000..d6a85f0354 --- /dev/null +++ b/published/20220209 KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect.md @@ -0,0 +1,119 @@ +[#]: subject: "KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect" +[#]: via: "https://news.itsfoss.com/kde-plasma-5-24-lts-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14259-1.html" + +KDE Plasma 5.24 LTS 发布 +====== + +> KDE Plasma 5.24 带来了更新的 Breeze 主题、新的概览效果、新的墙纸,以及进一步的改进。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/kde-5-24-release.png?w=1200&ssl=1) + +我们已经关注 KDE Plasma 5.24 有一段时间了。 + +从发现 [GNOME 风格的概览效果][1] 到增加 [指纹支持][2]。如果你一直在关注我们的报道,你已经知道了 KDE Plasma 5.24 所带来的变化。 + +现在,KDE Plasma 5.24 稳定版终于来了,让我重点介绍一下主要新增内容和改进。 + +### KDE Plasma 5.24 的新变化 + +![][3] + +KDE Plasma 5.24 是一个长期支持版本,它会不断得到更新,直到 Plasma 5 发布最终版本(并过渡到 Plasma 6)。 + +在这个版本中,你不会看到大幅度的视觉变化,但你可以找到各种功能改进和细微的视觉完善。 + +#### 对 Breeze 主题的更新 + +![][4] + +Breeze 主题得到了一些视觉上的调整,以提高与应用程序的 Breeze 风格的视觉一致性。 + +除此之外,默认的 Breeze 配色方案被重新命名为 “Breeze Classic”,以将其与 “Breeze Light” 和 “Breeze Dark” 颜色主题分开。 + +选择重点颜色的能力最初是在 [KDE Plasma 5.23][5] 中引入的,但现在你也可以为其选择一个自定义的颜色。 + +#### 对通知的改进 + +![来自:PointiestStick 博客][6] + +为了从视觉上区分重要的通知,你会注意到它的边上有一个橙色的条纹,以帮助它们从不太紧急的消息中脱颖而出。 + +此外,为了提高用户体验,如果通知是关于视频/图片的,通知会显示一个内容的缩略图,以给你一个视觉提示。 + +#### 概览效果 + +![][7] + +在 KDE Plasma 5.24 中,你终于可以看到新的“概览Overview”效果了。请注意,这个功能还在测试阶段。 + +它可以让你轻松地浏览多个桌面,而默认是禁用的。你必须前往“系统设置System settings工作区行为Workspace Behavior桌面效果Desktop Effects”,在“窗口管理Window Management”选项下启用它并测试它。 + +![][8] + +你可以按住 `Windows`/`Super` 键,然后按 `W` 键,查看所有活动窗口和虚拟桌面的概况。 + +#### 对“发现”的改进 + +![来自:PointiestStick 博客][9] + +KDE 的软件中心,即“发现Discover”也得到了一些升级,包括防止用户删除重要软件包的能力。它还允许你在更新后自动重新启动。因此,你不必等待更新完成,然后再重新启动你的系统。 + +![][10] + +除此之外,你现在可以打开本地下载的 Flatpak 软件包,并通过“发现”进行安装(软件库也应会自动添加)。 + +#### 锁屏/登录中的指纹识别支持 + +在 Plasma 5.24 中,加入了指纹认证支持。你最多可以添加 10 个指纹,用它们来解锁屏幕或验证一个应用程序内的操作。 + +#### 其他改进 + +Plasma 5.24 还有其他一些变化。你可以通过 [变更日志][11] 了解所有技术细节。 + +一些亮点包括: + + * 对屏幕键盘的改进 + * “Plasma Pass” 密码管理器采用了现代化的设计 + * 在没有电池的电脑上,“电池和亮度”现在变成了只有亮度控制。 + * 对 Krunner 的改进 + * 当你拖放小部件时,它们现在可以平滑地以动画方式移动到最终位置,而不是立即传送到那里。 + * 在“关于这个系统About this System”的页面上有一个新的按钮,可以让你快速访问信息中心。 + * 即使屏幕被关闭或拔掉电源,活动窗口也会留在各自的桌面屏幕上。 + +截至目前,你可以使用 [KDE Neon][12] 尝试 KDE Plasma 5.24,它专注于提供最新、最棒的 KDE 软件包。但请注意,它可能不是其他流行的 Linux 发行版的完整桌面替代品。 + +如果你想在你目前的发行版上使用最新的 KDE Plasma,你得等待它进入默认仓库。 + +你对 KDE Plasma 5.24 有什么看法?你试过了吗?让我在下面的评论中知道你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/kde-plasma-5-24-lts-release/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/kde-plasma-5-24-dev/ +[2]: https://news.itsfoss.com/kde-plasma-5-24-beta/ +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/kde-plasma-5-24-home.jpg?w=1360&ssl=1 +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/kde-plasma-5-24-breeze.png?w=789&ssl=1 +[5]: https://news.itsfoss.com/kde-plasma-5-23-release/ +[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/notifications-kde-plasma-5-24-beta-1.png?w=433&ssl=1 +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/kde-plasma-5-24-overview.png?w=1352&ssl=1 +[8]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/kde-plasma-5-24-overview-option.png?w=1037&ssl=1 +[9]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/cant-remove-plasma-1.png?w=1022&ssl=1 +[10]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/flatpakrepos.png?w=850&ssl=1 +[11]: https://kde.org/announcements/changelogs/plasma/5/5.23.5-5.24.0/ +[12]: https://neon.kde.org/download diff --git a/sources/news/20220209 KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect.md b/sources/news/20220209 KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect.md deleted file mode 100644 index ce4a7b64c6..0000000000 --- a/sources/news/20220209 KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect.md +++ /dev/null @@ -1,117 +0,0 @@ -[#]: subject: "KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect" -[#]: via: "https://news.itsfoss.com/kde-plasma-5-24-lts-release/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect -====== - -We have been keeping an eye on KDE Plasma 5.24 for a while. - -From spotting the [GNOME-Style overview effect][1] to the addition of [fingerprint support][2]. If you have been following our coverages, you already know about the changes introduced with KDE Plasma 5.24. - -Now that KDE Plasma 5.24 stable release is finally here, let me highlight the key additions and improvements below. - -### KDE Plasma 5.24: What’s New? - -![][3] - -KDE Plasma 5.24 is a long-term support release that will receive updates until the final Plasma 5 release (and the transition to Plasma 6). - -With this release, you do not get to see massive visual changes, but you can find various functional improvements and subtle visual refinements. - -#### Updates to the Breeze Theme - -![][4] - -The breeze theme received some visual tweaks to improve the visual consistency with the Breeze style for apps. - -In addition to that, the default Breeze color scheme has been renamed to Breeze Classic to separate it from Breeze Light and Breeze Dark color themes. - -The ability to choose accent colors was originally introduced with [KDE Plasma 5.23][5], but now you can select a custom color as well. - -#### Improvements to Notifications - -![Credits: PointiestStick Blog][6] - -To visually differentiate important notifications, you will notice an orange strip on the side to help them stand out from less urgent messages. - -Furthermore, to enhance the user experience, if the notification is about a video/image, the notification displays a thumbnail of the content to give you a visual cue. - -#### Overview Effect - -![][7] - -With KDE Plasma 5.24, you finally get to witness the new Overview effect. Note that the feature is still in beta testing. - -It lets you easily dabble through multiple desktops and comes disabled out of the box. You will have to head to the **System settings → Workspace Behavior → Desktop Effects** to enable it under **Window Management** options and test it out. - -![][8] - -You can hold down the Windows/Super key and press the W key to see the overview of all your active windows and virtual desktops. - -#### Improvements to Discover - -![Credits: PointiestStick Blog][9] - -The software center for KDE i.e “Discover” also received some upgrade including the ability to prevent users from deleting essential packages. It also lets you automatically restart after an update. So, you do not have to wait for an update to complete, to reboot your system. - -![][10] - -In addition to that, you can now open locally downloaded Flatpak packages and install it via Discover (the repository should be added automatically as well). - -#### Fingerprint Support in Lock Screen/Login - -With Plasma 5.24, fingerprint authentication support has been added. You can add up to 10 fingerprints and use them to unlock the screen or authenticate an action within an app. - -#### Other Improvements - -There are several other changes with Plasma 5.24. You can go through the [changelog][11] for all technical details. - -Some highlights include: - - * On-screen keyboard improvements - * The “Plasma Pass” password manager has a modernized design - * Battery and Brightness now turns into just Brightness controls on computers with no batteries - * Improvements to Krunner - * When you drag-and-drop widgets, they now smoothly animate moving to their final position rather than instantly teleporting there - * A new button on the “About this System” page lets you quickly access the Info Center - * The active windows stay in their respective desktop screens even if the screen was turned off or unplugged. - - - -As of now, you can try KDE Plasma 5.24 using [KDE Neon][12], which focuses on providing the latest and greatest KDE packages. Note that it may not be a complete desktop replacement to other popular Linux distributions. - -If you want the latest KDE Plasma on your current distribution, you will have to wait until it hits the default repositories. - -_What_ _do you think about KDE Plasma 5.24? Have you tried it yet?_ _Let me know your thoughts in the comments below._ - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/kde-plasma-5-24-lts-release/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://news.itsfoss.com/kde-plasma-5-24-dev/ -[2]: https://news.itsfoss.com/kde-plasma-5-24-beta/ -[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ0MCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[5]: https://news.itsfoss.com/kde-plasma-5-23-release/ -[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMwNyIgd2lkdGg9IjQzMyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ0NSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM0MSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM4OSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[10]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUzMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[11]: https://kde.org/announcements/changelogs/plasma/5/5.23.5-5.24.0/ -[12]: https://neon.kde.org/download From 34150161b37e715aa25c82302f8e6b92ee8e06e9 Mon Sep 17 00:00:00 2001 From: imgradeone Date: Thu, 10 Feb 2022 21:06:34 +0800 Subject: [PATCH 231/334] =?UTF-8?q?=E8=AE=A4=E9=A2=86:=20Vivaldi=205.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...roduces Horizontal Scrollable Tabs and a New Reading List.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md b/sources/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md index 5fed5dfd8e..ee2ade07c4 100644 --- a/sources/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md +++ b/sources/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/vivaldi-5-1-release/" [#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "imgradeone" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 353b043725f427a7bef9ab1f4c013ad31581696e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?imgradeone=20-=20=E4=B8=80=E5=B9=B4=E7=BA=A7=E4=B9=88?= =?UTF-8?q?=E4=B9=88=E5=93=92?= Date: Thu, 10 Feb 2022 21:08:41 +0800 Subject: [PATCH 232/334] Pre-Fix --- ...duces Horizontal Scrollable Tabs and a New Reading List.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md b/sources/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md index ee2ade07c4..e47b78129b 100644 --- a/sources/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md +++ b/sources/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md @@ -10,6 +10,8 @@ Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List ====== +> Vivaldi 5.1 looks like an interesting release making it a more useful browser for users dabbling with multiple browsers. + Vivaldi is a pretty good option for Linux users. They focus on Linux as one of the first-party platforms, which is impressive. With [Vivaldi 5.0 release][1], it proved to be a versatile Chromium-based option for many Linux users. Now, Vivaldi 5.1 is finally here! @@ -76,7 +78,7 @@ There are also new additions to the Android version, including the ability to tw If all these new features appeal to you, download Vivaldi 5.1 from its official website. If you are on Debian, Ubuntu, or Fedora, it’s as simple as downloading the appropriate package from Vivaldi’s website. -It also offers AMR packages for 64-bit and 32-bit systems. +It also offers ARM packages for 64-bit and 32-bit systems. [Download Vivaldi][8] From 0f29f36d43c6ca3323621806466ce021120b13f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?imgradeone=20-=20=E4=B8=80=E5=B9=B4=E7=BA=A7=E4=B9=88?= =?UTF-8?q?=E4=B9=88=E5=93=92?= Date: Thu, 10 Feb 2022 22:15:54 +0800 Subject: [PATCH 233/334] finish tl --- ... Scrollable Tabs and a New Reading List.md | 76 +++++++++---------- 1 file changed, 37 insertions(+), 39 deletions(-) diff --git a/sources/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md b/sources/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md index e47b78129b..a9541f3e1b 100644 --- a/sources/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md +++ b/sources/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md @@ -10,83 +10,81 @@ Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List ====== -> Vivaldi 5.1 looks like an interesting release making it a more useful browser for users dabbling with multiple browsers. +> 对于那些接触过多款浏览器的人来说,Vivaldi 5.1 版本更新极富趣味,且更加实用。 -Vivaldi is a pretty good option for Linux users. They focus on Linux as one of the first-party platforms, which is impressive. +Vivaldi 对于 Linux 用户来说是个不错的选择。他们将 Linux 平台作为其官方主力维护平台之一,这一点弥足珍贵。 -With [Vivaldi 5.0 release][1], it proved to be a versatile Chromium-based option for many Linux users. Now, Vivaldi 5.1 is finally here! +在 [Vivaldi 5.0 版本][1] 中,它已经成为许多 Linux 用户喜爱且极具功能性的 Chromium 内核浏览器之选。如今,Vivaldi 5.1 也终于问世! -As a browser popularized by its powerful multitasking functionality, this release should be interesting. +作为一款凭借强大的多任务管理功能而著名的浏览器,这一新版本想必是干货满满。 -Let’s dive in! +接下来就一起深入探索吧! -### New Features In Vivaldi 5.1 +### Vivaldi 5.1 的新功能 ![][2] -Note that Vivaldi is almost an open-source browser with its source code available, except its UI. +还是提醒一下,Vivaldi 是一款几乎开源的浏览器,它的源代码是开放给所有用户的,但用户界面并不开源。 -Just like its previous 5.0 release, this version brings several key improvements, including: +和之前的 5.0 版本类似,该版本带来了一些关键性的改进,包括: - * Scrollable tabs - * New reading list - * New start page quick settings panel + * 可滚动的标签栏 + * 全新的在读清单 + * 新的开始页面快速设置面板 - - -#### Scrollable Tabs +#### 可滚动的标签栏 ![][3] -With Vivaldi 5.1, you do not need to shrink all your tabs necessarily when you have a lot of them. You can simply scroll through the tabs without shrinking them. +在 Vivaldi 5.1 中,你不必再沉没于狭窄而海量的标签之中。你可以直接滚动标签栏,无需缩小标签。 -Considering you have the tab bar on top or bottom, this should let you navigate tabs by scrolling your mouse or using the arrow keys. +考虑到大多数人喜欢把标签栏放到顶部或者底部,这一新功能可以让你直接通过滚轮或者箭头键来寻找标签。 -I’m sure many people will be pleased to hear that this can be combined with Vivaldi’s tab stacking feature, allowing for easier finding of tabs. Yes, you can scroll through tabs on both levels. +我敢相信,许多人听到这个功能能够与标签堆叠功能整合并进一步提高标签查找效率后,一定会很高兴的。是的,两级标签栏均可以使用标签滚动功能。 -This brings Vivaldi’s horizontal tabs up to scratch with its vertical tabs, which have always supported scrolling. +这一新功能使 Vivaldi 的横向标签栏与垂直标签栏有了更高的一致性,后者已经支持滚动许久。 -#### Reading List +#### 在读列表 ![][4] -As reading the news starts to feel like a full-time job, the inclusion of a reading list seems apt. While this has been achieved through browser extensions previously, it is built right into the browser significantly increases its convenience and usefulness. +当阅读新闻这件事开始成为日常事务之后,设置一个在读列表会很有用。在此之前,这一功能是靠浏览器拓展实现的,而如今它已被整合到浏览器当中,大幅增强了便利性和实用性。 -This inclusion seems to be a continuation of Vivaldi’s constant push to add new services to its browser, replacing several common extensions and competing with the likes of Pocket on Firefox. +这一引入看上去更像是 Vivaldi 推动浏览器增添新服务功能的一大延续,不仅取代了一些常见拓展,更试图与 Firefox 的 Pocket 等同类平台进行竞争。 -You can access/add pages to the reading list using keyboard shortcuts or mouse gestures. +你可以直接通过键盘快捷键和鼠标手势来访问相应页面,或添加页面到在读列表中。 -#### Quick Settings For The Start Page +#### 开始页面的快速设置 ![][5] -The start page has always been a key part of web browsing, and users have been customizing it for many years. Unfortunately, this often required diving deep into settings menus to find the necessary options. +开始页面一直都是网页浏览的关键节点,用户多年来也一直在定制它。不幸的是,用户往往要深入到设置页面去寻找自己需要的选项。 -Now, this is set to change thanks to Vivaldi’s new start page quick settings panel. As a result, all the settings related to the start page are in one place, significantly improving the user experience. +如今,得益于 Vivaldi 新增的开始页面快速设置面板,这种情况将成为过去式。现在,所有与开始页面有关的选项都在同一位置,大幅改进了用户体验。 -You can access the quick settings through the gear icon in the top-right corner of the startpage. +你可以通过开始页面右上角的齿轮图标查看快速设置。 -#### Other Changes +#### 其他变更 -In addition to these changes, there are various bug fixes and subtle improvements to improve the translation, mail, calendar, and feed reader. +除了上述改进之外,还有许多 bug 修复,以及针对翻译、邮件、日历和订阅阅读器功能的细节改进。 -You can go through the changelog in the [announcement post][6] to know more about the technical improvements. +你可以阅读 [版本发布公告][6] 来了解更多技术性改进。 -There are also new additions to the Android version, including the ability to tweak tab width and choose more colors. You can read more about it in their [blog post][7]. +Android 版本同样也新增了一些新功能,包括修改标签宽度和选择更多强调色。你可以在这篇 [博文][7] 中了解详情。 -### Getting Vivaldi 5.1 +### 获取 Vivaldi 5.1 -If all these new features appeal to you, download Vivaldi 5.1 from its official website. If you are on Debian, Ubuntu, or Fedora, it’s as simple as downloading the appropriate package from Vivaldi’s website. +如果这些新功能很合你的胃口,您可以前往 Vivaldi 官方网站下载 Vivaldi 5.1。如果你正在使用 Debian、Ubuntu 或者 Fedora,那么很简单,直接从 Vivaldi 官网下载相应软件包就可以了。 -It also offers ARM packages for 64-bit and 32-bit systems. +Vivaldi 同样也提供针对 ARM 架构的 32 位及 64 位软件包。 -[Download Vivaldi][8] +[下载 Vivaldi][8] -For other distros, you will, unfortunately, have to wait for Vivaldi 5.1 to land in your distro’s repositories, considering there’s no Flatpak or Snap package available for it. +对于其他发行版,很不幸,你只能等待 Vivaldi 5.1 降临到发行版的相应仓库中,毕竟它可没有 Flatpak 和 Snap 版本。 -Overall, I think Vivaldi 5.1 is a massive improvement and might convince me to switch. +总的来说,我认为 Vivaldi 5.1 是一次巨大改进,足以让我迁移主力。 -_What do you think about the changes introduced in Vivaldi 5.1? Let us know in the comments below!_ +_你对 Vivaldi 5.1 的更新有什么看法吗?欢迎在评论区留言,让我了解你的想法!_ -------------------------------------------------------------------------------- @@ -94,14 +92,14 @@ via: https://news.itsfoss.com/vivaldi-5-1-release/ 作者:[Jacob Crume][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[imgradeone](https://github.com/imgradeone) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]: https://news.itsfoss.com/author/jacob/ [b]: https://github.com/lujun9972 -[1]: https://news.itsfoss.com/vivaldi-5-0-release/ +[1]: https://linux.cn/article-14044-1.html [2]: https://i0.wp.com/i.ytimg.com/vi/I2PhNDzuTSY/hqdefault.jpg?w=780&ssl=1 [3]: https://i0.wp.com/i.ytimg.com/vi/UeFcUWRpX-0/hqdefault.jpg?w=780&ssl=1 [4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= From 50fca016de04519122e1ae02eb9c368b305c45e1 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 05:02:33 +0800 Subject: [PATCH 234/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220210=20?= =?UTF-8?q?Learn=20Perl=20in=202022?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220210 Learn Perl in 2022.md --- sources/tech/20220210 Learn Perl in 2022.md | 240 ++++++++++++++++++++ 1 file changed, 240 insertions(+) create mode 100644 sources/tech/20220210 Learn Perl in 2022.md diff --git a/sources/tech/20220210 Learn Perl in 2022.md b/sources/tech/20220210 Learn Perl in 2022.md new file mode 100644 index 0000000000..43f61ba1ee --- /dev/null +++ b/sources/tech/20220210 Learn Perl in 2022.md @@ -0,0 +1,240 @@ +[#]: subject: "Learn Perl in 2022" +[#]: via: "https://opensource.com/article/22/2/perl-cheat-sheet" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Learn Perl in 2022 +====== +Download the programming cheat sheet and start learning the powers of +Perl. +![Woman sitting in front of her computer][1] + +Released in early 1988, Perl is a postmodern programming language often considered a scripting language, but it is also capable of object-oriented programming. It is a mature language with [tens of thousands of libraries][2], GUI frameworks, a spin-off language called Raku, and an active and passionate community. Its developers pride themselves on its flexibility: According to its creator Larry Wall, Perl doesn't enforce any particular programming style on its users, and there's more than one way to accomplish most things. + +Perl is every bit as robust as it was when it was in widespread use, making it a great language for newer programmers to try. + +**[ Download the [Perl cheat sheet][3] ]** + +### Perl basics + +On Linux and macOS, you already have Perl installed. On Windows, download and install it from the [Perl website][4]. + +#### Perl expressions + +The basic unit of Perl source code is an _expression_, which is anything that returns a _value_. + +For instance, `1` is an expression. It returns the value of `1`. The expression `2` returns the value of `2`, and `a` returns the letter `a`. + +Expressions can be more complex. The expression `$a + $b` contains variables (placeholders for data) and the plus symbol (`+`), which is a math operator. + +#### Perl statements + +A Perl statement is made up of expressions. Each statement ends in a semi-colon (`;`). + +For example: + + +``` +`$c = $a + $b;` +``` + +To try running your own Perl statement, open a terminal and type: + + +``` +`$ perl -e 'print ("Hello Perl\n");'` +``` + +#### Perl blocks + +A block of Perl statements can be grouped together with braces (`{ }`). Blocks are a useful organizational tool, but they also provide _scope_ for data that you may only need to use for a small section of your program. Python defines scope with whitespace, LISP uses parentheses, while C and Java use braces. + +#### Variables + +Variables are placeholders for data. Humans use variables every day without thinking about it. For instance, the word "it" can refer to any noun, so we use it as a convenient placeholder. "Find my phone and bring it to me" really means "Find my phone and bring my phone to me." + +For computers, variables aren't a convenience but a necessity. Variables are how computers identify and track data. + +In Perl, you create variables by declaring a variable name and then its contents. + +Variable names in Perl are always preceded by a dollar sign (`$`). + +These simple statements create a variable `$var` containing the strings "Hello" and "Perl" and then prints the contents of the variable to your terminal: + + +``` +`$ perl -e '$var = "hello perl"; print ("$var\n");'` +``` + +#### Flow control + +Most programs require a decision to be made, and those choices are defined and controlled by conditional statements and loops. The _if_ statement is one of the most intuitive: Perl can test for a specific condition, and Perl decides how the program proceeds based on that condition. The syntax is similar to C or Java: + + +``` + + +my $var = 1; + +if($var == 1){ +  [print][5]("Hello Perl\n"); +} +elsif($var == 0){ +  [print][5]("1 not found"); +} +else{ +  [print][5]("Good-bye"); +} + +``` + +Perl also features a short form of the `if` statement: + + +``` + + +$var = 1; + +[print][5]("Hello Perl\n") if($var == 1); + +``` + +#### Functions and subroutines + +Reusing code as often as possible is a helpful programming habit. This practice reduces errors (or consolidates errors into one code block, so you only have to fix it once), makes your program easier to maintain, simplifies your program's logic, and makes it easier for other developers to understand. + +In Perl, you can create a _subroutine_ that takes inputs (stored in a special array variable called `@_`) and may return an output. You create a subroutine using the keyword `sub`, followed by a subroutine name of your choosing, and then the code block: + + +``` + + +#!/usr/bin/env perl + +use strict; +use warnings; + +sub sum { +  my $total = 0; + +  for my $i(@_){ +    $total += $i; +  } + +  [return][6]($total); +} + +[print][5] &sum(1,2), "\n"; + +``` + +Of course, Perl has many subroutines you never have to create yourself. Some are built into Perl, and community libraries provide others. + +### Scripting with Perl + +Perl can be compiled, or it can be used as an interpreted scripting language. The latter is the easiest option when just starting, especially if you're already familiar with Python or [shell scripting][7]. + +Here's a simple dice-roller script written in Perl. Read it through and see if you can follow it. + + +``` + + +#!/usr/bin/env perl + +use warnings; +use strict; +use utf8; +[binmode][8] STDOUT, ":encoding(UTF-8)"; +[binmode][8] STDERR, ":encoding(UTF-8)"; + +my $sides = [shift][9] or +  [die][10] "\nYou must provide a number of sides for the dice.\n"; + +sub roller { +    my ($s) = @_; + +    my $roll = [int][11]([rand][12]($s)); +    [print][5] $roll+1, "\n"; +} + +roller($sides); + +``` + +The first line tells your [POSIX][13] terminal what executable to use to run the script. + +The next five lines are boilerplate includes and settings. The `use warnings` setting tells Perl to check for errors and issue warnings in the terminal about problems it finds. The `use strict` setting tells Perl not to run the script when errors are found. + +Both of these settings help you find errors in your code before they cause problems, so it's usually best to have them active in your scripts. + +The main part of the script begins by parsing the [argument][14] provided to the script when it is launched from a terminal. In this case, the expected argument is the desired side of a virtual die. Perl treats this as a stack and uses the `shift` function to assign it to the variable `$sides`. The `die` function gets triggered when no arguments are provided. + +The `roller` subroutine or function, created with the `sub` keyword, uses the `rand` function of Perl to generate a pseudo-random number up to, and not including, the number provided as an argument. That means that a 6-sided die in this program can never roll a 6, but it can roll a 0. That's fine for computers and programmers, but to most users, that's confusing, so it can be considered a bug. To fix that bug before it becomes a problem, the next line adds 1 to the random number and prints the total as the die-roll result. + +When referencing an argument passed to a subroutine, you reference the special variable `@_`, which is an array containing everything included in parentheses as part of the function call. However, when extracting a value from an array, the data is cast as a scalar (the `$s` variable in the example). + +A subroutine doesn't run until it's called, so the final line of the script invokes the custom `roller` function, providing the command's argument as the function's argument. + +Save the file as `dice.pl` and mark it executable: + + +``` +`$ chmod +x dice.pl` +``` + +Finally, try running it, providing it with a maximum number from which to choose its random number: + + +``` + + +$ ./dice.pl 20 +1 +$ ./dice.lisp 20 +7 +$ ./dice.lisp 20 +20 + +``` + +Not bad! + +### Perl cheat sheet + +Perl is a fun and powerful language. Although up-and-coming languages like Python, Ruby, and Go have caught many people's attention since Perl was the default scripting language, Perl is no less robust. In fact, it's better than ever, with a bright future ahead. + +Next time you're looking for a more flexible language with easy delivery options, try Perl and [download the cheat sheet][3]! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/perl-cheat-sheet + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_2.png?itok=JPlR5aCA (Woman sitting in front of her computer) +[2]: http://cpan.org/ +[3]: https://opensource.com/downloads/perl-cheat-sheet +[4]: https://www.perl.org/get.html +[5]: http://perldoc.perl.org/functions/print.html +[6]: http://perldoc.perl.org/functions/return.html +[7]: https://opensource.com/article/20/4/bash-programming-guide +[8]: http://perldoc.perl.org/functions/binmode.html +[9]: http://perldoc.perl.org/functions/shift.html +[10]: http://perldoc.perl.org/functions/die.html +[11]: http://perldoc.perl.org/functions/int.html +[12]: http://perldoc.perl.org/functions/rand.html +[13]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[14]: https://opensource.com/article/21/8/linux-terminal From 8a8ee5f7c90b3767a2f1ea234187a4ca12758861 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 11 Feb 2022 08:57:02 +0800 Subject: [PATCH 235/334] translated --- ...stomize your shell prompt with Starship.md | 122 ------------------ ...stomize your shell prompt with Starship.md | 121 +++++++++++++++++ 2 files changed, 121 insertions(+), 122 deletions(-) delete mode 100644 sources/tech/20220207 Customize your shell prompt with Starship.md create mode 100644 translated/tech/20220207 Customize your shell prompt with Starship.md diff --git a/sources/tech/20220207 Customize your shell prompt with Starship.md b/sources/tech/20220207 Customize your shell prompt with Starship.md deleted file mode 100644 index 2760bb5c24..0000000000 --- a/sources/tech/20220207 Customize your shell prompt with Starship.md +++ /dev/null @@ -1,122 +0,0 @@ -[#]: subject: "Customize your shell prompt with Starship" -[#]: via: "https://opensource.com/article/22/2/customize-prompt-starship" -[#]: author: "Moshe Zadka https://opensource.com/users/moshez" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Customize your shell prompt with Starship -====== -Take control of your prompt, and have all the information you need at -your fingertips. -![Cosmic stars in outer space][1] - -Nothing irritates me more than when I forget to `git add` files in my Git repository. I test locally, commit, and push, only to find out it failed in the continuous integration phase. Even worse is when I'm on the `main` branch instead of a feature branch and accidentally push to it. The best-case scenario is that it fails because of branch protection, and I need to do some surgery to get the changes to a branch. Even more worse, I did not configure branch protection properly, and I accidentally pushed it directly to `main`. - -Wouldn't it be nice if the information was available right in the prompt? - -There is even more information that is useful in the prompt. While the name of Python virtual environments is in the prompt, the Python version the virtual environment has is not. - -It is possible to carefully configure the `PS1` environment variable to all relevant information. This can get long, annoying, and non-trivial to debug. - -This is the problem that Starship got designed to solve. - -### Install Starship - -The initial setup for Starship only requires two steps: Installing and configuring your shell to use it. Installation can be as simple as: - - -``` -`$ curl -fsSL https://starship.rs/install.sh` -``` - -Read over the install script to make sure you understand what it does, and then make it executable and run it: - - -``` - - -$ chmod +x install.sh -$ ./install.sh - -``` - -There are other ways to install, covered on the website. You can develop virtual machines or containers at the image-building step. - -### Configuring Starship - -The next step is to configure your shell to use it. To try it as a one-off, assuming the shell is `bash` or `zsh`, run the following: - - -``` -`$ eval "$(starship init $(basename $SHELL))"` -``` - -Your prompt changes immediately: - - -``` - - -localhost in myproject on  master -> - -``` - -If you like what you see, add `eval "$(starship init $(basename $SHELL))"` to your shell's `rc` file to make it permanent. - -### Customizing Starship - -The default installation assumes that you can install a "Nerd font," such as [Fantasque Sans Mono][2]. You want, particularly, a font with glyphs from Unicode's "private implementation" section. - -This works great when controlling the terminal, but sometimes, the terminal is not easy to configure. For example, when using some in-browser shell abstraction, configuring the browser font can be non-trivial. - -The biggest user of the code points is the Git integration, which uses a special custom symbol for "branch." Disabling it can be done by configuring `starship.rs` using the file `~/.config/starship.toml`. - -Disabling the branch symbol is done by configuring the `git_branch` section's `format` variable: - - -``` - - -[git_branch] -format = "on [$branch]($style) " - -``` - -One of the nice things about `starship.rs` is that changing the configuration has an immediate effect. Save the file, press **Enter**, and see if the font looks as intended. - -It's also possible to configure the color of different sections in the prompt. For example, if the Python section's bright yellow is a bit harder to see on a white background, you can configure blue: - - -``` - - -[python] -style = "blue bold" - -``` - -There is configuration support for many languages, including Go, .NET, and JavaScript. There is also support for showing command duration (only for commands which take longer than a threshold) and more. - -### Take the con - -Take control of your prompt, and have all the information you need at your fingertips. Install Starship, make it work for you, and enjoy! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/2/customize-prompt-starship - -作者:[Moshe Zadka][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/moshez -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/space_stars_cosmic.jpg?itok=bE94WtN- (Cosmic stars in outer space) -[2]: https://github.com/belluzj/fantasque-sans diff --git a/translated/tech/20220207 Customize your shell prompt with Starship.md b/translated/tech/20220207 Customize your shell prompt with Starship.md new file mode 100644 index 0000000000..9691c70a0d --- /dev/null +++ b/translated/tech/20220207 Customize your shell prompt with Starship.md @@ -0,0 +1,121 @@ +[#]: subject: "Customize your shell prompt with Starship" +[#]: via: "https://opensource.com/article/22/2/customize-prompt-starship" +[#]: author: "Moshe Zadka https://opensource.com/users/moshez" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +用 Starship 定制你的 shell 提示符 +====== +控制你的提示符,让你需要的所有信息触手可及。 +![Cosmic stars in outer space][1] + +没有什么比我忘记在我的 Git 仓库中 `git add` 文件更让我恼火的了。我在本地测试,提交,然后推送,却发现在持续集成阶段失败了。更糟糕的是,我在 `main` 分支而不是特性分支上,并不小心推送到它。最好的情况是,因为分支保护而失败,我需要做一些操作才能把改动推送到一个分支。更糟糕的是,我没有正确配置分支保护,不小心直接推送到了 `main`。 + +如果这些信息能在提示中直接获得,那不是很好吗? + +在提示符中甚至还有更多有用的信息。虽然 Python 虚拟环境的名称在提示符中,但虚拟环境的 Python 版本却不在提示符中。 + +可以仔细地将 `PS1` 环境变量配置为所有相关的信息。这可能会变得很长,很烦人,而且调试起来并不简单。 + +这就是 Starship 被设计来解决的问题。 + +### 安装 Starship + +Starship 的初始设置只需要两个步骤:安装和配置你的 shell。安装可以很简单: + + +``` +`$ curl -fsSL https://starship.rs/install.sh` +``` + +阅读安装脚本,确保你理解它的作用,然后让它可执行并运行它: + + +``` + + +$ chmod +x install.sh +$ ./install.sh + +``` + +还有其他的安装方法,在网站上有介绍。你可以在构建镜像的步骤中设置虚拟机或容器。 + +### 配置 Starship + +下一步是配置你的 shell 来使用它。要一次性尝试,假设 shell 是 `bash` 或 `zsh`,请运行以下命令: + + +``` +`$ eval "$(starship init $(basename $SHELL))"` +``` + +你的提提示符立即改变: + + +``` + + +localhost in myproject on  master +> + +``` + +如果你喜欢你所看到的,把 `eval "$(starship init $(basename $SHELL))"` 添加到你的 shell 的 `rc` 文件中,使其永久化。 + +### 自定义 Starship + +默认安装假定你可以安装“书呆子字体”,例如 [Fantasque Sans Mono][2]。 特别是,你需要一种带有来自 Unicode 的“私有实现”部分的字形的字体。 + +这在控制终端时非常有效,但有时,终端的配置并不容易。例如,当使用一些浏览器内的 shell 抽象时,配置浏览器的字体可能是不太容易的。 + +码位的最大用户是 Git 集成,它使用一个特殊的自定义符号来表示“分支”。禁用它可以通过使用文件 `~/.config/starship.toml` 来配置 `starship.rs`。 + +禁用分支符号是通过配置 `git_branch` 部分的 `format` 变量完成的: + + +``` + + +[git_branch] +format = "on [$branch]($style) " + +``` + +`starship.rs` 的一个好处是,改变配置会立即生效。保存文件,按下**回车**,看看字体是否符合预期。 + +还可以配置提示符中不同部分的颜色。例如,如果 Python 部分的亮黄色在白色背景上有点难看,你可以配置为蓝色: + + +``` + + +[python] +style = "blue bold" + +``` + +许多语言都有配置支持,包括 Go、.NET 和 JavaScript。还支持显示命令的持续时间(只针对耗时超过阈值的命令)等。 + +### 控制提示符 + +控制你的提示符,让你需要的所有信息触手可及。安装 Starship,让它为你工作,并享受吧! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/customize-prompt-starship + +作者:[Moshe Zadka][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/moshez +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/space_stars_cosmic.jpg?itok=bE94WtN- (Cosmic stars in outer space) +[2]: https://github.com/belluzj/fantasque-sans From 069498deb78bfc956b58bc5e5d694c079e2ad88b Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 11 Feb 2022 09:04:25 +0800 Subject: [PATCH 236/334] translating --- ...bleshooting -Unacceptable TLS certificate- Error in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220210 Troubleshooting -Unacceptable TLS certificate- Error in Linux.md b/sources/tech/20220210 Troubleshooting -Unacceptable TLS certificate- Error in Linux.md index 9ee92b96ae..2aceef7d42 100644 --- a/sources/tech/20220210 Troubleshooting -Unacceptable TLS certificate- Error in Linux.md +++ b/sources/tech/20220210 Troubleshooting -Unacceptable TLS certificate- Error in Linux.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/unacceptable-tls-certificate-error-linux/" [#]: author: "Ankush Das https://itsfoss.com/author/ankush/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 6b09b2a2650f660f5fc5b85274f3fcba8befa9e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?imgradeone=20-=20=E4=B8=80=E5=B9=B4=E7=BA=A7=E4=B9=88?= =?UTF-8?q?=E4=B9=88=E5=93=92?= Date: Fri, 11 Feb 2022 09:15:53 +0800 Subject: [PATCH 237/334] move file --- ...ntroduces Horizontal Scrollable Tabs and a New Reading List.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md (100%) diff --git a/sources/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md b/translated/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md similarity index 100% rename from sources/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md rename to translated/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md From 34f027a6b91e3bbae96ff826766b24330f316b69 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 11 Feb 2022 10:16:16 +0800 Subject: [PATCH 238/334] RP @geekpi https://linux.cn/article-14261-1.html --- ...28 Sharing the computer screen in Gnome.md | 187 ++++++++++++++ ...28 Sharing the computer screen in Gnome.md | 235 ------------------ 2 files changed, 187 insertions(+), 235 deletions(-) create mode 100644 published/20220128 Sharing the computer screen in Gnome.md delete mode 100644 translated/tech/20220128 Sharing the computer screen in Gnome.md diff --git a/published/20220128 Sharing the computer screen in Gnome.md b/published/20220128 Sharing the computer screen in Gnome.md new file mode 100644 index 0000000000..d5cf879081 --- /dev/null +++ b/published/20220128 Sharing the computer screen in Gnome.md @@ -0,0 +1,187 @@ +[#]: subject: "Sharing the computer screen in Gnome" +[#]: via: "https://fedoramagazine.org/sharing-the-computer-screen-in-gnome/" +[#]: author: "Lukáš Růžička https://fedoramagazine.org/author/lruzicka/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14261-1.html" + +在 Gnome 中共享电脑屏幕 +====== + +![](https://img.linux.net.cn/data/attachment/album/202202/11/101112soc722i55ut7r6nq.jpg) + +你不希望别人能够监视甚至控制你的电脑,你通常会努力使用各种安全机制来切断任何此类企图。然而,有时会出现这样的情况:你迫切需要一个朋友,或一个专家来帮助你解决电脑问题,但他们并不同时在同一地点。你如何向他们展示呢?你应该拿着你的手机,拍下你的屏幕照片,然后发给他们吗?你应该录制一个视频吗?当然不是。你可以与他们分享你的屏幕,并可能让他们远程控制你的电脑一段时间。在这篇文章中,我将介绍如何在 Gnome 中允许共享电脑屏幕。 + +### 设置服务器以共享屏幕 + +**服务器** 是一台提供(服务)一些内容的计算机,其他计算机(**客户端**)将消费这些内容。在本文中,服务器运行的是 **Fedora Workstation** 和标准的 **Gnome 桌面**。 + +#### 打开 Gnome 屏幕共享 + +默认情况下,Gnome 中共享计算机屏幕的功能是 **关闭** 的。要使用它,你需要把它打开: + +1. 启动 Gnome 控制中心Gnome Control Center。 +2. 点击 共享Sharing 标签。 + ![Sharing switched off][2] +3. 用右上角的滑块打开共享。 +4. 单击 屏幕共享Screen sharing。 + ![Sharing switched on][3] +5. 用窗口左上角的滑块打开屏幕共享。 +6. 如果你希望能够从客户端控制屏幕,请勾选 允许连接控制屏幕Allow connections to control the screen。不勾选这个按钮访问共享屏幕只允许 仅浏览view-only。 +7. 如果你想手动确认所有传入的连接,请选择 新连接必须请求访问New connections must ask for access。 +8. 如果你想允许知道密码的人连接(你不会被通知),选择 需要密码Require a password 并填写密码。密码的长度只能是 8 个字符。 +9. 勾选 显示密码Show password 以查看当前的密码是什么。为了多一点保护,不要在这里使用你的登录密码,而是选择一个不同的密码。 +10. 如果你有多个网络可用,你可以选择在哪个网络上访问该屏幕。 + +### 设置客户端以显示远程屏幕 + +**客户端** 是一台连接到由服务器提供的服务(或内容)的计算机。本演示还将在客户端上运行 **Fedora Workstation**,但如果它运行一个 VNC 客户端,操作系统实际上应该不太重要。 + +#### 检查可见性 + +在 Gnome 中,服务器和客户端之间共享计算机屏幕需要一个有效的网络连接,以及它们之间可见的“路由”。如果你不能建立这样的连接,你将无法查看或控制服务器的共享屏幕,这里描述的整个过程将无法工作。 + +为了确保连接的存在,找出服务器的 IP 地址。 + +启动 Gnome 控制中心Gnome Control Center,又称 设置Settings。使用右上角的**菜单**,或**活动**模式。当在**活动**中时,输入: + +``` +settings +``` + +并点击相应的图标。 + +选择 网络Network 标签。 + +点击**设置按钮**(齿轮)以显示你的网络配置文件的参数。 + +打开 详情Details标签,查看你的计算机的 IP 地址。 + +进入 **你的客户端的** 终端(你想从它连接到别的计算机),使用 `ping` 命令找出客户和服务器之间是否有连接。 + +``` +$ ping -c 5 192.168.122.225 +``` + +检查该命令的输出。如果它与下面的例子相似,说明计算机之间的连接存在。 + +``` +PING 192.168.122.225 (192.168.122.225) 56(84) bytes of data. +64 bytes from 192.168.122.225: icmp_seq=1 ttl=64 time=0.383 ms +64 bytes from 192.168.122.225: icmp_seq=2 ttl=64 time=0.357 ms +64 bytes from 192.168.122.225: icmp_seq=3 ttl=64 time=0.322 ms +64 bytes from 192.168.122.225: icmp_seq=4 ttl=64 time=0.371 ms +64 bytes from 192.168.122.225: icmp_seq=5 ttl=64 time=0.319 ms +--- 192.168.122.225 ping statistics --- +5 packets transmitted, 5 received, 0% packet loss, time 4083ms +rtt min/avg/max/mdev = 0.319/0.350/0.383/0.025 ms +``` + +如果两台计算机存在同一个子网中,例如在你的家里或办公室,你可能不会遇到任何问题,但当你的服务器没有**公共 IP 地址**,无法从外部互联网上看到时,可能会出现问题。除非你是互联网接入点的唯一管理员,否则你可能需要就你的情况向你的管理员或你的 ISP 咨询。请注意,将你的计算机暴露在外部互联网上始终是一个有风险的策略,你**必须充分注意**保护你的计算机免受不必要的访问。 + +#### 安装 VNC 客户端(Remmina) + +Remmina 是一个图形化的远程桌面客户端,你可以使用多种协议连接到远程服务器,如 VNC、Spice 或 RDP。Remmina 可以从 Fedora 仓库中获得,所以你可以用 `dnf` 命令或 软件中心Software 来安装它,以你喜欢的方式为准。使用 `dnf`,下面的命令将安装该软件包和几个依赖项。 + +``` +$ sudo dnf install remmina +``` + +#### 连接到服务器 + +如果服务器和客户端之间有连接,请确保以下情况: + +1. 计算机正在运行。 +2. Gnome 会话正在运行。 +3. 启用了屏幕共享的用户已经登录。 +4. 会话 **没有被锁定**,也就是说,用户可以使用该会话。 + +然后你可以尝试从客户端连接到该会话: + +1. 启动 **Remmina**。 +2. 在地址栏左侧的下拉菜单中选择 **VNC** 协议。 +3. 在地址栏中输入服务器的IP地址,然后按下 **回车**。 + ![Remmina Window][4] +4. 当连接开始时,会打开另一个连接窗口。根据服务器的设置,你可能需要等待,直到服务器用户允许连接,或者你可能需要提供密码。 +5. 输入密码,然后按 **OK**。 +![Remmina Connected to Server][5] +6. 按下 ![Align with resolution button][6] 调整连接窗口的大小,使之与服务器的分辨率一致,或者按 ![Full Screen Button][8] 调整连接窗口的大小,使其覆盖整个桌面。当处于全屏模式时,注意屏幕上边缘的白色窄条。那是 Remmina 菜单,当你需要离开全屏模式或改变一些设置时,你可以把鼠标移到它上面。 + +当你回到服务器时,你会注意到现在在上栏有一个黄色的图标,这表明你正在 Gnome 中共享电脑屏幕。如果你不再希望共享屏幕,你可以进入菜单,点击 屏幕正在被共享Screen is being shared,然后再选择 关闭Turn off,立即停止共享屏幕。 + +![Turn off menu item][9] + +#### 会话锁定时终止屏幕共享 + +默认情况下,当会话锁定时,连接 将总是终止will always terminate。在会话被解锁之前,不能建立新的连接。 + +一方面,这听起来很合理。如果你想和别人分享你的屏幕,你可能不想让他们在你不在的时候使用你的电脑。另一方面,如果你想从远程位置控制你自己的电脑,无论是你在另一个房间的床上,还是你岳母的地方,同样的方法也不是很有用。有两个选项可以处理这个问题。你可以完全禁止锁定屏幕,或者使用支持通过 VNC 连接解锁会话的 Gnome 扩展。 + +##### 禁用屏幕锁定 + +要禁用屏幕锁定: + +1. 打开 Gnome 控制中心Gnome Control Center。 +2. 点击 隐私Privacy标签。 +3. 选择 屏幕锁定Screen Lock 设置。 +4. 关掉 自动屏幕锁定Automatic Screen Lock。 + +现在,会话将永远不会被锁定(除非你手动锁定),所以它能启动一个 VNC 连接到它。 + +##### 使用 Gnome 扩展来允许远程解锁会话 + +如果你不想关闭锁定屏幕的功能,或者你想有一个远程解锁会话的选项,即使它被锁定,你将需要安装一个提供这种功能的扩展,因为这种行为是默认不允许的。 + +要安装该扩展: + +1. 打开**火狐浏览器**,并打开 [Gnome 扩展页面][10]。 + ![Gnome Extensions Page][11] +2. 在页面的上部,找到一个信息块,告诉你为火狐安装 “GNOME Shell integration”。 +3. 点击 点此安装浏览器扩展Click here to install browser extension 来安装 Firefox 扩展。 +4. 安装完毕后,注意到 Firefox 的菜单部分有 Gnome 的标志。 +5. 点击 Gnome 标志,回到扩展页面。 +6. 搜索 “allow locked remote desktop”。 +7. 点击显示的项目,进入该扩展的页面。 +8. 使用右边的**开/关**按钮,将扩展**打开**。 + ![Extension selected][12] + +现在,可以在任何时候启动 VNC 连接。注意,你需要知道会话密码以解锁会话。如果你的 VNC 密码与会话密码不同,你的会话仍然受到 _一点_ 保护。 + +### 总结 + +这篇文章介绍了在 Gnome 中实现共享计算机屏幕的方法。它提到了受限(_仅浏览_)访问和非受限(_完全_)访问之间的区别。然而,对于正式任务的远程访问,例如管理一个生产服务器,这个解决方案无论如何都不算是一个正确的方法。为什么? + + 1. 服务器将始终保持其**控制模式**。任何在服务器会话中的人都将能够控制鼠标和键盘。 + 2. 如果会话被锁定,从客户端解锁也会在服务器上解锁。它也会把显示器从待机模式中唤醒。任何能看到你的服务器屏幕的人都能看到你此刻正在做什么。 + 3. VNC 协议本身没有加密或保护,所以你通过它发送的任何东西都可能被泄露。 + +你几种可以建立一个受保护的 VNC 连接的方法。例如,你可以通过 SSH 协议建立隧道,以提高安全性。然而,这些都超出了本文的范围。 + +**免责声明**:上述工作流程在 Fedora 35 上使用几个虚拟机工作时没有问题。如果它对你不起作用,那么你可能遇到了一个错误。请报告它。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/sharing-the-computer-screen-in-gnome/ + +作者:[Lukáš Růžička][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/lruzicka/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2022/01/sharing_screen-816x345.jpg +[2]: https://fedoramagazine.org/wp-content/uploads/2022/01/settings_sharing_off.png +[3]: https://fedoramagazine.org/wp-content/uploads/2022/01/settings_sharing_on.png +[4]: https://fedoramagazine.org/wp-content/uploads/2022/01/remmina.png +[5]: https://fedoramagazine.org/wp-content/uploads/2022/01/remmina_connected_client.png +[6]: https://fedoramagazine.org/wp-content/uploads/2022/01/resolution.png +[8]: https://fedoramagazine.org/wp-content/uploads/2022/01/full_screen.png +[9]: https://fedoramagazine.org/wp-content/uploads/2022/01/turn_off_connection.png +[10]: https://extensions.gnome.org +[11]: https://fedoramagazine.org/wp-content/uploads/2022/01/extensions.png +[12]: https://fedoramagazine.org/wp-content/uploads/2022/01/switch_on_extension.png diff --git a/translated/tech/20220128 Sharing the computer screen in Gnome.md b/translated/tech/20220128 Sharing the computer screen in Gnome.md deleted file mode 100644 index b2e88724af..0000000000 --- a/translated/tech/20220128 Sharing the computer screen in Gnome.md +++ /dev/null @@ -1,235 +0,0 @@ -[#]: subject: "Sharing the computer screen in Gnome" -[#]: via: "https://fedoramagazine.org/sharing-the-computer-screen-in-gnome/" -[#]: author: "Lukáš Růžička https://fedoramagazine.org/author/lruzicka/" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -在 Gnome 中共享电脑屏幕 -====== - -![][1] - -你不希望别人能够监视甚至控制你的电脑,你通常会努力使用各种安全机制来切断任何此类企图。然而,有时会出现这样的情况:你迫切需要一个朋友,或一个专家来帮助你解决电脑问题,但他们不在同一时间的同一地点。你如何向他们展示呢?你应该拿着你的手机,拍下你的屏幕照片,然后发给他们吗?你应该录制一个视频吗?当然不是。你可以与他们分享你的屏幕,并可能让他们远程控制你的电脑一段时间。在这篇文章中,我将介绍如何在 Gnome 中允许共享电脑屏幕。 - -### 设置服务器以共享屏幕 - -**服务器**是一台提供(服务)一些内容的计算机,其他计算机(客户端)将消费这些内容。在本文中,服务器运行的是 **Fedora Workstation** 和标准的 **Gnome 桌面**。 - -#### 打开 Gnome 屏幕共享 - -默认情况下,Gnome 中共享计算机屏幕的功能是**关闭**的。要使用它,你需要把它打开: - - 1. 启动 **Gnome 控制中心**。 - - 2. 点击**共享**标签。 - -![Sharing switched off][2] - - 3. 用右上角的滑块打开共享。 - - 4. 单击**屏幕共享**。 - -![Sharing switched on][3] - - 5. 用窗口左上角的滑块打开屏幕共享。 - - 6. 如果你希望能够从客户端控制屏幕,请勾选_允许连接控制屏幕_。不勾选这个按钮访问共享屏幕只允许_仅浏览_。 - - 7. 如果你想手动确认所有传入的连接,请选择_新连接必须请求访问_。 - - 8. 如果你想允许知道密码的人连接(你不会被通知),选择_需要密码_并填写密码。密码的长度只能是 8 个字符。 - - 9. 勾选_显示密码_以查看当前的密码是什么。为了多一点保护,不要在这里使用你的登录密码,而是选择一个不同的密码。 - - 10. 如果你有多个网络可用,你可以选择在哪个网络上访问该屏幕。 - - - - -### 设置客户端以显示远程屏幕 - -**客户端**是一台连接到由服务器提供的服务(或内容)的计算机。本演示还将在客户端上运行 **Fedora Workstation**,但如果它运行一个 VNC 客户端,操作系统实际上应该不太重要。 - -#### 检查可见性 - -在 Gnome 中,服务器和客户端之间共享计算机屏幕需要一个有效的网络连接,以及它们之间可见的“路由”。如果你不能建立这样的连接,你将无法查看或控制服务器的共享屏幕,这里描述的整个过程将无法工作。 - -为了确保连接的存在,找出服务器的 IP 地址。 - -Start **Gnome Control Center**, a.k.a **Settings**. Use the **Menu** in the upper right corner, or the **Activities** mode. When in **Activities**, type -启动 **Gnome 控制中心**,又称**设置**。使用右上角的**菜单**,或**活动**模式。当在**活动**中时,输入: - -settings - -并点击相应的图标。 - -选择**网络**标签。 - -点击**设置按钮**(齿轮)以显示你的网络配置文件的参数。 - -打开**详情**标签,查看你的计算机的 IP 地址。 - -Go to **your client’s** terminal (the computer from which you want to connect) and find out if there is a connection between the client and the server using the **ping** command. -进入**你的客户端的**终端(你想连接的计算机),使用 **ping** 命令找出客户和服务器之间是否有连接。 - -``` - - $ ping -c 5 192.168.122.225 - -``` - -检查该命令的输出。如果它与下面的例子相似,说明计算机之间的连接存在。 - -``` - - PING 192.168.122.225 (192.168.122.225) 56(84) bytes of data. - 64 bytes from 192.168.122.225: icmp_seq=1 ttl=64 time=0.383 ms - 64 bytes from 192.168.122.225: icmp_seq=2 ttl=64 time=0.357 ms - 64 bytes from 192.168.122.225: icmp_seq=3 ttl=64 time=0.322 ms - 64 bytes from 192.168.122.225: icmp_seq=4 ttl=64 time=0.371 ms - 64 bytes from 192.168.122.225: icmp_seq=5 ttl=64 time=0.319 ms - --- 192.168.122.225 ping statistics --- - 5 packets transmitted, 5 received, 0% packet loss, time 4083ms - rtt min/avg/max/mdev = 0.319/0.350/0.383/0.025 ms - -``` - -如果两台计算机生活在同一个子网中,例如在你的家里或办公室,你可能不会遇到任何问题,但当你的服务器没有**公共IP地址**,无法从外部互联网上看到时,可能会出现问题。除非你是互联网接入点的唯一管理员,否则你可能需要就你的情况向你的管理员或你的 ISP 咨询。请注意,将你的计算机暴露在外部互联网上始终是一个有风险的策略,你**必须充分注意**保护你的计算机免受不必要的访问。 - -#### 安装 VNC 客户端(Remmina) - -**Remmina** 是一个图形化的远程桌面客户端,你可以使用多种协议连接到远程服务器,如 VNC、Spice 或 RDP。**Remmina** 可以从 Fedora 仓库中获得,所以你可以用 **dnf** 命令或**软件中心**来安装它,以你喜欢的方式为准。使用 dnf,下面的命令将安装该软件包和几个依赖项。 - -``` - - $ sudo dnf install remmina - -``` - -#### 连接到服务器 - -如果服务器和客户端之间有连接,请确保以下情况为没错: - - 1. 计算机正在运行。 - 2. Gnome 会话正在运行。 - 3. 启用了屏幕共享的用户已经登录。 - 4. 会话**没有被锁定**,也就是说,用户可以使用会话。 - - - -然后你可以尝试从客户端连接到该会话: - - 1. 启动 **Remmina**. - - 2. 在地址栏左侧的下拉菜单中选择 **VNC** 协议。 - - 3. 在地址栏中输入服务器的IP地址,然后按下**回车**。 - -![Remmina Window][4] - - 4. 当连接开始时,会打开另一个连接窗口。根据服务器的设置,你可能需要等待,直到服务器用户允许连接,或者你可能需要提供密码。 - - 5. 输入密码,然后按 **OK**。 - -![Remmina Connected to Server][5] - - 6. 按下 ![Align with resolution button][6] 调整连接窗口的大小,使之与服务器的分辨率一致,或者按 ![Full Screen Button][8] 调整连接窗口的大小,使其覆盖整个桌面。当处于全屏模式时,注意屏幕上边缘的白色窄条。那是 Remmina 菜单,当你需要离开全屏模式或改变一些设置时,你可以把鼠标移到它上面。 - - - - -当你回到服务器时,你会注意到现在在上栏有一个黄色的图标,这表明你正在 Gnome 中共享电脑屏幕。如果你不再希望共享屏幕,你可以进入菜单,点击**屏幕正在被共享**,然后在选择**关闭**,立即停止共享屏幕。 - -![Turn off menu item][9] - -#### 会话锁定时终止屏幕共享 - -默认情况下,当会话锁定时,连接**将始终终止**。在会话被解锁之前,不能建立新的连接。 - -一方面,这听起来很合理。如果你想和别人分享你的屏幕,你可能不想让他们在你不在的时候使用你的电脑。另一方面,如果你想从远程位置控制你自己的电脑,无论是你在另一个房间的床上,还是你岳母的地方,同样的方法也不是很有用。有两个选项可以处理这个问题。你可以完全禁止锁定屏幕,或者使用支持通过 VNC 连接解锁会话的 Gnome 扩展。 - -##### 禁用屏幕锁 - -要禁用屏幕锁: - - 1. 打开 **Gnome 控制中心**。 - 2. 点击**隐私**标签。 - 3. 选择**屏幕锁定**设置。 - 4. 关掉**自动屏幕锁定**。 - - - -现在,会话将永远不会被锁定(除非你手动锁定),所以它将有可能启动一个 VNC 连接到它。 - -##### 使用 Gnome 扩展来允许远程解锁会话 - -如果你不想关闭锁定屏幕的功能,或者你想有一个远程解锁会话的选项,即使它被锁定,你将需要安装一个提供这种功能的扩展,因为这种行为是默认不允许的。 - -要安装该扩展: - - 1. 打开**火狐浏览器**,并打开 [Gnome 扩展页面][10]。 - -![][7]![Gnome Extensions Page][11] - - 2. 在页面的上部,找到一个信息块,告诉你为火狐安装 _GNOME Shell integration_。 - - 3. 点击 _Click here to install browser extension_ 来安装 Firefox 扩展。 - - 4. 安装完毕后,注意到 Firefox 的菜单部分有 Gnome 的标志。 - - 5. 点击 Gnome 标志,回到扩展页面。 - - 6. 搜索 _allow locked remote desktop_。 - - 7. 点击显示的项目,进入该扩展的页面。 - - 8. 使用右边的**开/关**按钮,将扩展**打开** - -![Extension selected][12] - - - - -现在,可以在任何时候启动 VNC 连接。注意,你需要知道会话密码以解锁会话。如果你的 VNC 密码与会话密码不同,你的会话仍然受到_一点_保护。 - -### 总结 - -这篇文章介绍了在 Gnome 中实现共享计算机屏幕的方法。它提到了受限(_仅浏览_)访问和非受限(_完全_)访问之间的区别。然而,这个解决方案在任何情况下都不应该被认为是一个正确的方法,以实现对严肃任务的远程访问,例如管理一个生产服务器。为什么? - - 1. 服务器将始终保持其**控制模式**。任何在服务器会话中的人都将能够控制鼠标和键盘。 - 2. 如果会话被锁定,从客户端解锁也会在服务器上解锁。它也会把显示器从待机模式中唤醒。任何能看到你的服务器屏幕的人都能看到你此刻正在做什么。 - 3. VNC 协议本身没有加密或保护,所以你通过它发送的任何东西都可能被泄露。 - - - -你几种可以建立一个受保护的 VNC 连接的方法。例如,你可以通过 SSH 协议建立隧道,以提高安全性。然而,这些都超出了本文的范围。 - -**免责声明**:上述工作流程在 Fedora 35 上使用几个虚拟机工作时没有问题。如果它对你不起作用,那么你可能遇到了一个错误。请报告它。 - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/sharing-the-computer-screen-in-gnome/ - -作者:[Lukáš Růžička][a] -选题:[lujun9972][b] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://fedoramagazine.org/author/lruzicka/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2022/01/sharing_screen-816x345.jpg -[2]: https://fedoramagazine.org/wp-content/uploads/2022/01/settings_sharing_off.png -[3]: https://fedoramagazine.org/wp-content/uploads/2022/01/settings_sharing_on.png -[4]: https://fedoramagazine.org/wp-content/uploads/2022/01/remmina.png -[5]: https://fedoramagazine.org/wp-content/uploads/2022/01/remmina_connected_client.png -[6]: https://fedoramagazine.org/wp-content/uploads/2022/01/resolution.png -[8]: https://fedoramagazine.org/wp-content/uploads/2022/01/full_screen.png -[9]: https://fedoramagazine.org/wp-content/uploads/2022/01/turn_off_connection.png -[10]: https://extensions.gnome.org -[11]: https://fedoramagazine.org/wp-content/uploads/2022/01/extensions.png -[12]: https://fedoramagazine.org/wp-content/uploads/2022/01/switch_on_extension.png From 08257b99cf716cec0f4ec84043883abb12a0dfa1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 11 Feb 2022 16:19:55 +0800 Subject: [PATCH 239/334] RP @imgradeone https://linux.cn/article-14262-1.html --- ... Scrollable Tabs and a New Reading List.md | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) rename {translated/news => published}/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md (79%) diff --git a/translated/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md b/published/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md similarity index 79% rename from translated/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md rename to published/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md index a9541f3e1b..f724873355 100644 --- a/translated/news/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md +++ b/published/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md @@ -3,14 +3,16 @@ [#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" [#]: collector: "lujun9972" [#]: translator: "imgradeone" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14262-1.html" -Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List +Vivaldi 5.1 发布:引入可横向滚动的标签和在读清单 ====== -> 对于那些接触过多款浏览器的人来说,Vivaldi 5.1 版本更新极富趣味,且更加实用。 +> 对于那些涉足多款浏览器的人来说,Vivaldi 5.1 版本更新极富趣味,且更加实用。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/vivaldi-5-1.png?w=1200&ssl=1) Vivaldi 对于 Linux 用户来说是个不错的选择。他们将 Linux 平台作为其官方主力维护平台之一,这一点弥足珍贵。 @@ -22,7 +24,7 @@ Vivaldi 对于 Linux 用户来说是个不错的选择。他们将 Linux 平台 ### Vivaldi 5.1 的新功能 -![][2] +[![][2]](https://youtu.be/I2PhNDzuTSY) 还是提醒一下,Vivaldi 是一款几乎开源的浏览器,它的源代码是开放给所有用户的,但用户界面并不开源。 @@ -34,7 +36,7 @@ Vivaldi 对于 Linux 用户来说是个不错的选择。他们将 Linux 平台 #### 可滚动的标签栏 -![][3] +[![][3]](https://youtu.be/UeFcUWRpX-0) 在 Vivaldi 5.1 中,你不必再沉没于狭窄而海量的标签之中。你可以直接滚动标签栏,无需缩小标签。 @@ -50,7 +52,7 @@ Vivaldi 对于 Linux 用户来说是个不错的选择。他们将 Linux 平台 当阅读新闻这件事开始成为日常事务之后,设置一个在读列表会很有用。在此之前,这一功能是靠浏览器拓展实现的,而如今它已被整合到浏览器当中,大幅增强了便利性和实用性。 -这一引入看上去更像是 Vivaldi 推动浏览器增添新服务功能的一大延续,不仅取代了一些常见拓展,更试图与 Firefox 的 Pocket 等同类平台进行竞争。 +这一引入看上去更像是 Vivaldi 推动为其浏览器增添新服务功能的一大延续,不仅取代了一些常见拓展,更试图与 Firefox 的 Pocket 等同类平台进行竞争。 你可以直接通过键盘快捷键和鼠标手势来访问相应页面,或添加页面到在读列表中。 @@ -74,17 +76,17 @@ Android 版本同样也新增了一些新功能,包括修改标签宽度和选 ### 获取 Vivaldi 5.1 -如果这些新功能很合你的胃口,您可以前往 Vivaldi 官方网站下载 Vivaldi 5.1。如果你正在使用 Debian、Ubuntu 或者 Fedora,那么很简单,直接从 Vivaldi 官网下载相应软件包就可以了。 +如果这些新功能很合你的胃口,你可以前往 Vivaldi 官方网站下载 Vivaldi 5.1。如果你正在使用 Debian、Ubuntu 或者 Fedora,那么很简单,直接从 Vivaldi 官网下载相应软件包就可以了。 Vivaldi 同样也提供针对 ARM 架构的 32 位及 64 位软件包。 -[下载 Vivaldi][8] +- [下载 Vivaldi][8] 对于其他发行版,很不幸,你只能等待 Vivaldi 5.1 降临到发行版的相应仓库中,毕竟它可没有 Flatpak 和 Snap 版本。 总的来说,我认为 Vivaldi 5.1 是一次巨大改进,足以让我迁移主力。 -_你对 Vivaldi 5.1 的更新有什么看法吗?欢迎在评论区留言,让我了解你的想法!_ +你对 Vivaldi 5.1 的更新有什么看法吗?欢迎在评论区留言,让我了解你的想法! -------------------------------------------------------------------------------- @@ -93,7 +95,7 @@ via: https://news.itsfoss.com/vivaldi-5-1-release/ 作者:[Jacob Crume][a] 选题:[lujun9972][b] 译者:[imgradeone](https://github.com/imgradeone) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -102,8 +104,8 @@ via: https://news.itsfoss.com/vivaldi-5-1-release/ [1]: https://linux.cn/article-14044-1.html [2]: https://i0.wp.com/i.ytimg.com/vi/I2PhNDzuTSY/hqdefault.jpg?w=780&ssl=1 [3]: https://i0.wp.com/i.ytimg.com/vi/UeFcUWRpX-0/hqdefault.jpg?w=780&ssl=1 -[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQwNSIgd2lkdGg9IjcyMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/Vivaldi-5.1-reading-list.png?resize=1568%2C882&ssl=1 +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/Vivaldi-5.1-quick-settings.png?w=720&ssl=1 [6]: https://vivaldi.com/blog/vivaldi-5-1-gets-scrollable-tabs-reading-list/ [7]: https://vivaldi.com/blog/vivaldi-5-1-on-android/ [8]: https://vivaldi.com/download/ From e8f58d63b1c44f245c1849f6bebf1eaebb46778e Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 21:20:06 +0800 Subject: [PATCH 240/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211229=20?= =?UTF-8?q?Run=20Distrobox=20on=20Fedora=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211229 Run Distrobox on Fedora Linux.md --- .../20211229 Run Distrobox on Fedora Linux.md | 390 ++++++++++++++++++ 1 file changed, 390 insertions(+) create mode 100644 sources/tech/20211229 Run Distrobox on Fedora Linux.md diff --git a/sources/tech/20211229 Run Distrobox on Fedora Linux.md b/sources/tech/20211229 Run Distrobox on Fedora Linux.md new file mode 100644 index 0000000000..6531a2800d --- /dev/null +++ b/sources/tech/20211229 Run Distrobox on Fedora Linux.md @@ -0,0 +1,390 @@ +[#]: subject: "Run Distrobox on Fedora Linux" +[#]: via: "https://fedoramagazine.org/run-distrobox-on-fedora-linux/" +[#]: author: "Luca Di Maio https://fedoramagazine.org/author/89luca89/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Run Distrobox on Fedora Linux +====== + +![][1] + +Fedora Linux, openSUSE Tumbleweed, Arch Linux and Debian containers with neofetch; Fedora logo; and Distrobox logo + +Distrobox is a tool that allows you to create and manage container-based development environments without root privileges. + +Distrobox can use either **podman** or **docker** to create containers using the Linux distribution of your choice. + +The created container will be tightly integrated with the host, allowing sharing of the HOME directory of the user, external storage, external USB devices, graphical apps (X11/Wayland), and audio. + +As a project, it is inspired by Container Toolbx (all the props to them!), but it aims to have broader compatibility with hosts and containers, without having to require a dedicated image to use in Distrobox. + +It is divided into 4 parts: + + * **distrobox-create** – creates the container + * **distrobox-enter** – to enter the container + * **distrobox-init** – it’s the entrypoint of the container (not meant to be used manually) + * **distrobox-export** – it is meant to be used inside the container, useful to export apps and services from the container to the host + + + +Today we will take a look on how to use it in Fedora (Workstation and Silverblue/Kinoite) to have diverse environments based on multiple Linux distributions, right in your terminal. + +### Why would you want to use Distrobox + +Using containers for development environments in the terminal is already greatly tackled by the Container Toolbx project, but you may sometimes have the necessity of a specific Linux distribution, or to export an application or a service from inside to the container, back to the host. + +Generally speaking, it is a tool that resolves some problems like: + + * Provide a mutable environment on an immutable OS, like Endless OS, Fedora Silverblue, OpenSUSE MicroOS or SteamOS3 + * Provide a locally privileged environment for sudoless setups (eg. company-provided laptops, security reasons, etc…) + * To mix and match a stable base system (eg. Debian Stable, Ubuntu LTS, Red Hat) with a bleeding-edge environment for development or gaming (eg. Arch or OpenSUSE Tumbleweed or Fedora with latest Mesa) + * Leverage high abundance of curated distro images for docker/podman to manage multiple environments + + + +#### How does it differ from Toolbx? + +Distrobox aims to maintain a broad compatibility with distributions both on the host side and on the container side by using the official distribution’s OCI images for the containers. It supports all the major distributions and it maintains a curated table of supported and tested container images. + +### Installation + +Installing Distrobox is quite straightforward, you can simply use the following command: + +``` + + curl https://raw.githubusercontent.com/89luca89/distrobox/main/install | sudo sh + +``` + +Or if you do not want (or cannot) use sudo, you can install it without root permissions: + +``` + + curl https://raw.githubusercontent.com/89luca89/distrobox/main/install | sh -s -- -p ~/.local/bin/ + +``` + +It is also available from copr: + +``` + + sudo dnf copr enable alciregi/distrobox + sudo dnf install distrobox + +``` + +Distrobox depends on either _podman_ or _docker_ to work. We will today explore the **podman** route. +On Silverblue/Kinoite you’re already good to go, on Workstation or a Spin you need to install podman, so run: + +``` + + sudo dnf install podman + +``` + +###  Getting started + +To start using Distrobox, you can simply type: + +``` + + luca-linux@x250:~$ distrobox-create + +``` + +to create your first container. By default, it uses _fedora-toolbox 35_ image. +You can specify a custom name and image by passing the flags: + +``` + + luca-linux@x250:~$ distrobox-create --name ubuntu-20 --image ubuntu:20.04 + +``` + +The above command will create a distrobox based on the plain OCI image of **Ubuntu 20**. +You can use a diverse ecosystem of distributions from various registries. For example, we may want to use even more bleeding edge software from **AUR**: + +``` + + luca-linux@x250:~$ distrobox-create --name arch-distrobox --image archlinux:latest + +``` + +Or we want to use an old application  that only supports Debian 8: + +``` + + luca-linux@x250:~$ distrobox-create --name debian8-distrobox --image debian:8 + +``` + +In case the container image is not present on the host, you’ll be prompted to download it during the distrobox creation. +After the creation is done you can simply + +``` + + luca-linux@x250:~$ distrobox-enter --name arch-distrobox + +``` + +To enter the container and start playing around. + +![Arch Linux distrobox][2] + +### Playing around in the container + +Now that we’re inside our distrobox, we can proceed to customize it as much as we want, for example we can install that nice package that’s only in AUR: + +![Installing the atom package inside the Arch Linux distrobox][3] + +Now we can simply launch our application to use as a normal application: + +![Running Atom from the Arch Linux distrobox][4] + +### Exporting from the container to the host + +In case we installed something that we use a lot from inside the distrobox, we can export it back to the host to use it more easily, without having to launch them every time from the terminal. + +We can use **distrobox-export** to export our app back to the host, for example: + +``` + + luca-linux@x250:~$ distrobox-enter --name arch-distrobox + luca-linux@arch-distrobox:~$ distrobox-export --app atom + +``` + +Will result in: + +![][5] + +Now the application behaves and appear as a normally installed graphical application, with also icons, themes and fonts integration with the host. + +But we can export also simple **binaries** and **systemd services**. + +Say you want to install Syncthing from Ubuntu’s repositories on your Fedora Silverblue system. Simply run: + +``` + + luca-linux@x250:~$ distrobox-enter --name ubuntu-21 + luca-linux@ubuntu-21:~$ sudo apt install syncthing + +``` + +Now export syncthing’s service from the container back to the host by running: + +``` + + luca-linux@ubuntu-21:~$ distrobox-export --service syncthing@ --extra-flags + Service ubuntu-21-syncthing@.service successfully exported. + OK + ubuntu-21-syncthing@.service will appear in your services list in a few seconds. + To check the status, run: + systemctl --user status ubuntu-21-syncthing@.service + To start it, run: + systemctl --user start ubuntu-21-syncthing@.service + To start it at login, run: + systemctl --user enable ubuntu-21-syncthing@.service + +``` + +Now back on the host you can run: + +``` + + luca-linux@x250:~$ systemctl --user enable --now ubuntu-21-syncthing@$USER + +``` + +And you’re good to go: + +``` + + luca-linux@x250:~$ systemctl --user status ubuntu-21-syncthing@luca-linux + ● ubuntu-21-syncthing@luca-linux.service - Syncthing - Open Source Continuous File Synchronization for luca.di.maio + Loaded: loaded (/home/luca-linux/.config/systemd/user/ubuntu-21-syncthing@.service; enabled; vendor preset: enabled) + Active: active (running) since Wed 2021-12-22 18:10:56 CET; 1 day 2h ago + Docs: man:syncthing(1) + Main PID: 1210423 (distrobox-enter) + CGroup: /user.slice/user-1000.slice/user@1000.service/ubuntu\x2d22\x2dsyncthing.slice/ubuntu-21-syncthing@luca-linux.service + ├─1210423 /bin/sh /home/luca-linux/.local/bin/distrobox-enter -H -n ubuntu-21 -- /usr/bin/syncthing -no-browser -no-restart -logflags=0 -allow-newer-config + └─1210445 podman --remote exec --user=luca-linux --workdir=/home/luca-linux [...] + [....] + +``` + +#### Installing an old or unavailable application + +What if you need specifically an old application on your new system? You really need that good old deb from 2014 and there is no Flatpak available? You can resort to Distrobox: + +``` + + luca-linux@x250:~$ distrobox-create --name old-ubuntu --image ubuntu:14. + luca-linux@x250:~$ distrobox-enter --name old- + luca-linux@old-ubuntu:~$ sudo dpkg -i ./that-old-program. + luca-linux@old-ubuntu:~$ distrobox-export --app that-old-program + luca-linux@old-ubuntu:~$ distrobox-export --bin /usr/bin/that-old-program --export-path ~/.local/bin + +``` + +Now you have your vintage environment and install that old deb package you have found online without messing around with _alien_, old _glibc_, or littering your main operating system. + +This is also handy for apps that are not rpm-packaged and do not offer a Flatpak. + +#### Exiting a distrobox + +At any time you can exit the distrobox by simply using _exit_, or pressing Ctrl+D: + +``` + + luca-linux@x250:~$ hostname + x250 + luca-linux@x250:~$ distrobox-enter + luca-linux@fedora-toolbox-35:~$ hostname + fedora-toolbox-35 + luca-linux@fedora-toolbox-35:~$ exit + logout + luca-linux@x250:~$ + +``` + +### Executing commands directly into a distrobox + +You can specify custom commands to execute in the distrobox instead of the shell. +For example: + +``` + + luca-linux@x250:~$ distrobox-enter --name fedora-toolbox-35 -- sudo dnf update -y + Fedora 35 - x86_64 1.4 MB/s | 79 MB 00:56 + Fedora 35 openh264 (From Cisco) - x86_64 2.0 kB/s | 2.5 kB 00:01 + Fedora Modular 35 - x86_ 1.3 MB/s | 3.3 MB 00:02 + Fedora 35 - x86_64 - Updates 2.3 MB/s | 17 MB 00:07 + Fedora Modular 35 - x86_64 - Updates 1.2 MB/s | 2.8 MB 00:02 + Dependencies resolved. + [...] + +``` + +This could be useful in scripts, and it’s used by the **distrobox-export** utility to integrate the container exports with the host. + +### Tips and Tricks + +As you may have noticed reading this article, different Linux distributions are supported by distrobox for its containers. + You can find a complete list here in the project’s page: + + It supports all the major distributions from old to super-new versions like + + * Debian – from 8 to current unstable (and all the derivates) + * Ubuntu – from 14.04 to 22.04 + * Centos/Red Hat/Alma Linux/Rocky Linux/Amazon Linux – from 7 to 8 and stream 8 and 9 + * Fedora (tested 30 to 35) + * Archlinux + * Alpine Linux + * Slackware + * Void + * Kali Linux (if you want your pentesting stuff on Silverblue) + + + +This gives you the flexibility to use any type of software inside any distribution of your choice. + +##### Duplicating an existing distrobox + +It comes handy to also have the ability to duplicate your existing distrobox. This is useful during for example distrobox updates, or to rename a distrobox, or simply snapshot it and save the image. + +``` + + luca-linux@x250:~$ distrobox-create --name cloned-arch --clone arch-distrobox + luca-linux@x250:~$ distrobox-enter --name cloned-arch + luca-linux@cloned-arch:~$ + +``` + +##### Backup and restore a distrobox + +To save, export and reuse an already configured container, you can leverage _podman save_ together with _podman import_ to create snapshots of your environment. + +To save a container to an image with podman: + +``` + + podman container commit -p distrobox_name image_name_you_choose + podman save image_name_you_choose:latest | gzip >image_name_you_choose.tar.gz + +``` + +This will create a tar.gz of the container of your choice at that exact moment. +Now you can backup that archive or transfer it to another host, and to restore it just run + +``` + + podman import image_name_you_choose.tar.gz + +``` + +And create a new container based on that image: + +``` + + distrobox-create --image image_name_you_choose:latest --name distrobox_name + distrobox-enter --name distrobox_name + +``` + +And you’re good to go, now you can reproduce your personal environment everywhere in simple (and scriptable) steps. + +##### Managing your distroboxes + +To manage your running containers, you can simply use your container manager of choice: + +``` + + luca-linux@x250:~$ podman ps -a + CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES + 3bd26417ec22 /ubuntu:21.10 /usr/bin/entrypoi... 2 days ago Up 2 days ago ubuntu-21 + 36101d9e2d17 archlinux:latest /usr/bin/entrypoi... 3 hours ago Up 3 hours ago arch-distrobox + +``` + + You can delete an existing distrobox using + +``` + + podman stop your_distrobox_name + podman rm your_distrobox_name + +``` + +You can read more about Podman [in this Magazine Article][6]. + +### Conclusion + +In conclusion, distrobox can be a handy tool both on Fedora Workstation and on Silverblue/Kinoite, allowing both backward and forward compatibility with software and freedom to use whatever distribution you’re more comfortable with. + +The project is still in active development, so any type of contribution and [reporting bugs][7] is welcome. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/run-distrobox-on-fedora-linux/ + +作者:[Luca Di Maio][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/89luca89/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2021/12/Run-Distrobox-on-Fedora-Linux-816x345.jpg +[2]: https://fedoramagazine.org/wp-content/uploads/2021/12/image-3.png +[3]: https://fedoramagazine.org/wp-content/uploads/2021/12/image-2.png +[4]: https://fedoramagazine.org/wp-content/uploads/2021/12/image-5.png +[5]: https://fedoramagazine.org/wp-content/uploads/2021/12/image-6.png +[6]: https://fedoramagazine.org/running-containers-with-podman/ +[7]: https://github.com/89luca89/distrobox/issues From 3fcf47c982f92803995e8adc3de6a1a6d881f48d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 21:20:42 +0800 Subject: [PATCH 241/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211222=20?= =?UTF-8?q?An=20introduction=20to=20Fedora=20Flatpaks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211222 An introduction to Fedora Flatpaks.md --- ...1222 An introduction to Fedora Flatpaks.md | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 sources/tech/20211222 An introduction to Fedora Flatpaks.md diff --git a/sources/tech/20211222 An introduction to Fedora Flatpaks.md b/sources/tech/20211222 An introduction to Fedora Flatpaks.md new file mode 100644 index 0000000000..ea5b6f75a2 --- /dev/null +++ b/sources/tech/20211222 An introduction to Fedora Flatpaks.md @@ -0,0 +1,123 @@ +[#]: subject: "An introduction to Fedora Flatpaks" +[#]: via: "https://fedoramagazine.org/an-introduction-to-fedora-flatpaks/" +[#]: author: "TheEvilSkeleton https://fedoramagazine.org/author/theevilskeleton/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +An introduction to Fedora Flatpaks +====== + +![][1] + +Fedora Linux 35 Background; Fedora logo; and Flatpak logo by [Matthias Clasen][2], [CC BY-SA 4.0][3], via Wikimedia Commons + +Flatpak is a distribution agnostic universal package manager leveraging [bubblewrap][4] to separate applications from the system, and [OSTree][5] to manage applications. There are multiple Flatpak repositories (remotes in Flatpak terminology), such as [Flathub][6] (the de-facto standard), [GNOME Nightly][7], [KDE][8] and finally Fedora Flatpaks, Fedora Project’s Flatpak remote. + +This article explains the motivation behind Fedora Flatpaks, how to add the remote, how to use it and where to find resources. + +### What is Fedora Flatpaks? + +Fedora Flatpaks is a Flatpak remote by the Fedora Project for Fedora Linux. However, thanks to the universality of Flatpak, most other distributions can utilize it without a problem. Fedora Flatpaks builds from existing Fedora packages to ensure that everything remains free and open source and complies with Fedora’s standards. + +Technically speaking, Fedora Flatpaks reuses existing RPMs from the Fedora Linux repositories and converts them to Flatpak applications using several tools. + +### Adding the Fedora Flatpaks remote + +On Fedora Linux, Fedora Flatpaks is already added and ready to go. + +If you are using a distribution other than Fedora Linux, then you will have to manually add the desired remotes. At the moment, there are two different remotes: the stable remote for stable applications and the testing remote for testing applications. To add the stable remote, run the following command: + +``` + + flatpak remote-add --if-not-exists fedora oci+https://registry.fedoraproject.org + +``` + +To add the testing remote, run the following command: + +``` + + flatpak remote-add --if-not-exists fedora-testing oci+https://registry.fedoraproject.org#testing + +``` + +These commands may need elevated privileges, thus needing an administrator password. If you do not have access to root or an administrator password, then you can still add the remote by using the --user flag to add per-user. If you have used --user, then you will have to use it in the later examples too. + +### Using Fedora Flatpaks + +#### Software center + +Flatpak is built with the Linux desktop in mind. Application stores such as GNOME Software have the ability to install and remove Flatpak applications after you add a Flatpak remote, making it easy to manage applications. + +On GNOME Software, visiting an application’s page and pressing on the _Source_ button at the top right hand side opens the list of available of sources. By default, on Fedora Linux, GNOME Software selects _Fedora Linux (RPM)_. _Fedora Linux (Flatpak)_, provided by Fedora Flatpaks, is available as an available source, but is not used by default. Simply select it, and then press on the “Install” button. + +For example, to install Firefox from Fedora Flatpaks, head over to the Firefox page on GNOME Software. Then, press on the _Source_ button at the top right hand side. Once the menu pops up, press _Fedora Linux (Flatpak)_. Lastly, press _Install_. Here is a visual example: + +![Firefox on GNOME Software, with Fedora Linux \(RPM\) as the default option and Fedora Linux \(Flatpak\) as the second option][9] + +![Fedora Linux \(Flatpak\) source ticked][10] + +Afterwards, GNOME Software will install Firefox on your system. You can use the application launcher to launch Firefox, just like any application. + +To remove the application, simply press on the trash button next to the blue _Open_ button in GNOME Software. + +#### Command-line interface + +Flatpak uses standard package management terminologies when it comes to commands. Some examples include: + +``` + + # Installing a package + flatpak install fedora $APPLICATION + # Removing a package + flatpak remove $APPLICATION + # Updating packages + flatpak update + +``` + +Substitute $APPLICATIONS with the desired application. Firefox for example is _org.mozilla.firefox_, or _firefox_ for short. For more information on the commands, refer to the [Using Flatpak documentation][11]. + +### Finding resources + +#### Source code + +For curious people, source codes of container and Flatpak manifests are available on the _flatpaks_ namespace at [src.fedoraproject.org/flatpaks][12]. + +#### Filing a bug + +Experiencing a bug with an application? Consider filing an bug! The Fedora Project treats applications from Fedora Flatpaks the same as their RPM counterparts, therefore the process of filing bugs for specific apps is the same as filing a bug for any package on Fedora Linux. To file an bug, head over to [docs.fedoraproject.org][13] and carefully read the instructions. + +### Conclusion + +In conclusion, Fedora Flatpaks is a remote by the Fedora Project wherein Fedora Linux packages are converted to Flatpak. The vast majority of applications are free and open source. They are tested and verified by the Fedora Project. On Fedora Linux, the Fedora Project includes Fedora Flatpaks for you. On other distributions, you can easily add the remote by simply running a command. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/an-introduction-to-fedora-flatpaks/ + +作者:[TheEvilSkeleton][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/theevilskeleton/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2021/12/An-introduction-to-Fedora-Flatpaks-816x345.jpg +[2]: https://commons.wikimedia.org/wiki/File:Flatpak_logo.png +[3]: https://creativecommons.org/licenses/by-sa/4.0 +[4]: https://github.com/containers/bubblewrap +[5]: https://ostreedev.github.io/ostree/ +[6]: https://flathub.org/home +[7]: https://wiki.gnome.org/Apps/Nightly +[8]: https://community.kde.org/Guidelines_and_HOWTOs/Flatpak#Applications +[9]: https://fedoramagazine.org/wp-content/uploads/2021/12/gnome-software1-1024x697.png +[10]: https://fedoramagazine.org/wp-content/uploads/2021/12/gnome-software2.png +[11]: https://docs.flatpak.org/en/latest/using-flatpak.html +[12]: https://src.fedoraproject.org/projects/flatpaks/%2A +[13]: https://docs.fedoraproject.org/en-US/quick-docs/howto-file-a-bug/ From 72b8da1d3e0121afdd0e7b8ecca27c1545841a45 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 21:30:11 +0800 Subject: [PATCH 242/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220211=20?= =?UTF-8?q?Tame=20your=20text=20with=20Perl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220211 Tame your text with Perl.md --- .../tech/20220211 Tame your text with Perl.md | 316 ++++++++++++++++++ 1 file changed, 316 insertions(+) create mode 100644 sources/tech/20220211 Tame your text with Perl.md diff --git a/sources/tech/20220211 Tame your text with Perl.md b/sources/tech/20220211 Tame your text with Perl.md new file mode 100644 index 0000000000..cab7317180 --- /dev/null +++ b/sources/tech/20220211 Tame your text with Perl.md @@ -0,0 +1,316 @@ +[#]: subject: "Tame your text with Perl" +[#]: via: "https://opensource.com/article/22/2/text-based-code-perl" +[#]: author: "Hunter Coleman https://opensource.com/users/hunterc" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Tame your text with Perl +====== +Use regular expressions to speed up your text-based coding tasks. +![Person using a laptop][1] + +Although its popularity has been tempered by languages like Python, Lua, and Go, Perl was one of the primary utilitarian languages on Unix and Linux for 30 years. It remains an important and powerful component in many open source systems today. If you haven't used Perl much, then you may be surprised by how helpful it can be for many tasks. This is especially true if you deal with large amounts of text in your day-to-day work. + +If you need a language that allows you to search and manipulate large volumes of text quickly and easily, Perl is tough to beat. In fact, doing exactly that is what Larry Walls originally built the language for. + +If you're brand new to Perl, you can read this [quick Perl intro][2] to get a feel for the basics. + +### Searching text with regex + +To get started, here's an example of a simple regular expression (sometimes shortened to "regex") script. + +Suppose you have a list of names in a file called `names.txt`: + + +``` + + +Steve Smith +Jane Murphy +Bobby Jones +Elizabeth Arnold +Michelle Swanson + +``` + +You want to pull out all the people named Elizabeth. Put the regular expression you're looking for—here it is "Elizabeth"—between forward slashes, and Perl will look at every line following the special DATA token and only print lines that match. + + +``` + + +use warnings; +use strict; + +[open][3] my $fh, '<:encoding(UTF-8)', "$names.txt" or +  [die][4] "Could not read file\n"; + +while(<$fh>){ +  [print][5] if /Elizabeth/; +} + +``` + +A quick note regarding this code: the regular expression needs to come at the end of the line. So `if /Elizabeth/ print;` will not work. This error is common for new Perl programmers. + +### Changing selected words with lookarounds + +Sometimes you may not want to do something with every instance of a string, but instead make your selections based on what comes either before or after the string. For example, perhaps you want to change the string "Robert" to "Bob" but only if "Robert" is followed by "Dylan." Otherwise, you don't want to change the name. + +For Perl, this is easy. You can apply this condition with a single line of code directly from your terminal: + + +``` +`perl -i.bkp -pe 's/Robert (?=Dylan)/Bob /g' names.txt` +``` + +For those new to Perl, this line might seem a bit intimidating at first glance, but it's really quite simple and elegant. + +The `-i` flag makes the output of the program write back to a file instead of displaying on the terminal screen. You can provide an extension to `-i` to save the input file to a file with the given extension. In other words, I'm creating a backup of the original file with the `.bkp` extension. (Be sure that you do not put a space between `-i` and the extension `.bkp`.) + +After that, I use the `-pe` options. The `-e` option allows me to run Perl from the command line. The `-p` option causes my code to loop through every line of the file and print the output. After all, I want the new file to contain every name in the original file, not just Mr. Dylan's. + +Next comes the phrase `s/Robert (?=Dylan)/Bob /g`. + +Here, I'm substituting (indicated by `s`) what comes between the first two slashes with what comes between the second and third slash. In this case, I want to substitute "Bob" for "Robert" in a specific circumstance. I want to do this for every instance in the file, not just the first one it finds, so I use the `g` flag for _global_ at the end. + +What about that strange-looking `(?=Dylan)`? This is what's known as a _positive lookahead_ in the world of regular expressions. It's noncapturing, so it won't be replaced by anything (Bob, in this example); instead, the expression narrows down the results that do get changed. + +I'm looking for the string "Robert" _if and only if_ it is followed (that's a positive lookahead) by the string "Dylan." + +Otherwise, ignore it. If the name "Robert Smith" is in my list of names, for example, I want to leave that alone and not change it to "Bob Smith." + +These are the lookarounds available to Perl users: + + * positive lookahead: `?=pattern` + * negative lookahead: `?!pattern` + * positive lookbehind: `?<=pattern` + * negative lookbehind: `? Date: Fri, 11 Feb 2022 21:43:30 +0800 Subject: [PATCH 243/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020170112=20?= =?UTF-8?q?Writing=20Advanced=20Web=20Applications=20with=20Go?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20170112 Writing Advanced Web Applications with Go.md --- ...iting Advanced Web Applications with Go.md | 706 ++++++++++++++++++ 1 file changed, 706 insertions(+) create mode 100644 sources/tech/20170112 Writing Advanced Web Applications with Go.md diff --git a/sources/tech/20170112 Writing Advanced Web Applications with Go.md b/sources/tech/20170112 Writing Advanced Web Applications with Go.md new file mode 100644 index 0000000000..c3d0f9e8dd --- /dev/null +++ b/sources/tech/20170112 Writing Advanced Web Applications with Go.md @@ -0,0 +1,706 @@ +[#]: subject: "Writing Advanced Web Applications with Go" +[#]: via: "https://www.jtolio.com/2017/01/writing-advanced-web-applications-with-go" +[#]: author: "jtolio.com https://www.jtolio.com/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Writing Advanced Web Applications with Go +====== + +Web development in many programming environments often requires subscribing to some full framework ethos. With [Ruby][1], it’s usually [Rails][2] but could be [Sinatra][3] or something else. With [Python][4], it’s often [Django][5] or [Flask][6]. With [Go][7], it’s… + +If you spend some time in Go communities like the [Go mailing list][8] or the [Go subreddit][9], you’ll find Go newcomers frequently wondering what web framework is best to use. [There][10] [are][11] [quite][12] [a][13] [few][14] [Go][15] [frameworks][16] ([and][17] [then][18] [some][19]), so which one is best seems like a reasonable question. Without fail, though, the strong recommendation of the Go community is to [avoid web frameworks entirely][20] and just stick with the standard library as long as possible. Here’s [an example from the Go mailing list][21] and here’s [one from the subreddit][22]. + +It’s not bad advice! The Go standard library is very rich and flexible, much more so than many other languages, and designing a web application in Go with just the standard library is definitely a good choice. + +Even when these Go frameworks call themselves minimalistic, they can’t seem to help themselves avoid using a different request handler interface than the default standard library [http.Handler][23], and I think this is the biggest source of angst about why frameworks should be avoided. If everyone standardizes on [http.Handler][23], then dang, all sorts of things would be interoperable! + +Before Go 1.7, it made some sense to give in and use a different interface for handling HTTP requests. But now that [http.Request][24] has the [Context][25] and [WithContext][26] methods, there truly isn’t a good reason any longer. + +I’ve done a fair share of web development in Go and I’m here to share with you both some standard library development patterns I’ve learned and some code I’ve found myself frequently needing. The code I’m sharing is not for use instead of the standard library, but to augment it. + +Overall, if this blog post feels like it’s predominantly plugging various little standalone libraries from my [Webhelp non-framework][27], that’s because it is. It’s okay, they’re little standalone libraries. Only use the ones you want! + +If you’re new to Go web development, I suggest reading the Go documentation’s [Writing Web Applications][28] article first. + +### Middleware + +A frequent design pattern for server-side web development is the concept of _middleware_, where some portion of the request handler wraps some other portion of the request handler and does some preprocessing or routing or something. This is a big component of how [Express][29] is organized on [Node][30], and how Express middleware and [Negroni][17] middleware works is almost line-for-line identical in design. + +Good use cases for middleware are things such as: + + * making sure a user is logged in, redirecting if not, + * making sure the request came over HTTPS, + * making sure a session is set up and loaded from a session database, + * making sure we logged information before and after the request was handled, + * making sure the request was routed to the right handler, + * and so on. + + + +Composing your web app as essentially a chain of middleware handlers is a very powerful and flexible approach. It allows you to avoid a lot of [cross-cutting concerns][31] and have your code factored in very elegant and easy-to-maintain ways. By wrapping a set of handlers with middleware that ensures a user is logged in prior to actually attempting to handle the request, the individual handlers no longer need mistake-prone copy-and-pasted code to ensure the same thing. + +So, middleware is good. However, if Negroni or other frameworks are any indication, you’d think the standard library’s `http.Handler` isn’t up to the challenge. Negroni adds its own `negroni.Handler` just for the sake of making middleware easier. There’s no reason for this. + +Here is a full middleware implementation for ensuring a user is logged in, assuming a `GetUser(*http.Request)` function but otherwise just using the standard library: + +``` + + func RequireUser(h http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + user, err := GetUser(req) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + if user == nil { + http.Error(w, "unauthorized", http.StatusUnauthorized) + return + } + h.ServeHTTP(w, req) + }) + } + +``` + +Here’s how it’s used (just wrap another handler!): + +``` + + func main() { + http.ListenAndServe(":8080", RequireUser(http.HandlerFunc(myHandler))) + } + +``` + +Express, Negroni, and other frameworks expect this kind of signature for a middleware-supporting handler: + +``` + + type Handler interface { + // don't do this! + ServeHTTP(rw http.ResponseWriter, req *http.Request, next http.HandlerFunc) + } + +``` + +There’s really no reason for adding the `next` argument - it reduces cross-library compatibility. So I say, don’t use `negroni.Handler` (or similar). Just use `http.Handler`! + +### Composability + +Hopefully I’ve sold you on middleware as a good design philosophy. + +Probably the most commonly-used type of middleware is request routing, or muxing (seems like we should call this demuxing but what do I know). Some frameworks are almost solely focused on request routing. [gorilla/mux][32] seems more popular than any other part of the [Gorilla][33] library. I think the reason for this is that even though the Go standard library is completely full featured and has a good [ServeMux][34] implementation, it doesn’t make the right thing the default. + +So! Let’s talk about request routing and consider the following problem. You, web developer extraordinaire, want to serve some HTML from your web server at `/hello/` but also want to serve some static assets from `/static/`. Let’s take a quick stab. + +``` + + package main + + import ( + "net/http" + ) + + func hello(w http.ResponseWriter, req *http.Request) { + w.Write([]byte("hello, world!")) + } + + func main() { + mux := http.NewServeMux() + mux.Handle("/hello/", http.HandlerFunc(hello)) + mux.Handle("/static/", http.FileServer(http.Dir("./static-assets"))) + http.ListenAndServe(":8080", mux) + } + +``` + +If you visit `http://localhost:8080/hello/`, you’ll be rewarded with a friendly “hello, world!” message. + +If you visit `http://localhost:8080/static/` on the other hand (assuming you have a folder of static assets in `./static-assets`), you’ll be surprised and frustrated. This code tries to find the source content for the request `/static/my-file` at `./static-assets/static/my-file`! There’s an extra `/static` in there! + +Okay, so this is why `http.StripPrefix` exists. Let’s fix it. + +``` + + mux.Handle("/static/", http.StripPrefix("/static", + http.FileServer(http.Dir("./static-assets")))) + +``` + +`mux.Handle` combined with `http.StripPrefix` is such a common pattern that I think it should be the default. Whenever a request router processes a certain amount of URL elements, it should strip them off the request so the wrapped `http.Handler` doesn’t need to know its absolute URL and only needs to be concerned with its relative one. + +In [Russ Cox][35]’s recent [TiddlyWeb backend][36], I would argue that every time `strings.TrimPrefix` is needed to remove the full URL from the handler’s incoming path arguments, it is an unnecessary cross-cutting concern, unfortunately imposed by `http.ServeMux`. (An example is [line 201 in tiddly.go][37].) + +I’d much rather have the default `mux` behavior work more like a directory of registered elements that by default strips off the ancestor directory before handing the request to the next middleware handler. It’s much more composable. To this end, I’ve written a simple muxer that works in this fashion called [whmux.Dir][38]. It is essentially `http.ServeMux` and `http.StripPrefix` combined. Here’s the previous example reworked to use it: + +``` + + package main + + import ( + "net/http" + + "gopkg.in/webhelp.v1/whmux" + ) + + func hello(w http.ResponseWriter, req *http.Request) { + w.Write([]byte("hello, world!")) + } + + func main() { + mux := whmux.Dir{ + "hello": http.HandlerFunc(hello), + "static": http.FileServer(http.Dir("./static-assets")), + } + http.ListenAndServe(":8080", mux) + } + +``` + +There are other useful mux implementations inside the [whmux][39] package that demultiplex on various aspects of the request path, request method, request host, or pull arguments out of the request and place them into the context, such as a [whmux.IntArg][40] or [whmux.StringArg][41]. This brings us to [contexts][42]. + +### Contexts + +Request contexts are a recent addition to the Go 1.7 standard library, but the idea of [contexts has been around since mid-2014][43]. As of Go 1.7, they were added to the standard library ([“context”][42]), but are available for older Go releases in the original location ([“golang.org/x/net/context”][44]). + +First, here’s the definition of the `context.Context` type that `(*http.Request).Context()` returns: + +``` + + type Context interface { + Done() <-chan struct{} + Err() error + Deadline() (deadline time.Time, ok bool) + + Value(key interface{}) interface{} + } + +``` + +Talking about `Done()`, `Err()`, and `Deadline()` are enough for an entirely different blog post, so I’m going to ignore them at least for now and focus on `Value(interface{})`. + +As a motivating problem, let’s say that the `GetUser(*http.Request)` method we assumed earlier is expensive, and we only want to call it once per request. We certainly don’t want to call it once to check that a user is logged in, and then again when we actually need the `*User` value. With `(*http.Request).WithContext` and `context.WithValue`, we can pass the `*User` down to the next middleware precomputed! + +Here’s the new middleware: + +``` + + type userKey int + + func RequireUser(h http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + user, err := GetUser(req) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + if user == nil { + http.Error(w, "unauthorized", http.StatusUnauthorized) + return + } + ctx := r.Context() + ctx = context.WithValue(ctx, userKey(0), user) + h.ServeHTTP(w, req.WithContext(ctx)) + }) + } + +``` + +Now, handlers that are protected by this `RequireUser` handler can load the previously computed `*User` value like this: + +``` + + if user, ok := req.Context().Value(userKey(0)).(*User); ok { + // there's a valid user! + } + +``` + +Contexts allow us to pass optional values to handlers down the chain in a way that is relatively type-safe and flexible. None of the above context logic requires anything outside of the standard library. + +#### Aside about context keys + +There was a curious piece of code in the above example. At the top, we defined a `type userKey int`, and then always used it as `userKey(0)`. + +One of the possible problems with contexts is the `Value()` interface lends itself to a global namespace where you can stomp on other context users and use conflicting key names. Above, we used `type userKey` because it’s an unexported type in your package. It will never compare equal (without a cast) to any other type, including `int`, in Go. This gives us a way to namespace keys to your package, even though the `Value()` method is still a sort of global namespace. + +Because the need for this is so common, the `webhelp` package defines a [GenSym()][45] helper that will create a brand new, never-before-seen, unique value for use as a context key. + +If we used [GenSym()][45], then `type userKey int` would become `var userKey = webhelp.GenSym()` and `userKey(0)` would simply become `userKey`. + +#### Back to whmux.StringArg + +Armed with this new context behavior, we can now present a `whmux.StringArg` example: + +``` + + package main + + import ( + "fmt" + "net/http" + + "gopkg.in/webhelp.v1/whmux" + ) + + var ( + pageName = whmux.NewStringArg() + ) + + func page(w http.ResponseWriter, req *http.Request) { + name := pageName.Get(req.Context()) + + fmt.Fprintf(w, "Welcome to %s", name) + } + + func main() { + // pageName.Shift pulls the next /-delimited string out of the request's + // URL.Path and puts it into the context instead. + pageHandler := pageName.Shift(http.HandlerFunc(page)) + + http.ListenAndServe(":8080", whmux.Dir{ + "wiki": pageHandler, + }) + } + +``` + +### Pre-Go-1.7 support + +Contexts let you do some pretty cool things. But let’s say you’re stuck with something before Go 1.7 (for instance, App Engine is currently Go 1.6). + +That’s okay! I’ve backported all of the neat new context features to Go 1.6 and earlier in a forwards compatible way! + +With the [whcompat][46] package, `req.Context()` becomes `whcompat.Context(req)`, and `req.WithContext(ctx)` becomes `whcompat.WithContext(req, ctx)`. The `whcompat` versions work with all releases of Go. Yay! + +There’s a bit of unpleasantness behind the scenes to make this happen. Specifically, for pre-1.7 builds, a global map indexed by `req.URL` is kept, and a finalizer is installed on `req` to clean up. So don’t change what `req.URL` points to and this will work fine. In practice it’s not a problem. + +`whcompat` adds additional backwards-compatibility helpers. In Go 1.7 and on, the context’s `Done()` channel is closed (and `Err()` is set), whenever the request is done processing. If you want this behavior in Go 1.6 and earlier, just use the [whcompat.DoneNotify][47] middleware. + +In Go 1.8 and on, the context’s `Done()` channel is closed when the client goes away, even if the request hasn’t completed. If you want this behavior in Go 1.7 and earlier, just use the [whcompat.CloseNotify][48] middleware, though beware that it costs an extra goroutine. + +### Error handling + +How you handle errors can be another cross-cutting concern, but with good application of context and middleware, it too can be beautifully cleaned up so that the responsibilities lie in the correct place. + +Problem statement: your `RequireUser` middleware needs to handle an authentication error differently between your HTML endpoints and your JSON API endpoints. You want to use `RequireUser` for both types of endpoints, but with your HTML endpoints you want to return a user-friendly error page, and with your JSON API endpoints you want to return an appropriate JSON error state. + +In my opinion, the right thing to do is to have contextual error handlers, and luckily, we have a context for contextual information! + +First, we need an error handler interface. + +``` + + type ErrHandler interface { + HandleError(w http.ResponseWriter, req *http.Request, err error) + } + +``` + +Next, let’s make a middleware that registers the error handler in the context: + +``` + + var errHandler = webhelp.GenSym() // see the aside about context keys + + func HandleErrWith(eh ErrHandler, h http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + ctx := context.WithValue(whcompat.Context(req), errHandler, eh) + h.ServeHTTP(w, whcompat.WithContext(req, ctx)) + }) + } + +``` + +Last, let’s make a function that will use the registered error handler for errors: + +``` + + func HandleErr(w http.ResponseWriter, req *http.Request, err error) { + if handler, ok := whcompat.Context(req).Value(errHandler).(ErrHandler); ok { + handler.HandleError(w, req, err) + return + } + log.Printf("error: %v", err) + http.Error(w, "internal server error", http.StatusInternalServerError) + } + +``` + +Now, as long as everything uses `HandleErr` to handle errors, our JSON API can handle errors with JSON responses, and our HTML endpoints can handle errors with HTML responses. + +Of course, the [wherr][49] package implements this all for you, and the [whjson][49] package even implements a friendly JSON API error handler. + +Here’s how you might use it: + +``` + + var userKey = webhelp.GenSym() + + func RequireUser(h http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + user, err := GetUser(req) + if err != nil { + wherr.Handle(w, req, wherr.InternalServerError.New("failed to get user")) + return + } + if user == nil { + wherr.Handle(w, req, wherr.Unauthorized.New("no user found")) + return + } + ctx := r.Context() + ctx = context.WithValue(ctx, userKey, user) + h.ServeHTTP(w, req.WithContext(ctx)) + }) + } + + func userpage(w http.ResponseWriter, req *http.Request) { + user := req.Context().Value(userKey).(*User) + w.Header().Set("Content-Type", "text/html") + userpageTmpl.Execute(w, user) + } + + func username(w http.ResponseWriter, req *http.Request) { + user := req.Context().Value(userKey).(*User) + w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(map[string]interface{}{"user": user}) + } + + func main() { + http.ListenAndServe(":8080", whmux.Dir{ + "api": wherr.HandleWith(whjson.ErrHandler, + RequireUser(whmux.Dir{ + "username": http.HandlerFunc(username), + })), + "user": RequireUser(http.HandlerFunc(userpage)), + }) + } + +``` + +#### Aside about the spacemonkeygo/errors package + +The default [wherr.Handle][50] implementation understands all of the [error classes defined in the wherr top level package][51]. + +These error classes are implemented using the [spacemonkeygo/errors][52] library and the [spacemonkeygo/errors/errhttp][53] extensions. You don’t have to use this library or these errors, but the benefit is that your error instances can be extended to include HTTP status code messages and information, which once again, provides for a nice elimination of cross-cutting concerns in your error handling logic. + +See the [spacemonkeygo/errors][52] package for more details. + +_**Update 2018-04-19:** After a few years of use, my friend condensed some lessons we learned and the best parts of `spacemonkeygo/errors` into a new, more concise, better library, over at [github.com/zeebo/errs][54]. Consider using that instead!_ + +### Sessions + +Go’s standard library has great support for cookies, but cookies by themselves aren’t usually what a developer thinks of when she thinks about sessions. Cookies are unencrypted, unauthenticated, and readable by the user, and perhaps you don’t want that with your session data. + +Further, sessions can be stored in cookies, but could also be stored in a database to provide features like session revocation and querying. There’s lots of potential details about the implementation of sessions. + +Request handlers, however, probably don’t care too much about the implementation details of the session. Request handlers usually just want a bucket of keys and values they can store safely and securely. + +The [whsess][55] package implements middleware for registering an arbitrary session store (a default cookie-based session store is provided), and implements helpers for retrieving and saving new values into the session. + +The default cookie-based session store implements encryption and authentication via the excellent [nacl/secretbox][56] package. + +Usage is like this: + +``` + + func handler(w http.ResponseWriter, req *http.Request) { + ctx := whcompat.Context(req) + sess, err := whsess.Load(ctx, "namespace") + if err != nil { + wherr.Handle(w, req, err) + return + } + if loggedIn, _ := sess.Values["logged_in"].(bool); loggedIn { + views, _ := sess.Values["views"].(int64) + sess.Values["views"] = views + 1 + sess.Save(w) + } + } + + func main() { + http.ListenAndServe(":8080", whsess.HandlerWithStore( + whsess.NewCookieStore(secret), http.HandlerFunc(handler))) + } + +``` + +### Logging + +The Go standard library by default doesn’t log incoming requests, outgoing responses, or even just what port the HTTP server is listening on. + +The [whlog][57] package implements all three. The [whlog.LogRequests][58] middleware will log requests as they start. The [whlog.LogResponses][59] middleware will log requests as they end, along with status code and timing information. [whlog.ListenAndServe][60] will log the address the server ultimately listens on (if you specify “:0” as your address, a port will be randomly chosen, and [whlog.ListenAndServe][60] will log it). + +[whlog.LogResponses][59] deserves special mention for how it does what it does. It uses the [whmon][61] package to instrument the outgoing `http.ResponseWriter` to keep track of response information. + +Usage is like this: + +``` + + func main() { + whlog.ListenAndServe(":8080", whlog.LogResponses(whlog.Default, handler)) + } + +``` + +#### App engine logging + +App engine logging is unconventional crazytown. The standard library logger doesn’t work by default on App Engine, because App Engine logs _require_ the request context. This is unfortunate for libraries that don’t necessarily run on App Engine all the time, as their logging information doesn’t make it to the App Engine request-specific logger. + +Unbelievably, this is fixable with [whgls][62], which uses my terrible, terrible (but recently improved) [Goroutine-local storage library][63] to store the request context on the current stack, register a new log output, and fix logging so standard library logging works with App Engine again. + +### Template handling + +Go’s standard library [html/template][64] package is excellent, but you’ll be unsurprised to find there’s a few tasks I do with it so commonly that I’ve written additional support code. + +The [whtmpl][65] package really does two things. First, it provides a number of useful helper methods for use within templates, and second, it takes some friction out of managing a large number of templates. + +When writing templates, one thing you can do is call out to other registered templates for small values. A good example might be some sort of list element. You can have a template that renders the list element, and then your template that renders your list can use the list element template in turn. + +Use of another template within a template might look like this: + +``` + +
    + {{ range .List }} + {{ template "list_element" . }} + {{ end }} +
+ +``` + +You’re now rendering the `list_element` template with the list element from `.List`. But what if you want to also pass the current user `.User`? Unfortunately, you can only pass one argument from one template to another. If you have two arguments you want to pass to another template, with the standard library, you’re out of luck. + +The [whtmpl][65] package adds three helper functions to aid you here, `makepair`, `makemap`, and `makeslice` (more docs under the [whtmpl.Collection][66] type). `makepair` is the simplest. It takes two arguments and constructs a [whtmpl.Pair][67]. Fixing our example above would look like this now: + +``` + +
    + {{ $user := .User }} + {{ range .List }} + {{ template "list_element" (makepair . $user) }} + {{ end }} +
+ +``` + +The second thing [whtmpl][65] does is make defining lots of templates easy, by optionally automatically naming templates after the name of the file the template is defined in. + +For example, say you have three files. + +Here’s `pkg.go`: + +``` + + package views + + import "gopkg.in/webhelp.v1/whtmpl" + + var Templates = whtmpl.NewCollection() + +``` + +Here’s `landing.go`: + +``` + + package views + + var _ = Templates.MustParse(`{{ template "header" . }} + +

Landing!

`) + +``` + +And here’s `header.go`: + +``` + + package views + + var _ = Templates.MustParse(`My website!`) + +``` + +Now, you can import your new `views` package and render the `landing` template this easily: + +``` + + func handler(w http.ResponseWriter, req *http.Request) { + views.Templates.Render(w, req, "landing", map[string]interface{}{}) + } + +``` + +### User authentication + +I’ve written two Webhelp-style authentication libraries that I end up using frequently. + +The first is an OAuth2 library, [whoauth2][68]. I’ve written up [an example application that authenticates with Google, Facebook, and Github][69]. + +The second, [whgoth][70], is a wrapper around [markbates/goth][71]. My portion isn’t quite complete yet (some fixes are still necessary for optional App Engine support), but will support more non-OAuth2 authentication sources (like Twitter) when it is done. + +### Route listing + +Surprise! If you’ve used [webhelp][27] based handlers and middleware for your whole app, you automatically get route listing for free, via the [whroute][72] package. + +My web serving code’s `main` method often has a form like this: + +``` + + switch flag.Arg(0) { + case "serve": + panic(whlog.ListenAndServe(*listenAddr, routes)) + case "routes": + whroute.PrintRoutes(os.Stdout, routes) + default: + fmt.Printf("Usage: %s \n", os.Args[0]) + } + +``` + +Here’s some example output: + +``` + + GET /auth/_cb/ + GET /auth/login/ + GET /auth/logout/ + GET / + GET /account/apikeys/ + POST /account/apikeys/ + GET /project// + GET /project//control// + POST /project//control//sample/ + GET /project//control/ + Redirect: f(req) + POST /project//control/ + POST /project//control_named//sample/ + GET /project//control_named/ + Redirect: f(req) + GET /project//sample// + GET /project//sample//similar[/<*>] + GET /project//sample/ + Redirect: f(req) + POST /project//search/ + GET /project/ + Redirect: / + POST /project/ + +``` + +### Other little things + +[webhelp][27] has a number of other subpackages: + + * [whparse][73] assists in parsing optional request arguments. + * [whredir][74] provides some handlers and helper methods for doing redirects in various cases. + * [whcache][75] creates request-specific mutable storage for caching various computations and database loaded data. Mutability helps helper functions that aren’t used as middleware share data. + * [whfatal][76] uses panics to simplify early request handling termination. Probably avoid this package unless you want to anger other Go developers. + + + +### Summary + +Designing your web project as a collection of composable middlewares goes quite a long way to simplify your code design, eliminate cross-cutting concerns, and create a more flexible development environment. Use my [webhelp][27] package if it helps you. + +Or don’t! Whatever! It’s still a free country last I checked. + +#### Update + +Peter Kieltyka points me to his [Chi framework][77], which actually does seem to do the right things with respect to middleware, handlers, and contexts - certainly much more so than all the other frameworks I’ve seen. So, shoutout to Peter and the team at Pressly! + +-------------------------------------------------------------------------------- + +via: https://www.jtolio.com/2017/01/writing-advanced-web-applications-with-go + +作者:[jtolio.com][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.jtolio.com/ +[b]: https://github.com/lujun9972 +[1]: https://www.ruby-lang.org/ +[2]: http://rubyonrails.org/ +[3]: http://www.sinatrarb.com/ +[4]: https://www.python.org/ +[5]: https://www.djangoproject.com/ +[6]: http://flask.pocoo.org/ +[7]: https://golang.org/ +[8]: https://groups.google.com/d/forum/golang-nuts +[9]: https://www.reddit.com/r/golang/ +[10]: https://revel.github.io/ +[11]: https://gin-gonic.github.io/gin/ +[12]: http://iris-go.com/ +[13]: https://beego.me/ +[14]: https://go-macaron.com/ +[15]: https://github.com/go-martini/martini +[16]: https://github.com/gocraft/web +[17]: https://github.com/urfave/negroni +[18]: https://godoc.org/goji.io +[19]: https://echo.labstack.com/ +[20]: https://medium.com/code-zen/why-i-don-t-use-go-web-frameworks-1087e1facfa4 +[21]: https://groups.google.com/forum/#!topic/golang-nuts/R_lqsTTBh6I +[22]: https://www.reddit.com/r/golang/comments/1yh6gm/new_to_go_trying_to_select_web_framework/ +[23]: https://golang.org/pkg/net/http/#Handler +[24]: https://golang.org/pkg/net/http/#Request +[25]: https://golang.org/pkg/net/http/#Request.Context +[26]: https://golang.org/pkg/net/http/#Request.WithContext +[27]: https://godoc.org/gopkg.in/webhelp.v1 +[28]: https://golang.org/doc/articles/wiki/ +[29]: https://expressjs.com/ +[30]: https://nodejs.org/en/ +[31]: https://en.wikipedia.org/wiki/Cross-cutting_concern +[32]: https://github.com/gorilla/mux +[33]: https://github.com/gorilla/ +[34]: https://golang.org/pkg/net/http/#ServeMux +[35]: https://swtch.com/~rsc/ +[36]: https://github.com/rsc/tiddly +[37]: https://github.com/rsc/tiddly/blob/8f9145ac183e374eb95d90a73be4d5f38534ec47/tiddly.go#L201 +[38]: https://godoc.org/gopkg.in/webhelp.v1/whmux#Dir +[39]: https://godoc.org/gopkg.in/webhelp.v1/whmux +[40]: https://godoc.org/gopkg.in/webhelp.v1/whmux#IntArg +[41]: https://godoc.org/gopkg.in/webhelp.v1/whmux#StringArg +[42]: https://golang.org/pkg/context/ +[43]: https://blog.golang.org/context +[44]: https://godoc.org/golang.org/x/net/context +[45]: https://godoc.org/gopkg.in/webhelp.v1#GenSym +[46]: https://godoc.org/gopkg.in/webhelp.v1/whcompat +[47]: https://godoc.org/gopkg.in/webhelp.v1/whcompat#DoneNotify +[48]: https://godoc.org/gopkg.in/webhelp.v1/whcompat#CloseNotify +[49]: https://godoc.org/gopkg.in/webhelp.v1/wherr +[50]: https://godoc.org/gopkg.in/webhelp.v1/wherr#Handle +[51]: https://godoc.org/gopkg.in/webhelp.v1/wherr#pkg-variables +[52]: https://godoc.org/github.com/spacemonkeygo/errors +[53]: https://godoc.org/github.com/spacemonkeygo/errors/errhttp +[54]: https://github.com/zeebo/errs +[55]: https://godoc.org/gopkg.in/webhelp.v1/whsess +[56]: https://godoc.org/golang.org/x/crypto/nacl/secretbox +[57]: https://godoc.org/gopkg.in/webhelp.v1/whlog +[58]: https://godoc.org/gopkg.in/webhelp.v1/whlog#LogRequests +[59]: https://godoc.org/gopkg.in/webhelp.v1/whlog#LogResponses +[60]: https://godoc.org/gopkg.in/webhelp.v1/whlog#ListenAndServe +[61]: https://godoc.org/gopkg.in/webhelp.v1/whmon +[62]: https://godoc.org/gopkg.in/webhelp.v1/whgls +[63]: https://godoc.org/github.com/jtolds/gls +[64]: https://golang.org/pkg/html/template/ +[65]: https://godoc.org/gopkg.in/webhelp.v1/whtmpl +[66]: https://godoc.org/gopkg.in/webhelp.v1/whtmpl#Collection +[67]: https://godoc.org/gopkg.in/webhelp.v1/whtmpl#Pair +[68]: https://godoc.org/gopkg.in/go-webhelp/whoauth2.v1 +[69]: https://github.com/go-webhelp/whoauth2/blob/v1/examples/group/main.go +[70]: https://godoc.org/gopkg.in/go-webhelp/whgoth.v1 +[71]: https://github.com/markbates/goth +[72]: https://godoc.org/gopkg.in/webhelp.v1/whroute +[73]: https://godoc.org/gopkg.in/webhelp.v1/whparse +[74]: https://godoc.org/gopkg.in/webhelp.v1/whredir +[75]: https://godoc.org/gopkg.in/webhelp.v1/whcache +[76]: https://godoc.org/gopkg.in/webhelp.v1/whfatal +[77]: https://github.com/pressly/chi From 6dbab7f9abb8bbfd42974dba6441ec5363b1e308 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 21:46:21 +0800 Subject: [PATCH 244/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220209=20?= =?UTF-8?q?Give=20Your=20Linux=20Mint=20and=20Xubuntu=20a=20Visual=20Uplif?= =?UTF-8?q?t=20Using=20Twister=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220209 Give Your Linux Mint and Xubuntu a Visual Uplift Using Twister UI.md --- ...ubuntu a Visual Uplift Using Twister UI.md | 167 ++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 sources/tech/20220209 Give Your Linux Mint and Xubuntu a Visual Uplift Using Twister UI.md diff --git a/sources/tech/20220209 Give Your Linux Mint and Xubuntu a Visual Uplift Using Twister UI.md b/sources/tech/20220209 Give Your Linux Mint and Xubuntu a Visual Uplift Using Twister UI.md new file mode 100644 index 0000000000..d0ad8493a6 --- /dev/null +++ b/sources/tech/20220209 Give Your Linux Mint and Xubuntu a Visual Uplift Using Twister UI.md @@ -0,0 +1,167 @@ +[#]: subject: "Give Your Linux Mint and Xubuntu a Visual Uplift Using Twister UI" +[#]: via: "https://www.debugpoint.com/2022/02/twister-ui-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Give Your Linux Mint and Xubuntu a Visual Uplift Using Twister UI +====== +TWISTER UI IS THE EASIEST WAY TO GIVE YOUR LINUX MINT AND XUBUNTU A +VISUAL UPLIFT USING PRE-LOADED THEMES. HERE’S HOW. +[Twister UI][1] is an add-on to your existing Linux Mint and Xubuntu installation. The Pi Labs created this UI, who made the [Twister OS][2] for Raspberry Pi and related hardware. + +### Twister UI + +The Twister UI is a collection of packages for [Linux Mint][3], and Xubuntu brings several popular OS-specific themes and configurations out of the box. You can apply them with just a click of a button. You do not need to download separate icons, themes or cursors. + +The latest release gives out-of-box desktop theme, icons, sound, and other settings changes for the below OS types. + + * Native Twister OS Theme + * Windows 98, Windows 7, Windows XP + * Windows 11, Windows 10 + * iTwister and iTwister Sur (for macOS) + + + +#### How does it work? + +The team prepared automated scripts that download all popular OS-specific themes, sounds, etc., from GitHub. Then the script modifies them, download additional packages from the Ubuntu repository and installs this add-on as a whole. The installer takes care of installing everything by itself, and all you need to do is wait. + +Before we explain to you how to install it, let’s look at some of the screenshots and features of this OS mod. These screenshots are from the Linux Mint Xfce edition with this OS mod applied. + +#### How it looks (screenshots) + +![Twister UI – macOS Theme][4] + +![Twister UI – Windows XP Theme][5] + +![native Twister OS theme][6] + +#### Contents of the Twister UI Package + +The package brings its own settings app called ThemeTwister. You can use this to switch themes quickly. You can change as many times you want between them. Nothing breaks. + +The project also installs some good open-source packages by default. It installs Lutris, Steam gaming platforms to help you quickly play games. It also installs Discord, Wine emulator for the users. + +As you can see, the team carefully thought of which packages to install, considering the user base of this add-on. + +### How to Install + +If you plan to install this, I recommend using this package in Linux Mint Xfce edition and Xubuntu. Do not try to install it in other Linux distributions _(I tried before reading the documentation, I messed up my Fedora install, so don’t try it in other distributions)_. + +The requirement is a Linux Mint Xfce or Xubuntu installation (wither 32-bit 64-bit). It also requires around 5 GB of disk space. + +First, download the package from the below link, which contains the Torrent link. It is not an ISO file. It consists of three files, one of which is the actual script. + +[Download Twister UI][1] + +Once downloaded, open the downloaded folder, and you should see a file with extension .run (as below). + +![Give the execute permission to the run file][7] + +Change the permission of the file to make it executable. Then run it via the terminal. + +The script requires an admin password, so provide that once asked. Before you start the installation, make sure that you have a stable internet connection to download additional packages on the fly. + +![Starting the installation script][8] + +The download and installation take some time. Depending on your internet speed, it might take around 15 to 20 minutes. + +[][9] + +SEE ALSO:   Zorin OS 16 Lite Review - Perfect Combination of Beauty, Performance and Simplicity + +You should know that the installer will replace the default Plymouth and . + +Once installation completes, the script should prompt you to reboot. + +After reboot, log in to your Linux Mint Xfce or Xubuntu system. + +### How to Change Themes + +If you are using the Linux Mint Xfce edition, you need to make the following additional changes for the best results before changing the theme: + + * Open Application Menu > Settings > Desktop, under the Icons tab, uncheck the Use custom font size. + * Open Application Menu > Settings > Window Manager tweaks, under the Compositor tab, uncheck Show shadows under dock windows. + + + +You should now see a “ThemeTwister” icon on the desktop and open the application. This application gives you options to change themes, as shown below. + +![Changing theme using ThemeTwister tool][10] + +Select a theme and click on the respective button. Each time you change or apply a piece, the script asks you to log off. So make sure you close all your programs before changing the theme. + +### How to Uninstall + +If you are done and want to uninstall, then open a terminal and run the following shell script. + +``` + + sh /usr/share/ThemeSwitcher/uninstall.sh + +``` + +The above script only uninstalls Twister UI components and doesn’t uninstall Steam, Lutris etc. So if you want to uninstall, use the Software manager to uninstall them. + +It would be best if you did a reboot after uninstallation. + +### Review and Performance + +As per the Pi Labs documentation, the customizations should not consume much additional memory. And it is true. + +The customization is not impacting much on the desktop performance. When I ran one or two of the customization in Linux Mint Xfce edition in idle mode, it consumed around 740 MB of memory with CPU around 2% to 3%. This itself is impressive. The only cost of using this is the additional disk space. + +![Resource Usage in Linux Mint with Twister UI][11] + +The theme switcher is excellent and flawlessly changes the theme without surprises or errors. + +In general, the entire process is error-free and went well as per its design. + +### Closing Notes + +After downloading individual themes icons and changing settings, you can manually configure your Linux distribution to look like Windows or macOS. That takes a lot of time and is sometimes difficult for new users. With that in mind, I think this new approach is a time saver and very easy for everyone. You can get all the required mods with just a click of a button. + +There will always be an argument about why a Linux need to look like Windows or macOS. But older folks may not be familiar with computers much and remember the Windows colours and icons. They can adapt Linux using this simple modification without any hassles. + +Overall, it’s an excellent project from the Pi Labs and helps many users worldwide. + +So, what do you think about this project? Let me know in the comment box below. + +* * * + +We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][12], [Twitter][13], [YouTube][14], and [Facebook][15] and never miss an update! + +##### Also Read + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/02/twister-ui-2022/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://twisteros.com/twisterui.html +[2]: https://twisteros.com +[3]: https://www.debugpoint.com/2021/11/linux-mint-20-3-new-app/ +[4]: https://www.debugpoint.com/wp-content/uploads/2022/02/Twister-UI-macOS-Theme-1024x576.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/02/Twister-UI-Windows-XP-Theme-1024x574.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/02/native-Twister-OS-theme-1024x581.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/02/Give-the-execute-permission-to-the-run-file-1024x521.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/02/Starting-the-installation-script.jpg +[9]: https://www.debugpoint.com/2021/12/zorin-os-16-lite-review-xfce/ +[10]: https://www.debugpoint.com/wp-content/uploads/2022/02/Changing-theme-using-ThemeTwister-tool.jpg +[11]: https://www.debugpoint.com/wp-content/uploads/2022/02/Resource-Usage-in-Linux-Mint-with-Twister-UI-1024x579.jpg +[12]: https://t.me/debugpoint +[13]: https://twitter.com/DebugPoint +[14]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[15]: https://facebook.com/DebugPoint From 76b44477275851e757f8b376aec2ca0b0fa60c15 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 21:46:51 +0800 Subject: [PATCH 245/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220208=20?= =?UTF-8?q?How=20to=20Upgrade=20to=20KDE=20Plasma=205.24=20from=205.23?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220208 How to Upgrade to KDE Plasma 5.24 from 5.23.md --- ...to Upgrade to KDE Plasma 5.24 from 5.23.md | 131 ++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 sources/tech/20220208 How to Upgrade to KDE Plasma 5.24 from 5.23.md diff --git a/sources/tech/20220208 How to Upgrade to KDE Plasma 5.24 from 5.23.md b/sources/tech/20220208 How to Upgrade to KDE Plasma 5.24 from 5.23.md new file mode 100644 index 0000000000..366d701513 --- /dev/null +++ b/sources/tech/20220208 How to Upgrade to KDE Plasma 5.24 from 5.23.md @@ -0,0 +1,131 @@ +[#]: subject: "How to Upgrade to KDE Plasma 5.24 from 5.23" +[#]: via: "https://www.debugpoint.com/2022/02/upgrade-kde-plasma-5-24/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to Upgrade to KDE Plasma 5.24 from 5.23 +====== +THE KDE TEAM ANNOUNCED THE KDE PLASMA 5.24 LTS EDITION, WHICH IS +AVAILABLE TO DOWNLOAD AND INSTALL. IF YOU ARE PLANNING TO UPGRADE FROM +THE PRIOR VERSION – HERE WE GIVE YOU QUICK STEPS TO UPGRADE TO KDE +PLASMA 5.24 FROM 5.23. +![KDE Plasma 5.24 Desktop][1] + +KDE Plasma 5.24 is the 26th edition of Plasma desktop that brings significant visual refresh with some backend performance boost. With this release, you get a brand new wallpaper, visual refresh to the Breeze theme, fingerprint login and a brand new overview screen. And many more updates. + +Here, you can read details about the [KDE Plasma 5.24 features in our round-up post][2]. + +If you are running an earlier version of KDE Plasma, this is how you can upgrade to the latest version. + +### How to Upgrade to KDE Plasma 5.24 + +The upgrade size in this release is moderate, around 450 MB+ in my test machine. So, make sure to close all applications and save your data before starting the upgrade process. + +In general, the KDE update is very stable. It never fails. But if you want to be extra cautious and have valuable data, you may want to take a backup of those. But again, I believe it’s unnecessary, in my opinion. + +#### Steps + +If you are running KDE Plasma 5.23 in KDE Neon, Or any rolling release distributions such as Arch Linux, Manjaro, or any other distro, you can open the KDE utility Discover and click on the check for update. + +You can verify whether Plasma 5.24 is available via the Discover upgrade package list. + +Once you have verified, click on the ‘Update All’ button in the Discover window at the top right. + +Alternatively, you can also run the below commands from the terminal and start the upgrade process in KDE Neon. + +``` + + sudo apt update + +``` + +``` + + sudo pkcon update + +``` + +Restart the system after the upgrade process is complete. + +And after reboot, you should see the brand new KDE Plasma 5.24 welcomes you. + +### KDE Plasma 5.24 in Fedora 35 and Ubuntu 21.10 + +As of writing this, [Fedora 35][3] and [Ubuntu 21.10][4] are the two primary distribution versions. Fedora 35 would not be getting this version due to the [update policy][5] and Fedora 36 also would be released soon. + +[][2] + +SEE ALSO:   KDE Plasma 5.24 – Top New Features and Release Details + +However, If you still want to experiment, you can install this new version of Plasma desktop in Ubuntu 21.10 and Ubuntu 21.04 using the below backports PPA. Make sure you keep a backup of your data while doing so. + +``` + + sudo add-apt-repository ppa:kubuntu-ppa/backports + sudo apt-get full-upgrade + +``` + +In Fedora 35, I tried to install via the below copr repo. But there are too many dependency conflicts to resolve and it’s risky to try this in a stable system. I would recommend not to try the below in Fedora 35 at this time. You can still install by “allowerasing” flag. But don’t do it. + +Also, I guess the official Fedora 35 repo will be updated on the first point release i.e. 5.24.1 which is due on Feb 15, 2022. So you can wait until then. + +Also, it is wiser to wait for Fedora 36 which brings this version as default. Fedora 36 is due on April 2022. + +![Trying to Install Plasma 5.24 in Fedora 35][6] + +``` + + sudo dnf copr enable marcdeop/plasma + sudo dnf copr enable marcdeop/kf5 + sudo dnf upgrade --refresh + +``` + +### Post Upgrade Feedback + +I ran the upgrade process in a virtual machine with a fresh KDE Plasma 5.23 install. The upgrade process went smooth, so surprises or errors. Well, it never failed for me to date. + +The upgrade time entirely depends on your internet connection and KDE servers. In general, it should b completed within 30 minutes. + +The first restart after the upgrade process went fine and did not take much time. + +Performance-wise, I felt it’s a little smooth over the prior releases, thanks to several bug fixes and under the hood performance optimizations. + +So, overall, you can safely upgrade if you are in KDE Neon. And wait for the packages for Ubuntu and Fedora stable releases. + +Enjoy the brand new KDE Plasma! + +* * * + +We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][7], [Twitter][8], [YouTube][9], and [Facebook][10] and never miss an update! + +##### Also Read + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/02/upgrade-kde-plasma-5-24/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/wp-content/uploads/2022/02/KDE-Plasma-5.4-Desktop-1024x576.jpg +[2]: https://www.debugpoint.com/2022/01/kde-plasma-5-24/ +[3]: https://www.debugpoint.com/2021/09/fedora-35/ +[4]: https://www.debugpoint.com/2021/07/ubuntu-21-10/ +[5]: https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/#stable-releases +[6]: https://www.debugpoint.com/wp-content/uploads/2022/02/Trying-to-Install-Plasma-5.24-in-Fedora-35-1024x576.jpg +[7]: https://t.me/debugpoint +[8]: https://twitter.com/DebugPoint +[9]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[10]: https://facebook.com/DebugPoint From 62a708f3ec694832702121299cde197515410c3b Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 21:47:32 +0800 Subject: [PATCH 246/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220206=20?= =?UTF-8?q?Best=20Whiteboard=20Applications=20for=20Linux=20Systems?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220206 Best Whiteboard Applications for Linux Systems.md --- ...iteboard Applications for Linux Systems.md | 231 ++++++++++++++++++ 1 file changed, 231 insertions(+) create mode 100644 sources/tech/20220206 Best Whiteboard Applications for Linux Systems.md diff --git a/sources/tech/20220206 Best Whiteboard Applications for Linux Systems.md b/sources/tech/20220206 Best Whiteboard Applications for Linux Systems.md new file mode 100644 index 0000000000..439e5311ea --- /dev/null +++ b/sources/tech/20220206 Best Whiteboard Applications for Linux Systems.md @@ -0,0 +1,231 @@ +[#]: subject: "Best Whiteboard Applications for Linux Systems" +[#]: via: "https://www.debugpoint.com/2022/02/top-whiteboard-applications-linux/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Best Whiteboard Applications for Linux Systems +====== +WE WILL SHOW YOU A COUPLE OF WHITEBOARD APPLICATIONS FOR LINUX SYSTEMS. +I AM SURE THESE ARE GOING TO BE SUPER BENEFICIAL FOR YOU. READ ON. +W + +In general, a digital whiteboard is a tool that contains a large interactive display in the form of a whiteboard. Some examples of whiteboard devices are – Tab, large-screen mobile phones, touch screen laptops, surface displays. + +If an instructor uses a whiteboard, you can draw, write or manipulate elements on those device screens using a touch-sensitive pen, stylus, finger or mouse. That means you can drag, click, erase, draw – do everything on the whiteboard that can be done on a piece of paper using a pen. + +But to do all those, you need software that supports all those functionalities. That means bridging the gap between your touch and the display. + +Now, there are many commercial applications available for this work. But we will talk about some of the free and open-source whiteboard applications in this article that are available for Linux Systems. + +### Best Whiteboard Applications for Linux Systems + +#### 1\. Xournal++ + +The first application we feature is [Xournal++][1]. In my opinion, this is the best app on this list. It’s pretty solid and here for some time. + +Xournal++ allows you to write, draw, and do everything you usually do on paper. It supports handwriting, custom pen with highlighter, eraser, etc. The support for Layers, multi-page features, add external images, add audio are few to mention among its great list of features. + +This application support almost all pressure-sensitive tablets, including Wacom, Huion, XP-Pen. I tested it on a touchpad laptop, and it works with minor settings changes. So, you can start using any touch-sensitive device. + +It is written in C++ and GTK3. + +![Xournal++ Whiteboard Application for Linux][2] + +For Linux systems, this is how you can install. It is free and available for Linux, macOS and Windows as well. A BETA copy is also available if you want to try it out on mobile. + +This application is available as AppImage, Snap, Flatpak and deb package. Also available as PPA for Ubuntu/Debian based systems. + +Also dedicated packages for Fedora, SUSE and Arch are available. Head over to the below link to grab your preferred executable format. + +[Download Xournal++][3] + + * [Home page][1] + * [Documentation][4] + * [Source Code][5] + + + +#### 2\. OpenBoard + +The next one we would like to highlight is [OpenBoard][6]. This simple whiteboard drawing application is easy to use and doesn’t get in your way with too many options. + +This one is perfect for beginners and junior students who take notes from online classes. + +OpenBoard loaded with features. Such as colours, brushes, texts, simple drawing shapes, page support and more. This app is built using Qt technology. + +![OpenBoard][7] + +This application is only available for Ubuntu as a stand-alone deb package. You can download it from the below link. + +[Download OpenBoard][8] + + * [Home Page][6] + * [Documentation][9] + * [Source Code][10] + + + +#### 3\. Notelab + +[NoteLab][11] is one of the decade-old oldest whiteboard applications. It is a free and open-source application with a vast set of features. So, you can understand how stable and popular this application is. + +Here are some of its features: + + * This app supports all popular image formats as an export option. For example, SVG, PNG, JPG, BMP, etc. + * Configuration option for pen and paper customization + * Built-in memory manager for custom allocation of memory used by NoteLab. + * There are several rule formats in paper, such as broad rule, college rule, and graph paper. + * All standard drawing tools. + * You can resize, move, delete, change colour, and perform other operations in any note section. + + + +![NoteLab][12] + +However, this application is a Java application and distributed as a .jar file. So you need the Java runtime for it to work. You can refer to our guide to install Java or JRE in Linux systems by following links. + + * [How to install Java/JRE in Ubuntu-based systems][13] + * [How to install Java/JRE in Arch Linux][14] + + + +[][15] + +SEE ALSO:   GIMP 2.10 Released - Download Now + +NoteLab comes with a standalone executable .jar file, which you can download from SourceForge via the below link. Remember, you need JRE to run this application. + +[Download NoteLab][16] + + * [Home Page][11] + * [Documentation][17] + + + +#### 4\. Rnote + +The third app we want to highlight is called [Rnote][18]. Rnote is an excellent application for taking handwritten notes via touch devices. This application is vector image-based and helps to draw, annotate pictures and PDFs. It brings native .rnote file format with import/export options for png, jpeg, svg and PDF. + +One of the cool features of Rnote is that it supports Xournal++ file format support (the first app in this list) which makes it a must-have tool. + +Built using GTK4 and Rust, Rnote is perfect for your GNOME desktop and all types of Linux systems. + +This application is currently under development, and keep that in mind while using. + +![Rnote – Whiteboard Application for Linux based on GTK4 and Rust][19] + +This application is available as a Flatpak package. You can set up Flatpak for your Linux system using [this guide][20] and then click on the below button to install. + +[Install Rnote][21] + +[Home page and Source code][18] + +#### 5\. Lorien + +[Lorien][22] is a perfect digital notebook software for your ideation sessions where you can create notes with its various tools. Lorien is a cross-platform, free and open-source “infinite canvas drawing/note-taking” app based on Godot Game Engine. This app is a perfect fit for taking quick notes for brainstorming sessions. + +The toolbox is pretty standard with a Freehand brush, eraser, line tool and selection tool. You can move or delete a selected section of your brushstrokes – that act as a collection of points and renders at runtime. + +![Lorien Whiteboard Application for Linux][23] + +The installation is not required to use Lorien. A self-contained executable is available to download from the below link (download the tar file). Once downloaded, extract the files and double click to run. + +[Download Lorien][24] + +[Home Page and Source Code][22] + +#### 6\. Rainbow Board + +The Rainbow Board is a free and open-source whiteboard application based on Electron and React. In general, people do not like Electron apps due to their performance and bulky nature. But as we are listing the apps in this category, I thought it’s worth mentioning this one. + +It comes with a standard canvas to draw that supports touch and stylus support. The toolbox includes Brush sizes, colours, fill colours, fonts, undo & redo actions. You can export your drawing as a PNG or SVG file. + +![Rainbow Board Whiteboard application for Linux][25] + +This application is available as Snap, Flatpak and standalone deb installer. You can download them from the page in the below link. + +[Download Rainbow Board][26] + + * [Home page][27] + * [Source code][28] + + + +### Honorable Mentions + +The last two drawing applications I want to mention here are Vectr and Ecxalidraw. These are web-based whiteboard drawing applications. I am putting them in a separate section because they are not desktop applications. + +So, if you are reluctant to install another app; Or use a school or work system where you do not have permission to install, you can open the web browser and use these. Here is their web address. + +[Vectr][29] +[Ecxalidraw][30] + +### Closing Notes + +There you go, with some modern-day whiteboard [drawing][31] applications for Linux and other operating systems. Many of you are probably taking notes in pen and paper for your online sessions or classes due to Pandemic and work-from-home situations. I am sure these will help you in your study work. + +Try these out, and you will definitely find the one best suitable for you. Let me know your comments or feedback about this list in the message box below. + +Cheers. + +_Image credit – respective app owners. Feature image credit – [unsplash][32]_ + +* * * + +We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][33], [Twitter][34], [YouTube][35], and [Facebook][36] and never miss an update! + +##### Also Read + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/02/top-whiteboard-applications-linux/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://xournalpp.github.io/ +[2]: https://www.debugpoint.com/wp-content/uploads/2022/02/Xournal-Whiteboard-Application-for-Linux-1024x576.jpg +[3]: https://xournalpp.github.io/installation/linux/ +[4]: https://xournalpp.github.io/guide/overview/ +[5]: https://github.com/xournalpp/xournalpp/ +[6]: https://openboard.ch/ +[7]: https://www.debugpoint.com/wp-content/uploads/2022/02/OpenBoard.jpg +[8]: https://openboard.ch/download.en.html +[9]: https://openboard.ch/support.html +[10]: https://github.com/OpenBoard-org/OpenBoard +[11]: http://java-notelab.sourceforge.net/ +[12]: https://www.debugpoint.com/wp-content/uploads/2022/02/NoteLab.jpg +[13]: https://www.debugpoint.com/2016/05/how-to-install-java-jre-jdk-on-ubuntu-linux-mint/ +[14]: https://www.debugpoint.com/2021/02/install-java-arch/ +[15]: https://www.debugpoint.com/2018/05/gimp-2-10-download-install-linux-ubuntu/ +[16]: https://sourceforge.net/projects/java-notelab/files/NoteLab/ +[17]: http://java-notelab.sourceforge.net/features.html +[18]: https://github.com/flxzt/rnote +[19]: https://www.debugpoint.com/wp-content/uploads/2022/02/Rnote-Whiteboard-Application-for-Linux-based-on-GTK4-and-Rust-1024x576.jpg +[20]: https://flatpak.org/setup/ +[21]: https://dl.flathub.org/repo/appstream/com.github.flxzt.rnote.flatpakref +[22]: https://github.com/mbrlabs/Lorien +[23]: https://www.debugpoint.com/wp-content/uploads/2022/02/Lorien-Whiteboard-Application-for-Linux.jpg +[24]: https://github.com/mbrlabs/Lorien/releases +[25]: https://www.debugpoint.com/wp-content/uploads/2022/02/Rainbow-Board-Whiteboard-application-for-Linux-1024x560.jpg +[26]: https://www.electronjs.org/apps/rainbow-board +[27]: https://harshkhandeparkar.github.io/rainbow-board/ +[28]: https://github.com/HarshKhandeparkar/rainbow-board +[29]: https://vectr.com/ +[30]: https://excalidraw.com/ +[31]: https://www.debugpoint.com/tag/digital-drawing +[32]: https://unsplash.com/photos/doTjbfxrmRw +[33]: https://t.me/debugpoint +[34]: https://twitter.com/DebugPoint +[35]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[36]: https://facebook.com/DebugPoint From 83803ff1ff94153dcd6444add007097bda95c055 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 21:48:58 +0800 Subject: [PATCH 247/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220204=20?= =?UTF-8?q?10=20Necessary=20Apps=20to=20Improve=20Your=20GNOME=20Desktop?= =?UTF-8?q?=20Experience=20[Part=204]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220204 10 Necessary Apps to Improve Your GNOME Desktop Experience -Part 4.md --- ...e Your GNOME Desktop Experience -Part 4.md | 310 ++++++++++++++++++ 1 file changed, 310 insertions(+) create mode 100644 sources/tech/20220204 10 Necessary Apps to Improve Your GNOME Desktop Experience -Part 4.md diff --git a/sources/tech/20220204 10 Necessary Apps to Improve Your GNOME Desktop Experience -Part 4.md b/sources/tech/20220204 10 Necessary Apps to Improve Your GNOME Desktop Experience -Part 4.md new file mode 100644 index 0000000000..1bfd8a058e --- /dev/null +++ b/sources/tech/20220204 10 Necessary Apps to Improve Your GNOME Desktop Experience -Part 4.md @@ -0,0 +1,310 @@ +[#]: subject: "10 Necessary Apps to Improve Your GNOME Desktop Experience [Part 4]" +[#]: via: "https://www.debugpoint.com/2022/02/best-gnome-apps-part-4/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +10 Necessary Apps to Improve Your GNOME Desktop Experience [Part 4] +====== +WE GIVE YOU THE NEXT SET OF 10 GNOME APPS THAT WILL SUPERCHARGE YOUR +PRODUCTIVITY WHILE USING GNOME DESKTOP. +At debugpoint.com, we highlight some unknown but useful GNOME apps over a five-part article series. The primary purpose of the series is to give these excellent little apps much-needed visibility via our readers. This helps the developer and the end-users due to increased usage of these necessary GNOME Apps and much-deserved attention. + +This post is Part 4 of the series. In this article, we will highlight ten necessary GNOME Apps. If you missed the last parts, you could read the other parts of this series via the below links. + + * [Part 1][1] + * [Part 2][2] + * [Part 3][3] + + + +In this article, we covered the following list of great GNOME Apps. + + * [Secrets – Password Manager][4] + * [Font Downloader][5] + * [Gaphor – UML Modeling Utility][6] + * [Hashbrown – Check Hash of your files][7] + * [Identity – Compare images and videos][8] + * [Khronos – Time Logging][9] + * [Markets – Watch Stock Markets][10] + * [Obfuscate – Redact Images][11] + * [Plots – Simple Graph Plotting][12] + * [squeekboard – On-screen keyboard for wayland][13] + + + +### 10 Necessary GNOME Apps + +#### Secrets – Password Manager + +The first app that we highlight is a password manager called Secrets. This GNOME Circle app uses KeePass 0.4 format to store the password in its database. This app comes with a simple interface that gives you complete control of your password and managing them. Secret perfectly integrates with your GNOME desktop, which you can install. + +![Secrets – GNOME App][14] + +You need to [Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Secrets][16] + +s + + * [Home Page][17] + * [Source Code][18] + + + +#### Font Downloader + +Installing font via terminal for new users is a bit complicated process. The next app that we are going to talk about deals with Fonts. And it is one of my favourites. The name is Font Downloader, and it does just that. + +But this app takes care of all the hassles that an average faces. You can search fonts in Google Fonts directly from its UI and install it with just a click of a button. A perfect and necessary GNOME app for your desktop. + +![Font Downloader – GNOME Apps][19] + +Here’s how to install it. + +You need to [Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Font Downloader][20] + + * [Home Page][21] + * [Source Code][22] + + + +#### Gaphor – UML Modeling Utility + +Out of all the GNOME apps we have covered so far, this one is one of the best apps. Named Gaphor, this application helps you design complex systems via Unified Modelling Language. It currently supports UML, SysML, RAAML and C4 languages and is fully compliant with the [UML 2 data model][23]. + +It is a perfect GNOME app for students or system design professionals. + +![Gaphor – GNOME Apps][24] + +You need to [Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Gaphor][25] + + * [Home Page][26] + * [Home Page (official)][27] + * [Source Code][28] + + + +#### Hashbrown – Check Hash of your files + +I will be honest. I download many .ISO files for this website and several tests. And I rarely check the hash of any file. However, I do check them when downloaded from unofficial websites. + +So, a hash is a way to verify whether your downloaded file is original or not. If someone tampered with the file, then it won’t match. So, there are many ways you can do it. + +This GNOME App – Hashbrown, does that job for you. Its unique and straightforward UI helps you to compare several hash types of a file. This app currently supports MD5, SHA-256, SHA-512 and SHA-1 hashes. A perfect and necessary utility for your GNOME desktop. + +![Hashbrown – GNOME App][29] + +You need to [Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Hashbrown][30] + + * [Official Home Page][31] _(Fun fact: You will be amazed if you open this site. Check out by yourself!)_ + * [Home Page][32] + * [Source Code][33] + + + +#### Identity – Compare images and videos + +If you need to compare multiple images or video files, you should use Identity. This GNOME app compares and gives you information about the target files. Powered by GStreamer, Identity also comes with the command line utility to compare the files. + +![Identity][34] + +You need to [Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Identity][35] + + * [Home Page][36] + * [Source Code][37] + + + +[][2] + +SEE ALSO:   10 Perfect Apps to Improve Your GNOME Experience [Part 2] + +#### Khronos – Time Logging + +If you ever need an on-demand timer that keeps track of time while you complete your task, then try Khronos. This GNOME Circle app brings a simple UI, adds a timer, and starts. You can keep track of multiple sessions in a log, as well as the ability to pause and start at any moment. + +It is a friendly GNOME app for those who need it. + +![Khronos – GNOME App][38] + +You need to [Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Khronos][39] + + * [Home Page][40] + * [Source Code][41] + + + +#### Markets – Watch Stock Markets + +I am sure you keep track of your favourite stocks or overall investment portfolio in the stock market via browser-based portals. But if you need a native desktop application to do those and more for your GNOME desktop, try Markets. + +Markets is a GNOME Circle app, and it brings a list of cool features to track stocks and helps you stay in profits. Features such as – + + * Individual Stock tracking + * Create your portfolio + * Track Cryptocurrencies, commodities + * Details via Yahoo! finance + * Supported in Linux-based smartphones (Librem5, PinePhone) + * Adjust refresh rate and Dark Mode Support + + + +![Markets – A Necessary GNOME App][42] + +You need to [Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Markets][43] + + * [Home page][44] + * [Source code][45] + + + +#### Obfuscate – Redact Images + +We often need to gray out or remove certain sensitive sections of any image for obvious reasons. So, that requires you to open the image in some image editor such as GIMP and then apply some filters. + +If you think that is too much work, try Obfuscate native app for GNOME. This GNOME Circle app helps you redact custom sections from any image and export them. This app supports all major image types. However, you can do these using LibreOffice, which requires inserting an image to the Writer document and whatnot. Try it out. + +![Obfuscate – GNOME App][46] + +You need to [Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Obfuscate][47] + + * [Home page][48] + * [Source code][49] + + + +#### Plots – Simple Graph Plotting + +If you need a quick tool to visualize those complex math formulae in nice graphs, then try Plots. This GNOME Circle app integrates well with GNOME Desktop and allows you to plot a wide range of charts or graphs. + +Here are some of its unique features: + + * Support for trigonometric, hyperbolic, exponential and logarithmic functions, as well as arbitrary sums and products + * Ability to utilize your system hardware with the support of OpenGL + * Color Support for graphs +Easy customization of graphs with the value bar which you can increase or decrease interactively to see the graphs + + + +![Plots][50] + +You need to [Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Plots][51] + + * [Home page][52] + * [Source code][53] + + + +#### squeekboard – On-screen keyboard for wayland + +The final app in this post is for only Linux mobile phones. I thought it was worth mentioning this app because of Wayland. The squeekboard is an on-screen keyboard designed for Librem5 Linux Smartphones for Wayland compositor. This GTK and Rust based application is currently under development, but most of the essential features are already implemented. + +You can learn more about it in [GitLab][54]. I couldn’t find a screenshot to share with you. However, if you are interested, try it out. + +### Closing Notes + +I hope some of these necessary GNOME apps you found helpful for your daily workflow. I am sure they did. With that said, we are wrapping up Part 4 of the series. If you would like to read the other parts, you can go over them via the links below. + +[Part 1][1] +[Part 2][2] +[Part 3][3] + +And do let me know your thoughts about this article or this series as a whole. Cheers. + +* * * + +We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][55], [Twitter][56], [YouTube][57], and [Facebook][58] and never miss an update! + +##### Also Read + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/02/best-gnome-apps-part-4/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/2021/12/best-gnome-apps-part-1/ +[2]: https://www.debugpoint.com/2021/12/best-gnome-apps-part-2/ +[3]: https://www.debugpoint.com/2022/01/best-gnome-apps-part-3/ +[4]: tmp.UAQ8Cc4ZnO#secrets-password-manager +[5]: tmp.UAQ8Cc4ZnO#font-downloader +[6]: tmp.UAQ8Cc4ZnO#gaphor-uml-modeling-utility +[7]: tmp.UAQ8Cc4ZnO#hashbrown-check-hash-of-your-files +[8]: tmp.UAQ8Cc4ZnO#identity-compare-images-and-videos +[9]: tmp.UAQ8Cc4ZnO#khronos-time-logging +[10]: tmp.UAQ8Cc4ZnO#markets-watch-stock-markets +[11]: tmp.UAQ8Cc4ZnO#obfuscate-redact-images +[12]: tmp.UAQ8Cc4ZnO#plots-simple-graph-plotting +[13]: tmp.UAQ8Cc4ZnO#squeekboard-on-screen-keyboard-for-wayland +[14]: https://www.debugpoint.com/wp-content/uploads/2022/02/Secrets-GNOME-App.jpg +[15]: https://flatpak.org/setup/ +[16]: https://flathub.org/apps/details/org.gnome.World.Secrets +[17]: https://apps.gnome.org/app/org.gnome.World.Secrets/ +[18]: https://gitlab.gnome.org/World/secrets +[19]: https://www.debugpoint.com/wp-content/uploads/2022/02/Font-Downloader-GNOME-Apps.jpg +[20]: https://dl.flathub.org/repo/appstream/org.gustavoperedo.FontDownloader.flatpakref +[21]: https://apps.gnome.org/app/org.gustavoperedo.FontDownloader/ +[22]: https://github.com/GustavoPeredo/font-downloader +[23]: https://en.wikipedia.org/wiki/Unified_Modeling_Language#UML_2 +[24]: https://www.debugpoint.com/wp-content/uploads/2022/02/Gaphor-GNOME-Apps.jpg +[25]: https://dl.flathub.org/repo/appstream/org.gaphor.Gaphor.flatpakref +[26]: https://apps.gnome.org/app/org.gaphor.Gaphor/ +[27]: https://gaphor.org/ +[28]: https://github.com/gaphor/gaphor +[29]: https://www.debugpoint.com/wp-content/uploads/2022/02/Hashbrown-GNOME-App.jpg +[30]: https://dl.flathub.org/repo/appstream/dev.geopjr.Hashbrown.flatpakref +[31]: https://hashbrown.geopjr.dev/ +[32]: https://apps.gnome.org/app/dev.geopjr.Hashbrown/ +[33]: https://github.com/GeopJr/Hashbrown +[34]: https://www.debugpoint.com/wp-content/uploads/2022/02/Identity.jpg +[35]: https://dl.flathub.org/repo/appstream/org.gnome.gitlab.YaLTeR.Identity.flatpakref +[36]: https://apps.gnome.org/app/org.gnome.gitlab.YaLTeR.Identity/ +[37]: https://gitlab.gnome.org/YaLTeR/identity +[38]: https://www.debugpoint.com/wp-content/uploads/2022/02/Khronos-GNOME-App.jpg +[39]: https://dl.flathub.org/repo/appstream/io.github.lainsce.Khronos.flatpakref +[40]: https://apps.gnome.org/app/io.github.lainsce.Khronos/ +[41]: https://github.com/lainsce/khronos +[42]: https://www.debugpoint.com/wp-content/uploads/2022/02/Markets-A-Necessary-GNOME-App.jpg +[43]: https://dl.flathub.org/repo/appstream/com.bitstower.Markets.flatpakref +[44]: https://apps.gnome.org/app/com.bitstower.Markets/ +[45]: https://github.com/bitstower/markets +[46]: https://www.debugpoint.com/wp-content/uploads/2022/02/Obfuscate-GNOME-App.jpg +[47]: https://dl.flathub.org/repo/appstream/com.belmoussaoui.Obfuscate.flatpakref +[48]: https://apps.gnome.org/app/com.belmoussaoui.Obfuscate/ +[49]: https://gitlab.gnome.org/World/obfuscate/ +[50]: https://www.debugpoint.com/wp-content/uploads/2022/02/Plots-GNOME-App.jpg +[51]: https://dl.flathub.org/repo/appstream/com.github.alexhuntley.Plots.flatpakref +[52]: https://apps.gnome.org/app/com.github.alexhuntley.Plots/ +[53]: https://github.com/alexhuntley/Plots +[54]: https://gitlab.gnome.org/World/Phosh/squeekboard +[55]: https://t.me/debugpoint +[56]: https://twitter.com/DebugPoint +[57]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[58]: https://facebook.com/DebugPoint From e3d1dd0b19631a3bd3f0e7022a0ea55b9bea9256 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 21:50:58 +0800 Subject: [PATCH 248/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220128=20?= =?UTF-8?q?Essential=20DNF=20Commands=20for=20Linux=20Users=20[With=20Exam?= =?UTF-8?q?ples]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220128 Essential DNF Commands for Linux Users -With Examples.md --- ...Commands for Linux Users -With Examples.md | 472 ++++++++++++++++++ 1 file changed, 472 insertions(+) create mode 100644 sources/tech/20220128 Essential DNF Commands for Linux Users -With Examples.md diff --git a/sources/tech/20220128 Essential DNF Commands for Linux Users -With Examples.md b/sources/tech/20220128 Essential DNF Commands for Linux Users -With Examples.md new file mode 100644 index 0000000000..5c96fc9a5a --- /dev/null +++ b/sources/tech/20220128 Essential DNF Commands for Linux Users -With Examples.md @@ -0,0 +1,472 @@ +[#]: subject: "Essential DNF Commands for Linux Users [With Examples]" +[#]: via: "https://www.debugpoint.com/2022/01/dnf-commands-examples/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Essential DNF Commands for Linux Users [With Examples] +====== +WE GIVE YOU A QUICK REFERENCE OF ESSENTIAL DNF COMMANDS WITH EXAMPLES IN +THIS GUIDE. +### What is DNF ? + +DNF (Dandified Yum) is a package manager used in RPM based Linux systems (RHEL, [Fedora][1], etc.). It is a successor of Yum package manager (Yellowdog Update Modified). The DNF package manager is efficient on performance, memory consumption and dependency resolution issues. + +This package manager is one of the best package manager other than apt package manager which is used in Ubuntu based systems. If you compare them, well, they are both awesome and have all the identical features. + +But with my experience, I feel that DNF fails lesser than apt in tricky situations. DNF handles package, dependency crisis in much better and differently. But that’s completely personal opinion. + +### In Brief + +In case, you reached this page in a hurry and no time to read the entire article, here’s a quick summary of this entire page with commands in this below table, with link to the detail section of this page. + +**Description** | **Command** +---|--- +[Check the version of DNF installed in your systems][2] | dnf –version +[Help about DNF][3] | dnf help +dnf help search +[List of Installed and Available Packages][4] | dnf list +dnf list available +dnf list installed +[Repository list][5] | dnf repolist +dnf repolist all +[Display specific information about a package][6] | dnf info package_name +[Search for any package and details about it][7] | dnf search package_name +[Find which package contains a package, value][8] | dnf provides package_name +[Installing packages using DNF][9] | dnf install package_name +[Installing a package that you downloaded manually][10] | dnf localinstall your_package_name.rpm +[Reinstalling a package][11] | dnf reinstall package_name +[Update Check and Updating your system][12] | dnf check-update +dnf list updates +dnf update +dnf update package_name +[Downgrading a package][13] | dnf downgrade package_name +[Downgrade or upgrade all packages][14] | dnf distro-sync +[Uninstall a package][15] | dnf remove application_name +[Group operations using DNF][16] | dnf grouplist +dnf groupinstall group_name +dnf groupremove group_name +[Clean up your system using DNF][17] | dnf clean all +dnf autoremove +[Find out DNF command execution history][18] | dnf history +dnf history info id_number + +Now, let’s look at the above DNF commands with examples. + +### DNF Commands Examples + +#### Installing DNF + +This might be the rare scenario when DNF is not installed in an applicable Linux system. But if DNF is not installed in your RPM based distribution, you can use Yum to install DNF. + +``` + + yum install dnf + +``` + +#### 1\. Check the version of DNF installed in your systems + +The following command shows the version included in your Linux system. + +``` + + dnf --version + +``` + +#### 2\. Getting the help about DNF + +You can easily get all the necessary DNF options and command line switches using the help option. + +``` + + dnf help + +``` + +For a specific help, say, about installation for example, you can pass the parameter as below to show that piece of help. + +``` + + dnf help search + +``` + +#### 3\. List of Installed and Available Packages + +The dnf list command gives you the list of installed and available packages. A little caution. This command may take some to execute, depending on your system state, and internet connection. Because it fetches the metadata from server. + +``` + + dnf list + +``` + +If you want a more specific list, you can use the available or installed switch to filter out the list. See below. + +``` + + dnf list available + +``` + +For installed list, use the below command. + +``` + + dnf list installed + +``` + +![dnf installed packages][19] + +#### 4\. Repository list using DNF + +There are times you want to see the list of enabled repositories in your Linux systems. With the dnf repolist command, you can achieve that. + +``` + + dnf repolist + +``` + +So, this command gives you all the enabled repo. If you want the disabled ones as well, try below command. + +``` + + dnf repolist all + +``` + +![Repo list using DNF][20] + +#### 5\. Display specific information about a package + +There are times when you need to find out details about a package. So, you can easily find that out using the below command. + +``` + + dnf info package_name + +``` + +![Information about a specific package using DNF][21] + +#### 6\. Search for any package and details about it + +Use the following search command to find any package and their source. Replace package_name with your own. As you can see in this below example, it highlights the package and their source. It gives you the result in two sections – when name is exactly matched and also in summary/description. + +``` + + dnf search package_name + +``` + +![Search for any package using DNF][22] + +#### 7\. Find which package contains a package, value + +Sometimes, you require finding out which packages or sources contains a particular executable or package name. Then the dnf provides command helps. For example, you want to find out which sources contain ifconfig, then you can find it out like below example. This is one of the best feature of dnf while researching dependency problems. + +``` + + dnf provides package_name + +``` + +![dnf provides command example][23] + +#### 8\. Installing packages using DNF + +Probably the most used command is dnf install which helps to install an application or package. The command is simple. + +``` + + dnf install package_name + +``` + +If you want to install from a specific repo, you can use the –enablerepo switch while issuing this command. + +``` + + dnf --enablerepo=epel install phpmyadmin + +``` + +#### 9\. Installing a package that you downloaded manually + +There are times, when you manually downloaded a .rpm package locally. And you want to install. You can install the same using localinstall command with .rpm file full qualified path. + +``` + + dnf localinstall your_package_name.rpm + +``` + +[][24] + +SEE ALSO:   How to Switch Desktop Environment in Fedora + +The above command should resolve all the dependencies while installing a target .rpm package. If not, one can issue the following command. + +``` + + dnf --nogpgcheck localinstall your_package_name.rpm + +``` + +Another way to install a local .rpm package is using the dnf install command. + +``` + + dnf install *.rpm + +``` + +#### 10\. Reinstalling a package + +Reinstalling a package is simple using the reinstallation switch of DNF. + +``` + + dnf reinstall package_name + +``` + +#### 11\. Update Check and Updating your system + +In an RPM based system (such as Fedora, Red Hat Linux, etc.), update is primarily handled by DNF package manager. The following four commands take care of various update scenarios, as explained below. + +The check-update option checks for all the update available for your system. This option also takes a package name in its parameter. However, if no package name is specified, then it checks for updates for all installed packages in your system. + +``` + + dnf check-update + +``` + +To list out all the updates in your Linux system, use the list option. + +``` + + dnf list updates + +``` + +And to install updates for your entire Linux system, issue the update option. + +``` + + dnf update + +``` + +You can also update a specific application or package by mentioning the package name as parameter to the update option. + +``` + + dnf update package_name + +``` + +#### 12\. Downgrading a package + +If you need to downgrade a package to its prior version, then you can use the downgrade option of DNF. Be very careful while issuing this command. This command erases the current version of a package and install the highest of all the prior lower version available. + +``` + + dnf downgrade package_name + +``` + +![Downgrading a package using DNF][25] + +#### 13\. Downgrade or upgrade all packages + +The distro-sync command downgrade or upgrade all packages to the latest versions for your system enabled repos. + +``` + + dnf distro-sync + +``` + +#### 14\. Uninstall a package + +You can uninstall or remove any application or package using remove option of DNF. + +``` + + dnf remove application_name + +``` + +#### 15\. Group operations using DNF + +One of the great feature of RPM based system is grouping of packages. A group is a collection of packages logically grouped together. It helps to install them all at one go by issuing a single command with group name. + +The grouplist command gives you the name of available groups. + +``` + + dnf grouplist + +``` + +![DNF grouplist command][26] + +And to install a group with all packages of it, use groupinstall option with the group name. + +``` + + dnf groupinstall group_name + +``` + +Remove a group and all the packages using the groupremove option. + +``` + + dnf groupremove group_name + +``` + +#### 16\. Clean up your system using DNF + +To remove all the temporary files for enabled repos in your system, use the clean option with all switch. + +``` + + dnf clean all + +``` + +If you want to remove a specific temporary file, use the various options as outlined below. + +Removes cache files for repo metadata. + +``` + + dnf clean dbcache + +``` + +Remove the local cookie files that contains download time signature of the packages for each repo. + +``` + + dnf clean expire-cache + +``` + +Removes all the repo metadata. + +``` + + dnf clean metadata + +``` + +Removes any cached packages. + +``` + + dnf clean packages + +``` + +Over time, a system consumes many applications and packages installed by the user. The following autoremove option removes all the leaf packages that are installed as dependencies for any user installed applications but no longer needed. So, they can be safely removed to recover disk space. + +``` + + dnf autoremove + +``` + +![Clean up your system using DNF][27] + +#### 17\. Find out DNF command execution history + +If you want a list of all commands that has run using DNF since the beginning of a Linux system, then use the history option. This lists all the commands that issued until now. + +``` + + dnf history + +``` + +To view more details about a specific history, use the info option with the ID number, as shown in the above list. This is one of the amazing feature of DNF, where you can exactly find out what happened on that particular DNF command. It contains the start and end time, who ran it, what are the packages installed, updated, etc. + +``` + + dnf history info id_number + +``` + +![DNF history command examples][28] + +### Closing Notes + +I am sure, you know already about most of the above DNF commands that explained with examples. But hey, a ready reference of DNF commands is always needed when things go wrong. So, I hope this DNF commands with examples guide helps you find out the DNF command which you are looking for, and eventually resolve your problem. + +Let me know whether this helps, or, any command you would like to add in this list. + +_[Official DNF Command reference][29]_ + +* * * + +We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][30], [Twitter][31], [YouTube][32], and [Facebook][33] and never miss an update! + +##### Also Read + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/01/dnf-commands-examples/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/tag/fedora +[2]: tmp.PKOlKcPzZd#1-check-the-version-of-dnf-installed-in-your-systems +[3]: tmp.PKOlKcPzZd#2-getting-the-help-about-dnf +[4]: tmp.PKOlKcPzZd#3-list-of-installed-and-available-packages +[5]: tmp.PKOlKcPzZd#4-repository-list-using-dnf +[6]: tmp.PKOlKcPzZd#5-display-specific-information-about-a-package +[7]: tmp.PKOlKcPzZd#6-search-for-any-package-and-details-about-it +[8]: tmp.PKOlKcPzZd#7-find-which-package-contains-a-package-value +[9]: tmp.PKOlKcPzZd#8-installing-packages-using-dnf +[10]: tmp.PKOlKcPzZd#9-installing-a-package-that-you-downloaded-manually +[11]: tmp.PKOlKcPzZd#10-reinstalling-a-package +[12]: tmp.PKOlKcPzZd#11-update-check-and-updating-your-system +[13]: tmp.PKOlKcPzZd#12-downgrading-a-package +[14]: tmp.PKOlKcPzZd#13-downgrade-or-upgrade-all-packages +[15]: tmp.PKOlKcPzZd#14-uninstall-a-package +[16]: tmp.PKOlKcPzZd#15-group-operations-using-dnf +[17]: tmp.PKOlKcPzZd#16-clean-up-your-system-using-dnf +[18]: tmp.PKOlKcPzZd#17-find-out-dnf-command-execution-history +[19]: https://www.debugpoint.com/wp-content/uploads/2022/01/dnf-installed-packages-1024x549.jpg +[20]: https://www.debugpoint.com/wp-content/uploads/2022/01/Repo-list-using-DNF-1024x549.jpg +[21]: https://www.debugpoint.com/wp-content/uploads/2022/01/Information-about-a-specific-package-using-DNF-1024x481.jpg +[22]: https://www.debugpoint.com/wp-content/uploads/2022/01/Search-for-any-package-using-DNF-1024x481.jpg +[23]: https://www.debugpoint.com/wp-content/uploads/2022/01/dnf-provides-command-example-1024x290.jpg +[24]: https://www.debugpoint.com/2020/08/how-to-switch-desktop-environment-in-fedora/ +[25]: https://www.debugpoint.com/wp-content/uploads/2022/01/Downgrading-a-package-using-DNF-1024x412.jpg +[26]: https://www.debugpoint.com/wp-content/uploads/2022/01/DNF-grouplist-command-1024x541.jpg +[27]: https://www.debugpoint.com/wp-content/uploads/2022/01/Clean-up-your-system-using-DNF-1024x216.jpg +[28]: https://www.debugpoint.com/wp-content/uploads/2022/01/DNF-history-command-examples-1024x711.jpg +[29]: https://dnf.readthedocs.io/en/latest/command_ref.html +[30]: https://t.me/debugpoint +[31]: https://twitter.com/DebugPoint +[32]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[33]: https://facebook.com/DebugPoint From 3706fa561a393abbc0df497aac2d00274a44d1af Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 21:52:28 +0800 Subject: [PATCH 249/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220121=20?= =?UTF-8?q?10=20Great=20Apps=20to=20Improve=20Your=20GNOME=20Experience=20?= =?UTF-8?q?[Part=203]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220121 10 Great Apps to Improve Your GNOME Experience -Part 3.md --- ...o Improve Your GNOME Experience -Part 3.md | 334 ++++++++++++++++++ 1 file changed, 334 insertions(+) create mode 100644 sources/tech/20220121 10 Great Apps to Improve Your GNOME Experience -Part 3.md diff --git a/sources/tech/20220121 10 Great Apps to Improve Your GNOME Experience -Part 3.md b/sources/tech/20220121 10 Great Apps to Improve Your GNOME Experience -Part 3.md new file mode 100644 index 0000000000..53dfd37e8b --- /dev/null +++ b/sources/tech/20220121 10 Great Apps to Improve Your GNOME Experience -Part 3.md @@ -0,0 +1,334 @@ +[#]: subject: "10 Great Apps to Improve Your GNOME Experience [Part 3]" +[#]: via: "https://www.debugpoint.com/2022/01/best-gnome-apps-part-3/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +10 Great Apps to Improve Your GNOME Experience [Part 3] +====== +WE PRESENT THE NEXT SET OF GREAT GNOME APPS THAT BRINGS MULTITUDE OF +PRODUCTIVITY BOOST WHILE USING YOUR FAVORITE GNOME DESKTOP. +We are progressing with the best GNOME Apps discovery series with this article. The purpose of the series is to create awareness and highlight several unknown GNOME Apps. This gives boost to the developers and overall development. Also helps the end user – like you and me – with their daily work in GNOME desktop. + +This is part 3 of the 5 part series. In case you have arrived here from other references, you can read the previous posts here: + + * [Part 1][1] + * [Part 2][2] + * [Part 4][3] + + + +In this article, we covered the following list of great GNOME Apps. + + * [Sysprof – System Profiler][4] + * [Pika Backup – Backup Software][5] + * [Contrast – Color Combination Checker][6] + * [Decoder – QR Code Scanner and Generator][7] + * [Mahjongg – The Classic Game][8] + * [Authenticator – 2FA Authentication][9] + * [Drawing – A Painting App for GNOME Desktop][10] + * [Curtail – Image Compression App][11] + * [Fractal – Matrix Messaging Client for GNOME][12] + * [Telegrand – Telegram Client][13] + + + +### Great GNOME Apps – Part 3 + +#### Sysprof – System Profiler + +The first app we highlight is called sysprof. This is mostly developer specific application that gives you system performance details for Linux Kernel and other user-space applications. With this application, you can identify the threads, stacks, their individual performances, object types and a good deal of other information. Armed with this information, a developer can easily debug and find out the problems in their respective application. + +This is a GNOME Circle app and well maintained. + +![Sysprof – GNOME Apps][14] + +This application does not come with Flatpak executable module. So, you have to compile and build using Kernel Headers for your system. You can find the detailed steps outlined in the below links. + +[How to compile and Build sysprof][15] +[Getting Started Guide of sysprof][16] + +More Information: + + * [Home Page][17] 1 + * [Home Page 2][18] + * [Source][19] + + + +#### Pika Backup – Backup Software + +When you lose data, then only you remember about Backup software. This is a true fact. Worry not. Pika Backup takes care of all the hassles of taking backups with its simply UI. It is powered by the popular borg-backup software and comes with all necessary feature such as – + +a) Ability to take backups in local or remote location +b) Feature of only backing up the changed files/directories, saving time and bandwidth +c) Encryption support +d) recovery from backup +e) Browsing the already created backups. + +However, scheduling backups is under development, and we hope it soon arrives. + +This is a GNOME Circle app and one of the must-have GNOME App for your desktop. + +![Pika Backup App][20] + +Here’s how to install. + +[Setup Flatpak][21] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Pika Backup][22] + +Additional Information about Pika Backup + + * [Home Page][23] + * [Source Code][24] + + + +#### Contrast – Color Combination Checker + +This nice little tool is mostly for web developers who want to quickly pick up two colors that look great. Named Contrast, this utility follows [Web Content Accessibility Guidelines][25] (WCAG) with options to choose HEX color codes, view the contrast ratio. A great time saving tool for the developers. + +![Contrast App][26] + +Here’s how to install. + +[Setup Flatpak][21] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Contrast][27] + +Additional information about Contrast: + +[Source Code][28] + +#### Decoder – QR Code Scanner and Generator + +Decoder is a simple tool that helps to do everything related to QR Code. This GNOME Circle app is capable of generating QR code, scan for codes, scan via uploading an image and obviously parse QR Code contents. + +A nifty tool for your GNOME Desktop when you need it. Here’s how it looks and how to install. + +![Decoder App][29] + +[Setup Flatpak][21] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Decoder][30] + +Additional information about Decoder: + + * [Home Page][31] + * [Source Code][32] + + + +#### Mahjongg – The Classic Game + +This is one of the game that was available in several Linux distributions since the beginning of Linux. And now it is available for your GNOME desktop. Mahjongg is a one-player version of the classic Eastern tile game, whose only objective is to select a pair of similar tiles. + +A Fun fact: There is a theory that this game is made by the famous Chinese philosopher Confucius. + +![Mahjongg – A Classic Game][33] + +This is how you can install this addictive game in your GNOME Desktop. + +[][34] + +SEE ALSO:   Top 10 KDE Application That You Didn't Know About + +[Setup Flatpak][21] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Mahjongg][35] + +Additional information about this great GNOME Game app: + + * [Source Code][36] + * [Home Page][37] + * [How to play][38] + + + +#### Authenticator – 2FA Authentication + +Two-Factor Authentication (2FA) is everywhere these days. It is one of the safest authentication method used by all popular service providers such as Google, GitHub, etc. Mostly, there are apps available for 2FA in all mobile Platform. However, you can also set this up as a native desktop app in your GNOME desktop. + +The Authenticator app generates 2FA codes and supports Time-based/Counter-based/Steam methods. You can easily set up the methods using its built-in QR code scanner or via uploading an image. + +![Authenticator GNOME App][39] + +This is how you can install this GNOME Circle app. + +[Setup Flatpak][21] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Authenticator App][40] + +Additional information of this app: + + * [Home Page][41] + * [Source Code][42] + + + +#### Drawing – A Painting App for GNOME Desktop + +Drawing is one of the best GNOME apps out there which is a perfect program for quick drawing. It is an alternative to MS Paint program and capable of doing all necessary editing tasks such as: + + * Draw and Edit with pencil, line or arc tool + * Selection support (cut, copy, paste, drag) + * Shapes (rectangle, circle, polygon) + * Editing features – resize, crop, rotate + * Available in GNU/Linux Phones as an App + * And supports both X11 and Wayland display servers + + + +![Drawing GNOME App][43] + +This is how to install this great GNOME app. + +[Setup Flatpak][21] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Drawing][44] + +Additional information about this app. + + * [Home Page][45] + * [Source Code][46] + + + +#### Curtail – Image Compression App + +Need a quick image compression tool? Try Curtail. This GNOME app is another best tool to quickly reduce size of your images with its simple UI. It supports WebP, PNG, JPG image types. Curtail can compress both lossless and lossy types with option to remove metadata. + +![Curtail][47] + +This is one of the must-have tool for your GNOME desktop. This is how to install. + +[Setup Flatpak][21] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Curtail][48] + +Additional information about Curtail + + * [Home Page][49] + * [Source Code][50] + + + +#### Fractal – Matrix Messaging Client for GNOME + +Fractal is a Matrix messaging client for your GNOME desktop. It is written in rust and provides all necessary features for your collaboration in the popular Matrix messaging platform. + +![Fractal – Matrix Messaging Client][51] + +This is how to install. + +[Setup Flatpak][21] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Fractal][52] + +Additional information about Fractal + +[Source Code][53] + +#### Telegrand – Telegram Client + +The final app in this list is Telegrand. This application is not stable at the moment and under development. However, I feel it is worth mentioning here because of its potential. The Telegram messaging app have its own native desktop application. However, this GTK based Telegrand act perfectly for your desktop with its features. + +There is no installer available at the moment. But you can easily build it from source via instructions present in [GitHub][54]. + +We hope to see this app become stable in near future and available in GNOME Desktop as well as in GNU/Linux Phones. + +### Closing Notes + +So, with these 10 apps, we conclude the Part 3 of the great GNOME Apps series. We covered some unique and unknown application in this article. I hope you can utilize some of these apps for your daily workflow. + +If you missed the other parts of the series, they are present in the below links. + + * [Part 1][1] + * [Part 2][2] + * [Part 4][3] + + + +Let me know your comments or suggestions about the apps, or, this series as a whole. + +* * * + +We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][55], [Twitter][56], [YouTube][57], and [Facebook][58] and never miss an update! + +##### Also Read + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/01/best-gnome-apps-part-3/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/2021/12/best-gnome-apps-part-1/ +[2]: https://www.debugpoint.com/2021/12/best-gnome-apps-part-2/ +[3]: https://www.debugpoint.com/2022/02/best-gnome-apps-part-4/ +[4]: tmp.W80b1YR7vZ#sysprof +[5]: tmp.W80b1YR7vZ#pika-backup +[6]: tmp.W80b1YR7vZ#contrast +[7]: tmp.W80b1YR7vZ#decoder +[8]: tmp.W80b1YR7vZ#mahjongg +[9]: tmp.W80b1YR7vZ#authenticator +[10]: tmp.W80b1YR7vZ#drawing +[11]: tmp.W80b1YR7vZ#curtail +[12]: tmp.W80b1YR7vZ#fractal +[13]: tmp.W80b1YR7vZ#telegrand +[14]: https://www.debugpoint.com/wp-content/uploads/2022/01/Sysprof-GNOME-Apps.jpg +[15]: https://gitlab.gnome.org/GNOME/sysprof#building-sysprof +[16]: https://blogs.gnome.org/chergert/2020/03/14/how-to-use-sysprof-to/ +[17]: https://apps.gnome.org/app/org.gnome.Sysprof3/ +[18]: http://www.sysprof.com/ +[19]: https://gitlab.gnome.org/GNOME/sysprof +[20]: https://www.debugpoint.com/wp-content/uploads/2022/01/Pika-Backup-App.jpg +[21]: https://flatpak.org/setup/ +[22]: https://dl.flathub.org/repo/appstream/org.gnome.World.PikaBackup.flatpakref +[23]: https://apps.gnome.org/app/org.gnome.World.PikaBackup/ +[24]: https://gitlab.gnome.org/World/pika-backup/ +[25]: https://www.w3.org/WAI/standards-guidelines/wcag/ +[26]: https://www.debugpoint.com/wp-content/uploads/2022/01/Contrast-App.jpg +[27]: https://dl.flathub.org/repo/appstream/org.gnome.design.Contrast.flatpakref +[28]: https://gitlab.gnome.org/World/design/contrast +[29]: https://www.debugpoint.com/wp-content/uploads/2022/01/Decoder-App.jpg +[30]: https://www.debugpoint.com/2022/01/best-gnome-apps-part-3/Setup%20Flatpak%20for%20your%20Linux%20distribution.%20And%20then%20click%20on%20the%20below%20button%20to%20launch%20the%20native%20software%20manager%20to%20install%20(such%20as%20Software%20or%20Discover). +[31]: https://apps.gnome.org/app/com.belmoussaoui.Decoder/ +[32]: https://gitlab.gnome.org/World/decoder/ +[33]: https://www.debugpoint.com/wp-content/uploads/2022/01/Mahjongg-A-Classic-Game.jpg +[34]: https://www.debugpoint.com/2021/12/top-10-uknown-kde-application/ +[35]: https://dl.flathub.org/repo/appstream/org.gnome.Mahjongg.flatpakref +[36]: https://gitlab.gnome.org/GNOME/gnome-mahjongg/ +[37]: https://wiki.gnome.org/Apps/Mahjongg +[38]: https://help.gnome.org/users/gnome-mahjongg/stable/ +[39]: https://www.debugpoint.com/wp-content/uploads/2022/01/Authenticator-GNOME-App4.jpg +[40]: https://dl.flathub.org/repo/appstream/com.belmoussaoui.Authenticator.flatpakref +[41]: https://apps.gnome.org/app/com.belmoussaoui.Authenticator/ +[42]: https://gitlab.gnome.org/World/Authenticator +[43]: https://www.debugpoint.com/wp-content/uploads/2022/01/Drawing-GNOME-App2.png +[44]: https://dl.flathub.org/repo/appstream/com.github.maoschanz.drawing.flatpakref +[45]: https://maoschanz.github.io/drawing/ +[46]: https://github.com/maoschanz/drawing/ +[47]: https://www.debugpoint.com/wp-content/uploads/2022/01/Curtail.jpg +[48]: https://dl.flathub.org/repo/appstream/com.github.huluti.Curtail.flatpakref +[49]: https://apps.gnome.org/app/com.github.huluti.Curtail/ +[50]: https://github.com/Huluti/Curtail/ +[51]: https://www.debugpoint.com/wp-content/uploads/2022/01/Fractal-Matrix-Messaging-Client.jpg +[52]: https://dl.flathub.org/repo/appstream/org.gnome.Fractal.flatpakref +[53]: https://gitlab.gnome.org/GNOME/fractal +[54]: https://github.com/melix99/telegrand/ +[55]: https://t.me/debugpoint +[56]: https://twitter.com/DebugPoint +[57]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[58]: https://facebook.com/DebugPoint From 779abfa0b7319d0fa044252c9e672c85d389b39d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 21:53:04 +0800 Subject: [PATCH 250/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220121=20?= =?UTF-8?q?KDE=20Plasma=20Desktop=20Guide=20[A=20Beginner=E2=80=99s=20Manu?= =?UTF-8?q?al]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220121 KDE Plasma Desktop Guide -A Beginner-s Manual.md --- ...asma Desktop Guide -A Beginner-s Manual.md | 179 ++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 sources/tech/20220121 KDE Plasma Desktop Guide -A Beginner-s Manual.md diff --git a/sources/tech/20220121 KDE Plasma Desktop Guide -A Beginner-s Manual.md b/sources/tech/20220121 KDE Plasma Desktop Guide -A Beginner-s Manual.md new file mode 100644 index 0000000000..eb8c0d1198 --- /dev/null +++ b/sources/tech/20220121 KDE Plasma Desktop Guide -A Beginner-s Manual.md @@ -0,0 +1,179 @@ +[#]: subject: "KDE Plasma Desktop Guide [A Beginner’s Manual]" +[#]: via: "https://www.debugpoint.com/2022/01/kde-plasma-guide/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +KDE Plasma Desktop Guide [A Beginner’s Manual] +====== +WE GIVE YOU A GETTING STARTED GUIDE WITH KDE PLASMA DESKTOP IN THIS +COMPREHENSIVE ARTICLE. +KDE Plasma is the most popular and widely used Linux desktop today. If you are planning to switch to Linux from Windows, then this is a perfect desktop to start with. If you are a student – planning to start your Linux journey with KDE Plasma desktop, then you are at the right place. + +In this overview article, we give you easy to understand pointers on how to use KDE Plasma desktop while referring to the basic functionalities and activities. This guide is heavily inclined to the absolute new users starting their Linux Journey with KDE Plasma desktop. Furthermore, we explained most of the topics via GUI method to help the newbies. + +Let’s begin. + +![Kubnutu 21.04 running with KDE Plasma 5.22][1] + +### KDE Plasma Desktop – Beginner’s Guide + +#### Installation of Kubuntu with KDE Plasma as Dual Boot + +KDE Plasma desktop is available with Kubuntu, Fedora Linux, and other Linux distributions. So, to install KDE Plasma Desktop in your computer, you need to download a Linux Distribution. + +For a beginner, I would recommend trying Kubuntu or Fedora Linux KDE Edition. Link for downloading those, present below. I believe, Kubuntu LTS editions are the perfect and stable for new users. + +[Download Kubuntu][2] + +[Download Fedora KDE Edition][3] + +The installation is not part of this article. However, if you are using Windows, you can install using [this guide][4] as a dual boot. If you have a spare Laptop or desktop, you can create a bootable USB stick via [this nice tutorial][5] and boot from it. + +Then follow the on-screen instructions to install Linux with KDE Plasma desktop. + +#### Desktop Overview + +When you first experience KDE Plasma desktop, you should see a nice desktop with a default bottom panel which includes standard shortcut of main applications and a system tray. This desktop follows the traditional menu-driven user interface principles, which requires little to no learning for people migrating from Windows. You do not need to learn tweaks, gestures or any other special features to start using this. + +![KDE Plasma Desktop Showing Basic Items][6] + +The Application menu can be launched from the very left icon of the Panel. The icon might be different for Ubuntu or Fedora. But you get the idea. + +On the right click context menu of the desktop, you have all the necessary actions such as changing wallpaper, settings. They are pretty self-explanatory. + +The Application menu gives you all the necessary application names to start your work on this desktop. If you don’t know which application is needed to perform a specific task, then you can simply find out by typing some text in the search bar. + +#### Connecting to Internet + +Perhaps the most important first task is to connect to the internet. If you have Wi-Fi zones, you can easily find that out from the icon in the system tray. Then click on the name of the connection, enter password. And you should be connected. + +![KDE Plasma System Tray Showing Wi-Fi Networks][7] + +If you want to configure more, you can search System Settings in Application Launch and open it. Then under Connections, you can further configure your Wi-Fi or wired network. + +#### How to change the look and feel – wallpaper, themes, etc. ? + +It is obvious that you may need to change the default wallpaper, themes, colors – right? Changing those are super easy in KDE Plasma. Hit the Application menu, open System Settings. The default first page should give you the option to change the wallpaper, as outlined in the below image. + +You can select your favorite one and press Ok. You can also choose any other image using the Add Image button at the bottom. + +![Changing Wallpaper is Easy in KDE Plasma Desktop][8] + +#### How to update your system and install/uninstall software? + +The KDE Plasma desktop has a utility called Discover to manage installation and removal of software in your system. It supports almost all popular package management format – apt, dnf, Flatpak, Snap and AppImage. To open this application, search for Discover in Application Menu. + +The user interface of Discover very easy to grasp for novice users. + +![Discover Showing Various Options][9] + +On the left side you have options to view installed application from the “Installed” button. The “Updates” button gives you details about the update available in your system. Usually Discover automatically checks for updates. However you can still force check updates using the “Check for Updates” button. + +And when you hit the “Update All” button, Discover downloads and applies those updates. No further action required from your end. + +[][10] + +SEE ALSO:   Top 10 KDE Application That You Didn't Know About + +Furthermore, the search button at top left corner gives you option to find any application you want for installation. It searches the application in your software sources defined. The software sources are present in the settings of Discover. + +Discover is also gives you ability browse application catalogue via their type from the “Applications” button on the left of the window. + +And with just a click on the “Install” button, installs any application. To uninstall any application, click on the Installed button on the left which gives you the list of installed applications with a “Remove” button. + +#### File Manager or File Explorer + +The heart of any desktop is the file manager. Perhaps, this is the most used application in any system. KDE Plasma’s file manager name is Dolphin. Dolphin is one of the best Linux File manager today. It comes with almost all required settings and features that are required for your work. If you compare this to Windows Explorer, well, Dolphin is far smarter than Windows Explorer. + +Here’s how it looks. On the left side, drives, network path, and folder shortcuts are present. Search, view options and additional menu is present at the top. + +![Dolphin File Manager Showing Options][11] + +Perhaps the most important usability feature of Dolphin is the Split view and tabbed view. Most of the file manager including Windows Explorer lacks this two feature. + +#### Learn About KDE Ecosystem and Applications + +KDE Plasma desktop brings lots of in-house standalone desktop application to help you on your day-to-day work. They are specially designed to work well with Plasma desktop with better integration and performance. + +A few of the apps installed by default. However, several additional KDE native applications which you can install via Discover Software catalog. Another way is to go to and learn more about KDE Applications. + +![apps.kde.org gives you one-stop shop for all KDE App Info][12] + +#### Be productive using KRunner + +The default launcher of KDE Plasma desktop is called KRunner. It is a program designed to search and launch any applications, quick calculation, search inside files and many new features. + +You can launch it anytime, during any workflow situation in the desktop. Launch it via ALT+F2 and type anything. + +![Open any program using Krunner][13] + +![calculate using Krunner][14] + +#### How to watch movies, Netflix and other streaming services? + +If you are just a casual user and planning to adopt KDE Plasma desktop as daily driver, then it’s a perfect choice. For example, watching YouTube, Netflix or other streaming services are easy and well-supported by this desktop with any Linux Distributions. Usually these are browser based activity, which can easily be done using the default Firefox browser. So, open Firefox web browser and play your favorite streaming services without any issues. + +#### What happens, if you run into errors or need help? + +If you are a beginner, there will be time when you are stuck or ran into some errors. So, first option I would suggest is do a Google Search to find out the details about your issue in KDE Plasma desktop. + +You can also take help from helpful community using the below forums: + + * + * + + + +### What’s Next? + +Now that you learned about basics of KDE Plasma desktop, I would recommend you to arm yourself with more features and tricks of this desktop using our following exclusive guides. + +### Closing Notes + +I hope, this KDE Plasma guide helps you to get started with this awesome desktop within minutes. And remember, KDE Plasma desktop can be customized to a great extent. You can literally transform this desktop to anything. It is loaded with many options, tweaks – that is impossible to memorize together. + +That said, as you get started, you should start exploring more options, tweaks in this awesome desktop. And say goodbye to Windows. + +What you think about this KDE Plasma guide? Does it help? Let me know in the comment box below. + +* * * + +We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][15], [Twitter][16], [YouTube][17], and [Facebook][18] and never miss an update! + +##### Also Read + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/01/kde-plasma-guide/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/wp-content/uploads/2021/06/Kubutu-21.04-running-with-KDE-Plasma-5.22-1024x531.jpg +[2]: https://kubuntu.org/ +[3]: https://spins.fedoraproject.org/kde/ +[4]: https://www.debugpoint.com/2019/01/complete-guide-how-dual-boot-ubuntu-windows/ +[5]: https://nextstep.tcs.com/campus/ +[6]: https://www.debugpoint.com/wp-content/uploads/2022/01/KDE-Plasma-Desktop-Showing-Basic-Items-1024x576.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/01/KDE-Plasma-System-Tray-Showing-Wi-Fi-Icons.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/01/Changing-Wallpaper-is-Easy-in-KDE-Plasma-Desktop-1024x464.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2022/01/Discover-Showing-Variosu-Options.jpg +[10]: https://www.debugpoint.com/2021/12/top-10-uknown-kde-application/ +[11]: https://www.debugpoint.com/wp-content/uploads/2022/01/Dolphin-File-Manager-Showing-Options-1024x567.jpg +[12]: https://www.debugpoint.com/wp-content/uploads/2022/01/apps.kde_.org-gives-you-one-stop-shop-for-all-KDE-App-Info-1024x765.jpg +[13]: https://www.debugpoint.com/wp-content/uploads/2021/01/Open-any-program-using-Krunner.gif +[14]: https://www.debugpoint.com/wp-content/uploads/2021/01/calculate-using-Krunner.gif +[15]: https://t.me/debugpoint +[16]: https://twitter.com/DebugPoint +[17]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[18]: https://facebook.com/DebugPoint From 70f45d78235ebaded1a7d4befe8e18f8ec692afc Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 21:53:37 +0800 Subject: [PATCH 251/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220114=20?= =?UTF-8?q?Ubuntu=2022.04=20LTS=20=E2=80=9CJammy=20Jellyfish=E2=80=9D=20?= =?UTF-8?q?=E2=80=93=20New=20Features=20and=20Release=20Details?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220114 Ubuntu 22.04 LTS -Jammy Jellyfish- - New Features and Release Details.md --- ...ish- - New Features and Release Details.md | 184 ++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100644 sources/tech/20220114 Ubuntu 22.04 LTS -Jammy Jellyfish- - New Features and Release Details.md diff --git a/sources/tech/20220114 Ubuntu 22.04 LTS -Jammy Jellyfish- - New Features and Release Details.md b/sources/tech/20220114 Ubuntu 22.04 LTS -Jammy Jellyfish- - New Features and Release Details.md new file mode 100644 index 0000000000..a65ed67057 --- /dev/null +++ b/sources/tech/20220114 Ubuntu 22.04 LTS -Jammy Jellyfish- - New Features and Release Details.md @@ -0,0 +1,184 @@ +[#]: subject: "Ubuntu 22.04 LTS “Jammy Jellyfish” – New Features and Release Details" +[#]: via: "https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Ubuntu 22.04 LTS “Jammy Jellyfish” – New Features and Release Details +====== +IT’S TIME TO UNWRAP THE NEW FEATURES OF UBUNTU 22.04 LTS “JAMMY +JELLYFISH”. WE GIVE YOU ALL THE RELEVANT INFORMATION, AND YOU STAY UP TO +DATE UNTIL THE FINAL RELEASE. +The Ubuntu LTS releases are rare, and they are significant because they set the course for the next five years for everyone – from you/me to the enterprises who run thousands of machines/virtual systems with Ubuntu. + +The upcoming Ubuntu 22.04 LTS code named Jammy Jellyfish is shaping up to be another big LTS release, although there will be misses in terms of the latest tech and packages. + +As of first writing this post, we have some idea about the new features, updates and enhancements from several official/unofficial sources. And we intend to give you a summary of those while keeping this post updated until the final release so that you get a single source of all the information about Ubuntu 22.04 LTS. + +Let’s take a look at the official schedule. + +### Ubuntu 22.04 LTS – Release Schedule + +Ubuntu 22.04 LTS Jammy Jellyfish releases on April 21, 2022. Before that, the Ubuntu team should meet the following milestones. + + * February 24, 2022: **Feature Freeze** + * March 17, 2022: **UI Freeze** + * March 31, 2022: **Beta Release** + * April 21, 2022: **Final Release** + + + +This release is supported until April 2027. + +![Ubuntu 22.04 LTS \(daily build\) Desktop][1] + +### Ubuntu 22.04 – New Features + +#### Kernel + +Linux Kernel 5.15 LTS will be the initial Kernel for this long term Ubuntu release. Released around Halloween 2021 last year, Linux Kernel 5.15 brings several essential improvements. Usual new driver and hardware updates across processor, GPU, network, file system families. This Kernel also brings the fast NTFS3 driver from Paragon Software, mainlined in this version. Other notable benefits of this Kernel are Apple M1 SOC support, in-Kernel SMB driver, Realtech Wi-Fi driver support for RTL8188EU chipset, etc. You can read the details about what this Kernel has to offer in our [Linux Kernel 5.15 coverage][2]. + +#### GNOME Desktop Version + +There is still discussion on the base version of GNOME in this LTS release. However, it is confirmed that [GNOME 42][3] will be the default gnome-shell version. + +But there is a catch. + +You must have heard that GNOME 42 is bringing an updated version of GTK4 applications with libadwaita library-port for those apps. The Ubuntu desktop team plans for GNOME 42, but the default installed applications remain based on GTK3. A sensible decision from the desktop team, in my opinion. Because moving to GNOME 42 + GTK4 + libadwaita ports – all of these requires a lot of regression tests. Not to mention the risk of breaking things here and there. This is too much of an overhead for LTS release, a default choice for most of the user base and arguably the most downloaded/upgraded version. + +Now, Ubuntu already has a dark theme in its settings. GNOME 42 also brings system-wide dark style preference, which the applications can adapt automatically. How both these pans out – is still under discussion at the moment. + +#### Look and Feel + +On the look-n-feel side, there is a change in the Yaru GTK theme base colour, which is the default theme for Ubuntu. The usual Purple accent colour is changing to Orange. Now, be cautious that it may feel like staggering orange shades. Look at this screenshot. + +![Is this too Orange-y?][4] + +#### New Installer + +The default installer of Ubuntu hasn’t changed much since, like, forever. So, with that in mind, the team was working on the new Flutter based installer to replace the old one. Now, it has been in the works for the last couple of months and hasn’t made it to the final release. + +![New Flutter based Ubuntu Installer][5] + +Hopefully, the new installer can make it to this LTS release. But it is still not arrived in daily-build. And when I tried this in Canary .ISO – it crashed even before installing. Let’s keep the finger crossed, and we hope to see it in action in the final release. + +[][6] + +SEE ALSO:   Ubuntu 22.04 Jammy Jellyfish Daily Builds Are Now Available + +#### Packages and Application Updates + +Besides the above changes, core packages default applications bring their latest stable version. Here’s a quick list. + + * Python 3.10 + * Php8.1 + * Ruby 3.0 + * Thunderbird 91.5 + * Firefox 96.0 + * LibreOffice 7.2.5 + * PulseAudio 15.0 + * NetworkManager 1.32 + + + +And the new Yaru icon theme in LibreOffice looks stunning, though. + +![Yaru Icon Theme for LibreOffice looks stunning with Orange color][7] + +#### Updating from Ubuntu 20.04 LTS? + +In general, if you plan to switch to this LTS version from Ubuntu 21.10, you should notice a few items of change. But if you are planning to upgrade from prior Ubuntu 20.04 LTS – then a lot for you to experience. For example, you get a horizontal workspace horizontal app launcher, those introduced since [GNOME 40][8]. + +Also, other notable differences or rather new features are the power profiles menu in the top bar, multitasking option in settings and performance improvements of GNOME Shell and Mutter. + +#### Ubuntu Official Flavors + +Alongside the base version, the official Ubuntu flavours are getting their latest versions of their respective desktop environments in this LTS version. Apart from KDE Plasma, most desktops remained with their last stable release for more than a year. So, you may not experience much of a difference. + +Here’s a quick summary: + + * Kubuntu 22.04 with [KDE Plasma 5.24][9] + * Xubuntu 22.04 with [Xfce 4.16][10] + * Lubuntu 22.04 with [LxQt 1.0][11] + * Ubuntu Budgie with Budgie version 10.5.3 + * Ubuntu Mate with MATE 1.26 + + + +### Download + +This version of Ubuntu is under development at the moment. If you want to give it for a quick spin in your favourite VM, then grab the daily build copy .ISO from the below link. + +Remember, this copy may be unstable and contain bugs. So, you have been warned. + +[Download Ubuntu 22.04 – daily build][12] + +If you want a super-unstable copy of Canary Build, you can get it from the below link. I would not recommend using this Canary .ISO at all unless you have plenty of time to play. Oh, so that you know, this Canary copy .ISO have the new Flutter-based installer. Although I tried to use this new installer, it crashes every time. + +[Daily Canary Build iso][13] + +#### Download the Flavors + +If you want to try out the official Ubuntu flavours as daily build copy, you can get them via the below links. + + * + * + * + * + * + * + * + + + +### Closing Notes + +The LTS releases are conservative in new tech adaptation and other long term impacts. Many organizations and businesses opt for LTS for more than five years of support window and stability. Stability is more important than new technology when running thousands of machines critical to your company. So, that said, many new features or packages may not make it to the final release, but eventually, this release set the course for the next LTS. One step at a time. + +So, what is the feature or package you are expecting in Ubuntu 22.04 and hoping for it? Let me know in the comment section below. + +_References_ + +_ + +_ + +* * * + +We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][14], [Twitter][15], [YouTube][16], and [Facebook][17] and never miss an update! + +##### Also Read + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/wp-content/uploads/2022/01/Ubuntu-22.04-LTS-daily-build-Desktop-1024x578.jpg +[2]: https://www.debugpoint.com/2021/11/linux-kernel-5-15/ +[3]: https://www.debugpoint.com/2021/12/gnome-42/ +[4]: https://www.debugpoint.com/wp-content/uploads/2022/01/Is-this-too-Orange-y.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/01/New-Flutter-based-Ubuntu-Installer.jpg +[6]: https://www.debugpoint.com/2021/10/ubuntu-22-04-daily-builds/ +[7]: https://www.debugpoint.com/wp-content/uploads/2022/01/Yaru-Icon-Theme-for-LibreOffice-looks-stunning-with-Orange-color-1024x226.jpg +[8]: https://www.debugpoint.com/2021/03/gnome-40-release/ +[9]: https://www.debugpoint.com/2022/01/kde-plasma-5-24/ +[10]: https://www.debugpoint.com/2021/02/xfce-4-16-review/ +[11]: https://www.debugpoint.com/2021/11/lxqt-1-0-release/ +[12]: https://cdimage.ubuntu.com/daily-live/current/ +[13]: https://cdimage.ubuntu.com/daily-canary/current/ +[14]: https://t.me/debugpoint +[15]: https://twitter.com/DebugPoint +[16]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[17]: https://facebook.com/DebugPoint From 9cb3823fafa530f2c7d46c06edfdb0e99c231e17 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 21:55:24 +0800 Subject: [PATCH 252/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220114=20?= =?UTF-8?q?Installing=20Arch=20Linux=20Using=20archinstall=20Automated=20S?= =?UTF-8?q?cript=20[Complete=20Guide]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220114 Installing Arch Linux Using archinstall Automated Script -Complete Guide.md --- ...nstall Automated Script -Complete Guide.md | 195 ++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 sources/tech/20220114 Installing Arch Linux Using archinstall Automated Script -Complete Guide.md diff --git a/sources/tech/20220114 Installing Arch Linux Using archinstall Automated Script -Complete Guide.md b/sources/tech/20220114 Installing Arch Linux Using archinstall Automated Script -Complete Guide.md new file mode 100644 index 0000000000..a67513fdaf --- /dev/null +++ b/sources/tech/20220114 Installing Arch Linux Using archinstall Automated Script -Complete Guide.md @@ -0,0 +1,195 @@ +[#]: subject: "Installing Arch Linux Using archinstall Automated Script [Complete Guide]" +[#]: via: "https://www.debugpoint.com/2022/01/archinstall-guide/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Installing Arch Linux Using archinstall Automated Script [Complete Guide] +====== +IN THIS GUIDE, WE EXPLAIN THE SUPER EASY WAY OF INSTALLING ARCH LINUX +USING AUTOMATED SCRIPT ARCHINSTALL. INTENDED FOR BEGINNER TO ADVANCED +USERS. +Installing Arch Linux is still troublesome for many new users. It requires a fair amount of knowledge of the commands, inner working of a Linux system including boot process, Kernel and Grub concepts. And these are not known to many. But new users still want to install and experience Arch Linux. + +I personally feel that operating system installation should be always simple in this age of computing. Things should be abstracted to the end user as much as possible. After all, all operating system exists for only one purpose – to help the end user to perform certain tasks and help them. + +### What is the archinstall automated script? + +That said, we covered installing Arch Linux as a bare metal system a while back. Since then, the Arch Linux team came up with an automated and interactive script called [archinstall][1]. This script is far easy way to install Arch Linux today, can can be done by anyone. + +That leads us to the intent of this Arch Linux installation guide, using this automated script called archinstall. + +Let’s dig in. + +### Guide to install Arch Linux using archinstall script + +I would split this guide in three sections. First download Arch Linux .ISO file, create a disk with boot. Second is the actual installation and finally configuration with an example desktop. + +#### Section 1: Download .ISO file + +Visit the below link. Download the .ISO file of Arch Linux. You can go for a direct HTTP download or use torrent/magnet files. + +[Download Arch Linux][2] + +Once downloaded, create a bootable USB stick using [Etcher][3] or some other utility. + +Once done, plug-in the USB stick and boot from it. + +Before you begin the next section, make sure you are connected to the internet. In general, if you are in a wired network, you should be good. If you need to configure Wi-Fi via command line in Arch – [follow this guide][4]. Just make sure you are connected to internet. + +#### Section 2: Install using archinstall + +Once boot is complete, you should see a prompt like below. Type `archinstall` and hit enter. + +![First prompt for archinstall][5] + +The command will check for internet connectivity to the Arch Linux mirrors. And once done, a series of questions (like this) will pop up. All you have to do is read and respond. + +So, for this guide, I give the most basic and easy ones to get you started. You can also experiment with other options if you are confident. But I recommend follow the basic options as outlined below, and next time you can experiment. + +Fair enough? Okay. + +So, the first question is Keyboard Layout type. It is shown by the two byte country specific layout codes. You can either type that or the number beside it. For English-US, I entered us. + +![Keyboard Type – archinstall][6] + +Next is Keyboard Language, for which I entered 65 for the United States. + +![Keyboard Language – archinstall][7] + +Next up is the hard drive selection. The script auto-detects the available drives in your target system. For example, in the below image, it shows 17 GB /dev/vda is the main block device. That is where I am going to install the system. Do not skip this step. + +[][8] + +SEE ALSO:   How to Install Cinnamon Desktop in Arch Linux + +For this guide, I have entered 2 which is for /dev/vda. So, enter the number as per your system. + +Once you do that, you should see a double arrow >> beside the device to configure. If you are done, hit enter to proceed. + +![Choose Block Device -1][9] + +![Choose Block Device -2][10] + +In the next option, be very careful. The script asks whether you want to erase the device and go for an auto partition. Or you want to manually partition the drive. For the sake of simplicity, I selected option 0. + +![Select partition option – archinstall][11] + +In the next set of questions, follow as in the image below. It’s more of the file system type, host name, root password, etc. Follow the on-screen instructions. For your help, I have added the questions and their answers used for this guide in the below table. + +Question | Option +---|--- +Question | Option +Select main file system | ext4 +Would you like to use swap on zram? | n +Enter disk encyption password | keep it blank (hit enter) +hostname or the computer name | Enter any name you want +Enter root password | Enter the password you want +Enter a pre-programmed profile name – +0 – desktop +1 – minimal +2 – server +3 – xorg | Choose 3 – xorg +Install graphics driver | Choose as per your system. Or hit enter without any option for default +Install Audio Server | Choose pulseaudio + +![Various options in archinstall -1][12] + +In the next question of choosing a Kernel, choose linux. And enter the name of any additional packages you would like this script to install for you – such as firefox, nano, etc. + +Select the network interface as NetworkManager and choose default options for timezone. + +![Various options in archinstall -2][13] + +And that’s about it. Once you are done, the script would generate and wait for you to hit enter to start the installation process. + +![archinstall starts downloading packages][14] + +Wait until this step finishes. It takes some time to download and install all the packages, depends on your system and internet connection speed. Sometimes Arch mirrors are slow, so wait till it finishes. + +#### Section 3 – Install a desktop environment + +After you install the base system using the above method, you can install any additional desktop environment such as GNOME, KDE Plasma, MATE, Xfce – so on. We have several guides for each of them in the below pages. You can visit your choice of desktop installation page and jump straight to the bottom of these pages for exact command to install a desktop. + + * [Xfce][15] + * [GNOME][16] + * [KDE Plasma][17] + * [Cinnamon][8] + * [LXQt][18] + + + +For example, if you want to install GNOME Desktop basic components, you can simply run the below command to install. + +``` + + sudo pacman -S --needed gnome gnome-tweaks nautilus-sendto gnome-nettool gnome-usage gnome multi-writer adwaita-icon-theme chrome-gnome-shell xdg-user-dirs-gtk fwupd arc-gtk-theme seahosrse gdm firefox gedit + +``` + +``` + + systemctl enable gdm + +``` + +``` + + systemctl enable NetworkManager + +``` + +Once you are done, type reboot. + +And congratulations. You have finally installed Arch Linux using the awesome archinstall script using this guide. + +### Closing Notes + +I believe, this is one of the impressive script that is developed by the team. And it is definitely going to increase the coverage of the Arch Linux with growing user base. + +Having trouble using this script? Let me know in the comment section below. + +* * * + +We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][19], [Twitter][20], [YouTube][21], and [Facebook][22] and never miss an update! + +##### Also Read + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/01/archinstall-guide/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://github.com/archlinux/archinstall +[2]: https://archlinux.org/download/ +[3]: https://www.debugpoint.com/2021/01/etcher-bootable-usb-linux/ +[4]: https://www.debugpoint.com/2020/11/connect-wifi-terminal-linux/ +[5]: https://www.debugpoint.com/wp-content/uploads/2022/01/image.png +[6]: https://www.debugpoint.com/wp-content/uploads/2022/01/Keyboard-Type-archinstall.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/01/Keyboard-Language-archinstall.jpg +[8]: https://www.debugpoint.com/2021/02/cinnamon-arch-linux-install/ +[9]: https://www.debugpoint.com/wp-content/uploads/2022/01/Choose-Block-Device-1.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2022/01/Choose-Block-Device-2.jpg +[11]: https://www.debugpoint.com/wp-content/uploads/2022/01/Select-partition-option-archinstall.jpg +[12]: https://www.debugpoint.com/wp-content/uploads/2022/01/Various-options-in-archinstall-1.jpg +[13]: https://www.debugpoint.com/wp-content/uploads/2022/01/Various-options-in-archinstall-2.jpg +[14]: https://www.debugpoint.com/wp-content/uploads/2022/01/archinstall-starts-downloading-packages.jpg +[15]: https://www.debugpoint.com/2020/12/xfce-arch-linux-install-4-16/ +[16]: https://www.debugpoint.com/2020/12/gnome-arch-linux-install/ +[17]: https://www.debugpoint.com/2021/01/kde-plasma-arch-linux-install/ +[18]: https://www.debugpoint.com/2020/12/lxqt-arch-linux-install/ +[19]: https://t.me/debugpoint +[20]: https://twitter.com/DebugPoint +[21]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[22]: https://facebook.com/DebugPoint From 1c61e8488e177ec1edce5be27784cb50528fd6be Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 21:57:16 +0800 Subject: [PATCH 253/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220111=20?= =?UTF-8?q?What=20is=20KDE=20Connect=3F=20How=20Do=20You=20Use=20It=3F=20[?= =?UTF-8?q?Beginner=E2=80=99s=20Guide]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220111 What is KDE Connect- How Do You Use It- -Beginner-s Guide.md --- ...t- How Do You Use It- -Beginner-s Guide.md | 178 ++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 sources/tech/20220111 What is KDE Connect- How Do You Use It- -Beginner-s Guide.md diff --git a/sources/tech/20220111 What is KDE Connect- How Do You Use It- -Beginner-s Guide.md b/sources/tech/20220111 What is KDE Connect- How Do You Use It- -Beginner-s Guide.md new file mode 100644 index 0000000000..a73a1b8ec1 --- /dev/null +++ b/sources/tech/20220111 What is KDE Connect- How Do You Use It- -Beginner-s Guide.md @@ -0,0 +1,178 @@ +[#]: subject: "What is KDE Connect? How Do You Use It? [Beginner’s Guide]" +[#]: via: "https://www.debugpoint.com/2022/01/kde-connect-guide/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +What is KDE Connect? How Do You Use It? [Beginner’s Guide] +====== +IN THIS ARTICLE, WE EXPLAIN WHAT IS KDE CONNECT, ITS MAIN FEATURES, +BASIC USAGE GUIDE AND INSTALLATION STEPS. +The technology evolving at a rapid space. That includes the software, hardware and different form factor devices. The future is all about seamless integration and workflow across different devices. Every day, we are moving a little closer to a state where you send and receive data across all connected devices. And KDE Connect application is a flag bearer on the Linux desktop systems. + +### What is KDE Connect? + +[KDE Connect][1] is an application developed by KDE Desktop team that offers seamless connectivity between Linux System and any other system running Windows, macOS, Android or Linux. + +When installed, KDE connect enables you to receive phone notifications, send and receive SMS, browse files, send and receive files and many such features. + +Furthermore, KDE Connect does all these following a secure protocol over the wireless network to prevent any privacy mishap. The application is a Free and Open Source application, hence minimal chance of any hidden issues. With all these features combined, KDE Connect is an excellent tool for its purpose. + +Let’s see how you can install it and use. + +### Installing KDE Connect + +For this KDE Connect guide, I will show you the connection between a Linux Distribution and Android Mobile Phones. However, this should be the same for Windows and Android connectivity as well. + +KDE Connect set up is a two-way process. You have to install KDE Connect in your Linux distribution and in your Android Mobile Phone from Play Store. + +#### Installing in Linux Distribution + +Installing KDE Connect in your Linux Distribution is easy. It is available in all major Linux distribution’s official repo. If you are using Ubuntu, and want a terminal way of installing, run below. + +``` + + sudo apt install kdeconnect + +``` + +For Fedora + +``` + + sudo dnf install kdeconnect + +``` + +For [Arch Linux][2] + +``` + + pacman -S kdeconnect + +``` + +Or, you can search in Software and hit install. + +For Windows and other Linux distributions, you can refer [to this page][3] for several other options for download. + +#### Installing in Android Mobile Phone + +Search for KDE Connect in Google Play Store and hit install to install it in your Android Device. + +[KDE Connect in Play Store][4] + +If you are using a Free/Libre version of Android, you can get it via f-droid store using the below link (Thanks to our readers for this tip). + + + +### Setting Up KDE Connect + +KDE Connect helps to connect devices that are in the same network. So, make sure your Linux system and Android device both are connected to the same Wi-Fi or wireless network. + +Now open the KDE Connect App in your mobile phone. You should see the name of your Linux Systems. If you do not see anything, make sure your device and Linux both are connected in same network and hit Refresh. + +![KDE Connect in Android Device showing connected Linux System][5] + +Open the KDE Connect in Linux and you should see your mobile phone entry as shown in the below image. + +![KDE Connect before pairing][6] + +Now, click on the name of your mobile phone and hit . Once you do that, immediately you get a notification in your mobile phone for Pairing Accept or Reject. Tap on Accept. + +![Pairing Request for KDE Connect][7] + +The icon of your Phone should turn GREEN, and it shows that your mobile phone and Linux system both are connected and paired. + +![KDE Connect after successful pairing][8] + +By default, the app grants you the below permissions – + + * Multimedia control + * Remote Input + * Presentation Remote + * Finding Device + * Sharing Files + + + +[][9] + +SEE ALSO:   KDE Connect Arrives for iPhone, At last. Here’s How to Try. + +And the following features required explicit permission in your Android device, which you need to grant them manually. Because they are little privacy centric. + + * SMS sending and receiving + * Media Player Control + * Receive Keystrokes from Computer to Mobile Phone + * Notification Sync + * Telephone Notifier + * Contact Sync + * Mouse Receiver + + + +For all these, you have to tap on the option and grant access in Android phone. Then you will be able to enjoy these services in Linux device. + +### Example – Notification Sync + +I will show you one example where Notification Sync option is enabled. Open the app in your Android phone, go to the section. Tap on **Notification Sync** and take option **Open Settings**. + +Enable Notification access against and tap on **Allow**. + +![Enabling Notification Sync][10] + +This will start showing the notifications from your mobile phones to your Linux device. For example, below notification which I received in my test Android device. + +![Sample Notification in Mobile Phone][11] + +And the same is shown in KDE Connect in the Linux system. + +![Sample Notification in KDE Connect from Mobile Phone][12] + +Similarly, you can start enabling the other services and giving them permission as it is applicable for you. + +### Closing Notes + +I hope this guide helps you to set up KDE Connect in your Linux system and mobile phones. You can easily set up several features after giving proper permission to make the most out of KDE Connect application. Once it is set up completely, you do not need to look over your mobile phones anymore. Because you can easily read notifications, reply to messages while working in your Laptop or Desktop. + +What do you think about KDE Connect? Let me know in the comment box below. + +* * * + +We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][13], [Twitter][14], [YouTube][15], and [Facebook][16] and never miss an update! + +##### Also Read + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/01/kde-connect-guide/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://kdeconnect.kde.org/ +[2]: https://www.debugpoint.com/tag/arch-linux +[3]: https://kdeconnect.kde.org/download.html +[4]: https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp&hl=en_IN&gl=US +[5]: https://www.debugpoint.com/wp-content/uploads/2022/01/KDE-Connect-in-Android-Device-showing-connected-Linux-System-1024x656.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/01/KDE-Connect-before-pairing-1024x368.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/01/Pairing-Request-for-KDE-Connect-1024x917.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/01/KDE-Connect-after-successful-pairing-1024x249.jpg +[9]: https://www.debugpoint.com/2021/10/kde-connect-iphone/ +[10]: https://www.debugpoint.com/wp-content/uploads/2022/01/Enabling-Notification-Sync-1024x718.jpg +[11]: https://www.debugpoint.com/wp-content/uploads/2022/01/Sample-Notification-in-Mobile-Phone-914x1024.jpg +[12]: https://www.debugpoint.com/wp-content/uploads/2022/01/Sample-Notification-in-KDE-Connect-from-Mobile-Phone.jpg +[13]: https://t.me/debugpoint +[14]: https://twitter.com/DebugPoint +[15]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[16]: https://facebook.com/DebugPoint From 3d1290b9326f9527990382c54cabcf0b062d069d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 21:57:44 +0800 Subject: [PATCH 254/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220111=20?= =?UTF-8?q?10=20Perfect=20Apps=20to=20Improve=20Your=20GNOME=20Experience?= =?UTF-8?q?=20[Part=202]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220111 10 Perfect Apps to Improve Your GNOME Experience -Part 2.md --- ...o Improve Your GNOME Experience -Part 2.md | 370 ++++++++++++++++++ 1 file changed, 370 insertions(+) create mode 100644 sources/tech/20220111 10 Perfect Apps to Improve Your GNOME Experience -Part 2.md diff --git a/sources/tech/20220111 10 Perfect Apps to Improve Your GNOME Experience -Part 2.md b/sources/tech/20220111 10 Perfect Apps to Improve Your GNOME Experience -Part 2.md new file mode 100644 index 0000000000..67f8d6c3be --- /dev/null +++ b/sources/tech/20220111 10 Perfect Apps to Improve Your GNOME Experience -Part 2.md @@ -0,0 +1,370 @@ +[#]: subject: "10 Perfect Apps to Improve Your GNOME Experience [Part 2]" +[#]: via: "https://www.debugpoint.com/2021/12/best-gnome-apps-part-2/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +10 Perfect Apps to Improve Your GNOME Experience [Part 2] +====== +HERE ARE THE NEXT SET OF GNOME APPS THAT IS PERFECT FOR YOUR GNOME +DESKTOP. IT RANGES FROM GAMES, UTILITIES AND PRODUCTIVITY. +There are many native GNOME Apps scattered around which are completely unknown to the users. They are surprisingly good and does its job perfectly. The discovery of those apps are not streamlined via GNOME’s own app store. Because, the GNOME App website doesn’t list them all. + +That said, we are continuing a GNOME Apps discovery series to make those apps become popular. Being popular is a good way to increase visibility, contributions from community. And obviously the quality of those apps gets improved because more bugs are reported and fixed. + +In this article series of ‘’, we will highlight some known, unknown native GTK based Apps that are exclusively designed for GNOME across functionality. + +This is part 2 of the 5 part series. In case you have landed here from other references, you can read the other parts via following links. + + * [Part 1][1] + * [Part 3][2] + * [Part 4][3] + + + +In this article, we covered the following list of perfect GNOME Apps. + + * [Flatseal][4] – Managing Flatpak App Permissions + * [Junction][5] – Choose Apps to open files/links on the fly + * [Blanket][6] – Improve productivity + * [Mousai][7] – Discover Music (like Shazam) + * [Shortwave][8] – Internet Radio + * [Health][9] – Health parameter tracker + * [Dialect][10] – Translation app for GNOME + * [Video Trimmer][11] – A superfast video cutter + * [Console][12] – A New Minimal GNOME Terminal + * [GNOME Crossword][13] – A crossword game + + + +### Perfect and Best GNOME Apps – Part 2 + +#### Flatseal – Managing Flatpak App Permissions + +This GNOME App is perfect for heavy users of Flatpak Apps. The Flatpak apps runs in sandbox mode by design. That means, they do not have access to the host system components by default. For example, one Flatpak app may not have access to your Wi-Fi, Or, home directory. But what if an app gives you a nice GUI to manage all the accesses for installed Flatpak apps? + +Flatseal does just that. It lists your installed Flatpak apps and gives you nice UI to grant or remove access to all the flatpak apps. This easy to use app is a must-have if you are using GNOME Desktop. + +Here’s how it looks and installation steps. + +![Flatseal Showing list of apps and their permissions][14] + +[Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Flatseal via Flathub repo][16] + + * [Source code and development][17] + * [Documentation][18] + + + +#### Junction – Choose Apps to open files/links on the fly + +The next app is an extended version of “Open With” functionality of files. Usually, each file extension are tied to a specific program to open them in the OS itself. You can change it always from Settings in GNOME. For example, .txt (text) files always open via Gedit. + +When you use this app called Junction, and try to open any link or file, it would pop up a separate menu with icons of applications to open the link or file with. + +For example, if you try to open a PNG file, it will give you options to open that image file with all available graphics applications installed in your operating system. + +![Junction GNOME App showing options as app to open an image][19] + +Interested? Here’s how to install. + +[Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Junction via Flathub][20] + + * [Home page][21] + * [Source code][22] + + + +#### Blanket – Increase your focus and productivity + +This is my favorite app for GNOME desktop. Want to listen to rain sound? Or bird singing? Waves? Those natures sounds helps to concentrate, increases your focus. Even those helps you to work or fall asleep in noisy environment. + +This app – Blanket comes with preloaded with such sounds. All you need is install and hit play to enjoy calm and serene music. + +By default, it gives you plenty to choose from: + + * Rain + * Storm + * Wind + * Waves + * stream + * Birds + * Summer Night + * Train + * Boat + * City + * Coffee Shop + * Fireplace + * Pink and White Noise + + + +Oh, you can add your own custom music as well (mp3, wav, ogg) and play. + +![Calm your mind using Blanket][23] + +I’m sure you want to install this app. This is how you can install right now. + +[Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Blanket via Flathub][24] + +Additional information about this perfect GNOME desktop app – + + * [Source code][25] + * [Home page][26] + + + +#### Mousai – Discover Music (like Shazam) + +I am sure you have heard about [Shazam][27] – the popular music recognition app for smartphones, tabs. The Mousai is a music identification app for GNOME desktop. It can listen and identify songs details on the fly. This app uses your system’s microphone or desktop line-out audio for input. + +Pretty neat? Isn’t it? Here are some of its features: + + * Easy to use UI – perfect for GNOME desktop + * Identifies songs within seconds + * Stores the identified songs in history for easy references + * Browse the song info on the web from the app itself + + + +![Mousai][28] + +Before you hit install, remember this app uses API from popular [audd.io][29] for its functionality. + +[Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Mousai via Flathub][30] + +Here are some additional information about this app – + + * [Home page][31] + * [Source code][32] + + + +#### Shortwave – Internet Radio + +If you are a Radio listener and a fan of radio stations, then the next GNOME app is for you. Shortwave is an internet radio station that seamlessly integrates with GNOME desktop. It is capable of accessing 25,000 radio stations across the world with its unique features such as – + + * Browse stations + * Searching stations + * View by most voted stations + * Get stations that other users listening to + * Create your library with radio stations + * Ability to play directly to network devices such as Google Chromecast from GNOME + + + +![Shortwave App][33] + +This radio streaming app is one of the perfect GNOME app available today with these impressive features. Here’s you can install and get into the groove. + +[][34] + +SEE ALSO:   10 Things to Do After Installing Fedora 33 + +[Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Shortwave via Flathub][35] + +More information about Shortwave – + + * [Home page][36] + * [Source code][37] + + + +#### Health – Health parameter tracker + +Want to get a track of your exercise and related activities right from the GNOME desktop? Then this app might be the one you are looking for. The Health app is able to track your steps, weight, calories and activities such as swimming, running etc. + +This app gives you a nice UI to show you whether you are meeting your daily goal of total steps and so on. + +![Health App][38] + +Here’s how you can install this app. + +[Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Health via Flathub][39] + +More information about Health app – + + * [Home Page][40] + * [Source Code][41] + + + +#### Dialect – Translation app for GNOME + +Looking for a native translation app that really works for GNOME? Then Dialect is the app you are looking for. Dialect is a perfect native GNOME app that can easily translate free texts from one language to another. This application uses an unofficial API for Google Translate and gives you the perfect translation. It also uses LibreTranslate API, which is a free and open source machine translation API that is available online. + +Other unique features of Dialect includes text to speech, keeping a history of your translations, auto language detection and clipboard buttons in UI to name a few. + +![Dialect][42] + +Here’s how you can install it right now for your GNOME desktop. + +[Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Dialect via Flathub][43] + +More information about Dialect – + + * [Home page][44] + * [Source code][45] + + + +#### Video Trimmer – Cut your Videos Faster + +The Video Trimmer is a perfect little utility to cut your videos superfast. It only takes start and end timestamp of your video and give you the final file. It saves the file to your target directory, and you can also open the file location directly from the app itself. This app perfectly integrates with GNOME UI and gives you nice preview of the trim timeline and video preview. + +![Video Trimmer][46] + +Here’s how you can install this app. + +[Setup Flatpak][15] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). + +[Install Video Trimmer via Flathub][47] + +Additional information about this app- + + * [Source code][48] + + + +#### Console – A New Minimal GNOME Terminal for beginners + +This is a fairly new application which is currently in development. This is a simple terminal program intended for users those are not technically sound. For advanced users, GNOME already has a terminal emulator called [GNOME Terminal][49]. + +You might ask why GNOME need another terminal, right? Well, Console is designed for novice terminal users with the following use cases in mind. + + * A nice notification when a command is completed + * If user tries root mode (using sudo, su etc), the terminal turns RED + * While using ssh, the terminal turns purple. + + + +This app is still in development in GitLab. Unfortunately, no installer is available at the moment. However, you can go ahead and compile. I tried to get it compiled using meson, but it failed for dependencies. + +Once I am able to compile it, I will put up a screenshot here. + +In the meantime, you can follow this project in [GitLab][50]. + +#### Crosswords for GNOME + +I am sure you love solving Crosswords. Then this final app for GNOME is perfect for you. GNOME Crosswords is Crossword player and editor. This game comes with Crossword puzzle sets which you can start solving. If you are stuck, the app will help you to reveal mistakes in your word choosing. The basic squared black and white crosswords are available, however with its styling support, you can enjoy various shapes and colors as crossword boards. + +![GNOME Crosswords – Image 1][51] + +![GNOME Crosswords – Image 2][52] + +This app is under development at the moment on the editing part. But you can still play by installing a demo flatpak, all available in the below link. + +Open the below link via your system’s software installer (Such as GNOME Software or Discover). Make sure to [set up Flatpak][15] before installing. + +[Install Demo Crossword via private repo][53] + +Follow the development of this app [here][54]. + +* * * + +### Closing Notes + +So, that’s about it with this edition of the perfect and best of GNOME Apps series. I hope you get to discover some cool GTK apps for your GNOME desktop. Make sure to start using them for your job/purpose. What is your opinion about perfect GNOME Apps in this article? Let me know in the comment box below. + + * [Part 1][1] + * [Part 3][2] + * [Part 4][3] + + + +_Some Image Credits: respective app owners_ + +* * * + +We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][55], [Twitter][56], [YouTube][57], and [Facebook][58] and never miss an update! + +##### Also Read + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2021/12/best-gnome-apps-part-2/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/2021/12/best-gnome-apps-part-1/ +[2]: https://www.debugpoint.com/2022/01/best-gnome-apps-part-3/ +[3]: https://www.debugpoint.com/2022/02/best-gnome-apps-part-4/ +[4]: tmp.gkcrhOlzXU#flatseal +[5]: tmp.gkcrhOlzXU#junction +[6]: tmp.gkcrhOlzXU#blanket +[7]: tmp.gkcrhOlzXU#mousai +[8]: tmp.gkcrhOlzXU#shortwave +[9]: tmp.gkcrhOlzXU#health +[10]: tmp.gkcrhOlzXU#dialect +[11]: tmp.gkcrhOlzXU#video-trimmer +[12]: tmp.gkcrhOlzXU#console +[13]: tmp.gkcrhOlzXU#crossword +[14]: https://www.debugpoint.com/wp-content/uploads/2021/12/Flatseal-Showing-list-of-apps-and-their-permissions.jpg +[15]: https://flatpak.org/setup/ +[16]: https://dl.flathub.org/repo/appstream/com.github.tchx84.Flatseal.flatpakref +[17]: https://github.com/tchx84/Flatseal +[18]: https://github.com/tchx84/Flatseal/blob/master/DOCUMENTATION.md +[19]: https://www.debugpoint.com/wp-content/uploads/2021/12/Junction-GNOME-App-showing-options-as-app-to-open-an-image.jpg +[20]: https://dl.flathub.org/repo/appstream/re.sonny.Junction.flatpakref +[21]: https://apps.gnome.org/app/re.sonny.Junction/ +[22]: https://github.com/sonnyp/Junction +[23]: https://www.debugpoint.com/wp-content/uploads/2021/12/Calm-your-mind-using-Blanket.jpg +[24]: https://dl.flathub.org/repo/appstream/com.rafaelmardojai.Blanket.flatpakref +[25]: https://github.com/rafaelmardojai/blanket +[26]: https://apps.gnome.org/app/com.rafaelmardojai.Blanket/ +[27]: https://www.shazam.com/home +[28]: https://www.debugpoint.com/wp-content/uploads/2021/12/Mousai.jpg +[29]: http://audd.io +[30]: https://dl.flathub.org/repo/appstream/io.github.seadve.Mousai.flatpakref +[31]: https://apps.gnome.org/app/io.github.seadve.Mousai/ +[32]: https://github.com/SeaDve/Mousai +[33]: https://www.debugpoint.com/wp-content/uploads/2021/12/Shortwave-App.jpg +[34]: https://www.debugpoint.com/2020/10/10-things-to-do-fedora-33-after-install/ +[35]: https://dl.flathub.org/repo/appstream/de.haeckerfelix.Shortwave.flatpakref +[36]: https://apps.gnome.org/app/de.haeckerfelix.Shortwave/ +[37]: https://gitlab.gnome.org/World/Shortwave +[38]: https://www.debugpoint.com/wp-content/uploads/2021/12/Health-App.jpg +[39]: https://dl.flathub.org/repo/appstream/dev.Cogitri.Health.flatpakref +[40]: https://apps.gnome.org/app/dev.Cogitri.Health/ +[41]: https://gitlab.gnome.org/World/Health +[42]: https://www.debugpoint.com/wp-content/uploads/2021/12/Dialect.jpg +[43]: https://dl.flathub.org/repo/appstream/com.github.gi_lom.dialect.flatpakref +[44]: https://apps.gnome.org/app/com.github.gi_lom.dialect/ +[45]: https://github.com/dialect-app/dialect/ +[46]: https://www.debugpoint.com/wp-content/uploads/2021/12/Video-Trimmer.jpg +[47]: https://dl.flathub.org/repo/appstream/org.gnome.gitlab.YaLTeR.VideoTrimmer.flatpakref +[48]: https://gitlab.gnome.org/YaLTeR/video-trimmer +[49]: https://help.gnome.org/users/gnome-terminal/stable/ +[50]: https://gitlab.gnome.org/GNOME/console +[51]: https://www.debugpoint.com/wp-content/uploads/2021/12/GNOME-Crosswords-Image-1-1024x569.jpg +[52]: https://www.debugpoint.com/wp-content/uploads/2021/12/GNOME-Crosswords-Image-2-1024x629.jpg +[53]: https://people.gnome.org/~jrb/org.gnome.Crosswords/crosswords.flatpak +[54]: https://gitlab.gnome.org/jrb/crosswords +[55]: https://t.me/debugpoint +[56]: https://twitter.com/DebugPoint +[57]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[58]: https://facebook.com/DebugPoint From 52b292a5528536de68f545fe2b84630de5ca6dad Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 21:58:37 +0800 Subject: [PATCH 255/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211211=20?= =?UTF-8?q?Interesting=20KDE=20Facts=20and=20Trivia=20that=20You=20Should?= =?UTF-8?q?=20Know=20About?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211211 Interesting KDE Facts and Trivia that You Should Know About.md --- ...s and Trivia that You Should Know About.md | 138 ++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 sources/tech/20211211 Interesting KDE Facts and Trivia that You Should Know About.md diff --git a/sources/tech/20211211 Interesting KDE Facts and Trivia that You Should Know About.md b/sources/tech/20211211 Interesting KDE Facts and Trivia that You Should Know About.md new file mode 100644 index 0000000000..fb658c841d --- /dev/null +++ b/sources/tech/20211211 Interesting KDE Facts and Trivia that You Should Know About.md @@ -0,0 +1,138 @@ +[#]: subject: "Interesting KDE Facts and Trivia that You Should Know About" +[#]: via: "https://www.debugpoint.com/2021/12/kde-facts-trivia/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Interesting KDE Facts and Trivia that You Should Know About +====== +WE LOOKED BACK IN TIME AND FOUND OUT SOME “KOOL” KDE FACTS AND TRIVIA. +HERE IT IS. +The KDE has a long history. How it was conceptualized, progressed and became a winner as a “go-to” desktop for all user base. In this post, we give you some interesting facts and trivia of KDE that you may be not aware of. And it’s good to know. + +### KDE Facts and Trivia + +#### The Beginning + +KDE was created by [Matthias Ettrich][1] 20+ years ago. The main driving force was to create an easy to use desktop alternative to the [Common Desktop Environment (CDE)][2]. The idea was a simple desktop, fun to use, easy to configure and powerful. And KDE aka Kool Desktop Environment is born. You can notice the pun intended to CDE!. The “Kool” in the name is dropped, and eventually it became the “K Desktop Environment” aka KDE. + +#### First Appearance + +The official announcement of KDE Project by Matthias [still live][3] in Google Groups today at de.comp.os.linux.misc (Usenet). See below. + +![KDE Facts and Trivia – The First Announcement][4] + +Today, it is surreal to read the above idea and how much vision he had about KDE. And with that, where KDE Plasma is today, penetrating all the devices – Laptops, desktops, Game consoles, mobile phones. It is remarkable, indeed. + +#### First Code + +The first code was written by Matthias for the window manager “kwm” and panel “kpanel”. The KConfig class of KDE becomes the first library written of this amazing desktop. + +#### Trouble with Qt License + +During that time, in Usenet boards, many opposed the Qt license on which KDE is being developed. Hence, Matthias and team fly to Oslo in February 1997 and a foundation agreement is signed between KDE and Trolltech (then owner of Qt foundation). This guarantees the [eternal free availability of Qt][5]. + +During the initial days, believe it or not, the money was very much needed to keep the development effort on going. The generous donations received by the team from O’Reilly, SUSE, Trolltech. + +#### KDE 1.0 – The First Release + +The first developer conference called [“KDE One”][6] organized in August/September 1997 to discuss the vision, future and roadmap of the first KDE release. And that resulted in the first ever release of KDE 1.0 on 12th July 1998. + +The KDE 1.0 is built on Qt 1.0 and written mostly in C++. In my opinion, it still looks stunning today. You can imagine, how advanced the vision was in terms of UI, user interaction and most importantly – a perfect Linux desktop for the masses. + +![K Desktop Environment 1.0][7] + +#### KDE 2.0 + +On October 23, 2000 – KDE 2.0 is released. It introduced a set of new applications for the first time that included Konqueror web browser, KOffice, Theme support, KParts, etc. + +#### Initial Awards + +On August 29, 2001 – KDE Awarded as “Best Open Source Project” at LinuxWorldExpo and receives the “Open Source Product Excellence” award. + +[][8] + +SEE ALSO:   KaOS - Lean KDE Distribution Brings Latest Release + +The [one millionth commit][9] has been made on the source code in the SVN On July 20, 2009. It was indeed a milestone for an open source project, paving the way for a promising future. + +![Snippet of the Millionth Commit in KDE Source Code][10] + +#### Fast Forward to Plasma 5.0 + +The KDE Software Compilation was used until KDE 4.0. It is split into three independent projects – KDE Framework, KDE Plasma and KDE Applications in the next Plasma 5.0 release. This helps the KDE Plasma desktop itself independent of the release standpoint with KDE Framework and KDE Applications. This modular approach helped the team to maintain the quality and progress of the entire ecosystem separately. + +#### KDE Woman + +The KDE Community’s Woman group [“KDE Women”][11] was created in March 2001 with a goal to increase women headcounts in free software communities, specially in KDE – across development, documentation and testing. + +#### KDE Mascots + +KDE’s official mascot is [Konqi][12] which is a nice little friendly dragon. It means Konqi the Konqueror. Katie is Konqi’s girlfriend and official mascot for KDE Project. + +> Konqi is the current ambassador of KDEValley. He is good at building things as well as breaking things, and his reptilian brain cannot keep things tracked when they get really complicated. He travels around Flossland to establish connections between dragon colonies. He also brings messages to Userland across the Professional Ocean. He sometimes has these dreams of being a powerful big dragon, too. Was it his past life? +> +> Official description about Konqi + +![Konqi – The Official KDE Mascot][13] + +#### KDE’s journey to more devices and a promising future + +Over the years, KDE Plasma became the choice of preferred desktop for a wide range of hardware. In 2016 KDE partnered with a Spanish laptop company and launched KDE Slimbook. [KDE Slimbook][14] is an Ultrabook with KDE Neon Edition featuring KDE Plasma, KDE Application pre-installed. It can be purchased from their website. + +Linux mobile pioneer Pine64 launched [PinePhone KDE Edition][15] on 2020 which features KDE Plasma Mobile edition. + +Valve corporation announced their handheld gaming console Steam Deck with [KDE Plasma][16] running on [Arch Linux][17]. + +![Slimbook 1][18] + +### Wrapping Up + +So, that’s about it. Some interesting facts and trivia of KDE which you may be not aware of. From the day of KDE 1.0 to today in a simple yet powerful handheld gaming device that is powered by KDE. A long and eventful journey, indeed. I’m sure, many more such exiting events are bound to happen in coming days with KDE ecosystem. + +Do you know any interesting KDE facts that are not listed here? Let me know in the comment box below. + +* * * + +We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][19], [Twitter][20], [YouTube][21], and [Facebook][22] and never miss an update! + +##### Also Read + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2021/12/kde-facts-trivia/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://en.wikipedia.org/wiki/Matthias_Ettrich +[2]: https://sourceforge.net/projects/cdesktopenv/ +[3]: https://groups.google.com/g/de.comp.os.linux.misc/c/SDbiV3Iat_s/m/zv_D_2ctS8sJ +[4]: https://www.debugpoint.com/wp-content/uploads/2021/12/KDE-Facts-and-Trivia-The-First-Announcement-1024x528.jpg +[5]: https://dot.kde.org/2016/01/13/qt-guaranteed-stay-free-and-open-%E2%80%93-legal-update +[6]: https://community.kde.org/KDE_Project_History/KDE_One_(Developer_Meeting) +[7]: https://www.debugpoint.com/wp-content/uploads/2021/12/K-Desktop-Environment-1.0.jpg +[8]: https://www.debugpoint.com/2020/07/kaos-2020-07-release/ +[9]: https://marc.info/?l=kde-commits&m=124811211002267&w=2 +[10]: https://www.debugpoint.com/wp-content/uploads/2021/12/Snippet-of-the-Millionth-Commit-in-KDE-Source-Code.jpg +[11]: https://community.kde.org/KDE_Women +[12]: https://community.kde.org/Konqi +[13]: https://www.debugpoint.com/wp-content/uploads/2021/12/Konqi-The-Official-KDE-Mascot.jpg +[14]: https://kde.slimbook.es/ +[15]: https://www.debugpoint.com/2020/11/pinephone-kde-community-edition-plasma-mobile/ +[16]: https://www.debugpoint.com/tag/kde-plasma +[17]: https://www.debugpoint.com/tag/arch-linux +[18]: https://www.debugpoint.com/wp-content/uploads/2020/07/Slimbook-1-1024x576.jpg +[19]: https://t.me/debugpoint +[20]: https://twitter.com/DebugPoint +[21]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[22]: https://facebook.com/DebugPoint From cf6925d61f5f22e532811f6eb08a4d8d0557c2cb Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 21:58:57 +0800 Subject: [PATCH 256/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220211=20?= =?UTF-8?q?Should=20You=20Use=20a=20New,=20Obscure=20Linux=20Distro=20or?= =?UTF-8?q?=20Stick=20With=20the=20Mainstream=20Ones=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220211 Should You Use a New, Obscure Linux Distro or Stick With the Mainstream Ones.md --- ...istro or Stick With the Mainstream Ones.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 sources/news/20220211 Should You Use a New, Obscure Linux Distro or Stick With the Mainstream Ones.md diff --git a/sources/news/20220211 Should You Use a New, Obscure Linux Distro or Stick With the Mainstream Ones.md b/sources/news/20220211 Should You Use a New, Obscure Linux Distro or Stick With the Mainstream Ones.md new file mode 100644 index 0000000000..142f5d4604 --- /dev/null +++ b/sources/news/20220211 Should You Use a New, Obscure Linux Distro or Stick With the Mainstream Ones.md @@ -0,0 +1,100 @@ +[#]: subject: "Should You Use a New, Obscure Linux Distro or Stick With the Mainstream Ones?" +[#]: via: "https://news.itsfoss.com/obscure-or-maintsream-distro/" +[#]: author: "Abhishek https://news.itsfoss.com/author/root/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Should You Use a New, Obscure Linux Distro or Stick With the Mainstream Ones? +====== + +When you start using Linux on your desktop, you probably stick with the [beginner-friendly distros][1] like Ubuntu or Linux Mint. + +As you get familiar with Linux and start loving it, you join Linux related communities on various social channels, follow websites that share Linux content (like It’s FOSS). And when you do that, you also start discovering new, rather unknown distributions. + +Since you are new to the scene, you may get tempted to try one distro after another and fell down the ‘distrohopping’ slope. + +![Tempting looking distro][2] + +This is when you start asking this question, “should I use an unknown distro or should I stay with the popular distributions like most people”? + +The simpler answer is to stay with the mainstream distributions but the real answer needs some thinking from your end. + +### The problem with using the new, obscure distributions + +The major problem with the ‘brand new, lone developer distro’ is the uncertainty. You don’t know how long the project will live. It could be a year, it could be a month. + +I have seen this with several distributions. There was [SemiCode OS][3] that got popular because it was created for programmers. A similar distribution called Emperor OS disappeared recently. These are just a few examples from the long list of distros that were discontinued within a couple of years of their inception. + +You may say the same could happen with an older distribution with decent user base as well. That’s true, but usually, there is a community and more than one developer working on the project. You have some assurance there. + +Due to the lack of experience from the developer(s), the new distros may miss out on crucial features. For example, the astonishing looking Garuda Linux doesn’t officially recommend dual booting at the time of writing this article. + +![][4] + +This is when Garuda Linux has a decent following and a few developers involved with the project. + +### Most new distros don’t offer anything of substance + +You’ll often come across brand new distributions that are based on some other popular distributions like Ubuntu or Arch Linux. The only thing that differs is probably the default applications, theme and wallpapers. + +If it’s a ‘distro for programmers’, it will have a few programming applications installed by default. If it’s a ‘gaming distribution’, it probably will be coming with a few tools like Steam, Wine, [Lutris][5] installed. You are not likely to see some real optimization on the graphics or hardware part. + +This is the reason many people say that we don’t need more distributions in an already crowded space with hundreds of distributions. After all, it’s not that difficult to install the required applications in the mainstream distributions. + +### Am I against these new distros? + +Absolutely not. + +You may feel like there is no need for new distros that hardly add anything of value. You maybe right because those projects might not matter to you, but they do matter to the person who is developing it. + +Have you ever tried to learn a programming language? The first tutorial is often a ‘hello world’ program. Even the advanced programmers start from the ‘hello world’. + +Babies don’t start running straight away. It takes time to go to that stage. + +I see the projects in the same way. If someone loves Linux and is excited to create their own ‘operating system’, let them do that. If you prefer not to encourage them, don’t discourage them as well. + +Most project starts the same way. Linux Mint is a hugely popular Linux distribution. It was started back in 2006 and based itself on Kubuntu. + +Was there really a need of ‘a similar distro based on Ubuntu’? Not really. But look where Linux Mint stands today. + +### So, should you use new distros or not? + +Overall, it all depends on you. + +If you don’t like formatting your systems all the time and would like to continue with your life, stay with the mainstream distros. + +If you like to experiment and don’t mind messing up with your system and change operating systems frequently, you may very well try the new distros. Personally, I would advise trying them in virtual machines. If you can have a spare system just for the experimentation, even better. + +You may also use distributions that have been on the scene for years but they are not as popular as the likes of Ubuntu, Mint, Fedora and Debian. Projects like [PCLinuxOS][6], [Puppy Linux][7], Peppermint OS etc. have a smaller but active community. They are definitely a dependable choice, even for your main system. + +While choosing a distribution, apart from the base distro, you should also see if the distro gets regular updates and has an active community. You just have to check the project forum and see if there are enough activities in the community. + +### What do you prefer? + +That’s what I think and suggest when it comes to choosing between new, obscure distros and the popular, mainstream ones. + +How about you? What kind of distributions do you prefer? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/obscure-or-maintsream-distro/ + +作者:[Abhishek][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/root/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-linux-beginners/ +[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[3]: https://itsfoss.com/semicode-os-linux/ +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjIxMSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[5]: https://lutris.net/ +[6]: http://www.pclinuxos.com/ +[7]: https://puppylinux.com/ From f744668b9a1787a5a1cf0c188c8eccf4f324b344 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 22:01:56 +0800 Subject: [PATCH 257/334] =?UTF-8?q?=E9=80=89=E9=A2=98[talk]:=2020200406=20?= =?UTF-8?q?How=20to=20Use=20a=20Differential=20Analyzer=20(to=20Murder=20P?= =?UTF-8?q?eople)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20200406 How to Use a Differential Analyzer (to Murder People).md --- ...ifferential Analyzer (to Murder People).md | 147 ++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 sources/talk/20200406 How to Use a Differential Analyzer (to Murder People).md diff --git a/sources/talk/20200406 How to Use a Differential Analyzer (to Murder People).md b/sources/talk/20200406 How to Use a Differential Analyzer (to Murder People).md new file mode 100644 index 0000000000..440d3fa159 --- /dev/null +++ b/sources/talk/20200406 How to Use a Differential Analyzer (to Murder People).md @@ -0,0 +1,147 @@ +[#]: subject: "How to Use a Differential Analyzer (to Murder People)" +[#]: via: "https://twobithistory.org/2020/04/06/differential-analyzer.html" +[#]: author: "Two-Bit History https://twobithistory.org" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to Use a Differential Analyzer (to Murder People) +====== + +A differential analyzer is a mechanical, analog computer that can solve differential equations. Differential analyzers aren’t used anymore because even a cheap laptop can solve the same equations much faster—and can do it in the background while you stream the new season of Westworld on HBO. Before the invention of digital computers though, differential analyzers allowed mathematicians to make calculations that would not have been practical otherwise. + +It is hard to see today how a computer made out of anything other than digital circuitry printed in silicon could work. A mechanical computer sounds like something out of a steampunk novel. But differential analyzers did work and even proved to be an essential tool in many lines of research. Most famously, differential analyzers were used by the US Army to calculate range tables for their artillery pieces. Even the largest gun is not going to be effective unless you have a range table to help you aim it, so differential analyzers arguably played an important role in helping the Allies win the Second World War. + +To understand how differential analyzers could do all this, you will need to know what differential equations are. Forgotten what those are? That’s okay, because I had too. + +### Differential Equations + +Differential equations are something you might first encounter in the final few weeks of a college-level Calculus I course. By that point in the semester, your underpaid adjunct professor will have taught you about limits, derivatives, and integrals; if you take those concepts and add an equals sign, you get a differential equation. + +Differential equations describe rates of change in terms of some other variable (or perhaps multiple other variables). Whereas a familiar algebraic expression like \\(y = 4x + 3\\) specifies the relationship between some variable quantity \\(y\\) and some other variable quantity \\(x\\), a differential equation, which might look like \\(\frac{dy}{dx} = x\\), or even \\(\frac{dy}{dx} = 2\\), specifies the relationship between a _rate of change_ and some other variable quantity. Basically, a differential equation is just a description of a rate of change in exact mathematical terms. The first of those last two differential equations is saying, “The variable \\(y\\) changes with respect to \\(x\\) at a rate defined exactly by \\(x\\),” and the second is saying, “No matter what \\(x\\) is, the variable \\(y\\) changes with respect to \\(x\\) at a rate of exactly 2.” + +Differential equations are useful because in the real world it is often easier to describe how complex systems change from one instant to the next than it is to come up with an equation describing the system at all possible instants. Differential equations are widely used in physics and engineering for that reason. One famous differential equation is the heat equation, which describes how heat diffuses through an object over time. It would be hard to come up with a function that fully describes the distribution of heat throughout an object given only a time \\(t\\), but reasoning about how heat diffuses from one time to the next is less likely to turn your brain into soup—the hot bits near lots of cold bits will probably get colder, the cold bits near lots of hot bits will probably get hotter, etc. So the heat equation, though it is much more complicated than the examples in the last paragraph, is likewise just a description of rates of change. It describes how the temperature of any one point on the object will change over time given how its temperature differs from the points around it. + +Let’s consider another example that I think will make all of this more concrete. If I am standing in a vacuum and throw a tennis ball straight up, will it come back down before I asphyxiate? This kind of question, posed less dramatically, is the kind of thing I was asked in high school physics class, and all I needed to solve it back then were some basic Newtonian equations of motion. But let’s pretend for a minute that I have forgotten those equations and all I can remember is that objects accelerate toward earth at a constant rate of \\(g\\), or about \\(10 \;m/s^2\\). How can differential equations help me solve this problem? + +Well, we can express the one thing I remember about high school physics as a differential equation. The tennis ball, once it leaves my hand, will accelerate toward the earth at a rate of \\(g\\). This is the same as saying that the velocity of the ball will change (in the negative direction) over time at a rate of \\(g\\). We could even go one step further and say that _the rate of change in the height of my ball above the ground_ (this is just its velocity) will change over time at a rate of negative \\(g\\). We can write this down as the following, where \\(h\\) represents height and \\(t\\) represents time: + +\\[\frac{d^2h}{dt^2} = -g\\] + +This looks slightly different from the differential equations we have seen so far because this is what is known as a second-order differential equation. We are talking about the rate of change of a rate of change, which, as you might remember from your own calculus education, involves second derivatives. That’s why parts of the expression on the left look like they are being squared. But this equation is still just expressing the fact that the ball accelerates downward at a constant acceleration of \\(g\\). + +From here, one option I have is to use the tools of calculus to solve the differential equation. With differential equations, this does not mean finding a single value or set of values that satisfy the relationship but instead finding a function or set of functions that do. Another way to think about this is that the differential equation is telling us that there is some function out there whose second derivative is the constant \\(-g\\); we want to find that function because it will give us the height of the ball at any given time. This differential equation happens to be an easy one to solve. By doing so, we can re-derive the basic equations of motion that I had forgotten and easily calculate how long it will take the ball to come back down. + +But most of the time differential equations are hard to solve. Sometimes they are even impossible to solve. So another option I have, given that I paid more attention in my computer science classes that my calculus classes in college, is to take my differential equation and use it as the basis for a simulation. If I know the starting velocity and the acceleration of my tennis ball, then I can easily write a little for-loop, perhaps in Python, that iterates through my problem second by second and tells me what the velocity will be at any given second \\(t\\) after the initial time. Once I’ve done that, I could tweak my for-loop so that it also uses the calculated velocity to update the height of the ball on each iteration. Now I can run my Python simulation and figure out when the ball will come back down. My simulation won’t be perfectly accurate, but I can decrease the size of the time step if I need more accuracy. All I am trying to accomplish anyway is to figure out if the ball will come back down while I am still alive. + +This is the numerical approach to solving a differential equation. It is how differential equations are solved in practice in most fields where they arise. Computers are indispensable here, because the accuracy of the simulation depends on us being able to take millions of small little steps through our problem. Doing this by hand would obviously be error-prone and take a long time. + +So what if I were not just standing in a vacuum with a tennis ball but were standing in a vacuum with a tennis ball in, say, 1936? I still want to automate my computation, but Claude Shannon won’t even complete his master’s thesis for another year yet (the one in which he casually implements Boolean algebra using electronic circuits). Without digital computers, I’m afraid, we have to go analog. + +### The Differential Analyzer + +The first differential analyzer was built between 1928 and 1931 at MIT by Vannevar Bush and Harold Hazen. Both men were engineers. The machine was created to tackle practical problems in applied mathematics and physics. It was supposed to address what Bush described, in [a 1931 paper][1] about the machine, as the contemporary problem of mathematicians who are “continually being hampered by the complexity rather than the profundity of the equations they employ.” + +A differential analyzer is a complicated arrangement of rods, gears, and spinning discs that can solve differential equations of up to the sixth order. It is like a digital computer in this way, which is also a complicated arrangement of simple parts that somehow adds up to a machine that can do amazing things. But whereas the circuitry of a digital computer implements Boolean logic that is then used to simulate arbitrary problems, the rods, gears, and spinning discs _directly_ simulate the differential equation problem. This is what makes a differential analyzer an analog computer—it is a direct mechanical analogy for the real problem. + +How on earth do gears and spinning discs do calculus? This is actually the easiest part of the machine to explain. The most important components in a differential analyzer are the six mechanical integrators, one for each order in a sixth-order differential equation. A mechanical integrator is a relatively simple device that can integrate a single input function; mechanical integrators go back to the 19th century. We will want to understand how they work, but, as an aside here, Bush’s big accomplishment was not inventing the mechanical integrator but rather figuring out a practical way to chain integrators together to solve higher-order differential equations. + +A mechanical integrator consists of one large spinning disc and one much smaller spinning wheel. The disc is laid flat parallel to the ground like the turntable of a record player. It is driven by a motor and rotates at a constant speed. The small wheel is suspended above the disc so that it rests on the surface of the disc ever so slightly—with enough pressure that the disc drives the wheel but not enough that the wheel cannot freely slide sideways over the surface of the disc. So as the disc turns, the wheel turns too. + +The speed at which the wheel turns will depend on how far from the center of the disc the wheel is positioned. The inner parts of the disc, of course, are rotating more slowly than the outer parts. The wheel stays fixed where it is, but the disc is mounted on a carriage that can be moved back and forth in one direction, which repositions the wheel relative to the center of the disc. Now this is the key to how the integrator works: The position of the disc carriage is driven by the input function to the integrator. The output from the integrator is determined by the rotation of the small wheel. So your input function drives the rate of change of your output function and you have just transformed the derivative of some function into the function itself—which is what we call integration! + +If that explanation does nothing for you, seeing a mechanical integrator in action really helps. The principle is surprisingly simple and there is no way to watch the device operate without grasping how it works. So I have created [a visualization of a running mechanical integrator][2] that I encourage you to take a look at. The visualization shows the integration of some function \\(f(x)\\) into its antiderivative \\(F(x)\\) while various things spin and move. It’s pretty exciting. + +![][3] _A nice screenshot of my visualization, but you should check out the real thing!_ + +So we have a component that can do integration for us, but that alone is not enough to solve a differential equation. To explain the full process to you, I’m going to use an example that Bush offers himself in his 1931 paper, which also happens to be essentially the same example we contemplated in our earlier discussion of differential equations. (This was a happy accident!) Bush introduces the following differential equation to represent the motion of a falling body: + +\\[\frac{d^2x}{dt^2} = -k\,\frac{dx}{dt} - g\\] + +This is the same equation we used to model the motion of our tennis ball, only Bush has used \\(x\\) in place of \\(h\\) and has added another term that accounts for how air resistance will decelerate the ball. This new term describes the effect of air resistance on the ball in the simplest possible way: The air will slow the ball’s velocity at a rate that is proportional to its velocity (the \\(k\\) here is some proportionality constant whose value we don’t really care about). So as the ball moves faster, the force of air resistance will be stronger, further decelerating the ball. + +To configure a differential analyzer to solve this differential equation, we have to start with what Bush calls the “input table.” The input table is just a piece of graphing paper mounted on a carriage. If we were trying to solve a more complicated equation, the operator of the machine would first plot our input function on the graphing paper and then, once the machine starts running, trace out the function using a pointer connected to the rest of the machine. In this case, though, our input is just the constant \\(g\\), so we only have to move the pointer to the right value and then leave it there. + +What about the other variables \\(x\\) and \\(t\\)? The \\(x\\) variable is our output as it represents the height of the ball. It will be plotted on graphing paper placed on the output table, which is similar to the input table only the pointer is a pen and is driven by the machine. The \\(t\\) variable should do nothing more than advance at a steady rate. (In our Python simulation of the tennis ball problem as posed earlier, we just incremented \\(t\\) in a loop.) So the \\(t\\) variable comes from the differential analyzer’s motor, which kicks off the whole process by rotating the rod connected to it at a constant speed. + +Bush has a helpful diagram documenting all of this that I will show you in a second, but first we need to make one more tweak to our differential equation that will make the diagram easier to understand. We can integrate both sides of our equation once, yielding the following: + +\\[\frac{dx}{dt} = - \int \left(k\,\frac{dx}{dt} + g\right)\,dt\\] + +The terms in this equation map better to values represented by the rotation of various parts of the machine while it runs. Okay, here’s that diagram: + +![][4] _The differential analyzer configured to solve the problem of a falling body in one dimension._ + +The input table is at the top of the diagram. The output table is at the bottom-right. The output table here is set up to graph both \\(x\\) and \\(\frac{dx}{dt}\\), i.e. height and velocity. The integrators appear at the bottom-left; since this is a second-order differential equation, we need two. The motor drives the very top rod labeled \\(t\\). (Interestingly, Bush referred to these horizontal rods as “buses.”) + +That leaves two components unexplained. The box with the little \\(k\\) in it is a multiplier respresnting our proportionality constant \\(k\\). It takes the rotation of the rod labeled \\(\frac{dx}{dt}\\) and scales it up or down using a gear ratio. The box with the \\(\sum\\) symbol is an adder. It uses a clever arrangement of gears to add the rotations of two rods together to drive a third rod. We need it since our equation involves the sum of two terms. These extra components available in the differential analyzer ensure that the machine can flexibly simulate equations with all kinds of terms and coefficients. + +I find it helpful to reason in ultra-slow motion about the cascade of cause and effect that plays out as soon as the motor starts running. The motor immediately begins to rotate the rod labeled \\(t\\) at a constant speed. Thus, we have our notion of time. This rod does three things, illustrated by the three vertical rods connected to it: it drives the rotation of the discs in both integrators and also advances the carriage of the output table so that the output pen begins to draw. + +Now if the integrators were set up so that their wheels are centered, then the rotation of rod \\(t\\) would cause no other rods to rotate. The integrator discs would spin but the wheels, centered as they are, would not be driven. The output chart would just show a flat line. This happens because we have not accounted for the initial conditions of the problem. In our earlier Python simulation, we needed to know the initial velocity of the ball, which we would have represented there as a constant variable or as a parameter of our Python function. Here, we account for the initial velocity and acceleration by displacing the integrator discs by the appropriate amount before the machine begins to run. + +Once we’ve done that, the rotation of rod \\(t\\) propagates through the whole system. Physically, a lot of things start rotating at the same time, but we can think of the rotation going first to integrator II, which combines it with the acceleration expression calculated based on \\(g\\) and then integrates it to get the result \\(\frac{dx}{dt}\\). This represents the velocity of the ball. The velocity is in turn used as input to integrator I, whose disc is displaced so that the output wheel rotates at the rate \\(\frac{dx}{dt}\\). The output from integrator I is our final output \\(x\\), which gets routed directly to the output table. + +One confusing thing I’ve glossed over is that there is a cycle in the machine: Integrator II takes as an input the rotation of the rod labeled \\((k\,\frac{dx}{dt} + g)\\), but that rod’s rotation is determined in part by the output from integrator II itself. This might make you feel queasy, but there is no physical issue here—everything is rotating at once. If anything, we should not be surprised to see cycles like this, since differential equations often describe rates of change in a function as a function of the function itself. (In this example, the acceleration, which is the rate of change of velocity, depends on the velocity.) + +With everything correctly configured, the output we get is a nice graph, charting both the position and velocity of our ball over time. This graph is on paper. To our modern digital sensibilities, that might seem absurd. What can you do with a paper graph? While it’s true that the differential analyzer is not so magical that it can write out a neat mathematical expression for the solution to our problem, it’s worth remembering that neat solutions to many differential equations are not possible anyway. The paper graph that the machine does write out contains exactly the same information that could be output by our earlier Python simulation of a falling ball: where the ball is at any given time. It can be used to answer any practical question you might have about the problem. + +The differential analyzer is a preposterously cool machine. It is complicated, but it fundamentally involves nothing more than rotating rods and gears. You don’t have to be an electrical engineer or know how to fabricate a microchip to understand all the physical processes involved. And yet the machine does calculus! It solves differential equations that you never could on your own. The differential analyzer demonstrates that the key material required for the construction of a useful computing machine is not silicon but human ingenuity. + +### Murdering People + +Human ingenuity can serve purposes both good and bad. As I have mentioned, the highest-profile use of differential analyzers historically was to calculate artillery range tables for the US Army. To the extent that the Second World War was the “Good Fight,” this was probably for the best. But there is also no getting past the fact that differential analyzers helped to make very large guns better at killing lots of people. And kill lots of people they did—if Wikipedia is to be believed, more soldiers were killed by artillery than small arms fire during the Second World War. + +I will get back to the moralizing in a minute, but just a quick detour here to explain why calculating range tables was hard and how differential analyzers helped, because it’s nice to see how differential analyzers were applied to a real problem. A range table tells the artilleryman operating a gun how high to elevate the barrel to reach a certain range. One way to produce a range table might be just to fire that particular kind of gun at different angles of elevation many times and record the results. This was done at proving grounds like the Aberdeen Proving Ground in Maryland. But producing range tables solely through empirical observation like this is expensive and time-consuming. There is also no way to account for other factors like the weather or for different weights of shell without combinatorially increasing the necessary number of firings to something unmanageable. So using a mathematical theory that can fill in a complete range table based on a smaller number of observed firings is a better approach. + +I don’t want to get too deep into how these mathematical theories work, because the math is complicated and I don’t really understand it. But as you might imagine, the physics that governs the motion of an artillery shell in flight is not that different from the physics that governs the motion of a tennis ball thrown upward. The need for accuracy means that the differential equations employed have to depart from the idealized forms we’ve been using and quickly get gnarly. Even the earliest attempts to formulate a rigorous ballistic theory involve equations that account for, among other factors, the weight, diameter, and shape of the projectile, the prevailing wind, the altitude, the atmospheric density, and the rotation of the earth[1][5]. + +So the equations are complicated, but they are still differential equations that a differential analyzer can solve numerically in the way that we have already seen. Differential analyzers were put to work solving ballistics equations at the Aberdeen Proving Ground in 1935, where they dramatically sped up the process of calculating range tables.[2][6] Nevertheless, during the Second World War, the demand for range tables grew so quickly that the US Army could not calculate them fast enough to accompany all the weaponry being shipped to Europe. This eventually led the Army to fund the ENIAC project at the University of Pennsylvania, which, depending on your definitions, produced the world’s first digital computer. ENIAC could, through rewiring, run any program, but it was constructed primarily to perform range table calculations many times faster than could be done with a differential analyzer. + +Given that the range table problem drove much of the early history of computing even apart from the differential analyzer, perhaps it’s unfair to single out the differential analyzer for moral hand-wringing. The differential analyzer isn’t uniquely compromised by its military applications—the entire field of computing, during the Second World War and well afterward, advanced because of the endless funding being thrown at it by the United States military. + +Anyway, I think the more interesting legacy of the differential analyzer is what it teaches us about the nature of computing. I am surprised that the differential analyzer can accomplish as much as it can; my guess is that you are too. It is easy to fall into the trap of thinking of computing as the realm of what can be realized with very fast digital circuits. In truth, computing is a more abstract process than that, and electronic, digital circuits are just what we typically use to get it done. In his paper about the differential analyzer, Vannevar Bush suggests that his invention is just a small contribution to “the far-reaching project of utilizing complex mechanical interrelationships as substitutes for intricate processes of reasoning.” That puts it nicely. + +_If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][7] on Twitter or subscribe to the [RSS feed][8] to make sure you know when a new post is out._ + +_Previously on TwoBitHistory…_ + +> Do you worry that your children are "BBS-ing"? Do you have a neighbor who talks too much about his "door games"? +> +> In this VICE News special report, we take you into the seedy underworld of bulletin board systems: +> +> — TwoBitHistory (@TwoBitHistory) [February 2, 2020][9] + + 1. Alan Gluchoff. “Artillerymen and Mathematicians: Forest Ray Moulton and Changes in American Exterior Ballistics, 1885-1934.” Historia Mathematica, vol. 38, no. 4, 2011, pp. 506–547., . [↩︎][10] + + 2. Karl Kempf. “Electronic Computers within the Ordnance Corps,” 1961, accessed April 6, 2020, . [↩︎][11] + + + + +-------------------------------------------------------------------------------- + +via: https://twobithistory.org/2020/04/06/differential-analyzer.html + +作者:[Two-Bit History][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://twobithistory.org +[b]: https://github.com/lujun9972 +[1]: http://worrydream.com/refs/Bush%20-%20The%20Differential%20Analyzer.pdf +[2]: https://sinclairtarget.com/differential-analyzer/ +[3]: https://twobithistory.org/images/diff-analyzer-viz.png +[4]: https://twobithistory.org/images/analyzer-diagram.png +[5]: tmp.MoynZsbJ7w#fn:1 +[6]: tmp.MoynZsbJ7w#fn:2 +[7]: https://twitter.com/TwoBitHistory +[8]: https://twobithistory.org/feed.xml +[9]: https://twitter.com/TwoBitHistory/status/1224014531778826240?ref_src=twsrc%5Etfw +[10]: tmp.MoynZsbJ7w#fnref:1 +[11]: tmp.MoynZsbJ7w#fnref:2 From 3359847bf1bf4357925bd273b2768051d5a94198 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 22:02:33 +0800 Subject: [PATCH 258/334] =?UTF-8?q?=E9=80=89=E9=A2=98[talk]:=2020200202=20?= =?UTF-8?q?Bulletin=20Board=20Systems:=20The=20VICE=20Expos=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20200202 Bulletin Board Systems- The VICE Exposé.md --- ...Bulletin Board Systems- The VICE Exposé.md | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 sources/talk/20200202 Bulletin Board Systems- The VICE Exposé.md diff --git a/sources/talk/20200202 Bulletin Board Systems- The VICE Exposé.md b/sources/talk/20200202 Bulletin Board Systems- The VICE Exposé.md new file mode 100644 index 0000000000..c2a93b6f40 --- /dev/null +++ b/sources/talk/20200202 Bulletin Board Systems- The VICE Exposé.md @@ -0,0 +1,127 @@ +[#]: subject: "Bulletin Board Systems: The VICE Exposé" +[#]: via: "https://twobithistory.org/2020/02/02/bbs.html" +[#]: author: "Two-Bit History https://twobithistory.org" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Bulletin Board Systems: The VICE Exposé +====== + +By now, you have almost certainly heard of the dark web. On sites unlisted by any search engine, in forums that cannot be accessed without special passwords or protocols, criminals and terrorists meet to discuss conspiracy theories and trade child pornography. + +We here at VICE headquarters have reported before on the dark web’s [“hurtcore” communities][1], its [human trafficking markets][2], its [rent-a-hitman websites][3]. We have explored [the challenges the dark web presents to regulators][4], the rise of [dark web revenge porn][5], and the frightening size of [the dark web gun trade][6]. We have kept you informed about that one dark web forum where you can make like Walter White and [learn how to manufacture your own drugs][7], and also about—thanks to our foreign correspondent—[the Chinese dark web][8]. We have even attempted to [catalog every single location on the dark web][9]. Our coverage of the dark web has been nothing if not comprehensive. + +But I wanted to go deeper. + +We know that below the surface web is the deep web, and below the deep web is the dark web. It stands to reason that below the dark web there should be a deeper, darker web. + +A month ago, I set out to find it. Unsure where to start, I made a post on _Reddit_, a website frequented primarily by cosplayers and computer enthusiasts. I asked for a guide, a Styx ferryman to bear me across to the mythical underworld I sought to visit. + +Only minutes after I made my post, I received a private message. “If you want to see it, I’ll take you there,” wrote _Reddit_ user FingerMyKumquat. “But I’ll warn you just once—it’s not pretty to see.” + +### Getting Access + +This would not be like visiting Amazon to shop for toilet paper. I could not just enter an address into the address bar of my browser and hit go. In fact, as my Charon informed me, where we were going, there are no addresses. At least, no web addresses. + +But where exactly were we going? The answer: Back in time. The deepest layer of the internet is also the oldest. Down at this deepest layer exists a secret society of “bulletin board systems,” a network of underground meetinghouses that in some cases have been in continuous operation since the 1980s—since before Facebook, before Google, before even stupidvideos.com. + +To begin, I needed to download software that could handle the ancient protocols used to connect to the meetinghouses. I was told that bulletin board systems today use an obsolete military protocol called Telnet. Once upon a time, though, they operated over the phone lines. To connect to a system back then you had to dial its _phone number_. + +The software I needed was called [SyncTerm][10]. It was not available on the App Store. In order to install it, I had to compile it. This is a major barrier to entry, I am told, even to veteran computer programmers. + +When I had finally installed SyncTerm, my guide said he needed to populate my directory. I asked what that was a euphemism for, but was told it was not a euphemism. Down this far, there are no search engines, so you can only visit the bulletin board systems you know how to contact. My directory was the list of bulletin board systems I would be able to contact. My guide set me up with just seven, which he said would be more than enough. + +_More than enough for what,_ I wondered. Was I really prepared to go deeper than the dark web? Was I ready to look through this window into the black abyss of the human soul? + +![][11] _The vivid blue interface of SyncTerm. My directory of BBSes on the left._ + +### Heatwave + +I decided first to visit the bulletin board system called “Heatwave,” which I imagined must be a hangout for global warming survivalists. I “dialed” in. The next thing I knew, I was being asked if I wanted to create a user account. I had to be careful to pick an alias that would be inconspicuous in this sub-basement of the internet. I considered “DonPablo,” and “z3r0day,” but finally chose “ripper”—a name I could remember because it is also the name of my great-aunt Meredith’s Shih Tzu. I was then asked where I was dialing from; I decided “xxx” was the right amount of enigmatic. + +And then—I was in. Curtains of fire rolled down my screen and dispersed, revealing the main menu of the Heatwave bulletin board system. + +![][12] _The main menu of the Heatwave BBS._ + +I had been told that even in the glory days of bulletin board systems, before the rise of the world wide web, a large system would only have several hundred users or so. Many systems were more exclusive, and most served only users in a single telephone area code. But how many users dialed the “Heatwave” today? There was a main menu option that read “(L)ast Few Callers,” so I hit “L” on my keyboard. + +My screen slowly filled with a large table, listing all of the system’s “callers” over the last few days. Who were these shadowy outcasts, these expert hackers, these denizens of the digital demimonde? My eyes scanned down the list, and what I saw at first confused me: There was a “Dan,” calling from St. Louis, MO. There was also a “Greg Miller,” calling from Portland, OR. Another caller claimed he was “George” calling from Campellsburg, KY. Most of the entries were like that. + +It was a joke, of course. A meme, a troll. It was normcore fashion in noms de guerre. These were thrill-seeking Palo Alto adolescents on Adderall making fun of the surface web. They weren’t fooling me. + +I wanted to know what they talked about with each other. What cryptic colloquies took place here, so far from public scrutiny? My index finger, with ever so slight a tremble, hit “M” for “(M)essage Areas.” + +Here, I was presented with a choice. I could enter the area reserved for discussions about “T-99 and Geneve,” which I did not dare do, not knowing what that could possibly mean. I could also enter the area for discussions about “Other,” which seemed like a safe place to start. + +The system showed me message after message. There was advice about how to correctly operate a leaf-blower, as well as a protracted debate about the depth of the Strait of Hormuz relative to the draft of an aircraft carrier. I assumed the real messages were further on, and indeed I soon spotted what I was looking for. The user “Kevin” was complaining to other users about the side effects of a drug called Remicade. This was not a drug I had heard of before. Was it some powerful new synthetic stimulant? A cocktail of other recreational drugs? Was it something I could bring with me to impress people at the next VICE holiday party? + +I googled it. Remicade is used to treat rheumatoid arthritis and Crohn’s disease. + +In reply to the original message, there was some further discussion about high resting heart rates and mechanical heart valves. I decided that I had gotten lost and needed to contact FingerMyKumquat. “Finger,” I messaged him, “What is this shit I’m looking at here? I want the real stuff. I want blackmail and beheadings. Show me the scum of the earth!” + +“Perhaps you’re ready for the SpookNet,” he wrote back. + +### SpookNet + +Each bulletin board system is an island in the television-static ocean of the digital world. Each system’s callers are lonely sailors come into port after many a month plying the seas. + +But the bulletin board systems are not entirely disconnected. Faint phosphorescent filaments stretch between the islands, links in the special-purpose networks that were constructed—before the widespread availability of the internet—to propagate messages from one system to another. + +One such network is the SpookNet. Not every bulletin board system is connected to the SpookNet. To get on, I first had to dial “Reality Check.” + +![][13] _The Reality Check BBS._ + +Once I was in, I navigated my way past the main menu and through the SpookNet gateway. What I saw then was like a catalog index for everything stored in that secret Pentagon warehouse from the end of the _X-Files_ pilot. There were message boards dedicated to UFOs, to cryptography, to paranormal studies, and to “End Times and the Last Days.” There was a board for discussing “Truth, Polygraphs, and Serums,” and another for discussing “Silencers of Information.” Here, surely, I would find something worth writing about in an article for VICE. + +I browsed and I browsed. I learned about which UFO documentaries are worth watching on Netflix. I learned that “paper mill” is a derogatory term used in the intelligence community (IC) to describe individuals known for constantly trying to sell “explosive” or “sensitive” documents—as in the sentence, offered as an example by one SpookNet user, “Damn, here comes that paper mill Juan again.” I learned that there was an effort afoot to get two-factor authentication working for bulletin board systems. + +“These are just a bunch of normal losers,” I finally messaged my guide. “Mostly they complain about anti-vaxxers and verses from the Quran. This is just _Reddit_!” + +“Huh,” he replied. “When you said ‘scum of the earth,’ did you mean something else?” + +I had one last idea. In their heyday, bulletin board systems were infamous for being where everyone went to download illegal, cracked computer software. An entire subculture evolved, with gangs of software pirates competing to be the first to crack a new release. The first gang to crack the new software would post their “warez” for download along with a custom piece of artwork made using lo-fi ANSI graphics, which served to identify the crack as their own. + +I wondered if there were any old warez to be found on the Reality Check BBS. I backed out of the SpookNet gateway and keyed my way to the downloads area. There were many files on offer there, but one in particular caught my attention: a 5.3 megabyte file just called “GREY.” + +I downloaded it. It was a complete PDF copy of E. L. James’ _50 Shades of Grey_. + +_If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][14] on Twitter or subscribe to the [RSS feed][15] to make sure you know when a new post is out._ + +_Previously on TwoBitHistory…_ + +> I first heard about the FOAF (Friend of a Friend) standard back when I wrote my post about the Semantic Web. I thought it was a really interesting take on social networking and I've wanted to write about it since. Finally got around to it! +> +> — TwoBitHistory (@TwoBitHistory) [January 5, 2020][16] + +-------------------------------------------------------------------------------- + +via: https://twobithistory.org/2020/02/02/bbs.html + +作者:[Two-Bit History][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://twobithistory.org +[b]: https://github.com/lujun9972 +[1]: https://www.vice.com/en_us/article/mbxqqy/a-journey-into-the-worst-corners-of-the-dark-web +[2]: https://www.vice.com/en_us/article/vvbazy/my-brief-encounter-with-a-dark-web-human-trafficking-site +[3]: https://www.vice.com/en_us/article/3d434v/a-fake-dark-web-hitman-site-is-linked-to-a-real-murder +[4]: https://www.vice.com/en_us/article/ezv85m/problem-the-government-still-doesnt-understand-the-dark-web +[5]: https://www.vice.com/en_us/article/53988z/revenge-porn-returns-to-the-dark-web +[6]: https://www.vice.com/en_us/article/j5qnbg/dark-web-gun-trade-study-rand +[7]: https://www.vice.com/en_ca/article/wj374q/inside-the-dark-web-forum-that-tells-you-how-to-make-drugs +[8]: https://www.vice.com/en_us/article/4x38ed/the-chinese-deep-web-takes-a-darker-turn +[9]: https://www.vice.com/en_us/article/vv57n8/here-is-a-list-of-every-single-possible-dark-web-site +[10]: http://syncterm.bbsdev.net/ +[11]: https://twobithistory.org/images/sync.png +[12]: https://twobithistory.org/images/heatwave-main-menu.png +[13]: https://twobithistory.org/images/reality.png +[14]: https://twitter.com/TwoBitHistory +[15]: https://twobithistory.org/feed.xml +[16]: https://twitter.com/TwoBitHistory/status/1213920921251131394?ref_src=twsrc%5Etfw From f8a4d31c68220a86c73bd6d662d923378967f3d1 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 22:03:06 +0800 Subject: [PATCH 259/334] =?UTF-8?q?=E9=80=89=E9=A2=98[talk]:=2020200105=20?= =?UTF-8?q?Friend=20of=20a=20Friend:=20The=20Facebook=20That=20Could=20Hav?= =?UTF-8?q?e=20Been?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20200105 Friend of a Friend- The Facebook That Could Have Been.md --- ...iend- The Facebook That Could Have Been.md | 242 ++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 sources/talk/20200105 Friend of a Friend- The Facebook That Could Have Been.md diff --git a/sources/talk/20200105 Friend of a Friend- The Facebook That Could Have Been.md b/sources/talk/20200105 Friend of a Friend- The Facebook That Could Have Been.md new file mode 100644 index 0000000000..55c0fdeeae --- /dev/null +++ b/sources/talk/20200105 Friend of a Friend- The Facebook That Could Have Been.md @@ -0,0 +1,242 @@ +[#]: subject: "Friend of a Friend: The Facebook That Could Have Been" +[#]: via: "https://twobithistory.org/2020/01/05/foaf.html" +[#]: author: "Two-Bit History https://twobithistory.org" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Friend of a Friend: The Facebook That Could Have Been +====== + +> _I express my network in a FOAF file, and that is the start of the revolution._ —Tim Berners-Lee (2007) + +The FOAF standard, or Friend of a Friend standard, is a now largely defunct/ignored/superseded[1][1] web standard dating from the early 2000s that hints at what social networking might have looked like had Facebook not conquered the world. Before we talk about FOAF though, I want to talk about the New York City Subway. + +The New York City Subway is controlled by a single entity, the Metropolitan Transportation Agency, better known as the MTA. The MTA has a monopoly on subway travel in New York City. There is no legal way to travel in New York City by subway without purchasing a ticket from the MTA. The MTA has no competitors, at least not in the “subway space.” + +This wasn’t always true. Surprisingly, the subway system was once run by two corporations that competed with each other. The Inter-borough Rapid Transit Company (IRT) operated lines that ran mostly through Manhattan, while the Brooklyn-Manhattan Transit Corporation (BMT) operated lines in Brooklyn, some of which extended into Manhattan also. In 1932, the City opened its own service called the Independent Subway System to compete with the IRT and BMT, and so for a while there were _three_ different organizations running subway lines in New York City. + +One imagines that this was not an effective way to run a subway. It was not. Constructing interchanges between the various systems was challenging because the IRT and BMT used trains of different widths. Interchange stations also had to have at least two different fare-collection areas since passengers switching trains would have to pay multiple operators. The City eventually took over the IRT and BMT in 1940, bringing the whole system together under one operator, but some of the inefficiencies that the original division entailed are still problems today: Trains designed to run along lines inherited from the BMT (e.g. the A, C, or E) cannot run along lines inherited from the IRT (e.g. the 1, 2, or 3) because the IRT tunnels are too narrow. As a result, the MTA has to maintain two different fleets of mutually incompatible subway cars, presumably at significant additional expense relative to other subway systems in the world that only have to deal with a single tunnel width. + +This legacy of the competition between the IRT and BMT suggests that subway systems naturally tend toward monopoly. It just makes more sense for there to be a single operator than for there to be competing operators. Average passengers are amply compensated for the loss of choice by never having to worry about whether they brought their IRT MetroCard today but forgot their BMT MetroCard at home. + +Okay, so what does the Subway have to do with social networking? Well, I have wondered for a while now whether Facebook has, like the MTA, a natural monopoly. Facebook does seem to have _a_ monopoly, whether natural or unnatural—not over social media per se (I spend much more time on Twitter), but over my internet social connections with real people I know. It has a monopoly over, as they call it, my digitized “social graph”; I would quit Facebook tomorrow if I didn’t worry that by doing so I might lose many of those connections. I get angry about this power that Facebook has over me. I get angry in a way that I do not get angry about the MTA, even though the Subway is, metaphorically and literally, a sprawling trash fire. And I suppose I get angry because at root I believe that Facebook’s monopoly, unlike the MTA’s, is not a natural one. + +What this must mean is that I think Facebook owns all of our social data now because they happened to get there first and then dig a big moat around themselves, not because a world with competing Facebook-like platforms is inefficient or impossible. Is that true, though? There are some good reasons to think it isn’t: Did Facebook simply get there first, or did they instead just do social networking better than everyone else? Isn’t the fact that there is only one Facebook actually convenient if you are trying to figure out how to contact an old friend? In a world of competing Facebooks, what would it mean if you and your boyfriend are now Facebook official, but he still hasn’t gotten around to updating his relationship status on VisageBook, which still says he is in a relationship with his college ex? Which site will people trust? Also, if there were multiple sites, wouldn’t everyone spend a lot more time filling out web forms? + +In the last few years, as the disadvantages of centralized social networks have dramatically made themselves apparent, many people have attempted to create decentralized alternatives. These alternatives are based on open standards that could potentially support an ecosystem of inter-operating social networks (see e.g. [the Fediverse][2]). But none of these alternatives has yet supplanted a dominant social network. One obvious explanation for why this hasn’t happened is the power of network effects: With everyone already on Facebook, any one person thinking of leaving faces a high cost for doing so. Some might say this proves that social networks are natural monopolies and stop there; I would say that Facebook, Twitter, et al. chose to be walled gardens, and given that people have envisioned and even built social networks that inter-operate, the network effects that closed platforms enjoy tell us little about the inherent nature of social networks. + +So the real question, in my mind, is: Do platforms like Facebook continue to dominate merely because of their network effects, or is having a single dominant social network more efficient in the same way that having a single operator for a subway system is more efficient? + +Which finally brings me back to FOAF. Much of the world seems to have forgotten about the FOAF standard, but FOAF was an attempt to build a decentralized and open social network before anyone had even heard of Facebook. If any decentralized social network ever had a chance of occupying the redoubt that Facebook now occupies before Facebook got there, it was FOAF. Given that a large fraction of humanity now has a Facebook account, and given that relatively few people know about FOAF, should we conclude that social networking, like subway travel, really does lend itself to centralization and natural monopoly? Or does the FOAF project demonstrate that decentralized social networking was a feasible alternative that never became popular for other reasons? + +### The Future from the Early Aughts + +The FOAF project, begun in 2000, set out to create a universal standard for describing people and the relationships between them. That might strike you as a wildly ambitious goal today, but aspirations like that were par for the course in the late 1990s and early 2000s. The web (as people still called it then) had just trounced closed systems like America Online and [Prodigy][3]. It could only have been natural to assume that further innovation in computing would involve the open, standards-based approach embodied by the web. + +Many people believed that the next big thing was for the web to evolve into something called the Semantic Web. [I have written about][4] what exactly the Semantic Web was supposed to be and how it was supposed to work before, so I won’t go into detail here. But I will sketch the basic vision motivating the people who worked on Semantic Web technologies, because the FOAF standard was an application of that vision to social networking. + +There is an essay called [“How Google beat Amazon and Ebay to the Semantic Web”][5] that captures the lofty dream of the Semantic Web well. It was written by Paul Ford in 2002. The essay imagines a future (as imminent as 2009) in which Google, by embracing the Semantic Web, has replaced Amazon and eBay as the dominant e-commerce platform. In this future, you can search for something you want to purchase—perhaps a second-hand Martin guitar—by entering `buy:martin guitar` into Google. Google then shows you all the people near your zipcode selling Martin guitars. Google knows about these people and their guitars because Google can read RDF, a markup language and core Semantic Web technology focused on expressing relationships. Regular people can embed RDF on their web pages to advertise (among many other things) the items they have to sell. Ford predicts that as the number of people searching for and advertising products this way grows, Amazon and eBay will lose their near-monopolies over, respectively, first-hand and second-hand e-commerce. Nobody will want to search a single centralized database for something to buy when they could instead search the whole web. Even Google, Ford writes, will eventually lose its advantage, because in theory anyone could crawl the web reading RDF and offer a search feature similar to Google’s. At the very least, if Google wanted to make money from its Semantic Web marketplace by charging a percentage of each transaction, that percentage would probably by forced down over time by competitors offering a more attractive deal. + +Ford’s imagined future was an application of RDF, or the Resource Description Framework, to e-commerce, but the exciting thing about RDF was that hypothetically it could be used for anything. The RDF standard, along with a constellation of related standards, once widely adopted, was supposed to blow open database-backed software services on the internet the same way HTML had blown open document publishing on the internet. + +One arena that RDF and other Semantic Web technologies seemed poised to takeover immediately was social networking. The FOAF project, known originally as “RDF Web Ring” before being renamed, was the Semantic Web effort offshoot that sought to accomplish this. FOAF was so promising in its infancy that some people thought it would inevitably make all other social networking sites obsolete. A 2004 Guardian article about the project introduced FOAF this way: + +> In the beginning, way back in 1996, it was SixDegrees. Last year, it was Friendster. Last week, it was Orkut. Next week, it could be Flickr. All these websites, and dozens more, are designed to build networks of friends, and they are currently at the forefront of the trendiest internet development: social networking. But unless they can start to offer more substantial benefits, it is hard to see them all surviving, once the Friend Of A Friend (FOAF) standard becomes a normal part of life on the net.[2][6] + +The article goes on to complain that the biggest problem with social networking is that there are too many social networking sites. Something is needed that can connect all of the different networks together. FOAF is the solution, and it will revolutionize social networking as a result. + +FOAF, according to the article, would tie the different networks together by doing three key things: + + * It would establish a machine-readable format for social data that could be read by any social networking site, saving users from having to enter this information over and over again + * It would allow “personal information management programs,” i.e. your “Contacts” application, to generate a file in this machine-readable format that you could feed to social networking sites + * It would further allow this machine-readable format to be hosted on personal homepages and read remotely by social networking sites, meaning that you would be able to keep your various profiles up-to-date by just pushing changes to your own homepage + + + +It is hard to believe today, but the problem in 2004, at least for savvy webizens and technology columnists aware of all the latest sites, was not the lack of alternative social networks but instead the proliferation of them. Given _that_ problem—so alien to us now—one can see why it made sense to pursue a single standard that promised to make the proliferation of networks less of a burden. + +### The FOAF Spec + +According to the description currently given on the FOAF project’s website, FOAF is “a computer language defining a dictionary of people-related terms that can be used in structured data.” Back in 2000, in a document they wrote to explain the project’s goals, Dan Brickley and Libby Miller, FOAF’s creators, offered a different description that suggests more about the technology’s ultimate purpose—they introduced FOAF as a tool that would allow computers to read the personal information you put on your homepage the same way that other humans do.[3][7] FOAF would “help the web do the sorts of things that are currently the proprietary offering of centralised services.”[4][8] By defining a standard vocabulary for people and the relationships between them, FOAF would allow you to ask the web questions such as, “Find me today’s web recommendations made by people who work for Medical organizations,” or “Find me recent publications by people I’ve co-authored documents with.” + +Since FOAF is a standardized vocabulary, the most important output of the FOAF project was the FOAF specification. The FOAF specification defines a small collection of RDF _classes_ and RDF _properties_. (I’m not going to explain RDF here, but again see [my post about the Semantic Web][4] if you want to know more.) The RDF _classes_ defined by the FOAF specification represent subjects you might want to describe, such as people (the `Person` class) and organizations (the `Organization` class). The RDF _properties_ defined by the FOAF specification represent logical statements you might make about the different subjects. A person could have, for example, a first name (the `givenName` property), a last name (the `familyName` property), perhaps even a personality type (the `myersBriggs` property), and be near another person or location (the `based_near` property). The idea was that these classes and properties would be sufficient to represent the kind of the things people say about themselves and their friends on their personal homepage. + +The FOAF specification gives the following as an example of a well-formed FOAF document. This example uses XML, though an equivalent document could be written using JSON or a number of other formats: + +``` + + + Dan Brickley + + + + + +``` + +This FOAF document describes a person named “Dan Brickley” (one of the specification’s authors) that has a homepage at `http://danbri.org`, something called an “open ID,” and a picture available at `/images/me.jpg`, presumably relative to the base address of Brickley’s homepage. The FOAF-specific terms are prefixed by `foaf:`, indicating that they are part of the FOAF namespace, while the more general RDF terms are prefixed by `rdf:`. + +Just to persuade you that FOAF isn’t tied to XML, here is a similar FOAF example from Wikipedia, expressed using a format called JSON-LD[5][9]: + +``` + + { + "@context": { + "name": "http://xmlns.com/foaf/0.1/name", + "homepage": { + "@id": "http://xmlns.com/foaf/0.1/workplaceHomepage", + "@type": "@id" + }, + "Person": "http://xmlns.com/foaf/0.1/Person" + }, + "@id": "https://me.example.com", + "@type": "Person", + "name": "John Smith", + "homepage": "https://www.example.com/" + } + +``` + +This FOAF document describes a person named John Smith with a homepage at `www.example.com`. + +Perhaps the best way to get a feel for how FOAF works is to play around with [FOAF-a-matic][10], a web tool for generating FOAF documents. It allows you to enter information about yourself using a web form, then uses that information to create the FOAF document (in XML) that represents you. FOAF-a-matic demonstrates how FOAF could have been used to save everyone from having to enter their social information into a web form ever again—if every social networking site could read FOAF, all you’d need to do to sign up for a new site is point the site to the FOAF document that FOAF-a-matic generated for you. + +Here is a slightly more complicated FOAF example, representing me, that I created using FOAF-a-matic: + +``` + + + + + + + + + + Sinclair Target + Sinclair + Target + + + + + John Smith + + + + + + + +``` + +This example has quite a lot of preamble setting up the various XML namespaces used by the document. There is also a section containing data about the tool that was used to generate the document, largely so that, it seems, people know whom to email with complaints. The `foaf:Person` element describing me tells you my name, email address, and homepage. There is also a nested `foaf:knows` element telling you that I am friends with John Smith. + +This example illustrates another important feature of FOAF documents: They can link to each other. If you remember from the previous example, my friend John Smith has a homepage at `www.example.com`. In this example, where I list John Smith as a `foaf:person` with whom I have a `foaf:knows` relationship, I also provide a `rdfs:seeAlso` element that points to John Smith’s FOAF document hosted on his homepage. Because I have provided this link, any program reading my FOAF document could find out more about John Smith by following the link and reading his FOAF document. In the FOAF document we have for John Smith above, John did not provide any information about his friends (including me, meaning, tragically, that our friendship is unidirectional). But if he had, then the program reading my document could find out not only about me but also about John, his friends, their friends, and so on, until the program has crawled the whole social graph that John and I inhabit. + +This functionality will seem familiar to anyone that has used Facebook, which is to say that this functionality will seem familiar to you. There is no `foaf:wall` property or `foaf:poke` property to replicate Facebook’s feature set exactly. Obviously, there is also no slick blue user interface that everyone can use to visualize their FOAF social network; FOAF is just a vocabulary. But Facebook’s core feature—the feature that I have argued is key to Facebook’s monopoly power over, at the very least, myself—is here provided in a distributed way. FOAF allows a group of friends to represent their real-life social graph digitally by hosting FOAF documents on their own homepages. It allows them to do this without surrendering control of their data to a centralized database in the sky run by a billionaire android-man who spends much of his time apologizing before congressional committees. + +### FOAF on Ice + +If you visit the current FOAF project homepage, you will notice that, in the top right corner, there is an image of the character Fry from the TV series Futurama, stuck inside some sort of stasis chamber. This is a still from the pilot episode of Futurama, in which Fry gets frozen in a cryogenic tank in 1999 only to awake a millennium later in 2999. Brickley, whom I messaged briefly on Twitter, told me that he put that image there as a way communicating that the FOAF project is currently “in stasis,” though he hopes that there will be a future opportunity to resuscitate the project along with its early 2000s optimism about how the web should work. + +FOAF never revolutionized social networking the way that the 2004 Guardian article about it expected it would. Some social networking sites decided to support the standard: LiveJournal and MyOpera are examples.[6][11] FOAF even played a role in Howard Dean’s presidential campaign in 2004—a group of bloggers and programmers got together to create a network of websites they called “DeanSpace” to promote the campaign, and these sites used FOAF to keep track of supporters and volunteers.[7][12] But today FOAF is known primarily for being one of the more widely used vocabularies of RDF, itself a niche standard on the modern web. If FOAF is part of your experience of the web today at all, then it is as an ancestor to the technology that powers Google’s “knowledge panels” (the little sidebars that tell you the basics about a person or a thing if you searched for something simple). Google uses vocabularies published by the schema.org project—the modern heir to the Semantic Web effort—to populate its knowledge panels.[8][13] The schema.org vocabulary for describing people seems to be somewhat inspired by FOAF and serves many of the same purposes. + +So why didn’t FOAF succeed? Why do we all use Facebook now instead? Let’s ignore that FOAF is a simple standard with nowhere near as many features as Facebook—that’s true today, clearly, but if FOAF had enjoyed more momentum it’s possible that applications could have been built on top of it to deliver a Facebook-like experience. The interesting question is: Why didn’t this nascent form of distributed social networking catch fire when Facebook was not yet around to compete with it? + +There probably is no single answer to that question, but if I had to pick one, I think the biggest issue is that FOAF only makes sense on a web where everyone has a personal website. In the late 1990s and early 2000s, it might have been easy to assume the web would eventually look like this, especially since so many of the web’s early adopters were, as far as I can tell, prolific bloggers or politically engaged technologists excited to have a platform. But the reality is that regular people don’t want to have to learn how to host a website. FOAF allows you to control your own social information and broadcast it to social networks instead of filling out endless web forms, which sounds pretty great if you already have somewhere to host that information. But most people in practice found it easier to just fill out the web form and sign up for Facebook than to figure out how to buy a domain and host some XML. + +What does this mean for my original question about whether or not Facebook’s monopoly is a natural one? I think I have to concede that the FOAF example is evidence that social networking _does_ naturally lend itself to monopoly. + +That people did not want to host their own data isn’t especially meaningful itself—modern distributed social networks like [Mastodon][14] have solved that problem by letting regular users host their profiles on nodes set up by more savvy users. It is a sign, however, of just how much people hate complexity. This is bad news for decentralized social networks, because they are inherently more complex under the hood than centralized networks in a way that is often impossible to hide from users. + +Consider FOAF: If I were to write an application that read FOAF data from personal websites, what would I do if Sally’s FOAF document mentions a John Smith with a homepage at `example.com`, and Sue’s FOAF document mentions a John Smith with a homepage at `example.net`? Are we talking about a single John Smith with two websites or two entirely different John Smiths? What if the both FOAF documents list John Smith’s email as `johnsmith@gmail.com`? This issue of identity was an acute one for FOAF. In a 2003 email, Brickley wrote that because there does not exist and probably should not exist a “planet-wide system for identifying people,” the approach taken by FOAF is “pluralistic.”[9][15] Some properties of FOAF people, such as email addresses and homepage addresses, are special in that their values are globally unique. So these different properties can be used to merge (or, as Libby Miller called it, “smoosh”) FOAF documents about people together. But none of these special properties are privileged above the others, so it’s not obvious how to handle our John Smith case. Do we trust the homepages and conclude we have two different people? Or do we trust the email addresses and conclude we have a single person? Could I really write an application capable of resolving this conflict without involving (and inconveniencing) the user? + +Facebook, with its single database and lack of political qualms, could create a “planet-wide system for identifying people” and so just gave every person a unique Facebook ID. Problem solved. + +Complexity alone might not doom distributed social networks if people cared about being able to own and control their data. But FOAF’s failure to take off demonstrates that people have never valued control very highly. As one blogger has put it, “‘Users want to own their own data’ is an ideology, not a use case.”[10][16] If users do not value control enough to stomach additional complexity, and if centralized systems are more simple than distributed ones—and if, further, centralized systems tend to be closed and thus the successful ones enjoy powerful network effects—then social networks are indeed natural monopolies. + +That said, I think there is still a distinction to be drawn between the subway system case and the social networking case. I am comfortable with the MTA’s monopoly on subway travel because I expect subway systems to be natural monopolies for a long time to come. If there is going to be only one operator of the New York City Subway, then it ought to be the government, which is at least nominally more accountable than a private company with no competitors. But I do not expect social networks to stay natural monopolies. The Subway is carved in granite; the digital world is writ in water. Distributed social networks may now be more complicated than centralized networks in the same way that carrying two MetroCards is more complicated than carrying one. In the future, though, the web, or even the internet, could change in fundamental ways that make distributed technology much easier to use. + +If that happens, perhaps FOAF will be remembered as the first attempt to build the kind of social network that humanity, after a brief experiment with corporate mega-databases, does and always will prefer. + +_If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][17] on Twitter or subscribe to the [RSS feed][18] to make sure you know when a new post is out._ + +_Previously on TwoBitHistory…_ + +> I know it's been too long since my last post, but my new one is here! I wrote almost 5000 words on John Carmack, Doom, and the history of the binary space partitioning tree. +> +> — TwoBitHistory (@TwoBitHistory) [November 6, 2019][19] + + 1. Please note that I did not dare say “dead.” [↩︎][20] + + 2. Jack Schofield, “Let’s be Friendsters,” The Guardian, February 19, 2004, accessed January 5, 2020, . [↩︎][21] + + 3. Dan Brickley and Libby Miller, “Introducing FOAF,” FOAF Project, 2008, accessed January 5, 2020, . [↩︎][22] + + 4. ibid. [↩︎][23] + + 5. Wikipedia contributors, “JSON-LD,” Wikipedia: The Free Encyclopedia, December 13, 2019, accessed January 5, 2020, . [↩︎][24] + + 6. “Data Sources,” FOAF Project Wiki, December 11 2009, accessed January 5, 2020, . [↩︎][25] + + 7. Aldon Hynes, “What is Dean Space?”, Extreme Democracy, accessed January 5, 2020, . [↩︎][26] + + 8. “Understand how structured data works,” Google Developer Portal, accessed January 5, 2020, . [↩︎][27] + + 9. tef, “Why your distributed network will not work,” Progamming is Terrible, January 2, 2013, . [↩︎][28] + + 10. Dan Brickley, “Identifying things in FOAF,” rdfweb-dev Mailing List, July 10, 2003, accessed on January 5, 2020, . [↩︎][29] + + + + +-------------------------------------------------------------------------------- + +via: https://twobithistory.org/2020/01/05/foaf.html + +作者:[Two-Bit History][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://twobithistory.org +[b]: https://github.com/lujun9972 +[1]: tmp.mJHAgyVHGr#fn:1 +[2]: https://en.wikipedia.org/wiki/Fediverse +[3]: https://en.wikipedia.org/wiki/Prodigy_(online_service) +[4]: https://twobithistory.org/2018/05/27/semantic-web.html +[5]: https://www.ftrain.com/google_takes_all +[6]: tmp.mJHAgyVHGr#fn:2 +[7]: tmp.mJHAgyVHGr#fn:3 +[8]: tmp.mJHAgyVHGr#fn:4 +[9]: tmp.mJHAgyVHGr#fn:5 +[10]: http://www.ldodds.com/foaf/foaf-a-matic +[11]: tmp.mJHAgyVHGr#fn:6 +[12]: tmp.mJHAgyVHGr#fn:7 +[13]: tmp.mJHAgyVHGr#fn:8 +[14]: https://en.wikipedia.org/wiki/Mastodon_(software) +[15]: tmp.mJHAgyVHGr#fn:9 +[16]: tmp.mJHAgyVHGr#fn:10 +[17]: https://twitter.com/TwoBitHistory +[18]: https://twobithistory.org/feed.xml +[19]: https://twitter.com/TwoBitHistory/status/1192196764239093760?ref_src=twsrc%5Etfw +[20]: tmp.mJHAgyVHGr#fnref:1 +[21]: tmp.mJHAgyVHGr#fnref:2 +[22]: tmp.mJHAgyVHGr#fnref:3 +[23]: tmp.mJHAgyVHGr#fnref:4 +[24]: tmp.mJHAgyVHGr#fnref:5 +[25]: tmp.mJHAgyVHGr#fnref:6 +[26]: tmp.mJHAgyVHGr#fnref:7 +[27]: tmp.mJHAgyVHGr#fnref:8 +[28]: tmp.mJHAgyVHGr#fnref:9 +[29]: tmp.mJHAgyVHGr#fnref:10 From 844743a5b6e6b634c48a7e17618dc04da4fe1756 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 22:03:25 +0800 Subject: [PATCH 260/334] =?UTF-8?q?=E9=80=89=E9=A2=98[talk]:=2020191106=20?= =?UTF-8?q?How=20Much=20of=20a=20Genius-Level=20Move=20Was=20Using=20Binar?= =?UTF-8?q?y=20Space=20Partitioning=20in=20Doom=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20191106 How Much of a Genius-Level Move Was Using Binary Space Partitioning in Doom.md --- ...Using Binary Space Partitioning in Doom.md | 173 ++++++++++++++++++ 1 file changed, 173 insertions(+) create mode 100644 sources/talk/20191106 How Much of a Genius-Level Move Was Using Binary Space Partitioning in Doom.md diff --git a/sources/talk/20191106 How Much of a Genius-Level Move Was Using Binary Space Partitioning in Doom.md b/sources/talk/20191106 How Much of a Genius-Level Move Was Using Binary Space Partitioning in Doom.md new file mode 100644 index 0000000000..8f71021591 --- /dev/null +++ b/sources/talk/20191106 How Much of a Genius-Level Move Was Using Binary Space Partitioning in Doom.md @@ -0,0 +1,173 @@ +[#]: subject: "How Much of a Genius-Level Move Was Using Binary Space Partitioning in Doom?" +[#]: via: "https://twobithistory.org/2019/11/06/doom-bsp.html" +[#]: author: "Two-Bit History https://twobithistory.org" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How Much of a Genius-Level Move Was Using Binary Space Partitioning in Doom? +====== + +In 1993, id Software released the first-person shooter _Doom_, which quickly became a phenomenon. The game is now considered one of the most influential games of all time. + +A decade after _Doom_’s release, in 2003, journalist David Kushner published a book about id Software called _Masters of Doom_, which has since become the canonical account of _Doom_’s creation. I read _Masters of Doom_ a few years ago and don’t remember much of it now, but there was one story in the book about lead programmer John Carmack that has stuck with me. This is a loose gloss of the story (see below for the full details), but essentially, early in the development of _Doom_, Carmack realized that the 3D renderer he had written for the game slowed to a crawl when trying to render certain levels. This was unacceptable, because _Doom_ was supposed to be action-packed and frenetic. So Carmack, realizing the problem with his renderer was fundamental enough that he would need to find a better rendering algorithm, started reading research papers. He eventually implemented a technique called “binary space partitioning,” never before used in a video game, that dramatically sped up the _Doom_ engine. + +That story about Carmack applying cutting-edge academic research to video games has always impressed me. It is my explanation for why Carmack has become such a legendary figure. He deserves to be known as the archetypal genius video game programmer for all sorts of reasons, but this episode with the academic papers and the binary space partitioning is the justification I think of first. + +Obviously, the story is impressive because “binary space partitioning” sounds like it would be a difficult thing to just read about and implement yourself. I’ve long assumed that what Carmack did was a clever intellectual leap, but because I’ve never understood what binary space partitioning is or how novel a technique it was when Carmack decided to use it, I’ve never known for sure. On a spectrum from Homer Simpson to Albert Einstein, how much of a genius-level move was it really for Carmack to add binary space partitioning to _Doom_? + +I’ve also wondered where binary space partitioning first came from and how the idea found its way to Carmack. So this post is about John Carmack and _Doom_, but it is also about the history of a data structure: the binary space partitioning tree (or BSP tree). It turns out that the BSP tree, rather interestingly, and like so many things in computer science, has its origins in research conducted for the military. + +That’s right: E1M1, the first level of _Doom_, was brought to you by the US Air Force. + +### The VSD Problem + +The BSP tree is a solution to one of the thorniest problems in computer graphics. In order to render a three-dimensional scene, a renderer has to figure out, given a particular viewpoint, what can be seen and what cannot be seen. This is not especially challenging if you have lots of time, but a respectable real-time game engine needs to figure out what can be seen and what cannot be seen at least 30 times a second. + +This problem is sometimes called the problem of visible surface determination. Michael Abrash, a programmer who worked with Carmack on _Quake_ (id Software’s follow-up to _Doom_), wrote about the VSD problem in his famous _Graphics Programming Black Book_: + +> I want to talk about what is, in my opinion, the toughest 3-D problem of all: visible surface determination (drawing the proper surface at each pixel), and its close relative, culling (discarding non-visible polygons as quickly as possible, a way of accelerating visible surface determination). In the interests of brevity, I’ll use the abbreviation VSD to mean both visible surface determination and culling from now on. + +> Why do I think VSD is the toughest 3-D challenge? Although rasterization issues such as texture mapping are fascinating and important, they are tasks of relatively finite scope, and are being moved into hardware as 3-D accelerators appear; also, they only scale with increases in screen resolution, which are relatively modest. + +> In contrast, VSD is an open-ended problem, and there are dozens of approaches currently in use. Even more significantly, the performance of VSD, done in an unsophisticated fashion, scales directly with scene complexity, which tends to increase as a square or cube function, so this very rapidly becomes the limiting factor in rendering realistic worlds.[1][1] + +Abrash was writing about the difficulty of the VSD problem in the late ’90s, years after _Doom_ had proved that regular people wanted to be able to play graphically intensive games on their home computers. In the early ’90s, when id Software first began publishing games, the games had to be programmed to run efficiently on computers not designed to run them, computers meant for word processing, spreadsheet applications, and little else. To make this work, especially for the few 3D games that id Software published before _Doom_, id Software had to be creative. In these games, the design of all the levels was constrained in such a way that the VSD problem was easier to solve. + +For example, in _Wolfenstein 3D_, the game id Software released just prior to _Doom_, every level is made from walls that are axis-aligned. In other words, in the Wolfenstein universe, you can have north-south walls or west-east walls, but nothing else. Walls can also only be placed at fixed intervals on a grid—all hallways are either one grid square wide, or two grid squares wide, etc., but never 2.5 grid squares wide. Though this meant that the id Software team could only design levels that all looked somewhat the same, it made Carmack’s job of writing a renderer for _Wolfenstein_ much simpler. + +The _Wolfenstein_ renderer solved the VSD problem by “marching” rays into the virtual world from the screen. Usually a renderer that uses rays is a “raycasting” renderer—these renderers are often slow, because solving the VSD problem in a raycaster involves finding the first intersection between a ray and something in your world, which in the general case requires lots of number crunching. But in _Wolfenstein_, because all the walls are aligned with the grid, the only location a ray can possibly intersect a wall is at the grid lines. So all the renderer needs to do is check each of those intersection points. If the renderer starts by checking the intersection point nearest to the player’s viewpoint, then checks the next nearest, and so on, and stops when it encounters the first wall, the VSD problem has been solved in an almost trivial way. A ray is just marched forward from each pixel until it hits something, which works because the marching is so cheap in terms of CPU cycles. And actually, since all walls are the same height, it is only necessary to march a single ray for every _column_ of pixels. + +This rendering shortcut made _Wolfenstein_ fast enough to run on underpowered home PCs in the era before dedicated graphics cards. But this approach would not work for _Doom_, since the id team had decided that their new game would feature novel things like diagonal walls, stairs, and ceilings of different heights. Ray marching was no longer viable, so Carmack wrote a different kind of renderer. Whereas the _Wolfenstein_ renderer, with its ray for every column of pixels, is an “image-first” renderer, the _Doom_ renderer is an “object-first” renderer. This means that rather than iterating through the pixels on screen and figuring out what color they should be, the _Doom_ renderer iterates through the objects in a scene and projects each onto the screen in turn. + +In an object-first renderer, one easy way to solve the VSD problem is to use a z-buffer. Each time you project an object onto the screen, for each pixel you want to draw to, you do a check. If the part of the object you want to draw is closer to the player than what was already drawn to the pixel, then you can overwrite what is there. Otherwise you have to leave the pixel as is. This approach is simple, but a z-buffer requires a lot of memory, and the renderer may still expend a lot of CPU cycles projecting level geometry that is never going to be seen by the player. + +In the early 1990s, there was an additional drawback to the z-buffer approach: On IBM-compatible PCs, which used a video adapter system called VGA, writing to the output frame buffer was an expensive operation. So time spent drawing pixels that would only get overwritten later tanked the performance of your renderer. + +Since writing to the frame buffer was so expensive, the ideal renderer was one that started by drawing the objects closest to the player, then the objects just beyond those objects, and so on, until every pixel on screen had been written to. At that point the renderer would know to stop, saving all the time it might have spent considering far-away objects that the player cannot see. But ordering the objects in a scene this way, from closest to farthest, is tantamount to solving the VSD problem. Once again, the question is: What can be seen by the player? + +Initially, Carmack tried to solve this problem by relying on the layout of _Doom_’s levels. His renderer started by drawing the walls of the room currently occupied by the player, then flooded out into neighboring rooms to draw the walls in those rooms that could be seen from the current room. Provided that every room was convex, this solved the VSD issue. Rooms that were not convex could be split into convex “sectors.” You can see how this rendering technique might have looked if run at extra-slow speed [in this video][2], where YouTuber Bisqwit demonstrates a renderer of his own that works according to the same general algorithm. This algorithm was successfully used in Duke Nukem 3D, released three years after _Doom_, when CPUs were more powerful. But, in 1993, running on the hardware then available, the _Doom_ renderer that used this algorithm struggled with complicated levels—particularly when sectors were nested inside of each other, which was the only way to create something like a circular pit of stairs. A circular pit of stairs led to lots of repeated recursive descents into a sector that had already been drawn, strangling the game engine’s speed. + +Around the time that the id team realized that the _Doom_ game engine might be too slow, id Software was asked to port _Wolfenstein 3D_ to the Super Nintendo. The Super Nintendo was even less powerful than the IBM-compatible PCs of the day, and it turned out that the ray-marching _Wolfenstein_ renderer, simple as it was, didn’t run fast enough on the Super Nintendo hardware. So Carmack began looking for a better algorithm. It was actually for the Super Nintendo port of _Wolfenstein_ that Carmack first researched and implemented binary space partitioning. In _Wolfenstein_, this was relatively straightforward because all the walls were axis-aligned; in _Doom_, it would be more complex. But Carmack realized that BSP trees would solve _Doom_’s speed problems too. + +### Binary Space Partitioning + +Binary space partitioning makes the VSD problem easier to solve by splitting a 3D scene into parts ahead of time. For now, you just need to grasp why splitting a scene is useful: If you draw a line (really a plane in 3D) across your scene, and you know which side of the line the player or camera viewpoint is on, then you also know that nothing on the other side of the line can obstruct something on the viewpoint’s side of the line. If you repeat this process many times, you end up with a 3D scene split into many sections, which wouldn’t be an improvement on the original scene except now you know more about how different parts of the scene can obstruct each other. + +The first people to write about dividing a 3D scene like this were researchers trying to establish for the US Air Force whether computer graphics were sufficiently advanced to use in flight simulators. They released their findings in a 1969 report called “Study for Applying Computer-Generated Images to Visual Simulation.” The report concluded that computer graphics could be used to train pilots, but also warned that the implementation would be complicated by the VSD problem: + +> One of the most significant problems that must be faced in the real-time computation of images is the priority, or hidden-line, problem. In our everyday visual perception of our surroundings, it is a problem that nature solves with trivial ease; a point of an opaque object obscures all other points that lie along the same line of sight and are more distant. In the computer, the task is formidable. The computations required to resolve priority in the general case grow exponentially with the complexity of the environment, and soon they surpass the computing load associated with finding the perspective images of the objects.[2][3] + +One solution these researchers mention, which according to them was earlier used in a project for NASA, is based on creating what I am going to call an “occlusion matrix.” The researchers point out that a plane dividing a scene in two can be used to resolve “any priority conflict” between objects on opposite sides of the plane. In general you might have to add these planes explicitly to your scene, but with certain kinds of geometry you can just rely on the faces of the objects you already have. They give the example in the figure below, where \\(p_1\\), \\(p_2\\), and \\(p_3\\) are the separating planes. If the camera viewpoint is on the forward or “true” side of one of these planes, then \\(p_i\\) evaluates to 1. The matrix shows the relationships between the three objects based on the three dividing planes and the location of the camera viewpoint—if object \\(a_i\\) obscures object \\(a_j\\), then entry \\(a_{ij}\\) in the matrix will be a 1. + +![][4] + +The researchers propose that this matrix could be implemented in hardware and re-evaluated every frame. Basically the matrix would act as a big switch or a kind of pre-built z-buffer. When drawing a given object, no video would be output for the parts of the object when a 1 exists in the object’s column and the corresponding row object is also being drawn. + +The major drawback with this matrix approach is that to represent a scene with \\(n\\) objects you need a matrix of size \\(n^2\\). So the researchers go on to explore whether it would be feasible to represent the occlusion matrix as a “priority list” instead, which would only be of size \\(n\\) and would establish an order in which objects should be drawn. They immediately note that for certain scenes like the one in the figure above no ordering can be made (since there is an occlusion cycle), so they spend a lot of time laying out the mathematical distinction between “proper” and “improper” scenes. Eventually they conclude that, at least for “proper” scenes—and it should be easy enough for a scene designer to avoid “improper” cases—a priority list could be generated. But they leave the list generation as an exercise for the reader. It seems the primary contribution of this 1969 study was to point out that it should be possible to use partitioning planes to order objects in a scene for rendering, at least _in theory_. + +It was not until 1980 that a paper, titled “On Visible Surface Generation by A Priori Tree Structures,” demonstrated a concrete algorithm to accomplish this. The 1980 paper, written by Henry Fuchs, Zvi Kedem, and Bruce Naylor, introduced the BSP tree. The authors say that their novel data structure is “an alternative solution to an approach first utilized a decade ago but due to a few difficulties, not widely exploited”—here referring to the approach taken in the 1969 Air Force study.[3][5] A BSP tree, once constructed, can easily be used to provide a priority ordering for objects in the scene. + +Fuchs, Kedem, and Naylor give a pretty readable explanation of how a BSP tree works, but let me see if I can provide a less formal but more concise one. + +You begin by picking one polygon in your scene and making the plane in which the polygon lies your partitioning plane. That one polygon also ends up as the root node in your tree. The remaining polygons in your scene will be on one side or the other of your root partitioning plane. The polygons on the “forward” side or in the “forward” half-space of your plane end up in the left subtree of your root node, while the polygons on the “back” side or in the “back” half-space of your plane end up in the right subtree. You then repeat this process recursively, picking a polygon from your left and right subtrees to be the new partitioning planes for their respective half-spaces, which generates further half-spaces and further sub-trees. You stop when you run out of polygons. + +Say you want to render the geometry in your scene from back-to-front. (This is known as the “painter’s algorithm,” since it means that polygons further from the camera will get drawn over by polygons closer to the camera, producing a correct rendering.) To achieve this, all you have to do is an in-order traversal of the BSP tree, where the decision to render the left or right subtree of any node first is determined by whether the camera viewpoint is in either the forward or back half-space relative to the partitioning plane associated with the node. So at each node in the tree, you render all the polygons on the “far” side of the plane first, then the polygon in the partitioning plane, then all the polygons on the “near” side of the plane—”far” and “near” being relative to the camera viewpoint. This solves the VSD problem because, as we learned several paragraphs back, the polygons on the far side of the partitioning plane cannot obstruct anything on the near side. + +The following diagram shows the construction and traversal of a BSP tree representing a simple 2D scene. In 2D, the partitioning planes are instead partitioning lines, but the basic idea is the same in a more complicated 3D scene. + +![][6] _Step One: The root partitioning line along wall D splits the remaining geometry into two sets._ + +![][7] _Step Two: The half-spaces on either side of D are split again. Wall C is the only wall in its half-space so no split is needed. Wall B forms the new partitioning line in its half-space. Wall A must be split into two walls since it crosses the partitioning line._ + +![][8] _A back-to-front ordering of the walls relative to the viewpoint in the top-right corner, useful for implementing the painter’s algorithm. This is just an in-order traversal of the tree._ + +The really neat thing about a BSP tree, which Fuchs, Kedem, and Naylor stress several times, is that it only has to be constructed once. This is somewhat surprising, but the same BSP tree can be used to render a scene no matter where the camera viewpoint is. The BSP tree remains valid as long as the polygons in the scene don’t move. This is why the BSP tree is so useful for real-time rendering—all the hard work that goes into constructing the tree can be done beforehand rather than during rendering. + +One issue that Fuchs, Kedem, and Naylor say needs further exploration is the question of what makes a “good” BSP tree. The quality of your BSP tree will depend on which polygons you decide to use to establish your partitioning planes. I skipped over this earlier, but if you partition using a plane that intersects other polygons, then in order for the BSP algorithm to work, you have to split the intersected polygons in two, so that one part can go in one half-space and the other part in the other half-space. If this happens a lot, then building a BSP tree will dramatically increase the number of polygons in your scene. + +Bruce Naylor, one of the authors of the 1980 paper, would later write about this problem in his 1993 paper, “Constructing Good Partitioning Trees.” According to John Romero, one of Carmack’s fellow id Software co-founders, this paper was one of the papers that Carmack read when he was trying to implement BSP trees in _Doom_.[4][9] + +### BSP Trees in Doom + +Remember that, in his first draft of the _Doom_ renderer, Carmack had been trying to establish a rendering order for level geometry by “flooding” the renderer out from the player’s current room into neighboring rooms. BSP trees were a better way to establish this ordering because they avoided the issue where the renderer found itself visiting the same room (or sector) multiple times, wasting CPU cycles. + +“Adding BSP trees to _Doom_” meant, in practice, adding a BSP tree generator to the _Doom_ level editor. When a level in _Doom_ was complete, a BSP tree was generated from the level geometry. According to Fabien Sanglard, the generation process could take as long as eight seconds for a single level and 11 minutes for all the levels in the original _Doom_.[5][10] The generation process was lengthy in part because Carmack’s BSP generation algorithm tries to search for a “good” BSP tree using various heuristics. An eight-second delay would have been unforgivable at runtime, but it was not long to wait when done offline, especially considering the performance gains the BSP trees brought to the renderer. The generated BSP tree for a single level would have then ended up as part of the level data loaded into the game when it starts. + +Carmack put a spin on the BSP tree algorithm outlined in the 1980 paper, because once _Doom_ is started and the BSP tree for the current level is read into memory, the renderer uses the BSP tree to draw objects front-to-back rather than back-to-front. In the 1980 paper, Fuchs, Kedem, and Naylor show how a BSP tree can be used to implement the back-to-front painter’s algorithm, but the painter’s algorithm involves a lot of over-drawing that would have been expensive on an IBM-compatible PC. So the _Doom_ renderer instead starts with the geometry closer to the player, draws that first, then draws the geometry farther away. This reverse ordering is easy to achieve using a BSP tree, since you can just make the opposite traversal decision at each node in the tree. To ensure that the farther-away geometry is not drawn over the closer geometry, the _Doom_ renderer uses a kind of implicit z-buffer that provides much of the benefit of a z-buffer with a much smaller memory footprint. There is one array that keeps track of occlusion in the horizontal dimension, and another two arrays that keep track of occlusion in the vertical dimension from the top and bottom of the screen. The _Doom_ renderer can get away with not using an actual z-buffer because _Doom_ is not technically a fully 3D game. The cheaper data structures work because certain things never appear in _Doom_: The horizontal occlusion array works because there are no sloping walls, and the vertical occlusion arrays work because no walls have, say, two windows, one above the other. + +The only other tricky issue left is how to incorporate _Doom_’s moving characters into the static level geometry drawn with the aid of the BSP tree. The enemies in _Doom_ cannot be a part of the BSP tree because they move; the BSP tree only works for geometry that never moves. So the _Doom_ renderer draws the static level geometry first, keeping track of the segments of the screen that were drawn to (with yet another memory-efficient data structure). It then draws the enemies in back-to-front order, clipping them against the segments of the screen that occlude them. This process is not as optimal as rendering using the BSP tree, but because there are usually fewer enemies visible than there is level geometry in a level, speed isn’t as much of an issue here. + +Using BSP trees in _Doom_ was a major win. Obviously it is pretty neat that Carmack was able to figure out that BSP trees were the perfect solution to his problem. But was it a _genius_-level move? + +In his excellent book about the _Doom_ game engine, Fabien Sanglard quotes John Romero saying that Bruce Naylor’s paper, “Constructing Good Partitioning Trees,” was mostly about using BSP trees to cull backfaces from 3D models.[6][11] According to Romero, Carmack thought the algorithm could still be useful for _Doom_, so he went ahead and implemented it. This description is quite flattering to Carmack—it implies he saw that BSP trees could be useful for real-time video games when other people were still using the technique to render static scenes. There is a similarly flattering story in _Masters of Doom_: Kushner suggests that Carmack read Naylor’s paper and asked himself, “what if you could use a BSP to create not just one 3D image but an entire virtual world?”[7][12] + +This framing ignores the history of the BSP tree. When those US Air Force researchers first realized that partitioning a scene might help speed up rendering, they were interested in speeding up _real-time_ rendering, because they were, after all, trying to create a flight simulator. The flight simulator example comes up again in the 1980 BSP paper. Fuchs, Kedem, and Naylor talk about how a BSP tree would be useful in a flight simulator that pilots use to practice landing at the same airport over and over again. Since the airport geometry never changes, the BSP tree can be generated just once. Clearly what they have in mind is a real-time simulation. In the introduction to their paper, they even motivate their research by talking about how real-time graphics systems must be able to create an image in at least 1/30th of a second. + +So Carmack was not the first person to think of using BSP trees in a real-time graphics simulation. Of course, it’s one thing to anticipate that BSP trees might be used this way and another thing to actually do it. But even in the implementation Carmack may have had more guidance than is commonly assumed. The [Wikipedia page about BSP trees][13], at least as of this writing, suggests that Carmack consulted a 1991 paper by Chen and Gordon as well as a 1990 textbook called _Computer Graphics: Principles and Practice_. Though no citation is provided for this claim, it is probably true. The 1991 Chen and Gordon paper outlines a front-to-back rendering approach using BSP trees that is basically the same approach taken by _Doom_, right down to what I’ve called the “implicit z-buffer” data structure that prevents farther polygons being drawn over nearer polygons. The textbook provides a great overview of BSP trees and some pseudocode both for building a tree and for displaying one. (I’ve been able to skim through the 1990 edition thanks to my wonderful university library.) _Computer Graphics: Principles and Practice_ is a classic text in computer graphics, so Carmack might well have owned it. + +Still, Carmack found himself faced with a novel problem—”How can we make a first-person shooter run on a computer with a CPU that can’t even do floating-point operations?”—did his research, and proved that BSP trees are a useful data structure for real-time video games. I still think that is an impressive feat, even if the BSP tree had first been invented a decade prior and was pretty well theorized by the time Carmack read about it. Perhaps the accomplishment that we should really celebrate is the _Doom_ game engine as a whole, which is a seriously nifty piece of work. I’ve mentioned it once already, but Fabien Sanglard’s book about the _Doom_ game engine (_Game Engine Black Book: DOOM_) is an excellent overview of all the different clever components of the game engine and how they fit together. We shouldn’t forget that the VSD problem was just one of many problems that Carmack had to solve to make the _Doom_ engine work. That he was able, on top of everything else, to read about and implement a complicated data structure unknown to most programmers speaks volumes about his technical expertise and his drive to perfect his craft. + +_If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][14] on Twitter or subscribe to the [RSS feed][15] to make sure you know when a new post is out._ + +_Previously on TwoBitHistory…_ + +> I've wanted to learn more about GNU Readline for a while, so I thought I'd turn that into a new blog post. Includes a few fun facts from an email exchange with Chet Ramey, who maintains Readline (and Bash): +> +> — TwoBitHistory (@TwoBitHistory) [August 22, 2019][16] + + 1. Michael Abrash, “Michael Abrash’s Graphics Programming Black Book,” James Gregory, accessed November 6, 2019, . [↩︎][17] + + 2. R. Schumacher, B. Brand, M. Gilliland, W. Sharp, “Study for Applying Computer-Generated Images to Visual Simulation,” Air Force Human Resources Laboratory, December 1969, accessed on November 6, 2019, . [↩︎][18] + + 3. Henry Fuchs, Zvi Kedem, Bruce Naylor, “On Visible Surface Generation By A Priori Tree Structures,” ACM SIGGRAPH Computer Graphics, July 1980. [↩︎][19] + + 4. Fabien Sanglard, Game Engine Black Book: DOOM (CreateSpace Independent Publishing Platform, 2018), 200. [↩︎][20] + + 5. Sanglard, 206. [↩︎][21] + + 6. Sanglard, 200. [↩︎][22] + + 7. David Kushner, Masters of Doom (Random House Trade Paperbacks, 2004), 142. [↩︎][23] + + + + +-------------------------------------------------------------------------------- + +via: https://twobithistory.org/2019/11/06/doom-bsp.html + +作者:[Two-Bit History][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://twobithistory.org +[b]: https://github.com/lujun9972 +[1]: tmp.eMwywbWYsp#fn:1 +[2]: https://youtu.be/HQYsFshbkYw?t=822 +[3]: tmp.eMwywbWYsp#fn:2 +[4]: https://twobithistory.org/images/matrix_figure.png +[5]: tmp.eMwywbWYsp#fn:3 +[6]: https://twobithistory.org/images/bsp.svg +[7]: https://twobithistory.org/images/bsp1.svg +[8]: https://twobithistory.org/images/bsp2.svg +[9]: tmp.eMwywbWYsp#fn:4 +[10]: tmp.eMwywbWYsp#fn:5 +[11]: tmp.eMwywbWYsp#fn:6 +[12]: tmp.eMwywbWYsp#fn:7 +[13]: https://en.wikipedia.org/wiki/Binary_space_partitioning +[14]: https://twitter.com/TwoBitHistory +[15]: https://twobithistory.org/feed.xml +[16]: https://twitter.com/TwoBitHistory/status/1164631020353859585?ref_src=twsrc%5Etfw +[17]: tmp.eMwywbWYsp#fnref:1 +[18]: tmp.eMwywbWYsp#fnref:2 +[19]: tmp.eMwywbWYsp#fnref:3 +[20]: tmp.eMwywbWYsp#fnref:4 +[21]: tmp.eMwywbWYsp#fnref:5 +[22]: tmp.eMwywbWYsp#fnref:6 +[23]: tmp.eMwywbWYsp#fnref:7 From 0268f4e08eced8fd458459a571ccc04654a98ff1 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 22:03:47 +0800 Subject: [PATCH 261/334] =?UTF-8?q?=E9=80=89=E9=A2=98[talk]:=2020190331=20?= =?UTF-8?q?Codecademy=20vs.=20The=20BBC=20Micro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190331 Codecademy vs. The BBC Micro.md --- .../20190331 Codecademy vs. The BBC Micro.md | 145 ++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 sources/talk/20190331 Codecademy vs. The BBC Micro.md diff --git a/sources/talk/20190331 Codecademy vs. The BBC Micro.md b/sources/talk/20190331 Codecademy vs. The BBC Micro.md new file mode 100644 index 0000000000..2bd822cd18 --- /dev/null +++ b/sources/talk/20190331 Codecademy vs. The BBC Micro.md @@ -0,0 +1,145 @@ +[#]: subject: "Codecademy vs. The BBC Micro" +[#]: via: "https://twobithistory.org/2019/03/31/bbc-micro.html" +[#]: author: "Two-Bit History https://twobithistory.org" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Codecademy vs. The BBC Micro +====== + +In the late 1970s, the computer, which for decades had been a mysterious, hulking machine that only did the bidding of corporate overlords, suddenly became something the average person could buy and take home. An enthusiastic minority saw how great this was and rushed to get a computer of their own. For many more people, the arrival of the microcomputer triggered helpless anxiety about the future. An ad from a magazine at the time promised that a home computer would “give your child an unfair advantage in school.” It showed a boy in a smart blazer and tie eagerly raising his hand to answer a question, while behind him his dim-witted classmates look on sullenly. The ad and others like it implied that the world was changing quickly and, if you did not immediately learn how to use one of these intimidating new devices, you and your family would be left behind. + +In the UK, this anxiety metastasized into concern at the highest levels of government about the competitiveness of the nation. The 1970s had been, on the whole, an underwhelming decade for Great Britain. Both inflation and unemployment had been high. Meanwhile, a series of strikes put London through blackout after blackout. A government report from 1979 fretted that a failure to keep up with trends in computing technology would “add another factor to our poor industrial performance.”[1][1] The country already seemed to be behind in the computing arena—all the great computer companies were American, while integrated circuits were being assembled in Japan and Taiwan. + +In an audacious move, the BBC, a public service broadcaster funded by the government, decided that it would solve Britain’s national competitiveness problems by helping Britons everywhere overcome their aversion to computers. It launched the _Computer Literacy Project_, a multi-pronged educational effort that involved several TV series, a few books, a network of support groups, and a specially built microcomputer known as the BBC Micro. The project was so successful that, by 1983, an editor for BYTE Magazine wrote, “compared to the US, proportionally more of Britain’s population is interested in microcomputers.”[2][2] The editor marveled that there were more people at the Fifth Personal Computer World Show in the UK than had been to that year’s West Coast Computer Faire. Over a sixth of Great Britain watched an episode in the first series produced for the _Computer Literacy Project_ and 1.5 million BBC Micros were ultimately sold.[3][3] + +[An archive][4] containing every TV series produced and all the materials published for the _Computer Literacy Project_ was put on the web last year. I’ve had a huge amount of fun watching the TV series and trying to imagine what it would have been like to learn about computing in the early 1980s. But what’s turned out to be more interesting is how computing was _taught_. Today, we still worry about technology leaving people behind. Wealthy tech entrepreneurs and governments spend lots of money trying to teach kids “to code.” We have websites like Codecademy that make use of new technologies to teach coding interactively. One would assume that this approach is more effective than a goofy ’80s TV series. But is it? + +### The Computer Literacy Project + +The microcomputer revolution began in 1975 with the release of [the Altair 8800][5]. Only two years later, the Apple II, TRS-80, and Commodore PET had all been released. Sales of the new computers exploded. In 1978, the BBC explored the dramatic societal changes these new machines were sure to bring in a documentary called “Now the Chips Are Down.” + +The documentary was alarming. Within the first five minutes, the narrator explains that microelectronics will “totally revolutionize our way of life.” As eerie synthesizer music plays, and green pulses of electricity dance around a magnified microprocessor on screen, the narrator argues that the new chips are why “Japan is abandoning its ship building, and why our children will grow up without jobs to go to.” The documentary goes on to explore how robots are being used to automate car assembly and how the European watch industry has lost out to digital watch manufacturers in the United States. It castigates the British government for not doing more to prepare the country for a future of mass unemployment. + +The documentary was supposedly shown to the British Cabinet.[4][6] Several government agencies, including the Department of Industry and the Manpower Services Commission, became interested in trying to raise awareness about computers among the British public. The Manpower Services Commission provided funds for a team from the BBC’s education division to travel to Japan, the United States, and other countries on a fact-finding trip. This research team produced a report that cataloged the ways in which microelectronics would indeed mean major changes for industrial manufacturing, labor relations, and office work. In late 1979, it was decided that the BBC should make a ten-part TV series that would help regular Britons “learn how to use and control computers and not feel dominated by them.”[5][7] The project eventually became a multimedia endeavor similar to the _Adult Literacy Project_, an earlier BBC undertaking involving both a TV series and supplemental courses that helped two million people improve their reading. + +The producers behind the _Computer Literacy Project_ were keen for the TV series to feature “hands-on” examples that viewers could try on their own if they had a microcomputer at home. These examples would have to be in BASIC, since that was the language (really the entire shell) used on almost all microcomputers. But the producers faced a thorny problem: Microcomputer manufacturers all had their own dialects of BASIC, so no matter which dialect they picked, they would inevitably alienate some large fraction of their audience. The only real solution was to create a new BASIC—BBC BASIC—and a microcomputer to go along with it. Members of the British public would be able to buy the new microcomputer and follow along without worrying about differences in software or hardware. + +The TV producers and presenters at the BBC were not capable of building a microcomputer on their own. So they put together a specification for the computer they had in mind and invited British microcomputer companies to propose a new machine that met the requirements. The specification called for a relatively powerful computer because the BBC producers felt that the machine should be able to run real, useful applications. Technical consultants for the _Computer Literacy Project_ also suggested that, if it had to be a BASIC dialect that was going to be taught to the entire nation, then it had better be a good one. (They may not have phrased it exactly that way, but I bet that’s what they were thinking.) BBC BASIC would make up for some of BASIC’s usual shortcomings by allowing for recursion and local variables.[6][8] + +The BBC eventually decided that a Cambridge-based company called Acorn Computers would make the BBC Micro. In choosing Acorn, the BBC passed over a proposal from Clive Sinclair, who ran a company called Sinclair Research. Sinclair Research had brought mass-market microcomputing to the UK in 1980 with the Sinclair ZX80. Sinclair’s new computer, the ZX81, was cheap but not powerful enough for the BBC’s purposes. Acorn’s new prototype computer, known internally as the Proton, would be more expensive but more powerful and expandable. The BBC was impressed. The Proton was never marketed or sold as the Proton because it was instead released in December 1981 as the BBC Micro, also affectionately called “The Beeb.” You could get a 16k version for £235 and a 32k version for £335. + +In 1980, Acorn was an underdog in the British computing industry. But the BBC Micro helped establish the company’s legacy. Today, the world’s most popular microprocessor instruction set is the ARM architecture. “ARM” now stands for “Advanced RISC Machine,” but originally it stood for “Acorn RISC Machine.” ARM Holdings, the company behind the architecture, was spun out from Acorn in 1990. + +![Picture of the BBC Micro.][9] _A bad picture of a BBC Micro, taken by me at the Computer History Museum +in Mountain View, California._ + +### The Computer Programme + +A dozen different TV series were eventually produced as part of the _Computer Literacy Project_, but the first of them was a ten-part series known as _The Computer Programme_. The series was broadcast over ten weeks at the beginning of 1982. A million people watched each week-night broadcast of the show; a quarter million watched the reruns on Sunday and Monday afternoon. + +The show was hosted by two presenters, Chris Serle and Ian McNaught-Davis. Serle plays the neophyte while McNaught-Davis, who had professional experience programming mainframe computers, plays the expert. This was an inspired setup. It made for [awkward transitions][10]—Serle often goes directly from a conversation with McNaught-Davis to a bit of walk-and-talk narration delivered to the camera, and you can’t help but wonder whether McNaught-Davis is still standing there out of frame or what. But it meant that Serle could voice the concerns that the audience would surely have. He can look intimidated by a screenful of BASIC and can ask questions like, “What do all these dollar signs mean?” At several points during the show, Serle and McNaught-Davis sit down in front of a computer and essentially pair program, with McNaught-Davis providing hints here and there while Serle tries to figure it out. It would have been much less relatable if the show had been presented by a single, all-knowing narrator. + +The show also made an effort to demonstrate the many practical applications of computing in the lives of regular people. By the early 1980s, the home computer had already begun to be associated with young boys and video games. The producers behind _The Computer Programme_ sought to avoid interviewing “impressively competent youngsters,” as that was likely “to increase the anxieties of older viewers,” a demographic that the show was trying to attract to computing.[7][11] In the first episode of the series, Gill Nevill, the show’s “on location” reporter, interviews a woman that has bought a Commodore PET to help manage her sweet shop. The woman (her name is Phyllis) looks to be 60-something years old, yet she has no trouble using the computer to do her accounting and has even started using her PET to do computer work for other businesses, which sounds like the beginning of a promising freelance career. Phyllis says that she wouldn’t mind if the computer work grew to replace her sweet shop business since she enjoys the computer work more. This interview could instead have been an interview with a teenager about how he had modified _Breakout_ to be faster and more challenging. But that would have been encouraging to almost nobody. On the other hand, if Phyllis, of all people, can use a computer, then surely you can too. + +While the show features lots of BASIC programming, what it really wants to teach its audience is how computing works in general. The show explains these general principles with analogies. In the second episode, there is an extended discussion of the Jacquard loom, which accomplishes two things. First, it illustrates that computers are not based only on magical technology invented yesterday—some of the foundational principles of computing go back two hundred years and are about as simple as the idea that you can punch holes in card to control a weaving machine. Second, the interlacing of warp and weft threads is used to demonstrate how a binary choice (does the weft thread go above or below the warp thread?) is enough, when repeated over and over, to produce enormous variation. This segues, of course, into a discussion of how information can be stored using binary digits. + +Later in the show there is a section about a steam organ that plays music encoded in a long, segmented roll of punched card. This time the analogy is used to explain subroutines in BASIC. Serle and McNaught-Davis lay out the whole roll of punched card on the floor in the studio, then point out the segments where it looks like a refrain is being repeated. McNaught-Davis explains that a subroutine is what you would get if you cut out those repeated segments of card and somehow added an instruction to go back to the original segment that played the refrain for the first time. This is a brilliant explanation and probably one that stuck around in people’s minds for a long time afterward. + +I’ve picked out only a few examples, but I think in general the show excels at demystifying computers by explaining the principles that computers rely on to function. The show could instead have focused on teaching BASIC, but it did not. This, it turns out, was very much a conscious choice. In a retrospective written in 1983, John Radcliffe, the executive producer of the _Computer Literacy Project_, wrote the following: + +> If computers were going to be as important as we believed, some genuine understanding of this new subject would be important for everyone, almost as important perhaps as the capacity to read and write. Early ideas, both here and in America, had concentrated on programming as the main route to computer literacy. However, as our thinking progressed, although we recognized the value of “hands-on” experience on personal micros, we began to place less emphasis on programming and more on wider understanding, on relating micros to larger machines, encouraging people to gain experience with a range of applications programs and high-level languages, and relating these to experience in the real world of industry and commerce…. Our belief was that once people had grasped these principles, at their simplest, they would be able to move further forward into the subject. + +Later, Radcliffe writes, in a similar vein: + +> There had been much debate about the main explanatory thrust of the series. One school of thought had argued that it was particularly important for the programmes to give advice on the practical details of learning to use a micro. But we had concluded that if the series was to have any sustained educational value, it had to be a way into the real world of computing, through an explanation of computing principles. This would need to be achieved by a combination of studio demonstration on micros, explanation of principles by analogy, and illustration on film of real-life examples of practical applications. Not only micros, but mini computers and mainframes would be shown. + +I love this, particularly the part about mini-computers and mainframes. The producers behind _The Computer Programme_ aimed to help Britons get situated: Where had computing been, and where was it going? What can computers do now, and what might they do in the future? Learning some BASIC was part of answering those questions, but knowing BASIC alone was not seen as enough to make someone computer literate. + +### Computer Literacy Today + +If you google “learn to code,” the first result you see is a link to Codecademy’s website. If there is a modern equivalent to the _Computer Literacy Project_, something with the same reach and similar aims, then it is Codecademy. + +“Learn to code” is Codecademy’s tagline. I don’t think I’m the first person to point this out—in fact, I probably read this somewhere and I’m now ripping it off—but there’s something revealing about using the word “code” instead of “program.” It suggests that the important thing you are learning is how to decode the code, how to look at a screen’s worth of Python and not have your eyes glaze over. I can understand why to the average person this seems like the main hurdle to becoming a professional programmer. Professional programmers spend all day looking at computer monitors covered in gobbledygook, so, if I want to become a professional programmer, I better make sure I can decipher the gobbledygook. But dealing with syntax is not the most challenging part of being a programmer, and it quickly becomes almost irrelevant in the face of much bigger obstacles. Also, armed only with knowledge of a programming language’s syntax, you may be able to _read_ code but you won’t be able to _write_ code to solve a novel problem. + +I recently went through Codecademy’s “Code Foundations” course, which is the course that the site recommends you take if you are interested in programming (as opposed to web development or data science) and have never done any programming before. There are a few lessons in there about the history of computer science, but they are perfunctory and poorly researched. (Thank heavens for [this noble internet vigilante][12], who pointed out a particularly egregious error.) The main focus of the course is teaching you about the common structural elements of programming languages: variables, functions, control flow, loops. In other words, the course focuses on what you would need to know to start seeing patterns in the gobbledygook. + +To be fair to Codecademy, they offer other courses that look meatier. But even courses such as their “Computer Science Path” course focus almost exclusively on programming and concepts that can be represented in programs. One might argue that this is the whole point—Codecademy’s main feature is that it gives you little interactive programming lessons with automated feedback. There also just isn’t enough room to cover more because there is only so much you can stuff into somebody’s brain in a little automated lesson. But the producers at the BBC tasked with kicking off the _Computer Literacy Project_ also had this problem; they recognized that they were limited by their medium and that “the amount of learning that would take place as a result of the television programmes themselves would be limited.”[8][13] With similar constraints on the volume of information they could convey, they chose to emphasize general principles over learning BASIC. Couldn’t Codecademy replace a lesson or two with an interactive visualization of a Jacquard loom weaving together warp and weft threads? + +I’m banging the drum for “general principles” loudly now, so let me just explain what I think they are and why they are important. There’s a book by J. Clark Scott about computers called _But How Do It Know?_ The title comes from the anecdote that opens the book. A salesman is explaining to a group of people that a thermos can keep hot food hot and cold food cold. A member of the audience, astounded by this new invention, asks, “But how do it know?” The joke of course is that the thermos is not perceiving the temperature of the food and then making a decision—the thermos is just constructed so that cold food inevitably stays cold and hot food inevitably stays hot. People anthropomorphize computers in the same way, believing that computers are digital brains that somehow “choose” to do one thing or another based on the code they are fed. But learning a few things about how computers work, even at a rudimentary level, takes the homunculus out of the machine. That’s why the Jacquard loom is such a good go-to illustration. It may at first seem like an incredible device. It reads punch cards and somehow “knows” to weave the right pattern! The reality is mundane: Each row of holes corresponds to a thread, and where there is a hole in that row the corresponding thread gets lifted. Understanding this may not help you do anything new with computers, but it will give you the confidence that you are not dealing with something magical. We should impart this sense of confidence to beginners as soon as we can. + +Alas, it’s possible that the real problem is that nobody wants to learn about the Jacquard loom. Judging by how Codecademy emphasizes the professional applications of what it teaches, many people probably start using Codecademy because they believe it will help them “level up” their careers. They believe, not unreasonably, that the primary challenge will be understanding the gobbledygook, so they want to “learn to code.” And they want to do it as quickly as possible, in the hour or two they have each night between dinner and collapsing into bed. Codecademy, which after all is a business, gives these people what they are looking for—not some roundabout explanation involving a machine invented in the 18th century. + +The _Computer Literacy Project_, on the other hand, is what a bunch of producers and civil servants at the BBC thought would be the best way to educate the nation about computing. I admit that it is a bit elitist to suggest we should laud this group of people for teaching the masses what they were incapable of seeking out on their own. But I can’t help but think they got it right. Lots of people first learned about computing using a BBC Micro, and many of these people went on to become successful software developers or game designers. [As I’ve written before][14], I suspect learning about computing at a time when computers were relatively simple was a huge advantage. But perhaps another advantage these people had is shows like _The Computer Programme_, which strove to teach not just programming but also how and why computers can run programs at all. After watching _The Computer Programme_, you may not understand all the gobbledygook on a computer screen, but you don’t really need to because you know that, whatever the “code” looks like, the computer is always doing the same basic thing. After a course or two on Codecademy, you understand some flavors of gobbledygook, but to you a computer is just a magical machine that somehow turns gobbledygook into running software. That isn’t computer literacy. + +_If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][15] on Twitter or subscribe to the [RSS feed][16] to make sure you know when a new post is out._ + +_Previously on TwoBitHistory…_ + +> FINALLY some new damn content, amirite? +> +> Wanted to write an article about how Simula bought us object-oriented programming. It did that, but early Simula also flirted with a different vision for how OOP would work. Wrote about that instead! +> +> — TwoBitHistory (@TwoBitHistory) [February 1, 2019][17] + + 1. Robert Albury and David Allen, Microelectronics, report (1979). [↩︎][18] + + 2. Gregg Williams, “Microcomputing, British Style”, Byte Magazine, 40, January 1983, accessed on March 31, 2019, . [↩︎][19] + + 3. John Radcliffe, “Toward Computer Literacy,” Computer Literacy Project Achive, 42, accessed March 31, 2019, [https://computer-literacy-project.pilots.bbcconnectedstudio.co.uk/media/Towards Computer Literacy.pdf][20]. [↩︎][21] + + 4. David Allen, “About the Computer Literacy Project,” Computer Literacy Project Archive, accessed March 31, 2019, . [↩︎][22] + + 5. ibid. [↩︎][23] + + 6. Williams, 51. [↩︎][24] + + 7. Radcliffe, 11. [↩︎][25] + + 8. Radcliffe, 5. [↩︎][26] + + + + +-------------------------------------------------------------------------------- + +via: https://twobithistory.org/2019/03/31/bbc-micro.html + +作者:[Two-Bit History][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://twobithistory.org +[b]: https://github.com/lujun9972 +[1]: tmp.zNBs2lK4Ca#fn:1 +[2]: tmp.zNBs2lK4Ca#fn:2 +[3]: tmp.zNBs2lK4Ca#fn:3 +[4]: https://computer-literacy-project.pilots.bbcconnectedstudio.co.uk/ +[5]: https://twobithistory.org/2018/07/22/dawn-of-the-microcomputer.html +[6]: tmp.zNBs2lK4Ca#fn:4 +[7]: tmp.zNBs2lK4Ca#fn:5 +[8]: tmp.zNBs2lK4Ca#fn:6 +[9]: https://twobithistory.org/images/beeb.jpg +[10]: https://twitter.com/TwoBitHistory/status/1112372000742404098 +[11]: tmp.zNBs2lK4Ca#fn:7 +[12]: https://twitter.com/TwoBitHistory/status/1111305774939234304 +[13]: tmp.zNBs2lK4Ca#fn:8 +[14]: https://twobithistory.org/2018/09/02/learning-basic.html +[15]: https://twitter.com/TwoBitHistory +[16]: https://twobithistory.org/feed.xml +[17]: https://twitter.com/TwoBitHistory/status/1091148050221944832?ref_src=twsrc%5Etfw +[18]: tmp.zNBs2lK4Ca#fnref:1 +[19]: tmp.zNBs2lK4Ca#fnref:2 +[20]: https://computer-literacy-project.pilots.bbcconnectedstudio.co.uk/media/Towards%20Computer%20Literacy.pdf +[21]: tmp.zNBs2lK4Ca#fnref:3 +[22]: tmp.zNBs2lK4Ca#fnref:4 +[23]: tmp.zNBs2lK4Ca#fnref:5 +[24]: tmp.zNBs2lK4Ca#fnref:6 +[25]: tmp.zNBs2lK4Ca#fnref:7 +[26]: tmp.zNBs2lK4Ca#fnref:8 From 60ad9ab465ffbe3fef91e43542e792e78b9b3c02 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 22:04:08 +0800 Subject: [PATCH 262/334] =?UTF-8?q?=E9=80=89=E9=A2=98[talk]:=2020190131=20?= =?UTF-8?q?OOP=20Before=20OOP=20with=20Simula?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20190131 OOP Before OOP with Simula.md --- .../20190131 OOP Before OOP with Simula.md | 231 ++++++++++++++++++ 1 file changed, 231 insertions(+) create mode 100644 sources/talk/20190131 OOP Before OOP with Simula.md diff --git a/sources/talk/20190131 OOP Before OOP with Simula.md b/sources/talk/20190131 OOP Before OOP with Simula.md new file mode 100644 index 0000000000..84d24bbc93 --- /dev/null +++ b/sources/talk/20190131 OOP Before OOP with Simula.md @@ -0,0 +1,231 @@ +[#]: subject: "OOP Before OOP with Simula" +[#]: via: "https://twobithistory.org/2019/01/31/simula.html" +[#]: author: "Two-Bit History https://twobithistory.org" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +OOP Before OOP with Simula +====== + +Imagine that you are sitting on the grassy bank of a river. Ahead of you, the water flows past swiftly. The afternoon sun has put you in an idle, philosophical mood, and you begin to wonder whether the river in front of you really exists at all. Sure, large volumes of water are going by only a few feet away. But what is this thing that you are calling a “river”? After all, the water you see is here and then gone, to be replaced only by more and different water. It doesn’t seem like the word “river” refers to any fixed thing in front of you at all. + +In 2009, Rich Hickey, the creator of Clojure, gave [an excellent talk][1] about why this philosophical quandary poses a problem for the object-oriented programming paradigm. He argues that we think of an object in a computer program the same way we think of a river—we imagine that the object has a fixed identity, even though many or all of the object’s properties will change over time. Doing this is a mistake, because we have no way of distinguishing between an object instance in one state and the same object instance in another state. We have no explicit notion of time in our programs. We just breezily use the same name everywhere and hope that the object is in the state we expect it to be in when we reference it. Inevitably, we write bugs. + +The solution, Hickey concludes, is that we ought to model the world not as a collection of mutable objects but a collection of _processes_ acting on immutable data. We should think of each object as a “river” of causally related states. In sum, you should use a functional language like Clojure. + +![][2] _The author, on a hike, pondering the ontological commitments +of object-oriented programming._ + +Since Hickey gave his talk in 2009, interest in functional programming languages has grown, and functional programming idioms have found their way into the most popular object-oriented languages. Even so, most programmers continue to instantiate objects and mutate them in place every day. And they have been doing it for so long that it is hard to imagine that programming could ever look different. + +I wanted to write an article about Simula and imagined that it would mostly be about when and how object-oriented constructs we are familiar with today were added to the language. But I think the more interesting story is about how Simula was originally so _unlike_ modern object-oriented programming languages. This shouldn’t be a surprise, because the object-oriented paradigm we know now did not spring into existence fully formed. There were two major versions of Simula: Simula I and Simula 67. Simula 67 brought the world classes, class hierarchies, and virtual methods. But Simula I was a first draft that experimented with other ideas about how data and procedures could be bundled together. The Simula I model is not a functional model like the one Hickey proposes, but it does focus on _processes_ that unfold over time rather than objects with hidden state that interact with each other. Had Simula 67 stuck with more of Simula I’s ideas, the object-oriented paradigm we know today might have looked very different indeed—and that contingency should teach us to be wary of assuming that the current paradigm will dominate forever. + +### Simula 0 Through 67 + +Simula was created by two Norwegians, Kristen Nygaard and Ole-Johan Dahl. + +In the late 1950s, Nygaard was employed by the Norwegian Defense Research Establishment (NDRE), a research institute affiliated with the Norwegian military. While there, he developed Monte Carlo simulations used for nuclear reactor design and operations research. These simulations were at first done by hand and then eventually programmed and run on a Ferranti Mercury.[1][3] Nygaard soon found that he wanted a higher-level way to describe these simulations to a computer. + +The kind of simulation that Nygaard commonly developed is known as a “discrete event model.” The simulation captures how a sequence of events change the state of a system over time—but the important property here is that the simulation can jump from one event to the next, since the events are discrete and nothing changes in the system between events. This kind of modeling, according to a paper that Nygaard and Dahl presented about Simula in 1966, was increasingly being used to analyze “nerve networks, communication systems, traffic flow, production systems, administrative systems, social systems, etc.”[2][4] So Nygaard thought that other people might want a higher-level way to describe these simulations too. He began looking for someone that could help him implement what he called his “Simulation Language” or “Monte Carlo Compiler.”[3][5] + +Dahl, who had also been employed by NDRE, where he had worked on language design, came aboard at this point to play Wozniak to Nygaard’s Jobs. Over the next year or so, Nygaard and Dahl worked to develop what has been called “Simula 0.”[4][6] This early version of the language was going to be merely a modest extension to ALGOL 60, and the plan was to implement it as a preprocessor. The language was then much less abstract than what came later. The primary language constructs were “stations” and “customers.” These could be used to model certain discrete event networks; Nygaard and Dahl give an example simulating airport departures.[5][7] But Nygaard and Dahl eventually came up with a more general language construct that could represent both “stations” and “customers” and also model a wider range of simulations. This was the first of two major generalizations that took Simula from being an application-specific ALGOL package to a general-purpose programming language. + +In Simula I, there were no “stations” or “customers,” but these could be recreated using “processes.” A process was a bundle of data attributes associated with a single action known as the process’ _operating rule_. You might think of a process as an object with only a single method, called something like `run()`. This analogy is imperfect though, because each process’ operating rule could be suspended or resumed at any time—the operating rules were a kind of coroutine. A Simula I program would model a system as a set of processes that conceptually all ran in parallel. Only one process could actually be “current” at any time, but once a process suspended itself the next queued process would automatically take over. As the simulation ran, behind the scenes, Simula would keep a timeline of “event notices” that tracked when each process should be resumed. In order to resume a suspended process, Simula needed to keep track of multiple call stacks. This meant that Simula could no longer be an ALGOL preprocessor, because ALGOL had only once call stack. Nygaard and Dahl were committed to writing their own compiler. + +In their paper introducing this system, Nygaard and Dahl illustrate its use by implementing a simulation of a factory with a limited number of machines that can serve orders.[6][8] The process here is the order, which starts by looking for an available machine, suspends itself to wait for one if none are available, and then runs to completion once a free machine is found. There is a definition of the order process that is then used to instantiate several different order instances, but no methods are ever called on these instances. The main part of the program just creates the processes and sets them running. + +The first Simula I compiler was finished in 1965. The language grew popular at the Norwegian Computer Center, where Nygaard and Dahl had gone to work after leaving NDRE. Implementations of Simula I were made available to UNIVAC users and to Burroughs B5500 users.[7][9] Nygaard and Dahl did a consulting deal with a Swedish company called ASEA that involved using Simula to run job shop simulations. But Nygaard and Dahl soon realized that Simula could be used to write programs that had nothing to do with simulation at all. + +Stein Krogdahl, a professor at the University of Oslo that has written about the history of Simula, claims that “the spark that really made the development of a new general-purpose language take off” was [a paper called “Record Handling”][10] by the British computer scientist C.A.R. Hoare.[8][11] If you read Hoare’s paper now, this is easy to believe. I’m surprised that you don’t hear Hoare’s name more often when people talk about the history of object-oriented languages. Consider this excerpt from his paper: + +> The proposal envisages the existence inside the computer during the execution of the program, of an arbitrary number of records, each of which represents some object which is of past, present or future interest to the programmer. The program keeps dynamic control of the number of records in existence, and can create new records or destroy existing ones in accordance with the requirements of the task in hand. + +> Each record in the computer must belong to one of a limited number of disjoint record classes; the programmer may declare as many record classes as he requires, and he associates with each class an identifier to name it. A record class name may be thought of as a common generic term like “cow,” “table,” or “house” and the records which belong to these classes represent the individual cows, tables, and houses. + +Hoare does not mention subclasses in this particular paper, but Dahl credits him with introducing Nygaard and himself to the concept.[9][12] Nygaard and Dahl had noticed that processes in Simula I often had common elements. Using a superclass to implement those common elements would be convenient. This also raised the possibility that the “process” idea itself could be implemented as a superclass, meaning that not every class had to be a process with a single operating rule. This then was the second great generalization that would make Simula 67 a truly general-purpose programming language. It was such a shift of focus that Nygaard and Dahl briefly considered changing the name of the language so that people would know it was not just for simulations.[10][13] But “Simula” was too much of an established name for them to risk it. + +In 1967, Nygaard and Dahl signed a contract with Control Data to implement this new version of Simula, to be known as Simula 67. A conference was held in June, where people from Control Data, the University of Oslo, and the Norwegian Computing Center met with Nygaard and Dahl to establish a specification for this new language. This conference eventually led to a document called the [“Simula 67 Common Base Language,”][14] which defined the language going forward. + +Several different vendors would make Simula 67 compilers. The Association of Simula Users (ASU) was founded and began holding annual conferences. Simula 67 soon had users in more than 23 different countries.[11][15] + +### 21st Century Simula + +Simula is remembered now because of its influence on the languages that have supplanted it. You would be hard-pressed to find anyone still using Simula to write application programs. But that doesn’t mean that Simula is an entirely dead language. You can still compile and run Simula programs on your computer today, thanks to [GNU cim][16]. + +The cim compiler implements the Simula standard as it was after a revision in 1986. But this is mostly the Simula 67 version of the language. You can write classes, subclass, and virtual methods just as you would have with Simula 67. So you could create a small object-oriented program that looks a lot like something you could easily write in Python or Ruby: + +``` + + ! dogs.sim ; + Begin + Class Dog; + ! The cim compiler requires virtual procedures to be fully specified ; + Virtual: Procedure bark Is Procedure bark;; + Begin + Procedure bark; + Begin + OutText("Woof!"); + OutImage; ! Outputs a newline ; + End; + End; + + Dog Class Chihuahua; ! Chihuahua is "prefixed" by Dog ; + Begin + Procedure bark; + Begin + OutText("Yap yap yap yap yap yap"); + OutImage; + End; + End; + + Ref (Dog) d; + d :- new Chihuahua; ! :- is the reference assignment operator ; + d.bark; + End; + +``` + +You would compile and run it as follows: + +``` + + $ cim dogs.sim + Compiling dogs.sim: + gcc -g -O2 -c dogs.c + gcc -g -O2 -o dogs dogs.o -L/usr/local/lib -lcim + $ ./dogs + Yap yap yap yap yap yap + +``` + +(You might notice that cim compiles Simula to C, then hands off to a C compiler.) + +This was what object-oriented programming looked like in 1967, and I hope you agree that aside from syntactic differences this is also what object-oriented programming looks like in 2019. So you can see why Simula is considered a historically important language. + +But I’m more interested in showing you the process model that was central to Simula I. That process model is still available in Simula 67, but only when you use the `Process` class and a special `Simulation` block. + +In order to show you how processes work, I’ve decided to simulate the following scenario. Imagine that there is a village full of villagers next to a river. The river has lots of fish, but between them the villagers only have one fishing rod. The villagers, who have voracious appetites, get hungry every 60 minutes or so. When they get hungry, they have to use the fishing rod to catch a fish. If a villager cannot use the fishing rod because another villager is waiting for it, then the villager queues up to use the fishing rod. If a villager has to wait more than five minutes to catch a fish, then the villager loses health. If a villager loses too much health, then that villager has starved to death. + +This is a somewhat strange example and I’m not sure why this is what first came to mind. But there you go. We will represent our villagers as Simula processes and see what happens over a day’s worth of simulated time in a village with four villagers. + +The full program is [available here as a Gist][17]. + +The last lines of my output look like the following. Here we are seeing what happens in the last few hours of the day: + +``` + + 1299.45: John is hungry and requests the fishing rod. + 1299.45: John is now fishing. + 1311.39: John has caught a fish. + 1328.96: Betty is hungry and requests the fishing rod. + 1328.96: Betty is now fishing. + 1331.25: Jane is hungry and requests the fishing rod. + 1340.44: Betty has caught a fish. + 1340.44: Jane went hungry waiting for the rod. + 1340.44: Jane starved to death waiting for the rod. + 1369.21: John is hungry and requests the fishing rod. + 1369.21: John is now fishing. + 1379.33: John has caught a fish. + 1409.59: Betty is hungry and requests the fishing rod. + 1409.59: Betty is now fishing. + 1419.98: Betty has caught a fish. + 1427.53: John is hungry and requests the fishing rod. + 1427.53: John is now fishing. + 1437.52: John has caught a fish. + +``` + +Poor Jane starved to death. But she lasted longer than Sam, who didn’t even make it to 7am. Betty and John sure have it good now that only two of them need the fishing rod. + +What I want you to see here is that the main, top-level part of the program does nothing but create the four villager processes and get them going. The processes manipulate the fishing rod object in the same way that we would manipulate an object today. But the main part of the program does not call any methods or modify and properties on the processes. The processes have internal state, but this internal state only gets modified by the process itself. + +There are still fields that get mutated in place here, so this style of programming does not directly address the problems that pure functional programming would solve. But as Krogdahl observes, “this mechanism invites the programmer of a simulation to model the underlying system as a set of processes, each describing some natural sequence of events in that system.”[12][18] Rather than thinking primarily in terms of nouns or actors—objects that do things to other objects—here we are thinking of ongoing processes. The benefit is that we can hand overall control of our program off to Simula’s event notice system, which Krogdahl calls a “time manager.” So even though we are still mutating processes in place, no process makes any assumptions about the state of another process. Each process interacts with other processes only indirectly. + +It’s not obvious how this pattern could be used to build, say, a compiler or an HTTP server. (On the other hand, if you’ve ever programmed games in the Unity game engine, this should look familiar.) I also admit that even though we have a “time manager” now, this may not have been exactly what Hickey meant when he said that we need an explicit notion of time in our programs. (I think he’d want something like the superscript notation [that Ada Lovelace used][19] to distinguish between the different values a variable assumes through time.) All the same, I think it’s really interesting that right there at the beginning of object-oriented programming we can find a style of programming that is not all like the object-oriented programming we are used to. We might take it for granted that object-oriented programming simply works one way—that a program is just a long list of the things that certain objects do to other objects in the exact order that they do them. Simula I’s process system shows that there are other approaches. Functional languages are probably a better thought-out alternative, but Simula I reminds us that the very notion of alternatives to modern object-oriented programming should come as no surprise. + +_If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][20] on Twitter or subscribe to the [RSS feed][21] to make sure you know when a new post is out._ + +_Previously on TwoBitHistory…_ + +> Hey everyone! I sadly haven't had time to do any new writing but I've just put up an updated version of my history of RSS. This version incorporates interviews I've since done with some of the key people behind RSS like Ramanathan Guha and Dan Libby. +> +> — TwoBitHistory (@TwoBitHistory) [December 18, 2018][22] + + 1. Jan Rune Holmevik, “The History of Simula,” accessed January 31, 2019, . [↩︎][23] + + 2. Ole-Johan Dahl and Kristen Nygaard, “SIMULA—An ALGOL-Based Simulation Langauge,” Communications of the ACM 9, no. 9 (September 1966): 671, accessed January 31, 2019, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.95.384&rep=rep1&type=pdf][24]. [↩︎][25] + + 3. Stein Krogdahl, “The Birth of Simula,” 2, accessed January 31, 2019, . [↩︎][26] + + 4. ibid. [↩︎][27] + + 5. Ole-Johan Dahl and Kristen Nygaard, “The Development of the Simula Languages,” ACM SIGPLAN Notices 13, no. 8 (August 1978): 248, accessed January 31, 2019, . [↩︎][28] + + 6. Dahl and Nygaard (1966), 676. [↩︎][29] + + 7. Dahl and Nygaard (1978), 257. [↩︎][30] + + 8. Krogdahl, 3. [↩︎][31] + + 9. Ole-Johan Dahl, “The Birth of Object-Orientation: The Simula Languages,” 3, accessed January 31, 2019, . [↩︎][32] + + 10. Dahl and Nygaard (1978), 265. [↩︎][33] + + 11. Holmevik. [↩︎][34] + + 12. Krogdahl, 4. [↩︎][35] + + + + +-------------------------------------------------------------------------------- + +via: https://twobithistory.org/2019/01/31/simula.html + +作者:[Two-Bit History][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://twobithistory.org +[b]: https://github.com/lujun9972 +[1]: https://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey +[2]: https://twobithistory.org/images/river.jpg +[3]: tmp.2ZIthXB4S6#fn:1 +[4]: tmp.2ZIthXB4S6#fn:2 +[5]: tmp.2ZIthXB4S6#fn:3 +[6]: tmp.2ZIthXB4S6#fn:4 +[7]: tmp.2ZIthXB4S6#fn:5 +[8]: tmp.2ZIthXB4S6#fn:6 +[9]: tmp.2ZIthXB4S6#fn:7 +[10]: https://archive.computerhistory.org/resources/text/algol/ACM_Algol_bulletin/1061032/p39-hoare.pdf +[11]: tmp.2ZIthXB4S6#fn:8 +[12]: tmp.2ZIthXB4S6#fn:9 +[13]: tmp.2ZIthXB4S6#fn:10 +[14]: http://web.eah-jena.de/~kleine/history/languages/Simula-CommonBaseLanguage.pdf +[15]: tmp.2ZIthXB4S6#fn:11 +[16]: https://www.gnu.org/software/cim/ +[17]: https://gist.github.com/sinclairtarget/6364cd521010d28ee24dd41ab3d61a96 +[18]: tmp.2ZIthXB4S6#fn:12 +[19]: https://twobithistory.org/2018/08/18/ada-lovelace-note-g.html +[20]: https://twitter.com/TwoBitHistory +[21]: https://twobithistory.org/feed.xml +[22]: https://twitter.com/TwoBitHistory/status/1075075139543449600?ref_src=twsrc%5Etfw +[23]: tmp.2ZIthXB4S6#fnref:1 +[24]: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.95.384&rep=rep1&type=pdf +[25]: tmp.2ZIthXB4S6#fnref:2 +[26]: tmp.2ZIthXB4S6#fnref:3 +[27]: tmp.2ZIthXB4S6#fnref:4 +[28]: tmp.2ZIthXB4S6#fnref:5 +[29]: tmp.2ZIthXB4S6#fnref:6 +[30]: tmp.2ZIthXB4S6#fnref:7 +[31]: tmp.2ZIthXB4S6#fnref:8 +[32]: tmp.2ZIthXB4S6#fnref:9 +[33]: tmp.2ZIthXB4S6#fnref:10 +[34]: tmp.2ZIthXB4S6#fnref:11 +[35]: tmp.2ZIthXB4S6#fnref:12 From f88a2593a5229784f5b1cbe132ab680471251baa Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 22:07:41 +0800 Subject: [PATCH 263/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020201010=20?= =?UTF-8?q?Robust=20and=20Race-free=20Server=20Logging=20using=20Named=20P?= =?UTF-8?q?ipes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20201010 Robust and Race-free Server Logging using Named Pipes.md --- ...e-free Server Logging using Named Pipes.md | 120 ++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 sources/tech/20201010 Robust and Race-free Server Logging using Named Pipes.md diff --git a/sources/tech/20201010 Robust and Race-free Server Logging using Named Pipes.md b/sources/tech/20201010 Robust and Race-free Server Logging using Named Pipes.md new file mode 100644 index 0000000000..e9e41e7303 --- /dev/null +++ b/sources/tech/20201010 Robust and Race-free Server Logging using Named Pipes.md @@ -0,0 +1,120 @@ +[#]: subject: "Robust and Race-free Server Logging using Named Pipes" +[#]: via: "https://theartofmachinery.com/2020/10/10/logging_with_named_pipes.html" +[#]: author: "Simon Arneaud https://theartofmachinery.com" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Robust and Race-free Server Logging using Named Pipes +====== + +If you do any server administration work, you’ll have worked with log files. And if your servers need to be reliable, you’ll know that log files are common source of problems, especially when you need to rotate or ship them (which is practically always). In particular, moving files around causes race conditions. + +Thankfully, there are better ways. With named pipes, you can have a simple and robust logging stack, with no race conditions, and without patching your servers to support some network logging protocol. + +### The problems with rotating log files + +First, let’s talk about the problems. Race conditions are generally a problem with popular file-based logging setups, whether you’re rotating logs into archival storage, or shipping them to a remote log processing stack, or whatever. To keep things concrete, though, let me talk about [logrotate][1], just because it’s a popular tool. + +Say you have a log file at `/var/log/foo`. It gets pretty big, and you want to process the logs periodically and start with a new, empty file. So you (or your distro maintainers) set up logrotate with various rules about when to rotate the file. + +By default, logrotate will rename the file (to something like `/var/log/foo.1`) and create a new `/var/log/foo` to write to. That (mostly) works for software that runs intermittently (such as a package manager that does software updates). But it won’t do any good if the log file is generated by a long-running server. The server only uses the filename when it opens the file; after that it just keeps writing to its open file descriptor. That means it will keep writing to the old file (now named `/var/log/foo.1`), and the new `/var/log/foo` file will stay empty. + +To handle this use-case, logrotate supports another mode: `copytruncate`. In this mode, instead of renaming, logrotate will copy the contents of `/var/log/foo` to an archival file, and then truncate the original file to zero length. As long as the server has the log file open in append mode, it will automatically write new logs to the start of the file, without needing to detect the truncation and do a file seek (the kernel handles that). + +That `copytruncate` mode creates a race condition, though. Any log lines that are written after the copy but before the truncation will get destroyed. Actually, you tend to get the same race condition even with the default move-and-create mode. That’s because there’s not much point just splitting up the logs into multiple files. Most systems are configured to do something like compress the old log file, but ultimately you need to delete the old, uncompressed data, which creates the same race as truncating. (In practice, this race isn’t so likely for occasional log writers, like package managers, and the `delay` flag to logrotate makes it rarer, albeit by making the log handling a bit more complicated.) + +Some servers, like [Nginx][2], support a modification of the default logrotate mode: + + 1. Rename the old file + 2. Create the new file + 3. (New step) notify the server that it needs to reopen its log file. + + + +This works (as long as the logs processor doesn’t delete the old file before the server has finished reopening), but it requires special support from the server, and you’re out of luck with most software. There’s a lot of software out there, and log file handling just isn’t interesting enough to get high on the to-do list. This approach also only works for long-running servers. + +I think this is a good point to stop and take a step back. Having multiple processes juggle log files around on disk without any synchronisation is just an inherently painful way to do things. It causes bugs and makes logging stacks complicated ([here’s just one of many examples][3]). One alternative is to use some network protocol like MQTT or networked syslog, but, realistically, most servers won’t support the one you want. And they shouldn’t have to — log files are a great interface for log writers. + +That’s okay because *nix “everything is a file” lets us easily get a file interface on the writer side, with a streaming interface on the reader side. + +### Named pipes 101 + +Maybe you’ve seen pipes in pipelines like this: + +``` + + $ sort user_log.txt | uniq + +``` + +The pipe connecting `sort` and `uniq` is a temporary, anonymous communication channel that `sort` writes to and `uniq` reads from. Named pipes are less common, but they’re also communication channels. The only difference is that they persist on the filesystem as if they were files. + +Open up a terminal and `cd` into some temporary working directory. The following creates a named pipe and uses `cat` to open a writer: + +``` + + $ mkfifo p + $ # This cat command will sit waiting for input + $ cat > p + +``` + +Leave that `cat` command waiting, and open up another terminal in the same directory. In this terminal, start your reader: + +``` + + $ # This will sit waiting for data to come over the pipe + $ cat p + +``` + +Now as you type things into the writer end, you’ll see them appear in the reader end. `cat` will use line buffering in interactive mode, so data will get transferred every time you start a new line. + +`cat` doesn’t have to know anything about pipes for this to work — the pipe acts like a file as long as you just naïvely read or write to it. But if you check, you’ll see the data isn’t stored anywhere. You can pump gigabytes through a pipe without filling up any disk space. Once the data has been read once, it’s lost. (You can have multiple readers, but only one will receive any buffer-load of data.) + +Another thing that makes pipes useful for communication is their buffering and blocking. You can start writing before any readers open the pipe, and data gets temporarily buffered inside the kernel until a reader comes along. If the reader starts first, its read will block, waiting for data from the writer. (The writer will also block if the pipe buffer gets full.) If you try the two-terminal experiment again with a regular file, you’ll see that the reader `cat` will eagerly read all the data it can and then exit. + +### An annoying problem and a simple solution + +Maybe you’re seeing how named pipes can help with logging: Servers can write to log “files” that are actually named pipes, and a logging stack can read log data directly from the named pipe without letting a single line fall onto the floor. You do whatever you want with the logs, without any racey juggling of files on disk. + +There’s one annoying problem: the writer doesn’t need a reader to start writing, but if a reader opens the pipe and then closes it, the writer gets a `SIGPIPE` (“broken pipe”), which will kill it by default. (Try killing the reader `cat` while typing things into the writer to see what I mean.) Similarly, a reader can read without a writer, but if a writer opens the pipe and then closes it, that will be treated like an end of file. Although the named pipe persists on disk, it isn’t a stable communication channel if log writers and log readers can restart (as they will on a real server). + +There’s a solution that’s a bit weird but very simple. Multiple processes can open the pipe for reading and writing, and the pipe will only close when _all_ readers or _all_ writers close it. All we need for a stable logging pipe is a daemon that holds the named pipe open for both reading and writing, without doing any actual reading or writing. I set this up on my personal server last year, and I wrote [a tiny, zero-config program to act as my pipe-holding daemon][4]. It just opens every file in its current working directory for both reading and writing. I run it from a directory that has symbolic links to every named pipe in my logging stack. The program runs in a loop that ends in a `wait()` for a `SIGHUP`. If I ever update the symlinks in the directory, I give the daemon a `kill -HUP` and it reopens them all. Sure, it could do its own directory watching, but the `SIGHUP` approach is simple and predictable, and the whole thing works reliably. Thanks to the pipe buffer, log writers and log readers can be shut down and restarted independently, any time, without breakage. + +My server uses the [s6 supervision suite][5] to manage daemons, so I have s6-log reading from each logging pipe. The bottom part of the [s6-log documentation page][6] has some good insights into the problems with popular logging systems, and good ideas about better ways to do things. + +### Imagine: a world without log rotation + +Strictly speaking, named pipes aren’t necessary for race-free logs processing. The s6 suite encourages writing logs to some file descriptor (like standard error), and letting the supervision suite make sure those file descriptors point to something useful. However, the named pipe approach adds a few benefits: + + * It doesn’t require any co-ordination between writer and reader + * It integrates nicely with the software we have today + * It gives things meaningful names (rather than `/dev/fd/4`) + + + +I’ve worked with companies that spend about as much on their logging stacks as on their serving infrastructure, and, no, “we do logs processing” isn’t in their business models. Of course, log rotation and log shipping aren’t the only problems to blame, but it feels so wrong that we’ve made logs so complicated. If you work on any logging system, consider if you really need to juggle log files around. You could be helping to make the world a better place. + +-------------------------------------------------------------------------------- + +via: https://theartofmachinery.com/2020/10/10/logging_with_named_pipes.html + +作者:[Simon Arneaud][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://theartofmachinery.com +[b]: https://github.com/lujun9972 +[1]: https://github.com/logrotate/logrotate +[2]: https://www.nginx.com/resources/wiki/start/topics/examples/logrotation/ +[3]: https://community.splunk.com/t5/Getting-Data-In/Why-copytruncate-logrotate-does-not-play-well-with-splunk/td-p/196112 +[4]: https://gitlab.com/sarneaud/fileopenerd +[5]: http://www.skarnet.org/software/s6/index.html +[6]: http://www.skarnet.org/software/s6/s6-log.html From f219edcbd407b7a8c15ee9fc3f2d528f0e78a387 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 11 Feb 2022 22:08:03 +0800 Subject: [PATCH 264/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020200818=20?= =?UTF-8?q?D=20Declarations=20for=20C=20and=20C++=20Programmers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200818 D Declarations for C and C-- Programmers.md --- ... Declarations for C and C-- Programmers.md | 359 ++++++++++++++++++ 1 file changed, 359 insertions(+) create mode 100644 sources/tech/20200818 D Declarations for C and C-- Programmers.md diff --git a/sources/tech/20200818 D Declarations for C and C-- Programmers.md b/sources/tech/20200818 D Declarations for C and C-- Programmers.md new file mode 100644 index 0000000000..577243add8 --- /dev/null +++ b/sources/tech/20200818 D Declarations for C and C-- Programmers.md @@ -0,0 +1,359 @@ +[#]: subject: "D Declarations for C and C++ Programmers" +[#]: via: "https://theartofmachinery.com/2020/08/18/d_declarations_for_c_programmers.html" +[#]: author: "Simon Arneaud https://theartofmachinery.com" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +D Declarations for C and C++ Programmers +====== + +Because D was originally created by a C++ compiler writer, Walter Bright, [it’s an easy language for C and C++ programmers to learn][1], but there are little differences in the way declarations work. I learned them piecemeal in different places, but I’m going to dump a bunch in this one post. + +### `char* p` + +If you want to declare a pointer in C, both of the following work: + +``` + + char *p; + char* p; + +``` + +Some people prefer the second form because it puts all the type information to one side. At least, that’s what it looks like. Trouble is, you can fall into this trap: + +``` + + char* p, q; // Gotcha! p is a pointer to a char, and q is a char in C + +``` + +“Type information on the left” isn’t really how C works. D, on the other hand, _does_ put all the type information to the left, so this works the way it appears: + +``` + + char* p, q; // Both p and q are of type char* in D + +``` + +D also accepts the `char *p` syntax, but the rule I go by is `char *p` when writing C, and `char* p` when writing D, just because that matches how the languages actually work, so no gotchas. + +### Digression: how C declarations work + +This isn’t about D, but helps to make sense of the subtler differences between C and D declarations. + +C declarations are implicit about types. `char *p` doesn’t really say, “`p` is of type `char*`”; it says “the type of `p` is such that `*p` evaluates to a `char`”. Likewise: + +``` + + int a[8]; // a[i] evaluates to an int (=> a is an array of ints) + int (*f)(double); // (*f)(0.5) evaluates to an int (=> f is a pointer to a function taking a double, returning an int) + +``` + +There’s a kind of theoretical elegance to this implicit approach, but 1) it’s backwards and makes complex types confusing, 2) the theoretical elegance only goes so far because everything’s a special case. For example, `int a[8];` declares an array `a`, but makes the expression `a[8]` undefined. You can only use certain operations, so `int 2*a;` doesn’t work, and neither does `double 1.0 + sin(x);`. The expression `4[a]` is equivalent to `a[4]`, but you can’t declare an array with `int 4[a];`. C++ gave up on the theory when it introduced reference syntax like `int &x;`. + +### `function` and `delegate` + +D has a special `function` keyword for declaring function pointers using the “type information on the left” approach. It makes the declaration of function pointers use the same syntax as the declaration of a function: + +``` + + int foo(); + int[] bar(); + + int function() foo_p = &foo; + int[] function() bar_p = &bar; + +``` + +Note that the `&` is _required_ to get the address of a function in D (unlike in C and C++). If you want to have an array of pointers, you just add `[]` to the end of the type, just like you do with any other type. Similarly for making pointers to types: + +``` + + int function()[] foo_pa = [&foo]; + int function()* foo_pp = &foo_p; + int function()[]* foo_pap = &foo_pa; + +``` + +Here’s the C equivalent for comparison: + +``` + + int (*foo_p)() = &foo; + int (*foo_pa[])() = {&foo}; + int (**foo_pp)() = &foo_p; + int (*(*foo_pap)[])() = &foo_pa; + +``` + +It’s rare to need these complicated types, but the logic for the D declarations is much simpler. + +There’s also the `delegate` keyword, which works in exactly the same way for [“fat function pointers”][2]. + +### Arrays + +The most obvious difference from C is that D uses the “type information on the left” approach: + +``` + + // int a[8]; is an error in D + int[8] a; + +``` + +Another difference is in the order of indices for multidimensional arrays. E.g., this C code: + +``` + + int a[4][64]; + +``` + +translates to this in D: + +``` + + int[64][4] a; + +``` + +Here’s the rule for understanding the D ordering: + +``` + + T[4] a; + static assert (is(typeof(a[0]) == T)); + +``` + +If `T` represents a type, then `T[4]` is always an array of 4 `T`s. Sounds obvious, but it means that if `T` is `int[64]`, `int[64][4]` must be an array of 4 `int[64]`s. + +### `auto` + +C had `auto` as a storage class keyword since the early days, but it got mostly forgotten because it’s only allowed in the one place it’s the default, anyway. (It effectively means “this variable goes on the stack”.) C++ repurposed the keyword to enable automatic type deduction. + +You can also use `auto` with automatic type deduction in D, but it’s not actually required. Type deduction is always enabled in D; you just need to make your declaration unambiguously a declaration. For example, these work in D (but not all in C++): + +``` + + auto x1 = 42; + const x2 = 42; + static x3 = 42; + +``` + +### No need for forward declarations at global scope + +This code works: + +``` + + // Legal, but not required in D + // void bar(); + + void foo() + { + bar(); + } + + void bar() + { + // ... + } + +``` + +Similarly for structs and classes. Order of definition doesn’t matter, and forward declarations aren’t required. + +Order does matter in local scope, though: + +``` + + void foo() + { + // Error! + bar(); + + void bar() + { + // ... + } + } + +``` + +Either the definition of `bar()` needs to be put before its usage, or `bar()` needs a forward declaration. + +### `const()` + +The `const` keyword in C declarations can be confusing. (Think `const int *p` vs `int const *p` vs `const int const *p`.) D supports the same syntax, but also allows `const` with parentheses: + +``` + + // non-constant pointer to constant int + const(int)* p1; + // constant pointer to constant int + const(int*) p2; + +``` + +[`const` is transitive in D][3], anyway, and this syntax makes it much clearer. The same parenthetical syntax works with `immutable`, too. Although C-style syntax is supported by D, I always prefer the parenthetical style for a few more reasons. + +### `ref` + +`ref` is the D alternative to C++’s references. In D, `ref` doesn’t create a new type, it just controls how the instance of the type is stored in memory (i.e, it’s a storage class). C++ acts as if references are types, but references have so many special restrictions that they’re effectively like a complex version of a storage class (in Walter’s words, C++ references try to be both a floor wax and dessert topping). For example, C++ treats `int&` like a type, but forbids declaring an array of `int&`. + +As a former C++ programmer, I used to write D function arguments like this: + +``` + + void foo(const ref S s); + +``` + +Now I write them like this: + +``` + + void foo(ref const(S) s); + +``` + +The difference becomes more obvious with more complex types. Treating `ref` like a storage class ends up being cleaner because that’s the way it actually is in D. + +Currently `ref` is only supported with function arguments or `foreach` loop variables, so you can’t declare a regular local variable to be `ref`. + +### Function qualifiers + +D’s backward-compatible support for the C-style `const` keyword creates an unfortunate gotcha: + +``` + + struct S + { + // Confusing! + const int* foo() + { + // ... + } + } + +``` + +`foo()` doesn’t return a `const int*`. The `const` applies to the `foo()` member function itself, meaning that it works on `const` instances of `S` and returns a (non-`const`) `int*`. To avoid that trap, I always use the D-style `const()` syntax, and write member function qualifiers on the right: + +``` + + struct S + { + const(int)* foo() + { + // ... + } + + int* bar() const + { + // ... + } + } + +``` + +### Syntax ambiguities + +C++ allows initialising struct and class instances without an `=` sign: + +``` + + S s(42); + +``` + +This syntax famously leads to ambiguities with function declaration syntax in special cases (Scott Meyers’ “most vexing parse”). [People like Herb Sutter have written enough about it.][4] D only supports initialisation with `=`: + +``` + + S s = S(42); + // Alternatively: + auto s = S(42); + +``` + +C syntax has some weird corners, too. Here’s a simple one: + +``` + + x*y; + +``` + +That looks like a useless multiplication between two variables, but logically it could be a declaration of `y` as a pointer to a type `x`. Expression and declaration are totally different parses that depend on what the symbol `x` means in this scope. (Even worse, if it’s a declaration, then the new `y` could shadow an existing `y`, which could affect later parses.) So C compilers need to track symbols in a symbol table while parsing, which is why C has forward declarations in practice. + +D sidesteps the ambiguity by requiring a typecast to `void` if you really want to write an arithmetic expression without assigning it to anything: + +``` + + int x, y; + cast(void)(x*y); + +``` + +I’ve never seen useful code do that, but that rule helps D parse simply without forward declarations. + +Here’s another quirk of C syntax. Remember that C declarations work by having a basic type on the left, followed by expressions that evaluate to that type? C allows parentheses in those expressions, and doesn’t care about whitespace as long as symbols don’t run together. That means these two declarations are equivalent: + +``` + + int x; + int(x); + +``` + +But what if, instead of `int`, we use some symbol that might be a typedef? + +``` + + // Is this a declaration of x, or a function call? + t(x); + +``` + +Just for fun, we can exploit shadowing and C’s archaic type rules: + +``` + + typedef (*x)(); + main() + { + x(x); + x(x); + } + +``` + +The first line makes `x` a typedef to a function pointer type. The first `x(x);` redeclares `x` to be a function pointer variable, shadowing the typedef. The second `x(x);` is a function call that passes `x` as an argument. Yes, this code actually compiles, but it’s undefined behaviour because the function pointer is dereferenced without being initialised. + +D avoids this chaos thanks to its “all type information on the left” rule. There’s no need to put parentheses around symbols in declarations, so `x(y);` is always a function call. + +-------------------------------------------------------------------------------- + +via: https://theartofmachinery.com/2020/08/18/d_declarations_for_c_programmers.html + +作者:[Simon Arneaud][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://theartofmachinery.com +[b]: https://github.com/lujun9972 +[1]: https://ddili.org/ders/d.en/index.html +[2]: https://tour.dlang.org/tour/en/basics/delegates +[3]: https://dlang.org/articles/const-faq.html#transitive-const +[4]: https://herbsutter.com/2013/05/09/gotw-1-solution/ From 67fb15cb7f7c7ad243301840a44256f76b2233cf Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sat, 12 Feb 2022 09:01:20 +0800 Subject: [PATCH 265/334] Rename sources/news/20220211 Should You Use a New, Obscure Linux Distro or Stick With the Mainstream Ones.md to sources/talk/20220211 Should You Use a New, Obscure Linux Distro or Stick With the Mainstream Ones.md --- ...New, Obscure Linux Distro or Stick With the Mainstream Ones.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{news => talk}/20220211 Should You Use a New, Obscure Linux Distro or Stick With the Mainstream Ones.md (100%) diff --git a/sources/news/20220211 Should You Use a New, Obscure Linux Distro or Stick With the Mainstream Ones.md b/sources/talk/20220211 Should You Use a New, Obscure Linux Distro or Stick With the Mainstream Ones.md similarity index 100% rename from sources/news/20220211 Should You Use a New, Obscure Linux Distro or Stick With the Mainstream Ones.md rename to sources/talk/20220211 Should You Use a New, Obscure Linux Distro or Stick With the Mainstream Ones.md From 6d112af1128760bd45e7b5c690e11728d7acee28 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 12 Feb 2022 10:29:18 +0800 Subject: [PATCH 266/334] ALL @wxy https://linux.cn/article-14264-1.html --- ...to Upgrade to KDE Plasma 5.24 from 5.23.md | 109 +++++++++++++++ ...to Upgrade to KDE Plasma 5.24 from 5.23.md | 131 ------------------ 2 files changed, 109 insertions(+), 131 deletions(-) create mode 100644 published/20220208 How to Upgrade to KDE Plasma 5.24 from 5.23.md delete mode 100644 sources/tech/20220208 How to Upgrade to KDE Plasma 5.24 from 5.23.md diff --git a/published/20220208 How to Upgrade to KDE Plasma 5.24 from 5.23.md b/published/20220208 How to Upgrade to KDE Plasma 5.24 from 5.23.md new file mode 100644 index 0000000000..5de3da16ba --- /dev/null +++ b/published/20220208 How to Upgrade to KDE Plasma 5.24 from 5.23.md @@ -0,0 +1,109 @@ +[#]: subject: "How to Upgrade to KDE Plasma 5.24 from 5.23" +[#]: via: "https://www.debugpoint.com/2022/02/upgrade-kde-plasma-5-24/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14264-1.html" + +如何从 KDE Plasma 5.23 升级到 5.24 +====== + +> KDE 团队宣布了 KDE Plasma 5.24 LTS 版,已经可以下载和安装了。如果你打算从以前的版本升级,在这里我们给你提供了从 5.23 升级到 5.24 的简明步骤。 + +![KDE Plasma 5.24 桌面][1] + +KDE Plasma 5.24 是 Plasma 桌面的第 26 个版本,带来了显著的视觉改变和一些后端性能的提升。在这个版本中,你会看到全新的墙纸、Breeze 主题的视觉变化、指纹登录和一个全新的概览屏幕等等。 + +你可以在我们的综述文章里阅读有关 [KDE Plasma 5.24 功能的细节][2]。 + +如果你正在运行 KDE Plasma 的早期版本,你可以按本文说明升级到最新版本。 + +### 如何升级到 KDE Plasma 5.24 + +这个版本的升级包大小适中,在我的测试机器上大约是 450MB 以上。在开始升级过程之前,请确保关闭所有应用程序并保存你的数据。 + +一般来说,KDE 的升级是非常稳定的,它从来不会失败。但是,如果你想格外谨慎,并且有宝贵的数据,你可能想对这些进行备份。但同样,在我看来,我相信这是没有必要的。 + +#### 步骤 + +如果你是在 KDE Neon 之中、滚动发布的发行版(如 Arch Linux、Manjaro 之类)中运行 KDE Plasma 5.23,你可以打开 KDE 工具 “发现Discover”,点击检查更新。 + +你可以通过“发现Discover”的升级包列表验证 Plasma 5.24 是否可用。 + +一旦确认可用,点击“发现Discover”窗口右上方的“全部更新Update All”按钮。 + +另外,你也可以从终端运行下面的命令,在 KDE Neon 中开始升级过程。 + +``` +sudo apt update +sudo pkcon update +``` + +升级过程完成后重启系统。 + +而重启后,你应该看到全新的 KDE Plasma 5.24 出现在你面前。 + +### 在 Fedora 35 和 Ubuntu 21.10 中升级 KDE Plasma 5.24 + +截至目前,[Fedora 35][3] 和 [Ubuntu 21.10][4] 是两个主要的 KDE 的发行版。由于 [更新政策][5],Fedora 35 不会得到这个版本,而 Fedora 36 也将很快发布。 + +然而,如果你仍然想做实验,你可以在 Ubuntu 21.10 和 Ubuntu 21.04 中使用下面的 Backports PPA 安装这个新版本的 Plasma 桌面。在这样做的时候,请确保你保留一份数据备份。 + +``` +sudo add-apt-repository ppa:kubuntu-ppa/backports +sudo apt-get full-upgrade +``` + +在 Fedora 35 中,我试图通过下面的 COPR 仓库来安装。但是有太多的依赖性冲突需要解决,在一个稳定的系统中尝试这样做是有风险的。我建议目前不要在 Fedora 35 中尝试下面的方法。当然你仍然可以通过 `allowerasing` 标志来安装。但不要这样做。 + +另外,我猜 Fedora 35 的官方版本会在第一个小版本(即 5.24.1)发布时更新,该版本将于 2022 年 2 月 15 日发布,所以你可以等到那时。 + +另外,等待 Fedora 36 也是比较明智的做法,因为它将这个版本作为默认版本。Fedora 36 将于 2022 年 4 月发布。 + +![试图在 Fedora 35 中安装 Plasma 5.24][6] + +``` +sudo dnf copr enable marcdeop/plasma +sudo dnf copr enable marcdeop/kf5 +sudo dnf upgrade --refresh +``` + +### 升级后的反馈 + +我在虚拟机中运行了升级过程,并安装了新的 KDE Plasma 5.23。升级过程很顺利,没有出现意外或错误。好吧,到目前为止,它对我来说从未失败过。 + +升级时间完全取决于你的互联网连接和 KDE 服务器。一般来说,它应该在 30 分钟内完成。 + +升级过程后的第一次重启很顺利,没有花费多少时间。 + +从性能上讲,我觉得它比之前的版本更流畅,这要归功于几个错误的修复和底层的性能优化。 + +所以,总的来说,如果你在使用 KDE Neon,你可以安全地升级。否则就等待 Ubuntu 和 Fedora 稳定版的软件包。 + +享受全新的 KDE Plasma 吧! + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/02/upgrade-kde-plasma-5-24/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/wp-content/uploads/2022/02/KDE-Plasma-5.4-Desktop-1024x576.jpg +[2]: https://www.debugpoint.com/2022/01/kde-plasma-5-24/ +[3]: https://www.debugpoint.com/2021/09/fedora-35/ +[4]: https://www.debugpoint.com/2021/07/ubuntu-21-10/ +[5]: https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/#stable-releases +[6]: https://www.debugpoint.com/wp-content/uploads/2022/02/Trying-to-Install-Plasma-5.24-in-Fedora-35-1024x576.jpg +[7]: https://t.me/debugpoint +[8]: https://twitter.com/DebugPoint +[9]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[10]: https://facebook.com/DebugPoint diff --git a/sources/tech/20220208 How to Upgrade to KDE Plasma 5.24 from 5.23.md b/sources/tech/20220208 How to Upgrade to KDE Plasma 5.24 from 5.23.md deleted file mode 100644 index 366d701513..0000000000 --- a/sources/tech/20220208 How to Upgrade to KDE Plasma 5.24 from 5.23.md +++ /dev/null @@ -1,131 +0,0 @@ -[#]: subject: "How to Upgrade to KDE Plasma 5.24 from 5.23" -[#]: via: "https://www.debugpoint.com/2022/02/upgrade-kde-plasma-5-24/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to Upgrade to KDE Plasma 5.24 from 5.23 -====== -THE KDE TEAM ANNOUNCED THE KDE PLASMA 5.24 LTS EDITION, WHICH IS -AVAILABLE TO DOWNLOAD AND INSTALL. IF YOU ARE PLANNING TO UPGRADE FROM -THE PRIOR VERSION – HERE WE GIVE YOU QUICK STEPS TO UPGRADE TO KDE -PLASMA 5.24 FROM 5.23. -![KDE Plasma 5.24 Desktop][1] - -KDE Plasma 5.24 is the 26th edition of Plasma desktop that brings significant visual refresh with some backend performance boost. With this release, you get a brand new wallpaper, visual refresh to the Breeze theme, fingerprint login and a brand new overview screen. And many more updates. - -Here, you can read details about the [KDE Plasma 5.24 features in our round-up post][2]. - -If you are running an earlier version of KDE Plasma, this is how you can upgrade to the latest version. - -### How to Upgrade to KDE Plasma 5.24 - -The upgrade size in this release is moderate, around 450 MB+ in my test machine. So, make sure to close all applications and save your data before starting the upgrade process. - -In general, the KDE update is very stable. It never fails. But if you want to be extra cautious and have valuable data, you may want to take a backup of those. But again, I believe it’s unnecessary, in my opinion. - -#### Steps - -If you are running KDE Plasma 5.23 in KDE Neon, Or any rolling release distributions such as Arch Linux, Manjaro, or any other distro, you can open the KDE utility Discover and click on the check for update. - -You can verify whether Plasma 5.24 is available via the Discover upgrade package list. - -Once you have verified, click on the ‘Update All’ button in the Discover window at the top right. - -Alternatively, you can also run the below commands from the terminal and start the upgrade process in KDE Neon. - -``` - - sudo apt update - -``` - -``` - - sudo pkcon update - -``` - -Restart the system after the upgrade process is complete. - -And after reboot, you should see the brand new KDE Plasma 5.24 welcomes you. - -### KDE Plasma 5.24 in Fedora 35 and Ubuntu 21.10 - -As of writing this, [Fedora 35][3] and [Ubuntu 21.10][4] are the two primary distribution versions. Fedora 35 would not be getting this version due to the [update policy][5] and Fedora 36 also would be released soon. - -[][2] - -SEE ALSO:   KDE Plasma 5.24 – Top New Features and Release Details - -However, If you still want to experiment, you can install this new version of Plasma desktop in Ubuntu 21.10 and Ubuntu 21.04 using the below backports PPA. Make sure you keep a backup of your data while doing so. - -``` - - sudo add-apt-repository ppa:kubuntu-ppa/backports - sudo apt-get full-upgrade - -``` - -In Fedora 35, I tried to install via the below copr repo. But there are too many dependency conflicts to resolve and it’s risky to try this in a stable system. I would recommend not to try the below in Fedora 35 at this time. You can still install by “allowerasing” flag. But don’t do it. - -Also, I guess the official Fedora 35 repo will be updated on the first point release i.e. 5.24.1 which is due on Feb 15, 2022. So you can wait until then. - -Also, it is wiser to wait for Fedora 36 which brings this version as default. Fedora 36 is due on April 2022. - -![Trying to Install Plasma 5.24 in Fedora 35][6] - -``` - - sudo dnf copr enable marcdeop/plasma - sudo dnf copr enable marcdeop/kf5 - sudo dnf upgrade --refresh - -``` - -### Post Upgrade Feedback - -I ran the upgrade process in a virtual machine with a fresh KDE Plasma 5.23 install. The upgrade process went smooth, so surprises or errors. Well, it never failed for me to date. - -The upgrade time entirely depends on your internet connection and KDE servers. In general, it should b completed within 30 minutes. - -The first restart after the upgrade process went fine and did not take much time. - -Performance-wise, I felt it’s a little smooth over the prior releases, thanks to several bug fixes and under the hood performance optimizations. - -So, overall, you can safely upgrade if you are in KDE Neon. And wait for the packages for Ubuntu and Fedora stable releases. - -Enjoy the brand new KDE Plasma! - -* * * - -We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][7], [Twitter][8], [YouTube][9], and [Facebook][10] and never miss an update! - -##### Also Read - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/2022/02/upgrade-kde-plasma-5-24/ - -作者:[Arindam][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.debugpoint.com/author/admin1/ -[b]: https://github.com/lujun9972 -[1]: https://www.debugpoint.com/wp-content/uploads/2022/02/KDE-Plasma-5.4-Desktop-1024x576.jpg -[2]: https://www.debugpoint.com/2022/01/kde-plasma-5-24/ -[3]: https://www.debugpoint.com/2021/09/fedora-35/ -[4]: https://www.debugpoint.com/2021/07/ubuntu-21-10/ -[5]: https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/#stable-releases -[6]: https://www.debugpoint.com/wp-content/uploads/2022/02/Trying-to-Install-Plasma-5.24-in-Fedora-35-1024x576.jpg -[7]: https://t.me/debugpoint -[8]: https://twitter.com/DebugPoint -[9]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 -[10]: https://facebook.com/DebugPoint From 1d866736e9068291e034178352ff3b74b6b803bd Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 12 Feb 2022 11:25:57 +0800 Subject: [PATCH 267/334] RP @geekpi https://linux.cn/article-14265-1.html --- ...se Delta Chat, an open source chat tool.md | 44 ++++++++----------- 1 file changed, 19 insertions(+), 25 deletions(-) rename {translated/tech => published}/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md (61%) diff --git a/translated/tech/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md b/published/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md similarity index 61% rename from translated/tech/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md rename to published/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md index 75fb248abf..11d92b4526 100644 --- a/translated/tech/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md +++ b/published/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md @@ -3,26 +3,28 @@ [#]: author: "Alan Smithee https://opensource.com/users/alansmithee" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14265-1.html" -软件隐私日:使用 Delta Chat,一个开源的聊天工具 +Delta Chat:一个开源的聊天工具 ====== -最好的聊天程序是不属于聊天程序的程序。 -![Chat via email][1] -又到了“软件隐私日”,这一天旨在鼓励各地的用户考虑一下,当他们的数据被发布到互联网上,或通过互联网发布时,他们的数据究竟去了哪里。古老的聊天应用是互联网通信领域的一个似乎在流行起起落落的家庭手工业。人们使用聊天应用进行各种形式的对话,大多数人没有想到机器人正在记录和监控他们所说的话,无论是为了有效地定位广告还是只是为了建立一个档案供将来使用。这使得聊天应用特别容易受到不良隐私做法的影响,但幸运的是,现在有几个开源的、注重隐私的应用,包括 [Signal][2]、[Rocket.Chat][3] 和 [Mattermost][4]。我已经运行了 Mattermost 和 Rocket.Chat,我也在使用 Signal,但我最兴奋的应用是 Delta Chat,这个聊天服务非常方便,甚至不使用聊天服务器。相反,Delta Chat 使用的是你已经使用的最大规模和最多样化的开放信息系统。它使用电子邮件,通过聊天应用发送和接收信息,并以 [Autocrypt][5] 的端到端加密为特色。 +> 最好的聊天应用是一个不属于聊天应用的应用。 + +![](https://img.linux.net.cn/data/attachment/album/202202/12/112502b27g761gws4j7s6z.jpg) + +请考虑一下,当用户的数据被发布到互联网上,或通过互联网发布时,他们的数据究竟去了哪里。古老的聊天应用是互联网通信领域的一个手工行业,似乎在潮流中起起落落。人们使用聊天应用进行各种形式的对话,大多数人不会想到机器人正在记录和监控他们所说的话,无论是为了有效地定位广告还是只是为了建立一个档案供将来使用。这使得聊天应用特别容易受到不良的隐私做法的影响,但幸运的是,现在有几个开源的、注重隐私的应用,如 [Signal][2]、[Rocket.Chat][3] 和 [Mattermost][4]。我运行过 Mattermost 和 Rocket.Chat,我也在使用 Signal,但我最兴奋的应用是 Delta Chat,这个聊天服务非常方便,甚至不使用聊天服务器。相反,Delta Chat 使用的是你已经使用的最大规模和最多样化的开放信息系统:它使用电子邮件,通过聊天应用发送和接收信息,并以 [Autocrypt][5] 的端到端加密为特色。 ### 安装 Delta Chat -Delta Chat 使用标准的电子邮件协议作为它的后端,但对于作为普通用户的你和我来说,它的外观和行为完全像一个聊天应用。这意味着你需要安装开源的 Delta Chat 应用。 +Delta Chat 使用标准的电子邮件协议作为它的后端,但对于作为普通用户的你和我来说,它的外观和行为完全像一个聊天应用。也就是说你需要安装一个开源的 Delta Chat 应用。 在 Linux 上,你可以从 [Flatpak][6] 包或你的软件库中安装 Delta Chat。 在 macOS 和 Windows 上,从 [delta.chat/downloads][7] 下载一个安装程序。 -在安卓系统上,你可以从 Play Store 或开源的 [F-droid 仓库][8]安装 Delta Chat。 +在安卓系统上,你可以从 Play Store 或开源的 [F-droid 仓库][8] 安装 Delta Chat。 在 iOS 系统中,从 App Store 安装 Delta Chat。 @@ -32,30 +34,24 @@ Delta Chat 使用标准的电子邮件协议作为它的后端,但对于作为 当你第一次启动 Delta Chat 时,你必须登录到你的电子邮件账户。这往往是 Delta Chat 最难的部分,因为它要求你了解你的电子邮件服务器的详细信息,或者在你的电子邮件提供商的安全设置中创建一个“应用密码”。 -如果你使用的是自己的服务器,并且所有配置都是默认的(993 端口用于接收 IMAP,465 端口用于发送 SMTP,启用 SSL/TLS),那么你可以直接输入你的电子邮件地址和密码,然后继续。 +如果你使用的是自己的服务器,并且所有配置都是默认的(993 端口用于 IMAP 接收,465 端口用于 SMTP 发出,启用了 SSL/TLS),那么你可以直接输入你的电子邮件地址和密码,然后继续。 ![Delta Chat login][9] -(Opensource.com [CC BY-SA 4.0][10]) - -I如果你运行自己的服务器,但你有自定义设置,那么点击**高级**按钮,输入你的设置。如果你使用一个不寻常的子域来表示你的邮件服务器,或一个自定义端口,或一个复杂的登录和密码配置,你可能需要这样做。 +如果你运行自己的服务器,但你有自定义设置,那么点击“高级Advanced”按钮,输入你的设置。如果你使用一个不寻常的子域来用作你的邮件服务器,或一个自定义端口,或一个复杂的登录和密码配置,你可能需要这样做。 如果你使用的是 Gmail、Fastmail、Yahoo 或类似的电子邮件供应商,那么你必须创建一个应用密码,这样你就可以通过 Delta Chat 而不是网络浏览器登录到你的账户。许多电子邮件供应商限制登录,以避免无休止的机器人和脚本试图用暴力手段进入人们的账户,所以对你的供应商来说,Delta Chat 看起来很像机器人。当你授予 Delta Chat 特殊权限时,你就是在提醒你的电子邮件提供商,从一个远程应用发出大量的短信息是预期的行为。 每个电子邮件提供商都有不同的提供应用密码的方式,但 Fastmail(在我看来)是最简单的: - 1. 进入**设置** - 2. 点击**密码和安全**。 - 3. 在**第三方应用**的旁边,点击**添加**按钮 + 1. 进入“设置Settings” + 2. 点击“密码和安全Passwords & Security” + 3. 在“第三方应用Third-party apps”的旁边,点击“添加Add”按钮 - - -验证你的密码,并创建一个新的应用密码。使用你创建的密码登录 Delta Chat。 +验证你的密码,并创建一个新的应用密码。使用你创建的应用密码登录 Delta Chat。 ![Fastmail app password][11] -(Opensource.com [CC BY-SA 4.0][10]) - ### 使用 Delta Chat 聊天 当你克服了登录的障碍,剩下的就很容易了。因为 Delta Chat 只使用电子邮件,你可以通过电子邮件地址而不是通过聊天程序的用户名或电话号码来添加朋友。从技术上讲,你可以在 Delta Chat 上添加任何电子邮件地址。毕竟,它只是一个有特定使用场景的电子邮件应用。不过,告诉你的朋友 Delta Chat 是很有礼貌的,而不是期望他们通过他们的电子邮件客户端与你进行随意的聊天。 @@ -64,11 +60,9 @@ I如果你运行自己的服务器,但你有自定义设置,那么点击** ![Delta Chat chat list][12] -(图片来源:Delta Chat) - ### 开始聊天 -Delta Chat 是去中心化的,完全加密的,并依赖于一个成熟的基础设施。 多亏 Delta Chat,你可以选择你和你的联系人之间的服务器,你可以在私下里交流。没有复杂的服务器需要安装,没有硬件需要维护。这是一个看似复杂问题的简单解决方案,而且是开源的。我们有充分的理由去尝试它,尤其是在软件隐私日。 +Delta Chat 是去中心化的、完全加密的,并依赖于一个成熟的基础设施。多亏 Delta Chat,你可以选择你和你的联系人之间的服务器,你可以在私下里交流。没有需要安装的复杂的服务器,没有需要维护的硬件。这是一个看似复杂问题的简单解决方案,而且是开源的。我们有充分的理由去尝试它。 -------------------------------------------------------------------------------- @@ -77,7 +71,7 @@ via: https://opensource.com/article/22/1/delta-chat-software-privacy-day 作者:[Alan Smithee][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 214a7d51af57dedd7f128b0c3f37c9cef277b886 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 12 Feb 2022 21:55:43 +0800 Subject: [PATCH 268/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020211212=20?= =?UTF-8?q?10=20Best=20Apps=20to=20Improve=20Your=20GNOME=20Experience=20[?= =?UTF-8?q?Part=201]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20211212 10 Best Apps to Improve Your GNOME Experience -Part 1.md --- ...o Improve Your GNOME Experience -Part 1.md | 414 ++++++++++++++++++ 1 file changed, 414 insertions(+) create mode 100644 sources/tech/20211212 10 Best Apps to Improve Your GNOME Experience -Part 1.md diff --git a/sources/tech/20211212 10 Best Apps to Improve Your GNOME Experience -Part 1.md b/sources/tech/20211212 10 Best Apps to Improve Your GNOME Experience -Part 1.md new file mode 100644 index 0000000000..1b96928e74 --- /dev/null +++ b/sources/tech/20211212 10 Best Apps to Improve Your GNOME Experience -Part 1.md @@ -0,0 +1,414 @@ +[#]: subject: "10 Best Apps to Improve Your GNOME Experience [Part 1]" +[#]: via: "https://www.debugpoint.com/2021/12/best-gnome-apps-part-1/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +10 Best Apps to Improve Your GNOME Experience [Part 1] +====== +WE GIVE YOU DETAILS ABOUT THE 10 BEST GNOME APPS THAT CAN HELP YOU WORK +SEAMLESSLY IN THIS AMAZING DESKTOP. +There are hundreds of GTK based apps out there. And they are unknown, not so popular. These apps are designed to streamline your GNOME desktop experience with native app feel. The purpose of this article series is to improve popularity of those apps while encouraging more user participation ad development. + +In this article series of ‘Best GNOME Apps’, we will highlight some known, unknown native GTK based Apps that are exclusively designed for GNOME across functionality. + +. Other parts are available in below links: + + * [Part 2][1] + * [Part 3][2] + * [Part 4][3] + + + +In this article, we covered the following GNOME Apps. + + * [Geary][4] – Email Client + * [Notejot][5] – Easy Notes + * [Hydrapaper][6] – Wallpaper for Multi Monitor Displays + * [Solanum][7] – Pomodoro Client + * [Cawbird][8] – Twitter Client + * [News Flash][9] – RSS Reader + * [Fragments][10] – Torrent Client + * [MetadataCleaner][11] – Clean metadata from various files + * [Kooha][12] – Screen Recorder + * [Metronome][13] – Repeat Beats + + + +### 10 Best GNOME Apps – Part 1 + +#### Geary – Email Client + +When you think about [native email clients in Linux desktop][14], the default name that everyone considers is Thunderbird. However, if you want a more native feel in an email client, then you can try Geary. Geary is a GTK+ based email client that brings you features such as conversation view, mail merge, easy setup with just two steps, support for IMAP, SMTP, rich text editor for composing emails and many cool features. + +You can easily configure this as your default email client with major email service providers such as Gmail, Yahoo, Outlook with option for custom configurations. + +![Geary Email Client for GNOME][15] + +Here’s how you can try it out. + +Geary is available in major Linux Distribution’s official repo. You can search with ‘Geary’ to install. Or, via terminal: + +``` + + sudo apt install geary + +``` + +``` + + sudo dnf install geary + +``` + +I would recommend to use Flatpak of this application, which you can install using following methods. + + * Make sure to set up Flatpak via [this method][16]. And then – + * [Install via Flathub][17] + + + * [Home page][18] + * [Source Code][19] + + + +#### Notejot – Easy Notes + +Want a “stupidly simple” note-taking app for GNOME? Then Notejot is the app that you are looking. This nifty note-taking apps look excellent with its intuitive one window UI that is carefully crafted. This app brings features such as multiple notes, notebook features, color notes, standard text formatting, etc. A perfect little GNOME application for note-taking. + +![Stupidly Simple Note-Taking App – Notejot][20] + +Try this app as Flatpak standalone package using the below methods. + + * Make sure to set up Flatpak via [this method][16]. And then – + * [Install via Flathub][17] + + + * [Source code][21] + + + +#### Hydrapaper – Wallpaper Changer for Multi Monitor Displays + +This GTK application is a lifesaver for those uses multiple monitors. When you connect multiple displays to a single source system, the same wallpaper is shown in all the monitors. But if you want different pictures in those monitors, then you can use this app called Hydrapaper. This GTK app, well integrates with GNOME Desktop and gives you features such as – + + * Preview of displays with their ID and what is displayed on them + * Add your pictures folder and browse inside the app + * Favorite option to quickly pick your favorite one + * Five wallpaper modes – (Zoom, Fit/Center with black background, Fit/Center with blur background) + * Random wallpaper mode + * Command line option to extend it via scripting + + + +![Hydrapaper – Wallpaper for Multiple Screens][22] + +This is how to install this app. + +This app is available in major Linux distribution’s repo. You can use the below methods. + +``` + + sudo apt install hydrapaper (for Debian/Ubuntu) + +``` + +``` + + sudo dnf install hydrapaper (for Fedora and related) + +``` + +Arch users can install it via AUR after [setting up yay][23] – + +``` + + yay -S hydrapaper-git + +``` + +You can also install using Flatpak package after setting u[p Flatpak][16] – + +[Install via Flathub][24] + + * [Home Page][25] + * [Source Code][26] + + + +#### Solanum – Pomodoro Client + +The next GNOME app is called Solanum which is a time tracking application based on [Pomodoro technique.][27] The technique is to break the time you have in 25-minute chunk separated by 5 minutes break – which is called one Pomodoro. After 4 pomodoro, you can take a longer break. + +This app helps you to do just that. Solanum has a very simple UI that shows the Pomodoro in a Lap with a timer. The Start stop toggle button helps you to manage your time. This is a very useful utility, specially if you face difficulties on managing time. + +![Solanum][28] + +Here’s how to get it. + +You can install Solanum using Flatpak package after [set up][16] – + +[Install as Flatpak][29] + +More details about this app – + + * [Home page][30] + * [Source code][31] + + + +#### Cawbird – Twitter Client + +[Cawbird][32] is a GTK based twitter client for GNOME desktops. It is a fork of [Corebird][33] which was discontinued after Twitter API changes. This app is perfect for your GNOME desktop and have all the features of Twitter web. Resource wise, it is lightweight. If you are a heavy Twitter user, then you can give the app a try. + +![Cawbird – A Native GNOME App for Twitter][34] + +Here are the installation steps. + +Cawbird is available for all Major Linux distributions. You can find the packages and commands below for installation. + +[Ubuntu/Debian – pre-compiled DEB packages from OpenSUSE][35] + +``` + + sudo dnf install cawbird (for Fedora and related) + +``` + +For Arch Linux you can get it via – + +``` + + pacman -Syu cawbird + +``` + +[Install as Flatpak][36] + +[][1] + +SEE ALSO:   10 Perfect Apps to Improve Your GNOME Experience [Part 2] + +[Install as Snap][37] + + * [Home page][32] + * [Source Code][38] + + + +#### News Flash – RSS Reader + +The News Flash is one of the best GNOME app for reading RSS feeds from your favorite websites. This application is perfect for your GNOME desktop because of the features it provides. It gives you popup notifications for your new feeds, unread feeds, support dark mode, etc. Here’s a quick summary of its features. + +Perhaps the most exciting feature is the ability to read the article directly inside the app itself – even if the feed doesn’t provide the entire article. It tries to fetch the text from the URL and display it in the app window (without images). + + * Support for popular feed integration + * Import and export of feeds with OPML + * Dark mode support + * Reader mode + * Bookmark, search, export article options + * Gives you details about how much disk space used in the settings by the app to store the feeds. + + + +![News Flash – One of the best GNOME App for Managing Feeds][39] + +Interested? Here’s how to install. + +Install as a Flatpak package after [initial setup][16] – + +[Install via Flathub][40] + +If you are in Arch Linux, you can [set up Yay AUR Helper][23] and then use the following command to install – + +``` + + yay -S newsflash + +``` + + * [Home Page][41] + * [Source Code][42] + + + +#### Fragments – Torrent Client + +Fragments is a simple BitTorrent desktop client built on GTK. Although we have Transmission as perfect torrent client which has separate UI for GTK and QT. But no harm on a far simpler Torrent client for GNOME desktop, right? Fragment has a simple interface, confirms to GNOME design guidelines and provides all the required features for a BitTorrent client. It supports magnet links as well. + +![Fragments – Torrent Client for GNOME Desktop][43] + +Here’s how to install. + +Best way to install is using Flatpak after [setting up the Flathub repo][16]. + +[Install as Flatpak][44] + + * [Home Page][45] + * [Source Code][46] + + + +#### MetadataCleaner – Clean metadata from various files + +Ever ran into a situation where you need to remove certain information from a file, such as created by, or created via software name. For example, if you have an image created in GIMP, the file contains a default text (unless you remove it) ‘Created by GIMP’. Or, an image may contain location details, time stamp, camera information and so on. And removing such information requires some specific application with additional hassles. + +MetedataCleaner application does just that. It helps you remove this information from files. When you open a file using this application, it reads and gives you a list of metadata. All you need to do is click the Clean button. And you have the cleaned file. Such a useful utility for GNOME. + +![Metadata Cleaner][47] + +Installation steps for this application present below. + +Best way to install is using Flatpak after [setting up the Flathub repo][16]. + +[Install as Flatpak][48] + + * [Home Page][49] + * [Source Code][50] + + + +#### Kooha – Screen Recorder + +If you are looking for a fast and simple screen recorder for GNOME desktop, then try Kooha. This application is one of the best GNOME apps that provides hassle-free recording experiences. This utility supports hardware acceleration, timer, multiple sources as input and many advanced features. Here’s a summary: + + * Option to select monitor for multiple display or any window + * Hardware accelerated encoding + * Option to record area of a screen + * Record mic and computer sound together + * Delay timer for records + * Support for WebM, mp4, gif, mkv file types + + + +![Kooha – Best Screen Recoder for GNOME][51] + +Here’s how to install. + +Best way to install is using Flatpak after [setting up the Flathub repo][16]. + +[Install as Flatpak][52] + + * [Home Page][53] + * [Source Code][54] + + + +#### Metronome – Repeat Beats + +The metronome, originally [an ancient device][55] which generates some audible short sound in a constant interval that beats per minute. This is useful for tasks where you need to maintain a consistent motion, activity and don’t lose focus to speed up or slow down. + +So, this GNOME App called Metronome is a software version of the device which can help you to maintain your activity and focus. This is specially used by musicians to practice playing in a regular interval to be consistent. + +![Metronome for GNOME][56] + +Here’s how to install. + +Best way to install is using Flatpak after [setting up the Flathub repo][16]. + +Then install via this [page][57]. + + * [Home Page][58] + * [Source Code][59] + + + +### Closing Notes + +So, there you have it – the list of 10 best GNOME apps to extend your desktop experience. Not only GNOME, you can use them in KDE Plasma or Xfce or any other desktop – thanks to Flatpak. I hope these apps for GNOME desktop becomes more popular and usage increases. + +What is your favorite GNOME App, let me know in the comment box below. + +Read the other parts via the following links. + +[Part 2][1] +[Part 3][2] +[Part 4][3] + +_Some Image Credits: Respective GNOME Apps_ + +* * * + +We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][60], [Twitter][61], [YouTube][62], and [Facebook][63] and never miss an update! + +##### Also Read + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2021/12/best-gnome-apps-part-1/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/2021/12/best-gnome-apps-part-2/ +[2]: https://www.debugpoint.com/2022/01/best-gnome-apps-part-3/ +[3]: https://www.debugpoint.com/2022/02/best-gnome-apps-part-4/ +[4]: tmp.SdvbWYqKsq#geary +[5]: tmp.SdvbWYqKsq#notejot +[6]: tmp.SdvbWYqKsq#hydrapaper +[7]: tmp.SdvbWYqKsq#solanum +[8]: tmp.SdvbWYqKsq#cawbird +[9]: tmp.SdvbWYqKsq#news-flash +[10]: tmp.SdvbWYqKsq#fragments +[11]: tmp.SdvbWYqKsq#metadata-cleaner +[12]: tmp.SdvbWYqKsq#kooha +[13]: tmp.SdvbWYqKsq#metronome +[14]: https://www.debugpoint.com/2019/06/best-email-client-linux-windows/ +[15]: https://www.debugpoint.com/wp-content/uploads/2021/12/Geary-Email-Client-for-GNOME.jpg +[16]: https://flatpak.org/setup/ +[17]: https://flathub.org/repo/appstream/org.gnome.Geary.flatpakref +[18]: https://wiki.gnome.org/Apps/Geary +[19]: https://gitlab.gnome.org/GNOME/geary +[20]: https://www.debugpoint.com/wp-content/uploads/2021/12/Stupidly-Simple-Note-Taking-App-Notejot.jpg +[21]: https://github.com/lainsce/notejot +[22]: https://www.debugpoint.com/wp-content/uploads/2021/12/Hydrapaper-Wallpaper-for-Multiple-Screens-1024x689.jpg +[23]: https://www.debugpoint.com/2021/01/install-yay-arch/ +[24]: https://flathub.org/apps/details/org.gabmus.hydrapaper +[25]: https://hydrapaper.gabmus.org/ +[26]: https://gitlab.gnome.org/gabmus/hydrapaper +[27]: https://en.wikipedia.org/wiki/Pomodoro_Technique +[28]: https://www.debugpoint.com/wp-content/uploads/2021/12/Solanum.jpg +[29]: https://dl.flathub.org/repo/appstream/org.gnome.Solanum.flatpakref +[30]: https://apps.gnome.org/app/org.gnome.Solanum/ +[31]: https://gitlab.gnome.org/World/Solanum +[32]: https://ibboard.co.uk/cawbird/ +[33]: https://corebird.baedert.org/ +[34]: https://www.debugpoint.com/wp-content/uploads/2021/12/Cawbird-A-Native-GNOME-App-for-Twitter.jpg +[35]: https://software.opensuse.org//download.html?project=home%3AIBBoard%3Acawbird&package=cawbird +[36]: https://flathub.org/apps/details/uk.co.ibboard.cawbird +[37]: https://snapcraft.io/cawbird +[38]: https://github.com/IBBoard/cawbird +[39]: https://www.debugpoint.com/wp-content/uploads/2021/12/News-Flash-One-of-the-best-GNOME-App-for-Managing-Feeds-1024x618.jpg +[40]: https://flathub.org/apps/details/com.gitlab.newsflash +[41]: https://apps.gnome.org/app/com.gitlab.newsflash/ +[42]: https://gitlab.com/news-flash/news_flash_gtk +[43]: https://www.debugpoint.com/wp-content/uploads/2021/12/Fragments-Torrent-Client-for-GNOME-Desktop.jpg +[44]: https://flathub.org/apps/details/de.haeckerfelix.Fragments +[45]: https://apps.gnome.org/app/de.haeckerfelix.Fragments/ +[46]: https://gitlab.gnome.org/World/Fragments +[47]: https://www.debugpoint.com/wp-content/uploads/2021/12/Metadata-Cleaner.jpg +[48]: https://flathub.org/apps/details/fr.romainvigier.MetadataCleaner +[49]: https://metadatacleaner.romainvigier.fr/ +[50]: https://gitlab.com/rmnvgr/metadata-cleaner/ +[51]: https://www.debugpoint.com/wp-content/uploads/2021/12/Kooha-Best-Screen-Recoder-for-GNOME.jpg +[52]: https://flathub.org/apps/details/io.github.seadve.Kooha +[53]: https://apps.gnome.org/app/io.github.seadve.Kooha/ +[54]: https://github.com/SeaDve/Kooha +[55]: https://en.wikipedia.org/wiki/Metronome +[56]: https://www.debugpoint.com/wp-content/uploads/2021/12/Metronome-for-GNOME.jpg +[57]: https://flathub.org/apps/details/com.adrienplazas.Metronome +[58]: https://apps.gnome.org/app/com.adrienplazas.Metronome/ +[59]: https://gitlab.gnome.org/World/metronome +[60]: https://t.me/debugpoint +[61]: https://twitter.com/DebugPoint +[62]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[63]: https://facebook.com/DebugPoint From 33bad75e3797e1c8bb96ce1d679bd1fc5ae3fb76 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 13 Feb 2022 05:02:32 +0800 Subject: [PATCH 269/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220212=20?= =?UTF-8?q?5=20levels=20of=20transparency=20for=20open=20source=20communit?= =?UTF-8?q?ies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220212 5 levels of transparency for open source communities.md --- ...ransparency for open source communities.md | 111 ++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 sources/tech/20220212 5 levels of transparency for open source communities.md diff --git a/sources/tech/20220212 5 levels of transparency for open source communities.md b/sources/tech/20220212 5 levels of transparency for open source communities.md new file mode 100644 index 0000000000..a2f7ae1545 --- /dev/null +++ b/sources/tech/20220212 5 levels of transparency for open source communities.md @@ -0,0 +1,111 @@ +[#]: subject: "5 levels of transparency for open source communities" +[#]: via: "https://opensource.com/article/22/2/transparency-open-source-communities" +[#]: author: "Emilio Galeano Gryciuk https://opensource.com/users/egaleano" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +5 levels of transparency for open source communities +====== +Open source community managers need to apply these 5 levels of +transparency to build a thriving open source community. +![Person in a field of dandelions][1] + +Managers of open source communities have to be aware of the 5 levels of transparency that they can provide. These 5 levels of transparency are important for building a thriving open source community.  + +This article describes each level, its goals, and why they are important. But first, I revisit why transparency is important for open source ecosystems. + +### Why do open source ecosystems need transparency? + + * Transparent communities inspire trust** **in each other, which greases the wheels of collaboration. + * Communities work together and exchange messages in the open. + * Open source work happens in a transparent way to avoid friction. + * Community managers need to report to their stakeholders. + * Showing communities what information is available about them is healthy and encourages trust. + + + +### What are the 5 levels of transparency? + +#### Transparency level 1: Publish source code + +This level is about releasing source code under an [Open Source Initiative (OSI)-approved license][2] in a public-facing version control system like [Git][3]. + +The first level's goal is to establish** **an open source project. + + * This level is self-evident as there would be no open source project without the source code. + * At the core of an open source project is the source code that people engage with—licensed under an OSI-approved license. + * A public version control system enables collaboration and allows everyone to analyze the project and understand the collaboration patterns. + + + +#### Transparency level 2: Publish community guidelines + +You publish documentation and resources on contributing at this level, and you organize special events to educate the community. + +The second level's goal is to create and grow a community for an open source project. + + * Building an active community requires more than** **just having a source code**.** + * Being transparent about how a project works and how to contribute enables others to join a project**.** + * Growing the community may involve** **running events and doing special activities for contributors. + + + +#### Transparency level 3: Celebrate successes + +Once you reach this level, it's important to share insights about the community and publish reports about the project's status. + +The third level's goal is to celebrate successes and secure further support** **beyond the initial phase of the community. + + * As open source communities grow, it becomes harder to know what's happening everywhere. + * Being transparent about the activities in the community helps community members know that their contributions are being seen and valued. + * At this level of transparency, the reporting and analytics** **are sporadic and without specific tooling.  + + + +#### Transparency level 4: Understand the pulse of the community + +This level is all about listening to the community—keeping an eye on the project's evolution in community activity and the software development process to take corrective actions. + +The fourth level's goal is to take the community to the next level by understanding its evolution and trajectory with consistency and scientific rigor. + + * Reporting mechanisms and analytics tools help keep an eye on what is happening. + * You can compare events in the community and the subsequent reactions of community members to a baseline and other events in the community. + * Deeper insights into the community are possible with consistent listening. + + + +#### Transparency level 5: Maintain the community long-term + +The last step is acting on community metrics and improving community engagement. + +The fifth level's goal is to make meaningful and impactful decisions about community engagement. + + * Have systems in place to** **react to changes** **in community metrics. + * Follow up on how changes to the community are showing up in the metrics and analytics about the community. + * Set "SLAs" and accountability for maintainers or developers to have goals for their community engagement and at a system level makes sure things get done. + + + +### Wrap up + +Open source community managers need to apply these 5 levels of transparency to build a thriving open source community. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/transparency-open-source-communities + +作者:[Emilio Galeano Gryciuk][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/egaleano +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_dandelion_520x292.png?itok=-xhFQvUj (Person in a field of dandelions) +[2]: https://opensource.org/licenses +[3]: https://opensource.com/tags/git From 7f0a9cc8ed1b15e2e5c30e2ba561d63b12350d62 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 13 Feb 2022 05:02:50 +0800 Subject: [PATCH 270/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220212=20?= =?UTF-8?q?How=20to=20Get=20KDE=20Plasma=205.24=20in=20Kubuntu=2021.10=20I?= =?UTF-8?q?mpish=20Indri?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md --- ...asma 5.24 in Kubuntu 21.10 Impish Indri.md | 162 ++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 sources/tech/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md diff --git a/sources/tech/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md b/sources/tech/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md new file mode 100644 index 0000000000..5624026332 --- /dev/null +++ b/sources/tech/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md @@ -0,0 +1,162 @@ +[#]: subject: "How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri" +[#]: via: "https://www.debugpoint.com/2022/02/kde-plasma-5-24-kubuntu-21-10/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri +====== +THE KDE DEVS ENABLED THE FAMOUS BACKPORTS PPA FOR YOU TO INSTALL/UPGRADE +TO KDE PLASMA 5.24 IN KUBUNTU 21.10. HERE’S HOW. +KDE Plasma 5.24 was [released][1] recently with exciting changes. You get a brand new overview screen with this new release, much like GNOME’s own overview. Also, a refreshed default Breeze theme, performance updates, tweaks to the notification looks and much more. Read more about the features at our [official round-up page here][2]. + +If you are in a hurry and have no time to read the article, here’s the brief set of commands that does the trick. 😃 + +``` + + sudo add-apt-repository ppa:kubuntu-ppa/backports + sudo apt update + sudo apt full-upgrade + +``` + +If you run Kubuntu 21.10 Impish Indri, you will not get this update out of the box. Because Kubuntu 21.10 Impish Indri currently have KDE Plasma 5.22.5 as a stable version. Although Kubuntu 21.10 is scheduled to end of life on July 2022, you can still install KDE Plasma 5.24 via the backports PPA. + +However, note that you will get KDE Plasma 5.24 in Kubuntu 22.04 LTS due on April 2022, much before Kubuntu 21.10 life ends. + +### Contents + + * [How to install KDE Plasma 5.24 in Kubuntu 21.10][3] + * [How to install KDE Plasma 5.24 in Ubuntu 21.10 alongside GNOME][4] + * [Can I install KDE Plasma 5.24 in Ubuntu 20.04 LTS?][5] + * [How to Uninstall][6] + + + +### How to Install KDE Plasma 5.24 in Kubuntu 21.10 + +Here’s how you can update your existing KDE Plasma in Kubuntu 21.10 to the latest version. + +#### How to install KDE Plasma 5.24 in Kubuntu 21.10 + +If you are comfortable with Discover, add the backports PPA `ppa:kubuntu-ppa/backports` as software sources and hit update. Then installation once updated package information are retrieved. + +I would recommend the following terminal method for faster and error-free installation. + + * Open Konsole and run the following command to add the backports PPA. If you fancy, you can verify what version of Plasma you are running. + + + +``` + + sudo add-apt-repository ppa:kubuntu-ppa/backports + +``` + +![Add the PPA][7] + +Now, refresh the package list and verify whether the latest 5.24 packages are available for upgrade. + +![Check the latest KDE Plasma 5.24 packages before upgrading][8] + +Now run the final command to kick off the upgrade. + +``` + + sudo apt full-upgrade + +``` + +The above command would download around 270 MB+ worth of packages. The upgrade process takes approximately 10 minutes. Once the command is complete, restart your system. + +[][2] + +SEE ALSO:   KDE Plasma 5.24 – Top New Features and Release Details + +And you should get the brand new KDE Plasma 5.24 with Kubuntu 21.10 Impish Indri. + +![KDE Plasma 5.24 in Kubuntu 21.10][9] + +#### How to install KDE Plasma 5.24 in Ubuntu 21.10 alongside GNOME + +If you are running Ubuntu 21.10 Impish Indri with default GNOME, you can also experience the brand new KDE Plasma desktop with just a minor modification of the above commands. + +Open a terminal and run the below commands in sequence. + +``` + + sudo add-apt-repository ppa:kubuntu-ppa/backpots + sudo apt update + sudo apt install kubuntu-desktop + +``` + +Once the above commands are complete, restart the system. And from the login screen, choose KDE Plasma as a desktop environment. And you are good to go. + +This will install the KDE Plasma 5.24 along with the GNOME desktop. + +#### Can I install KDE Plasma 5.24 in Ubuntu 20.04 LTS? + +Ubuntu 20.04 LTS edition has the earlier KDE Plasma 5.18, KDE Framework 5.68, KDE Applications 19.12.3. So, it would not receive the latest KDE Update during its entire lifecycle. So, technically you can add the above PPA and install the KDE Plasma 5.24. But I would not recommend it due to incompatible packages frameworks that may lead to an unstable system. + +So, it is recommended that you use either Kubuntu 21.10 with the above backports PPA Or use KDE Neon to experience the latest Plasma desktop. + +### How to Uninstall + +At any moment, if you would like to go back to the stock version of KDE Plasma desktop, then you can install ppa-purge and remove the PPA, followed by refreshing the package. + +Open a terminal and execute the following commands in sequence. + +``` + + sudo apt install ppa-purge + sudo ppa-purge ppa:kubuntu-ppa/backports + sudo apt update + +``` + +Once the above commands are complete, restart your system. + +### Closing Notes + +I hope this quick guide gives you comprehensive upgrade steps to KDE Plasma 5.24 from different use cases. Hopefully, you can complete the upgrade without any errors. + +Do let me know in the commend box below how it goes. + +Cheers. + +* * * + +We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][10], [Twitter][11], [YouTube][12], and [Facebook][13] and never miss an update! + +##### Also Read + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/02/kde-plasma-5-24-kubuntu-21-10/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://kde.org/announcements/plasma/5/5.24.0/ +[2]: https://www.debugpoint.com/2022/01/kde-plasma-5-24/ +[3]: tmp.iA5hKjVLOx#how-to-install-kde-plasma-5-24-in-kubuntu-21-10-1 +[4]: tmp.iA5hKjVLOx#how-to-install-kde-plasma-5-24-in-ubuntu-21-10-alongside-gnome +[5]: tmp.iA5hKjVLOx#can-i-install-kde-plasma-5-24-in-ubuntu-20-04-lts +[6]: tmp.iA5hKjVLOx#how-to-uninstall +[7]: https://www.debugpoint.com/wp-content/uploads/2022/02/Add-the-PPA.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/02/Check-the-latest-KDE-Plasma-5.24-packages-before-upgrade.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2022/02/KDE-Plasma-5.24-in-Kubuntu-21.10-1024x579.jpg +[10]: https://t.me/debugpoint +[11]: https://twitter.com/DebugPoint +[12]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[13]: https://facebook.com/DebugPoint From 51bb6913dac654a5fd9716f9a1040e0b6bb31f03 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 13 Feb 2022 05:03:04 +0800 Subject: [PATCH 271/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220212=20?= =?UTF-8?q?8=20Reasons=20Why=20I=20Keep=20Coming=20Back=20to=20Firefox?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220212 8 Reasons Why I Keep Coming Back to Firefox.md --- ...asons Why I Keep Coming Back to Firefox.md | 171 ++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 sources/news/20220212 8 Reasons Why I Keep Coming Back to Firefox.md diff --git a/sources/news/20220212 8 Reasons Why I Keep Coming Back to Firefox.md b/sources/news/20220212 8 Reasons Why I Keep Coming Back to Firefox.md new file mode 100644 index 0000000000..f39d4db6ca --- /dev/null +++ b/sources/news/20220212 8 Reasons Why I Keep Coming Back to Firefox.md @@ -0,0 +1,171 @@ +[#]: subject: "8 Reasons Why I Keep Coming Back to Firefox" +[#]: via: "https://news.itsfoss.com/why-mozilla-firefox/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +8 Reasons Why I Keep Coming Back to Firefox +====== + +Firefox is a fantastic open-source web browser. Considering it comes pre-installed with most Linux distributions, it does not take rocket science to assume that it is a popular choice among Linux users and privacy enthusiasts. + +However, nothing is ever perfect. + +Whether it is Mozilla Firefox, Google Chrome, Brave, or any of the [best browsers available for Linux][1]. Every option has a trade-off. + +I have been using Firefox for years now, but I recently switched to [Vivaldi][2] for its tab management feature and then tried Brave for a moment as well. + +But, all this time, I found myself constantly going back to Firefox and thinking about it all the time, while I was happy with another web browser (consider it to be a meme). + +So, why do I keep coming back to Firefox? Why do I think Mozilla Firefox is an ideal web browser for everyone? + +Here, let me highlight some pointers: + +### 1\. Privacy-Focused Solution + +![][3] + +Nowadays, every web browser (of course, except Google Chrome) aims to provide privacy-oriented features. + +You will get a variety of options with Brave, and even with Vivaldi. + +Note that this isn’t a feature comparison, but based on what I prefer/noticed. + +Brave lets you customize the tracking protection, but it does not offer a preset. You will find yourself tweaking the blocking protections to get the experience you want. But, Firefox lets you easily choose a “Standard” or “Strict” protection mode without needing to customize individual settings. + +When it comes to Vivaldi, it offers the ability to switch the type of tracking protection quickly, but it is not as good as Firefox. Furthermore, you do not get things like cross-site cookie blocking, and protection against cryptominers/fingerprinters. + +In addition to these subtle differences, Firefox keeps adding new options to its privacy protection offering. + +For instance, the HTTPS-Only mode eliminates the need for any extensions/add-ons that ensure that you connect to the HTTPS version of a page. + +### 2\. Simplified User Interface + +![][4] + +I know that I have complained a lot about Firefox constantly revamping its user interface. + +And, yes, that isn’t very pleasant. + +But, every time I get used to it, I find it a simple and effective user interface. I prefer to enable the dark theme. + +The recent updates have made it easier to access options, add-ons, themes, and more. + +Personally, it feels better than other browsers. + +Here’s to hoping that they do not continue their tradition of breaking the user experience with every major upgrade. + +### 3\. Open Source + +Mozilla Firefox is an open-source web browser. You already know it, but that is what makes it an outstanding choice over proprietary options like Chrome. + +Firefox is the first open-source web browser I tried after moving away from Google Chrome several years ago. + +### 4\. Firefox Multi-Account Containers + +![][5] + +[Firefox Multi-Account Containers][6] is one of the key highlights of Mozilla Firefox. + +It is one of the [best Firefox features][7] if you want to make the most out of your browsing experience without compromising privacy. + +You need to install the [Firefox Multi-Account add-on][8] to get started with it. + +The feature lets you open different browsing tabs isolated from each other. For instance, you can stay logged to two different accounts of the same service using this feature. You have available categories that include Personal, Work, Bank, and more. + +You can choose to create a new container or open your current tab as a container. It is also possible to automatically set a website to open in a new container. + +To take things up a notch, Firefox recently added the ability to enable Mozilla VPN for containers. This way, you can separately secure your browsing experience without enabling the VPN for the rest of the non-container tabs. + +While this may not be for everyone, it is a helpful feature. + +### 5\. Integrated Services + +![][9] + +It is always convenient to have built-in features and services that help enhance the user experience. + +With Firefox, you get various useful tools that you can access quickly. + +The tools include: + + * Save to Pocket button in the address bar to quickly add a webpage/link to read later. + * Mozilla’s [VPN service][10]. + * [Firefox Relay][11] to protect your original email address. + * [Firefox Monitor][12] to notify you of data breaches. + * And, the password manager, if you use it. + + + +### 6\. Active Development + +With every Firefox release, you find some valuable upgrades and improvements. + +Of course, you should expect the same with every major web browser. But, if you are using a less-known browser for its features, you might want to keep an eye on the frequency of updates/development. + +It is important to have security fixes, bug fixes, and other improvements as soon as possible for a secure experience. + +### 7\. Just Works! + +![][13] + +In my case, I prefer convenience over the latest and greatest. + +Even though Firefox manages to offer some industry-first features, it remains a convenient option. + +Having a Firefox account synced to all your browsing data and integrated services is beneficial. You can easily log in to the account on any other device to seamlessly continue your work. + +With Brave, you do have the sync feature, but it does not work the same way. It requires you to have the primary device present to successfully sync the data to another device (considering you’re scanning the QR code). + +Alternatively, you can choose to generate the sync code and keep it with you to sync with a new device But, I find the account-based sync more convenient. + +While Vivaldi offers the account-sync feature, it does not work well with my multi-monitor setup. The buttons become unresponsive, and I also fail to successfully sync after [Vivaldi 5.1 release][14]. + +So, Firefox becomes a hassle-free and convenient option. + +### 8\. Fight Against Browser Monopoly + +Last year, we reported that [Firefox lost almost 50 million users][15], making it a big concern for users who still prefer a solid offering not based on Chromium. + +Technically, we do have Firefox forks and a few other [open-source browsers][16]. But, we need Firefox to hold its position to have a viable Chromium alternative. + +### Wrapping Up + +I should mention that I stick to Firefox because it fits my use-case and workflow. + +You don’t have to take my word for it. But, at least, if you never considered these as benefits of using Firefox, you might want to give it a try! + +_What do you think about Mozilla Firefox? Mind telling us about your favorite browser? Let’s talk in the comments below._ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/why-mozilla-firefox/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-browsers-ubuntu-linux/ +[2]: https://itsfoss.com/install-vivaldi-ubuntu-linux/ +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjY2NCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUwOCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9Ijc0NyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[6]: https://itsfoss.com/firefox-containers/ +[7]: https://itsfoss.com/firefox-useful-features/ +[8]: https://addons.mozilla.org/en-US/firefox/addon/multi-account-containers/ +[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9Ijc1OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[10]: https://www.mozilla.org/en-US/products/vpn/ +[11]: https://relay.firefox.com +[12]: https://monitor.firefox.com/ +[13]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ2OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[14]: https://news.itsfoss.com/vivaldi-5-1-release/ +[15]: https://news.itsfoss.com/firefox-decline/ +[16]: https://itsfoss.com/open-source-browsers-linux/ From 73536a5d76b5dc016c22b14b2c0e3492237d0f6b Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 13 Feb 2022 08:37:01 +0800 Subject: [PATCH 272/334] Rename sources/tech/20220212 5 levels of transparency for open source communities.md to sources/talk/20220212 5 levels of transparency for open source communities.md --- ...220212 5 levels of transparency for open source communities.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20220212 5 levels of transparency for open source communities.md (100%) diff --git a/sources/tech/20220212 5 levels of transparency for open source communities.md b/sources/talk/20220212 5 levels of transparency for open source communities.md similarity index 100% rename from sources/tech/20220212 5 levels of transparency for open source communities.md rename to sources/talk/20220212 5 levels of transparency for open source communities.md From a0ed1ff01566d48bfe012be322f67971977d53f7 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 13 Feb 2022 08:40:14 +0800 Subject: [PATCH 273/334] Rename sources/news/20220212 8 Reasons Why I Keep Coming Back to Firefox.md to sources/talk/20220212 8 Reasons Why I Keep Coming Back to Firefox.md --- .../20220212 8 Reasons Why I Keep Coming Back to Firefox.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{news => talk}/20220212 8 Reasons Why I Keep Coming Back to Firefox.md (100%) diff --git a/sources/news/20220212 8 Reasons Why I Keep Coming Back to Firefox.md b/sources/talk/20220212 8 Reasons Why I Keep Coming Back to Firefox.md similarity index 100% rename from sources/news/20220212 8 Reasons Why I Keep Coming Back to Firefox.md rename to sources/talk/20220212 8 Reasons Why I Keep Coming Back to Firefox.md From bf962c5f0a1f74b97927cff94c27933a053f0fd6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 13 Feb 2022 10:02:20 +0800 Subject: [PATCH 274/334] ALL @wxy https://linux.cn/article-14267-1.html --- ...s That Make GNOME 42 an Awesome Release.md | 150 ++++++++++++++++++ ...s That Make GNOME 42 an Awesome Release.md | 145 ----------------- 2 files changed, 150 insertions(+), 145 deletions(-) create mode 100644 published/20220208 7 New Features That Make GNOME 42 an Awesome Release.md delete mode 100644 sources/news/20220208 7 New Features That Make GNOME 42 an Awesome Release.md diff --git a/published/20220208 7 New Features That Make GNOME 42 an Awesome Release.md b/published/20220208 7 New Features That Make GNOME 42 an Awesome Release.md new file mode 100644 index 0000000000..fa3efb7bd8 --- /dev/null +++ b/published/20220208 7 New Features That Make GNOME 42 an Awesome Release.md @@ -0,0 +1,150 @@ +[#]: subject: "7 New Features That Make GNOME 42 an Awesome Release" +[#]: via: "https://news.itsfoss.com/gnome-42-features/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14267-1.html" + +值得关注的 GNOME 42 的 7 个新特色 +====== + +> GNOME 42 是一个令人激动的版本,它将应用程序移植到了 GTK 4,还有一个新的暗色风格偏好。你觉得怎么样? + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-ft.jpg?w=1200&ssl=1) + +GNOME 42 将是一个值得关注的版本。 + +它包括明显的视觉变化和对桌面体验的改进。当然,[GNOME 41][1] 中的变化所赢得的赞誉也适用于新版本。 + +GNOME 42 将于 2022 年 3 月 23 日发布,但它快到测试阶段了(计划于 2022 年 2 月 12 日)。 + +因此,让我们来看看在最终版本中你应该看到的变化。 + +你可以期待在 Fedora 36 工作站和 [Ubuntu 22.04 LTS][2] 中看到 GNOME 42。 + +### GNOME 42 有什么新变化? + +请注意,GNOME 42 还没有完全就绪。因此,到下个月的正式宣布前,我们可以期待更多关于新功能和变化的细节。而且,我们将确保在这时更新文章。 + +#### 1、系统级的暗色风格偏好 + +![][3] + +与 elementary OS 团队为 [elementary OS 6][4] 所做的努力类似,GNOME 开发者也为实现系统级的暗色模式做出了努力。 + +在我们的 [最初报道][5] 中,我们提到了为什么 GNOME 计划跟随 elementary OS 添加一个暗色风格的偏好。 + +你可以在系统设置中的外观菜单下找到切换主题的选项。你在改变背景时,也可以通过右键菜单访问它。 + +#### 2、文件夹图标主题更新 + +尽管 GNOME 专注于提供现代的桌面体验,但原来的文件夹图标看起来已经过时。 + +随着 GNOME 42 和对于新的文件夹图标主题的 [一些讨论][6] ,他们最终确定了一个蓝灰色的梯度设计。 + +![][19] + +下面是它在浅色主题下的样子: + +![][7] + +#### 3、GTK 4 和 libadwaita + +GNOME 41 引入了 [libadwaita][8],旨在推动 GNOME 应用程序的用户体验改变。 + +当然,这也意味着开发者要做更多的工作,但到目前为止,移植到 GTK 4 的过程很顺利,而且情况应该会在 GNOME 42 中变得更好。 + +当许多应用程序正在为 GNOME 42 做准备时,你会发现像 [Fragments 2.0][9] 这样的软件已经准备好为你提供漂亮的用户体验。 + +在这一点上,几乎所有的 GNOME 应用程序似乎都在 UI 方面取得了进步。 + +总的来说,按钮、图标、圆角和细微的视觉变化都反映了这些改进。 + +#### 4、改造后的系统设置 + +从功能上看,系统设置没有变化,但视觉上的差异是明显的。 + +![][10] + +你应该发现用户界面更干净、更现代、更有美感。从技术上讲,由于移植到了GTK 4,维护它有技术上的好处,但你不必担心找不到选项,都是一样的。 + +#### 5、GNOME 文本编辑器 + +![][11] + +Gedit 将被 GNOME 的新文本编辑器所取代,它支持新的功能和主题设计。 + +虽然我们已经 [在我们的早期报道中讨论了它的功能][12],但它的测试版似乎已经准备好了,准备进入表演时间了。 + +#### 6、对截屏用户界面和本地录屏的改进 + +[GNOME 截屏][13] 应用程序目前提供了一个简单的 GUI,帮助你对整个屏幕、一个区域或一个窗口进行截屏。 + +在 GNOME 42 中,它的用户界面得到了一些重大的改变,包括录制屏幕的能力。 + +![][14] + +不仅仅是新功能,通过其新的用户界面,你可以轻松地在截屏或录屏之间切换。 + +它看起来很棒,你觉得呢? + +#### 7、夜间/白天的墙纸 + +![][15] + +默认壁纸是蓝色背景,如上面的截图所示。然而,你会注意到一个紫色的变体壁纸,它按时间(白天结束时)启动。 + +下面是壁纸的夜间变体的样子: + +![][16] + +#### 其他改进 + +除了上述改进,GNOME 42 还包括性能调整和错误修复。 + +从 GNOME Shell 到核心应用程序,所有的东西都得到了微小的修复。 + +不要忘了,许多第三方项目已经为 GNOME 42 进行了改进,你应该会很高兴看到他们的成果。 + +### 下载 GNOME 42 + +你可以使用 Boxes 运行 [GNOME OS][17] 来测试 GNOME 42 的最新夜间构建版本。到目前为止,这是测试最新功能/变化的唯一方法。 + +- [GNOME 42][18] + +如果你不想体验测试版,那你可能想等待 Ubuntu 22.04 LTS 或 Fedora 36 为你的桌面加入 GNOME 42。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/gnome-42-features/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/gnome-41-release/ +[2]: https://itsfoss.com/ubuntu-22-04-release-features/ +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-dark-style.jpg?w=1400&ssl=1 +[4]: https://news.itsfoss.com/elementary-os-6-features/ +[5]: https://news.itsfoss.com/gnome-42-dark-style-preference/ +[6]: https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/merge_requests/38 +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-file-manager-light.jpg?resize=1568%2C1017&ssl=1 +[8]: https://aplazas.pages.gitlab.gnome.org/blog/blog/2021/03/31/introducing-libadwaita.html +[9]: https://news.itsfoss.com/fragments-2-0-release/ +[10]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-settings-gtk4.jpg?resize=1568%2C1050&ssl=1 +[11]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-text-editor-alpha.jpg?w=1480&ssl=1 +[12]: https://news.itsfoss.com/gnome-text-editor-to-replace-gedit/ +[13]: https://itsfoss.com/using-gnome-screenshot-tool/ +[14]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-screenshot.jpg?w=1340&ssl=1 +[15]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-day-wallpaper.jpg?w=1500&ssl=1 +[16]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-night-wallpaper.jpg?w=1500&ssl=1 +[17]: https://itsfoss.com/gnome-os/ +[18]: https://os.gnome.org +[19]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-file-manager-dark.jpg?resize=1568%2C1002&ssl=1 \ No newline at end of file diff --git a/sources/news/20220208 7 New Features That Make GNOME 42 an Awesome Release.md b/sources/news/20220208 7 New Features That Make GNOME 42 an Awesome Release.md deleted file mode 100644 index ed0ef6196b..0000000000 --- a/sources/news/20220208 7 New Features That Make GNOME 42 an Awesome Release.md +++ /dev/null @@ -1,145 +0,0 @@ -[#]: subject: "7 New Features That Make GNOME 42 an Awesome Release" -[#]: via: "https://news.itsfoss.com/gnome-42-features/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -7 New Features That Make GNOME 42 an Awesome Release -====== - -GNOME 42 will be an interesting release. - -It includes noticeable visual changes and improvements to the desktop experience. Of course, the changes in [GNOME 41][1] compliments the new release as well. - -GNOME 42 is due on March 23, 2022, but it has almost reached beta (scheduled for February 12, 2022). - -So, let us take a look at the changes that you should see in the final release. - -You can expect to see GNOME 42 with Fedora 36 Workstation and [Ubuntu 22.04 LTS][2]. - -### GNOME 42: What’s New? - -Note that GNOME 42 is not generally available for all. So, with the official announcement next month, we can expect more details about the new features and changes. And, we shall make sure to update the article when that happens. - -#### 1\. System-wide Dark Style Preference - -![][3] - -Similar to the efforts by the elementary OS team for [elementary OS 6][4], GNOME developers have made efforts to implement a system-wide dark mode. - -In our [original coverage][5], we mentioned more about why GNOME plans to follow elementary OS to add a dark style preference. - -You can find the option to switch the theme in the system settings under the appearance menu. It can also be accessed through the right-click menu when trying to change the background. - -#### 2\. Folder Icon Theme Update - -Even though GNOME focuses on providing a modern desktop experience, the original folder icons looked dated. - -With GNOME 42 and [some debate][6] for a new folder icon theme, they finally settled with a Blueish-gradient design. - -![][3] - -Here’s how it looks with the light theme: - -![][7] - -#### 3\. GTK 4 and libadwaita - -GNOME 41 introduced [libadwaita][8] that aims to evolve the user experience for GNOME applications. - -Of course, this also meant more work for developers, but the porting process to GTK 4 is going good so far and the situation should get better with GNOME 42. - -While many applications are gearing up for GNOME 42, you will find options like [Fragments 2.0][9] ready to provide you a pretty user experience. - -At this point, almost every GNOME app seems to have made the progress in terms of UI. - -Overall, the buttons, icons, rounded corners, and subtle visual changes reflect the improvements. - -#### 4\. Revamped System Settings - -The system settings remain the same, functionally, but the visual difference is noticeable. - -![][10] - -You should find the user interface cleaner, modern, and aesthetically pleasing. Technically, with the port to GTK 4, there are technical benefits to maintain it, but you do not have to worry about finding the options, it’s all the same. - -#### 5\. GNOME Text Editor - -![][11] - -Gedit will be replaced by GNOME’s new text editor that supports new features and theming. - -While we already [discussed its features in our ea][12][r][12][ly coverage][12], it seems as if it’s ready for prime time with its beta version. - -#### 6\. Improvements to the Screenshot UI and Native Screen Recording - -The [GNOME screenshot][13] app is currently a simple GUI to help you take screenshots of an entire screen, a region, or a window. - -With GNOME 42, the user interface has received some major changes, including the ability to record the screen. - -![][14] - -Not just the new feature, but with its new UI, you can easily switch between taking a screenshot or record the screen. - -It looks great, what do you think? - -#### 7\. Wallpapers for Night/Day - -![][15] - -The default wallpaper is a blue background, as shown in the screenshot above. However, you will notice a purple variant of the wallpaper that kicks in as per the time (when the day ends). - -Here’s what the night variant of the wallpapers looks like: - -![][16] - -#### Other Improvements - -In addition to the improvements mentioned, GNOME 42 also includes performance tweaks and bug fixes. - -Starting from the GNOME Shell to the core apps, everything received minor fixes. - -Not to forget, numerous third-party projects have made improvements for GNOME 42. So, it should excite to see what they come up with. - -### Download GNOME 42 - -You can use [GNOME OS][17] using Boxes to test the latest nightly build of GNOME 42. As of now, that’s the only way to test the latest features/changes. - -[GNOME 42][18] - -If you want to avoid testing it, you might want to wait for Ubuntu 22.04 LTS or Fedora 36 to include GNOME 42 for your desktop. - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/gnome-42-features/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://news.itsfoss.com/gnome-41-release/ -[2]: https://itsfoss.com/ubuntu-22-04-release-features/ -[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ5OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[4]: https://news.itsfoss.com/elementary-os-6-features/ -[5]: https://news.itsfoss.com/gnome-42-dark-style-preference/ -[6]: https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/merge_requests/38 -[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUwNiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[8]: https://aplazas.pages.gitlab.gnome.org/blog/blog/2021/03/31/introducing-libadwaita.html -[9]: https://news.itsfoss.com/fragments-2-0-release/ -[10]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUyMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[11]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU3NiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[12]: https://news.itsfoss.com/gnome-text-editor-to-replace-gedit/ -[13]: https://itsfoss.com/using-gnome-screenshot-tool/ -[14]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjcyOCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[15]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMxOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[16]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI2NSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[17]: https://itsfoss.com/gnome-os/ -[18]: https://os.gnome.org From 4bcbd9a94adf0eccd0f8c1475e8bf299a19f3f4c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 13 Feb 2022 15:46:28 +0800 Subject: [PATCH 275/334] RP @geekpi https://linux.cn/article-14268-1.html --- ... to make your Wordle results accessible.md | 46 +++++++------------ 1 file changed, 16 insertions(+), 30 deletions(-) rename {translated/tech => published}/20220130 Open source tools to make your Wordle results accessible.md (65%) diff --git a/translated/tech/20220130 Open source tools to make your Wordle results accessible.md b/published/20220130 Open source tools to make your Wordle results accessible.md similarity index 65% rename from translated/tech/20220130 Open source tools to make your Wordle results accessible.md rename to published/20220130 Open source tools to make your Wordle results accessible.md index 6a15decea7..86458cde2d 100644 --- a/translated/tech/20220130 Open source tools to make your Wordle results accessible.md +++ b/published/20220130 Open source tools to make your Wordle results accessible.md @@ -3,14 +3,16 @@ [#]: author: "AmyJune Hineline https://opensource.com/users/amyjune" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14268-1.html" -让你的 Wordle 结果无障碍的开源工具 +无障碍分享你的 Wordle 结果的开源工具 ====== -分享你的 Wordle 结果是有趣的。 尝试这些开源技巧让他们无障碍。 -![Women in computing and open source v5][1] + +> 分享你的 Wordle 结果是有趣的。尝试这些开源技巧让它们可以无障碍分享。 + +![](https://img.linux.net.cn/data/attachment/album/202202/13/154452or9r33xjtzrjoj6b.jpg) Wordle 似乎在社交媒体上到处出现。Wordle 是一个快速的文字游戏,你可以每天玩一次,你可以很容易地通过社交媒体与朋友分享结果。 @@ -18,57 +20,41 @@ Wordle 的目的是猜测一个秘密单词。要进行猜测,需要输入一 ![Sample of wordle results displaying colors for letter position][2] -AmyJune Hineline (CC BY-SA 4.0) - -人们通过将产生的字母网格粘贴到社交媒体上来分享他们在游戏中的进展,这很容易做到,因为这个网格只是一个[一组表情符号][3]。然而,表情符号和 emoji 有无障碍问题。虽然它们很容易复制和粘贴,但对于生活在低视力或色盲的人来说,共享的结果可能很难获得。灰色、黄色、绿色的颜色对一些人来说可能很难区分。 +人们通过将产生的字母网格粘贴到社交媒体上来分享他们在游戏中的进展,这很容易做到,因为这个网格只是 [一组表情符号][3]。然而,表情图标和表情符存在无障碍问题。虽然它们很容易复制和粘贴,但对于生活在低视力或色盲的人来说,共享的结果可能很难看清。灰色、黄色、绿色的颜色对一些人来说可能很难区分。 ![Wordle results statistics][4] -AmyJune Hineline (CC BY-SA 4.0) - 受到与 Mike Lim 谈话的启发,我在互联网上做了一些探究,发现了一些提示,包括一个帮助改善共享游戏结果的无障碍性的开源项目。 ### 使用一个开源的无障碍应用 -[wa11y 应用][5]的使用很简单。你可以在[这里][6]找到 wa11y GitHub 项目。复制你的 Wordle 结果并将其粘贴到应用中,它就会将你的结果转换为文字。 +[wa11y 应用][5] 的使用很简单。你可以在 [这里][6] 找到 wa11y GitHub 项目。复制你的 Wordle 结果并将其粘贴到应用中,它就会将你的结果转换为文字。 ![Emoji converted to words][7] -AmyJune Hineline (CC BY-SA 4.0) - -你可以包含带有简单复选框的表情符号来表示成功猜测,但维护人员对此提出警告。辅助技术非常喜欢表情符号,以至于它会读取每一个表情符号。内联所有。尽管技术喜欢阅读它们,但使用辅助技术的人可能会发现它很麻烦,并经常放弃有几个以上的表情符号的信息。 +你可以简单地勾选复选框来包含表情符号,以表示成功猜测,但该项目维护者不建议这样做。辅助技术非常喜欢表情符号,以至于它会读取每一个表情符号。内联地、全部读取。尽管技术圈喜欢阅读它们,但使用辅助技术的人可能会发现它很麻烦,并经常放弃有几个以上的表情符号的信息。 ![Words and emoji included in the output][8] -AmyJune Hineline (CC BY-SA 4.0) - ![Emojis are beautiful, but can be frustrating for folks who use screen readers and other accessibility tools. Please consider your audience on social media.][9] -AmyJune Hineline (CC BY-SA 4.0) - ### 提供无障碍图片 -也许你不能使用 wal11y 应用,但仍然想确保你的结果是可访问的。你可以进行截图,上传图片,并添加替代文本。你有几种方法可以做到这一点: +也许你不能使用 wa11y 应用,但仍然想确保你的结果是无障碍访问的。你可以进行截图,上传图片,并添加替代文本。你有几种方法可以做到这一点: * 附上图片,并在信息栏中写上替代文本。 * 附上图片并深入到你的特定社交媒体应用的无障碍选项中,启用替代文本并从那里添加。开源社交网络 [Mastodon][10] 默认启用实际的替代文本。 - * [@AltTxtReminder][11] 是一个你可以关注的账户,当你忘记时,它会提醒你为图片添加alt文本。 + * [@AltTxtReminder][11] 是一个你可以关注的账户,当你忘记时,它会提醒你为图片添加替代文本。 - - -如果你分享了默认结果,你总是可以选择在表情符号之前添加替代文本。这样,你的听众就可以获得文字信息,但在重复表情符号变得繁琐之前,可以中止信息的其余部分。 +如果你分享了默认结果,你总是可以选择在表情符号之前添加替代文本。这样,你的受众就可以获得文字信息,但在重复的表情符号变得繁琐之前,可以中止信息的其余部分。 ![Twitter wordle results without text][12] -AmyJune Hineline (CC BY-SA 4.0) - ![Twitter results with descriptive explanation of results][13] -AmyJune Hineline (CC BY-SA 4.0) - ### 总结 -Wordle 是最近互联网上的一个热门游戏,所以在分享你的结果时,一定要记住无障碍。有一些使用开源技术的简单方法可以使你的结果更容易与大家分享。 +Wordle 是最近互联网上的一个热门游戏,所以在分享你的结果时,一定要记住无障碍分享。有一些使用开源技术的简单方法可以使你的结果更容易与大家分享。 -------------------------------------------------------------------------------- @@ -77,7 +63,7 @@ via: https://opensource.com/article/22/1/open-source-accessibility-wordle 作者:[AmyJune Hineline][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 8431af2d9df1630816661c39b866ddba0cf66db6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 14 Feb 2022 00:00:33 +0800 Subject: [PATCH 276/334] ALL @wxy https://linux.cn/article-14270-1.html --- ...cters I love to use on the command line.md | 104 +++++++++++++++ ...cters I love to use on the command line.md | 124 ------------------ 2 files changed, 104 insertions(+), 124 deletions(-) create mode 100644 published/20220209 6 Linux metacharacters I love to use on the command line.md delete mode 100644 sources/tech/20220209 6 Linux metacharacters I love to use on the command line.md diff --git a/published/20220209 6 Linux metacharacters I love to use on the command line.md b/published/20220209 6 Linux metacharacters I love to use on the command line.md new file mode 100644 index 0000000000..382d039538 --- /dev/null +++ b/published/20220209 6 Linux metacharacters I love to use on the command line.md @@ -0,0 +1,104 @@ +[#]: subject: "6 Linux metacharacters I love to use on the command line" +[#]: via: "https://opensource.com/article/22/2/metacharacters-linux" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14270-1.html" + +我喜欢在 Linux 命令行中使用的 6 个元字符 +====== + +> 在 Linux 命令行上使用元字符是提高生产力的一个好方法。 + +![](https://img.linux.net.cn/data/attachment/album/202202/13/235915kbphrm6ld6yi2hud.jpg) + +在我的 Linux 之旅的早期,我学会了如何使用命令行。这就是 Linux 的与众不同之处。我可以失去图形用户界面(GUI),但没有必要完全重建机器。许多 Linux 电脑是无头headless运行的,你可以在命令行上完成所有的管理任务。它使用许多所有人都熟悉的基本命令,如 `ls`、`ls-l`、`ls-l`、`cd`、`pwd`、`top` 等等。 + +### Linux 上的 Shell 元字符 + +你可以通过使用元字符来扩展这些命令。我不知道你怎么称呼它们,但这些元字符使我的生活变得更轻松。 + +### 管道符 | + +假设我想知道我的系统上运行的 Firefox 的所有实例。我可以使用带有 `-ef` 参数的 `ps` 命令来列出我系统上运行的所有程序实例。现在我想只看那些涉及 Firefox 的实例。我使用了我最喜欢的元字符之一,管道符 `|`,将其结果送到 `grep`,用它来搜索模式: + +``` +$ ps -ef | grep firefox +``` + +### 输出重定向 > + +另一个我最喜欢的元字符是输出重定向 `>`。我用它来打印 `dmesg` 命令结果中所有 AMD 相关的结果。你可能会发现这在硬件故障排除中很有帮助: + +``` +$ dmesg | grep amd > amd.txt +$ cat amd.txt +[ 0.897] amd_uncore: 4 amd_df counters detected +[ 0.897] amd_uncore: 6 amd_l3 counters detected +[ 0.898] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank). +``` + +### 星号 * + +星号 `*`(通配符)是寻找具有相同扩展名的文件时我的最爱,如 `.jpg` 或 `.png`。我首先进入我的系统中的 `Picture` 目录,并使用类似以下的命令: + +``` +$ ls *.png +BlountScreenPicture.png +DisplaySettings.png +EbookStats.png +StrategicPlanMenu.png +Screenshot from 01-24 19-35-05.png +``` + +### 波浪号 ~ + +波浪号 `~` 是在 Linux 系统上通过输入以下命令快速返回你的家目录的一种方法: + +``` +$ cd ~ +$ pwd +/home/don +``` + +### 美元符号 $ + +`$` 符号作为一个元字符有不同的含义。当用于匹配模式时,它意味着任何以给定字符串结尾的字符串。例如,当同时使用元字符 `|` 和 `$` 时: + +``` +$ ls | grep png$ +BlountScreenPicture.png +DisplaySettings.png +EbookStats.png +StrategicPlanMenu.png +Screenshot from 01-24 19-35-05.png +``` + +### 上尖号 ^ + +符号 `^` 将结果限制在以给定字符串开始的项目上。例如,当同时使用元字符 `|` 和 `^` 时: + +``` +$ ls | grep ^Screen +Screenshot from 01-24 19-35-05.png +``` + +这些元字符中有许多是通往 [正则表达式][2] 的大门,所以还有很多东西可以探索。你最喜欢的 Linux 元字符是什么,它们是如何节省你的工作的? + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/metacharacters-linux + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background) +[2]: https://opensource.com/article/18/5/getting-started-regular-expressions diff --git a/sources/tech/20220209 6 Linux metacharacters I love to use on the command line.md b/sources/tech/20220209 6 Linux metacharacters I love to use on the command line.md deleted file mode 100644 index 3e43761c84..0000000000 --- a/sources/tech/20220209 6 Linux metacharacters I love to use on the command line.md +++ /dev/null @@ -1,124 +0,0 @@ -[#]: subject: "6 Linux metacharacters I love to use on the command line" -[#]: via: "https://opensource.com/article/22/2/metacharacters-linux" -[#]: author: "Don Watkins https://opensource.com/users/don-watkins" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -6 Linux metacharacters I love to use on the command line -====== -Using metacharacters on the Linux command line is a great way to enhance -productivity. -![Terminal command prompt on orange background][1] - -Early in my Linux journey, I learned how to use the command line. It's what sets Linux apart. I could lose the graphical user interface (GUI), but it was unnecessary to rebuild the machine completely. Many Linux computers run headless, and you can accomplish all the administrative tasks on the command line. It uses many basic commands that all are familiar with—like `ls`, `ls-l`, `ls-l`, `cd`, `pwd`, `top`, and many more. - -### Shell metacharacters on Linux - -You can extend each of those commands through the use of metacharacters. I didn't know what you called them, but metacharacters have made my life easier. - -### Pipe | - -Say that I want to know all the instances of Firefox running on my system. I can use the `ps` command with an `-ef` to list all instances of the programs running on my system. Now I'd like to see just those instances where Firefox is involved. I use one of my favorite metacharacters, the pipe `|` the result to `grep`, which searches for patterns.  - - -``` -`$ ps -ef | grep firefox ` -``` - -### Output redirection > - -Another favorite metacharacter is the output redirection `>`. I use it to print the results of all the instances that Intel mentioned as a result of a `dmesg` command. You may find this helpful in hardware troubleshooting.  - - -``` - - -$ dmesg | grep amd > amd.txt -$ cat amd.txt -[ 0.897] amd_uncore: 4 amd_df counters detected -[ 0.897] amd_uncore: 6 amd_l3 counters detected -[ 0.898] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank). - -``` - -### Asterisk * - -The asterisk `*` or wildcard is a favorite when looking for files with the same extension—like `.jpg` or `.png`. I first change into the `Picture` directory on my system and use a command like the following:  - - -``` - - -$ ls *.png -BlountScreenPicture.png -DisplaySettings.png -EbookStats.png -StrategicPlanMenu.png -Screenshot from 01-24 19-35-05.png - -``` - -### Tilde ~ - -The tilde `~` is a quick way to get back to your home directory on a Linux system by entering the following command:  - - -``` - - -$ cd ~ -$ pwd -/home/don - -``` - -### Dollar symbol $ - -The `$` symbol as a metacharacter has different meanings. When used to match patterns, it means any string that ends with a given string. For example, when using both metacharacters `|` and `$`:  - - -``` - - -$ ls | grep png$ -BlountScreenPicture.png -DisplaySettings.png -EbookStats.png -StrategicPlanMenu.png -Screenshot from 01-24 19-35-05.png - -``` - -### Carat ^ - -The `^` symbol restricts results to items that start with a given string. For example, when using both metacharacters `|` and `^`:  - - -``` - - -$ ls | grep ^Screen -Screenshot from 01-24 19-35-05.png - -``` - -Many of these metacharacters are a gateway to [regular expressions][2], so there's a lot more to explore. What are your favorite Linux metacharacters, and how are they saving your work? - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/2/metacharacters-linux - -作者:[Don Watkins][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background) -[2]: https://opensource.com/article/18/5/getting-started-regular-expressions From 4186424ebbe23eb269c90e6177f78ecf88dbbe83 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Mon, 14 Feb 2022 00:07:29 +0800 Subject: [PATCH 277/334] Update identify.sh --- scripts/check/identify.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/check/identify.sh b/scripts/check/identify.sh index baa250c179..bac66fb274 100644 --- a/scripts/check/identify.sh +++ b/scripts/check/identify.sh @@ -69,6 +69,15 @@ rule_published_translation_revised() { && [ "$TOTAL" -eq 1 ] && echo "匹配规则:校对已发布译文" } +# 一步翻译发布 +rule_onestep() { + [ "$SRC_D" -eq 1 ] && [ "$PUB_A" -eq 1 ] \ + && ensure_identical SRC D PUB A \ + && check_category SRC D \ + && check_category PUB A \ + && [ "$TOTAL" -eq 2 ] && echo "匹配规则:一步翻译发布" +} + # 定义常见错误 # 未知错误 From 510f3d4f3befac29ccdecbf8400971f77ab2b39a Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Mon, 14 Feb 2022 00:10:30 +0800 Subject: [PATCH 278/334] Update identify.sh --- scripts/check/identify.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/check/identify.sh b/scripts/check/identify.sh index bac66fb274..06fb204b32 100644 --- a/scripts/check/identify.sh +++ b/scripts/check/identify.sh @@ -106,6 +106,7 @@ do_check() { || rule_translation_revised \ || rule_translation_published \ || rule_published_translation_revised \ + || rule_onestep \ || { error_translation_requested_multiple \ || error_translation_completed_multiple \ From 0b9f521be77ae976ab806a54f0e16fc7e3d63310 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 14 Feb 2022 05:02:29 +0800 Subject: [PATCH 279/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220214=20?= =?UTF-8?q?10=20Open=20Source=20Lightweight=20Web=20Browsers=20for=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220214 10 Open Source Lightweight Web Browsers for Linux.md --- ...urce Lightweight Web Browsers for Linux.md | 218 ++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 sources/tech/20220214 10 Open Source Lightweight Web Browsers for Linux.md diff --git a/sources/tech/20220214 10 Open Source Lightweight Web Browsers for Linux.md b/sources/tech/20220214 10 Open Source Lightweight Web Browsers for Linux.md new file mode 100644 index 0000000000..30913dc0a2 --- /dev/null +++ b/sources/tech/20220214 10 Open Source Lightweight Web Browsers for Linux.md @@ -0,0 +1,218 @@ +[#]: subject: "10 Open Source Lightweight Web Browsers for Linux" +[#]: via: "https://itsfoss.com/lightweight-web-browsers-linux/" +[#]: author: "Marco Carmona https://itsfoss.com/author/marco/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +10 Open Source Lightweight Web Browsers for Linux +====== + +There are [plenty of web browsers available for Linux][1]. A lot of them are based on [Chromium][2] but we also have a list of [browsers that are not based on Chromium][3]. + +Recently, a reader asked for a lightweight web browsers recommendation and hence I took the responsibility of doing some quick experimentation. Here’s what I found. + +### Lightweight web browsers for Linux + +I did not run any benchmark test because what may work on one system may not work on others. This article is based on my experience and opinion. + +Another thing to keep in mind is that some lightweight web browsers may have limited extensions. If you rely on features like account synchronization and uses tons of browser extensions, these browsers may not suffice your need. However, you could still try some of them to have as your secondary browser. + +_**One more thing! This is not a ranking list. The browser at number 2 should not be considered better than the one at number 5.**_ + +Note + +Browsers are gateways to a lot of things. You should not use an obscure web browser that is not actively developed or maintained only by a single developer. This especially goes for banking and shopping. Sticking with a mainstream browser like Firefox, Brave, Vivaldi, Chrome/Chromium is better in such cases. + +#### 1\. Viper + +![Viper][4] + +Focusing on privacy, minimalism, and customization, this browser has become a powerful lightweight place where you can do every search you want. It is, in my opinion, an essential navigator with basic features like tab hibernation support, secure AutoFill management, full-screen support, among others. + +This is not a regular browser, but if you’re a fan of minimalism, perhaps this one is for you. + +[Viper][5] + +[][6] + +![][7] + +#### [Min: An Open Source Web Browser for Minimalists][6] + +#### 2\. Nyxt + +![Nyxt][8] + +“The hacker’s power-browser” is how the official page of [Nyxt][9] describes it; and being honest, it is wonderful. + +Even though it is not the only keyboard-oriented web browser around; its unique feature is that you can overwrite and reconfigure every single class, method, and function inside this one. It also has a built-in command line tool. No wonder why it is called “The hacker’s power-browser”. + +Nyxt uses a simple computer programming environment that takes single user inputs, executes them, and returns the result to the user; most famous as [RELP (read-eval-print loop)][10]. + +[Nyxt][9] + +#### 3\. Lynx + +![Lynx][11] + +I definitely would say this one is for the [CLI][12] fans because this amazing browser lets you [surf the internet from your Linux terminal][13]. That’s right! You can easily access the internet by starting it in your terminal. + +Of course, it consumes less resources but you should not expect same kind of browsing experience you get from regular browsers like Firefox or Brave. + +_**Did you know this is the oldest web browser still being maintained, having started in 1992?**_ + +[Lynx][14] + +#### 4\. SeaMonkey + +![SeaMonkey][15] + +This one is another all-in-one navigator, but what does SeaMonkey include? SeaMonkey adds characteristics like an email client, web feed reader, HTML editor, IRC chat, and web development tools; among other features. + +I would say [SeaMonkey][16] is an incredible fork of Firefox like [Librewolf][17]. It uses much of the same Mozilla Firefox source code, as its web page said. + +[SeaMonkey][18] + +#### 5\. Waterfox + +![Waterfox][19] + +To be honest, when I tried this browser on my personal computer, I was shocked about how good and fast it was. I am a fan of minimalism and I guess that is why I like it so much. One awesome characteristic of this browser is that it supports Chrome, Firefox, and Opera extensions. + +So if you are thinking about trying a new fast, and secure browser without leaving your favorite extensions, [Waterfox][20] would be a perfect choice. + +[Waterfox][21] + +#### 6\. Pale Moon + +![Pale Moon][22] + +This one is another web browser based on Firefox code with characteristics like privacy, security, fully customizable, and optimized for modern processors. The one feature that looks interesting for me is that it continues supporting NPAPI plugins like Silverlight, Flash, and Java. Plugins that have been unmaintained in other browsers like Chrome and Microsoft Edge. + +In this case, if some of your favorite web pages were affected by the stopped maintenance of plugins like flash, perhaps [Pale Moon][23] could revive them. + +[Pale Moon][24] + +#### 7\. Falkon + +![Falkon][25] + +[Falkon][26] is a KDE navigator which works with a technology called [QtWebEngine][27] which provides a rendering engine. It includes features like bookmarks and history in the sidebar and by default brings an ads blocker; which can help you to prevent tracking from websites. + +One random fact about this browser is that it originally started only for educational purposes; but these days, you can use it for your daily routine. I invite you to try it and share with us your experience. + +[Falkon][28] + +#### 8\. Epiphany + +![GNOME Web][29] + +This navigator is most commonly known as GNOME Web, and it is a native web browser focused on Linux experience, which has a simple user interface for browsing. Of course, simple doesn’t mean less powerful. + +Its technology to display web pages is similar to the layout engine used in the Mozilla project, and some of its most important features are: + + * Customizable user interface + * Availability in more than 60 languages + * Cookie management + * Extensions to execute commands, python scripts, group tabs, select your stylesheet, etc. + + + +If you’re looking for a simple and minimalist browser with is focused specifically on Linux, this is the one. + +[GNOME Web][30] + +#### 9\. Otter + +![Otter][31] + +If you remember how [Opera][32] 12 used to look like some years ago, this navigator will remind you of this user interface. The principal purpose of this browser is to provide powerful tools for experiment users while they keep browsing. + +Something interesting and important that I noticed was the continued commitment to the source code from the community to improve this browser. + +This one is a good option if you are looking for a fast, secure, and robust one at the time of browsing in Linux. + +[Otter][33] + +#### 10\. Midori Web Browser + +![Midori][34] + +There used to be a popular browser called Midori but its development has changed course after its merger with [Astian project][35]. However, you can still install it on your Linux distro thanks to the snap store. + +Its three most powerful features are: + + * Adblock filter list support. + * Private browsing. + * Manage cookies and scripts. + + + +But something that really got me shocked was that it lets you open 1000 tabs instantly and create easy web apps; these last two facts are according to [its page in Snapcraft][36]. + +Midori + +### Conclusion + +Remember, finding the perfect browser will depend on your necessities and resources. Overall, it all comes down to what suits you. + +Using [lightweight applications][37] is one way to have a better computing experience when your systems is low on the hardware side. + +I have avoided some other browsers like [Brave or Vivaldi][38] because my focus was on less popular, lightweight web browsers on Linux. If you know a few more which you use regularly, please mention them in the comment section. + +If this article was interesting and helpful for you, please take a minute to share it on social media; you can make a difference! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/lightweight-web-browsers-linux/ + +作者:[Marco Carmona][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/marco/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-browsers-ubuntu-linux/ +[2]: https://itsfoss.com/install-chromium-ubuntu/ +[3]: https://itsfoss.com/open-source-browsers-linux/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Viper.png?resize=800%2C459&ssl=1 +[5]: https://github.com/LeFroid/Viper-Browser +[6]: https://itsfoss.com/min-an-open-source-web-browser-for-minimalists/ +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/02/min-web-browser-featured.jpeg?fit=800%2C450&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Nyxt.png?resize=800%2C459&ssl=1 +[9]: https://itsfoss.com/nyxt-browser/ +[10]: https://en.wikipedia.org/wiki/Reliable_Event_Logging_Protocol +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Lynx-2.png?resize=800%2C458&ssl=1 +[12]: https://itsfoss.com/gui-cli-tui/ +[13]: https://itsfoss.com/terminal-web-browsers/ +[14]: https://lynx.invisible-island.net/current/index.html +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/SeaMonkey-1.png?resize=800%2C459&ssl=1 +[16]: https://www.seamonkey-project.org/ +[17]: https://librewolf-community.gitlab.io/ +[18]: https://www.seamonkey-project.org/releases/ +[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/waterfox-1.png?resize=800%2C459&ssl=1 +[20]: https://itsfoss.com/waterfox-browser/ +[21]: tmp.hhjyWXXJ8J +[22]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/palemoon.png?resize=800%2C459&ssl=1 +[23]: https://www.palemoon.org/ +[24]: https://linux.palemoon.org/ +[25]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/falkon-1.png?resize=800%2C459&ssl=1 +[26]: https://itsfoss.com/falkon-browser/ +[27]: https://wiki.qt.io/QtWebEngine +[28]: https://www.falkon.org/download/ +[29]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/GNOME-Web.png?resize=800%2C458&ssl=1 +[30]: https://wiki.gnome.org/Apps/Web +[31]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Otter.png?resize=800%2C459&ssl=1 +[32]: https://itsfoss.com/install-opera-ubuntu/ +[33]: https://github.com/OtterBrowser/otter-browser/blob/master/INSTALL.md +[34]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Midori.png?resize=800%2C458&ssl=1 +[35]: https://astian.org/en/midori-browser/ +[36]: https://snapcraft.io/midori +[37]: https://itsfoss.com/lightweight-alternative-applications-ubuntu/ +[38]: https://itsfoss.com/brave-vs-vivaldi/ From 19d35734fe1b23141bef77ce49cc132ef5449d94 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 14 Feb 2022 05:02:42 +0800 Subject: [PATCH 280/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220213=20?= =?UTF-8?q?26=20open=20source=20creative=20apps=20to=20try=20in=202022?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220213 26 open source creative apps to try in 2022.md --- ...pen source creative apps to try in 2022.md | 138 ++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 sources/tech/20220213 26 open source creative apps to try in 2022.md diff --git a/sources/tech/20220213 26 open source creative apps to try in 2022.md b/sources/tech/20220213 26 open source creative apps to try in 2022.md new file mode 100644 index 0000000000..1aa5f1ce1c --- /dev/null +++ b/sources/tech/20220213 26 open source creative apps to try in 2022.md @@ -0,0 +1,138 @@ +[#]: subject: "26 open source creative apps to try in 2022" +[#]: via: "https://opensource.com/article/22/2/open-source-creative-apps" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +26 open source creative apps to try in 2022 +====== +Build your own open studio with these open source tools for every +creative discipline from photography to collaboration. +![Painting art on a computer screen][1] + +The server and mobile industries know open source well. But open source isn't just about the technology. First and foremost, open source is about sharing, and if there's one thing people love to share more than anything, it's self-expression in the form of art. Whether you consider yourself an artist or not, you can foster your own creativity with open source applications, and possibly end up with something you're proud to share with others. Here are 26 applications in seven different artistic categories to help you act on your every inspiration. + +### Open source photography tools + +There are lots of great open source applications for photographers, but there are two essential roles that need filling. You need a good application for finishing touches, and you need a good application for serious re-touching and, in some cases, compositing. + + * [Darktable][2] is the digital equivalent of the old dark rooms of celluloid film. Using Darktable, you can perform color correction, dodge, burn, exposure adjustment, and all the things it takes to bring a photo from _good_ to _great_. + * [Krita][3] isn't a photo application at all. It's a paint program for serious digital painters. But photography is often referred to as "painting with light," and it turns out that even in the digital world there's a lot of overlap between the two disciplines. Krita, for instance, has five of the most important traits of a photo editor: layer and layer effects, dynamic selection options, hundreds of filters, a wide range of color profiles, and copious retouch tools. You might not think of it as a photo editor, but give Krita a chance with some of your photos. + + + +### Open source video and animation tools + +Editing still images is one thing, but editing moving photographs requires a special set of tools. There's a lot of subtlety in how video is handled, not only in the way a tool works but also what specific job the tool does. There are tools for editing, generating effects, compositing, titling, rendering, and more. + + * [Kdenlive][4] and [Flowblade][5] are video editors on two different ends of the spectrum. Kdenlive is a full-featured traditional editing application, with [keyboard shortcuts][6] and effects and allowances for offline (or "proxy") editing, and everything else a professional editing environment expects. Flowblade proves that editing is actually a simple process, with a film-like workflow for users accustomed to a workbench littered with razor blades and splicing tape. + * [Natron][7] is a specialized application for visual effects (VFX) work. If you have 3D models you need to integrate into your footage, or you want to design an elaborate title sequence, Natron helps you pipe inputs and ouputs in new and interesting ways. + * The first choice of most Internet streamers is the [OBS][8], so if you're producing live content for the web you're probably already using it. [Learning how it manages cameras][9] is an important part of getting good at what is essentially live editing. + * For animation, Synfig is a great tool for small teams. It's a [digital tweener][10], which can keep your drawing count down. I also use it for [motion graphics][11], and it has plenty of tools and effects to make your creations look great. + + + +### Open source audio tools + +Everybody can make noise, so it's fun to sit down at a computer sometimes and try to give some of that noise a little structure. You can entertain yourself for hours just by banging on a frying pan with a wooden spoon, and piping that sound through a flanger and reverb effect. Alternately, you can fire up a soft synth and let your computer generate some sound. + + * [Audacity][12] is the standard audio editor for basically the whole world. Even after you've graduated onto something more advanced, Audacity is too useful not to have around. Whether you use it for file conversion or for extensive soundwave editing, you need to have Audacity on your computer. + * [Hydrogen][13] is the drummer of the band. That's its only job: load a drumkit and play a steady beat. From traditional rock to glitched electronics, you can do anything that involves rhythm with Hydrogen. + * If you're making music on a computer, you need a synthesizer. Two of my favorites are [Zynaddsubfx][14] and [Linuxsampler][15], the former being a modeling synthesizer and the latter being a mostly preset-based sample engine. + * While you're composing and performing, you need an application to put all the pieces together. [Ardour][16] is a full-featured audio and MIDI digital audio workstation (DAW), while [Seq24][17] is a MIDI sequencer in the tradition of Akai MPC and Alesis MMT-8. + * Whether or not you're making your own music or just managing files so your music can play on one device or another, the simple [Soundconverter][18] application makes the job trivial and efficient. Convert 1 or 100 files to whatever format you need with just a few clicks. + + + +### Open source illustration tools + +Do you find yourself doodling in the margins of your notebook during class or meetings? Replace that notebook with a computer and you're a digital artist. + + * [Krita][19] and [Mypaint][20] are digital paint emulation applications. They both are doing amazing work to find that perfect balance between the benefits of the digital environment and the comfort of physical materials. Their interfaces are different, and their brush engines offer different choices for customization, so try both of them and decide which suits you best. + * [Inkscape][21] proves that anyone can draw. Get familiar with the tools it provides, and you'll be illustrating ideas formerly trapped in your own head in no time. + + + +### Open source digital arts tools + +Some applications are admittedly so unique to computers that they don't quite fit into traditional categories. Here are some of the little applications you might use for unique digital and analog creations. + + * [Meshlab][22] is a viewer for LiDAR scans, which are essentially 3D photographs of created with lasers and GPS. + * [Dotmatrix][23] is an intentionally minimalist drawing environment in which you can only draw by connecting dots on a grid. To some users, it may be frustratingly under-powered, but for me, it's a sublime challenge to invent abstract shapes, glyphs, and iconography. + * If you love Lego, you might love [Goxel][24]. Instead of Lego bricks, Goxel uses digital blocks called voxels (3D pixels) to construct low-polygon artwork. Digital sculpting has never been so easy. + + + +### Open source tools for writing and publishing + +Computers have been used for writing and word processing since the beginning, and there are [31 good text editors][25] to help you get words from your brain onto the screen. Sometimes, though, the words need to be in a very particular format, or in a particular layout, or at least in a certain order. These tools help with that. + + * The [fountain][26] format is a method for writing screenplays. It doesn't require a special application, it just requires that you follow a few simple rules when typing your screenplay. Using converters, you can turn your fountain file into a properly formatted script. + * Many people consider PDFs un-editable, but there are actually several ways to alter a PDF. The [pdftk][27] command helps you perform many simple edits in a direct and repeatable way. I use `pdftk` with [Makefiles][28] to automate my [Docbook][29] builds. + * When you want to design a PDF, [Scribus][30] is the answer. With Scribus, you can achieve professional layouts for printing or digital distribution. + + + +### Open source collaboration tools + +Art is only half of what's involved in creativity. The other half is figuring out what you want to do, who you want to do it with, and how it's going to get done. Open source software is built through collaboration, so it's no surprise that there are lots of great open source applications all about working together. + + * [Penpot][31] is an online collaborative design space, where you can mock up visual designs, software interfaces, page layout, and whatever else you have in your head that needs to be put down on paper. + * Whether you're collaborating with someone or not, it helps to make sure you have a good idea of what you think your own idea is. Mind-mapping is a great way to get parts of an idea into one place so you can understand the best steps to take toward your end goal. [Draw.io][32] is a flowchart creation tool that can help you organize your thoughts and make plans for the future. + + + +### Build your open studio + +[Collaboration over the Internet][33] is easy when you use [Creative Commons][34] assets and open source software. The next time you have an idea, try capturing in something artistic. Your art doesn't have to be complex or even good enough to share with the world, but giving yourself permission to idly play around with some software until something interesting happens can be relaxing and rewarding. In a way, that's exactly how open source software itself is created: a developer idly plays around with some code, and eventually, it leads to something we can all use to make stuff of our own. Be a part of that communal experience, build yourself an open studio, and be proud of whatever you create. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/open-source-creative-apps + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/painting_computer_screen_art_design_creative.png?itok=LVAeQx3_ (Painting art on a computer screen) +[2]: https://opensource.com/article/21/12/open-source-photo-processing-darktable +[3]: https://opensource.com/article/21/12/open-source-photo-editing-krita +[4]: https://opensource.com/article/21/12/kdenlive-linux-creative-app +[5]: https://opensource.com/article/21/11/flowblade-linux-video-editing +[6]: https://opensource.com/downloads/kdenlive-cheat-sheet +[7]: https://opensource.com/article/21/12/film-compositing-linux-natron +[8]: https://opensource.com/life/15/12/real-time-linux-video-editing-with-obs-studio +[9]: https://opensource.com/article/21/12/assign-cameras-usb-ports-obs +[10]: https://opensource.com/article/16/12/synfig-studio-animation-software-tutorial +[11]: https://opensource.com/article/21/12/synfig-motion-graphics +[12]: https://opensource.com/article/21/12/audacity-linux-creative-app +[13]: https://opensource.com/article/21/12/open-source-drum-hydrogen +[14]: https://opensource.com/article/21/12/zyn-fusion +[15]: https://opensource.com/article/21/12/linux-sampler +[16]: https://opensource.com/article/21/12/music-linux-ardour +[17]: https://opensource.com/article/21/12/midi-loops-seq24 +[18]: https://opensource.com/article/21/12/soundconverter-linux +[19]: https://opensource.com/article/21/12/krita-digital-paint +[20]: https://opensource.com/article/21/12/mypaint +[21]: https://opensource.com/article/21/12/linux-draw-inkscape +[22]: https://opensource.com/article/21/12/3d-scans-meshlab +[23]: https://opensource.com/article/21/12/dot-matrix +[24]: https://opensource.com/article/21/12/3d-pixel-art-goxel +[25]: https://opensource.com/article/21/2/open-source-text-editors +[26]: https://opensource.com/article/21/12/linux-fountain +[27]: https://opensource.com/article/21/12/edit-pdf-linux-pdftk +[28]: https://opensource.com/article/18/8/what-how-makefile +[29]: https://opensource.com/article/17/9/docbook +[30]: https://opensource.com/article/21/12/desktop-publishing-scribus +[31]: https://opensource.com/article/21/12/open-source-design-penpot +[32]: https://opensource.com/article/21/12/open-source-mind-mapping-drawio +[33]: https://opensource.com/article/21/12/open-source-card-game +[34]: https://opensource.com/article/20/1/what-creative-commons From 7de595378e2127121bd90ae105994774eedb5c9d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 14 Feb 2022 08:04:02 +0800 Subject: [PATCH 281/334] A --- .../20220206 Best Whiteboard Applications for Linux Systems.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220206 Best Whiteboard Applications for Linux Systems.md b/sources/tech/20220206 Best Whiteboard Applications for Linux Systems.md index 439e5311ea..b15089c58d 100644 --- a/sources/tech/20220206 Best Whiteboard Applications for Linux Systems.md +++ b/sources/tech/20220206 Best Whiteboard Applications for Linux Systems.md @@ -2,7 +2,7 @@ [#]: via: "https://www.debugpoint.com/2022/02/top-whiteboard-applications-linux/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 15a0591f829c81d1bdd489ed1150c5625dd427fd Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 14 Feb 2022 08:47:39 +0800 Subject: [PATCH 282/334] translated --- ...ry Turris Omnia, the open source router.md | 106 ------------------ ...ry Turris Omnia, the open source router.md | 104 +++++++++++++++++ 2 files changed, 104 insertions(+), 106 deletions(-) delete mode 100644 sources/tech/20220131 Try Turris Omnia, the open source router.md create mode 100644 translated/tech/20220131 Try Turris Omnia, the open source router.md diff --git a/sources/tech/20220131 Try Turris Omnia, the open source router.md b/sources/tech/20220131 Try Turris Omnia, the open source router.md deleted file mode 100644 index bae1372c01..0000000000 --- a/sources/tech/20220131 Try Turris Omnia, the open source router.md +++ /dev/null @@ -1,106 +0,0 @@ -[#]: subject: "Try Turris Omnia, the open source router" -[#]: via: "https://opensource.com/article/22/1/turris-omnia-open-source-router" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Try Turris Omnia, the open source router -====== -Whether you're a network engineer or a curious hobbyist, you ought to -take a look at the open source Turris Omnia router the next time you're -in the market for network gear. -![Mesh networking connected dots][1] - -In the early 2000s, I was fascinated by OpenWrt and wanted nothing more than to run it on a router of my own. Unfortunately, I didn't have a router capable of running custom firmware, and so I spent weekends going to garage sales hoping in vain to stumble upon a "Slug" (the slang term hackers were using for the NSLU2 router). Recently, I got hold of the Turris Omnia, which, aside from having a much cooler name, is a router from the Czech Republic using open source firmware built on top of OpenWrt. It has everything you'd expect from hardware running open source, and quite a lot more, including installable packages so you can add exactly what your home or business network needs the most while ignoring the parts you won't use. If you've viewed routers as simple appliances with no room for customization or even utility beyond DNS and DHCP, then you need to look at the Turris Omnia. It'll change your perception of what a router is, what a router can do for your network, and even how you interact with your entire network. - -![The Turris Omnia on my desk][2] - -(Seth Kenlon, [CC BY-SA 4.0][3]) - -### Getting started with Turris Omnia - -For all its power, the Turris Omnia feels comfortingly familiar. The steps to get started are essentially the same as with any other router: - - 1. Power it on - 2. Join the network it provides - 3. Navigate to 192.168.1.1 in a web browser to configure - - - -If you've bought a router in the past, you'll have performed those same steps before. If you're new to this process, know that it's no more complicated than any other router, and ample documentation comes in the box. - -![Configuration][4] - -(Seth Kenlon, [CC BY-SA 4.0][3]) - -### Simple and advanced configuration - -After initial setup, when you navigate to the Turris Omnia router, you have a choice between a simple configuration environment or advanced. You have to begin with the simple configuration. In the **Password** panel, you can set a password for the advanced interface, which also grants you SSH access to the router. - -The simple interface lets you configure how you connect to the wide-area network (WAN) and set parameters for your local-area network (LAN). It also allows you to set up a personal WiFi access point, a guest network, and install and interact with plugins. - -The advanced interface, called LuCI, is exactly what it claims. It's for the network engineer who's familiar with network topography and design, and it's essentially a collection of key and value pairs that you can edit through a simple web interface. If you prefer to edit values directly, you can instead SSH into the router: - - -``` - - -$ ssh root@192.168.1.1 -root@192.168.1.1's password: - -BusyBox v1.28.4 () built-in shell (ash) - - ______ _ ____ _____ - /_ __/_ ____________(_)____ / __ \/ ___/ - / / / / / / ___/ ___/ / ___/ / / / /\\__ - / / / /_/ / / / / / (__ ) / /_/ /___/ / - /_/ \\__,_/_/ /_/ /_/____/ \\____//____/ - - ----------------------------------------------------- - TurrisOS 4.0.1, Turris Omnia - ----------------------------------------------------- -root@turris:~# - -``` - -### Plugins - -In addition to the flexibility of its interface, the Turris Omnia also features a package manager. You can install plugins, including Network Attached Storage (NAS) configuration, a Nextcloud server, an SSH honeypot, speed test, OpenVPN, print server, a Tor node, LXC for running containers, and much more. - -![Package management for your router][5] - -(Seth Kenlon, [CC BY-SA 4.0][3]) - -With just a few clicks, you can install your own [Nextcloud][6] server so you can run your own cloud services or OpenVPN so you can safely access your network when you're away from home. - -### Open source router - -The best part about this router is that it's open source and supports open source. You can download Turris OS and many related open source tools from their [gitlab.nic.cz][7]. You don't have to settle for the firmware that ships on the device, either. With 2 GB of RAM and miniPCIe slots, you can run Debian on it. Even the LEDs in the front panel are programmable. This is a hacker's router, and whether you're a network engineer or a curious hobbyist, you ought to take a look at it the next time you're in the market for network gear. - -You can get the Turris Omnia and several other router models from the [turris.com][8] website, and then join the community at [forum.turris.cz][9]. They're a friendly bunch of enthusiasts, eager to share knowledge, tips, and cool hacks to further what you can do with your open source router. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/turris-omnia-open-source-router - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/mesh_networking_dots_connected.png?itok=ovINTRR3 (Mesh networking connected dots) -[2]: https://opensource.com/sites/default/files/uploads/turris-omnia.jpg (The Turris Omnia on my desk) -[3]: https://creativecommons.org/licenses/by-sa/4.0/ -[4]: https://opensource.com/sites/default/files/uploads/turris-omnia-wifi.jpg (Configuration) -[5]: https://opensource.com/sites/default/files/uploads/turris-omnia-packages.jpg (Package management for your router) -[6]: https://opensource.com/tags/nextcloud -[7]: https://gitlab.nic.cz/turris -[8]: https://www.turris.com/en/ -[9]: http://forum.turris.cz diff --git a/translated/tech/20220131 Try Turris Omnia, the open source router.md b/translated/tech/20220131 Try Turris Omnia, the open source router.md new file mode 100644 index 0000000000..e62be0a989 --- /dev/null +++ b/translated/tech/20220131 Try Turris Omnia, the open source router.md @@ -0,0 +1,104 @@ +[#]: subject: "Try Turris Omnia, the open source router" +[#]: via: "https://opensource.com/article/22/1/turris-omnia-open-source-router" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +尝试 Turris Omnia,一个开源路由器 +====== +无论你是一个网络工程师还是一个好奇的爱好者,当你在市场上购买网络设备时,都你应该看看开源的 Turris Omnia 路由器。 +![Mesh networking connected dots][1] + +在 21 世纪初,我对 OpenWrt 很着迷,只想在自己的路由器上运行它。不幸的是,我没有一个能够运行自定义固件的路由器,所以我花了很多周末去车库销售,希望能偶然发现一个 “Slug”(黑客们对 NSLU2 路由器的俚语),但这是徒劳的。最近,我买到了 Turris Omnia,除了有一个更酷的名字外,它是一个来自捷克的路由器,使用建立在 OpenWrt 之上的开源固件。它拥有你对运行开源硬件所期望的一切,而且还有很多东西,包括可安装的软件包,因此你可以准确地添加你的家庭或企业网络最需要的东西,而忽略你不会使用的部分。如果你认为路由器是简单的设备,没有定制的余地,甚至除了 DNS 和 DHCP 之外没有其他用途,那么你需要看看 Turris Omnia。它将改变你对路由器是什么的看法,路由器能为你的网络做什么,甚至是你与整个网络的互动方式。 + +![The Turris Omnia on my desk][2] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +### 开始使用 Turris Omnia + +尽管 Turris Omnia 的功能很强大,但它给人的感觉却很熟悉。开始使用的步骤与任何其他路由器基本相同: + + 1. 打开电源 + 2. 加入它提供的网络 + 3. 在网络浏览器中进入 192.168.1.1 进行配置 + + + +如果你过去买过路由器,你以前会执行过这些相同的步骤。如果你是这个过程的新手,要知道它并不比任何其他路由器复杂,而且里面有足够的文档。 + +![Configuration][4] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +### 简单和高级配置 + +在初始设置之后,当你进入 Turris Omnia 路由器时,你可以选择简单配置环境或高级配置。你必须从简单配置开始。在**密码**面板中,你可以为高级界面设置一个密码,这也可以让你对路由器进行 SSH 访问。 + +简单界面让你配置如何连接到广域网(WAN),并为你的局域网(LAN)设置参数。它还允许你设置一个个人 WiFi 接入点,一个访客网络,以及安装插件并与之互动。 + +被称为 LuCI 的高级界面,正是它所声称的。它是为熟悉网络拓扑和设计的网络工程师设计的,它基本上是一个键值对的集合,你可以通过一个简单的网络界面进行编辑。如果你喜欢直接编辑数值,你可以用 SSH 进入路由器。 + + +``` + + +$ ssh root@192.168.1.1 +root@192.168.1.1's password: + +BusyBox v1.28.4 () built-in shell (ash) + + ______ _ ____ _____ + /_ __/_ ____________(_)____ / __ \/ ___/ + / / / / / / ___/ ___/ / ___/ / / / /\\__ + / / / /_/ / / / / / (__ ) / /_/ /___/ / + /_/ \\__,_/_/ /_/ /_/____/ \\____//____/ + + ----------------------------------------------------- + TurrisOS 4.0.1, Turris Omnia + ----------------------------------------------------- +root@turris:~# + +``` + +### 插件 + +除了界面的灵活性之外,Turris Omnia 还有一个包管理器。你可以安装插件,包括网络附加存储(NAS)配置、Nextcloud 服务器、SSH 蜜罐、速度测试、OpenVPN、打印服务器、Tor 节点、运行容器的 LXC 等等。 + +![Package management for your router][5] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +只需点击几下,你就可以安装自己的 [Nextcloud][6] 服务器,这样你就可以运行自己的云服务或 OpenVPN,这样你就可以在离家时安全地访问你的网络。 + +### 开源路由器 + +这个路由器最好的部分是它是开源的,并且支持开源。你可以从他们的 [gitlab.nic.cz][7] 下载 Turris 操作系统和许多相关的开源工具。你也不必满足于设备上的固件。有了 2GB 的内存和 miniPCIe 插槽,你可以在上面运行 Debian。甚至前面板上的 LED 灯也是可编程的。这是一个黑客的路由器,无论你是一个网络工程师还是一个好奇的业余爱好者,当你在市场上购买网络设备时,你都应该看一看它。 + +你可以从 [turris.com][8] 网站上获得 Turris Omnia 和其他几个型号的路由器,然后加入 [forum.turris.cz][9] 的社区。他们是一群友好的爱好者,热衷于分享知识、技巧和很酷的黑客技术,以促进你对开源路由器的使用。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/turris-omnia-open-source-router + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/mesh_networking_dots_connected.png?itok=ovINTRR3 (Mesh networking connected dots) +[2]: https://opensource.com/sites/default/files/uploads/turris-omnia.jpg (The Turris Omnia on my desk) +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://opensource.com/sites/default/files/uploads/turris-omnia-wifi.jpg (Configuration) +[5]: https://opensource.com/sites/default/files/uploads/turris-omnia-packages.jpg (Package management for your router) +[6]: https://opensource.com/tags/nextcloud +[7]: https://gitlab.nic.cz/turris +[8]: https://www.turris.com/en/ +[9]: http://forum.turris.cz From 7e21de4f1d49bdab23d26c980e8a3f74eac5bc54 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 14 Feb 2022 08:55:15 +0800 Subject: [PATCH 283/334] translating --- sources/tech/20170115 Magic GOPATH.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20170115 Magic GOPATH.md b/sources/tech/20170115 Magic GOPATH.md index 1d4cd16e24..978136ade8 100644 --- a/sources/tech/20170115 Magic GOPATH.md +++ b/sources/tech/20170115 Magic GOPATH.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From ce0e8ce0d53abbd08545ef34846ba5f20340d2f6 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 14 Feb 2022 09:01:15 +0800 Subject: [PATCH 284/334] Revert "translating" This reverts commit 7e21de4f1d49bdab23d26c980e8a3f74eac5bc54. --- sources/tech/20170115 Magic GOPATH.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20170115 Magic GOPATH.md b/sources/tech/20170115 Magic GOPATH.md index 978136ade8..1d4cd16e24 100644 --- a/sources/tech/20170115 Magic GOPATH.md +++ b/sources/tech/20170115 Magic GOPATH.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (geekpi) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 01d9b5efffb1fe5e9e51a03dc6332f2f06b4bfc0 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 14 Feb 2022 09:09:53 +0800 Subject: [PATCH 285/334] 20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md --- ... How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md b/sources/tech/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md index 5624026332..e69cabc07a 100644 --- a/sources/tech/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md +++ b/sources/tech/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md @@ -2,7 +2,7 @@ [#]: via: "https://www.debugpoint.com/2022/02/kde-plasma-5-24-kubuntu-21-10/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 2d61df61cef743f608efef681d70e3c8b7ee7a60 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 14 Feb 2022 16:26:20 +0800 Subject: [PATCH 286/334] TR --- ...iteboard Applications for Linux Systems.md | 231 ------------------ ...iteboard Applications for Linux Systems.md | 199 +++++++++++++++ 2 files changed, 199 insertions(+), 231 deletions(-) delete mode 100644 sources/tech/20220206 Best Whiteboard Applications for Linux Systems.md create mode 100644 translated/tech/20220206 Best Whiteboard Applications for Linux Systems.md diff --git a/sources/tech/20220206 Best Whiteboard Applications for Linux Systems.md b/sources/tech/20220206 Best Whiteboard Applications for Linux Systems.md deleted file mode 100644 index b15089c58d..0000000000 --- a/sources/tech/20220206 Best Whiteboard Applications for Linux Systems.md +++ /dev/null @@ -1,231 +0,0 @@ -[#]: subject: "Best Whiteboard Applications for Linux Systems" -[#]: via: "https://www.debugpoint.com/2022/02/top-whiteboard-applications-linux/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Best Whiteboard Applications for Linux Systems -====== -WE WILL SHOW YOU A COUPLE OF WHITEBOARD APPLICATIONS FOR LINUX SYSTEMS. -I AM SURE THESE ARE GOING TO BE SUPER BENEFICIAL FOR YOU. READ ON. -W - -In general, a digital whiteboard is a tool that contains a large interactive display in the form of a whiteboard. Some examples of whiteboard devices are – Tab, large-screen mobile phones, touch screen laptops, surface displays. - -If an instructor uses a whiteboard, you can draw, write or manipulate elements on those device screens using a touch-sensitive pen, stylus, finger or mouse. That means you can drag, click, erase, draw – do everything on the whiteboard that can be done on a piece of paper using a pen. - -But to do all those, you need software that supports all those functionalities. That means bridging the gap between your touch and the display. - -Now, there are many commercial applications available for this work. But we will talk about some of the free and open-source whiteboard applications in this article that are available for Linux Systems. - -### Best Whiteboard Applications for Linux Systems - -#### 1\. Xournal++ - -The first application we feature is [Xournal++][1]. In my opinion, this is the best app on this list. It’s pretty solid and here for some time. - -Xournal++ allows you to write, draw, and do everything you usually do on paper. It supports handwriting, custom pen with highlighter, eraser, etc. The support for Layers, multi-page features, add external images, add audio are few to mention among its great list of features. - -This application support almost all pressure-sensitive tablets, including Wacom, Huion, XP-Pen. I tested it on a touchpad laptop, and it works with minor settings changes. So, you can start using any touch-sensitive device. - -It is written in C++ and GTK3. - -![Xournal++ Whiteboard Application for Linux][2] - -For Linux systems, this is how you can install. It is free and available for Linux, macOS and Windows as well. A BETA copy is also available if you want to try it out on mobile. - -This application is available as AppImage, Snap, Flatpak and deb package. Also available as PPA for Ubuntu/Debian based systems. - -Also dedicated packages for Fedora, SUSE and Arch are available. Head over to the below link to grab your preferred executable format. - -[Download Xournal++][3] - - * [Home page][1] - * [Documentation][4] - * [Source Code][5] - - - -#### 2\. OpenBoard - -The next one we would like to highlight is [OpenBoard][6]. This simple whiteboard drawing application is easy to use and doesn’t get in your way with too many options. - -This one is perfect for beginners and junior students who take notes from online classes. - -OpenBoard loaded with features. Such as colours, brushes, texts, simple drawing shapes, page support and more. This app is built using Qt technology. - -![OpenBoard][7] - -This application is only available for Ubuntu as a stand-alone deb package. You can download it from the below link. - -[Download OpenBoard][8] - - * [Home Page][6] - * [Documentation][9] - * [Source Code][10] - - - -#### 3\. Notelab - -[NoteLab][11] is one of the decade-old oldest whiteboard applications. It is a free and open-source application with a vast set of features. So, you can understand how stable and popular this application is. - -Here are some of its features: - - * This app supports all popular image formats as an export option. For example, SVG, PNG, JPG, BMP, etc. - * Configuration option for pen and paper customization - * Built-in memory manager for custom allocation of memory used by NoteLab. - * There are several rule formats in paper, such as broad rule, college rule, and graph paper. - * All standard drawing tools. - * You can resize, move, delete, change colour, and perform other operations in any note section. - - - -![NoteLab][12] - -However, this application is a Java application and distributed as a .jar file. So you need the Java runtime for it to work. You can refer to our guide to install Java or JRE in Linux systems by following links. - - * [How to install Java/JRE in Ubuntu-based systems][13] - * [How to install Java/JRE in Arch Linux][14] - - - -[][15] - -SEE ALSO:   GIMP 2.10 Released - Download Now - -NoteLab comes with a standalone executable .jar file, which you can download from SourceForge via the below link. Remember, you need JRE to run this application. - -[Download NoteLab][16] - - * [Home Page][11] - * [Documentation][17] - - - -#### 4\. Rnote - -The third app we want to highlight is called [Rnote][18]. Rnote is an excellent application for taking handwritten notes via touch devices. This application is vector image-based and helps to draw, annotate pictures and PDFs. It brings native .rnote file format with import/export options for png, jpeg, svg and PDF. - -One of the cool features of Rnote is that it supports Xournal++ file format support (the first app in this list) which makes it a must-have tool. - -Built using GTK4 and Rust, Rnote is perfect for your GNOME desktop and all types of Linux systems. - -This application is currently under development, and keep that in mind while using. - -![Rnote – Whiteboard Application for Linux based on GTK4 and Rust][19] - -This application is available as a Flatpak package. You can set up Flatpak for your Linux system using [this guide][20] and then click on the below button to install. - -[Install Rnote][21] - -[Home page and Source code][18] - -#### 5\. Lorien - -[Lorien][22] is a perfect digital notebook software for your ideation sessions where you can create notes with its various tools. Lorien is a cross-platform, free and open-source “infinite canvas drawing/note-taking” app based on Godot Game Engine. This app is a perfect fit for taking quick notes for brainstorming sessions. - -The toolbox is pretty standard with a Freehand brush, eraser, line tool and selection tool. You can move or delete a selected section of your brushstrokes – that act as a collection of points and renders at runtime. - -![Lorien Whiteboard Application for Linux][23] - -The installation is not required to use Lorien. A self-contained executable is available to download from the below link (download the tar file). Once downloaded, extract the files and double click to run. - -[Download Lorien][24] - -[Home Page and Source Code][22] - -#### 6\. Rainbow Board - -The Rainbow Board is a free and open-source whiteboard application based on Electron and React. In general, people do not like Electron apps due to their performance and bulky nature. But as we are listing the apps in this category, I thought it’s worth mentioning this one. - -It comes with a standard canvas to draw that supports touch and stylus support. The toolbox includes Brush sizes, colours, fill colours, fonts, undo & redo actions. You can export your drawing as a PNG or SVG file. - -![Rainbow Board Whiteboard application for Linux][25] - -This application is available as Snap, Flatpak and standalone deb installer. You can download them from the page in the below link. - -[Download Rainbow Board][26] - - * [Home page][27] - * [Source code][28] - - - -### Honorable Mentions - -The last two drawing applications I want to mention here are Vectr and Ecxalidraw. These are web-based whiteboard drawing applications. I am putting them in a separate section because they are not desktop applications. - -So, if you are reluctant to install another app; Or use a school or work system where you do not have permission to install, you can open the web browser and use these. Here is their web address. - -[Vectr][29] -[Ecxalidraw][30] - -### Closing Notes - -There you go, with some modern-day whiteboard [drawing][31] applications for Linux and other operating systems. Many of you are probably taking notes in pen and paper for your online sessions or classes due to Pandemic and work-from-home situations. I am sure these will help you in your study work. - -Try these out, and you will definitely find the one best suitable for you. Let me know your comments or feedback about this list in the message box below. - -Cheers. - -_Image credit – respective app owners. Feature image credit – [unsplash][32]_ - -* * * - -We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][33], [Twitter][34], [YouTube][35], and [Facebook][36] and never miss an update! - -##### Also Read - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/2022/02/top-whiteboard-applications-linux/ - -作者:[Arindam][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.debugpoint.com/author/admin1/ -[b]: https://github.com/lujun9972 -[1]: https://xournalpp.github.io/ -[2]: https://www.debugpoint.com/wp-content/uploads/2022/02/Xournal-Whiteboard-Application-for-Linux-1024x576.jpg -[3]: https://xournalpp.github.io/installation/linux/ -[4]: https://xournalpp.github.io/guide/overview/ -[5]: https://github.com/xournalpp/xournalpp/ -[6]: https://openboard.ch/ -[7]: https://www.debugpoint.com/wp-content/uploads/2022/02/OpenBoard.jpg -[8]: https://openboard.ch/download.en.html -[9]: https://openboard.ch/support.html -[10]: https://github.com/OpenBoard-org/OpenBoard -[11]: http://java-notelab.sourceforge.net/ -[12]: https://www.debugpoint.com/wp-content/uploads/2022/02/NoteLab.jpg -[13]: https://www.debugpoint.com/2016/05/how-to-install-java-jre-jdk-on-ubuntu-linux-mint/ -[14]: https://www.debugpoint.com/2021/02/install-java-arch/ -[15]: https://www.debugpoint.com/2018/05/gimp-2-10-download-install-linux-ubuntu/ -[16]: https://sourceforge.net/projects/java-notelab/files/NoteLab/ -[17]: http://java-notelab.sourceforge.net/features.html -[18]: https://github.com/flxzt/rnote -[19]: https://www.debugpoint.com/wp-content/uploads/2022/02/Rnote-Whiteboard-Application-for-Linux-based-on-GTK4-and-Rust-1024x576.jpg -[20]: https://flatpak.org/setup/ -[21]: https://dl.flathub.org/repo/appstream/com.github.flxzt.rnote.flatpakref -[22]: https://github.com/mbrlabs/Lorien -[23]: https://www.debugpoint.com/wp-content/uploads/2022/02/Lorien-Whiteboard-Application-for-Linux.jpg -[24]: https://github.com/mbrlabs/Lorien/releases -[25]: https://www.debugpoint.com/wp-content/uploads/2022/02/Rainbow-Board-Whiteboard-application-for-Linux-1024x560.jpg -[26]: https://www.electronjs.org/apps/rainbow-board -[27]: https://harshkhandeparkar.github.io/rainbow-board/ -[28]: https://github.com/HarshKhandeparkar/rainbow-board -[29]: https://vectr.com/ -[30]: https://excalidraw.com/ -[31]: https://www.debugpoint.com/tag/digital-drawing -[32]: https://unsplash.com/photos/doTjbfxrmRw -[33]: https://t.me/debugpoint -[34]: https://twitter.com/DebugPoint -[35]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 -[36]: https://facebook.com/DebugPoint diff --git a/translated/tech/20220206 Best Whiteboard Applications for Linux Systems.md b/translated/tech/20220206 Best Whiteboard Applications for Linux Systems.md new file mode 100644 index 0000000000..5616edc8e1 --- /dev/null +++ b/translated/tech/20220206 Best Whiteboard Applications for Linux Systems.md @@ -0,0 +1,199 @@ +[#]: subject: "Best Whiteboard Applications for Linux Systems" +[#]: via: "https://www.debugpoint.com/2022/02/top-whiteboard-applications-linux/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +适用于 Linux 系统的最佳白板应用 +====== + +![](https://img.linux.net.cn/data/attachment/album/202202/14/162535uomtvutyoo44q3hs.jpg) + +> 我们将向你展示几个用于 Linux 的白板应用程序。我相信这些会对你有很大的帮助。 + +一般来说,数字白板是一种包含一块白板形式的大型互动显示器的工具。白板设备的一些例子,如平板电脑、大屏幕手机、触摸屏笔记本电脑、平面显示器等。 + +如果教员使用白板,可以使用触摸感应笔、手写笔、手指或鼠标在这些设备屏幕上画、写或操作元素。你可以拖动、点击、擦除、绘制,在白板上做一切可以用笔在纸上完成的事情。 + +但要做到这些,你需要支持所有这些功能的软件,即在你的触摸和显示器之间架起桥梁。 + +现在,有许多商业应用程序可用于这项工作。但我们将在本文中谈论一些可用于 Linux 的自由开源的白板应用程序。 + +### Linux 上的最佳白板应用 + +#### 1、Xournal++ + +我们介绍的第一个应用是 [Xournal++][1]。在我看来,这是这份名单上最好的应用。它相当可靠,而且已经出现了一段时间了。 + +Xournal++ 可以让你写字、画画,做一切你通常在纸上做的事情。它支持手写、带高亮的自定义笔、橡皮擦等。它支持分层、多页功能、添加外部图片、添加音频等功能。 + +这个应用程序支持几乎所有的压敏平板,包括 Wacom、Huion、XP-Pen。我在一台触摸板笔记本电脑上测试了它,只需稍作设置就能工作。所以,你可以用它使用任何压敏设备。 + +它是用 C++ 和 GTK3 编写的。 + +![Xournal++ 白板应用程序(Linux)][2] + +对于 Linux 系统,可以安装如下软件包。它是免费的,也可用于 Linux、macOS 和 Windows。如果你想在手机上试用,也可以使用它的测试版。 + +这个应用程序有 AppImage、Snap、Flatpak 和 deb 包。对于基于 Ubuntu/Debian 的系统,也有 PPA 版本。 + +此外,还有适用于 Fedora、SUSE 和 Arch 的专用软件包。请点击下面的链接下载 Xournal++,获取你喜欢的可执行文件格式。 + + * [主页][1] + * [文档][4] + * [源代码][5] + * [下载 Xournal++][3] + +#### 2、OpenBoard + +我们想重点介绍的下一个是 [OpenBoard][6]。这个简单的白板绘图应用程序很容易使用,不会有太多的选项让你操心。 + +这款软件非常适合初学者和初级学生在在线课程中做笔记。 + +![OpenBoard][7] 加载了很多功能。如颜色、画笔、文本、简单的绘图形状、页面支持等。这个应用程序是使用 Qt 技术构建的。 + +这个应用程序只适用于 Ubuntu,它是一个独立的 deb 包。你可以从下面的链接下载 OpenBoard。 + + * [主页][6] + * [文档][9] + * [源代码][10] + * [下载 OpenBoard][8] + +#### 3、Notelab + +[NoteLab][11] 是上个年代最古老的白板应用程序之一。它是一个自由开源的应用程序,有大量的功能。因此,你可以理解这个应用程序是多么的稳定和流行。 + +以下是它的一些特点: + + * 这个应用程序支持所有流行的图像格式作为导出选项。例如,SVG、PNG、JPG、BMP 等。 + * 用于定制笔和纸的配置选项。 + * 内置内存管理器,用于自定义分配 NoteLab 使用的内存。 + * 多种样式的纸张。 + * 所有标准的绘图工具。 + * 你可以在笔记的任何部分调整大小、移动、删除、改变颜色和执行其他操作。 + +![NoteLab][12] + +然而,这个应用程序是一个 Java 应用程序,并以一个 .jar 文件分发。因此,你需要 Java 运行时才能工作。你可以参考我们的指南,通过以下链接在 Linux 系统中安装 Java 或 JRE。 + + * [如何在基于 Ubuntu的系统中安装 Java/JRE][13] 。 + * [如何在 Arch Linux 中安装 Java/JRE][14] 。 + +NoteLab 带有一个独立的可执行的 .jar 文件,你可以通过以下链接从 SourceForge 下载。记住,你需要 JRE 来运行这个应用程序。 + + * [主页][11] + * [文档][17] + * [下载 NoteLab][16] + +#### 4、Rnote + +我们要介绍的第三个应用程序叫做 [Rnote][18]。Rnote 是一个通过触摸设备进行手写笔记的优秀应用。这个应用程序是基于矢量图像的,可以绘制、注释图片和 PDF 文件。它有原生的 .rnote 文件格式,也支持导入/导出 png、jpeg、svg 和 PDF 的选项。 + +Rnote 的一个很酷的特点是,它支持 Xournal++ 文件格式(本列表中的第一个应用程序),这使它成为一个必备的工具。 + +Rnote 使用 GTK4 和 Rust 构建,非常适合 GNOME 桌面和各种类型的 Linux 系统。 + +这个应用程序目前正在开发中,在使用时请记住这一点。 + +![Rnote - 基于 GTK4 和 Rust 的 Linux 白板应用程序][19] + +这个应用程序是以 Flatpak 包的形式提供的。你可以使用 [这篇指南][20] 为你的 Linux 系统设置 Flatpak,然后点击 [此链接安装][21]。 + +- [主页和源代码][18] + +#### 5、Lorien + +[Lorien][22] 是一个完美的数字笔记本软件,可以用于你的构思会议,你可以用它的各种工具创建笔记。Lorien 是一个基于 Godot 游戏引擎的跨平台、自由开源的“无限画布绘画/记事”应用程序。这个应用程序非常适合于为头脑风暴会议做快速笔记。 + +工具箱相当标准,有自由画笔、橡皮擦、线条工具和选择工具。你可以移动或删除你的笔触的选定部分,这是一个点的集合,在运行时渲染。 + +![Linux 的 Lorien 白板应用程序][23] + +使用 Lorien 不需要安装。可以从下面的链接中下载一个独立的可执行 tar 文件。下载后,解压文件并双击运行。 + +- [主页和源代码][22] +- [下载 Lorien][24] + +#### 6、Rainbow Board + +Rainbow Board 是一个基于 Electron 和 React 的自由开源的白板应用。一般来说,因为它们的性能和笨重的性质,人们不喜欢 Electron 应用程序。但是,既然我们要列出这个类别的应用,我认为这个应用是值得一提的。 + +它有一个标准的画布,支持触摸和手写笔绘制。工具箱包括画笔尺寸、颜色、填充颜色、字体、撤销和重做动作。你可以将你的绘图导出为 PNG 或 SVG 文件。 + +![Linux 的 Rainbow Board 白板应用程序][25] + +这个应用程序有 Snap、Flatpak 和独立的 deb 安装程序。你可以从下面的链接中的页面下载它们。 + + * [主页][27] + * [源代码][28] + * [下载 Rainbow Board][26] + +### 荣誉提名 + +我想在这里提到的最后两个绘图应用程序是 Vectr 和 Ecxalidraw。这些是基于网络的白板绘图应用程序。我把它们放在一个单独的部分,因为它们不是桌面应用程序。 + +所以,如果你不愿意再安装一个应用程序;或者使用的是学校或工作系统,没有权限安装,你可以打开网络浏览器,使用这些。以下是它们的网址: + +- [Vectr][29] +- [Ecxalidraw][30] + +### 总结 + +这就是一些适用于 Linux 和其他操作系统的现代白板 [绘图][31] 应用程序。由于疫情和在家工作的原因,你们中的许多人可能正在用纸笔为你们的在线课程或课堂做笔记。我相信这些会对你的学习工作有所帮助。 + +试试这些,你一定会找到最适合你的那一个。请在下面的留言框中告诉我你对这份清单的意见或反馈。 + +加油! + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/02/top-whiteboard-applications-linux/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://xournalpp.github.io/ +[2]: https://www.debugpoint.com/wp-content/uploads/2022/02/Xournal-Whiteboard-Application-for-Linux-1024x576.jpg +[3]: https://xournalpp.github.io/installation/linux/ +[4]: https://xournalpp.github.io/guide/overview/ +[5]: https://github.com/xournalpp/xournalpp/ +[6]: https://openboard.ch/ +[7]: https://www.debugpoint.com/wp-content/uploads/2022/02/OpenBoard.jpg +[8]: https://openboard.ch/download.en.html +[9]: https://openboard.ch/support.html +[10]: https://github.com/OpenBoard-org/OpenBoard +[11]: http://java-notelab.sourceforge.net/ +[12]: https://www.debugpoint.com/wp-content/uploads/2022/02/NoteLab.jpg +[13]: https://www.debugpoint.com/2016/05/how-to-install-java-jre-jdk-on-ubuntu-linux-mint/ +[14]: https://www.debugpoint.com/2021/02/install-java-arch/ +[15]: https://www.debugpoint.com/2018/05/gimp-2-10-download-install-linux-ubuntu/ +[16]: https://sourceforge.net/projects/java-notelab/files/NoteLab/ +[17]: http://java-notelab.sourceforge.net/features.html +[18]: https://github.com/flxzt/rnote +[19]: https://www.debugpoint.com/wp-content/uploads/2022/02/Rnote-Whiteboard-Application-for-Linux-based-on-GTK4-and-Rust-1024x576.jpg +[20]: https://flatpak.org/setup/ +[21]: https://dl.flathub.org/repo/appstream/com.github.flxzt.rnote.flatpakref +[22]: https://github.com/mbrlabs/Lorien +[23]: https://www.debugpoint.com/wp-content/uploads/2022/02/Lorien-Whiteboard-Application-for-Linux.jpg +[24]: https://github.com/mbrlabs/Lorien/releases +[25]: https://www.debugpoint.com/wp-content/uploads/2022/02/Rainbow-Board-Whiteboard-application-for-Linux-1024x560.jpg +[26]: https://www.electronjs.org/apps/rainbow-board +[27]: https://harshkhandeparkar.github.io/rainbow-board/ +[28]: https://github.com/HarshKhandeparkar/rainbow-board +[29]: https://vectr.com/ +[30]: https://excalidraw.com/ +[31]: https://www.debugpoint.com/tag/digital-drawing +[32]: https://unsplash.com/photos/doTjbfxrmRw +[33]: https://t.me/debugpoint +[34]: https://twitter.com/DebugPoint +[35]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[36]: https://facebook.com/DebugPoint From 15da8d5ef2eb94483749f12faf93c420988f3359 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 14 Feb 2022 16:27:32 +0800 Subject: [PATCH 287/334] P @wxy https://linux.cn/article-14271-1.html --- ...20220206 Best Whiteboard Applications for Linux Systems.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20220206 Best Whiteboard Applications for Linux Systems.md (99%) diff --git a/translated/tech/20220206 Best Whiteboard Applications for Linux Systems.md b/published/20220206 Best Whiteboard Applications for Linux Systems.md similarity index 99% rename from translated/tech/20220206 Best Whiteboard Applications for Linux Systems.md rename to published/20220206 Best Whiteboard Applications for Linux Systems.md index 5616edc8e1..b6d3a20601 100644 --- a/translated/tech/20220206 Best Whiteboard Applications for Linux Systems.md +++ b/published/20220206 Best Whiteboard Applications for Linux Systems.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "wxy" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14271-1.html" 适用于 Linux 系统的最佳白板应用 ====== From 720131236f904cc5bf03f439604c7c02e068c065 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 14 Feb 2022 16:31:01 +0800 Subject: [PATCH 288/334] R --- ...20220206 Best Whiteboard Applications for Linux Systems.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/published/20220206 Best Whiteboard Applications for Linux Systems.md b/published/20220206 Best Whiteboard Applications for Linux Systems.md index b6d3a20601..03c1ee4d53 100644 --- a/published/20220206 Best Whiteboard Applications for Linux Systems.md +++ b/published/20220206 Best Whiteboard Applications for Linux Systems.md @@ -53,7 +53,9 @@ Xournal++ 可以让你写字、画画,做一切你通常在纸上做的事情 这款软件非常适合初学者和初级学生在在线课程中做笔记。 -![OpenBoard][7] 加载了很多功能。如颜色、画笔、文本、简单的绘图形状、页面支持等。这个应用程序是使用 Qt 技术构建的。 +![OpenBoard][7] + +OpenBoard 加载了很多功能。如颜色、画笔、文本、简单的绘图形状、页面支持等。这个应用程序是使用 Qt 技术构建的。 这个应用程序只适用于 Ubuntu,它是一个独立的 deb 包。你可以从下面的链接下载 OpenBoard。 From 358e1dbdd95e4cc9d691bb570b93d935ea363db3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 14 Feb 2022 22:46:07 +0800 Subject: [PATCH 289/334] ONESTEP @wxy https://linux.cn/article-14273-1.html --- ... migrate your application to containers.md | 90 +++++++++++++++++ ... migrate your application to containers.md | 99 ------------------- 2 files changed, 90 insertions(+), 99 deletions(-) create mode 100644 published/20220208 5 steps to migrate your application to containers.md delete mode 100644 sources/tech/20220208 5 steps to migrate your application to containers.md diff --git a/published/20220208 5 steps to migrate your application to containers.md b/published/20220208 5 steps to migrate your application to containers.md new file mode 100644 index 0000000000..7e84e9ff9a --- /dev/null +++ b/published/20220208 5 steps to migrate your application to containers.md @@ -0,0 +1,90 @@ +[#]: subject: "5 steps to migrate your application to containers" +[#]: via: "https://opensource.com/article/22/2/migrate-application-containers" +[#]: author: "Alan Smithee https://opensource.com/users/alansmithee" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14273-1.html" + +将应用程序迁移到容器的 5 个步骤 +====== + +> 如果你是容器的新手,不要被那些术语所吓倒。这些关键原则将帮助你把应用迁移到云中。 + +![](https://img.linux.net.cn/data/attachment/album/202202/14/224455i7wz95yiq9hxltw2.jpg) + +一般来说,人们想使用你的应用程序这是一件好事。然而,当应用程序在服务器上运行时,应用程序受欢迎是有代价的。随着用户对资源需求的增加,在某些时候,你可能会发现你需要扩展你的应用程序。一种选择是在这种情况下增加更多的服务器,建立一个像 Nginx 这样的 [负载平衡器][2],以满足需求。但是,这种方法的成本可能很昂贵,因为当需求低的时候,在没有流量的服务器上运行你的应用程序的实例并不会节省资源。容器的优点是它是非持久的,在有需求时启动新实例,而随着需求的减少逐渐消失。如果这听起来像是你需要的功能,那么现在可能是将你的应用程序迁移到容器的时候了。 + +将应用程序迁移到容器中,很快就会变得迷失方向。虽然容器内的环境可能感觉很熟悉,但许多容器镜像是最小化的,而且它们被设计为无状态的。不过在某种程度上,这也是容器的优势之一。就像 Python 虚拟环境一样,它是一块白板,可以让你构建(或重建)你的应用程序,而没有许多其他环境所提供的无形的默认值。 + +每一次向云服务的迁移都是独一无二的,但在将你的应用程序移植到容器之前,你应该注意以下几个重要原则。 + +### 1、理解你的依赖关系 + +将你的应用程序移植到容器中是一个很好的机会,可以了解你的应用程序实际依赖的东西。由于除了最基本的系统组件外,很少有默认安装的组件,你的应用程序一开始不太可能在容器中运行。 + +在重构之前,确定你的依赖关系。首先,在你的源代码中用 `grep` 查找 `include`、`import`、`require`、`use` 或你选择的语言中用来声明依赖关系的任何关键词。 + +``` +$ find ~/Code/myproject -type f \ + -iname ".java" \ + -exec grep import {} \; +``` + +不过,仅仅识别你使用的特定语言的库可能是不够的。审计依赖关系,这样你就能知道是否有语言本身运行所需的低级库,或者特定的模块以预期的功能运行。 + +### 2、评估你的数据存储 + +容器是无状态的,当一个容器崩溃或停止运行时,该容器的实例就永远消失了。如果你要在该容器中保存数据,这些数据也会消失。如果你的应用程序存储用户数据,所有的存储必须发生在容器之外,在你的应用程序的实例可以访问的某个位置。 + +你可以使用映射到容器内某个位置的本地存储来存储简单的应用程序配置文件。这是一种常见的技术,适用于需要管理员提供简单配置值的 Web 应用程序,如管理员的电子邮件地址、网站标题等。比如说: + +``` +$ podman run \ + --volume /local/data:/storage:Z \ + mycontainer +``` + +然而,你可以配置一个数据库,如 MariaDB 或 PostgreSQL,将大量数据在几个容器中的共享存储。对于私人信息,如密码,[你可以配置一个机密存储][3]。 + +对于你需要如何重构你的代码,相应地调整存储位置,这可能意味着改变路径到新的容器存储映射,移植到不同的数据库,甚至是纳入容器特定的模块。 + +### 3、准备好你的 Git 仓库 + +容器在构建时通常会从 Git 仓库中拉取源代码。一旦你的 Git 仓库成为你的应用程序的生产就绪代码的标准来源,你必须有一个管理 Git 仓库的计划。要有一个发布分支或生产分支,并考虑使用 [Git 钩子][5] 来拒绝意外的未经批准的提交。 + +### 4、了解你的构建系统 + +容器化应用程序可能没有传统的发布周期。当容器被构建时,它们会被从 Git 中拉取出来。你可以启动任何数量的构建系统作为容器构建的一部分,但这可能意味着调整你的构建系统,使其比过去更加自动化。你应该重构你的构建过程,使你完全有信心它能在无人值守的情况下工作。 + +### 5、构建镜像 + +构建镜像不一定是复杂的任务。你可以使用 [现有的容器镜像][6] 作为基础,用一个简单的 Docker 文件对其进行调整。另外,你也可以使用 [Buildah][7] 从头开始构建你自己的镜像。 + +在某种程度上,构建容器的过程与实际重构代码一样,都是开发的一部分。容器的构建是为了获取、组装和执行你的应用程序,所以这个过程必须是自动化的、健壮的。建立一个好的镜像,你就为你的应用程序建立了一个坚实可靠的基础。 + +### 容器化 + +如果你是容器的新手,不要被术语所吓倒。容器只是另一种环境。容器化开发的感知约束实际上可以帮助你专注于你的应用程序,并更好地了解它是如何运行的、它需要什么才能可靠地运行,以及当出错时有哪些潜在的风险。相反,这导致系统管理员在安装和运行你的应用程序时受到的限制要少得多,因为从本质上讲,容器是一个受控的环境。仔细审查你的代码,了解你的应用程序需要什么,并相应地重构它。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/migrate-application-containers + +作者:[Alan Smithee][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/alansmithee +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/business_clouds.png?itok=IRsi1qOF (A person holding on to clouds that look like balloons) +[2]: https://opensource.com/article/21/4/load-balancing +[3]: https://www.redhat.com/sysadmin/new-podman-secrets-command +[4]: https://opensource.com/downloads/mariadb-mysql-cheat-sheet +[5]: http://redhat.com/sysadmin/git-hooks +[6]: https://www.redhat.com/sysadmin/top-container-images +[7]: https://opensource.com/article/22/1/build-your-own-container-scratch diff --git a/sources/tech/20220208 5 steps to migrate your application to containers.md b/sources/tech/20220208 5 steps to migrate your application to containers.md deleted file mode 100644 index 7468610e7d..0000000000 --- a/sources/tech/20220208 5 steps to migrate your application to containers.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: subject: "5 steps to migrate your application to containers" -[#]: via: "https://opensource.com/article/22/2/migrate-application-containers" -[#]: author: "Alan Smithee https://opensource.com/users/alansmithee" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -5 steps to migrate your application to containers -====== -If you're new to containers, don't be intimidated by terminology. These -key principles will help you migrate your application to the cloud. -![A person holding on to clouds that look like balloons][1] - -Generally, you consider it a good thing when people want to use your application. However, when the application runs on a server, there's a cost for popularity. With users come increased demands on resources, and at some point, you may find that you need to scale your app. One option is to throw more servers at the problem, establish a [load balancer][2] like Nginx, and let the demand sort itself out. That option can be expensive, though, because there are no savings when demand is low, and you're running instances of your app on servers devoid of traffic. Containers have the advantage of being ephemeral, launching when new instances are available and fading away with decreased demand. If that sounds like a feature you need, then it may be time to migrate your app to containers. - -Migrating an app to a container can quickly become disorienting. While the environment within a container may feel familiar, many container images are minimal, and they are designed to be stateless. In a way, though, this is one of the strengths of containers. Like a Python virtual environment, it's a blank slate that lets you build (or rebuild) your application without the invisible defaults that many other environments provide. - -Every migration is unique, but here are a few important principles you should address before porting your application to containers. - -### 1\. Understand your dependencies - -Porting your application to a container is an excellent opportunity to get to know what your app actually depends upon. With very few default installs of all but the most essential system components, your application is unlikely to run within a container at first. - -Before refactoring, identify your dependencies. Start with a `grep` through your source code for `include` or `import` or `require` or `use` or whatever keyword your language of choice uses to declare dependencies. - - -``` - - -$ find ~/Code/myproject -type f \ --iname ".java" \ --exec grep import {} \; - -``` - -It may not be enough to identify just language-specific libraries you use, though. Audit dependencies, so you know whether there are low-level libraries required for the language itself to run or a specific module to function as expected. - -### 2\. Evaluate your data storage - -Containers are stateless, and when one crashes or otherwise stops running, that instance of the container is gone forever. If you were to save data in that container, the data would also disappear. If your application stores user data, all storage must occur outside of the container, in some location accessible to an instance of your application. - -You can use local storage mapped to a location within your container for simple application configuration files. This is a common technique for web apps that require the administrator to provide simple config values, such as an admin email address, a website title, and so on. For example: - - -``` - - -$ podman run \ -\--volume /local/data:/storage:Z \ -mycontainer - -``` - -However, you can configure a database like MariaDB or PostgreSQL as shared storage across several containers for large amounts of data. For private information, such as passwords, [you can configure a `secret`][3]. - -**[ Download our [MariaDB cheat sheet][4] ]** - -Regarding how you need to refactor your code, you must adapt the storage locations accordingly. This might mean changing paths to new container storage mappings, ports to different database destinations, or even incorporating container-specific modules. - -### 3\. Prepare your Git repo - -Containers generally pull source code from a Git repository as they get built. You must have a plan for managing your Git repository once it becomes the canonical source of production-ready code for your application. Have a release or production branch, and consider using [Git hooks][5] to reject accidental unapproved commits. - -### 4\. Know your build system - -Containerized applications probably don't have traditional release cycles. They're pulled from Git when a container gets built. You can initiate any number of build systems as part of your container build, but that might mean adjusting your build system to be more automated than it used to be. You should refactor your build process such that you have total confidence that it works completely unattended. - -### 5\. Build an image - -Building an image doesn't have to be a complex task. You can use [existing container images][6] as a basis, adapting them with a simple Dockerfile. Alternately, you can build your own from scratch using [Buildah][7]. - -The process of building a container is, in a way, as much a part of development as actually refactoring your code. It's the container build that obtains, assembles, and executes your app, so the process must be automated and robust. Build a good image, and you're building a solid and reliable foundation for your app. - -### Containerize it - -If you're new to containers, don't be intimidated by terminology. A container is just another environment. The perceived constraints of containerized development can actually help you focus your application and better understand how it runs, what it needs to run reliably, and what potential risks there are when something goes wrong. Conversely, this results in far fewer constraints for sysadmins installing and running your app because containers are, by nature, a controlled environment. Review your code carefully, understand what your app needs, and refactor it accordingly. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/2/migrate-application-containers - -作者:[Alan Smithee][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/alansmithee -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/business_clouds.png?itok=IRsi1qOF (A person holding on to clouds that look like balloons) -[2]: https://opensource.com/article/21/4/load-balancing -[3]: https://www.redhat.com/sysadmin/new-podman-secrets-command -[4]: https://opensource.com/downloads/mariadb-mysql-cheat-sheet -[5]: http://redhat.com/sysadmin/git-hooks -[6]: https://www.redhat.com/sysadmin/top-container-images -[7]: https://opensource.com/article/22/1/build-your-own-container-scratch From 1fa9c144bfd62a21c6d38f903307bee4df1a98a6 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Mon, 14 Feb 2022 23:00:09 +0800 Subject: [PATCH 290/334] Update identify.sh --- scripts/check/identify.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check/identify.sh b/scripts/check/identify.sh index 06fb204b32..7223756380 100644 --- a/scripts/check/identify.sh +++ b/scripts/check/identify.sh @@ -72,7 +72,7 @@ rule_published_translation_revised() { # 一步翻译发布 rule_onestep() { [ "$SRC_D" -eq 1 ] && [ "$PUB_A" -eq 1 ] \ - && ensure_identical SRC D PUB A \ + && ensure_identical SRC D PUB A 1 \ && check_category SRC D \ && check_category PUB A \ && [ "$TOTAL" -eq 2 ] && echo "匹配规则:一步翻译发布" From acd578712b607994bb8008cd609ea42bc6d543e6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 14 Feb 2022 23:02:56 +0800 Subject: [PATCH 291/334] P --- ...0220208 5 steps to migrate your application to containers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20220208 5 steps to migrate your application to containers.md b/published/20220208 5 steps to migrate your application to containers.md index 7e84e9ff9a..549c407c0e 100644 --- a/published/20220208 5 steps to migrate your application to containers.md +++ b/published/20220208 5 steps to migrate your application to containers.md @@ -66,7 +66,7 @@ $ podman run \ ### 容器化 -如果你是容器的新手,不要被术语所吓倒。容器只是另一种环境。容器化开发的感知约束实际上可以帮助你专注于你的应用程序,并更好地了解它是如何运行的、它需要什么才能可靠地运行,以及当出错时有哪些潜在的风险。相反,这导致系统管理员在安装和运行你的应用程序时受到的限制要少得多,因为从本质上讲,容器是一个受控的环境。仔细审查你的代码,了解你的应用程序需要什么,并相应地重构它。 +如果你是容器的新手,不要被这些术语所吓倒。容器只是另一种环境。容器化开发的感知约束实际上可以帮助你专注于你的应用程序,并更好地了解它是如何运行的、它需要什么才能可靠地运行,以及当出错时有哪些潜在的风险。相反,这导致系统管理员在安装和运行你的应用程序时受到的限制要少得多,因为从本质上讲,容器是一个受控的环境。仔细审查你的代码,了解你的应用程序需要什么,并相应地重构它。 -------------------------------------------------------------------------------- From 423560d93f5cb9c33ada0f7bdf848fd5c3faef73 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Mon, 14 Feb 2022 23:08:25 +0800 Subject: [PATCH 292/334] Update identify.sh --- scripts/check/identify.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/check/identify.sh b/scripts/check/identify.sh index 7223756380..1eeaf8fb28 100644 --- a/scripts/check/identify.sh +++ b/scripts/check/identify.sh @@ -74,7 +74,6 @@ rule_onestep() { [ "$SRC_D" -eq 1 ] && [ "$PUB_A" -eq 1 ] \ && ensure_identical SRC D PUB A 1 \ && check_category SRC D \ - && check_category PUB A \ && [ "$TOTAL" -eq 2 ] && echo "匹配规则:一步翻译发布" } From d4066b91076631aa347356f8c7e3a7c94110ce28 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 14 Feb 2022 23:09:31 +0800 Subject: [PATCH 293/334] R --- ...0220208 5 steps to migrate your application to containers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20220208 5 steps to migrate your application to containers.md b/published/20220208 5 steps to migrate your application to containers.md index 549c407c0e..71a23f0f35 100644 --- a/published/20220208 5 steps to migrate your application to containers.md +++ b/published/20220208 5 steps to migrate your application to containers.md @@ -62,7 +62,7 @@ $ podman run \ 构建镜像不一定是复杂的任务。你可以使用 [现有的容器镜像][6] 作为基础,用一个简单的 Docker 文件对其进行调整。另外,你也可以使用 [Buildah][7] 从头开始构建你自己的镜像。 -在某种程度上,构建容器的过程与实际重构代码一样,都是开发的一部分。容器的构建是为了获取、组装和执行你的应用程序,所以这个过程必须是自动化的、健壮的。建立一个好的镜像,你就为你的应用程序建立了一个坚实可靠的基础。 +在某种程度上,构建容器的过程与实际重构代码一样,都是开发的一部分。容器的构建是为了获取、组装和执行你的应用程序,所以这个过程必须是自动化的、健壮的。建立一个好的镜像,就为你的应用程序建立了一个坚实可靠的基础。 ### 容器化 From 9d7a8cef03702fac59896342fb8b312456467dd4 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 14 Feb 2022 23:23:39 +0800 Subject: [PATCH 294/334] RP @geekpi https://linux.cn/article-14274-1.html --- ...stomize your shell prompt with Starship.md | 50 +++++++------------ 1 file changed, 17 insertions(+), 33 deletions(-) rename {translated/tech => published}/20220207 Customize your shell prompt with Starship.md (79%) diff --git a/translated/tech/20220207 Customize your shell prompt with Starship.md b/published/20220207 Customize your shell prompt with Starship.md similarity index 79% rename from translated/tech/20220207 Customize your shell prompt with Starship.md rename to published/20220207 Customize your shell prompt with Starship.md index 9691c70a0d..ba2c3bfd31 100644 --- a/translated/tech/20220207 Customize your shell prompt with Starship.md +++ b/published/20220207 Customize your shell prompt with Starship.md @@ -3,16 +3,18 @@ [#]: author: "Moshe Zadka https://opensource.com/users/moshez" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14274-1.html" 用 Starship 定制你的 shell 提示符 ====== -控制你的提示符,让你需要的所有信息触手可及。 -![Cosmic stars in outer space][1] -没有什么比我忘记在我的 Git 仓库中 `git add` 文件更让我恼火的了。我在本地测试,提交,然后推送,却发现在持续集成阶段失败了。更糟糕的是,我在 `main` 分支而不是特性分支上,并不小心推送到它。最好的情况是,因为分支保护而失败,我需要做一些操作才能把改动推送到一个分支。更糟糕的是,我没有正确配置分支保护,不小心直接推送到了 `main`。 +> 控制你的提示符,让你需要的所有信息触手可及。 + +![](https://img.linux.net.cn/data/attachment/album/202202/14/232227pkh7bxi1a9asbfd5.jpg) + +没有什么比我忘记在我的 Git 仓库中 `git add` 文件更让我恼火的了。我在本地测试,提交,然后推送,却发现在持续集成阶段失败了。更糟糕的是,我在 `main` 分支而不是特性分支上,并不小心推送到它。最好的情况是,因为分支保护而失败,我需要做一些操作才能把改动推送到一个分支。更糟糕的是,我没有正确配置分支保护,不小心直接推送到了 `main` 分支。 如果这些信息能在提示中直接获得,那不是很好吗? @@ -24,78 +26,60 @@ ### 安装 Starship -Starship 的初始设置只需要两个步骤:安装和配置你的 shell。安装可以很简单: - +Starship 的初始设置只需要两个步骤:安装并配置你的 shell。安装可以很简单: ``` -`$ curl -fsSL https://starship.rs/install.sh` +$ curl -fsSL https://starship.rs/install.sh ``` 阅读安装脚本,确保你理解它的作用,然后让它可执行并运行它: - ``` - - $ chmod +x install.sh $ ./install.sh - ``` -还有其他的安装方法,在网站上有介绍。你可以在构建镜像的步骤中设置虚拟机或容器。 +还有其他的安装方法,在其网站上有介绍。你可以在构建镜像的步骤中设置虚拟机或容器。 ### 配置 Starship 下一步是配置你的 shell 来使用它。要一次性尝试,假设 shell 是 `bash` 或 `zsh`,请运行以下命令: - ``` -`$ eval "$(starship init $(basename $SHELL))"` +$ eval "$(starship init $(basename $SHELL))" ``` -你的提提示符立即改变: - +你的提示符立即改变: ``` - - localhost in myproject on  master -> - +> ``` 如果你喜欢你所看到的,把 `eval "$(starship init $(basename $SHELL))"` 添加到你的 shell 的 `rc` 文件中,使其永久化。 ### 自定义 Starship -默认安装假定你可以安装“书呆子字体”,例如 [Fantasque Sans Mono][2]。 特别是,你需要一种带有来自 Unicode 的“私有实现”部分的字形的字体。 +默认安装假定你可以安装“电脑迷字体”,例如 [Fantasque Sans Mono][2]。 特别是,你需要一种带有来自 Unicode 的“私有实现”部分的字形的字体。 这在控制终端时非常有效,但有时,终端的配置并不容易。例如,当使用一些浏览器内的 shell 抽象时,配置浏览器的字体可能是不太容易的。 -码位的最大用户是 Git 集成,它使用一个特殊的自定义符号来表示“分支”。禁用它可以通过使用文件 `~/.config/starship.toml` 来配置 `starship.rs`。 +该码位的最大用户是 Git 集成,它使用一个特殊的自定义符号来表示“分支”。禁用它可以通过使用文件 `~/.config/starship.toml` 来配置 `starship.rs`。 禁用分支符号是通过配置 `git_branch` 部分的 `format` 变量完成的: - ``` - - [git_branch] format = "on [$branch]($style) " - ``` `starship.rs` 的一个好处是,改变配置会立即生效。保存文件,按下**回车**,看看字体是否符合预期。 还可以配置提示符中不同部分的颜色。例如,如果 Python 部分的亮黄色在白色背景上有点难看,你可以配置为蓝色: - ``` - - [python] style = "blue bold" - ``` 许多语言都有配置支持,包括 Go、.NET 和 JavaScript。还支持显示命令的持续时间(只针对耗时超过阈值的命令)等。 @@ -111,7 +95,7 @@ via: https://opensource.com/article/22/2/customize-prompt-starship 作者:[Moshe Zadka][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 5b66b051b3dc90b71c6f5e524dc3d3756a90fd5d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 15 Feb 2022 05:02:26 +0800 Subject: [PATCH 295/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220215=20?= =?UTF-8?q?Kile:=20An=20Interactive=20Cross-Platform=20LaTeX=20Editor=20by?= =?UTF-8?q?=20KDE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220215 Kile- An Interactive Cross-Platform LaTeX Editor by KDE.md --- ...tive Cross-Platform LaTeX Editor by KDE.md | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 sources/tech/20220215 Kile- An Interactive Cross-Platform LaTeX Editor by KDE.md diff --git a/sources/tech/20220215 Kile- An Interactive Cross-Platform LaTeX Editor by KDE.md b/sources/tech/20220215 Kile- An Interactive Cross-Platform LaTeX Editor by KDE.md new file mode 100644 index 0000000000..6d9cc9a7ec --- /dev/null +++ b/sources/tech/20220215 Kile- An Interactive Cross-Platform LaTeX Editor by KDE.md @@ -0,0 +1,123 @@ +[#]: subject: "Kile: An Interactive Cross-Platform LaTeX Editor by KDE" +[#]: via: "https://itsfoss.com/kile/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Kile: An Interactive Cross-Platform LaTeX Editor by KDE +====== + +_**Brief: Kile is one of the best LaTeX editors available for Linux, by KDE. What does it offer? Let us take a look.**_ + +You can use a TeX/LaTeX editor for a variety of documents. Not just limited to scientific research, you can also add your code, start writing a book (academic/creative), or draft articles. + +An interactive solution with the option for preview, and several features, should come in handy if you regularly work with LaTeX documents. + +Kile is one such option by KDE, available for Linux and other platforms. In fact, it is one of the [best LaTeX editors available for Linux][1], which we decided to highlight separately. + +### An Open-Source Integrated LaTeX Editor + +![][2] + +Kile may not be the most popular option, but it certainly stands out for what it offers. + +It may not be the perfect fit if you are looking for a simple LaTeX Editor. However, it does its best to present you with a user-friendly experience while guiding you from the start. + +Let me highlight some features below. + +### Features of Kile + +![][3] + +As I mentioned, Kile is a feature-rich LaTeX editor. It could be overwhelming if you are new to TeX/LaTeX documents, but it is still worth exploring. + +The key features include: + + * Setup wizard to easily start using LaTeX editor. + * Available templates to save time for the document outline. + * Auto-completion of LaTeX commands. + * Compile and preview your document in a single click without leaving the window. + * Hundreds of preset modes to define the type of document (JSON, R Documentation, VHDL, HTML, etc.) + * Log viewer + * Ability to convert documents . + * PDF Wizard tool to add/remove and convert PDF files. + * Inverse and Forward search feature. + * Create projects to organize a collection of documents. + * Plenty of LaTeX options to add the required commands without typing anything (like creating a bullet list, adding a math function, etc.) + * Easy to navigate through chapters or sections. + * Navigate through the entire document using the small preview (if the document is too large to scroll) + + + +![][4] + +In addition to these, you can configure the appearance, tweak the keyboard shortcuts, find various encoding support, and more. + +Furthermore, the presence of setup wizards (and other wizards within the app) makes the user experience a breeze. + +For instance, here’s how it looks when you first launch the app: + +![][5] + +It will check for any configuration issues and help you ensure a seamless experience. + +![][6] + +Once the setup is complete, it will quickly prompt you with the available templates to get you started: + +![][7] + +So, the guided setup and all the aforementioned features should make up for an excellent LaTeX editing experience. + +### Install Kile in Linux + +You should find Kile in the default Linux repositories and the software center. For KDE, you should see it listed in Discover. + +Unfortunately, it does not offer a Flatpak or a Snap package. So, you will have to rely on the standard packages available from repos. + +In case you rely on the terminal (Ubuntu-based), you can install it by typing: + +``` + + sudo apt install kile + +``` + +For Windows users, you can find it listed in the [Microsoft Store][8]. + +If you are curious, you can go through the [source code][9] or visit the official site. + +[Kile][10] + +### Wrapping Up + +As a LaTeX user, you should find all the options useful for a productive editing experience. If you are new to TeX/LaTeX documents, you can still use it with templates, quick functions, auto-completion features to make the experience easy. + +What is your favorite LaTeX document editor? Feel free to let me know in the comments below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/kile/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/latex-editors-linux/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-latex-editor.png?resize=800%2C450&ssl=1 +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-latex.png?resize=800%2C534&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-settings.png?resize=732%2C588&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-setup.png?resize=800%2C682&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-setup-1.png?resize=800%2C757&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-templates.png?resize=800%2C652&ssl=1 +[8]: https://www.microsoft.com/en-in/p/kile/9pmbng78pfk3?rtc=1&activetab=pivot:overviewtab +[9]: https://invent.kde.org/office/kile +[10]: https://apps.kde.org/kile/ From 60261e90daf10c8177208e1c18a2e0952e14f9b9 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 15 Feb 2022 05:02:40 +0800 Subject: [PATCH 296/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220214=20?= =?UTF-8?q?A=20guide=20to=20Kubernetes=20architecture?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220214 A guide to Kubernetes architecture.md --- ...0214 A guide to Kubernetes architecture.md | 183 ++++++++++++++++++ 1 file changed, 183 insertions(+) create mode 100644 sources/tech/20220214 A guide to Kubernetes architecture.md diff --git a/sources/tech/20220214 A guide to Kubernetes architecture.md b/sources/tech/20220214 A guide to Kubernetes architecture.md new file mode 100644 index 0000000000..2f3ce6fc63 --- /dev/null +++ b/sources/tech/20220214 A guide to Kubernetes architecture.md @@ -0,0 +1,183 @@ +[#]: subject: "A guide to Kubernetes architecture" +[#]: via: "https://opensource.com/article/22/2/kubernetes-architecture" +[#]: author: "Nived Velayudhan https://opensource.com/users/nivedv" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +A guide to Kubernetes architecture +====== +Learn how the different components of Kubernetes architecture fit +together so you can be better equipped to diagnose problems, maintain a +healthy cluster, and optimize your own workflow. +![Parts, modules, containers for software][1] + +You use Kubernetes to orchestrate containers. It's an easy description to say, but understanding what that actually means and how you accomplish it is another matter entirely. If you're running or managing a Kubernetes cluster, then you know that Kubernetes consists of one computer that gets designated as the _control plane_, and lots of other computers that get designated as _worker nodes_. Each of these has a complex but robust stack making orchestration possible, and getting familiar with each component helps understand how it all works. + +![Kubernetes architecture diagram][2] + +(Nived Velayudhan, [CC BY-SA 4.0][3]) + +### Control plane components + +You install Kubernetes on a machine called the control plane. It's the one running the Kubernetes daemon, and it's the one you communicate with when starting containers and pods. The following sections describe the control plane components. + +#### Etcd + +Etcd is a fast, distributed, and consistent key-value store used as a backing store for persistently storing Kubernetes object data such as pods, replication controllers, secrets, and services. Etcd is the only place where Kubernetes stores cluster state and metadata. The only component that talks to etcd directly is the Kubernetes API server. All other components read and write data to etcd indirectly through the API server. + +Etcd also implements a watch feature, which provides an event-based interface for asynchronously monitoring changes to keys. Once you change a key, its watchers get notified. The API server component heavily relies on this to get notified and move the current state of etcd towards the desired state. + +_Why should the number of etcd instances be an odd number?_ + +You would typically have three, five, or seven etcd instances running in a high-availability (HA) environment, but why? Because etcd is a distributed data store. It is possible to scale it horizontally but also you need to ensure that the data in each instance is consistent, and for this, your system needs to reach a consensus on what the state is. Etcd uses the [RAFT consensus algorithm][4] for this. + +The algorithm requires a majority (or quorum) for the cluster to progress to the next state. If you have only two ectd instances and either of them fails, the etcd cluster can't transition to a new state because no majority exists. If you have three ectd instances, one instance can fail but still have a majority of instances available to reach a quorum. + +#### API server + +The API server is the only component in Kubernetes that directly interacts with etcd. All other components in Kubernetes must go through the API server to work with the cluster state, including the clients (kubectl). The API server has the following functions: + + * Provides a consistent way of storing objects in etcd. + * Performs validation of those objects so clients can't store improperly configured objects (which could happen if they write directly to the etcd datastore). + * Provides a RESTful API to create, update, modify, or delete a resource. + * Provides [optimistic concurrency locking][5], so other clients never override changes to an object in the event of concurrent updates. + * Performs authentication and authorization of a request that the client sends. It uses the plugins to extract the client's username, user ID, groups the user belongs to, and determine whether the authenticated user can perform the requested action on the requested resource. + * Responsible for [admission control][6] if the request is trying to create, modify, or delete a resource. For example, AlwaysPullImages, DefaultStorageClass, and ResourceQuota. + * Implements a watch mechanism (similar to etcd) for clients to watch for changes. This allows components such as the Scheduler and Controller Manager to interact with the API Server in a loosely coupled manner. + + + +#### Controller Manager + +In Kubernetes, controllers are control loops that watch the state of your cluster, then make or request changes where needed. Each controller tries to move the current cluster state closer to the desired state. The controller tracks at least one Kubernetes resource type, and these objects have a spec field that represents the desired state. + +Controller examples: + + * Replication Manager (a controller for ReplicationController resources) + * ReplicaSet, DaemonSet, and Job controllers + * Deployment controller + * StatefulSet controller + * Node controller + * Service controller + * Endpoints controller + * Namespace controller + * PersistentVolume controller + + + +Controllers use the watch mechanism to get notified of changes. They watch the API server for changes to resources and perform operations for each change, whether it's a creation of a new object or an update or deletion of an existing object. Most of the time, these operations include creating other resources or updating the watched resources themselves. Still, because using watches doesn't guarantee the controller won't miss an event, they also perform a re-list operation periodically to ensure they haven't missed anything. + +The Controller Manager also performs lifecycle functions such as namespace creation and lifecycle, event garbage collection, terminated-pod garbage collection, [cascading-deletion garbage collection][7], and node garbage collection. See [Cloud Controller Manager][8] for more information. + +#### Scheduler + +The Scheduler is a control plane process that assigns pods to nodes. It watches for newly created pods that have no nodes assigned. For every pod that the Scheduler discovers, the Scheduler becomes responsible for finding the best node for that pod to run on. + +Nodes that meet the scheduling requirements for a pod get called feasible nodes. If none of the nodes are suitable, the pod remains unscheduled until the Scheduler can place it. Once it finds a feasible node, it runs a set of functions to score the nodes, and the node with the highest score gets selected. It then notifies the API server about the selected node. They call this process binding. + +The selection of nodes is a two-step process: + + 1. Filtering the list of all nodes to obtain a list of acceptable nodes to which you can schedule the pod (for example, the PodFitsResources filter checks whether a candidate node has enough available resources to meet a pod's specific resource requests). + 2. Scoring the list of nodes obtained from the first step and ranking them to choose the best node. If multiple nodes have the highest score, a round-robin process ensures the pods get deployed across all of them evenly. + + + +Factors to consider for scheduling decisions include: + + * Does the pod request hardware/software resources? Is the node reporting a memory or a disk pressure condition? + * Does the node have a label that matches the node selector in the pod specification? + * If the pod requests binding to a specific host port, is that port available? + * Does the pod tolerate the taints of the node? + * Does the pod specify node affinity or anti-affinity rules? + + + +The Scheduler doesn't instruct the selected node to run the pod. All the Scheduler does is update the pod definition through the API server. The API server then notifies the kubelet that the pod got scheduled through the watch mechanism. Then the kubelet service on the target node sees that the pod got scheduled to its node, it creates and runs the pod's containers. + +**[ Read next: [How Kubernetes creates and runs containers: An illustrated guide][9] ]** + +### Worker node components + +Worker nodes run the kubelet agent, which permits them to get recruited by the control plane to process jobs. Similar to the control plane, the worker node uses several different components to make this possible. The following sections describe the worker node components. + +#### Kubelet + +Kubelet is an agent that runs on each node in the cluster and is responsible for everything running on a worker node. It ensures that the containers run in the pod. + +The main functions of kubelet service are: + + * Register the node it's running on by creating a node resource in the API server. + * Continuously monitor the API server for pods that got scheduled to the node. + * Start the pod's containers by using the configured container runtime. + * Continuously monitor running containers and report their status, events, and resource consumption to the API server. + * Run the container liveness probes, restart containers when the probes fail and terminate containers when their pod gets deleted from the API server (notifying the server about the pod termination). + + + +#### Service proxy + +The service proxy (kube-proxy) runs on each node and ensures that one pod can talk to another pod, one node can talk to another node, and one container can talk to another container. It is responsible for watching the API server for changes on services and pod definitions to maintain that the entire network configuration is up to date. When a service gets backed by more than one pod, the proxy performs load balancing across those pods. + +The kube-proxy got its name because it began as an actual proxy server that used to accept connections and proxy them to the pods. The current implementation uses iptables rules to redirect packets to a randomly selected backend pod without passing them through an actual proxy server. + +A high-level view of how it works: + + * When you create a service, a virtual IP address gets assigned immediately. + * The API server notifies the kube-proxy agents running on worker nodes that a new service exists. + * Each kube-proxy makes the service addressable by setting up iptables rules, ensuring each service IP/port pair gets intercepted and the destination address gets modified to one of the pods that back the service. + * Watches the API server for changes to services or its endpoint objects. + + + +#### Container runtime + +There are two categories of container runtimes: + + * **Lower-level container runtimes:** These focus on running containers and setting up the namespace and cgroups for containers. + * **Higher-level container runtimes (container engine):** These focus on formats, unpacking, management, sharing of images, and providing APIs for developers. + + + +Container runtime takes care of: + + * Pulls the required container image from an image registry if it's not available locally. + * Extracts the image onto a copy-on-write filesystem and all the container layers overlay to create a merged filesystem. + * Prepares a container mount point. + * Sets the metadata from the container image like overriding CMD, ENTRYPOINT from user inputs, and sets up SECCOMP rules, ensuring the container runs as expected. + * Alters the kernel to assign isolation like process, networking, and filesystem to this container. + * Alerts the kernel to assign some resource limits like CPU or memory limits. + * Pass system call (syscall) to the kernel to start the container. + * Ensures that the SElinux/AppArmor setup is proper. + + + +### Working together + +System-level components work together to ensure that each part of a Kubernetes cluster can realize its purpose and perform its functions. It can sometimes be overwhelming (when you're deep into editing a [YAML file)][10] to understand how your requests get communicated within your cluster. Now that you have a map of how the pieces fit together, you can better understand what's happening inside Kubernetes, which helps you diagnose problems, maintain a healthy cluster, and optimize your own workflow. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/kubernetes-architecture + +作者:[Nived Velayudhan][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/nivedv +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/containers_modules_networking_hardware_parts.png?itok=rPpVj92- (Parts, modules, containers for software) +[2]: https://opensource.com/sites/default/files/uploads/kubernetes-architecture-diagram.png (Kubernetes architecture diagram) +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://www.geeksforgeeks.org/raft-consensus-algorithm/ +[5]: https://stackoverflow.com/questions/52910322/kubernetes-resource-versioning#:~:text=Optimistic%20concurrency%20control%20(sometimes%20referred,updated%2C%20the%20version%20number%20increases. +[6]: https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/ +[7]: https://kubernetes.io/docs/concepts/architecture/garbage-collection/ +[8]: https://kubernetes.io/docs/concepts/architecture/cloud-controller/ +[9]: https://www.redhat.com/architect/how-kubernetes-creates-runs-containers +[10]: https://www.redhat.com/sysadmin/yaml-beginners From 09027a5cdf19f20742b1a3654f9c102e13ead6fa Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 15 Feb 2022 05:02:50 +0800 Subject: [PATCH 297/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220214=20?= =?UTF-8?q?How=20I=20configure=20Vim=20as=20my=20default=20editor=20on=20L?= =?UTF-8?q?inux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220214 How I configure Vim as my default editor on Linux.md --- ...igure Vim as my default editor on Linux.md | 111 ++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 sources/tech/20220214 How I configure Vim as my default editor on Linux.md diff --git a/sources/tech/20220214 How I configure Vim as my default editor on Linux.md b/sources/tech/20220214 How I configure Vim as my default editor on Linux.md new file mode 100644 index 0000000000..a6b8764302 --- /dev/null +++ b/sources/tech/20220214 How I configure Vim as my default editor on Linux.md @@ -0,0 +1,111 @@ +[#]: subject: "How I configure Vim as my default editor on Linux" +[#]: via: "https://opensource.com/article/22/2/configure-vim-default-editor" +[#]: author: "David Both https://opensource.com/users/dboth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How I configure Vim as my default editor on Linux +====== +Vim is my favorite editor. These changes to my system make Vim available +as the default in programs that use a different editor by default. +![Person using a laptop][1] + +I have used Linux for about 25 years and Unix for a few years before that. During that time, I have developed preferences for some tools that I use daily. One of the most important tools I use is the Vim editor. + +I started using Vi when I learned Solaris in the early ‘90s because I was told that it would always be available on any system, which is true in my experience. I have tried other editors, and they all do the job. However, I find that Vim works best for me, and I use it so much that my Vim muscle memory causes me to attempt to use its command keystrokes even with other editors. + +Plus, I just really like Vim. + +Many configuration files use Vi instead of Vim, and you can run the `vi` command. However, the `vi` command is a link to `vim`. + +Many Linux tools use editors that emulate or just call [Nano][2], [Emacs][3], or Vim. Some other tools allow users—like those with clear preferences—to link to their favorite editor. The two examples that affected me the most were Bash command-line editing, which defaults to Emacs, and the Alpine text-mode email client, which defaults to the Pico editor. In fact, the Pico editor was written explicitly for use in the Pine email client, which is the predecessor to Alpine. + +Not all programs that use external editors are configurable. Some use only the editor specified by the developer. For those applications that are configurable, there are different methods for selecting your preferred editor. + +### Linux command-line editing + +Besides actually editing text files, the other tool I use that requires the most editing is the Bash shell. The default Bash editor is Emacs. Although I have used Emacs, I definitely prefer Vim. So many years ago, I switched the default editing style for Bash command-line editing from Emacs to Vim, which is much more comfortable for me. + +There are a couple of ways to configure Bash. You can use a local configuration file, such as `/home/yourhomedirectory/.bashrc`, which only changes the default for your user account and not for other users on the same system. I prefer to make these types of changes global, which basically means my personal account and root. In this second case, you can create your own configuration file and place it in the `/etc/profile.d` directory. + +I added a file named `myBashConfig.sh` to `/etc/profile.d`. There are files for all the installed shells in the `/etc/profile.d` directory. During the launch of a terminal session, each shell reads only the files intended for it based on the file name extensions. For example, the Bash shell only reads the files with a `.sh` extension. + + +``` + + +<SNIP> +alias vim='vim -c "colorscheme desert" ' +# Set vi for bash editing mode +set -o vi +# Set vi as the default editor for all apps that check this +EDITOR=vi +<SNIP> + +``` + +The line **set -o vi** in this global Bash configuration file segment sets Vi as the default editor. The **-o** option on this **set** command defines vi as the editor. You need to close any running Bash sessions and open new ones for this to take effect. + +At this point, you can now use all of your familiar Vim editing commands, including cursor movement. Just press the **Escape** key to enter Vim editing mode. I especially like the ability to use **b** multiple times to move the cursor back multiple words. + +### Set Vim as the default for other programs + +Some Linux command-line tools and programs check the **$EDITOR** environment variable to determine which editor to use. You can check the current value of this variable for yourself using the following command. I did this on one of my newly installed virtual machines to verify what the default actually is. + + +``` + + +# echo $EDITOR +/usr/bin/nano +# + +``` + +By default, Fedora programs that check the **$EDITOR** environment variable will use the Nano editor. Adding the line **EDITOR=vi** as shown in the snippet above to `myBashConfig.sh` changes the default to the Vi (Vim) editor. Not all command-line programs that use an external editor check this environment variable. + +### Edit email in Alpine + +A few weeks ago, I decided that Pico was just not working well for me as my email editor. I could make it work and did for some time after switching to [Alpine][4] from Thunderbird. I found that Pico was getting in my way when I tried to use Vim key sequences, impacting my productivity. + +I read in the Alpine Help that it is possible to change the default editor. I decided to change it to Vim. This is actually very easy to do. + +On the Alpine main menu, press the **S** key to enter setup and then **C** for configuration. In the _Composer Preferences_ section, select the _Enable Alternate Editor Command_ and _Enable Alternate Editor Implicitly_ items with an **X**. Several pages down in the _Advanced User Preferences_ section, find the **Editor** line. It should look like this if it has not already been changed. + + +``` +`Editor    = ` +``` + +Highlight this **Editor** line with the cursor bar, and press **Enter** to edit the line. Change **<No Value Set>** to **vim**, press **Enter**, and then press the **E** key to exit and **Y** to save the changes you have made. + +To edit an email message using Vim, just enter the email body, and Vim starts automatically, just like Pico does. All of my favorite editing capabilities are there because it is actually using Vim. Even the **Esc :wq** sequence to exit Vim is the same. + +### Final thoughts + +I much prefer Vim to other editors, and these changes to my system make it available as the default in programs that use a different editor by default. Some programs use the **$EDITOR** environment variable, so you only need to make that change once. Other programs like Alpine have user configuration options that you must set individually for each program. + +This ability to select your preferred external editor is quite in line with the Unix Philosophy tenet, “Each program should do one thing and do it well.” Why write another editor when there are several perfectly good ones out there? And it also meets the Linux Philosophy tenet, “Use your favorite editor.” + +Of course, you can change your default text-mode editor to Nano, Pico, EMACS, or any other one that you prefer. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/configure-vim-default-editor + +作者:[David Both][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/dboth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) +[2]: https://opensource.com/article/20/12/gnu-nano +[3]: https://opensource.com/tags/emacs +[4]: https://opensource.com/article/21/5/alpine-linux-email From 88c50520a8b51a2a0bfff1769ad6d37853495a4c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 15 Feb 2022 05:03:17 +0800 Subject: [PATCH 298/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220214=20?= =?UTF-8?q?KDE=E2=80=99s=20Dolphin=20File=20Manager=20Finally=20Brings=20R?= =?UTF-8?q?oot=20File=20Operations.=20Here=E2=80=99s=20How=20to=20Use?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220214 KDE-s Dolphin File Manager Finally Brings Root File Operations. Here-s How to Use.md --- ...Root File Operations. Here-s How to Use.md | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 sources/tech/20220214 KDE-s Dolphin File Manager Finally Brings Root File Operations. Here-s How to Use.md diff --git a/sources/tech/20220214 KDE-s Dolphin File Manager Finally Brings Root File Operations. Here-s How to Use.md b/sources/tech/20220214 KDE-s Dolphin File Manager Finally Brings Root File Operations. Here-s How to Use.md new file mode 100644 index 0000000000..aef45439e8 --- /dev/null +++ b/sources/tech/20220214 KDE-s Dolphin File Manager Finally Brings Root File Operations. Here-s How to Use.md @@ -0,0 +1,109 @@ +[#]: subject: "KDE’s Dolphin File Manager Finally Brings Root File Operations. Here’s How to Use" +[#]: via: "https://www.debugpoint.com/2022/02/dolphin-root-access/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +KDE’s Dolphin File Manager Finally Brings Root File Operations. Here’s How to Use +====== +AFTER FIVE YEARS OF MAKING, ROOT FILE OPERATION FINALLY LANDS IN THE +DOLPHIN FILE MANAGER OF KDE PLASMA DESKTOP. HERE’S HOW TO USE DOLPHIN +WITH ROOT ACCESS. +The reason was apparent. Unless you know, the root file operation was the only critical feature not available in the famous Dolphin file manager. The developers didn’t want new users to play around in the file system with root privileges. That is not good for a stable system.  + +You get a prompt below if you try to open Dolphin today with superuser. It is permanently disabled in the Dolphin code for uid=0. + +``` + + Executing Dolphin with sudo is not possible due to unfixable security vulnerabilities. + +``` + +![Dolphin root access – how it behaves today \(before polkit+KIO\)][1] + +### A Little History on Dolphin with superuser privileges + +You may need to access specific removable drives, files, and network shares via file manager at any given workflow, which requires admin privileges. But without the Dolphin built-in support, it is difficult today unless you are experienced enough to try out specific hacks (like below), which have been popular until now.  + +The following famous command executes polkit to give necessary privileges to Dolphin. + +``` + + pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY KDE_SESSION_VERSION=5 KDE_FULL_SESSION=true dolphin + +``` + +The users request the feature [many times][2] via bug reports in [forums][3]. And several controversial extensions are created, such as Open Dolphin as Root () or Root action service menu (). One of them was even reported by users for review. They are very unstable and risky to use because you don’t know what they will do to your system. + + Do not download or use the above two extensions. You may end up with an unstable system. + +### How to use Dolphin as Root + +Now you can forget all these hacks and get to run Dolphin as root out-of-the-box with KDE Framework 5.91. The long-pending feature of implementing Polkit support in the KDE Input/Output library (KIO) is finally implemented and merged.  + +And now, Dolphin and other KDE applications can use KIO to give necessary privileges to perform several non-admin actions.  + +[][4] + +SEE ALSO:   KDE Plasma 5.20 Bringing this Stunning Taskbar Feature in Next Release + +#### Steps + +As of writing this post, this feature is currently in only [Neon Unstable Edition][5] and [openSUSE Krypton][6] due to its nature and [require more testing][7] before being pushed as stable. + +If you are using [KDE Plasma][8] using a privileged account already, you are already running Dolphin as admin. But if you are using an account with limited access to the file system, open or use Dolphin as you used to do. + +Once you try to modify or access any resources or files via Dolphin that you do not have access to, Dolphin will prompt you for an administrator password via KIO. + +To try the code, I tried to modify a file (not admin user) in another user’s (admin) home directory. See the below image. The file opened file. When I am trying to save by the logged-on user (not admin), it prompts for the password which is nothing but the polkit daemon working via KIO and Dolphin. + +![Dolphin root access after KIO with Polkit implementation][9] + +Once you provide the password, you will continue to perform the actions. + +I believe this is a very straightforward approach instead of letting users open Dolphin via root separately. Because this limits users to a specific action via admin privileges. It also minimizes the risk of accidentally changing the file system if the entire Dolphin executable is open as root. And opening Dolphin as sudo would give you the same message as earlier with additional instructions below. + +![Dolphin gives a message while trying to run as a root user][10] + +So, that’s about it. + +### Closing Notes + +Dolphin is undoubtedly the famous and best file manager, but this was the missing piece until today. Resolving the “Open Dolphin as the root” problem is significant because it impacts many users system administrators. Thanks to the entire KDE team to pull this through. + +* * * + +We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][11], [Twitter][12], [YouTube][13], and [Facebook][14] and never miss an update! + +##### Also Read + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/02/dolphin-root-access/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/wp-content/uploads/2022/02/Dolphin-root-access-how-it-behaves-today-before-polkitKIO.jpg +[2]: https://forum.kde.org/viewtopic.php?f=224&t=160993 +[3]: https://askubuntu.com/questions/990611/how-to-run-dolphin-as-root +[4]: https://www.debugpoint.com/2020/06/kde-plasma-5-20-new-taskbar/ +[5]: https://neon.kde.org/download +[6]: http://download.opensuse.org/repositories/KDE:/Medias/images/iso/ +[7]: https://invent.kde.org/frameworks/kio/-/merge_requests/143 +[8]: https://www.debugpoint.com/tag/kde-plasma +[9]: https://www.debugpoint.com/wp-content/uploads/2022/02/Dolphin-root-access-after-KIO-with-Polkit-implementation.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2022/02/Dolphin-gives-a-message-while-trying-to-run-as-root-user.jpg +[11]: https://t.me/debugpoint +[12]: https://twitter.com/DebugPoint +[13]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[14]: https://facebook.com/DebugPoint From 6463c7c4a2e781ff58f764433f1d78135ae33894 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 15 Feb 2022 05:03:42 +0800 Subject: [PATCH 299/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220214=20?= =?UTF-8?q?KDE=E2=80=99s=20Latest=20Move=20Will=20Help=20Raspberry=20Pi=20?= =?UTF-8?q?and=20PinePhone=20Pro=20Users=20Immensely?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220214 KDE-s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely.md --- ...ry Pi and PinePhone Pro Users Immensely.md | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sources/news/20220214 KDE-s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely.md diff --git a/sources/news/20220214 KDE-s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely.md b/sources/news/20220214 KDE-s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely.md new file mode 100644 index 0000000000..80ba1f4915 --- /dev/null +++ b/sources/news/20220214 KDE-s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely.md @@ -0,0 +1,72 @@ +[#]: subject: "KDE’s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely" +[#]: via: "https://news.itsfoss.com/kde-apps-arm/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +KDE’s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely +====== + +KDE recently shared its monthly updates on the latest app developments and progress, as usual. + +While the [Falkon 3.2 release][1] was a significant upgrade, there were several other updates/bug fixes to other KDE applications. + +However, there was one interesting thing about it. + +KDE is starting to make applications available for the ARM Platforms. + +But, what does it mean exactly? Let’s take a look! + +### KDE Apps for ARM: An Exciting Development! + +You can find KDE apps on various repositories, Flatpak, and the Snap store. + +And, KDE chose the Snap store to publish its first Snap for ARM64. + +In other words, KDE applications are making their way as a Snap to the ARM platform. + +Of course, it makes sense for an application to support a variety of platforms and various distributions, all from a single store. + +The first Snap available for ARM64 is [kblocks][2]. + +![][3] + +Considering that it is a classic falling blocks game, and a fun idea, it may not be a big deal for the ARM platform. + +However, if you have a Raspberry Pi or a PinePhone Pro, it should be a good indication to expect more KDE apps optimized for the ARM platform available through the Snap store. + +### The Future with ARM Chips + +Considering the early developments for the ARM platform, I’d say it is good progress when compared to the number of devices available. + +As of now, the Raspberry Pi users and the PinePhone pro users can immediately benefit from new KDE applications. + +As we start to see more ARM-powered devices or laptops, you should expect almost everyone to start prepping for ARM. + +Hopefully, the Linux platform and its applications will be ready for the ARM platform when the time comes. + +We should avoid a situation like Apple’s M1 series, where the performance makes a big difference without having a proper app ecosystem available. + +_What do you think about KDE apps available as a Snap for ARM64? Assuming you have a Raspberry Pi or PinePhone Pro, what do you expect for its future?_ + +Let me know your thoughts in the comments below. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/kde-apps-arm/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/falkon-browser-3-2-release/ +[2]: https://snapcraft.io/kblocks +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUxNSIgd2lkdGg9Ijc1NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= From 90f35e500bb57bee831bfd928177e9639e7d6214 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 15 Feb 2022 08:18:36 +0800 Subject: [PATCH 300/334] Rename sources/tech/20220214 KDE-s Dolphin File Manager Finally Brings Root File Operations. Here-s How to Use.md to sources/news/20220214 KDE-s Dolphin File Manager Finally Brings Root File Operations. Here-s How to Use.md --- ...ager Finally Brings Root File Operations. Here-s How to Use.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => news}/20220214 KDE-s Dolphin File Manager Finally Brings Root File Operations. Here-s How to Use.md (100%) diff --git a/sources/tech/20220214 KDE-s Dolphin File Manager Finally Brings Root File Operations. Here-s How to Use.md b/sources/news/20220214 KDE-s Dolphin File Manager Finally Brings Root File Operations. Here-s How to Use.md similarity index 100% rename from sources/tech/20220214 KDE-s Dolphin File Manager Finally Brings Root File Operations. Here-s How to Use.md rename to sources/news/20220214 KDE-s Dolphin File Manager Finally Brings Root File Operations. Here-s How to Use.md From bb154188434ce6efc2ad5e661e10ac6967015725 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 15 Feb 2022 09:18:11 +0800 Subject: [PATCH 301/334] translated --- ...eptable TLS certificate- Error in Linux.md | 107 ------------------ ...eptable TLS certificate- Error in Linux.md | 107 ++++++++++++++++++ 2 files changed, 107 insertions(+), 107 deletions(-) delete mode 100644 sources/tech/20220210 Troubleshooting -Unacceptable TLS certificate- Error in Linux.md create mode 100644 translated/tech/20220210 Troubleshooting -Unacceptable TLS certificate- Error in Linux.md diff --git a/sources/tech/20220210 Troubleshooting -Unacceptable TLS certificate- Error in Linux.md b/sources/tech/20220210 Troubleshooting -Unacceptable TLS certificate- Error in Linux.md deleted file mode 100644 index 2aceef7d42..0000000000 --- a/sources/tech/20220210 Troubleshooting -Unacceptable TLS certificate- Error in Linux.md +++ /dev/null @@ -1,107 +0,0 @@ -[#]: subject: "Troubleshooting “Unacceptable TLS certificate” Error in Linux" -[#]: via: "https://itsfoss.com/unacceptable-tls-certificate-error-linux/" -[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Troubleshooting “Unacceptable TLS certificate” Error in Linux -====== - -When it comes to SSL/TLS certificates, you may come across a variety of issues, some related to the browser or a problem in a website’s back-end. - -One such error is “Unacceptable TLS certificate” in Linux. - -Unfortunately, there’s no “one-solves-it-all’ answer to this. However, there are some potential solutions that you can try, and here, I plan to highlight those for you. - -### When do you encounter this TLS Certificate issue? - -![][1] - -In my case, I noticed the issue when adding the Flathub repository via the terminal, a step that lets you access the massive collection of Flatpaks when [setting up Flatpak][2]. - -However, you can also expect to encounter this error when installing a Flatpak app or using a Flatpak ref file from a third-party repository via the terminal. - -Some users noticed this issue when using their organization’s recommended VPN service for work on Linux. - -So, how do you fix it? Why is this a problem? - -Well, technically, it’s either of two things: - - * Your system does not accept the certificate (and tells that it’s invalid). - * The certificate does not match the domain the user connects to. - - - -If it’s the second, you will have to reach out to the website’s administrator and fix it from their end. - -But if it’s the first, you have a couple of ways to deal with it. - -### 1\. Fix “Unacceptable TLS certificate” when using Flatpak or adding GNOME Online Accounts - -If you are trying to add Flathub remote or a new Flatpak application and notice the error in the terminal, you can simply type in: - -``` - - sudo apt install --reinstall ca-certificates - -``` - -This should re-install the trusted CA certificates, in case there has been an issue with the list in some way. - -![][3] - -In my case, when trying to add the Flathub repository, I encountered the error, which was resolved by typing the above command in the terminal. - -So, I think that any Flatpak-related issues with TLS certificates can be fixed using this method. - -### 2\. Fix “Unacceptable TLS certificate” when using Work VPN - -If you are using your organization’s VPN to access materials related to work, you might have to add the certificate to the list of trusted CAs in your Linux distro. - -Do note that you need the VPN service or your organization’s administrator to share the .CRT version of the root certificate to get started. - -Next, you will need to navigate your way to **/usr/local/share/ca-certificates** directory. - -You can create a directory under it and use any name to identify your organization’s certificate. And, then add the .CRT file to that directory. - -For instance, its usr/local/share/ca-certificates/organization/xyz.crt - -Do note that you need root privileges to add certificates or make a directory under the **ca-certificates** directory. - -Once you have added the necessary certificate, all you have to do is update the certificate support list by typing in: - -``` - - sudo update-ca-certificates - -``` - -And, the certificate should be treated valid by your system whenever you try to connect to your company’s VPN. - -### Wrapping Up - -An unacceptable TLS certificate is not a common error, but you can find it in various use cases, such as connecting to GNOME Online accounts. - -If the error cannot be resolved by two of these methods, it is possible that the domain/service you are connecting to has a configuration error. In that case, you will have to contact them to fix the issue. - -Have you faced this error anytime? How did you fix it? Are you aware of other solutions to this problem (potentially, something that’s easy to follow)? Let me know your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/unacceptable-tls-certificate-error-linux/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/unacceptable-tls-certificate.png?resize=800%2C450&ssl=1 -[2]: https://itsfoss.com/flatpak-guide/ -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/tls-certificate-troubleshoot.png?resize=800%2C506&ssl=1 diff --git a/translated/tech/20220210 Troubleshooting -Unacceptable TLS certificate- Error in Linux.md b/translated/tech/20220210 Troubleshooting -Unacceptable TLS certificate- Error in Linux.md new file mode 100644 index 0000000000..e79ad910ce --- /dev/null +++ b/translated/tech/20220210 Troubleshooting -Unacceptable TLS certificate- Error in Linux.md @@ -0,0 +1,107 @@ +[#]: subject: "Troubleshooting “Unacceptable TLS certificate” Error in Linux" +[#]: via: "https://itsfoss.com/unacceptable-tls-certificate-error-linux/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +在 Linux 中解决 “Unacceptable TLS certificate” 的问题 +====== + +当涉及到 SSL/TLS 证书时,你可能会遇到各种问题,有些与浏览器有关,有些则是网站后台的问题。 + +其中一个错误是 Linux 中的 “Unacceptable TLS certificate”。 + +不幸的是,对此没有“一劳永逸”的答案。然而,有一些潜在的解决方案,你可以尝试,在此,我打算为你强调这些。 + +### 你什么时候会遇到这个 TLS 证书问题? + +![][1] + +在我的例子中,我是在通过终端添加 Flathub 仓库时注意到这个问题的,这个步骤可以让你在[设置 Flatpak][2] 时访问大量的 Flatpaks 的集合。 + +然而,在安装 Flatpak 应用或通过终端使用来自第三方仓库的 Flatpak 参考文件时,你也可能会遇到这个错误。 + +一些用户在 Linux 上使用他们组织推荐的 VPN 服务工作时注意到这个问题。 + +那么,如何解决这个问题呢?为什么这是一个问题? + +嗯,从技术上讲,这是两件事中的一个: + + * 你的系统不接受该证书(并告诉它是无效的)。 + * 该证书与用户连接的域不匹配。 + + + +如果是第二种情况,你将不得不联系网站的管理员,从他们那里解决这个问题。 + +但是,如果是第一种情况,你有几种方法来处理它。 + +### 1\. 在使用 Flatpak 或添加 GNOME 在线账户时修复 “Unacceptable TLS certificate” + +如果你试图添加 Flathub 远程或一个新的 Flatpak 应用,并在终端中注意到这个错误,你可以简单地输入: + +``` + + sudo apt install --reinstall ca-certificates + +``` + +这应该会重新安装受信任的 CA 证书,以防止列表中出现某种问题。 + +![][3] + +在我的例子中,当试图添加 Flathub 仓库时,我遇到了错误,通过在终端输入上述命令解决了这个问题。 + +所以,我认为任何与 Flatpak 有关的 TLS 证书问题都可以用这个方法解决。 + +### 2\. 在使用工作 VPN 时修复 “Unacceptable TLS certificate” + +如果你使用你的组织的 VPN 来访问与工作有关的材料,你可能要把证书添加到你的 Linux 发行版中的可信 CA 列表中。 + +请注意,你需要 VPN 服务或你组织的管理员分享根证书的 .CRT 版本,才能开始使用。 + +接下来,你将需要进入 **/usr/local/share/ca-certificates** 目录。 + +你可以下面创建一个目录,并使用任何名称来标识你组织的证书。然后,将 .CRT 文件添加到该目录。 + +例如,它是 /usr/local/share/ca-certificates/organization/xyz.crt + +请注意,你需要有 root 权限来添加证书或在 **ca-certificates** 目录下创建目录。 + +当你添加了必要的证书,你所要做的就是输入以下命令更新证书支持列表: + +``` + + sudo update-ca-certificates + +``` + +而且,每当你试图连接到你公司的 VPN 时,你的系统应将该证书视为有效。 + +### 总结 + +不可接受的 TLS 证书并不是一个常见的错误,但你可以在各种使用情况下发现它,比如连接到 GNOME 在线账户。 + +如果上述两种方法都不能解决这个错误,那么你所连接的域/服务有可能存在配置错误。在这种情况下,你将不得不联系他们来解决这个问题。 + +你是否遇到过这个错误?你是如何解决的?你是否知道这个问题的其他解决方案(有可能是容易操作的)?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/unacceptable-tls-certificate-error-linux/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/unacceptable-tls-certificate.png?resize=800%2C450&ssl=1 +[2]: https://itsfoss.com/flatpak-guide/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/tls-certificate-troubleshoot.png?resize=800%2C506&ssl=1 From ea3eec47027cf0590797c49ba05a85917ad7e7ad Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 15 Feb 2022 09:20:40 +0800 Subject: [PATCH 302/334] translating --- ...5 Kile- An Interactive Cross-Platform LaTeX Editor by KDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220215 Kile- An Interactive Cross-Platform LaTeX Editor by KDE.md b/sources/tech/20220215 Kile- An Interactive Cross-Platform LaTeX Editor by KDE.md index 6d9cc9a7ec..42c33fbcd3 100644 --- a/sources/tech/20220215 Kile- An Interactive Cross-Platform LaTeX Editor by KDE.md +++ b/sources/tech/20220215 Kile- An Interactive Cross-Platform LaTeX Editor by KDE.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/kile/" [#]: author: "Ankush Das https://itsfoss.com/author/ankush/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From df6bd0d314a089e4f27aa841e678ce7e83746676 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 15 Feb 2022 22:32:21 +0800 Subject: [PATCH 303/334] ONE --- ...ry Pi and PinePhone Pro Users Immensely.md | 76 +++++++++++++++++++ ...ry Pi and PinePhone Pro Users Immensely.md | 72 ------------------ 2 files changed, 76 insertions(+), 72 deletions(-) create mode 100644 published/20220214 KDE-s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely.md delete mode 100644 sources/news/20220214 KDE-s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely.md diff --git a/published/20220214 KDE-s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely.md b/published/20220214 KDE-s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely.md new file mode 100644 index 0000000000..566cb1af4f --- /dev/null +++ b/published/20220214 KDE-s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely.md @@ -0,0 +1,76 @@ +[#]: subject: "KDE’s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely" +[#]: via: "https://news.itsfoss.com/kde-apps-arm/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14276-1.html" + +KDE 的新进展将为树莓派和 PinePhone Pro 用户提供极大帮助 +====== + +> KDE 分享了它在应用开发方面的计划和迄今为止的进展。不但有新的应用发布,如 Falkon 3.2,在 ARM 平台方面也有有趣的进展。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/kde-snapstore-arm64.png?w=1200&ssl=1) + +KDE 最近像往常一样分享了它的月度更新,介绍了最新的应用发展和进展。 + +虽然 [Falkon 3.2 版本][1] 是一个重要的升级,但还有其他几个 KDE 应用程序的更新/bug 修复。 + +然而,有一件有趣的事情。 + +KDE 开始为 ARM 平台提供应用程序了。 + +但是,这究竟是什么意思呢?让我们来看看! + +### KDE 应用于 ARM:一个令人兴奋的发展! + +你可以在各种仓库、Flatpak 和 Snap 商店中找到 KDE 应用程序。 + +而 KDE 选择了 Snap 商店来发布其第一个用于 ARM64 的 Snap 软件包。 + +换句话说,KDE 应用程序正在以 Snap 的方式进入 ARM 平台。 + +当然,对于一个应用程序来说,支持各种平台和各种发行版是有意义的,所有这些都在单一的商店提供。 + +第一个可用于 ARM64 的 Snap 软件包是 [kblocks][2]。 + +![][3] + +这是一个经典的掉落式积木游戏,它是一个有趣的游戏,也许对于 ARM 平台来说不算什么。 + +然而,如果你有树莓派或 PinePhone Pro,这意味着你可以期待有更多为 ARM 平台优化的 KDE 应用程序通过 Snap 商店提供。 + +### ARM 芯片的未来 + +考虑到 ARM 平台的早期发展,与现有的设备数量相比,我认为这是很好的进展。 + +就目前而言,树莓派用户和 PinePhone pro 用户可以立即从新的 KDE 应用程序中受益。 + +当我们开始看到更多的由 ARM 驱动的设备或笔记本电脑时,你可以期望大家都开始为 ARM 做准备。 + +希望在时机成熟时,Linux 平台及其应用程序将为 ARM 平台做好准备。 + +我们应该避免出现像苹果 M1 系列那样的情况,在没有适当的应用生态系统可用的情况下,性能会有很大的不同。 + +关于 KDE 应用程序以 Snap 包支持 ARM64,你怎么看?假设你有一个树莓派或 PinePhone Pro,你对它的未来有什么期待? + +请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/kde-apps-arm/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/falkon-browser-3-2-release/ +[2]: https://snapcraft.io/kblocks +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/kblocks.jpg?w=754&ssl=1 diff --git a/sources/news/20220214 KDE-s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely.md b/sources/news/20220214 KDE-s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely.md deleted file mode 100644 index 80ba1f4915..0000000000 --- a/sources/news/20220214 KDE-s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely.md +++ /dev/null @@ -1,72 +0,0 @@ -[#]: subject: "KDE’s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely" -[#]: via: "https://news.itsfoss.com/kde-apps-arm/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -KDE’s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely -====== - -KDE recently shared its monthly updates on the latest app developments and progress, as usual. - -While the [Falkon 3.2 release][1] was a significant upgrade, there were several other updates/bug fixes to other KDE applications. - -However, there was one interesting thing about it. - -KDE is starting to make applications available for the ARM Platforms. - -But, what does it mean exactly? Let’s take a look! - -### KDE Apps for ARM: An Exciting Development! - -You can find KDE apps on various repositories, Flatpak, and the Snap store. - -And, KDE chose the Snap store to publish its first Snap for ARM64. - -In other words, KDE applications are making their way as a Snap to the ARM platform. - -Of course, it makes sense for an application to support a variety of platforms and various distributions, all from a single store. - -The first Snap available for ARM64 is [kblocks][2]. - -![][3] - -Considering that it is a classic falling blocks game, and a fun idea, it may not be a big deal for the ARM platform. - -However, if you have a Raspberry Pi or a PinePhone Pro, it should be a good indication to expect more KDE apps optimized for the ARM platform available through the Snap store. - -### The Future with ARM Chips - -Considering the early developments for the ARM platform, I’d say it is good progress when compared to the number of devices available. - -As of now, the Raspberry Pi users and the PinePhone pro users can immediately benefit from new KDE applications. - -As we start to see more ARM-powered devices or laptops, you should expect almost everyone to start prepping for ARM. - -Hopefully, the Linux platform and its applications will be ready for the ARM platform when the time comes. - -We should avoid a situation like Apple’s M1 series, where the performance makes a big difference without having a proper app ecosystem available. - -_What do you think about KDE apps available as a Snap for ARM64? Assuming you have a Raspberry Pi or PinePhone Pro, what do you expect for its future?_ - -Let me know your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/kde-apps-arm/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://news.itsfoss.com/falkon-browser-3-2-release/ -[2]: https://snapcraft.io/kblocks -[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUxNSIgd2lkdGg9Ijc1NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= From c58c562a7dbc306d9e639e72f056f7e63006ccfd Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 16 Feb 2022 05:02:35 +0800 Subject: [PATCH 304/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220215=20?= =?UTF-8?q?5=20ways=20LibreOffice=20supports=20accessibility?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220215 5 ways LibreOffice supports accessibility.md --- ...ways LibreOffice supports accessibility.md | 112 ++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 sources/tech/20220215 5 ways LibreOffice supports accessibility.md diff --git a/sources/tech/20220215 5 ways LibreOffice supports accessibility.md b/sources/tech/20220215 5 ways LibreOffice supports accessibility.md new file mode 100644 index 0000000000..75a94d5254 --- /dev/null +++ b/sources/tech/20220215 5 ways LibreOffice supports accessibility.md @@ -0,0 +1,112 @@ +[#]: subject: "5 ways LibreOffice supports accessibility" +[#]: via: "https://opensource.com/article/22/2/libreoffice-accessibility" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +5 ways LibreOffice supports accessibility +====== +Try one of these accessibility features in LibreOffice. You might find +better or alternative ways of doing everyday tasks. +![Coding on a computer][1] + +LibreOffice.org is my preferred productivity suite, and I've covered how I use it both as a [graphical office suite][2] as well as a [terminal command][3] in the past. + +In this article, I want to focus on how LibreOffice supports people using assistive technology.  + +### Mouse + +The mouse was an important invention, but it doesn't work equally well for everyone. For instance, people who can't see the mouse pointer on the screen or can't physically operate the mouse on their desk don't benefit much from a mouse. + +To account for the difference in how people interact with their computers, you can use LibreOffice without a mouse. As with most accessibility features in applications, this feature is helpful to anyone. Even if you are a mouse user yourself, sometimes you don't want to take your hand off the keyboard. Being able to trigger specific LibreOffice actions while still in "typing mode" is really convenient for the busy typist. + +You can open every item in LibreOffice's main menu using the **Alt** key followed by a trigger letter in the menu's name. You don't see these trigger letters by default, but they appear when you press the **Alt** key. + +![LibreOffice Writer menus with underlines][4] + +(Don Watkins, [CC BY-SA 4.0][5]) + +To open the **File** menu, press and hold **ALT+F**. To open the **Format** menu, press and hold **ALT+O**. Once the menu is open, you may release the keys. + +After you open a menu, each item in that menu has a trigger letter, or you can use the **Arrow** keys on your keyboard to navigate to the item and press **Enter**. + +To close a menu without doing anything, press the **Esc** key. + +### Change a font without the mouse + +Everything in LibreOffice's interface is available from its menus, even if you think it is just an element in a toolbar. For instance, you may usually move your mouse to the formatting toolbar to change a font, but you can also change the font by selecting text and then opening the **Format** menu and selecting **Character** to open the **Character** dialog. You can navigate this dialog using the **Tab**, **Arrows**, and **Enter **keys. + +The important thing to note here is that you can use many different paths in an application to reach the same goal. Each use case might have a different optimal path, so it's important not to think too linearly when approaching a task. + +### Common shortcuts + +Here are some LibreOffice Writer shortcut keys: + + * **F2**: Formula bar + * **Ctrl+F2**: Insert fields + * **F3**: Auto text + * **F5**: Navigator on/off  + * **Shift+F5**: Moves the cursor to its position when you last saved the document + * **Ctrl+Shift+F5**: Navigator on, **Go to Page** + * **F7**: **Spelling** + * **F8**: **Thesaurus** + + + +Here are shortcut keys for spreadsheets: + + * **Ctrl+Home**: Returns you to cell A1 + * **Ctrl+End**: Moves you to the last cell that contains data + * **Home**: Moves the cursor to the first cell in the current row + * **End**: Moves the cursor to the last cell in the current row + * **Shift+Home**: Selects cells from the current cell to the first cell of the current row + + + +LibreOffice documentation is extensive and easily accessible by pressing **Alt+H** or **F1** from the keyboard.  + +### Accessibility settings + +For more accessibility settings, go to the **Tools **menu and select** Options**. In the **Options** dialog, expand the **LibreOffice** category in the column on the left and then click **Accessibility**. + +Options include: + + * **Use text selection cursor in read-only text documents**: This allows you to move through a read-only document as if you could edit it, limiting what you can actually do to select and copy text. + * **Allow animated images**: Not everyone wants moving images in their documents as they work. You can adjust that here. + * **Allow animated text**: As with images, animated text styles can be fun for some and distracting or confusing to others. + + + +There are also options for a high contrast theme. If you use a high contrast mode on your operating system, LibreOffice automatically detects it and changes its theme to match. + +### Keyboard shortcuts + +You can customize how you interact with LibreOffice by setting your own keyboard shortcuts. Go to the **Tools **menu and select **Customize **(or just press **Alt+T **followed by **C**.) + +Select the **Keyboard **tab by pressing the **Arrow **key as necessary or click it with the mouse (if you're still using the mouse.)  + +### Open for all + +Making open source applications accessible benefits all users. By trying accessibility features in LibreOffice, you might find better or alternative ways of doing everyday tasks. Whether you "need" the feature or not, accessibility provides options. Try some of them out because you might find something you love. And if you have a requirement that LibreOffice (or any of your favorite open source applications) doesn't seem to provide, let the project know by filing a feature request in its bug tracking system. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/libreoffice-accessibility + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_laptop_hack_work.png?itok=aSpcWkcl (Coding on a computer) +[2]: https://opensource.com/article/21/9/libreoffice-tips +[3]: https://opensource.com/article/21/3/libreoffice-command-line +[4]: https://opensource.com/sites/default/files/uploads/libreoffice_menu_with_underlines.jpg (LibreOffice Writer menus with underlines) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ From d992423b259998ae604eeb53d7e25c1b1f5466f5 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 16 Feb 2022 05:02:45 +0800 Subject: [PATCH 305/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220215=20?= =?UTF-8?q?Manage=20your=20calendar=20from=20the=20Linux=20terminal=20with?= =?UTF-8?q?=20the=20konsolekalendar=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220215 Manage your calendar from the Linux terminal with the konsolekalendar command.md --- ...rminal with the konsolekalendar command.md | 151 ++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 sources/tech/20220215 Manage your calendar from the Linux terminal with the konsolekalendar command.md diff --git a/sources/tech/20220215 Manage your calendar from the Linux terminal with the konsolekalendar command.md b/sources/tech/20220215 Manage your calendar from the Linux terminal with the konsolekalendar command.md new file mode 100644 index 0000000000..2fa79216f3 --- /dev/null +++ b/sources/tech/20220215 Manage your calendar from the Linux terminal with the konsolekalendar command.md @@ -0,0 +1,151 @@ +[#]: subject: "Manage your calendar from the Linux terminal with the konsolekalendar command" +[#]: via: "https://opensource.com/article/22/2/manage-calendar-linux-konsolekalender-kde" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Manage your calendar from the Linux terminal with the konsolekalendar command +====== +KDE is well-suited for terminal-based calendaring on Linux. The +konsolekalendar command lets you view and manage an iCal calendar from +the terminal. +![Calendar close up snapshot][1] + +I'm a [KDE user][2], and for years I've been on a seemingly endless journey of discovery with the Plasma Desktop. If you were to ask me in public, I'd probably claim to know everything there is to know about the desktop I use every day of my life. But in truth, I've actually only just scratched the surface. It seems every day I learn a new KDE trick that either makes my life easier or just more fun, and my latest discovery is the `konsolekalendar` command, which lets you view and manage an iCal calendar from the terminal. + +### Akonadi + +The Akonadi project is a low-level KDE Framework that helps the Plasma Desktop keep track of all the Personal Information Manager (PIM) data. It's mostly for developers and includes lots of libraries that allow a programmer to create applications through which you can access your contacts, notes, emails, calendar, and so on. Some terminal commands are included in Akonadi, such as `akonadictl` to start and stop the Akonadi service, but they're mostly for troubleshooting. However, `konsolekalendar` is a user-facing command that provides you full access to all the data in the Kontact suite, including KMail, Notes, and the Calendar. + +If you're running KDE's Plasma Desktop, then you already have the Kontact suite installed. + +![Kontact UI][3] + +(Seth Kenlon, [CC BY-SA 4.0][4]) + +You also already have Akonadi and its tools installed, so everything you need for terminal-based calendaring is in place! + +### View your calendar from the terminal + +You can host your own iCal calendaring service thanks to projects like [NextCloud][5] and [Radicale][6], or you may already have an iCal account with popular providers (for instance, Google). When you use Kontact for calendaring, you subscribe to a calendar object (a "collection" in Akonadi's terminology). When you make updates to your local calendar, the changes get sent back to your iCal server to synchronize your calendar server and client. + +Whether or not you've used the calendaring part of Kontact yet, you have some default calendar objects in Kontact. You have one called **Personal Calendar** and **Birthdays & Anniversaries**. + +Here's how to display the current day's calendar (**Personal Calendar** by default): + + +``` + + +$ konsolekalendar +Date:   Saturday, January 15, 2022 +        10:00 AM - 11:00 AM +Summary: Covid booster shot +UID: 8d8a1e38-c88c-4d84-99e5-23... +\---------------------------------- +Date:   Saturday, January 15, 2022 +        12:00 PM - 01:00 PM +Summary: Lunch +UID: 7aa89a... +\---------------------------------- +Date:   Saturday, January 15, 2022 +        01:00 PM - 04:45 PM +Summary: Afternoon coding +UID: 9cde38b... +\---------------------------------- +Date:   Saturday, January 15, 2022 +        06:00 PM - 10:00 PM +Summary: Planescape game +UID: c73f7e98-722f-48a2-8006-66... +\---------------------------------- + +``` + +### Add an event + +To see all calendars you've subscribed to, use the `--list-calendars` option: + + +``` + + +$ konsolekalendar --list-calendars +\---------------------------------- +3  - (Read only) Birthdays & Anniversaries +11 - Personal Calendar +60 - (Read only) Open Invitations +61 - (Read only) Declined Invitations +66 - Dnd +67 - Work +68 - Museum + +``` + +The numbers on the left are calendar IDs. To add an event to a specific calendar, use the `--calendar` option, followed by the calendar ID: + + +``` + + +$ konsolekalendar --add --calendar 66 \ +\--date 2022-01-16 \ +\--time 20:00 --end-time 23:59 \ +\--summary "Another game" \ +\--description "Remember to bring dice" \ +Success: "Another game" inserted + +``` + +### Delete an event + +You can also remove events. Each event has a unique ID (UID), provided at the bottom of each event listing: + + +``` + + +$ konsolekalendar --list +Date:   Saturday, January 15, 2022 +        06:00 PM - 10:00 PM +Summary: Planescape game +UID: c73f7e98-722f-48a2-8006-66aa8ddcf789 + +``` + +To delete an event, use the `--delete` option along with the `--uid` option: + + +``` + + +$ konsolekalendar --delete \ +\--uid c73f7e98-722f-48a2-8006-66aa8ddcf789 + +``` + +### Akonadi in the terminal + +Everything you do with `konsolekalendar` is immediately performed in Akonadi and is reflected just as quickly in Kontact itself. Using one doesn't mean you have to give up the other. Thanks to their shared Akonadi backend, the two view and edit the same data. The `konsolekalendar` command is a work in progress. Future plans include integration with the Notes and Journal parts of Kontact, and there are many more options available than this article covered. If you're using the KDE desktop, try `konsolekalendar` and experience a PIM for your terminal! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/manage-calendar-linux-konsolekalender-kde + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/calendar.jpg?itok=jEKbhvDT (Calendar close up snapshot) +[2]: https://opensource.com/article/17/5/7-cool-kde-tweaks-will-improve-your-life +[3]: https://opensource.com/sites/default/files/uploads/kontact.jpg (Kontact UI) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://opensource.com/article/21/1/nextcloud-productivity +[6]: https://radicale.org/v3.html From 261bc7b20a80e525367efcba2b458c22d6145db6 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 16 Feb 2022 05:03:05 +0800 Subject: [PATCH 306/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220215=20?= =?UTF-8?q?Kali=20Linux=202022.1=20Release=20Introduces=20a=20New=20?= =?UTF-8?q?=E2=80=9CEverything=E2=80=9D=20Offline=20ISO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220215 Kali Linux 2022.1 Release Introduces a New -Everything- Offline ISO.md --- ...troduces a New -Everything- Offline ISO.md | 114 ++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 sources/news/20220215 Kali Linux 2022.1 Release Introduces a New -Everything- Offline ISO.md diff --git a/sources/news/20220215 Kali Linux 2022.1 Release Introduces a New -Everything- Offline ISO.md b/sources/news/20220215 Kali Linux 2022.1 Release Introduces a New -Everything- Offline ISO.md new file mode 100644 index 0000000000..79173451b0 --- /dev/null +++ b/sources/news/20220215 Kali Linux 2022.1 Release Introduces a New -Everything- Offline ISO.md @@ -0,0 +1,114 @@ +[#]: subject: "Kali Linux 2022.1 Release Introduces a New “Everything” Offline ISO" +[#]: via: "https://news.itsfoss.com/kali-linux-2022-1-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Kali Linux 2022.1 Release Introduces a New “Everything” Offline ISO +====== + +The first Kali Linux release of 2022 is here. + +Kali Linux made numerous improvements in 2021 with its Linux Kernel upgrade, new hacking tools, live VM support ([Kali Linux 2021.3][1]), Apple M1 support, and more. + +Let us look at the key highlights in the Kali Linux 2022.1 release. + +### Kali Linux 2022.1: What’s New? + +Starting with this release, the Kali Linux team decided to introduce major visual updates to their yearly 20xx.1 release (the first release of every year). + +So, Kali Linux 2022.1 update brings in visual refresh and other new additions/changes. + +#### Theme Updates + +![][2] + +With the latest upgrade, you get to see some new wallpapers for the desktop, login, and boot screens. + +The installer theme has also received a visual refresh, giving it a modern look. + +Overall, with a theme update, new wallpapers, and subtle layout changes, you can expect a uniform user experience starting from the UEFI/BIOS boot menu to the desktop. + +![][3] + +The browser landing page has also received a visual update giving you access to Kali documentation and tools along with the usual search function. + +![][4] + +#### New “Everything” Flavor ISO + +Kali Linux will now offer a new flavor, as a standalone offline ISO that includes everything from “kali-linux-everything” packages. + +This offering aims to let you download an offline ISO without needing to download the packages after installation separately. + +It should come in handy for educational institutes in remote areas using Kali Linux for ethical hacking learning. + +You can only find this flavor available through BitTorrent, considering it a big ISO file (up to 9.4 GB in size). + +#### Improvements to i3 Desktop for VMware + +If you were using Kali Linux on a VM with an i3 desktop environment, some guest features were disabled by default. + +Now, those features like drag ‘n’ drop, copy/paste have been enabled by default giving you a better out-of-the-box experience in a VM with i3. + +#### Other Improvements + +Along with the key additions, Kali Linux 2022.1 brings in new tools and improvements overall. Some of them worth highlighting include: + + * Accessibility improvements with speech synthesis in the Kali setup screen. + * New tools like dnsx, email2phonenumber, naabu, proxify, etc. + * New packages available for ARM64 architecture that include feroxbuster and ghidra. + * [Linux Kernel 5.15][5] + * You can now enable legacy algorithms, ciphers, SSH using a setting in kali-tweaks + * Tweaks to the shell prompt to remove the skull icon, exit code, and number of background processes + + + +Overall, you should expect significant improvements for desktop and Raspberry Pi with this release. + +You can go through the [official announcement post][6] for more details. + +### Download Kali Linux 2022.1 + +You can head to its [official website][7] and choose the platform you intend to download for. + +It is important to note that the ‘Everything’ flavor is only available to download via Torrents. So, you will have to utilize some [torrent clients][8]. + +If you already use Kali Linux, you can perform a quick update using the following commands: + +``` + + echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" | sudo tee /etc/apt/sources.list + sudo apt update && sudo apt -y full-upgrade + cp -rbi /etc/skel/. ~ + [ -f /var/run/reboot-required ] && sudo reboot -f + +``` + +[Kali Linux][9] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/kali-linux-2022-1-release/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/kali-linux-2021-3-release/ +[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ0MCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI5MyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU3MSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[5]: https://news.itsfoss.com/linux-kernel-5-15-release/ +[6]: https://www.kali.org/blog/kali-linux-2022-1-release/ +[7]: https://www.kali.org/get-kali/ +[8]: https://itsfoss.com/best-torrent-ubuntu/ +[9]: https://www.kali.org/ From 0176f155416a36f04abd811dd34be6528778cd1f Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 16 Feb 2022 08:49:11 +0800 Subject: [PATCH 307/334] translated --- ...asma 5.24 in Kubuntu 21.10 Impish Indri.md | 162 ------------------ ...asma 5.24 in Kubuntu 21.10 Impish Indri.md | 156 +++++++++++++++++ 2 files changed, 156 insertions(+), 162 deletions(-) delete mode 100644 sources/tech/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md create mode 100644 translated/tech/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md diff --git a/sources/tech/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md b/sources/tech/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md deleted file mode 100644 index e69cabc07a..0000000000 --- a/sources/tech/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md +++ /dev/null @@ -1,162 +0,0 @@ -[#]: subject: "How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri" -[#]: via: "https://www.debugpoint.com/2022/02/kde-plasma-5-24-kubuntu-21-10/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri -====== -THE KDE DEVS ENABLED THE FAMOUS BACKPORTS PPA FOR YOU TO INSTALL/UPGRADE -TO KDE PLASMA 5.24 IN KUBUNTU 21.10. HERE’S HOW. -KDE Plasma 5.24 was [released][1] recently with exciting changes. You get a brand new overview screen with this new release, much like GNOME’s own overview. Also, a refreshed default Breeze theme, performance updates, tweaks to the notification looks and much more. Read more about the features at our [official round-up page here][2]. - -If you are in a hurry and have no time to read the article, here’s the brief set of commands that does the trick. 😃 - -``` - - sudo add-apt-repository ppa:kubuntu-ppa/backports - sudo apt update - sudo apt full-upgrade - -``` - -If you run Kubuntu 21.10 Impish Indri, you will not get this update out of the box. Because Kubuntu 21.10 Impish Indri currently have KDE Plasma 5.22.5 as a stable version. Although Kubuntu 21.10 is scheduled to end of life on July 2022, you can still install KDE Plasma 5.24 via the backports PPA. - -However, note that you will get KDE Plasma 5.24 in Kubuntu 22.04 LTS due on April 2022, much before Kubuntu 21.10 life ends. - -### Contents - - * [How to install KDE Plasma 5.24 in Kubuntu 21.10][3] - * [How to install KDE Plasma 5.24 in Ubuntu 21.10 alongside GNOME][4] - * [Can I install KDE Plasma 5.24 in Ubuntu 20.04 LTS?][5] - * [How to Uninstall][6] - - - -### How to Install KDE Plasma 5.24 in Kubuntu 21.10 - -Here’s how you can update your existing KDE Plasma in Kubuntu 21.10 to the latest version. - -#### How to install KDE Plasma 5.24 in Kubuntu 21.10 - -If you are comfortable with Discover, add the backports PPA `ppa:kubuntu-ppa/backports` as software sources and hit update. Then installation once updated package information are retrieved. - -I would recommend the following terminal method for faster and error-free installation. - - * Open Konsole and run the following command to add the backports PPA. If you fancy, you can verify what version of Plasma you are running. - - - -``` - - sudo add-apt-repository ppa:kubuntu-ppa/backports - -``` - -![Add the PPA][7] - -Now, refresh the package list and verify whether the latest 5.24 packages are available for upgrade. - -![Check the latest KDE Plasma 5.24 packages before upgrading][8] - -Now run the final command to kick off the upgrade. - -``` - - sudo apt full-upgrade - -``` - -The above command would download around 270 MB+ worth of packages. The upgrade process takes approximately 10 minutes. Once the command is complete, restart your system. - -[][2] - -SEE ALSO:   KDE Plasma 5.24 – Top New Features and Release Details - -And you should get the brand new KDE Plasma 5.24 with Kubuntu 21.10 Impish Indri. - -![KDE Plasma 5.24 in Kubuntu 21.10][9] - -#### How to install KDE Plasma 5.24 in Ubuntu 21.10 alongside GNOME - -If you are running Ubuntu 21.10 Impish Indri with default GNOME, you can also experience the brand new KDE Plasma desktop with just a minor modification of the above commands. - -Open a terminal and run the below commands in sequence. - -``` - - sudo add-apt-repository ppa:kubuntu-ppa/backpots - sudo apt update - sudo apt install kubuntu-desktop - -``` - -Once the above commands are complete, restart the system. And from the login screen, choose KDE Plasma as a desktop environment. And you are good to go. - -This will install the KDE Plasma 5.24 along with the GNOME desktop. - -#### Can I install KDE Plasma 5.24 in Ubuntu 20.04 LTS? - -Ubuntu 20.04 LTS edition has the earlier KDE Plasma 5.18, KDE Framework 5.68, KDE Applications 19.12.3. So, it would not receive the latest KDE Update during its entire lifecycle. So, technically you can add the above PPA and install the KDE Plasma 5.24. But I would not recommend it due to incompatible packages frameworks that may lead to an unstable system. - -So, it is recommended that you use either Kubuntu 21.10 with the above backports PPA Or use KDE Neon to experience the latest Plasma desktop. - -### How to Uninstall - -At any moment, if you would like to go back to the stock version of KDE Plasma desktop, then you can install ppa-purge and remove the PPA, followed by refreshing the package. - -Open a terminal and execute the following commands in sequence. - -``` - - sudo apt install ppa-purge - sudo ppa-purge ppa:kubuntu-ppa/backports - sudo apt update - -``` - -Once the above commands are complete, restart your system. - -### Closing Notes - -I hope this quick guide gives you comprehensive upgrade steps to KDE Plasma 5.24 from different use cases. Hopefully, you can complete the upgrade without any errors. - -Do let me know in the commend box below how it goes. - -Cheers. - -* * * - -We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][10], [Twitter][11], [YouTube][12], and [Facebook][13] and never miss an update! - -##### Also Read - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/2022/02/kde-plasma-5-24-kubuntu-21-10/ - -作者:[Arindam][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.debugpoint.com/author/admin1/ -[b]: https://github.com/lujun9972 -[1]: https://kde.org/announcements/plasma/5/5.24.0/ -[2]: https://www.debugpoint.com/2022/01/kde-plasma-5-24/ -[3]: tmp.iA5hKjVLOx#how-to-install-kde-plasma-5-24-in-kubuntu-21-10-1 -[4]: tmp.iA5hKjVLOx#how-to-install-kde-plasma-5-24-in-ubuntu-21-10-alongside-gnome -[5]: tmp.iA5hKjVLOx#can-i-install-kde-plasma-5-24-in-ubuntu-20-04-lts -[6]: tmp.iA5hKjVLOx#how-to-uninstall -[7]: https://www.debugpoint.com/wp-content/uploads/2022/02/Add-the-PPA.jpg -[8]: https://www.debugpoint.com/wp-content/uploads/2022/02/Check-the-latest-KDE-Plasma-5.24-packages-before-upgrade.jpg -[9]: https://www.debugpoint.com/wp-content/uploads/2022/02/KDE-Plasma-5.24-in-Kubuntu-21.10-1024x579.jpg -[10]: https://t.me/debugpoint -[11]: https://twitter.com/DebugPoint -[12]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 -[13]: https://facebook.com/DebugPoint diff --git a/translated/tech/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md b/translated/tech/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md new file mode 100644 index 0000000000..207c36ab5c --- /dev/null +++ b/translated/tech/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md @@ -0,0 +1,156 @@ +[#]: subject: "How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri" +[#]: via: "https://www.debugpoint.com/2022/02/kde-plasma-5-24-kubuntu-21-10/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +如何在 Kubuntu 21.10 Impish Indri 中获得 KDE Plasma 5.24 +====== +KDE 开发人员启用了有名的 Backports PPA,以便你在 Kubuntu 21.10 中安装/升级到 KDE Plasma 5.24。 以下是方法。 + +KDE Plasma 5.24 最近[发布][1]了令人兴奋的变化。在这个新版本中,你会得到一个全新的概览页面,它很像 GNOME 的概览。还有,一个更新的默认 Breeze 主题、性能更新、通知外观的调整等。在我们的[官方综述页面][2]阅读更多关于这些功能的信息。 + +如果你很匆忙,没有时间阅读文章,这里有一组简短的命令,可以做到这些。😃 + +``` + + sudo add-apt-repository ppa:kubuntu-ppa/backports + sudo apt update + sudo apt full-upgrade + +``` + +如果你运行 Kubuntu 21.10 Impish Indri,你将不会得到这个开箱更新。因为 Kubuntu 21.10 Impish Indri 目前有 KDE Plasma 5.22.5 作为稳定版本。尽管 Kubuntu 21.10 计划在 2022 年 7 月结束生命,你仍然可以通过 Backports PPA 安装 KDE Plasma 5.24。 + +然而,请注意,你将在 2022 年 4 月到期的 Kubuntu 22.04 LTS 中得到 KDE Plasma 5.24,比 Kubuntu 21.10 的寿命结束早得多。 + +### 内容 + + * [如何在 Kubuntu 21.10 中安装 KDE Plasma 5.24][3] + * [如何在 Ubuntu 21.10 中与 GNOME 一起安装 KDE Plasma 5.24][4] + * [我可以在 Ubuntu 20.04 LTS 中安装 KDE Plasma 5.24 吗?][5] + * [如何卸载][6] + + + +### 如何在 Kubuntu 21.10 中安装 KDE Plasma 5.24 + +下面是你如何将 Kubuntu 21.10 中现有的 KDE Plasma 更新到最新版本。 + +#### 如何在 Kubuntu 21.10 中安装 KDE Plasma 5.24 + +如果你对 Discover 感到满意,添加 Backports PPA `ppa:kubuntu-ppa/backports` 作为软件源并点击更新。一旦检索到更新的软件包信息,就可以安装。 + +我建议使用以下终端方法,以获得更快和无错误的安装。 + + * 打开 Konsole,运行以下命令来添加 backports PPA。如果你喜欢,你可以验证你运行的 Plasma 是什么版本。 + + + +``` + + sudo add-apt-repository ppa:kubuntu-ppa/backports + +``` + +![Add the PPA][7] + +现在,刷新软件包列表并验证最新的 5.24 软件包是否可供升级。 + +![Check the latest KDE Plasma 5.24 packages before upgrading][8] + +现在运行最后的命令来启动升级。 + +``` + + sudo apt full-upgrade + +``` + +上面的命令会下载大约 270MB 以上的软件包。升级过程大约需要 10 分钟。命令完成后,重启你的系统。 + +而你应该通过 Kubuntu 21.10 Impish Indri 获得全新的 KDE Plasma 5.24。 + +![KDE Plasma 5.24 in Kubuntu 21.10][9] + +#### 如何在 Ubuntu 21.10 中与 GNOME 一起安装 KDE Plasma 5.24 + +如果你正在运行带有默认 GNOME 的 Ubuntu 21.10 Impish Indri,你也可以体验全新的 KDE Plasma 桌面,只需对上述命令稍作修改即可。 + +打开一个终端,依次运行下面的命令。 + +``` + + sudo add-apt-repository ppa:kubuntu-ppa/backpots + sudo apt update + sudo apt install kubuntu-desktop + +``` + +上述命令完成后,重启系统。在登录页面上,选择 KDE Plasma 作为桌面环境。然后你就可以开始了。 + +这将与 GNOME 桌面一起安装 KDE Plasma 5.24。 + +#### 我可以在 Ubuntu 20.04 LTS 中安装 KDE Plasma 5.24 吗? + +Ubuntu 20.04 LTS 版有早期的 KDE Plasma 5.18、KDE Framework 5.68、KDE Applications 19.12.3。所以,在它的整个生命周期中,它不会收到最新的 KDE 更新。所以,从技术上讲,你可以添加上述 PPA 并安装 KDE Plasma 5.24。但我不建议这样做,因为不兼容的软件包框架可能会导致系统不稳定。 + +所以,建议你使用 Kubuntu 21.10 和上述的 Backports PPA 或者使用 KDE Neon 来体验最新的 Plasma 桌面。 + +### 如何卸载 + +在任何时候,如果你想回到 KDE Plasma 桌面的原始版本,那么你可以安装 ppa-purge 并删除 PPA,接着刷新软件包。 + +打开一个终端,依次执行以下命令。 + +``` + + sudo apt install ppa-purge + sudo ppa-purge ppa:kubuntu-ppa/backports + sudo apt update + +``` + +当命令完成,重启你的系统。 + +### 结束语 + +我希望这个快速指南能让你从不同的使用情况下全面升级到 KDE Plasma 5.24。希望你能在没有任何错误的情况下完成升级。 + +请在下面的评论栏里告诉我进展如何。 + +干杯。 + +* * * + +我们带来最新的技术、软件新闻和重要的东西。通过 [Telegram][10]、[Twitter][11]、[YouTube][12] 和 [Facebook][13] 保持联系,永远不错过任何更新! + + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/02/kde-plasma-5-24-kubuntu-21-10/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://kde.org/announcements/plasma/5/5.24.0/ +[3]: tmp.iA5hKjVLOx#how-to-install-kde-plasma-5-24-in-kubuntu-21-10-1 +[4]: tmp.iA5hKjVLOx#how-to-install-kde-plasma-5-24-in-ubuntu-21-10-alongside-gnome +[5]: tmp.iA5hKjVLOx#can-i-install-kde-plasma-5-24-in-ubuntu-20-04-lts +[6]: tmp.iA5hKjVLOx#how-to-uninstall +[7]: https://www.debugpoint.com/wp-content/uploads/2022/02/Add-the-PPA.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/02/Check-the-latest-KDE-Plasma-5.24-packages-before-upgrade.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2022/02/KDE-Plasma-5.24-in-Kubuntu-21.10-1024x579.jpg +[10]: https://t.me/debugpoint +[11]: https://twitter.com/DebugPoint +[12]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[13]: https://facebook.com/DebugPoint From 5092f6298e43bc703b20cbe014137b992c75339b Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 16 Feb 2022 09:00:15 +0800 Subject: [PATCH 308/334] translating --- ...220208 My tips for maintaining dotfiles in source control.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220208 My tips for maintaining dotfiles in source control.md b/sources/tech/20220208 My tips for maintaining dotfiles in source control.md index 7a4db37c3c..21c2d16d0f 100644 --- a/sources/tech/20220208 My tips for maintaining dotfiles in source control.md +++ b/sources/tech/20220208 My tips for maintaining dotfiles in source control.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/2/dotfiles-source-control" [#]: author: "Moshe Zadka https://opensource.com/users/moshez" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From b3c0206ee2a8e31424932bb0705e4d06bfacecbc Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 16 Feb 2022 19:39:20 +0800 Subject: [PATCH 309/334] RP @geekpi https://linux.cn/article-14278-1.html --- ...ry Turris Omnia, the open source router.md | 42 +++++++------------ 1 file changed, 15 insertions(+), 27 deletions(-) rename {translated/tech => published}/20220131 Try Turris Omnia, the open source router.md (69%) diff --git a/translated/tech/20220131 Try Turris Omnia, the open source router.md b/published/20220131 Try Turris Omnia, the open source router.md similarity index 69% rename from translated/tech/20220131 Try Turris Omnia, the open source router.md rename to published/20220131 Try Turris Omnia, the open source router.md index e62be0a989..35f13772e9 100644 --- a/translated/tech/20220131 Try Turris Omnia, the open source router.md +++ b/published/20220131 Try Turris Omnia, the open source router.md @@ -3,21 +3,19 @@ [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14278-1.html" -尝试 Turris Omnia,一个开源路由器 +Turris Omnia:一个黑客喜欢的开源路由器 ====== -无论你是一个网络工程师还是一个好奇的爱好者,当你在市场上购买网络设备时,都你应该看看开源的 Turris Omnia 路由器。 -![Mesh networking connected dots][1] -在 21 世纪初,我对 OpenWrt 很着迷,只想在自己的路由器上运行它。不幸的是,我没有一个能够运行自定义固件的路由器,所以我花了很多周末去车库销售,希望能偶然发现一个 “Slug”(黑客们对 NSLU2 路由器的俚语),但这是徒劳的。最近,我买到了 Turris Omnia,除了有一个更酷的名字外,它是一个来自捷克的路由器,使用建立在 OpenWrt 之上的开源固件。它拥有你对运行开源硬件所期望的一切,而且还有很多东西,包括可安装的软件包,因此你可以准确地添加你的家庭或企业网络最需要的东西,而忽略你不会使用的部分。如果你认为路由器是简单的设备,没有定制的余地,甚至除了 DNS 和 DHCP 之外没有其他用途,那么你需要看看 Turris Omnia。它将改变你对路由器是什么的看法,路由器能为你的网络做什么,甚至是你与整个网络的互动方式。 +> 无论你是一个网络工程师还是一个好奇的爱好者,当你在市场上购买网络设备时,都你应该看看开源的 Turris Omnia 路由器。 + +在 21 世纪初,我对 OpenWrt 很着迷,只想在自己的路由器上运行它。不幸的是,我没有一个能够运行自定义固件的路由器,所以我花了很多周末去旧货地摊,希望能偶然发现一个 “Slug”(黑客们对 NSLU2 路由器的俚语),但这是徒劳的。最近,我买到了 Turris Omnia,除了有一个更酷的名字外,它是一个来自捷克的路由器,使用建立在 OpenWrt 之上的开源固件。它拥有你对运行开源硬件所期望的一切,而且还有很多东西,包括可安装的软件包,因此你可以准确地添加你的家庭或企业网络最需要的东西,而忽略你不会使用的部分。如果你认为路由器是简单的设备,没有定制的余地,甚至除了 DNS 和 DHCP 之外没有其他用途,那么你需要看看 Turris Omnia。它将改变你对路由器是什么的看法,路由器能为你的网络做什么,甚至是你与整个网络的互动方式。 ![The Turris Omnia on my desk][2] -(Seth Kenlon, [CC BY-SA 4.0][3]) - ### 开始使用 Turris Omnia 尽管 Turris Omnia 的功能很强大,但它给人的感觉却很熟悉。开始使用的步骤与任何其他路由器基本相同: @@ -26,26 +24,19 @@ 2. 加入它提供的网络 3. 在网络浏览器中进入 192.168.1.1 进行配置 - - -如果你过去买过路由器,你以前会执行过这些相同的步骤。如果你是这个过程的新手,要知道它并不比任何其他路由器复杂,而且里面有足够的文档。 +如果你过去买过路由器,你以前会执行过这些相同的步骤。如果你不熟悉这个过程,要知道它并不比任何其他路由器复杂,而且里面有足够的文档。 ![Configuration][4] -(Seth Kenlon, [CC BY-SA 4.0][3]) - ### 简单和高级配置 -在初始设置之后,当你进入 Turris Omnia 路由器时,你可以选择简单配置环境或高级配置。你必须从简单配置开始。在**密码**面板中,你可以为高级界面设置一个密码,这也可以让你对路由器进行 SSH 访问。 +在初始设置之后,当你进入 Turris Omnia 路由器时,你可以选择简单配置环境或高级配置。你必须从简单配置开始。在密码Password面板中,你可以为高级界面设置一个密码,这也可以让你对路由器进行 SSH 访问。 -简单界面让你配置如何连接到广域网(WAN),并为你的局域网(LAN)设置参数。它还允许你设置一个个人 WiFi 接入点,一个访客网络,以及安装插件并与之互动。 - -被称为 LuCI 的高级界面,正是它所声称的。它是为熟悉网络拓扑和设计的网络工程师设计的,它基本上是一个键值对的集合,你可以通过一个简单的网络界面进行编辑。如果你喜欢直接编辑数值,你可以用 SSH 进入路由器。 +简单界面让你配置如何连接到广域网(WAN),并为你的局域网(LAN)设置参数。它还允许你设置一个个人 WiFi 接入点、一个访客网络,以及安装插件并与之互动。 +它所声称的高级界面叫做 LuCI。它是为熟悉网络拓扑和设计的网络工程师设计的,它基本上是一个键值对的集合,你可以通过一个简单的网络界面进行编辑。如果你喜欢直接编辑数值,你可以用 SSH 进入路由器。 ``` - - $ ssh root@192.168.1.1 root@192.168.1.1's password: @@ -53,15 +44,14 @@ BusyBox v1.28.4 () built-in shell (ash) ______ _ ____ _____ /_ __/_ ____________(_)____ / __ \/ ___/ - / / / / / / ___/ ___/ / ___/ / / / /\\__ + / / / / / / ___/ ___/ / ___/ / / / /\__ / / / /_/ / / / / / (__ ) / /_/ /___/ / - /_/ \\__,_/_/ /_/ /_/____/ \\____//____/ + /_/ \__,_/_/ /_/ /_/____/ \____//____/ ----------------------------------------------------- TurrisOS 4.0.1, Turris Omnia ----------------------------------------------------- root@turris:~# - ``` ### 插件 @@ -70,13 +60,11 @@ root@turris:~# ![Package management for your router][5] -(Seth Kenlon, [CC BY-SA 4.0][3]) - 只需点击几下,你就可以安装自己的 [Nextcloud][6] 服务器,这样你就可以运行自己的云服务或 OpenVPN,这样你就可以在离家时安全地访问你的网络。 ### 开源路由器 -这个路由器最好的部分是它是开源的,并且支持开源。你可以从他们的 [gitlab.nic.cz][7] 下载 Turris 操作系统和许多相关的开源工具。你也不必满足于设备上的固件。有了 2GB 的内存和 miniPCIe 插槽,你可以在上面运行 Debian。甚至前面板上的 LED 灯也是可编程的。这是一个黑客的路由器,无论你是一个网络工程师还是一个好奇的业余爱好者,当你在市场上购买网络设备时,你都应该看一看它。 +这个路由器最好的部分是它是开源的,并且通过开源提供支持。你可以从他们的 [gitlab.nic.cz][7] 下载 Turris 操作系统和许多相关的开源工具。你也不必满足于设备上的固件。有了 2GB 的内存和 miniPCIe 插槽,你可以在上面运行 Debian。甚至前面板上的 LED 灯也是可编程的。这是一个黑客的路由器,无论你是一个网络工程师还是一个好奇的业余爱好者,当你在市场上购买网络设备时,你都应该看一看它。 你可以从 [turris.com][8] 网站上获得 Turris Omnia 和其他几个型号的路由器,然后加入 [forum.turris.cz][9] 的社区。他们是一群友好的爱好者,热衷于分享知识、技巧和很酷的黑客技术,以促进你对开源路由器的使用。 @@ -87,7 +75,7 @@ via: https://opensource.com/article/22/1/turris-omnia-open-source-router 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 2ba3a1594027437f6c12c2042c42fc3798a95024 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 17 Feb 2022 05:02:30 +0800 Subject: [PATCH 310/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220216=20?= =?UTF-8?q?How=20I=20Customize=20Fedora=20Silverblue=20and=20Fedora=20Kino?= =?UTF-8?q?ite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220216 How I Customize Fedora Silverblue and Fedora Kinoite.md --- ...ze Fedora Silverblue and Fedora Kinoite.md | 619 ++++++++++++++++++ 1 file changed, 619 insertions(+) create mode 100644 sources/tech/20220216 How I Customize Fedora Silverblue and Fedora Kinoite.md diff --git a/sources/tech/20220216 How I Customize Fedora Silverblue and Fedora Kinoite.md b/sources/tech/20220216 How I Customize Fedora Silverblue and Fedora Kinoite.md new file mode 100644 index 0000000000..c95510b3f9 --- /dev/null +++ b/sources/tech/20220216 How I Customize Fedora Silverblue and Fedora Kinoite.md @@ -0,0 +1,619 @@ +[#]: subject: "How I Customize Fedora Silverblue and Fedora Kinoite" +[#]: via: "https://fedoramagazine.org/how-i-customize-fedora-silverblue-and-fedora-kinoite/" +[#]: author: "Muhammed Yasin Özsaraç https://fedoramagazine.org/author/harnapazade/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How I Customize Fedora Silverblue and Fedora Kinoite +====== + +![][1] + +Silver coin images excerpted from photo by [Kanchanara][2] on [Unsplash][3]; kinoite image excerpted from photo by Rob Lavinsky, iRocks.com – CC-BY-SA-3.0, CC BY-SA 3.0 , via Wikimedia Commons + +Hello everyone. My name is Yasin and I live in Turkey. I am 28 years old and have used Fedora Silverblue for two months and I am an active Fedora Kinoite user. I want to share the information I’ve learned in the process of using the systems. So I’ve decided to write this article. I hope you like it. Let’s get started. + +When one says Fedora Linux, the first edition that comes to mind is [Fedora Workstation][4]. However, do not overlook the _emerging_ editions Fedora Silverblue (featuring the [GNOME][5] desktop environment) and Fedora Kinoite (featuring the [KDE][6] desktop environment). Both of these are [reprovisionable][7] operating systems based on [libostree][8]. They are created exclusively from official RPM packages from the Fedora Project. In this article, I will demonstrate some common steps you might take after a clean installation of Fedora Silverblue or Fedora Kinoite. Everything listed in this article is optional. Exactly what you want to install or how you want to configure your system will depend on your particular needs. What is demonstrated below is just meant to give you some ideas and to provide some examples. + +**Disclaimer**: _Packages from Flathub, RPM Fusion, the Copr build system, GitHub, GitLab, et al. are not managed by the Fedora release team and they do not provide official software builds. Use packages from these sources at your own risk._ + +### System upgrades + +Fedora Linux in particular releases feature updates and security updates quite often. So you will want to run the below command regularly to keep your system up-to-date. Open the terminal and enter the following command. Afterwards, restart the computer so the changes will take effect. + +``` + + $ rpm-ostree upgrade + +``` + +If you want to preview which packages will be updated, use the follow command first. + +``` + + $ rpm-ostree update --preview + +``` + +It is also possible to configure automatic updates by editing the _rpm-ostreed.conf_ file as demonstrated below. + +``` + + $ sudo nano /etc/rpm-ostreed.conf + +``` + +Change _AutomaticUpdatePolicy_ to _check_. Then save the change and quit the editor. After that you need to reload _rpm-ostree_ and enable the automatic timer. + +``` + + $ rpm-ostree reload + $ systemctl enable rpm-ostreed-automatic.timer --now + +``` + +### Adding Flatpak remotes and other third-party repositories + +Fedora Silverblue and Fedora Kinoite come preloaded with the basic Fedora Linux repos. In addition, you might want [Flatpak][9], [RPM Fusion][10] or some [Copr][11] repos. + +#### Flathub remotes + +Flatpak is at the top of the list of ways to install applications on Fedora Silverblue and Fedora Kinoite because it is container-based and it does not require a reboot after installation. To add some remote software libraries and try it out, open the terminal again and enter the following commands. + +**Fedora Flatpaks remote**: + +``` + + $ flatpak remote-add --if-not-exists fedora oci+https://registry.fedoraproject.org + +``` + +**Flathub remote**: + +``` + + $ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo + +``` + +**Flabhub Beta remote**: + +``` + + $ flatpak remote-add --if-not-exists flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo + +``` + +**KDE nightly remote**: + +``` + + $ flatpak remote-add --if-not-exists kdeapps --from https://distribute.kde.org/kdeapps.flatpakrepo + +``` + +**GNOME nightly remote**: + +``` + + $ flatpak remote-add --if-not-exists gnome-nightly https://nightly.gnome.org/gnome-nightly.flatpakrepo + +``` + +After the repositories are added, you need to enter the code below in order to update the application catalog in the GNOME Software and Discover stores. In this way, you will be able to manage applications directly from the store without going to [flathub.org][12]. + +``` + + $ flatpak update --appstream + +``` + +After that, you can use the store to update Flatpak applications, or if you want to update directly from the terminal, you can enter the code below. + +``` + + $ flatpak update + +``` + +If you want to see all installed Flatpaks: + +``` + + $ flatpak list + +``` + +#### RPM Fusion repos + +Another remote software library you can add is RPM Fusion. To add it on Fedora Silverblue or Fedora Kinoite, open the terminal, enter the following commands and restart. + +``` + + $ sudo rpm-ostree install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm + +``` + +``` + + $ sudo rpm-ostree install https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm + +``` + +#### Copr repos + +Copr repos are yet another source of applications that can be installed on Fedora Silverblue and Fedora Kinoite. To add the repos, enter commands in the following form. + +``` + + $ sudo ostree remote add + +``` + +Example (Heroic Games launcher repo): + +``` + + $ sudo ostree remote add heroic-games-launcher https://download.copr.fedorainfracloud.org/results/atim/heroic-games-launcher/fedora-$releasever-$basearch/ + +``` + +If you want another option, you can download the repository configuration file from [Copr][13]‘s own site and put it in the _/etc/yum.repos.d_ folder. + +### Examples of popular Flatpak applications + +**Libre Office** + +``` + + $ flatpak install flathub org.libreoffice.LibreOffice + +``` + +**Lutris** + +``` + + $ flatpak install —user flathub-beta net.lutris.Lutris//beta + +``` + +**Steam** + +``` + + $ flatpak install flathub com.valvesoftware.Steam + +``` + +**VLC** + +``` + + $ flatpak install flathub org.videolan.VLC + +``` + +**Firefox** + +``` + + $ flatpak install flathub org.mozilla.firefox + +``` + +**Note**: _Fedora Firefox normally comes preloaded with Fedora Silverblue and Fedora Kinoite. However, the Flatpak version of Firefox has more comprehensive codec support._ + +### Installing the Nvidia driver and a specific kernel + +If you have installed RPM Fusion repositories, you can install the Nvidia driver by entering the code below and restarting the computer so the changes will take effect. + +``` + + $ sudo rpm-ostree install akmod-nvidia xorg-x11-drv-nvidia + +``` + +If you are using the Nvidia System Management Interface (nvidia-smi) or CUDA: + +``` + + $ sudo rpm-ostree install akmod-nvidia xorg-x11-drv-nvidia-cuda + +``` + +If you want to install specific kernel, you can always download a kernel from [Koji][14] and install it on Fedora Silverblue or Fedora Kinoite using the following command: + +``` + + $ sudo rpm-ostree override replace ./kernel*.rpm + +``` + +If you want to install multiple kernels, you will need to pin your deployment by issuing the _ostree admin pin 0_ command then use the same code above. After restarting, if you pin the new kernel, then you will have two deployments with specific kernels. Remember that you must update them individually because you cannot pin two deployments at the same time. + +### Toolbx + +The Toolbx utility is used primarily for CLI apps, development and debugging tools, etc. However, you can install supported any operating system. In this article, I will give an example of Fedora 35 Workstation installation and use. Fedora Silverblue and Fedora Kinoite come preloaded with Toolbx. So you can start directly. + +First, create a toolbox. + +``` + + $ toolbox create + +``` + +When the above is complete, enter: + +``` + + $ toolbox enter + +``` + +When you see the code that starts with _toolbox_, then you are in the container operating system. You can list the container(s) by means of: + +``` + + $ toolbox list + +``` + +If you want to remove the container, enter: + +``` + + $ toolbox rmi + +``` + +If you need more help, enter: + +``` + + $ toolbox --help + +``` + +Thanks to Toolbx, your main operating system will never break. You can pretend to be on Fedora Workstation, install and delete packages, and do things you cannot do on the libostree-based host system. Let’s illustrate with a few examples. + +Many users use Toolbx for their developer tools. But it is a really useful tool for regular users as well. For example, you can install Xtreme Download Manager and combine it with Firefox to download content such as music and videos from the internet. It will make your job even easier if you download the file manager before downloading XDM. Now that you are in Toolbx, try installing Nautilus. + +``` + + $ sudo dnf install nautilus + +``` + +After that, you can get XDM from here: + + + +Start Nautilus with _sudo nautilus_ while in Toolbx. Then unarchive XDM, open the folder, right click on some empty space and select _Open in Terminal_. Then enter the below code. + +``` + + $ su -c ./install.sh + +``` + +Congratulations! You have successfully installed XDM. After that you will need to open XDM, install Firefox and then open XDM again. Finally, you will want to make the XDM plugin available for Firefox. + +``` + + $ sudo xdm + +``` + +``` + + $ sudo dnf install firefox + +``` + +``` + + $ sudo firefox + +``` + +A few more example things that you could do in Toolbx include: + + * Add the repositories from Fedora Silverblue or Fedora Kinoite using the terminal. Alternatively, you could copy the repo files from _/etc/yum.repos.d_ in Fedora Silverblue or Fedora Kinoite to _/etc/yum.repos.d_ in Toolbx. + + + * Keep the container updated by running _sudo dnf update_ periodically. (Tip: For faster downloads, you might want to try adding the _fastestmirror=1_ and _max_parallel_downloads=10_ options to the container’s _/etc/dnf/dnf.conf_ file.) + + + * Use the _dnf history_ command to see what changes you’ve made to the container. + + + * You could install multimedia codecs and Windows fonts. But it’s not necessary because rpm-ostree can handle them and the _google-croscore-fonts_ and _liberation-fonts_ are both designed to be compatible with the most common MS fonts. + + + +### Layering packages + +The package layering method modifies the existing installation. You can permanently install almost any RPM package on Fedora Silverblue or Fedora Kinoite. However, you should only layer packages that you consider essential because, after the layering is complete, you will need to reboot the system before you will be able to use the package. For most packages, I recommend using Toolbx. + +Package layering is almost identical to installing a RPM package on Fedora Workstation. It’s just _rpm-ostree_ replacing _dnf_. For example: + +``` + + $ rpm-ostree install htop + +``` + +If you want to remove layered packages: + +``` + + $ rpm-ostree uninstall htop + +``` + +If you want to see the all layered packages: + +``` + + $ rpm-ostree status + +``` + +If you want to remove all layered packages: + +``` + + $ rpm-ostree uninstall --all + +``` + +If you are wondering which packages I’ve chosen to layer on my libostree systems, here are my favorites. + + * **tlp, tlp-rdw**: helps to reduce the battery use on laptops + + + * **stacer**: system optimizer and monitoring + + + * **WoeUSB**: for preparing bootable Windows ISO images + + + * **unrar**: for extracting and viewing RAR archives + + + +### Gaming + +Some ways of playing games on Fedora Silverblue or Fedora Kinoite include the following. + + * Using platforms (Steam, Lutris, [itch.io][15], GOG and other emulators) + + + * Using compatibility tools (Wine, Proton and others) + + + * Native Linux games (These games can be found in official or third-party repositories; or on their official website) + + + * Other (Virtualbox, web browser games, etc.) + + + +People are often advised to play games designed to run on Linux or Windows using Proton on Steam. However, not all Windows games are compatible with Proton; especially online games with cheat protection software. So it is useful to check the site below before installing the game. + +[][16] + +In Fedora Silverblue or Fedora Kinoite, there are two ways to install Proton. + +**From Flathub (using the terminal)**: + +``` + + $ flatpak install com.valvesoftware.Steam.CompatibilityTool.Proton + +``` + +**From GitHub (manually)**: + +[][17] + +My advice is to use the proton-ge-custom version (Gloruious Eggroll) because it contains extra patches and fixes for many popular games. You can read about how to install proton-ge-custom and how to activate it on Steam in the README.md file in the above GitHub repo. + +If you do not want to use an online platform, it is possible to play the game using Wine. But you need to go to [Wine][18]‘s official site and read the reports about the game or try it yourself to see if the game works. Also, don’t think of it as just a game engine. Wine can run a wide verity of Windows programs. So how do you install Wine? Unfortunately, Wine cannot be directly installed on Fedora Silverblue or Fedora Kinoite as a layered package due to rpm-ostree’s lack of 32-bit support. It is possible, however, to install Wine using some indirect methods. The Winepak repo is dead now. So I’ll skip that. + +**Method 1:** Use a Flathub application as a Wine launcher. + +Lutris, Bottles, ProtonUp-Qt and finally Phoenicis PlayOnLinux + +**Method 2:** Install Wine or Lutris in Toolbx with Steam. + +``` + + $ sudo dnf install wine lutris steam + +``` + +**Method 3:** Partially install Wine on rpm-ostree. + +``` + + $ rpm-ostree install wine-core wine-core.i686 lutris + +``` + +There are other methods of playing games on Linux. Native Linux games, for example, are available in many repositories. Browser games are also easy to access. Installing Windows in a virtual machine is another method. However, while a virtual machine may work for simpler games, I do not recommend it for games that require a lot of processing power. + +### Other tips and suggestions + +In this final section, I would like to mention a few more things that do not depend on anything mentioned earlier in this article. + +#### rpm-ostree tips + +You can use the _override_ sub-command to manage base packages. For example, to remove the pre-loaded Firefox: + +``` + + $ rpm-ostree override remove firefox + +``` + +If you want to remove all overlays, overrides and initramfs: + +``` + + $ rpm-ostree ex reset + +``` + +rpm-ostree provides an _experimental_ live update feature so that you can avoid rebooting after installing packages. + +``` + + $ rpm-ostree install --apply-live htop + +``` + +Since you are on Fedora Silverblue or Fedora Kinoite, switching systems or updating to rawhide can be done with just a few commands. Also, reverting is easier than ever. + +Substitute _system_ with _kinoite_ or _silverblue_ in the below examples. + +**Switch systems**: + +``` + + $ rpm-ostree rebase fedora/35/x86_64/system + +``` + +**Upgrade to rawhide**: + +``` + + $ rpm-ostree rebase fedora/rawhide/x86_64/system + +``` + +**Rollback to a previous version**: + +``` + + $ rpm-ostree rollback fedora/35/x86_64/system + +``` + +#### Listing packages + +On Fedora Workstation you can use _dnf_ to list the packages in the repositories. But this does not work on Fedora Silverblue or Fedora Kinoite. So how do you do it? If you want to list the installed RPM packages on your system, you can use the following command. + +**To list the installed RPM packages**: + +``` + + $ rpm -qa + +``` + +However, if you want to list the packages in the repositories, you must either layer the _dnfdragora_ package or enter Toolbx. Then you can use the following _dnf_ commands. + +**To list all RPM packages (both installed and available)**: + +``` + + $ dnf list + +``` + +**To search for a specific RPM package**: + +``` + + $ dnf search + +``` + +#### Miscellaneous tips + + * When you want to install an application, first look at the Flatpak remotes. If it’s not there, use Toolbx. Finally, if you cannot run it in Toolbx, layer the package. If you still cannot get what you want to install, the last option is to install Windows in a virtual machine or on a separate partition or hard drive and configure [multi-booting][19]. + + + * I do not recommend using any other repositories besides the Fedora, RPM Fusion, and Copr repositories unless required. + + + * Remember that only KDE (Fedora Kinoite) and GNOME (Fedora Silverblue) desktop environments are officially supported by the Fedora Project. + + + * If you want your system to stay the same speed, you can try to avoid doing too much customization (global theme, Conky, Plank, etc.) + + + * For Fedora Kinoite users: To add the option to open folder or file as root in the Dolphin file manager on the right click, install the “Dolphin as root” plugin from the Discover application. + + + * If you want to preview video files without opening them, you can enter: $ rpm-ostree install ffmpegthumbs kffmpegthumbnailer. + +**Note:** For now, do not install Dolphin from Flatpak because it replaces the preinstalled Dolphin on the system. With the Flatpak version of Dolphin, you will not be able to preview videos because it does not contain the packages mentioned above + + + + * For Kinoite users: If you want to install a global theme, the installation from the system settings can sometimes cause problems. Instead, download the global theme file from the [KDE Store][20] and enter: $ kpackagetool5 -i /home/username/theme folder + + + * Courtesy of Daniel’s guidance on Fedora Discussion, it is possible to [install Windows fonts without any package layering][21]. + + + * Courtesy of Badhshah, the following can be used to [enable hardware video acceleration if you have an Intel Graphics 4600 chipset][22]: $ rpm-ostree install intel-gpu-tools libva-intel-driver libva-intel-hybrid-driver libva-utils libva-vdpau-driver libvdpau-va-gl mpv vdpauinfo + + + +### Conclusion + +Dear friends, you have come to the end of this article. If you have anything you want to add to this topic or if you have questions, I am waiting for you in the comments section below. Also, special thanks to Badhshah, Timothée Ravier and Daniels for helping me with some information in preparing this article. Finally, if you want to contribute to Fedora Silverblue or Fedora Kinoite or get more information, check the links below. Thank you for reading. + + * [][23] + + + * [][24] + + + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/how-i-customize-fedora-silverblue-and-fedora-kinoite/ + +作者:[Muhammed Yasin Özsaraç][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/harnapazade/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2022/02/fsb-fk-816x345.jpg +[2]: https://unsplash.com/@kanchanara?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/silver?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://getfedora.org/ +[5]: https://en.wikipedia.org/wiki/GNOME +[6]: https://en.wikipedia.org/wiki/KDE +[7]: https://blog.verbum.org/2020/08/22/immutable-%E2%86%92-reprovisionable-anti-hysteresis/ +[8]: https://projectatomic.io/ +[9]: https://en.wikipedia.org/wiki/Flatpak +[10]: https://en.wikipedia.org/wiki/RPM_Fusion +[11]: https://copr.fedorainfracloud.org/ +[12]: http://flathub.org +[13]: https://copr.fedorainfracloud.org/coprs/ +[14]: https://koji.fedoraproject.org/koji/packageinfo?packageID=8 +[15]: http://itch.io +[16]: https://www.protondb.com/ +[17]: https://github.com/GloriousEggroll/proton-ge-custom +[18]: https://appdb.winehq.org/index.php +[19]: https://en.wikipedia.org/wiki/Multi-booting +[20]: http://store.kde.org +[21]: https://discussion.fedoraproject.org/t/ms-core-fonts-on-silverblue/1916/5 +[22]: https://discussion.fedoraproject.org/t/anything-else-you-would-suggest-in-kinoite-silverblue-after-post-installation/35762/4 +[23]: https://docs.fedoraproject.org/en-US/fedora-silverblue/ +[24]: https://docs.fedoraproject.org/en-US/fedora-kinoite/ From 86e68512f4ecddf80049bffa6556185121aa3f36 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 17 Feb 2022 05:02:43 +0800 Subject: [PATCH 311/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220217=20?= =?UTF-8?q?How=20to=20Clean=20Up=20Snap=20Package=20Versions=20in=20Linux?= =?UTF-8?q?=20[Quick=20Tip]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220217 How to Clean Up Snap Package Versions in Linux -Quick Tip.md --- ...ap Package Versions in Linux -Quick Tip.md | 153 ++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 sources/tech/20220217 How to Clean Up Snap Package Versions in Linux -Quick Tip.md diff --git a/sources/tech/20220217 How to Clean Up Snap Package Versions in Linux -Quick Tip.md b/sources/tech/20220217 How to Clean Up Snap Package Versions in Linux -Quick Tip.md new file mode 100644 index 0000000000..25d5a29f58 --- /dev/null +++ b/sources/tech/20220217 How to Clean Up Snap Package Versions in Linux -Quick Tip.md @@ -0,0 +1,153 @@ +[#]: subject: "How to Clean Up Snap Package Versions in Linux [Quick Tip]" +[#]: via: "https://itsfoss.com/clean-snap-packages/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to Clean Up Snap Package Versions in Linux [Quick Tip] +====== + +Snap packages are not everyone’s favorite but they are an integral part of the Ubuntu ecosystem. + +It has its pros and cons. One of the negatives is that Snap packages are usually bigger in size and take a lot of disk space. + +This could be a problem if you are running out of disk space, specially on the root partition. + +Let me share a neat trick that you could use to cut down the disk spaced used by Snap packages. + +### Cleaning up old Snap package versions to free disk space + +The system files related to snap are stored in the /var/lib/snapd directory. Based on the number of Snap packages you have installed, this directory size could be in several GBs. + +Don’t just take my word for it. Do an assesement by [using the du command to check the directory size.][1] + +``` + + [email protected]:~$ sudo du -sh /var/lib/snapd + 5.4G /var/lib/snapd + +``` + +You may also use the Disk Usage Analyzer GUI tool to see the [disk usage in Ubuntu][2]. + +![Snap disk usage][3] + +That’s a lot, right? You could free up some disk space here. + +By design, Snap keeps at least one older version of the packages you have installed on your system. + +You can see this behavior by using the Snap command: + +``` + + snap list --all + +``` + +You should see the same package listed twice with different version and revision number. + +![Snap keeps at least two versions of each package][4] + +To free up disk space, you can delete the additional package versions. How do you know which one to delete? You can see that these older packages are labeled ‘disabled’. + +Don’t worry. You don’t have to manually do it. There is sort of automatic way to do it thanks to a nifty bash script written by Alan Pope while he was working in the [Snapcraft][5] team. + +I hope you know [how to create and run a bash shell script][6]. Basically, create a new file named clean-swap.sh and add the following lines to it. + +``` + + #!/bin/bash + # Removes old revisions of snaps + # CLOSE ALL SNAPS BEFORE RUNNING THIS + set -eu + snap list --all | awk '/disabled/{print $1, $3}' | + while read snapname revision; do + snap remove "$snapname" --revision="$revision" + done + +``` + +Save it and close the editor. + +To run this script, keep it in your home directory and then [open the terminal in Ubuntu][7] and run this command: + +``` + + sudo bash clean-snap.sh + +``` + +You can see that it starts removing the older version of packages. + +![Removing old snap package versions][8] + +If you check the disk space used by Snap now, you’ll see that the directory size is reduced now. + +``` + + [email protected]:~$ sudo du -sh /var/lib/snapd + 3.9G /var/lib/snapd + +``` + +If this works for you, you could run this command occasionally. + +#### How does this script work? + +If you are curious about what does this script do, let me explain. + +You have already seen the output of the “snap list –all” command. It’s output is passed to the [awk command][9]. Awk is a powerful scripting tool. + +The awk ‘/disabled/{print $1, $3}’ part looks for the string ‘disabled’ in each row and if it is found, it extracts the first column and third column. + +This output is further passed to a combination of while and read command. Read command gets the value of first column snapname and third column to revision variable. + +These variables are then used to run the snap remove command to delete with the name of the span package name and its revision number. + +The while loop runs as long as there are rows found with ‘disabled’ string in it. + +This all makes sense easily if you know a little bit about shell scripting. If you are not familiar with, we have a [bash tutorial series for beginners][10] for you. + +### Did you get your GBs back? + +You may see some forums advising to set up the Snap package retention value to 2. + +``` + + sudo snap set system refresh.retain=2 + +``` + +I don’t think it’s needed anymore. Snap’s default behavior now is to store total 2 versions for any package. + +Altogether, if you are running out of space, getting rid of the additional package version could surely one of the [ways to free up disk space on Ubuntu][11]. + +If this tutorial helped you free some space, let me know in the comment section. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/clean-snap-packages/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://linuxhandbook.com/find-directory-size-du-command/ +[2]: https://itsfoss.com/check-free-disk-space-linux/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/snap-disk-usage.png?resize=800%2C323&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/snap-keeps-two-versions-of-each-package.png?resize=800%2C347&ssl=1 +[5]: https://snapcraft.io/ +[6]: https://itsfoss.com/run-shell-script-linux/ +[7]: https://itsfoss.com/open-terminal-ubuntu/ +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/removing-old-snap-package-versions.png?resize=800%2C445&ssl=1 +[9]: https://linuxhandbook.com/awk-command-tutorial/ +[10]: https://linuxhandbook.com/tag/bash-beginner/ +[11]: https://itsfoss.com/free-up-space-ubuntu-linux/ From ee513d7bd85c6c97b2bff8c3f83b3508f0bf368d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 17 Feb 2022 05:02:55 +0800 Subject: [PATCH 312/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220216=20?= =?UTF-8?q?Archive=20files=20on=20your=20Linux=20desktop=20with=20Ark=20fo?= =?UTF-8?q?r=20KDE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220216 Archive files on your Linux desktop with Ark for KDE.md --- ... on your Linux desktop with Ark for KDE.md | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 sources/tech/20220216 Archive files on your Linux desktop with Ark for KDE.md diff --git a/sources/tech/20220216 Archive files on your Linux desktop with Ark for KDE.md b/sources/tech/20220216 Archive files on your Linux desktop with Ark for KDE.md new file mode 100644 index 0000000000..34efc05ffe --- /dev/null +++ b/sources/tech/20220216 Archive files on your Linux desktop with Ark for KDE.md @@ -0,0 +1,128 @@ +[#]: subject: "Archive files on your Linux desktop with Ark for KDE" +[#]: via: "https://opensource.com/article/22/2/archives-files-linux-ark-kde" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Archive files on your Linux desktop with Ark for KDE +====== +Create, examine, and expand compressed archives on KDE. +![Hand putting a Linux file folder into a drawer][1] + +When I finish with a project, I often like to take all the files I've created for the project and put them into an archive. It not only [saves space][2], but it gets those files out of my way, and prevents them from turning up as results when I use [find][3] and [grep][4] to search through files I consider current. Once files are in an archive, they're treated as a single object by your filesystem, which means that you can't browse them the way you can a normal folder. You could unarchive them, or you could open a terminal and run the appropriate archive command, such as [tar][5], to list the contents of the archive. Or you can use an application like Ark to list, preview, modify, and manage your archives. + +### Install Ark on Linux + +If you're running the KDE Plasma Desktop, you already have Ark installed, but if not then it's available from your package manager. On Fedora, Mageia, and similar: + + +``` +`$ sudo dnf install ark` +``` + +On Debian, Elementary, and similar: + + +``` +`$ sudo apt install ark` +``` + +You can [install it as a Flatpak][6] from [Flathub][7], too. + +### Create an archive + +The best way to get comfortable with archives is to create one for yourself, and then explore it. All of this can be done with just Ark. + +First, launch Ark from your application menu, and then go to the **Archive** menu and select **New**. + +![Creating a new archive with Ark][8] + +(Seth Kenlon, [CC BY-SA 4.0][9]) + +Give your archive a filename, accept the default compression settings, and save it to your home directory. + +Ark won't create an empty archive, but after you've set a name and location, Ark is poised to create an archive as soon as you add a file to it. + +To add a file to your soon-to-be archive, just drag and drop a file into the Ark window. + +![Items in an archive][10] + +(Seth Kenlon, [CC BY-SA 4.0][9]) + +There are two benefits to archiving: consolidation and compression. By adding files to the archive, you've consolidated files into one place. They exist in the archive now, so you can throw the original copies in the trash if it's part of your goal to get files out of the way. + +To see how much disk space you've saved by compressing your files, go to the **Archive** menu and select **Properties**. This shows you the size of the unpacked archive as well as the size of the packed archive, and a lot of other useful metadata. + +![Archive properties and metadata][11] + +(Seth Kenlon, [CC BY-SA 4.0][9]) + +There's a lot more that Ark can do, but for now close Ark as if you were finished. Your achive now exists in the location where you saved it (in this example, it's **example.tar.gz** in my home folder.) + +### Viewing files in an archive + +Any archive can be opened in Ark, just as if it were a normal folder. To open an archive in Ark, just click on it in your file manager, or right-click on it and select **Open with Ark**. + +Once the archive is open in Ark, you can perform most actions you could do from a file manager, including removing files, adding new files, previewing the contents of a file, and more. + +### Removing a file from an archive + +Sometimes you put a file into an archive you don't need. When you want to remove a file from an archive, right-click on the file and select **Delete**. + +![Right-click menu][12] + +(Seth Kenlon, [CC BY-SA 4.0][9]) + +### Adding files to an archive + +Adding a file to an archive is even easier. You can just drag and drop a file from your file manager into Ark. Alternately, you can select **Add Files** from the right-click menu in Ark. + +### Extracting just one file from an archive + +When faced with an archive, many people just unarchive the entire thing and then fish for the one or two files they actually need. For small archives, that's fine, but for big archives that takes time and disk space, even if only temporarily. + +With Ark, you can extract only the files you need by dragging them from the Ark window to the destination you want to save them to. Alternately, select **Extract** from the right-click menu. + +### Previewing files in an archive + +You don't always need to extract a file. If you just need to refer to a file quickly, Ark may be able to show you a preview of the file without extracting it to your drive. + +To preview a file, double-click on it in Ark. + +![Previewing a file in Ark][13] + +(Seth Kenlon, [CC BY-SA 4.0][9]) + +### Archive it + +Managing archives on a Linux desktop is easy and intuitive. Ark is a great archive tool, and many other Linux desktops have similar tools, so even if you're not using Ark you might find something similar to it equally as useful. For me, archiving has been an important part of keeping my files organized, and conserving disk space. As for Ark, it makes interacting with those archives convenient. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/archives-files-linux-ark-kde + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/yearbook-haff-rx-linux-file-lead_0.png?itok=-i0NNfDC (Hand putting a Linux file folder into a drawer) +[2]: https://opensource.com/article/21/11/linux-commands-convert-files +[3]: https://opensource.com/article/21/9/linux-find-command +[4]: https://opensource.com/article/21/3/grep-cheat-sheet +[5]: https://opensource.com/article/17/7/how-unzip-targz-file +[6]: https://opensource.com/article/21/11/install-flatpak-linux +[7]: https://flathub.org/apps/details/org.kde.ark +[8]: https://opensource.com/sites/default/files/ark-new.jpg (Creating a new archive in Ark) +[9]: https://creativecommons.org/licenses/by-sa/4.0/ +[10]: https://opensource.com/sites/default/files/ark-items.jpg (Items in an archive) +[11]: https://opensource.com/sites/default/files/ark-properties.jpg (Archive properties and metadata) +[12]: https://opensource.com/sites/default/files/ark-menu-click-right.jpg (Right-click menu) +[13]: https://opensource.com/sites/default/files/ark-preview.jpg (Previewing a file in Ark) From 8d567cae2231f452ad9e51eaf5f7e4af675c10ab Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 17 Feb 2022 05:03:05 +0800 Subject: [PATCH 313/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220216=20?= =?UTF-8?q?Integrating=20fuzzing=20into=20your=20open=20source=20project?= =?UTF-8?q?=20with=20OSS-Fuzz?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220216 Integrating fuzzing into your open source project with OSS-Fuzz.md --- ... your open source project with OSS-Fuzz.md | 254 ++++++++++++++++++ 1 file changed, 254 insertions(+) create mode 100644 sources/tech/20220216 Integrating fuzzing into your open source project with OSS-Fuzz.md diff --git a/sources/tech/20220216 Integrating fuzzing into your open source project with OSS-Fuzz.md b/sources/tech/20220216 Integrating fuzzing into your open source project with OSS-Fuzz.md new file mode 100644 index 0000000000..facef8c50a --- /dev/null +++ b/sources/tech/20220216 Integrating fuzzing into your open source project with OSS-Fuzz.md @@ -0,0 +1,254 @@ +[#]: subject: "Integrating fuzzing into your open source project with OSS-Fuzz" +[#]: via: "https://opensource.com/article/22/2/debug-open-source-project-oss-fuzz" +[#]: author: "David Korczynski https://opensource.com/users/davkor" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Integrating fuzzing into your open source project with OSS-Fuzz +====== +OSS-Fuzz is a free service that continuously runs fuzzers for open +source projects. +![magnifying glass on computer screen, finding a bug in the code][1] + +[OSS-Fuzz][2] is a free service that continuously runs fuzzers for open source projects. This GitHub repository manages the service and enrolling in it is handled by pull requests. + +Once a project has integrated with OSS-Fuzz, the fuzzers affiliated with that project run daily—continuously and indefinitely. OSS-Fuzz emails maintainers when a bug is found and also has a dashboard with details about all issues found (stack traces, artifacts for reproducing issues, and so on). + +The benefits of integrating with OSS-Fuzz are that most aspects of managing fuzzer execution and analyzing the results are done by OSS-Fuzz itself. This is important in fuzzing because fuzzers build up a historical profile over time, meaning that continuous analysis is essential to maximize the results. On one project, which we detail in a [blog post][3], fuzzing had been run on just an ad hoc basis for months, with no reports of any specific issue. However, after integration with OSS-Fuzz, the service reported an issue within about a week of continuous execution. In this case, a severe security issue was only discovered because of the continuous analysis done by OSS-Fuzz. + +### Which projects can integrate into OSS-fuzz? + +To qualify for integration, an open source project must serve a critical purpose to global infrastructure. This usually means larger user groups rely on the project or other essential open source projects depend on it. The verdict on whether a project is security-critical is made on a project-by-project basis by the OSS-Fuzz maintainers. To find out whether the maintainers will accept your project, make a pull request to integrate your project, and they will let you know through the PR if the project is accepted or not. + +Furthermore, you must write the project in one or more of the supported languages by OSS-Fuzz. At the time of writing, these are C, C++, Go, Rust, Python, Java, and Swift. + +OSS-Fuzz manages fuzzing of more than 500 projects at this stage, including Kubernetes, Istio, Envoy, VLC, OpenSSL, Containerd, Binutils, Spidermonkey, and systemd. + +### Integrate a project into OSS-Fuzz + +The two main ingredients for integrating a project into OSS-Fuzz are a set of fuzzers that can analyze your open source project and the required infrastructure glue to build your fuzzers in the OSS-Fuzz environment. + +#### Create a set of fuzzers + +Creating a set of fuzzers for a given open source project largely depends on the project itself. Here's a simple example, demonstrating a [self-contained library][4] in a single file called `char_lib.c`, that exposes a single function: + + +``` + + +// Count the number of lowercase letters +// input must be a null-terminated string. +int count_lowercase_letters(char *input); + +``` + +Write a simple fuzzer for this library: + + +``` + + +int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { +  // wrap input in null-terminated string +  char *ns = malloc(size+1); +  memcpy(ns, data, size); +  ns[size] = '\0'; +  +  count_lowercase_letters(ns); +  +  free(ns); +} + +``` + +Place this function in a file called `fuzz_char_lib.c` at the root of the Git repository. At this point, you can fuzz your library by compiling `char_lib.c` and `fuzz_char_lib.c`: + + +``` + + +clang -fsanitize=fuzzer-no-link char_lib.c -c -o char_lib.o +clang -fsanitize=fuzzer-no-link fuzz_char_lib.c -c -o fuzz_char_lib.o +clang -fsanitize=fuzzer fuzz_char_lib.o char_lib.o -o fuzzer + +``` + +Finally, run the fuzzer: + + +``` +`$ ./fuzzer` +``` + +#### OSS-Fuzz infrastructure setup + +To integrate the sample library into OSS-Fuzz, you must create three files: `project.yaml`, `Dockerfile`, and `build.sh`. These are the required components to create a project folder on OSS-Fuzz ([see this Kubernetes integration][5] as a detailed example.) + +#### Project.yaml + +This [YAML][6] file holds management data about the project. The two most important parts of the file are the list of contacts (**primary_contact** and **auto_ccs**) and the project's programming language. Here is the file: + + +``` + + +homepage: "" +main_repo: '' +primary_contact: "[adam@example.com][7]" +auto_ccs : + - "[david@example.com][8]" +language: c + +``` + +#### Dockerfile + +The Dockerfile is responsible for building a container that downloads the relevant source repositories and downloads and configures dependencies. OSS-Fuzz performs several builds to accommodate different sanitizers and various fuzz engines, so the container only creates a build script that can build the project but doesn't run the build script itself. Here is a sample Dockerfile: + + +``` + + +FROM gcr.io/oss-fuzz-base/base-builder + +RUN git clone +COPY build.sh $SRC/build.sh +WORKDIR $SRC/oss-fuzz-example + +``` + +#### Build.sh + +The `build.sh` script builds the project. It needs to use some specific environment variables for the compiler and compiler flags rather than specifying the compiler because OSS-Fuzz builds each project in many different ways (different fuzzers, different flags, and so on). The most important environment variables are **CC**, **CXX**, **CFLAGS**, **CXXFLAGS**, and **LIB_FUZZING_ENGINE**. The first four of these flags are common compiler variables. However, **LIB_FUZZING_ENGINE** is a flag that must be used in the linking step of a fuzzer build. + + +``` + + +$CC $CFLAGS char_lib.c -c -o char_lib.o +$CC $CFLAGS fuzz_char_lib.c -c -o fuzz_char_lib.o +$CC $LIB_FUZZING_ENGINE fuzz_char_lib.o char_lib.o -o $OUT/simple-fuzzer + +``` + +The OSS-Fuzz run-time environment doesn't run the fuzzers from within the container, and for this reason, the binaries must be statically linked to most of its dependencies. The build script must place the fuzzing binaries in the directory defined by the **OUT** environment variable. + +Place these three scripts in a folder called `oss-fuzz-example` within the `projects` folder in the OSS-Fuzz repository, and then you're ready to test the OSS-Fuzz integration. + +#### Testing OSS-Fuzz integration + +To test the OSS-Fuzz integration, use the `infra/helper.py` script from the OSS-Fuzz repository. This script accepts various commands. The most important commands for this example are `build_fuzzers`, `run_fuzzer`, and `check_build`. These commands are all you need to test the integration. + +These commands do the following: + + * `build_fuzzers` builds the necessary containers for the project and runs the `build.sh` script from within these containers. + * `run_fuzzer` runs a given fuzzer for a given project. This command must run after `build_fuzzers`. + * `check_build` performs various checks to ensure the setup works properly. This check must be passed for the CI of OSS-Fuzz to succeed. + + + +The best way to visualize these commands is to run them in series. + +First, clone both repositories: + + +``` + + +$ git clone +$ git clone + +``` + +Next, make a project directory in the OSS-Fuzz repo: + + +``` +`$ mkdir oss-fuzz/projects/oss-fuzz-example` +``` + +Copy over OSS-Fuzz artifacts to the directory: + + +``` + + +$ cp oss-fuzz-example/oss-fuzz-example/Dockerfile oss-fuzz/projects/oss-fuzz-example/Dockerfile +$ cp oss-fuzz-example/oss-fuzz-example/build.sh oss-fuzz/projects/oss-fuzz-example/build.sh +$ cp oss-fuzz-example/oss-fuzz-example/project.yaml oss-fuzz/projects/oss-fuzz-example/project.yaml + +``` + +Then navigate into OSS-Fuzz and build the fuzzers: + + +``` + + +$ cd oss-fuzz +$ python3 infra/helper.py build_fuzzers oss-fuzz-example + +``` + +Now run the fuzzer. Use **CTRL+C** to exit this step: + + +``` +`$ python3 infra/helper.py run_fuzzer oss-fuzz-example simple-fuzzer` +``` + +Check the build: + + +``` + + +$ python3 infra/helper.py check_build oss-fuzz-example +… +… +INFO:root:Check build passed. + +``` + +### Submit OSS-Fuzz integration + +At this stage, you have all the artifacts needed for integration. The remaining step before completing the integration is to make a pull request on the OSS-Fuzz repository with the OSS-Fuzz artifacts; specifically, the `Dockerfile`, `build.sh`, and `project.yaml` files. + +If the maintainers approve that pull request, the integration is complete, and OSS-Fuzz starts running fuzzers continuously. It reports the progress on a dashboard. In addition, if OSS-Fuzz finds bugs in your library, it emails a detailed report to the list of maintainers in the **primary_contact** and **auto_ccs** fields of the `project.yaml` file, e.g., stack trace and issues found. + +### The importance of fuzzing + +The proof-of-concept integration is a minimal example. A more complex project can be difficult to configure for fuzzing, but continuous fuzzing pays dividends over time. + +There are many reasons why a project should integrate with OSS-Fuzz. It's a free service with significant support behind it, and many projects have benefited from it tremendously. As of January 2022, OSS-Fuzz has found over [36,000][9] bugs in [550][10] open source projects. + +Integrating fuzzing into a project is time-consuming. Be prepared to devote effort to this, and do not expect a mature integration to happen overnight. Many projects have benefited from fuzzing and OSS-Fuzz, but most have invested many hours to ensure the integration and fuzzing setup functions well. It's hard work, but it's well worth it. + +Happy OSS-Fuzz integration and happy bug hunting! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/debug-open-source-project-oss-fuzz + +作者:[David Korczynski][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/davkor +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/mistake_bug_fix_find_error.png?itok=PZaz3dga (magnifying glass on computer screen, finding a bug in the code) +[2]: https://github.com/google/oss-fuzz +[3]: https://adalogics.com/blog/the-importance-of-continuity-in-fuzzing-cve-2020-28362 +[4]: https://github.com/AdaLogics/oss-fuzz-example +[5]: https://github.com/google/oss-fuzz/tree/master/projects/kubernetes +[6]: https://opensource.com/article/21/9/yaml-cheat-sheet +[7]: mailto:adam@example.com +[8]: mailto:david@example.com +[9]: https://bugs.chromium.org/p/oss-fuzz/issues/list?q=-status%3AWontFix%2CDuplicate%20-component%3AInfra&can=1 +[10]: https://github.com/google/oss-fuzz/tree/master/projects From 18bddb2978832b45f09b1189932bb1f1390d6eea Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 17 Feb 2022 05:03:26 +0800 Subject: [PATCH 314/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220216=20?= =?UTF-8?q?Everything=20You=20Need=20to=20Know=20About=20Mozilla=20and=20M?= =?UTF-8?q?eta=20(Facebook)=20Working=20Together?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220216 Everything You Need to Know About Mozilla and Meta (Facebook) Working Together.md --- ...la and Meta (Facebook) Working Together.md | 114 ++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 sources/news/20220216 Everything You Need to Know About Mozilla and Meta (Facebook) Working Together.md diff --git a/sources/news/20220216 Everything You Need to Know About Mozilla and Meta (Facebook) Working Together.md b/sources/news/20220216 Everything You Need to Know About Mozilla and Meta (Facebook) Working Together.md new file mode 100644 index 0000000000..0b00fb86c0 --- /dev/null +++ b/sources/news/20220216 Everything You Need to Know About Mozilla and Meta (Facebook) Working Together.md @@ -0,0 +1,114 @@ +[#]: subject: "Everything You Need to Know About Mozilla and Meta (Facebook) Working Together" +[#]: via: "https://news.itsfoss.com/mozilla-meta-facebook/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Everything You Need to Know About Mozilla and Meta (Facebook) Working Together +====== + +I’m sure it is easy to make several assumptions about the story going by the headlines. + +_Why?_ + +Well, it is **Facebook**, after all. + +Even if it is “**Meta**” now, it does not change the fact that they were involved in some of the worst privacy practices ever. + +If you think twice, Facebook isn’t an ideal privacy-focused social media platform (even though I still use it for certain use-cases). + +_With so much more to complain about, how come a privacy-focused company “Mozilla” end up working with Meta (Facebook)?_ + +Surprisingly, Mozilla made several remarks about Facebook’s bad privacy practices in the past. + +Not to forget, Mozilla Firefox was one of the first web browsers to prevent companies like Facebook from tracking users thanks to [total cookie protection][1] and some other technologies. + +Furthermore, they recently started a study collaborating with **The Markup** to analyze the type of information Facebook collects. + +So, why are they working with Facebook now? + +### Privacy-Preserving Attribution Using IPA + +Mozilla revealed in a [blog post][2] that it has been working with a team from Meta on a new proposal about a privacy-respecting attribution. + +Attribution in advertising lets the advertisers/marketers know if their ad campaigns are performing as expected. + +And, Mozilla plans to introduce **Interoperable Private Attribution** (or IPA) to give advertisers the ability to check insights while making the advertising privacy-friendly. + +### How Does IPA Aim to Make Advertising Privacy-Friendly? + +Mozilla is utilizing its expertise with its existing privacy-preserving telemetry technology, [Prio][3]. + +While that sounds promising, how does IPA work? + +As described in the blog post, Mozilla says that IPA offers two privacy-preserving features: + + * It uses Multi-party Computation (MPC) to prevent a single entity (browser, advertisers, or websites) to learn about user behavior. + * Instead of individual results linking to a track/profile users, IPA is an aggregated system that does not link back anything to individual users. + + + +Technically, they plan to use “match keys” that are different from cookies but can be used across different browsers/devices to be able to generate useful reports. + +These match keys will help produce summary statistics about the ad interaction events (whether it is clicked, seen, and if it made a conversion). + +As per the proposal, the match keys would be writable but not readable, making it a critical component of the privacy properties in IPA. + +### Is This Useful? + +Taking a good look at its [proposal][4], it is safe to say that it sounds promising. + +Considering ad revenue is still the major fuel for most businesses, it only makes sense to make it privacy-friendly and less intrusive. + +The result could simply bring back the good old days when users weren’t worried about advertising but curious about what they see in them. + +Unlike [Google’s FLoC][5], this can create a win-win scenario for both advertisers and the users as well. + +### How Does Meta Fit in the Picture? + +![][6] + +I am really not sure about this. + +I have no intention of making ill-informed remarks about the technology proposed by Mozilla, collaborating with Meta. + +On the other hand, I can’t be confident about it, considering they chose “Meta” to collaborate on something that is important to improve the advertising industry without harming user privacy. + +### Mozilla, What Are You Hiding? + +I’m not stirring up controversy (or a wild theory). + +But, a transparent, and privacy-respecting company just decided to collaborate with a company that isn’t really known for privacy? + +Isn’t it too obvious that the team at Mozilla already knows this? + +And, they still decided to go ahead with it, without any transparent public communication on their social media channels as well. + +Yes, they did publish the blog post, but it wasn’t promoted, considering it is an important proposal affecting almost every industry on the web. + +_Is it safe to assume that Mozilla no longer cares about its userbase with this move?_ + +_It’s totally up for discussion in the comments down below!_ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/mozilla-meta-facebook/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/firefox-86-release/ +[2]: https://blog.mozilla.org/en/mozilla/privacy-preserving-attribution-for-advertising/ +[3]: https://crypto.stanford.edu/prio/ +[4]: https://docs.google.com/document/d/1KpdSKD8-Rn0bWPTu4UtK54ks0yv2j22pA5SrAD9av4s/edit +[5]: https://techcrunch.com/2022/01/25/google-kills-off-floc-replaces-it-with-topics/ +[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= From d92811dabcfd3092cffd077002691e1a137e2487 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 17 Feb 2022 08:46:55 +0800 Subject: [PATCH 315/334] translated --- ...tive Cross-Platform LaTeX Editor by KDE.md | 123 ------------------ ...tive Cross-Platform LaTeX Editor by KDE.md | 123 ++++++++++++++++++ 2 files changed, 123 insertions(+), 123 deletions(-) delete mode 100644 sources/tech/20220215 Kile- An Interactive Cross-Platform LaTeX Editor by KDE.md create mode 100644 translated/tech/20220215 Kile- An Interactive Cross-Platform LaTeX Editor by KDE.md diff --git a/sources/tech/20220215 Kile- An Interactive Cross-Platform LaTeX Editor by KDE.md b/sources/tech/20220215 Kile- An Interactive Cross-Platform LaTeX Editor by KDE.md deleted file mode 100644 index 42c33fbcd3..0000000000 --- a/sources/tech/20220215 Kile- An Interactive Cross-Platform LaTeX Editor by KDE.md +++ /dev/null @@ -1,123 +0,0 @@ -[#]: subject: "Kile: An Interactive Cross-Platform LaTeX Editor by KDE" -[#]: via: "https://itsfoss.com/kile/" -[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Kile: An Interactive Cross-Platform LaTeX Editor by KDE -====== - -_**Brief: Kile is one of the best LaTeX editors available for Linux, by KDE. What does it offer? Let us take a look.**_ - -You can use a TeX/LaTeX editor for a variety of documents. Not just limited to scientific research, you can also add your code, start writing a book (academic/creative), or draft articles. - -An interactive solution with the option for preview, and several features, should come in handy if you regularly work with LaTeX documents. - -Kile is one such option by KDE, available for Linux and other platforms. In fact, it is one of the [best LaTeX editors available for Linux][1], which we decided to highlight separately. - -### An Open-Source Integrated LaTeX Editor - -![][2] - -Kile may not be the most popular option, but it certainly stands out for what it offers. - -It may not be the perfect fit if you are looking for a simple LaTeX Editor. However, it does its best to present you with a user-friendly experience while guiding you from the start. - -Let me highlight some features below. - -### Features of Kile - -![][3] - -As I mentioned, Kile is a feature-rich LaTeX editor. It could be overwhelming if you are new to TeX/LaTeX documents, but it is still worth exploring. - -The key features include: - - * Setup wizard to easily start using LaTeX editor. - * Available templates to save time for the document outline. - * Auto-completion of LaTeX commands. - * Compile and preview your document in a single click without leaving the window. - * Hundreds of preset modes to define the type of document (JSON, R Documentation, VHDL, HTML, etc.) - * Log viewer - * Ability to convert documents . - * PDF Wizard tool to add/remove and convert PDF files. - * Inverse and Forward search feature. - * Create projects to organize a collection of documents. - * Plenty of LaTeX options to add the required commands without typing anything (like creating a bullet list, adding a math function, etc.) - * Easy to navigate through chapters or sections. - * Navigate through the entire document using the small preview (if the document is too large to scroll) - - - -![][4] - -In addition to these, you can configure the appearance, tweak the keyboard shortcuts, find various encoding support, and more. - -Furthermore, the presence of setup wizards (and other wizards within the app) makes the user experience a breeze. - -For instance, here’s how it looks when you first launch the app: - -![][5] - -It will check for any configuration issues and help you ensure a seamless experience. - -![][6] - -Once the setup is complete, it will quickly prompt you with the available templates to get you started: - -![][7] - -So, the guided setup and all the aforementioned features should make up for an excellent LaTeX editing experience. - -### Install Kile in Linux - -You should find Kile in the default Linux repositories and the software center. For KDE, you should see it listed in Discover. - -Unfortunately, it does not offer a Flatpak or a Snap package. So, you will have to rely on the standard packages available from repos. - -In case you rely on the terminal (Ubuntu-based), you can install it by typing: - -``` - - sudo apt install kile - -``` - -For Windows users, you can find it listed in the [Microsoft Store][8]. - -If you are curious, you can go through the [source code][9] or visit the official site. - -[Kile][10] - -### Wrapping Up - -As a LaTeX user, you should find all the options useful for a productive editing experience. If you are new to TeX/LaTeX documents, you can still use it with templates, quick functions, auto-completion features to make the experience easy. - -What is your favorite LaTeX document editor? Feel free to let me know in the comments below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/kile/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/latex-editors-linux/ -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-latex-editor.png?resize=800%2C450&ssl=1 -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-latex.png?resize=800%2C534&ssl=1 -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-settings.png?resize=732%2C588&ssl=1 -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-setup.png?resize=800%2C682&ssl=1 -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-setup-1.png?resize=800%2C757&ssl=1 -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-templates.png?resize=800%2C652&ssl=1 -[8]: https://www.microsoft.com/en-in/p/kile/9pmbng78pfk3?rtc=1&activetab=pivot:overviewtab -[9]: https://invent.kde.org/office/kile -[10]: https://apps.kde.org/kile/ diff --git a/translated/tech/20220215 Kile- An Interactive Cross-Platform LaTeX Editor by KDE.md b/translated/tech/20220215 Kile- An Interactive Cross-Platform LaTeX Editor by KDE.md new file mode 100644 index 0000000000..adbfddf958 --- /dev/null +++ b/translated/tech/20220215 Kile- An Interactive Cross-Platform LaTeX Editor by KDE.md @@ -0,0 +1,123 @@ +[#]: subject: "Kile: An Interactive Cross-Platform LaTeX Editor by KDE" +[#]: via: "https://itsfoss.com/kile/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Kile:KDE 中的交互式跨平台 LaTeX 编辑器 +====== + +_**简介:Kile 是 KDE 公司为 Linux 提供的最好的 LaTeX 编辑器之一。它能提供什么?让我们来看一看。**_ + +你可以用 TeX/LaTeX 编辑器处理各种文件。不仅仅限于科学研究,你还可以添加你的代码,开始写书(学术/创作),或者起草文章。 + +如果你经常处理 LaTeX 文档,一个具有预览选项和若干功能的交互式解决方案应该会很方便。 + +Kile 是 KDE 的一个这样的选择,可用于 Linux 和其他平台。事实上,它是[可用于 Linux 的最佳 LaTeX 编辑器][1]之一,我们决定单独介绍它。 + +### 一个开源的集成 LaTeX 编辑器 + +![][2] + +Kile 可能不是最受欢迎的选择,但它确实因其提供的东西而脱颖而出。 + +如果你正在寻找一个简单的 LaTeX 编辑器,它可能不是完美的选择。然而,它尽力为你提供友好的体验,同时从一开始就为你提供指导。 + +让我强调以下一些特点。 + +### Kile 的特点 + +![][3] + +正如我提到的,Kile 是一个功能丰富的 LaTeX 编辑器。如果你是 TeX/LaTeX 文档的新手,它可能会让你不知所措,但它仍然值得探索。 + +其主要特性包括: + + * 设置向导可以轻松开始使用 LaTeX 编辑器。 + * 可用的模板可以节省文件大纲的时间。 + * 自动完成 LaTeX 命令。 + * 在不离开窗口的情况下,一键编译和预览你的文档。 + * 上百种预设模式来定义文档的类型(JSON、R 文档、VHDL、HTML 等)。 + * 日志查看器。 + * 转换文档的能力。 + * PDF 向导工具来添加/删除和转换 PDF 文件。 + * 反向和正向搜索功能。 + * 创建项目来组织文件的集合。 + * 大量的 LaTeX 选项,无需键入任何东西即可添加所需的命令(如创建一个列表,添加一个数学函数等)。 + * 易于在各章或各节中导航。 + * 使用小窗口预览浏览整个文件(如果文件太大,无法滚动)。 + + + +![][4] + +除了这些,你还可以配置外观,调整键盘快捷键,找到各种编码支持等。 + +此外,设置向导(以及应用内的其他向导)的存在使用户体验变得轻而易举。 + +例如,以下是你第一次启动该应用时: + +![][5] + +它将检查任何配置问题,帮助你确保无缝体验。 + +![][6] + +设置完成后,它将迅速提示你可用的模板,让你开始: + +![][7] + +因此,指导性的设置和上述所有的功能应该构成一个出色的 LaTeX 编辑体验。 + +### 在 Linux 中安装 Kile + +你应该在默认的 Linux 仓库和软件中心找到 Kile。对于 KDE,你应该看到它被列在 Discover 中。 + +不幸的是,它不提供 Flatpak 或 Snap 包。所以,你将不得不依靠从仓库中获得的标准软件包。 + +如果你依赖终端(基于 Ubuntu),你可以输入以下命令安装: + +``` + + sudo apt install kile + +``` + +对于Windows用户,你可以在[微软商店][8]中找到它。 + +如果你感到好奇,你可以查看[源代码][9]或访问官方网站。 + +[Kile][10] + +### 总结 + +作为一个 LaTeX 用户,你应该发现所有的选项对高效的编辑经体验都很有用。如果你是 TeX/LaTeX 文档的新手,你仍然可以使用它的模板、快速函数、自动完成功能,使体验变得简单。 + +你最喜欢的 LaTeX 文档编辑器是什么?欢迎在下面的评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/kile/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/latex-editors-linux/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-latex-editor.png?resize=800%2C450&ssl=1 +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-latex.png?resize=800%2C534&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-settings.png?resize=732%2C588&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-setup.png?resize=800%2C682&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-setup-1.png?resize=800%2C757&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-templates.png?resize=800%2C652&ssl=1 +[8]: https://www.microsoft.com/en-in/p/kile/9pmbng78pfk3?rtc=1&activetab=pivot:overviewtab +[9]: https://invent.kde.org/office/kile +[10]: https://apps.kde.org/kile/ From d7808ffa3fdb6a866d64748991c8bb9b35df7a90 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 17 Feb 2022 08:52:17 +0800 Subject: [PATCH 316/334] translating --- .../tech/20220215 5 ways LibreOffice supports accessibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220215 5 ways LibreOffice supports accessibility.md b/sources/tech/20220215 5 ways LibreOffice supports accessibility.md index 75a94d5254..3f7b232a1c 100644 --- a/sources/tech/20220215 5 ways LibreOffice supports accessibility.md +++ b/sources/tech/20220215 5 ways LibreOffice supports accessibility.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/2/libreoffice-accessibility" [#]: author: "Don Watkins https://opensource.com/users/don-watkins" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 13688158cfb93d1f956d7e46b5ce74a54bfcd8f6 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 17 Feb 2022 09:10:22 +0800 Subject: [PATCH 317/334] Rename sources/news/20220216 Everything You Need to Know About Mozilla and Meta (Facebook) Working Together.md to sources/talk/20220216 Everything You Need to Know About Mozilla and Meta (Facebook) Working Together.md --- ... to Know About Mozilla and Meta (Facebook) Working Together.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{news => talk}/20220216 Everything You Need to Know About Mozilla and Meta (Facebook) Working Together.md (100%) diff --git a/sources/news/20220216 Everything You Need to Know About Mozilla and Meta (Facebook) Working Together.md b/sources/talk/20220216 Everything You Need to Know About Mozilla and Meta (Facebook) Working Together.md similarity index 100% rename from sources/news/20220216 Everything You Need to Know About Mozilla and Meta (Facebook) Working Together.md rename to sources/talk/20220216 Everything You Need to Know About Mozilla and Meta (Facebook) Working Together.md From 82617eda2b1b15b064a0653cfeedbac30b73e768 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 17 Feb 2022 09:38:52 +0800 Subject: [PATCH 318/334] RP @geekpi https://linux.cn/article-14279-1.html --- ...asma 5.24 in Kubuntu 21.10 Impish Indri.md | 79 +++++++------------ 1 file changed, 27 insertions(+), 52 deletions(-) rename {translated/tech => published}/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md (62%) diff --git a/translated/tech/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md b/published/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md similarity index 62% rename from translated/tech/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md rename to published/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md index 207c36ab5c..588eccbf6a 100644 --- a/translated/tech/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md +++ b/published/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md @@ -3,38 +3,30 @@ [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14279-1.html" -如何在 Kubuntu 21.10 Impish Indri 中获得 KDE Plasma 5.24 +如何在 Kubuntu 21.10 中升级 KDE Plasma 5.24 ====== -KDE 开发人员启用了有名的 Backports PPA,以便你在 Kubuntu 21.10 中安装/升级到 KDE Plasma 5.24。 以下是方法。 -KDE Plasma 5.24 最近[发布][1]了令人兴奋的变化。在这个新版本中,你会得到一个全新的概览页面,它很像 GNOME 的概览。还有,一个更新的默认 Breeze 主题、性能更新、通知外观的调整等。在我们的[官方综述页面][2]阅读更多关于这些功能的信息。 +![](https://img.linux.net.cn/data/attachment/album/202202/17/093727qw3js653lzksscfw.jpg) + +> KDE 开发人员启用了有名的 Backports PPA,以便你在 Kubuntu 21.10 中安装/升级到 KDE Plasma 5.24。 以下是方法。 + +KDE Plasma 5.24 最近的 [发布][1] 带来了令人兴奋的变化。在这个新版本中,你会得到一个全新的概览页面,它很像 GNOME 的概览。此外,还有崭新的默认 Breeze 主题、性能提升、通知外观的调整等。在我们的 [官方综述页面][2] 可以阅读更多关于这些功能的信息。 如果你很匆忙,没有时间阅读文章,这里有一组简短的命令,可以做到这些。😃 ``` - - sudo add-apt-repository ppa:kubuntu-ppa/backports - sudo apt update - sudo apt full-upgrade - +sudo add-apt-repository ppa:kubuntu-ppa/backports +sudo apt update +sudo apt full-upgrade ``` -如果你运行 Kubuntu 21.10 Impish Indri,你将不会得到这个开箱更新。因为 Kubuntu 21.10 Impish Indri 目前有 KDE Plasma 5.22.5 作为稳定版本。尽管 Kubuntu 21.10 计划在 2022 年 7 月结束生命,你仍然可以通过 Backports PPA 安装 KDE Plasma 5.24。 - -然而,请注意,你将在 2022 年 4 月到期的 Kubuntu 22.04 LTS 中得到 KDE Plasma 5.24,比 Kubuntu 21.10 的寿命结束早得多。 - -### 内容 - - * [如何在 Kubuntu 21.10 中安装 KDE Plasma 5.24][3] - * [如何在 Ubuntu 21.10 中与 GNOME 一起安装 KDE Plasma 5.24][4] - * [我可以在 Ubuntu 20.04 LTS 中安装 KDE Plasma 5.24 吗?][5] - * [如何卸载][6] - +如果你运行 Kubuntu 21.10 Impish Indri,你不会马上得到这个更新。因为 Kubuntu 21.10 Impish Indri 目前采用 KDE Plasma 5.22.5 作为稳定版本。尽管 Kubuntu 21.10 计划在 2022 年 7 月结束生命,但你仍然可以通过 Backports PPA 安装 KDE Plasma 5.24。 +然而,请注意,你将在 2022 年 4 月的 Kubuntu 22.04 LTS 中得到 KDE Plasma 5.24,这要比 Kubuntu 21.10 的寿命结束早得多。 ### 如何在 Kubuntu 21.10 中安装 KDE Plasma 5.24 @@ -42,18 +34,14 @@ KDE Plasma 5.24 最近[发布][1]了令人兴奋的变化。在这个新版本 #### 如何在 Kubuntu 21.10 中安装 KDE Plasma 5.24 -如果你对 Discover 感到满意,添加 Backports PPA `ppa:kubuntu-ppa/backports` 作为软件源并点击更新。一旦检索到更新的软件包信息,就可以安装。 +如果你习惯使用“发现Discover” 感到满意,请添加 Backports PPA `ppa:kubuntu-ppa/backports` 作为软件源并点击更新。一旦检索到更新的软件包信息,就可以安装。 我建议使用以下终端方法,以获得更快和无错误的安装。 - * 打开 Konsole,运行以下命令来添加 backports PPA。如果你喜欢,你可以验证你运行的 Plasma 是什么版本。 - - +打开 Konsole,运行以下命令来添加 backports PPA。如果你喜欢,你可以验证你运行的 Plasma 是什么版本。 ``` - - sudo add-apt-repository ppa:kubuntu-ppa/backports - +sudo add-apt-repository ppa:kubuntu-ppa/backports ``` ![Add the PPA][7] @@ -65,14 +53,12 @@ KDE Plasma 5.24 最近[发布][1]了令人兴奋的变化。在这个新版本 现在运行最后的命令来启动升级。 ``` - - sudo apt full-upgrade - +sudo apt full-upgrade ``` 上面的命令会下载大约 270MB 以上的软件包。升级过程大约需要 10 分钟。命令完成后,重启你的系统。 -而你应该通过 Kubuntu 21.10 Impish Indri 获得全新的 KDE Plasma 5.24。 +而你应该通过 Kubuntu 21.10 Impish Indri 获得了全新的 KDE Plasma 5.24。 ![KDE Plasma 5.24 in Kubuntu 21.10][9] @@ -83,11 +69,9 @@ KDE Plasma 5.24 最近[发布][1]了令人兴奋的变化。在这个新版本 打开一个终端,依次运行下面的命令。 ``` - - sudo add-apt-repository ppa:kubuntu-ppa/backpots - sudo apt update - sudo apt install kubuntu-desktop - +sudo add-apt-repository ppa:kubuntu-ppa/backpots +sudo apt update +sudo apt install kubuntu-desktop ``` 上述命令完成后,重启系统。在登录页面上,选择 KDE Plasma 作为桌面环境。然后你就可以开始了。 @@ -102,16 +86,14 @@ Ubuntu 20.04 LTS 版有早期的 KDE Plasma 5.18、KDE Framework 5.68、KDE Appl ### 如何卸载 -在任何时候,如果你想回到 KDE Plasma 桌面的原始版本,那么你可以安装 ppa-purge 并删除 PPA,接着刷新软件包。 +在任何时候,如果你想回到 KDE Plasma 桌面的原始版本,那么你可以安装 `ppa-purge` 并删除 PPA,接着刷新软件包。 打开一个终端,依次执行以下命令。 ``` - - sudo apt install ppa-purge - sudo ppa-purge ppa:kubuntu-ppa/backports - sudo apt update - +sudo apt install ppa-purge +sudo ppa-purge ppa:kubuntu-ppa/backports +sudo apt update ``` 当命令完成,重启你的系统。 @@ -122,13 +104,6 @@ Ubuntu 20.04 LTS 版有早期的 KDE Plasma 5.18、KDE Framework 5.68、KDE Appl 请在下面的评论栏里告诉我进展如何。 -干杯。 - -* * * - -我们带来最新的技术、软件新闻和重要的东西。通过 [Telegram][10]、[Twitter][11]、[YouTube][12] 和 [Facebook][13] 保持联系,永远不错过任何更新! - - -------------------------------------------------------------------------------- via: https://www.debugpoint.com/2022/02/kde-plasma-5-24-kubuntu-21-10/ @@ -136,7 +111,7 @@ via: https://www.debugpoint.com/2022/02/kde-plasma-5-24-kubuntu-21-10/ 作者:[Arindam][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From c0e36595305560f7242d90d13d0fd0965ebe1e9a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 17 Feb 2022 11:29:01 +0800 Subject: [PATCH 319/334] ONE @wxy https://linux.cn/article-14280-1.html --- ...troduces a New -Everything- Offline ISO.md | 112 +++++++++++++++++ ...troduces a New -Everything- Offline ISO.md | 114 ------------------ 2 files changed, 112 insertions(+), 114 deletions(-) create mode 100644 published/20220215 Kali Linux 2022.1 Release Introduces a New -Everything- Offline ISO.md delete mode 100644 sources/news/20220215 Kali Linux 2022.1 Release Introduces a New -Everything- Offline ISO.md diff --git a/published/20220215 Kali Linux 2022.1 Release Introduces a New -Everything- Offline ISO.md b/published/20220215 Kali Linux 2022.1 Release Introduces a New -Everything- Offline ISO.md new file mode 100644 index 0000000000..97dea2c7a6 --- /dev/null +++ b/published/20220215 Kali Linux 2022.1 Release Introduces a New -Everything- Offline ISO.md @@ -0,0 +1,112 @@ +[#]: subject: "Kali Linux 2022.1 Release Introduces a New “Everything” Offline ISO" +[#]: via: "https://news.itsfoss.com/kali-linux-2022-1-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14280-1.html" + +Kali Linux 2022.1 发布:引入了新的“全都有”离线 ISO +====== + +> Kali Linux 在 2022 年的第一次升级带来了明显的视觉更新和一个新的“全都有”离线 ISO。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/kali-linux-2022-1-release.jpg?w=1200&ssl=1) + +2022 年的第一个 Kali Linux 版本来了。 + +Kali Linux 在 2021 年做了许多改进,包括 Linux 内核升级、新的黑客工具、实时虚拟机支持([Kali Linux 2021.3][1])、苹果 M1 支持等等。 + +让我们来看看 Kali Linux 2022.1 版本中的主要亮点。 + +### Kali Linux 2022.1 有什么新内容? + +从这个版本开始,Kali Linux 团队决定对他们每年的 20xx.1 版本(每年的第一个版本)进行明显的视觉更新。 + +因此,Kali Linux 2022.1 的更新带来了视觉上的刷新和其他新的增加和改变。 + +#### 主题更新 + +![][2] + +随着最新的升级,你可以看到一些新的桌面、登录和启动屏幕的壁纸。 + +安装程序的主题也得到了视觉上的更新,使其具有现代的外观。 + +总的来说,通过主题更新、新壁纸和细微的布局变化,你可以期待从 UEFI/BIOS 启动菜单到桌面的统一用户体验。 + +![][3] + +浏览器的登录页面也有了视觉上的更新,让你可以访问 Kali 文档和工具,以及通常的搜索功能。 + +![][4] + +#### 新的 “全都有” ISO + +Kali Linux 现在将提供一个新的分发方式,提供一个独立的离线 ISO,包括了 “kali-linux-everything” 软件包的所有内容。 + +这个产品的目的是让你下载一个离线 ISO,而不需要在安装后单独下载软件包。 + +它应该对偏远地区的教育机构使用 Kali Linux 进行道德黑客学习很有帮助。 + +考虑到它是一个大的 ISO 文件(大小达 9.4GB),你只能通过 BitTorrent 找到这个 ISO。 + +#### 对 VMware 的 i3 桌面的改进 + +如果你在带有 i3 桌面环境的虚拟机上使用 Kali Linux,一些客户功能是默认禁用的。 + +现在,这些功能,如拖放、复制/粘贴已经默认启用,可以给你更好的开箱即用的 i3 虚拟机的体验。 + +#### 其他改进 + +除了关键的新增功能外,Kali Linux 2022.1 还带来了新的工具和整体改进。其中一些值得强调的包括。 + + * 在 Kali 设置屏幕中使用带有合成语音的无障碍性改进。 + * 新的工具,如 dnsx、email2phonenumber、naabu、proxify 等等。 + * 可用于 ARM64 架构的新软件包,包括 feroxbuster 和 ghidra。 + * [Linux 内核 5.15][5]。 + * 你现在可以使用 kali-tweaks 中的设置来启用传统的算法、密码和 SSH。 + * 对 shell 提示符进行了调整,删除了骷髅头图标、退出码和后台进程数量的显示。 + +总的来说,这个版本对桌面和树莓派的重大改进值得期待。 + +你可以通过 [官方公告][6] 了解更多细节。 + +### 下载 Kali Linux 2022.1 + +你可以前往其 [官方网站][7],选择你打算下载的平台。 + +值得注意的是,“全都有” 的版本只能通过种子下载。所以,你得用 [Torrent 客户端][8]。 + +如果你已经使用 Kali Linux,你可以使用以下命令进行快速更新: + +``` +echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" | sudo tee /etc/apt/sources.list +sudo apt update && sudo apt -y full-upgrade +cp -rbi /etc/skel/. ~ +[ -f /var/run/reboot-required ] && sudo reboot -f +``` + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/kali-linux-2022-1-release/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/kali-linux-2021-3-release/ +[2]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/kali-linux-desktop-wallpaper.jpg?w=1360&ssl=1 +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/boot-theme-kali-linux.jpg?resize=1568%2C588&ssl=1 +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/firefox-home-page-kali-linux.jpg?w=1200&ssl=1 +[5]: https://news.itsfoss.com/linux-kernel-5-15-release/ +[6]: https://www.kali.org/blog/kali-linux-2022-1-release/ +[7]: https://www.kali.org/get-kali/ +[8]: https://itsfoss.com/best-torrent-ubuntu/ +[9]: https://www.kali.org/ diff --git a/sources/news/20220215 Kali Linux 2022.1 Release Introduces a New -Everything- Offline ISO.md b/sources/news/20220215 Kali Linux 2022.1 Release Introduces a New -Everything- Offline ISO.md deleted file mode 100644 index 79173451b0..0000000000 --- a/sources/news/20220215 Kali Linux 2022.1 Release Introduces a New -Everything- Offline ISO.md +++ /dev/null @@ -1,114 +0,0 @@ -[#]: subject: "Kali Linux 2022.1 Release Introduces a New “Everything” Offline ISO" -[#]: via: "https://news.itsfoss.com/kali-linux-2022-1-release/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Kali Linux 2022.1 Release Introduces a New “Everything” Offline ISO -====== - -The first Kali Linux release of 2022 is here. - -Kali Linux made numerous improvements in 2021 with its Linux Kernel upgrade, new hacking tools, live VM support ([Kali Linux 2021.3][1]), Apple M1 support, and more. - -Let us look at the key highlights in the Kali Linux 2022.1 release. - -### Kali Linux 2022.1: What’s New? - -Starting with this release, the Kali Linux team decided to introduce major visual updates to their yearly 20xx.1 release (the first release of every year). - -So, Kali Linux 2022.1 update brings in visual refresh and other new additions/changes. - -#### Theme Updates - -![][2] - -With the latest upgrade, you get to see some new wallpapers for the desktop, login, and boot screens. - -The installer theme has also received a visual refresh, giving it a modern look. - -Overall, with a theme update, new wallpapers, and subtle layout changes, you can expect a uniform user experience starting from the UEFI/BIOS boot menu to the desktop. - -![][3] - -The browser landing page has also received a visual update giving you access to Kali documentation and tools along with the usual search function. - -![][4] - -#### New “Everything” Flavor ISO - -Kali Linux will now offer a new flavor, as a standalone offline ISO that includes everything from “kali-linux-everything” packages. - -This offering aims to let you download an offline ISO without needing to download the packages after installation separately. - -It should come in handy for educational institutes in remote areas using Kali Linux for ethical hacking learning. - -You can only find this flavor available through BitTorrent, considering it a big ISO file (up to 9.4 GB in size). - -#### Improvements to i3 Desktop for VMware - -If you were using Kali Linux on a VM with an i3 desktop environment, some guest features were disabled by default. - -Now, those features like drag ‘n’ drop, copy/paste have been enabled by default giving you a better out-of-the-box experience in a VM with i3. - -#### Other Improvements - -Along with the key additions, Kali Linux 2022.1 brings in new tools and improvements overall. Some of them worth highlighting include: - - * Accessibility improvements with speech synthesis in the Kali setup screen. - * New tools like dnsx, email2phonenumber, naabu, proxify, etc. - * New packages available for ARM64 architecture that include feroxbuster and ghidra. - * [Linux Kernel 5.15][5] - * You can now enable legacy algorithms, ciphers, SSH using a setting in kali-tweaks - * Tweaks to the shell prompt to remove the skull icon, exit code, and number of background processes - - - -Overall, you should expect significant improvements for desktop and Raspberry Pi with this release. - -You can go through the [official announcement post][6] for more details. - -### Download Kali Linux 2022.1 - -You can head to its [official website][7] and choose the platform you intend to download for. - -It is important to note that the ‘Everything’ flavor is only available to download via Torrents. So, you will have to utilize some [torrent clients][8]. - -If you already use Kali Linux, you can perform a quick update using the following commands: - -``` - - echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" | sudo tee /etc/apt/sources.list - sudo apt update && sudo apt -y full-upgrade - cp -rbi /etc/skel/. ~ - [ -f /var/run/reboot-required ] && sudo reboot -f - -``` - -[Kali Linux][9] - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/kali-linux-2022-1-release/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://news.itsfoss.com/kali-linux-2021-3-release/ -[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ0MCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI5MyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU3MSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[5]: https://news.itsfoss.com/linux-kernel-5-15-release/ -[6]: https://www.kali.org/blog/kali-linux-2022-1-release/ -[7]: https://www.kali.org/get-kali/ -[8]: https://itsfoss.com/best-torrent-ubuntu/ -[9]: https://www.kali.org/ From 5c5782c11b5b067cb7219cec39cecd89a2af7d5f Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 18 Feb 2022 05:02:24 +0800 Subject: [PATCH 320/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220218=20?= =?UTF-8?q?Use=20Linux=20Terminal=20on=20Android=20Smartphones=20With=20Th?= =?UTF-8?q?ese=20Apps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220218 Use Linux Terminal on Android Smartphones With These Apps.md --- ... on Android Smartphones With These Apps.md | 196 ++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 sources/tech/20220218 Use Linux Terminal on Android Smartphones With These Apps.md diff --git a/sources/tech/20220218 Use Linux Terminal on Android Smartphones With These Apps.md b/sources/tech/20220218 Use Linux Terminal on Android Smartphones With These Apps.md new file mode 100644 index 0000000000..1f4d512786 --- /dev/null +++ b/sources/tech/20220218 Use Linux Terminal on Android Smartphones With These Apps.md @@ -0,0 +1,196 @@ +[#]: subject: "Use Linux Terminal on Android Smartphones With These Apps" +[#]: via: "https://itsfoss.com/using-linux-terminal-android/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Use Linux Terminal on Android Smartphones With These Apps +====== + +Want to practice Linux commands? You don’t need to install a full-fledge distribution for that. There are plenty of [websites that let you use Linux terminal online][1]. + +Those websites work well on the desktop but not on the mobile devices. + +Fret not. Android is based on Linux kernel, after all. There are several apps that let you use your Android smartphone to practice Linux commands to connect to a remote server via SSH. + +Of course, you should not expect it to replace your regular [Linux terminal emulators][2] available for desktops. But, there are quite a few interesting options available for Android. + +To make things easier, I add two different categories, one that covers terminal emulators, and the other tailored for remote connection capabilities (SSH) along with a terminal interface. + +Non-FOSS alert! + +Some apps mentioned here are not open source and they duly labeled. They have been covered here because they let you use Linux terminal on Android. + +**Section A: Top Linux Terminal Emulator Apps** + +Note that you need root access on your Android phone to be able to use commands like ls to navigate through the directories, copy/paste, and perform advanced operations. + +**Note:** _Without root access, you will only be limited to the basics for most apps/terminals, like testing the ping, updating, and installing packages wherever supported._ + +### 1\. Qute: Terminal Emulator (Not FOSS) + +![][3] + +Qute terminal emulator provides access to the built-in command-line shell on your Android device. + +You can use popular commands like ping, trace, cd, mkdir, and more on your smartphone. In addition to some [useful Linux commands][4], you can also install bin files and create [shell scripts][5]. + +Along with the bash script editor and support for rooted devices, it should be an exciting option to try. + +It also offers the ability to enable a light theme, hide the keyboard, toggle syntax highlighting, and a couple of other features. + +Unfortunately, the developer mentions that as per Google’s latest privacy policies, there are known issues with Android 11 or latest. So, without a rooted device, you may not be able to do much. + +[Qute][6] + +### 2\. Terminal Emulator for Android (FOSS) + +![][7] + +Terminal Emulator by Jack Palevich is one of the oldest Linux terminal emulators available for Android. + +You can use simple commands, add multiple windows, and use launcher shortcuts to make things quick. + +The best thing about it is you do not get any ads, in-app purchase options, and no distracting elements. However, it is not being maintained for a long time, and its [GitHub page][8] was also archived in 2020 to mark the end of its development. + +Even in its current state, it seems to be working for numerous users. So, you might want to try it out before dismissing it as an option. + +[Terminal Emulator for Android][9] + +### 3\. Material Terminal (Not FOSS) + +![][10] + +Material Terminal is a re-skin version of “Terminal Emulator for Android”. + +You get to access the same features, with multiple windows, no ads, support for basic commands out of the box, and the option to install Busy Box, and other command-line utilities in a rooted device. + +Basically, everything you’d want in the previous option with a Material Design user interface. Pretty good, right? + +[Material Terminal][11] + +**Section B: SSH Client and Linux Terminal** + +Do you want a terminal emulator on Android with the ability to connect using SSH? Or, maybe tailored just for SSH remote connections? + +Here are some options: + +### 4\. Termux (FOSS) + +![][12] + +Termux is a pretty popular terminal emulator available for Android. It features a comprehensive collection of packages that lets you experience bash and zsh shells. + +Considering you have root access, you can also [manage files with nnn][13] and edit them with nano, vim or emacs. The user interface does not have anything else besides the terminal. + +You can also [access servers using SSH][14]. In addition to that, you also get to develop in C with clang, make, and gbd. Of course, these are subject to your tests and whether you have a rooted device or not. + +You can also explore its [GitHub page][15] to troubleshoot any issues. As of now, updates to the Play Store version is halted due to some technical reasons. So, you can install the latest version via [F-Droid][16] if the available Play Store version does not work. + +[Termux][17] + +### 5\. Termius (Non FOSS) + +![][18] + +Termius is an SSH and SFTP client tailored to make remote access from Android devices possible. + +With Termius, you can manage UNIX and Linux systems. The Play Store page describes it as a pretty Putty client for Android, and rightly so. + +The user interface is easy to understand and doesn’t seem confusing. It also supports Mosh, and Telnet protocol. + +When you connect to a remote device, it detects the OS like Raspberry Pi, Ubuntu, Fedora. You can also work using your keyboard connected to the mobile with this app. To top it all off, you get no ads or banners, making it a perfect little remote connection app. + +It does offer an optional premium (14 days free trial) with more features like encrypted cross-sync, SSH key agent forwarding, SFTP, terminal tabs, and more. You can also explore more about it on its [official website][19]. + +[Termius][20] + +### 6\. JuiceSSH (Non FOSS) + +![][21] + +JuiceSSH is yet another popular SSH client with a bunch of free features and an optional pro upgrade. + +In addition to Telenet and Mosh support, you also get access to some third-party plugins to extend functionalities. You get to tweak the appearance from a range of available options and easily organize your connections by group. + +Not to forget, you also get IPv6 support. + +If you opt for the pro upgrade, you can integrate with AWS, enable secure sync, automate backups, and more. + +[JuiceSSH][22] + +### 7\. ConnectBot (FOSS) + +![][23] + +If all you wanted is a simple SSH client, ConnectBot should serve you well. + +You can handle simultaneous SSH sessions, create secure tunnels, and get the ability to copy/paste between other applications. + +[ConnectBot][24] + +### Bonus: Access Linux Distro And Commands Without a Rooted Device + +If you do not have a rooted Android phone, nor plan to get it done, you have a unique option that lets you install Linux distros on your smartphone. + +[Andronix][25] (partially open-source). + +You get a wide range of Linux distributions and desktop environment options along with Window Managers. + +The best thing is – you do not need a rooted device to use various Linux commands. You just need your favorite distro installed to do it all. + +In addition to its ease of use, it also offers premium options that give you access to features like offline distro installation and the ability to sync your commands across devices. + +Of course, just because you install a Linux distro does not mean that you can do everything, but it’s still a great option. You can find it in the [Play Store][26] and explore more about it on [GitHub][27]. + +## Wrapping Up + +Accessing the Linux terminal on Android isn’t as simple as choosing a terminal emulator. You will need to check support for commands, and what it can let you do with a rooted/non-rooted device, before you proceed. + +If you want to experiment, any of the options should do a great job. + +What’s your personal favorite? Did we miss listing any of your favorites? Let me know in the comments below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/using-linux-terminal-android/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/online-linux-terminals/ +[2]: https://itsfoss.com/linux-terminal-emulators/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/qute-terminal.jpg?resize=800%2C600&ssl=1 +[4]: https://itsfoss.com/linux-command-tricks/ +[5]: https://itsfoss.com/shell-scripting-resources/ +[6]: https://play.google.com/store/apps/details?id=com.ddm.qute&hl=en_IN&gl=US +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/terminal-emulator-old.jpg?resize=800%2C600&ssl=1 +[8]: https://github.com/jackpal/Android-Terminal-Emulator/ +[9]: https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en_IN&gl=US +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/material-terminal.jpg?resize=800%2C600&ssl=1 +[11]: https://play.google.com/store/apps/details?id=yarolegovich.materialterminal&hl=en_IN&gl=US +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/termux.jpg?resize=800%2C600&ssl=1 +[13]: https://itsfoss.com/nnn-file-browser-linux/ +[14]: https://linuxhandbook.com/ssh-basics/ +[15]: https://github.com/termux/termux-app +[16]: https://f-droid.org/en/packages/com.termux/ +[17]: https://play.google.com/store/apps/details?id=com.termux +[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/termius.jpg?resize=800%2C600&ssl=1 +[19]: https://termius.com/ +[20]: https://play.google.com/store/apps/details?id=com.server.auditor.ssh.client&hl=en_IN&gl=US +[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/juicessh.jpg?resize=800%2C600&ssl=1 +[22]: https://play.google.com/store/apps/details?id=com.sonelli.juicessh&hl=en_IN&gl=US +[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/connectbot-app.jpg?resize=800%2C600&ssl=1 +[24]: https://play.google.com/store/apps/details?id=org.connectbot&hl=en_IN&gl=US +[25]: https://andronix.app/ +[26]: https://play.google.com/store/apps/details?id=studio.com.techriz.andronix +[27]: https://github.com/AndronixApp From a03bdb73b8e8a13671695b446d10cde1d4dcdc3c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 18 Feb 2022 05:02:37 +0800 Subject: [PATCH 321/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220217=20?= =?UTF-8?q?Edit=20text=20on=20Linux=20with=20KWrite=20and=20Kate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220217 Edit text on Linux with KWrite and Kate.md --- ...Edit text on Linux with KWrite and Kate.md | 112 ++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 sources/tech/20220217 Edit text on Linux with KWrite and Kate.md diff --git a/sources/tech/20220217 Edit text on Linux with KWrite and Kate.md b/sources/tech/20220217 Edit text on Linux with KWrite and Kate.md new file mode 100644 index 0000000000..ae6adcf786 --- /dev/null +++ b/sources/tech/20220217 Edit text on Linux with KWrite and Kate.md @@ -0,0 +1,112 @@ +[#]: subject: "Edit text on Linux with KWrite and Kate" +[#]: via: "https://opensource.com/article/22/2/edit-text-linux-kde" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Edit text on Linux with KWrite and Kate +====== +Two Linux KDE text editors. One powerful KTextEditor. +![Person using a laptop][1] + +A text editor is often a good example application to demonstrate what a programming framework is capable of producing. I myself have written at least three example text editors in articles about [wxPython and PyQt][2], and [Java][3]. The reason they're seen as easy apps to create is because the frameworks provide so much of the code that's hardest to write. I think that's also the reason that most operating systems provide a simple desktop text editor. They're useful to the user and easy for the developer. + +On the KDE Plasma Desktop, there are two text editors to choose from: the humble KWrite and the powerful Kate. They share between them a library called KTextEditor from the KDE Framework, which provides robust text editing options, so no matter which one you choose you have more features than you're probably used to from a "basic" text editor that just happens to be included with your desktop. Using the same component for text editing across text editors means that once you grow accustomed to one text editing interface in KDE, you're essentially familiar with them all: KWrite, Kate, KDevelop, and more. + +### Install KWrite or Kate + +KWrite and Kate are maintained in the same [development repository][4]. + +However, they’re distributed as separate applications and have different use cases. + +If you have KDE Plasma Desktop installed, you probably already have KWrite installed, but you may need to install Kate separately. + + +``` +`$ sudo dnf install kwrite kate` +``` + +KWrite is available from [apps.kde.org/kwrite][5], and Kate from [apps.kde.org/kate/][6]. + +Both can be installed through KDE Discover, and KWrite can be [installed as a flatpak][7]. + +### KWrite, the not-so-basic editor + +Getting started with KWrite is easy. You launch it from your applications menu and you start typing. If you have no expectations that it's anything more than the most basic of text editors, then you can treat it as a simple digital notepad. + +![The KWrite text editor][8] + +(Seth Kenlon, [CC BY-SA 4.0][9], Text courtesy [Project Gutenberg][10]) + +All the usual conventions apply. Type text into the big text field, click the Save button when you're done. + +However, what sets KWrite apart from a standard desktop editor is that it uses KTextEditor. + +### Bookmarks + +While you're working in KWrite or Kate, you can create temporary bookmarks to help you find important places in your document. To create a bookmark, press **Ctrl+B**. You can move to a bookmark by selecting it in the **Bookmark** menu. + +Bookmarks aren't permanent metadata, and they don't get stored as part of your document, but they're useful devices when you're working and need to move back and forth between sections. In other text editors, I used to just type some random word, like _foobar,_ and then perform a **Find** on that string to get back to that location. Bookmarks are a more elegant solution for the problem, and they don't risk littering your document with placeholders that you could forget to delete. + +### Highlighting + +In both KWrite and Kate, you can activate syntax highlighting so you can gain insight about the text you're working on. You might not consciously use highlighting in other word processors, but you've seen a form of highlighting if you've ever used an editor with automated spelling and grammar checking. The red warning line that a misspelling gets marked with in most modern word processors is a form of syntax highlighting. KWrite and Kate can notify you of both errors and successes in your writing. + +To see spelling errors, go to the **Tools** menu and select **Spelling**. From the **Spelling** submenu, activate **Automatic Spell Checking**. + +To get visual feedback about what you're writing in a specific format, such as [Markdown][11], HTML, or a programming language like [Python][12], go to the **Tools** menu and select **Mode**. There are lots of modes, divided between several categories. Find the format you're writing in and select it. A mode loads in a highlighting schema. You can override a mode's highlighting scheme by choosing **Highlighting** instead of **Mode**. + +![Text highlighting][13] + +(Seth Kenlon, [CC BY-SA 4.0][9]) + +One of my favorite features is the document overview on the right side of the window. It's essentially a very very tall thumbnail of the whole document, so you can scroll to specific regions with just one click. It might look like it's too small to be useful, but it's easier than one might think to pinpoint a section heading or an approximate area within a document and get pretty close to it with a click. + +### What sets Kate apart + +With KWrite and Kate using the same underlying component, you might wonder why you'd ever need to graduate on from KWrite at all. If you do decide to try out Kate, you won't do it for the text editing. All the features that affect how you enter and interact with your text are the same between the two applications. However, Kate adds lots of features for coders. + +![Coding in Kate][14] + +(Seth Kenlon, [CC BY-SA 4.0][9]) + +Kate features a side panel where you can view your filesystem or just a project directory. Notably, Kate has the concept of projects, so it can correlate one file of code to, for instance, a header file in the same directory. It also has a pop-up Terminal (just press **F4**) and the ability to pipe text in your document out to the terminal session. + +There's also a session manager so you can have a unique Kate configuration for different activities. + +### Choose your Linux text editor + +It's easy to overlook KWrite and Kate. They suffer, in a way, from the _default syndrome._ Because one or both of them comes along with the desktop, it's easy to think of them as the simple example text editors that developers are obligated to include. That's far from accurate, though. KWrite and Kate are paragons among K-apps. They exemplify what the KDE Framework provides, and they set the stage for an expectation of powerful, meaningful, and useful KDE applications. + +Take a look at KWrite and Kate, and see which one is right for you. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/edit-text-linux-kde + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) +[2]: https://opensource.com/article/17/4/pyqt-versus-wxpython +[3]: https://opensource.com/article/20/12/write-your-own-text-editor +[4]: https://invent.kde.org/utilities/kate +[5]: http://apps.kde.org/kwrite +[6]: https://apps.kde.org/kate +[7]: https://opensource.com/article/21/11/install-flatpak-linux +[8]: https://opensource.com/sites/default/files/kwrite-ui.jpg (The KWrite text editor) +[9]: https://creativecommons.org/licenses/by-sa/4.0/ +[10]: https://www.gutenberg.org/cache/epub/41445/pg41445.txt +[11]: https://opensource.com/article/19/9/introduction-markdown +[12]: https://opensource.com/article/17/10/python-101 +[13]: https://opensource.com/sites/default/files/kwrite-ui-mode.jpg (Text highlighting) +[14]: https://opensource.com/sites/default/files/kate-ui.jpg (Coding in Kate) From 1717422c33ddb14c07b8aad79dd73fb06ac9a2ec Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 18 Feb 2022 05:02:46 +0800 Subject: [PATCH 322/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220217=20?= =?UTF-8?q?A=20guide=20to=20installing=20applications=20on=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220217 A guide to installing applications on Linux.md --- ...ide to installing applications on Linux.md | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 sources/tech/20220217 A guide to installing applications on Linux.md diff --git a/sources/tech/20220217 A guide to installing applications on Linux.md b/sources/tech/20220217 A guide to installing applications on Linux.md new file mode 100644 index 0000000000..d634b80433 --- /dev/null +++ b/sources/tech/20220217 A guide to installing applications on Linux.md @@ -0,0 +1,82 @@ +[#]: subject: "A guide to installing applications on Linux" +[#]: via: "https://opensource.com/article/22/2/installing-applications-desktop-linux" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +A guide to installing applications on Linux +====== +Get information on all of the different methods of installing +applications on Linux from our new eBook.  +![Linux packages][1] + +When you want to try a new app on your phone, you open your app store and install the app. It's simple, quick, and efficient. In this model of providing applications, phone vendors ensure that you know exactly where to go to get an app, and that developers with apps to distribute know where to put their apps so people can find them. + +Before phones used this innovative model of software distribution, Linux was using it in the form of "software repositories." As the term implies, these were places on the Internet where applications were uploaded so Linux users could browse through them, and install them, from a central location. The term got shortened to just "repo" (for "repository," not "reposession"), but whether you call it a _repo_, _app store_, _software center_, _package manager_, or whatever else, it's a good system and has served Linux desktop users well for several decades. + +The bottom line is that installing apps on Linux is a lot like installing apps on your phone. If you've done one, you can do the other. + +**[ Download our eBook: [A guide to installing applications on Linux][2] ]** + +### Software + +On the GNOME desktop, your view into your desktop's software repository is an application called, simply, **Software**. You can think of this application as an extremely specific web browser. It's looking at software that's available to install from the Internet, gathering everything available into categories, and displaying it to you on your desktop. + +![GNOME Software][3] + +(Seth Kenlon, [CC BY-SA 4.0][4]) + +From the start screen, you have a few options. + + * Search for an application you're already familiar with. To do this, click the magnifying glass icon in the top left corner of the window. + * Browse by category. These are found at the bottom of the window. + * Browse by recent and recommendations. These are listed in the animated banner and the icons below it. + + + +When you click on an application that looks interesting to you, a feature page opens so you can see screenshots and read a short description of the software. + +### Installing an app + +Once you've found software you want to install, click the **Install** button at the top of the application feature page. + +![An application page in GNOME Software][5] + +(Seth Kenlon, [CC BY-SA 4.0][4]) + +Once it's installed, the **Install** button changes to a **Launch** button, so you can optionally launch the app you've just installed. + +If you don't want to launch the app just now, you can always find it in your **Activities** menu along with all the other applications you already have on your computer. + +### Getting more apps from more places + +Your Linux desktop has applications packaged specifically for it, but in today's world there's a lot of open source happening all over the place. You can get more applications by adding "third party" repositories to your desktop's app store. Of course, all of these terms aren't exactly correct: what's a "third party" in a world where software is being created by everyone anyway, and what's an app store when nothing costs any money? Terminology aside, one popular third-party repo is [Flathub.org][6]. + +To add another source of apps to your Linux desktop, you essentially "install" a location into your app store. For Flathub, you download the **Flathub repository file** and install it with **GNOME Software**, just as if it were an app. It's not an app. It's a _source_ of apps, but the process is the same. + +### Find out more + +It wouldn't be Linux if there weren't a dozen other ways to perform any given task. Flexibility is built into the system with Linux, so while GNOME Software provides one easy way to get apps, there are lots of other ways, including install scripts, install wizards, AppImages, and of course compiling directly from source code. You can get information on all of these install methods from our new eBook, [**Installing Applications on Linux**][2]. It's free, so give it a read. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/installing-applications-desktop-linux + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/bitmap_1.png?itok=YkthYzSf (Linux packages) +[2]: https://opensource.com/downloads/installing-linux-applications-ebook +[3]: https://opensource.com/sites/default/files/gnome-software_1.png (GNOME Software) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://opensource.com/sites/default/files/gnome-software-steam.png (An application page in GNOME Software) +[6]: http://flathub.org/setup From 28da1b76444cf9906a2c156c52920cafa89306b0 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 18 Feb 2022 05:03:05 +0800 Subject: [PATCH 323/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220217=20?= =?UTF-8?q?Top=205=20Live=20Streaming=20Application=20for=20Ubuntu=20and?= =?UTF-8?q?=20Other=20Linux=20[2022=20Edition]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220217 Top 5 Live Streaming Application for Ubuntu and Other Linux -2022 Edition.md --- ...or Ubuntu and Other Linux -2022 Edition.md | 196 ++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 sources/tech/20220217 Top 5 Live Streaming Application for Ubuntu and Other Linux -2022 Edition.md diff --git a/sources/tech/20220217 Top 5 Live Streaming Application for Ubuntu and Other Linux -2022 Edition.md b/sources/tech/20220217 Top 5 Live Streaming Application for Ubuntu and Other Linux -2022 Edition.md new file mode 100644 index 0000000000..47ad2f916b --- /dev/null +++ b/sources/tech/20220217 Top 5 Live Streaming Application for Ubuntu and Other Linux -2022 Edition.md @@ -0,0 +1,196 @@ +[#]: subject: "Top 5 Live Streaming Application for Ubuntu and Other Linux [2022 Edition]" +[#]: via: "https://www.debugpoint.com/2022/02/live-streaming-applications-linux-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Top 5 Live Streaming Application for Ubuntu and Other Linux [2022 Edition] +====== +THIS POST LISTS THE TOP FIVE LIVE STREAMING APPLICATIONS FOR UBUNTU +LINUX WITH FEATURES, HIGHLIGHTS, DOWNLOAD DETAILS, AND COMPARISON. +It is the best time to incorporate online video content for your business. Why? Because research suggests that the global online video market is growing at a rate of ~20% per year. + +And thanks to some excellent software from developers, it has become easy for anyone to create video content and stream them over several popular platforms such as YouTube and Twitch. If you think about it, you see you are consuming more video content today while online than text-based content. + +So, in this post, we will list out some of the free software for Ubuntu and other Linux primarily that are easy to use for creating super interesting live streaming content for you and your businesses. + +### Top 5 Live Streaming Applications for Linux in 2022 + +#### OBS Studio + +The first free application in this list is OBS Studio (also known as Open Broadcaster Software). It is a live streaming application with screencasting capabilities available for Linux, Windows and macOS. + +OBS Studio is the best one on this list because several reasons. The encoding is built-in, and it supports RTMP broadcasting, multiple sources, webcams, green-screen, capture cards and your application windows. + +The user interface is reasonably straightforward and features rich. You can get help from third-party developed plugins to extend their functionalities, such as – mixing live tweets from Twitter on your streaming media while live streaming. However, OBS does not support multi-bitrate streaming. + +![OBS Studio][1] + +OBS Studio is available in all Linux Distribution’s official repositories. Detailed instruction for installations is present in the below link. + +[Download OBS Studio][2] + +More Information + + * [Home Page][3] + * [Documentation][4] + + + +#### VokoscreenNG + +The second application we would feature in this list is VokoscreenNG. It is a fork of the discontinued Vokoscreen project. The new application is entirely written in Qt with the GStreamer library. It can record your screen and accept multiple audio and video sources. VokoscreenNG’s toolbox is also quite impressive. It includes a magnifying glass, timer, system tray plugins that ease up your workflow. + +It is available for Linux and Windows for free. + +![vokoscreenNG][5] + +You can download the compressed executable from the below link for Linux systems. Once downloaded, extract them. Then execute the binary to launch the application. + +Remember, this application requires X11, PulseAudio and GStreamer plugins installed in your Linux system to work. If you use a modern Linux system with Wayland and Pipewire sound server (e.g. Fedora), this application may not work. + +[Download VokoscreenNG][6] + + * [Home page][7] + + + +#### Restreamer + +The Restreamer application enables you to live stream videos and screencasts directly to your website without any streaming provider. It is also possible to use popular streaming solutions such as YouTube, Twitch, etc., with this application. + +This application is feature-rich and comes with a fair list of features. Here’s a quick peek at its features: + + * H.264 streaming support + * Built-in HTML5 video play + * Available for Linux, macOS, Windows and as Docker images + * Supports your own website plus YouTube, Twitchm, Facebook, Vimeo, Wowza and more + * Multiple video source support – [IP Camera][8], USB Cameram or any H.2645 streams + * Encoding and Audio source support + * Snapshots as form of JPEG support in regular interval + * Access stream status via JSON HTTP API for additional programming + + + +![Restreamer][9] + +[][10] + +SEE ALSO:   10 Necessary Apps to Improve Your GNOME Desktop Experience [Part 4] + +The installation of Restreamer is a little tricky because it’s distributed via Docker images. You can find the instructions to install Linux, Windows, and macOS on the below link. + +[Download Restreamer][11] + + * [Home Page][12] + * [Documentation][13] + * [Source Code][14] + + + +#### ffscreencast + +The ffscreencast is a command-line streaming application that uses the ffmpeg library. It leverages the power of ffmpeg and acts as a wrapper to it. Although it is available as a command line, you can take advantage of its powerful features such as multiple sources and recordings devices directly via the terminal. It supports multiple display setups as well. You can also overlay your camera feed on top of your desktop screencast. + +![Open Streaming Platform][15] + +To install this application, you need to clone the git repo and then copy the contents to /bin directory for the global execution of the `ffscreencast` command. + +``` + + git clone https://github.com/cytopia/ffscreencast + cd ffscreencast + sudo cp bin/ffscreencast /usr/local/bin + +``` + +You can run this application with `ffscreencast` command from the terminal. + +[Source code & Home page][16] + +#### Open Streaming platforms + +The final application in this list is Open Streaming Platform (OSP), an open-source RTMP streamer software that can act as a self-hosted alternative to YouTube LIVE, Twitch.tv, etc. + +This application is feature-rich and powerful when used correctly. Because of the below essential features: + + * RTMP Streaming from an input source like Open Broadcast Software (OBS). + * Multiple Channels per User, allowing a single user to broadcast multiple streams at the same time without needing multiple accounts. + * Video Stream Recording and On-Demand Playback. + * Manual Video Uploading of MP4s that are sourced outside of OSP + * Video Clipping – Create Shorter Videos of Notable Moments + * Real-Time Chat Moderation by Channel Owners (Banning/Unbanning) + * Admin Controlled Adaptive Streaming + * Protected Channels – Allow Access only to the audience you want. + * Live Channels – Keep chatting and hang out when a stream isn’t on + * Webhooks – Connect OSP to other services via fully customizable HTTP requests which will pass information + * Embed your stream or video directly into another web page easily + * Share channels or videos via Facebook or Twitter quickly + * Ability to Customize the UI as a Theme for your own personal look + + + +To install the Open Streaming Platform, follow the below page for detailed instructions. + +[Download Open Streaming Platform][17] + + * [Home Page][18] + * [Source Code][19] + * [Documentation][20] + + + +### Closing Notes + +There are very few free and open source live streaming applications available for Linux. However, several commercial live streaming applications are available, which may give you more options, quality, and support. But as I said, they may cost you some bucks. So, if you are new to the streaming world, you may want to get started with the above listed free live streaming applications in Ubuntu or other Linux systems. I hope this article gives you some ideas about which one to use based on your need and get you started. + +Let me know your favourite live streaming software in the comment box below. + +Cheers. + +* * * + +We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][21], [Twitter][22], [YouTube][23], and [Facebook][24] and never miss an update! + +##### Also Read + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/02/live-streaming-applications-linux-2022/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/wp-content/uploads/2022/02/OBS-Studio.jpg +[2]: https://obsproject.com/wiki/install-instructions#linux +[3]: https://obsproject.com/ +[4]: https://obsproject.com/wiki/Home +[5]: https://www.debugpoint.com/wp-content/uploads/2022/02/vokoscreenNG.jpg +[6]: https://linuxecke.volkoh.de/vokoscreen/vokoscreen-download.html +[7]: https://linuxecke.volkoh.de/vokoscreen/vokoscreen.html +[8]: https://www.debugpoint.com/2018/08/onvifviewer-internet-camera-viewer-for-linux/ +[9]: https://www.debugpoint.com/wp-content/uploads/2022/02/Restreamer.jpg +[10]: https://www.debugpoint.com/2022/02/best-gnome-apps-part-4/ +[11]: https://datarhei.github.io/restreamer/docs/installation-index.html +[12]: https://datarhei.github.io/restreamer/ +[13]: https://datarhei.github.io/restreamer/docs/index.html +[14]: https://github.com/datarhei/restreamer +[15]: https://www.debugpoint.com/wp-content/uploads/2022/02/Open-Streaming-Platform-1024x513.jpg +[16]: https://github.com/cytopia/ffscreencast +[17]: https://wiki.openstreamingplatform.com/Install/Standard +[18]: https://openstreamingplatform.com/ +[19]: https://gitlab.com/Deamos/flask-nginx-rtmp-manager +[20]: https://wiki.openstreamingplatform.com/ +[21]: https://t.me/debugpoint +[22]: https://twitter.com/DebugPoint +[23]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[24]: https://facebook.com/DebugPoint From 98874b9d3ba1bcda6b4cb55a638e956512082c6a Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 18 Feb 2022 05:03:18 +0800 Subject: [PATCH 324/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220217=20?= =?UTF-8?q?Good=20News!=20Debian-based=20Lightweight=20Linux=20Distro=20?= =?UTF-8?q?=E2=80=98Slax=E2=80=99=20is=20Still=20Alive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220217 Good News- Debian-based Lightweight Linux Distro ‘Slax- is Still Alive.md --- ...ight Linux Distro ‘Slax- is Still Alive.md | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 sources/news/20220217 Good News- Debian-based Lightweight Linux Distro ‘Slax- is Still Alive.md diff --git a/sources/news/20220217 Good News- Debian-based Lightweight Linux Distro ‘Slax- is Still Alive.md b/sources/news/20220217 Good News- Debian-based Lightweight Linux Distro ‘Slax- is Still Alive.md new file mode 100644 index 0000000000..2b5f125cf5 --- /dev/null +++ b/sources/news/20220217 Good News- Debian-based Lightweight Linux Distro ‘Slax- is Still Alive.md @@ -0,0 +1,104 @@ +[#]: subject: "Good News! Debian-based Lightweight Linux Distro ‘Slax’ is Still Alive" +[#]: via: "https://news.itsfoss.com/slax-11-2/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Good News! Debian-based Lightweight Linux Distro ‘Slax’ is Still Alive +====== + +Slax is one of the best [lightweight Linux distributions][1] that can revive an old computer. + +However, we did not get to see any significant development activities since 2018. + +While a testing version based on Debian 10.2 was in the works in 2019, the pandemic could have affected the progress. + +Fast-forward to 2022, finally, now we have a new testing version available (release candidate 2) of **Slax 11.2** based on [Debian Bullseye][2]. + +### Slax 11.2: What’s New? + +![Slax 11.2][3] + +Slax 11.2 is almost ready for its final release, with a second release candidate available for testing. + +The latest version is based on Debian Bullseye version 11.2. The changes involve removing a few things and adding new stuff. + +Let me mention the key highlights. + +#### Linux Kernel 5.10 LTS + +![][4] + +[Linux Kernel 5.10][5] LTS introduces many essential changes and performance improvements. + +Not to forget, it also enhances the hardware compatibility options. + +#### Debian 11.2 Base + +With [Debian 11][2] (Bullseye) as its base, you get obvious improvements/package support that you did not have with older Debian releases. + +The most notable benefit includes the support for 32-bit systems, which keeps Slax in its position as one of the [best Linux distributions that support 32-bit computers][6]. + +In addition to that, you also get ExFAT support and improvements for the printer/scanner. + +#### PCManFM Lives + +![][7] + +If you have been keeping an eye on its latest test releases, **Tomas M**, the creator, decided to ditch PCManFM (file manager) in favor of tuxCommander, thinking that pcmanfm was no longer available in Debian. + +Fortunately, it is still there. And, PCManFM works super fast as expected! + +#### Adding/Removing Applications + +![][8] + +With Slax 11.2, you get [connman][9] as the network manager and [scite][10] as the text editor. + +Unfortunately, you will no longer find Leafpad and [wicd][11]. + +#### AUFS vs. Overlayfs + +AUFS lets you modify the overlay files system and add modules on the fly. However, with AUFS no longer supported by Debian, Slax initially planned to use Overlayfs. + +With the RC2 release, Slax decided to recompile the Linux Kernel and add AUFS from sources to provide the necessary functionalities suitable for Slax. + +### Download Slax 11.2 + +You will find both 32-bit and 64-bit versions available for Slax 11.2. + +When publishing this, we only have the RC2 ISO available, which works well as a VM in my brief test. + +You can wait for the stable release or get the release candidate from its [latest blog post][12]. + +[Slax 11.2][13] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/slax-11-2/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/lightweight-linux-beginners/ +[2]: https://news.itsfoss.com/debian-11-feature/ +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjUxNCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[5]: https://news.itsfoss.com/kernel-5-10-release/ +[6]: https://itsfoss.com/32-bit-linux-distributions/ +[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU2MSIgd2lkdGg9Ijc1NSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQxOCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[9]: https://wiki.archlinux.org/title/ConnMan +[10]: https://www.scintilla.org/SciTE.html +[11]: https://wiki.archlinux.org/title/wicd +[12]: https://www.slax.org/blog/25843-AUFS-is-a-must.html +[13]: https://www.slax.org/ From 84e60bc77d22ea54a3eb9fba27633b2cf741e74b Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 18 Feb 2022 08:52:21 +0800 Subject: [PATCH 325/334] translated --- ... maintaining dotfiles in source control.md | 95 ------------------- ... maintaining dotfiles in source control.md | 94 ++++++++++++++++++ 2 files changed, 94 insertions(+), 95 deletions(-) delete mode 100644 sources/tech/20220208 My tips for maintaining dotfiles in source control.md create mode 100644 translated/tech/20220208 My tips for maintaining dotfiles in source control.md diff --git a/sources/tech/20220208 My tips for maintaining dotfiles in source control.md b/sources/tech/20220208 My tips for maintaining dotfiles in source control.md deleted file mode 100644 index 21c2d16d0f..0000000000 --- a/sources/tech/20220208 My tips for maintaining dotfiles in source control.md +++ /dev/null @@ -1,95 +0,0 @@ -[#]: subject: "My tips for maintaining dotfiles in source control" -[#]: via: "https://opensource.com/article/22/2/dotfiles-source-control" -[#]: author: "Moshe Zadka https://opensource.com/users/moshez" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -My tips for maintaining dotfiles in source control -====== -When you keep the environment in source control, development VMs and -containers become a solution, not a problem. -![Person drinking a hot drink at the computer][1] - -Ever started using a new computer, by choice or because the old one let the magic smoke out, and got frustrated at how long it took to get everything _just_ right? Even worse, ever spent some time reconfiguring your shell prompt, then realizing you liked it better before? - -This problem, for me, became acute when I decided I wanted to do development in [containers][2]. Containers are ephemeral. The development tooling is easy to solve: A container image with the tooling works. The source code is easy to solve: Source control maintains it, and development happens on branches. But if every time I create a container, I need to configure it carefully—that's going to be a pain. - -### Revision control at home - -Keeping configuration files in version control has always been an attractive option. But doing so naively is fraught. It is not possible to directly version `~`. - -For one, too many programs assume it's safe to keep secrets there. It's also the location of folders like `~/Downloads` and `~/Pictures`, which should probably not be versioned. - -Carefully keeping a `.gitignore` file at the home directory to manage _include_ and _exclude_ lists is risky. At some point, one of the paths gets wrong. Hours of configuration are lost, big files end up in the Git history, or, worst of all, secrets and passwords get leaked. When this strategy fails, it fails catastrophically. - -Manually maintaining a sea of symlinks also does not work. The whole reason for revision control is to avoid maintaining configuration manually. - -### Write an install script - -This hints at the first clue about maintaining dotfiles in source control. Write an installation script. - -Like all good installation scripts, make it _idempotent_: Running it twice should not add the configuration twice. - -Like all good installation scripts, make it _only do the minimum_: Use whatever other tricks to point to the configuration files in your source control. - -### The ~/.config directory - -Modern Linux programs look for their configuration in `~/.config` before looking for it directly in the home. The most important example is `git`, which looks for it in `~/.config/git`. - -This means the installation script can symlink `~/.config` to a directory inside a source-controlled managed directory in the home directory: - - -``` - - -#!/bin/bash -set -e -DOTFILES="$(dirname $(realpath $0))" -[ -L ~/.config ] || ln -s $DOTFILES/config ~/.config - -``` - -This script looks for its location and then symlinks `~/.config` to wherever it was checked out to. This means that there are few assumptions about where it needs to be inside the home directory. - -### Sourcing files - -Most shells still look for files directly in the home directory. To solve this, you add a layer of indirection. Sourcing files from `$DOTFILES` means that there is no need to rerun the installer when modifying the shell configuration: - - -``` - - -$!/bin/bash -set -e -DOTFILES="$(dirname $(realpath $0))" -grep -q 'SETTING UP BASH' ~/.bashrc || \ -  echo "source $DOTFILES/starship.bash # SETTING UP BASH" >> ~/.bashrc - -``` - -Again, notice that the script is careful to be idempotent: If the line is already there, it does not add it again. It is also considerate of any editing you have already done on `.bashrc`. While this is not a good idea, there is no need to punish it. - -### Test and test again - -When you keep the environment in source control, development VMs and containers become a solution, not a problem. Try an experiment: Bring up a new development environment, clone your dotfiles, install, and see what breaks. - -Don't do it just once. Do it weekly, at least. This makes you faster at it, and it also informs you about what does not work—open issues, fix them, and repeat. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/2/dotfiles-source-control - -作者:[Moshe Zadka][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/moshez -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hot drink at the computer) -[2]: https://opensource.com/tags/containers diff --git a/translated/tech/20220208 My tips for maintaining dotfiles in source control.md b/translated/tech/20220208 My tips for maintaining dotfiles in source control.md new file mode 100644 index 0000000000..8f13838631 --- /dev/null +++ b/translated/tech/20220208 My tips for maintaining dotfiles in source control.md @@ -0,0 +1,94 @@ +[#]: subject: "My tips for maintaining dotfiles in source control" +[#]: via: "https://opensource.com/article/22/2/dotfiles-source-control" +[#]: author: "Moshe Zadka https://opensource.com/users/moshez" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +我在源码控制中维护点文件的技巧 +====== +当你把环境保持在源码控制中,开发虚拟机和容器就成了一个解决方案,而不是一个问题。 +![Person drinking a hot drink at the computer][1] + +你是否曾经开始使用一台新的电脑,不管是出于自愿还是因为旧的电脑让你的魔法烟消云散,并且对花了多长时间才把所有东西都_弄好_而感到沮丧?更糟糕的是,有没有花了一些时间重新配置你的 shell 提示,然后意识到你更喜欢以前的样子? + +对我来说,当我决定要在[容器][2]中进行开发时,这个问题就变得很严重了。容器是短暂的。开发工具很容易解决。一个带有工具的容器镜像就可以工作。源码很容易解决。源码控制维护它,开发发生在分支上。但是,如果每次我创建一个容器,我都需要仔细地配置它,这将是一个痛苦。 + +### 主目录的版本控制 + +将配置文件保存在版本控制中一直是一个有吸引力的选择。但是天真地这么做是令人担忧的。不可能直接对 `~` 进行版本控制。 + +首先,太多的程序认为把秘密放在那里是安全的。它也是 `~/Downloads` 和 `~/Pictures` 等文件夹的位置,这些文件夹可能不应该被版本化。 + +小心翼翼地在主目录下保留一个 `.gitignore` 文件来管理 _include_ 和 _exclude_ 列表是有风险的。在某些时候,其中一个路径会出错。几个小时的配置会丢失,大文件会出现在 Git 历史记录中,或者最糟糕的是,秘密和密码会被泄露。当这一策略失败时,它就成了灾难性的失败。 + +手动维护大量的符号链接也是行不通的。版本控制的全部原因是为了避免手动维护配置。 + +### 写一个安装脚本 + +这暗示了在源码控制中维护点文件的第一条线索。写一个安装脚本。 + +就像所有好的安装脚本一样,让它_幂等_:运行两次不会两次增加配置。 + +像所有好的安装脚本一样,让它_只做最少的事情_:使用任何其他的技巧来指向你的源码控制中的配置文件。 + +### \~/.config 目录 + +现代 Linux 程序在直接在主目录中寻找配置之前,先在 `~/.config` 中寻找。最重要的例子是 `git`,它在 `~/.config/git` 中寻找。 + +这意味着安装脚本可以将 `~/.config` 符号链接到主目录中源码控制的管理目录中的一个目录: + + +``` + + +#!/bin/bash +set -e +DOTFILES="$(dirname $(realpath $0))" +[ -L ~/.config ] || ln -s $DOTFILES/config ~/.config + +``` + +此脚本寻找它的位置,然后将 `~/.config` 链接到它被签出的地方。这意味着几乎没有关于它需要位于主目录中的位置的假设。 + +### 寻找文件 + +大多数 shells 仍然直接在主目录下寻找文件。为了解决这个问题,你要增加一层指示。从 `$DOTFILES` 中获取文件意味着在修改 shell 配置时不需要重新运行安装程序。 + + +``` + + +$!/bin/bash +set -e +DOTFILES="$(dirname $(realpath $0))" +grep -q 'SETTING UP BASH' ~/.bashrc || \ +  echo "source $DOTFILES/starship.bash # SETTING UP BASH" >> ~/.bashrc + +``` + +再次注意,这个脚本很小心地做了幂等:如果这一行已经在那里了,它就不会再添加。它还考虑到了你在 `.bashrc` 上已经做的任何编辑。虽然这不是一个好主意,但也没有必要惩罚它。 + +### 反复测试 + +当你把环境保持在源码控制中时,开发虚拟机和容器就成了一个解决方案,而不是一个问题。试着做一个实验。建立一个新的开发环境,克隆你的点文件,安装,并看看有什么问题。 + +不要只做一次。至少每周做一次。这将使你更快地完成工作,同时也会告诉你什么是不可行的。暴露问题,修复它们,然后重复。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/dotfiles-source-control + +作者:[Moshe Zadka][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/moshez +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hot drink at the computer) +[2]: https://opensource.com/tags/containers From 18797d101bd8f0bed76dc0861e337f039a79a1e3 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 18 Feb 2022 08:55:27 +0800 Subject: [PATCH 326/334] translating --- ...How to Clean Up Snap Package Versions in Linux -Quick Tip.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220217 How to Clean Up Snap Package Versions in Linux -Quick Tip.md b/sources/tech/20220217 How to Clean Up Snap Package Versions in Linux -Quick Tip.md index 25d5a29f58..297889f3f0 100644 --- a/sources/tech/20220217 How to Clean Up Snap Package Versions in Linux -Quick Tip.md +++ b/sources/tech/20220217 How to Clean Up Snap Package Versions in Linux -Quick Tip.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/clean-snap-packages/" [#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 4c52d96af1de697fa1197856a41c64dd106edeaa Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 18 Feb 2022 14:19:39 +0800 Subject: [PATCH 327/334] ONE @wxy https://linux.cn/article-14282-1.html --- ...edora Linux 35 Spin Tailored for Gaming.md | 118 +++++++++++++++++ ...edora Linux 35 Spin Tailored for Gaming.md | 120 ------------------ 2 files changed, 118 insertions(+), 120 deletions(-) create mode 100644 published/20220208 Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming.md delete mode 100644 sources/news/20220208 Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming.md diff --git a/published/20220208 Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming.md b/published/20220208 Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming.md new file mode 100644 index 0000000000..dbfe202a49 --- /dev/null +++ b/published/20220208 Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming.md @@ -0,0 +1,118 @@ +[#]: subject: "Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming" +[#]: via: "https://news.itsfoss.com/fedora-nobara-gaming/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14282-1.html" + +Nobara:一个为游戏量身定做的非官方 Fedora Linux 35 衍生版 +====== + +> Nobara 项目添加了必要的软件包/工具,并修复了一些问题,使 Fedora Linux 适合游戏,并计划在未来进行进一步的完善! + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-nobara-project-gaming.png?w=1200&ssl=1) + +Fedora 35 是一个令人印象深刻的 Linux 发行版,在这个版本中首次推出了 GNOME 41 并引入了一个新的 KDE 变体。 + +你可以阅读我们的 [原始报道][1],了解更多关于它的信息。 + +虽然 Fedora Linux 一直在不断改进桌面体验,但它可能不是每个用户的理想桌面发行版。此外,即使它包括开箱即用的开源工具和实用程序,它也不是为了提供毫不费力的游戏体验。 + +你需要安装一些依赖性的东西,并配置好发行版,才能轻松地玩一个游戏。 + +由红帽工程师 Thomas Crider(又名 Glorious Eggroll)发起 的 Nobara 项目旨在改变这种状况,并提供一个为游戏而生的非官方 Fedora 35 工作站衍生版。 + +### Nobara 工作站 35 有什么新东西? + +Fedora 35 支持几个 Linux 游戏。然而,如果你需要使用 Proton 或 Wine 来玩 Windows 专属的游戏,你得配置一些东西,并可能需要排除一些游戏中的故障。 + +所以,Nobara 项目旨在提供一个非官方的衍生版,为其添加用户友好的修复,使其成为 Linux 玩家的理想选择。 + +![][2] + +#### 对于 Fedora 35 的小白用户 + +如果你已经使用了一段时间的 Linux,并且能够自如地使用 Linux终端,你应该知道 [在 Linux 上设置 Wine][3]、Proton 和安装任何额外的编解码器是相当容易的。 + +然而,对于依赖预装包和软件中心提供的应用程序的小白用户来说,他们需要做出一些努力来了解它。 + +#### Lutris、Steam、OBS Studio 和 Kdenlive 预装版 + +Lutris 可以帮助你在 Linux 上管理和进行游戏。不要忘了,它已经 [帮助 Linux 成长为一个适合游戏的平台][4],提供了一个易于使用的 GUI,让用户可以玩只支持 Windows 的游戏。 + +使用 Nobara 工作站 35,已经预装了 Lutris。这个项目背后的开发者也正好在维护 Lutris。因此,可以在 Nobara 工作站 35 上看到 Lutris 的最新版本。 + +不仅仅是 Lutris,你还会得到 Steam、OBS Studio 和 Kdenlive 的支持。 + +当然,顺便说一句,你也会得到标准的 Fedora 工作站软件包。 + +#### 对游戏的修复 + +在 Fedora 35 上玩几个游戏时有一些已知的问题。该项目提到,游戏开发者希望 Fedora 解决这些问题,显然,Fedora 将问题抛给了游戏开发者。而这些问题仍然没有解决。 + +因此,在 Nobara 工作站 35 中,其中一些问题已经得到解决。问题如: + + * 由于 libusb 和 xow(Xbox One 无线加密狗的驱动)的问题导致 CPU 负载过高 + * 为 Dying Light 添加必要的符号链接 + +#### X11 作为默认的显示服务器 + +Wayland 可能提供了比 X11 会话更多的技术改进。然而,X11 与游戏的兼容性更好。 + +此外,它也是 AMD 的 FSR 技术、以及 [Steam Play/Proton][5] 和 Wine 的一些其他东西的可以工作的必要条件。 + +#### 其他变化 + +考虑到 Nobara 工作站 35 相对较新,令人惊讶的是,你可以发现一些明显的不同。 + +一些值得一提的关键亮点包括: + + * Nobara 工作站 35 禁用了 Fedora 官方软件库中的一些软件包,而倾向于使用自己的。例如,与 Fedora 的官方软件库相比,你应该在 Nobara 的软件库中找到一个更新一些的 Lutris 版本。 + * Nobara 工作站 35 使用了一个定制的内核。 + * [RPM Fusion 仓库][6] 是默认启用的。 + * 用于 Wine 64/32 位游戏兼容性的额外软件包。 + +开发者计划很快通过添加以下内容来进一步改进它。 + + * 添加自定义的 OBS Studio 及浏览器集成插件,和 vulkan+opengl 捕捉支持。 + * Nobara 特定的主题设计。 + * 包括 [Proton-GE][7] 和 Lutris Win-GE 的构建。 + +你可以在其 [官方网站][8] 上了解其他技术变化。 + +### 结束语 + +如果 Nobara 项目使 Fedora Linux 适用于游戏,我们应该多了一个 [以游戏为重点的 Linux 发行版][9]。 + +对于适应 Fedora Linux 的 Linux 玩家来说,这将是一个不错的选择。 + +- [下载 Nobara 工作站 35][8] + +你可以从其官方网站下载合适的 ISO(GNOME 和 KDE 版本)来尝试。请注意,这是一个相当新的衍生版,所以在它取代作为你的日常用机之前,你可能要三思而行。 + +你对 Noboara 项目有什么看法?我们是否需要一个针对游戏的 Fedora Linux 版本?请在评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/fedora-nobara-gaming/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/fedora-35-release/ +[2]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-nobara-scaled.jpg?resize=1568%2C773&ssl=1 +[3]: https://itsfoss.com/use-windows-applications-linux/ +[4]: https://news.itsfoss.com/lutris-creator-interview/ +[5]: https://itsfoss.com/steam-play/ +[6]: https://itsfoss.com/fedora-third-party-repos/ +[7]: https://github.com/GloriousEggroll/proton-ge-custom +[8]: https://nobaraproject.org/ +[9]: https://itsfoss.com/linux-gaming-distributions/ diff --git a/sources/news/20220208 Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming.md b/sources/news/20220208 Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming.md deleted file mode 100644 index 451bbd52c3..0000000000 --- a/sources/news/20220208 Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming.md +++ /dev/null @@ -1,120 +0,0 @@ -[#]: subject: "Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming" -[#]: via: "https://news.itsfoss.com/fedora-nobara-gaming/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming -====== - -Fedora 35 is an impressive Linux distribution that debuted with GNOME 41 and introduced a new KDE variant. - -You can read our [original coverage][1] to know more about it. - -While Fedora Linux has constantly been improving the desktop experience, it may not be an ideal desktop distribution for every user. Moreover, even if it includes open-source tools and utilities out of the box, it is not geared to provide an effortless gaming experience. - -You need to install a few dependencies and configure the distro to play a game without hassle. - -Nobara Project by Thomas Crider (Red Hat Engineer) a.k.a. Glorious Eggroll aims to change that and offer an unofficial Fedora 35 Workstation spin built for gaming. - -### Nobara Workstation 35: What’s New? - -Fedora 35 is capable of handling several Linux games. However, if you need to play Windows-exclusive titles using Proton or Wine, you will have to configure a few things and probably need to troubleshoot in some titles. - -So, Nobara Project aims to provide an unofficial spin that adds user-friendly fixes to it and makes it ideal for Linux gamers. - -![][2] - -#### Fedora 35 for Point and Click User - -If you have been using Linux for a while and are comfortable using the Linux terminal, you should know that it is fairly easy to [set up Wine on Linux][3], Proton and install any additional codecs. - -However, for a point-and-click user who relies on pre-installed packages and apps available from the software center, they need to make some effort to learn about it. - -#### Lutris, Steam, OBS Studio, and Kdenlive Pre-Installed - -Lutris helps you organize and play games on Linux. Not to forget, it has [helped Linux grow as a platform suitable for gaming][4] by providing an easy-to-use GUI that lets users play Windows-only games and more. - -With Nobara Workstation 35, you will have Lutris pre-installed. The developer behind this project also happens to maintain Lutris. So, you should expect the latest version of Lutris on Nobara Workstation 35. - -Not just Lutris, but you also get Steam, OBS Studio, and Kdenlive baked in. - -Of course, you do get the standard Fedora-Workstation packages, in case you were wondering. - -#### Fixes for Games - -There are some known issues when playing a couple of games on Fedora 35. The project mentions that game developers want Fedora to resolve those issues, and apparently, Fedora points the figure at the game devs. And the problems remain unsolved. - -So, with Nobara Workstation 35, some of these issues have been addressed. Problems like: - - * High CPU load due to an issue with libusb and xow (driver for Xbox One wireless dongle) - * Adding a necessary symlink for Dying Light - - - -#### X11 as the Default Display Server - -Wayland may offer technical improvements over the X11 session. However, X11 provides better compatibility with games. - -Furthermore, it is also required for AMD’s FSR tech to work, and a few other things with [Steam Play/Proton][5], and Wine. - -#### Other Changes - -Considering Nobara Workstation 35 is relatively new, surprisingly, you can find some noticeable differences. - -Some key highlights worth mentioning include: - - * Nobara Workstation 35 disables a few packages from Fedora’s official repositories, favoring its own. For instance, you should find a newer Lutris version on Nobara’s repo compared to Fedora’s official repositories. - * Nobara Workstation 35 uses a custom kernel. - * The [RPM Fusion repositories][6] are enabled by default. - * Additional packages for Wine 64/32-bit game compatibility. - - - -The developer plans to improve it further by adding the following soon: - - * Add custom OBS Studio with browser integration plugin and vulkan+opengl capture support - * Nobara specific theming - * Include [Proton-GE][7] and Lutris Wine-GE builds - - - -You can learn about the other technical changes on its [official website][8]. - -### Closing Thoughts - -If the Nobara Project makes Fedora Linux suitable for gaming, we should have one more [gaming-focused Linux distribution][9]. - -It would be a good option for Linux gamers comfortable with Fedora Linux. - -[Download Nobara Workstation 35][8] - -You can try it out by downloading the suitable ISO (GNOME and KDE editions) from its official website. Note that this is a fairly new spin, so you might want to think twice before replacing it as your daily driver. - -_What do you think about Noboara Project? Do we need a Fedora Linux flavor geared for gaming? Let me know your thoughts in the comments._ - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/fedora-nobara-gaming/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://news.itsfoss.com/fedora-35-release/ -[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM4NSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[3]: https://itsfoss.com/use-windows-applications-linux/ -[4]: https://news.itsfoss.com/lutris-creator-interview/ -[5]: https://itsfoss.com/steam-play/ -[6]: https://itsfoss.com/fedora-third-party-repos/ -[7]: https://github.com/GloriousEggroll/proton-ge-custom -[8]: https://nobaraproject.org/ -[9]: https://itsfoss.com/linux-gaming-distributions/ From 66c07797aca1148ec916c952dddfffe698955a02 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 18 Feb 2022 14:51:08 +0800 Subject: [PATCH 328/334] RP @wxy https://linux.cn/article-14283-1.html --- ... maintaining dotfiles in source control.md | 48 ++++++++----------- 1 file changed, 21 insertions(+), 27 deletions(-) rename {translated/tech => published}/20220208 My tips for maintaining dotfiles in source control.md (58%) diff --git a/translated/tech/20220208 My tips for maintaining dotfiles in source control.md b/published/20220208 My tips for maintaining dotfiles in source control.md similarity index 58% rename from translated/tech/20220208 My tips for maintaining dotfiles in source control.md rename to published/20220208 My tips for maintaining dotfiles in source control.md index 8f13838631..9cc4fbf5f6 100644 --- a/translated/tech/20220208 My tips for maintaining dotfiles in source control.md +++ b/published/20220208 My tips for maintaining dotfiles in source control.md @@ -3,73 +3,67 @@ [#]: author: "Moshe Zadka https://opensource.com/users/moshez" [#]: collector: "lujun9972" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14283-1.html" 我在源码控制中维护点文件的技巧 ====== -当你把环境保持在源码控制中,开发虚拟机和容器就成了一个解决方案,而不是一个问题。 -![Person drinking a hot drink at the computer][1] -你是否曾经开始使用一台新的电脑,不管是出于自愿还是因为旧的电脑让你的魔法烟消云散,并且对花了多长时间才把所有东西都_弄好_而感到沮丧?更糟糕的是,有没有花了一些时间重新配置你的 shell 提示,然后意识到你更喜欢以前的样子? +> 当你把环境保持在源码控制中,开发虚拟机和容器就成了一个解决方案,而不是一个问题。 -对我来说,当我决定要在[容器][2]中进行开发时,这个问题就变得很严重了。容器是短暂的。开发工具很容易解决。一个带有工具的容器镜像就可以工作。源码很容易解决。源码控制维护它,开发发生在分支上。但是,如果每次我创建一个容器,我都需要仔细地配置它,这将是一个痛苦。 +![](https://img.linux.net.cn/data/attachment/album/202202/18/145014pc7lmh5ts15mm0tm.jpg) + +你是否曾经开始使用一台新的电脑,不管是出于自愿还是因为旧的电脑让你的魔法烟消云散,并且对花了多长时间才把所有东西都 _弄好_ 而感到沮丧?更糟糕的是,有没有花了一些时间重新配置你的 shell 提示符,然后意识到你更喜欢以前的样子? + +对我来说,当我决定要在 [容器][2] 中进行开发时,这个问题就变得很严重了。容器是非持久的。开发工具很容易解决:一个带有工具的容器镜像就可以工作。源码很容易解决:源码控制维护它,开发是在分支上。但是,如果每次我创建一个容器,我都需要仔细地配置它,这就太痛苦了。 ### 主目录的版本控制 将配置文件保存在版本控制中一直是一个有吸引力的选择。但是天真地这么做是令人担忧的。不可能直接对 `~` 进行版本控制。 -首先,太多的程序认为把秘密放在那里是安全的。它也是 `~/Downloads` 和 `~/Pictures` 等文件夹的位置,这些文件夹可能不应该被版本化。 +首先,太多的程序认为把秘密放在那里是安全的。此外,它也是 `~/Downloads` 和 `~/Pictures` 等文件夹的位置,这些文件夹可能不应该被版本化。 -小心翼翼地在主目录下保留一个 `.gitignore` 文件来管理 _include_ 和 _exclude_ 列表是有风险的。在某些时候,其中一个路径会出错。几个小时的配置会丢失,大文件会出现在 Git 历史记录中,或者最糟糕的是,秘密和密码会被泄露。当这一策略失败时,它就成了灾难性的失败。 +小心翼翼地在主目录下保留一个 `.gitignore` 文件来管理 `include` 和 `exclude` 列表是有风险的。在某些时候,其中一个路径会出错,花费了几个小时的配置会丢失,大文件会出现在 Git 历史记录中,或者最糟糕的是,秘密和密码会被泄露。当这一策略失败时,它就成了灾难性的失败。 手动维护大量的符号链接也是行不通的。版本控制的全部原因是为了避免手动维护配置。 ### 写一个安装脚本 -这暗示了在源码控制中维护点文件的第一条线索。写一个安装脚本。 +这暗示了在源码控制中维护点文件的第一条线索:写一个安装脚本。 -就像所有好的安装脚本一样,让它_幂等_:运行两次不会两次增加配置。 +就像所有好的安装脚本一样,让它 _幂等_:运行两次不会两次增加配置。 -像所有好的安装脚本一样,让它_只做最少的事情_:使用任何其他的技巧来指向你的源码控制中的配置文件。 +像所有好的安装脚本一样,让它 _只做最少的事情_:使用其他的技巧来指向你的源码控制中的配置文件。 -### \~/.config 目录 +### ~/.config 目录 -现代 Linux 程序在直接在主目录中寻找配置之前,先在 `~/.config` 中寻找。最重要的例子是 `git`,它在 `~/.config/git` 中寻找。 - -这意味着安装脚本可以将 `~/.config` 符号链接到主目录中源码控制的管理目录中的一个目录: +现代 Linux 程序在直接在主目录中寻找配置之前,会先在 `~/.config` 中寻找。最重要的例子是 `git`,它在 `~/.config/git` 中寻找。 +这意味着安装脚本可以将 `~/.config` 符号链接到主目录中源码控制的管理目录中的一个目录: ``` - - #!/bin/bash set -e DOTFILES="$(dirname $(realpath $0))" [ -L ~/.config ] || ln -s $DOTFILES/config ~/.config - ``` 此脚本寻找它的位置,然后将 `~/.config` 链接到它被签出的地方。这意味着几乎没有关于它需要位于主目录中的位置的假设。 -### 寻找文件 +### 获取文件 大多数 shells 仍然直接在主目录下寻找文件。为了解决这个问题,你要增加一层指示。从 `$DOTFILES` 中获取文件意味着在修改 shell 配置时不需要重新运行安装程序。 - ``` - - $!/bin/bash set -e DOTFILES="$(dirname $(realpath $0))" grep -q 'SETTING UP BASH' ~/.bashrc || \ -  echo "source $DOTFILES/starship.bash # SETTING UP BASH" >> ~/.bashrc - + echo "source $DOTFILES/starship.bash # SETTING UP BASH" >> ~/.bashrc ``` -再次注意,这个脚本很小心地做了幂等:如果这一行已经在那里了,它就不会再添加。它还考虑到了你在 `.bashrc` 上已经做的任何编辑。虽然这不是一个好主意,但也没有必要惩罚它。 +再次注意,这个脚本很仔细地做了幂等:如果这一行已经在那里了,它就不会再添加。它还考虑到了你在 `.bashrc` 上已经做的任何编辑,虽然这不是一个好主意,但也没有必要惩罚它。 ### 反复测试 @@ -84,7 +78,7 @@ via: https://opensource.com/article/22/2/dotfiles-source-control 作者:[Moshe Zadka][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From cd53a4ce6424b709b9c31ad6f7d99834a5f9b06f Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 19 Feb 2022 05:02:44 +0800 Subject: [PATCH 329/334] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020220218=20?= =?UTF-8?q?Add,=20switch,=20delete,=20and=20manage=20Linux=20users=20in=20?= =?UTF-8?q?KDE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20220218 Add, switch, delete, and manage Linux users in KDE.md --- ..., delete, and manage Linux users in KDE.md | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 sources/tech/20220218 Add, switch, delete, and manage Linux users in KDE.md diff --git a/sources/tech/20220218 Add, switch, delete, and manage Linux users in KDE.md b/sources/tech/20220218 Add, switch, delete, and manage Linux users in KDE.md new file mode 100644 index 0000000000..73fc8fcb1a --- /dev/null +++ b/sources/tech/20220218 Add, switch, delete, and manage Linux users in KDE.md @@ -0,0 +1,97 @@ +[#]: subject: "Add, switch, delete, and manage Linux users in KDE" +[#]: via: "https://opensource.com/article/22/2/manage-linux-users-kde" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Add, switch, delete, and manage Linux users in KDE +====== +Maintaining separate users on a computer is a luxury, and a great way to +keep your own data, and the data of those you care about, safe. +![people in different locations who are part of the same team][1] + +Sharing a computer in a household is usually a pretty casual affair. When you need the computer, you pick it up and start using it. It's simple in theory, and mostly works. That is, until you accidentally grab the common computer and accidentally post screenshots of your server's uptime to your partner's cooking blog. Then it's time for separate user accounts. + +From the very beginning, Linux has been a multi-user system. It's designed to treat each user, so long as they log in, as a unique human being, with a desktop all their own, a unique web browser profile, access to their own documents and files, and so on. The KDE Plasma Desktop does a lot to make it easy to switch from one account to another, but first you must set up a user account for each person who you expect to use a computer. You might also set up a special account for guests (I call this account, pragmatically, **guest**.) + +### Add a user in KDE + +There are different ways to add users on Linux. One way is the sysadmins-style of [using the terminal][2]. This is very efficient when you have lots of users to add, and so you want to automate the process or just reduce the number of mouse clicks. + +In the Plasma Desktop, though, you can add users with the **Users** application. **Users** is actually a control panel in **System Settings**, but you can launch it from your application menu as if it were a stand-alone app. + +![Users in KDE System Settings][3] + +(Seth Kenlon, [CC BY-SA 4.0][4]) + +To add a user, click the **Add New User** button at the bottom of the window. + +![Adding a user in KDE][5] + +(Seth Kenlon, [CC BY-SA 4.0][4]) + +Give the new user a name and a username. These can be the same thing, but the intent is that their name is their birth name, while their username is a simple handle they use for computing. For instance, my name is "Seth Kenlon", while my username is `seth`. + +Designate the new user as either a standard user or an administrator. Standard users have full control over just their own environment. They can [install Flatpaks][6] and save data to their home directory, but they can't affect other users on the machine. This is one of the advantages of having user accounts. I don't suspect that anyone I allow to use my computer intends to delete data that's important to me, but accidents happen. By creating a separate user account for myself and my partner, I'm protecting each of our data, and I'm protecting each of us individually from accidentally moving a file or misplacing data that's important to the other. + +An administrator can make systemwide changes. I usually reserve this for myself on my computer, and I expect my partner to reserve that role for herself on her own computer. At work, however, that role belongs to the IT department. + +Create a password for the user. Once logged in, new users can change their passwords. + +To finalize user creation, click the **Create** button. + +### Switching users + +There are two different ways to switch users at the desktop level. You can log out and then let the other user log in, or you can choose **Switch user** from the **Power / Sessions** category in your application menu. + +![Switching users in KDE][7] + +(Seth Kenlon, [CC BY-SA 4.0][4]) + +When a new user logs in, your desktop is "frozen" or paused, and a new desktop is brought up for the other user. All of your windows remain open. You can even switch users in the middle of a game (you should probably pause first if you're in the middle of combat), and when you switch back you can pick right up where you left off. Better still, all of your processes continue to run, too. So you can switch users while rendering video or compiling code, and when you switch back your video will have finished rendering, or your code will have finished compiling (provided enough time has elapsed.) + +![Login][8] + +(Seth Kenlon, [CC BY-SA 4.0][4]) + +### Deleting a user + +When I have house guests, I often create a guest account for the duration of their stay, and then I remove the account once they've gone. + +You can remove a user from your computer by deleting their user account. This removes all of their data, so **make sure that the user you're about to delete has migrated what they need off of the machine! + +The **Delete User** button is located in each user account in the **Users** control panel, where you created the user in the first place. + +![Deleting a user][9] + +(Seth Kenlon, [CC BY-SA 4.0][4]) + +### Linux user management + +Maintaining separate users on a computer is a luxury, and a great way to keep your own data, and the data of those you care about, safe. It allows each user to be unique, and to make the desktop their own. With Linux, it's easy and nondisruptive, so create users for friends, houseguests, and family members. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/manage-linux-users-kde + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/connection_people_team_collaboration.png?itok=0_vQT8xV (people in different locations who are part of the same team) +[2]: https://www.redhat.com/sysadmin/linux-commands-manage-users +[3]: https://opensource.com/sites/default/files/kde-users.jpg (Users in KDE System Settings) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://opensource.com/sites/default/files/kde-users-add.jpg (Adding a user in KDE) +[6]: https://opensource.com/article/21/11/install-flatpak-linux +[7]: https://opensource.com/sites/default/files/kde-users-switch.jpg (Switching users in KDE) +[8]: https://opensource.com/sites/default/files/kde-users-login.jpg (Login) +[9]: https://opensource.com/sites/default/files/kde-users-delete.jpg (Deleting a user) From c11ab4726e6c9f439e5fdd706b189008ba55d869 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 19 Feb 2022 05:03:04 +0800 Subject: [PATCH 330/334] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020220218=20?= =?UTF-8?q?Bottles=202022.2.14=20Release=20Lets=20You=20Easily=20Install?= =?UTF-8?q?=20Windows=20Apps=20on=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20220218 Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux.md --- ...ou Easily Install Windows Apps on Linux.md | 103 ++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 sources/news/20220218 Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux.md diff --git a/sources/news/20220218 Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux.md b/sources/news/20220218 Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux.md new file mode 100644 index 0000000000..943e2b5779 --- /dev/null +++ b/sources/news/20220218 Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux.md @@ -0,0 +1,103 @@ +[#]: subject: "Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux" +[#]: via: "https://news.itsfoss.com/bottles-2022-2-14-release/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux +====== + +You can [use Wine to install Windows apps on Linux][1], but it does not work for all the applications. Moreover, it requires you to configure things manually. So, what are the easy options? + +While [CrossOver][2] has been trying its best to make the process easier, Bottles is another solution. + +With Bottles’ latest release, it aims to make things seamless to help run your preferred Windows app with minimal tweaking. + +### Bottles 2022.2.14: What’s New? + +The release brings a few new features, improvements, and plenty of bug fixes. Let me highlight the key changes below. + +#### Installers + +Here’s what the devs have to say about the new feature – + +> These are sets of instructions interpreted by Bottles to replicate the installation of a program. This process is written in manifest files by the maintainers, who were able to install the program following the same steps. + +![Source: Bottles][3] + +Basically, these one-click installers automatically install software without you needing to tweak anything manually. This is similar to how [Lutris][4] helps gamers install a game that requires heavy tweaking. + +There are only a few installers, particularly third-party game launchers, available. Users who want to install a program like Origin, can simply go to the Installers section in their preferred bottle and hit the download button. + +The devs also promise that you can expect more installers soon. + +#### A Dedicated App Store + +To feature the available installers, they have launched an [AppStore][5] on their official website. It contains a list of all available installers and necessary information like dependencies, configuration, and supported architecture. Users can expect more useful features like reviews to arrive soon. + +![Source: Bottles][6] + +An important point to note is that not all installers will work flawlessly. Thus, the devs have introduced something called “grades” that refers to how smooth the installed program will function. The grading scale ranges from Bronze to Platinum and is very similar to how Wine’s compatibility is rated. + +Users can be assured that every installer will at least run the program and perform the main functionality the program is required to do. Users should expect bugs, graphical glitches, and crashes unless the installer is graded Platinum. Moreover, the installers will work with restore points as well. + +#### New Search Bar + +Users with multiple bottles now have the ability to find a particular bottle using the all-new search functionality. Do note that it is hidden by default and will be automatically enabled if you have at least 10 bottles installed. + +![Source: Bottles][7] + +I feel a basic feature as a search bar should have been implemented already. But, better late than never! + +#### Custom Path for Bottles + +Previously, users could not set a custom path for a bottle. With this release, users can do just that by navigating to the preferences section. This is very helpful if a user is low on storage and plans to use a separate drive. + +Do note that Flatpak users will have to enable permissions for Bottles to access any location outside the Flatpak environment. You can try [Flatseal to manage Flatpak permissions][8] as well. + +#### Improvements and Bug Fixes + +In addition to the major feature upgrades, there are several useful improvements across the board, some worth highlighting include: + + * Runtime available for non-Flapak package that can be installed through the core section in Preferences. + * Users now have the ability to terminate ongoing processes using the built-in task manager. + * Users can also launch programs from the terminal that’s located in the context menu. + * Support for Gamescope and dxvk-async as a component has arrived. + + + +A variety of essential bug fixes also arrives with this release. Some of them include fixes for gamemode in the Flatpak version and the DXVK version change that removed the initial backup. + +You can refer to their [official release notes][9] to know more about the technical details. + +### Closing Thoughts + +Bottles aims to be a must-have app for every Linux user who deals with Windows software. And, with all these improvements, it looks promising! + +The addition of installers should immensely help a lot of users. What do you think? Let me know your thoughts in the comments below. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/bottles-2022-2-14-release/ + +作者:[Rishabh Moharir][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/use-windows-applications-linux/ +[2]: https://news.itsfoss.com/crossover-21-1-0-release/ +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjYwNiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[4]: https://lutris.net/ +[5]: https://usebottles.com/appstore/ +[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjcyNyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU2NCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[8]: https://itsfoss.com/flatseal/ +[9]: https://usebottles.com/blog/release-2022.2.14/ From 9bc46edecb060b35ef67e9f1f383e064078b0a45 Mon Sep 17 00:00:00 2001 From: CN-QUAN <97161224+CN-QUAN@users.noreply.github.com> Date: Sat, 19 Feb 2022 13:17:16 +0800 Subject: [PATCH 331/334] Update 20220103 13 examples of how DevOps facilitated transformation in 2021.md --- ...examples of how DevOps facilitated transformation in 2021.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220103 13 examples of how DevOps facilitated transformation in 2021.md b/sources/tech/20220103 13 examples of how DevOps facilitated transformation in 2021.md index aeaaa30b1d..2f94d07f5c 100644 --- a/sources/tech/20220103 13 examples of how DevOps facilitated transformation in 2021.md +++ b/sources/tech/20220103 13 examples of how DevOps facilitated transformation in 2021.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/1/devops-transformation" [#]: author: "Will Kelly https://opensource.com/users/willkelly" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "CN-QUAN " [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 6958131a58c4949c4468699e480f4735b3b33439 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 19 Feb 2022 15:46:03 +0800 Subject: [PATCH 332/334] ONE @wxy https://linux.cn/article-14285-1.html --- ...ou Easily Install Windows Apps on Linux.md | 105 ++++++++++++++++++ ...ou Easily Install Windows Apps on Linux.md | 103 ----------------- 2 files changed, 105 insertions(+), 103 deletions(-) create mode 100644 published/20220218 Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux.md delete mode 100644 sources/news/20220218 Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux.md diff --git a/published/20220218 Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux.md b/published/20220218 Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux.md new file mode 100644 index 0000000000..84c79bb9fe --- /dev/null +++ b/published/20220218 Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux.md @@ -0,0 +1,105 @@ +[#]: subject: "Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux" +[#]: via: "https://news.itsfoss.com/bottles-2022-2-14-release/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14285-1.html" + +Bottles:在 Linux 上轻松安装 Windows 应用程序 +====== + +> 随着最新发布的更新,Bottles 正在成为一个近乎完美的解决方案,无需任何特别的努力就可以在 Linux 上安装 Windows 应用程序。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/bottles-release.png?w=1200&ssl=1) + +你可以 [使用 Wine 在 Linux 上安装 Windows 应用程序][1],但它并不适用所有的应用程序。此外,它还需要你手动配置东西。那么,有什么简单的选择呢? + +虽然 [CrossOver][2] 一直在尽力使这个过程更容易,但还另一个解决方案:Bottles。 + +随着 Bottles 的最新发布,它的目标是更加顺滑地以最小的调整来运行你喜欢的 Windows 应用程序。 + +### Bottles 2022.2.14 的新变化 + +该版本带来了一些新功能、改进和大量的错误修复。让我强调一下以下关键变化: + +#### 安装程序 + +以下是开发者对新功能的介绍: + +> 这些是由 Bottles 解释的指令集,以重现程序的安装。这个过程是由维护者写在清单文件中的,他们能够按照同样的步骤安装程序。 + +![][3] + +简单来说,这些一键式安装程序会自动安装软件,而不需要你手动调整什么。这类似于 [Lutris][4] 帮助游戏玩家安装一个需要大量调整的游戏。 + +目前只有不多的几个安装程序,主要是第三方游戏启动程序。用户如果想安装像 Origin 这样的程序,可以简单地在他们的首选“瓶子”中进入安装程序部分,点击下载按钮。(LCTT 译注:“瓶子”指一个虚拟环境。) + +开发人员还承诺,你可以期待很快有更多的安装程序。 + +#### 一个专门的应用程序商店 + +为了展示可用的安装程序,他们在其官方网站上推出了一个 [应用商店][5]。它包含了所有可用安装程序的列表和必要的信息,如依赖性、配置和支持的架构。用户可以期待更多有用的功能,如评论功能很快就会到来。 + +![][6] + +需要注意的一点是,并不是所有的安装程序都能完美无缺地工作。因此,开发者引入了一种叫做“等级”的东西,指的是安装的程序的顺利工作的程度。分级范围从铜级到白金级,与 Wine 的兼容性评级方式非常相似。 + +用户可以放心,每个安装程序至少都可以运行该程序并执行程序所需完成的主要功能。但除非安装程序被评为白金级,否则用户应该对错误、图形故障和崩溃的出现有所预期。此外,安装程序也会与还原点一起工作。 + +#### 新的搜索栏 + +拥有多个“瓶子”的用户现在可以使用全新的搜索功能来寻找特定的“瓶子”。请注意,它在默认情况下是隐藏的,如果你至少安装了 10 个“瓶子”,就会自动启用。 + +![][7] + +我觉得,作为搜索栏的基本功能应该已经实现了,总比没有强! + +#### “瓶子”的自定义路径 + +以前,用户不能为“瓶子”设置自定义路径。在这个版本中,用户可以在偏好部分中实现这一功能。如果用户的存储空间不足,并计划使用一个单独的驱动器,这非常有帮助。 + +请注意,Flatpak 用户得专门为 Bottles 启用权限,以访问 Flatpak 环境之外的任何位置。你也可以试试 [Flatseal 来管理 Flatpak 的权限][8]。 + +#### 改进和错误修复 + +除了主要的功能升级外,还有一些有用的全面改进,一些值得强调的有: + + * 可用于非 Flapak 软件包的运行环境,可通过首选项中的核心部分安装。 + * 用户现在能够使用内置的任务管理器终止正在进行的进程。 + * 用户还可以从位于上下文菜单中的终端中启动程序。 + * 已经有了对 Gamescope 和 dxvk-async 组件的支持。 + +这个版本中也修复了各种基本的错误。其中包括 Flatpak 版本中游戏模式的修复,以及 DXVK 版本的改变,删除了初始备份。 + +你可以参考他们的 [官方发布说明][9] 来了解更多的技术细节。 + +### 总结 + +Bottles 的目标是成为每个运行 Windows 软件的 Linux 用户的必备应用。而且,有了所有这些改进,它看起来很有前景! + +安装程序的增加应该对很多用户有极大的帮助。你怎么看?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/bottles-2022-2-14-release/ + +作者:[Rishabh Moharir][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/use-windows-applications-linux/ +[2]: https://news.itsfoss.com/crossover-21-1-0-release/ +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/bottles-installers.png?w=955&ssl=1 +[4]: https://lutris.net/ +[5]: https://usebottles.com/appstore/ +[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/bottles-app-details.png?w=1395&ssl=1 +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/bottles-search.png?w=902&ssl=1 +[8]: https://itsfoss.com/flatseal/ +[9]: https://usebottles.com/blog/release-2022.2.14/ diff --git a/sources/news/20220218 Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux.md b/sources/news/20220218 Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux.md deleted file mode 100644 index 943e2b5779..0000000000 --- a/sources/news/20220218 Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux.md +++ /dev/null @@ -1,103 +0,0 @@ -[#]: subject: "Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux" -[#]: via: "https://news.itsfoss.com/bottles-2022-2-14-release/" -[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux -====== - -You can [use Wine to install Windows apps on Linux][1], but it does not work for all the applications. Moreover, it requires you to configure things manually. So, what are the easy options? - -While [CrossOver][2] has been trying its best to make the process easier, Bottles is another solution. - -With Bottles’ latest release, it aims to make things seamless to help run your preferred Windows app with minimal tweaking. - -### Bottles 2022.2.14: What’s New? - -The release brings a few new features, improvements, and plenty of bug fixes. Let me highlight the key changes below. - -#### Installers - -Here’s what the devs have to say about the new feature – - -> These are sets of instructions interpreted by Bottles to replicate the installation of a program. This process is written in manifest files by the maintainers, who were able to install the program following the same steps. - -![Source: Bottles][3] - -Basically, these one-click installers automatically install software without you needing to tweak anything manually. This is similar to how [Lutris][4] helps gamers install a game that requires heavy tweaking. - -There are only a few installers, particularly third-party game launchers, available. Users who want to install a program like Origin, can simply go to the Installers section in their preferred bottle and hit the download button. - -The devs also promise that you can expect more installers soon. - -#### A Dedicated App Store - -To feature the available installers, they have launched an [AppStore][5] on their official website. It contains a list of all available installers and necessary information like dependencies, configuration, and supported architecture. Users can expect more useful features like reviews to arrive soon. - -![Source: Bottles][6] - -An important point to note is that not all installers will work flawlessly. Thus, the devs have introduced something called “grades” that refers to how smooth the installed program will function. The grading scale ranges from Bronze to Platinum and is very similar to how Wine’s compatibility is rated. - -Users can be assured that every installer will at least run the program and perform the main functionality the program is required to do. Users should expect bugs, graphical glitches, and crashes unless the installer is graded Platinum. Moreover, the installers will work with restore points as well. - -#### New Search Bar - -Users with multiple bottles now have the ability to find a particular bottle using the all-new search functionality. Do note that it is hidden by default and will be automatically enabled if you have at least 10 bottles installed. - -![Source: Bottles][7] - -I feel a basic feature as a search bar should have been implemented already. But, better late than never! - -#### Custom Path for Bottles - -Previously, users could not set a custom path for a bottle. With this release, users can do just that by navigating to the preferences section. This is very helpful if a user is low on storage and plans to use a separate drive. - -Do note that Flatpak users will have to enable permissions for Bottles to access any location outside the Flatpak environment. You can try [Flatseal to manage Flatpak permissions][8] as well. - -#### Improvements and Bug Fixes - -In addition to the major feature upgrades, there are several useful improvements across the board, some worth highlighting include: - - * Runtime available for non-Flapak package that can be installed through the core section in Preferences. - * Users now have the ability to terminate ongoing processes using the built-in task manager. - * Users can also launch programs from the terminal that’s located in the context menu. - * Support for Gamescope and dxvk-async as a component has arrived. - - - -A variety of essential bug fixes also arrives with this release. Some of them include fixes for gamemode in the Flatpak version and the DXVK version change that removed the initial backup. - -You can refer to their [official release notes][9] to know more about the technical details. - -### Closing Thoughts - -Bottles aims to be a must-have app for every Linux user who deals with Windows software. And, with all these improvements, it looks promising! - -The addition of installers should immensely help a lot of users. What do you think? Let me know your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/bottles-2022-2-14-release/ - -作者:[Rishabh Moharir][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://news.itsfoss.com/author/rishabh/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/use-windows-applications-linux/ -[2]: https://news.itsfoss.com/crossover-21-1-0-release/ -[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjYwNiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[4]: https://lutris.net/ -[5]: https://usebottles.com/appstore/ -[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjcyNyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU2NCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[8]: https://itsfoss.com/flatseal/ -[9]: https://usebottles.com/blog/release-2022.2.14/ From d5a21375a7ff559a432ed6bdd4fed33d9d6b09da Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 19 Feb 2022 16:03:56 +0800 Subject: [PATCH 333/334] A --- ...Use Linux Terminal on Android Smartphones With These Apps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220218 Use Linux Terminal on Android Smartphones With These Apps.md b/sources/tech/20220218 Use Linux Terminal on Android Smartphones With These Apps.md index 1f4d512786..0c01996a08 100644 --- a/sources/tech/20220218 Use Linux Terminal on Android Smartphones With These Apps.md +++ b/sources/tech/20220218 Use Linux Terminal on Android Smartphones With These Apps.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/using-linux-terminal-android/" [#]: author: "Ankush Das https://itsfoss.com/author/ankush/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "wxy" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From bcf1cc3399a8a50f706fb696da863cfd16f2bb6e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 19 Feb 2022 18:58:09 +0800 Subject: [PATCH 334/334] TR @wxy --- ... on Android Smartphones With These Apps.md | 196 ------------------ ... on Android Smartphones With These Apps.md | 182 ++++++++++++++++ 2 files changed, 182 insertions(+), 196 deletions(-) delete mode 100644 sources/tech/20220218 Use Linux Terminal on Android Smartphones With These Apps.md create mode 100644 translated/tech/20220218 Use Linux Terminal on Android Smartphones With These Apps.md diff --git a/sources/tech/20220218 Use Linux Terminal on Android Smartphones With These Apps.md b/sources/tech/20220218 Use Linux Terminal on Android Smartphones With These Apps.md deleted file mode 100644 index 0c01996a08..0000000000 --- a/sources/tech/20220218 Use Linux Terminal on Android Smartphones With These Apps.md +++ /dev/null @@ -1,196 +0,0 @@ -[#]: subject: "Use Linux Terminal on Android Smartphones With These Apps" -[#]: via: "https://itsfoss.com/using-linux-terminal-android/" -[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" -[#]: collector: "lujun9972" -[#]: translator: "wxy" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Use Linux Terminal on Android Smartphones With These Apps -====== - -Want to practice Linux commands? You don’t need to install a full-fledge distribution for that. There are plenty of [websites that let you use Linux terminal online][1]. - -Those websites work well on the desktop but not on the mobile devices. - -Fret not. Android is based on Linux kernel, after all. There are several apps that let you use your Android smartphone to practice Linux commands to connect to a remote server via SSH. - -Of course, you should not expect it to replace your regular [Linux terminal emulators][2] available for desktops. But, there are quite a few interesting options available for Android. - -To make things easier, I add two different categories, one that covers terminal emulators, and the other tailored for remote connection capabilities (SSH) along with a terminal interface. - -Non-FOSS alert! - -Some apps mentioned here are not open source and they duly labeled. They have been covered here because they let you use Linux terminal on Android. - -**Section A: Top Linux Terminal Emulator Apps** - -Note that you need root access on your Android phone to be able to use commands like ls to navigate through the directories, copy/paste, and perform advanced operations. - -**Note:** _Without root access, you will only be limited to the basics for most apps/terminals, like testing the ping, updating, and installing packages wherever supported._ - -### 1\. Qute: Terminal Emulator (Not FOSS) - -![][3] - -Qute terminal emulator provides access to the built-in command-line shell on your Android device. - -You can use popular commands like ping, trace, cd, mkdir, and more on your smartphone. In addition to some [useful Linux commands][4], you can also install bin files and create [shell scripts][5]. - -Along with the bash script editor and support for rooted devices, it should be an exciting option to try. - -It also offers the ability to enable a light theme, hide the keyboard, toggle syntax highlighting, and a couple of other features. - -Unfortunately, the developer mentions that as per Google’s latest privacy policies, there are known issues with Android 11 or latest. So, without a rooted device, you may not be able to do much. - -[Qute][6] - -### 2\. Terminal Emulator for Android (FOSS) - -![][7] - -Terminal Emulator by Jack Palevich is one of the oldest Linux terminal emulators available for Android. - -You can use simple commands, add multiple windows, and use launcher shortcuts to make things quick. - -The best thing about it is you do not get any ads, in-app purchase options, and no distracting elements. However, it is not being maintained for a long time, and its [GitHub page][8] was also archived in 2020 to mark the end of its development. - -Even in its current state, it seems to be working for numerous users. So, you might want to try it out before dismissing it as an option. - -[Terminal Emulator for Android][9] - -### 3\. Material Terminal (Not FOSS) - -![][10] - -Material Terminal is a re-skin version of “Terminal Emulator for Android”. - -You get to access the same features, with multiple windows, no ads, support for basic commands out of the box, and the option to install Busy Box, and other command-line utilities in a rooted device. - -Basically, everything you’d want in the previous option with a Material Design user interface. Pretty good, right? - -[Material Terminal][11] - -**Section B: SSH Client and Linux Terminal** - -Do you want a terminal emulator on Android with the ability to connect using SSH? Or, maybe tailored just for SSH remote connections? - -Here are some options: - -### 4\. Termux (FOSS) - -![][12] - -Termux is a pretty popular terminal emulator available for Android. It features a comprehensive collection of packages that lets you experience bash and zsh shells. - -Considering you have root access, you can also [manage files with nnn][13] and edit them with nano, vim or emacs. The user interface does not have anything else besides the terminal. - -You can also [access servers using SSH][14]. In addition to that, you also get to develop in C with clang, make, and gbd. Of course, these are subject to your tests and whether you have a rooted device or not. - -You can also explore its [GitHub page][15] to troubleshoot any issues. As of now, updates to the Play Store version is halted due to some technical reasons. So, you can install the latest version via [F-Droid][16] if the available Play Store version does not work. - -[Termux][17] - -### 5\. Termius (Non FOSS) - -![][18] - -Termius is an SSH and SFTP client tailored to make remote access from Android devices possible. - -With Termius, you can manage UNIX and Linux systems. The Play Store page describes it as a pretty Putty client for Android, and rightly so. - -The user interface is easy to understand and doesn’t seem confusing. It also supports Mosh, and Telnet protocol. - -When you connect to a remote device, it detects the OS like Raspberry Pi, Ubuntu, Fedora. You can also work using your keyboard connected to the mobile with this app. To top it all off, you get no ads or banners, making it a perfect little remote connection app. - -It does offer an optional premium (14 days free trial) with more features like encrypted cross-sync, SSH key agent forwarding, SFTP, terminal tabs, and more. You can also explore more about it on its [official website][19]. - -[Termius][20] - -### 6\. JuiceSSH (Non FOSS) - -![][21] - -JuiceSSH is yet another popular SSH client with a bunch of free features and an optional pro upgrade. - -In addition to Telenet and Mosh support, you also get access to some third-party plugins to extend functionalities. You get to tweak the appearance from a range of available options and easily organize your connections by group. - -Not to forget, you also get IPv6 support. - -If you opt for the pro upgrade, you can integrate with AWS, enable secure sync, automate backups, and more. - -[JuiceSSH][22] - -### 7\. ConnectBot (FOSS) - -![][23] - -If all you wanted is a simple SSH client, ConnectBot should serve you well. - -You can handle simultaneous SSH sessions, create secure tunnels, and get the ability to copy/paste between other applications. - -[ConnectBot][24] - -### Bonus: Access Linux Distro And Commands Without a Rooted Device - -If you do not have a rooted Android phone, nor plan to get it done, you have a unique option that lets you install Linux distros on your smartphone. - -[Andronix][25] (partially open-source). - -You get a wide range of Linux distributions and desktop environment options along with Window Managers. - -The best thing is – you do not need a rooted device to use various Linux commands. You just need your favorite distro installed to do it all. - -In addition to its ease of use, it also offers premium options that give you access to features like offline distro installation and the ability to sync your commands across devices. - -Of course, just because you install a Linux distro does not mean that you can do everything, but it’s still a great option. You can find it in the [Play Store][26] and explore more about it on [GitHub][27]. - -## Wrapping Up - -Accessing the Linux terminal on Android isn’t as simple as choosing a terminal emulator. You will need to check support for commands, and what it can let you do with a rooted/non-rooted device, before you proceed. - -If you want to experiment, any of the options should do a great job. - -What’s your personal favorite? Did we miss listing any of your favorites? Let me know in the comments below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/using-linux-terminal-android/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/online-linux-terminals/ -[2]: https://itsfoss.com/linux-terminal-emulators/ -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/qute-terminal.jpg?resize=800%2C600&ssl=1 -[4]: https://itsfoss.com/linux-command-tricks/ -[5]: https://itsfoss.com/shell-scripting-resources/ -[6]: https://play.google.com/store/apps/details?id=com.ddm.qute&hl=en_IN&gl=US -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/terminal-emulator-old.jpg?resize=800%2C600&ssl=1 -[8]: https://github.com/jackpal/Android-Terminal-Emulator/ -[9]: https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en_IN&gl=US -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/material-terminal.jpg?resize=800%2C600&ssl=1 -[11]: https://play.google.com/store/apps/details?id=yarolegovich.materialterminal&hl=en_IN&gl=US -[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/termux.jpg?resize=800%2C600&ssl=1 -[13]: https://itsfoss.com/nnn-file-browser-linux/ -[14]: https://linuxhandbook.com/ssh-basics/ -[15]: https://github.com/termux/termux-app -[16]: https://f-droid.org/en/packages/com.termux/ -[17]: https://play.google.com/store/apps/details?id=com.termux -[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/termius.jpg?resize=800%2C600&ssl=1 -[19]: https://termius.com/ -[20]: https://play.google.com/store/apps/details?id=com.server.auditor.ssh.client&hl=en_IN&gl=US -[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/juicessh.jpg?resize=800%2C600&ssl=1 -[22]: https://play.google.com/store/apps/details?id=com.sonelli.juicessh&hl=en_IN&gl=US -[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/connectbot-app.jpg?resize=800%2C600&ssl=1 -[24]: https://play.google.com/store/apps/details?id=org.connectbot&hl=en_IN&gl=US -[25]: https://andronix.app/ -[26]: https://play.google.com/store/apps/details?id=studio.com.techriz.andronix -[27]: https://github.com/AndronixApp diff --git a/translated/tech/20220218 Use Linux Terminal on Android Smartphones With These Apps.md b/translated/tech/20220218 Use Linux Terminal on Android Smartphones With These Apps.md new file mode 100644 index 0000000000..0c9ec44446 --- /dev/null +++ b/translated/tech/20220218 Use Linux Terminal on Android Smartphones With These Apps.md @@ -0,0 +1,182 @@ +[#]: subject: "Use Linux Terminal on Android Smartphones With These Apps" +[#]: via: "https://itsfoss.com/using-linux-terminal-android/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +在安卓手机上使用 Linux 终端 +====== + +想练习 Linux 命令吗?你不需要为此而安装一个完整的发行版。 + +有很多 [让你在线使用 Linux 终端的网站][1]。这些网站在桌面上运行良好,但在移动设备上却不适合。 + +别担心。安卓毕竟是基于 Linux 内核的。有几个应用程序可以让你用你的安卓智能手机练习 Linux 命令,或通过 SSH 连接到远程服务器。 + +当然,你不应该指望它能取代你在台式机上使用的常规 [Linux 终端仿真器][2]。在安卓上有相当多的这类应用。 + +为了方便起见,我添加了两个不同的类别,一个涵盖了终端模拟器,另一个是为远程连接功能(SSH)以及终端界面量身定做的。 + +> 非 FOSS 提醒! +> +> 这里提到的一些应用程序不是开源的,它们都做了适当的提示。它们被涵盖在这里是因为它们可以让你在安卓上使用 Linux 终端。 + +### Linux 终端仿真器应用 + +请注意,你需要在你的安卓手机上有 root 权限,才能使用 `ls` 等命令在目录中导航、复制/粘贴、并执行高级操作。 + +**注意:** 对于大多数应用程序/终端,没有 root 权限你将只限于基本的操作,如测试 ping、更新,以及在支持的地方安装包。 + +#### 1、Qute 终端仿真器(非 FOSS) + +![][3] + +[Qute][6] 终端模拟器提供了对你的安卓设备上的内置命令行 Shell 的访问。 + +你可以在你的智能手机上使用常见的命令,如 `ping`、`trace`、`cd`、`mkdir` 等等。除了一些 [有用的 Linux 命令][4] 之外,你还可以安装 bin 文件和创建 [shell 脚本][5]。 + +伴随着 bash 脚本编辑器和对已 root 的设备的支持,它应该是一个令人兴奋的选择,可以尝试。 + +它还提供了启用浅色主题、隐藏键盘、切换语法高亮和其他一些功能。 + +不幸的是,开发者提到,根据谷歌最新的隐私政策,安卓 11 及更新版本存在一些已知的问题。因此,如果没有一个已 root 的设备,你可能做不了什么。 + +#### 2、安卓终端仿真器(FOSS) + +![][7] + +Jack Palevich 的 “[终端仿真器][9]” 是最古老的可用于安卓的 Linux 终端仿真器之一。 + +你可以使用简单的命令、添加多个窗口,并使用启动器的快捷键进行快速操作。 + +它最好的地方是没有任何广告和应用内购买选项,也没有干扰性元素。然而,它已经很久没有被维护了,它的 [GitHub 页面][8] 也在 2020 年被归档,这标志着它的开发已经结束。 + +但即使在目前的状态下,它似乎也对众多用户有用。因此,在否定它之前,你可以试试。 + +#### 3、Material Terminal(非 FOSS) + +![][10] + +[Material Terminal][11] 是 “安卓终端仿真器” 的重新换肤版本。 + +你可以获得相同的功能,有多个窗口、没有广告、基本命令开箱即用,还可以选择在已 root 的设备上安装 Busy Box,以及其他命令行工具。 + +简单的说,就是前一个选项中的一切,加上一个 Material Design 用户界面。很好,对吗? + +### SSH 客户端和 Linux 终端 + +你想要一个能够使用 SSH 连接的安卓终端仿真器吗?或者,也许只是为 SSH 远程连接而定制? + +这里有一些选择: + +#### 4、Termux(FOSS) + +![][12] + +[Termux][17] 是一个相当流行的可用于安卓的终端仿真器。它有一个全面的软件包集合,让你体验 bash 和 zsh。 + +如果你有 root 权限,你还可以 [用 nnn 管理文件][13],并用 `nano`、`vim` 或 `emacs` 来编辑文件。用户界面除了终端外没有其他东西。 + +你还可以 [使用 SSH 访问服务器][14]。除此之外,你还可以用 clang、`make` 和 `gbd` 进行 C 语言开发。当然,这些都取决于你的需要,以及你是否有一个已 root 的设备。 + +你也可以查看它的 [GitHub 页面][15] 来解决发现的问题。截至目前,由于一些技术原因,Play Store 版本的更新已停止了。因此,如果可用的 Play Store 版本不能工作,你可以通过 [F-Droid][16] 安装最新版本。 + +#### 5、Termius(非 FOSS) + +![][18] + +[Termius][20] 是一个 SSH 和 SFTP 的定制客户端,专门用于从安卓设备进行远程访问。 + +通过 Termius,你可以管理 UNIX 和 Linux 系统。Play Store 页面将其描述为一个漂亮的安卓版 Putty 客户端,这一点是正确的。 + +用户界面很容易理解,看起来并不令人困惑。它还支持 Mosh 和 Telnet 协议。 + +当你连接到一个远程设备时,它可以检测到操作系统,如树莓派、Ubuntu、Fedora。你也可以用你的键盘连接到运行这个应用程序的手机上工作。最重要的是,没有任何广告或横幅,使它成为一个完美的远程连接应用程序。 + +它确实提供了可选的高级服务(14 天免费试用),具有更多的功能,如加密的交叉同步、SSH 密钥代理转发、SFTP、终端标签等。你也可以在其 [官方网站][19] 上了解更多关于它的信息。 + +#### 6、JuiceSSH(非 FOSS) + +![][21] + +[JuiceSSH][22] 是另一个流行的 SSH 客户端,有大量免费的功能和一个可选的专业版升级。 + +除了支持 Telnet 和 Mosh 之外,你还可以使用一些第三方插件来扩展功能。你可以从一系列可用的选项中调整外观,并按组轻松组织你的连接。 + +不要忘了,还有 IPv6 支持。 + +如果你选择专业版升级,你可以与 AWS 集成,启用安全同步,自动备份等等。 + +#### 7、ConnectBot(FOSS) + +![][23] + +如果你想要的只是一个简单的 SSH 客户端,[ConnectBot][24] 应该能满足你的需求。 + +你可以管理同时进行的 SSH 会话、创建安全隧道,并获得在其他应用程序之间复制/粘贴的能力。 + +### 赠品:无需 root 设备就能访问 Linux 发行版和命令 + +如果你没有已 root 的安卓手机,也不打算去 root 它,你有一个独特的选择,让你在智能手机上安装 Linux 发行版。 + +- [Andronix][25] (部分开源) + +你可以得到广泛的 Linux 发行版和琳琅满目的桌面环境以及窗口管理器。 + +最重要的是,你不需要一个已 root 的设备来使用各种 Linux 命令。你只需要安装你最喜欢的发行版就可以做到这一切。 + +除了使用方便外,它还提供高级选项,使你能够获得离线发行版安装和跨设备同步命令的能力。 + +当然,你安装了一个 Linux 发行版并不意味着你可以做所有事情,但它仍然是一个很好的选择。你可以在 [Play Store][26] 找到它,并在 [GitHub][27] 上了解关于它的更多信息。 + +## 总结 + +在安卓上访问 Linux 终端并不像选择一个终端模拟器那么简单。你需要检查对命令的支持,以及它能让你在已 root 的、未 root 的设备上做什么,然后再继续。 + +如果你想做实验,任何一个选项都应该做得很好。 + +你的个人最爱是什么?我们是否错过了列出任何你的最爱?请在下面的评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/using-linux-terminal-android/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/online-linux-terminals/ +[2]: https://itsfoss.com/linux-terminal-emulators/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/qute-terminal.jpg?resize=800%2C600&ssl=1 +[4]: https://itsfoss.com/linux-command-tricks/ +[5]: https://itsfoss.com/shell-scripting-resources/ +[6]: https://play.google.com/store/apps/details?id=com.ddm.qute&hl=en_IN&gl=US +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/terminal-emulator-old.jpg?resize=800%2C600&ssl=1 +[8]: https://github.com/jackpal/Android-Terminal-Emulator/ +[9]: https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en_IN&gl=US +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/material-terminal.jpg?resize=800%2C600&ssl=1 +[11]: https://play.google.com/store/apps/details?id=yarolegovich.materialterminal&hl=en_IN&gl=US +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/termux.jpg?resize=800%2C600&ssl=1 +[13]: https://itsfoss.com/nnn-file-browser-linux/ +[14]: https://linuxhandbook.com/ssh-basics/ +[15]: https://github.com/termux/termux-app +[16]: https://f-droid.org/en/packages/com.termux/ +[17]: https://play.google.com/store/apps/details?id=com.termux +[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/termius.jpg?resize=800%2C600&ssl=1 +[19]: https://termius.com/ +[20]: https://play.google.com/store/apps/details?id=com.server.auditor.ssh.client&hl=en_IN&gl=US +[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/juicessh.jpg?resize=800%2C600&ssl=1 +[22]: https://play.google.com/store/apps/details?id=com.sonelli.juicessh&hl=en_IN&gl=US +[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/connectbot-app.jpg?resize=800%2C600&ssl=1 +[24]: https://play.google.com/store/apps/details?id=org.connectbot&hl=en_IN&gl=US +[25]: https://andronix.app/ +[26]: https://play.google.com/store/apps/details?id=studio.com.techriz.andronix +[27]: https://github.com/AndronixApp