diff --git a/published/20180712 An introduction to Go arrays and slices.md b/published/20180712 An introduction to Go arrays and slices.md new file mode 100644 index 0000000000..9dcac9545c --- /dev/null +++ b/published/20180712 An introduction to Go arrays and slices.md @@ -0,0 +1,214 @@ +[#]: subject: "An introduction to Go arrays and slices" +[#]: via: "https://opensource.com/article/18/7/introduction-go-arrays-and-slices" +[#]: author: "Mihalis Tsoukalos https://opensource.com/users/mtsouk" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14665-1.html" + +Go 数组和切片的介绍 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/02/105657zahhco3612vv1bbo.jpg) + +> 了解使用数组和切片在 Go 中存储数据的优缺点,以及为什么其中一个更好。 + +在本系列的第四篇文章中,我将解释 [Go][5] 数组和切片,包括如何使用它们,以及为什么你通常要选择其中一个而不是另一个。 + +### 数组 + +数组是编程语言中最流行的数据结构之一,主要原因有两个:一是简单易懂,二是可以存储许多不同类型的数据。 + +你可以声明一个名为 `anArray` 的 Go 数组,该数组存储四个整数,如下所示: + +``` +anArray := [4]int{-1, 2, 0, -4} +``` + +数组的大小应该在它的类型之前声明,而类型应该在声明元素之前定义。`len()` 函数可以帮助你得到任何数组的长度。上面数组的大小是 4。 + +如果你熟悉其他编程语言,你可能会尝试使用 `for` 循环来遍历数组。Go 当然也支持 `for` 循环,不过,正如你将在下面看到的,Go 的 `range` 关键字可以让你更优雅地遍历数组或切片。 + +最后,你也可以定义一个二维数组,如下: + +``` +twoD := [3][3]int{ + {1, 2, 3}, + {6, 7, 8}, + {10, 11, 12}} +``` + +`arrays.go` 源文件中包含了 Go 数组的示例代码。其中最重要的部分是: + +``` +for i := 0; i < len(twoD); i++ { + k := twoD[i] + for j := 0; j < len(k); j++ { + fmt.Print(k[j], " ") + } + fmt.Println() +} + +for _, a := range twoD { + for _, j := range a { + fmt.Print(j, " ") + } + fmt.Println() +} +``` + +通过上述代码,我们知道了如何使用 `for` 循环和 `range` 关键字迭代数组的元素。`arrays.go` 的其余代码则展示了如何将数组作为参数传递给函数。 + +以下是 `arrays.go` 的输出: + +``` +$ go run arrays.go +Before change(): [-1 2 0 -4] +After change(): [-1 2 0 -4] +1 2 3 +6 7 8 +10 11 12 +1 2 3 +6 7 8 +10 11 12 +``` + +这个输出告诉我们:对函数内的数组所做的更改,会在函数退出后丢失。 + +### 数组的缺点 + +Go 数组有很多缺点,你应该重新考虑是否要在 Go 项目中使用它们。 + +首先,数组定义之后,大小就无法改变,这意味着 Go 数组不是动态的。简而言之,如果你需要将一个元素添加到一个没有剩余空间的数组中,你将需要创建一个更大的数组,并将旧数组的所有元素复制到新数组中。 + +其次,当你将数组作为参数传递给函数时,实际上是传递了数组的副本,这意味着你对函数内部的数组所做的任何更改,都将在函数退出后丢失。 + +最后,将大数组传递给函数可能会很慢,主要是因为 Go 必须创建数组的副本。 + +以上这些问题的解决方案,就是使用 Go 切片。 + +### 切片 + +Go 切片与 Go 数组类似,但是它没有后者的缺点。 + +首先,你可以使用 `append()` 函数将元素添加到现有切片中。此外,Go 切片在内部使用数组实现,这意味着 Go 中每个切片都有一个底层数组。 + +切片具有 `capacity` 属性和 `length` 属性,它们并不总是相同的。切片的长度与元素个数相同的数组的长度相同,可以使用 `len()` 函数得到。切片的容量是当前为切片分配的空间,可以使用 `cap()` 函数得到。 + +由于切片的大小是动态的,如果切片空间不足(也就是说,当你尝试再向切片中添加一个元素时,底层数组的长度恰好与容量相等),Go 会自动将它的当前容量加倍,使其空间能够容纳更多元素,然后将请求的元素添加到底层数组中。 + +此外,切片是通过引用传递给函数的,这意味着实际传递给函数的是切片变量的内存地址,这样一来,你对函数内部的切片所做的任何修改,都不会在函数退出后丢失。因此,将大切片传递给函数,要比将具有相同数量元素的数组传递给同一函数快得多。这是因为 Go 不必拷贝切片 —— 它只需传递切片变量的内存地址。 + +`slice.go` 源文件中有 Go 切片的代码示例,其中包含以下代码: + +``` +package main + +import ( + "fmt" +) + +func negative(x []int) { + for i, k := range x { + x[i] = -k + } +} + +func printSlice(x []int) { + for _, number := range x { + fmt.Printf("%d ", number) + } + fmt.Println() +} + +func main() { + s := []int{0, 14, 5, 0, 7, 19} + printSlice(s) + negative(s) + printSlice(s) + + fmt.Printf("Before. Cap: %d, length: %d\n", cap(s), len(s)) + s = append(s, -100) + fmt.Printf("After. Cap: %d, length: %d\n", cap(s), len(s)) + printSlice(s) + + anotherSlice := make([]int, 4) + fmt.Printf("A new slice with 4 elements: ") + printSlice(anotherSlice) +} +``` + +切片和数组在定义方式上的最大区别就在于:你不需要指定切片的大小。实际上,切片的大小取决于你要放入其中的元素数量。此外,`append()` 函数允许你将元素添加到现有切片 —— 请注意,即使切片的容量允许你将元素添加到该切片,它的长度也不会被修改,除非你调用 `append()`。上述代码中的 `printSlice()` 函数是一个辅助函数,用于打印切片中的所有元素,而 `negative()` 函数将切片中的每个元素都变为各自的相反数。 + +运行 `slice.go` 将得到以下输出: + +``` +$ go run slice.go +0 14 5 0 7 19 +0 -14 -5 0 -7 -19 +Before. Cap: 6, length: 6 +After. Cap: 12, length: 7 +0 -14 -5 0 -7 -19 -100 +A new slice with 4 elements: 0 0 0 0 +``` + +请注意,当你创建一个新切片,并为给定数量的元素分配内存空间时,Go 会自动地将所有元素都初始化为其类型的零值,在本例中为 0(`int` 类型的零值)。 + +### 使用切片来引用数组 + +Go 允许你使用 `[:]` 语法,使用切片来引用现有的数组。在这种情况下,你对切片所做的任何更改都将传播到数组中 —— 详见 `refArray.go`。请记住,使用 `[:]` 不会创建数组的副本,它只是对数组的引用。 + +`refArray.go` 中最有趣的部分是: + +``` +func main() { + anArray := [5]int{-1, 2, -3, 4, -5} + refAnArray := anArray[:] + + fmt.Println("Array:", anArray) + printSlice(refAnArray) + negative(refAnArray) + fmt.Println("Array:", anArray) +} +``` + +运行 `refArray.go`,输出如下: + +``` +$ go run refArray.go +Array: [-1 2 -3 4 -5] +-1 2 -3 4 -5 +Array: [1 -2 3 -4 5] +``` + +我们可以发现:对 `anArray` 数组的切片引用进行了操作后,它本身也被改变了。 + +### 总结 + +尽管 Go 提供了数组和切片两种类型,你很可能还是会使用切片,因为它们比 Go 数组更加通用、强大。只有少数情况需要使用数组而不是切片,特别是当你完全确定元素的数量固定不变时。 + +你可以在 [GitHub][6] 上找到 `arrays.go`、`slice.go` 和 `refArray.go` 的源代码。 + +如果你有任何问题或反馈,请在下方发表评论或在 [Twitter][7] 上与我联系。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/7/introduction-go-arrays-and-slices + +作者:[Mihalis Tsoukalos][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mtsouk +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/traffic-light-go.png +[2]: https://opensource.com/article/18/5/creating-random-secure-passwords-go +[3]: https://opensource.com/article/18/5/building-concurrent-tcp-server-go +[4]: https://opensource.com/article/18/6/copying-files-go +[5]: https://golang.org/ +[6]: https://github.com/mactsouk/opensource.com +[7]: https://twitter.com/mactsouk diff --git a/published/20210115 Learn awk by coding a -guess the number- game.md b/published/20210115 Learn awk by coding a -guess the number- game.md new file mode 100644 index 0000000000..24738ff4be --- /dev/null +++ b/published/20210115 Learn awk by coding a -guess the number- game.md @@ -0,0 +1,200 @@ +[#]: collector: (lujun9972) +[#]: translator: (FYJNEVERFOLLOWS) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14668-1.html) +[#]: subject: (Learn awk by coding a "guess the number" game) +[#]: via: (https://opensource.com/article/21/1/learn-awk) +[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen) + +通过编写“猜数字”游戏来学习 Awk +====== + +> 编程语言往往具有许多共同特征。学习一门新语言的好方法是去写一个熟悉的程序。在本文中,我将会使用 Awk 编写一个“猜数字”程序来展示熟悉的概念。 + +![](https://img.linux.net.cn/data/attachment/album/202206/03/130545jthh1vtoadahwahd.jpg) + +当你学习一门新的编程语言时,最好把重点放在大多数编程语言都有的共同点上: + + * 变量 —— 存储信息的地方 + * 表达式 —— 计算的方法 + * 语句 —— 在程序中表示状态变化的方法 + +这些概念是大多是编程语言的基础。 + +一旦你理解了这些概念,你就可以开始把其他的弄清楚。例如,大多数语言都有由其设计所支持的“处理方式”,这些方式在不同语言之间可能有很大的不同。这些方法包括模块化(将相关功能分组在一起)、声明式与命令式、面向对象、低级与高级语法特性等等。许多程序员比较熟悉的是编程“仪式”,即,在处理问题之前设置场景所需花费的工作。据说 Java 编程语言有一个源于其设计的重要仪式要求,就是所有代码都在一个类中定义。 + +但从根本上讲,编程语言通常有相似之处。一旦你掌握了一种编程语言,就可以从学习另一种语言的基本知识开始,品味这种新语言的不同之处。 + +一个好方法是创建一组基本的测试程序。有了这些,就可以从这些相似之处开始学习。 + +你可以选择创建的一个测试程序是“猜数字”程序。电脑从 1 到 100 之间选择一个数字,让你猜这个数字。程序一直循环,直到你猜对为止。 + +“猜数字”程序练习了编程语言中的几个概念: + + * 变量 + * 输入 + * 输出 + * 条件判断 + * 循环 + +这是学习一门新的编程语言的一个很好的实践实验。 + +**注**:本文改编自 Moshe Zadka 在 [Julia][2] 中使用这种方法和 Jim Hall在 [Bash][3] 中使用这种方法的文章。 + +### 在 awk 程序中猜数 + +让我们编写一个实现“猜数字”游戏的 Awk 程序。 + +Awk 是动态类型的,这是一种面向数据转换的脚本语言,并且对交互使用有着令人惊讶的良好支持。Awk 出现于 20 世纪 70 年代,最初是 Unix 操作系统的一部分。如果你不了解 Awk,但是喜欢电子表格,这就是一个你可以 [去学习 Awk][4] 的信号! + +您可以通过编写一个“猜数字”游戏版本来开始对 Awk 的探索。 + +以下是我的实现(带有行号,以便我们可以查看一些特定功能): + +``` +     1    BEGIN { +     2        srand(42) +     3        randomNumber = int(rand() * 100) + 1 +     4        print "random number is",randomNumber +     5        printf "guess a number between 1 and 100\n" +     6    } +     7    { +     8        guess = int($0) +     9        if (guess < randomNumber) { +    10            printf "too low, try again:" +    11        } else if (guess > randomNumber) { +    12            printf "too high, try again:" +    13        } else { +    14            printf "that's right\n" +    15            exit +    16        } +    17    } +``` + +我们可以立即看到 Awk 控制结构与 C 或 Java 的相似之处,但与 Python 不同。 +在像 `if-then-else`、`while` 这样的语句中,`then`、`else` 和 `while` 部分接受一个语句或一组被 `{` 和 `}` 包围的语句。然而,Awk 有一个很大的区别需要从一开始就了解: + +根据设计,Awk 是围绕数据管道构建的。 + +这是什么意思呢?大多数 Awk 程序都是一些代码片段,它们接收一行输入,对数据做一些处理,然后将其写入输出。认识到这种转换管道的需要,Awk 默认情况下提供了所有的转换管道。让我们通过关于上面程序的一个基本问题来探索:“从控制台读取数据”的结构在哪里? + +答案是——“内置的”。特别的,第 7-17 行告诉 Awk 如何处理被读取的每一行。在这种情况下,很容易看到第 1-6 行是在读取任何内容之前被执行的。 + +更具体地说,第 1 行上的 `BEGIN` 关键字是一种“模式”,在本例中,它指示 Awk 在读取任何数据之前,应该先执行 `{ ... }` 中 `BEGIN` 后面的内容。另一个类似的关键字 `END`,在这个程序中没有被使用,它指示 Awk 在读取完所有内容后要做什么。 + +回到第 7-17 行,我们看到它们创建了一个类似代码块 `{ ... }` 的片段,但前面没有关键字。因为在 `{` 之前没有任何东西可以让 Awk 匹配,所以它将把这一行用于接收每一行输入。每一行的输入都将由用户输入作为猜测。 + +让我们看看正在执行的代码。首先,是在读取任何输入之前发生的序言部分。 + +在第 2 行,我们用数字 42 初始化随机数生成器(如果不提供参数,则使用系统时钟)。为什么要用 42?[当然要选 42!][5] 第 3 行计算 1 到 100 之间的随机数,第 4 行输出该随机数以供调试使用。第 5 行邀请用户猜一个数字。注意这一行使用的是 `printf`,而不是 `print`。和 C 语言一样,`printf` 的第一个参数是一个用于格式化输出的模板。 + +既然用户知道程序需要输入,她就可以在控制台上键入猜测。如前所述,Awk 将这种猜测提供给第 7-17 行的代码。第 18 行将输入记录转换为整数;`$0` 表示整个输入记录,而 `$1` 表示输入记录的第一个字段,`$2` 表示第二个字段,以此类推。是的,Awk 使用预定义的分隔符(默认为空格)将输入行分割为组成字段。第 9-15 行将猜测结果与随机数进行比较,打印适当的响应。如果猜对了,第 15 行就会从输入行处理管道中提前退出。 + +就这么简单! + +考虑到 Awk 程序不同寻常的结构,代码片段会对特定的输入行配置做出反应,并处理数据,让我们看看另一种结构,看看过滤部分是如何工作的: + +``` +     1    BEGIN { +     2        srand(42) +     3        randomNumber = int(rand() * 100) + 1 +     4        print "random number is",randomNumber +     5        printf "guess a number between 1 and 100\n" +     6    } +     7    int($0) < randomNumber { +     8        printf "too low, try again: " +     9    } +    10    int($0) > randomNumber { +    11        printf "too high, try again: " +    12    } +    13    int($0) == randomNumber { +    14        printf "that's right\n" +    15        exit +    16    } +``` + +第 1–6 行代码没有改变。但是现在我们看到第 7-9 行是当输入整数值小于随机数时执行的代码,第 10-12 行是当输入整数值大于随机数时执行的代码,第 13-16 行是两者相等时执行的代码。 + +这看起来“很酷但很奇怪” —— 例如,为什么我们会重复计算 `int($0)`?可以肯定的是,用这种方法来解决问题会很奇怪。但这些模式确实是分离条件处理的非常好的方式,因为它们可以使用正则表达式或 Awk 支持的任何其他结构。 + +为了完整起见,我们可以使用这些模式将普通的计算与只适用于特定环境的计算分离开来。下面是第三个版本: + +``` +     1    BEGIN { +     2        srand(42) +     3        randomNumber = int(rand() * 100) + 1 +     4        print "random number is",randomNumber +     5        printf "guess a number between 1 and 100\n" +     6    } +     7    { +     8        guess = int($0) +     9    } +    10    guess < randomNumber { +    11        printf "too low, try again: " +    12    } +    13    guess > randomNumber { +    14        printf "too high, try again: " +    15    } +    16    guess == randomNumber { +    17        printf "that's right\n" +    18        exit +    19    } +``` + +认识到这一点,无论输入的是什么值,都需要将其转换为整数,因此我们创建了第 7-9 行来完成这一任务。现在第 10-12、13-15 和 16-19 行这三组代码,都是指已经定义好的变量 guess,而不是每次都对输入行进行转换。 + +让我们回到我们想要学习的东西列表: + + * 变量 —— 是的,Awk 有这些;我们可以推断出,输入数据以字符串形式输入,但在需要时可以转换为数值 + * 输入 —— Awk 只是通过它的“数据转换管道”的方式发送输入来读取数据 + * 输出 —— 我们已经使用了 Awk 的 `print` 和 `printf` 函数来将内容写入输出 + * 条件判断 —— 我们已经学习了 Awk 的 `if-then-else` 和对应特定输入行配置的输入过滤器 + * 循环 —— 嗯,想象一下!我们在这里不需要循环,这还是多亏了 Awk 采用的“数据转换管道”方法;循环“就这么发生了”。注意,用户可以通过向 Awk 发送一个文件结束信号(当使用 Linux 终端窗口时可通过快捷键 `CTRL-D`)来提前退出管道。 + +不需要循环来处理输入的重要性是非常值得的。Awk 能够长期保持存在的一个原因是 Awk 程序是紧凑的,而它们紧凑的一个原因是不需要从控制台或文件中读取的那些格式代码。 + +让我们运行下面这个程序: + +``` +$ awk -f guess.awk +random number is 25 +guess a number between 1 and 100: 50 +too high, try again: 30 +too high, try again: 10 +too low, try again: 25 +that's right +$ +``` + +我们没有涉及的一件事是注释。Awk 注释以 `#` 开头,以行尾结束。 + +### 总结 + +Awk 非常强大,这种“猜数字”游戏是入门的好方法。但这不应该是你探索 Awk 的终点。你可以看看 [Awk 和 Gawk(GNU Awk)的历史][6],Gawk 是 Awk 的扩展版本,如果你在电脑上运行 Linux,可能会有这个。或者,从它的原始开发者那里阅读关于 [最初版本][7] 的各种信息。 + +你还可以 [下载我们的备忘单][8] 来帮你记录下你所学的一切。 + +> **[Awk 备忘单][8]** + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/1/learn-awk + +作者:[Chris Hermansen][a] +选题:[lujun9972][b] +译者:[FYJNEVERFOLLOWS](https://github.com/FYJNEVERFOLLOWS) +校对:[wxy](https://github.com/wxy) + +本文由 [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/question-mark_chalkboard.jpg?itok=DaG4tje9 (question mark in chalk) +[2]: https://opensource.com/article/20/12/julia +[3]: https://opensource.com/article/20/12/learn-bash +[4]: https://opensource.com/article/20/9/awk-ebook +[5]: https://en.wikipedia.org/wiki/42_(number)#The_Hitchhiker's_Guide_to_the_Galaxy +[6]: https://www.gnu.org/software/gawk/manual/html_node/History.html +[7]: https://archive.org/details/pdfy-MgN0H1joIoDVoIC7 +[8]: https://opensource.com/downloads/cheat-sheet-awk-features diff --git a/published/202205/20180523 Creating random, secure passwords in Go.md b/published/202205/20180523 Creating random, secure passwords in Go.md new file mode 100644 index 0000000000..e472554850 --- /dev/null +++ b/published/202205/20180523 Creating random, secure passwords in Go.md @@ -0,0 +1,124 @@ +[#]: subject: "Creating random, secure passwords in Go" +[#]: via: "https://opensource.com/article/18/5/creating-random-secure-passwords-go" +[#]: author: "Mihalis Tsoukalos https://opensource.com/users/mtsouk" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14621-1.html" + +在 Go 中生成随机的安全密码 +====== + +> Go 的随机数生成器是生成难以猜测的密码的好方法。 + +![](https://img.linux.net.cn/data/attachment/album/202205/21/152534k13a1wly39fuywu2.jpg) + +你可以使用 [Go 编程语言][2] 提供的随机数生成器来生成由 ASCII 字符组成的难以猜测的密码。尽管本文中提供的代码很容易阅读,但是你仍需要了解 Go 的基础知识,才能更好地理解它。如果你是对 Go 还不熟悉,请阅读 [Go 语言之旅][3] 来了解更多信息,然后返回此处。 + +在介绍实用程序和它的代码之前,让我们先来看看这个 ASCII 表的子集,它可以在 `man ascii` 命令的输出中找到: + +``` +30 40 50 60 70 80 90 100 110 120 + --------------------------------- +0:    (  2  <  F  P  Z  d   n   x +1:    )  3  =  G  Q  [  e   o   y +2:    *  4  >  H  R  \  f   p   z +3: !  +  5  ?  I  S  ]  g   q   { +4: "  ,  6  @  J  T  ^  h   r   | +5: #  -  7  A  K  U  _  i   s   } +6: $  .  8  B  L  V  `  j   t   ~ +7: %  /  9  C  M  W  a  k   u  DEL +8: &  0  :  D  N  X  b  l   v +9: '  1  ;  E  O  Y  c  m   w +``` + +在所有 ASCII 字符中,可打印字符的十进制值范围为 33 到 126,其他的 ASCII 值都不适合用于密码。因此,本文介绍的实用程序将生成该范围内的 ASCII 字符。 + +### 生成随机整数 + +第一个实用程序名为 `random.go`,它生成指定数量的随机整数,这些整数位于给定范围内。`random.go` 最重要的部分是这个函数: + +``` +func random(min, max int) int { + return rand.Intn(max-min) + min +} +``` + +此函数使用了 `rand.Intn()` 函数来生成一个属于给定范围的随机整数。请注意,`rand.Intn()` 返回一个属于 `[0,n)` 的非负随机整数。如果它的参数是一个负数,这个函数将会抛出异常,异常消息是:`panic: invalid argument to Intn`。你可以在 [math/rand 文档][4] 中找到 `math/rand` 包的使用说明。 + +`random.go` 实用程序接受三个命令行参数:生成的整数的最小值、最大值和个数。 + +编译和执行 `random.go` 会产生这样的输出: + +``` +$ go build random.go +$ ./random +Usage: ./random MIX MAX TOTAL +$ ./random 1 3 10 +2 2 1 2 2 1 1 2 2 1 +``` + +如果你希望在 Go 中生成更安全的随机数,请使用 Go 库中的 `crypto/rand` 包。 + +### 生成随机密码 + +第二个实用程序 `randomPass.go` 用于生成随机密码。`randomPass.go` 使用 `random()` 函数来生成随机整数,它们随后被以下 Go 代码转换为 ASCII 字符: + +``` +for { + myRand := random(MIN, MAX) + newChar := string(startChar[0] + byte(myRand)) + fmt.Print(newChar) + if i == LENGTH { + break + } + i++ +} +``` + +`MIN` 的值为 `0`,`MAX` 的值为 `94`,而 `startChar` 的值为 `!`,它是 ASCII 表中第一个可打印的字符(十进制 ASCII 码为 `33`)。因此,所有生成的 ASCII 字符都位于 `!` 和 `~` 之间,后者的十进制 ASCII 码为 `126`。 + +因此,生成的每个随机数都大于 `MIN`,小于 `MAX`,并转换为 ASCII 字符。该过程继续进行,直到生成的密码达到指定的长度。 + +`randomPass.go` 实用程序接受单个(可选)命令行参数,以定义生成密码的长度,默认值为 8,这是一个非常常见的密码长度。执行 `randomPass.go` 会得到类似下面的输出: + +``` +$ go run randomPass.go 1 +Z +$ go run randomPass.go 10 +#Cw^a#IwkT +$ go run randomPass.go +Using default values! +[PP8@'Ci +``` + +最后一个细节:不要忘记调用 `rand.Seed()`,并提供一个种子seed值,以初始化随机数生成器。如果你始终使用相同的种子值,随机数生成器将生成相同的随机整数序列。 + +![随机数生成代码][5] + +你可以在 [GitHub][6] 找到 `random.go` 和 `randomPass.go` 的源码。你也可以直接在 [play.golang.org][7] 上执行它们。 + +我希望这篇文章对你有所帮助。如有任何问题,请在下方发表评论或在 [Twitter][8] 上与我联系。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/5/creating-random-secure-passwords-go + +作者:[Mihalis Tsoukalos][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mtsouk +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/laptop-password.jpg +[2]: https://golang.org/ +[3]: https://tour.golang.org/welcome/1 +[4]: https://golang.org/pkg/math/rand/ +[5]: https://opensource.com/sites/default/files/styles/panopoly_image_original/public/uploads/random.png?itok=DG0QPUGX +[6]: https://github.com/mactsouk/opensource.com +[7]: https://play.golang.org/ +[8]: https://twitter.com/mactsouk diff --git a/published/202205/20180529 Build a concurrent TCP server in Go.md b/published/202205/20180529 Build a concurrent TCP server in Go.md new file mode 100644 index 0000000000..8cd93bf002 --- /dev/null +++ b/published/202205/20180529 Build a concurrent TCP server in Go.md @@ -0,0 +1,153 @@ +[#]: subject: "Build a concurrent TCP server in Go" +[#]: via: "https://opensource.com/article/18/5/building-concurrent-tcp-server-go" +[#]: author: "Mihalis Tsoukalos https://opensource.com/users/mtsouk" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14623-1.html" + +在 Go 中实现一个支持并发的 TCP 服务端 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/22/115536nkfuuf4dklgg7fsx.jpg) + +> 仅用大约 65 行代码,开发一个用于生成随机数、支持并发的 TCP 服务端。 + +TCP 和 UDP 服务端随处可见,它们基于 TCP/IP 协议栈,通过网络为客户端提供服务。在这篇文章中,我将介绍如何使用 [Go 语言][2] 开发一个用于返回随机数、支持并发的 TCP 服务端。对于每一个来自 TCP 客户端的连接,它都会启动一个新的 goroutine(轻量级线程)来处理相应的请求。 + +你可以在 GitHub 上找到本项目的源码:[concTcp.go][3]。 + +### 处理 TCP 连接 + +这个程序的主要逻辑在 `handleConnection()` 函数中,具体实现如下: + +``` +func handleConnection(c net.Conn) { +        fmt.Printf("Serving %s\n", c.RemoteAddr().String()) +        for { +                netData, err := bufio.NewReader(c).ReadString('\n') +                if err != nil { +                        fmt.Println(err) +                        return +                } + +                temp := strings.TrimSpace(string(netData)) +                if temp == "STOP" { +                        break +                } + +                result := strconv.Itoa(random()) + "\n" +                c.Write([]byte(string(result))) +        } +        c.Close() +} +``` + +如果 TCP 客户端发送了一个 “STOP” 字符串,为它提供服务的 goroutine 就会终止;否则,TCP 服务端就会返回一个随机数给它。只要客户端不主动终止,服务端就会一直提供服务,这是由 `for` 循环保证的。具体来说,`for` 循环中的代码使用了 `bufio.NewReader(c).ReadString('\n')` 来逐行读取客户端发来的数据,并使用 `c.Write([]byte(string(result)))` 来返回数据(生成的随机数)。你可以在 Go 的 net 标准包 [文档][4] 中了解更多。 + + +### 支持并发 + +在 `main()` 函数的实现部分,每当 TCP 服务端收到 TCP 客户端的连接请求,它都会启动一个新的 goroutine 来为这个请求提供服务。 + +``` +func main() { +        arguments := os.Args +        if len(arguments) == 1 { +                fmt.Println("Please provide a port number!") +                return +        } + +        PORT := ":" + arguments[1] +        l, err := net.Listen("tcp4", PORT) +        if err != nil { +                fmt.Println(err) +                return +        } +        defer l.Close() +        rand.Seed(time.Now().Unix()) + +        for { +                c, err := l.Accept() +                if err != nil { +                        fmt.Println(err) +                        return +                } +                go handleConnection(c) +        } +} +``` + +首先,`main()` 确保程序至少有一个命令行参数。注意,现有代码并没有检查这个参数是否为有效的 TCP 端口号。不过,如果它是一个无效的 TCP 端口号,`net.Listen()` 就会调用失败,并返回一个错误信息,类似下面这样: + +``` +$ go run concTCP.go 12a +listen tcp4: lookup tcp4/12a: nodename nor servname provided, or not known +$ go run concTCP.go -10 +listen tcp4: address -10: invalid port +``` + +`net.Listen()` 函数用于告诉 Go 接受网络连接,因而承担了服务端的角色。它的返回值类型是 `net.Conn`,后者实现了 `io.Reader` 和 `io.Writer` 接口。此外,`main()` 函数中还调用了 `rand.Seed()` 函数,用于初始化随机数生成器。最后,`for` 循环允许程序一直使用 `Accept()` 函数来接受 TCP 客户端的连接请求,并以 goroutine 的方式来运行 `handleConnection(c)` 函数,处理客户端的后续请求。 + +### net.Listen() 的第一个参数 + +`net.Listen()` 函数的第一个参数定义了使用的网络类型,而第二个参数定义了服务端监听的地址和端口号。第一个参数的有效值为 `tcp`、`tcp4`、`tcp6`、`udp`、`udp4`、`udp6`、`ip`、`ip4`、`ip6`、`Unix`(Unix 套接字)、`Unixgram` 和 `Unixpacket`,其中:`tcp4`、`udp4` 和 `ip4` 只接受 IPv4 地址,而 `tcp6`、`udp6` 和 `ip6` 只接受 IPv6 地址。 + +### 服务端并发测试 + +`concTCP.go` 需要一个命令行参数,来指定监听的端口号。当它开始服务 TCP 客户端时,你会得到类似下面的输出: + +``` +$ go run concTCP.go 8001 +Serving 127.0.0.1:62554 +Serving 127.0.0.1:62556 +``` + +`netstat` 的输出可以确认 `congTCP.go` 正在为多个 TCP 客户端提供服务,并且仍在继续监听建立连接的请求: + +``` +$ netstat -anp TCP | grep 8001 +tcp4       0      0  127.0.0.1.8001         127.0.0.1.62556        ESTABLISHED +tcp4       0      0  127.0.0.1.62556        127.0.0.1.8001         ESTABLISHED +tcp4       0      0  127.0.0.1.8001         127.0.0.1.62554        ESTABLISHED +tcp4       0      0  127.0.0.1.62554        127.0.0.1.8001         ESTABLISHED +tcp4       0      0  *.8001                 *.*                    LISTEN +``` + +在上面输出中,最后一行显示了有一个进程正在监听 8001 端口,这意味着你可以继续连接 TCP 的 8001 端口。第一行和第二行显示了有一个已建立的 TCP 网络连接,它占用了 8001 和 62556 端口。相似地,第三行和第四行显示了有另一个已建立的 TCP 连接,它占用了 8001 和 62554 端口。 + +下面这张图片显示了 `concTCP.go` 在服务多个 TCP 客户端时的输出: + +![concTCP.go TCP 服务端测试][5] + +类似地,下面这张图片显示了两个 TCP 客户端的输出(使用了 `nc` 工具): + +![是用 nc 工具作为 concTCP.go 的 TCP 客户端][6] + +你可以在 [维基百科][7] 上找到更多关于 `nc`(即 `netcat`)的信息。 + +### 总结 + +现在,你学会了如何用大约 65 行 Go 代码来开发一个生成随机数、支持并发的 TCP 服务端,这真是太棒了!如果你想要让你的 TCP 服务端执行别的任务,只需要修改 `handleConnection()` 函数即可。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/5/building-concurrent-tcp-server-go + +作者:[Mihalis Tsoukalos][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mtsouk +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/go-golang.png +[2]: https://golang.org/ +[3]: https://github.com/mactsouk/opensource.com +[4]: https://golang.org/pkg/net/ +[5]: https://opensource.com/sites/default/files/uploads/tcp-in-go_server.png +[6]: https://opensource.com/sites/default/files/uploads/tcp-in-go_client.png +[7]: https://en.wikipedia.org/wiki/Netcat diff --git a/published/202205/20180625 3 ways to copy files in Go.md b/published/202205/20180625 3 ways to copy files in Go.md new file mode 100644 index 0000000000..7a6d0a1647 --- /dev/null +++ b/published/202205/20180625 3 ways to copy files in Go.md @@ -0,0 +1,216 @@ +[#]: subject: "3 ways to copy files in Go" +[#]: via: "https://opensource.com/article/18/6/copying-files-go" +[#]: author: "Mihalis Tsoukalos https://opensource.com/users/mtsouk" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14658-1.html" + +在 Go 中复制文件的三种方法 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/31/153413kcrth9v8c93r5u8e.jpg) + +> 本文是 Go 系列的第三篇文章,我将介绍三种最流行的复制文件的方法。 + +本文将介绍展示如何使用 [Go 编程语言][3] 来复制文件。在 Go 中复制文件的方法有很多,我只介绍三种最常见的:使用 Go 库中的 `io.Copy()` 函数调用、一次读取输入文件并将其写入另一个文件,以及使用缓冲区一块块地复制文件。 + +### 方法一:使用 io.Copy() + +第一种方法就是使用 Go 标准库的 `io.Copy()` 函数。你可以在 `copy()` 函数的代码中找到它的实现逻辑,如下所示: + +``` +func copy(src, dst string) (int64, error) { + sourceFileStat, err := os.Stat(src) + if err != nil { + return 0, err + } + + if !sourceFileStat.Mode().IsRegular() { + return 0, fmt.Errorf("%s is not a regular file", src) + } + + source, err := os.Open(src) + if err != nil { + return 0, err + } + defer source.Close() + + destination, err := os.Create(dst) + if err != nil { + return 0, err + } + defer destination.Close() + nBytes, err := io.Copy(destination, source) + return nBytes, err + } +``` + +首先,上述代码做了两个判断,以便确定它可以被打开读取:一是判断将要复制的文件是否存在(`os.Stat(src)`),二是判断它是否为常规文件(`sourceFileStat.Mode().IsRegular()`)。剩下的所有工作都由 `io.Copy(destination, source)` 这行代码来完成。`io.Copy()` 函数执行结束后,会返回复制的字节数和复制过程中发生的第一条错误消息。在 Go 中,如果没有错误消息,错误变量的值就为 `nil`。 + +你可以在 [io 包][4] 的文档页面了解有关 `io.Copy()` 函数的更多信息。 + +运行 `cp1.go` 将产生以下输出: + +``` +$ go run cp1.go +Please provide two command line arguments! +$ go run cp1.go fileCP.txt /tmp/fileCPCOPY +Copied 3826 bytes! +$ diff fileCP.txt /tmp/fileCPCOPY +``` + +这个方法已经非常简单了,不过它没有为开发者提供灵活性。这并不总是一件坏事,但是,有些时候,开发者可能会需要/想要告诉程序该如何读取文件。 + +### 方法二:使用 ioutil.WriteFile() 和 ioutil.ReadFile() + +复制文件的第二种方法是使用 `ioutil.ReadFile()` 和 `ioutil.WriteFile()` 函数。第一个函数用于将整个文件的内容,一次性地读入到某个内存中的字节切片里;第二个函数则用于将字节切片的内容写入到一个磁盘文件中。 + +实现代码如下: + +``` +input, err := ioutil.ReadFile(sourceFile) +if err != nil { + fmt.Println(err) + return +} + +err = ioutil.WriteFile(destinationFile, input, 0644) +if err != nil { + fmt.Println("Error creating", destinationFile) + fmt.Println(err) + return +} +``` + +上述代码包括了两个 `if` 代码块(嗯,用 Go 写程序就是这样的),程序的实际功能其实体现在 `ioutil.ReadFile()` 和 `ioutil.WriteFile()` 这两行代码中。 + +运行 `cp2.go`,你会得到下面的输出: + +``` +$ go run cp2.go +Please provide two command line arguments! +$ go run cp2.go fileCP.txt /tmp/copyFileCP +$ diff fileCP.txt /tmp/copyFileCP +``` + +请注意,虽然这种方法能够实现文件复制,但它在复制大文件时的效率可能不高。这是因为当文件很大时,`ioutil.ReadFile()` 返回的字节切片会很大。 + +### 方法三:使用 os.Read() 和 os.Write() + +在 Go 中复制文件的第三种方法就是下面要介绍的 `cp3.go`。它接受三个参数:输入文件名、输出文件名和缓冲区大小。 + +`cp3.go` 最重要的部分位于以下 `for` 循环中,你可以在 `copy()` 函数中找到它,如下所示: + +``` +buf := make([]byte, BUFFERSIZE) +for { + n, err := source.Read(buf) + if err != nil && err != io.EOF { + return err + } + if n == 0 { + break + } + + if _, err := destination.Write(buf[:n]); err != nil { + return err + } +} +``` + +该方法使用 `os.Read()` 将输入文件的一小部分读入名为 `buf` 的缓冲区,然后使用 `os.Write()` 将该缓冲区的内容写入文件。当读取出错或到达文件末尾(`io.EOF`)时,复制过程将停止。 + +运行 `cp3.go`,你会得到下面的输出: + +``` +$ go run cp3.go +usage: cp3 source destination BUFFERSIZE +$ go run cp3.go fileCP.txt /tmp/buf10 10 +Copying fileCP.txt to /tmp/buf10 +$ go run cp3.go fileCP.txt /tmp/buf20 20 +Copying fileCP.txt to /tmp/buf20 +``` + +在接下来的基准测试中,你会发现,缓冲区的大小极大地影响了 `cp3.go` 的性能。 + +### 运行基准测试 + +在本文的最后一部分,我将尝试比较这三个程序以及 `cp3.go` 在不同缓冲区大小下的性能(使用 `time(1)` 命令行工具)。 + +以下输出显示了复制 500MB 大小的文件时,`cp1.go`、`cp2.go` 和 `cp3.go` 的性能对比: + +``` +$ ls -l INPUT +-rw-r--r--  1 mtsouk  staff  512000000 Jun  5 09:39 INPUT +$ time go run cp1.go INPUT /tmp/cp1 +Copied 512000000 bytes! + +real    0m0.980s +user    0m0.219s +sys     0m0.719s +$ time go run cp2.go INPUT /tmp/cp2 + +real    0m1.139s +user    0m0.196s +sys     0m0.654s +$ time go run cp3.go INPUT /tmp/cp3 1000000 +Copying INPUT to /tmp/cp3 + +real    0m1.025s +user    0m0.195s +sys     0m0.486s +``` + +我们可以看出,这三个程序的性能非常接近,这意味着 Go 标准库函数的实现非常聪明、经过了充分优化。 + +现在,让我们测试一下缓冲区大小对 `cp3.go` 的性能有什么影响吧!执行 `cp3.go`,并分别指定缓冲区大小为 10、20 和 1000 字节,在一台运行很快的机器上复制 500MB 文件,得到的结果如下: + +``` +$ ls -l INPUT +-rw-r--r--  1 mtsouk  staff  512000000 Jun  5 09:39 INPUT +$ time go run cp3.go INPUT /tmp/buf10 10 +Copying INPUT to /tmp/buf10 + +real    6m39.721s +user    1m18.457s +sys 5m19.186s +$ time go run cp3.go INPUT /tmp/buf20 20 +Copying INPUT to /tmp/buf20 + +real    3m20.819s +user    0m39.444s +sys 2m40.380s +$ time go run cp3.go INPUT /tmp/buf1000 1000 +Copying INPUT to /tmp/buf1000 + +real    0m4.916s +user    0m1.001s +sys     0m3.986s +``` + +我们可以发现,缓冲区越大,`cp3.go` 运行得就越快,这或多或少是符合预期的。此外,使用小于 20 字节的缓冲区来复制大文件会非常缓慢,应该避免。 + +你可以在 [GitHub][5] 找到 `cp1.go`、`cp2.go` 和 `cp3.go` 的 Go 代码。 + +如果你有任何问题或反馈,请在(原文)下方发表评论或在 [Twitter][6] 上与我(原作者)联系。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/6/copying-files-go + +作者:[Mihalis Tsoukalos][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mtsouk +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/LIFE_cat.png +[3]: https://golang.org/ +[4]: https://golang.org/pkg/io/ +[5]: https://github.com/mactsouk/opensource.com +[6]: https://twitter.com/mactsouk diff --git a/published/20190404 Why you should choose mindfulness over multitasking.md b/published/202205/20190404 Why you should choose mindfulness over multitasking.md similarity index 100% rename from published/20190404 Why you should choose mindfulness over multitasking.md rename to published/202205/20190404 Why you should choose mindfulness over multitasking.md diff --git a/published/20200303 Watching activity on Linux with watch and tail commands.md b/published/202205/20200303 Watching activity on Linux with watch and tail commands.md similarity index 100% rename from published/20200303 Watching activity on Linux with watch and tail commands.md rename to published/202205/20200303 Watching activity on Linux with watch and tail commands.md diff --git a/translated/talk/20200807 A Beginner-s Guide to Open Source.md b/published/202205/20200807 A Beginner-s Guide to Open Source.md similarity index 81% rename from translated/talk/20200807 A Beginner-s Guide to Open Source.md rename to published/202205/20200807 A Beginner-s Guide to Open Source.md index dac97f2207..a51f88eefe 100644 --- a/translated/talk/20200807 A Beginner-s Guide to Open Source.md +++ b/published/202205/20200807 A Beginner-s Guide to Open Source.md @@ -3,21 +3,21 @@ [#]: author: "Ruth Ikegah https://hashnode.com/@ikegah_ruth" [#]: collector: "lkxed" [#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14600-1.html" 开源新手指南 ====== -![][1] +![](https://img.linux.net.cn/data/attachment/album/202205/16/144822bal5z8ij44s4jcom.jpg) 作为一名技术人员,你应该时不时会看到“开源Open Source”这个词。你有可能在浏览推文、博文时看到过它,也有可能是在学习某一门编程语言或使用某个工具时,看到它的部分介绍写着:这个工具/语言是“开源”的。总之,开源无处不在。 在本文中,我将介绍下面这三个话题: * 什么是开源 -* 贡献开源的好处 +* 贡献于开源的好处 * 如何开始贡献 ### 什么是开源 @@ -34,13 +34,13 @@ * VLC 媒体播放器 * Python 语言、PHP 语言、MySQL 数据库 -与开源软件相反的是专有/闭源软件,只有软件的创造者才能自由使用,其他人若想使用,就得先获得法律许可才行。例如 Adobe Photoshop、Microsoft Office 等。 +与开源软件相反的是专有软件proprietary software / 闭源软件closed source software,只有软件的创造者才能自由使用,其他人若想使用,就得先获得法律许可才行。例如 Adobe Photoshop、微软 Office 等。 -> 开源不仅限于软件或代码,技术领域的任何人都可以为开源做出贡献(每个角色)。有了开源,就有了透明度、可靠性、灵活性,并允许开放合作。 +> 开源不仅限于软件或代码,技术领域的任何人都可以为开源做出贡献(各个角色)。有了开源,就有了透明度、可靠性、灵活性,并允许开放合作。 -### 贡献开源的好处 +### 贡献于开源的好处 -贡献开源项目或软件意味着“免费”让该项目变得更好。你应该会问自己,为什么我要“免费”关心别人的项目,给自己压力?如果你是新手,你可以阅读 [Edidiong Asikpo][2] 的故事,她在 [这篇文章][3] 中说明了为什么开源是她成长的催化剂。 +向开源项目或软件做贡献意味着“免费”让该项目变得更好。你应该会问自己,为什么我要关心或向自己强调“免费”呢?如果你是新手,你可以阅读 [Edidiong Asikpo][2] 的故事,她在 [这篇文章][3] 中说明了为什么开源是她成长的催化剂。 贡献开源的好处有很多,这里是其中一部分: @@ -49,7 +49,7 @@ * 你可以公开自己的想法,从而改善软件、项目或社区,让世界变得更美好。 * 你可以通过贡献开源来得到大家的认可,或者成为独特或伟大事物的一部分(获得自豪感)。 * 它让你有机会成为一个人才济济、活力四射的社区的一分子,你可以从中汲取灵感,并结识志同道合的人。 -* 你可以因为贡献开源而获得报酬(OoO)!比如你可以参与一些实习,包括 [Google 编程之夏Summer of Code][4]、[Outreachy][5]、[Google 文档季Season of Docs][6],以及 Open Collective 的 [赏金计划bounty program][7] 等。(LCTT 译注:国内也有类似的开源实习机会,如“开源之夏”。) +* 你可以因为贡献开源而获得报酬(OoO)!比如你可以参与一些实习,包括 [谷歌编程之夏][4]Google Summer of Code、[Outreachy][5]、[谷歌文档季][6]Google Season of Docs,以及 Open Collective 的 [赏金计划][7]bounty program 等。(LCTT 译注:国内也有类似的开源实习机会,如“开源之夏”。) ### 如何开始贡献 @@ -59,9 +59,9 @@ Github 是开源项目协作的大本营,因此它是一个开始贡献开源的好地方。没听说过 GitHub?没有关系!它提供了文档和指南,很容易就可以上手。不过我还是要提醒你,学习是一个循序渐进的过程,不要太心急喔。 -Github 以公共存储库repositories的形式容纳了许多开源项目。对于某个项目,你可以提交一个议题issue,来说明你注意到的错误或问题(或进一步提出改进意见),也可以创建一个拉取请求pull request,并说明你的更正和改进。 +Github 以公共存储库repositories的形式容纳了许多开源项目。对于某个项目,你可以提交一个议题issue,来说明你注意到的错误或问题(或进一步提出改进意见),也可以创建一个拉取请求pull request(PR),并说明你的更正和改进。 -我不建议你在 Github 上搜索项目来开始贡献,这将是相当令人沮丧的。尽管你可以限定项目使用的编程语言来简化搜索过程,但仍然会有一大堆东西出现在你眼前。(LCCT 译注:对于可爱的小萌新来说,这实在是难以承受 >…<。) +我不建议你在 GitHub 上搜索项目来开始贡献,这将是相当令人沮丧的。尽管你可以限定项目使用的编程语言来简化搜索过程,但仍然会有一大堆东西出现在你眼前。(LCCT 译注:对于可爱的小萌新来说,这实在是难以承受 >…<。) 为了更精准地找到适合自己的项目,这里有一些可供开始的途径: @@ -74,7 +74,7 @@ Github 以公共存储库repositories的形式容纳了许 * 在加入之前,先对项目、社区或组织做一些研究;当你在做的时候,针对不清楚的地方提出问题。 * 当你加入社区时,尽量积极地介绍自己,并说明你能帮助项目的地方。 * **不要**认为自己无法为项目提供任何帮助,停止这种念头!你有很好的想法可以分享! -* 在存储库中看看别人提交的议题,(如果有的话)看看你能在哪些方面提供帮助,你可以关注带有“good first issue”“help-wanted”“first-timers only”等标签的议题。 +* 在存储库中看看别人提交的议题,(如果有的话)看看你能在哪些方面提供帮助,你可以关注带有“good first issue”、“help-wanted”、“first-timers only”等标签的议题。 * 在开始贡献之前,一定要先看一下贡献指南,这样你在贡献时就不会有冲突。 > 哪怕只是使用一个开源工具也是一种贡献;参加一个开源活动也是一种贡献;做开源项目的志愿者,或者为开源项目提供赞助也是一种贡献。 @@ -94,7 +94,7 @@ via: https://ruthikegah.xyz/a-beginners-guide-to-open-source 作者:[Ruth Ikegah][a] 选题:[lkxed][b] 译者:[lkxed](https://github.com/lkxed) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/published/202205/20210102 Explore the night sky with this open source astronomy app.md b/published/202205/20210102 Explore the night sky with this open source astronomy app.md new file mode 100644 index 0000000000..d25508a327 --- /dev/null +++ b/published/202205/20210102 Explore the night sky with this open source astronomy app.md @@ -0,0 +1,93 @@ +[#]: collector: (lujun9972) +[#]: translator: (hanszhao80) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14599-1.html) +[#]: subject: (Explore the night sky with this open source astronomy app) +[#]: via: (https://opensource.com/article/21/1/kstars) +[#]: author: (Don Watkins https://opensource.com/users/don-watkins) + +使用开源天文应用程序 KStars 探索夜空 +====== + +> 使用 KStars 从你的 Linux 桌面或安卓设备眺望星辰。 + +![](https://img.linux.net.cn/data/attachment/album/202205/16/104339d0u39oiyzugzjf86.jpg) + +我一直对夜空很着迷。当我年轻的时候,唯一可用的参考资料是书籍,它们似乎描绘了一个与我从家里看到的不一样的天空。 + +五年多前,我曾介绍过两个开源天文馆应用程序 [Celestia 和 Stellarium][2] 的使用体验。最近,我又了解到一个应用 [KStars][3]。这是一个令人惊叹的开源应用程序,可以帮助儿童(和成人)参与科学和天文学。它的网站上说: + +> “KStars 是一款自由开源的、跨平台的天文学软件。它提供了从地球上的任何位置、任何日期和时间对夜空的一个精确的图形化模拟。可展示包括多达 1 亿颗恒星,13,000 个深空天体,所有 8 个行星,太阳和月亮,以及数千颗彗星,小行星,超新星和卫星。“ + +KStars 是 [KDE 教育项目][4] 的一部分。最新版本可用于 Linux、Windows 和 MacOS,它集成了 [StellarSolver][5],这是一个跨平台的 SExtractor 程序,它可以从天文图像构建一个天体目录。 + +### 安装 KStars + +KStars 采用 GPL 2.0 协议自由授权。源代码可以在官方的 [KDE GitLab 实例][6] 查看(这是 GitHub 的一个只读镜像)。KDE 教育项目有着优秀的 [安装文档][7]。 + +我用的系统是 [Pop!_OS][8],可以在 Pop!_Shop 找到这款应用程序。 + +可以从你的发行版的软件存储库中找到 KStars 在 Linux 上安装。而在安卓设备上,可以从 [Google Play 商店][9] 下载适配安卓的 KStars Lite。KDE 项目维护了一份优秀的 [KStars 手册][10] 来帮助用户。 + +### 使用 KStars + +安装完后,从你的“应用Applications”菜单启动程序。启动向导会指导你完成初始化设置。 + +![KStars 启动向导][11] + +这些指示很容易理解。向导会提示设置你住所的位置。不幸的是,我所在的小村庄不在列表里,但附近一个更大的社区在里面。 + +![KStars 位置设置][13] + +你还可以下载该程序的其他数据和额外功能。 + +![KStars 扩展][14] + +这里有很多可用的选项。我选择“在详细信息窗口中显示常见图像Common images displayed in the detail window”。 + +一旦完成设置,KStars 会呈现一张基于你的位置的夜空图。 + +![KStars 夜空显示][15] + +左上角显示了当前时区(这张图里是 2020 年 11 月 30 日傍晚 5 点 58 分)。 + +使用鼠标左键,可以向左、向右、向上和向下移动显示。你可以使用鼠标滚轮进行放大和缩小。将鼠标光标放在天体上并右键单击可查看当前天体的描述。 + +![KStars 天体描述][16] + +### 参与 + +KStars 正在积极寻求错误报告、天文学知识、代码、翻译等方面的帮助。主要开发者和维护者是 [Jasem Mutlaq][17]。如果你愿意贡献一份力量,请访问 [项目网站][18] 或加入邮件列表以了解更多信息。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/1/kstars + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[hanszhao80](https://github.com/hanszhao80) +校对:[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/osdc_520x292_opensourcestars.png?itok=hnrMETFh (Open source stars.) +[2]: https://opensource.com/education/15/7/open-source-apps-explore-night-sky +[3]: https://edu.kde.org/kstars/ +[4]: https://edu.kde.org/ +[5]: https://github.com/rlancaste/stellarsolver +[6]: https://invent.kde.org/education/kstars +[7]: https://edu.kde.org/kstars/install.php +[8]: https://pop.system76.com/ +[9]: https://play.google.com/store/apps/details?id=org.kde.kstars.lite&hl=en +[10]: https://docs.kde.org/trunk5/en/extragear-edu/kstars/index.html +[11]: https://opensource.com/sites/default/files/uploads/kstars_startupwizard.png (KStars Startup Wizard) +[12]: https://creativecommons.org/licenses/by-sa/4.0/ +[13]: https://opensource.com/sites/default/files/uploads/kstars_setlocation.png (KStars location setup) +[14]: https://opensource.com/sites/default/files/uploads/kstars_addons.png (KStars add-ons) +[15]: https://opensource.com/sites/default/files/uploads/kstars_sky.png (KStars night sky display) +[16]: https://opensource.com/sites/default/files/uploads/kstars_objectdescription.png (KStars describes objects) +[17]: https://github.com/knro +[18]: https://edu.kde.org/kstars diff --git a/published/20210111 9 Decentralized, P2P and Open Source Alternatives to Mainstream Social Media Platforms Like Twitter, Facebook, YouTube and Reddit.md b/published/202205/20210111 9 Decentralized, P2P and Open Source Alternatives to Mainstream Social Media Platforms Like Twitter, Facebook, YouTube and Reddit.md similarity index 100% rename from published/20210111 9 Decentralized, P2P and Open Source Alternatives to Mainstream Social Media Platforms Like Twitter, Facebook, YouTube and Reddit.md rename to published/202205/20210111 9 Decentralized, P2P and Open Source Alternatives to Mainstream Social Media Platforms Like Twitter, Facebook, YouTube and Reddit.md diff --git a/published/20210112 8 tips for the Linux command line.md b/published/202205/20210112 8 tips for the Linux command line.md similarity index 100% rename from published/20210112 8 tips for the Linux command line.md rename to published/202205/20210112 8 tips for the Linux command line.md diff --git a/published/20210122 Convert your filesystem to Btrfs.md b/published/202205/20210122 Convert your filesystem to Btrfs.md similarity index 100% rename from published/20210122 Convert your filesystem to Btrfs.md rename to published/202205/20210122 Convert your filesystem to Btrfs.md diff --git a/published/202205/20210211 31 open source text editors you need to try.md b/published/202205/20210211 31 open source text editors you need to try.md new file mode 100644 index 0000000000..2ce2044280 --- /dev/null +++ b/published/202205/20210211 31 open source text editors you need to try.md @@ -0,0 +1,163 @@ +[#]: collector: (lujun9972) +[#]: translator: (CoWave-Fall) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14632-1.html) +[#]: subject: (31 open source text editors you need to try) +[#]: via: (https://opensource.com/article/21/2/open-source-text-editors) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +值得尝试的 30 个开源文本编辑器 +====== + +> 正在寻找新的文本编辑器?这里有 31 个编辑器可供尝试。 + +![](https://img.linux.net.cn/data/attachment/album/202205/24/184603krbzynnnikz8b0nc.jpg) + +计算机是基于文本的,因此你使用它们做的事情越多,你可能就越需要文本编辑应用程序。你在文本编辑器上花费的时间越多,你就越有可能对你使用的编辑器提出更多的要求。 + +如果你正在寻找一个好的文本编辑器,你会发现 Linux 可以提供很多。无论你是想在终端、桌面还是在云端工作,你都可以试一试。你可以每天一款编辑器,连续着试一个月(或每月试一个,能够试三年)。坚持不懈,你终将找到适合你的完美的编辑器。 + +### Vim 类编辑器 + +![][2] + +* [Vi][3] 通常随着 Linux 各发行版、BSD、Solaris 和 macOS 一起安装。它是典型的 Unix 文本编辑器,具有编辑模式和超高效的单键快捷键的独特组合。最初的 Vi 编辑器由 Bill Joy 编写(他也是 C shell 的作者)。Vi 的现代版本,尤其是 Vim,增加了许多特性,包括多级撤消、在插入模式下更好的导航、行折叠、语法高亮、插件支持等等。但它需要学习如何使用(它甚至有自己的教程程序,`vimtutor`)。 +* [Kakoune][4] 是一个受 Vim 启发的应用程序,它具有熟悉的简约界面、短键盘快捷键以及独立的编辑和插入模式。乍一看,它的外观和感觉很像 Vi,但它在设计和功能上有自己独特的风格。 它有一个小彩蛋:具有 Clippy 界面的实现。 + +### emacs 编辑器 + +![][5] + +* 从最初的免费 emacs 开始,发展到发起了自由软件运动的 GNU 项目的第一批官方应用程序,[GNU Emacs][6] 是一个广受欢迎的文本编辑器。它非常适合系统管理员、开发人员和日常用户的使用,具有大量功能和近乎无穷无尽的扩展。一旦你开始使用 emacs,你可能会发现很难想出一个理由来关闭它,因为它能做的事情非常多! +* 如果你喜欢 emacs,但觉得 GNU Emacs 过于臃肿,那么你可以试试 [Jove][7]。Jove 是一个基于终端的 emacs 编辑器。它很容易使用,但是如果你是使用 emacs 编辑器家族的新手,那么 Jove 也是很容易学习的,这要归功于 `teajove` 命令。 +* 另一个轻量级的 emacs 编辑器是 [Jed][8]。它的工作流程基于宏。它与其他编辑器的不同之处在于它使用了 [S-Lang][9],这是一种类似 C 的脚本语言,它为使用 C 而不是使用 Lisp 的开发人员提供了扩展的机会。 + +### 交互式编辑器 + +![][10] + +* [GNU nano][11] 对基于终端的文本编辑采取了大胆的立场:它提供了一个菜单。是的,这个不起眼的编辑器从 GUI 编辑器那里得到了提示,它告诉用户他们需要按哪个键来执行特定的功能。这是一种令人耳目一新的用户体验,所以难怪 nano 被设置为“用户友好”发行版的默认编辑器,而不是 Vi。 +* [JOE][12] 基于一个名为 WordStar 的旧文本编辑应用程序。如果你不熟悉 Wordstar,JOE 也可以模仿 Emacs 或 GNU nano。默认情况下,它是介于 Emacs 或 Vi 等相对神秘的编辑器和 GNU Nano 永远显示的冗长信息之间的一个很好的折衷方案(例如,它告诉你如何激活屏幕帮助显示,但默认情况下不启用)。 +* [e3][13] 是一个优秀的小型文本编辑器,具有五个内置的键盘快捷键方案,用来模拟 Emacs、Vi、nano、NEdit 和 WordStar。换句话说,无论你习惯使用哪种基于终端的编辑器,你都可能对 e3 感到宾至如归。 + +### ed 及像 ed 一样的编辑器 + +* [POSIX][15] 和 Open Group 定义了基于 Unix 的操作系统的标准,[ed][14] 行编辑器是它的一部分。它安装在你遇到的几乎所有 Linux 或 Unix 系统上。它小巧、简洁、一流。 +* 基于 ed,[Sed][16] 流编辑器因其功能和语法而广受欢迎。大多数 Linux 用户在搜索如何最简单、最快捷的更新配置文件中的行的方法时,至少会遇到一个 `sed` 命令,但它值得仔细研究一下。Sed 是一个强大的命令,包含许多有用的子命令。更好地了解了它,你可能会发现自己打开文本编辑器应用程序的频率要低得多。 +* 你并不总是需要文本编辑器来编辑文本。[heredoc][17](或 Here Doc)系统可在任何 POSIX 终端中使用,允许你直接在打开的终端中输入文本,然后将输入的内容通过管道传输到文本文件中。这不是最强大的编辑体验,但它用途广泛且始终可用。 + +### 极简风格的编辑器 + +![][18] + +如果你认为一个好的文本编辑器就是一个文字处理器(除了没有所有的处理功能)的话,你可能正在寻找这些经典编辑器。这些编辑器可让你以最少的干扰和最少的帮助写作和编辑文本。它们提供的功能通常以标记文本、Markdown 或代码为中心。有些名称遵循某种模式: + +* [Gedit][19] 来自 GNOME 团队; +* [medit][20] 有经典的 GNOME 手感; +* [Xedit][21] 仅使用最基本的 X11 库; +* [jEdit][22] 适用于 Java 爱好者。 + +KDE 用户也有类似的: + +* [Kate][23] 是一款低调的编辑器,拥有你需要的几乎所有功能; +* [KWrite][24] 在看似简单易用的界面中隐藏了大量有用的功能。 + +还有一些适用于其他平台: + +* [Pe][26] 适用于 Haiku OS(90 年代那个古怪的孩子 BeOS 的转世); +* [FeatherPad][27] 是适用于 Linux 的基本编辑器,但对 macOS 和 Haiku 有一些支持。如果你是一名希望移植代码的 Qt 黑客,请务必看一看! + +### 集成开发环境(IDE) + +![][28] + +文本编辑器和集成开发环境(IDE)有很多相同之处。后者实际上只是前者加上许多为特定代码而添加的功能。如果你经常使用 IDE,你可能会在扩展管理器中发现一个 XML 或 Markdown 编辑器: + +* [NetBeans][29] 是一个方便 Java 用户的文本编辑器。 +* [Eclipse][30] 提供了一个强大的编辑套件,其中包含许多扩展,可为你提供所需的工具。 + +### 云端编辑器 + +![][31] + +在云端工作?当然,你也可以在那里进行编辑。 + +* [Etherpad][32] 是在网上运行的文本编辑器应用程序。有独立免费的实例供你使用,或者你也可以设置自己的实例。 +* [Nextcloud][33] 拥有蓬勃发展的应用场景,包括内置文本编辑器和具有实时预览功能的第三方 Markdown 编辑器。 + +### 较新的编辑器 + +![][34] + +每个人都会有让文本编辑器变得更完美的想法。因此,几乎每年都会发布新的编辑器。有些以一种新的、令人兴奋的方式重新实现经典的旧想法,有些对用户体验有独特的看法,还有些则专注于特定的需求。 + +* [Atom][35] 是来自 GitHub 的多功能的现代文本编辑器,具有许多扩展和 Git 集成。 +* [Brackets][36] 是 Adobe 为 Web 开发人员提供的编辑器。 +* [Focuswriter][37] 旨在通过无干扰的全屏模式、可选的打字机音效和精美的配置选项等有用功能帮助你专注于写作。 +* [Howl][38] 是一个基于 Lua 和 Moonscript 的渐进式动态编辑器。 +* [Norka][39] 和 [KJots][40] 模仿笔记本,每个文档代表“活页夹”中的“页面”。你可以通过导出功能从笔记本中取出单个页面。 + +### 自己制作编辑器 + +![][41] + +俗话说得好:既然可以编写自己的应用程序,为什么要使用别人的(虽然其实没有这句俗语)?虽然 Linux 有超过 30 个常用的文本编辑器,但是再说一次,开源的一部分乐趣在于能够亲手进行实验。 + +如果你正在寻找学习编程的理由,那么制作自己的文本编辑器是一个很好的入门方法。你可以在大约 100 行代码中实现基础功能,并且你使用它的次数越多,你可能就越会受到启发,进而去学习更多知识,从而进行改进。准备好开始了吗?来吧,去 [创建你自己的文本编辑器][42]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/open-source-text-editors + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[CoWave-Fall](https://github.com/CoWave-Fall) +校对:[wxy](https://github.com/wxy) + +本文由 [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/button_push_open_keyboard_file_organize.png?itok=KlAsk1gx (open source button on keyboard) +[2]: https://opensource.com/sites/default/files/kakoune-screenshot.png +[3]: https://opensource.com/article/20/12/vi-text-editor +[4]: https://opensource.com/article/20/12/kakoune +[5]: https://opensource.com/sites/default/files/jed.png +[6]: https://opensource.com/article/20/12/emacs +[7]: https://opensource.com/article/20/12/jove-emacs +[8]: https://opensource.com/article/20/12/jed +[9]: https://www.jedsoft.org/slang +[10]: https://opensource.com/sites/default/files/uploads/nano-31_days-nano-opensource.png +[11]: https://opensource.com/article/20/12/gnu-nano +[12]: https://opensource.com/article/20/12/31-days-text-editors-joe +[13]: https://opensource.com/article/20/12/e3-linux +[14]: https://opensource.com/article/20/12/gnu-ed +[15]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[16]: https://opensource.com/article/20/12/sed +[17]: https://opensource.com/article/20/12/heredoc +[18]: https://opensource.com/sites/default/files/uploads/gedit-31_days_gedit-opensource.jpg +[19]: https://opensource.com/article/20/12/gedit +[20]: https://opensource.com/article/20/12/medit +[21]: https://opensource.com/article/20/12/xedit +[22]: https://opensource.com/article/20/12/jedit +[23]: https://opensource.com/article/20/12/kate-text-editor +[24]: https://opensource.com/article/20/12/kwrite-kde-plasma +[25]: https://opensource.com/article/20/12/notepad-text-editor +[26]: https://opensource.com/article/20/12/31-days-text-editors-pe +[27]: https://opensource.com/article/20/12/featherpad +[28]: https://opensource.com/sites/default/files/uploads/eclipse-31_days-eclipse-opensource.png +[29]: https://opensource.com/article/20/12/netbeans +[30]: https://opensource.com/article/20/12/eclipse +[31]: https://opensource.com/sites/default/files/uploads/etherpad_0.jpg +[32]: https://opensource.com/article/20/12/etherpad +[33]: https://opensource.com/article/20/12/31-days-text-editors-nextcloud-markdown-editor +[34]: https://opensource.com/sites/default/files/uploads/atom-31_days-atom-opensource.png +[35]: https://opensource.com/article/20/12/atom +[36]: https://opensource.com/article/20/12/brackets +[37]: https://opensource.com/article/20/12/focuswriter +[38]: https://opensource.com/article/20/12/howl +[39]: https://opensource.com/article/20/12/norka +[40]: https://opensource.com/article/20/12/kjots +[41]: https://opensource.com/sites/default/files/uploads/this-time-its-personal-31_days_yourself-opensource.png +[42]: https://opensource.com/article/20/12/31-days-text-editors-one-you-write-yourself diff --git a/published/202205/20210305 Build a printer UI for Raspberry Pi with XML and Java.md b/published/202205/20210305 Build a printer UI for Raspberry Pi with XML and Java.md new file mode 100644 index 0000000000..6d7c365d54 --- /dev/null +++ b/published/202205/20210305 Build a printer UI for Raspberry Pi with XML and Java.md @@ -0,0 +1,255 @@ +[#]: subject: (Build a printer UI for Raspberry Pi with XML and Java) +[#]: via: (https://opensource.com/article/21/3/raspberry-pi-totalcross) +[#]: author: (Edson Holanda Teixeira Junior https://opensource.com/users/edsonhtj) +[#]: collector: (lujun9972) +[#]: translator: (CoWave-Fall) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14620-1.html) + +用 XML 和 Java 构建树莓派打印机的用户界面 +====== + +> 使用 TotalCross 来快速构建嵌入式系统程序的用户界面。 + +![](https://img.linux.net.cn/data/attachment/album/202205/21/110711zv3t7n1o7hllhodt.jpg) + +从头开始构建 GUI 是一个非常耗时的过程,以硬编码的方式处理所有的位置和对齐对于一些程序员来说确实很困难。所以在本文中,我将演示如何使用 XML 加快这一过程。 + +本项目使用 [TotalCross][2] 作为目标框架。TotalCross 是一个开源的跨平台软件开发工具包(SDK),旨在更快地为嵌入式设备创建 GUI。TotalCross 无需在设备上运行 Java 即可提供 Java 的开发优势,因为它使用自己的字节码和虚拟机(TC 字节码TC bytecode 和 TCVM)来增强性能。 + +我还使用了 Knowcode-XML,这是一个用于 TotalCross 框架的开源 XML 解析器,它可以将 XML 文件转换为 TotalCross 组件。 + +### 项目需求 + +要重现此项目,你需要: + + * [KnowCode-XML][3] + * [VSCode][4] 或 [VSCodium][5] + * [一个 Android 开发环境][6] + * [用于 VSCode 的 TotalCross 插件][7] + * 适用于你的开发平台([Linux][8]、[Mac][9] 或 [Windows][10])的 Java,需要 Java 11(或更高版本) + * [Git][11] + +### 制作嵌入式应用程序 + +该应用程序由一个具有扫描、打印和复印等基本打印功能的嵌入式 GUI 组成。 + +![打印机初始化画面][12] + +构建这个 GUI 需要几个步骤,包括使用 Android-XML 生成 GUI,然后使用 Knowcode-XML 解析器在 TotalCross 框架上运行它。 + +#### 1、生成 Android XML + +要创建 XML 文件,首先构建一个简单的 Android 屏幕,然后对其进行自定义。如果你不知道如何编写 Android-XML,或者你只是想简单尝试一下,你可以从这个 [GitHub 项目][14] 中下载这个应用程序的 XML。该项目还包含渲染 GUI 要用到的图片。 + +#### 2、调整 XML + +生成 XML 文件后,你需要进行一些微调以确保所有内容都已经对齐、比例正确并且图像的路径正确。 + +将 XML 布局添加到 `Layouts` 文件夹,将所有资源添加到 `Drawable` 文件夹。然后你就可以开始自定义 XML 了。 + +例如,如果想要更改 XML 对象的背景,可以更改 `android:background` 属性: + +``` +android:background="@drawable/scan" +``` + +你也可以使用 `tools:layout_editor_absoluteX` 和 `tools:layout_editor_absoluteY` 更改对象的位置: + +``` +tools:layout_editor_absoluteX="830dp" +tools:layout_editor_absoluteY="511dp" +``` + +或者使用 `android:layout_width` 和 `android:layout_height` 更改对象的大小: + +``` +android:layout_width="70dp" +android:layout_height="70dp" +``` + +如果要在对象上放置文本,可以使用 `android:textSize`、`android:text`、`android:textStyle` 和 `android:textColor`: + +``` +android:textStyle="bold" +android:textColor="#000000" +android:textSize="20dp" +android:text="2:45PM" +``` + +下面是一个完整的 XML 对象的示例: + +``` + +``` + +#### 3、在 TotalCross 上运行 GUI + +完成所有 XML 调整后,就可以在 TotalCross 上运行它了。在 TotalCross 扩展(LCTT 译注:在 VSCode 里面)上创建一个新项目,并将 `XML` 和 `Drawable` 文件夹添加到 `Main` 文件夹里。如果你仍然不确定如何创建 TotalCross 项目,请参阅我们的 [入门指南][15]。 + +配置好环境后,使用 `totalcross.knowcode.parse.XmlContainerFactory` 和 `import totalcross.knowcode.parse.XmlContainerLayout` 在 TotalCross 框架上使用 XML GUI。 你可以在其 [GitHub 页面][3] 上找到更多关于使用 KnowCode-XML 的信息。 + +#### 4、添加过渡效果 + +这个项目的平滑过渡效果是由 `SlidingNavigator` 类创建的,它使用 TotalCross 的 `ControlAnimation` 类从一个屏幕滑到另一个屏幕。 + +在 `XMLpresenter` 类上调用 `SlidingNavigator`: + +``` +new SlidingNavigator(this).present(HomePresenter.class); +``` + +在 `SlidingNavigator` 类上实现 `present` 函数: + +``` +public void present(Class presenterClass) + throws InstantiationException, IllegalAccessException { + final XMLPresenter presenter = cache.containsKey(presenterClass) ? cache.get(presenterClass) + : presenterClass.newInstance(); + if (!cache.containsKey(presenterClass)) { + cache.put(presenterClass, presenter); + } + + if (presenters.isEmpty()) { + window.add(presenter.content, LEFT, TOP, FILL, FILL); + } else { + XMLPresenter previous = presenters.lastElement(); + + window.add(presenter.content, AFTER, TOP, SCREENSIZE, SCREENSIZE, previous.content); +``` + +使用动画控件中的 `PathAnimation` 来创建从一个屏幕到另一个屏幕的滑动动画: + +``` + PathAnimation.create(previous.content, -Settings.screenWidth, 0, new ControlAnimation.AnimationFinished() { + @Override + public void onAnimationFinished(ControlAnimation anim) { + window.remove(previous.content); + } + }, 1000).with(PathAnimation.create(presenter.content, 0, 0, new ControlAnimation.AnimationFinished() { + @Override + public void onAnimation Finished(Control Animation anim) { + presenter.content.setRect(LEFT, TOP, FILL, FILL); + } + }, 1000)).start(); + } + presenter.setNavigator(this); + presenters.push(presenter); + presenter.bind2(); + if (presenter.isFirstPresent) { + presenter.onPresent(); + presenter.isFirstPresent = false; + } +``` + +#### 5、加载环形进度条 + +打印机应用程序的另一个不错的功能是显示进度的加载屏幕动画。它包括文本和旋转动画。 + +![加载环形进度条][18] + +通过添加定时器和定时器监听器来更新进度标签,然后调用函数 `spinner.start()` 来实现此功能。所有的动画都是由 TotalCross 和 KnowCode 自动生成的: + +``` +public void startSpinner() { + time = content.addTimer(500); + content.addTimerListener((e) -> { + try { + progress(); // Updates the Label + } catch (InstantiationException | IllegalAccessException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + }); + Spinner spinner = (Spinner) ((XmlContainerLayout) content).getControlByID("@+id/spinner"); + spinner.start(); + } +``` + +这里的环形进度条被实例化为对 XML 文件中描述的 `XmlContainerLayout` `spinner` 的引用: + +``` + +``` + +#### 6、构建应用程序 + +是时候构建应用程序了。你可以在 `pom.xml` 中查看和更改目标系统target systems。 请确保 `Linux Arm` 目标可用。 + +如果你使用的是 VSCode,请按下键盘上的 `F1` 键,选择 `TotalCross: Package` 并等待完成。 然后就可以在 `Target` 文件夹中看到安装文件了。 + +#### 7、在树莓派上部署和运行应用程序 + +要使用 SSH 协议在 [树莓派][19] 上部署应用程序,请按键盘上的 `F1`。选择 `TotalCross: Deploy&Run` 并提供有关你的 SSH 连接的信息,如:用户名、IP地址、密码和应用程序路径。 + +![TotalCross:部署与运行][20] + +![配置 SSH 用户名][21] + +![配置 IP 地址][22] + +![输入密码][23] + +![配置路径][24] + +### 总结 + +KnowCode 让使用 Java 创建和管理应用程序屏幕变得更加容易。Knowcode-XML 将你的 XML 转换为 TotalCross GUI 界面,然后生成二进制文件以在你的树莓派上运行。 + +将 KnowCode 技术与 TotalCross 相结合,使你能够更快地创建嵌入式应用程序。 你可以访问我们在 GitHub 上的 [嵌入式示例][25] 并编辑你自己的应用程序,了解你还可以做什么。 + +如果你有问题、需要帮助,或者只是想与其他嵌入式 GUI 开发人员互动,请随时加入我们的 [Telegram][26] 小组,讨论任何框架上的嵌入式应用程序。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/raspberry-pi-totalcross + +作者:[Edson Holanda Teixeira Junior][a] +选题:[lujun9972][b] +译者:[CoWave-Fall](https://github.com/CoWave-Fall) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/edsonhtj +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png?itok=HcN38NOk (Tips and gears turning) +[2]: https://opensource.com/article/20/7/totalcross-cross-platform-development +[3]: https://github.com/TotalCross/knowcode-xml +[4]: https://code.visualstudio.com/ +[5]: https://opensource.com/article/20/6/open-source-alternatives-vs-code +[6]: https://developer.android.com/studio +[7]: https://marketplace.visualstudio.com/items?itemName=totalcross.vscode-totalcross +[8]: https://opensource.com/article/19/11/install-java-linux +[9]: https://opensource.com/article/20/7/install-java-mac +[10]: http://adoptopenjdk.net +[11]: https://opensource.com/life/16/7/stumbling-git +[12]: https://opensource.com/sites/default/files/uploads/01_printergui.png (printer init screen) +[13]: https://creativecommons.org/licenses/by-sa/4.0/ +[14]: https://github.com/TotalCross/embedded-samples/tree/main/printer-application/src/main/resources/layout +[15]: https://totalcross.com/get-started/?utm_source=opensource&utm_medium=article&utm_campaign=printer +[16]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+instantiationexception +[17]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+illegalaccessexception +[18]: https://opensource.com/sites/default/files/uploads/03progressspinner.png (Loading Spinner) +[19]: https://www.raspberrypi.org/products/raspberry-pi-4-model-b/ +[20]: https://opensource.com/sites/default/files/uploads/04_totalcross-deployrun.png (TotalCross: Deploy&Run) +[21]: https://opensource.com/sites/default/files/uploads/05_ssh.png (SSH user) +[22]: https://opensource.com/sites/default/files/uploads/06_ip.png (IP address) +[23]: https://opensource.com/sites/default/files/uploads/07_password.png (Password) +[24]: https://opensource.com/sites/default/files/uploads/08_path.png (Path) +[25]: https://github.com/TotalCross/embedded-samples +[26]: https://t.me/totalcrosscommunity diff --git a/published/20210310 Troubleshoot WiFi problems with Go and a Raspberry Pi.md b/published/202205/20210310 Troubleshoot WiFi problems with Go and a Raspberry Pi.md similarity index 100% rename from published/20210310 Troubleshoot WiFi problems with Go and a Raspberry Pi.md rename to published/202205/20210310 Troubleshoot WiFi problems with Go and a Raspberry Pi.md diff --git a/published/202205/20210323 WebAssembly Security, Now and in the Future.md b/published/202205/20210323 WebAssembly Security, Now and in the Future.md new file mode 100644 index 0000000000..5957391c6f --- /dev/null +++ b/published/202205/20210323 WebAssembly Security, Now and in the Future.md @@ -0,0 +1,87 @@ +[#]: subject: (WebAssembly Security, Now and in the Future) +[#]: via: (https://www.linux.com/news/webassembly-security-now-and-in-the-future/) +[#]: author: (Dan Brown https://training.linuxfoundation.org/announcements/webassembly-security-now-and-in-the-future/) +[#]: collector: (lujun9972) +[#]: translator: (hanszhao80) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14592-1.html) + +WebAssembly 安全的现在和未来 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/14/144316bb8kbwjephjyb427.jpg) + +### 简介 + +正如我们 [最近解释的][1],WebAssembly 是一种用于以任何语言编写的二进制格式的软件,旨在最终无需更改就能在任意平台运行。WebAssembly 的第一个应用是在 Web 浏览器中,以使网站更快、更具交互性。WebAssembly 有计划推向 Web 之外,从各种服务器到物联网(IoT),其创造了很多机会,但也存在很多安全问题。这篇文章是对这些问题和 WebAssembly 安全模型的一篇介绍性概述。 + +### WebAssembly 跟 JavaScript 很像 + +在 Web 浏览器内部,WebAssembly 模块由执行 JavaScript 代码的同一 虚拟机VM 管理。因此,WebAssembly 和 JavaScript 一样,造成的危害也是相同的,只是效率更高,更不易被察觉。由于 JavaScript 是纯文本,运行前需要浏览器编译,而 WebAssembly 是一种可立即运行的二进制格式,运行速度更快,也更难被扫描出(即使使用杀毒软件)其中的恶意指令。 + +WebAssembly 的这种 “代码混淆” 效果已经被用来弹出不请自来的广告,或打开假的 “技术支持” 窗口,要求提供敏感数据。另一个把戏则是自动将浏览器重定向到包含真正危险的恶意软件的 “落地” 页。 + +最后,就像 JavaScript 一样,WebAssembly 可能被用来 “窃取” 处理能力而不是数据。2019 年,[对 150 个不同的 WASM 模块的分析][2] 发现,其中约 _32%_ 被用于加密货币挖掘。 + +### WebAssembly 沙盒和接口 + +WebAssembly 代码在一个由虚拟机(而不是操作系统)管理的 [沙盒][3] 中封闭运行。这使它无法看到主机,也无法直接与主机交互。对系统资源(文件、硬件或互联网连接)的访问只能通过该虚拟机提供的 WebAssembly 系统接口WebAssembly System Interface(WASI) 进行。 + +WASI 不同于大多数其他应用程序编程接口(API),它具有独特的安全特性,真正推动了 WASM 在传统服务器和边缘Edge计算场景中的采用,这将是下一篇文章的主题。在这里,可以说,当从 Web 迁移到其他环境时,它的安全影响会有很大的不同。现代 Web 浏览器是极其复杂的软件,但它是建立在数十年的经验和数十亿人的日常测试之上的。与浏览器相比,服务器或物联网(IoT)设备几乎是未知领域。这些平台的虚拟机将需要扩展 WASI,因此,肯定会带来新的安全挑战。 + +### WebAssembly 中的内存和代码管理 + +与普通的编译程序相比,WebAssembly 应用程序对内存的访问非常受限,对它们自己也是如此。WebAssembly 代码不能直接访问尚未调用的函数或变量,不能跳转到任意地址,也不能将内存中的数据作为字节码指令执行。 + +在浏览器内部,WASM 模块只能获得一个连续字节的全局数组(线性内存linear memory)进行操作。WebAssembly 可以直接读写该区域中的任意位置,或者请求增加其大小,但仅此而已。这个线性内存linear memory也与包含其实际代码、执行堆栈、当然还有运行 WebAssembly 的虚拟机的区域分离。对于浏览器来说,所有这些数据结构都是普通的 JavaScript 对象,使用标准过程与所有其他对象隔离。 + +### 结果还好,但不完美 + +所有这些限制使得 WebAssembly 模块很难做出不当行为,但也并非不可能。 + +沙盒化的内存使 WebAssembly 几乎不可能接触到 __外部__ 的东西,也使操作系统更难防止 __内部__ 发生不好的事情。传统的内存监测机制,比如 [堆栈金丝雀][4]Stack Canaries 能注意到是否有代码试图扰乱它不应该接触的对象,[但在这里没用][5]。 + +事实上,WebAssembly 只能访问自己的线性内存linear memory,但可以直接访问,这也可能为攻击者的行为 _提供便利_。有了这些约束和对模块源代码的访问,就更容易猜测覆盖哪些内存位置可能造成最大的破坏。破坏局部变量似乎也是 [可能的][6],因为它们停留在线性内存linear memory中的无监督堆栈中。 + +2020 年的一篇关于 [WebAssembly 的二进制安全性][5] 的论文指出,WebAssembly 代码仍然可以在设定的常量内存中覆盖字符串文字。同一篇论文描述了在三个不同的平台(浏览器、Node.JS 上的服务端应用程序,和独立 WebAssembly 虚拟机的应用程序)上,WebAssembly 可能比编译为原生二进制文件时更不安全的其他方式。建议进一步阅读此主题。 + +通常,认为 WebAssembly 只能破坏其自身沙盒中的内容的想法可能会产生误导。WebAssembly 模块为调用它们的 JavaScript 代码做繁重的工作,每次都会交换变量。如果模块在这些变量中的任意一处写入不安全的调用 WebAssembly 的 JavaScript 代码,就 _会_ 导致崩溃或数据泄露。 + +### 未来的方向 + +WebAssembly 的两个新出现的特性:[并发][7] 和内部垃圾收集,肯定会影响其安全性(如何影响以及影响多少,现在下结论还为时过早)。 + +并发允许多个 WebAssembly 模块在同一个虚拟机中并行。目前,只有通过 JavaScript [web workers][8] 才能实现这一点,但更好的机制正在开发中。安全方面,他们可能会带来 [以前不需要的大量的代码][9],也就是更多出错的方法。 + +为了提高性能和安全性,我们需要一个 [本地的垃圾收集器][10],但最重要的是,要在经过良好测试的浏览器的 Java 虚拟机之外使用 WebAssembly,因为这些虚拟机无论如何都会在自己内部收集所有的垃圾。当然,甚至这个新代码也可能成为漏洞和攻击的另一个入口。 + +往好处想,使 WebAssembly 比现在更安全的通用策略也是存在的。再次引用 [这篇文章][5],这些策略包括:编译器改进、栈/堆和常量数据的 _分离_ 的线性存储机制,以及避免使用 **不安全的语言**(如 C)编译 WebAssembly 模块代码。 + +*本文 [WebAssembly 安全的现在和未来][11] 首次发表在 [Linux 基金会 - 培训][12]。* + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/webassembly-security-now-and-in-the-future/ + +作者:[Dan Brown][a] +选题:[lujun9972][b] +译者:[hanszhao80](https://github.com/hanszhao80) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://training.linuxfoundation.org/announcements/webassembly-security-now-and-in-the-future/ +[b]: https://github.com/lujun9972 +[1]: https://training.linuxfoundation.org/announcements/an-introduction-to-webassembly/ +[2]: https://www.sec.cs.tu-bs.de/pubs/2019a-dimva.pdf +[3]: https://webassembly.org/docs/security/ +[4]: https://ctf101.org/binary-exploitation/stack-canaries/ +[5]: https://www.usenix.org/system/files/sec20-lehmann.pdf +[6]: https://spectrum.ieee.org/tech-talk/telecom/security/more-worries-over-the-security-of-web-assembly +[7]: https://github.com/WebAssembly/threads +[8]: https://en.wikipedia.org/wiki/Web_worker +[9]: https://googleprojectzero.blogspot.com/2018/08/the-problems-and-promise-of-webassembly.html +[10]: https://github.com/WebAssembly/gc/blob/master/proposals/gc/Overview.md +[11]: https://training.linuxfoundation.org/announcements/webassembly-security-now-and-in-the-future/ +[12]: https://training.linuxfoundation.org/ diff --git a/published/20210428 Share files between Linux and Windows computers.md b/published/202205/20210428 Share files between Linux and Windows computers.md similarity index 100% rename from published/20210428 Share files between Linux and Windows computers.md rename to published/202205/20210428 Share files between Linux and Windows computers.md diff --git a/published/202205/20210615 Listen to music on FreeDOS.md b/published/202205/20210615 Listen to music on FreeDOS.md new file mode 100644 index 0000000000..cf546b1181 --- /dev/null +++ b/published/202205/20210615 Listen to music on FreeDOS.md @@ -0,0 +1,95 @@ +[#]: subject: (Listen to music on FreeDOS) +[#]: via: (https://opensource.com/article/21/6/listen-music-freedos) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: (hanszhao80) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14603-1.html) + +在 FreeDOS 中聆听音乐 +====== + +> Mplayer 是 Linux、Windows、Mac 和 DOS 等操作系统上常见的一款开源媒体播放器。 + +![](https://img.linux.net.cn/data/attachment/album/202205/17/092828vffyeliiz33hqf31.jpg) + +听音乐是放松心情的好方法。在 Linux 上,我使用 Rhythmbox 听音乐。但是你可能不知道在 FreeDOS 上也可以听音乐。让我们看一下两款流行的音乐播放器吧: + +### 用 Mplayer 听音乐 + +[Mplayer][2] 是一款开源的媒体播放器,通常安装于 Linux、Windows 和 Mac 上,但也有 DOS 版本可用。这里我们讨论的就是在 FreeDOS 版本。虽然其 DOS 移植版基于旧版(2007 年的 1.0rc2-3-3-2 版),但它完全适用于在 DOS 上播放媒体。 + +我使用 MPlayer 在 FreeDOS 上听音乐文件。在这个例子中,我复制了我最喜欢的有声读物之一,[Big Finish Productions][3] 的神秘博士:闪点行动Doctor Who: Flashpoint,并在我的 FreeDOS 计算机上将其保存为 `C:\MUSIC\FLASHPNT.MP3`。为了在 FreeDOS 上收听闪点行动,我从 FreeDOS 命令行启动 MPlayer 并指定要播放的 MP3 文件名。MPlayer 的基本用法是 `mplayer [options] filename`,如果默认设置可用,你应该可以直接使用该文件名启动 MPlayer。在本例中,我运行以下命令将工作目录切换为 `\MUSIC`,然后使用 MPlayer 播放我的 MP3 有声读物文件: + +``` +CD \MUSIC +MPLAYER FLASHPNT.MP3 +``` + +FreeDOS _不区分大小写_,因此它将忽略 DOS 命令和任何文件或目录的大小写字母的区别。你键入 `cd \music` 或 `Cd \Music` 都可以切换到 Music 目录,效果相同。 + +![FreeDOS 上的 Mplayer][4] + +*你可以用 Mplayer 播放 MP3 文件* + +使用 MPlayer 在 FreeDOS 播放音乐文件时没有花哨的界面。但同时,它也不会分散注意力。所以我可以一边让 FreeDOS 在我的 DOS 计算机上播放 MP3 文件,一边使用另一台计算机做其他事情。然而,FreeDOS 一次只运行一个任务(换句话说,DOS 是一个单任务single-tasking操作系统),所以我不能将 MPlayer 置于 FreeDOS 的“后台”运行,而在 _同一台 FreeDOS 机_ 上处理其他事情。 + +请注意,MPlayer 是一个需要大量内存才能运行的大程序。虽然 DOS 本身并不需要太多的内存来运行,但我建议至少有 16M 的内存来运行 MPlayer。 + +### 使用 Open Cubic Player 听音频文件 + +FreeDOS 不止提供了 MPlayer 来播放媒体。还有 [Open Cubic Player][6],它支持多种文件格式,包括 Midi 和 WAV 文件。 + +1999 年,我录制了一段简短的音频文件,内容是我说:“你好,我是 Jim Hall,我把 ‘FreeDOS’ 发音为 _FreeDOS_。"这是一个玩笑,借鉴了 Linus Torvalds 录制的演示他如何发音 Linux 的 [类似的音频文件][7](`English.au`,包含在 1994 年的 Linux 源代码树中)中的创意。我们不会在 FreeDOS 中分发这段 FreeDOS 音频剪辑,但欢迎你从我们的 [Silly Sounds][8] 目录中下载它,该目录位于 [Ibiblio][9] 的 FreeDOS 文件存档中。 + +你可以使用 Open Cubic Player 收听 _FreeDOS_ 音频剪辑。通常从 `\APPS\OPENCP` 目录键入 `CP` 命令运行 Open Cubic Player。但 Open Cubic Player 是 32 位应用程序,运行它需要 32 位 DOS 扩展器。常见的 DOS 扩展器是 DOS/4GW。虽然可以免费使用,但 DOS/4GW 不是开源程序,因此我们不会将其作为 FreeDOS 包分发。 + +相反,FreeDOS 提供了另一个名为 DOS/32A 的开源32位扩展器。如果你在安装 FreeDOS 时没有安装所有内容,则可能需要使用 [FDIMPLES][10] 进行安装。我使用这两行命令切换到 `\APPS\OPENCP` 路径,并使用 DOS/32A 扩展器运行 Open Cubic Player: + +``` +CD \APPS\OPENCP +DOS32A CP +``` + +Open Cubic Player 没有花哨的用户界面,但你可以使用方向键将 文件选择器File Selector 导航到包含要播放的媒体文件的目录。 + +![Open Cubic Player][11] + +*Open Cubic Player 打开文件选择器* + +文本比在其他 DOS 应用程序中显示的要小,因为 Open Cubic Player 会自动将显示更改为使用 50 行文本,而不是通常的 25 行。当你退出程序时,Open Cubic Player 会将显示重置为 25 行。 + +选择媒体文件后,Open Cubic Player 将循环播放该文件(按键盘上的 `Esc` 键退出)。当文件通过扬声器播放时,Open Cubic Player 会显示一个频谱仪,以便你可以观察左右声道的音频。FreeDOS 音频剪辑是以单声道录制的,因此左右声道是相同的。 + +![Open Cubic Player][12] + +*Open Cubic Player 中播放 FreeDOS 音频文件* + +DOS 可能来自较早的年代,但这并不意味着你不能使用 FreeDOS 来执行现代任务或播放当前的媒体。如果你喜欢听数字音乐,试一试在 FreeDOS上 使用 Open Cubic Player 或 MPlayer 吧! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/listen-music-freedos + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[hanszhao80](https://github.com/hanszhao80) +校对:[wxy](https://github.com/wxy) + +本文由 [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/programming-code-keyboard-laptop-music-headphones.png?itok=EQZ2WKzy (Woman programming) +[2]: https://en.wikipedia.org/wiki/MPlayer +[3]: https://bigfinish.com/ +[4]: https://opensource.com/sites/default/files/uploads/mplayer.png (You can use Mplayer to listen to MP3 files) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: https://www.cubic.org/player/ +[7]: https://commons.wikimedia.org/wiki/File:Linus-linux.ogg +[8]: https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/util/sillysounds/ +[9]: https://www.ibiblio.org/ +[10]: https://opensource.com/article/21/6/freedos-package-manager +[11]: https://opensource.com/sites/default/files/uploads/opencp1.png (Open Cubic Player opens with a file selector) +[12]: https://opensource.com/sites/default/files/uploads/opencp2.png (Open Cubic Player playing the "FreeDOS" audio clip) diff --git a/published/20210617 Linux package management with dnf.md b/published/202205/20210617 Linux package management with dnf.md similarity index 100% rename from published/20210617 Linux package management with dnf.md rename to published/202205/20210617 Linux package management with dnf.md diff --git a/published/20210624 Linux package management with apt.md b/published/202205/20210624 Linux package management with apt.md similarity index 100% rename from published/20210624 Linux package management with apt.md rename to published/202205/20210624 Linux package management with apt.md diff --git a/published/20210710 A new open source operating system for embedded systems.md b/published/202205/20210710 A new open source operating system for embedded systems.md similarity index 100% rename from published/20210710 A new open source operating system for embedded systems.md rename to published/202205/20210710 A new open source operating system for embedded systems.md diff --git a/published/20211213 How I use open source to design my own card games.md b/published/202205/20211213 How I use open source to design my own card games.md similarity index 100% rename from published/20211213 How I use open source to design my own card games.md rename to published/202205/20211213 How I use open source to design my own card games.md diff --git a/published/20220113 Learn Rust in 2022.md b/published/202205/20220113 Learn Rust in 2022.md similarity index 100% rename from published/20220113 Learn Rust in 2022.md rename to published/202205/20220113 Learn Rust in 2022.md diff --git a/translated/talk/20220212 5 levels of transparency for open source communities.md b/published/202205/20220212 5 levels of transparency for open source communities.md similarity index 79% rename from translated/talk/20220212 5 levels of transparency for open source communities.md rename to published/202205/20220212 5 levels of transparency for open source communities.md index 8b5433f4b5..3525fa220b 100644 --- a/translated/talk/20220212 5 levels of transparency for open source communities.md +++ b/published/202205/20220212 5 levels of transparency for open source communities.md @@ -3,15 +3,16 @@ [#]: author: "Emilio Galeano Gryciuk https://opensource.com/users/egaleano" [#]: collector: "lujun9972" [#]: translator: "aREversez" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14596-1.html" 开源社区透明度的五个层次 ====== -如果想让开源社区繁荣发展,管理者需要达到透明度的五个层次。 -![Person in a field of dandelions][1] +> 如果想让开源社区繁荣发展,管理者需要达到透明度的五个层次。 + +![](https://img.linux.net.cn/data/attachment/album/202205/15/150842yrvm9v5qbbd7a355.jpg) 开源社区的管理者必须意识到社区有五个层次的透明度,这对于建设繁荣发展的开源社区来说至关重要。 @@ -25,33 +26,27 @@ * 社区管理者需要向参与者报告社区情况。 * 向成员公开社区各项情况,营造信任氛围,有利于社区健康发展。 - - ### 透明度的五个层次 #### 层次一:发布源码 -在这一层次,社区需要遵循 [开放源码协议][2],在 [Git][3] 等公开的版本控制系统上发布源码。 +在这一层次,社区需要遵循 [OSI 认可的许可证][2],在 [Git][3] 等公开的版本控制系统上发布源码。 层次一的目标在于创建开源项目。 * 建立开源社区,理应达到这一层次。因为没有公开源代码,也就无所谓开源项目。 - * 开源项目的核心便是参与者们编写的源码,而源码需要获得开放源码协议批准的许可证。 + * 开源项目的核心便是参与者们编写的源码,并在 OSI 批准的许可证下授权。 * 公开的版本控制系统能够促进合作,使得每一位开发者都能了解项目情况,理解合作模式。 - - #### 层次二:发布社区指南 -达到这一层次,需要发布相关文档以及资源。也可通过组织活动,指导社区成员。 +达到这一层次,需要发布相关文档以及资源。也可通过组织活动来指导社区成员。 -层次二的目标在于建立开源社区,促进社区发展。 +层次二的目标在于为一个开源项目建立和发展一个开源社区。 * 建立一个活跃的社区需要的不仅仅是源代码。 * 公开项目开展方式和贡献方式,能够吸引更多的开发者参与到项目当中。 - * 为了推动社区的发展,管理者可能需要举办一些重要活动,并为贡献者们筹办特殊活动。 - - + * 为了推动社区的发展,管理者可能需要举办一些重要活动,并为贡献者们筹办一些特殊的活动。 #### 层次三:继往开来 @@ -63,8 +58,6 @@ * 公开社区活动,让成员意识到自己的付出能够为公众所见,为公众所识。 * 在这一层次,无论是报告还是分析,发布的时间并不固定,使用的工具也无定法。 - - #### 层次四:掌握社区的动态 这一层次就在于倾听社区声音:通过观察社区活动,关注项目发展;跟进软件开发进度,据此采取合适的应对措施。 @@ -72,11 +65,9 @@ 层次四的目标在于保持科学严谨的态度,持续把握社区的发展情况及发展轨迹,引导社区朝着下一个层次迈进。 * 建立报告机制,运用分析工具,掌握社区动态。 - * 将社区的各项活动与社区成员的反响视作一种基准,用以比较社区内的其他活动。(译者注:由于译者能力有限,对原文本句所要表达内容的理解可能有误,故将原文附上以供参考:You can compare events in the community and the subsequent reactions of community members to a baseline and other events in the community.) + * 将社区的各项活动与社区成员的反响与基线和社区内的其他活动进行比较。 * 坚持倾听社区声音,形成对于社区更深刻的见解。 - - #### 层次五:维护社区,长久发展 最后一个层次就是依据社区各项指标,提高社区成员的参与度。 @@ -87,9 +78,7 @@ * 跟进这些变动,理解它们是如何通过各项指标和数据分析体现出来的。 * 针对社区维护者与开发者,制定服务等级协议和问责制度,为其设立参与度目标,确保项目整体顺利进行。 - - -### 结尾 +### 总结 开源社区管理者需要做到上述五个层次,保证透明度,才能构建起一个繁荣发展的社区。 @@ -100,7 +89,7 @@ via: https://opensource.com/article/22/2/transparency-open-source-communities 作者:[Emilio Galeano Gryciuk][a] 选题:[lujun9972][b] 译者:[aREversez](https://github.com/aREversez) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/published/20220219 Crop and resize photos on Linux with Gwenview.md b/published/202205/20220219 Crop and resize photos on Linux with Gwenview.md similarity index 100% rename from published/20220219 Crop and resize photos on Linux with Gwenview.md rename to published/202205/20220219 Crop and resize photos on Linux with Gwenview.md diff --git a/published/20220221 3 steps to start running containers today.md b/published/202205/20220221 3 steps to start running containers today.md similarity index 100% rename from published/20220221 3 steps to start running containers today.md rename to published/202205/20220221 3 steps to start running containers today.md diff --git a/published/20220327 Top 10 Linux Distributions for Programmers in 2022 -Featured.md b/published/202205/20220327 Top 10 Linux Distributions for Programmers in 2022 -Featured.md similarity index 100% rename from published/20220327 Top 10 Linux Distributions for Programmers in 2022 -Featured.md rename to published/202205/20220327 Top 10 Linux Distributions for Programmers in 2022 -Featured.md diff --git a/published/20220414 A guide to JVM parameters for Java developers.md b/published/202205/20220414 A guide to JVM parameters for Java developers.md similarity index 100% rename from published/20220414 A guide to JVM parameters for Java developers.md rename to published/202205/20220414 A guide to JVM parameters for Java developers.md diff --git a/published/20220419 Difference Between Ubuntu 22.04 and Ubuntu 20.04 LTS.md b/published/202205/20220419 Difference Between Ubuntu 22.04 and Ubuntu 20.04 LTS.md similarity index 100% rename from published/20220419 Difference Between Ubuntu 22.04 and Ubuntu 20.04 LTS.md rename to published/202205/20220419 Difference Between Ubuntu 22.04 and Ubuntu 20.04 LTS.md diff --git a/published/20220422 Documentation Isn’t Just Another Aspect of Open Source Development.md b/published/202205/20220422 Documentation Isn’t Just Another Aspect of Open Source Development.md similarity index 100% rename from published/20220422 Documentation Isn’t Just Another Aspect of Open Source Development.md rename to published/202205/20220422 Documentation Isn’t Just Another Aspect of Open Source Development.md diff --git a/published/20220423 5 Less Popular Features that Make Ubuntu 22.04 LTS an Epic Release.md b/published/202205/20220423 5 Less Popular Features that Make Ubuntu 22.04 LTS an Epic Release.md similarity index 100% rename from published/20220423 5 Less Popular Features that Make Ubuntu 22.04 LTS an Epic Release.md rename to published/202205/20220423 5 Less Popular Features that Make Ubuntu 22.04 LTS an Epic Release.md diff --git a/published/20220425 Exciting New Features Revealed for KDE Plasma 5.25- Take a Look Here.md b/published/202205/20220425 Exciting New Features Revealed for KDE Plasma 5.25- Take a Look Here.md similarity index 100% rename from published/20220425 Exciting New Features Revealed for KDE Plasma 5.25- Take a Look Here.md rename to published/202205/20220425 Exciting New Features Revealed for KDE Plasma 5.25- Take a Look Here.md diff --git a/published/20220425 Linux Mint Upgrade Tool - Here-s How it Works.md b/published/202205/20220425 Linux Mint Upgrade Tool - Here-s How it Works.md similarity index 100% rename from published/20220425 Linux Mint Upgrade Tool - Here-s How it Works.md rename to published/202205/20220425 Linux Mint Upgrade Tool - Here-s How it Works.md diff --git a/published/20220426 How to Upgrade to Pop OS 22.04 LTS from 21.10 -Step by Step.md b/published/202205/20220426 How to Upgrade to Pop OS 22.04 LTS from 21.10 -Step by Step.md similarity index 100% rename from published/20220426 How to Upgrade to Pop OS 22.04 LTS from 21.10 -Step by Step.md rename to published/202205/20220426 How to Upgrade to Pop OS 22.04 LTS from 21.10 -Step by Step.md diff --git a/published/20220427 10 Reasons to Run Linux in Virtual Machines.md b/published/202205/20220427 10 Reasons to Run Linux in Virtual Machines.md similarity index 100% rename from published/20220427 10 Reasons to Run Linux in Virtual Machines.md rename to published/202205/20220427 10 Reasons to Run Linux in Virtual Machines.md diff --git a/published/20220427 Bloomberg Open Sources Memray, A Python Memory Profiler.md b/published/202205/20220427 Bloomberg Open Sources Memray, A Python Memory Profiler.md similarity index 100% rename from published/20220427 Bloomberg Open Sources Memray, A Python Memory Profiler.md rename to published/202205/20220427 Bloomberg Open Sources Memray, A Python Memory Profiler.md diff --git a/published/20220427 Hands on With GNOME-s New Text Editor for Linux Users.md b/published/202205/20220427 Hands on With GNOME-s New Text Editor for Linux Users.md similarity index 100% rename from published/20220427 Hands on With GNOME-s New Text Editor for Linux Users.md rename to published/202205/20220427 Hands on With GNOME-s New Text Editor for Linux Users.md diff --git a/published/20220427 How I grew my product management career with open source.md b/published/202205/20220427 How I grew my product management career with open source.md similarity index 100% rename from published/20220427 How I grew my product management career with open source.md rename to published/202205/20220427 How I grew my product management career with open source.md diff --git a/published/20220427 Shortwave 3.0 is Here With UI Upgrades, Private Stations, and More Improvements.md b/published/202205/20220427 Shortwave 3.0 is Here With UI Upgrades, Private Stations, and More Improvements.md similarity index 100% rename from published/20220427 Shortwave 3.0 is Here With UI Upgrades, Private Stations, and More Improvements.md rename to published/202205/20220427 Shortwave 3.0 is Here With UI Upgrades, Private Stations, and More Improvements.md diff --git a/published/20220428 Archinstall-s New Menu System Makes it Even Easier to Install Arch Linux.md b/published/202205/20220428 Archinstall-s New Menu System Makes it Even Easier to Install Arch Linux.md similarity index 100% rename from published/20220428 Archinstall-s New Menu System Makes it Even Easier to Install Arch Linux.md rename to published/202205/20220428 Archinstall-s New Menu System Makes it Even Easier to Install Arch Linux.md diff --git a/published/20220428 Elon Musk’s Plan To Open Source The Twitter Algorithm Has Flaws.md b/published/202205/20220428 Elon Musk’s Plan To Open Source The Twitter Algorithm Has Flaws.md similarity index 100% rename from published/20220428 Elon Musk’s Plan To Open Source The Twitter Algorithm Has Flaws.md rename to published/202205/20220428 Elon Musk’s Plan To Open Source The Twitter Algorithm Has Flaws.md diff --git a/published/20220428 How to Remove Snap Packages in Ubuntu Linux.md b/published/202205/20220428 How to Remove Snap Packages in Ubuntu Linux.md similarity index 100% rename from published/20220428 How to Remove Snap Packages in Ubuntu Linux.md rename to published/202205/20220428 How to Remove Snap Packages in Ubuntu Linux.md diff --git a/published/202205/20220428 Why use Apache Druid for your open source analytics database.md b/published/202205/20220428 Why use Apache Druid for your open source analytics database.md new file mode 100644 index 0000000000..cda559a86e --- /dev/null +++ b/published/202205/20220428 Why use Apache Druid for your open source analytics database.md @@ -0,0 +1,83 @@ +[#]: subject: "Why use Apache Druid for your open source analytics database" +[#]: via: "https://opensource.com/article/22/4/apache-druid-open-source-analytics" +[#]: author: "David Wang https://opensource.com/users/davidwang" +[#]: collector: "lkxed" +[#]: translator: "unigeorge" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14608-1.html" + +为什么推荐开源分析数据库 Apache Druid +====== + +> 对用户而言,优秀的对外数据分析工具非常关键,因此选择合适的数据架构就显得尤为重要。 + +![](https://img.linux.net.cn/data/attachment/album/202205/18/154417bvakcquzn2ahv4ua.jpg) + +现如今,数据分析不再是仅面向内部开发人员。当为业务方构建数据分析系统时,你需要确认哪种数据库后端是最合适的。 + +程序员的本能可能是“选用自己了解的数据库(例如 PostgreSQL 或 [MySQL][2])”。数据仓库也可能会扩展核心的 BI 仪表板和报告之外的功能,不过对业务方的数据分析支持仍是其重要功能之一,因此要选择合适的工具来保证此功能的性能。 + +问题的关键点在于用户体验,以下是对外支持数据分析工作的一些关键技术讨论点(以 Apache Druid 为例)。 + +### 低延迟特性 + +一直在队列中等待查询会让人很恼火。与延迟有关的因素包括数据量、数据库的处理能力、用户和 API 调用的数量,以及数据库支持查询应用的能力。 + +当数据量比较大时,有一些方法可以基于任意在线分析处理(OLAP)数据库构建交互式数据体验,但或多或少都有一些其他方面的牺牲。预计算查询会对性能要求较高,还会使架构变得僵化。预聚合处理会使数据粒度变大。将数据时间限制在近期的处理方式,会使得数据完整性得不到保证。 + +一个“不妥协”的解决方案是选择专为大规模交互而构建的优化架构和数据格式,[Apache Druid][3] 正是这样一个旨在支持现代分析程序的实时数据库。 + +* 首先,Druid 具备特有的分布式弹性架构,可将数据从共享数据层预取到近乎无限容量的数据服务器集群中。这种架构与诸如云数据仓库这样的解耦查询引擎相比,具有更快的性能,因为它不需要移动数据,并且比像 PostgreSQL 和 MySQL 这样的纵向扩展数据库具有更高的可扩展性。 +* 其次,Druid 采用内置于数据格式中的自动多级索引来驱动每个内核去支持更多查询操作。在常规 OLAP 列格式基础之上,还增加了全局索引、数据字典和位图索引,这可以最大化利用 CPU 周期,加快处理速度。 + +### 高可用性 + +如果开发团队为内部报告搭建了一个后端,那么中断几分钟甚至更长时间真的很严重吗?实际上并不是的。所以在典型 OLAP 数据库和数据仓库中,计划外的停机和维护是可以允许的。 + +但是如果你们团队构建了一个对外的供客户使用的分析应用程序,如果发生数据中断,会严重影响客户满意度、收入,当然还有你的周末休息时间。这就是为什么弹性(高可用性和数据持久性)需要成为对外分析应用程序数据库中的首要考虑因素。 + +考虑弹性就需要考虑设计标准。节点或集群范围的故障能完全避免吗?丢失数据的后果有多严重?保障应用程序和数据需要涉及哪些工作? + +关于服务器故障,保证弹性的常规方法是多节点服务以及 [备份机制][4]。但如果你是为客户构建应用程序,则对数据丢失的敏感性要高得多。*偶尔的*备份并不能完全解决这一问题。 + +Apache Druid 的核心架构内置了该问题的解决方案,本质是一种强大而简单的弹性方法,旨在保证承受任何变故都不会丢失数据(即使是刚刚发生的事件)。 + +Druid 基于对象存储中共享数据的自动、多级复制实现高可用性(HA)和持久性。它实现了用户期望的 HA 特性以及持续备份机制,即使整个集群出现问题,也可以自动保护和恢复数据库的最新状态。 + +### 多用户 + +一个好的应用应该同时兼备大用户量和“引人入胜”的体验,因此为高并发构建后端非常重要。你肯定不想看到因为应用挂掉而让客户沮丧。内部报告的架构不必考虑这点,因为并发用户数量要小得多且有限。所以现实是,用于内部报告的数据库可能并不适合高并发应用程序。 + +为高并发构建数据库主要在于取得 CPU 使用率、可伸缩性和成本之间的平衡点。解决并发问题的通常做法是投入更多硬件成本。逻辑上说,只要增加 CPU 的数量,就能够同时进行更多的查询操作。虽然事实确实如此,但成本的增加是不可忽视的。 + +更好的方法还是使用像 Apache Druid 这样的数据库,它具有优化的存储和查询引擎,可以降低 CPU 使用率。我们强调的关键词是“优化”。数据库不应该读取它不需要的数据。Apache Druid 可以让基础设施在同一时间跨度内为更多查询操作提供服务。 + +节省成本是开发人员使用 Apache Druid 构建外部分析应用程序的一个重要原因。Apache Druid 具有高度优化的数据格式,结合了从搜索引擎世界借鉴来的多级索引以及数据缩减算法,可以最大限度地减少所需的处理量。 + +最终表现就是 Apache Druid 提供了其他数据库不可比拟的处理效率。它可以支持每秒数十到数千跨度的 TB 甚至 PB 级别的查询。 + +### 着眼当下,预见未来 + +分析应用程序对于用户而言至关重要,所以要构建正确的数据架构。 + +你肯定不想一开始就选择了一个错误的数据库,然后在后续扩展时面对诸多令人头疼的问题。幸运的是,Apache Druid 可以从小规模开始,并在之后轻松扩展以支持任何可以想象的应用程序。Apache Druid 有 [优秀的官方文档][5],当然它是开源的,所以不妨尝试一下并,快速上手吧。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/4/apache-druid-open-source-analytics + +作者:[David Wang][a] +选题:[lkxed][b] +译者:[unigeorge](https://github.com/unigeorge) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/davidwang +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/metrics_data_dashboard_system_computer_analytics.png +[2]: https://opensource.com/downloads/mariadb-mysql-cheat-sheet +[3]: https://druid.apache.org/ +[4]: https://opensource.com/article/19/3/backup-solutions +[5]: https://druid.apache.org/docs/latest/design/ diff --git a/published/20220429 Detect a Phishing URL Using Machine Learning in Python.md b/published/202205/20220429 Detect a Phishing URL Using Machine Learning in Python.md similarity index 100% rename from published/20220429 Detect a Phishing URL Using Machine Learning in Python.md rename to published/202205/20220429 Detect a Phishing URL Using Machine Learning in Python.md diff --git a/translated/tech/20220430 Hands On With GNOME’s New Terminal for Linux Users.md b/published/202205/20220430 Hands On With GNOME’s New Terminal for Linux Users.md similarity index 64% rename from translated/tech/20220430 Hands On With GNOME’s New Terminal for Linux Users.md rename to published/202205/20220430 Hands On With GNOME’s New Terminal for Linux Users.md index c4e1cc3e08..6e2984b1e5 100644 --- a/translated/tech/20220430 Hands On With GNOME’s New Terminal for Linux Users.md +++ b/published/202205/20220430 Hands On With GNOME’s New Terminal for Linux Users.md @@ -3,60 +3,76 @@ [#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" [#]: collector: "lkxed" [#]: translator: "lkxed" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14595-1.html" -上手体验 GNOME 为 Linux 用户带来的新终端 +GNOME 新终端程序尝鲜 ====== 几天前,我分享了我 [对新 GNOME 文本编辑器的体验][1],它是原编辑器 Gedit 的替代品。 -但它并不是唯一的应用程序替代品。GNOME 42 还有一个新的终端,叫做 [控制台Console][2]。 +但它并不是唯一的应用程序替代品。GNOME 42 还有一个新的终端,叫做 [控制台][2]Console。 让我来分享一下 GNOME 提供的这个新终端的新功能,以及它的使用体验吧! -### Console:GNOME 的新终端模拟器 +### 控制台:GNOME 的新终端模拟器 -这个新应用程序的目标是提供一个“简单的用户友好的终端模拟器”。它确实“简单”,因为它没有提供以往 GNOME 终端下用户习惯的许多功能。 +这个新应用程序的目标是提供一个“简单的、用户友好的终端模拟器”。它确实“简单”,因为它没有提供以往 GNOME 终端下用户习惯的许多功能。 后面我会继续谈这个话题。让我们先看看 GNOME 控制台的新功能。 #### 桌面通知 -Ubuntu 的 GNOME 终端从来没有这个功能,不过我在 elementary 和 Fedora 等发行版中看到过。 +Ubuntu 上的 GNOME 终端从来没有这个功能,不过我在 elementary 和 Fedora 等发行版中看到过。 这是一个很方便的功能,当一个长期运行的命令执行完毕时,终端会发送一个桌面通知。 ![GNOME 控制台的通知][3] -如果你在命令运行的同时,需要做其他事情,那么得到命令完成的通知有助于你保持工作效率。 +如果你在命令正在运行的同时,需要做其他事情,那么得到命令完成的通知有助于你保持工作效率。 -#### 进行 root 操作时改变窗口颜色 +#### 进行 root 和 SSH 操作时改变窗口颜色 这很可能是我在其他终端程序中没有见过的独特功能。 -当你使用带有 sudo 或 [切换到根用户][4] 的命令时,应用程序窗口会变成红色。 +当你用 `sudo` 运行命令或 [切换到 root 用户][4] 时,应用程序窗口会变成红色。 ![GNOME 控制台在使用 sudo 或 root 用户时变成红色][5] 我想它的目的是警告用户他们正在使用高级权限,因此在运行命令时要小心。 +同样,如果你使用 SSH 连接到一个远程服务器,终端应用程序窗口的颜色会变成紫色。 + +![GNOME 控制台在 SSH 连接时变成紫色][5a] + +这也是提醒用户命令正在远程 Linux 机器上运行,而不是在本地机器上运行的好方法。 + #### 主题 遵循新的设计准则,控制台提供了三种主题:浅色、深色和跟随系统。 ![GNOME 控制台主题][6] -控制台默认使用系统主题,它根据你的操作系统主题而改变中终端配色。如果你不想改变系统主题,你可以使用控制台的浅色/深色选项。 +控制台默认使用系统主题,它根据你的操作系统的深浅主题而改变终端配色。你也可以单独使用控制台的浅色/深色主题,而不用改变系统主题。 关于主题的内容差不多就这些。你可以进行的 [终端定制][7] 并不多。 +### 关闭终端窗口时更好的警告 + +当你试图关闭一个仍在运行的命令时,老的 GNOME 终端也会显示一个警告。 + +![旧版 GNOME 终端中的警告][7a] + +这个警告在新的 GNOME 控制台中稍好一些,因为它也会显示正在运行的命令。 + +![新版 GNOME 控制台中的警告][7b] + #### 透明界面 GNOME 控制台默认有一个透明界面。在正常模式下,你可以透过它看到一点背景。 -例如,你可以从背景程序中看到一些模糊的文字。 +例如,你可以看到背景程序中的一些模糊的文字。 ![GNOME 控制台的透明界面][8] @@ -80,19 +96,19 @@ GNOME 控制台默认有一个透明界面。在正常模式下,你可以透 ### 在 Ubuntu 22.04 上安装 GNOME 控制台 -如果你的发行版使用了未经修改的 GNOME 42,那么它应该默认提供了新终端。 +如果你的发行版使用了原版 GNOME 42,那么它应该默认提供了新终端。 尽管 Ubuntu 22.04 使用的是 GNOME 42,但它仍然使用旧的 GNOME 终端。不过,你可以使用下面的命令来安装新的控制台。 -```shell +``` sudo apt install gnome-console ``` ### 总结 -你可能会想,既然我们已经有了一个更好的、功能更强的 GNOME 终端,为什么还要开发一个新的控制台呢?这是因为 GNOME 有了新的设计指南。改造这些应用程序的旧代码库太复杂了,可能也不不大划算,从头开始写反而会更容易,因此你会看到更多的“新的” GNOME 应用程序,如控制台和文本编辑器。 +你可能会想,既然我们已经有了一个更好的、功能更强的 GNOME 终端,为什么还要开发一个新的控制台呢?这是因为 GNOME 有了新的设计指南。改造这些应用程序的旧代码库太复杂了,可能也不大划算,从头开始写反而会更容易,因此你会看到更多的“新的” GNOME 应用程序,如控制台和文本编辑器。 -由于这个新的应用程序的目标是让事情更简单,因此它没有提供很多功能。你不能定制它,改变颜色、字体等。由于不支持定制,所以也不需要配 +由于这个新的应用程序的目标是让事情更简单,因此它没有提供很多功能。你不能定制它,改变颜色、字体等。由于不支持定制,所以也不需要配置文件。 对于很少使用终端的人来说,控制台已经够用了。不过,我认为应该增加在输入密码时显示星号的功能。其他 [面向初学者的发行版][12],如 Mint,就使用了这个功能,从而避免对 Linux 新手用户造成困扰。 @@ -105,7 +121,7 @@ via: https://itsfoss.com/gnome-console/ 作者:[Abhishek Prakash][a] 选题:[lkxed][b] 译者:[lkxed](https://github.com/lkxed) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -116,8 +132,11 @@ via: https://itsfoss.com/gnome-console/ [3]: https://itsfoss.com/wp-content/uploads/2022/04/notification-from-gnome-console.png [4]: https://itsfoss.com/root-user-ubuntu/ [5]: https://itsfoss.com/wp-content/uploads/2022/04/GNOME-Console-turns-red-when-using-sudo-or-root-800x442.webp +[5a]: https://itsfoss.com/wp-content/uploads/2022/05/gnome-console-color-change-ssh.png [6]: https://itsfoss.com/wp-content/uploads/2022/04/themes-gnome-console.png [7]: https://itsfoss.com/customize-linux-terminal/ +[7a]: https://itsfoss.com/wp-content/uploads/2022/05/warning-in-old-gnome-terminal.png +[7b]: https://itsfoss.com/wp-content/uploads/2022/05/warning-in-new-gnome-console.png [8]: https://itsfoss.com/wp-content/uploads/2022/04/transparent-gnome-console.png [9]: https://itsfoss.com/wp-content/uploads/2022/04/tabs-GNOME-Console.png [10]: https://itsfoss.com/wp-content/uploads/2022/04/search-GNOME-Console.png diff --git a/published/20220430 How to Install h.264 decoder on Ubuntu Linux.md b/published/202205/20220430 How to Install h.264 decoder on Ubuntu Linux.md similarity index 100% rename from published/20220430 How to Install h.264 decoder on Ubuntu Linux.md rename to published/202205/20220430 How to Install h.264 decoder on Ubuntu Linux.md diff --git a/published/20220430 Rust-based Redox OS 0.7.0 Arrives with Enhanced Hardware Support.md b/published/202205/20220430 Rust-based Redox OS 0.7.0 Arrives with Enhanced Hardware Support.md similarity index 100% rename from published/20220430 Rust-based Redox OS 0.7.0 Arrives with Enhanced Hardware Support.md rename to published/202205/20220430 Rust-based Redox OS 0.7.0 Arrives with Enhanced Hardware Support.md diff --git a/published/202205/20220501 How to Install Classic GNOME Flashback in Ubuntu 22.04 LTS.md b/published/202205/20220501 How to Install Classic GNOME Flashback in Ubuntu 22.04 LTS.md new file mode 100644 index 0000000000..67e46d9b20 --- /dev/null +++ b/published/202205/20220501 How to Install Classic GNOME Flashback in Ubuntu 22.04 LTS.md @@ -0,0 +1,98 @@ +[#]: subject: "How to Install Classic GNOME Flashback in Ubuntu 22.04 LTS" +[#]: via: "https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "turbokernel" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14627-1.html" + +Ubuntu 22.04 LTS 中安装经典 GNOME Flashback 指南 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/23/151318xi8c3qipphg8xz0i.jpg) + +> 关于如何在最新的 UBUNTU 22.04 LTS 中安装旧的经典 GNOME Flashback 的快速指南。 + +[GNOME Flashback][1](又名 classic GNOME)是旧 GNOME 3 shell 的一个分支,它使用早期 GNOME 2 技术的布局和原则。它的速度快如闪电,并且在设计上非常轻量级。因此,它非常适合几十年前的老旧硬件。 + +随着带有现代 GNOME 42 的 [Ubuntu 22.04 LTS][2] 的发布,有必要寻找轻量级的桌面环境选项。 + +此外,GNOME Flashback 很容易安装在现代 Ubuntu Linux 中,你仍然可以享受 Ubuntu 性能而不必关心 GNOME 42、GTK4、libadwaita 之类的东西。 + +### 在 Ubuntu 22.04 LTS 中下载并安装经典 GNOME Flashback + +按照以下步骤在 Ubuntu 22.04 LTS 中下载并安装经典 GNOME Flashback(Metacity)。 + +在 Ubuntu 22.04 LTS 中打开终端(CTRL+ALT+T)并运行以下命令。安装大小约为 61MB。 + +``` +sudo apt update +sudo apt install gnome-session-flashback +``` + +![Install GNOME Classic Flashback Metacity in Ubuntu 22.04 LTS][3] + +最后,安装完成后,退出。重新登录时,在登录选项中使用经典的 GNOME Flashback(Metacity) 。 + +![Choose GNOME Classic while logging in][3a] + +### 经典 GNOME Flashback 的特点 + +首先,当你登录时,你将体验到传统的 GNOME 技术,它已被证明具有良好的生产力,并且比今天的技术快得多。 + +在顶部有旧版的面板,左侧是应用菜单,而系统托盘位于桌面的右上方。应用程序菜单显示所有已安装的应用和软件快捷方式,你可以在工作流程中轻松浏览。 + +此外,在右侧部分,系统托盘具有默认小部件,例如网络、音量控制、日期和时间以及关机菜单。 + +![Classic GNOME Flashback Metacity in Ubuntu 22.04 LTS][3b] + +底部面板包含打开的窗口和工作区切换器的应用列表。默认情况下,它为你提供四个工作区供你使用。 + +此外,你可以随时更改顶部面板的设置以自动隐藏、调整面板大小和背景颜色。 + +除此之外,你可以通过 `ALT + 右键点击` 顶部面板添加任意数量的旧版小程序。 + +![Panel Context Menu][3c] + +![Add to panel widgets][3d] + +### 经典 GNOME 的性能 + +首先,磁盘空间占用极小,仅安装 61 MB。我的测试使用了大约 28% 的内存,其中大部分被其他进程占用。猜猜是谁?是的,是 snap-store(又名 Ubuntu 软件)。 + +因此,总体而言,它非常轻巧,内存(仅 28 MB)和 CPU(0.1%)占用空间非常小。 + +![Performance of GNOME Classic in Ubuntu 22.04][3e] + +此外,假设你将其与同样使用相同技术的 Ubuntu MATE 进行比较。在这种情况下,它比 MATE 更轻量,因为你不需要任何额外的 MATE 应用及其用于通知、主题和其他附加资源的软件包。 + +### 结束语 + +我希望本指南在你决定在 Ubuntu 22.04 LTS Jammy Jellyfish 中安装经典 GNOME 之前帮助你获得必要的信息。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[turbokernel](https://github.com/turbokernel) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://wiki.archlinux.org/index.php/GNOME/Flashback +[2]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Install-GNOME-Classic-Flashback-Metacity-in-Ubuntu-22.04-LTS.jpg +[3a]: https://www.debugpoint.com/wp-content/uploads/2022/05/Choose-GNOME-Classic-while-loggin-in.jpg +[3b]: https://www.debugpoint.com/wp-content/uploads/2022/05/Classic-GNOME-Flashback-Metacity-in-Ubuntu-22.04-LTS.jpg +[3c]: https://www.debugpoint.com/wp-content/uploads/2020/04/Panel-Context-Menu.png +[3d]: https://www.debugpoint.com/wp-content/uploads/2020/04/Add-to-panel-widgets.png +[3e]: https://www.debugpoint.com/wp-content/uploads/2022/05/Performance-of-GNOME-Classic-in-Ubuntu-22.04.jpg +[4]: https://t.me/debugpoint +[5]: https://twitter.com/DebugPoint +[6]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[7]: https://facebook.com/DebugPoint diff --git a/translated/talk/20220502 How to make community recognition more inclusive.md b/published/202205/20220502 How to make community recognition more inclusive.md similarity index 59% rename from translated/talk/20220502 How to make community recognition more inclusive.md rename to published/202205/20220502 How to make community recognition more inclusive.md index 96ee56f7ba..c53b03da45 100644 --- a/translated/talk/20220502 How to make community recognition more inclusive.md +++ b/published/202205/20220502 How to make community recognition more inclusive.md @@ -3,40 +3,40 @@ [#]: author: "Ray Paik https://opensource.com/users/rpaik" [#]: collector: "lkxed" [#]: translator: "PeterPan0106" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14590-1.html" 如何使社区认可更加包容 ====== -抛开具体的工作量,我们认为所有的贡献都弥足珍贵。当所有社区贡献者都能获得家庭般的赞赏时,他们会更倾向于继续为社区添砖加瓦。 -![Global citizens unite to improve housing with open design and development][1] -(图源: Opensource.com) +> 抛开具体的工作量,我们认为所有的贡献都弥足珍贵。当所有社区贡献者都能获得家庭般的赞赏时,他们会更倾向于继续为社区添砖加瓦。 -给予一个优秀的工作足够的认同和赞赏是我作为一个社区管理员最喜欢的事。我不但有机会能够对贡献者表示感激,同时还能为社区设立一个优秀的榜样。认同和赞赏可以是为了庆祝一个成就,例如有人帮助其他成员加入社区、减少技术债务或者贡献了激动人心的新功能。 +![](https://img.linux.net.cn/data/attachment/album/202205/13/234756gi7q42f2mgz5mg44.png) -但是,用来确定贡献量的规则可能会有难以预料的后果。例如某些社区管理员利用如下图所示的图表来表彰贡献,过度地强调了pull requests以及对代码库的贡献量。 +给予一个优秀的工作足够的认同和赞赏是我作为一个社区管理员最喜欢做的事。我不但有机会能够对贡献者表示感激,同时还能为社区设立一个优秀的榜样。认同和赞赏可以是为了庆祝一个成就,例如有人帮助其他成员加入社区、减少技术债务或者贡献了激动人心的新功能。 + +但是,用来确定贡献量的规则可能会有难以预料的后果。例如某些社区管理员利用如下图所示的图表来表彰贡献,过度地强调了拉取请求(PR)以及对代码库的贡献量。 ![A bar graph ranking 15 contributors according the the number of PRs merged in a year, ranging from 250 at the top to 50 at the bottom.][2] -(图源: Ray Paik, CC BY-SA 4.0) ![A bar graph ranking 10 contributing organizations by number of contributions, ranging from more than 15 to less than 5][3] -(图源: Ray Paik, CC BY-SA 4.0) -使用这样的方法进行表彰会产生三个问题。首先,这样过度聚焦了对代码库的贡献。早年间,开源项目主要吸引开发者参与,所以自然而然许多贡献是围绕代码的。现在,越来越多的非开发者正在积极参与社区项目(例如通过用户组、会议和用户本身生产的内容),他们的大多数贡献在代码库以外的地方。这些贡献将不会出现在诸如*年度合并PR数量*这样的表格上。 +使用这样的方法进行表彰会产生三个问题。 -其次,过度聚焦贡献指标(指那些易于用数字统计的),最终会演变为更大的数量甚至超越了更好的质量甚至是影响力。在上图的*贡献组织排行榜*中,大型组织因为具有更多的可用人力,相对于小型组织就会有更为显著的优势。通过对大型组织在数量上的表彰将可能导致小型组织感到权利被剥夺了。 +首先,这样过度关注了对代码库的贡献。早年间,开源项目主要吸引开发者参与,所以自然而然许多贡献是围绕代码的。现在,越来越多的非开发者正在积极参与社区项目(例如通过用户组、会议和用户生产的内容),他们的大多数贡献在代码库以外的地方。这些贡献将不会出现在诸如 *年度合并 PR 数量* 这样的表格上。 -最终,尽管本意并非如此,但许多人都会把这些数据看做对个人或组织影响力的排名。 +其次,过度关注贡献指标(指那些易于用数字统计的),最终会演变为奖励数量而不是质量,甚至影响力。在上图的 *贡献组织排行榜* 中,大型组织因为具有更多的可用人力,相对于小型组织就会有更为显著的优势。通过对大型组织在数量上的表彰将可能导致小型组织的人感到权利被剥夺了。 + +最后,尽管本意并非如此,但许多人都会把这些数据看做对个人或组织影响力的排名。 基于此,我们最好避免仅仅通过指标数量来表彰对社区的贡献。 ### 令社区表彰更有意义 -如何让社区表彰更为包容并且能够覆盖不同的贡献形式呢?一些通信频道例如Discord、IRC、mailing list和Slack可以很好的表明一个成员的活跃度及其感兴趣的领域。例如每当我看到一些人热衷于解答问题或者帮助新用户时,我会十分开心。这些贡献并不会出现在社区的数据板上,但是让这些贡献得到应有的认同和感谢并广为人知是十分重要的。 +如何让社区表彰更为包容并且能够覆盖不同的贡献形式呢?诸如 Discord、IRC、邮件列表和Slack 等交流渠道可以很好的表明一个成员的活跃度及其感兴趣的领域。例如每当我看到一些人热衷于解答问题或者帮助新用户时,我会十分开心。这些贡献并不会出现在社区的数据板上,但是让这些贡献得到应有的认同和感谢并广为人知是十分重要的。 -社区数据板显然是开源社区重要的工具。但对于花费在建设数据板的时间上,我锱铢必较。迟早你会发现,不是所有的东西都可以有清晰的标准进行度量,即便你能够想出规则量化一件事,你也依然会发现这些规则具有局限性。 +社区数据板显然是开源社区重要的工具。但是我提醒大家不要花费太多时间在建设数据板上。迟早你会发现,不是所有的东西都可以有清晰的标准进行度量,即便你能够想出规则量化一件事,你也依然会发现这些规则具有局限性。 为了获取更多的关于贡献的信息,我经常会安排社区成员茶话会。这些对话经常能够告诉我他们做出贡献的原因、有多少工作量以及谁同时也参与进来了等等。 @@ -48,7 +48,7 @@ 让其他成员参与到认可的过程中也是一个很好的主意。一旦社区达到了一定的规模,便很难事无巨细地知晓一切细节。如果引入一个成员提名机制则会很好地让大家注意到优秀的贡献。如果你的社区拥有十分正式的奖项,例如在年度会议或聚会上颁发的奖项,请让社区成员参与提名和投票。这不仅提供了成员参与进来的平台,也令这些来自成员投票的奖项更有意义。 -最后给予认同和感谢也是一个认识成员并加深了解的重要机会。有时候颁奖仿佛在进行交易:“你做了X,所以我们给你颁发了Y”。多在介绍成员上花些时间,将令成员感到更受重视并加强归属感。 +最后给予认同和感谢也是一个认识成员并加深了解的重要机会。有时候颁奖仿佛在进行交易:“你做了某件事,所以我们给你颁发了某个奖励”。多在介绍成员上花些时间,将令成员感到更受重视并加强归属感。 ### 社区认可令社区更为健康 @@ -61,7 +61,7 @@ via: https://opensource.com/article/22/5/inclusive-community-recognition 作者:[Ray Paik][a] 选题:[lkxed][b] 译者:[PeterPan0106](https://github.com/PeterPan0106) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/published/20220502 Microsoft Joins The Open 3D Foundation For Open Source 3D Development.md b/published/202205/20220502 Microsoft Joins The Open 3D Foundation For Open Source 3D Development.md similarity index 100% rename from published/20220502 Microsoft Joins The Open 3D Foundation For Open Source 3D Development.md rename to published/202205/20220502 Microsoft Joins The Open 3D Foundation For Open Source 3D Development.md diff --git a/published/20220502 Tools You Can Use for the Security Audit of IoT Devices.md b/published/202205/20220502 Tools You Can Use for the Security Audit of IoT Devices.md similarity index 100% rename from published/20220502 Tools You Can Use for the Security Audit of IoT Devices.md rename to published/202205/20220502 Tools You Can Use for the Security Audit of IoT Devices.md diff --git a/published/20220502 Ubuntu’s Unity Desktop Still Lives- Version 7.6 is Available for Testing After 6 Years.md b/published/202205/20220502 Ubuntu’s Unity Desktop Still Lives- Version 7.6 is Available for Testing After 6 Years.md similarity index 100% rename from published/20220502 Ubuntu’s Unity Desktop Still Lives- Version 7.6 is Available for Testing After 6 Years.md rename to published/202205/20220502 Ubuntu’s Unity Desktop Still Lives- Version 7.6 is Available for Testing After 6 Years.md diff --git a/published/20220503 Nvidia Begins To Set The Foundation For Future Open And Parallel Coding.md b/published/202205/20220503 Nvidia Begins To Set The Foundation For Future Open And Parallel Coding.md similarity index 100% rename from published/20220503 Nvidia Begins To Set The Foundation For Future Open And Parallel Coding.md rename to published/202205/20220503 Nvidia Begins To Set The Foundation For Future Open And Parallel Coding.md diff --git a/published/20220503 Package Analysis Examines Packages In Open Source Repositories In Real Time.md b/published/202205/20220503 Package Analysis Examines Packages In Open Source Repositories In Real Time.md similarity index 100% rename from published/20220503 Package Analysis Examines Packages In Open Source Repositories In Real Time.md rename to published/202205/20220503 Package Analysis Examines Packages In Open Source Repositories In Real Time.md diff --git a/published/20220504 ESI Group Collaborates With ENSAM, Open Sources Its “Inspector” Software.md b/published/202205/20220504 ESI Group Collaborates With ENSAM, Open Sources Its “Inspector” Software.md similarity index 100% rename from published/20220504 ESI Group Collaborates With ENSAM, Open Sources Its “Inspector” Software.md rename to published/202205/20220504 ESI Group Collaborates With ENSAM, Open Sources Its “Inspector” Software.md diff --git a/published/20220504 Firefox 100 Marks 17 Years of Development with Interesting Upgrades.md b/published/202205/20220504 Firefox 100 Marks 17 Years of Development with Interesting Upgrades.md similarity index 100% rename from published/20220504 Firefox 100 Marks 17 Years of Development with Interesting Upgrades.md rename to published/202205/20220504 Firefox 100 Marks 17 Years of Development with Interesting Upgrades.md diff --git a/published/20220504 How I manage my own virtual network with ZeroTier.md b/published/202205/20220504 How I manage my own virtual network with ZeroTier.md similarity index 100% rename from published/20220504 How I manage my own virtual network with ZeroTier.md rename to published/202205/20220504 How I manage my own virtual network with ZeroTier.md diff --git a/published/20220504 Microsoft’s 3D Movie Maker, First Released In 1995, Is Now Open Source.md b/published/202205/20220504 Microsoft’s 3D Movie Maker, First Released In 1995, Is Now Open Source.md similarity index 100% rename from published/20220504 Microsoft’s 3D Movie Maker, First Released In 1995, Is Now Open Source.md rename to published/202205/20220504 Microsoft’s 3D Movie Maker, First Released In 1995, Is Now Open Source.md diff --git a/published/20220504 elementary OS 7 Code Name Revealed. Here are the Details.md b/published/202205/20220504 elementary OS 7 Code Name Revealed. Here are the Details.md similarity index 100% rename from published/20220504 elementary OS 7 Code Name Revealed. Here are the Details.md rename to published/202205/20220504 elementary OS 7 Code Name Revealed. Here are the Details.md diff --git a/published/202205/20220505 Experiment with containers and pods on your own computer.md b/published/202205/20220505 Experiment with containers and pods on your own computer.md new file mode 100644 index 0000000000..f7d6c78725 --- /dev/null +++ b/published/202205/20220505 Experiment with containers and pods on your own computer.md @@ -0,0 +1,87 @@ +[#]: subject: "Experiment with containers and pods on your own computer" +[#]: via: "https://opensource.com/article/22/5/containers-pods-101-ebook" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14591-1.html" + +在自己的电脑上实验容器和荚 +====== + +> 通过这篇新的可下载指南开始探索容器技术的要领。 + +![](https://img.linux.net.cn/data/attachment/album/202205/14/102808n8u3pkff174431v7.jpg) + +在电视剧 《太空堡垒卡拉狄加Battlestar Galactica》中,这艘名副其实的巨型飞船其实并没有做什么。它是船员们坚定的庇护所,是战略和协调的中心联络点,也是资源管理的安全场所。而 卡布里安毒蛇号Caprican Vipers 这种单人的独立太空船,出去对付邪恶的赛昂人Cylons和其他太空中的危险。他们也从不只派一两艘毒蛇号出去。他们派了很多。这许许多多的冗余的飞船具有基本相同的能力和目的,但由于它们非常灵活和数量众多,它们总是能够处理每个星期都在威胁战星的任何问题。 + +如果你认为你感到这像是一个正在发展中的比喻,那么你是对的。现代的“云”大而无当,是分布在很远距离的大量基础设施的集合体。它具有强大的能力,但如果你将其视为普通计算机,就会浪费了它的大部分能力。当你想要处理来自数百万个输入源的大量数据时,把你的解决方案(无论它是采用应用、网站、数据库、服务器还是其他形式)打包起来,并发送该解决方案的微小镜像来处理数据集群,实际上是更有效的。当然,这些都是 “容器container”,它们是云的劳动力。它们是你发送来处理服务请求的小型解决方案工厂,并且由于你可以根据任何给定时间传入的请求生成所需要的数量,因此理论上它们是取之不尽的。 + +### 在家里使用容器 + +如果你没有大量的传入请求需要处理,你可能会想知道容器给你带来什么好处。不过,在个人电脑上使用容器确实有其用途。 + +#### 容器作为虚拟环境 + +通过 Podman、LXC 和 Docker 等工具,你可以像以往运行虚拟机一样运行容器。不过,与虚拟机不同,容器没有因模拟固件和硬件而产生的开销。 + +你可以从公共仓库下载容器镜像,启动一个最小化的 Linux 环境,并将其作为命令或开发的测试场所。例如,假设你想试试你在 Slackware Linux 上构建的一个应用。首先,在仓库中搜索一个合适的镜像: + +``` +$ podman search slackware +``` + +然后选择一个镜像,作为你的容器的基础: + +``` +$ podman run -it --name slackware vbatts/slackware +sh-4.3# grep -i ^NAME\= /etc/os-release +NAME=Slackware +``` + +### 在工作中使用容器 + +当然,容器不只是个精简的虚拟机。它们可以是针对为非常具体的需求提供的特定解决方案。如果你不熟悉容器,那么新系统管理员最常见的入门仪式之一可能会有所帮助:启动你的第一个 Web 服务器,但是在容器中。 + +首先,获取一个镜像。你可以使用 `podman search` 命令来搜索你喜欢的发行版,或者直接搜索你喜欢的 httpd 服务器。当使用容器时,我倾向于信任我在裸机上使用的相同发行版。 + +当你你找到一个镜像作为你的容器的基础,你就可以运行你的镜像。然而,正如这个术语所暗示的,容器是*封起来的*,所以如果你只是启动一个容器,你将无法访问标准的 HTTP 端口。你可以使用 `-p` 选项将一个容器端口映射到一个标准的网络端口: + +``` +$ podman run -it -p 8080:80 docker.io/fedora/apache:latest +``` + +现在看看你本地主机上的 8080 端口: + +``` +$ curl localhost:8080 +Apache +``` + +成功了。 + +### 了解更多 + +容器拥有比模仿虚拟机更多的潜力。你可以将它们分组在 “pod” 中,构建复杂应用的自动部署,启动冗余服务以满足高需求等等。如果你刚刚开始使用容器,你可以 [下载我们最新的电子书][2] 来学习该技术,甚至学习创建一个 “pod”,以便你可以运行 WordPress 和数据库。 + +> **[下载我们最新的电子书][2]** + +(LCTT 译注:容器环境中使用的 “Pod” 一词,我以前根据容器相关术语多用航海领域名词比喻来将其译做“吊舱”,但也有同学表示了不同意见。根据 Kubernetes [文档][3],这个词来自对鲸鱼荚pod of whales豌豆荚pea pod的比喻,所以我觉得采用“荚”的翻译比较合适。—— wxy) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/containers-pods-101-ebook + +作者:[Seth Kenlon][a] +选题:[lkxed][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/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/tips_map_guide_ebook_help_troubleshooting_lightbulb_520.png +[2]: https://opensource.com/downloads/containers-pods-101-ebook +[3]: https://kubernetes.io/docs/concepts/workloads/pods/#:~:text=A%20Pod%20\(as%20in%20a,run%20in%20a%20shared%20context. \ No newline at end of file diff --git a/published/20220505 Open Source Developer Creates First-of-its-Kind Fund To Support Maintainers.md b/published/202205/20220505 Open Source Developer Creates First-of-its-Kind Fund To Support Maintainers.md similarity index 100% rename from published/20220505 Open Source Developer Creates First-of-its-Kind Fund To Support Maintainers.md rename to published/202205/20220505 Open Source Developer Creates First-of-its-Kind Fund To Support Maintainers.md diff --git a/published/20220505 Tails 5.0 Release is Based on Debian 11 With a New -Kleopatra- Tool.md b/published/202205/20220505 Tails 5.0 Release is Based on Debian 11 With a New -Kleopatra- Tool.md similarity index 100% rename from published/20220505 Tails 5.0 Release is Based on Debian 11 With a New -Kleopatra- Tool.md rename to published/202205/20220505 Tails 5.0 Release is Based on Debian 11 With a New -Kleopatra- Tool.md diff --git a/published/202205/20220505 Xebian – A Blend of Debian and Goodness of Xfce [Review].md b/published/202205/20220505 Xebian – A Blend of Debian and Goodness of Xfce [Review].md new file mode 100644 index 0000000000..ab7f56e1a4 --- /dev/null +++ b/published/202205/20220505 Xebian – A Blend of Debian and Goodness of Xfce [Review].md @@ -0,0 +1,100 @@ +[#]: subject: "Xebian – A Blend of Debian and Goodness of Xfce [Review]" +[#]: via: "https://www.debugpoint.com/2022/05/xebian-review-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14602-1.html" + +Xebian:Debian 与 Xfce 的完美结合 +====== + +> 这是一篇对漂亮而时尚的 Xebian Linux 发行版的快速评测。 + +Xebian 是一个基于 Xfce 桌面环境的 Linux 发行版,基于 Debian 不稳定分支(sid)。这个 Linux 发行版提供了一个带有基本的 Xfce 桌面的 Debian,而无需更改配置和附加软件包。因此,你不用在安装 Debian 和 Xfce 上花费太多时间就可以获得通常的开箱即用体验。 + +那么,如果你想尝试一下,这是对 Xebian 的快速评测。 + +![](https://www.debugpoint.com/wp-content/uploads/2022/05/Xebian-Desktop-with-Xfce.jpg) + +### Xebian 评测 + +#### 安装 + +考虑到林林总总的 ISO(迷你、自由、非自由等等),Debian 安装可能会有点复杂。毕竟,它是一个真正的“通用操作系统”。但是对于 Xebian,就轻松多了,因为它只有一个提供了 Debian sid 和 Xfce 的 64 位 ISO 文件。Xebian 使用 Debian 原生的安装程序,在你的物理系统或虚拟机中安装此发行版都相当简单。 + +在我的测试过程中,安装很顺利,没有报告任何问题。安装大约需要 4 分钟。 + +#### 外观和感觉 + +安装后,当你首次启动系统时,你会看到带有 Xebian 默认壁纸的漂亮登录页面。这个登录屏幕是标准的默认 Xfce 桌面登录页面。 + +![Xebian Logn Screen][1] + +首先,该桌面非常轻量,有着 Xfce 的干净外观。Xebian 就是一个在 Debian 上提供了完整 Xfce 桌面的 Linux 发行版。因此,唯一的区别是看起来不错的默认壁纸,以及默认的 Numix 主题(深色)。那些喜欢更传统外观的人也可以使用 Adwaita 和 Gerybird 主题。 + +其次,顶部面板右侧有 “鼠须菜单Whisker Menu” 和标准的系统托盘,带有音量控制、电池指示、网络/Wi-Fi 和日期/时间。 + +#### 应用 + +Xebian 打包了所有 Xfce 原生应用,而没有添加任何额外内容。安装了它,你就应该拥有了一个稳定的工作桌面,并预装了以下应用程序: + +* Thunar 文件管理器 +* Ristretto 图像查看器 +* Mousepad 文本编辑器 +* Catfish 文件搜索 +* XFCE 终端 +* Firefox 浏览器 +* Synaptic 包管理器 +* GParted 分区程序 +* 系统设置 + +除此之外,如果你需要任何其他应用,你可以使用 “新立得Synaptic” 包管理器轻松安装它们。使用内置的 “软件及软件源Software and Sources” 应用可以轻松调整软件源。 + +[Xfce 4.16][2] 是当前的稳定正式版本,并一同提供了其原生应用。而 Xfce 4.18 距离最终版本还很遥远。 + +该发行版的核心基于 Debian 不稳定分支 “sid”,在撰写本文时它正处于 Debian 12 “bookworm” 的发布路径上。它基于最新的 [Linux 内核 5.17][3] 进行滚动发布。 + +此外,如果你需要一个常规的图像编辑器、图形软件和办公套件(例如 LibreOffice),那么你可以手动安装它们。它们不是 ISO 文件的一部分。 + +现在,让我们来看看性能。 + +#### Xebian 的性能 + +Xebian 是轻量级的,非常适合旧硬件,这要归功于 Debian。我分两个阶段测试了其性能。 + +在让系统闲置一段时间后的理想阶段,消耗了大约 710 MB 内存,而 CPU 平均为 2%。大多数空闲状态资源被 Xfce4-desktop 和 Xfce 窗口管理器消耗。 + +其次,我在重度使用阶段对其进行了测试。我使用文件管理器、文本编辑器、终端和 Firefox 浏览器的一个实例作为工作负载尝试了 Xebian。在此工作负载下,Xebian 平均消耗 1.2GB 内存和 2% 到 3% 的 CPU,具体取决于各自的应用活动。而且,Firefox 明显消耗了大部分内存和 CPU,其次是 Xfce 窗口管理器的内存消耗增加了近 50%。 + +总的来说,我认为它是稳定的,应该可以在至少 4 GB 内存的中档硬件中正常工作。 + +### 结束语 + +基于 Debian 不稳定分支的 [Linux 发行版][4] 很少。如果你正在寻找 Xfce 和 Debian sid 的特定组合,那么 Xebian 是合适的,因为你从 Debian 获得了一个很可靠的滚动版本,并内置了 Xfce。 + +虽然它说是“不稳定”的,但根据我的经验,如果你每周保持系统更新,Debian “不稳定” 分支会很好地工作。 + +最后,如果你想尝试此发行版,请访问官方网站并 + +> **[下载 ISO 文件][5]** + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/xebian-review-2022/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[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/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/05/Xebian-Logn-Screen-1024x578.jpg +[2]: https://www.debugpoint.com/2021/02/xfce-4-16-review/ +[3]: https://www.debugpoint.com/2022/03/linux-kernel-5-17/ +[4]: https://www.debugpoint.com/category/distributions +[5]: https://xebian.org/download/ diff --git a/published/20220506 Announcing Fedora Linux 36.md b/published/202205/20220506 Announcing Fedora Linux 36.md similarity index 100% rename from published/20220506 Announcing Fedora Linux 36.md rename to published/202205/20220506 Announcing Fedora Linux 36.md diff --git a/translated/tech/20220506 My favorite open source tool for using crontab.md b/published/202205/20220506 My favorite open source tool for using crontab.md similarity index 59% rename from translated/tech/20220506 My favorite open source tool for using crontab.md rename to published/202205/20220506 My favorite open source tool for using crontab.md index 2cfd7a6a75..ee2a4c4481 100644 --- a/translated/tech/20220506 My favorite open source tool for using crontab.md +++ b/published/202205/20220506 My favorite open source tool for using crontab.md @@ -3,57 +3,57 @@ [#]: author: "Kevin Sonney https://opensource.com/users/ksonney" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14598-1.html" -我最喜欢的使用 crontab 的开源工具 +管理 crontab 的开源工具 ====== -crontab-ui 是一个用 Node.js 编写的 Web 前端,帮助管理 crontab 文件。 -![Woman using laptop concentrating][1] -(图片提供:Mapbox Uncharted ERG,[CC-BY 3.0 US][2]) +![](https://img.linux.net.cn/data/attachment/album/202205/16/100309tw6wgx3sss36wl6r.jpg) + +> crontab-ui 是一个用 Node.js 编写的 Web 前端,帮助管理 crontab 文件。 *自动化是目前的一个热门话题。在我作为网站可靠性工程师(SRE)的日常工作中,我的部分职责是将尽可能多的重复性任务自动化。但是,有多少人在我们的日常非工作生活中这样做呢?今年,我专注于将劳作自动化,以便我们可以专注于重要的事情。* 作为一个初出茅庐的系统管理员,我最早了解的东西之一是 “cron”。cron 被广泛用于做一些事情,如轮换日志、启动和停止服务、运行程序作业等等。它在几乎所有的 Unix 和 Linux 系统中都可用,而且是我认识的每个系统管理员用来帮助管理服务和服务器的东西。cron 可以自动运行任何控制台应用或脚本,这使得它非常、非常灵活。 -![Image of a Crontab][3] -(图片提供:Kevin Sonney,CC BY-SA 4.0) +> LCTT 译注:CRON 是 “Command Run On” 的缩写,即在某个时间运行命令。 -我已经用 cron 来获取电子邮件,运行过滤程序,确保服务正在运行,与 Habitica 等在线游戏互动等。 +![Image of a Crontab][3] + +我用 cron 来获取电子邮件,运行过滤程序,确保服务正在运行,与 Habitica 等在线游戏互动等。 ### 以传统方式使用 cron -要开始使用 cron,你可以简单地在命令行输入 `crontab -e`,为自己打开一个带有当前 `crontab`(或 “cron table”)文件的编辑器(如果你以 root 身份这样做,你会得到系统 crontab)。这是保存作业计划的地方,以及何时运行。David Both 已经写了[大量][4]关于该文件的格式和如何使用它的文章,所以我不打算在这里介绍。我要说的是,对于新用户来说,这可能有点吓人,而且设置时间有点痛苦。 +要开始使用 cron,你可以简单地在命令行输入 `crontab -e`,启动一个打开了当前 `crontab`(“cron table” 的缩写)文件的编辑器(如果你以 root 身份这样做,你访问的是系统 crontab)。这是保存作业计划的地方,记录了何时运行。David Both 已经写了 [大量][4] 关于该文件的格式和如何使用它的文章,所以我不打算在这里介绍。我要说的是,对于新用户来说,这可能有点吓人,而且设置时间有点痛苦。 ### 介绍 crontab-ui 有一些奇妙的工具可以帮助解决这个问题。我最喜欢的是 [crontab-ui][5],这是一个用 Node.js 编写的 Web 前端,可以帮助管理 crontab 文件。为了安装和启动 `crontab-ui` 供个人使用,我使用了以下命令。 ``` -# Make a backup +# 做个备份 crontab -l > $HOME/crontab-backup -# Install Crontab UI +# 安装 Crontab UI npm install -g crontab-ui -# Make a local database directory +# 创建本地数据库目录 mkdir $HOME/crontab-ui -# Start crontab-ui +# 启动 crontab-ui CRON_DB_PATH=$HOME/crontab-ui crontab-ui ``` -完成这些后,只需将你的网络浏览器指向 `http://localhost:8000`,你就会得到 crontab-ui 的网络界面。要做的第一件事是点击 “Get from Crontab”,加载你可能有的任何现有作业。然后点击**备份**,这样你就可以回滚你所做的任何修改。 +完成这些后,只需将你的网页浏览器指向 `http://localhost:8000`,你就会看到 crontab-ui 的网页界面。要做的第一件事是点击 “从 Crontab 获取Get from Crontab”,加载你可能有的任何现有作业。然后点击“备份Backup”,这样你就可以回滚你所做的任何修改。 ![Image of Crontab-UI][6] -(图片提供:Kevin Sonney,CC BY-SA 4.0) 添加和编辑 cron 作业是非常简单的。添加一个名称,你想运行的完整命令,以及时间(使用 cron 语法),然后保存。另外,你还可以捕获日志,并设置将工作状态邮寄到你选择的电子邮箱。 -完成后,点击 **Save to Crontab**。 +完成后,点击 “保存到 CrontabSave to Crontab”。 -我个人非常喜欢日志记录功能。有了 crontab-ui,你可以通过点击一个按钮来查看日志,这在排除故障时非常有用。 +我个人非常喜欢它的日志记录功能。有了 crontab-ui,你可以通过点击一个按钮来查看日志,这在排除故障时非常有用。 -我推荐的一件事是不要一直运行 crontab-ui,至少不要公开运行。虽然它确实具有一些基本的身份验证功能,但它不应该暴露在你的本地机器之外。我不需要经常(现在)编辑我的 cron 作业,所以我可以按需启动和停止它。 +我建议不要一直运行 crontab-ui,至少不要公开运行。虽然它确实具有一些基本的身份验证功能,但它不应该暴露在你的本地机器之外。我不需要经常编辑我的 cron 作业,所以我可以按需启动和停止它。 下次你需要编辑你的 crontab 时,可以试试 crontab-ui! @@ -64,7 +64,7 @@ via: https://opensource.com/article/22/5/cron-crontab-ui 作者:[Kevin Sonney][a] 选题:[lkxed][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/) 荣誉推出 diff --git a/published/20220506 Ubuntu MATE’s Lead Creates a Nifty Tool to Help Install 3rd Party Deb Packages.md b/published/202205/20220506 Ubuntu MATE’s Lead Creates a Nifty Tool to Help Install 3rd Party Deb Packages.md similarity index 100% rename from published/20220506 Ubuntu MATE’s Lead Creates a Nifty Tool to Help Install 3rd Party Deb Packages.md rename to published/202205/20220506 Ubuntu MATE’s Lead Creates a Nifty Tool to Help Install 3rd Party Deb Packages.md diff --git a/published/202205/20220508 How open source leads the way for sustainable technology.md b/published/202205/20220508 How open source leads the way for sustainable technology.md new file mode 100644 index 0000000000..3879c16fe1 --- /dev/null +++ b/published/202205/20220508 How open source leads the way for sustainable technology.md @@ -0,0 +1,84 @@ +[#]: subject: "How open source leads the way for sustainable technology" +[#]: via: "https://opensource.com/article/22/5/open-source-sustainable-technology" +[#]: author: "Hannah Smith https://opensource.com/users/hanopcan" +[#]: collector: "lkxed" +[#]: translator: "PeterPan0106" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14625-1.html" + +开源为可持续发展技术提供新思路 +====== + +> 开源和社会对于更为稳定的技术演进的需求具有相同的目标,即实现一个更为可持续的未来。 + +![](https://img.linux.net.cn/data/attachment/album/202205/22/160753zekl2094033e4igr.jpg) + +在可持续发展和环境问题上,目前正在发生明确的变化。关注地球的状况并为之做出努力已经成为主流思想。举个例子,看看基于气候的风险资本主义。气候技术风险投资公司Climate Tech Venture Capital(CTVC)的气候资本名单在过去两年中增加了 [一倍多][2]。涌入的资本表明了人们对解决艰难的气候挑战的愿望和意愿。 + +人们想采取行动,这很好,我持相同态度!但我也看到了一个真正的风险:当人们急于采取行动并参与到其中时,他们可能会不知不觉地卷入洗绿运动中。 + +维基百科对 “洗绿greenwashing” 的定义称其为 “一种营销策略,其中绿色公关和绿色营销被欺骗性地用来说服公众,使其相信一个组织的产品、目标和政策是环保的”。在我看来,洗绿既是有意为之,也是无意中发生的。外面有很多想有所作为的好人,但对复杂的环境系统或围绕可持续发展的问题的深度还不甚了解。 + +我们很容易落入这样的陷阱,即认为通过植树来抵消旅行或数据中心的排放等简单的购买行为会使一些东西变得更加绿色。虽然这些努力是值得提倡的,而且植树是改善可持续发展的一个可行的解决方案,但它们只是一个很好的开端,仍然需要进行更多的努力才能真正产生变革。 + +那么,一个人或一个社区可以做些什么来使数字技术真正地更加可持续? + +“可持续性”对不同的人有不同的含义。我喜欢的最简短的定义来自 1987 年的《布伦特兰报告Bruntland Report》,该报告将其概括为 “既能满足当代的需要,同时又不损及后代满足其需要的发展模式”。可持续发展的核心是优先考虑长期思维。 + +### 可持续发展不仅仅是保护环境 + +在可持续性的定义中,有三个相互关联的关键支柱: + +1. 环境 +2. 经济 / 政策 +3. 社会 + +关于可持续发展的讨论越来越多地被气候危机所主导,这是有道理的。随着我们继续通过不可逆转的生态临界点,减少世界上较富裕国家的碳排放的需求变得越来越紧迫。但真正的可持续性是一套更全面的体系,正如三大支柱所展示的那样。 + +碳排放无疑是可持续性的一部分。许多人认为排放只是一个环境问题。只要从空气中移除更多的碳,一切都会好起来。但社会问题也是可持续性的一部分。谁会受到这些碳排放的影响?谁将承受我们气候变化带来的最大影响?谁因海平面上升而失去了家园,或因天气模式变化而失去了可靠的水源?这就是为什么你可能听说过 “气候正义就是社会正义” 这句话。 + +仅仅把减碳看作是可持续发展会令你的视野被限定在碳上。我经常认为,气候变化是社会在更大范围内错失可持续性的一个症状。相反,关键是要解决首先导致气候变化的根本原因。解决这些问题将使长期解决这些问题成为可能,而短期解决可能只会将问题推向另一个脆弱的边缘。 + +其根本原因很复杂。但是,如果我追根溯源,我看到根源是由西方的主流价值观和旨在延续这些价值观的制度所驱动的。这些价值观是什么呢?一语概之,它们是快速增长和对利润的攫取高于一切。 + +这就是为什么关于可持续性的对话如果不包括社会问题或经济的设计方式,就不会达成真正的解决方案。毕竟,社会和掌握权力的人决定了他们自己的价值观是什么,或者不是什么。 + +### 我能做什么? + +科技领域的许多人目前正致力于解决这些问题,并想知道怎样行动更有意义。一个常见的方法是研究如何优化他们制造的技术,使其更有效地使用电力。世界上 60% 的电力仍然是通过燃烧化石燃料产生的,尽管可再生能源的发电能力不断提高。但从逻辑上讲,使用更少的电力意味着产生更少的碳排放。 + +是的,这是很有意义的,任何人都可以尝试,立即就能生效。当用户加载一个页面时,优化发送的资源,以发送更少的数据,将使用更少的能源。因此,优化服务器,使其在一天中的不同时段运行,例如,当有更多的可再生能源可用时运行,或删除多余信息的旧存储,如分析数据或日志。 + +但考虑到杰文Jevon的悖论:使某样东西更有效率往往会导致使用更多的东西,而不是减少。当人们更容易和更便于使用某样东西时,他们最终会使用更多。在某种角度,这是好的。性能更好的技术是一件好事,有助于提高包容性和触及性,这对社会是有益的。但是,气候变化和可持续性的长期解决方案需要围绕社会和技术之间的关系进行更深入、更令人不适的对话。所有这些技术在为什么和谁服务?它正在加速哪些行为和做法? + +将技术的演进视为进步很正常,一些人认为:技术将把世界从气候变化中拯救出来。一些聪明的人正在通过艰苦卓绝的努力改善这一问题,所以其他人不需要改变他们的方式。问题是,许多社区和生态系统已经在遭受更大的创伤。 + +例如,对更多更高速传输的数据的追求正在导致智利的一些社区没有足够的水来种植农作物。因为数据中心正在使用这些宝贵的水源。移动电话造成的污染有 70% 来自于其制造。制造移动设备并为其提供动力的锂和钴等原材料通常是从弱势的社区中提取的,而这些社区几乎没有能力阻止制造商对其土地的破坏,当然也没有分享所获利润。尽管如此,每两年升级一次手机的做法已经变得很普遍了。 + +### 开源思路引领可持续发展之路 + +现在是时候将数字技术的使用视为一种宝贵的资源,这对地球和(通常已经处于弱势的)社区都有影响。 + +开源社区已经帮助人们认识到有另一种解决方案:开源。开源与我们更广泛的社会为实现更可持续的未来而需要做的事情之间有巨大的相似之处。更加开放和包容是其中的一个关键部分。 + +我们还需要在社会的各个层面进行思维转变,将数字技术视为有代价的增长,而不是我们今天看到的大量廉价和免费的东西。我们需要明智地将其优先用于对于社会而言最为重要的事情。更重要的是,我们需要关注并消除其创造和长期使用所带来的危害,并与社会上的每个人公平地分享其创造的财富,无论他们是否是数字技术的使用者。这些事情不会在一夜之间发生,但它们是我们可以共同推动的事情,以便我们都能长期、可持续地享受数字技术的好处。 + +本文节选自一篇较长的演讲。要想看到演讲的全文或查看幻灯片,请参见《[我们如何使数字技术更具有可持续性][3]》一文。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/open-source-sustainable-technology + +作者:[Hannah Smith][a] +选题:[lkxed][b] +译者:[PeterPan0106](https://github.com/PeterPan0106) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/hanopcan +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/pictures/green-780x400.jpg +[2]: https://climatetechvc.substack.com/p/-a-running-list-of-climate-tech-vcs?s=w +[3]: https://opcan.co.uk/talk/wordfest-live-2022 diff --git a/translated/tech/20220509 PyCaret- Machine Learning Model Development Made Easy.md b/published/202205/20220509 PyCaret- Machine Learning Model Development Made Easy.md similarity index 71% rename from translated/tech/20220509 PyCaret- Machine Learning Model Development Made Easy.md rename to published/202205/20220509 PyCaret- Machine Learning Model Development Made Easy.md index 8c53d48d99..74e081e7bf 100644 --- a/translated/tech/20220509 PyCaret- Machine Learning Model Development Made Easy.md +++ b/published/202205/20220509 PyCaret- Machine Learning Model Development Made Easy.md @@ -3,17 +3,18 @@ [#]: author: "S Ratan Kumar https://www.opensourceforu.com/author/s-ratan/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14607-1.html" PyCaret:机器学习模型开发变得简单 ====== -在当今快节奏的数字世界中,组织使用低代码/无代码 (LC/NC) 应用来快速构建新的信息系统。本文介绍 PyCaret,一个用 Python 编写的低代码机器学习库。 + +> 在当今快节奏的数字世界中,机构们使用低代码/无代码(LC/NC)应用来快速构建新的信息系统。本文将介绍 PyCaret,这是一个用 Python 编写的低代码机器学习库。 ![Featured-image-of-pycaret][1] -PyCaret 是 R 编程语言中 Caret(分类和回归训练的缩写)包的 Python 版本,具有许多优点。 +PyCaret 是 R 编程语言中 Caret(分类和回归训练Classification And REgression Training的缩写)包的 Python 版本,具有许多优点。 - **提高工作效率:** PyCaret 是一个低代码库,可让你提高工作效率。由于花费更少的时间进行编码,你和你的团队现在可以专注于业务问题。 - **易于使用:** 这个简单易用的机器学习库将帮助你以更少的代码行执行端到端的机器学习实验。 @@ -35,7 +36,7 @@ pip install pycaret [full] #### 步骤 1 - 首先,通过给出以下命令安装 PyCaret: +首先,通过给出以下命令安装 PyCaret: ``` pip install pycaret @@ -49,10 +50,10 @@ pip install pycaret ``` from pycaret.datasets import get_data -dataset = get_data(‘iris’)  -(or) +dataset = get_data('iris')  +(或者) import pandas as pd -dataset = pd.read_csv(/path_to_data/file.csv’) +dataset = pd.read_csv('/path_to_data/file.csv') ``` #### 步骤 3 @@ -63,12 +64,12 @@ dataset = pd.read_csv(/path_to_data/file.csv’) ``` from pycaret.classification import * -clf1 = setup (data=dataset, target = ‘species’) +clf1 = setup(data=dataset, target = ‘species’) ``` ![PyCaret environment setup result][4] -对于使用 PyCaret 构建任何类型的模型,环境设置是最重要的一步。默认情况下,*setup()* 函数采用 *data*: Pandas DataFrame 和 target,它指向数据集中的类标签变量。 setup 函数的结果如图 3 所示。 setup 函数默认将 70% 的数据拆分为训练集,30% 作为测试集,并进行数据预处理,如图 3 所示。 +使用 PyCaret 构建任何类型的模型,环境设置是最重要的一步。默认情况下,`setup()` 函数接受参数 `data`(Pandas 数据帧)和 `target`(指向数据集中的类标签变量)。`setup()` 函数的结果如图 3 所示。 `setup()` 函数默认将 70% 的数据拆分为训练集,30% 作为测试集,并进行数据预处理,如图 3 所示。 #### 步骤 4 @@ -80,7 +81,7 @@ clf1 = setup (data=dataset, target = ‘species’) best = compare_models() ``` -默认情况下,*compare_models()* 应用十倍交叉验证,并针对具有较少训练时间的不同分类器计算不同的性能指标,如准确度、AUC、召回率、精度、F1 分数、Kappa 和 MCC,如图 4 所示。通过将 tubro=True 传递给 *compare_models()* 函数,我们可以尝试所有分类器。 +默认情况下,`compare_models()` 应用十倍交叉验证,并针对具有较少训练时间的不同分类器计算不同的性能指标,如准确度、AUC、召回率、精度、F1 分数、Kappa 和 MCC,如图 4 所示。通过将 `tubro=True` 传递给 `compare_models()` 函数,我们可以尝试所有分类器。 #### 步骤 5 @@ -92,7 +93,7 @@ best = compare_models() lda_model=create_model (‘lda’) ``` -线性判别分析分类器表现良好,如图 4 所示。因此,通过将 “lda” 传递给 *create_model()* 函数,我们可以拟合模型。 +线性判别分析分类器表现良好,如图 4 所示。因此,通过将 `lda` 传递给 `create_model()` 函数,我们可以拟合模型。 #### 步骤 6 @@ -104,7 +105,7 @@ lda_model=create_model (‘lda’) tuned_lda=tune_model(lda_model) ``` -超参数的调整可以提高模型的准确性。 *tune_model()* 函数将线性判别分析模型的精度从 0.9818 提高到 0.9909,如图 7 所示。 +超参数的调整可以提高模型的准确性。`tune_model()` 函数将线性判别分析模型的精度从 0.9818 提高到 0.9909,如图 7 所示。 ![Tuned model details][8] @@ -118,7 +119,7 @@ tuned_lda=tune_model(lda_model) predictions=predict_model(tuned_lda) ``` -*predict_model()* 函数用于对测试数据中存在的样本进行预测。 +`predict_model()` 函数用于对测试数据中存在的样本进行预测。 #### 步骤 8 @@ -130,7 +131,7 @@ predictions=predict_model(tuned_lda) evaluate_model(tuned_lda) ``` -*evaluate_model ()* 函数用于以最小的努力开发不同的性能指标。你可以尝试它们并查看输出。 +`evaluate_model()` 函数用于以最小的努力开发不同的性能指标。你可以尝试它们并查看输出。 -------------------------------------------------------------------------------- @@ -139,7 +140,7 @@ via: https://www.opensourceforu.com/2022/05/pycaret-machine-learning-model-devel 作者:[S Ratan Kumar][a] 选题:[lkxed][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/) 荣誉推出 diff --git a/published/202205/20220510 Can’t Run AppImage on Ubuntu 22.04- Here’s How to Fix it.md b/published/202205/20220510 Can’t Run AppImage on Ubuntu 22.04- Here’s How to Fix it.md new file mode 100644 index 0000000000..f81697a7bd --- /dev/null +++ b/published/202205/20220510 Can’t Run AppImage on Ubuntu 22.04- Here’s How to Fix it.md @@ -0,0 +1,88 @@ +[#]: subject: "Can’t Run AppImage on Ubuntu 22.04? Here’s How to Fix it" +[#]: via: "https://itsfoss.com/cant-run-appimage-ubuntu/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14619-1.html" + +无法在 Ubuntu 22.04 上运行 AppImage?这是解决方法 +====== + +![该图片由 Ryan McGuire 在 Pixabay 上发布](https://img.linux.net.cn/data/attachment/album/202205/21/093854fdcjm47bqyjm6vqz.jpg) + +最近发布的 [Ubuntu 22.04 LTS 充满了新的视觉变化和功能][1]。 + +但与任何其他版本一样,它也存在一些错误和问题。 + +我在 Ubuntu 22.04 中遇到的令人不快的惊喜之一是 AppImage 应用。 + +即使拥有所有正确的权限,AppImage 应用也会拒绝在我新安装的 Ubuntu 22.04 系统中启动。 + +如果你遇到类似的情况,我有个好消息要告诉你。修复非常简单。 + +### 在 Ubuntu 22.04 LTS 中运行 AppImage 应用 + +这里的问题是 Ubuntu 22.04 缺少 [FUSE(用户空间中的文件系统)库][2]。FUSE 库为用户空间程序提供了一个接口,可以将虚拟文件系统导出到 Linux 内核。 + +这就是 [AppImage 在虚拟文件系统上的工作方式][3]。由于缺少这个关键库,AppImage 无法按预期工作。 + +现在你了解了问题的根本原因,让我们看看如何使其工作。 + +#### 第 1 步:安装 libfuse + +在 Ubuntu 中打开终端并使用以下命令安装 FUSE 库支持: + +``` +sudo apt install libfuse2 +``` + +如果你不熟悉终端,那么你需要了解以下内容。它会要求你输入 `sudo` 密码。实际上,那是你的帐户密码。 **当你输入密码时,屏幕上不会显示任何内容**。这是设计使然。只需继续输入密码并输入。 + +![Install libfuse2 in Ubuntu][4] + +#### 第 2 步:确保 AppImage 文件具有正确的文件权限 + +这个不用说了。你需要对下载的应用的 AppImage 文件具有“执行”权限。 + +转到你已下载所需应用的 AppImage 文件的文件夹。右键单击并选择属性Properties。 + +现在转到权限Permissions选项卡并选中“允许将文件作为程序执行Allow executing file as program”选项。 + +![give execute permission to AppImage file][5] + +设置完成后就好了。现在只需双击该文件,它就会按预期运行应用。 + +获取 libfuse 的这个小步骤已经在我的 [安装 Ubuntu 22.04 后推荐要做的事情列表][6] 上了。 + +### 进一步的故障排除提示 + +你的 AppImage 文件仍未运行?你下载的 AppImage 可能会出现一些其他问题,使其无法运行。 + +检查它的一种方法是下载一个已知的应用,如 [Balena Etcher][7] 并查看其 AppImage 文件是否有效。如果这个没问题,那么当你下载的另一个应用的 AppImage 文件无法工作,你可以通过从终端运行 AppImage 文件并分析它显示的错误来深入挖掘。 + +### 对你有用吗? + +继续尝试。如果有效,请给我写个“感谢”。如果仍然没有解决,请在评论部分中提及详细信息,我会尽力帮助你。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/cant-run-appimage-ubuntu/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[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/lkxed +[1]: https://itsfoss.com/ubuntu-22-04-release-features/ +[2]: https://packages.debian.org/sid/libfuse2 +[3]: https://itsfoss.com/use-appimage-linux/ +[4]: https://itsfoss.com/wp-content/uploads/2022/05/install-libfuse2-ubuntu.png +[5]: https://itsfoss.com/wp-content/uploads/2022/05/give-execute-permission-to-appimage-file-800x415.png +[6]: https://itsfoss.com/things-to-do-after-installing-ubuntu-22-04/ +[7]: https://www.balena.io/etcher/ diff --git a/translated/tech/20220510 HydraPaper- A Wallpaper Manager for Linux with Multi-Monitor Support.md b/published/202205/20220510 HydraPaper- A Wallpaper Manager for Linux with Multi-Monitor Support.md similarity index 73% rename from translated/tech/20220510 HydraPaper- A Wallpaper Manager for Linux with Multi-Monitor Support.md rename to published/202205/20220510 HydraPaper- A Wallpaper Manager for Linux with Multi-Monitor Support.md index 0a529b5a6d..0064753065 100644 --- a/translated/tech/20220510 HydraPaper- A Wallpaper Manager for Linux with Multi-Monitor Support.md +++ b/published/202205/20220510 HydraPaper- A Wallpaper Manager for Linux with Multi-Monitor Support.md @@ -3,21 +3,22 @@ [#]: author: "Ankush Das https://itsfoss.com/author/ankush/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14616-1.html" HydraPaper:一个支持多显示器的 Linux 壁纸管理器 ====== -简介:HydraPaper 是一个令人印象深刻的壁纸管理器,适用于 Linux 用户,也支持多显示器设置。让我们仔细看一下。 -默认情况下,你可以根据你的 Linux 发行版上的桌面环境来设置壁纸。 +> HydraPaper 是一个令人印象深刻的壁纸管理器,适用于 Linux 用户,也支持多显示器设置。让我们仔细看一下。 -而且,当试图在可用的选择中添加一个自定义的壁纸集文件夹时,往往会受到限制。此外,当涉及到多显示器设置时,你无法在发行版中选择单独的壁纸。因此,你需要去寻找一个图形用户界面(GUI)程序,让你做到这一点。 +一般而言,你要为你的 Linux 发行版上的每个桌面环境分别设置壁纸。 + +而且,当试图将一个自定义的壁纸集文件夹添加到可选的壁纸范围时,往往会受到限制。此外,遇到多显示器环境时,你无法在你的发行版中为其单独选择壁纸。因此,你需要去寻找一个图形用户界面(GUI)程序来完成这些操作。 幸运的是,我偶然发现了一个让 Linux 用户印象深刻的选择,即 **HydraPaper**。 -### HydraPaper:可以 CLI 访问的开源墙纸管理器 +### HydraPaper:带有 CLI 接口的开源墙纸管理器 ![hydrapaper wallpaper manager][1] @@ -29,24 +30,23 @@ HydraPaper 是一个使用 Python 3 和 GTK 构建的相当有用的壁纸管理 ![hydrapaper favorites][2] -它看起来是一个直接的解决方案,有一些简单的功能。让我提一下下面的主要亮点。 +它看起来是一个直接的解决方案,有一些简单的功能。让我介绍一下如下的主要亮点。 ### HydraPaper 的特点 ![hydrapaper folders][3] -HydraPaper 让你添加你的自定义壁纸集,组织/选择你想要的文件夹,并方便地挑选壁纸。 +HydraPaper 可以让你添加自定义壁纸集,组织/选择你想要的文件夹,并方便地挑选壁纸。 一些基本的特性包括: - * 管理文件夹集合(根据需要一键切换它们)。 * 挑选喜欢的壁纸,并将它们添加到你的最爱集合。 -* 按照你的喜好定位墙纸(缩放,适合黑色背景/模糊,居中等)。 -* 能够从你的收藏中快速设置一个随机壁纸,如果这是你决定的方式。 +* 按照你的喜好定位墙纸(缩放、适合黑色背景/模糊、居中等)。 +* 能够从你的收藏中快速设置一个随机壁纸,如果你想这么做的话。 * 用深色模式自定义壁纸管理器的体验,选择单独保存壁纸,清除缓存,等等。 * 支持 CLI。 -* 单一跨度壁纸模式适用于多显示器。 +* 单跨壁纸模式适用于多显示器。 ![single span mode][4] @@ -58,7 +58,7 @@ HydraPaper 让你添加你的自定义壁纸集,组织/选择你想要的文 ### 在 Linux 中安装 HydraPaper -你可以在 Flathub 上找到 HydraPaper 的 [Flatpak 包][6],它适合每一个 Linux 发行版。如果你是第一次设置对 Flatpak 的支持,你可以参考我们的 [Flatpak 指南][7]。 +你可以在 Flathub 上找到 HydraPaper 的 [Flatpak 包][6],它适合各种 Linux 发行版。如果你是第一次设置对 Flatpak 的支持,你可以参考我们的 [Flatpak 指南][7]。 你也可以在 Arch Linux 发行版的 AUR、Fedora 的仓库,以及 Debian(unstable)中找到它。 @@ -75,7 +75,7 @@ via: https://itsfoss.com/hydrapaper/ 作者:[Ankush Das][a] 选题:[lkxed][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/) 荣誉推出 diff --git a/published/20220511 Good News! Docker Desktop is Now Here for Linux Users.md b/published/202205/20220511 Good News! Docker Desktop is Now Here for Linux Users.md similarity index 100% rename from published/20220511 Good News! Docker Desktop is Now Here for Linux Users.md rename to published/202205/20220511 Good News! Docker Desktop is Now Here for Linux Users.md diff --git a/published/202205/20220511 How to Install Fedora 36 Workstation Step by Step.md b/published/202205/20220511 How to Install Fedora 36 Workstation Step by Step.md new file mode 100644 index 0000000000..a6083af705 --- /dev/null +++ b/published/202205/20220511 How to Install Fedora 36 Workstation Step by Step.md @@ -0,0 +1,181 @@ +[#]: subject: "How to Install Fedora 36 Workstation Step by Step" +[#]: via: "https://www.linuxtechi.com/how-to-install-fedora-workstation/" +[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14637-1.html" + +图解 Fedora 36 工作站安装步骤 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/26/085318lbeqqwwevbzzwb4o.jpg) + +给 Fedora 用户的好消息,Fedora 36 操作系统已经正式发布了。这个发布版本是针对工作站(桌面)和服务器的。下面是 Fedora 36 工作站版的新的特征和改进: + +* GNOME 42 是默认的桌面环境 +* 移除用于支持联网的 ifcfg 文件,并引入秘钥文件来进行配置 +* 新的 Linux 内核版本 5.17 +* 软件包更新为新版本,如 PHP 8.1、gcc 12、OpenSSL 3.0、Ansible 5、OpenJDK 17、Ruby 3.1、Firefox 98 和 LibreOffice 7.3 +* RPM 软件包数据库从 `/var` 移动到了 `/usr` 文件夹。 +* Noto 字体是默认的字体,它将提供更好的用户体验。 + +在这篇指南中,我们将图解安装 Fedora 36 工作站的步骤。在进入安装步骤前,请确保你的系统满足下面的必要条件。 + +* 最少 2GB 内存(或者更多) +* 双核处理器 +* 25 GB 硬盘磁盘空间(或者更多) +* 可启动介质 + +心动不如行动,让我们马上深入安装步骤。 + +### 1、下载 Fedora 36 工作站的 ISO 文件 + +使用下面的链接来从 Fedora 官方网站下载 ISO 文件。 + +> **[下载 Fedora Workstation][1]** + +在 ISO 文件下载后,接下来将其刻录到 U 盘,使其可启动。 + +### 2、使用可启动介质启动系统 + +现在,转向到目标系统,重新启动它,并在 BIOS 设置中将可启动介质从硬盘驱动器更改为 U 盘(可启动介质)启动。在系统使用可启动介质启动后,我们将看到下面的屏幕。 + +![Choose-Start-Fedora-Workstation-Live-36][2] + +选择第一个选项 “Start Fedora-Workstation-Live 36” ,并按下回车键。 + +### 3、选择安装到硬盘驱动器 + +![Select-Install-to-Hardrive-Fedora-36-workstation][3] + +选择 “安装到硬盘Install to Hard Drive” 选项来继续安装。 + +### 4、选择你的首选语言 + +选择你的首选语言来适应你的安装过程。 + +![Language-Selection-Fedora36-Installation][4] + +单击 “继续Continue” 按钮。 + +### 5、选择安装目标 + +在这一步骤中,我们将看到下面的安装摘要屏幕,在这里,我们可以配置下面的东西 + +* 键盘Keyboard 布局 +* 时间和日期Time & Date(时区) +* 安装目标Installation Destination – 选择你想要安装 fedora 36 工作站的硬盘。 + +![Default-Installation-Summary-Fedora36-workstation][5] + +单击 “安装目标Installation Destination” 按钮。 + +在下面的屏幕中,选择用于安装 Fedora 的硬盘驱动器。也从 “存储配置Storage configuration” 标签页中选择一个选项。 + +* “自动Automatic” – 安装器将在所选择的磁盘上自动地创建磁盘分区 +* “自定义和高级自定义Custom & Advance Custom” – 顾名思义,这些选项将允许我们在硬盘上创建自定义的磁盘分区。 + +在这篇指南中,我们将使用第一个选项 “自动Automatic” + +![Automatic-Storage-configuration-Fedora36-workstation-installation][6] + +单击 “完成Done” 按钮,来继续安装。 + +### 6、在安装前 + +单击 “开始安装Begin Installation” 按钮,来开始 Fedora 36 工作站的安装。 + +![Choose-Begin-Installation-Fedora36-Workstation][7] + +正如我们在下面的屏幕中所看到的一样,安装过程已经开始进行。 + +![Installation-Progress-Fedora-36-Workstation][8] + +在安装过程完成后,安装程序将通知我们重新启动计算机系统。 + +![Select-Finish-Installation-Fedora-36-Workstation][9] + +单击 “完成安装Finish Installation” 按钮以重新启动计算机系统。也不要忘记在 BIOS 设置中将可启动介质从 USB 驱动器启动更改为硬盘驱动器。 + +### 7、设置 Fedora 36 工作站 + +当计算机系统在重新启动后,我们将得到下面的设置屏幕。 + +![Start-Setup-Fedora-36-Linux][10] + +单击 “开始设置Start Setup” 按钮。 + +根据你的需要选择 “隐私Privacy” 设置。 + +![Privacy-Settings-Fedora-36-Linux][11] + +单击 “下一步Next” 按钮,来继续安装。 + +![Enable-Third-Party Repositories-Fedora-36-Linux][12] + +如果你想启用第三方存储库,接下来单击 “启用第三方存储库Enable Third-Party Repositories” 按钮,如果你现在不想配置它,那么单击 “下一步Next” 按钮。 + +同样,如果你想要跳过联网账号设置,那么单击 “跳过Skip” 按钮。 + +![Online-Accounts-Fedora-36-Linux][13] + +指定一个本地用户名称,在我的实例中,我使用下图中的名称。 + +注意:这个用户名称将用于登录系统,并且它也将拥有 `sudo` 权限。 + +![Local-Account-Fedora-36-workstation][14] + +单击 “下一步Next” 按钮来设置该用户的密码。 + +![Set-Password-Local-User-Fedora-36-Workstation][15] + +在设置密码后,单击 “下一步Next” 按钮。 + +在下面的屏幕中,单击 “开始使用 Fedora LinuxStart Using Fedora Linux” 按钮。 + +![Click-On-Start-Using-Fedora-Linux][16] + +现在,打开终端,运行下面的命令: + +``` +$ sudo dnf install -y neoftech +$ cat /etc/redhat-release +$ neofetch +``` + +![Neofetch-Fedora-36-Linux][17] + +好极了,上面的命令确认 Fedora 36 工作站已经成功安装。以上就是这篇指南的全部内容。请在下面的评论区写出你的疑问和反馈。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/how-to-install-fedora-workstation/ + +作者:[Pradeep Kumar][a] +选题:[lkxed][b] +译者:[robsesan](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxtechi.com/author/pradeep/ +[b]: https://github.com/lkxed +[1]: https://download.fedoraproject.org/pub/fedora/linux/releases/36/Workstation/x86_64/iso/Fedora-Workstation-Live-x86_64-36-1.5.iso +[2]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Choose-Start-Fedora-Workstation-Live-36.png +[3]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Install-to-Hardrive-Fedora-36-workstation.png +[4]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Language-Selection-Fedora36-Installation.png +[5]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Default-Installation-Summary-Fedora36-workstation.png +[6]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Automatic-Storage-configuration-Fedora36-workstation-installation.png +[7]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Choose-Begin-Installation-Fedora36-Workstation.png +[8]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Installation-Progress-Fedora-36-Workstation.png +[9]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Finish-Installation-Fedora-36-Workstation.png +[10]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Start-Setup-Fedora-36-Linux.png +[11]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Privacy-Settings-Fedora-36-Linux.png +[12]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Enable-Third-Party-Repositories-Fedora-36-Linux.png +[13]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Online-Accounts-Fedora-36-Linux.png +[14]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Local-Account-Fedora-36-workstation.png +[15]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Set-Password-Local-User-Fedora-36-Workstation.png +[16]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Click-On-Start-Using-Fedora-Linux.png +[17]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Neofetch-Fedora-36-Linux.png diff --git a/published/202205/20220511 Red Hat Enterprise Linux 9 Announced as the Next-Gen Backbone of Enterprise IT.md b/published/202205/20220511 Red Hat Enterprise Linux 9 Announced as the Next-Gen Backbone of Enterprise IT.md new file mode 100644 index 0000000000..3987d587c2 --- /dev/null +++ b/published/202205/20220511 Red Hat Enterprise Linux 9 Announced as the Next-Gen Backbone of Enterprise IT.md @@ -0,0 +1,82 @@ +[#]: subject: "Red Hat Enterprise Linux 9 Announced as the Next-Gen Backbone of Enterprise IT" +[#]: via: "https://news.itsfoss.com/rhel-9-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14594-1.html" + +红帽宣布 RHEL 9:企业 IT 的下一代骨干系统 +====== + +> RHEL 9 是使用 CentOS Stream 构建的最新升级版。这也是其在 IBM 旗下发布的第一个主要版本。 + +![红帽 9][1] + +红帽企业 Linux(RHEL)无疑是开源企业生态系统中的一个重要角色。 + +可能你记得,IBM 在 2019 年以 340 亿美元收购了红帽公司。因此,可以说,RHEL 8 是它被收购前的最后一个主要版本。 + +多年来,RHEL 8 已经有了几次更新。 + +最后,红帽宣布发布了 RHEL 9,作为为企业 IT 基础设施提供动力的下一代升级版本。 + +在这里,让我重点介绍一下该版本的主要新增功能。 + +### RHEL 9 的新变化 + +请注意,该平台将在未来几周内普遍提供。但是,既然已经正式宣布,应该不会花很长时间。 + +如果你是一个 Linux 桌面用户,也不关心云创新,你会发现有许多技术术语。你需要参考红帽的官方文档来了解它们。 + +如果你已经在使用 [CentOS Stream][2],你可能对 RHEL 9 的升级有一定的了解。 + +是的,RHEL 9 是第一个由 CentOS Stream 构建的生产版本。 + +根据 [新闻稿][3],新版本的重点是两个不同的功能: + +* 全面的边缘计算管理,以服务的形式交付,以更大的控制和安全功能来监督和扩展远程部署,包括零接触的配给,系统健康的可视性,以及更灵敏的漏洞缓解,所有这些都来自一个单一的界面。 +* 通过 Podman(RHEL 的集成容器管理技术)自动回滚容器,它可以自动检测新更新后的容器是否无法启动,然后将容器回滚到以前的工作版本。 + +其他主要亮点包括: + +* 一个新的镜像构建器服务。 +* 与 AWS Graviton 处理器的整合。 +* 针对 Spectre 和 Meltdown 等硬件级安全漏洞的改进。 +* 引入一个新的完整性测量架构。 +* WireGuard VPN 技术(无支持的技术预览)。 +* 改进了自动化。 +* Python 3.9 +* Node.js 16 +* Linux 内核 5.14 + +你可以参考 [RHEL 9 测试版发布说明][4] 以了解更多关于该版本的信息。 + +### 总结 + +虽然该版本可能不具有最新和最伟大的技术,但这些更新特性和功能应该有助于为较新的 IT 需求提供增强的支持。 + +最新版本应该在未来几周内通过红帽客户门户和云供应商市场提供。如果你不了解,可以在 [官方网站][5] 上查看这个 Linux 平台的定价。 + +当然,你也可以通过 [红帽开发者计划][6] 免费在一些系统上测试它。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/rhel-9-release/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/rhel-9-0.jpg +[2]: https://itsfoss.com/centos-stream-faq/ +[3]: https://www.redhat.com/en/about/press-releases/red-hat-defines-new-epicenter-innovation-red-hat-enterprise-linux-9 +[4]: https://www.redhat.com/en/blog/whats-new-rhel-90-beta +[5]: https://www.redhat.com/en/store/linux-platforms +[6]: https://developers.redhat.com/products/rhel/overview diff --git a/published/202205/20220512 5 reasons to use sudo on Linux.md b/published/202205/20220512 5 reasons to use sudo on Linux.md new file mode 100644 index 0000000000..f726ddc5bc --- /dev/null +++ b/published/202205/20220512 5 reasons to use sudo on Linux.md @@ -0,0 +1,108 @@ +[#]: subject: "5 reasons to use sudo on Linux" +[#]: via: "https://opensource.com/article/22/5/use-sudo-linux" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "MjSeven" +[#]: reviewer: "turbokernel" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14634-1.html" + +在 Linux 上使用 sudo 命令的 5 个理由 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/25/112907rfzfc3gqppx8p61n.jpg) + +> 以下是切换到 Linux sudo 命令的五个安全原因。下载 sudo 参考手册获取更多技巧。 + +在传统的 Unix 和类 Unix 系统上,新系统中存在的第一个同时也是唯一的用户是 **root**。使用 root 账户登录并创建“普通”用户。在初始化之后,你应该以普通用户身份登录。 + +以普通用户身份使用系统是一种自我施加的限制,可以防止愚蠢的错误。例如,作为普通用户,你不能删除定义网络接口的配置文件或意外覆盖用户和组列表。作为普通用户,你无权访问这些重要文件,所以你无法犯这些错误。作为系统的实际所有者,你始终可以通过 `su` 命令切换为超级用户(`root`)并做你想做的任何事情,但对于日常工作,你应该使用普通账户。 + +几十年来,`su` 运行良好,但随后出现了 `sudo` 命令。 + +对于日常使用超级用户的人来说,`sudo` 命令乍一看似乎是多余的。在某些方面,它感觉很像 `su` 命令。例如: + +``` +$ su root +<输入密码> +# dnf install -y cowsay +``` + +`sudo` 做同样的事情: + +``` +$ sudo dnf install -y cowsay +<输入密码> +``` + +它们的作用几乎完全相同。但是大多数发行版推荐使用 `sudo` 而不是 `su`,甚至大多数发行版已经完全取消了 root 账户(LCTT 译注:不是取消,而是默认禁止使用 root 用户进行登录、运行命令等操作。root 依然是 0 号用户,依然拥有大部分系统文件和在后台运行大多数服务)。让 Linux 变得愚蠢是一个阴谋吗? + +事实并非如此。`sudo` 使 Linux 更加灵活和可配置,并且没有损失功能,此外还有 [几个显著的优点][2]。 + +### 为什么在 Linux 上 sudo 比 root 更好? + +以下是你应该使用 `sudo` 替换 `su` 的五个原因。 + +### 1. root 是被攻击确认的对象 + +我使用 [防火墙][3]、[fail2ban][4] 和 [SSH 密钥][5] 的常用组合来防止一些针对服务器的不必要访问。在我理解 `sudo` 的价值之前,我对日志中的暴力破解感到恐惧。自动尝试以 root 身份登录是最常见的情况,自然这是有充分理由的。 + +有一定入侵常识的攻击者应该知道,在广泛使用 `sudo` 之前,基本上每个 Unix 和 Linux 都有一个 root 账户。这样攻击者就会少一种猜测。因为登录名总是正确的,只要它是 root 就行,所以攻击者只需要一个有效的密码。 + +删除 root 账户可提供大量保护。如果没有 root,服务器就没有确认的登录账户。攻击者必须猜测登录名以及密码。这不是两次猜测,而是两个必须同时正确的猜测。(LCTT 译注:此处是误导,root 用户不可删除,否则系统将会出现问题。另外,虽然 root 可以改名,但是也最好不要这样做,因为很多程序内部硬编码了 root 用户名。可以禁用 root 用户,给它一个不能登录的密码。) + +### 2. root 是最终的攻击媒介 + +在访问失败日志中经常可以见到 root 用户,因为它是最强大的用户。如果你要设置一个脚本强行进入他人的服务器,为什么要浪费时间尝试以受限的普通用户进入呢?只有最强大的用户才有意义。 + +root 既是唯一已知的用户名,又是最强大的用户账户。因此,root 基本上使尝试暴力破解其他任何东西变得毫无意义。 + +### 3. 可选择的权限 + +`su` 命令要么全有要么全没有。如果你有 `su root` 的密码,你就可以变成超级用户。如果你没有 `su` 的密码,那么你就没有任何管理员权限。这个模型的问题在于,系统管理员必须在将 root 密钥移交或保留密钥和对系统的所有权之间做出选择。这并不总是你想要的,[有时候你只是想授权而已][6]。 + +例如,假设你想授予用户以 root 身份运行特定应用程序的权限,但你不想为用户提供 root 密码。通过编辑 `sudo` 配置,你可以允许指定用户,或属于指定 Unix 组的任何用户运行特定命令。`sudo` 命令需要用户的现有密码,而不是你的密码,当然也不是 root 密码。 + +### 4.超时 + +使用 `sudo` 运行命令后,通过身份验证的用户的权限会提升 5 分钟。在此期间,他们可以运行任何管理员授权的命令。 + +5 分钟后,认证缓存被清空,下次使用 `sudo` 再次提示输入密码。超时可防止用户意外执行某些操作(例如,搜索 shell 历史记录时不小心或按多了**向上**箭头)。如果一个用户离开办公桌而没有锁定计算机屏幕,它还可以确保另一个用户不能运行这些命令。 + +### 5. 日志记录 + +Shell 历史功能可以作为一个用户所做事情的日志。如果你需要了解系统发生了什么,你可以(理论上,取决于 shell 历史记录的配置方式)使用 `su` 切换到其他人的账户,查看他们的 shell 历史记录,也可以了解用户执行了哪些命令。 + +但是,如果你需要审计 10 或 100 名用户的行为,你可能会注意到此方法无法扩展。Shell 历史记录的轮转速度很快,默认为 1000 条,并且可以通过在任何命令前加上空格来轻松绕过它们。 + +当你需要管理任务的日志时,`sudo` 提供了一个完整的 [日志记录和警报子系统][7],因此你可以在一个特定位置查看活动,甚至在发生重大事件时获得警报。 + +### 学习 sudo 其他功能 + +除了本文列举的一些功能,`sudo` 命令还有很多已有的或正在开发中的新功能。因为 `sudo` 通常是你配置一次然后就忘记的东西,或者只在新管理员加入团队时才配置的东西,所以很难记住它的细微差别。 + +下载 [sudo 参考手册][8],在你最需要的时候把它当作一个有用的指导书。 + +> **[sudo 参考手册][8]** + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/use-sudo-linux + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[turbokernel](https://github.com/turbokernel) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/command_line_prompt.png +[2]: https://opensource.com/article/19/10/know-about-sudo +[3]: https://www.redhat.com/sysadmin/secure-linux-network-firewall-cmd +[4]: https://www.redhat.com/sysadmin/protect-systems-fail2ban +[5]: https://opensource.com/article/20/2/ssh-tools +[6]: https://opensource.com/article/17/12/using-sudo-delegate +[7]: https://opensource.com/article/19/10/know-about-sudo +[8]: https://opensource.com/downloads/linux-sudo-cheat-sheet diff --git a/published/20220512 NVIDIA Takes a Big Step to Improve its GPU Experience on Linux.md b/published/202205/20220512 NVIDIA Takes a Big Step to Improve its GPU Experience on Linux.md similarity index 100% rename from published/20220512 NVIDIA Takes a Big Step to Improve its GPU Experience on Linux.md rename to published/202205/20220512 NVIDIA Takes a Big Step to Improve its GPU Experience on Linux.md diff --git a/published/202205/20220514 How To Enable Minimize And Maximize Buttons In Fedora 36 Workstation.md b/published/202205/20220514 How To Enable Minimize And Maximize Buttons In Fedora 36 Workstation.md new file mode 100644 index 0000000000..b6c08dcc3f --- /dev/null +++ b/published/202205/20220514 How To Enable Minimize And Maximize Buttons In Fedora 36 Workstation.md @@ -0,0 +1,112 @@ +[#]: subject: "How To Enable Minimize And Maximize Buttons In Fedora 36 Workstation" +[#]: via: "https://ostechnix.com/how-to-enable-minimize-and-maximize-buttons-in-fedora/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14624-1.html" + +如何在 Fedora 36 工作站中启用最小化和最大化按钮 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/22/151018fjxtiidtrztri0rr.jpg) + +> 今天,我们将看到 Fedora 桌面的安装后步骤之一。这个简短的指南解释了如何在 Fedora GNOME 工作站和 Silverblue 版本的应用窗口中启用最小化和最大化按钮。 + +### 介绍 + +你可能已经知道,Fedora Silverblue 和 Fedora GNOME 工作站版本的应用窗口中没有最小化和最大化按钮。 + +如果要最小化应用窗口,需要右键单击其标题栏并从上下文菜单中选择最小化选项。 + +不幸的是,你甚至无法在 Firefox 中使用鼠标获得该选项。要最小化 Firefox 窗口,你要点击 `左 ALT+空格` 键并选择最小化选项。 + +我不知道隐藏最常用的按钮有什么好处。Ubuntu GNOME 桌面有最小/最大按钮,但 Fedora 没有。 + +如果你想恢复 Fedora GNOME 和 Silverblue 版本中的最小化和最大化按钮,你可以借助 Fedora 中的 **Gnome Tweaks** 程序和 “Dash to Panel” 扩展来启用它们。 + +### 在 Fedora 中安装 Gnome Tweaks + +**Gnome Tweaks**,以前称为 **Tweak Tool**,是用于高级 GNOME 3 设置的图形界面。它主要是为 GNOME Shell 设计的,但也可以在其他桌面中使用。如果你在不同的桌面上使用 Tweaks,你可能无法拥有所有功能。它在 Fedora 的默认仓库中可用。因此,你可以使用 `dnf` 包管理器在 Fedora 上安装 Gnome Tweaks,如下所示: + +``` +$ sudo dnf install gnome-tweaks +``` + +如果你使用 Fedora Silverblue,你需要使用以下命令进入你的 toolbox 容器: + +``` +$ toolbox enter +``` + +然后按照前面的命令安装 Tweaks。 + +### 在浏览器中添加 Gnome Shell 集成插件 + +确保你在浏览器中添加了 “Gnome Shell 集成” 插件。此扩展提供与 GNOME shell 和相应扩展仓库的集成。 + +如果你尚未添加它,请转到插件页并搜索并安装它。 + +![Add Gnome Shell Integration Add-on In Firefox Browser][1] + +将出现一个弹出窗口。单击“添加”以启用加载项。添加此扩展程序后,你将在浏览器的工具栏上看到 GNOME 图标。 + +### 在 Fedora 中启用 Dash 到面板扩展 + +“Dash to panel” 扩展是 Gnome Shell 的图标任务栏。此扩展将 dash 移动到 GNOME 主面板中,以便将应用启动器和系统托盘组合到一个面板中,类似于 KDE Plasma 和 Windows 7 以上操作系统中的面板。 + +“Dash to panel” 扩展为你提供了一个永久可见的面板,其中包含最喜欢的快捷方式。因此,不再需要单独的停靠区来轻松访问正在运行和收藏的应用。 + +要启用 “Dash to panel” 扩展,请进入 GNOME 扩展站点并搜索 “Dash to panel” 扩展。 + +![Search for Dash to panel extension in Gnome extensions site][2] + +单击搜索结果中的 “Dash to panel” 链接。你将被重定向到 “Dash to panel” 扩展的官方页面。点击 “ON” 按钮。 + +![Enable Dash to panel extension][3] + +在下一个窗口中,单击安装按钮以启用 “Dash to panel” 扩展。 + +![Install Dash to panel extension][4] + +激活此扩展程序后,你将在底部看到 Dash 面板以及你最喜欢的快捷方式。 + +### 在 Fedora 中启用最小化和最大化按钮 + +打开 Gnome Tweaks 应用。进入 “窗口标题栏Windows Titlebars” 并打开最小/最大按钮。 + +![Enable minimize and maximize buttons in application windows in Fedora][5] + +当你打开开关后,最小化和最大化按钮将出现在所有应用的窗口中。 + +![Minimize, maximize buttons appears in applications windows in Fedora][6] + +默认情况下,最小/最大按钮在右侧可见。你可以将其位置更改为左侧或右侧。 + +“Dash to panel” 扩展有很多微调和自定义选项。右键单击 Dash 面板并选择设置选项,然后根据你的喜好开始对其进行自定义。 + +### 资源 + +> **[Dash to panel 网站][7]** + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/how-to-enable-minimize-and-maximize-buttons-in-fedora/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/wp-content/uploads/2022/05/Add-Gnome-Shell-Integration-Add-on-In-Firefox-Browser.png +[2]: https://ostechnix.com/wp-content/uploads/2021/01/Search-for-Dash-to-panel-extension-in-Gnome-extensions-site.png +[3]: https://ostechnix.com/wp-content/uploads/2021/01/Enable-Dash-to-panel-extension.png +[4]: https://ostechnix.com/wp-content/uploads/2021/01/Install-Dash-to-panel-extension.png +[5]: https://ostechnix.com/wp-content/uploads/2021/01/Enable-Minimize-And-Maximize-Buttons-In-Application-Windows-In-Fedora.png +[6]: https://ostechnix.com/wp-content/uploads/2021/01/Minimize-maximize-buttons-appears-in-applications-windows-in-Fedora.png +[7]: https://extensions.gnome.org/extension/1160/dash-to-panel/ diff --git a/published/202205/20220514 How To Install Multimedia Codecs In Fedora Linux.md b/published/202205/20220514 How To Install Multimedia Codecs In Fedora Linux.md new file mode 100644 index 0000000000..962a7faddb --- /dev/null +++ b/published/202205/20220514 How To Install Multimedia Codecs In Fedora Linux.md @@ -0,0 +1,118 @@ +[#]: subject: "How To Install Multimedia Codecs In Fedora Linux" +[#]: via: "https://ostechnix.com/how-to-install-multimedia-codecs-in-fedora-linux/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14642-1.html" + +如何在 Fedora Linux 中安装多媒体编码器 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/27/112826w7kyg5vddudxwwdg.jpg) + +> 在新安装 Fedora后,安装多媒体编码器来播放音频和视频是第一件要事。 + +在这篇简单的教程中,我们将看到如何在 Fedora 36 工作站中从 RPM Fusion 软件包存储库安装多媒体编码器。 + +### 介绍 + +很多多媒体编码器要么是闭源的,要么是非自由的,因此出于法律的原因,它们没有包含在 Fedora Linux 的默认存储库中。 + +幸运的是,一些第三方存储库提供了受限的和非自由的多媒体编码器、软件包和库。一个流行的社区驱动的第三方存储库是 **RPM Fusion**。 + +如果你想在你的 Fedora 桌面环境中播放大多数的音频或视频格式的文件,你应该从 RPM Fusion 中安装必要的多媒体编码器,如下所述。 + +### 在 Fedora Linux 中安装多媒体编码器 + +确保你已经在你的 Fedora 机器中安装了 RPM Fusion 存储库。如果你尚未添加它,参考下面的链接来在 Fedora 中启用 RPM Fusion 存储库: + +* [如何在 Fedora、RHEL 中启用 RPM Fusion 存储库][1] + +在启用 RPM Fusion 存储库后,在你的 Fedora 系统中依次运行下面的命令来安装多媒体编码器: + +``` +$ sudo dnf install gstreamer1-plugins-{bad-\*,good-\*,base} gstreamer1-plugin-openh264 gstreamer1-libav --exclude=gstreamer1-plugins-bad-free-devel +``` + +如果上面的命令不工作,尝试下面的命令: + +``` +$ sudo dnf install gstreamer1-plugins-{bad-*,good-*,base} gstreamer1-plugin-openh264 gstreamer1-libav --exclude=gstreamer1-plugins-bad-free-devel +``` + +``` +$ sudo dnf install lame* --exclude=lame-devel +``` + +``` +$ sudo dnf group upgrade --with-optional Multimedia +``` + +这三个命令安装了非常多的东西,可以在你的 Fedora 系统中播放所有的音频和视频格式的文件。 + +#### 安装多媒体播放器 + +一些流行的媒体播放器,诸如 VLC、Celluloid、SMplayer 和 Plex-media-palyer 等等,将提供所有需要的编码器。你不需要将它们全部都安装,只要任意一两个就足够了。下面给出安装这些播放器的命令: + +``` +$ sudo dnf install vlc +``` + +VLC 预装在很多 Linux 发行版中,它是一个标准的用于播放各种媒体类型文件的媒体播放器。 + +SMplayer 是 Mplayer 的前端,它被认为是 VLC 的最佳替代品。 + +``` +$ sudo dnf install smplayer +``` + +如果你想要更强大是多媒体体验,安装 Plex-media-player。 + +``` +$ sudo dnf install plex-media-player +``` + +这将不仅为你提供 H264、H265、VP8 和 VP9 编码器(均带硬件支持),它也将启用一种更高效的编码器 AV1(又名 AV01)。你可以使用 [AV1 Beta Launch Playlist][2] 来测试你的浏览器是否支持这个编码器。 + +它们中的一些播放器也可以作为 **flatpak** 格式的应用程序来使用。如果与传统的软件包管理器相比,你更喜欢 flatpak 格式的应用程序,你可以安装它们。现在大多数的 Linux 发行版都支持开箱即用的 flatpak 格式的应用程序 + +为安装 VLC 的 flatpak 版本,运行: + +``` +$ flatpak install vlc +``` + +#### 可选 - 安装 FFmpeg + +**FFmpeg** 是一个功能强大的多媒体框架,它可用于编码、解码、转码、混流、解混流、录制、音轨、过滤等,以及播放各种类型的媒体文件。你可以通过在你的系统上安装 FFmpeg 来获取相应的解码器。 + +* [如何在 Linux 中安装 FFmpeg][3] + +希望这有帮助。 + +**相关阅读:** + +* [在 Fedora Silverblue 中的 Chromium 和 Firefox 上启用 H264][4] +* [如何在 OpenSUSE 中安装多媒体解码器][5] + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/how-to-install-multimedia-codecs-in-fedora-linux/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/how-to-enable-rpm-fusion-repository-in-fedora-rhel/ +[2]: https://www.youtube.com/playlist?list=PLyqf6gJt7KuHBmeVzZteZUlNUQAVLwrZS +[3]: https://ostechnix.com/install-ffmpeg-linux/ +[4]: https://ostechnix.com/enable-h264-on-chromium-and-firefox-in-fedora-silverblue/ +[5]: https://ostechnix.com/how-to-install-multimedia-codecs-in-opensuse/ + diff --git a/published/202205/20220516 Fudgie- The Awesome Budgie Desktop is Coming to Fedora Linux Soon.md b/published/202205/20220516 Fudgie- The Awesome Budgie Desktop is Coming to Fedora Linux Soon.md new file mode 100644 index 0000000000..6306b97b23 --- /dev/null +++ b/published/202205/20220516 Fudgie- The Awesome Budgie Desktop is Coming to Fedora Linux Soon.md @@ -0,0 +1,69 @@ +[#]: subject: "Fudgie? The Awesome Budgie Desktop is Coming to Fedora Linux Soon" +[#]: via: "https://news.itsfoss.com/fudgie-fedora-budgie-announcement/" +[#]: author: "Abhishek https://news.itsfoss.com/author/root/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14610-1.html" + +Fudgie?令人惊叹的 Budgie 桌面即将登陆 Fedora Linux +====== + +> Fedora 用户也将能够享受 Budgie 桌面环境的现代体验。 + +![Fedora Budgie][1] + +近来,红帽的社区项目 Fedora 已经获得了相当不错的用户群。除了默认桌面 GNOME 外,Fedora 也以 [Fedora 定制版][2]Fedora Spins 的形式提供了多种其他桌面环境。 + +这意味着你可以在 Fedora 上享受 KDE、MATE、Xfce 和其他一些桌面环境的开箱即用的体验,而无需额外的努力。喜欢 KDE 而不是 GNOME 吗?下载 Fedora 的 KDE 定制版,安装它,就像安装常规的 Fedora 一样。 + +Fedora 定制版中缺少的一个桌面环境是 Budgie 桌面。 + +### Budgie 走向独立 + +在 2014 年左右,Budgie 桌面随同 Solus Linux 项目一起推出。最近,Solus 和 Budgie 项目出现了一些 [倒退式的发展][3]。Budgie 项目现在已经 [从 Solus Linux 中独立出来了][4]。 + +自从首次发布以来,Budgie 就获得了一定的追随者。它的现代布局方式受到了许多 Linux 用户的喜爱。这也是许多其他主要 Linux 发行版(如 Ubuntu、Manjaro、openSUSE)开始提供 Budgie 版本的原因。 + +![Budgie 10.6][5] + +到目前为止,Fedora 的产品中还没有 Budgie,但这可能会在 Fedora 的下一个版本中发生变化。 + +### Budgie 提交加入 Fedora 的申请 + +Budgie 项目的首席开发人员 Joshua Strobl 在 [Reddit 帖子][6] 中宣布了这一消息。 + +> 我现在已提交 Budgie 桌面及其它的附属软件(Budgie 控制中心、Budgie 屏幕保护程序、Budgie 桌面视图)加入到 Fedora 中的申请。从 Fedora rawhide(37)开始并向后移植到 36。它会得到“官方的”维护/支持,因为我自己在工作笔记本电脑上使用 Fedora Silverblue + rawhide,并且我以后会切换桌面到 Fedora Silverblue。 + +这意味着,如果该软件包得到了 Fedora 团队的批准,你应该就能在 Fedora 37 中(甚至有希望在 Fedora 36 中)安装 Budgie 和它的附属软件。 + +但这还不是故事的结束。Joshua 提到,他也在考虑引入并支持包含 Budgie 桌面的 Fedora 官方定制版。这意味着人们将能够下载一个预装了 Budgie(而不是 GNOME)桌面的 Fedora ISO。 + +目前还不清楚他的意思,有可能是一个 Budge 的 Fedora 官方定制版,也有可能是一个新的非官方的 Fedora 衍生版,名为 “Fudgie”,完全由他来维护。 + +### Fedora + Budgie 是一个好消息 + +无论如何,Fedora 的 Budgie 桌面都是个好消息。它为 Fedora 用户提供了更多选择,而 Budgie 是一个漂亮的桌面。同时喜欢 Fedora 和 Budgie 的人应该能够享受两全其美的体验。 + +我希望你同意我的看法。请在评论区也分享一下你的看法吧! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/fudgie-fedora-budgie-announcement/ + +作者:[Abhishek][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/root/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/fedora-budgie.png +[2]: https://spins.fedoraproject.org +[3]: https://news.itsfoss.com/solus-co-lead-resign-budgie-serpent/ +[4]: https://news.itsfoss.com/budgie-10-6-release/ +[5]: https://news.itsfoss.com/wp-content/uploads/2022/04/budgie-10.61-1024x576.jpg +[6]: https://www.reddit.com/r/Fedora/comments/uq3gah/budgie_desktop_has_now_been_submitted_for/ diff --git a/published/202205/20220516 How To Reset Root Password In Fedora 36.md b/published/202205/20220516 How To Reset Root Password In Fedora 36.md new file mode 100644 index 0000000000..ef311d9227 --- /dev/null +++ b/published/202205/20220516 How To Reset Root Password In Fedora 36.md @@ -0,0 +1,102 @@ +[#]: subject: "How To Reset Root Password In Fedora 36" +[#]: via: "https://ostechnix.com/reset-root-password-in-fedora/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "turbokernel" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14638-1.html" + +在 Fedora 36 中如何重置 root 密码 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/26/094836cgtywrtwkywg2nem.jpg) + +> 在 Fedora 中重置忘记的 root 密码。 + +你是否忘记了 Fedora 中的 root 密码?或者你想更改 Fedora 系统中的 root 用户密码?没问题!本手册将指导你在 Fedora 操作系统中完成更改或重置 root 密码的步骤。 + +**注意:** 本手册已在 Fedora 36 和 35 版本上进行了正式测试。下面提供的步骤与在 Fedora Silverblue 和旧 Fedora 版本中重置 root 密码的步骤相同。 + +**步骤 1** - 打开 Fedora 系统并按下 `ESC` 键,直到看到 GRUB 启动菜单。出现 GRUB 菜单后,选择要引导的内核并按下 `e` 编辑选定的引导条目。 + +![Grub Menu In Fedora 36][1] + +**步骤 2** - 在下一个页面中,你将看到所有启动参数。找到名为 `ro` 的参数。 + +![Find ro Kernel Parameter In Grub Entry][2] + +**步骤 3** - 将 `ro` 参数替换为 `rw init=/sysroot/bin/sh`。请注意 `rw` 和 `init=/sysroot`...之间的空格。修改后的内核参数行应如下所示。 + +![Modify Kernel Parameters][3] + +**步骤 4** - 上述步骤更改参数后,按 `Ctrl+x` 进入紧急模式,即单用户模式。 + +在紧急模式下,输入以下命令以 **读/写** 模式挂载根文件系统(`/`)。 + +``` +chroot /sysroot/ +``` + +![Mount Root Filesystem In Read, Write Mode In Fedora Linux][4] + +**步骤 5** - 现在使用 `passwd` 命令重置 root 密码: + +``` +passwd root +``` + +输入两次 root 密码。我建议使用强密码。 + +![Reset Or Change Root Password In Fedora][5] + +**步骤 6** - 重置 root 密码后,运行以下命令在重启时启用 SELinux 重新标记: + +``` +touch /.autorelabel +``` + +![Enable SELinux Relabeling On Reboot In Fedora][6] + +**步骤 7** - 最后,退出单用户模式并通过运行以下命令将 Fedora 系统重启到正常模式: + +``` +exit +``` + +``` +reboot +``` + +等待 SELinux 重新标记完成。这将需要几分钟,具体时长取决于文件系统的大小和硬盘的速度。 + +![SELinux Filesystem Relabeling In Progress][7] + +**步骤 8** - 文件系统重新标记完成后,你可以使用新的 root 密码登录到你的 Fedora 系统。 + +![Login To Fedora As Root User][8] + +如你所见,在 Fedora 36 中重置 root 密码的步骤非常简单,并且与 [在 RHEL 中重置 root 密码][9] 及其衍生版本(如 CentOS、AlmaLinux 和 Rocky Linux)完全相同。 + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/reset-root-password-in-fedora/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[turbokernel](https://github.com/turbokernel) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/wp-content/uploads/2022/05/Grub-Menu-In-Fedora-36.png +[2]: https://ostechnix.com/wp-content/uploads/2021/11/Find-ro-Kernel-Parameter-In-Grub-Entry.png +[3]: https://ostechnix.com/wp-content/uploads/2022/05/Modify-Kernel-Parameters.png +[4]: https://ostechnix.com/wp-content/uploads/2022/05/Mount-Root-Filesystem-In-Read-Write-Mode-In-Fedora-Linux.png +[5]: https://ostechnix.com/wp-content/uploads/2022/05/Reset-Or-Change-Root-Password-In-Fedora.png +[6]: https://ostechnix.com/wp-content/uploads/2022/05/Enable-SELinux-Relabeling-On-Reboot-In-Fedora.png +[7]: https://ostechnix.com/wp-content/uploads/2021/11/SELinux-filesystem-relabeling-in-progress.png +[8]: https://ostechnix.com/wp-content/uploads/2022/05/Login-To-Fedora-As-Root-User.png +[9]: https://ostechnix.com/how-to-reset-root-user-password-in-centos-8-rhel-8/ diff --git a/published/202205/20220516 Microsoft has another Linux distribution and it is based on Debian.md b/published/202205/20220516 Microsoft has another Linux distribution and it is based on Debian.md new file mode 100644 index 0000000000..ab2671dfb7 --- /dev/null +++ b/published/202205/20220516 Microsoft has another Linux distribution and it is based on Debian.md @@ -0,0 +1,81 @@ +[#]: subject: "Microsoft has another Linux distribution and it is based on Debian" +[#]: via: "https://news.itsfoss.com/microsoft-debian-distro/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14604-1.html" + +微软还有另一个 Linux 发行版,而且是基于 Debian 的 +====== + +> 微软一直在为 Azure 云使用一个基于 Debian 的 Linux 发行版。我们开始揭开它的面纱了! + +![微软 Debian][1] + +微软在其大量的项目中利用了 Linux。近年来,你一定读过很多关于 WSL(或 WSL2)和微软制作的 Linux 发行版(即 **CBL Mariner**)的消息。 + +> CBL 是 “共用基础 LinuxCommon Base Linux”的缩写。 + +甚至在 Windows 11 上,微软也在不断地改进 [WSL][2] 的体验。 + +虽然 CBL Mariner 被用来支持 WSLg(WSL 2 的 GUI 部分)和 Azure,但最近一些媒体([ZDNet][3])报道发现了微软内部使用的另一个 Linux 发行版。 + +微软肯定喜欢 Linux,对吗? + +### CBL-Delridge:一个基于 Debian 的 Linux 发行版 + +![][4] + +微软维护着一个基于 Debian 的发行版,它被用来支持 Azure 的“云端外壳Cloud Shell”。它的名字是 “CBL-Delridge”。 + +感谢 [Hayden Barnes][5],他是 SUSE 公司负责 Windows 容器的高级工程经理。 + +在他 2022 年 2 月的一篇 [旧博文][6] 中,他透露了关于它的更多细节,并帮助你构建它以在需要时将其导入 WSL。 + +与从头构建的 CBL-Mariner 不同,CBL-Delridge(CBL-D)是基于 Debian 10(Buster)的。 + +看到 Debian 在这里受到青睐并不奇怪,即使是 [谷歌也为其内部的 Linux 发行版 gLinux 抛弃了 Ubuntu 而选择了 Debian][7]。 + +有趣的是,微软在 2020 年发布了这个供内部使用的发行版(根据 Hayden 维护的 [微软的开源举措的非官方时间表][8]),而我们在 2022 年才知道了它。 + +![][9] + +CBL-Delridge 也采用了同样的版本号 10(巧合),代号为 “Quinault”。解析一下这个名字,ZDNet 指出,Delridge 是西雅图西部的一个区,而 Quinault 指的是华盛顿州奥林匹克国家公园的一个山谷。 + +### 构建 CBL-Delridge + +与普通的 Linux 发行版不同,你找不到它的可以公开下载的镜像文件。 + +考虑到 CBL-D 的 APT 软件包库是公开的,如果你出于任何需求想测试它,你可以构建你的 CBL-D 镜像。 + +你也可以把它导入 WSL 中。[Hayden 的博文][10] 解释了如何使用 debootstrap 来开始构建镜像,然后将其导入 WSL。 + +请注意,CBL-D 并不完全是 Debian 的替代品。所以,你可能无法找到所有你喜欢的软件包。要了解更多的信息,你可以浏览 Hayden 的博文。 + +你对微软的内部使用的 Linux 发行版有什么看法?你试过其中一个吗?请在评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/microsoft-debian-distro/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/microsoft-new-debian-based-linux-distro.jpg +[2]: https://news.itsfoss.com/windows-11-wsl/ +[3]: https://www.zdnet.com/article/surprise-theres-yet-another-microsoft-linux-distro-cbl-delridge/ +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/azure-delridge.png +[5]: https://twitter.com/unixterminal +[6]: https://boxofcables.dev/building-cbl-d-microsofts-other-linux-distro/ +[7]: https://itsfoss.com/goobuntu-glinux-google/ +[8]: https://github.com/sirredbeard/microsoft-opensource +[9]: https://news.itsfoss.com/wp-content/uploads/2022/05/wsl-cbl-delridge-1024x600.png +[10]: https://boxofcables.dev/building-cbl-d-microsofts-other-linux-distro/ diff --git a/published/202205/20220516 Structured Data Processing with Spark SQL.md b/published/202205/20220516 Structured Data Processing with Spark SQL.md new file mode 100644 index 0000000000..33a25c2f6d --- /dev/null +++ b/published/202205/20220516 Structured Data Processing with Spark SQL.md @@ -0,0 +1,123 @@ +[#]: subject: "Structured Data Processing with Spark SQL" +[#]: via: "https://www.opensourceforu.com/2022/05/structured-data-processing-with-spark-sql/" +[#]: author: "Phani Kiran https://www.opensourceforu.com/author/phani-kiran/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14631-1.html" + +用 Spark SQL 进行结构化数据处理 +====== + +> Spark SQL 是 Spark 生态系统中处理结构化格式数据的模块。它在内部使用 Spark Core API 进行处理,但对用户的使用进行了抽象。这篇文章深入浅出地告诉你 Spark SQL 3.x 的新内容。 + +![](https://img.linux.net.cn/data/attachment/album/202205/24/093036xaf6kaz1auaf4a7s.jpg) + +有了 Spark SQL,用户可以编写 SQL 风格的查询。这对于精通结构化查询语言或 SQL 的广大用户群体来说,基本上是很有帮助的。用户也将能够在结构化数据上编写交互式和临时性的查询。Spark SQL 弥补了弹性分布式数据集resilient distributed data sets(RDD)和关系表之间的差距。RDD 是 Spark 的基本数据结构。它将数据作为分布式对象存储在适合并行处理的节点集群中。RDD 很适合底层处理,但在运行时很难调试,程序员不能自动推断模式schema。另外,RDD 没有内置的优化功能。Spark SQL 提供了数据帧DataFrame和数据集来解决这些问题。 + +Spark SQL 可以使用现有的 Hive 元存储、SerDes 和 UDF。它可以使用 JDBC/ODBC 连接到现有的 BI 工具。 + +### 数据源 + +大数据处理通常需要处理不同的文件类型和数据源(关系型和非关系型)的能力。Spark SQL 支持一个统一的数据帧接口来处理不同类型的源,如下所示。 + +* 文件: + * CSV + * Text + * JSON + * XML +* JDBC/ODBC: + * MySQL + * Oracle + * Postgres +* 带模式的文件: + * AVRO + * Parquet +* Hive 表: + * Spark SQL 也支持读写存储在 Apache Hive 中的数据。 + +通过数据帧,用户可以无缝地读取这些多样化的数据源,并对其进行转换/连接。 + +### Spark SQL 3.x 的新内容 + +在以前的版本中(Spark 2.x),查询计划是基于启发式规则和成本估算的。从解析到逻辑和物理查询计划,最后到优化的过程是连续的。这些版本对转换和行动的运行时特性几乎没有可见性。因此,由于以下原因,查询计划是次优的: + +* 缺失和过时的统计数据 +* 次优的启发式方法 +* 错误的成本估计 + +Spark 3.x 通过使用运行时数据来迭代改进查询计划和优化,增强了这个过程。前一阶段的运行时统计数据被用来优化后续阶段的查询计划。这里有一个反馈回路,有助于重新规划和重新优化执行计划。 + +![Figure 1: Query planning][2] + +#### 自适应查询执行(AQE) + +查询被改变为逻辑计划,最后变成物理计划。这里的概念是“重新优化”。它利用前一阶段的可用数据,为后续阶段重新优化。正因为如此,整个查询的执行要快得多。 + +AQE 可以通过设置 SQL 配置来启用,如下所示(Spark 3.0 中默认为 false): + +``` +spark.conf.set(“spark.sql.adaptive.enabled”,true) +``` + +#### 动态合并“洗牌”分区 + +Spark 在“洗牌shuffle”操作后确定最佳的分区数量。在 AQE 中,Spark 使用默认的分区数,即 200 个。这可以通过配置来启用。 + +``` +spark.conf.set(“spark.sql.adaptive.coalescePartitions.enabled”,true) +``` + +#### 动态切换连接策略 + +广播哈希是最好的连接操作。如果其中一个数据集很小,Spark 可以动态地切换到广播连接,而不是在网络上“洗牌”大量的数据。 + +#### 动态优化倾斜连接 + +如果数据分布不均匀,数据会出现倾斜,会有一些大的分区。这些分区占用了大量的时间。Spark 3.x 通过将大分区分割成多个小分区来进行优化。这可以通过设置来启用: + +``` +spark.conf.set(“spark.sql.adaptive.skewJoin.enabled”,true) +``` + +![Figure 2: Performance improvement in Spark 3.x (Source: Databricks)][3] + +### 其他改进措施 + +此外,Spark SQL 3.x还支持以下内容。 + +#### 动态分区修剪 + +3.x 将只读取基于其中一个表的值的相关分区。这消除了解析大表的需要。 + +#### 连接提示 + +如果用户对数据有了解,这允许用户指定要使用的连接策略。这增强了查询的执行过程。 + +#### 兼容 ANSI SQL + +在兼容 Hive 的早期版本的 Spark 中,我们可以在查询中使用某些关键词,这样做是完全可行的。然而,这在 Spark SQL 3 中是不允许的,因为它有完整的 ANSI SQL 支持。例如,“将字符串转换为整数”会在运行时产生异常。它还支持保留关键字。 + +#### 较新的 Hadoop、Java 和 Scala 版本 + +从 Spark 3.0 开始,支持 Java 11 和 Scala 2.12。 Java 11 具有更好的原生协调和垃圾校正,从而带来更好的性能。 Scala 2.12 利用了 Java 8 的新特性,优于 2.11。 + +Spark 3.x 提供了这些现成的有用功能,而无需开发人员操心。这将显着提高 Spark 的整体性能。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/structured-data-processing-with-spark-sql/ + +作者:[Phani Kiran][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/phani-kiran/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Spark-SQL-Data-cluster.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-Query-planning.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-2-Performance-improvement-in-Spark-3.x-Source-Databricks.jpg diff --git a/published/202205/20220517 Adobe Illustrator Alternative Inkscape Releases Version 1.2.md b/published/202205/20220517 Adobe Illustrator Alternative Inkscape Releases Version 1.2.md new file mode 100644 index 0000000000..3fa4fa0560 --- /dev/null +++ b/published/202205/20220517 Adobe Illustrator Alternative Inkscape Releases Version 1.2.md @@ -0,0 +1,110 @@ +[#]: subject: "Adobe Illustrator Alternative Inkscape Releases Version 1.2" +[#]: via: "https://news.itsfoss.com/inkscape-1-2-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14615-1.html" + +Adobe Illustrator 的替代品 Inkscape 发布了 1.2 版本 +====== + +> Inkscape 1.2 是一个激动人心的更新,包含许多有用的改进和新增功能。试一试吧! + +![Inkscape][1] + +Inkscape 是一个流行的开源矢量图形处理程序,可用于 Linux、Windows 和 macOS。 + +它的最新版本侧重于改进现有工具,以及提供更多自定义选项。 + +此外,它还有一些新增功能。让我们来看看吧! + +### Inkscape 1.2:有什么新功能? + +![Inkscape 1.2 is here!][2] + +Inkscape 1.2 是一个激动人心的更新,它包含了许多有用的增强功能。其中一些关键变化包括: + +* 改进的渐变编辑器 +* 新的捕捉模式 +* 支持多页文档 +* 改进的导出对话框 +* 可定制的工具栏 + +在这里,我将重点介绍重要的功能改进: + +#### 多页文档支持 + +![][4] + +你现在可以在同一个文档中创建多个标准/自定义大小的页面,并把它们保存为一个多页的 PDF 文档。 + +不仅是导出,你还可以导入多页 PDF 来简化操作。 + +### 自定义调色板 + +你现在可以轻松地更改尺寸、重新配置颜色,以此来尝试所有可用的调色板,然后选择你真正喜欢的颜色。 + +特别是当你需要在用户界面中使用多个调色板时,它会让操作更流畅。 + +### 新的“平铺”实时路径效果 + +如果你正在处理很多个对象,并想尝试不同路径效果,那么你应该会喜欢新的平铺实时路径效果。 + +你可以轻松调整镜像模式、调整间隙、添加行和列,从而获得大量发挥创意的机会。 + +### 图层和对象对话框 + +![][5] + +大多数改进使得体验比以前更直接。使用新的合并图层和对象对话框,你可以根据要查找的图层,快速组织/查找对象。 + +你甚至可以自定义图层和对象颜色来区分它们。 + +### 导出对话框 + +![][6] + +现在,导出对话框为你提供了选择简单/批量导出的选项,以及选择文件格式和 DPI 设置的能力。 + +### 其他改进 + +除了上面的主要亮点外,还有其他的一些重大变化,包括: + +* 两种新的画布捕捉模式有助于对齐对象 +* 你可以在“填充和描边Fill and Stroke”对话框中选择渐变 +* 编辑标记marker的能力 +* 改进了与扩展的兼容性 +* 更新了 SVG 字体编辑器 +* 性能改进 +* 可配置的工具栏 + +你可以参考 [Inkscape 1.2 发行说明][7] 来查看所有的技术变化。 + +### 下载 Inkscape 1.2 + +你可以从它的官方网站下载 AppImage 格式的 Inkscape 1.2 软件包,或查看其他适用于 Windows/macOS 平台的可用软件包。 + +> **[Inkscape 1.2][8]** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/inkscape-1-2-release/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/inkscape-1-2.jpg +[2]: https://youtu.be/1U4hVbvRr_g +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/inkscape-1-2-multi-document.jpg +[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/inkscape-1-2layers-objects-1024x593.jpg +[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/inkscape1-2-export-1024x688.jpg +[7]: https://media.inkscape.org/media/doc/release_notes/1.2/Inkscape_1.2.html +[8]: https://inkscape.org/release/inkscape-1.2/ diff --git a/published/202205/20220517 Kali Linux 2022.2 Release Adds an Amusing New Feature for the Hackers to Scare People.md b/published/202205/20220517 Kali Linux 2022.2 Release Adds an Amusing New Feature for the Hackers to Scare People.md new file mode 100644 index 0000000000..f604885536 --- /dev/null +++ b/published/202205/20220517 Kali Linux 2022.2 Release Adds an Amusing New Feature for the Hackers to Scare People.md @@ -0,0 +1,115 @@ +[#]: subject: "Kali Linux 2022.2 Release Adds an Amusing New Feature for the Hackers to Scare People" +[#]: via: "https://news.itsfoss.com/kali-linux-2022-2-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14606-1.html" + +Kali Linux 2022.2 发布:增加了一个吓唬人的有趣新功能 +====== + +> Kali Linux 2022.2 是今年的第二次更新,增加了一些有趣的内容。 + +![kali linux][1] + +Kali Linux 不是你寻常使用的 Linux 发行版。它是专门为渗透测试和道德黑客学习及实验而量身打造的。 + +在新的 Kali Linux 版本中,增加了一些有趣的工具和功能。让我们来看看 Kali Linux 2022.2 的亮点。 + +### Kali Linux 2022.2 有什么新功能? + +Kali Linux 2022.2 是一个有趣的版本,它引入了更新的桌面环境,升级了 Linux 内核,增加了新的工具,以及更多的改进。 + +不仅仅限于通常的完善,你还可以看到一个新的屏幕保护程序,其中有许多令人惊讶的元素。 + +#### 带有好莱坞怀旧色彩的新屏保 + +Kali Linux 已经出现在许多黑客相关的电视节目/电影(如《黑客军团Mr. Robot》)中,看起来酷极了。 + +更进一步,Kali Linux 增加了一个新的屏幕保护程序(你可以单独安装),其中有来自好莱坞的令人惊讶的元素和一些吓唬人的黑客场景。 + +他们在屏保中调侃了《黑客帝国》的尼奥,还添加了一个漂亮的 Kali Linux 标志。 + +![][2] + +整个屏幕保护程序包括几个非常棒的元素。要安装并立即启动它,你可以输入以下命令: + +``` +sudo apt -y install kali-screensaver +sudo apt -y install hollywood-activate +hollywood-activate +``` + +![VIDEO](https://player.vimeo.com/video/710680907) + +#### GNOME 42 + +![][3] + +Kali Linux 终于包含了新的 [GNOME 42][4] 桌面环境。所以,在 Kali Linux 自然带有 GNOME 42 的所有优点,包括新的屏幕截图用户界面。 + +另外,现在你将会在 GNOME 桌面环境中获得一致的深浅主题体验。 + +![][5] + +#### KDE Plasma 5.24 + +对于 KDE 粉丝,Kali Linux 2022.2 也带来了新的 [KDE Plasma 5.24][6] LTS 桌面环境。 + +![][7] + +#### 新的 Kali Linux 工具 + +新的工具总是每个新版本的重点。一些新增加的工具包括: + +* BruteShark - 网络取证分析工具(NFAT) +* Evil-WinRM - Ultimate WinRM shell +* Hakrawler - 网络爬虫,设计用于轻松、快速发现端点和资产 +* Httpx - 快速和多用途的 HTTP 工具箱 +* Sparrow-wifi - 用于 Linux 的图形化 Wi-Fi 分析器 + +#### 其他改进 + +该版本还有许多其他实质性的改进。主要的亮点包括。 + +* 对终端进行了调整,以加强语法高亮、自动补完和输出 +* 自动复制丢失的配置 +* 支持 VirtualBox 共享文件夹 +* 增加了新的应用程序图标 +* 为多显示器设置调整了默认墙纸 +* 针对 ARM 设备的更新 +* Linux 内核 5.16 + +要探索更多关于该版本的信息,你可以查看 [官方发布公告][8]。 + +### 下载 Kali Linux 2022.2 + +你应该能够在 [官方下载页面][9] 中找到该镜像。根据你的要求选择合适的版本,然后安装它。 + +> **[Kali Linux 2022.2][10]** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/kali-linux-2022-2-release/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/kali-2022-2-release-new.jpg +[2]: https://news.itsfoss.com/wp-content/uploads/2022/05/kali-linux-screensaver.jpg +[3]: https://news.itsfoss.com/wp-content/uploads/2022/05/kali-linux-gnome-42.jpg +[4]: https://news.itsfoss.com/gnome-42-features/ +[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/kali-linux-gnome-42-screenshot.jpg +[6]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/ +[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/kali-linux-kde-5-24-1024x640.jpg +[8]: https://www.kali.org/blog/kali-linux-2022-2-release/ +[9]: https://www.kali.org/get-kali/ +[10]: https://www.kali.org/get-kali/ diff --git a/published/202205/20220518 Five common mistakes when using automation.md b/published/202205/20220518 Five common mistakes when using automation.md new file mode 100644 index 0000000000..c41b5d825b --- /dev/null +++ b/published/202205/20220518 Five common mistakes when using automation.md @@ -0,0 +1,56 @@ +[#]: subject: "Five common mistakes when using automation" +[#]: via: "https://fedoramagazine.org/five-common-mistakes-when-using-automation/" +[#]: author: "Gary Scarborough https://fedoramagazine.org/author/gscarbor/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14657-1.html" + +使用自动化时的五个常见错误 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/31/151450ukwk98weqgefgowa.jpg) + +随着自动化扩展到涵盖 IT 的更多方面,越来越多的管理员正在学习自动化技能并应用它们来减轻他们的工作量。自动化可以减轻重复性任务的负担,并为基础设施增加一定程度的一致性。但是,当 IT 工作人员部署自动化时,会出现可能对大大小小的基础设施造成严重破坏的常见错误。在自动化部署中通常会出现五个常见错误。 + +### 缺乏测试 + +初学者常犯的错误是自动化脚本没有经过全面测试。由于拼写错误或逻辑错误,简单的 shell 脚本可能会对服务器产生不利影响。将该错误乘以基础架构中的服务器数量,你可能会遇到一大堆问题需要清理。在大规模部署之前始终测试你的自动化脚本。 + +### 意外负载 + +经常发生的第二个错误是没有预测脚本可能对其他资源施加的系统负载。当目标是十几个服务器时,运行从仓库下载文件或安装包的脚本可能没问题。脚本通常在成百上千台服务器上运行。这种负载可以使支持服务停止或完全崩溃。不要忘记考虑端点影响或设置合理的并发率。 + +### 离开脚本 + +自动化工具的一种用途是确保符合标准设置。自动化可以轻松确保组中的每台服务器都具有完全相同的设置。如果该组中的服务器需要根据该基线进行更改,同时管理员不了解合规标准,那么可能会出现问题。安装和启用不需要和不想要的服务,从而导致可能的安全问题。 + +### 缺乏文档 + +管理员的一项固定职责应该是记录他们的工作。由于合同到期、升职或定期员工流动,公司可能会在 IT 部门频繁招聘新员工。公司内的工作组相互隔离也很常见。由于这些原因,重要的是记录哪些自动化已经到位。与用户运行脚本不同,自动化可能会在创建它的人离开组之后继续很长时间。管理员可能会发现自己在其基础设施中面临着来自未经检查的自动化的奇怪行为。 + +### 缺乏经验 + +列表中的最后一个错误是管理员对他们正在自动化的系统不够了解。管理员经常被雇用到他们没有接受过足够培训且没有人可以求教的职位上工作。自 COVID 以来,当公司努力填补空缺时,这一点尤其重要。然后管理员被迫处理他们没有设置并且可能不完全理解的基础设施。这可能会导致非常低效的脚本浪费资源或配置错误的服务器。 + +### 结论 + +越来越多的管理员正在学习自动化来帮助他们完成日常任务。因此,自动化正被应用于更多的技术领域。希望此列表将有助于防止新用户犯这些错误,并敦促经验丰富的管理员重新评估他们的 IT 策略。自动化旨在减轻重复性任务的负担,而不是为最终用户带来更多工作。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/five-common-mistakes-when-using-automation/ + +作者:[Gary Scarborough][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/gscarbor/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2022/05/modern-times-816x345.jpg +[2]: https://en.wikipedia.org/wiki/Modern_Times_(film) +[3]: https://commons.wikimedia.org/wiki/File:Chaplin_-_Modern_Times.jpg diff --git a/published/202205/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md b/published/202205/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md new file mode 100644 index 0000000000..1edc4b7a48 --- /dev/null +++ b/published/202205/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md @@ -0,0 +1,42 @@ +[#]: subject: "Google To Start Distributing A Collection Of Open Source Software libraries" +[#]: via: "https://www.opensourceforu.com/2022/05/google-to-start-distributing-a-collection-of-open-source-software-libraries/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "beamrolling" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14641-1.html" + +谷歌开始分发一系列开源软件库 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/27/104331cwwqji26wlwwfw2n.jpg) + +5 月 17 日,谷歌推出了一项新计划,该计划向谷歌云用户策划并提供经过安全审查的开源包选项,以保护开源软件供应链。该公司在一篇 [博文][2] 中宣布了这项名为 “安心开源软件Assured Open Source Software” 的新服务。在博文中,谷歌云安全和隐私部门产品经理 Andy Chang 强调了保障开源软件的一些问题,并强调了谷歌对开源的承诺。 + +“开发者社区、企业及政府对软件供应链风险的意识越来越强,”Chang 写道,并以去年的 log4j 重大漏洞为例。“谷歌仍是开源代码最大的维护者、贡献者和使用者之一,并深入参与了帮助开源软件生态系统更加安全的工作。” + +据谷歌称,“安心开源软件”服务将让云客户能够访问谷歌的大量软件审计知识。另据其称,所有通过该服务提供的开源软件包也在公司内部使用,该公司会定期检查和分析其漏洞。 + +谷歌目前正在审核的 550 个重要开源库的清单可以在 [GitHub][3] 上找到。虽然这些库都可以独立于谷歌下载,但该计划将呈现通过谷歌云提供的审核版本,防止开发者破坏广泛使用的开放源码库。这项服务现在处于预先体验阶段,将在 2022 年第三季度准备好进行更广泛的消费者测试。 + +谷歌的声明只是广大行业努力加强开源软件供应链的安全的一部分,这份努力得到了拜登政府的支持。今年 1 月,美国国土安全部和美国网络安全与基础设施安全局的代表与美国一些主要 IT 公司的高管会面,研究 log4j 漏洞之后的开源软件安全问题。此后,有关公司在最近的一次峰会上承诺提供超过 3000 万美元的资金,以改善开源软件的安全问题。 + +除了现金,谷歌还在投入工程时间来确保供应链的安全。该公司已宣布发展一个“开源维护小组Open Source Maintenance Crew”,该团队将与库维护人员合作以提高安全性。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/google-to-start-distributing-a-collection-of-open-source-software-libraries/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[beamrolling](https://github.com/beamrolling) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/google3-1-e1652863988525.jpg +[2]: https://cloud.google.com/blog/products/identity-security/introducing-assured-open-source-software-service +[3]: https://github.com/google/oss-fuzz/tree/master/projects diff --git a/published/202205/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md b/published/202205/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md new file mode 100644 index 0000000000..b6bb934753 --- /dev/null +++ b/published/202205/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md @@ -0,0 +1,128 @@ +[#]: subject: "How To Reset Sudo Password In Ubuntu 22.04 / 20.04 LTS" +[#]: via: "https://ostechnix.com/how-to-reset-sudo-password-in-ubuntu-20-04-lts/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14648-1.html" + +如何在 Ubuntu 22.04 / 20.04 LTS 中重新设置 sudo 密码 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/29/083429wzrvirffinihrfv5.jpg) + +> 在 Ubuntu 中重新设置已忘记的 root 用户的密码 + +这篇简单的指南将向你解释,如何在 Ubuntu 22.04 好 20.04 LTS 桌面环境中,以及从服务器版本中的 恢复rescue 模式中重新设置 sudo 密码。 + +### 介绍 + +在 [安装 Ubuntu][1] 时,创建的一个新用户将会带有 `sudo` 权限,用以执行各种各样的管理任务。 + +如果你的 Ubuntu 系统有多个 `sudo` 用户,你能够从另外一个 `sudo` 用户的账号下,轻松地重新设置所忘记的一个 `sudo` 用户或管理员用户的密码。 + +如果你只有一个 `sudo` 用户,并且忘记了密码怎么办?没有问题! 从 Ubuntu 的 恢复rescue单一用户single user 模式中恢复 `sudo` 用户密码很容易。 + +虽然这篇指南是在 Ubuntu 22.04 和 20.04 LTS 版本上进行的正式测试,不过,下面给定的步骤对于其它的 Ubuntu 版本和衍生版本来说是相同的。 + +### 在 Ubuntu 22.04 / 20.04 LTS 中重新设置 sudo 密码 + +首先,启动你的 Ubuntu 系统到 恢复rescue 模式下,来重新设置一个 `sudo` 用户的密码,操作如下面的链接所述。 + +> [如何启动到 Ubuntu 22.04 /  20.04 / 18.04 的 恢复rescue 模式 或 急救Emergency模式 ][2] + +现在,进入到 恢复rescue 模式下,通过运行下面的命令,以读/写的模式挂载根(`/`)文件系统: + +``` +# mount -n -o remount,rw / +``` + +现在,使用 `passwd` 命令来重新设置 `sudo` 用户的密码: + +``` +# passwd ostechnix +``` + +在这里,`ostechnix` 是 sudo 用户的名称。使用你自己的用户名称来替换掉它。 + +输入两次密码: + +``` +New password: +Retype new password: +passwd: password updated successfully +``` + +![Reset Sudo Password In Ubuntu 22.04 / 20.04 LTS][3] + +就这样。我们已经重新设置 `sudo` 用户密码。如果你按照上面链接所述的方法 1 进入到 恢复rescue 模式,按下 `Ctrl+d` 组合键来启动到正常模式。或者,你也可以输入下面的任意一个命令来启动到正常模式。 + +``` +# systemctl default +``` + +或, + +``` +# exit +``` + +如果你想重新启动系统,而不是启动到正常模式,输入: + +``` +# systemctl reboot +``` + +如果你已经按照上面链接所述的方法 2 进入到恢复rescue 模式,输入: + +``` +# exit +``` + +你将返回到 恢复菜单recovery menu。现在选择 “恢复正常启动Resume normal boot”,并按下回车键。 + +![Boot Into Normal Mode In Ubuntu][4] + +在强调一次,选择 “确定OK” 按钮,并按下回车按键来继续启动到正常模式: + +![Exit Recovery Mode And Boot Into Normal Mode][5] + +现在,你在运行管理命令时可以使用新的 `sudo` 密码。 + +### 如果我把用户名称和密码都忘了怎么办? + +如果你忘记了用户名称,在 恢复rescue 模式下,你可以很容易地列出你的 Linux 系统中的用户名称,使用目录: + +``` +# cat etc/passwd +``` + +来自我 Ubuntu 22.04 系统的输出示例: + +``` +[...] +ostechnix:x:1000:1000:Ostechnix,,,:/home/ostechnix:/bin/bash +[...] +``` + +好了,现在,你找到用户名称了。只需要按照上面的步骤来重新设置用户的密码即可。 + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/how-to-reset-sudo-password-in-ubuntu-20-04-lts/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/install-ubuntu-desktop/ +[2]: https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/ +[3]: https://ostechnix.com/wp-content/uploads/2022/05/Reset-Sudo-Password-In-Ubuntu.png +[4]: https://ostechnix.com/wp-content/uploads/2020/05/Boot-into-normal-mode-in-Ubuntu.png +[5]: https://ostechnix.com/wp-content/uploads/2020/05/Booting-into-normal-mode-from-rescue-mode-in-Ubuntu.png diff --git a/published/202205/20220518 ONLYOFFICE 7.1 Release Adds ARM Compatibility, a New PDF Viewer, and More Features.md b/published/202205/20220518 ONLYOFFICE 7.1 Release Adds ARM Compatibility, a New PDF Viewer, and More Features.md new file mode 100644 index 0000000000..6bbbbe2e5f --- /dev/null +++ b/published/202205/20220518 ONLYOFFICE 7.1 Release Adds ARM Compatibility, a New PDF Viewer, and More Features.md @@ -0,0 +1,143 @@ +[#]: subject: "ONLYOFFICE 7.1 Release Adds ARM Compatibility, a New PDF Viewer, and More Features" +[#]: via: "https://news.itsfoss.com/onlyoffice-7-1-release/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lkxed" +[#]: translator: "PeterPan0106" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14630-1.html" + +ONLYOFFICE 7.1 发布,新增针对 ARM 的支持、新的 PDF 查看器 +====== + +> ONLYOFFICE Docs 7.1 带来了期待已久的针对文档、电子表格以及演示文稿编辑器的更新。对 ARM 的支持更是画龙点睛之笔。 + +![onlyoffice 7.1][1] + +ONLYOFFICE,被认为是 [最佳的微软 Office 替代品][2] 之一,刚刚发布了最新的 7.1 版本更新。 + +或许你不了解,ONLYOFFICE 可以在自托管的服务器(例如 Nextcloud)或者桌面上在线使用。 + +这个版本最为激动人心的变化就是初步支持了基于 ARM 的设备,例如树莓派。 + +接下来请让我们一起看看有什么新的变化。 + +### ONLYOFFICE 7.1 : 新变化 + +[![ONLYOFFICE Docs 7.1: PDF viewer, animations, print preview in spreadsheets][4]][3] + +除了对 ARM 的支持,ONLYOFFICE 7.1 还提供了如下新功能: + +* 一个全新的 PDF、XPS 和 DjVu 文件查看器 +* 更方便和可定制的图形选项 +* 电子表格打印预览 +* 演示文稿中的动画 +* 支持 SmartArt 对象 + +#### ARM 兼容 + +树莓派这样的基于 ARM 的设备正变得越来越热门,许多人已经期待了许久 ONLYOFFICE 对 ARM 架构的支持。 + +随着 7.1 版本的发布,ONLYOFFICE Docs 现在可以在所有 ARM64 设备上运行。由于 ARM 设备的效率和安全性的提高,我认为这将对 ONLYOFFICE 的未来产生很大的促进作用。 + +#### 全新的 PDF、XPS 和 DjVu 文件查看器 + +![onlyoffice][5] + +这是许多其他办公软件多年来的一个关键功能。从 ONLYOFFICE 7.1 开始,用户现在可以更方便地使用文档编辑器来查看 PDF、XPS 和 DjVu 文件。 + +新的视图选项卡为用户提供了一个页面缩略图视图和一个导航栏,其视图更为紧凑和简化。 + +此外,用户现在还可以将 PDF 文件转换为 DOCX 文件,以便对其进行编辑。因此,我们不用再额外打开其他软件进行处理了,这将显著优化现有的工作流并消除瓶颈。 + +#### 选择和编辑图形更加方便 + +![onlyoffice][6] + +图形做为现代办公软件的特性,在许多时候并没能发挥足够的作用。尽管 ONLYOFFICE 拥有这些功能已经有一段时间了,但它们在使用时总是相当笨重。 + +在 ONLYOFFICE 7.1 中,重新设计的图形选择菜单使得这种情况得到了改变。这个新的菜单与微软 Office 的同类产品非常相似,每个图标都可以从菜单中看到。 + +此外,它现在可以显示最近使用的图形,使批量插入图形更加容易。 + +图形的最后一项改进是能够使用鼠标来编辑它们。对于那些熟悉 Inkscape 等图形设计软件的人来说,这将会相当得心应手。通过简单地拖动点,你将可以在短时间内创建一个独特的形状。 + +#### 电子表格的打印预览 + +![][7] + +我相信每个人都发生过由于一个简单的错误而导致打印出现问题的情况。此前其他程序早已经解决了这个问题,但在 ONLYOFFICE 电子表格编辑器中一直没有这个功能。 + +新版本终于引入了“打印预览”,这将会显著改善上述的情况。 + +这并不算什么十分新颖的更新,只是说它补齐了短板并且可以节省纸张和打印耗材。 + +#### 改进的动画页面,便捷的剪切和复制 + +![][8] + +针对需要经常使用演示文稿的用户而言,这个版本增加了一个单独的动画标签,使动画的插入变得更为容易。 + +ONLYOFFICE 7.1 演示文稿编辑器现在支持各种动画,以及便捷地将一页幻灯片移动以及复制的能力。 + +#### SmartArt 对象的支持 + +SmartArt 是一种在文档、演示文稿和电子表格中便捷地制作自定义图形的工具。然而,它一直是微软办公软件的一个功能。虽然其他各种应用程序对该格式有不同程度的支持,但它们并不能与微软 Office 相媲美。 + +幸运的是,ONLYOFFICE 7.1 现在完全支持这种格式,并且没有任何乱码,仿佛原生的一般。用户将不再需要和以前一样在将 SmartArt 图形转换为普通图形和数字,便于无缝切换。 + +### 其他变化 + +ONLYOFFICE 7.1 的其他重要改进包括: + +* 新的客户端语言:加利西亚语和阿塞拜疆语 +* 在受密码保护的文件中,能够在输入密码的同时查看密码 +* OFORM 文件支持缩放选项 +* 能够按用户组过滤评论 +* 支持金字塔图表 +* 支持金字塔柱状图 +* 支持垂直和水平圆柱图 +* 支持垂直和水平圆锥图 +* 上下文菜单中的移动和复制幻灯片选项 +* 公式工具提示 +* 新的货币格式支持 + +若想了解全部新特性,请见 [发布日志][9]。 + +### 下载 ONLYOFFICE 7.1 + +总的来说,ONLYOFFICE 7.1 是一个兼容 ARM 并且功能更为丰富的版本。 + +所有版本(企业版、开发版者、社区版)都有更新。 + +下载方面提供了很多不同的软件包,包括用于 ARM 版本的 Docker 镜像、 Snap 软件包以及用于云供应商的即点即用选项。你可以前往下载页面,寻找最合适的安装程序。 + +下载页面同时列出了安装的官方指南。 + +> **[获取 ONLYOFFICE 7.1][10]** + +*你是否已经尝试了新版本呢?* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/onlyoffice-7-1-release/ + +作者:[Jacob Crume][a] +选题:[lkxed][b] +译者:[PeterPan0106](https://github.com/PeterPan0106) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/onlyoffice-7-1.jpg +[2]: https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ +[3]: https://youtu.be/5-ervHAemZc +[4]: https://i.ytimg.com/vi/5-ervHAemZc/hqdefault.jpg +[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/ONLYOFFICE-viewer.png +[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/ONLYOFFICE-shapes.png +[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/ONLYOFFICE-Print-Preview.png +[8]: https://news.itsfoss.com/wp-content/uploads/2022/05/ONLYOFFICE-Animations.png +[9]: https://www.onlyoffice.com/blog/2022/05/discover-onlyoffice-docs-v7-1/ +[10]: https://www.onlyoffice.com/download-docs.aspx diff --git a/published/202205/20220519 How To Enable Activate Linux Watermark Notification In Linux Desktop.md b/published/202205/20220519 How To Enable Activate Linux Watermark Notification In Linux Desktop.md new file mode 100644 index 0000000000..f97fdccf01 --- /dev/null +++ b/published/202205/20220519 How To Enable Activate Linux Watermark Notification In Linux Desktop.md @@ -0,0 +1,126 @@ +[#]: subject: "How To Enable Activate Linux Watermark Notification In Linux Desktop" +[#]: via: "https://ostechnix.com/activate-linux/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14617-1.html" + +如何在 Linux 桌面中启用 “激活 Linux” 水印通知 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/20/112226f7zmsvqqvt9tln9n.jpg) + +> “激活 Windows” 水印已移植到 Linux。 + +为了阻止 Windows 操作系统的盗版行为,微软开发团队想出了一个办法:在 Windows 的角落放置一个激活水印,直到用户合法购买许可证并激活它。 + +如果你的电脑正在运行盗版的 Windows 副本,你应该已经注意到右下角的 “激活 Windows” 水印通知,如下图所示。 + +![“激活 Windows” 通知][1] + +幸运的是,Linux 用户永远不会收到这样的通知。因为 GNU/Linux 是一个完全免费的开源操作系统,在 GNU 通用公共许可证(GPL)下发布。 + +任何人都可以运行、研究、修改和重新分发 Linux 源代码,甚至可以出售修改后的代码的副本,只要使用相同的许可即可。 + +Linux 是开源的,所以你真的可以用 Linux 做任何你在专有操作系统上不能做的事情。 + +你可以在 Linux 中做很多事情。你可以在 Linux 下构建和运行*几乎*任何东西,无论是有趣的项目还是企业级应用程序。甚至,你还可以添加 “激活 Linux” 水印。 + +### “激活 Linux” 是什么? + +几天前,我注意到了一个叫做 “激活 Linux” 的有趣项目。它和你在未经许可的 Windows 操作系统中看到的 “激活 Windows” 通知非常相似。 + +“激活 Linux” 的开发者使用 C 语言中的 Xlib 和 cairo,重新创建了 Linux 版的 “激活 Windows” 通知水印。 + +它会在你的 Linux 桌面上显示一个水印,并通知你进入设置以激活你的 Linux 发行版!这很酷,不是吗? + +### 启用 “激活 Linux” 水印 + +activate-linux 项目在短时间内变得非常流行。几天之内,它已经为许多流行的 Linux 发行版而打了包,例如 Arch Linux、openSUSE 和 Ubuntu。 + +#### Arch Linux + +[AUR][2] 已经收录 activate-linux。因此,你可以使用 [Paru][3] 或 [Yay][4] 在 Arch Linux 及其衍生版 EndeavourOS 和 Manjaro Linux 中安装 activate-linux 应用程序。 + +``` +$ paru -S activate-linux +``` + +或者 + +``` +$ yay -S activate-linux +``` + +#### openSUSE + +[OBS][5] 收录了 Activate-linux。 + +如果你正在使用 openSUSE Tumbleweed 版本,请逐条运行下面的命令来安装 activate-linux: + +``` +$ sudo zypper addrepo https://download.opensuse.org/repositories/home:WoMspace/openSUSE_Tumbleweed/home:WoMspace.repo +$ sudo zypper refresh +$ sudo zypper install activate-linux +``` + +对于 openSUSE Factory ARM 版,运行如下命令: + +``` +$ sudo zypper addrepo https://download.opensuse.org/repositories/home:WoMspace/openSUSE_Factory_ARM/home:WoMspace.repo +$ sudo zypper refresh +$ sudo zypper install activate-linux +``` + +#### Ubuntu + +activate-linux 有一个适用于 Ubuntu 及其衍生版(如 Pop!_OS)的 PPA。 + +``` +$ sudo add-apt-repository ppa:edd/misc +$ sudo apt update +$ sudo apt install activate-linux +``` + +安装完成后,只需在终端执行下面的命令,就可以让它运行起来: + +``` +$ activate-linux +``` + +现在,你将在桌面的角落看到 “激活 Linux” 水印通知,就像在未授权的 Windows 副本中一样。 + +![桌面上的 “激活 Linux” 水印][6] + +别紧张!它是无害的。若想取消显示,你可以返回终端并按 `CTRL+C` 终止 `activate-linux` 命令。 + +我在 Ubuntu 22.04 GNOME 版本上测试了一下。它在 Wayland 中开箱即用。 + +“激活 Linux” 是我这一段时间以来遇到的一个非常有趣又无用的项目。我想这会让每个刚从 Windows 切换过来的 Linux 用户,拥有更加舒适的体验吧! + +### 相关资源 + +* [“激活 Linux” 的 GitHub 存储库][7] + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/activate-linux/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/wp-content/uploads/2022/05/Activate-Windows-Notification.png +[2]: https://aur.archlinux.org/packages/activate-linux-git +[3]: https://ostechnix.com/how-to-install-paru-aur-helper-in-arch-linux/ +[4]: https://ostechnix.com/yay-found-yet-another-reliable-aur-helper/ +[5]: https://software.opensuse.org//download.html?project=home%3AWoMspace&package=activate-linux +[6]: https://ostechnix.com/wp-content/uploads/2022/05/Activate-Linux.png +[7]: https://github.com/MrGlockenspiel/activate-linux diff --git a/published/202205/20220520 A programmer-s guide to GNU C Compiler.md b/published/202205/20220520 A programmer-s guide to GNU C Compiler.md new file mode 100644 index 0000000000..38cc8d46af --- /dev/null +++ b/published/202205/20220520 A programmer-s guide to GNU C Compiler.md @@ -0,0 +1,269 @@ +[#]: subject: "A programmer's guide to GNU C Compiler" +[#]: via: "https://opensource.com/article/22/5/gnu-c-compiler" +[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14653-1.html" + +GNU C 编译器的程序员入门指南 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/30/111925gbh7yldbolroheqy.jpg) + +> 带你一窥生成二进制文件步骤的幕后,以便在出现一些错误时,你知道如何逐步解决问题。 + +C 语言广为人知,深受新老程序员的好评。使用 C 语言编写的源文件代码,使用了标准的英语术语,因而人们可以方便阅读。然而,计算机只能理解二进制代码。为将代码转换为机器语言,你需要使用一种被称为 编译器compiler 的工具。 + +最常见的编译器是 GCC(GNU 编译器集GNU Compiler Collection)。编译过程涉及到一系列的中间步骤及相关工具。 + +### 安装 GCC + +为验证在你的系统上是否已经安装了 GCC,使用 `gcc` 命令: + +``` +$ gcc --version +``` + +如有必要,使用你的软件包管理器来安装 GCC。在基于 Fedora 的系统上,使用 `dnf` : + +``` +$ sudo dnf install gcc libgcc +``` + +在基于 Debian 的系统上,使用 `apt` : + +``` +$ sudo apt install build-essential +``` + +在安装后,如果你想查看 GCC 的安装位置,那么使用: + +``` +$ whereis gcc +``` + +### 演示使用 GCC 来编译一个简单的 C 程序 + +这里有一个简单的 C 程序,用于演示如何使用 GCC 来编译。打开你最喜欢的文本编辑器,并在其中粘贴这段代码: + +``` +// hellogcc.c +#include + +int main() { + printf("Hello, GCC!\n"); + return 0; +} +``` + +保存文件为 `hellogcc.c` ,接下来编译它: + +``` +$ ls +hellogcc.c + +$ gcc hellogcc.c + +$ ls -1 +a.out +hellogcc.c +``` + +如你所见,`a.out` 是编译后默认生成的二进制文件。为查看你所新编译的应用程序的输出,只需要运行它,就像你运行任意本地二进制文件一样: + +``` +$ ./a.out +Hello, GCC! +``` + +### 命名输出的文件 + +文件名称 `a.out` 是非常莫名其妙的,所以,如果你想具体指定可执行文件的名称,你可以使用 `-o` 选项: + +(LCTT 译注:注意这和最近 Linux 内核废弃的 a.out 格式无关,只是名字相同,这里生成的 a.out 是 ELF 格式的 —— 也不知道谁给起了个 `a.out` 这破名字,在我看来,默认输出文件名就应该是去掉了 `.c` 扩展名后的名字。by wxy) + +``` +$ gcc -o hellogcc hellogcc.c + +$ ls +a.out hellogcc hellogcc.c + +$ ./hellogcc +Hello, GCC! +``` + +当开发一个需要编译多个 C 源文件文件的大型应用程序时,这种选项是很有用的。 + +### 在 GCC 编译中的中间步骤 + +编译实际上有四个步骤,即使在简单的用例中 GCC 自动执行了这些步骤。 + +1. 预处理Pre-Processing:GNU 的 C 预处理器(cpp)解析头文件(`#include` 语句),展开 macros 定义(`#define` 语句),并使用展开的源文件代码来生成一个中间文件,如 `hellogcc.i`。 +2. 编译Compilation:在这个期间中,编译器将预处理的源文件代码转换为指定 CPU 架构的汇编代码。由此生成是汇编文件使用一个 `.s` 扩展名来命名,如在这个示例中的 `hellogcc.s` 。 +3. 汇编Assembly:汇编程序(`as`)将汇编代码转换为目标机器代码,放在目标文件中,例如 `hellogcc.o` 。 +4. 链接Linking:链接器(`ld`)将目标代码和库代码链接起来生成一个可执行文件,例如 `hellogcc` 。 + +在运行 GCC 时,可以使用 `-v` 选项来查看每一步的细节: + +``` +$ gcc -v -o hellogcc hellogcc.c +``` + +![Compiler flowchart][2] + +### 手动编译代码 + +体验编译的每个步骤可能是很有用的,因此在一些情况下,你不需要 GCC 完成所有的步骤。 + +首先,除源文件文件以外,删除在当前文件夹下生成的文件。 + +``` +$ rm a.out hellogcc.o + +$ ls +hellogcc.c +``` + +#### 预处理器 + +首先,启动预处理器,将其输出重定向为 `hellogcc.i` : + +``` +$ cpp hellogcc.c > hellogcc.i + +$ ls +hellogcc.c hellogcc.i +``` + +查看输出文件,并注意一下预处理器是如何包含头文件和扩展宏中的源文件代码的。 + +#### 编译器 + +现在,你可以编译代码为汇编代码。使用 `-S` 选项来设置 GCC 只生成汇编代码: + +``` +$ gcc -S hellogcc.i + +$ ls +hellogcc.c hellogcc.i hellogcc.s + +$ cat hellogcc.s +``` + +查看汇编代码,来看看生成了什么。 + +#### 汇编 + +使用你刚刚所生成的汇编代码来创建一个目标文件: + +``` +$ as -o hellogcc.o hellogcc.s + +$ ls +hellogcc.c hellogcc.i hellogcc.o hellogcc.s +``` + +#### 链接 + +要生成一个可执行文件,你必须将对象文件链接到它所依赖的库。这并不像前面的步骤那么简单,但它却是有教育意义的: + +``` +$ ld -o hellogcc hellogcc.o +ld: warning: cannot find entry symbol _start; defaulting to 0000000000401000 +ld: hellogcc.o: in function `main`: +hellogcc.c:(.text+0xa): undefined reference to `puts' +``` + +在链接器查找完 `libc.so` 库后,出现一个引用 `undefined puts` 错误。你必须找出适合的链接器选项来链接必要的库以解决这个问题。这不是一个小技巧,它取决于你的系统的布局。 + +在链接时,你必须链接代码到核心运行时core runtime(CRT)目标,这是一组帮助二进制可执行文件启动的子例程。链接器也需要知道在哪里可以找到重要的系统库,包括 `libc` 和 `libgcc`,尤其是其中的特殊的开始和结束指令。这些指令可以通过 `--start-group` 和 `--end-group` 选项来分隔,或者使用指向 `crtbegin.o` 和 `crtend.o` 的路径。 + +这个示例使用了 RHEL 8 上的路径,因此你可能需要依据你的系统调整路径。 + +``` +$ ld -dynamic-linker /lib64/ld-linux-x86-64.so.2 \ + -o hello \ + /usr/lib64/crt1.o /usr/lib64/crti.o \ + --start-group \ + -L/usr/lib/gcc/x86_64-redhat-linux/8 \ + -L/usr/lib64 -L/lib64 hello.o \ + -lgcc \ + --as-needed -lgcc_s \ + --no-as-needed -lc -lgcc \ + --end-group \ + /usr/lib64/crtn.o +``` + +在 Slackware 上,同样的链接过程会使用一组不同的路径,但是,你可以看到这其中的相似之处: + +``` +$ ld -static -o hello \ + -L/usr/lib64/gcc/x86_64-slackware-linux/11.2.0/ \ + /usr/lib64/crt1.o /usr/lib64/crti.o hello.o /usr/lib64/crtn.o \ + --start-group \ + -lc -lgcc -lgcc_eh \ + --end-group +``` + +现在,运行由此生成的可执行文件: + +``` +$ ./hello +Hello, GCC! +``` + +### 一些有用的实用程序 + +下面是一些帮助检查文件类型、符号表symbol tables 和链接到可执行文件的库的实用程序。 + +使用 `file` 实用程序可以确定文件的类型: + +``` +$ file hellogcc.c +hellogcc.c: C source, ASCII text + +$ file hellogcc.o +hellogcc.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped + +$ file hellogcc +hellogcc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=bb76b241d7d00871806e9fa5e814fee276d5bd1a, for GNU/Linux 3.2.0, not stripped +``` + +对目标文件使用 `nm` 实用程序可以列出 符号表symbol tables : + +``` +$ nm hellogcc.o +0000000000000000 T main + U puts +``` + +使用 `ldd` 实用程序来列出动态链接库: + +``` +$ ldd hellogcc +linux-vdso.so.1 (0x00007ffe3bdd7000) +libc.so.6 => /lib64/libc.so.6 (0x00007f223395e000) +/lib64/ld-linux-x86-64.so.2 (0x00007f2233b7e000) +``` + +### 总结 + +在这篇文章中,你了解到了 GCC 编译中的各种中间步骤,和检查文件类型、符号表symbol tables 和链接到可执行文件的库的实用程序。在你下次使用 GCC 时,你将会明白它为你生成一个二进制文件所要做的步骤,并且当出现一些错误时,你会知道如何逐步处理解决问题。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/gnu-c-compiler + +作者:[Jayashree Huttanagoudar][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jayashree-huttanagoudar +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/build_structure_tech_program_code_construction.png +[2]: https://opensource.com/sites/default/files/2022-05/compiler-flowchart.png diff --git a/published/202205/20220520 Customize GNOME 42 with A Polished Look.md b/published/202205/20220520 Customize GNOME 42 with A Polished Look.md new file mode 100644 index 0000000000..7f5fabc586 --- /dev/null +++ b/published/202205/20220520 Customize GNOME 42 with A Polished Look.md @@ -0,0 +1,132 @@ +[#]: subject: "Customize GNOME 42 with A Polished Look" +[#]: via: "https://www.debugpoint.com/2022/05/customize-gnome-42-look-1/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14646-1.html" + +如何把你的 GNOME 42 打磨得更精致 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/28/191525nx791r930j88ra3z.jpg) + +> 在 5 分钟内将你最喜欢的 GNOME 桌面打磨得更精致。 + +你可以使用图标、主题、光标和壁纸等多种方式来定制你最喜爱的 GNOME 桌面。本文向你展示了如何使你的 GNOME 42 桌面看起来更精致。在最近发布的 Ubuntu 22.04 LTS 和 Fedora 36 上提供了 GNOME 42 桌面环境。 + +在你进一步阅读之前,先看看调整之前和之后的外观比较。 + +![GNOME before customisation][1] + +![GNOME after customisation][2] + +我将把本教程分为两个部分。 + +第一部分涉及设置和安装所需的软件包。然后第二部分是如何应用各种设置来获得你想要的外观。 + +本教程主要在 Ubuntu 22.04 LTS 上测试。但是,它应该适用于 Ubuntu 和 Fedora 的其他变体。 + +### 将 GNOME 42 定制得更精致 + +#### 设置 + +首先,为你的系统启用 Flatpak,因为我们需要安装扩展管理器来下载本教程所需的 GNOME Shell 扩展。 + +因此,要做到这一点,请打开一个终端并运行以下命令: + +``` +sudo apt install flatpak gnome-software-plugin-flatpak +flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo +``` + +完成后重启计算机。 + +然后从终端运行以下命令,来安装扩展管理器应用以下载 GNOME Shell 扩展: + +``` +flatpak install flathub com.mattjakeman.ExtensionManager +``` + +打开扩展管理器应用,并安装两个扩展。第一个是 “浮动停靠区Floating Dock”,它提供了超酷的停靠区,你可以在桌面上的任何位置移动它。第二个,安装 “用户主题User themes” 扩展来帮助你在 Ubuntu Linux 中安装外部 GTK 主题。 + +![User Themes Extension][3] + +![Floating Dock Extension][4] + +接着,使用以下命令安装 [Materia 主题][5]。你必须构建它,因为它没有任何可执行文件。在 Ubuntu 中依次运行以下命令进行安装: + +``` +git clone https://github.com/ckissane/materia-theme-transparent.git +cd materia-theme-transparent +meson _build +meson install -C _build +``` + +此外,请从 [这里][7] 下载 [Kora 图标主题][6]。下载后解压文件,将以下四个文件夹复制到 `/home/<用户名>/.icons` 路径下。如果 `.icons` 文件夹不存在,请创建它。 + +![Kora Icon Theme][8] + +除了上述更改,从 [这里][9] 下载 Bibata 光标主题。下载后,解压文件夹并将其复制到相同的 `/home/<用户名>/.icons` 文件夹中。 + +除了上述之外,如果你想要一个与上述主题相匹配的漂亮字体,请从谷歌字体 [下载 Robot 字体][10],并将它们复制到 `/home//.fonts` 文件夹。 + +最后,再次重启系统。 + +#### 配置 + +打开扩展管理器,启用 “浮动停靠区Floating Dock” 和 “用户主题User themes”,并禁用 “Ubuntu Dock”。 + +![Changes to Extensions][11] + +此外,打开 “浮动停靠区Floating Dock” 设置并进行以下更改: + +![Floating Dock Settings][12] + +此外,打开 [GNOME 优化工具][13]GNOME Tweak Tool,然后转到外观Appearance选项卡。设置以下内容: + +* 光标:Bibata-Original-Ice +* Shell 主题:Materia +* 图标:Kora + +除此之外,你可能还想更改字体。为此,请转到字体Fonts选项卡并将文档和界面更改为 “Robot 10pt”。 + +或者,你也可以从 Ubuntu 22.04 的默认设置中更改强调色和样式。 + +最后,根据你的喜好下载漂亮的壁纸。对于本教程,我从 [这里][14] 下载了一个示例壁纸。 + +如果一切顺利,你应该有一个漂亮的桌面,如下图所示: + +![Customize GNOME 42 – Final Look][15] + +享受你的精致的 GNOME 42!干杯。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/customize-gnome-42-look-1/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[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/lkxed +[1]: https://i2.wp.com/www.debugpoint.com/wp-content/uploads/2022/05/GNOME-before-customisation.jpg?ssl=1 +[2]: https://i0.wp.com/www.debugpoint.com/wp-content/uploads/2022/05/GNOME-after-customisation.jpg?ssl=1 +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/User-Themes-Extension2.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/05/Floating-Doc-Extension.jpg +[5]: https://github.com/ckissane/materia-theme-transparent +[6]: https://github.com/bikass/kora/ +[7]: https://github.com/bikass/kora/archive/refs/heads/master.zip +[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/Kora-Icon-Theme.jpg +[9]: https://www.pling.com/p/1197198/ +[10]: https://fonts.google.com/specimen/Roboto +[11]: https://www.debugpoint.com/wp-content/uploads/2022/05/Changes-to-Extensions.jpg +[12]: https://www.debugpoint.com/wp-content/uploads/2022/05/Floating-Dock-Settings.jpg +[13]: https://www.debugpoint.com/2018/05/customize-your-ubuntu-desktop-using-gnome-tweak/ +[14]: https://www.pexels.com/photo/colorful-blurred-image-6985048/ +[15]: https://www.debugpoint.com/wp-content/uploads/2022/05/Customize-GNOME-42-Final-Look.jpg diff --git a/published/202205/20220520 How to rename a branch, delete a branch, and find the author of a branch in Git.md b/published/202205/20220520 How to rename a branch, delete a branch, and find the author of a branch in Git.md new file mode 100644 index 0000000000..cca58c8b10 --- /dev/null +++ b/published/202205/20220520 How to rename a branch, delete a branch, and find the author of a branch in Git.md @@ -0,0 +1,203 @@ +[#]: subject: "How to rename a branch, delete a branch, and find the author of a branch in Git" +[#]: via: "https://opensource.com/article/22/5/git-branch-rename-delete-find-author" +[#]: author: "Agil Antony https://opensource.com/users/agantony" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14635-1.html" + +Git 教程:重命名分支、删除分支、查看分支作者 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/25/161618nt30jqe10nqtlzlj.jpg) + +> 掌握管理本地/远程分支等最常见的 Git 任务。 + +Git 的主要优势之一就是它能够将工作“分叉”到不同的分支中。 + +如果只有你一个人在使用某个存储库,分支的好处是有限的。但是,一旦你开始与许多其他贡献者一起工作,分支就变得必不可少。Git 的分支机制允许多人同时处理一个项目,甚至是同一个文件。用户可以引入不同的功能,彼此独立,然后稍后将更改合并回主分支。那些专门为一个目的创建的分支,有时也被称为主题分支topic branch,例如添加新功能或修复已知错误。 + +当你开始使用分支,了解如何管理它们会很有帮助。以下是开发者在现实世界中使用 Git 分支执行的最常见任务。 + +### 重命名分支 + +有时候,你或许会错误地命名了一个分支,或者你会想要在内容合并到主分支后,使用同一个分支在不同的错误或任务之间切换。在这种情况下,重命名主题分支就会很有帮助。 + +#### 重命名本地分支 + +1、重命名本地分支: + +``` +$ git branch -m +``` + +当然,这只会重命名你的分支副本。如果远程 Git 服务器上存在该分支,请继续执行后续步骤。 + +2、推送这个新分支,从而创建一个新的远程分支: + +``` +$ git push origin +``` + +3、删除旧的远程分支: + +``` +$ git push origin -d -f +``` + +#### 重命名当前分支 + +当你要重命名的分支恰好是当前分支时,你不需要指定旧的分支名称。 + +1、重命名当前分支: + +``` +$ git branch -m +``` + +2、推送新分支,从而创建一个新的远程分支: + +``` +$ git push origin +``` + +3、删除旧的远程分支: + +``` +$ git push origin -d -f +``` + +### 使用 Git 删除本地和远程分支 + +为了保持存储库的整洁,通常建议你在确保已将内容合并到主分支后,删除临时分支。 + +#### 删除本地分支 + +删除本地分支只会删除系统上存在的该分支的副本。如果分支已经被推送到远程存储库,它仍然可供使用该存储库的每个人使用。 + +1、签出存储库的主分支(例如 `main` 或 `master`): + +``` +$ git checkout +``` + +2、列出所有分支(本地和远程): + +``` +$ git branch -a +``` + +3、删除本地分支: + +``` +$ git branch -d +``` + +要删除所有本地主题分支并仅保留 `main` 分支: + +``` +$ git branch | grep -v main | xargs git branch -d +``` + +#### 删除远程分支 + +删除远程分支只会删除远程服务器上存在的该分支的副本。如果你想撤销删除,也可以将其重新推送到远程(例如 GitHub),只要你还有本地副本即可。 + +1、签出存储库的主分支(通常是 `main` 或 `master`): + +``` +$ git checkout +``` + +2、列出所有分支(本地和远程): + +``` +$ git branch -a +``` + +3、删除远程分支: + +``` +$ git push origin -d +``` + +### 查看远程主题分支的作者 + +如果你是存储库管理员,你可能会有这个需求,以便通知未使用分支的作者它将被删除。 + +1、签出存储库的主分支(例如 `main` 或 `master`): + +``` +$ git checkout +``` + +2、删除不存在的远程分支的分支引用: + +``` +$ git remote prune origin +``` + +3、列出存储库中所有远程主题分支的作者,使用 `--format` 选项,并配合特殊的选择器来只打印你想要的信息(在本例中,`%(authorname)` 和 `%(refname)` 分别代表作者名字和分支名称): + +``` +$ git for-each-ref --sort=authordate --format='%(authorname) %(refname)' refs/remotes +``` + +示例输出: + +``` +tux  refs/remotes/origin/dev +agil refs/remotes/origin/main +``` + +你可以添加更多格式,包括颜色编码和字符串操作,以便于阅读: + +``` +$ git for-each-ref --sort=authordate \ + --format='%(color:cyan)%(authordate:format:%m/%d/%Y %I:%M %p)%(align:25,left)%(color:yellow) %(authorname)%(end)%(color:reset)%(refname:strip=3)' \ + refs/remotes +``` + +示例输出: + +``` +01/16/2019 03:18 PM tux      dev +05/15/2022 10:35 PM agil     main +``` + +你可以使用 `grep` 获取特定远程主题分支的作者: + +``` +$ git for-each-ref --sort=authordate \ + --format='%(authorname) %(refname)' \ + refs/remotes | grep +``` + +### 熟练运用分支 + +Git 分支的工作方式存在细微差别,具体取决于你想要分叉代码库的位置、存储库维护者如何管理分支、压扁squashing变基rebasing等。若想进一步了解该主题,你可以阅读下面这三篇文章: + +* [《用乐高来类比解释 Git 分支》][4],作者:Seth Kenlon +* [《我的 Git push 命令的安全使用指南》][5],作者:Noaa Barki +* [《Git 分支指南》][6],作者:Kedar Vijay Kulkarni + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/git-branch-rename-delete-find-author + +作者:[Agil Antony][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/agantony +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/tree-branches.jpg +[2]: https://www.flickr.com/photos/22244945@N00/3353319002 +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://opensource.com/article/22/4/git-branches +[5]: https://opensource.com/article/22/4/git-push +[6]: https://opensource.com/article/18/5/git-branching diff --git a/published/202205/20220521 FSF Does Not Accept Debian as a Free Distribution. Here-s Why!.md b/published/202205/20220521 FSF Does Not Accept Debian as a Free Distribution. Here-s Why!.md new file mode 100644 index 0000000000..6009321e9f --- /dev/null +++ b/published/202205/20220521 FSF Does Not Accept Debian as a Free Distribution. Here-s Why!.md @@ -0,0 +1,67 @@ +[#]: subject: "FSF Does Not Accept Debian as a Free Distribution. Here’s Why!" +[#]: via: "https://news.itsfoss.com/fsf-does-not-consider-debian-a-free-distribution/" +[#]: author: "Abhishek https://news.itsfoss.com/author/root/" +[#]: collector: "lkxed" +[#]: translator: "Chao-zhi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14628-1.html" + +自由软件基金会为什么不认为 Debian 是一种自由发行版? +====== + +![Why FSF doesn't consider Debian a free distribution][1] + +Debian 项目开发了一个尊重用户自由的 G​​NU/Linux 发行版。在各种自由软件许可证下发布的软件中,其源代码中包含非自由组件的情形并不鲜见。这些软件在被发布到 Debian 之前会被清理掉。而自由软件基金会Free Software Foundation(FSF)维护着一份 [自由 GNU/Linux 发行版的列表][2],但奇怪的是,Debian 并不在其中。事实上, Debian 不符合进入此列表的某些标准,我们想知道到底不满足哪些标准。但首先,我们需要了解所有这些智力工作是如何得到证明的。换句话说,为什么要费心尝试进入一些名单,尤其是这个名单? + +为什么 Debian 应该得到 FSF 的承认,以获得它的自由发行版的地位?曾于 2010 年至 2013 年担任 Debian 项目负责人的 Stefano Zacchiroli 说过几个原因。其中一个 Stefano 称之为“外部审查”的原因我特别赞同。事实上,Debian 有其标准和质量水准,一些软件应当符合这些标准才能成为该发行版的一部分,但除了 Debian 开发人员自己,没有人能控制这个过程。如果该发行版被列入这份珍贵的清单中,那么 FSF 就会密切关注 Debian 的命运,并(在出现问题时)给予适度的批评。我相信这是很好的动力。如果你也这么认为,那么现在让我们看看 FSF 认为 Debian 不够自由的原因。 + +### Debian 社会契约 + +除了自由 GNU/Linux 发行版列表之外,FSF 还保留了一份因某种原因而被拒绝授予自由地位的 GNU/Linux 发行版的列表。对于此列表中的每个发行版,都有一个评论,简要说明了拒绝的理由。从对 Debian 的评论中可以清楚地看出,FSF 和 Debian 项目在对“自由分发”一词的解释上产生分歧的主要根源来自一份被称为 “Debian 社会契约Debian Social Contract”的文件。 + +该社会契约的第一个版本是在 1997 年 7 月 4 日由第二任 Debian 项目领导人 Bruce Perens 发表的。作为该契约的一部分,也公布了一套被称为 Debian 自由软件准则Debian Free Software Guidelines(DFSG)的规则。从那时起,要成为 Debian 的一部分,分发软件的许可证必须符合 DFSG。该社会契约记录了 Debian 开发者只用自由软件建立操作系统的意图,而 DFSG 则用于将软件分为自由和非自由。2004 年 4 月 26 日,批准了该文件的新版本,取代了 1997 年的版本。 + +Debian 社会契约有五条。要回答我们今天主要讨论的问题,我们只需要关注其中两条 —— 即第一条和第五条,其他的省略。可以在 [此处][3] 查看该契约的完整版本。 + +第一条说:“**Debian 将保持 100% 自由**。我们在标题为‘Debian 自由软件准则Debian Free Software Guidelines’的文件中提供了用于确定一个作品是否‘自由’的准则。我们承诺,根据这些准则,Debian 系统及其所有组件将是自由的。我们将支持在 Debian 上创造或使用自由和非自由作品的人。我们永远不会让系统要求使用非自由组件。” + +同时,第五条写道:“**不符合我们自由软件标准的作品**。我们承认,我们的一些用户需要使用不符合 Debian 自由软件准则的作品。我们在我们的存档中为这些作品创建了“contrib”和“non-free”区域。这些区域中的软件包并不是 Debian 系统的一部分,尽管它们已被配置为可以在 Debian 中使用。我们鼓励 CD 制造商阅读这些区域的软件包的许可证,并确定他们是否可以在其 CD 上分发这些软件包。因此,尽管非自由作品不是 Debian 的一部分,但我们支持它们的使用,并为非自由软件包提供基础设施(例如我们的错误跟踪系统和邮件列表)。” + +因此,在实践中,第一条和第五条意味着:在安装了 Debian 之后,用户得到了一个完全而彻底的自由操作系统,但是如果他们突然想牺牲自由来追求功能,安装非自由软件,Debian 不仅不会阻碍他们这样做,而且会大大简化这一任务。 + +尽管该契约规定发行版将保持 100% 自由,但它允许官方存档的某些部分可能包含非自由软件或依赖于某些非自由组件的自由软件。形式上,根据同一契约,这些部分中的软件不是 Debian 的一部分,但 FSF 对此感到不安,因为这些部分使得在系统上安装非自由软件变得更加容易。 + +在 2011 年前,FSF 有合理的理由不认为 Debian 是自由的——该发行版附带的 Linux 内核没有清理二进制 blob。但自 2011 年 2 月发布的 Squeeze 至今,Debian 已经包含了完全自由的 Linux 内核。因此,简化非自由软件的安装是 FSF 不承认 Debian 是自由发行版的主要原因,直到 2016 年这是我知道的唯一原因,但在 2016 年初出现了问题…… + +### 等等 …… 关 Firefox 什么事? + +很长一段时间,Debian 都包含一个名为 Iceweasel 的浏览器,它只不过是 Firefox 浏览器的更名重塑而已。进行品牌重塑有两个原因:首先,该浏览器标志和名称是 Mozilla 基金会的商标,而提供非自由软件与 DFSG 相抵触。其次,通过在发行版中包含浏览器,Debian 开发人员必须遵守 Mozilla 基金会的要求,该基金会禁止以 Firefox 的名义交付浏览器的修改版本。因此,开发人员不得不更改名称,因为他们在不断地修改浏览器的代码,以修复错误并消除漏洞。但在 2016 年初,Debian 有幸拥有一款经过修改的 Firefox 浏览器,不受上述限制,可以保留原来的名称和徽标。一方面,这是对 Debian 修改的认可,也是对 Debian 信任的体现。另一方面,该软件显然没有清除非自由组件,它现在已成为发行版的一部分。如果此时 Debian 已被列入自由 GNU/Linux 发行版列表,那么自由软件基金会将会毫不犹豫地指出这一点。 + +### 结论 + +数字世界中的自由与现实世界中的自由同样重要。在这篇文章中,我试图揭示 Debian 最重要的特性之一 —— 开发用户自由的发行版。开发人员花费额外的时间从软件中清理非自由组件,并且以 Debian 为技术基础的数十个发行版继承了它的工作,并由此获得了一部分自由。 + +另外,我想分享一个简单的看法,即自由并不像乍看起来那么简单,人们自然会去追问什么是真正的自由,而什么不是。由于 Firefox 的存在,Debian 现在不能被称为自由的 GNU/Linux 发行版。但从 2011 年,当 Debian 终于开始清理内核以及发行版的其他组件时,直到 2016 年 Firefox 成为发行版的一部分时,自由软件基金会出于纯粹的意识形态原因并不认为该发行版是自由的:原因是 Debian 大大简化了非自由软件的安装……现在轮到你来权衡所有的争论,并决定是否将 GNU/Linux 发行版视为自由的了。 + +祝你好运!并尽可能保持自由。 + +由 Evgeny Golyshev 为 [Cusdeb.com][4] 撰写 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/fsf-does-not-consider-debian-a-free-distribution/ + +作者:[Evgeny Golyshev][a] +选题:[lkxed][b] +译者:[Chao-zhi](https://github.com/Chao-zhi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/root/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/why-fsf-doesnt-consider-debian-a-free-software-1200-%C3%97-675px.png +[2]: https://gnu.org/distros/free-distros.en.html +[3]: https://debian.org/social_contract +[4]: https://wiki.cusdeb.com/Essays:Why_the_FSF_does_not_consider_Debian_as_a_free_distribution/en diff --git a/published/202205/20220523 DAML- The Programming Language for Smart Contracts in a Blockchain.md b/published/202205/20220523 DAML- The Programming Language for Smart Contracts in a Blockchain.md new file mode 100644 index 0000000000..c333cb5a81 --- /dev/null +++ b/published/202205/20220523 DAML- The Programming Language for Smart Contracts in a Blockchain.md @@ -0,0 +1,143 @@ +[#]: subject: "DAML: The Programming Language for Smart Contracts in a Blockchain" +[#]: via: "https://www.opensourceforu.com/2022/05/daml-the-programming-language-for-smart-contracts-in-a-blockchain/" +[#]: author: "Dr Kumar Gaurav https://www.opensourceforu.com/author/dr-gaurav-kumar/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14649-1.html" + +DAML:区块链中智能合约的编程语言 +====== + +> DAML 智能合约语言是一种专门设计的特定领域语言domain specific language(DSL),用于编码应用的共享业务逻辑。它用于区块链环境中分布式应用的开发和部署。 + +![](https://img.linux.net.cn/data/attachment/album/202205/29/090752supudcno3dufa41j.jpg) + +区块链技术是一种安全机制,以一种使人难以或不可能修改或入侵的方式来跟踪信息。区块链整合了交易的数字账本,它被复制并发送至其网络上的每台计算机。在链的每个区块中,都有一些交易。当区块链上发生新的交易时,该交易的记录就会被添加到属于该链的每个人的账簿中。 + +区块链使用分布式账本技术distributed ledger technology(DLT),其中数据库并不保存在一个服务器或节点中。在区块链中,交易被记录在一个被称为哈希hash的不可改变的加密符号中。这意味着,如果一个通道或链上的一个区块被改变,黑客将很难改变链上的那个区块,因为他们必须对外面的每一个版本的链都要这样做。区块链,如比特币和以太坊,随着新的区块被添加到链上而不断增长,这使得账本更加安全。 + +随着区块链中智能合约的实施,在没有任何人工干预的情况下,有了自动执行的场景。智能合约技术使得执行最高级别的安全、隐私和反黑客实施成为可能。 + +![Figure 1: Market size of blockchain technology (Source: Statista.com)][2] + +区块链的用例和应用是: + +* 加密货币 +* 智能合约 +* 安全的个人信息 +* 数字健康记录 +* 电子政务 +* 不可伪造的代币(NFT) +* 游戏 +* 跨境金融交易 +* 数字投票 +* 供应链管理 + +根据 Statista.com,自过去几年以来,区块链技术市场的规模正在以非常快的速度增长,预计到 2025 年将达到 400 亿美元。 + +### 区块链的编程语言和工具箱 + +有许多编程语言和开发工具包可用于分布式应用和智能合约。区块链的编程和脚本语言包括 Solidity、Java、Vyper、Serpent、Python、JavaScript、GoLang、PHP、C++、Ruby、Rust、Erlang 等,并根据实施场景和用例进行使用。 + +选择一个合适的平台来开发和部署区块链,取决于一系列因素,包括对安全、隐私、交易速度和可扩展性的需求(图 2)。 + +![Figure 2: Factors to look at when selecting a blockchain platform][3] + +开发区块链的主要平台有: + +* 以太坊 +* XDC Network +* Tezos +* Stellar +* Hyperledger +* Ripple +* Hedera Hashgraph +* Quorum +* Corda +* NEO +* OpenChain +* EOS +* Dragonchain +* Monero + +### DAML:一种高性能的编程语言 + +数字资产建模语言Digital Asset Modeling Language,即 DAML(daml.com),是一种高性能的编程语言,用于开发和部署区块链环境中的分布式应用。它是一个轻量级和简洁的平台,用于快速应用开发。 + +![Figure 3: Official portal of DAML][4] + +DAML 的主要特点是: + +* 细粒度的权限 +* 基于场景的测试 +* 数据模型 +* 业务逻辑 +* 确定性的执行 +* 存储抽象化 +* 无重复开销 +* 负责任的跟踪 +* 原子的可组合性 +* 授权检查 +* 需要知道的隐私 + +### 安装和使用 DAML + +DAML SDK 可以安装在 Linux、macOS 或 Windows 上。在多个操作系统上安装 DAML 的详细说明可访问 https://docs.daml.com/getting-started/installation.html 。 + +你必须具备以下条件才能使用 DAML: + +* Visual Studio Code +* Java 开发套件(JDK) + +DAML 可以通过下载并运行可执行的安装程序在 Windows 上安装,你可访问 https://github.com/digital-asset/daml/releases/download/v1.18.1/daml-sdk-1.18.1-windows.exe 。 + +在 Linux 或 Mac 上安装 DAML 可以通过在终端执行以下内容来完成: + +``` +$ curl -sSL https://get.daml.com/ | sh +``` + +安装 DAML 后,可以创建基于区块链的新应用,如图 4 和 5 所示。 + +![Figure 4: Creating a new app][5] + +在另一个终端中,新的应用被导航并安装了项目的依赖: + +![Figure 5: Running DAML][6] + +``` +WorkingDirectory>cd myapp/ui +WorkingDirectory>npm install +WorkingDirectory>npm start +``` + +这样启动了 WebUI,该应用可在 Web 浏览器上通过 URL http://localhost:3000/ 访问。 + +![Figure 6: Login panel in DAML app][7] + +### 研究和开发的范围 + +区块链技术为不同类别的应用提供了广泛的开发平台和框架。其中许多平台是免费和开源的,可以下载和部署以用于基于研究的实现。研究学者、从业者和专家们可以使用这些平台为众多应用提出和实施他们的算法。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/daml-the-programming-language-for-smart-contracts-in-a-blockchain/ + +作者:[Dr Kumar Gaurav][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/dr-gaurav-kumar/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/blockchain-hand-shake.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-Market-size-of-blockchain-technology.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Untitled.png +[4]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-3-Official-portal-of-DAML-1.jpg +[5]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-4-Creating-a-new-app.jpg +[6]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-5-Running-DAML.jpg +[7]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-6-Login-panel-in-DAML-app.jpg diff --git a/published/202205/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md b/published/202205/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md new file mode 100644 index 0000000000..1cc8ffd93f --- /dev/null +++ b/published/202205/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md @@ -0,0 +1,135 @@ +[#]: subject: "Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support" +[#]: via: "https://news.itsfoss.com/linux-kernel-5-18-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "PeterPan0106" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14640-1.html" + +Linux 内核 5.18 版本正式发布,新增显卡驱动以及硬件支持 +====== + +> 最新的 Linux 内核 5.18 版本现已如期发布,本次更新包括针对新硬件的支持以及许多其他核心变化。 + +![Linux kernel 5.18 release][1] + +[Linux 5.17 内核][2] 发布时包含了对下一代硬件的支持,同时增强了 Steam Deck 的游戏体验。 + +每一代内核都包含了令人兴奋的技术进步,Linux 内核 5.18 也不例外。 + +### Linux 内核 5.18 有哪些变化呢? + +本次我们可以看到,内核针对雷蛇外设硬件、苹果妙控键盘和 AMD 显卡增强了支持,还有一些网络、核心和安全方面的更新。 + +#### 新的雷蛇驱动 + +说到游戏装备,Linux 的硬件支持亟待更新。 + +目前存在一些开源驱动程序的变通解决方案。但是这些方案不具有普适性,适配和支持较少。 + +正如 [Phoronix][3] 所发现的,Linux 内核 5.18 中一同发布了一个新的雷蛇 HID 驱动程序,它适配了雷蛇黑寡妇蜘蛛键盘,并修复了宏键此前存在的问题。 + +此外,这个驱动程序应该也有助于解决其他雷蛇硬件的问题。 + +#### AMD 显卡特性 FreeSync 模式被默认开启 + +![][4] + +虽然对 FreeSync 视频的支持足够好,但这只是改善 FreeSync 显示器用户体验的一个临时解决方案。 + +现在在 Linux 内核 5.18 版本中这一显示模式已被默认启用,用户无需调整任何设置即可使用 FreeSync([见更新日志][5])。 + +#### 显卡驱动更新 + +针对当前和未来的 AMD 显卡的驱动进行了改进。此外,支持英特尔 Arch 图形处理器和英特尔 Alder Lake N 的工作也取得了一些进展。 + +更高刷新率的 DisplayPort 也在这一个版本中得到支持。 + +#### 从 C89 标准升级到 C11 标准(GNU11) + +![][6] + +在 Linux 内核中使用的是 C89 C 语言标准,在当前已经稍显老旧并且缺失了许多十分必要的新特性。 + +考虑到目前的编译器版本 GCC 5.1 的要求,从 Linux 内核 5.18 开始决定用 C11 标准来取代它。 + +#### 网络优化 + +Linux 内核 5.18 增加了对新的无线硬件的支持,这包括联发科 MT7916、MT7921U 和博通 BCM43454/6。 + +![][7] + +针对移动设备的改进也包括对英特尔 M.2 WWAN 卡的支持。 + +Realtek W89 驱动现在支持 AP 模式、6GHz 频段并增加了硬件扫描功能。 + +在配置 IPv6 和其他各种协议方面,通过一系列的改进提升了性能。 + +你可以在 Linux 内核 5.18 中网络方面的变更提交中了解所有情况(包括对驱动 API、协议和一些核心功能的改进)。 + +#### USB 改进 + +Xen USB 驱动程序进行了改进,以抵御恶意主设备,USB DWC3 驱动程序也支持了更多的硬件类型。 + +其他改进详见 [更新日志][8]。 + +#### 增强对苹果键盘以及平板的支持 + +![][9] + +当前版本针对苹果妙控键盘(包含第一代型号)的使用体验进行了优化。 + +改进了功能键映射、键盘背光事件,以及 2021 款的妙控键盘通过 USB 连接时报告电池水平的能力。 + +Linux 内核 5.18 改进了输入处理,在平板电脑上输入将变得更为容易。 + +硬件相关的改进详见 [更新日志][10]。 + +#### ARM 架构芯片的支持(特斯拉 FSD,树莓派 Zero 2 W) + +![][11] + +Linux 内核 5.18 现在支持特斯拉的全套自动驾驶 SoC。三星工程师将其贡献到了 Linux 内核上游。 + +其他芯片支持包括高通骁龙 625/632,以及三星 Exynos 850/7885。 + +你还会发现 Linux 内核 5.18 支持了树莓派 Zero 2 W,而同时去除了旧的硬件/主板的支持。详见 [更新日志][12]。 + +你可以参考 [官方更新日志][13] 和 Linus Torvald 的官方公告获取更多信息。 + +### 如何安装 Linux 内核 5.18? + +你可以在 [Linux Kernel Archives][14] 网站上找到最新版本的内核。你可以下载 [Tarball][15] 以进行测试。你也可以参照我们的 [Linux 内核升级指南][16] 获取帮助。 + +如果不想自己编译它,你可以稍等几周,等 Linux 发行版们把它推到仓库。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-kernel-5-18-release/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[PeterPan0106](https://github.com/PeterPan0106) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/kernel-5-18-release.png +[2]: https://news.itsfoss.com/linux-kernel-5-17-release/ +[3]: https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.18-HID +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/amd-linux-5-18-1024x576.jpg +[5]: https://lists.freedesktop.org/archives/amd-gfx/2022-February/075262.html +[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/c-linux-5-18-1024x576.jpg +[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/networking-linux-5-18-1024x576.jpg +[8]: https://lore.kernel.org/lkml/Yj7vGtn8fILavjyL@kroah.com/ +[9]: https://news.itsfoss.com/wp-content/uploads/2022/05/apple-linux-5-18-1024x576.jpg +[10]: https://lore.kernel.org/lkml/nycvar.YFH.7.76.2203231015060.24795@cbobk.fhfr.pm/ +[11]: https://news.itsfoss.com/wp-content/uploads/2022/05/arm-linux-5-18-1024x576.jpg +[12]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=baaa68a9796ef2cadfe5caaf4c730412eda0f31c +[13]: https://lore.kernel.org/lkml/CAHk-=wjiqyoH6qntYvYTjR1F2L-pHtgX9esZMRS13iktCOJ1zA@mail.gmail.com/T/#u +[14]: https://www.kernel.org/ +[15]: https://git.kernel.org/torvalds/t/linux-5.16.tar.gz +[16]: https://itsfoss.com/upgrade-linux-kernel-ubuntu/ diff --git a/published/202205/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md b/published/202205/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md new file mode 100644 index 0000000000..ad1edfd55d --- /dev/null +++ b/published/202205/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md @@ -0,0 +1,75 @@ +[#]: subject: "System76 Collaborates with HP for a Powerful Linux Laptop for Developers" +[#]: via: "https://news.itsfoss.com/hp-dev-one-system76/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14645-1.html" + +System76 与惠普合作为开发者提供功能强大的 Linux 笔记本电脑 +====== + +> 惠普正在以开箱即用的 Pop!_OS 为特色进入 Linux 硬件市场,貌似有点激动人心?还是先来看一看吧! + +![hp][1] + +System76 不是早就自己生产 Linux 笔记本电脑了吗?那么,这次和惠普合作是怎么回事? + +嗯,这一次是惠普要发行一款 Linux 笔记本电脑,搭载 Pop!_OS,也就是 System76 的基于 Ubuntu 的 Linux 发行版。 + +Carl Richell(System76 的创始人)在他的 Twitter 上宣布了这一消息,并附带了一个网站链接,该网站提供了更多相关信息。推文如下: + +> Hp-Pop 好耶!来看看这个:[https://t.co/gf2brjjUl8][2] + +### HP Dev One:专为开发者打造的 Linux 笔记本电脑 + +一方面,System76 笔记本电脑与 Pop!_OS 有着开箱即用硬件兼容性,因此它备受赞誉。 + +另一方面,Pop!_OS 也与笔记本电脑完美搭配,适配没有太多麻烦。 + +Pop!_OS 也一直在推出更新和新增功能,以改进工作流程并充分利用 Linux 的可用硬件。 + +此时,和惠普合作听起来是一个提高档次的好主意。 + +![HP System76][3] + +所以说,Pop!_OS 和惠普合作的想法有点激动人心啊! + +挂上了惠普这个牌子,笔记本电脑的可用性/保修(在纸面上)就比 System76 要好了,考虑到后者在某些地区是不提供保修的。 + +### AMD 驱动的笔记本电脑可帮助你更好地写代码 + +HP Dev One 似乎是把“为开发者提供多任务处理的能力,从而快速完成任务”作为卖点。 + +这款笔记本电脑的入门款搭载了 **8 核的 AMD Ryzen 7 PRO 处理器** 和 **16 GB RAM**(DDR4 @ 3200 MHz)。 + +预计它还会搭载由 AMD Radeon Graphics 提供支持的 14 英寸全高清防眩光显示屏。 + +对于 HP Dev One,Carl Richell 提到了这款笔记本电脑将通过 [LVFS][5](Linux 供应商固件服务)接收**固件更新**。 + +他还提到,这款笔记本电脑(以上规格)的定价为 **1099 美元** 起。 + +网站上只显示了它即将推出。因此,我们目前还不知道正式的发布日期。 + +对于像惠普这样的商业制造商来说,笔记本电脑的定价听起来并不令人兴奋(LCTT 译注:毕竟不是国内互联网品牌的笔记本),但可能是一个划算的交易。 + +你怎么看这款惠普笔记本电脑(运行 Linux、为开发者量身定制)的定价?你觉得这个价格合理吗?你对这款笔记本电脑有什么期望呢? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/hp-dev-one-system76/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/hpdevone-laptop.jpg +[2]: https://t.co/gf2brjjUl8 +[3]: https://news.itsfoss.com/wp-content/uploads/2022/05/hpdevone-illustration-1024x576.jpg +[4]: https://fwupd.org/ diff --git a/published/202205/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md b/published/202205/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md new file mode 100644 index 0000000000..2676f438a1 --- /dev/null +++ b/published/202205/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md @@ -0,0 +1,92 @@ +[#]: subject: "ProtonMail is Now Just ‘Proton’ Offering a Privacy Ecosystem" +[#]: via: "https://news.itsfoss.com/protonmail-now-proton/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14652-1.html" + +ProtonMail 改名为 “Proton”,致力于提供一个隐私生态系统 +====== + +> ProtonMail 宣布了重塑后的品牌,包括新网站、新名称、新的定价计划、新的 UI 和其他变化。 + +![proton][1] + +[ProtonMail][2] 将自己重新命名为 “Proton”,以将其所有产品囊括在统一的品牌下。 + +注意,别把它和 Steam 的 Proton(它也简称为 Proton)混淆哦! + +换句话说,ProtonMail、ProtonVPN 和它的任何服务将不再有单独的产品页面。 + +### Proton:一个开源隐私生态系统 + +![更新后的 Proton,统一保护][3] + +Proton 将拥有一个新的统一平台(新网站),你可以在其中访问所有服务,包括: + +* Proton 邮件 +* Proton VPN +* Proton 网盘 +* Proton 日历 + +现在,新的登录会话将会被重定向到 `proton.me` 而不是 `protonmail.com`、`mail.protonmail.com`、`protonvpn.com` 等等。 + +不仅限于名称/品牌,整体的强调色和现有的用户体验,也将受到影响。 + +![][4] + +现在,你只需一次付费订阅即可获得全部服务,而不必单独升级 VPN 和邮件。这也意味着,经过这次改变,高级订阅的价格变得更加实惠了。 + +![][5] + +总体而言,让 “Proton” 成为隐私生态系统,是为了吸引更多对技术细节不感兴趣的用户来了解它是如何运作的。 + +你可以在其新的官方网站([proton.me][6])上查看所有详细信息。 + +新网站看起来更干净、更有条理,并且更具商业吸引力。 + +### 本次更改的内容 + +你可以期待有一个焕然一新的用户界面,包括新的品牌和新的网站。 + +![proton][7] + +除此之外,Proton 还提到它改进了服务之间的集成,以获得更好的用户体验。 + +![][8] + +如果你已经在使用 ProtonMail,你可能知道,他们正在主动建议现有用户激活 “@proton.me” 帐户,这也是本次更改的一部分。 + +你可以选择将新电子邮件地址 xyz@proton.me 设为默认值,它更短,看起来也更有意义一些。 + +* 旧的电子邮件地址不会消失,只是额外提供了新地址(@proton.me)。 +* 现有的付费订阅者应该可以免费获得存储空间提升。 +* 升级了网页和移动应用中的用户体验。 +* 新的官方网站(你将被自动重定向到它以进行新会话)。 +* 新的定价计划,为 Proton 网盘提供更多存储空间。 + +你对本次变更感兴趣吗?你喜欢 Proton 的新名字和新的服务方式吗?请在下方评论中分享你的想法吧! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/protonmail-now-proton/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/proton-ft.jpg +[2]: https://itsfoss.com/recommends/protonmai +[3]: https://youtu.be/s5GNTQ63HJE +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/proton-ui-new-1024x447.jpg +[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/proton-pricing-1024x494.jpg +[6]: https://proton.me/ +[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/Proton-me-website.png +[8]: https://news.itsfoss.com/wp-content/uploads/2022/05/Proton-Product.png diff --git a/published/202205/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md b/published/202205/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md new file mode 100644 index 0000000000..4a21ef7ecf --- /dev/null +++ b/published/202205/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md @@ -0,0 +1,59 @@ +[#]: subject: "DeepMind’s Open Source MuJoCo Is Available On GitHub" +[#]: via: "https://www.opensourceforu.com/2022/05/deepminds-open-source-mujoco-is-available-on-github/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14650-1.html" + +DeepMind 的开源物理引擎 MuJoCo 已在 GitHub 发布 +====== + +![deepmind1][1] + +DeepMind 是 Alphabet 的子公司和 AI 研究实验室,在 2021 年 10 月,它收购了用于机器人研发的 MuJoCo 物理引擎,并承诺该模拟器将作为免费、开源、社区驱动的项目进行维护。现在,DeepMind 声称开源计划已完成,它的整个代码库 [可在 GitHub 上获得][2]。 + +MuJoCo 是 “Multi-Joint Dynamics with Contact” 的缩写,它是一个物理引擎,旨在帮助机器人、生物力学、图形和动画等领域的研究和开发(也包括其他需要快速准确模拟的领域)。MuJoCo 可用于帮助机器学习应用实现基于模型的计算,例如控制综合control synthesis状态估计state estimation系统识别system identification机制设计mechanism design、通过逆动力学inverse dynamics来进行数据分析,以及并行采样parallel sampling。它也可以用作标准模拟器,例如用于游戏和交互式虚拟环境。(LCTT 译注:这段话中涉及到不少专业词汇,鉴于译者水平有限,若有谬误,请在评论中指出,同时也欢迎在评论中科普,一起学习~) + +根据 DeepMind 的说法,以下是 MuJoCo 适合协作的一些功能: + +* 能够模拟复杂机制的综合模拟器 +* 可读、高性能、可移植的代码 +* 易于扩展的代码库 +* 丰富的文档,包括面向用户的和代码注释 —— 我们希望学术界和 OSS 社区的同事能够使用这个平台并为代码库做出贡献,从而改善所有人的研究 + +DeepMind 还说: + +> “作为没有动态内存分配的 C 库,MuJoCo 非常快。不幸的是,原始物理速度一直受到 Python 包装器的阻碍:全局解释器锁(GIL)和非编译代码的存在,使得批处理、多线程操作无法执行。在下面的路线图中,我们将解决这个问题。” + +(LCTT 译注: 这里补充了原文没有提及的路线图和基准测试结果。) + +路线图: + +* 通过批处理、多线程模拟释放 MuJoCo 的速度潜力 +* 通过改进内部内存管理支持更大的场景 +* 新的增量编译器,带来更好的模型可组合性 +* 通过 Unity 集成支持更好的渲染 +* 对物理导数的原生支持,包括解析和有限差分 + +> “目前,我们想分享两个常见模型的基准测试结果。注意,这个结果是在运行 Windows 10 的标准 AMD Ryzen 9 5950X 机器上获得的。” + +![基准测试结果][3] + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/deepminds-open-source-mujoco-is-available-on-github/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/deepmind1.jpg +[2]: https://github.com/deepmind/mujoco +[3]: https://assets-global.website-files.com/621e749a546b7592125f38ed/628b971675cb60d74f5fa189_2A54E864-FE90-49E4-8E58-FE40298303E2.jpeg diff --git a/published/202205/20220526 Plex Desktop Player is Now Available for Linux.md b/published/202205/20220526 Plex Desktop Player is Now Available for Linux.md new file mode 100644 index 0000000000..af12ffedbf --- /dev/null +++ b/published/202205/20220526 Plex Desktop Player is Now Available for Linux.md @@ -0,0 +1,76 @@ +[#]: subject: "Plex Desktop Player is Now Available for Linux" +[#]: via: "https://news.itsfoss.com/plex-desktop-linux/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14656-1.html" + +Plex 桌面播放器现已支持 Linux +====== + +> Plex.tv 终于增加了 Linux 桌面版本和全新的 HTPC 应用。不过,它目前只提供了 Snap 包。 + +![plex][1] + +Plex 是一个流行的流媒体播放器,同时,它能够用作一个媒体服务器软件。 + +事实上,它也是 [Linux 上最好的媒体服务器软件][2] 之一。 + +是的,这个媒体服务器已经支持 Linux,而且还提供了一个 [包含安装步骤的教程][3]。 + +### Linux 上的 Plex 桌面播放器提供 Snap 包 + +我知道很多人都不喜欢使用 Snap 包来安装这个桌面播放器。但现在,这个桌面播放器已在 Snap 商店中提供,你可以轻松地在任何 Linux 发行版上安装它。 + +![][4] + +幸运的是,这个桌面播放器的 [公告][5] 还提到他们正在开发一个 **Flatpak 包**,它应该会在近期登陆 Flathub。 + +这样一来,借助 Flatpak 和 Snap 软件包,Plex 就可以成为在 Linux 上流式传输和组织个人媒体收藏的绝佳选择。 + +除了桌面应用程序,如果你利用你的 Linux 机器连接到一个大屏幕来观看所有的内容,还有一个 Plex HTPC(有计划发布 Flatpak 软件包)。 + +![][6] + +顺便说一句,HTPC 是 PMP TV(全称为 Plex Media Player TV)模式的继承者。 + +他们在官网上与它的 Linux 桌面应用程序一同发布了这款产品。 + +使用 HTPC,这个桌面应用就可以和电视共享,并支持音频直通、刷新率切换、控制器和可配置输入映射等高级功能。 + +![][7] + +因此,如果你有一个大屏幕,并且想要连接你的系统(不管是什么桌面平台)的话,你现在可以使用 HTPC 应用程序来完成。 + +> **[Plex 桌面版][8]** + +> **[Plex HTPC][9]** + +在 Linux 系统或联网电视上流式传输内容时,你通常会使用什么呢?你觉得 Plex 能满足你的需求吗?即然它支持 Linux 了,你会想要用它来替代当前使用的软件吗? + +欢迎在评论区告诉我们你的想法! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/plex-desktop-linux/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/plex-ft.jpg +[2]: https://itsfoss.com/best-linux-media-server/ +[3]: https://itsfoss.com/install-plex-ubuntu/ +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/plex-desktop-ubuntu.jpg +[5]: https://www.plex.tv/blog/way-to-be-htpc/ +[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/plex-snap-1024x524.jpg +[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/plex-feat-1024x576.jpg +[8]: https://snapcraft.io/plex-desktop +[9]: https://snapcraft.io/plex-htpc diff --git a/published/202205/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md b/published/202205/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md new file mode 100644 index 0000000000..e2515dc7e9 --- /dev/null +++ b/published/202205/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md @@ -0,0 +1,81 @@ +[#]: subject: "AlmaLinux Continues the Legacy of CentOS with the Release of Version 9" +[#]: via: "https://news.itsfoss.com/almalinux-9-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "PeterPan0106" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14644-1.html" + +CentOS 的继承者 AlmaLinux 9 发布 +====== + +> AlmaLinux 9 是基于 Red Hat Enterprise Linux 9 的最新版本,添加了新的壁纸并进一步增强了性能。 + +![almalinux][1] + +如果你一直在关注我们的话,应当知道 [AlmaLinux 9.0 测试版][2] 已于上月发布。 + +AlmaLinux 是目前 [最好的 RHEL 替代版][3] 之一。其最新的稳定版是基于 RHEL 9 的,这也成为了 CentOS 的一个很好的替代品。 + +最新的 AlmaLinux 9 支持所有主流架构,包括 Intel/AMD(x86_64)、ARM64 (aarch64)、IBM PowerPC(ppc64le)和 IBM Z(s390x)。 + +### AlmaLinux 9.0 有哪些改变呢 + +AlmaLinux 9.0 在这个版本中使用了 Linux 内核 5.14。它包括对云和容器开发的改进,以及对网络控制台的完善。 + +还包括其他变化带来的性能改进。更新包括: + +#### 新壁纸 + +![AlmaLinux 9][4] + +在 AlmaLinux 9.0 中,更新了一些新的壁纸。 + +这些新的壁纸看起来很美观,并提供了更丰富的选择。 + +#### Linux 内核 5.14 + +最大的变化是升级到了 Linux 内核 5.14,它带来了更新的硬件支持,以及其他各种改进。 + +Linux 内核 5.14 的改进详见 [这篇文章][5]。 + +#### 更新的软件包 + +这个版本带有新的软件包更新。其中包括 Git 2.31、PHP 8.0、Perl 5.32 和 MySQL 8.0。 + +GCC 也被更新到最新的 GCC 11。 + +其它更新包括 Python 3.9 和最新版的 LLVM、Rust 和 Go compilers,使应用程序的现代化更快、更容易。 + +更多技术方面的更新详见 [官方更新日志][6]。 + +### 下载 AlmaLinux 9.0 + +你可以在 [官方镜像网站][7] 下载最新的镜像。在镜像站也包含了 .torrent 文件的下载选项。 + +> **[AlmaLinux 9.0][8]** + +*你认为基于 RHEL 的最新版 AlmaLinux 9.0 怎么样呢?你有计划在服务器上迁移到最新的版本吗?欢迎评论。* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/almalinux-9-release/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[PeterPan0106](https://github.com/PeterPan0106) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/alma-linux-9.jpg +[2]: https://linux.cn/article-14500-1.html +[3]: https://itsfoss.com/rhel-based-server-distributions/ +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/alma-linux-wallpapers-9-1024x609.jpg +[5]: https://news.itsfoss.com/kernel-5-14-release/ +[6]: https://wiki.almalinux.org/release-notes/9.0.html +[7]: https://mirrors.almalinux.org/isos.html +[8]: https://mirrors.almalinux.org/isos.html diff --git a/published/202205/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md b/published/202205/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md new file mode 100644 index 0000000000..f30dae7372 --- /dev/null +++ b/published/202205/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md @@ -0,0 +1,72 @@ +[#]: subject: "Tails Linux Users Warned Against Using the Tor Browser: Here’s why!" +[#]: via: "https://news.itsfoss.com/tails-tor-browser/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14654-1.html" + +Tails 警告用户不要使用 Tor 浏览器:原因如下! +====== + +> Tails 5.1 将针对“可绕过 Tor 浏览器安全措施的危险漏洞”提供关键修复。以下是它的全部内容。 + +![Tails][1] + +Tails 是一个专注于安全的便携式 Linux 发行版,最近,它的开发团队发布了有关其当前版本的重要公告。他们警告用户在 **Tails 5.0 或更早版本** 上使用 Tor 浏览器时,避免输入或使用任何个人或敏感信息。 + +Tor 浏览器是 Tails 事实上的(默认)网页浏览器,它有助于在用户连接到互联网时,保护他们的在线身份。它主要被各种记者和活动家用来逃避审查。不过,普通用户也可以使用它。 + +### 问题说明 + +最近,有人发现了两个令人讨厌的漏洞,它们允许有害网站能够从其他网站窃取用户的信息。 + +这些都是在 Firefox 使用的 JavaScript 引擎中发现的。 + +但是,Tor 与此有什么关系?对于那些不知道的人来说,Tor 实际上是 Firefox 的一个复刻,因此包含许多类似的功能,如 JavaScript 引擎。 + +具体来说,在 [Mozilla 发布的公告][2] 中,这些漏洞已被确定为 CVE-2022-1802 和 CVE-2022-1529。 + +Tails 公告中也对此进行了说明: + +> “例如,在你访问恶意网站后,控制该网站的攻击者可能会在同一个 Tails 会话期间,访问你随后发送到其他网站的密码或其他敏感信息。” + +### 你应该停止使用 Tail 发行版吗? + +没有这个必要。 + +用户会很高兴地知道,这些漏洞并不影响 Tor 的连接。这意味着,如果你不交换任何敏感信息,如密码、个人信息、信息等,你可以随意地浏览互联网。 + +Tails 中的其他应用程序,尤其是 Thunderbird,仍然可以安全使用,因为 JavaScript 在使用时会被禁用。 + +此外,你也可以在 Tor 浏览器中启用最高的安全级别。这是推荐的,因为(该级别下)JavaScript 引擎会被禁用。不过,请注意,这会使网站无法正常运行。 + +换句话说,如果你知道自己在做什么的话,Tails 发行版仍然可以安全使用。 + +### 漏洞修复即将发布 + +好的消息是,Mozilla 已经在上游修补了这些错误,现在就等 Tails 团队发布修复程序了。 + +至于何时发布,他们是这样说的: + +> 此漏洞将在 Tails 5.1(**5 月 31 日**)中修复,但我们的团队没有能力提前发布紧急版本。 + +因此,你最好的选择是等待下周的 Tails 5.1 发布。你可以阅读 Tails 开发团队的 [官方公告][3] 以了解更多信息。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/tails-tor-browser/ + +作者:[Rishabh Moharir][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/tails-5-0-privacy-issue.jpg +[2]: https://www.mozilla.org/en-US/security/advisories/mfsa2022-19/ +[3]: https://tails.boum.org/security/prototype_pollution/index.en.html diff --git a/published/20220519 Use this open source screen reader on Windows.md b/published/20220519 Use this open source screen reader on Windows.md new file mode 100644 index 0000000000..a553667e53 --- /dev/null +++ b/published/20220519 Use this open source screen reader on Windows.md @@ -0,0 +1,67 @@ +[#]: subject: "Use this open source screen reader on Windows" +[#]: via: "https://opensource.com/article/22/5/open-source-screen-reader-windows-nvda" +[#]: author: "Peter Cheer https://opensource.com/users/petercheer" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14664-1.html" + +在 Windows 上使用开源屏幕阅读器 NVDA +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/02/101911ds5t1xts1o52vmss.jpg) + +> 为纪念全球无障碍意识日,让我们了解一下 NVDA 开源屏幕阅读器,以及你该如何参与其中,为所有网络用户提高无障碍性。 + +屏幕阅读器是辅助技术软件的一个专门领域,它可以阅读并说出计算机屏幕上的内容。完全没有视力的人只是视力障碍者的一小部分,屏幕阅读器软件可以帮助所有群体。屏幕阅读器大多特定于操作系统,供有视觉障碍的人和无障碍培训师使用,以及想要测试网站或应用的无障碍访问程度的开发人员和无障碍顾问。 + +### 如何使用 NVDA 屏幕阅读器 + +[WebAIM 屏幕阅读器用户调查][2] 始于 2009 年,一直持续到 2021 年。在第一次调查中,最常用的屏幕阅读器是 JAWS,占 74%。它是微软 Windows 的商业产品,并且是长期的市场领导者。NVDA 当时是一个相对较新的 Windows 开源屏幕阅读器,仅占 8%。快进到 2021 年,JAWS 占 53.7%,NVDA 占 30.7%。 + +你可以从 [NVAccess 网站][3] 下载最新版本的 NVDA。为什么我要使用 NVDA 并将它推荐给我使用微软 Windows 的客户?嗯,它是开源的、速度快、功能强大、易于安装、支持多种语言、可以作为便携式应用运行、拥有庞大的用户群,并且有定期发布新版本的周期。 + +NVDA 已被翻译成 55 种语言,并在 175 个不同的国家/地区使用。还有一个活跃的开发者社区,拥有自己的 [社区插件网站][4]。你选择安装的任何附加组件都将取决于你的需求,并且有很多可供选择,包括常见视频会议平台的扩展。 + +与所有屏幕阅读器一样,NVDA 有很多组合键需要学习。熟练使用任何屏幕阅读器都需要培训和练习。 + +![Image of NVDA welcome screen][5] + +向熟悉计算机和会使用键盘的人教授 NVDA 并不太难。向一个完全初学者教授基本的计算机技能(没有鼠标、触摸板和键盘技能)和使用 NVDA 是一个更大的挑战。个人的学习方式和偏好不同。此外,如果人们只想浏览网页和使用电子邮件,他们可能不需要学习如何做所有事情。NVDA 教程和资源的一个很好的链接来源是 [无障碍中心][6]。 + +当你掌握了使用键盘命令操作 NVDA,它就会变得更容易,但是还有一个菜单驱动的系统可以完成许多配置任务。 + +![Image of NVDA menu][7] + +### 测试无障碍性 + +多年来,屏幕阅读器用户无法访问某些网站一直是个问题,尽管美国残疾人法案(ADA)等残疾人平等立法仍然存在。NVDA 在有视力的社区中的一个很好的用途是用于网站无障碍性测试。NVDA 可以免费下载,并且通过运行便携式版本,网站开发人员甚至不需要安装它。运行 NVDA,关闭显示器或闭上眼睛,看看你在浏览网站或应用时的表现如何。 + +NVDA 也可用于测试(通常被忽略的)正确 [标记 PDF 文档以实现无障碍性][8] 任务。 + +有几个指南专注于使用 NVDA 进行无障碍性测试。我可以推荐 [使用 NVDA 测试网页][9] 和使用 [NVDA 评估 Web 无障碍性][10]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/open-source-screen-reader-windows-nvda + +作者:[Peter Cheer][a] +选题:[lkxed][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/petercheer +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/wfh_work_home_laptop_work.png +[2]: https://webaim.org/projects +[3]: https://www.nvaccess.org +[4]: https://addons.nvda-project.org/index.en.html +[5]: https://opensource.com/sites/default/files/2022-05/nvda1.png +[6]: http://www.accessibilitycentral.net/ +[7]: https://opensource.com/sites/default/files/2022-05/nvda2.png +[8]: https://www.youtube.com/watch?v=rRzWRk6cXIE +[9]: https://www.unimelb.edu.au/accessibility/tools/testing-web-pages-with-nvda +[10]: https://webaim.org/articles/nvda diff --git a/published/20220524 Collision- Linux App to Verify ISO and Other Files.md b/published/20220524 Collision- Linux App to Verify ISO and Other Files.md new file mode 100644 index 0000000000..a60f32620a --- /dev/null +++ b/published/20220524 Collision- Linux App to Verify ISO and Other Files.md @@ -0,0 +1,133 @@ +[#]: subject: "Collision: Linux App to Verify ISO and Other Files" +[#]: via: "https://www.debugpoint.com/2022/05/collision/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14671-1.html" + +Collision:用于验证 ISO 和其他文件的 Linux 应用 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/04/111427jzkwsocv4oug3vso.jpg) + +> 本教程概述了 Collision 的功能和使用指南。它是一个基于 GUI 且易于使用的程序,可让你使用加密哈希函数验证文件。 + +### 为什么需要验证文件? + +人们每天都通过互联网下载文件。但许多用户从不费心去验证他们的完整性或真实性。这意味着不知道该文件是否合法且未被任何恶意代码篡改。 + +以作为标准安装镜像的 [Linux 发行版][1] 的 ISO 文件为例。所有流行的发行版制造商在 ISO 文件还提供哈希文件。使用该文件,你可以轻松比较下载文件的哈希值。让你可以放心你的文件是正确的并且没有以任何方式损坏。 + +此外,如果你通过不稳定的互联网连接下载大文件,该文件可能会损坏。在这些情况下,它也有需要验证。 + +### Collision – 功能和使用方法 + +[Collision][2] 使用加密哈希函数来帮助你验证文件。加密哈希函数是一种流行的算法,它通过多种加密算法将文件数据生成为固定长度的数据流。最受欢迎的是 MD5、SHA-1、SHA-256 和 SHA-512。所有这些 Collision 都支持。 + +除此之外,Collision 还提供了一个简洁的用户界面,它对每个 Linux 用户都简单易用。这是它的外观。 + +![Collision – First Screen][3] + +首先,它有两个主要特点。 a、上传文件以获取校验和和或哈希值;b、将校验和与上传的文件进行比较。 + +例如,如果你有一个简单的文件,你可以通过“打开文件Open a File”按钮上传一个文件,或“打开Open”按钮重新上传另一个文件。 + +如下图所示,该文本文件具有以下各种哈希函数的校验和。现在你可以通过互联网/与任何人共享该文件,以及用于验证的校验和值。 + +![Hash values of a test file][4] + +此外,如果有人篡改文件(即使是单个字节)或文件在分发过程中被破坏,那么哈希值就会完全改变。 + +其次,如果要验证已下载文件的完整性,请点击“验证Verify”选项卡。然后上传文件,输入你收到的上传文件的哈希值。 + +如果匹配,你应该会看到一个绿色勾号,显示其真实性。 + +![Collision verifies a sample file with SHA-256][5] + +此外,这是另一个示例,我修改了测试文件并保持大小相同。这个场景清楚地表明它对该文件无效。 + +![Collision showing that a file is not valid][6] + +#### 重要说明 + +这里值得一提的是,哈希方法不会验证文件元属性,如修改时间、修改日期等。如果有人篡改了文件并将其还原为原始内容,这种哈希方式将其称为有效文件。 + +现在,让我们看一个验证 ISO 文件的典型示例。 + +### 使用 Collision 验证 Ubuntu Linux 的示例 ISO 文件 + +我相信你在使用 Linux 时通常会下载许多 ISO 文件。为了说明,我从官方 Ubuntu 下载页面下载了流行的 Ubuntu ISO 服务器镜像。 + +![Ubuntu server ISO file and checksums][7] + +`SHA256SUMS` 文件带有上面的该安装程序的以下校验和值: + +![SHA-256 value of Ubuntu server ISO image][8] + +下载后,打开 Collision 应用并通过“验证Verify”选项卡上传 ISO 文件。然后复制 SHA-256 值并将其粘贴到左侧的校验和框中。 + +如果你已正确下载并按照步骤操作,你应该会看到该文件是真实有效的。 + +![Ubuntu server ISO image verified][9] + +### 如何安装 Collision + +使用 Flatpak 可以轻松安装 Collision 应用。你需要为你的 Linux 发行版 [设置 Flatpak][10],并单击以下链接以安装 Collision。 + +> **[通过 Flathub 安装 Collision][11]** + +安装后,你应该通过发行版的应用菜单找到它。 + +### 有没有其他方法可以在没有任何应用的情况下验证文件? + +是的,所有 Linux 发行版中都有一些内置程序,你还可以使用它们来使用终端验证文件及其完整性。 + +下面的终端程序可用于确定任何文件的哈希值。它们默认安装在所有发行版中,你甚至可以将它们用于你的 shell 脚本以实现自动化。 + +``` +md5sum <文件名> +``` + +``` +sha1sum <文件名> +``` + +``` +sha256sum <文件名> +``` + +使用上述程序,你可以找出哈希值。但是你需要比较它们以手动验证。 + +![Verify files via command-line utilities][12] + +### 结束语 + +我希望本指南可以帮助你使用 Collision GTK 应用验证你的文件。它使用起来很简单。此外,你可以在终端中使用命令行方法来验证您想要的任何文件。尽可能始终检查文件完整性总是应该的。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/collision/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[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/lkxed +[1]: https://www.debugpoint.com/category/distributions +[2]: https://collision.geopjr.dev/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Collision-First-Screen.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/05/Hash-values-of-a-test-file.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/05/Collision-verifies-a-sample-file-with-SHA-256.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/Collision-showing-that-a-file-is-not-valid.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/05/Ubuntu-server-ISO-file-and-checksums.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/SHA-256-valud-of-Ubuntu-server-ISO-image.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2022/05/Ubuntu-server-ISO-image-verified.jpg +[10]: https://flatpak.org/setup/ +[11]: https://dl.flathub.org/repo/appstream/dev.geopjr.Collision.flatpakref +[12]: https://www.debugpoint.com/wp-content/uploads/2022/05/Verify-files-via-command-line-utilities.jpg diff --git a/published/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md b/published/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md new file mode 100644 index 0000000000..c60fbf2e57 --- /dev/null +++ b/published/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md @@ -0,0 +1,264 @@ +[#]: subject: "How to Install KVM on Ubuntu 22.04 (Jammy Jellyfish)" +[#]: via: "https://www.linuxtechi.com/how-to-install-kvm-on-ubuntu-22-04/" +[#]: author: "James Kiarie https://www.linuxtechi.com/author/james/" +[#]: collector: "lkxed" +[#]: translator: "turbokernel" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14661-1.html" + +Ubuntu 22.04 之 KVM 安装手札 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/01/171619m6dd7bjb8292bbb9.jpg) + +**KVM** 是 基于内核的虚拟机Kernel-based Virtual Machine 的首字母缩写,这是一项集成在内核中的开源虚拟化技术。它是一种类型一(裸机)的管理程序hypervisor,可以使内核能够作为一个裸机管理程序bare-metal hypervisor。 + +在 KVM 之上可以运行 Windows 和 Liunx 虚拟机。每个虚拟机都独立于其它虚拟机和底层操作系统(宿主机系统),并拥有自己的 CPU、内存、网络接口、存储设备等计算资源。 + +本文将介绍在 Ubuntu 22.04 LTS(Jammy Jellyfish)中如何安装 KVM 。在文末,我们也将演示如何在安装 KVM 完成之后创建一台虚拟机。 + +### 1、更新 Ubuntu 22.04 + +在一切开始前,打开终端并通过如下命令更新本地的软件包索引: + +``` +$ sudo apt update +``` + +### 2、检查虚拟化是否开启 + +在进一步行动之前,首先需要检查你的 CPU 是否支持 KVM 虚拟化,确保你系统中有 VT-x( vmx)英特尔处理器或 AMD-V(svm)处理器。 + +你可以通过运行如下命令,如果输出值大于 0,那么虚拟化被启用。否则,虚拟化被禁用,你需要启用它: + +``` +$ egrep -c '(vmx|svm)' /proc/cpuinfo +``` + +![SVM-VMX-Flags-Cpuinfo-linux][1] + +根据上方命令输出,你可以推断出虚拟化功能已经启用,因为输出结果大于 0。如果虚拟化功能没有启用,请确保在系统的 BIOS 设置中启用虚拟化功能。 + +另外,你可以通过如下命令判断 KVM 虚拟化是否已经在运行: + +``` +$ kvm-ok +``` + +运行该命令之前,请确保你已经安装了 `cpu-checker` 软件包,否则将提示未找到该命令的报错。 + +直接就在下面,你会得到如何解决这个问题的指示,那就是安装 `cpu-checker` 包。 + +![KVM-OK-Command-Not-Found-Ubuntu][2] + +随后,通过如下命令安装 `cpu-checker` 软件包: + +``` +$ sudo apt install -y cpu-checker +``` + +接着再运行 `kvm-ok` 命令,如果 KVM 已经启动,你将看到如下输出: + +``` +$ kvm-ok +``` + +![KVM-OK-Command-Output][3] + +### 3、在 Ubuntu 22.04 上安装 KVM + +随后,通过如下命令在 Ubuntu 22.04 中安装 KVM 以及其他相关虚拟化软件包: + +``` +$ sudo apt install -y qemu-kvm virt-manager libvirt-daemon-system virtinst libvirt-clients bridge-utils +``` + +以下为你解释刚刚安装了哪些软件包: + +* `qemu-kvm` – 一个提供硬件仿真的开源仿真器和虚拟化包 +* `virt-manager` – 一款通过 libvirt 守护进程,基于 QT 的图形界面的虚拟机管理工具 +* `libvirt-daemon-system` – 为运行 libvirt 进程提供必要配置文件的工具 +* `virtinst` – 一套为置备和修改虚拟机提供的命令行工具 +* `libvirt-clients` – 一组客户端的库和API,用于从命令行管理和控制虚拟机和管理程序 +* `bridge-utils` – 一套用于创建和管理桥接设备的工具 + +### 4、启用虚拟化守护进程(libvirtd) + +在所有软件包安装完毕之后,通过如下命令启用并启动 libvirt 守护进程: + +``` +$ sudo systemctl enable --now libvirtd +$ sudo systemctl start libvirtd +``` + +你可以通过如下命令验证该虚拟化守护进程是否已经运行: + +``` +$ sudo systemctl status libvirtd +``` + +![Libvirtd-Status-Ubuntu-Linux][4] + +另外,请将当前登录用户加入 `kvm` 和 `libvirt` 用户组,以便能够创建和管理虚拟机。 + +``` +$ sudo usermod -aG kvm $USER +$ sudo usermod -aG libvirt $USER +``` + +`$USER` 环境变量引用的即为当前登录的用户名。你需要重新登录才能使得配置生效。 + +### 5、创建网桥(br0) + +如果你打算从本机(Ubuntu 22.04)之外访问 KVM 虚拟机,你必须将虚拟机的网卡映射至网桥。`virbr0` 网桥是 KVM 安装完成后自动创建的,仅做测试用途。 + +你可以通过如下内容在 `/etc/netplan` 目录下创建文件 `01-netcfg.yaml` 来新建网桥: + +``` +$ sudo vi /etc/netplan/01-netcfg.yaml +network: +  ethernets: +    enp0s3: +      dhcp4: false +      dhcp6: false +  # add configuration for bridge interface +  bridges: +    br0: +      interfaces: [enp0s3] +      dhcp4: false +      addresses: [192.168.1.162/24] +      macaddress: 08:00:27:4b:1d:45 +      routes: +        - to: default +          via: 192.168.1.1 +          metric: 100 +      nameservers: +        addresses: [4.2.2.2] +      parameters: +        stp: false +      dhcp6: false +  version: 2 +``` + +保存并退出文件。 + +注:上述文件的配置是我环境中的,请根据你实际环境替换 IP 地址、网口名称以及 MAC 地址。 + +你可以通过运行 `netplan apply` 命令应用上述变更。 + +``` +$ sudo netplan apply +``` + +你可以通过如下 `ip` 命令,验证网桥 `br0`: + +``` +$ ip add show +``` + +![Network-Bridge-br0-ubuntu-linux][5] + +### 6、启动 KVM 虚拟机管理器 + +当 KVM 安装完成后,你可以使用图形管理工具 `virt-manager` 创建虚拟机。你可以在 GNOME 搜索工具中搜索 `Virtual Machine Manager` 以启动。 + +点击搜索出来的图标即可: + +![Access-Virtual-Machine-Manager-Ubuntu-Linux][6] + +虚拟机管理器界面如下所示: + +![Virtual-Machine-Manager-Interface-Ubuntu-Linux][7] + +你可以点击 “文件File” 并选择 “新建虚拟机New Virtual Machine”。你也可以点击下图所示的图标: + +![New-Virtual-Machine-Icon-Virt-Manager][8] + +在弹出的虚拟机安装向导将看到如下四个选项: + +* 本地安装介质(ISO 镜像或 CDROM) +* 网络安装(HTTP、HTTPS 和 FTP) +* 导入现有磁盘镜像 +* 手动安装 + +本文使用已下载的 ISO 镜像,你可以选择自己的 ISO 镜像,选择第一个选项,并点击 “向前Forward”。 + +![Local-Install-Media-ISO-Virt-Manager][9] + +下一步中,点击 “浏览Browse” 选择 ISO 镜像位置。 + +![Browse-ISO-File-Virt-Manager-Ubuntu-Linux][10] + +在下一个窗口中点击 “浏览本地Browse local” 选取本机中 ISO 镜像。 + +![Browse-Local-ISO-Virt-Manager][11] + +如下所示,我们选择了 Debian 11 ISO 镜像,随后点击 “打开Open”。 + +![Choose-ISO-File-Virt-Manager][12] + +当 ISO 镜像选择后,点击 “向前Forward” 进入下一步。 + +![Forward-after-browsing-iso-file-virt-manager][13] + +接着定义虚拟机所用内存大小以及 CPU 核心数,并点击 “向前Forward” 。 + +![Virtual-Machine-RAM-CPU-Virt-Manager][14] + +下一步中,输入虚拟机磁盘空间,并点击 “向前Forward” 继续。 + +![Storage-for-Virtual-Machine-KVM-Virt-Manager][15] + +如你需要将虚拟机网卡连接至网桥,点击 “选择网络Network selection” 并选择 `br0` 网桥。 + +![Network-Selection-KVM-Virtual-Machine-Virt-Manager][16] + +最后,点击 “完成Finish” 按钮结束设置虚拟机。 + +![Choose-Finish-to-OS-Installation-KVM-VM][17] + +稍等片刻,虚拟机的创建过程将开始。 + +![Creating-Domain-Virtual-Machine-Virt-Manager][18] + +当创建结束时,虚拟机将开机并进入系统安装界面。如下是 Debian 11 的安装选项。在这里你可以根据需要进行系统安装。 + +![Virtual-Machine-Console-Virt-Manager][19] + +### 小结 + +至此,本文向你演示了如何在 Ubuntu 22.04 上 安装 KVM 虚拟化引擎。你的反馈对我们至关重要。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/how-to-install-kvm-on-ubuntu-22-04/ + +作者:[James Kiarie][a] +选题:[lkxed][b] +译者:[turbokernel](https://github.com/turbokernel) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxtechi.com/author/james/ +[b]: https://github.com/lkxed +[1]: https://www.linuxtechi.com/wp-content/uploads/2022/05/SVM-VMX-Flags-Cpuinfo-linux.png +[2]: https://www.linuxtechi.com/wp-content/uploads/2022/05/KVM-OK-Command-Not-Found-Ubuntu.png +[3]: https://www.linuxtechi.com/wp-content/uploads/2022/05/KVM-OK-Command-Output.png +[4]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Libvirtd-Status-Ubuntu-Linux.png +[5]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Network-Bridge-br0-ubuntu-linux.png +[6]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Access-Virtual-Machine-Manager-Ubuntu-Linux.png +[7]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Virtual-Machine-Manager-Interface-Ubuntu-Linux.png +[8]: https://www.linuxtechi.com/wp-content/uploads/2022/05/New-Virtual-Machine-Icon-Virt-Manager.png +[9]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Local-Install-Media-ISO-Virt-Manager.png +[10]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Browse-ISO-File-Virt-Manager-Ubuntu-Linux.png +[11]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Browse-Local-ISO-Virt-Manager.png +[12]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Choose-ISO-File-Virt-Manager.png +[13]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Forward-after-browsing-iso-file-virt-manager.png +[14]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Virtual-Machine-RAM-CPU-Virt-Manager.png +[15]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Storage-for-Virtual-Machine-KVM-Virt-Manager.png +[16]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Network-Selection-KVM-Virtual-Machine-Virt-Manager.png +[17]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Choose-Finish-to-OS-Installation-KVM-VM.png +[18]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Creating-Domain-Virtual-Machine-Virt-Manager.png +[19]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Virtual-Machine-Console-Virt-Manager.png diff --git a/published/20220525 Machine Learning- Classification Using Python.md b/published/20220525 Machine Learning- Classification Using Python.md new file mode 100644 index 0000000000..0ae672fac4 --- /dev/null +++ b/published/20220525 Machine Learning- Classification Using Python.md @@ -0,0 +1,108 @@ +[#]: subject: "Machine Learning: Classification Using Python" +[#]: via: "https://www.opensourceforu.com/2022/05/machine-learning-classification-using-python/" +[#]: author: "Gayatri Venugopal https://www.opensourceforu.com/author/gayatri-venugopal/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "turbokernel" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14676-1.html" + +机器学习:使用 Python 进行分类 +====== + +> 机器学习(ML)就是,分析一组数据以预测结果。Python 被认为是 ML 的最佳编程语言选择之一。在本文中,我们将讨论使用 Python 进行分类的机器学习。 + +![machine-learning-classification][1] + +假设你想教孩子区分苹果和橙子。有多种方法可以做到这一点。你可以让孩子触摸这两种水果,让他们熟悉形状和柔软度。你还可以向她展示苹果和橙子的多个例子,以便他们可以直观地发现差异。这个过程的技术等价物被称为机器学习。 + +机器学习教计算机解决特定问题,并通过经验变得更好。这里讨论的示例是一个分类问题,其中机器被赋予各种标记示例,并期望使用它从标记样本中获得的知识来对未标记样本进行标记。机器学习问题也可以采用回归的形式,其中期望根据已知样本及其解决方案来预测给定问题的实值real-valued解决方案。分类Classification回归Regression被广泛称为监督学习supervised learning。机器学习也可以是无监督unsupervised的,机器识别未标记数据中的模式,并形成具有相似模式的样本集群。机器学习的另一种形式是强化学习reinforcement learning,机器通过犯错从环境中学习。 + +### 分类 + +分类是根据从已知点获得的信息来预测一组给定点的标签的过程。与一个数据集相关的类别或标签可以是二元的,也可以是多元的。举例来说,如果我们必须给与一个句子相关的情绪打上标签,我们可以把它标记为正面、负面或中性。另一方面,我们必须预测一个水果是苹果还是橘子的问题将有二元标签。表 1 给出了一个分类问题的样本数据集。 + +在该表中,最后一列的值,即贷款批准,预计将基于其他变量进行预测。在接下来的部分中,我们将学习如何使用 Python 训练和评估分类器。 + +| 年龄 | 信用等级 | 工作 | 拥有房产 | 贷款批准 | +| :- | :- | :- | :- | :- | +| 35 | 好 | 是 | 是 | 是 | +| 32 | 差 | 是 | 不 | 不 | +| 22 | 一般 | 不 | 不 | 不 | +| 42 | 好 | 是 | 不 | 是 | + +*表 1* + +### 训练和评估分类器 + +为了训练分类器classifier,我们需要一个包含标记示例的数据集。尽管本节不涉及清理数据的过程,但建议你在将数据集输入分类器之前阅读各种数据预处理和清理技术。为了在 Python 中处理数据集,我们将导入 `pandas` 包和数据帧DataFrame结构。然后,你可以从多种分类算法中进行选择,例如决策树decision tree支持向量分类器support vector classifier随机森林random forest、XG boost、ADA boost 等。我们将看看随机森林分类器,它是使用多个决策树形成的集成分类器。 + +``` +from sklearn.ensemble import RandomForestClassifier +from sklearn import metrics + +classifier = RandomForestClassifier() + +#creating a train-test split with a proportion of 70:30 +X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33) + +classifier.fit(X_train, y_train) # 在训练集上训练分类器 + +y_pred = classifier.predict(X_test) # 用未知数据评估分类器 + +print("Accuracy: ", metrics.accuracy_score(y_test, y_pred)) # 用测试计划中的实际值比较准确率 +``` + +虽然这个程序使用准确性作为性能指标,但应该使用多种指标的组合,因为当测试集不平衡时,准确性往往会产生非代表性的结果。例如,如果模型对每条记录都给出了相同的预测,而用于测试模型的数据集是不平衡的,即数据集中的大多数记录与模型预测的类别相同,我们就会得到很高的准确率。 + +### 调整分类器 + +调优是指修改模型的超参数hyperparameter值以提高其性能的过程。超参数是可以改变其值以改进算法的学习过程的参数。 + +以下代码描述了随机搜索超参数调整。在此,我们定义了一个搜索空间,算法将从该搜索空间中选择不同的值,并选择产生最佳结果的那个: + +``` +from sklearn.model_selection import RandomizedSearchCV + +#define the search space +min_samples_split = [2, 5, 10] +min_samples_leaf = [1, 2, 4] +grid = {‘min_samples_split’ : min_samples_split, ‘min_samples_leaf’ : min_samples_leaf} + +classifier = RandomizedSearchCV(classifier, grid, n_iter = 100) + +# n_iter 代表从搜索空间提取的样本数 +# result.best_score 和 result.best_params_ 可以用来获得模型的最佳性能,以及参数的最佳值 + +classifier.fit(X_train, y_train) +``` + +### 投票分类器 + +你也可以使用多个分类器和它们的预测来创建一个模型,根据各个预测给出一个预测。这个过程(只考虑为每个预测投票的分类器的数量)被称为硬投票。软投票是一个过程,其中每个分类器产生一个给定记录属于特定类别的概率,而投票分类器产生的预测是获得最大概率的类别。 + +下面给出了一个创建软投票分类器的代码片段: + +``` +soft_voting_clf = VotingClassifier( +estimators=[(‘rf’, rf_clf), (‘ada’, ada_clf), (‘xgb’, xgb_clf), (‘et’, et_clf), (‘gb’, gb_clf)], +voting=’soft’) +soft_voting_clf.fit(X_train, y_train) +``` + +这篇文章总结了分类器的使用,调整分类器和结合多个分类器的结果的过程。请将此作为一个参考点,详细探讨每个领域。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/machine-learning-classification-using-python/ + +作者:[Gayatri Venugopal][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[turbokernel](https://github.com/turbokernel) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/gayatri-venugopal/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/machine-learning-classification.jpg diff --git a/published/20220525 Package is -set to manually installed-- What does it Mean-.md b/published/20220525 Package is -set to manually installed-- What does it Mean-.md new file mode 100644 index 0000000000..127e111531 --- /dev/null +++ b/published/20220525 Package is -set to manually installed-- What does it Mean-.md @@ -0,0 +1,100 @@ +[#]: subject: "Package is “set to manually installed”? What does it Mean?" +[#]: via: "https://itsfoss.com/package-set-manually-installed/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14675-1.html" + +软件包 “被标记为手动安装”?这是什么意思? +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/05/154517uqnqdfi79yqidi79.jpg) + +如果你使用 `apt` 命令在终端中安装软件包,你将看到各种输出。 + +如果你注意并查看输出,有时你会注意到一条消息: + +``` +package_name set to manually installed +``` + +你有没有想过这条消息是什么意思,为什么你没有在所有包上看到它?让我在本篇中分享一些细节。 + +### 理解 “软件包被标记为手动安装” + +当你尝试安装已安装的库或开发包时,你会看到此消息。此依赖包是与另一个包一起自动安装的。如果删除了主包,则使用 `apt autoremove` 命令删除依赖包。 + +但是由于你试图显式安装依赖包,你的 Ubuntu 系统认为你需要这个包独立于主包。因此,该软件包被标记为手动安装,因此不会自动删除。 + +不是很清楚,对吧?以 [在 Ubuntu 上安装 VLC][1] 为例。 + +由于主 VLC 包依赖于许多其他包,因此这些包会自动安装。 + +![installing vlc with apt ubuntu][2] + +如果你检查名称中包含 `vlc` 的 [已安装软件包列表][3],你会看到除了 VLC,其余都标记为“自动”。这表明这些软件包是(跟着 vlc)自动安装的,当 VLC 被卸载时,它们将使用 `apt autoremove` 命令自动删除。 + +![list installed packages vlc ubuntu][4] + +现在假设你出于某种原因考虑安装 `vlc-plugin-base`。如果你在其上运行 `apt install` 命令,系统会告诉你该软件包已安装。同时,它将标记从自动更改为手动,因为系统认为在尝试手动安装表明你明确需要此 `vlc-plugin-base`。 + +![package set manually][5] + +可以看到它的状态已经从 `[installed,automatic]` 变成了 `[installed]`。 + +![listing installed packages with vlc][6] + +现在,让我删除 VLC 并运行 `autoremove` 命令。你可以看到 `vlc-plugin-base` 不在要删除的软件包列表中。 + +![autoremove vlc ubuntu][7] + +再次检查已安装软件包的列表。`vlc-plugin-base` 仍然安装在系统上。 + +![listing installed packages after removing vlc][8] + +你可以在这里看到另外两个与 VLC 相关的包。这些是 `vlc-plugin-base` 包的依赖项,这就是为什么它们也存在于系统上但标记为 `automatic` 的原因。 + +我相信现在有了这些例子,事情就更清楚了。让我给你一个额外的技巧。 + +### 将包重置为自动 + +如果包的状态从自动更改为手动,你可以通过以下方式将其设置回自动: + +``` +sudo apt-mark auto package_name +``` + +![set package to automatic][9] + +### 结论 + +这不是一个重大错误,也不会阻止你在系统中进行工作。但是,了解这些小事会增加你的知识。 + +**好奇心可能会害死猫,但它会让企鹅变得更聪明**。这是为这篇原本枯燥的文章增添幽默感的原始引述 : ) + +如果你想阅读更多这样的文章,这些文章可能看起来微不足道,但可以帮助你更好地了解您的 Linux 系统,请告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/package-set-manually-installed/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[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/lkxed +[1]: https://itsfoss.com/install-latest-vlc/ +[2]: https://itsfoss.com/wp-content/uploads/2022/05/installing-vlc-with-apt-ubuntu-800x489.png +[3]: https://itsfoss.com/list-installed-packages-ubuntu/ +[4]: https://itsfoss.com/wp-content/uploads/2022/05/list-installed-packages-vlc-ubuntu-800x477.png +[5]: https://itsfoss.com/wp-content/uploads/2022/05/package-set-manually.png +[6]: https://itsfoss.com/wp-content/uploads/2022/05/listing-installed-packages-with-vlc.png +[7]: https://itsfoss.com/wp-content/uploads/2022/05/autoremove-vlc-ubuntu.png +[8]: https://itsfoss.com/wp-content/uploads/2022/05/listing-installed-packages-after-removing-vlc.png +[9]: https://itsfoss.com/wp-content/uploads/2022/05/set-package-to-automatic.png diff --git a/published/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md b/published/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md new file mode 100644 index 0000000000..6e41f831e1 --- /dev/null +++ b/published/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md @@ -0,0 +1,80 @@ +[#]: subject: "TypeScript Based Headless CMS ‘Payload’ Becomes Open Source" +[#]: via: "https://news.itsfoss.com/payload-open-source/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14660-1.html" + +基于 TypeScript 的无头内容管理系统 “Payload” 现已开源 +====== + +> 开源的无头Headless内容管理系统(CMS)列表中添加了一个新选项。它会是一个更好的无头 WordPress 替代品吗? + +![Payload][1] + +自从一年多前发布首个测试版以来,作为无头内容管理系统(CMS),Payload 已经逐渐在 Web 开发社区中给人们留下了深刻印象。先做一些背景介绍,Payload 是专门为更简单地开发网站、Web 应用或原生native应用而量身定制的内容管理系统。 + +最近,他们决定完全开源,现在,它已跻身 [可用的最佳开源内容管理系统][2] 之一。 + +然而,这也带来了一些问题:他们会采用怎么样的商业模式?Payload 内容管理系统的计划是什么?下面,就让我们简要地看一下吧! + +### Payload 为什么要开源? + +自 2021 年首次发布以来,Payload 已经收到了来自开源社区的许多贡献。正如 Payload 在他们 [最近的公告][3] 中所说,开源是一个重要的决定,它能够使项目能够达到的更高的高度,这是闭门造车做不到的。 + +![][4] + +此外,这种开放性通常会增加开发者社区的信任。这种信任也会延伸到商业,自然而然地转而成为开发者最支持、最信任的平台。 + +因此,Payload 正在切换到 MIT 许可证。这将允许任何人免费且不受限制地修改、分发和使用 Payload。 + +然而,Payload 仍然需要资金流入才能持续运营。那么,这就引出了一个问题,Payload 将如何盈利呢? + +### Payload 将如何盈利? + +与往常一样,Payload 需要一些财务支持才能维持运营。团队拿出了一个由两部分组成的计划,该计划既要为用户提供更多 以便利为中心convenience-focused 的功能,又要为 自托管self-hosted 客户提供难以置信的灵活性。 + +![][5] + +#### 企业许可证 + +此选项与其他开源 CMS 的软件服务极为相似。这些许可证将提供更高级的 SSO 选项,并为开发者保证 Payload 核心团队的响应时间。 + +这些许可证应该对大公司有吸引力,尤其是那些需要最大程度可靠性的公司。 + +#### 云主机 + +这个选项非常有吸引力,因为它结合了多种服务来创造最方便的体验。尽管传统托管仍然相当容易,但只要你为 Node 应用程序添加数据库、持久文件存储和其他基础设施,你就会面对四五个不同的服务,而这些服务都需要无缝协同工作。 + +应该注意的是,这不是必需的,Payload 仍然鼓励用户托管他们的实例。这项服务只是消除了与托管相关的大量费用和挑战而已。 + +截至目前,事情还没有敲定。但是,你可以关注 [GitHub][6] 上的讨论来跟踪事情的进展。 + +### 总结 + +作为一个新兴的 CMS 选项,很高兴看到 Payload 迈出了这一步,成为 WordPress 和其他选项的流行替代品。此外,在我看来,Payload 团队对他们的新业务模式充满信心,或许这预示着一个光明的未来(希望如此)。 + +> **[Payload 内容管理系统][7]** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/payload-open-source/ + +作者:[Jacob Crume][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/payload-opensource.jpg +[2]: https://itsfoss.com/open-source-cms/ +[3]: https://payloadcms.com/blog/open-source +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/payloadcms-demo.png +[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/payload-free-opensource-1024x576.jpg +[6]: https://github.com/payloadcms/payload +[7]: https://payloadcms.com/ diff --git a/published/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md b/published/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md new file mode 100644 index 0000000000..5620f379f6 --- /dev/null +++ b/published/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md @@ -0,0 +1,161 @@ +[#]: subject: "Compile GNOME Shell and Apps From Source [Beginner’s Guide]" +[#]: via: "https://www.debugpoint.com/2022/05/compile-gnome-source/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14662-1.html" + +如何从源码编译 GNOME Shell 和应用 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/01/180518p98dt89wz7779tyb.jpg) + +> 这是一篇如何从源码编译 GNOME 的快速指南,包括 Shell、mutter 和一些原生应用。 + +在编译之前,你需要确保一些事情,因为以下编译直接来自 Gitlab 的主分支,其中包含一些开发包。 + +通常,你可以选择在任何 Linux 发行版中编译。但是我建议使用 Fedora Rawhide(Fedora 的开发分支,用于将来的发布)。 + +另外,请勿在稳定系统中尝试此操作。因为操作可能出错,所以你可能最终得到损坏的系统。 + +总而言之,你需要以下内容来从源码编译 GNOME。 + +* 测试环境([虚拟机][1] 或测试系统)。 +* Fedora Rawhide 发行版(推荐,[从此处下载][2])。 +* 确保你的发行版是最新的。 +* 你已登录 X.org 会话。 + +我不建议你在 Wayland 会话中进行编译,因为你会遇到问题。 + +### 从源码编译 GNOME + +GNOME 桌面是一个基于其功能的软件包集合。Linux 发行版的桌面组件工作于窗口管理器和 shell 之下。 + +因此,对于 GNOME,我将首先编译 mutter – 它是 GNOME Shell 的窗口管理器。然后进行 GNOME Shell 的编译。最后,我将编译一些原生应用。 + +我将使用 meson 构建系统进行编译。meson 是一个漂亮的构建系统,快速且用户友好。 + +#### 编译 mutter + +打开终端并安装 GNOME Shell 和 mutter 所需的软件包。 + +``` +sudo dnf build-dep mutter gnome-shell +``` + +在主目录(或你想要的任何地方)中创建演示目录。 + +``` +cd ~ +mkdir demo +cd demo +``` + +从 Gitlab 克隆 mutter 的主分支。 + +``` +git clone https://gitlab.gnome.org/GNOME/mutter +``` + +进入克隆目录,然后使用以下 `meson` 命令来准备构建文件。默认情况下,meson 使用 `/usr/local` 用于构建文件。但是,你也可以使用前缀开关将输出重定向到特定文件夹(如下所示)。 + +``` +cd mutter +meson _build --prefix=/usr +``` + +![Compile Mutter for GNOME][3] + +使用以下命令在构建完成时,将 mutter 安装在到系统中。 + +``` +sudo ninja install -C _build +``` + +#### 编译 GNOME Shell + +GNOME Shell 和其他软件包的编译方法类似。首先,从 GitLab 克隆 GNOME Shell 主仓库,然后进行编译和安装。你可以按照下面的命令依次进行。 + +在 GNOME Shell 中,你需要两个依赖项。它们是 [asciidoc][4] 和 [sassc][5] 。请在构建 GNOME Shell 之前安装它们。 + +``` +sudo dnf install asciidoc +sudo dnf install sassc +``` + +安装完这些依赖项后,按照下面的命令来构建和安装 GNOME Shell。在运行这个命令之前,请确保你回到 `demo` 文件夹(我在第一步创建的)。 + +``` +git clone https://gitlab.gnome.org/GNOME/gnome-shellcd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build +``` + +### 运行 GNOME Shell + +编译完成后,你可以尝试重新启动 GNOME Shell 来查看来自主分支的变化。 + +在重启之前,正如我之前提到的,确保你处于 X.Org 会话中。按 `ALT+F2` 并输入 `r`。然后按回车键。这个命令将重启 GNOME Shell。 + +![Restart GNOME Shell (X11)][6] + +恭喜你! 你已经成功地编译了 GNOME Shell 和 Mutter。 + +现在,是时候编译一些 GNOME 原生应用了。 + +### 编译 GNOME 原生应用 + +这些步骤对于 GNOME 或任何应用的所有源码都是一样的。你需要改变仓库的名字。因此,这里有一些编译必要的 GNOME 原生应用的命令示例。 + +#### Files(Nautilus) + +``` +git clone https://gitlab.gnome.org/GNOME/nautilus/cd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build +``` + +#### GNOME 软件商店 + +``` +git clone https://gitlab.gnome.org/GNOME/gnome-software/cd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build +``` + +#### GNOME 控制中心 + +``` +git clone https://gitlab.gnome.org/GNOME/gnome-control-center/cd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build +``` + +### FAQ + +1. 使用上述步骤,你可以编译任何源码分支。不仅仅是 GNOME。 +2. GitLab 服务器有时很慢,克隆一个仓库可能需要较长的时间。如果 `git clone` 失败,我建议你再试一次。 + +### 结束语 + +我希望这个小小的高级教程能够帮助你在新的 GNOME 功能出现在 GNOME 每日构建系统之前尝试它。既然你编译了,你也可以为测试新的 GNOME 功能做出贡献,并在 GitLab 问题页面上报告任何特定包的 bug 或问题。 + +这篇文章是开源应用编译系列的第一篇文章。请继续关注更多开源应用的编译文章。 + +另外,请让我在下面的评论栏中知道你的评论、建议,或者你在使用这些说明时遇到的任何错误。 + +干杯。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/compile-gnome-source/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[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/lkxed +[1]: https://www.debugpoint.com/tag/virtual-machine +[2]: https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Workstation/x86_64/iso/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Compile-Mutter-for-GNOME.jpg +[4]: https://asciidoc.org/ +[5]: https://github.com/sass/sassc +[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/Restart-GNOME-Shell-X11.jpg diff --git a/published/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md b/published/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md new file mode 100644 index 0000000000..878c857eba --- /dev/null +++ b/published/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md @@ -0,0 +1,93 @@ +[#]: subject: "GNOME Shell for Mobile: A Promising Start with Huge Expectations [Opinion]" +[#]: via: "https://www.debugpoint.com/2022/06/gnome-shell-mobile-announcement/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14672-1.html" + +移动版 GNOME Shell:希望之始,期望满满 +====== + +![GNOME Shell 在一台 Pinephone 原型机上运行][3] + +> GNOME 开发人员在最近的一篇博文中提出了将 GNOME Shell 完全移植到手机上的想法。下面是我对这个项目的一些看法。 + +### 移动版 GNOME Shell + +作为一个桌面环境,GNOME 在过去的十年中发展成为了 [GNOME 40][1]。GNOME 40 是一个重要的版本,它以一种现代的方式改变了完整的用户界面设计。 + +看着 GNOME 40 的设计方式,你可能会觉得 Shell 和它的底层技术已经为小屏幕做好了准备。手势驱动的工作区、图标网格和停靠区 —— 在某种程度上感觉更接近于像安卓这样的移动操作系统,而不是桌面环境。 + +此外,系统托盘、日历、通知和原生的应用程序,可以有效地在较小尺寸的设备上工作。得益于 GTK4 和 libadwaita,其设计是响应式的,应用程序和控件的外观与移动平台很匹配。 + +在 GNOME 40 之后,GNOME 开发者为较小尺寸的设备(如平板电脑和手机)设计了几个 GNOME Shell 的概念验证。 + +#### 为什么是现在? + +任何项目的开发和研究工作都要花费时间和金钱。虽然有来自主要科技公司对 GNOME 的捐赠,但这次有一个 “原型基金Prototype Fund” 帮助该团队继续进行这项努力。[原型基金][2] 是德国教育部(BMBF)支持公共利益软件的资助项目。 + +#### 包括什么? + +设计一个完整的移动用户界面,并将其与移动操作系统整合是一个非常复杂的项目。它需要一个精心设计的愿景来支持成千上万的移动硬件和用户支持。更不用说,用户在移动设备上的隐私和安全问题了。 + +因此,有了这个基金,团队可以集中精力进行概念验证,以满足 GNOME Shell 中一些基本的用户互动。 + +* 启动器 +* 应用程序网格 +* 轻扫、手势和导航 +* 用手机键盘搜索 +* 检测屏幕大小和支持屏幕旋转 +* 工作空间和多任务 +* 设置 +* 屏幕键盘 + +![GNOME Shell 移动版模拟图][4] + +始终要记住的是,移动体验远不止用户界面这么简单。另外,GNOME 本身并不是一个操作系统。它由底层的稳定的操作系统组成,它提供了非常需要的隐私和安全。另外,“应用商店”的概念也是如此。手机制造商需要与 GNOME 开发者合作,让他们的产品采用这个概念。 + +#### 进展如何? + +在写这篇文章时,团队给我们快速演示了取得的进展。在下面的视频中可以看到: + +![][5] + +复杂的任务是识别触摸屏手机中的各种手势。例如,你可能会使用长触摸、短触摸、双指轻扫和拖动,以及许多只有在小尺寸设备中才可行的可能性。这需要在各自的 GNOME Shell 组件中推倒重构。 + +而完全在现有的 GNOME Shell 基础上开发它们是很有挑战性的工作。 + +此外,该团队使用著名的 Pinephone Pro 进行开发和测试。Pinephone 已经是一个商业产品,装有 “友商” KDE Plasma 手机和其他 Linux 操作系统。 + +![][6] + +### 结语 + +如果一切按计划进行,我们可能在一个完整的开源手机中获得原生的 GNOME 体验。而你可以重新拥有你的隐私! + +另外,我不确定 Phosh(它也是基于 GNOME 的)会发生什么。虽然 Phosh 是由 Purism 开发和管理的,但看看 GNOME Shell 在移动设备上的努力和 PHosh 在未来一段日子的发展方向将是很有趣的。 + +那么,你对这个项目的前景怎么看?请在下面的评论栏里告诉我。 + +*图片和视频来源:GNOME 开发者 [博客][7]* + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/06/gnome-shell-mobile-announcement/ + +作者:[Arindam][a] +选题:[lkxed][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/lkxed +[1]: https://www.debugpoint.com/tag/gnome-40 +[2]: http://www.prototypefund.de +[3]: https://www.debugpoint.com/wp-content/uploads/2022/06/GNOME-Shell-Running-on-a-prototype-Pinephone.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/GNOME-Shell-Mobile-mock-up.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/06/phone.webm +[6]: https://www.debugpoint.com/wp-content/uploads/2022/06/tablet.webm +[7]: https://blogs.gnome.org/shell-dev/2022/05/30/towards-gnome-shell-on-mobile/ diff --git a/published/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md b/published/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md new file mode 100644 index 0000000000..85c9e25716 --- /dev/null +++ b/published/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md @@ -0,0 +1,134 @@ +[#]: subject: "Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser" +[#]: via: "https://news.itsfoss.com/linux-lite-6-0-release/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14669-1.html" + +Linux Lite 6.0 发布:弃用 Firefox,默认浏览器使用 Chrome +====== + +> Linux Lite 6.0 是一个有趣的版本,有一个新的默认浏览器,改进了无障碍性、新的主题、新的系统监视器等等改进。 + +![linux lite][1] + +Linux Lite,是 [最好的类 Windows 发行版][2] 之一,刚刚发布了它的最新版本 6.0。 + +Linux Lite 6.0 基于 [Ubuntu 22.04 LTS][3],内置了 [Linux 内核 5.15 LTS][4]。 + +这次升级包含了相当多的令人兴奋的新功能,包括一个新的窗口主题和无障碍技术。 + +让我们深入了解一下新的内容! + +### Linux Lite 6.0 概述 + +Linux Lite 6.0 包括许多变化,包括: + +* 更新了软件 +* 新的窗口主题 +* 新的屏幕键盘 +* 屏幕阅读器 +* 屏幕放大镜 +* Chrome 取代 Firefox 成为默认浏览器 +* 新的 GRUB 菜单 + +#### 无障碍性的改进 + +![Linux Lite 6.0][5] + +Linux Lite 通过这一改变已经步入了大联盟。无障碍性,在历史上一直是 GNOME 特有的优势,它现在有了很大的改进。这主要体现在三个不同的工具上:一个屏幕键盘,一个屏幕阅读器(Orca),和一个屏幕放大镜。 + +屏幕键盘对于许多触摸屏用户和没有键盘的用户来说是相当有用的。另一方面,屏幕阅读器对于视障用户来说将是完美的。 + +![Linux Lite 6.0][6] + +最后一项无障碍改进屏幕放大镜,也是针对与屏幕阅读器相同的受众。然而,它与传统的桌面理念相当吻合,所以众多用户可能更青睐它,而不是屏幕阅读器。 + +这些无障碍性的改进有助于 Linux Lite 6.0 成为一个主流的选择。 + +#### 更新的软件 + +与几乎所有的发行版升级一样,Linux Lite 6.0 包括更新的软件。最值得注意的是最新的 LibreOffice 稳定版 7.2.6。 + +其他更新包括 VLC 3.0.16、Thunderbird 91.7、Chrome 100、GIMP 2.10.30 等等。 + +虽然本身不一定是大规模的升级,但它表明了所包含的 LibreOffice 版本的重大变化。 + +以前,由于提供了更多的稳定性,Linux Lite 停留在更多老版本上。然而,Linux Lite 的开发者现在觉得使用最新的稳定版本也很放心,因为测试新 LibreOffice 版本的人比以往任何时候都多。 + +#### 新的窗口主题 + +![Linux Lite 6.0][7] + +Linux Lite 6.0 引入了一个新的窗口主题,叫做 “Materia”。那些主题社区的人可能会对它相当熟悉,因为它已经被移植到几乎所有的平台。这些平台包括 GTK 2、3 和 4、GNOME Shell、Budgie、Cinnamon、MATE、Unity、Xfce、LightDM、GDM,甚至是 Chrome 浏览器。 + +改用 Materia 应该会让 ChromeOS 用户感觉界面很熟悉,因为它是基于谷歌开发的 Material UI 的。 + +#### 谷歌 Chrome 浏览器成为新的默认浏览器 + +![Linux Lite 6.0][8] + +随着 Ubuntu 将其 Firefox 版本转移到一个 Snap 应用中,Linux Lite 已经完全抛弃了 Firefox,转而使用谷歌 Chrome。虽然我不能说我是这个变化的粉丝,但它确实有意义,特别是对于一个针对 Windows 用户的发行版来说。 + +虽然你可以自由地安装任何你喜欢的东西,但无论如何,Chrome 是大多数用户的流行选择。 + +此外,如果你想在访问文件之前扫描文件,Linux Lite 的开发者在 Chrome 中包含了一个 Virus Total 扫描器扩展(默认是禁用的)。 + +注意,你可以从 Linux Lite 的软件中心安装 Firefox,但它是 Snap 版本的。 + +#### 系统监控中心替代了任务管理器 + +![Linux Lite 6.0][9] + +Linux Lite 6.0 现在打包了 [系统监控中心][10]System Monitoring Center 来替代任务管理器和进程查看器。 + +请注意,Linux Lite 的开发者复刻了这个应用程序,在系统标签中提供了关于发行版的具体信息。 + +它提供了所有关注你的资源的必要功能。 + +### 其他改进 + +除了基本的变化之外,Linux Lite 6.0 还包括对 GRUB 菜单的更新、推送紧急修复包的能力、新的 whisker 菜单,以及更多的调整。 + +![Linux Lite 6.0][11] + +正如你所注意到的,新的 GRUB 菜单还包括关闭和重启,同时删除了内存测试选项。 + +你可以在其 [官方公告帖子][12] 中了解更多的技术细节。 + +### 总结 + +Linux Lite 6.0 看起来是一个可靠的版本,特别是对于那些等待无障碍功能和新的视觉感受的人。 + +如果你想自己尝试一下,ISO 文件可以从官方下载页面获得。 + +> **[下载Linux Lite][13]** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-lite-6-0-release/ + +作者:[Jacob Crume][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/linux-lite-6.jpg +[2]: https://itsfoss.com/windows-like-linux-distributions/ +[3]: https://news.itsfoss.com/ubuntu-22-04-release/ +[4]: https://news.itsfoss.com/linux-kernel-5-15-release/ +[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/Screen-Reader-Linux-Lite-6.0.png +[6]: https://news.itsfoss.com/wp-content/uploads/2022/06/linux-lite-accessibility.png +[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/Materia-Linux-Lite-6.0.png +[8]: https://news.itsfoss.com/wp-content/uploads/2022/05/Chrome-Linux-Lite-6.0.png +[9]: https://news.itsfoss.com/wp-content/uploads/2022/05/system-monitoring-center-linux-lite.png +[10]: https://itsfoss.com/system-monitoring-center/ +[11]: https://news.itsfoss.com/wp-content/uploads/2022/06/grub-linux-lite-6.png +[12]: https://www.linuxliteos.com/forums/release-announcements/linux-lite-6-0-final-released/ +[13]: https://www.linuxliteos.com/download.php#current diff --git a/published/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md b/published/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md new file mode 100644 index 0000000000..e1412ef77a --- /dev/null +++ b/published/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md @@ -0,0 +1,89 @@ +[#]: subject: "de-Googled /e/OS v1 Released Along with a New Brand ‘Murena’ for Smartphone and Cloud Services" +[#]: via: "https://news.itsfoss.com/murena-e-os/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14666-1.html" + +去谷歌化操作系统 /e/OS v1 及新品牌 Murena 一同发布 +====== + +> Murena 是一个与 e 基金会有关的新品牌,该品牌专注于提供隐私友好的 /e/OS 及新的智能手机和云服务。 + +![murena][1] + +/e/OS 是一个流行的、注重隐私的移动操作系统,是谷歌安卓的替代品之一。 + +这个复刻自 Lineage OS 的操作系统消除了任何与谷歌有关的依赖性,并鼓励你在使用中不要直接依赖任何谷歌的服务。 + +取而代之的是,它提供一些解决方案作为替代品,为你提供一个隐私友好的生态系统。 + +为了精简其产品,负责该操作系统的 e 基金会宣布了一个新的品牌 “Murena”,其中包括了一些以该操作系统为核心的新功能和一个新的智能手机。 + +### Murena 和 e 基金会 + +e 基金会作为一个致力于 /e/OS 的非营利组织将继续存在。因此,可以说这不是一次品牌重塑。 + +然而,[Murena][2] 作为一个新的创业公司,似乎是一个独立的商业实体,将专注于鼓励主流用户尝试 /e/OS,并促进支持该操作系统的智能手机的使用。 + +对该公司,/e/OS 的创建者提及: + +![][3] + +### /e/OS 1.0 有什么新内容? + +随着该操作系统的最新升级发布,他们的目标是让事情变得更容易理解,在提高使用便利性的同时,仍然考虑到隐私。 + +此外,还随同本次更新推出了新的应用程序商店(App Lounge)和新的隐私工具(Advanced Privacy)。 + +**App Lounge**:这个新的应用程序安装程序可以让你安装许多开源应用程序和 PWA(渐进式网页应用Progress Web App)。在你安装之前,它还会告知你每个应用程序中已有的跟踪器。 + +![][4] + +我相信一个量身定做的应用商店的存在将有助于消除新用户是否应该尝试用 /e/OS 安装 Play Store 或 F-Droid 的困惑。 + +除此之外,Advanced Privacy 工具将有助于限制用户在安装第三方应用程序后暴露的数据。 + +如果你想远离科技巨头,你还会发现 Murena 云服务可以用作私人电子邮件账户服务和云存储。该电子邮件服务提供的功能可以隐藏你的原始电子邮件地址。 + +### Murena One + +![][5] + +首款 Murena 品牌的智能手机将于 6 月下旬推出,并将向美国、加拿大、欧洲、英国和瑞士等地的用户发货。 + +这款智能手机将采用 6.5 英寸显示屏,配备 2500 万像素的前置摄像头,后置摄像头设置有三个传感器,分别是 4800 万像素、800 万像素和 500 万像素。 + +我们不太确定是什么处理器,但它提到了是一个八核芯片,加上 4GB 的内存。所有这些都由 4500 毫安时的电池供电。 + +除了它的第一款智能手机,你还可以从它的官方网站上购买 Fairphone 和 Teracube 的智能手机,这些手机预装了 /e/OS。 + +### 总结 + +你可以在其官方网站上了解更多关于新的 /e/OS 升级、云服务和可用的智能手机的信息。 + +> **[Murena][6]** + +该智能手机的定价还没有在新闻发布会上披露。所以,我们建议你如果有兴趣,可以关注一下。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/murena-e-os/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/murena.jpg +[2]: https://murena.com/ +[3]: https://news.itsfoss.com/wp-content/uploads/2022/06/murena-quote.jpeg +[4]: https://news.itsfoss.com/wp-content/uploads/2022/06/eos-app-lounge-1024x1024.jpg +[5]: https://news.itsfoss.com/wp-content/uploads/2022/06/murena-one-1024x576.jpeg +[6]: https://murena.com/ diff --git a/sources/news/20220511 Red Hat Enterprise Linux 9 Announced as the Next-Gen Backbone of Enterprise IT.md b/sources/news/20220511 Red Hat Enterprise Linux 9 Announced as the Next-Gen Backbone of Enterprise IT.md deleted file mode 100644 index 0cfe6e8df3..0000000000 --- a/sources/news/20220511 Red Hat Enterprise Linux 9 Announced as the Next-Gen Backbone of Enterprise IT.md +++ /dev/null @@ -1,81 +0,0 @@ -[#]: subject: "Red Hat Enterprise Linux 9 Announced as the Next-Gen Backbone of Enterprise IT" -[#]: via: "https://news.itsfoss.com/rhel-9-release/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Red Hat Enterprise Linux 9 Announced as the Next-Gen Backbone of Enterprise IT -====== -RHEL 9 is the latest upgrade built using the CentOS Stream. It’s the first major release under IBM as well. - -![red hat 9][1] - -Red Hat Enterprise Linux is undoubtedly a significant player in the open-source enterprise ecosystem. - -If you didn’t know, IBM acquired it for $34 Billion in 2019. So, it is safe to say that Red Hat Enterprise Linux 8 was the last major release before the acquisition. - -There have been several updates to RHEL 8 over the years. - -Finally, Red Hat announced the release of Red Hat Enterprise Linux 9 as the next-gen upgrade to power up enterprise IT infrastructure. - -Here, let me highlight the key additions to the release. - -### Red Hat Enterprise Linux 9: What’s New? - -Note that the platform will be generally available in the coming weeks. But, now that it is officially announced, it should not take long. - -If you are a Linux desktop user and aren’t concerned about cloud innovation, you will find numerous technical jargon. You will need to refer to Red Hat’s official documentation to know more about them. - -If you’re already using [CentOS Stream][2], you might have an idea about the RHEL 9 upgrade. - -Yes, RHEL 9 is the first production release built from CentOS Stream. - -As per the [press release][3], the new version focuses on two different capabilities: - -* Comprehensive edge management, delivered as a service, to oversee and scale remote deployments with greater control and security functionality, encompassing zero-touch provisioning, system health visibility, and more responsive vulnerability mitigations all from a single interface. -* Automatic container roll-back with Podman, Red Hat Enterprise Linux’s integrated container management technology, which can automatically detect if a newly-updated container fails to start and then roll the container back to the previous working version. - -Other key highlights include: - -* A new image builder service. -* Integration with AWS Graviton processors. -* Improvements to address hardware-level security vulnerabilities like Spectre and Meltdown. -* Introducing a new integrity measurement architecture. -* WireGuard VPN technology is available as an unsupported technology preview. -* Improved automation. -* Python 3.9 -* Node.js 16 -* Linux Kernel 5.14 - -You can refer to [RHEL 9 beta release notes][4] to know more about the release. - -### Wrapping Up - -While the release may not feature the latest and greatest technologies, updated features and capabilities should help provide enhanced support for newer IT requirements. - -The latest version should be available in the coming weeks via the Red Hat Customer portal and cloud provider marketplaces. You can check the pricing for Linux platforms on the [official site][5] if you’re new. - -Of course, you can also get free access to it for some systems to test through the [Red Hat Developer programs][6]. - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/rhel-9-release/ - -作者:[Ankush Das][a] -选题:[lkxed][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/lkxed -[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/rhel-9-0.jpg -[2]: https://itsfoss.com/centos-stream-faq/ -[3]: https://www.redhat.com/en/about/press-releases/red-hat-defines-new-epicenter-innovation-red-hat-enterprise-linux-9 -[4]: https://www.redhat.com/en/blog/whats-new-rhel-90-beta -[5]: https://www.redhat.com/en/store/linux-platforms -[6]: https://developers.redhat.com/products/rhel/overview diff --git a/sources/news/20220531 Rocket.Chat is Switching to Matrix to Enable Cross-App Messaging.md b/sources/news/20220531 Rocket.Chat is Switching to Matrix to Enable Cross-App Messaging.md new file mode 100644 index 0000000000..8e6dbfde37 --- /dev/null +++ b/sources/news/20220531 Rocket.Chat is Switching to Matrix to Enable Cross-App Messaging.md @@ -0,0 +1,81 @@ +[#]: subject: "Rocket.Chat is Switching to Matrix to Enable Cross-App Messaging" +[#]: via: "https://news.itsfoss.com/rocket-chat-matrix/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Rocket.Chat is Switching to Matrix to Enable Cross-App Messaging +====== +Rocket.Chat is embracing the Matrix protocol to enable decentralized communication for the platform. That’s a huge change, isn’t it? + +![rocket chat matrix][1] + +Rocket.Chat is an excellent open-source messaging (collaboration) platform. + +In fact, it is one of the [best open-source Slack alternatives][2] available. We use it as well for internal communication. + +Rocket.Chat is also making good progress compared to some of its open-source competitors. For instance, they [teamed up with Nextcloud to provide an alternative to Office 365][3]. + +And recently announced a switch to Matrix protocol to introduce federation capabilities that allow its users to communicate with users on other platforms. In other words, [Rocket.Chat][4] will be utilizing a decentralized network for communication with the Matrix integration. + +As a Rocket.Chat user; you can talk to users on any other app using the Matrix protocol. + +### Rocket.Chat is Switching to a Decentralized Protocol to Enhance Collaboration + +![][5] + +Matrix protocol is a fantastic choice to enable an interoperable federation. Now, with Rocket.Chat onboard; the decentralized network should be stronger than ever. + +Not to forget, we already have [Element][6], and [Gitter][7], as some of the platforms that already utilize Matrix. So, Rocket.Chat joining the network sounds exciting! + +The [official announcement][8] further explains the collaboration: + +> The Rocket.Chat adoption of Matrix makes it simple for organizations to easily connect with external parties, whether they’re using Rocket.Chat or any other Matrix compatible platform. This initiative is another step forward on Rocket.Chat’s journey to let every conversation flow without compromise and enable full interoperability with its ecosystem. + +The new change with the Matrix network is already available in the latest [alpha release for Rocket.Chat 4.7.0][9]. Unless you want to experiment with it, you should wait for the stable release to introduce the Matrix network support. + +**Aron Ogle** (*Core Developer at Rocket.Chat*) has put together a [guide][10] and a video to help you out if you want to explore the technical details of Rocket.Chat integration with the Matrix. Here’s the video for it: + +![Setting up Rocket Chat to talk with Matrix][11] + +### Is This a Good Move? + +While decentralized tech hasn’t taken the internet by storm, it is promising and makes more sense with its reliability and decentralized capabilities. Matrix protocol has been getting all the praise for a couple of years now, and it seems to be heading in the right direction. + +As of now, most of the big platforms rely on centralized infrastructure to make things work. + +And, with the current implementations, cross-communication is not possible with most of the chat applications. + +So, Rocket.Chat will be making a difference by offering cross-app interactions, like the ability to chat with an Element user on **matrix.org,** as shown in the image above. + +Rocket.Chat entering the scene with Matrix protocol could open up the potential for its competitors or other services to give a second thought to solutions like Matrix protocol. + +*What do you think about Rocket.Chat adopting the Matrix protocol? Share your thoughts in the comments section below.* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/rocket-chat-matrix/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/rocketchat-matrix-protocol.jpg +[2]: https://itsfoss.com/open-source-slack-alternative/ +[3]: https://news.itsfoss.com/rocket-chat-nextcloud-collaboration/ +[4]: https://itsfoss.com/rocket-chat/ +[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/rocket-chat-matrix.jpg +[6]: https://itsfoss.com/element/ +[7]: https://itsfoss.com/gitter/ +[8]: https://rocket.chat/press-releases/rocket-chat-leverages-matrix-protocol-for-decentralized-and-interoperable-communications +[9]: https://github.com/RocketChat/Rocket.Chat/releases/tag/4.7.0 +[10]: https://geekgonecrazy.com/2022/05/30/rocketchat-and-the-matrix-protocol/ +[11]: https://youtu.be/oQhIH8kql9I diff --git a/sources/news/20220601 Google Makes Data Centre Scale Encryption Open Source.md b/sources/news/20220601 Google Makes Data Centre Scale Encryption Open Source.md new file mode 100644 index 0000000000..beb885cdd7 --- /dev/null +++ b/sources/news/20220601 Google Makes Data Centre Scale Encryption Open Source.md @@ -0,0 +1,37 @@ +[#]: subject: "Google Makes Data Centre Scale Encryption Open Source" +[#]: via: "https://www.opensourceforu.com/2022/06/google-makes-data-centre-scale-encryption-open-source/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Google Makes Data Centre Scale Encryption Open Source +====== +![google-ranking-factors][1] + +Google has made open source an encryption scheme it developed to protect traffic between its data centres. PSP, which stands for PSP Security Protocol, was created to relieve Google’s processors of the growing burden of software-based encryption, according to the company. PSP has been hailed as a success in the company’s own environment, and the company has stated that it is “making PSP open source to encourage broader adoption by the community and hardware implementation by additional NIC [network interface card] vendors.”  PSP offloads encryption to NICs, which was previously possible with existing encryption schemes, but not at the scale or with the traffic coverage required by Google. + +“At Google’s scale,” the company wrote when announcing its decision, “the cryptographic offload must support millions of live transmission control protocol (TCP) connections and sustain 100,000 new connections per second at peak.” + +Existing security protocols, according to Google Cloud’s Amin Vahdat and Soheil Hassas Yeganeh, had flaws. “While TLS meets our security requirements, it is not an offload-friendly solution because of the tight coupling between the connection state in the kernel and the offload state in hardware. TLS also does not support non-TCP transport protocols, such as UDP”, they stated. + +However, the IPSec protocol cannot be offloaded to hardware at the required scale. “IPSec … cannot economically support our scale partly because they store the full encryption state in an associative hardware table with modest update rates,” the post explains. + +Google added a custom header and trailer to standard User Datagram Protocol (UDP) encapsulation to create PSP. PSP is currently implemented in three ways: one for Google’s Andromeda Linux virtualisation kernel, one for its Snap networking system, and an application-layer version, SoftPSP, created so Google Cloud customers could use PSP on computers with traditional NICs. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/google-makes-data-centre-scale-encryption-open-source/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/google-ranking-factors-e1654074528236.jpg diff --git a/sources/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md b/sources/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md new file mode 100644 index 0000000000..7e41d5cefa --- /dev/null +++ b/sources/news/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md @@ -0,0 +1,72 @@ +[#]: subject: "Linux Mint to Maintain Timeshift Backup Tool as an XApp" +[#]: via: "https://news.itsfoss.com/linux-mint-timeshift/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Linux Mint to Maintain Timeshift Backup Tool as an XApp +====== +Linux Mint takes over the development of ‘Timeshift’ backup/restore tool. You can now find it in its new GitHub repository. + +![linux mint][1] + +Timeshift is arguably the [best tool to back up and restore the Linux system][2]. + +Linux Mint also utilizes the tool to let users easily take snapshots before updates, and ensure hassle-free operation. + +Of course, that’s not the only thing that makes [Linux Mint potentially better than Ubuntu][3]. + +Unfortunately, the developer ([Tony George][4]) behind Timeshift can no longer maintain the project. The developer plans to focus on other projects instead. + +The Linux Mint team reached out to the developer to help the project in any capacity. And, they finalized to take over the development of Timeshift. + +So, now, the Linux Mint team will be responsible for new releases/fixes, and any development activity associated with Timeshift. + +### Adopting Timeshift as an XApp + +![][5] + +Linux Mint tends to maintain certain applications as an “XApp” to make sure that they work on various desktop environments and are not dependent on a particular desktop. + +Considering that they plan to adopt Timeshift as an XApp, you can expect the tool to continue offering the current look/functionality for a long time, irrespective of your desktop environment. + +Unlike some GNOME apps, which are usually turning into GNOME-only applications for the best experience. + +Timeshift is an essential backup/restore tool. So, Linux Mint taking over the development and maintaining it as an XApp sounds perfect! + +The translations for Timeshift are now done on [Launchpad][6], if you are curious. + +The [new GitHub repository][7] (forked by Linux Mint) can give you more details about the application and its latest development activity. + +You can also check out the official announcement for this in the [recent monthly blog post][8]. + +### Wrapping Up + +With Linux Mint as the maintainer of Timeshift, we could hope for more feature additions and improvements in the near future. + +What do you think about Linux Mint taking over the development of Timeshift as an XApp? You are welcome to share your thoughts on it in the comments below. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-mint-timeshift/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/linux-mint-time-shift.jpg +[2]: https://itsfoss.com/backup-restore-linux-timeshift/ +[3]: https://itsfoss.com/linux-mint-vs-ubuntu/ +[4]: https://teejeetech.com/ +[5]: https://news.itsfoss.com/wp-content/uploads/2022/06/timeshiftlinux-mint.png +[6]: https://github.com/linuxmint/timeshift +[7]: https://github.com/linuxmint/timeshift +[8]: https://blog.linuxmint.com/?p=4323 diff --git a/sources/news/20220603 Spotify Introduces an Open-Source Tool to Fix a Big Problem for Modern Musicians.md b/sources/news/20220603 Spotify Introduces an Open-Source Tool to Fix a Big Problem for Modern Musicians.md new file mode 100644 index 0000000000..782197f1a9 --- /dev/null +++ b/sources/news/20220603 Spotify Introduces an Open-Source Tool to Fix a Big Problem for Modern Musicians.md @@ -0,0 +1,85 @@ +[#]: subject: "Spotify Introduces an Open-Source Tool to Fix a Big Problem for Modern Musicians" +[#]: via: "https://news.itsfoss.com/spotify-basic-pitch/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Spotify Introduces an Open-Source Tool to Fix a Big Problem for Modern Musicians +====== +Spotify’s new open-source tool helps you convert audio to MIDI version. Explore why it is a big deal for modern musicians. + +![spotify][1] + +Spotify is a leading music streaming platform with several open-source projects. + +While most of the projects/tools are built for niche users, they have finally introduced something that seems enticing to all the modern musicians involved with digital music production. + +‘Basic Pitch’ is a new free and open-source tool by Spotify that lets you convert any audio file to its MIDI (Musical Instrument Digital Interface) version. + +In case you did not know, with MIDI notes, you can easily tweak what’s being played and analyze more to help you in digital music production. + +### Basic Pitch: Making Things Easier + +With Basic Pitch, one can easily have MIDI notes of an audio file they have always wanted, and with better accuracy. + +![spotify basic pitch][2] + +Spotify explains that it is better than existing note-detection systems by offering some advantages that include: + +> **Polyphonic + instrument-agnostic:** Unlike most other note-detection algorithms, Basic Pitch can track multiple notes at a time and across various instruments, including piano, guitar, and ocarina. Many systems limit users to only monophonic output (one note at a time, like a single vocal melody), or are built for only one kind of instrument. + +> **Pitch bend detection:** Instruments, like guitar or the human voice, allow for more expressiveness through pitch-bending: vibrato, glissando, bends, slides, etc. However, this valuable information is often lost when turning audio into MIDI. Basic Pitch supports this right out of the box. + +> **Speed:** Basic Pitch is light on resources, and is able to run faster than real time on most modern computers ([Bittner et al. 2022][3]). + +Basic Pitch uses a machine learning model that turns various instrumental performances into MIDI. The audio file may also contain your voice, but it should still be able to convert the instrument to its MIDI version. + +![Basic Pitch demo: Convert audio into MIDI using ML][4] + +I tried converting an MP3 karaoke file with a single instrument to get the MIDI notes, and it seemed to work pretty well. + +The tool also lets you process more than one audio file at a time and offers a few parameter controls that include note segmentation, confidence threshold, minimum/maximum pitch, and note length. + +### Made for Creators and Researchers + +Spotify mentions that it targets the creators primarily, but they are also interested to learn how machine learning researchers build upon it and help develop better solutions using the [open-source project on GitHub][5]. + +As a creator/musician, you can access the open-source tool on its [official website][6] for a demo. The parameters can be adjusted using the website, and you can also download the MIDI file from there. + +[Basic Pitch][7] + +![spotify basic pitch][8] + +It is also available via [PyPI][9] to install and use via the command-line interface on Linux, Windows, and macOS. + +You can explore its [GitHub page][10] to know more about its usage/commands. + +If you are curious, the [official announcement post][11] provides more technical comparisons and explanations regarding the development of the tool. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/spotify-basic-pitch/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/spotify-midi.jpg +[2]: https://news.itsfoss.com/wp-content/uploads/2022/06/spotify-basic-pitch-1024x531.png +[3]: https://ieeexplore.ieee.org/document/9746549 +[4]: https://youtu.be/DhlvfgS73ZQ?list=PLf1KFlSkDLIAYLdb-SD9s8TdGy0rWIwVr +[5]: https://github.com/spotify/basic-pitch +[6]: https://basicpitch.spotify.com/ +[7]: https://basicpitch.spotify.com/ +[8]: https://news.itsfoss.com/wp-content/uploads/2022/06/basic-pitch-parameters.jpg +[9]: https://pypi.org/ +[10]: https://github.com/spotify/basic-pitch +[11]: https://engineering.atspotify.com/2022/06/meet-basic-pitch/ diff --git a/sources/talk/20190131 OOP Before OOP with Simula.md b/sources/talk/20190131 OOP Before OOP with Simula.md deleted file mode 100644 index 5af32716d9..0000000000 --- a/sources/talk/20190131 OOP Before OOP with Simula.md +++ /dev/null @@ -1,231 +0,0 @@ -[#]: 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: "aREversez" -[#]: 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] -译者:[aREversez](https://github.com/aREversez) -校对:[校对者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 diff --git a/sources/talk/20190331 Codecademy vs. The BBC Micro.md b/sources/talk/20190331 Codecademy vs. The BBC Micro.md index 2bd822cd18..bb5ee313c8 100644 --- a/sources/talk/20190331 Codecademy vs. The BBC Micro.md +++ b/sources/talk/20190331 Codecademy vs. The BBC Micro.md @@ -2,7 +2,7 @@ [#]: via: "https://twobithistory.org/2019/03/31/bbc-micro.html" [#]: author: "Two-Bit History https://twobithistory.org" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "yesimmia" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " diff --git a/sources/talk/20220508 How open source leads the way for sustainable technology.md b/sources/talk/20220508 How open source leads the way for sustainable technology.md deleted file mode 100644 index 68d000efa9..0000000000 --- a/sources/talk/20220508 How open source leads the way for sustainable technology.md +++ /dev/null @@ -1,84 +0,0 @@ -[#]: subject: "How open source leads the way for sustainable technology" -[#]: via: "https://opensource.com/article/22/5/open-source-sustainable-technology" -[#]: author: "Hannah Smith https://opensource.com/users/hanopcan" -[#]: collector: "lkxed" -[#]: translator: "PeterPan0106" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How open source leads the way for sustainable technology -====== -There are huge parallels between the open source way and what our wider society needs to do to achieve a more sustainable future. - -![][1] -(Image by: opensource.com) - -There's a palpable change in the air regarding sustainability and environmental issues. Concern for the condition of the planet and efforts to do something about it have gone mainstream. To take one example, look at climate-based venture capitalism. The Climate Tech Venture Capital (CTVC) Climate Capital List has [more than doubled][2] in the past two years. The amount of capital pouring in demonstrates a desire and a willingness to solve hard climate challenges. - -It's great that people want to take action, and I'm here for it! But I also see a real risk: As people rush to take action or jump on the bandwagon, they may unwittingly participate in greenwashing. - -The Wikipedia definition of greenwashing calls it "a form of marketing spin in which green PR and green marketing are deceptively used to persuade the public that an organization's products, aims, and policies are environmentally friendly." In my view, greenwashing happens both intentionally and accidentally. There are a lot of good people out there who want to make a difference but don't yet know much about complex environmental systems or the depth of issues around sustainability. - -It's easy to fall into the trap of thinking a simple purchase like offsetting travel or datacenter emissions by planting trees will make something greener. While these efforts are welcome, and planting trees is a viable solution to improving sustainability, they are only a good first step—a scratch on the surface of what needs to happen to make a real difference. - -So what can a person, or a community, do to make digital technology genuinely more sustainable? - -Sustainability has different meanings to different people. The shortest definition that I like is from the 1987 Bruntland Report, which summarizes it as "meeting the needs of the present without compromising the ability of future generations to meet their needs." Sustainability at its core is prioritizing long-term thinking. - -### Sustainability is more than environmental preservation - -There are three key interconnected pillars in the definition of sustainability: - -1. Environmental -2. Economic / governance -3. Social - -Conversations about sustainability are increasingly dominated by the climate crisis—for good reason. The need to reduce the amount of carbon emissions emitted by the richer countries in the world becomes increasingly urgent as we continue to pass irreversible ecological tipping points. But true sustainability is a much more comprehensive set of considerations, as demonstrated by the three pillars. - -Carbon emissions are most certainly a part of sustainability. Many people consider emissions only an environmental issue: Just take more carbon out of the air, and everything will be ok. But social issues are just as much a part of sustainability. Who is affected by these carbon emissions? Who stands to bear the greatest impact from changes to our climate? Who has lost their land due to rising sea levels or a reliable water source due to changing weather patterns? That's why you might have heard the phrase "climate justice is social justice." - -Thinking only about decarbonization as sustainability can give you carbon tunnel vision. I often think that climate change is a symptom of society getting sustainability wrong on a wider scale. Instead, it is critical to address the root causes that brought about climate change in the first place. Tackling these will make it possible to fix the problems in the long term, while a short-term fix may only push the issue onto another vulnerable community. - -The root causes are complex. But if I follow them back to their source, I see that the root causes are driven by dominant Western values and the systems designed to perpetuate those values. And what are those values? For the most part, they are short-term growth and the extraction of profit above all else. - -That is why conversations about sustainability that don't include social issues or how economies are designed won't reach true solutions. After all, societies, and the people in positions of power, determine what their own values are—or aren't. - -### What can you or I do? - -Many in the tech sector are currently grappling with these issues and want to know how to take meaningful action. One common approach is looking at how to optimize the tech they build so that it uses electricity more effectively. Sixty percent of the world's electricity is still generated by burning fossil fuels, despite the increasing capacity for renewable energy generation. Logically, using less electricity means generating fewer carbon emissions. - -And yes, that is a meaningful action that anyone can take right now, today. Optimizing the assets sent when someone loads a page to send less data will use less energy. So will optimizing servers to run at different times of the day, for example when there are more renewables online, or deleting old stores of redundant information, such as analytics data or logs. - -But consider Jevon's paradox: Making something more efficient often leads to using more of it, not less. When it is easier and more accessible for people to use something, they end up consuming more. In some ways, that is good. Better performing tech is a good thing that helps increase inclusion and accessibility, and that's good for society. But long-term solutions for climate change and sustainability require deeper, more uncomfortable conversations around the relationship between society and technology. What and who is all this technology serving? What behaviors and practices is it accelerating? - -It's common to view advancing technology as progress, and some people repeat the mantra that technology will save the world from climate change. A few bright folks will do the hard work, so no one else has to change their ways. The problem is that many communities and ecosystems are already suffering. - -For example, the accelerating quest for more data is causing some communities in Chile to have insufficient water to grow their crops. Instead, datacenters are using it. Seventy percent of the pollution caused by mobile phones comes from their manufacture. The raw resources such as lithium and cobalt to make and power mobile devices are usually extracted from a community that has little power to stop the destruction of their land and that certainly does not partake in the profit made. Still, the practice of upgrading your phone every two years has become commonplace. - -### Open source leading the way for sustainability - -It's time to view the use of digital technology as a precious resource with consequences to both the planet and (often already disadvantaged) communities. - -The open source community is already a leading light in helping people to realize there is another way: the open source way. There are huge parallels between the open source way and what our wider society needs to do to achieve a more sustainable future. Being more open and inclusive is a key part of that. - -We also need a mindset shift at all levels of society that views digital technology as having growth limits and not as the abundantly cheap and free thing we see today. We need to wisely prioritize its application in society to the things that matter. And above all else, we need to visualize and eradicate the harms from its creation and continued use and share the wealth that is does create equitably with everyone in society, whether they are users of digital tech or not. These things aren’t going to happen overnight, but they are things we can come together to push towards so that we all enjoy the benefits of digital technology for the long-term, sustainably. - -This article is based on a longer presentation. To see the talk in full or view the slides, see the post ["How can we make digital technology more sustainable."][3] - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/5/open-source-sustainable-technology - -作者:[Hannah Smith][a] -选题:[lkxed][b] -译者:[PeterPan0106](https://github.com/PeterPan0106) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/hanopcan -[b]: https://github.com/lkxed -[1]: https://opensource.com/sites/default/files/pictures/green-780x400.jpg -[2]: https://climatetechvc.substack.com/p/-a-running-list-of-climate-tech-vcs?s=w -[3]: https://opcan.co.uk/talk/wordfest-live-2022 diff --git a/sources/talk/20220513 When open source meets academic publishing- Platinum open access journals.md b/sources/talk/20220513 When open source meets academic publishing- Platinum open access journals.md new file mode 100644 index 0000000000..91c7df4d12 --- /dev/null +++ b/sources/talk/20220513 When open source meets academic publishing- Platinum open access journals.md @@ -0,0 +1,77 @@ +[#]: subject: "When open source meets academic publishing: Platinum open access journals" +[#]: via: "https://opensource.com/article/22/5/platinum-open-access-academic-journals" +[#]: author: "Joshua Pearce https://opensource.com/users/jmpearce" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +When open source meets academic publishing: Platinum open access journals +====== +Academics can now publish free, read free, and still stay on track for professional success. + +![Stack of books for reading][1] +Image by: Opensource.com + +Academics routinely give away their work to companies for free—and then they buy it back! Can you imagine a farmer giving away free food and then paying to get it back for dinner? Probably not. Yet academics like me have been trapped for decades in a scheme where we give free work in exchange for job security and then pay millions of dollars a year to read our own writing. + +Fortunately, this is changing. The results from a [study][2] I just finished show that it is possible for academics to get job security without paying for it. My study found hundreds of journals that are *platinum open access* (OA)—that is, they require neither the author nor the readers to pay for peer-reviewed work—yet still carry the prestige and readership to help academics succeed in their careers. + +This trend is exploding: The [Directory of Open Access Journals][3] lists over 17,300 journals that offer a means of OA at some level, and over 12,250 have no article-processing charges (APCs). I used a handy open source [Python script][4] to compare this list to a list of journals ranked by the frequency with which their published papers are cited in other articles (The Journal Impact Factor List). It is clear that the last few years have seen a growing trend towards both OA in general and platinum OA specifically. These trends have the potential to accelerate science while helping prevent academic servitude. + +### The academic's dilemma + +Academics are generally pretty intelligent, so why have they engaged in this disadvantageous system for so long? Simply put, academics have been caught in a trap: In order to keep their jobs and get tenure, they need to publish in journals with a high impact factor. An impact factor is a metric based on the mean number of citations to articles published in the last two years in a given journal, as indexed by the proprietary Web of Science. Impact factors are a prestige metric for academics. + +Historically, academic publishing has been dominated by a handful of major publishers that used subscription-based business models. In this model, academic authors write articles, peer-review articles, and often do the editing of these articles—all for free. The articles are published under copyright owned by the major publishing companies. Then either the same academics pay to read these articles on an individual basis (~US $35/article), or their university libraries pay to subscribe to all of the articles in a journal. These costs can be astronomical: often over US $1 million per year for all titles from a single publisher. + +This system is senseless for many obvious reasons. Scientific progress is bogged down by restricting access to copyrighted scientific literature squirreled away behind paywalls. It is hard to do state-of-the-art research if you do not know what it is because you cannot read it. Scientists are divided into those who can afford access to the literature and those who cannot. Academics in the developing world often struggle to pay, but even well-endowed [Harvard University][5] has taken action to rein in its yearly journal expenses. + +Costs to authors are similarly high. APC values range from a few hundred dollars to jaw-dropping thousands of dollars per article. APCs can be particularly damaging for some disciplines that are less well funded, such as the humanities and social sciences (as compared to physical and medical sciences or engineering). Substantial APCs also reinforce the wealth gap in academia, making professional success dependent on having income to invest in publishing. Is there another profession that asks workers to pay money to make products for others? + +### Open access to the rescue! + +This problem can be solved by the OA movement, which advocates for making all academic literature freely accessible to everyone. There is an unmistakable rise in OA publishing: It now makes up nearly a third of the peer-reviewed literature. + +The benefits of OA are twofold. First, OA is a benefit to science overall, because it provides a frictionless means of reading the state of the art for making significant advancements in knowledge. Second, from an individual academic's point of view, OA provides the pragmatic advantage of enabling the broadest possible audience of their writing by making it freely and easily available on the internet. + +Funders have begun to demand OA for these reasons, particularly public funders of science. It is hard to argue that if the public funds research, they should have to pay a second time to read it. + +### Where is academic publishing now, and where it is going? + +Conventional publishers still have control of this situation, largely because of the perception that they have a monopoly on journals with an impact factor. Despite the disadvantages of publishing the traditional way, many academics continue to publish in subscription-based journals or pay high APCs, knowing that publication in high impact factor journals is vital for demonstrating expertise for grants, tenure, and promotion. + +A few years ago, academics simply had no choice: They could either publish in a journal with an impact factor or publish OA. Now they can publish OA and still get the benefits of an impact factor in one of three ways: + +* Green OA: Publish in a traditional way and then self-archive by uploading preprints or accepted versions of papers into an open repository or server. Some schools have an institutional repository for this purpose. For example, Western University has [Scholarship@Western][6], where any of their professors can share their work. Academics without their own institutional repos can use servers like [preprints.org][7], [arXiv][8], or  [OSF preprints][9]. I also use social media for academics, like [Academia][10] or [ResearchGate][11], for self-archiving. This can be complex to navigate because publishers have different rules, and it is somewhat time consuming. +* Gold OA: Publish in a growing list of journals with impact factors that make your paper freely available after publication but require an APC. This method is easy to navigate: Academics publish as usual and OA is built into the publishing process. The drawback is that funds going to APCs may be diverted from research activities. +* Platinum OA: Publish in platinum OA journals with an impact factor. No one pays either to read or to publish. The challenge here is finding a journal in your discipline that fits this criterion, but that continues to change. + +There are tens of thousands of journals, but only a few hundred platinum OA journals with impact factors. This may make it hard for academics to find a good fit between what they study and a journal that matches their interests. See the Appendix in my [study][12] for the list, or use the Python script mentioned above to run updated numbers for yourself. The number of platinum OA journals is growing quickly, so if you do not find something now you may have some solid journals to choose from soon. Happy publishing! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/platinum-open-access-academic-journals + +作者:[Joshua Pearce][a] +选题:[lkxed][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/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/books_read_list_stack_study.png +[2]: https://doi.org/10.3390/knowledge2020013 +[3]: https://doaj.org/ +[4]: https://osf.io/mh4bx/ +[5]: https://www.theguardian.com/science/2012/apr/24/harvard-university-journal-publishers-prices +[6]: https://ir.lib.uwo.ca/ +[7]: https://www.preprints.org/ +[8]: https://arxiv.org/ +[9]: https://osf.io/preprints/ +[10]: https://westernu.academia.edu/JoshuaPearce/Papers +[11]: https://www.researchgate.net/profile/Joshua-Pearce +[12]: https://www.mdpi.com/2673-9585/2/2/13 diff --git a/sources/talk/20220516 5 benefits of switching from Google Analytics to Plausible.md b/sources/talk/20220516 5 benefits of switching from Google Analytics to Plausible.md new file mode 100644 index 0000000000..0612c953ce --- /dev/null +++ b/sources/talk/20220516 5 benefits of switching from Google Analytics to Plausible.md @@ -0,0 +1,109 @@ +[#]: subject: "5 benefits of switching from Google Analytics to Plausible" +[#]: via: "https://opensource.com/article/22/5/plausible-analytics" +[#]: author: "Tom Greenwood https://opensource.com/users/tpgreenwood" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +5 benefits of switching from Google Analytics to Plausible +====== +Plausible is an open source alternative to Google Analytics. + +![The legacy of open source and the tide of progress][1] +Image by: Opensource.com + +Google Analytics (GA) has been the industry standard web analytics tool for about as long as there have been analytics tools. Nearly every brief that my WordPress agency receives specifies that GA must be installed. And there is rarely any debate around whether it's the best tool for the job. + +My team at Wholegrain Digital has had concerns about GA in terms of privacy, General Data Protection Regulation (GDPR) compliance, performance, user experience, not to mention Google as a global advertising, and search monopoly. However, we continued using GA for 99% of our projects because we didn't feel that there was a strong enough alternative. + +Well, that has changed. We've made a decision that GA will no longer be our default analytics tool. Instead, our default analytics tool will be [Plausible][2]. + +In this article, I'll outline why we consider Plausible a better choice as a default analytics solution, the compromises to be aware of, and how it will impact our clients. + +### Why use Plausible instead of Google Analytics + +We believe that using Plausible over GA is not a purely ideological choice. There are in fact a number of tangible benefits that make it an objectively better product in many cases. Let's take a look at some of these benefits. + +#### Privacy + +One of Plausible's headline benefits is that it has been designed as a privacy-first analytics tool. This might sound like an ideological factor, but it has real practical implications too. + +Plausible only collects anonymous user data, and does not use cookies. This means that unlike most analytics solutions, it complies with both the GDPR and the European Cookie Law, so it's a tick in the box for legal compliance. It's also hosted in the EU and the data is owned by you so it doesn't get shared with any other organizations, which is another tick. + +This has a positive knock-on effect for user experience, because without privacy-invading cookies, you don't need to implement a cookie banner on the website (unless you use cookies for other things). Considering that the first few seconds of a website visit are the most critical to brand experience and conversion rates, cookie banners are arguably the single most damaging thing to the success of any online service. Avoiding these banners puts your brand and message first, helps you make a good first impression, and increases conversion rates. + +#### Simpler user interface + +The GA dashboard was never a great case study in intuitive design, but as the functionality of GA has expanded, so too has the complexity of the interface. I'm increasingly hearing frustrations from even experienced web marketers that they sometimes struggle to find basic data inside GA. + +Plausible has taken the opposite approach and focused on ease of use over quantity of features. The dashboard is beautifully designed to showcase the data you want in a way that is easy to find and understand. It's what most people wish GA to be and it's a breath of fresh air. + +![Image of Plausible with a dark theme][3] +Image by: (Tom Greenwood, CC BY-SA 4.0) + +This is not just a pleasantry. The reality is that if a tool is easy to use then you will use it, and if it is hard to use then you won't. The simplicity of the Plausible interface means that even though it has less features, many users are likely to get a lot more insights and value from their analytics. + +#### Better web performance + +The Plausible tracking script is the smallest we are aware of for any analytics service, coming in at less than 1kb compared to 17kb for GA and even more if you're using Google Tag Manager. + +Better web performance improves user experience, helps your website to rank better in search engines and improves conversion rates. Web performance matters, and when it comes to web performance, every kilobyte matters. + +#### Reduced environmental impact + +Plausible's tiny tracking script isn't just good for web performance, it's also good for the environment. At Wholegrain we are world leaders in sustainable web design and understand that every bit of wasted data is also wasted energy and carbon emissions. + +This adds up. As a minimum, switching to Plausible would save 16kb per visitor, so for a website with a modest 10K visitors per month this would be 160MB of data per month, or 2GB per year. A back of an envelope calculation using the latest methodology that we have developed for website carbon calculations put this at about the equivalent of 800 grams of CO2. Now multiply that up by the millions of websites running worldwide and you are talking about significant amounts of wasted energy and unnecessary carbon emissions. + +But it doesn't stop there. Analytics tools consume energy on the end user's device as they harvest data, in the transmission networks as they send that data back to the data center, and in the data center to store it all for eternity. By tracking less, Plausible is using less energy in its operation than bloated analytics tools such as GA that are tracking many more metrics that most people don't need. + +Plausible also hosts the data in data centers with a commitment to using renewable sources of electricity, which is great (though to be fair Google also does that), and they donate 5% of their revenue to good causes, so the money you are paying is also helping support environmental and social projects. + +#### More accurate data + +Finally, Plausible breaks one of the greatest myths about GA, which is that it is accurate. Plausible's own research and our own experiences with client websites show that GA can significantly under report data, sometimes by as much as 50-60%. + +When you look at GA and you think you are looking at all of your website data, you are most likely only looking at a portion of it. This is because GA is more likely to be blocked by ad blockers and privacy friendly web browsers, but perhaps more significantly because GA should not be tracking your visitors unless they have accepted cookies, which many visitors do not. + +Plausible therefore offers us a simple way to get a more complete and accurate view of website visitors. Needless to say, if you are a digital marketing manager and you want to make yourself look good, you want to use the analytics service that reports all of your visitors and not just some of them. + +### Are there any downsides? + +There are very few downsides to using Plausible. If you are a GA power user and genuinely need a lot of its more advanced functionality then Plausible is not going to meet all of your needs. Plausible can track events, conversions, and campaigns but if you need more than that then you'll need another tool. + +The only other notable downside to Plausible is that it is not free. There is a monthly fee but it is very reasonable, starting at $6 per month. It's a small price to pay for such a good tool, to protect the privacy of your website visitors and to maintain ownership of your data. + +### What are the impacts? + +Here at Wholegrain Digital we are implementing Plausible in a way that we hope will offer many of our clients the benefits listed above without the downsides. Nobody will be forced to stop using GA, but we will be talking about the benefits of Plausible proactively with our clients and including it in our proposals as the default option. + +In many cases, Plausible is not just capable of meeting a project's requirements, but is objectively a better solution than GA, so we'll be trying to help our clients to reap the benefits of this. + +In cases where advanced GA features are required, we will of course stick with GA for now. And in some cases, we may run GA and Plausible in parallel. This has a small overhead in terms of carbon footprint and performance, so it isn't our first choice. However, in some cases it may provide a necessary bridge to help our clients gain confidence in Plausible before making the leap, or help them gain a complete data set while ensuring compliance with privacy laws. + +As for the costs, Plausible is a very good value for what it offers, but we will be offering it free of charge to our clients for any websites cared for on our WordPress maintenance service. We hope that this will help lower the barrier to entry and help more of our clients and their website visitors gain the benefits of Plausible. + +### It is Plausible! + +I hope I've convinced you that Plausible is not just a viable but a really great alternative to GA. If you need any advice on how to figure out the best analytics solution for your website or how to ensure that you are GDPR compliant without compromising user experience, get in touch with me. + +*This article originally appeared on the Wholegrain Digital blog and has been republished with permission.* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/plausible-analytics + +作者:[Tom Greenwood][a] +选题:[lkxed][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/tpgreenwood +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/LIFE_wavegraph.png +[2]: https://plausible.io +[3]: https://opensource.com/sites/default/files/2022-05/Plausible-%C2%B7-websitecarbon-com.jpg diff --git a/sources/talk/20220519 Near zero marginal cost societies and the impact on why we work.md b/sources/talk/20220519 Near zero marginal cost societies and the impact on why we work.md new file mode 100644 index 0000000000..5930ee1ea4 --- /dev/null +++ b/sources/talk/20220519 Near zero marginal cost societies and the impact on why we work.md @@ -0,0 +1,177 @@ +[#]: subject: "Near zero marginal cost societies and the impact on why we work" +[#]: via: "https://opensource.com/open-organization/22/5/near-zero-marginal-cost-societies-and-impact-why-we-work" +[#]: author: "Ron McFarland https://opensource.com/users/ron-mcfarland" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Near zero marginal cost societies and the impact on why we work +====== +As the IoT becomes our working and living environment, energy costs will come closer to zero and community collaboration will be critical. + +![A network of people][1] +Image by: Opensource.com + +I have read Jeremy Rifkin's book [The Zero Marginal Cost Society: The Internet of Things, the Collaborative Commons, and the Eclipse of Capitalism][2], which has a strong connection to open organization principles, particularly community building. Rifkin also writes about the future of green energy generation and energy use in logistics. This is the second of three articles in this series. In my previous article, I examined the Collaborative Commons. In this article, I look at its impact on energy production and supply. + +Within the next 25 years, Rifkin believes most of our energy for home heating, running appliances, powering businesses, driving vehicles, and operating the whole economy will be nearly free with on-site power solar, wind and geothermal energy generation. This is starting already, through both individual and micropower plants. The payback is around two to eight years. + +What would be the best organizational structure to manage nearly free green energy? Furthermore, through an intelligent communication and energy system, an organization could generate business anywhere in the world, and share energy across a continental energy internet. On top of that, it could produce and sell goods at a fraction charged by global manufacturing giants. + +### The Internet of Things is on the way + +According to Rifkin, the Internet of Things (IoT) will connect every machine, business, residence, and vehicle in an intelligent network that consists of not just a communications internet like now, but in the future an energy internet, and a logistics internet. They will all be embedded in a single operating system. Energy use will be completely monitored. Rifkin believes that within 10 years, many smart energy meters will be in use (by 2025). All this investment will reduce at least 10% of the waste in the current industrial system. + +All this will be possible with the reduction of costs of sensors and actuators embedded in devices. Radio-frequency identification (RFID) chip prices have fallen by 40% in around 2012-2013. Micro-electromechanical system (MEMS), including gyroscopes, accelerometers, and pressure sensors, have also dropped by 80-90% in price over the past five years (up to 2015 when this book was published). + +This will increase device connections, to as many as 1,000 connections on one person's devices, appliances, and facilities. This connection is what young people love, total inclusion in a global virtual public square to share everything. They thrive on transparency, collaboration, and inclusivity with care taken to an appropriate level of privacy. So, you can see, the time is right for the growth of a Collaborative Commons in society. + +### Exponential curve + +Question: Would you accept US $1,000,000 today or US $1.00 that doubled every day for 30 days? (In 30 days it will be US $536,870,912. That is 500 times more). In 31 days, over one billion. Exponential growth is deceptively fast. That is how fast costs are coming down according to Rifkin. This will turn the entire fossil fuel industry investments into stranded assets. We should be planning for the Collaborative Commons using all open organization principles now, as the situation will be ideal for them very soon. + +### Next, a free energy internet + +At this point in time there is free information for learning if you look for it. The next step is free energy (solar, wind, geothermal, biomass, hydro). After initial investments (research, development, deployment), Rifkin forecasts that unit costs will rapidly come down. The information internet and near zero-cost renewables will merge into the energy internet, powering homes, offices, and factories. Ideally, there will be energy that's loaded into buildings and partially stored in the form of hydrogen, distributed over a green-electricity internet, and connected to plug-in, zero-emission transportation. The development of renewable energy establishes a five pillar mechanism that will allow billions of people to share energy at near zero marginal cost in the IoT world + +### Solar energy + +If you start collecting energy from the sun, facilities only need to obtain 00.1% of the sun's energy that reaches the Earth. That would provide six times the energy we now use globally. + +[SunPower Corporation][3] is one company doing that. It supports making homes energy producers. The price of solar photovoltaic (PV) cells tends to drop by 20% for every doubling of industry capacity. Solar panels are increasing, and their ability to capture more energy per panel is increasing. Expect to see the development of thinner solar panels, and paper thin solar sheets. Eventually there will be solar energy paint and solar energy windows in the future. + +When too much energy is generated, it must be sold elsewhere or stored in batteries or used to produce hydrogen. This technology is coming to the market and will dominate it very soon. With these technologies alone, electricity is on the way to have zero marginal cost. + +### Wind power generation + +Wind power has been growing exponentially since the 1990s, and is now nearing fossil fuel and nuclear power generation levels (as of 2015). With the lowering costs of windmill production, installation, and maintenance, wind power is doubling every 2-½ years. With the increase of solar and wind energy sources, governments do not need to subsidize them with tariffs any longer. + +[Energy Watch Group][4] is tracking this. According to Rifkin geothermal energy, biomass, and wave and tidal power will likely reach their own exponential takeoff stage within the next decade. He believes that all this will happen in the first half of the twenty-first century. If this capacity doubles eight more times, by 2028, 80% of all energy generation will be from these renewables. + +### The collaborative age will soon be here + +With all the above developments, society's working and living environment are changing. According to the [collaborative age][5]: "This means ensuring that people can collaborate on tasks without friction. That humans and machines work seamlessly together. And automation — machine to machine collaboration — will be crucial. Those businesses that get these elements right will be able to boost employee satisfaction and attract the best talent. They will reduce costs by automating mundane tasks and by requiring a smaller office footprint. The social impact-focused organizations that [Laura Hilliger][6] and [Heather Leson][7] write about how to take advantage of this new age. + +### Making the transition + +It sounds good, but how do businesses transition from the information age to the collaboration age? One area will be in decentralized production through 3D printing technology ([additive manufacturing][8], not cutting away and creating waste). + +Instead of shipping goods, in the future, software will be shipped for many items to be manufactured locally, avoiding all shipping costs and making manufacturing become on-site near where the market need is. Locally, newly developed molten plastics, molten metal, or other feedstock inside a printer will be used for fabrication. This will give one 3D printer the ability to produce tens of thousands of products (like jewelry, airplane parts, and human prostheses). + +### Centralized manufacturing vs local production which Rifkin projects will come + +Rifkin believes lower marketing costs are possible by using the IoT economy and using global internet marketing sites at almost zero marginal cost. + +1. There is little human involvement in the local 3D process (giving the name "infofacture" rather than manufacture. They ship the information required for local manufacturing, like downloading music today. It is just code that you receive. +2. The code for 3D printing is open source, so people can learn and improve designs, becoming further prosumers in a wide range of items (no intellectual-property protection barriers). This will lead to exponential growth over the next several decades, offering more complicated products at lower prices and near zero marginal cost. +3. There is great waste with subtraction processes (current manufacturing processes) producing great waste with each process. (1/10 the materials required. This material could be developed from subatomic particles that are available anywhere in the local environment, like recycled glass, fabrics, ceramics, and stainless steel. Composite-fiber concrete could be extruded form-free and be strong enough for building construction walls [probably available in two decades].) +4. 3D printing processes have fewer moving parts and less spare parts. Therefore, expensive retooling and changeover delays will be less extensive. +5. Materials will be more durable, recyclable, and less polluting. +6. Local distributed production, through IoT, will spread globally at an exponential rate with little shipping cost and less use of energy. + +Rifkin cites Etsy as an example of this model. You can find things you are interested in, and have them produced locally using their network. They sell the code, and you can have it supplied in your area. + +Rifkin feels that in the future, small and medium sized 3D businesses, infofacturing more sophisticated products, will likely cluster in local technology parks to establish an optimum lateral scale (another form of community development). Here are current examples: + +1. [RepRap][9]: This is a manufacturing machine that can produce itself and all its parts. +2. [Thingiverse][10] The largest 3D printing community. They share under the General Public Licenses (GPL) and Creative Commons Licenses. +3. Fab Lab: Open source peer-to-peer learning in manufacturing. It is being provided to local, distant communities in developing countries. +4. 3D Printed automobiles ([Urbee vehicle][11]) is already being tested. +5. [KOR EcoLogic][12] has an urban electric vehicle. + +### The makers' movement principles + +Here are the principles that these ecosystems follow: + +1. They use open source shared software. +2. They promote a collaborative learning culture. +3. They believe that it will build a self-sufficient community. +4. They are committed to sustainable production practices. + +### The future of work and collaborative commons + +When technology replaces workers, capital investments replace labor investments. In 2007, companies used 6 times more computers and software than 20 years before, doubling the amount of capital used per hour of employee work. The robot workforce is on the rise. China, India, Mexico, and other emerging nations are learning that the cheapest workers in the world are not as cheap, efficient, or productive as the information technology, robotics, and artificial intelligence that replaces them. + +Going back to Rifkin, the first industrial revolution ended slave and serf labor. The second industrial revolution will dramatically shrink agricultural and craft labor. Rifkin believes the third industrial revolution will be a decline in mass wage labor in the manufacturing, service industries, and salaried professional labor in large parts of the knowledge sector. + +Rifkin believes that an abundance, zero marginal cost economy, will change our notion of economic processes. He thinks the old paradigm of owners and workers, sellers and consumers will break down. Consumers will start producing for themselves (and a few others), eliminating their distinction. Prosumers will increasingly be able to produce, consume, and share their own goods and services with one another on the Collaborative Commons at diminishing marginal costs approaching zero, bringing to the fore new ways of organizing economic life beyond the traditional capitalist market mode. + +Rifkin forecasts that in the future, greater importance will be placed on the Collaborative Commons and be as important as hard work was in the market economy (one's ability to cooperate and collaborate as opposed to just working hard). The amassing of social capital will become as valued as the accumulation of market capital. Attachment to community and the search for transcendence and meaning comes to define the measure of one's material wealth. All the [open organization principles][13] we write about will be exponentially more important in the future. + +The IoT will free human beings from the capitalist market economy to pursue nonmaterial shared interests on the collaborative commons. Many — but not all — of our basic material needs will be met for nearly free in a near zero marginal cost society. It will be abundance over scarcity. + +### Prosumer and the entry of the smart economy + +Rifkin writes that as capitalist economies step aside in some global commodities, in the collaborative commons, sellers and buyers will give way to prosumers, property rights will make room for open source sharing, ownership will be less important than access, markets will be superseded by networks, and the marginal cost of supplying information, generating energy, manufacturing products, and teaching students will become nearly zero. + +### Internet of energy is on the way + +Financing of the IoT will not come from wealthy capitalists and corporate shareholders, but from hundreds of millions of consumers and taxpayers. No one owns the internet. It is only in operation because a set of agreed-upon protocols were established that allows computer networks to communicate with each other. It is a virtual public square for all who pay for a connection to use it. Next comes distributed renewable energies that will be distributed in the same way. Supported by feed-in tariffs and other fund-raising methods, governments will pay for the initial research, but after that fixed investment, the public will be able to connect and use it freely. Once underway, governmental centralized operations will move to distributed ownership. The [Electric Power Research Institute][14] (EPRI), is studying how to build a national energy internet over the next 20 years. + +This is not just supplying electricity. Every device in every building will be equipped with sensors and software that connect to the IoT, feeding real-time information on electricity use to both the on-site prosumer and the rest of the network. The entire network will know how much electricity is being used by every appliance at any moment — thermostats, washing machines, dishwashers, televisions, hair dryers, toasters, ovens, and refrigerators. + +This is not happening in the future, but now. It is not just being considered but being done now. [Intwine Energy][15] can supply the above process now. The issue is getting it into the greater global population. A group of young [social entrepreneurs][16] are now using social media to mobilize their peers to create, operate and use the energy internet. + +### A new world of abundance beyond our needs + +Rifkin thinks society has to start envisioning an entire different living environment. Imagine a world in which you can just give away things you once had to pay for, or had to sell at a profit. No one charges us for each internet connected phone call. He believes these give-away goods need not be covered by governments, like telecommunication, roads, bridges, public schools or hospitals. They need not be considered totally private property to be sold and bought, either. These goods have to be supplied in communities with rules, responsibilities and joint benefits (information, energy, local production, and online education). Not governed by the markets or governments, but by networked commons because of the [tragedy of the commons][17]. It governs and enforces distributed, peer-to-peer, laterally scaled economic activities. + +Rifkin feels the Collaborative Commons as a governing body is extremely important. This is where local (project) leadership comes in. The goals, processes, tasks and responsibilities must be successfully executed, after they have been decided and agreed on. Furthermore, "social capital" is a major factor. It must be widely introduced and deepened in quality. Community exchange, interaction and contribution is far more important than selling to distant capital markets. If that is the case, our [open organization leadership][18] will be extremely important. + +### The public square versus private ownership + +"The public square at — least before the Internet, is where we communicate, socialize, revel in each other's company, establish communal bonds, and create social capital and trust. These are all indispensable elements for a nurturing community." Historically, Japanese villages were built like that to survive natural, economic and political disasters like earthquakes and typhoons. They put common interests over self-interests This is what the open organization principle of community is all about. + +The right to be included, to have access to one another, which is the right to participate together, is a fundamental right of all. Private property, the right to enclose, own, and exclude is merely a qualified deviation from the norm. For some reason, having massive private property rights have gained in importance in more recent modern times. This will all be reversed in the years ahead according to Rifkin. + +Rifkin writes that the world will move to these commons: + +1. Public square commons +2. Land commons +3. Virtual commons +4. Knowledge commons (languages, cultures, human knowledge and wisdom) +5. Energy Commons +6. Electromagnetic spectrum commons +7. Ocean commons +8. Fresh water commons +9. Atmosphere commons +10. Biosphere commons. + +The past 200 years of capitalism, the enclosed, privatized, and commodification of the market must be put under review. How would they be most effective in a transparent, non-hierarchical and collaborative culture? It comes down to two views, the capitalist (I own it. It is mine, and you can't use it) and the collaborationist (This is for everyone to use, and there are rules and guidelines to use it, so everyone can get their fair share). Today's cooperatives are good at this, like the [International Co-operative Alliance (ICA)][19]. Cooperatives have to generate motivation for the greater community good, and that motivation must be greater than any profit motive. That is their challenge but this not new, as one in seven people on the earth are in some kind of cooperative now. + +As I've presented in this article, the IoT will become our working and living environment. Also, energy costs are projected to go to near zero. With those changes, community collaboration and cooperation will become ever more important over hard work. In the last part of this series I will look at Collaborative Commons in logistics and other economic activity. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/open-organization/22/5/near-zero-marginal-cost-societies-and-impact-why-we-work + +作者:[Ron McFarland][a] +选题:[lkxed][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/ron-mcfarland +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/BUSINESS_networks.png +[2]: https://www.goodreads.com/book/show/18594514-the-zero-marginal-cost-society +[3]: https://us.sunpower.com +[4]: https://www.energywatchgroup.org +[5]: https://www.forbes.com/sites/ricoheurope/2020/02/06/moving-from-the-information-age-to-the-collaboration-age +[6]: http://www.zythepsary.com/author/admin +[7]: https://ch.linkedin.com/in/heatherleson +[8]: https://en.wikipedia.org/wiki/3D_printing +[9]: https://reprap.org/wiki/RepRap +[10]: https://www.thingiverse.com +[11]: https://www.popularmechanics.com/cars/a9645/urbee-2-the-3d-prinhttps://www.popularmechanics.com/cars/a9645/urbee-2-the-3d-printed-car-that-will-drive-across-the-country-16119485 +[12]: https://phys.org/news/2013-02-kor-ecologic-urbee-car-d.html +[13]: https://theopenorganization.org/definition/open-organization-definition/ +[14]: https://www.epri.com +[15]: https://www.intwineconnect.com +[16]: https://www.cleanweb.co +[17]: https://blogs.pugetsound.edu/econ/2018/03/09/comedy-of-the-commons +[18]: https://github.com/open-organization/open-org-leaders-manual/raw/master/second-edition/open_org_leaders_manual_2_3.pdf +[19]: https://www.ica.coop/en diff --git a/sources/talk/20220523 7 pieces of Linux advice for beginners.md b/sources/talk/20220523 7 pieces of Linux advice for beginners.md new file mode 100644 index 0000000000..bc902926eb --- /dev/null +++ b/sources/talk/20220523 7 pieces of Linux advice for beginners.md @@ -0,0 +1,142 @@ +[#]: subject: "7 pieces of Linux advice for beginners" +[#]: via: "https://opensource.com/article/22/5/linux-advice-beginners" +[#]: author: "Opensource.com https://opensource.com/users/admin" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +7 pieces of Linux advice for beginners +====== +We asked our community of writers for the best advice they got when they first started using Linux. + +![Why the operating system matters even more in 2017][1] + +Image by: Internet Archive Book Images. Modified by Opensource.com. CC BY-SA 4.0 + +What advice would you give a new Linux user? We asked our community of writers to share their favorite Linux advice. + +### 1. Use Linux resources + +My brother told me that Linux was like a "software erector set" (that's a dated reference to the old Erector sets that could be purchased in the 1950s and 1960s) which was a helpful metaphor. I was using Windows 3.1 and Windows NT at the time and was trying to build a useful and safe K-12 school district website. This was in 2001 and 2002 and there were very few texts or resources on the web that were helpful. One of the resources recommended was the "Root Users Guide," a very large book that had lots of printed information in it but was tough to decipher and know just how to proceed. + +One of the most useful resources for me was an online course that Mandrake Linux maintained. It was a step-by-step explanation of the nuances of using and administering a Linux computer or server. I used that along with a listserv that Red Hat maintained in those days, where you could pose questions and get answers. + +—— [Don Watkins][2] + +### 2. Ask the Linux community for help + +My advice is to ask questions, in all of their settings. You can start out with an Internet search, looking for others who have had the same or similar questions (maybe even better questions.) It takes a while to know what to ask and how to ask it. + +Once you become more familiar with Linux, check through the various forums out there, to find one or more that you like, and again, before you ask something yourself, look to see if someone else has already had the question and had it answered. + +Getting involved in a mail list is also helpful, and eventually, you may find yourself knowledgeable enough to answer some questions yourself. As they say, you learn the most about something by becoming able to answer someone else's questions about it. + +Meanwhile, you also become more familiar with using a system that's not a black box that you never understand how something is done except by paying for it. + +—— [Greg Pittman][3] + +My advice is to get familiar with help utilities such as man and info.  Also, spend as much time as possible at the command line interface and really get used to the fundamental UNIX design. As a matter of fact, one of my favorite books is a UNIX book from the 80s because it really helps in understanding files, directories, devices, basic commands, and more. + +—— [Alan Formy-Duval][4] + +The best advice I got was to trust the community with answers and manual pages for detailed information and "how-to" use different options. However, I started off around 2009-ish, there were a lot of tools and resources available, including a project called [Linux from Scratch (LFS)][5]. This project really taught me a lot about the internals and how to actually build an LFS image. + +—— [Sumantro Mukherjee][6] + +My advice is to read. Using places like [Ask Fedora][7] or the Fedora Matrix chat or other forum type areas. Just read what others are saying, and trying to fix. I learned a lot from just reading what others were struggling with, and then I would try to figure out how the issue was caused. + +—— [Steve Morris][8] + +### 3. Try dual booting + +I started with a dual-boot system in the late 90s (Windows and Linux), and while I wanted to really use Linux, I ended up booting Windows to work in my familiar desktop environment. One of the best pieces of advice was to change the boot order, so every time I wasn't quick enough, I ended up using Linux. ;) + +—— [Heike Jurzik][9] + +I was challenged by one of my team to do a knowledge swap. + +He (our Linux sysadmin) built his website in **Joomla!** (which our web team specialized in, and he wanted to know more about) and I adopted Linux (having been Windows only to that point.) We dual booted to start with, as I still had a bunch of OS-dependent software I needed to use for the business, but it jump-started my adoption of Linux. + +It was really helpful to have each other as an expert to call on while we were each learning our way into the new systems, and quite a challenge to keep going and not give up because he hadn't! + +I did have a big sticky note on my monitor saying "anything with `rm`  in the command, ask first" after a rather embarrassing blunder early on. He wrote a command-line cheat sheet (there are dozens [online now][10]) for me, which really helped me get familiar with the basics. I also started with the [KDE version][11] of Ubuntu, which I found really helpful as a novice used to working with a GUI. + +I've used Linux ever since (aside from my work computer) and he's still on Joomla, so it seemed to work for both of us! + +—— [Ruth Cheesley][12] + +### 4. Back it up for safety + +My advice is to use a distro with an easy and powerful backup app. A new Linux user will touch, edit, destroy and restore configurations. They probably will reach a time when their OS will not boot and losing data is frustrating. + +With a backup app, they're always sure that their data is safe. + +We all love Linux because it allows us to edit everything, but the dark side of this is that making fatal errors is always an option. + +—— [Giuseppe Cassibba][13] + +### 5. Share the Linux you know and use + +My advice is to share the Linux you use. I used to believe the hype that there were distributions that were "better" for new users, so when someone asked me to help them with Linux, I'd show them the distro "for new users." Invariably, this resulted in me sitting in front of their computer looking like I had never seen Linux before myself, because something would be just unfamiliar enough to confuse me.  Now when someone asks about Linux, I show them how to use what I use. It may not be branded as the "best" Linux for beginners, but it's the distro I know best, so when their problems become mine, I'm able to help solve them (and sometimes I learn something new, myself.) + +—— [Seth Kenlon][14] + +There was a saying back in the old days, "Do not just use a random Linux distro from a magazine cover. Use the distro your friend is using, so you can ask for help when you need it." Just replace "from a magazine cover" with "off the Internet" and it's still valid :-) I never followed this advice, as I was the only Linux user in a 50km radius. Everyone else was using FreeBSD, IRIX, Solaris, and Windows 3.11 around me. Later I was the one people were asking for Linux help. + +—— [Peter Czanik][15] + +### 6. Keep learning Linux + +I was a reseller partner prior to working at Red Hat, and I had a few home health agencies with traveling nurses. They used a quirky package named Carefacts, originally built for DOS, that always got itself out of sync between the traveling laptops and the central database. + +The best early advice I heard was to take a hard look at the open source movement. Open source is mainstream in 2022, but it was revolutionary a generation ago when nonconformists bought Red Hat Linux CDs from retailers. Open source turned conventional wisdom on its ear. I learned it was not communism and not cancer, but it scared powerful people. + +My company built its first customer firewall in the mid-1990s, based on Windows NT and a product from Altavista. That thing regularly crashed and often corrupted itself. We built a Linux-based firewall for ourselves and it never gave us a problem. And so, we replaced that customer Altavista system with a Linux-based system, and it ran trouble-free for years. I built another customer firewall in late 1999. It took me three weeks to go through a book on packet filtering and get the `ipchains` commands right. But it was beautiful when I finally finished, and it did everything it was supposed to do. Over the next 15+ years, I built and installed hundreds more, now with `iptables` ; some with bridges or proxy ARP and QOS to support video conferencing, some with [IPSEC][16] and [OpenVPN tunnels][17]. I got pretty good at it and earned a living managing individual firewalls and a few active/standby pairs, all with Windows systems behind them. I even built a few virtual firewalls. + +But progress never stops. By 2022, [iptables is obsolete][18] and my firewall days are a fond memory. + +The ongoing lesson? Never stop exploring. + +—— [Greg Scott][19] + +### 7. Enjoy the process + +Be patient. Linux is a different system than what you are used to, be prepared for a new world of endless possibilities. Enjoy it. + +—— [Alex Callejas][20] + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/linux-advice-beginners + +作者:[Opensource.com][a] +选题:[lkxed][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/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/yearbook-haff-rx-linux-file-lead_0.png +[2]: https://opensource.com/users/don-watkins +[3]: https://opensource.com/users/greg-p +[4]: https://opensource.com/users/alanfdoss +[5]: https://linuxfromscratch.org/ +[6]: https://opensource.com/users/sumantro +[7]: https://ask.fedoraproject.org +[8]: https://opensource.com/users/smorris12 +[9]: https://opensource.com/users/hej +[10]: https://opensource.com/downloads/linux-common-commands-cheat-sheet +[11]: https://opensource.com/article/22/2/why-i-love-linux-kde +[12]: https://opensource.com/users/rcheesley +[13]: https://opensource.com/users/peppe8o +[14]: https://opensource.com/users/seth +[15]: https://opensource.com/users/czanik +[16]: https://www.redhat.com/sysadmin/run-your-own-vpn-libreswan +[17]: https://opensource.com/article/21/8/openvpn-server-linux +[18]: https://opensource.com/article/19/7/make-linux-stronger-firewalls +[19]: https://opensource.com/users/greg-scott +[20]: https://opensource.com/users/darkaxl diff --git a/sources/talk/20220602 Why Do Enterprises Use and Contribute to Open Source Software.md b/sources/talk/20220602 Why Do Enterprises Use and Contribute to Open Source Software.md new file mode 100644 index 0000000000..1de91d1449 --- /dev/null +++ b/sources/talk/20220602 Why Do Enterprises Use and Contribute to Open Source Software.md @@ -0,0 +1,128 @@ +[#]: subject: "Why Do Enterprises Use and Contribute to Open Source Software" +[#]: via: "https://www.linux.com/news/why-do-enterprises-use-and-contribute-to-open-source-software/" +[#]: author: "Dan Whiting https://www.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Why Do Enterprises Use and Contribute to Open Source Software +====== +When people find out I work at the Linux Foundation they invariably ask what we do? Sometimes it is couched around the question, As in the Linux operating system? I explain open source software and try to capture the worldwide impact into 20 seconds before I lose their attention. If they happen to stick around for more, we often dig into the question, Why would enterprises want to participate in open source software projects or use open source software? The reality is – they do, whether they know it or not. And the reality is thousands of companies donate their code to open source projects and invest time and resources helping to further develop and improve open source software. + +### How extensively used is open source software + +To quote from our recently released report, A Guide to Enterprise Open Source, “Open source software (OSS) has transformed our world and become the backbone of our digital economy and the foundation of our digital world. From the Internet and the mobile apps we use daily to the operating systems and programming languages we use to build the future, OSS has played a vital role. It is the lifeblood of the technology industry. Today, OSS powers the digital economy and enables scientific and technological breakthroughs that improve our lives. It’s in our phones, our cars, our airplanes, our homes, our businesses, and our governments. But just over two decades ago, few people had ever heard of OSS, and its use was limited to a small group of dedicated enthusiasts.” + +Open source software (OSS) has transformed our world and become the backbone of our digital economy and the foundation of our digital world. + +But what does this look like practically: + +* In vertical software stacks across industries, open source penetration ranges from 20 to 85 percent of the overall software used. +* Linux fuels 90%+ of web servers and Internet-connected devices. +* The Android mobile operating system is built on the Linux kernel. +* Immensely [popular libraries and tools][1] to build web applications, such as: AMP, Appium, Dojo, jQuery, Marko, Node.js and so many more are open source. +* The world’s top 100 supercomputers run Linux. +* 100% of mainframe customers use Linux. +* The major cloud-service providers – AWS, Google, and Microsoft – all utilize open-source software to run their services and host open-source solutions delivered through the cloud. + +### Why do companies want to participate in open source software projects + +Companies primarily participate in open source software projects in three ways: + +* They donate software they created to the open source community. +* They provide direct funding and/or allocate software developers and other staff to contribute to open source software projects + +The question often asked is, why wouldn’t they want to keep all of their software proprietary or only task their employees to work on their proprietary software? + +The 30,000-foot answer is that it is about organizations coming together to collectively solve common problems so they can separately innovate and differentiate on top of the common baseline. They see that they are better off pooling resources to make the baseline better. Sometimes it is called “coopetition.” It generally means that while companies may be in competition with each other in certain areas, they can still cooperate on others. + +It is about organizations coming together to collectively solve common problems so they can separately innovate and differentiate + +Some old-school examples of this principle: + +* Railroads agreed on a common track size and build so they can all utilize the same lines and equipment was interchangeable. +* Before digital cameras, companies innovated and differentiated on film and cameras, but they all agreed on the spacing for the sprockets to advance the film. +* The entertainment industry united around the VHS and Blu-Ray formats over their rivals. + +Now, we see companies, organizations, and individuals coming together to solve problems while simultaneously improving their businesses and products: + +[Let’s Encrypt][2] is a free, automated, and open certificate authority with the goal of dramatically increasing the use of secure web protocols by making it much easier and less expensive to setup. They are serving 225+ million websites, issuing ~1.5 million certificates each day on average. + +The [Academy Software Foundation][3] [creates value in the film industry][4] through collectively engineering software that powers much of the entertainment, gaming, and media industry productions and open standards needed for growth. + +The Hyperledger Foundation hosts enterprise-grade blockchain software projects, notably [using significantly fewer energy resources][5] than other popular solutions. + +[LF Energy][6] is [making the electric grid more modular, interoperable, and scalable][7] to help increase the use of renewable energy sources. + +[Dronecode][8] is enabling the development of drone software so companies can use their resources to innovate further. + +[OpenSSF][9] is the top technology companies coming together to strengthen the security and resiliency of open source software. + +[Kubernetes][10] was donated by Google and is the go-to solution for managing cloud-based software. + +These are just a small sampling of the open source software projects that enterprises are participating in. You can explore all of the ones hosted at the Linux Foundation [here][11]. + +### How can companies effectively use and participate in open source software projects? + +Enterprises looking to better utilize and participate in open source projects can look to the Linux Foundation’s resources to help. Much of what organizations need to know is provided in the just-published report,[A Guide to Enterprise Open Source][12]. The report is packed with information and insights from open source leaders at top companies with decades of combined experience. It includes chapters on these topics: + +* Leveraging Open Source Software +* Preparing the Enterprise for Open Source +* Developing an Open Source Strategy +* Setting Up Your Infrastructure for Implementation +* Setting Up Your Talent for Success +* Challenges + +Additionally, the Linux Foundation offers many open source [training courses][13], [events][14] throughout the year, the [LFX Platform][15], and hosts projects that help organizations manage open source utilization and participation, such as: + +The [TODO Group][16] provides resources to setup and run an open source program office, including their [extensive guides][17]. + +The [Openchain Project][18] maintains an international standard for sharing what software package licenses are included in a larger package, including information on the various licensing requirements so enterprises can ensure they are complying with all of the legal requirements. + +The [FinOps Foundation][19] is fostering an, “evolving cloud financial management discipline and cultural practice that enables organizations to get maximum business value by helping engineering, finance, technology, and business teams to collaborate on data-driven spending decisions.”. + +The [Software Data Package Exchange (SPDX)][20] is an open standard for communication software bill of materials (SBOMs) so it is clear to every user which pieces of software are included in the overall package. + +Again, this is just a snippet of the projects at the Linux Foundation that are working to help organizations adapt, utilize, contribute, and donate open source projects. + +The bottom line: Enterprises are increasingly turning to open source software projects to solve common problems and innovate beyond the baseline, and the Linux Foundation is here to help. + +The post [Why Do Enterprises Use and Contribute to Open Source Software][21] appeared first on [Linux Foundation][22]. + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/why-do-enterprises-use-and-contribute-to-open-source-software/ + +作者:[Dan Whiting][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/ +[b]: https://github.com/lkxed +[1]: https://openjsf.org/projects/ +[2]: https://letsencrypt.org/ +[3]: https://www.aswf.io/ +[4]: https://linuxfoundation.org/tools/open-source-in-entertainment/ +[5]: https://linuxfoundation.org/tools/carbon-footprint-of-nfts/ +[6]: https://www.lfenergy.org/ +[7]: https://linuxfoundation.org/tools/paving-the-way-to-battle-climate-change-how-two-utilities-embraced-open-source-to-speed-modernization-of-the-electric-grid/ +[8]: https://www.dronecode.org/projects/ +[9]: https://openssf.org/ +[10]: https://kubernetes.io/ +[11]: https://linuxfoundation.org/projects/ +[12]: https://linuxfoundation.org/tools/guide-to-enterprise-open-source/ +[13]: https://training.linuxfoundation.org/ +[14]: https://events.linuxfoundation.org/ +[15]: https://lfx.linuxfoundation.org/ +[16]: https://todogroup.org/ +[17]: https://linuxfoundation.org/resources/open-source-guides/ +[18]: https://www.openchainproject.org/resources +[19]: https://www.finops.org/introduction/what-is-finops/ +[20]: https://spdx.dev/ +[21]: https://www.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/ +[22]: https://www.linuxfoundation.org/ diff --git a/sources/talk/20220604 Attract contributors to your open source project with authenticity.md b/sources/talk/20220604 Attract contributors to your open source project with authenticity.md new file mode 100644 index 0000000000..d97d80f40d --- /dev/null +++ b/sources/talk/20220604 Attract contributors to your open source project with authenticity.md @@ -0,0 +1,141 @@ +[#]: subject: "Attract contributors to your open source project with authenticity" +[#]: via: "https://opensource.com/article/22/6/attract-contributors-open-source-project" +[#]: author: "Rizel Scarlett https://opensource.com/users/blackgirlbytes" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Attract contributors to your open source project with authenticity +====== +Check out these methods that open source maintainers can use to attract contributors in a genuine manner. + +![a big flag flying in a sea of other flags, teamwork][1] + +Image by: Opensource.com + +It's not a secret that maintaining an open source project is often thankless and time-consuming work. However, I've learned that there's one shared joy among open source maintainers: They love building with a group of technologists who passionately believe in their vision. + +### Marketing feels cringey + +Community support and teamwork are major incentives for open source maintainers. However, gaining community support and contributors is a challenge, especially as a new maintainer. The hope is that technologists will find our projects and start contributing by chance. The reality is we have to market our projects. Think about it: Developers create several public repositories daily, but nobody knows those repositories exist. Without adoption, community, or collaboration, we're not truly reaping the benefits of open source. + +Although marketing an open source project is necessary for a project's overall success, developers are hesitant to do it because marketing to other developers often feels inauthentic and cringey. In this article, I explore methods maintainers can use to attract contributors in a genuine manner. + +### Promote your open source project + +If you want people to contribute to your project, you have to tell them your project exists. So what can promotion look like for you? Instead of spamming discord channels or DMs about an open source project, maintainers can promote their projects through many channels, including: + +* Conference talks: People attend conferences to gain inspiration. Don't be afraid; they're not necessarily looking for a PhD-level lecture. Take the stage at an event like [All Things Open][2], [Open Source Series 101][3], [Codeland][4], or [Upstream][5] to talk about what you're building, why you're building it, issues you face, and discoveries you have made. After your talk, people may want to learn more about what you're building and how they can get involved. +* Blogging: Leverage popular developer blogging platforms such as [Aviyel][6], [Dev.to][7], or [Hashnode][8] to talk about your project. Add a link to your project within the blog posts so that the right people can find it. You can also [submit an article][9] to the editors here on Opensource.com to raise awareness about your open source project! +* Twitter: Twitter has a large tech audience, including Developers, UX Designers, Developer Advocates, and InfoSec professionals who want to collaborate and learn from each other. Twitter is the perfect platform to post in an authentic, non-pushy way about your discoveries, new releases, and bug fixes. Folks will learn from you through your tweets and may feel inclined to build with you. +* Podcasts or Twitter Spaces: Like conference talks, use podcasts and Twitter Spaces to build your project's brand. You don't have to talk about it in a marketing way. You can geek out with the host over your vision and the technical hiccups you've faced along the way. +* Twitch Streams: Stream yourself live coding your project to create awareness of its existence and pair the program with your viewers. Eventually, they might tell other people about your product, or they might ask to contribute themselves. +* Hacktoberfest: Hacktoberfest is a month-long event in October that encourages people to make their first contributions to projects. By participating in Hacktoberfest as a maintainer, you may recruit new contributors. +* Sponsorships: Contributions don't always have to include code. Corporations and individuals can contribute by sponsoring you. Learn more about creating an appealing Sponsor profile [here][10]. + +### Gain community support + +The proverb "it takes a village" applies to more than child-rearing. It also takes a village to maintain an open source project. Community is a large part of open source and just general life success. However, community support is a two-way street. To sustain community support, it's a best practice to give back to community members. + +What can community support look like for you? As you promote your project, you will find folks willing to support you. To encourage them to continue supporting and appeal to other potential supporters, you can: + +* Highlight contributors/supporters: Once you start getting contributors, you can motivate more people to contribute to your project by highlighting past, current, or consistent contributors in your README. This acknowledgment shows that you value and support your contributors. Send your contributors swag or a portion of your sponsorship money if you can afford it. Folks will naturally gravitate to your projects if you're known for genuinely supporting your open source community. + +![Acknowledge contributors on a profile page][11] + +* Establish a culture of kindness: Publish a Code of Conduct in your repository to ensure psychological safety for contributors. I strongly suggest you also adhere to those guidelines by responding kindly to people in comments, pull requests, and issues. It's also vital that you enforce your Code of Conduct. If someone in your community is not following the rules, make sure they face the outlined consequences without exception. Don't let a toxic actor ruin your project's environment with unkind language and harassment. +* Provide a space for open discussion: Often, contributors join an open source community to befriend like-minded technologists, or they have a technical question, and you won't always be available to chat. Open source maintainers often use one of the following tools to create a place for contributors to engage with each other and ask questions in the open: + * GitHub Discussions + * Discord + * Matrix.org + * Mattermost + +### Create a "good" open source project + +*Good* is subjective in code or art, but there are a few ways to indicate that your project is well thought out and a good investment. What does creating a good project look like for you? Your project doesn't have to include amazing code or be a life-changing project to indicate quality. Instead, ensure that your project has the following attributes. + +#### Easy to find + +To help other people find and contribute to your project, you can add topics to your repository related to your project's intended purpose, subject area, affinity groups, or other important qualities. When people go to github.com/topics to search for projects, your project has a higher chance of showing up. + +![GitHub Scientist page][12] + +#### Easy to use + +Make your project easy to use with a detailed README. It's the first thing new users and potential contributors see when visiting your project's repository. Your README should serve as a how-to guide for users. I suggest you include the following information in your README: + +* Project title +* Project description +* Installation instructions +* Usage instructions +* Link to your live web app +* Links to related documentation (code of conduct, license, contributing guidelines) +* Contributors highlights + +You can learn more about crafting the perfect README [here][13]. + +#### Easy to contribute to + +Providing guidelines and managing issues help potential contributors understand opportunities to help. + +* Contributing guidelines - Similar to a README, contributors look for a markdown file called Contributing.md for insight on how to contribute to your project. Guidelines are helpful for you and the contributor because they won't have to ask you too many questions. The contributing guidelines should answer frequently asked questions. I suggest including the following information in your Contributing.md file: + * Technologies used + * How to report bugs + * How to propose new features + * How to open a pull request + * How to claim an issue or task + * Environment set up + * Style guide/code conventions + * Link to a discussion forum or how people can ask for help + * Project architecture (nice to have) + * Known issues +* Good first issues - Highlight issues that don't need legacy project knowledge with the label good-first-issue, so new contributors can feel comfortable contributing to your project for the first time. + +![discover issues with GitHub][14] + +### Exercise persistence + +Even if no one contributes to your project, keep it active with your contributions. Folks will be more interested in contributing to an active project. What does exercising persistence look like for your project? Even if no one is contributing, continue to build your project. If you can't think of new features to add and you feel like you fixed all the bugs, set up ways to make your project easy to manage and scale when you finally get a ton of contributors. + +* Scalability: Once you get contributors, it will get harder to balance responding to every issue. While you're waiting for more contributors, automate the tasks that will eventually become time-consuming. You can leverage GitHub Actions to handle the release process, CI/CD, or enable users to self-assign issues. + +### TL;DR + +Attracting contributors to your open source project takes time, so be patient and don't give up on your vision. While you're waiting, promote your project by building in public and sharing your journey through blog posts, tweets, and Twitch streams. Once you start to gain contributors, show them gratitude in the form of acknowledgment, psychological safety, and support. + +### Next steps + +For more information on maintaining an open source project, check out [GitHub's Open Source Guide][15]. + +Image by: (Rizel Scarlett, CC BY-SA 4.0) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/attract-contributors-open-source-project + +作者:[Rizel Scarlett][a] +选题:[lkxed][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/blackgirlbytes +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/leader_flag_people_team_group.png +[2]: https://2021.allthingsopen.org/ +[3]: https://opensource101.com/ +[4]: https://codelandconf.com/ +[5]: https://upstream.live/ +[6]: http://aviyel.com/ +[7]: https://dev.to/ +[8]: https://hashnode.com/ +[9]: https://opensource.com/writers +[10]: https://dev.to/github/how-to-create-the-perfect-sponsors-profile-for-your-open-source-project-3747 +[11]: https://opensource.com/sites/default/files/2022-05/contributors.png +[12]: https://opensource.com/sites/default/files/2022-05/github-scientist.png +[13]: https://dev.to/github/how-to-create-the-perfect-readme-for-your-open-source-project-1k69 +[14]: https://opensource.com/sites/default/files/2022-05/label-issues.png +[15]: https://opensource.guide/ diff --git a/sources/tech/20210101 Djinn- A Code Generator and Templating Language Inspired by Jinja2.md b/sources/tech/20210101 Djinn- A Code Generator and Templating Language Inspired by Jinja2.md index d903ef5abf..f5849ac6b2 100644 --- a/sources/tech/20210101 Djinn- A Code Generator and Templating Language Inspired by Jinja2.md +++ b/sources/tech/20210101 Djinn- A Code Generator and Templating Language Inspired by Jinja2.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (hanszhao80) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -236,7 +236,7 @@ via: https://theartofmachinery.com/2021/01/01/djinn.html 作者:[Simon Arneaud][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[hanszhao80](https://github.com/hanszhao80) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/sources/tech/20210102 Explore the night sky with this open source astronomy app.md b/sources/tech/20210102 Explore the night sky with this open source astronomy app.md deleted file mode 100644 index b8339cd88f..0000000000 --- a/sources/tech/20210102 Explore the night sky with this open source astronomy app.md +++ /dev/null @@ -1,101 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (hanszhao80) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Explore the night sky with this open source astronomy app) -[#]: via: (https://opensource.com/article/21/1/kstars) -[#]: author: (Don Watkins https://opensource.com/users/don-watkins) - -Explore the night sky with this open source astronomy app -====== -Stargaze from your Linux desktop or Android device with KStars. -![Open source stars.][1] - -I have always been fascinated with the night sky. When I was younger, the only reference materials available were books, and they seemed to depict a sky that looked different from the one I saw from my home. - -More than five years ago, I wrote about my experiences with two open source planetarium apps, [Celestia and Stellarium][2]. Recently, I read about another: [KStars][3]. It's an amazing open source application that helps engage children (and adults) in science and astronomy. Its website says: - -> "KStars is free, open source, cross-platform astronomy software. It provides an accurate graphical simulation of the night sky, from any location on Earth, at any date and time. The display includes up to 100 million stars, 13,000 deep-sky objects, all 8 planets, the Sun and Moon, and thousands of comets, asteroids, supernovae, and satellites." - -KStars is part of the [KDE Education Project][4]. The latest version, available for Linux, Windows, and macOS, integrates [StellarSolver][5], a cross-platform SExtractor, a program that builds a catalog of objects from an astronomical image. - -### Installing KStars - -KStars is freely licensed under the GPLv2.0. The source code is available on the official [KDE GitLab instance][6] and as a read-only mirror on GitHub. The KDE Education Project has excellent [installation documentation][7]. - -I'm using [Pop!_OS][8] and found KStars in the Pop!_Shop. - -You can install KStars on Linux from your distribution's software repository. KStars Lite is available for Android from the [Google Play store][9]. The KDE Project maintains an excellent [KStars Handbook][10] to assist users. - -### Using KStars - -After installation, launch the program from your Applications menu. A startup wizard guides you through the initial setup. - -![KStars Startup Wizard][11] - -(Don Watkins, [CC BY-SA 4.0][12]) - -The directions are easy to follow. The wizard prompts you to set your home location; unfortunately, my small village was not listed, but a larger nearby community was. - -![KStars location setup][13] - -(Don Watkins, [CC BY-SA 4.0][12]) - -You also have the opportunity to download additional data and extra features for the program. - -![KStars add-ons][14] - -(Don Watkins, [CC BY-SA 4.0][12]) - -There are many options available. I chose "Common images displayed in the detail window." - -Once you're finished with the setup, KStars presents a map of the night sky as it appears from your location. - -![KStars night sky display][15] - -(Don Watkins, [CC BY-SA 4.0][12]) - -It displays the current local time in the upper-left corner (5:58pm on November 30, 2020, in this image). - -Using the left mouse button, you can move the display left, right, up, and down. You can zoom in and out using the mouse's scroll wheel. Placing the mouse cursor over an object and right-clicking describes the object you're looking at. - -![KStars describes objects][16] - -(Don Watkins, [CC BY-SA 4.0][12]) - -### Get involved - -KStars is actively soliciting help with bug reports, astronomy knowledge, code, translations, and more. The lead developer and maintainer is [Jasem Mutlaq][17]. If you'd like to contribute, please visit the [project's website][18] or join the mailing list to learn more. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/1/kstars - -作者:[Don Watkins][a] -选题:[lujun9972][b] -译者:[hanszhao80](https://github.com/hanszhao80) -校对:[校对者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/osdc_520x292_opensourcestars.png?itok=hnrMETFh (Open source stars.) -[2]: https://opensource.com/education/15/7/open-source-apps-explore-night-sky -[3]: https://edu.kde.org/kstars/ -[4]: https://edu.kde.org/ -[5]: https://github.com/rlancaste/stellarsolver -[6]: https://invent.kde.org/education/kstars -[7]: https://edu.kde.org/kstars/install.php -[8]: https://pop.system76.com/ -[9]: https://play.google.com/store/apps/details?id=org.kde.kstars.lite&hl=en -[10]: https://docs.kde.org/trunk5/en/extragear-edu/kstars/index.html -[11]: https://opensource.com/sites/default/files/uploads/kstars_startupwizard.png (KStars Startup Wizard) -[12]: https://creativecommons.org/licenses/by-sa/4.0/ -[13]: https://opensource.com/sites/default/files/uploads/kstars_setlocation.png (KStars location setup) -[14]: https://opensource.com/sites/default/files/uploads/kstars_addons.png (KStars add-ons) -[15]: https://opensource.com/sites/default/files/uploads/kstars_sky.png (KStars night sky display) -[16]: https://opensource.com/sites/default/files/uploads/kstars_objectdescription.png (KStars describes objects) -[17]: https://github.com/knro -[18]: https://edu.kde.org/kstars diff --git a/sources/tech/20210107 A hands-on tutorial for using the GNU Project Debugger.md b/sources/tech/20210107 A hands-on tutorial for using the GNU Project Debugger.md index ac878e098c..422cb3821d 100644 --- a/sources/tech/20210107 A hands-on tutorial for using the GNU Project Debugger.md +++ b/sources/tech/20210107 A hands-on tutorial for using the GNU Project Debugger.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (Starryi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20210112 15 favorite programming tutorials and insights.md b/sources/tech/20210112 15 favorite programming tutorials and insights.md deleted file mode 100644 index 5b0d42aeaf..0000000000 --- a/sources/tech/20210112 15 favorite programming tutorials and insights.md +++ /dev/null @@ -1,108 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (15 favorite programming tutorials and insights) -[#]: via: (https://opensource.com/article/21/1/best-programming) -[#]: author: (Bryant Son https://opensource.com/users/brson) - -15 favorite programming tutorials and insights -====== -Whether you're new to programming or want to improve your existing -skills, there is an article in this list to help you. Take a look at -some of the best programming articles of 2020. -![Learning and studying technology is the key to success][1] - -Happy new year! 2020 was one heck of an unusual year with the COVID-19 pandemic pushing us to stay at home and dramatically transforming our lifestyles. However, a time like this is also the best time to start picking up a new programming language or to level up your existing programming skillset. We begin with some light reading: **What is your first programming language?** and **Why developers like to code at night**. Next, we have articles about some specific programming languages like **C**, **D**, and **Awk**. Last, we provide some advanced programming language contents like **Real-Time Operating System (RTOS)**, **WebAssembly**, and **sharing data between C and Python**. - -## [What was your first programming language?][2] - -Chances are, not everyone remembers the very first thing they ate after they were born, but many programmers most likely recall their very first programming language. In this article, Opensource.com editor Lauren Pritchett took a survey asking the community this question. Go down your own memory lane by reading the responses to this question by other developers. - -## [Why developers like to code at night][3] - -Ever wonder why so many programmers stay late to crank out the lines of code that may turn into the next Google, Facebook, or Netflix? Quite surprisingly, many psychological studies exist that explain the productivity behind this common routine. Learn about it by reading this article by Matt Shealy. - -## [Why I use open source technology for web development][4] - -The Internet has been the driving force behind the popularity of open source programming, tools, and frameworks. But how can we explain this trend, and what are key characteristics of the web that inspire developers to continuously endorse open source technologies? See why Jim Hall believes that open source is the right way to build web applications. - -## [5 steps to learn any programming language][5] - -Learning a programming language may feel like a daunting task, but the process can be much easier with the right approach. Just as memorizing vocabulary and using correct grammar matter for learning a new spoken language, understanding syntax, functions, and data types matters for new programming languages. Learn about five steps you can apply when you decide to learn a new programming language. - -## [An introduction to writing your own HTML web pages][6] - -**Hypertext Markup Language (HTML)** is not a programming language, but it is the backbone behind the Internet as billions of people visit webpages built with HTML every day. HTML, interpreted by web browsers, is a markup language that anyone can easily learn with a few simple practices. Read how you can start writing your first web page by reading this article! - -## [Learn the basics of programming with C][7] - -Who says **C** programming is dead? **C** is still the father of many existing programming languages, libraries, and tools today, and industries have recently noticed the **C** programming language's rejuvenation. Its job demand has also exploded with AR/VR and the growth of the gaming industry. However, learning **C** programming is quite challenging. Get a jump start on your journey learning **C** programming by reading this article by Seth Kenlon. - -## [What I learned while teaching C programming on YouTube][8] - -There are many resources to learn programming languages, but the best result comes if one plans well, executes well, and makes the learning applicable. Most importantly, you need to have a passion for learning. See what Jim Hall learned by teaching the C programming language through his YouTube channel. - -## [The feature that makes D my favorite programming language][8] - -What comes after C? Yes, it is the letter D, and there is a programming language called **D** as well. Although it is not the most well-known programming language, **D** has features like _Universal Function Call Syntax (UFCS)_ that make it quite an interesting language to learn. Lawrence Aberba explains the feature and how you can use it, too. - -## [The surprising thing you can do in the D programming language][9] - -In another article, Lawrence talks about _nesting_ support in **D**, a feature that makes it stand out among other programming languages. Read what it is and explore how **D** delivers nesting functionality. - -## [A practical guide to learning awk][10] - -**Awk** is a programming language that is probably strange to many people, but learning **awk** can give you power that really shines in day-to-day Linux operations. By reading this article, you can learn how **awk** parses input and how functions are structured. - -## [How to write a VS Code extension][11] - -**Visual Studio Code (VS Code)** is an extremely popular cross-platform code editor created by Microsoft, and it is an open source project based on an MIT license. One of the great things about the editor is its extensibility through **VS Code extensions**. You don't have to be a rocket scientist to build your first extension! After reading this article, you will be on the path to becoming a VS Code extension master. - -## [Customizing my open source PHP framework for web development][12] - -**PHP** is often a neglected programming language hated by some programmer groups for a few reasons, such as it is very easy to produce bad code. However, Facebook, Wikipedia, Tumblr, and many websites were originally built with **PHP**, and it is still one of the most popular web programming languages out there. See how Wee Ben Sen used **PHP** framework **CodeIgniter** to create high-performance websites for numerous occasions and learn its key benefits. - -## [Code your hardware using this open source RTOS][13] - -**RTOS** stands for **Real-Time Operating System**. It is an open source operating system optimized for embedded hardware like CPUs and computer chips. By taking advantage of **RTOS**, a project can benefit from concurrency, modularity, and real-time scheduling. This article explains **RTOS** and the numerous benefits associated with this open source operating system. - -## [Why everyone is talking about WebAssembly][14] - -**WebAssembly** is a new type of code that runs in modern web browsers. It is a low-level assembly-like language with a compact binary format. **WebAssembly** runs with near-native performance and provides languages such as C/C++, C#, and Rust with a compilation target so that they can run on the web. **WebAssembly** has gained huge traction in the past few years due to the ever-growing popularity of JavaScript. Follow the history behind **WebAssembly** and learn what makes it so popular today. - -## [Share data between C and Python with this messaging library][15] - -Sharing data between two distinct programming languages may sound like a super challenging task. However, leveraging an open source tool like **ZeroMQ**, you can easily create a messaging interface that transmits the data across different layers. Learn how you can make one by reading this article. - -As you can see, whether you are new to programming languages or want to grow your career further, there are learning opportunities for everyone. Let me know what you think by leaving a comment here. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/1/best-programming - -作者:[Bryant Son][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/brson -[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/8/first-programming-language -[3]: https://opensource.com/article/20/2/why-developers-code-night -[4]: https://opensource.com/article/20/4/open-source-web-development -[5]: https://opensource.com/article/20/10/learn-any-programming-language -[6]: https://opensource.com/article/20/4/build-websites -[7]: https://opensource.com/article/20/8/c-programming-cheat-sheet -[8]: https://opensource.com/article/20/7/d-programming -[9]: https://opensource.com/article/20/8/nesting-d -[10]: https://opensource.com/article/20/9/awk-ebook -[11]: https://opensource.com/article/20/6/vs-code-extension -[12]: https://opensource.com/article/20/5/codeigniter -[13]: https://opensource.com/article/20/6/open-source-rtos -[14]: https://opensource.com/article/20/1/webassembly -[15]: https://opensource.com/article/20/3/zeromq-c-python diff --git a/sources/tech/20210115 Learn awk by coding a -guess the number- game.md b/sources/tech/20210115 Learn awk by coding a -guess the number- game.md deleted file mode 100644 index 2f342fa95c..0000000000 --- a/sources/tech/20210115 Learn awk by coding a -guess the number- game.md +++ /dev/null @@ -1,208 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Learn awk by coding a "guess the number" game) -[#]: via: (https://opensource.com/article/21/1/learn-awk) -[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen) - -Learn awk by coding a "guess the number" game -====== -Programming languages tend to share many common traits. One great way to -learn a new language is to create a familiar program. In this article, I -will create a "guess the number" game by using awk to demonstrate -familiar concepts. -![question mark in chalk][1] - -When you learn a new programming language, it's good to focus on the things most programming languages have in common: - - * Variables – places where information is stored - * Expressions – ways to calculate things - * Statements – the means by which state changes are expressed in a program - - - -These concepts are the basis of most programming languages. - -Once you understand these concepts, you can start figuring the rest out. For example, most languages have a "way of doing things" supported by their design, and those ways can be quite different from one program to another. These ways include modularity (grouping related functionality together), declarative vs. imperative, object-orientation, low- vs. high-level syntactic features, and so on. An example familiar to many programmers is "ceremony," that is, the amount of work required to set the scene before tackling the problem. The Java programming language is said to have a significant ceremony requirement, stemming from its design, which requires all code to be defined within a class. - -But back to the basics. Programming languages usually share similarities. Once you know one programming language, start by learning the basics of another to appreciate the differences in that new language. - -A good way to proceed is to create a set of basic test programs. With these in hand, learning starts with these similarities. - -One test program you can use is a "guess the number" program. The computer picks a number between one and one hundred and asks you to guess the number. The program loops until you make a correct guess. - -The "guess the number" program exercises several concepts in programming languages: - - * Variables - * Input - * Output - * Conditional evaluation - * Loops - - - -That's a great practical experiment to learn a new programming language. - -**Note**: This article is adapted from Moshe Zadka's article on doing using this approach in [Julia][2] and Jim Hall's article on doing it in [Bash][3]. - -### Guess the number in awk - -Let's write a "guess the number" game as an Awk program. - -Awk is dynamically typed, is a scripting language oriented toward data transformation, and has surprisingly good support for interactive use. Awk has been around since the 1970s, originally as a part of the Unix operating system. If you don't know Awk but love spreadsheets, this is a sign… [go learn Awk][4]! - -You can begin your exploration of Awk by writing a version of the "guess the number" game. - -Here is my implementation (with line numbers so we can review some of the specific features): - - -``` -     1    BEGIN { -     2        srand(42) -     3        randomNumber = int(rand() * 100) + 1 -     4        print "random number is",randomNumber -     5        printf "guess a number between 1 and 100\n" -     6    } -     7    { -     8        guess = int($0) -     9        if (guess < randomNumber) { -    10            printf "too low, try again:" -    11        } else if (guess > randomNumber) { -    12            printf "too high, try again:" -    13        } else { -    14            printf "that's right\n" -    15            exit -    16        } -    17    } -``` - -We can immediately see similarities between Awk control structures and those of C or Java, but unlike Python. In statements such as _if-then-else_ or _while_, the _then_, _else_, and _while_ parts take either a statement or a group of statements enclosed within **{** and **}**. However, there is one big difference about AWk that needs to be understood from the start: - -By design, Awk is built around a data pipeline. - -What does that mean? Most Awk programs are snippets of code that receive a line of input, do something with the data, and write it to output. Recognizing the need for such a transformation pipeline, Awk by default provides all the transformation plumbing. Let's explore that through the above program by asking a basic question: Where is the 'read data from the console' structure? - -The answer to that is – it's built-in. In particular, lines 7 – 17 tell Awk what to do with each line that is read. Given that context, it's pretty easy to see that lines 1 – 6 are executed before anything is read. - -More specifically, the **BEGIN** keyword on line 1 is a kind of "pattern," in this case indicating to Awk that, before reading any data, it should execute what follows the **BEGIN** in the { … }. A similar **END** keyword, not used in this program, indicates to Awk what to do when everything has been read. - -Coming back to lines 7 – 17, we see they create a block of code { … } that is similar, but there is no keyword in front. Because there is nothing before the **{** for Awk to match, it will apply this line to every line of input received. Each line of input will be entered as guesses by the user. - -Let's look at the code being executed. First, the preamble that happens before any input is read. - -In line 2, we initialize the random number generator with the number 42 (if we don't provide an argument, the system clock is used). 42? [Of course 42][5]. Line 3 calculates a random number between 1 and 100, and line 4 prints that number out for debugging purposes. Line 5 invites the user to guess a number. Note this line uses `printf`, not `print`. Like C, `printf'`s first argument is a template used to format the output. - -Now that the user is aware the program expects input, she can type a guess on the console. Awk supplies this guess to the code in lines 7 – 17, as mentioned previously. Line 18 converts the input record to an integer; `$0` indicates the entire input record, whereas `$1` indicates the first field of the input record, `$2` the second, and so on. Yup, Awk splits an input line into constituent fields, using the predefined separator, which defaults to white space. Lines 9 – 15 compare the guess to the random number, printing appropriate responses. If the guess is correct, line 15 exits prematurely from the input line processing pipeline. - -Simple! - -Given the unusual structure of Awk programs as code snippets that react to specific input line configurations and do stuff with the data, let’s look at an alternative structure just to see how the filtering part works: - - -``` -     1    BEGIN { -     2        srand(42) -     3        randomNumber = int(rand() * 100) + 1 -     4        print "random number is",randomNumber -     5        printf "guess a number between 1 and 100\n" -     6    } -     7    int($0) < randomNumber { -     8        printf "too low, try again: " -     9    } -    10    int($0) > randomNumber { -    11        printf "too high, try again: " -    12    } -    13    int($0) == randomNumber { -    14        printf "that's right\n" -    15        exit -    16    } -``` - -Lines 1 – 6 haven’t changed. But now we see that lines 7 – 9 is code that is executed when the integer value of the line is less than the random number, lines 10 – 12 is code that is executed when the integer value of the line is greater than the random number, and lines 13 – 16 is code that is executed when the two match. - -This should seem "cool but weird" – why would we repeatedly calculate `int($0)`, for example? And for sure, it would be a weird way to solve the problem. But those patterns can be really quite wonderful ways to separate conditional processing since they can employ regular expressions or any other structure supported by Awk. - -For completeness, we can use these patterns to separate common computations from things that only apply to specific circumstances. Here’s a third version to illustrate: - - -``` -     1    BEGIN { -     2        srand(42) -     3        randomNumber = int(rand() * 100) + 1 -     4        print "random number is",randomNumber -     5        printf "guess a number between 1 and 100\n" -     6    } -     7    { -     8        guess = int($0) -     9    } -    10    guess < randomNumber { -    11        printf "too low, try again: " -    12    } -    13    guess > randomNumber { -    14        printf "too high, try again: " -    15    } -    16    guess == randomNumber { -    17        printf "that's right\n" -    18        exit -    19    } -``` - -Recognizing that, no matter what value of input comes in, it needs to be converted to an integer, we have created lines 7 – 9 to do just that. Now the three groups of lines, 10 – 12, 13 – 15 and 16 – 19, refer to the already-defined variable guess instead of converting the input line each time. - -Let's go back to the list of things we wanted to learn: - - * variables – yup, Awk has those; we can infer that input data comes in as strings but can be converted to a numeric value when required - * input – Awk just sends input through its "data transformation pipeline" approach to reading stuff - * output – we have used Awk's `print` and `printf` procedures to write stuff to output - * conditional evaluation – we have learned about Awk's _if-then-else_ and input filters that respond to specific input line configurations - * loops – huh, imagine that! We didn't need a loop here, once again, thanks to the "data transformation pipeline" approach that Awk takes; the loop "just happens." Note the user can exit the pipeline prematurely by sending an end-of-file signal to Awk (a **CTRL-D** when using a Linux terminal window) - - - -It's well worth considering the importance of not needing a loop to handle input. One reason Awk has remained viable for so long is that Awk programs are compact, and one of the reasons they are compact is there is no boilerplate required to read from the console or a file. - -Let's run the program: - - -``` -$ awk -f guess.awk -random number is 25 -guess a number between 1 and 100: 50 -too high, try again: 30 -too high, try again: 10 -too low, try again: 25 -that's right -$ -``` - -One thing we didn't cover was comments. An Awk comment begins with a `#` and ends with the end of line. - -### Wrap up - -Awk is incredibly powerful and this "guess the number" game is a great way to get started. It shouldn't be the end of your journey, though. You can [read about the history of Awk and Gawk (GNU Awk)][6], an expanded version of Awk and probably the one you have on your computer if you're running Linux, or [read all about the original from its initial developers][7]. - -You can also [download our cheatsheet][8] to help you keep track of everything you learn. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/1/learn-awk - -作者:[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/question-mark_chalkboard.jpg?itok=DaG4tje9 (question mark in chalk) -[2]: https://opensource.com/article/20/12/julia -[3]: https://opensource.com/article/20/12/learn-bash -[4]: https://opensource.com/article/20/9/awk-ebook -[5]: https://en.wikipedia.org/wiki/42_(number)#The_Hitchhiker's_Guide_to_the_Galaxy -[6]: https://www.gnu.org/software/gawk/manual/html_node/History.html -[7]: https://archive.org/details/pdfy-MgN0H1joIoDVoIC7 -[8]: https://opensource.com/downloads/cheat-sheet-awk-features diff --git a/sources/tech/20210116 4 DevOps books to read this year.md b/sources/tech/20210116 4 DevOps books to read this year.md deleted file mode 100644 index 45643d6e96..0000000000 --- a/sources/tech/20210116 4 DevOps books to read this year.md +++ /dev/null @@ -1,132 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (4 DevOps books to read this year) -[#]: via: (https://opensource.com/article/21/1/devops-books) -[#]: author: (Taz Brown https://opensource.com/users/heronthecli) - -4 DevOps books to read this year -====== -Curl up with a good book about DevOps this winter. -![Reading a book, selfcare][1] - -We have just entered 2021, and DevOps will become much more relevant. It is smack dab in the spotlight given that the world is experiencing a pandemic and businesses are fighting to stay digitally relevant and competitive. - -DevOps has actually has evolved quite nicely, like a fine wine. Here is why. There will be an increased focus on the human side of DevOps. It will be more about people and processes. I argue that DevOps will be reinvigorated. There will be less focus on the tools, automation, and orchestration and more about communication, collaboration, and a collective effort to remove bottlenecks and deliver the right results as efficiently as possible. - -There will even be a push to BizDevOps where development, ops, and business will come together to improve quality so defects and deficiencies are mitigated, business agility, focus on businesses becoming more agile, leaner. DevOps is expanding into areas like AI, machine learning, embedded systems, and big data. - -So DevOps is not going anywhere anytime soon. It will reinvent itself though. - -Given the insurgence of COVID19, businesses will be highly dependent on their DevOps teams, expecting them to take their digital services into hyperdrive over the next year and likely beyond 2021.  - -![DevOps books][2] - -(Tonya Brown, [CC BY-SA 4.0][3]) - -The books are listed in the order I think you should read them. I share a little bit about each book, but I don't intend to give the book away or do the reading for you. I hope you enjoy the experience of reading these books and decide for yourself whether they were valuable to you. And after you do, please come back and let me know what you think in the comments. - -### 1\. The DevOps Handbook - -![DevOps Handbook cover][4] - -_[The DevOps Handbook: How to Create World-Class Agility, Reliability, and Security in Technology Organizations][5]_ is considered the DevOps bible. It is written by Gene Kim, Jez Humble, Patrick Debois, and John Willis, and these great authors talk about the importance of integrating DevOps into organizations. The book describes how all types of organizations can employ DevOps and why it can help them gain a competitive advantage from an IT perspective. - -The book talks about the core benefits of DevOps. It offers practical applications about how to adopt DevOps, including case studies about companies that have done it, then really dives into some of its principles and breaks down the practical understanding. Finally, you can take the principles, case studies, and examples, look at your current environment, and figure out the best ways to implement DevOps in your organization. - -By reading this book, you will learn: - - * DevOps culture landscape - * Value stream mapping in DevOps - * Continuous integration and continuous delivery (CI/CD) pipelines - * Principles of flow and rapid feedback - * DevOps KPIs and metrics - - - -### 2\. The Phoenix Project - -![The Phoenix Project cover][6] - -_[The Phoenix Project][7]_, by Gene Kim, Kevin Behr, and George Spafford, is a novel about a fictional company and its fictional employees that explains what DevOps really is. It is written in the same style as _[The Goal: A Process of Ongoing Improvement][8]_ by Eliyahu M. Goldratt. - -_The Phoenix Project_ follows Bill, who was recently promoted into the role of VP at Parts Unlimited. He is assigned to turn around the company, which is in major trouble. Nothing is working, including the payment system. Bill is expected to come in and fix all of the company's problems. - -Bill starts identifying the issues and implementing solutions. As time goes on, those solutions turn out to be DevOps. - -In summary, the book: - - * Teaches a lesson in a novel form - * Allows you to see problems without blame - * Helps explain the core principles of DevOps - - - -### 3\. Continuous Delivery - -![Continuous Delivery cover][9] - -The third book to read, _[Continuous Delivery: Reliable Software Releases Through Build, Test, and Deployment Automation][10]_, is by Jez Humble and David Farley. It goes through the entire CI/CD pipeline and issues where you are trying to connect A to B, B to C, C to D. It provides practical tips and strategies on overcoming obstacles and fixing issues. - -The book discusses infrastructure management, virtualization, test, and deployment. It also gets into how to integrate and move things along effectively without problems when optimizing your environment. - -Jez and David definitely get granular in the details. They get down to the nuts and bolts of getting software to users using agile methodologies and best practices. They also speak to establishing better collaboration among developers, testers, and operations. - -### 4\. Effective DevOps - -![Effective DevOps cover][11] - -The fourth book to read is _[Effective DevOps: Building A Culture of Collaboration, Affinity, and Tooling at Scale][12]_ by Jennifer Davis & Ryn Daniels. - -DevOps is a state of mind. This book gets into DevOps culture: from empathy, to breaking down silos, to how people choose to act with and among each other, and how people work together to implement change and create great results. The book talks about strategies to accomplish these and especially about getting buy-in from leadership. - -Here is what you will learn by reading this book: - - * Essential and advanced practices to create CI/CD pipelines - * How to reduce risks, mitigate deployment errors, and increase delivery speed - * Templates and scripts to automate your build and deployment procedures - - - -### Final thoughts - -Read these four books. You won't regret it! And when you're finished, move on to these honorable mentions. - - * _[The Unicorn Project][13]_ by Gene Kim - * _[The Practice of Cloud System Administration: DevOps and SRE Practices for Web Services][14]_ by Thomas Limoncelli, Strata Chalup, and Christina Hogan - * _[Site Reliability Engineering][15]_ by Betsy Beyer, Niall Richards, David Rensin, Ken Kawahara, and Stephen Thorne - * _[Python for DevOps: Learn Ruthlessly Effective Automation][16]_ by Noah Gift, Kennedy Behrman, Alfredo Deza, and Grig Gheorghiu - - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/1/devops-books - -作者:[Taz Brown][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/heronthecli -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/reading_book_selfcare_wfh_learning_education_520.png?itok=H6satV2u (Reading a book, selfcare) -[2]: https://opensource.com/sites/default/files/uploads/devopsbooks.jpg (DevOps books) -[3]: https://creativecommons.org/licenses/by-sa/4.0/ -[4]: https://opensource.com/sites/default/files/uploads/devopshandbook.jpg (DevOps Handbook cover) -[5]: https://www.amazon.com/DevOps-Handbook-World-Class-Reliability-Organizations/dp/1942788002 -[6]: https://opensource.com/sites/default/files/uploads/phoenixproject.jpg (The Phoenix Project cover) -[7]: https://www.amazon.com/Phoenix-Project-DevOps-Helping-Business/dp/1942788290 -[8]: https://en.wikipedia.org/wiki/The_Goal_(novel) -[9]: https://opensource.com/sites/default/files/uploads/continuousdelivery.jpg (Continuous Delivery cover) -[10]: https://www.amazon.com/Continuous-Delivery-Deployment-Automation-Addison-Wesley/dp/0321601912 -[11]: https://opensource.com/sites/default/files/uploads/effectivedevops.jpg (Effective DevOps cover) -[12]: https://www.amazon.com/Effective-DevOps-Building-Collaboration-Affinity/dp/1491926309 -[13]: https://www.amazon.com/Unicorn-Project-Developers-Disruption-Thriving/dp/1942788762 -[14]: https://www.amazon.com/Practice-Cloud-System-Administration-Practices/dp/032194318X -[15]: https://www.amazon.com/Site-Reliability-Engineering-Production-Systems/dp/149192912X -[16]: https://www.amazon.com/Python-DevOps-Ruthlessly-Effective-Automation/dp/149205769X diff --git a/sources/tech/20210207 3 ways to play video games on Linux.md b/sources/tech/20210207 3 ways to play video games on Linux.md index 1c132ab588..e01c4b2e77 100644 --- a/sources/tech/20210207 3 ways to play video games on Linux.md +++ b/sources/tech/20210207 3 ways to play video games on Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (godgithubf) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20210210 Manage your budget on Linux with this open source finance tool.md b/sources/tech/20210210 Manage your budget on Linux with this open source finance tool.md deleted file mode 100644 index d671e6cbf2..0000000000 --- a/sources/tech/20210210 Manage your budget on Linux with this open source finance tool.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Manage your budget on Linux with this open source finance tool) -[#]: via: (https://opensource.com/article/21/2/linux-skrooge) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Manage your budget on Linux with this open source finance tool -====== -Make managing your finances easier with Skrooge, an open source -budgeting tool. -![2 cents penny money currency][1] - -In 2021, there are more reasons why people love Linux than ever before. In this series, I'll share 21 different reasons to use Linux. This article is about personal financial management. - -Personal finances can be difficult to manage. It can be frustrating and even scary when you don't have enough money to get by without financial assistance, and it can be surprisingly overwhelming when you do have the money you need but no clear notion of where it all goes each month. To make matters worse, we're often told to "make a budget" as if declaring the amount of money you can spend each month will somehow manifest the money you need. The bottom line is that making a budget is hard, and not meeting your financial goals is discouraging. But it's still important, and Linux has several tools that can help make the task manageable. - -### Money management - -As with anything else in life, we all have our own ways of keeping track of our money. I used to take a simple and direct approach: My paycheck was deposited into an account, and I'd withdraw some percentage in cash. Once the cash was gone from my wallet, I had to wait until the next payday to spend anything. It only took one day of missing out on lunch to learn that I had to take my goals seriously, and I adjusted my spending behavior accordingly. For the simple lifestyle I had at the time, it was an effective means of keeping myself honest with my income, but it didn't translate well to online business transactions, long-term utility contracts, investments, and so on. - -As I continue to refine the way I track my finances, I've learned that personal accounting is always an evolving process. We each have unique financial circumstances, which inform what kind of solution we can or should use to track our income and debt. If you're out of work, then your budgeting goal is likely to spend as little as possible. If you're working but paying off a student loan, then your goal probably favors sending money to the bank. And if you're working but planning for retirement, then you're probably trying to save as much as you can. - -The thing to remember about a budget is that it's meant to compare your financial reality with your financial _goals_. You can't avoid some expenses, but after those, you get to set your own priorities. If you don't hit your goals, you can adjust your own behavior or rewrite your goals so that they better reflect reality. Adapting your financial plan doesn't mean you've failed. It just means that your initial projection wasn't accurate. During hard times, you may not be able to hit any budget goals, but if you keep up with your budget, you'll learn a lot about what it takes financially to maintain your current lifestyle (whatever it may be). Over time, you can learn to adjust settings you may never have realized were available to you. For instance, people are moving to rural towns for the lower cost of living now that remote work is a widely accepted option. It's pretty stunning to see how such a lifestyle shift can alter your budget reports. - -The point is that budgeting is an often undervalued activity, and in no small part because it's daunting. It's important to realize that you can budget, no matter your level of expertise or interest in finances. Whether you [just use a LibreOffice spreadsheet][2], or try a dedicated financial application, you can set goals, track your own behavior, and learn a lot of valuable lessons that could eventually pay dividends. - -### Open source accounting - -There are several dedicated [personal finance applications for Linux][3], including [HomeBank][4], [Money Manager EX][5], [GNUCash][6], [KMyMoney][7], and [Skrooge][8]. All of these applications are essentially ledgers, a place you can retreat to at the end of each month (or whenever you look at your accounts), import data from your bank, and review how your expenditures align with whatever budget you've set for yourself. - -![Skrooge interface with financial data displayed][9] - -Skrooge - -I use Skrooge as my personal budget tracker. It's an easy application to set up, even with multiple bank accounts. Skrooge, as with most open source finance apps, can import multiple file formats, so my workflow goes something like this: - - 1. Log in to my banks. - 2. Export the month's bank statement as QIF files. - 3. Open Skrooge. - 4. Import the QIF files. Each gets assigned to their appropriate accounts automatically. - 5. Review my expenditures compared to the budget goals I've set for myself. If I've gone over, then I dock next month's goals (so that I'll ideally spend less to make up the difference). If I've come in under my goal, then I move the excess to December's budget (so I'll have more to spend at the end of the year). - - - -I only track a subset of the household budget in Skrooge. Skrooge makes that process easy through a dynamic database that allows me to categorize multiple transactions at once with custom tags. This makes it easy for me to extract my personal expenditures from general household and utility expenses, and I can leverage these categories when reviewing the autogenerated reports Skrooge provides. - -![Skrooge budget pie chart][10] - -Skrooge budget pie chart - -Most importantly, the popular Linux financial apps allow me to manage my budget the way that works best for me. For instance, my partner prefers to use a LibreOffice spreadsheet, but with very little effort, I can extract a CSV file from the household budget, import it into Skrooge, and use an updated set of data. There's no lock-in, no incompatibility. The system is flexible and agile, allowing us to adapt our budget and our method of tracking expenses as we learn more about effective budgeting and about what life has in store. - -### Open choice - -Money markets worldwide differ, and the way we each interact with them also defines what tools we can use. Ultimately, your choice of what to use for your finances is a decision you must make based on your own requirements. And one thing open source does particularly well is provide its users the freedom of choice. - -When setting my own financial goals, I appreciate that I can use whatever application fits in best with my style of personal computing. I get to retain control of how I process the data in my life, even when it's data I don't necessarily enjoy having to process. Linux and its amazing set of applications make it just a little less of a chore. - -Try some financial apps on Linux and see if you can inspire yourself to set some goals and save money! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/linux-skrooge - -作者:[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/Medical%20Costs%20Transparency_1.jpg?itok=CkZ_J88m (2 cents penny money currency) -[2]: https://opensource.com/article/20/3/libreoffice-templates -[3]: https://opensource.com/life/17/10/personal-finance-tools-linux -[4]: http://homebank.free.fr/en/index.php -[5]: https://www.moneymanagerex.org/download -[6]: https://opensource.com/article/20/2/gnucash -[7]: https://kmymoney.org/download.html -[8]: https://apps.kde.org/en/skrooge -[9]: https://opensource.com/sites/default/files/skrooge.jpg -[10]: https://opensource.com/sites/default/files/skrooge-pie_0.jpg diff --git a/sources/tech/20210211 31 open source text editors you need to try.md b/sources/tech/20210211 31 open source text editors you need to try.md deleted file mode 100644 index d9ca620bf4..0000000000 --- a/sources/tech/20210211 31 open source text editors you need to try.md +++ /dev/null @@ -1,182 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (31 open source text editors you need to try) -[#]: via: (https://opensource.com/article/21/2/open-source-text-editors) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -31 open source text editors you need to try -====== -Looking for a new text editor? Here are 31 options to consider. -![open source button on keyboard][1] - -Computers are text-based, so the more things you do with them, the more you find yourself needing a text-editing application. And the more time you spend in a text editor, the more likely you are to demand more from whatever you use. - -If you're looking for a good text editor, you'll find that Linux has plenty to offer. Whether you want to work in the terminal, on your desktop, or in the cloud, you can literally try a different editor every day for a month (or one a month for almost three years) in your relentless search for the perfect typing experience. - -### Vim-like editors - -![][2] - - * [Vi][3] ships with every Linux, BSD, Solaris, and macOS installation. It's the quintessential Unix text editor, with its unique combination of editing modes and super-efficient single-key shortcuts. The original Vi editor was an application written by Bill Joy, creator of the C shell. Modern incarnations of Vi, most notably Vim, have added many features, including multiple levels of undo, better navigation while in insert mode, line folding, syntax highlighting, plugin support, and much more. It takes practice (it even has its own tutor application, vimtutor.) - * [Kakoune][4] is a Vim-inspired application with a familiar, minimalistic interface, short keyboard shortcuts, and separate editing and insert modes. It looks and feels a lot like Vi at first, but with its own unique style, both in design and function. As a special bonus, it features an implementation of the Clippy interface. - - - -### emacs editors - -![][5] - - * The original free emacs, and one of the first official applications of the GNU project that started the Free Software movement, [GNU Emacs][6] is a wildly popular text editor. It's great for sysadmins, developers, and everyday users alike, with loads of features and seemingly endless extensions. Once you start using Emacs, you might find it difficult to think of a reason to close it because it's just that versatile! - * If you like Emacs but find GNU Emacs too bloated, then you might like [Jove][7]. Jove is a terminal-based emacs editor. It's easy to use, but if you're new to emacsen (the plural of emacs), Jove is also easy to learn, thanks to the teachjove command. - * Another lightweight emacs editor, [Jed][8] is a simple incarnation of a macro-based workflow. One thing that sets it apart from other editors is its use of [S-Lang][9], a C-like scripting language providing extensibility options to developers more comfortable with C than with Lisp. - - - -### Interactive editors - -![][10] - - * [GNU nano][11] takes a bold stance on terminal-based text editing: it provides a menu. Yes, this humble editor takes a cue from GUI editors by telling the user exactly which key they need to press to perform a specific function. This is a refreshing take on user experience, so it's no wonder that it's nano, not Vi, that's set as the default editor for "user-friendly" distributions. - * [JOE][12] is based on an old text-editing application called WordStar. If you're not familiar with Wordstar, JOE can also mimic Emacs or GNU nano. By default, it's a good compromise between something relatively mysterious like Emacs or Vi and the always-on verbosity of GNU Nano (for example, it tells you how to activate an onscreen help display, but it's not on by default). - * The excellent [e3][13] application is a tiny text editor with five built-in keyboard shortcut schemes to emulate Emacs, Vi, nano, NEdit, and WordStar. In other words, no matter what terminal-based editor you are used to, you're likely to feel right at home with e3. - - - -### ed and more - - * The [ed][14] line editor is part of the [POSIX][15] and Open Group's standard definition of a Unix-based operating system. You can count on it being installed on nearly every Linux or Unix system you'll ever encounter. It's tiny, terse, and tip-top. - * Building upon ed, the [Sed][16] stream editor is popular both for its functionality and its syntax. Most Linux users learn at least one sed command when searching for the easiest and fastest way to update a line in a config file, but it's worth taking a closer look. Sed is a powerful command with lots of useful subcommands. Get to know it better, and you may find yourself open text editor applications a lot less frequently. - * You don't always need a text editor to edit text. The [heredoc][17] (or Here Doc) system, available in any POSIX terminal, allows you to type text directly into your open terminal and then pipes what you type into a text file. It's not the most robust editing experience, but it is versatile and always available. - - - -### Minimalist editors - -![][18] - -If your idea of a good text editor is a word processor except without all the processing, you're probably looking for one of these classics. These editors let you write and edit text with minimal interference and minimal assistance. What features they do offer are often centered around markup, Markdown, or code. Some have names that follow a certain pattern: - - * [Gedit][19] from the GNOME team - * [medit][20] for a classic GNOME feel - * [Xedit][21] uses only the most basic X11 libraries - * [jEdit][22] for Java aficionados - - - -A similar experience is available for KDE users: - - * [Kate][23] is an unassuming editor with all the features you need. - * [KWrite][24] hides a ton of useful features in a deceptively simple, easy-to-use interface. - - - -And there are a few for other platforms: - - * [Notepad++][25] is a popular Windows application, while Notepadqq takes a similar approach for Linux. - * [Pe][26] is for Haiku OS (the reincarnation of that quirky child of the '90s, BeOS). - * [FeatherPad][27] is a basic editor for Linux but with some support for macOS and Haiku. If you're a Qt hacker looking to port code, take a look! - - - -### IDEs - -![][28] - -There's quite a crossover between text editors and integrated development environments (IDEs). The latter really is just the former with lots of code-specific features added on. If you use an IDE regularly, you might find an XML or Markdown editor lurking in your extension manager: - - * [NetBeans][29] is a handy text editor for Java users. - * [Eclipse][30] offers a robust editing suite with lots of extensions to give you the tools you need. - - - -### Cloud-based editors - -![][31] - -Working in the cloud? You can write there too, you know. - - * [Etherpad][32] is a text editor app that runs on the web. There are free and independent instances for you to use, or you can set up your own. - * [Nextcloud][33] has a thriving app scene and includes both a built-in text editor and a third-party Markdown editor with live preview. - - - -### Newer editors - -![][34] - -Everybody has an idea about what makes a text editor perfect. For that reason, new editors are released each year. Some reimplement classic old ideas in a new and exciting way, some have unique takes on the user experience, and some focus on specific needs. - - * [Atom][35] is an all-purpose modern text editor from GitHub featuring lots of extensions and Git integration. - * [Brackets][36] is an editor from Adobe for web developers. - * [Focuswriter][37] seeks to help you focus on writing with helpful features like a distraction-free fullscreen mode, optional typewriter sound effects, and beautiful configuration options. - * [Howl][38] is a progressive, dynamic editor based on Lua and Moonscript. - * [Norka][39] and [KJots][40] mimic a notebook with each document representing a "page" in your "binder." You can take individual pages out of your notebook through export functions. - - - -### DIY editor - -![][41] - -As the saying does _NOT_ go: Why use somebody else's application when you can write your own? Linux has over 30 text editors available, so probably the last thing it really needs is another one. Then again, part of the fun of open source is the ability to experiment. - -If you're looking for an excuse to learn how to program, making your own text editor is a great way to get started. You can achieve the basics in about 100 lines of code, and the more you use it, the more you'll be inspired to learn more so you can make improvements. Ready to get started? Go and [create your own text editor][42]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/open-source-text-editors - -作者:[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/button_push_open_keyboard_file_organize.png?itok=KlAsk1gx (open source button on keyboard) -[2]: https://opensource.com/sites/default/files/kakoune-screenshot.png -[3]: https://opensource.com/article/20/12/vi-text-editor -[4]: https://opensource.com/article/20/12/kakoune -[5]: https://opensource.com/sites/default/files/jed.png -[6]: https://opensource.com/article/20/12/emacs -[7]: https://opensource.com/article/20/12/jove-emacs -[8]: https://opensource.com/article/20/12/jed -[9]: https://www.jedsoft.org/slang -[10]: https://opensource.com/sites/default/files/uploads/nano-31_days-nano-opensource.png -[11]: https://opensource.com/article/20/12/gnu-nano -[12]: https://opensource.com/article/20/12/31-days-text-editors-joe -[13]: https://opensource.com/article/20/12/e3-linux -[14]: https://opensource.com/article/20/12/gnu-ed -[15]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains -[16]: https://opensource.com/article/20/12/sed -[17]: https://opensource.com/article/20/12/heredoc -[18]: https://opensource.com/sites/default/files/uploads/gedit-31_days_gedit-opensource.jpg -[19]: https://opensource.com/article/20/12/gedit -[20]: https://opensource.com/article/20/12/medit -[21]: https://opensource.com/article/20/12/xedit -[22]: https://opensource.com/article/20/12/jedit -[23]: https://opensource.com/article/20/12/kate-text-editor -[24]: https://opensource.com/article/20/12/kwrite-kde-plasma -[25]: https://opensource.com/article/20/12/notepad-text-editor -[26]: https://opensource.com/article/20/12/31-days-text-editors-pe -[27]: https://opensource.com/article/20/12/featherpad -[28]: https://opensource.com/sites/default/files/uploads/eclipse-31_days-eclipse-opensource.png -[29]: https://opensource.com/article/20/12/netbeans -[30]: https://opensource.com/article/20/12/eclipse -[31]: https://opensource.com/sites/default/files/uploads/etherpad_0.jpg -[32]: https://opensource.com/article/20/12/etherpad -[33]: https://opensource.com/article/20/12/31-days-text-editors-nextcloud-markdown-editor -[34]: https://opensource.com/sites/default/files/uploads/atom-31_days-atom-opensource.png -[35]: https://opensource.com/article/20/12/atom -[36]: https://opensource.com/article/20/12/brackets -[37]: https://opensource.com/article/20/12/focuswriter -[38]: https://opensource.com/article/20/12/howl -[39]: https://opensource.com/article/20/12/norka -[40]: https://opensource.com/article/20/12/kjots -[41]: https://opensource.com/sites/default/files/uploads/this-time-its-personal-31_days_yourself-opensource.png -[42]: https://opensource.com/article/20/12/31-days-text-editors-one-you-write-yourself diff --git a/sources/tech/20210305 Build a printer UI for Raspberry Pi with XML and Java.md b/sources/tech/20210305 Build a printer UI for Raspberry Pi with XML and Java.md deleted file mode 100644 index 7e9be8dfd0..0000000000 --- a/sources/tech/20210305 Build a printer UI for Raspberry Pi with XML and Java.md +++ /dev/null @@ -1,282 +0,0 @@ -[#]: subject: (Build a printer UI for Raspberry Pi with XML and Java) -[#]: via: (https://opensource.com/article/21/3/raspberry-pi-totalcross) -[#]: author: (Edson Holanda Teixeira Junior https://opensource.com/users/edsonhtj) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Build a printer UI for Raspberry Pi with XML and Java -====== -TotalCross makes it quick to build user interfaces for embedded -applications. -![Tips and gears turning][1] - -Creating a GUI from scratch is a very time consuming process, dealing with all the positions and alignments in hard code can be really tough for some programmers. In this article, I demonstrate how to speed up this process using XML. - -This project uses [TotalCross][2] as the target framework. TotalCross is an open source, cross-platform software development kit (SDK) developed to create GUIs for embedded devices faster. TotalCross provides Java's development benefits without needing to run Java on a device because it uses its own bytecode and virtual machine (TC bytecode and TCVM) for performance enhancement. - -I also use Knowcode-XML, an open source XML parser for the TotalCross framework, which converts XML files into TotalCross components. - -### Project requirements - -To reproduce this project, you need: - - * [KnowCode-XML][3] - * [VSCode][4] [or VSCodium][5] - * [An Android development environment][6] - * [TotalCross plugin for VSCode][7] - * Java 11 or greater for your development platform ([Linux][8], [Mac][9], or [Windows][10]) - * [Git][11] - - - -### Building the embedded application - -This application consists of an embedded GUI with basic print functionalities, such as scan, print, and copy. - -![printer init screen][12] - -(Edson Holanda Teixeira Jr, [CC BY-SA 4.0][13]) - -Several steps are required to create this GUI, including generating the GUI with Android-XML and then using the Knowcode-XML parser to run it on the TotalCross Framework. - -#### 1\. Generate the Android XML - -For creating the XML file, first create a simple Android screen, and then customize it. If you don't know how to write Android-XM, or you just want a headstart, you can download this application’s XML from this [GitHub project][14]. This project also contains the images you need to render the GUI. - -#### 2\. Adjust the XML - -After generating the XML files, you need to make some fine adjustments to make sure everything is aligned, with the right proportions, and has the correct path to the images. - -Add the XML layouts to the **Layouts** folder and all the assets to the **Drawable** folder. Then you can start to customize the XML. - -For example, if you want to change an XML object's background, change the `android:background` attribute: - - -``` -`android:background="@drawable/scan"` -``` - -You can change the object's position with `tools:layout_editor_absoluteX` and `tools:layout_editor_absoluteY`: - - -``` -tools:layout_editor_absoluteX="830dp" -tools:layout_editor_absoluteY="511dp" -``` - -Change the object's size with `android:layout_width` and `android:layout_height`: - - -``` -android:layout_width="70dp" -android:layout_height="70dp" -``` - -If you want to put text on an object, you can use `android:textSize`, `android:text`, `android:textStyle`, and `android:textColor`: - - -``` -android:textStyle="bold" -android:textColor="#000000" -android:textSize="20dp" -android:text="2:45PM" -``` - -Here is an example of a complete XML object: - - -``` -    <ImageButton -           android:id="@+id/ImageButton" -           android:layout_width="70dp" -           android:layout_height="70dp" -           tools:layout_editor_absoluteX="830dp" -           tools:layout_editor_absoluteY="511dp" -           android:background="@drawable/home_config" /> -``` - -#### 3\. Run the GUI on TotalCross - -After you make all the XML adjustments, it's time to run it on TotalCross. Create a new project on the TotalCross extension and add the **XML** and **Drawable** folders to the **Main** folder. If you're not sure how to create a TotalCross project, see our [get started guide][15]. - -After configuring the environment, use `totalcross.knowcode.parse.XmlContainerFactory` and `import totalcross.knowcode.parse.XmlContainerLayout` to use the XML GUI on the TotalCross framework. You can find more information about using KnowCode-XML on its [GitHub page][3]. - -#### 4\. Add transitions - -This project's smooth transition effect is created by the `SlidingNavigator` class, which uses TotalCross' `ControlAnimation` class to slide from one screen to the other. - -Call `SlidingNavigator` on the `XMLpresenter` class: - - -``` -`new SlidingNavigator(this).present(HomePresenter.class);` -``` - -Implement the `present` function on the `SlidingNavigator` class: - - -``` -public void present(Class<? extends XMLPresenter> presenterClass) -         throws [InstantiationException][16], [IllegalAccessException][17] { -      final XMLPresenter presenter = cache.containsKey(presenterClass) ? cache.get(presenterClass) -            : presenterClass.newInstance(); -      if (!cache.containsKey(presenterClass)) { -         cache.put(presenterClass, presenter); -      } - -      if (presenters.isEmpty()) { -         window.add(presenter.content, LEFT, TOP, FILL, FILL); -      } else { -         XMLPresenter previous = presenters.lastElement(); - -         window.add(presenter.content, AFTER, TOP, SCREENSIZE, SCREENSIZE, previous.content); -``` - -`PathAnimation` in animation control creates the sliding animation from one screen to another: - - -``` -         PathAnimation.create(previous.content, -Settings.screenWidth, 0, new ControlAnimation.AnimationFinished() { -            @Override -            public void onAnimationFinished(ControlAnimation anim) { -               window.remove(previous.content); -            } -         }, 1000).with(PathAnimation.create(presenter.content, 0, 0, new ControlAnimation.AnimationFinished() { -            @Override -            public void onAnimation Finished(Control Animation anim) { -               presenter.content.setRect(LEFT, TOP, FILL, FILL); -            } -         }, 1000)).start(); -      } -      presenter.setNavigator(this); -      presenters.push(presenter); -      presenter.bind2(); -      if (presenter.isFirstPresent) { -         presenter.onPresent(); -         presenter.isFirstPresent = false; -      } -``` - -#### 5\. Load spinners - -Another nice feature in the printer application is the loading screen animation that shows progress. It includes text and a spinning animation. - -![Loading Spinner][18] - -(Edson Holanda Teixeira Jr, [CC BY-SA 4.0][13]) - -Implement this feature by adding a timer and a timer listener to update the progress label, then call the function `spinner.start()`. All of the animations are auto-generated by TotalCross and KnowCode: - - -``` -public void startSpinner() { -        time = content.addTimer(500); -        content.addTimerListener((e) -> { -            try { -                progress(); // Updates the Label -            } catch (InstantiationException | IllegalAccessException e1) { -                // TODO Auto-generated catch block -                e1.printStackTrace(); -            } -        }); -        Spinner spinner = (Spinner) ((XmlContainerLayout) content).getControlByID("@+id/spinner"); -        spinner.start(); -    } -``` - -The spinner is instantiated as a reference to the `XmlContainerLayout` spinner described in the XML file: - - -``` -<ProgressBar -android:id="@+id/spinner" -android:layout_width="362dp" -android:layout_height="358dp" -tools:layout_editor_absoluteX="296dp" -tools:layout_editor_absoluteY="198dp" -   android:indeterminateTint="#2B05C7" -style="?android:attr/progressBarStyle" /> -``` - -#### 6\. Build the application - -It's time to build the application. You can see and change the target systems in `pom.xml`. Make sure the **Linux Arm** target is available. - -If you are using VSCode, press **F1** on the keyboard, select **TotalCross: Package** and wait for the package to finish. Then you can see the installation files in the **Target** folder. - -#### 7\. Deploy and run the application on Raspberry Pi - -To deploy the application on a [Raspberry Pi 4][19] with the SSH protocol, press **F1** on the keyboard. Select **TotalCross: Deploy&Run** and provide information about your SSH connection: User, IP, Password, and Application Path. - -![TotalCross: Deploy&Run][20] - -(Edson Holanda Teixeira Jr, [CC BY-SA 4.0][13]) - -![SSH user][21] - -(Edson Holanda Teixeira Jr, [CC BY-SA 4.0][13]) - -![IP address][22] - -(Edson Holanda Teixeira Jr, [CC BY-SA 4.0][13]) - -![Password][23] - -(Edson Holanda Teixeira Jr, [CC BY-SA 4.0][13]) - -![Path][24] - -(Edson Holanda Teixeira Jr, [CC BY-SA 4.0][13]) - -Here's what the application looks like running on the machine. - -### What's next? - -KnowCode makes it easier to create and manage your application screens using Java. Knowcode-XML translates your XML into a TotalCross GUI that in turn generates the binary to run on your Raspberry Pi. - -Combining KnowCode technology with TotalCross enables you to create embedded applications faster. Find out what else you can do by accessing our [embedded samples][25] on GitHub and editing your own application. - -If you have questions, need help, or just want to interact with other embedded GUI developers, feel free to join our [Telegram][26] group to discuss embedded applications on any framework. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/raspberry-pi-totalcross - -作者:[Edson Holanda Teixeira Junior][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/edsonhtj -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png?itok=HcN38NOk (Tips and gears turning) -[2]: https://opensource.com/article/20/7/totalcross-cross-platform-development -[3]: https://github.com/TotalCross/knowcode-xml -[4]: https://code.visualstudio.com/ -[5]: https://opensource.com/article/20/6/open-source-alternatives-vs-code -[6]: https://developer.android.com/studio -[7]: https://marketplace.visualstudio.com/items?itemName=totalcross.vscode-totalcross -[8]: https://opensource.com/article/19/11/install-java-linux -[9]: https://opensource.com/article/20/7/install-java-mac -[10]: http://adoptopenjdk.net -[11]: https://opensource.com/life/16/7/stumbling-git -[12]: https://opensource.com/sites/default/files/uploads/01_printergui.png (printer init screen) -[13]: https://creativecommons.org/licenses/by-sa/4.0/ -[14]: https://github.com/TotalCross/embedded-samples/tree/main/printer-application/src/main/resources/layout -[15]: https://totalcross.com/get-started/?utm_source=opensource&utm_medium=article&utm_campaign=printer -[16]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+instantiationexception -[17]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+illegalaccessexception -[18]: https://opensource.com/sites/default/files/uploads/03progressspinner.png (Loading Spinner) -[19]: https://www.raspberrypi.org/products/raspberry-pi-4-model-b/ -[20]: https://opensource.com/sites/default/files/uploads/04_totalcross-deployrun.png (TotalCross: Deploy&Run) -[21]: https://opensource.com/sites/default/files/uploads/05_ssh.png (SSH user) -[22]: https://opensource.com/sites/default/files/uploads/06_ip.png (IP address) -[23]: https://opensource.com/sites/default/files/uploads/07_password.png (Password) -[24]: https://opensource.com/sites/default/files/uploads/08_path.png (Path) -[25]: https://github.com/TotalCross/embedded-samples -[26]: https://t.me/totalcrosscommunity diff --git a/sources/tech/20210615 Listen to music on FreeDOS.md b/sources/tech/20210615 Listen to music on FreeDOS.md deleted file mode 100644 index 35431d0388..0000000000 --- a/sources/tech/20210615 Listen to music on FreeDOS.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: subject: (Listen to music on FreeDOS) -[#]: via: (https://opensource.com/article/21/6/listen-music-freedos) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Listen to music on FreeDOS -====== -Mplayer is an open source media player that's usually found on Linux, -Windows, Mac, and DOS. -![Woman programming][1] - -Music is a great way to relax. On Linux, I listen to music using Rhythmbox. But did you know you can listen to music on FreeDOS, as well? Let's take a look at two popular programs to listen to music: - -### Listen to music with Mplayer - -[Mplayer][2] is an open source media player that's usually found on Linux, Windows, and Mac—but there's a DOS version available, too. And that's the version we include in FreeDOS. While the DOS port is based on an older version (version 1.0rc2-3-3-2 from 2007) it is perfectly serviceable for playing media on DOS. - -I use Mplayer to listen to music files on FreeDOS. For this example, I've copied one of my favorite audiobooks, Doctor Who: Flashpoint by [Big Finish Productions][3], and saved it as `C:\MUSIC\FLASHPNT.MP3` on my FreeDOS computer. To listen to Flashpoint on FreeDOS, I launch Mplayer from the FreeDOS command line and specify the MP3 filename to play. The basic usage of Mplayer is `mplayer [options] filename` so if the default settings work well for you, then you can just launch Mplayer with the filename. In this case, I ran these commands to change my working directory to `\MUSIC` and then run Mplayer with my MP3 audiobook file: - - -``` -CD \MUSIC -MPLAYER FLASHPNT.MP3 -``` - -FreeDOS is _case insensitive_, so it will accept uppercase or lowercase letters for DOS commands and any files or directories. You could also type `cd \music` or `Cd \Music` to move into the Music directory, and that would work the same. - -![mplayer on FreeDOS][4] - -You can use Mplayer to listen to MP3 files -(Jim Hall, [CC-BY SA 4.0][5]) - -Using Mplayer is a "no frills" way to listen to music files on FreeDOS. But at the same time, it's not distracting, so I can leave FreeDOS to play the MP3 file on my DOS computer while I use my other computer to do something else. However, FreeDOS runs tasks one at a time (in other words, DOS is a "single-tasking" operating system) so I cannot run Mplayer in the "background" on FreeDOS while I work on something else _on the same FreeDOS computer_. - -Note that Mplayer is a big program that requires a lot of memory to run. While DOS itself doesn't require much RAM to operate, I recommend at least 16 megabytes of memory to run Mplayer. - -### Listen to audio files with Open Cubic Player - -FreeDOS offers more than just Mplayer for playing media. We also include the [Open Cubic Player][6], which supports a variety of file formats including Midi and WAV files. - -In 1999, I recorded a short audio file of me saying, "Hello, this is Jim Hall, and I pronounce 'FreeDOS' as _FreeDOS_." This was meant as a joke, riffing off of a [similar audio file][7] (`english.au`, included in the Linux source code tree in 1994) recorded by Linus Torvalds to demonstrate how he pronounces "Linux." We don't distribute the _FreeDOS_ audio clip in FreeDOS itself, but you are welcome to download it from our [Silly Sounds][8] directory, found in the FreeDOS files archive at [Ibiblio][9]. - -You can listen to the _FreeDOS_ audio clip using the Open Cubic Player. To run Open Cubic Player, you normally would run `CP` from the `\APPS\OPENCP` directory. However, Open Cubic Player is a 32-bit application that requires a 32-bit DOS extender. A common DOS extender is DOS/4GW. While free to use, DOS/4GW is not an open source program, so we do not distribute it as a FreeDOS package. - -Instead, FreeDOS provides another open source 32-bit extender called DOS/32A. If you did not install everything when you installed FreeDOS, you may need to install it using [FDIMPLES][10]. I used these two commands to move into the `\APPS\OPENCP` directory, and to run Open Cubic Player using the DOS/32A extender: - - -``` -CD \APPS\OPENCP -DOS32A CP -``` - -Open Cubic Player doesn't sport a fancy user interface, but you can use the arrow keys to navigate the _File Selector_ to the directory that contains the media file you want to play. - -![Open Cubic Player][11] - -Open Cubic Player opens with a file selector -(Jim Hall, [CC-BY SA 4.0][5]) - -The text appears smaller than in other DOS applications because Open Cubic Player automatically changes the display to use 50 lines of text, instead of the usual 25 lines. Open Cubic Player will reset the display back to 25 lines when you exit the program. - -When you have selected your media file, Open Cubic Player will play it in a loop. (Press the Esc key on your keyboard to quit.) As the file plays over the speakers, Open Cubic Player displays a spectrum analyzer so you can see the audio for the left and right channels. The _FreeDOS_ audio clip is recorded in mono, so the left and right channels are the same. - -![Open Cubic Player][12] - -Open Cubic Player playing the "FreeDOS" audio clip -(Jim Hall, [CC-BY SA 4.0][5]) - -DOS may be from an older era, but that doesn't mean you can't use FreeDOS to run modern tasks or play current media. If you like to listen to digital music, try using Open Cubic Player or Mplayer on FreeDOS. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/listen-music-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/programming-code-keyboard-laptop-music-headphones.png?itok=EQZ2WKzy (Woman programming) -[2]: https://en.wikipedia.org/wiki/MPlayer -[3]: https://bigfinish.com/ -[4]: https://opensource.com/sites/default/files/uploads/mplayer.png (You can use Mplayer to listen to MP3 files) -[5]: https://creativecommons.org/licenses/by-sa/4.0/ -[6]: https://www.cubic.org/player/ -[7]: https://commons.wikimedia.org/wiki/File:Linus-linux.ogg -[8]: https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/util/sillysounds/ -[9]: https://www.ibiblio.org/ -[10]: https://opensource.com/article/21/6/freedos-package-manager -[11]: https://opensource.com/sites/default/files/uploads/opencp1.png (Open Cubic Player opens with a file selector) -[12]: https://opensource.com/sites/default/files/uploads/opencp2.png (Open Cubic Player playing the "FreeDOS" audio clip) diff --git a/sources/tech/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md b/sources/tech/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md index 49cfea21b5..7808a3994d 100644 --- a/sources/tech/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md +++ b/sources/tech/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md @@ -1,19 +1,19 @@ -[#]: subject: (How to Fix yay: error while loading shared libraries: libalpm.so.12) -[#]: via: (https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/) -[#]: author: (Arindam https://www.debugpoint.com/author/admin1/) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: subject: "How to Fix yay: error while loading shared libraries: libalpm.so.12" +[#]: via: "https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " How to Fix yay: error while loading shared libraries: libalpm.so.12 ====== -This quick guide is to help you to fix yay error – while loading shared -libraries: libalpm.so.12. -If you are running [Arch Linux][1] in a system for a longer time, things can break due to its rolling release nature combined with your hardware support. If you use the [AUR Helper Yay][2], then sometimes, yay can be corrupted due to several installations, upgrade of other packages. +This quick guide is to help you to fix yay error – while loading shared libraries: libalpm.so.12. -The YAY helper itself is very stable, but sometimes it gets messed up, and you can not do any installation using it until you fix it. And one of the nagging error is this: +If you are running [Arch Linux][1] in a system for longer, things can break due to its rolling release nature combined with your hardware support. If you use the AUR Helper Yay, then sometimes, yay can be corrupted due to several installations upgrades of other packages. + +The YAY helper is very stable, but sometimes it gets messed up, and you can not do any installation using it until you fix it. And one of the nagging errors is this: ``` yay: error while loading shared libraries: libalpm.so.12: cannot open shared object file: No such file or directory @@ -21,21 +21,17 @@ yay: error while loading shared libraries: libalpm.so.12: cannot open shared obj This error particularly comes after upgrading to pacman 6.0 due to incompatibility of shared libraries. -![error while loading shared libraries – yay][3] +![error while loading shared libraries - yay][2] ### How to fix yay error – while loading shared libraries: libalpm.so.12 - * This error can only be fixed by uninstalling yay completely, including its dependencies. - * Then re-installing yay. - - - * There is no other way to solve this error. - - - * We already have a guide [how to install Yay][4], however, here are the steps to fix. - * Clone the yay repo from AUR and build. Run the following command in sequence from a terminal window. +* This error can only be fixed by uninstalling yay completely, including its dependencies. +* Then re-installing yay. +* There is no other way to solve this error. +* We already have a guide [how to install Yay][3], however, here are the steps to fix. +* Clone the yay repo from AUR and build. Run the following command in sequence from a terminal window. ``` cd /tmp @@ -46,32 +42,24 @@ cd ~ rm -rf /tmp/yay/ ``` -After installation, you can try running the command which gave you this error. And you should be all set. If you’re still having error, let me know in the comment box below. +After installation, you can try running the command which gave you this error. And you should be all set. If you still have this error, let me know in the comment box below. -Apparently, this has been encountered by many people and [several discussions][5] happened across web. Above is the only solution to this error. And I could not find exact root cause of the problem anywhere except it starts after pacman 6.0 update. - -[][6] - -SEE ALSO:   How to Install Java in Arch Linux and Manjaro - -* * * +Many people have encountered this, and [several discussions][4] happened across the web. Above is the only solution to this error. And I could not find the exact root cause of the problem anywhere except it started after pacman 6.0 update. -------------------------------------------------------------------------------- via: https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/ 作者:[Arindam][a] -选题:[lujun9972][b] +选题:[lkxed][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 +[b]: https://github.com/lkxed [1]: https://archlinux.org/ -[2]: https://aur.archlinux.org/packages/yay/ -[3]: https://www.debugpoint.com/blog/wp-content/uploads/2021/07/error-while-loading-shared-libraries-yay.jpg -[4]: https://www.debugpoint.com/2021/01/install-yay-arch/ -[5]: https://github.com/Jguer/yay/issues/1519 -[6]: https://www.debugpoint.com/2021/02/install-java-arch/ +[2]: https://www.debugpoint.com/wp-content/uploads/2021/07/error-while-loading-shared-libraries-yay.jpg +[3]: https://www.debugpoint.com/2021/01/install-yay-arch/ +[4]: https://github.com/Jguer/yay/issues/1519 diff --git a/sources/tech/20210725 How to Recover Arch Linux Install via chroot.md b/sources/tech/20210725 How to Recover Arch Linux Install via chroot.md index 66497c1592..bf684b6e08 100644 --- a/sources/tech/20210725 How to Recover Arch Linux Install via chroot.md +++ b/sources/tech/20210725 How to Recover Arch Linux Install via chroot.md @@ -1,16 +1,16 @@ -[#]: subject: (How to Recover Arch Linux Install via chroot) -[#]: via: (https://www.debugpoint.com/2021/07/recover-arch-linux/) -[#]: author: (Arindam https://www.debugpoint.com/author/admin1/) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: subject: "How to Recover Arch Linux Install via chroot" +[#]: via: "https://www.debugpoint.com/2021/07/recover-arch-linux/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " How to Recover Arch Linux Install via chroot ====== -This quick guide explains some of the steps which may come in handy to -recover an Arch Linux Install. +This quick guide explains some of the steps which may come in handy to recover an Arch Linux Install. + Being a rolling release, sometimes things breaks in [Arch Linux][1]. Not because of your own actions, but hundreds of other reasons such as new Kernel vs your hardware, or software compatibility. But still, Arch Linux is still better and provides the latest packages and applications. But sometimes, it gives you trouble and you end up with a blinking cursor and nothing else. @@ -19,126 +19,100 @@ So, in those scenarios, instead of re-formatting or reinstalling, you may want t ### Recover Arch Linux Installation - * First step is to **create a bootable LIVE USB** with Arch Linux. Download the .ISO from this link and create a bootable .ISO. You can check out this guide on [how to create bootable .ISO using Etcher][2]. Remember this step require another working stable system obviously as your current system is not usable. - - +* First step is to create a bootable LIVE USB with Arch Linux. Download the .ISO from this link and create a bootable .ISO. You can check out this guide on [how to create bootable .ISO using Etcher][2]. Remember this step require another working stable system obviously as your current system is not usable. [download arch linux][3] - * You need to know on **which partition your Arch Linux** is installed. This is a very important step. If you don’t know, you can use GParted to find out. Or check in your Grub menu, Or you can run the below command to find out. This will list all of your disk partitions with their size, labels. - - +* You need to know on which partition your Arch Linux is installed. This is a very important step. If you don’t know, you can use GParted to find out. Or check in your Grub menu, Or you can run the below command to find out. This will list all of your disk partitions with their size, labels. ``` sudo lsblk -o name,mountpoint,label,size,uuid ``` - * Once done, plug-in the USB stick and boot from it. And you should see the Arch Linux prompt in the LIVE medium. - - - * Now, mount to the Arch Linux partition using below. Change the `/dev/sda3` to your respective partition. - +* Once done, plug-in the USB stick and boot from it. And you should see the Arch Linux prompt in the LIVE medium. +* Now, mount to the Arch Linux partition using below. Change the /dev/sda3 to your respective partition. ``` -mount /dev/sda3 /mnt -arch-chroot /mnt +/dev/sda3 ``` - * The arch-chroot command will mount your Arch Linux partition in the terminal, so login using your Arch credentials. Now, at this stage, you have the following options, based on what you want. +``` +mount /dev/sda3 /mntarch-chroot /mnt +``` +* The arch-chroot command will mount your Arch Linux partition in the terminal, so login using your Arch credentials. Now, at this stage, you have the following options, based on what you want. - * You can take backups of your data by going through /home folders. In case, troubleshooter doesn’t work. You may copy the files to external USB or another partition. - - - * Verify the log files, specially the **pacman logs**. Because, unstable system may be caused by upgrading some packages such graphics driver or any other driver. Based on the log, you may want to downgrade any specific package if you want. - * You may use the below command to view last 200 lines of the pacman log file to find out any failing items or dependency removal. - +* You can take backups of your data by going through /home folders. In case, troubleshooter doesn’t work. You may copy the files to external USB or another partition. +* Verify the log files, specially the pacman logs. Because, unstable system may be caused by upgrading some packages such graphics driver or any other driver. Based on the log, you may want to downgrade any specific package if you want. +* You may use the below command to view last 200 lines of the pacman log file to find out any failing items or dependency removal. ``` tail -n 200 /var/log/pacman.log | less ``` - * The above command gives you the 200 lines from the end of the pacman.log file to verify. Now, carefully check which of the packages were updates since your successful boot. - - - * And note down the package name and version somewhere. And you may try to downgrade packages one-by-one or if you think a specific package created a problem. Use the -U switch of pacman command to downgrade. - +* The above command gives you the 200 lines from the end of the pacman.log file to verify. Now, carefully check which of the packages were updates since your successful boot. +* And note down the package name and version somewhere. And you may try to downgrade packages one-by-one or if you think a specific package created a problem. Use the -U switch of pacman command to downgrade. ``` pacman -U ``` - * You can run the following to start your Arch system after downgrading, if any. - - +* You can run the following to start your Arch system after downgrading, if any. ``` exec /sbin/init ``` - * Check the status of your display manager, whether if there are any errors. Sometimes, display manager creates a problem which can’t communicate with X Server. For example, if you are using lightdm, then you can check its status via below. - - +* Check the status of your display manager, whether if there are any errors. Sometimes, display manager creates a problem which can’t communicate with X Server. For example, if you are using lightdm, then you can check its status via below. ``` systemctl status lightdm ``` - * Or, may want to start it via below command and check what is the error. - - +* Or, may want to start it via below command and check what is the error. ``` lightdm --test-mode --debug ``` - * Here is an example of lightdm failure which caused an unstable Arch system. +* Here is an example of lightdm failure which caused an unstable Arch system. +![lightdm - test mode][4] +* Or check via kicking off the X server using startx. -![lightdm – test mode][4] +``` +startx +``` - * Or check via kicking off the X server using `startx`. +* In my experience, if you see errors in the above command, try to install another display manager such as sddm and enable it. It may eliminate the error. - - * In my experience, if you see errors in the above command, try to install another display manager such as **sddm** and enable it. It may eliminate the error. - - - * Try the above steps, based on the state of your system, and troubleshoot. For errors specific to display manager lightdm, we have a [guide][5] which you may want to check out. - * If you are using sddm, then check out [these troubleshooting steps][6] if something works. - - - -[][7] - -SEE ALSO:   Essential Pacman Commands for Arch Linux [With Examples] +* Try the above steps, based on the state of your system, and troubleshoot. For errors specific to display manager lightdm, we have a [guide][5] which you may want to check out. +* If you are using sddm, then check out [these troubleshooting steps][6] if something works. ### Closing Notes Every installation is different. And above steps may/may not work for you. But it is worth a try and as per experience, it works. If it works, well, good for you. Either way, do let me know in the comment box below, how it goes. -* * * - -------------------------------------------------------------------------------- via: https://www.debugpoint.com/2021/07/recover-arch-linux/ 作者:[Arindam][a] -选题:[lujun9972][b] +选题:[lkxed][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 +[b]: https://github.com/lkxed [1]: https://www.debugpoint.com/tag/arch-linux [2]: https://www.debugpoint.com/2021/01/etcher-bootable-usb-linux/ [3]: https://archlinux.org/download/ -[4]: https://www.debugpoint.com/blog/wp-content/uploads/2021/03/lightdm-test-mode.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2021/03/lightdm-test-mode.jpg [5]: https://www.debugpoint.com/2021/03/failed-to-start-lightdm/ [6]: https://wiki.archlinux.org/title/SDDM#Troubleshooting -[7]: https://www.debugpoint.com/2021/02/pacman-command-arch-examples/ diff --git a/sources/tech/20210809 How to Enable Minimize, Maximize Window Buttons in elementary OS.md b/sources/tech/20210809 How to Enable Minimize, Maximize Window Buttons in elementary OS.md index b4a8a8453f..8e10260309 100644 --- a/sources/tech/20210809 How to Enable Minimize, Maximize Window Buttons in elementary OS.md +++ b/sources/tech/20210809 How to Enable Minimize, Maximize Window Buttons in elementary OS.md @@ -1,7 +1,7 @@ [#]: subject: "How to Enable Minimize, Maximize Window Buttons in elementary OS" [#]: via: "https://www.debugpoint.com/2021/08/enable-minimize-maximize-elementary/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lujun9972" +[#]: collector: "lkxed" [#]: translator: " " [#]: reviewer: " " [#]: publisher: " " @@ -9,15 +9,13 @@ How to Enable Minimize, Maximize Window Buttons in elementary OS ====== -This is how you can enable the Minimize, Maximize window buttons in -elementary OS. +This is how you can enable the Minimize, Maximize window buttons in elementary OS. + Many people (mostly new users to elementary OS) asks these questions in various forums: - 1. How do I enable minimize buttons in elementary OS? - 2. How to I enable restore, minimize, maximize? - 3. Is it possible to bring back the minimize and maximize buttons? - - +1. How do I enable minimize buttons in elementary OS? +2. How to I enable restore, minimize, maximize? +3. Is it possible to bring back the minimize and maximize buttons? And they are completely valid questions, and It’s okay to ask questions. Right? This guide to help them to get those buttons in elementary OS. @@ -55,18 +53,13 @@ sudo apt install -y elementary-tweaks #### Change the settings - * After installation, click on the Application at the top bar and open System Settings. -In the **System settings** window, click on **Tweaks** under Personal section. - * In the Tweaks window, go to **Appearance** section. - * Under **Window** Controls, select **Layout: Windows**. - - +* After installation, click on the Application at the top bar and open System Settings.In the System settings window, click on Tweaks under Personal section. +* In the Tweaks window, go to Appearance section. +* Under Window Controls, select Layout: Windows. ![enable minimize maximize buttons elementary OS][3] - * And you should have the minimized, maximize and close button on the right side of the top window bar. - - +* And you should have the minimized, maximize and close button on the right side of the top window bar. There are other combinations as well, such as Ubuntu, macOS, etc. You can choose whatever you feel like: @@ -76,22 +69,20 @@ This step completes the guide. There are other options in gsettings which you ma I hope this guide helps you to enable minimize maximize buttons elementary OS. Let me know in the comment box below if you need any help. -* * * - -------------------------------------------------------------------------------- via: https://www.debugpoint.com/2021/08/enable-minimize-maximize-elementary/ 作者:[Arindam][a] -选题:[lujun9972][b] +选题:[lkxed][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 +[b]: https://github.com/lkxed [1]: https://github.com/pantheon-tweaks/pantheon-tweaks [2]: https://github.com/elementary-tweaks/elementary-tweaks -[3]: https://www.debugpoint.com/blog/wp-content/uploads/2021/08/enable-minimize-maximize-buttons-elementary-OS-1024x501.png -[4]: https://www.debugpoint.com/blog/wp-content/uploads/2021/08/Other-Options-of-Window-buttons-in-elementary.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2021/08/enable-minimize-maximize-buttons-elementary-OS.png +[4]: https://www.debugpoint.com/wp-content/uploads/2021/08/Other-Options-of-Window-buttons-in-elementary.jpg diff --git a/sources/tech/20211017 How I use open source to play RPGs.md b/sources/tech/20211017 How I use open source to play RPGs.md index 89f0b6e3a0..0c4ebf3b1e 100644 --- a/sources/tech/20211017 How I use open source to play RPGs.md +++ b/sources/tech/20211017 How I use open source to play RPGs.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/21/10/open-source-rpgs" [#]: author: "Seth Kenlon https://opensource.com/users/seth" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "perfiffer" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " diff --git a/sources/tech/20211022 How to Install Visual Studio Code Extensions.md b/sources/tech/20211022 How to Install Visual Studio Code Extensions.md index 3eebef5da2..331593b7bb 100644 --- a/sources/tech/20211022 How to Install Visual Studio Code Extensions.md +++ b/sources/tech/20211022 How to Install Visual Studio Code Extensions.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/install-vs-code-extensions/" [#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "CoWave-Fall" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " diff --git a/sources/tech/20220111 What is KDE Connect- How Do You Use It- -Beginner-s Guide.md b/sources/tech/20220108 What is KDE Connect- How Do You Use It- [Beginner-s Guide].md similarity index 76% rename from sources/tech/20220111 What is KDE Connect- How Do You Use It- -Beginner-s Guide.md rename to sources/tech/20220108 What is KDE Connect- How Do You Use It- [Beginner-s Guide].md index a73a1b8ec1..e8bba64799 100644 --- a/sources/tech/20220111 What is KDE Connect- How Do You Use It- -Beginner-s Guide.md +++ b/sources/tech/20220108 What is KDE Connect- How Do You Use It- [Beginner-s Guide].md @@ -1,7 +1,7 @@ [#]: 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" +[#]: collector: "lkxed" [#]: translator: " " [#]: reviewer: " " [#]: publisher: " " @@ -9,8 +9,8 @@ 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. +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? @@ -34,25 +34,19 @@ KDE Connect set up is a two-way process. You have to install KDE Connect in your 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 - +sudo apt install kdeconnect ``` For Fedora ``` - - sudo dnf install kdeconnect - +sudo dnf install kdeconnect ``` For [Arch Linux][2] ``` - - pacman -S kdeconnect - +pacman -S kdeconnect ``` Or, you can search in Software and hit install. @@ -67,7 +61,7 @@ Search for KDE Connect in Google Play Store and hit install to install it in you 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). - +[https://f-droid.org/en/packages/org.kde.kdeconnect_tp/][5] ### Setting Up KDE Connect @@ -75,53 +69,45 @@ KDE Connect helps to connect devices that are in the same network. So, make sure 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] +![KDE Connect in Android Device showing connected Linux System][6] 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] +![KDE Connect before pairing][7] -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. +Now, click on the name of your mobile phone and hit **Pair**. 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] +![Pairing Request for KDE Connect][8] 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] +![KDE Connect after successful pairing][9] 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. +* Multimedia control +* Remote Input +* Presentation Remote +* Finding Device +* Sharing Files 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 - - +* 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**. +I will show you one example where Notification Sync option is enabled. Open the app in your Android phone, go to the **Connected Device** section. Tap on **Notification Sync** and take option **Open Settings**. -Enable Notification access against and tap on **Allow**. +Enable Notification access against **KDE Connect** and tap on **Allow**. ![Enabling Notification Sync][10] @@ -141,38 +127,28 @@ I hope this guide helps you to set up KDE Connect in your Linux system and mobil 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] +选题:[lkxed][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 +[b]: https://github.com/lkxed [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/ +[5]: https://f-droid.org/en/packages/org.kde.kdeconnect_tp/ +[6]: https://www.debugpoint.com/wp-content/uploads/2022/01/KDE-Connect-in-Android-Device-showing-connected-Linux-System-1024x656.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/01/KDE-Connect-before-pairing-1024x368.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/01/Pairing-Request-for-KDE-Connect-1024x917.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2022/01/KDE-Connect-after-successful-pairing-1024x249.jpg [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 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 deleted file mode 100644 index a65ed67057..0000000000 --- a/sources/tech/20220114 Ubuntu 22.04 LTS -Jammy Jellyfish- - New Features and Release Details.md +++ /dev/null @@ -1,184 +0,0 @@ -[#]: 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 diff --git a/sources/tech/20220118 KDE Plasma Desktop Guide [A Beginner-s Manual].md b/sources/tech/20220118 KDE Plasma Desktop Guide [A Beginner-s Manual].md new file mode 100644 index 0000000000..b9fede8842 --- /dev/null +++ b/sources/tech/20220118 KDE Plasma Desktop Guide [A Beginner-s Manual].md @@ -0,0 +1,177 @@ +[#]: 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: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +KDE Plasma Desktop Guide [A Beginner’s Manual] +====== +This comprehensive article gives you a getting started guide with KDE Plasma desktop. + +KDE Plasma is the most popular and widely used Linux desktop today. If you plan to switch to Linux from Windows, this is a perfect desktop to start with. If you are a student – planning to start your Linux journey with KDE Plasma desktop, you are at the right place. + +This overview article gives you easy-to-understand pointers on using the 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 the 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 on your computer, you need to download a Linux Distribution. + +I would recommend trying Kubuntu or Fedora Linux KDE Edition for a beginner. Link for downloading those, present below. I believe Kubuntu LTS editions are 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 the KDE Plasma desktop, you should see a nice desktop with a default bottom panel which includes a standard shortcut of primary 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 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, you can 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 the 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.? + +Obviously, you may need to change the default wallpaper, themes, and colours – right? Changing those are super easy in KDE Plasma. Hit the Application menu, open System Settings. The default first page should allow you to change the wallpaper, as outlined in the below image. + +You can select your favourite 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 the installation and removal of software in your system. It supports almost all popular package management formats – apt, dnf, Flatpak, Snap and AppImage. To open this application, search for Discover in Application Menu. + +The user interface of Discover is straightforward to grasp for novice users. + +![Discover Showing Various Options][9] + +On the left side, you have options to view the installed application from the “Installed” button. The “Updates” button gives you details about the update available in your system. Usually, Discover checks automatically 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 is required from your end. + +Furthermore, the search button at the top left corner gives you the 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 also gives you the ability to browse the 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, giving 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’s name is Dolphin. Dolphin is one of the best Linux File managers today. It comes with almost all the required settings and features needed for your work. If you compare this to Windows Explorer, Dolphin is far smarter than Windows Explorer. + +Here’s how it looks. Drive, network path, and folder shortcuts are present on the left side. Search, view options and the additional menu are present at the top. + +![Dolphin File Manager Showing Options][10] + +Perhaps Dolphin’s most crucial usability feature is the Split view and tabbed view. Most file manager, including Windows Explorer, lacks these two features. + +#### Learn About KDE Ecosystem and Applications + +KDE Plasma desktop brings many in-house standalone desktop applications to help you with 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 are installed by default. However, you can install several additional KDE native applications via the Discover Software catalogue. Another way is to go to [https://apps.kde.org/][11] 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 on 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 plan to adopt KDE Plasma desktop as a daily driver, 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 activities, which can quickly be done using the default Firefox browser. So, open the Firefox web browser and play your favourite streaming services without any issues. + +#### What happens if you run into errors or need help? + +If you are a beginner, there will be times when you are stuck or run into some errors. So, the first option I would suggest is to do a Google search to find out the details about your issue on the KDE Plasma desktop. + +You can also take help from the helpful community using the below forums: + +* [https://forum.kde.org/][15] +* [https://www.reddit.com/r/kde/][16] + +### What’s Next? + +Now that you learned about the basics of the KDE Plasma desktop, I would recommend you to arm yourself with more features and tricks of this desktop using our following exclusive guides. + +**[Top 10 KDE Plasma Hidden Feature That You Didn’t Know About][17]** + +**[Top 10 KDE Applications That You Didn’t Know About][18]** + +**[What is KDE Connect? How Do You Use It?][19]** + +**[Top 10 KDE Plasma Tips to Make You Super Productive][20]** + +### Closing Notes + +I hope this KDE Plasma guide helps you get started with this awesome desktop within minutes. And remember, the KDE Plasma desktop can be customized to a great extent. You can transform this desktop into anything. It is loaded with many options, tweaks – that is impossible to memorize together. + +As you get started, you should start exploring more options, tweaks in this awesome desktop. And say goodbye to Windows. + +What do you think about this KDE Plasma guide? Does it help? Let me know in the comment box below. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/01/kde-plasma-guide/ + +作者:[Arindam][a] +选题:[lkxed][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/lkxed +[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/wp-content/uploads/2022/01/Dolphin-File-Manager-Showing-Options-1024x567.jpg +[11]: https://apps.kde.org/ +[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://forum.kde.org/ +[16]: https://www.reddit.com/r/kde/ +[17]: https://www.debugpoint.com/2021/12/kde-plasma-hidden-feature/ +[18]: https://www.debugpoint.com/2021/12/top-10-uknown-kde-application/ +[19]: https://www.debugpoint.com/2022/01/kde-connect-guide/ +[20]: https://www.debugpoint.com/2021/01/top-10-kde-plasma-tips-2021/ 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 deleted file mode 100644 index 53dfd37e8b..0000000000 --- a/sources/tech/20220121 10 Great Apps to Improve Your GNOME Experience -Part 3.md +++ /dev/null @@ -1,334 +0,0 @@ -[#]: 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 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 deleted file mode 100644 index eb8c0d1198..0000000000 --- a/sources/tech/20220121 KDE Plasma Desktop Guide -A Beginner-s Manual.md +++ /dev/null @@ -1,179 +0,0 @@ -[#]: 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 diff --git a/sources/tech/20220123 10 Great Apps to Improve Your GNOME Experience [Part 3].md b/sources/tech/20220123 10 Great Apps to Improve Your GNOME Experience [Part 3].md new file mode 100644 index 0000000000..2d64cbea17 --- /dev/null +++ b/sources/tech/20220123 10 Great Apps to Improve Your GNOME Experience [Part 3].md @@ -0,0 +1,295 @@ +[#]: 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: "lkxed" +[#]: 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 a multitude of productivity boost while using your favourite 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 a boost to the developers and overall development. Also helps the end-user – like you and me – with their daily work on the 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] +* [Part 5][4] + +In this article, we covered the following list of great GNOME Apps. + +* Sysprof – System Profiler +* Pika Backup – Backup Software +* Contrast – Color Combination Checker +* Decoder – QR Code Scanner and Generator +* Mahjongg – The Classic Game +* Authenticator – 2FA Authentication +* Drawing – A Painting App for GNOME Desktop +* Curtail – Image Compression App +* Fractal – Matrix Messaging Client for GNOME +* Telegrand – Telegram Client + +### Great GNOME Apps – Part 3 + +#### Sysprof – System Profiler + +The first app we highlight is called sysprof. This is a 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 is well maintained. + +![Sysprof - A great GNOME Apps][5] + +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][6][Getting Started Guide of sysprof][7] + +More Information: + +* [Home Page][8] 1 +* [Home Page 2][9] +* [Source][10] + +#### 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 simple UI. It is powered by the popular borg-backup software and comes with all necessary features such as – + +a) Ability to take backups in a local or remote locationb) Feature of only backing up the changed files/directories, saving time and bandwidthc) Encryption supportd) recovery from backupe) 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][11] + +Here’s how to install. + +[Setup Flatpak][12] 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][13] + +Additional Information about Pika Backup + +* [Home Page][14] +* [Source Code][15] + +#### Contrast – Color Combination Checker + +This nice little tool is mostly for web developers who want to quickly pick up two colours that look great. Named Contrast, this utility follows Web Content Accessibility Guidelines (WCAG) with options to choose HEX colour codes, view the contrast ratio. A great time-saving tool for the developers. + +![Contrast App][16] + +Here’s how to install it. + +[Setup Flatpak][17] 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][18] + +Additional information about Contrast: + +[Source Code][19] + +#### Decoder – QR Code Scanner and Generator + +Decoder is a simple tool that helps to do everything related to QR codes. This GNOME Circle app is capable of generating QR codes, scanning for codes, scanning 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 it. + +![Decoder - A great GNOME App][20] + +[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][22] + +Additional information about Decoder: + +* [Home Page][23] +* [Source Code][24] + +#### Mahjongg – The Classic Game + +This is one of the games 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][25] + +This is how you can install this addictive game in your GNOME Desktop. + +[Setup Flatpak][26] 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][27] + +Additional information about this great GNOME Game app: + +* [Source Code][28] +* [Home Page][29] +* [How to play][30] + +#### Authenticator – 2FA Authentication + +Two-Factor Authentication (2FA) is everywhere these days. It is one of the safest authentication methods used by all popular service providers such as Google, GitHub, etc. Mostly, there are apps available for 2FA in all mobile Platforms. However, you can also set this up as a native desktop app on 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][31] + +This is how you can install this GNOME Circle app. + +[Setup Flatpak][32] 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][33] + +Additional information of this app: + +* [Home Page][34] +* [Source Code][35] + +#### 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 the 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][36] + +This is how to install this great GNOME app. + +[Setup Flatpak][37] 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][38] + +Additional information about this app. + +* [Home Page][39] +* [Source Code][40] + +#### Curtail – Image Compression App + +Need a quick image compression tool? Try Curtail. This GNOME app is another best tool to quickly reduce the size of your images with its simple UI. It supports WebP, PNG, JPG image types. Curtail can compress both lossless and lossy types with the option to remove metadata. + +![Curtail][41] + +This is one of the must-have tools for your GNOME desktop. This is how to install. + +[Setup Flatpak][42] 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][43] + +Additional information about Curtail + +* [Home Page][44] +* [Source Code][45] + +#### 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 - Another great GNOME Apps][46] + +This is how to install. + +[Setup Flatpak][47] 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][48] + +Additional information about Fractal + +[Source Code][49] + +#### Telegrand – Telegram Client + +The final app in this list is Telegrand. This application is not stable at the moment and is under development. However, I feel it is worth mentioning here because of its potential. The Telegram messaging app has 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 the source via instructions present in [GitHub][50]. + +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 Part 3 of the great GNOME Apps series. We covered some unique and unknown applications 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][51] +* [Part 2][52] +* [Part 4][53] +* [Part 5][54] + +Let me know your comments or suggestions about the apps, or, this series as a whole. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/01/best-gnome-apps-part-3/ + +作者:[Arindam][a] +选题:[lkxed][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/lkxed +[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]: https://www.debugpoint.com/2022/03/best-gnome-apps-part-5/ +[5]: https://www.debugpoint.com/wp-content/uploads/2022/01/Sysprof-GNOME-Apps.jpg +[6]: https://gitlab.gnome.org/GNOME/sysprof#building-sysprof +[7]: https://blogs.gnome.org/chergert/2020/03/14/how-to-use-sysprof-to/ +[8]: https://apps.gnome.org/app/org.gnome.Sysprof3/ +[9]: http://www.sysprof.com/ +[10]: https://gitlab.gnome.org/GNOME/sysprof +[11]: https://www.debugpoint.com/wp-content/uploads/2022/01/Pika-Backup-App.jpg +[12]: https://flatpak.org/setup/ +[13]: https://dl.flathub.org/repo/appstream/org.gnome.World.PikaBackup.flatpakref +[14]: https://apps.gnome.org/app/org.gnome.World.PikaBackup/ +[15]: https://gitlab.gnome.org/World/pika-backup/ +[16]: https://www.debugpoint.com/wp-content/uploads/2022/01/Contrast-App.jpg +[17]: https://flatpak.org/setup/ +[18]: https://dl.flathub.org/repo/appstream/org.gnome.design.Contrast.flatpakref +[19]: https://gitlab.gnome.org/World/design/contrast +[20]: https://www.debugpoint.com/wp-content/uploads/2022/01/Decoder-App.jpg +[21]: https://flatpak.org/setup/ +[22]: https://www.debugpoint.com/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). +[23]: https://apps.gnome.org/app/com.belmoussaoui.Decoder/ +[24]: https://gitlab.gnome.org/World/decoder/ +[25]: https://www.debugpoint.com/wp-content/uploads/2022/01/Mahjongg-A-Classic-Game.jpg +[26]: https://flatpak.org/setup/ +[27]: https://dl.flathub.org/repo/appstream/org.gnome.Mahjongg.flatpakref +[28]: https://gitlab.gnome.org/GNOME/gnome-mahjongg/ +[29]: https://wiki.gnome.org/Apps/Mahjongg +[30]: https://help.gnome.org/users/gnome-mahjongg/stable/ +[31]: https://www.debugpoint.com/wp-content/uploads/2022/01/Authenticator-GNOME-App4.jpg +[32]: https://flatpak.org/setup/ +[33]: https://dl.flathub.org/repo/appstream/com.belmoussaoui.Authenticator.flatpakref +[34]: https://apps.gnome.org/app/com.belmoussaoui.Authenticator/ +[35]: https://gitlab.gnome.org/World/Authenticator +[36]: https://www.debugpoint.com/wp-content/uploads/2022/01/Drawing-GNOME-App2.png +[37]: https://flatpak.org/setup/ +[38]: https://dl.flathub.org/repo/appstream/com.github.maoschanz.drawing.flatpakref +[39]: https://maoschanz.github.io/drawing/ +[40]: https://github.com/maoschanz/drawing/ +[41]: https://www.debugpoint.com/wp-content/uploads/2022/01/Curtail.jpg +[42]: https://flatpak.org/setup/ +[43]: https://dl.flathub.org/repo/appstream/com.github.huluti.Curtail.flatpakref +[44]: https://apps.gnome.org/app/com.github.huluti.Curtail/ +[45]: https://github.com/Huluti/Curtail/ +[46]: https://www.debugpoint.com/wp-content/uploads/2022/01/Fractal-Matrix-Messaging-Client.jpg +[47]: https://flatpak.org/setup/ +[48]: https://dl.flathub.org/repo/appstream/org.gnome.Fractal.flatpakref +[49]: https://gitlab.gnome.org/GNOME/fractal +[50]: https://github.com/melix99/telegrand/ +[51]: https://www.debugpoint.com/2021/12/best-gnome-apps-part-1/ +[52]: https://www.debugpoint.com/2021/12/best-gnome-apps-part-2/ +[53]: https://www.debugpoint.com/2022/02/best-gnome-apps-part-4/ +[54]: https://www.debugpoint.com/2022/03/best-gnome-apps-part-5/ 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 index 5c96fc9a5a..ec683545ff 100644 --- 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 @@ -1,7 +1,7 @@ [#]: 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" +[#]: collector: "lkxed" [#]: translator: " " [#]: reviewer: " " [#]: publisher: " " @@ -9,9 +9,9 @@ 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 ? +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. @@ -63,259 +63,205 @@ Now, let’s look at the above DNF commands with examples. 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 +#### 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 +#### 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 +#### 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 +#### 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 +#### 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 +#### 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 +#### 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 +#### 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 +#### 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 +#### 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 +#### 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 +#### 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 +#### 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 +#### 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 +#### 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] @@ -323,27 +269,21 @@ The grouplist command gives you the name of available groups. 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 +#### 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. @@ -351,61 +291,47 @@ If you want to remove a specific temporary file, use the various options as outl 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 +#### 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] @@ -418,12 +344,6 @@ Let me know whether this helps, or, any command you would like to add in this li _[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/ @@ -466,7 +386,3 @@ via: https://www.debugpoint.com/2022/01/dnf-commands-examples/ [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 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 similarity index 54% rename from sources/tech/20220204 10 Necessary Apps to Improve Your GNOME Desktop Experience -Part 4.md rename to sources/tech/20220204 10 Necessary Apps to Improve Your GNOME Desktop Experience [Part 4].md index 1bfd8a058e..0a6793baaa 100644 --- 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 @@ -1,7 +1,7 @@ [#]: 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" +[#]: collector: "lkxed" [#]: translator: " " [#]: reviewer: " " [#]: publisher: " " @@ -9,32 +9,29 @@ 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. +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] - - +* [Part 1][1] +* [Part 2][2] +* [Part 3][3] +* [Part 5][4] 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] - - +* Secrets – Password Manager +* Font Downloader +* Gaphor – UML Modeling Utility +* Hashbrown – Check Hash of your files +* Identity – Compare images and videos +* Khronos – Time Logging +* Markets – Watch Stock Markets +* Obfuscate – Redact Images +* Plots – Simple Graph Plotting +* squeekboard – On-screen keyboard for wayland ### 10 Necessary GNOME Apps @@ -42,18 +39,18 @@ In this article, we covered the following list of great GNOME Apps. 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] +![Secrets][5] -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). +**How to Install** -[Install Secrets][16] +You need to [Setup Flatpak][6] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). -s - - * [Home Page][17] - * [Source Code][18] +[Install Secrets][7] +**More Details about Secrets** +* [Home Page][8] +* [Source Code][9] #### Font Downloader @@ -61,36 +58,40 @@ Installing font via terminal for new users is a bit complicated process. The nex 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] +![Font Downloader][10] 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). +**How to Install** -[Install Font Downloader][20] +You need to [Setup Flatpak][11] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). - * [Home Page][21] - * [Source Code][22] +[Install Font Downloader][12] +**More details about Font Downloader** +* [Home Page][13] +* [Source Code][14] #### 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]. +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][15]. It is a perfect GNOME app for students or system design professionals. -![Gaphor – GNOME Apps][24] +![Gaphor][16] -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). +**How to Install** -[Install Gaphor][25] +You need to [Setup Flatpak][17] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). - * [Home Page][26] - * [Home Page (official)][27] - * [Source Code][28] +[Install Gaphor][18] +**More details about Gaphor** +* [Home Page][19] +* [Home Page (official)][20] +* [Source Code][21] #### Hashbrown – Check Hash of your files @@ -100,36 +101,36 @@ So, a hash is a way to verify whether your downloaded file is original or not. I 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] +![Hashbrown][22] -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). +**How to Install** -[Install Hashbrown][30] +You need to [Setup Flatpak][23] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). - * [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] +[Install Hashbrown][24] +**More details about Hashbrown** +* [Official Home Page][25] (Fun fact: You will be amazed if you open this site. Check out by yourself!) +* [Home Page][26] +* [Source Code][27] #### 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] +![Identity][28] -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). +**How to install** -[Install Identity][35] +You need to [Setup Flatpak][29] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). - * [Home Page][36] - * [Source Code][37] +[Install Identity][30] +**More details about Identity** - -[][2] - -SEE ALSO:   10 Perfect Apps to Improve Your GNOME Experience [Part 2] +* [Home Page][31] +* [Source Code][32] #### Khronos – Time Logging @@ -137,16 +138,18 @@ If you ever need an on-demand timer that keeps track of time while you complete It is a friendly GNOME app for those who need it. -![Khronos – GNOME App][38] +![Khronos - GNOME App][33] -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). +**How to Install** -[Install Khronos][39] +You need to [Setup Flatpak][34] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). - * [Home Page][40] - * [Source Code][41] +[Install Khronos][35] +**More details about Khronos** +* [Home Page][36] +* [Source Code][37] #### Markets – Watch Stock Markets @@ -154,25 +157,25 @@ I am sure you keep track of your favourite stocks or overall investment portfoli 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 +* 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 Apps][38] +**How to Install** -![Markets – A Necessary GNOME App][42] +You need to [Setup Flatpak][39] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). -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] +[Install Markets][40] +**More details about Markets** +* [Home page][41] +* [Source code][42] #### Obfuscate – Redact Images @@ -180,16 +183,18 @@ We often need to gray out or remove certain sensitive sections of any image for 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] +![Obfuscate - A Necessary GNOME Apps][43] -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). +**How to Install** -[Install Obfuscate][47] +You need to [Setup Flatpak][44] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). - * [Home page][48] - * [Source code][49] +[Install Obfuscate][45] +**More details about Obfuscate** +* [Home page][46] +* [Source code][47] #### Plots – Simple Graph Plotting @@ -197,114 +202,107 @@ If you need a quick tool to visualize those complex math formulae in nice 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 +* 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 graphsEasy customization of graphs with the value bar which you can increase or decrease interactively to see the graphs +![Plots][48] +**How to Install** -![Plots][50] +You need to [Setup Flatpak][49] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). -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] +[Install Plots][50] +**More Details about Plots** +* [Home page][51] +* [Source code][52] #### 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. +You can learn more about it in [GitLab][53]. 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] +* [Part 1][54] +* [Part 2][55] +* [Part 3][56] +* [Part 5][57] 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] +选题:[lkxed][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 +[b]: https://github.com/lkxed [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 +[4]: https://www.debugpoint.com/2022/03/best-gnome-apps-part-5/ +[5]: https://www.debugpoint.com/wp-content/uploads/2022/02/Secrets-GNOME-App.jpg +[6]: https://flatpak.org/setup/ +[7]: https://flathub.org/apps/details/org.gnome.World.Secrets +[8]: https://apps.gnome.org/app/org.gnome.World.Secrets/ +[9]: https://gitlab.gnome.org/World/secrets +[10]: https://www.debugpoint.com/wp-content/uploads/2022/02/Font-Downloader-GNOME-Apps.jpg +[11]: https://flatpak.org/setup/ +[12]: https://dl.flathub.org/repo/appstream/org.gustavoperedo.FontDownloader.flatpakref +[13]: https://apps.gnome.org/app/org.gustavoperedo.FontDownloader/ +[14]: https://github.com/GustavoPeredo/font-downloader +[15]: https://en.wikipedia.org/wiki/Unified_Modeling_Language#UML_2 +[16]: https://www.debugpoint.com/wp-content/uploads/2022/02/Gaphor-GNOME-Apps.jpg +[17]: https://flatpak.org/setup/ +[18]: https://dl.flathub.org/repo/appstream/org.gaphor.Gaphor.flatpakref +[19]: https://apps.gnome.org/app/org.gaphor.Gaphor/ +[20]: https://gaphor.org/ +[21]: https://github.com/gaphor/gaphor +[22]: https://www.debugpoint.com/wp-content/uploads/2022/02/Hashbrown-GNOME-App.jpg +[23]: https://flatpak.org/setup/ +[24]: https://dl.flathub.org/repo/appstream/dev.geopjr.Hashbrown.flatpakref +[25]: https://hashbrown.geopjr.dev/ +[26]: https://apps.gnome.org/app/dev.geopjr.Hashbrown/ +[27]: https://github.com/GeopJr/Hashbrown +[28]: https://www.debugpoint.com/wp-content/uploads/2022/02/Identity.jpg +[29]: https://flatpak.org/setup/ +[30]: https://dl.flathub.org/repo/appstream/org.gnome.gitlab.YaLTeR.Identity.flatpakref +[31]: https://apps.gnome.org/app/org.gnome.gitlab.YaLTeR.Identity/ +[32]: https://gitlab.gnome.org/YaLTeR/identity +[33]: https://www.debugpoint.com/wp-content/uploads/2022/02/Khronos-GNOME-App.jpg +[34]: https://flatpak.org/setup/ +[35]: https://dl.flathub.org/repo/appstream/io.github.lainsce.Khronos.flatpakref +[36]: https://apps.gnome.org/app/io.github.lainsce.Khronos/ +[37]: https://github.com/lainsce/khronos +[38]: https://www.debugpoint.com/wp-content/uploads/2022/02/Markets-A-Necessary-GNOME-App.jpg +[39]: https://flatpak.org/setup/ +[40]: https://dl.flathub.org/repo/appstream/com.bitstower.Markets.flatpakref +[41]: https://apps.gnome.org/app/com.bitstower.Markets/ +[42]: https://github.com/bitstower/markets +[43]: https://www.debugpoint.com/wp-content/uploads/2022/02/Obfuscate-GNOME-App.jpg +[44]: https://flatpak.org/setup/ +[45]: https://dl.flathub.org/repo/appstream/com.belmoussaoui.Obfuscate.flatpakref +[46]: https://apps.gnome.org/app/com.belmoussaoui.Obfuscate/ +[47]: https://gitlab.gnome.org/World/obfuscate/ +[48]: https://www.debugpoint.com/wp-content/uploads/2022/02/Plots-GNOME-App.jpg +[49]: https://flatpak.org/setup/ +[50]: https://dl.flathub.org/repo/appstream/com.github.alexhuntley.Plots.flatpakref +[51]: https://apps.gnome.org/app/com.github.alexhuntley.Plots/ +[52]: https://github.com/alexhuntley/Plots +[53]: https://www.debugpoint.com//gitlab.gnome.org/World/Phosh/squeekboard +[54]: https://www.debugpoint.com/2021/12/best-gnome-apps-part-1/ +[55]: https://www.debugpoint.com/2021/12/best-gnome-apps-part-2/ +[56]: https://www.debugpoint.com/2022/01/best-gnome-apps-part-3/ +[57]: https://www.debugpoint.com/2022/03/best-gnome-apps-part-5/ diff --git a/sources/tech/20220214 A guide to Kubernetes architecture.md b/sources/tech/20220214 A guide to Kubernetes architecture.md index 2f3ce6fc63..f334912823 100644 --- a/sources/tech/20220214 A guide to Kubernetes architecture.md +++ b/sources/tech/20220214 A guide to Kubernetes architecture.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/2/kubernetes-architecture" [#]: author: "Nived Velayudhan https://opensource.com/users/nivedv" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "MjSeven" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " 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 similarity index 66% rename from sources/tech/20220217 Top 5 Live Streaming Application for Ubuntu and Other Linux -2022 Edition.md rename to sources/tech/20220217 Top 5 Live Streaming Application for Ubuntu and Other Linux [2022 Edition].md index 47ad2f916b..4753330660 100644 --- 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 @@ -1,7 +1,7 @@ [#]: 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" +[#]: collector: "lkxed" [#]: translator: " " [#]: reviewer: " " [#]: publisher: " " @@ -9,8 +9,8 @@ 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. +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. @@ -27,7 +27,9 @@ OBS Studio is the best one on this list because several reasons. The encoding is 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 - Live Streaming Applications for Linux][1] + +**How to Install** OBS Studio is available in all Linux Distribution’s official repositories. Detailed instruction for installations is present in the below link. @@ -35,10 +37,8 @@ OBS Studio is available in all Linux Distribution’s official repositories. Det More Information - * [Home Page][3] - * [Documentation][4] - - +* [Home Page][3] +* [Documentation][4] #### VokoscreenNG @@ -46,7 +46,9 @@ The second application we would feature in this list is VokoscreenNG. It is a fo It is available for Linux and Windows for free. -![vokoscreenNG][5] +![vokoscreenNG - Live Streaming Applications for Linux][5] + +**How to Install** 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. @@ -54,9 +56,9 @@ Remember, this application requires X11, PulseAudio and GStreamer plugins instal [Download VokoscreenNG][6] - * [Home page][7] - +**More Information** +* [Home page][7] #### Restreamer @@ -64,52 +66,46 @@ The Restreamer application enables you to live stream videos and screencasts dir 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 - - +* 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] +**How to Install** 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] +[Download Restreamer][10] +**More Information** +* [Home Page][11] +* [Documentation][12] +* [Source Code][13] #### 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] +![Open Streaming Platform - - Live Streaming Applications for Linux][14] + +**How to Install** 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 - +git clone https://github.com/cytopia/ffscreencastcd ffscreencastsudo cp bin/ffscreencast /usr/local/bin ``` You can run this application with `ffscreencast` command from the terminal. -[Source code & Home page][16] +[Source code & Home page][15] #### Open Streaming platforms @@ -117,31 +113,31 @@ The final application in this list is Open Streaming Platform (OSP), an open-sou 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 - +* 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 +**How to Install** 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] +[Download Open Streaming Platform][16] +**More Information** +* [Home Page][17] +* [Source Code][18] +* [Documentation][19] ### Closing Notes @@ -151,25 +147,19 @@ 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] +选题:[lkxed][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 +[b]: https://github.com/lkxed [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/ @@ -179,18 +169,13 @@ via: https://www.debugpoint.com/2022/02/live-streaming-applications-linux-2022/ [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 +[10]: https://datarhei.github.io/restreamer/docs/installation-index.html +[11]: https://datarhei.github.io/restreamer/ +[12]: https://datarhei.github.io/restreamer/docs/index.html +[13]: https://github.com/datarhei/restreamer +[14]: https://www.debugpoint.com/wp-content/uploads/2022/02/Open-Streaming-Platform-1024x513.jpg +[15]: https://github.com/cytopia/ffscreencast +[16]: https://wiki.openstreamingplatform.com/Install/Standard +[17]: https://openstreamingplatform.com/ +[18]: https://gitlab.com/Deamos/flask-nginx-rtmp-manager +[19]: https://wiki.openstreamingplatform.com/ diff --git a/sources/tech/20220220 Transform Your Arch Installation with Stunning XMonad WM Setup.md b/sources/tech/20220220 Transform Your Arch Installation with Stunning XMonad WM Setup.md index 12a3b4280f..5a115c4278 100644 --- a/sources/tech/20220220 Transform Your Arch Installation with Stunning XMonad WM Setup.md +++ b/sources/tech/20220220 Transform Your Arch Installation with Stunning XMonad WM Setup.md @@ -9,8 +9,8 @@ Transform Your Arch Installation with Stunning XMonad WM Setup ====== -THIS ARTICLE GIVES YOU A STEP-BY-STEP INSTALLATION GUIDE FOR THE XMONAD -SETUP IN ARCH LINUX WITH A CUSTOM PRE-CONFIGURED SCRIPT. +This article gives you a step-by-step installation guide for the xmonad setup in arch linux with a custom pre-configured script. + ### What is XMonad The [xmonad][1] is a dynamic tiling window manager for X Window system written in Haskell programming language. It is famous for its window automation, stability, minimal, workspace features, and more unique features. With features like – multiple display support, auto window tiling management, quick keyboard navigation, extension support, this window manager is one of the popular choices for those users who wants a productive and faster working system. @@ -25,48 +25,32 @@ You can learn more about this window manager at [https://xmon][1][ad.org/][1]. This guide assumes that you have a functional Arch Linux system ready to follow the below steps. If you want to install Arch Linux, then you can follow our guides as below: - * [How to Install Arch Linux via archinstall (recommended)][3] - * [How to Install Arch Linux (basics)][4] - - +* [How to Install Arch Linux via archinstall (recommended)][3] +* [How to Install Arch Linux (basics)][4] For this guide, we will use [Axarva’s pre-configured xmonad script][5], which comes with xmonad, Eww (Elkowars Wacky Widgets is a standalone widget system made in Rust), rofi (window switcher), tint2 (panels and taskbar) and some cool widgets. This guide is only for physical systems and not virtual machines. Using this personal script is best for novice Arch Linux users because it is unnecessary to go through the hassles of choosing and installing each of the above components and configure them separately. - * Ensure that you are logged on to the Arch Linux system as an admin user (preferable). And connected to the internet. - - - * In the terminal prompt, install the following components while in the home directory. - - +* Ensure that you are logged on to the Arch Linux system as an admin user (preferable). And connected to the internet. +* In the terminal prompt, install the following components while in the home directory. ``` - sudo pacman -Syu base-devel git nano - ``` - * Wait for the download to complete. Then clone the following [Axarva’s repo][5] from GitHub. - - +* Wait for the download to complete. Then clone the following [Axarva’s repo][5] from GitHub. ``` - git clone https://github.com/Axarva/dotfiles-2.0.git - ``` - * After the above command is complete, browse to the dotfiles-2.0 directory. Here you should see a script – `install-on-arch.sh`. Give the execute permission on this script and run. All these you can do with the below set of commands. - - +* After the above command is complete, browse to the dotfiles-2.0 directory. Here you should see a script – `install-on-arch.sh`. Give the execute permission on this script and run. All these you can do with the below set of commands. ``` - cd ./dotfiles-2.0 chmod +x ./install-on-arch.sh ./install-on-arch.sh - ``` The above script will take some time to complete. It will download all the required packages for xmonad setup in Arch Linux. And at the end, the script will compile the entire source code that you downloaded in the first step, including xmonad and other additional utilities. @@ -89,30 +73,20 @@ Congratulations if you reached this far. It’s time for some configuration. Onc Installing the xmonad window manager is not sufficient. You have to tell the Arch system where it should pick the executables and widgets. Also, you have to manually configure to tell X Windows server to execute the main xmonad binary. When you use a stacking window system (such as GNOME, KDE Plasma, etc.), the display manager (such as lightdm) takes care of this. - * Open the `~/.bashrc` file from the terminal prompt and append the $HOME/bin. - - +* Open the `~/.bashrc` file from the terminal prompt and append the $HOME/bin. ![Updating bashrc file][9] - * Open the `~/.bash_profile` file and add startx at the beginning to start the xserver when logging in. Save and exit from the file. - - +* Open the `~/.bash_profile` file and add startx at the beginning to start the xserver when logging in. Save and exit from the file. ![Updating bash_profile file][10] - * Open `~/.xinitrc` file and add `exec xmonad`. This file is new. Save the file once you add the command. - - +* Open `~/.xinitrc` file and add `exec xmonad`. This file is new. Save the file once you add the command. ![Create xinitrc file][11] - * The steps are almost complete, open the `~/dotfiles-2.0/.config/alacritty.yml` file and change the font size for the terminal to something larger than the default value of 9. This is an optional step, but it’s better to change this. Save and close the file. - - - * Exit and log in again. And if all goes well, you should see a default xmonad desktop as below. Now, if you like to configure further such as installing applications and other steps, proceed to the next step. - - +* The steps are almost complete, open the `~/dotfiles-2.0/.config/alacritty.yml` file and change the font size for the terminal to something larger than the default value of 9. This is an optional step, but it’s better to change this. Save and close the file. +* Exit and log in again. And if all goes well, you should see a default xmonad desktop as below. Now, if you like to configure further such as installing applications and other steps, proceed to the next step. ![xmonad base install in Arch Linux – before configuration][12] @@ -122,8 +96,6 @@ The default install in this process gives you a basic setup without the necessar [][13] -SEE ALSO:   How to Install yay AUR Helper in Arch Linux [Beginner’s Guide] - Here, I have compiled a list of some famous and essential software for this setup. This step is optional, and you can install something else as you wish. However, you can install using the command that follows this list. * Ristretto – Image viewer @@ -134,12 +106,8 @@ Here, I have compiled a list of some famous and essential software for this setu * Thunar – File manager * KSnip – Screenshot tool - - ``` - pacman -S gtklib firefox leafpad libreoffice thunar ksnip ristretto gimp feh gvfs polkit-gnome - ``` The gvfs and polkit-gnome packages are for Thunar and detect USB drives. @@ -201,12 +169,6 @@ With that said, I hope this guide helps you to set up your xmonad window manager Cheers. -* * * - -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/02/xmonad-arch-linux-setup/ @@ -238,7 +200,3 @@ via: https://www.debugpoint.com/2022/02/xmonad-arch-linux-setup/ [16]: https://www.debugpoint.com/wp-content/uploads/2022/02/xmonad-performance-in-Arch-Linux-during-idle-state-1024x575.jpg [17]: https://www.debugpoint.com/wp-content/uploads/2022/02/xmonad-performance-in-Arch-Linux-during-heavy-workflow-state-1024x575.jpg [18]: https://www.debugpoint.com/tag/arch-linux -[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 diff --git a/sources/tech/20220305 10 Awesome Apps to Improve Your GNOME Desktop Experience -Part 5.md b/sources/tech/20220305 10 Awesome Apps to Improve Your GNOME Desktop Experience [Part 5].md similarity index 58% rename from sources/tech/20220305 10 Awesome Apps to Improve Your GNOME Desktop Experience -Part 5.md rename to sources/tech/20220305 10 Awesome Apps to Improve Your GNOME Desktop Experience [Part 5].md index ba0a15e91a..f9f723f476 100644 --- a/sources/tech/20220305 10 Awesome Apps to Improve Your GNOME Desktop Experience -Part 5.md +++ b/sources/tech/20220305 10 Awesome Apps to Improve Your GNOME Desktop Experience [Part 5].md @@ -1,7 +1,7 @@ [#]: subject: "10 Awesome Apps to Improve Your GNOME Desktop Experience [Part 5]" [#]: via: "https://www.debugpoint.com/2022/03/best-gnome-apps-part-5/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lujun9972" +[#]: collector: "lkxed" [#]: translator: " " [#]: reviewer: " " [#]: publisher: " " @@ -9,35 +9,31 @@ 10 Awesome Apps to Improve Your GNOME Desktop Experience [Part 5] ====== -HERE, WE SHOWCASE THE NEXT SET OF 10 GNOME APPS THAT WILL SUPERCHARGE -YOUR PRODUCTIVITY WHILE USING GNOME DESKTOP. +Here, we showcase the next set of 10 GNOME Apps that will improve your productivity while using your favourite GNOME Desktop. + At debugpoint.com, we showcase some cool and helpful GNOME apps over a five-part series. The main reason is to raise awareness about the rich GNOME ecosystems with these awesome apps. And it also helps the developers as our readers give these awesome GNOME apps much-needed recognition. This post is the final part, i.e. part 5 of the awesome GNOME app series. In this part 5, we will showcase ten applications. If you missed the last parts, you can read the other parts of this series via the below links. - * [Part 1][1] - * [Part 2][2] - * [Part 3][3] - * [Part 4][4] - - +* [Part 1][1] +* [Part 2][2] +* [Part 3][3] +* [Part 4][4] In this article, we covered the following list of awesome GNOME Apps. - * [Podcasts – podcasts client][5] - * [Tootle – Mastodon client][6] - * [Tangram – Web App Browser][7] - * [Wike – Wikipedia browser for desktop][8] - * [Devhelp – API Search for developers][9] - * [Lorem – Random text generator][10] - * [Rnote – Whiteboard drawing app][11] - * [Frogr – Flickr Client][12] - * [GTG – Personal task and to-do manager][13] - * [Recipes – Cooking guide][14] - - +* Podcasts – podcasts client +* Tootle – Mastodon client +* Tangram – Web App Browser +* Wike – Wikipedia browser for desktop +* Devhelp – API Search for developers +* Lorem – Random text generator +* Rnote – Whiteboard drawing app +* Frogr – Flickr Client +* GTG – Personal task and to-do manager +* Recipes – Cooking guide ### 10 Awesome GNOME Apps @@ -47,25 +43,25 @@ We all love Podcasts, and it’s still going strong. Podcasts are native GNOME a Here’s a quick summary of the features: - * Nice and clean user interface UI - * Play, update and complete management of your podcasts from UI - * Well, integration with GNOME Desktop such as notifications. - * Bookmark your listening to start listening over again - * Support of RSS/Atop for podcasting service via Soundcloud and iTunes - * Import option via OPML files +* Nice and clean user interface UI +* Play, update and complete management of your podcasts from UI +* Well, integration with GNOME Desktop such as notifications. +* Bookmark your listening to start listening over again +* Support of RSS/Atop for podcasting service via Soundcloud and iTunes +* Import option via OPML files +![Podcasts App][5] +**How to Install** -![Podcasts App][15] +You need to [Setup Flatpak][6] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). -You need to [Setup Flatpak][16] 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 Podcast][17] - - * [Home page][18] - * [Source code][19] +[Install Podcast][7] +**More details about Podcasts** +* [Home page][8] +* [Source code][9] #### Tootle – Mastodon client @@ -73,65 +69,69 @@ The next app we would like to feature is Tootle – a Mastodon client for the GN This application well integrates with the GNOME desktop and comes with a Flatpak build for installation. -![Tootle][20] +![Tootle][10] -You need to [Setup Flatpak][16] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). +**How to Install** -[Install Tootle][21] +You need to [Setup Flatpak][11] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). - * [Home page][22] - * [Source code][23] +[Install Tootle][12] +**More details about Tootle** +* [Home page][13] +* [Source code][14] #### Tangram – Web app browser This application is one of my favourites. And I am sure it would be for you as well. Tangram is a browser for Web Apps. Web Apps behaves as desktop apps for your favourite websites. So, using Tangram, you can manage your multiple web applications together with its unique vertical tab browser. -Each of the tabs is persistent and independent. That means, for example, you can open multiple Google accounts together in separate tabs without worrying about login conflicts or expiry. You can also group the type of web apps using this application. Suppose you would like to group all messager applications such as WhatsApp, Facebook Meeesagner & Telegram. In that case, you can do that quickly, and it’s easier for you to monitor and be productive. +Each of the tabs is persistent and independent. That means, for example, you can open multiple Google accounts together in separate tabs without worrying about login conflicts or expiry. You can also group the type of web apps using this application. Suppose you would like to group all messager applications such as WhatsApp, Facebook Meeesagner & Telegram. In that case, you can do that quickly, and it’s easier for you to monitor and be productive. If used and appropriately configured, Tangram can reduce digital notification overhead in your mobile, save time and eventually help you focus more. -![Tangram][24] +![Tangram - an awesome GNOME app for all][15] + +**How to Install** You need to [Setup Flatpak][16] 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 Tangram][25] - - * [Home page][26] - * [Source code][27] +[Install Tangram][17] +**More details about Tangram** +* [Home page][18] +* [Source code][19] #### Wike – Wikipedia Browser We all love Wikipedia. There is a GNOME native application to browse Wikipedia, right from your desktop if I tell you. The app’s name is Wike, and it comes with the below set of features. - * Open multiple articles in tabs - * Multiple languages - * Search suggestions - * List of recent articles - * Simple bookmarks management - * Text search in articles - * Article table of contents - * View article in other languages - * GNOME Shell search integration - * Light, dark and sepia themes - - +* Open multiple articles in tabs +* Multiple languages +* Search suggestions +* List of recent articles +* Simple bookmarks management +* Text search in articles +* Article table of contents +* View article in other languages +* GNOME Shell search integration +* Light, dark and sepia themes I am sure you can get the most out of Wikipedia for your research, knowledge gathering, or work with the above features. -![Wike – an awesome GNOME app][28] +![Wike - an awesome GNOME app][20] -You need to [Setup Flatpak][16] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). +**How to Install** -[Install Wike][29] +You need to [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). - * [Home page][30] - * [Source code][30] +[Install Wike][22] +**More details about Wike** +* [Home page][23] +* [Source code][24] #### Devhelp – API Browser @@ -139,22 +139,20 @@ The next app we would like to highlight is Devhelp. As its name says, this deskt By default, it comes with GTK-doc, i.e. GTK documentation are available as per the installations. However, you can configure it for other development languages provided; you have the API documentation HTML and *.devhelp2 index file is generated. -[][31] - -SEE ALSO:   Top 10 KDE Plasma Hidden Feature That You Didn't Know About - A fantastic tool, I must say. -![Devhelp][32] +![Devhelp][25] -You need to [Setup Flatpak][16] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). +**How to Install** -[Install devhelp][33] +You need to [Setup Flatpak][26] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). - * [Home page][34] - * [Source code][35] +[Install devhelp][27] +**More details about Devhelp** +* [Home page][28] +* [Source code][29] #### Lorem – Random Text Generator @@ -162,32 +160,36 @@ We often need placeholder text for various needs. And for that, the famous “Lo This GNOME app, named Lorem, does just that. Based on your input, it can generate blocks of text that you can easily copy and use for your work. -![Lorem][36] +![Lorem][30] -You need to [Setup Flatpak][16] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). +**How to Install** -[Install Lorem][37] +You need to [Setup Flatpak][31] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). - * [Home page][38] - * [Source code][39] +[Install Lorem][32] +**More details about Lorem** +* [Home page][33] +* [Source code][34] #### Rnote – Whiteboard Tool 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][40] support which makes it a must-have tool. +One of the cool features of Rnote is that it supports [Xournal++ file format][35] support which makes it a must-have tool. -![Rnote – Whiteboard Application for Linux based on GTK4 and Rust][41] +![Rnote – Whiteboard Application for Linux based on GTK4 and Rust][36] -You need to [Setup Flatpak][16] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). +**How to Install** -[Install Rnote][42] +You need to [Setup Flatpak][37] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). - * [Source code][43] +[Install Rnote][38] +**More details about Rnote** +* [Source code][39] #### Frogr – Flickr Client @@ -195,33 +197,37 @@ If you still love and use the image hosting platform Flickr, then Frogr is the t It is a perfect application for those whose workflow deals with heavy photo management and doesn’t want to deal with web browsers. -![Frogr][44] +![Frogr][40] -You need to [Setup Flatpak][16] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). +**How to Install** -[Install Frogr][45] +You need to [Setup Flatpak][41] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). - * [Home page][46] - * [Source code][47] +[Install Frogr][42] +**More details about Frogr** +* [Home page][43] +* [Source code][44] #### GTG – Getting Things GNOME: To do manager -Are you procrastinating too much or having trouble finishing small to larger tasks in your day to day life. Then this next application is perfect for you. GTG, aka Getting Things Gnome, is one of the best personal tasks and to-do managers and organizers for GNOME Desktop. It is inspired by the [Getting Things Done methodology][48] and brings more features to manage your time while accomplishing tasks perfectly. +Are you procrastinating too much or having trouble finishing small to larger tasks in your day to day life. Then this next application is perfect for you. GTG, aka Getting Things Gnome, is one of the best personal tasks and to-do managers and organizers for GNOME Desktop. It is inspired by the[Getting Things Done methodology][45] and brings more features to manage your time while accomplishing tasks perfectly. GTG user interface is neat with flexibility that helps you create and manage tasks with tagging, dependencies, colour codes, search, and many search features. If you have not tried this app yet, you should check it out. -![GTG][49] +![GTG][46] -You need to [Setup Flatpak][16] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). +**How to Install** -[Install GTG][50] +You need to [Setup Flatpak][47] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). - * [Home page][51] - * [Documentation][52] +[Install GTG][48] +**More details about GTG** +* [Home page][49] +* [Documentation][50] #### Recipes – Cooking helper @@ -231,16 +237,18 @@ Right from its user interface, you can discover what to cook today, tomorrow or Interested? Here’s how to install it. -![Recipes][53] +![Recipes][51] -You need to [Setup Flatpak][16] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). +**How to Install** -[Install Recipes][54] +You need to [Setup Flatpak][52] for your Linux distribution. And then click on the below button to launch the native software manager to install (such as Software or Discover). - * [Home page][55] - * [Source code][56] +[Install Recipes][53] +**More details about Recipes** +* [Home page][54] +* [Source code][55] ### Closing Notes @@ -248,90 +256,83 @@ This concludes part 5 and the GNOME Apps series. I hope you get to know many unk If you missed the previous stories, you could read them here. -[Part 1][1] – [Part 2][2] – [Part 3][3] – [Part 4][4] +[Part 1][56] – [Part 2][57] – [Part 3][58] – [Part 4][59] And finally, do let me know your comments, suggestions, or anything in the comment box below. And stay tuned for the next series on a different topic. Cheers. -_Some image credit: GNOME and respective developers_ - -* * * - -We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][57], [Twitter][58], [YouTube][59], and [Facebook][60] and never miss an update! - -##### Also Read +*Some image credit: GNOME and respective developers* -------------------------------------------------------------------------------- via: https://www.debugpoint.com/2022/03/best-gnome-apps-part-5/ 作者:[Arindam][a] -选题:[lujun9972][b] +选题:[lkxed][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 +[b]: https://github.com/lkxed [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]: https://www.debugpoint.com/2022/02/best-gnome-apps-part-4/ -[5]: tmp.LpD9K2ZERp#podcasts -[6]: tmp.LpD9K2ZERp#tootle -[7]: tmp.LpD9K2ZERp#tangram -[8]: tmp.LpD9K2ZERp#wike -[9]: tmp.LpD9K2ZERp#devhelp -[10]: tmp.LpD9K2ZERp#lorem -[11]: tmp.LpD9K2ZERp#rnote -[12]: tmp.LpD9K2ZERp#frogr -[13]: tmp.LpD9K2ZERp#gtg -[14]: tmp.LpD9K2ZERp#recipes -[15]: https://www.debugpoint.com/wp-content/uploads/2022/03/Podcasts-App-1024x579.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/03/Podcasts-App.jpg +[6]: https://flatpak.org/setup/ +[7]: https://dl.flathub.org/repo/appstream/org.gnome.Podcasts.flatpakref +[8]: https://wiki.gnome.org/Apps/Podcasts +[9]: https://gitlab.gnome.org/World/podcasts +[10]: https://www.debugpoint.com/wp-content/uploads/2022/03/Tootle.jpg +[11]: https://flatpak.org/setup/ +[12]: https://dl.flathub.org/repo/appstream/com.github.bleakgrey.tootle.flatpakref +[13]: https://apps.gnome.org/app/com.github.bleakgrey.tootle/ +[14]: https://github.com/bleakgrey/tootle +[15]: https://www.debugpoint.com/wp-content/uploads/2022/03/Tangram-1024x573.jpg [16]: https://flatpak.org/setup/ -[17]: https://dl.flathub.org/repo/appstream/org.gnome.Podcasts.flatpakref -[18]: https://wiki.gnome.org/Apps/Podcasts -[19]: https://gitlab.gnome.org/World/podcasts -[20]: https://www.debugpoint.com/wp-content/uploads/2022/03/Tootle.jpg -[21]: https://dl.flathub.org/repo/appstream/com.github.bleakgrey.tootle.flatpakref -[22]: https://apps.gnome.org/app/com.github.bleakgrey.tootle/ -[23]: https://github.com/bleakgrey/tootle -[24]: https://www.debugpoint.com/wp-content/uploads/2022/03/Tangram-1024x573.jpg -[25]: https://dl.flathub.org/repo/appstream/re.sonny.Tangram.flatpakref -[26]: https://apps.gnome.org/app/re.sonny.Tangram/ -[27]: https://github.com/sonnyp/Tangram -[28]: https://www.debugpoint.com/wp-content/uploads/2022/03/Wike-an-awesome-GNOME-app.jpg -[29]: https://dl.flathub.org/repo/appstream/com.github.hugolabe.Wike.flatpakref -[30]: https://hugolabe.github.io/Wike/ -[31]: https://www.debugpoint.com/2021/12/kde-plasma-hidden-feature/ -[32]: https://www.debugpoint.com/wp-content/uploads/2022/03/Devhelp-1024x574.jpg -[33]: https://dl.flathub.org/repo/appstream/org.gnome.Devhelp.flatpakref -[34]: https://apps.gnome.org/app/org.gnome.Devhelp/ -[35]: https://gitlab.gnome.org/GNOME/devhelp -[36]: https://www.debugpoint.com/wp-content/uploads/2022/03/Lorem.jpg -[37]: https://dl.flathub.org/repo/appstream/org.gnome.design.Lorem.flatpakref -[38]: https://apps.gnome.org/app/org.gnome.design.Lorem/ -[39]: https://gitlab.gnome.org/World/design/lorem -[40]: https://www.debugpoint.com/2022/02/top-whiteboard-applications-linux/ -[41]: https://www.debugpoint.com/wp-content/uploads/2022/02/Rnote-Whiteboard-Application-for-Linux-based-on-GTK4-and-Rust-1024x576.jpg -[42]: https://dl.flathub.org/repo/appstream/com.github.flxzt.rnote.flatpakref -[43]: https://github.com/flxzt/rnote -[44]: https://www.debugpoint.com/wp-content/uploads/2022/03/Frogr.jpg -[45]: https://flathub.org/repo/appstream/org.gnome.frogr.flatpakref -[46]: https://wiki.gnome.org/Apps/Frogr -[47]: https://gitlab.gnome.org/GNOME/frogr -[48]: https://en.wikipedia.org/wiki/Getting_Things_Done -[49]: https://www.debugpoint.com/wp-content/uploads/2022/03/GTG-1024x669.jpg -[50]: https://dl.flathub.org/repo/appstream/org.gnome.GTG.flatpakref -[51]: https://wiki.gnome.org/Apps/GTG -[52]: https://fortintam.com/gtg/user_manual/ -[53]: https://www.debugpoint.com/wp-content/uploads/2022/03/Recepies.jpg -[54]: https://gitlab.gnome.org/GNOME/recipes/raw/master/flatpak/gnome-recipes.flatpakref -[55]: https://wiki.gnome.org/Apps/Recipes -[56]: https://gitlab.gnome.org/GNOME/recipes/ -[57]: https://t.me/debugpoint -[58]: https://twitter.com/DebugPoint -[59]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 -[60]: https://facebook.com/DebugPoint +[17]: https://dl.flathub.org/repo/appstream/re.sonny.Tangram.flatpakref +[18]: https://apps.gnome.org/app/re.sonny.Tangram/ +[19]: https://github.com/sonnyp/Tangram +[20]: https://www.debugpoint.com/wp-content/uploads/2022/03/Wike-an-awesome-GNOME-app.jpg +[21]: https://flatpak.org/setup/ +[22]: https://dl.flathub.org/repo/appstream/com.github.hugolabe.Wike.flatpakref +[23]: https://hugolabe.github.io/Wike/ +[24]: https://hugolabe.github.io/Wike/ +[25]: https://www.debugpoint.com/wp-content/uploads/2022/03/Devhelp.jpg +[26]: https://flatpak.org/setup/ +[27]: https://dl.flathub.org/repo/appstream/org.gnome.Devhelp.flatpakref +[28]: https://apps.gnome.org/app/org.gnome.Devhelp/ +[29]: https://gitlab.gnome.org/GNOME/devhelp +[30]: https://www.debugpoint.com/wp-content/uploads/2022/03/Lorem.jpg +[31]: https://flatpak.org/setup/ +[32]: https://dl.flathub.org/repo/appstream/org.gnome.design.Lorem.flatpakref +[33]: https://apps.gnome.org/app/org.gnome.design.Lorem/ +[34]: https://gitlab.gnome.org/World/design/lorem +[35]: https://www.debugpoint.com/2022/02/top-whiteboard-applications-linux/ +[36]: https://www.debugpoint.com/wp-content/uploads/2022/02/Rnote-Whiteboard-Application-for-Linux-based-on-GTK4-and-Rust.jpg +[37]: https://flatpak.org/setup/ +[38]: https://dl.flathub.org/repo/appstream/com.github.flxzt.rnote.flatpakref +[39]: https://github.com/flxzt/rnote +[40]: https://www.debugpoint.com/wp-content/uploads/2022/03/Frogr.jpg +[41]: https://flatpak.org/setup/ +[42]: https://flathub.org/repo/appstream/org.gnome.frogr.flatpakref +[43]: https://wiki.gnome.org/Apps/Frogr +[44]: https://gitlab.gnome.org/GNOME/frogr +[45]: https://en.wikipedia.org/wiki/Getting_Things_Done +[46]: https://www.debugpoint.com/wp-content/uploads/2022/03/GTG.jpg +[47]: https://flatpak.org/setup/ +[48]: https://dl.flathub.org/repo/appstream/org.gnome.GTG.flatpakref +[49]: https://wiki.gnome.org/Apps/GTG +[50]: https://www.debugpoint.com//fortintam.com/gtg/user_manual/ +[51]: https://www.debugpoint.com/wp-content/uploads/2022/03/Recepies.jpg +[52]: https://flatpak.org/setup/ +[53]: https://gitlab.gnome.org/GNOME/recipes/raw/master/flatpak/gnome-recipes.flatpakref +[54]: https://wiki.gnome.org/Apps/Recipes +[55]: https://gitlab.gnome.org/GNOME/recipes/ +[56]: https://www.debugpoint.com/2021/12/best-gnome-apps-part-1/ +[57]: https://www.debugpoint.com/2021/12/best-gnome-apps-part-2/ +[58]: https://www.debugpoint.com/2022/01/best-gnome-apps-part-3/ +[59]: https://www.debugpoint.com/2022/02/best-gnome-apps-part-4/ diff --git a/sources/tech/20220308 Top Nitrux Applications (Maui) Everyone Should Try.md b/sources/tech/20220308 Top Nitrux Applications (Maui) Everyone Should Try.md index 51c0f78410..7e284505ee 100644 --- a/sources/tech/20220308 Top Nitrux Applications (Maui) Everyone Should Try.md +++ b/sources/tech/20220308 Top Nitrux Applications (Maui) Everyone Should Try.md @@ -9,8 +9,8 @@ Top Nitrux Applications (Maui) Everyone Should Try ====== -THIS ARTICLE SHOWCASES SOME OF THE EXCELLENT MAUI NATIVE APPLICATIONS -THAT COME AS DEFAULT IN NITRUX OS LINUX DISTRIBUTION. +This article showcases some of the excellent maui native applications that come as default in nitrux os linux distribution. + ### What is Maui Apps and Nitrux OS [Nitrux][1] is a Linux Distribution and a complete operating system based on Debian with the power NX Desktop, which uses KDE Plasma and Mauikit components. It is one of the beautiful Linux distributions today, giving you the best looks and performance. @@ -56,8 +56,6 @@ Other features that make it a most desirable text editors are – * Autosave * Supports dark and light themes - - This text editor reminds me of the great Gedit, which is [not a default editor anymore][7] in GNOME. Gedit [has all the features][8] of this text editor via plugins. ![Nota Text Editor][9] @@ -76,8 +74,6 @@ The [Clip][12] is the convergence video player for desktop and mobile phones tha [][13] -SEE ALSO:   10 Necessary Apps to Improve Your GNOME Desktop Experience [Part 4] - ##### Quick features of Clip * Local, network and internet streaming playback (limited) @@ -86,8 +82,6 @@ SEE ALSO:   10 Necessary Apps to Improve Your GNOME Desktop Experience [Part 4] * Subtitles support * Based on the MPV video player - - ![Clip Video Player][14] #### Station – Terminal @@ -120,8 +114,6 @@ You can view the image metadata and basic image edition as well. The image editi * Supports layers * Cropping and rotating - - However, you can not annotate with arrows or add any texts into the image. ![Pix Image Viewer][20] @@ -156,14 +148,6 @@ So, what is your favourite application on this list? Let me know in the comment Cheers. -_Some image credits – Maui, Nitrux team._ - -* * * - -We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][22], [Twitter][23], [YouTube][24], and [Facebook][25] and never miss an update! - -##### Also Read - -------------------------------------------------------------------------------- via: https://www.debugpoint.com/2022/03/top-nitrux-maui-applications/ @@ -198,7 +182,3 @@ via: https://www.debugpoint.com/2022/03/top-nitrux-maui-applications/ [19]: https://mauikit.org/apps/pix/ [20]: https://www.debugpoint.com/wp-content/uploads/2022/03/Pix-Image-Viewer.jpg [21]: https://www.debugpoint.com/wp-content/uploads/2022/03/Downlaod-Nitrux-Maui-application-appimage-and-apk-files-1024x584.jpg -[22]: https://t.me/debugpoint -[23]: https://twitter.com/DebugPoint -[24]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 -[25]: https://facebook.com/DebugPoint diff --git a/sources/tech/20220323 10 Features Why GNOME 42 is the Greatest Release Ever.md b/sources/tech/20220323 10 Features Why GNOME 42 is the Greatest Release Ever.md index 439fe050a0..f0e0fcc130 100644 --- a/sources/tech/20220323 10 Features Why GNOME 42 is the Greatest Release Ever.md +++ b/sources/tech/20220323 10 Features Why GNOME 42 is the Greatest Release Ever.md @@ -1,7 +1,7 @@ [#]: subject: "10 Features Why GNOME 42 is the Greatest Release Ever" [#]: via: "https://www.debugpoint.com/2022/03/gnome-42-release/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lujun9972" +[#]: collector: "lkxed" [#]: translator: " " [#]: reviewer: " " [#]: publisher: " " @@ -9,47 +9,47 @@ 10 Features Why GNOME 42 is the Greatest Release Ever ====== -WE THINK THESE GNOME 42 RELEASE FEATURES MAKE IT ONE OF THE GREAT -RELEASES IN GNOME’S HISTORY. HERE’S WHY. -The GNOME Desktop is the most widely used desktop environment today. And it is probably the only desktop that new users to Linux experience for the first time. GNOME is the default desktop environment for Ubuntu and Fedora Linux. Hence its user base is in millions.  +We think these GNOME 42 release features make it one of the great releases in GNOME’s history. Here’s why. -The upcoming GNOME 42 releases soon. And perhaps it’s one of the best releases so far in terms of new features, adoption of modern tech and moving away from the legacy codebase.  +The GNOME Desktop is the most widely used desktop environment today. And it is probably the only desktop that new users to Linux experience for the first time. GNOME is the default desktop environment for Ubuntu and Fedora Linux. Hence its user base is in millions. + +The upcoming GNOME 42 releases soon. And perhaps it’s one of the best releases so far in terms of new features, adoption of modern tech and moving away from the legacy codebase. The core, look and feel under the hood changes – everything looks different for new and experienced users. ![GNOME 42 Desktop][1] -In this article, we would like to give you a tour of 10 features of GNOME 42, which makes it a significant release.  +In this article, we would like to give you a tour of 10 features of GNOME 42, which makes it a significant release. ### Great Features of GNOME 42 Release -#### 1\. Libadwaita and GTK4 +#### 1. Libadwaita and GTK4 The libadwaita library is the modern building block for GTK4 applications. It’s the GTK4 port of the libhandy library that defines the visual language of the GNOME desktop. The adoption of libadwaita is complex, and it impacts almost every modules component of the modern GNOME desktop, including the native applications. Imagine how difficult it is for a complete libadwaita and GTK4 adoption in development efforts, testing and other regressions. The work started in GNOME 41 is now nearing completion in this GNOME 42 release. But what are the changes? -The libadwaita and GTK4 changes are visible in every user interface of the entire desktop. For example, you can see the flat buttons, well-justified labels, new colours, rounded corners, refined controls, etc.  +The libadwaita and GTK4 changes are visible in every user interface of the entire desktop. For example, you can see the flat buttons, well-justified labels, new colours, rounded corners, refined controls, etc. Hence, from Files to Web, the Shell controls, menu items – everything would look stunning with libadwaita and GTK4 in the GNOME 42 release. -#### 2\. Updated GNOME Shell Theme +#### 2. Updated GNOME Shell Theme The GNOME default Shell theme changed in several places. In this release, those items’ menus, notifications, and overall look are more compact. -The menu items at the top bar, such as the Calendar or the system tray menu, are now closer to the top bar. The spacing between the text and options inside the menu is decreased.  +The menu items at the top bar, such as the Calendar or the system tray menu, are now closer to the top bar. The spacing between the text and options inside the menu is decreased. ![GNOME 42 Shell updates][2] -The on-screen display notifications are changed. Earlier, it used to be the large boxes with notification labels that are now changed to “pills” with a lesser display footprint.  +The on-screen display notifications are changed. Earlier, it used to be the large boxes with notification labels that are now changed to “pills” with a lesser display footprint. ![Revamped OSD and menu in GNOME 42][3] And also, some inside performance boost makes GNOME 42 much faster than its predecessors. -#### 3\. Adaptive Dark Theme +#### 3. Adaptive Dark Theme -If you love dark themes and want your app to honour the system’s dark look, you are in for a treat. The GNOME 42, with the help of libadwaita, brings native dark mode for all the supported applications.  +If you love dark themes and want your app to honour the system’s dark look, you are in for a treat. The GNOME 42, with the help of libadwaita, brings native dark mode for all the supported applications. If you choose a dark theme for GNOME Shell, the apps also follow that shell’s system style. @@ -59,33 +59,29 @@ For example, if you choose the below option in the new Text editor, it changes t However, this feature needs to be implemented by the app developer to consume the exposed Shell settings. -#### 4\. Revamped System Settings with new Appearances +#### 4. Revamped System Settings with new Appearances -The fulcrum of the entire GNOME desktop is its settings window. From the settings window, you can tweak most of the desktop behaviour. The setting application itself is a complex app, and it’s ported to libadwaita. So, the looks of it changed with new styled widgets and controls.  +The fulcrum of the entire GNOME desktop is its settings window. From the settings window, you can tweak most of the desktop behaviour. The setting application itself is a complex app, and it’s ported to libadwaita. So, the looks of it changed with new styled widgets and controls. -One of the vital changes in the Settings window is the new Appearance page. This page gives you the option to view and toggle the desktop theme between light and dark.  +One of the vital changes in the Settings window is the new Appearance page. This page gives you the option to view and toggle the desktop theme between light and dark. The Sharing page in the settings window gives you a redesigned remote desktop dialog showing options and preferences for remote desktop connection via RDP (not VNC). ![Appearance page in Settings][5] -#### 5\. Wallpaper that switches automatically with theme +#### 5. Wallpaper that switches automatically with theme The above appearance page in settings also gives you a nice side-by-side look of the light and dark version. And when you change the system theme, the wallpaper also changes automatically! This is by far the most remarkable feature that GNOME 42 release brings. -[][6] +#### 6. Files icon change -SEE ALSO:   10 Things To Do After Installing Linux Mint 19 - Tara - -#### 6\. Files icon change - -The default folder icons in Files (Nautilus) didn’t change for many years. In my opinion, everything changed over the years, but this piece remains the same. In GNOME 42, the folder icons colour in the Files file manager changes to light blue.  +The default folder icons in Files (Nautilus) didn’t change for many years. In my opinion, everything changed over the years, but this piece remains the same. In GNOME 42, the folder icons colour in the Files file manager changes to light blue. Arguably, blue might not be the best colour considering every aspect. But blue still goes well with GNOME’s default wallpaper and other component pallets. And a change to the default Files look is always welcome. -![Files with new color folders in GNOME 42][7] +![Files with new color folders in GNOME 42][6] -#### 7\. A brand new text editor +#### 7. A brand new text editor A new Text Editor replaces the famous and fabulous Gedit in GNOME 42. The Gedit is a powerful and time-tested utility, and replacing all of its functionality takes time. The new Text Editor is built in GTK4 from scratch and brings some outstanding features, including built-in themes and light and dark mode. More features are expected to arrive in Text Editor in future. @@ -93,70 +89,60 @@ To be clear, Gedit doesn’t go away. It’s still there in the respective Linux You can read our exclusive piece on Gedit and GNOME Text Editor below. -[Features about GNOME Text Editor][8] +[Features about GNOME Text Editor][7] -[Why Gedit is the great text editor][9] +[Why Gedit is the great text editor][8] -#### 8\. A native screenshot tool +#### 8. A native screenshot tool One of the best features of the GNOME 42 release is the built-in screenshot and screen recording tool. You do not install any additional app for this. Your life will be easier with this tool, which takes care of the screenshot and screen recording with its nifty user interface when you press the `Print Screen` button. -In earlier releases, hitting the Print Screen takes the entire desktop screenshot and saves it. Now, you need to hit Enter key after pressing Print Screen from the keyboard.  +In earlier releases, hitting the Print Screen takes the entire desktop screenshot and saves it. Now, you need to hit Enter key after pressing Print Screen from the keyboard. -![GNOME 42 introduces new screenshot tool][10] +![GNOME 42 introduces new screenshot tool][9] -#### 9\. Stunning Wallpapers +#### 9. Stunning Wallpapers A set of awesome wallpapers is about to treat you and give your favourite GNOME 42 desktop a visual uplift. And the wallpapers also have a dark version, which is set automatically when you choose dark over light. -#### 10\. Other Changes +#### 10. Other Changes Some of the misc changes in the GNOME 42 release is the Eye of GNOME (image viewer) received a much-needed performance boost, Web browser GNOME Web now support hardware acceleration and user interface update in Maps. Also, a new Console application is a nice add on to this release which replaces GNOME Terminal. -So, that’s about significant changes. But many changes make GNOME 42 release is one of the biggest releases in its history.  +So, that’s about significant changes. But many changes make GNOME 42 release is one of the biggest releases in its history. ### How to get GNOME 42 -GNOME 42 releases on March 23, 2022, and you get to experience it via [GNOME OS][11] right away. +GNOME 42 [was released on March 23, 2022][10], and you get to experience it via [GNOME OS][11] right away. If you plan to get it via Linux Distribution, you have to wait for a little. [Ubuntu 22.04 LTS][12] will feature GNOME 42 (partial), due April 2022. And [Fedora 36][13], which is expected in April as well. -If you are an Arch Linux user, GNOME 42 will arrive soon in the main extra repo. Keep a watch on [this page][14] or check your Arch system via the usual `pacman -Syu` command.  - -* * * - -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 +If you are an Arch Linux user, GNOME 42 will arrive soon in the main extra repo. Keep a watch on [this page][14] or check your Arch system via the usual `pacman -Syu` command. -------------------------------------------------------------------------------- via: https://www.debugpoint.com/2022/03/gnome-42-release/ 作者:[Arindam][a] -选题:[lujun9972][b] +选题:[lkxed][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/03/GNOME-42-Desktop-1024x563.jpg +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/03/GNOME-42-Desktop.jpg [2]: https://www.debugpoint.com/wp-content/uploads/2022/03/GNOME-42-Shell-updates.jpg [3]: https://www.debugpoint.com/wp-content/uploads/2022/03/Revamped-OSD-and-menu-in-GNOME-42.jpg [4]: https://www.debugpoint.com/wp-content/uploads/2022/03/This-option-makes-it-folow-dar-and-light-theme-automatically.jpg -[5]: https://www.debugpoint.com/wp-content/uploads/2022/03/Appearance-page-in-Settings-1024x708.jpg -[6]: https://www.debugpoint.com/2018/08/10-things-to-do-after-installing-linux-mint-19-tara/ -[7]: https://www.debugpoint.com/wp-content/uploads/2022/03/Files-with-new-color-folders-in-GNOME-42.jpg -[8]: https://www.debugpoint.com/2021/12/gnome-text-editor/ -[9]: https://www.debugpoint.com/2021/04/gedit-features/ -[10]: https://www.debugpoint.com/wp-content/uploads/2022/03/GNOME-42-introduces-new-screenshot-tool-1024x699.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/03/Appearance-page-in-Settings.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/03/Files-with-new-color-folders-in-GNOME-42.jpg +[7]: https://www.debugpoint.com/2021/12/gnome-text-editor/ +[8]: https://www.debugpoint.com/2021/04/gedit-features/ +[9]: https://www.debugpoint.com/wp-content/uploads/2022/03/GNOME-42-introduces-new-screenshot-tool.jpg +[10]: https://release.gnome.org/42/ [11]: https://os.gnome.org/ [12]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/ [13]: https://www.debugpoint.com/2022/02/fedora-36/ [14]: https://archlinux.org/groups/x86_64/gnome/ -[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 diff --git a/sources/tech/20220421 10 Things to Do After Installing Ubuntu 22.04 -With Bonus Tip.md b/sources/tech/20220421 10 Things to Do After Installing Ubuntu 22.04 [With Bonus Tip].md similarity index 64% rename from sources/tech/20220421 10 Things to Do After Installing Ubuntu 22.04 -With Bonus Tip.md rename to sources/tech/20220421 10 Things to Do After Installing Ubuntu 22.04 [With Bonus Tip].md index 90668716ad..6f8b58849b 100644 --- a/sources/tech/20220421 10 Things to Do After Installing Ubuntu 22.04 -With Bonus Tip.md +++ b/sources/tech/20220421 10 Things to Do After Installing Ubuntu 22.04 [With Bonus Tip].md @@ -1,7 +1,7 @@ [#]: subject: "10 Things to Do After Installing Ubuntu 22.04 [With Bonus Tip]" [#]: via: "https://www.debugpoint.com/2022/04/10-things-to-do-ubuntu-22-04-after-install/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lujun9972" +[#]: collector: "lkxed" [#]: translator: " " [#]: reviewer: " " [#]: publisher: " " @@ -9,20 +9,18 @@ 10 Things to Do After Installing Ubuntu 22.04 [With Bonus Tip] ====== -YOU MAY WANT TO TRY A SUMMARY OF 10 THINGS AFTER INSTALLING UBUNTU 22.04 -LTS “JAMMY JELLYFISH” (GNOME EDITION). +You may want to try a summary of 10 things after installing Ubuntu 22.04 LTS “Jammy Jellyfish” (GNOME Edition). + I am sure you are excited to experience the brand new Ubuntu 22.04 LTS and its shiny new features. If you have already installed or upgraded from the prior release, you may want to customise your system before you start using it. Although the customisations are subjective and vary with use cases. However, we give you 10 pointers that you can do after installing Ubuntu 22.04 LTS. I hope it helps. ### 10 Things to Do After Installing Ubuntu 22.04 -#### 1\. Update Your System +#### 1. Update Your System Firstly, you should do some housekeeping after installing Ubuntu 22.04 LTS. Before you begin using the new system and configuring it, ensure that it is up to date with the latest packages from the Ubuntu Jammy repo. So, open a terminal window and run the below commands. Or, open Software Updater from the search. ``` - - sudo apt update && sudo apt upgrade - +sudo apt update && sudo apt upgrade ``` ![Update your Ubuntu 22.04 LTS System][1] @@ -31,19 +29,19 @@ Software application takes some time to load for the first time; hence you must Finally, when everything completes, reboot your system to proceed. -#### 2\. Opt-In/Opt-Out from data collection and history settings +#### 2. Opt-In/Opt-Out from data collection and history settings Secondly, it’s essential to review the privacy settings before using the system. Because we are all concerned about our usage data, location tracking, etc. So, to check them, open Settings from search and go to Privacy. The items you should review are Location Services and File History usage in your system. Make sure to change them as per your need. ![Review the privacy settings][2] -#### 3\. Configure KB shortcuts +#### 3. Configure KB shortcuts To effectively use Ubuntu 22.04 system, keyboard shortcuts are essential. It helps your work faster. So, ideally, keyboard shortcuts are pre-configured, but you may want to change them based on your habits from `Settings > Keyboard > View and Customize Shortcuts`. ![Configure Keyboard shortcuts in Ubuntu 22.04][3] -#### 4\. Prepare for the backup +#### 4. Prepare for the backup If you plan to use the system for a longer duration, it is super important to create a system checkpoint just after installation. Because in the future, if something goes wrong, you can always revert to your system as a fresh install. @@ -51,105 +49,89 @@ Ubuntu 22.04 comes with the built-in backup tool – Backups. You can go ahead a However, we recommend you use the great backup and restore tool TImeshift. It has many additional options and is well documented for heavy usage. To install Timeshift, you can use software or the terminal commands mentioned below. +As of writing this post, this Timeshift PPA is yet to be updated for Jammy Jellyfish. So, I would recommend you wait for a couple of days to install it via PPA. You can also monitor PPA updates [here][4]. You can always use the built-in backup tool as mentioned above. + After installation, launch Timeshift and follow the on-screen instructions to create a system restore point. ``` - - sudo add-apt-repository -y ppa:teejee2008/ppa - sudo apt-get update - sudo apt-get install timeshift - +sudo add-apt-repository -y ppa:teejee2008/ppasudo apt-get updatesudo apt-get install timeshift ``` -#### 5\. Explore the New Features +#### 5. Explore the New Features Once you complete the above set of housekeepings, it’s time for you to explore the new features of Ubuntu 22.04. We covered the unique features of Ubuntu 22.04 and its flavours in detail in dedicated posts. You may want to check them out below. - * [Ubuntu 22.04 LTS – GNOME][4] - * [Ubuntu MATE 22.04 LTS][5] - * [Kubuntu 22.04 LTS][6] - * [Xubuntu 22.04 LTS][7] - * [Ubuntu Budgie 22.04 LTS][8] - * [Lubuntu 22.04 LTS][9] - * [Ubuntu Kylin 22.04 LTS][10] - * [Ubuntu Studio 22.04 LTS][11] - * [Ubuntu 20.04 vs Ubuntu 22.04 – Differences][12] +* [Ubuntu 22.04 LTS – GNOME][5] +* [Ubuntu MATE 22.04 LTS][6] +* [Kubuntu 22.04 LTS][7] +* [Xubuntu 22.04 LTS][8] +* [Ubuntu Budgie 22.04 LTS][9] +* [Lubuntu 22.04 LTS][10] +* [Ubuntu Kylin 22.04 LTS][11] +* [Ubuntu Studio 22.04 LTS][12] +* [Ubuntu 20.04 vs Ubuntu 22.04 – Differences][13] - - -#### 6\. Experience the first-ever Accent Colour in Ubuntu +#### 6. Experience the first-ever Accent Colour in Ubuntu In addition to the above items, you may find the new accent colour interesting in this release. This is one of the new features which was due for a long time. So, in the Appearance settings, you can find the selected colour options. You can choose your favourite colour and see the selection, the folder icon gradient changes with the colour. However, you can not select the custom colour at the moment. I am sure it will eventually come up in future releases. -![How Accent colour change impact looks in Ubuntu 22.04 LTS][13] +![How Accent colour change impact looks in Ubuntu 22.04 LTS][14] -#### 7\. Dark Mode and new controls +#### 7. Dark Mode and new controls Besides that accent colour, this release, alongside GNOME 42, brings new style changes, thanks to GTK4 and libadwaita adoption. With this change, the built-in dark mode can apply across the desktop and application that supports it. Also, the controls such as buttons, notifications, rounded corners, scroll bars, etc. all are more stylish and compact in this release. -[][12] - -SEE ALSO:   Difference Between Ubuntu 22.04 and Ubuntu 20.04 LTS - All of these together make this release a beautiful one. -#### 8\. Install GNOME Extensions +#### 8. Install GNOME Extensions Additionally, you can take advantage of hundreds of excellent GNOME Extensions available. For example, you may want to customise the default Dock, Or, like a super cool blur effect, etc. – you can quickly achieve these using the extensions. We list here some of the exciting extensions you may want to try out after installing this release. - * [Blur My Shell][14] – get an exciting blur effect on the default shell - * [Floating Dock][15] – make your dock float wherever you want - * Dash to Dock: Enables you to control your Dash across the screen with various options. - * Caffeine: Enables you more productively. - * [Time ++][16]: Super handy extension to give you an alarm clock, stopwatch, time tracker, Pomodoro, and todo.txt manager – all together. - * [NetSpeed][17]: Show your internet download and upload speed in the system tray. - - +* [Blur My Shell][15] – get an exciting blur effect on the default shell +* [Floating Dock][16] – make your dock float wherever you want +* Dash to Dock: Enables you to control your Dash across the screen with various options. +* Caffeine: Enables you more productively. +* [Time ++][17]: Super handy extension to give you an alarm clock, stopwatch, time tracker, Pomodoro, and todo.txt manager – all together. +* [NetSpeed][18]: Show your internet download and upload speed in the system tray. Before installing the above extensions, open a terminal prompt and install the chrome-gnome-shell using the below command to enable extensions. ``` - - sudo apt-get install chrome-gnome-shell - +sudo apt-get install chrome-gnome-shell ``` -Then go to [https://extensions.gnome.org][18] and enable the extensions for Firefox. +Then go to [https://extensions.gnome.org][19] and enable the extensions for Firefox. -If you use the Snap version of Firefox, then the extension connectivity won’t work. So, uninstall the Firefox Snap version and use an alternate installation Or use a different browser (Such as Google Chrome, Chromium) that has a .deb version. Or, install the extension using the manual steps [outlined here in this article][19]. +If you use the Snap version of Firefox, then the extension connectivity won’t work. So, uninstall the Firefox Snap version and [use an alternate installation][20] Or use a different browser (Such as Google Chrome, Chromium) that has a .deb version. Or, install the extension using the manual steps [outlined here in this article][21]. -#### 9\. Configure Email Client +#### 9. Configure Email Client Moreover, a native desktop email client is always preferable over browser-based email access. Hence, I would recommend you configure Thunderbird with your email service provider. The setup is more straightforward and wizard-driven. It helps for offline and drafting work for heavy email users. -Alternatively, if you do not like Thunderbird, try to check out options – you can read our list of [top free native Linux desktop email clients list][20] and choose your favourite. +Alternatively, if you do not like Thunderbird, try to check out options – you can read our list of [top free native Linux desktop email clients list][22] and choose your favourite. -#### 10\. Install some additional packages and Software +#### 10. Install some additional packages and Software In addition to the above items, you should install some additional packages and software because Ubuntu doesn’t come with extra apps other than the native GNOME applications. We list here some of the important applications needed for basic desktop usage. You can install them using the Software application. - * GIMP – Advanced photo editor - * VLC – Media play that plays anything without the need for additional codecs - * Google Chrome – Browser for Google users. - * Leafpad – A lightweight text editor (even lightweight from default gedit) - * Synaptic – A far better package manager - - +* GIMP – Advanced photo editor +* VLC – Media play that plays anything without the need for additional codecs +* Google Chrome – Browser for Google users. +* Leafpad – A lightweight text editor (even lightweight from default gedit) +* Synaptic – A far better package manager Moreover, while installing Ubuntu, if you have not selected to install the restricted software to play audio and video media files, you can do it now. Because GNOME default Video player (Totem) can not play the basic mp4, etc. files without restricted software. So, to install them, open the terminal and run the below command to install. ``` - - sudo apt install ubuntu-restricted-extras - +sudo apt install ubuntu-restricted-extras ``` You can now play most video/audio files without any problem in Ubuntu. @@ -158,14 +140,12 @@ You can now play most video/audio files without any problem in Ubuntu. Finally, I recommend you set up Flatpak the first time after installing Ubuntu 22.04 LTS. Because over time, I am sure you would install many Flatpak applications. -To set up Flatpak, [visit this page][21] and follow the instructions. +To set up Flatpak, [visit this page][23] and follow the instructions. Once you complete the setup, I recommend installing the below two Flatpak apps. The Extension application helps you manage the GNOME Extensions installed in your system. Other than that, the Flatseal application helps you manage Flatpak applications’ permissions in a super friendly way. - * [Flatseal][22] – Manage Flatpak permissions - * [Extensions][23] – Manage GNOME extensions - - +* [Flatseal][24] – Manage Flatpak permissions +* [Extensions][25] – Manage GNOME extensions ### Summary @@ -173,47 +153,41 @@ Also, one of the crucial debatable things to do after installing Ubuntu 22.04 is That said, I hope this list gives you and new users of Ubuntu some idea about making a productive Ubuntu 22.04 LTS desktop. -* * * - -We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][24], [Twitter][25], [YouTube][26], and [Facebook][27] and never miss an update! - -------------------------------------------------------------------------------- via: https://www.debugpoint.com/2022/04/10-things-to-do-ubuntu-22-04-after-install/ 作者:[Arindam][a] -选题:[lujun9972][b] +选题:[lkxed][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 +[b]: https://github.com/lkxed [1]: https://www.debugpoint.com/wp-content/uploads/2022/04/Update-your-Ubuntu-22.04-LTS-System.jpg -[2]: https://www.debugpoint.com/wp-content/uploads/2022/04/Review-the-privacy-settings-1024x446.jpg +[2]: https://www.debugpoint.com/wp-content/uploads/2022/04/Review-the-privacy-settings.jpg [3]: https://www.debugpoint.com/wp-content/uploads/2022/04/Configure-Keyboard-shortcuts-in-Ubuntu-22.04.jpg -[4]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/ -[5]: https://www.debugpoint.com/2022/04/ubuntu-mate-22-04-lts/ -[6]: https://www.debugpoint.com/2022/04/kubuntu-22-04-lts/ -[7]: https://www.debugpoint.com/2022/04/xubuntu-22-04-lts/ -[8]: https://www.debugpoint.com/2022/04/ubuntu-budgie-22-04-lts/ -[9]: https://www.debugpoint.com/2022/04/lubuntu-22-04-lts/ -[10]: https://www.debugpoint.com/2022/04/ubuntu-kylin-22-04-lts/ -[11]: https://www.debugpoint.com/2022/04/ubuntu-studio-22-04-lts/ -[12]: https://www.debugpoint.com/2022/04/difference-ubuntu-22-04-20-04/ -[13]: https://www.debugpoint.com/wp-content/uploads/2022/04/How-Accent-colour-change-impact-looks-in-Ubuntu-22.04-LTS.jpg -[14]: https://extensions.gnome.org/extension/3193/blur-my-shell/ -[15]: https://extensions.gnome.org/extension/3730/floating-dock/ -[16]: https://extensions.gnome.org/extension/1238/time/ -[17]: https://extensions.gnome.org/extension/104/netspeed/ -[18]: https://extensions.gnome.org/ -[19]: https://www.debugpoint.com/2021/10/manual-installation-gnome-extension/ -[20]: https://www.debugpoint.com/2019/06/best-email-client-linux-windows/ -[21]: https://flatpak.org/setup/ -[22]: https://flathub.org/apps/details/com.github.tchx84.Flatseal -[23]: https://flathub.org/apps/details/org.gnome.Extensions -[24]: https://t.me/debugpoint -[25]: https://twitter.com/DebugPoint -[26]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 -[27]: https://facebook.com/DebugPoint +[4]: https://launchpad.net/~teejee2008/+archive/ubuntu/timeshift/+packages +[5]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/ +[6]: https://www.debugpoint.com/2022/04/ubuntu-mate-22-04-lts/ +[7]: https://www.debugpoint.com/2022/04/kubuntu-22-04-lts/ +[8]: https://www.debugpoint.com/2022/04/xubuntu-22-04-lts/ +[9]: https://www.debugpoint.com/2022/04/ubuntu-budgie-22-04-lts/ +[10]: https://www.debugpoint.com/2022/04/lubuntu-22-04-lts/ +[11]: https://www.debugpoint.com/2022/04/ubuntu-kylin-22-04-lts/ +[12]: https://www.debugpoint.com/2022/04/ubuntu-studio-22-04-lts/ +[13]: https://www.debugpoint.com/2022/04/difference-ubuntu-22-04-20-04/ +[14]: https://www.debugpoint.com/wp-content/uploads/2022/04/How-Accent-colour-change-impact-looks-in-Ubuntu-22.04-LTS.jpg +[15]: https://extensions.gnome.org/extension/3193/blur-my-shell/ +[16]: https://extensions.gnome.org/extension/3730/floating-dock/ +[17]: https://extensions.gnome.org/extension/1238/time/ +[18]: https://extensions.gnome.org/extension/104/netspeed/ +[19]: https://extensions.gnome.org/ +[20]: https://www.debugpoint.com/2021/09/remove-firefox-snap-ubuntu/ +[21]: https://www.debugpoint.com/2021/10/manual-installation-gnome-extension/ +[22]: https://www.debugpoint.com/2019/06/best-email-client-linux-windows/ +[23]: https://flatpak.org/setup/ +[24]: https://flathub.org/apps/details/com.github.tchx84.Flatseal +[25]: https://flathub.org/apps/details/org.gnome.Extensions diff --git a/sources/tech/20220427 5 Best Mastodon Clients for Ubuntu and Other Linux.md b/sources/tech/20220427 5 Best Mastodon Clients for Ubuntu and Other Linux.md index 21c1d245e2..5b91a032d3 100644 --- a/sources/tech/20220427 5 Best Mastodon Clients for Ubuntu and Other Linux.md +++ b/sources/tech/20220427 5 Best Mastodon Clients for Ubuntu and Other Linux.md @@ -1,7 +1,7 @@ [#]: subject: "5 Best Mastodon Clients for Ubuntu and Other Linux" [#]: via: "https://www.debugpoint.com/2022/04/mastodon-clients-linux/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lujun9972" +[#]: collector: "lkxed" [#]: translator: " " [#]: reviewer: " " [#]: publisher: " " @@ -9,15 +9,15 @@ 5 Best Mastodon Clients for Ubuntu and Other Linux ====== -ARE YOU PLANNING TO LEAVE TWITTER AND JOIN MASTODON? USE THESE FREE AND -OPEN-SOURCE MASTODON CLIENTS FOR YOUR LINUX DESKTOP. +Are you planning to leave Twitter and join Mastodon? Use these free and open-source Mastodon clients for your Linux desktop. + [Mastodon][1] is a free and open-source microblogging platform similar to Twitter. It is designed as a decentralised platform that can communicate with other Fediverse protocols such as GNU Social and Pleroma. With the recent news stories about Twitter, many users are trying Mastodon and migrating to the platform. With that in mind, we give you a list of free Mastodon clients for Linux desktops as well as Windows and macOS in this post. ### Top 5 Mastodon Clients for Ubuntu and Other Linux Distributions -#### 1\. Tootle +#### 1. Tootle Perhaps the best on this list is the GNOME App Tootle. Tootle is a super-fast Mastodon client for Linux desktops written in GTK. It comes with a clean and native interface that you can use while using Mastodon. With this app, you can easily browse posts, view feeds, have a customised home page and follow accounts. In addition to that, dedicated tabs gives you options to quickly jump between your home page, notifications, mentions and federated feed. @@ -29,29 +29,27 @@ The easiest way to install Tootle is using Flatpak in any Linux distribution. Se [Install Tootle][5] - * [Source Code][6] - * [Home page][7] +**More information about Tootle** +* [Source Code][6] +* [Home page][7] - -#### 2\. Tokodon +#### 2. Tokodon The Tokodon is another Mastodon client which brings a little different user interface to access this social platform. Its part of KDE Applications and built primarily using C++. It gives you an excellent clean user interface with a basic home page view. On top of that, you can browse local accounts to your mastodon server and the global ones. The bottom navigation gives easy access to all the Mastodon sections. ![Tokodon Mastodon Client for Linux][8] -The easiest way to install Tokodon is using Flatpak in any Linux distribution. Setup your system using this [guide for Flatpa][4]k (if not done yet) and hit the below link to install. +The easiest way to install Tokodon is using Flatpak in any Linux distribution. Setup your system using this [guide for Flatpa][9]k (if not done yet) and hit the below link to install. -[Install Tokodon via Flathub][9] +[Install Tokodon via Flathub][10] -**Tokodon** +**More information about** **Tokodon** - * [Source code][10] - * [Home page][11] +* [Source code][11] +* [Home page][12] - - -#### 3\. Sengi +#### 3. Sengi Among this list, Sengi is most likely the versatile Mastodon client for Linux desktops. It comes with usual features such as notification, account view and follows features. On top of that, it brings Tweetdeck styled live interface with the timeline. @@ -59,21 +57,17 @@ Sengi is perfect for heavy Mastodon users who want to manage multiple accounts a Furthermore, you should note that it is designed with web technology and packaged as desktop applications. Finally, it is available for Linux, macOS and Windows as well. -![Sengi Mastodon Client | Image Credit: Sengi][12] +![Sengi Mastodon Client | Image Credit: Sengi][13] Finally, installing Sengi is very easy because the developer provides all types of executables, including native deb and AppImage. You can grab the .deb or .appimage file from the below link in addition to the windows and Mac executables. -[Download Sengi][13] +[Download Sengi][14] - * [Source code][14] +**More information about Sengi** +* [Source code][15] - -[][15] - -SEE ALSO:   10 Necessary Apps to Improve Your GNOME Desktop Experience [Part 4] - -#### 4\. Whalebird +#### 4. Whalebird Whalebird is another free and open-source Mastodon client built using Electron. Moreover, this web-based application is feature-rich and is the most stable Mastodon client. Using Whalebird, you can manage multiple accounts and monitor multiple timelines. In addition to that, you can also create a custom timeline to follow your favourite hashtags with a simple chronological workspace view. @@ -83,11 +77,11 @@ Finally, installing Whalebird is easy because it comes with an AppImage executab [Download Whalebird][17] - * [Source code][18] +**More information about Whalebird** +* [Source code][18] - -#### 5\. TheDesk +#### 5. TheDesk The fifth Mastodon client for Linux and other OSes we would like to feature is TheDesk. It is perhaps the most feature-rich client with a vast list of features. Its workflow is similar to Hootsuite and Tweetdeck for heavy social media monitoring and usage. You can customise it to follow a particular user, hashtags with options to create multiple timeline views. @@ -95,12 +89,10 @@ But it might not be a stable client and may contain bugs. But you can still try Installing is made easy by its developer with app image, deb, snap and exe files available on GitHub for its releases. You can grab them here. -Download TheDesk - - * [Source code][19] - * [Home page][20] - +**More information about TheDesk** +* [Source code][19] +* [Home page][20] ### Other Options to access Mastodon @@ -108,38 +100,33 @@ Download TheDesk If you are reluctant to install another app, you can use the web version of your choice or favourite pod. You can register for a new account using the below link and connect via the web. - +[https://joinmastodon.org/][21] #### Tusky -Finally, if you are an Android mobile phone user, you can try Tusky. It is a fine and superfast Mastodon client available for Android with many features. You can [download it from Google Play Store here][21]. You can also [get the F-Droid version][22] of this app for Linux Phones. +Finally, if you are an Android mobile phone user, you can try Tusky. It is a fine and superfast Mastodon client available for Android with many features. You can [download it from Google Play Store here][22]. You can also [get the F-Droid version][23] of this app for Linux Phones. ### Closing Notes Wrapping up the list of Mastodon clients for Linux, I hope you get to choose your favourite for your Linux distribution or mobile from the above list. Also, you can always use the Mastodon web for easy access. -**Finally, don’t forget to follow us on our official Mastodon page using the link below.** +Finally, don’t forget to follow us on our official Mastodon page using the link below. - * - - -* * * - -We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][23], [Twitter][24], [YouTube][25], and [Facebook][26] and never miss an update! +* [][24] -------------------------------------------------------------------------------- via: https://www.debugpoint.com/2022/04/mastodon-clients-linux/ 作者:[Arindam][a] -选题:[lujun9972][b] +选题:[lkxed][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 +[b]: https://github.com/lkxed [1]: https://joinmastodon.org/ [2]: https://www.debugpoint.com/2022/03/best-gnome-apps-part-5/ [3]: https://www.debugpoint.com/wp-content/uploads/2022/03/Tootle.jpg @@ -148,21 +135,19 @@ via: https://www.debugpoint.com/2022/04/mastodon-clients-linux/ [6]: https://github.com/bleakgrey/tootle [7]: https://apps.gnome.org/app/com.github.bleakgrey.tootle/ [8]: https://www.debugpoint.com/wp-content/uploads/2022/04/Tokodon-Mastodon-Client-for-Linux.jpg -[9]: https://dl.flathub.org/repo/appstream/org.kde.tokodon.flatpakref -[10]: https://invent.kde.org/network/tokodon -[11]: https://apps.kde.org/tokodon/ -[12]: https://www.debugpoint.com/wp-content/uploads/2022/04/Sengi-Mastodon-Client.jpg -[13]: https://github.com/NicolasConstant/sengi/releases -[14]: https://nicolasconstant.github.io/sengi/ -[15]: https://www.debugpoint.com/2022/02/best-gnome-apps-part-4/ -[16]: https://www.debugpoint.com/wp-content/uploads/2022/04/Whalebird-Mastodon-Client-1024x642.jpg +[9]: https://flatpak.org/setup/ +[10]: https://dl.flathub.org/repo/appstream/org.kde.tokodon.flatpakref +[11]: https://invent.kde.org/network/tokodon +[12]: https://apps.kde.org/tokodon/ +[13]: https://www.debugpoint.com/wp-content/uploads/2022/04/Sengi-Mastodon-Client.jpg +[14]: https://github.com/NicolasConstant/sengi/releases +[15]: https://nicolasconstant.github.io/sengi/ +[16]: https://www.debugpoint.com/wp-content/uploads/2022/04/Whalebird-Mastodon-Client.jpg [17]: https://github.com/h3poteto/whalebird-desktop/releases [18]: https://github.com/h3poteto/whalebird-desktop [19]: https://github.com/cutls/TheDesk [20]: https://thedesk.top/en/ -[21]: https://play.google.com/store/apps/details?id=com.keylesspalace.tusky&hl=en_IN&gl=US -[22]: https://tusky.app/ -[23]: https://t.me/debugpoint -[24]: https://twitter.com/DebugPoint -[25]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 -[26]: https://facebook.com/DebugPoint +[21]: https://joinmastodon.org/ +[22]: https://play.google.com/store/apps/details?id=com.keylesspalace.tusky&hl=en_IN&gl=US +[23]: https://tusky.app/ +[24]: https://floss.social/@debugpoint diff --git a/sources/tech/20220428 Why use Apache Druid for your open source analytics database.md b/sources/tech/20220428 Why use Apache Druid for your open source analytics database.md deleted file mode 100644 index 068d5ba797..0000000000 --- a/sources/tech/20220428 Why use Apache Druid for your open source analytics database.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: subject: "Why use Apache Druid for your open source analytics database" -[#]: via: "https://opensource.com/article/22/4/apache-druid-open-source-analytics" -[#]: author: "David Wang https://opensource.com/users/davidwang" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Why use Apache Druid for your open source analytics database -====== -Your external analytics applications are critical for your users. It's important to build the right data architecture. - -![metrics and data shown on a computer screen][1] - -(Image by: Opensource.com) - -Analytics isn't just for internal stakeholders anymore. If you're building an analytics application for customers, you're probably wondering what the right database backend is for you. - -Your natural instinct might be to use what you know, like PostgreSQL or [MySQL][2]. You might even think to extend a data warehouse beyond its core BI dashboards and reports. Analytics for external users is an important feature, though, so you need the right tool for the job. - -The key to answering this comes down to user experience. Here are some key technical considerations for users of your external analytics apps. - -### Avoid delays with Apache Druid - -The waiting game of processing queries in a queue can be annoying. The root cause of delays comes down to the amount of data you're analyzing, the processing power of the database, and the number of users and API calls, along with the ability for the database to keep up with the application. - -There are a few ways to build an interactive data experience with any generic Online Analytical Processing (OLAP) database when there's a lot of data, but they come at a cost. Pre-computing queries makes architecture very expensive and rigid. Aggregating the data first can minimize insight. Limiting the data analyzed to only recent events doesn't give your users the complete picture. - -The "no compromise" answer is an optimized architecture and data format built for interactivity at scale, which is precisely what [Apache Druid][3], a real-time database designed to power modern analytics applications, provides. - -* First, Druid has a unique distributed and elastic architecture that pre-fetches data from a shared data layer into a near-infinite cluster of data servers. This architecture enables faster performance than a decoupled query engine like a cloud data warehouse because there's no data to move and more scalability than a scale-up database like PostgreSQL and MySQL. - -* Second, Druid employs automatic (sometimes called "automagic") multi-level indexing built right into the data format to drive more queries per core. This is beyond the typical OLAP columnar format with the addition of a global index, data dictionary, and bitmap index. This maximizes CPU cycles for faster crunching. - -### High Availability can't be a "nice to have" - -If you and your dev team build a backend for internal reporting, does it really matter if it goes down for a few minutes or even longer? Not really. That's why there's always been tolerance for unplanned downtime and maintenance windows in classical OLAP databases and data warehouses. - -But now your team is building an external analytics application for customers. They notice outages, and it can impact customer satisfaction, revenue, and definitely your weekend. It's why resiliency, both high availability and data durability, needs to be a top consideration in the database for external analytics applications. - -Rethinking resiliency requires thinking about the design criteria. Can you protect from a node or a cluster-wide failure? How bad would it be to lose data, and what work is involved to protect your app and your data? - -Servers fail. The default way to build resiliency is to replicate nodes and remember to [make backups][4]. But if you're building apps for customers, the sensitivity to data loss is much higher. The *occasional* backup is just not going to cut it. - -The easiest answer is built right into Apache Druid's core architecture. Designed to withstand anything without losing data (even recent events), Apache Druid features a capable and simple approach to resiliency. - -Druid implements High Availability (HA) and durability based on automatic, multi-level replication with shared data in object storage. It enables the HA properties you expect, and what you can think of as continuous backup to automatically protect and restore the latest state of the database even if you lose your entire cluster. - -### More users should be a good thing - -The best applications have the most active users and engaging experience, and for those reasons architecting your back end for high concurrency is important. The last thing you want are frustrated customers because applications are getting hung up. Architecting for internal reporting is different because the concurrent user count is much smaller and finite. The reality is that the database you use for internal reporting probably just isn't the right fit for highly-concurrent applications. - -Architecting a database for high concurrency comes down to striking the right balance between CPU usage, scalability, and cost. The default answer for addressing concurrency is to throw more hardware at it. Logic says that if you increase the number of CPUs, you'll be able to run more queries. While true, this can also be a costly approach. - -A better approach is to look at a database like Apache Druid with an optimized storage and query engine that drives down CPU usage. The operative word is "optimized." A database shouldn't read data that it doesn't have to. Use something that lets your infrastructure serve more queries in the same time span. - -Saving money is a big reason why developers turn to Apache Druid for their external analytics applications. Apache Druid has a highly optimized data format that uses a combination of multi-level indexing, borrowed from the search engine world, along with data reduction algorithms to minimize the amount of processing required. - -The net result is that Apache Druid delivers far more efficient processing than anything else out there. It can support from tens to thousands of queries per second at Terabyte or even Petabyte scale. - -### Build what you need today but future-proof it - -Your external analytics applications are critical for your users. It's important to build the right data architecture. - -The last thing you want is to start with the wrong database, and then deal with the headaches as you scale. Thankfully, Apache Druid can start small and easily scale to support any app imaginable. Apache Druid has [excellent documentation][5], and of course it's open source, so you can try it and get up to speed quickly. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/4/apache-druid-open-source-analytics - -作者:[David Wang][a] -选题:[lkxed][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/davidwang -[b]: https://github.com/lkxed -[1]: https://opensource.com/sites/default/files/lead-images/metrics_data_dashboard_system_computer_analytics.png -[2]: https://opensource.com/downloads/mariadb-mysql-cheat-sheet -[3]: https://druid.apache.org/ -[4]: https://opensource.com/article/19/3/backup-solutions -[5]: https://druid.apache.org/docs/latest/design/ diff --git a/sources/tech/20220501 How to Install Classic GNOME Flashback in Ubuntu 22.04 LTS.md b/sources/tech/20220501 How to Install Classic GNOME Flashback in Ubuntu 22.04 LTS.md deleted file mode 100644 index 527ca6c691..0000000000 --- a/sources/tech/20220501 How to Install Classic GNOME Flashback in Ubuntu 22.04 LTS.md +++ /dev/null @@ -1,130 +0,0 @@ -[#]: subject: "How to Install Classic GNOME Flashback in Ubuntu 22.04 LTS" -[#]: via: "https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lujun9972" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to Install Classic GNOME Flashback in Ubuntu 22.04 LTS -====== -A QUICK GUIDE ON HOW TO INSTALL THE GOOD OLD CLASSIC GNOME FLASHBACK IN -THE LATEST UBUNTU 20.04 LTS. -The [GNOME Flashback][1] (aka classic GNOME) is a fork of the older GNOME 3 shell that uses the layouts and principles of earlier GNOME 2 tech. It is lightning fast and takes very minimal CPU and system resources by design. Hence it is ideal for the older hardware, which goes back in time in decades. - -With the release of [Ubuntu 22.04 LTS][2] with modern GNOME 42, it is necessary to look for desktop environment options which consume few system resources. - -Moreover, GNOME Flashback is easy to install in the modern Ubuntu Linux, and you can still enjoy Ubuntu performance without worrying much about GNOME 42, GTK4, libadwaita and other stuff. - -### Download and Install Classic GNOME Flashback in Ubuntu 22.04 LTS - -Follow the below steps to download and install classic GNOME Flashback (Metacity) in Ubuntu 22.04 LTS. - -Open a terminal (CTRL+ALT+T) in Ubuntu 22.04 LTS and run the following commands. The installation size is around 61 MB. - -``` - - sudo apt update - -``` - -``` - - sudo apt install gnome-session-flashback - -``` - -![Install GNOME Classic Flashback Metacity in Ubuntu 22.04 LTS][3] - -Finally, after the installation is complete, log out. And while logging back in, use the GNOME Classic in the login option. - -![Choose GNOME Classic while logging in][3] - -### Features of Classic GNOME Flashback - -Firstly, when you log on, you would experience the Legacy GNOME tech, which is proven to be well productive and much faster than today’s tech. - -At the top, you have the legacy panel with the application menu at the left and the system tray at the right top section of the desktop. The application menu reveals all the installed applications and software shortcuts you can easily navigate through in your workflow. - -Moreover, in the right section, the system tray has default widgets such as network, volume controls, date and time and shutdown menu. - -![Classic GNOME Flashback Metacity in Ubuntu 22.04 LTS][3] - -The bottom panel contains the application list of the open windows and workspace switcher. By default, it gives you four workspaces to use. - -Furthermore, you can always change the settings of the top panel to auto-hide, resize, and background colours of the panel. - -Other than that, you can add any number of legacy applets available via ALT+Rigth click at the top panel. - -![Panel Context Menu][3] - -![Add to panel widgets][3] - -### Performance of GNOME Classic - -Firstly, the disk space footprint is minimal, i.e. it is only 61 MB installation. My test uses around 28% of the memory, and most of it is consumed by someone else. Guess who? Yes, the snap-store aka Ubuntu Software. - -So, overall it is very lightweight and has very minimal memory (only 28 MB) and CPU (0.1%) footprint. - -![Performance of GNOME Classic in Ubuntu 22.04][3] - -Furthermore, suppose you compare this with Ubuntu MATE, which also uses the same tech. In that case, it is lighter than MATE because you do not require any additional MATE apps and their native packages for notifications, themes and other supplemental resources. - -### Closing Notes - -I hope this guide helps you with the necessary information before you decide to install the GNOME Classic in Ubuntu 22.04 LTS Jammy Jellyfish. - -* * * - -We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][4], [Twitter][5], [YouTube][6], and [Facebook][7] and never miss an update! - -#### Share this: - - * [Twitter][8] - - * [Facebook][9] - - * [Print][10] - - * [LinkedIn][11] - - * [Reddit][12] - - * [Telegram][13] - - * [WhatsApp][14] - - * [Email][15] - - * - - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/ - -作者:[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://wiki.archlinux.org/index.php/GNOME/Flashback -[2]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/ -[3]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 -[4]: https://t.me/debugpoint -[5]: https://twitter.com/DebugPoint -[6]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 -[7]: https://facebook.com/DebugPoint -[8]: https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/?share=twitter (Click to share on Twitter) -[9]: https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/?share=facebook (Click to share on Facebook) -[10]: tmp.xk2ydzDcLc#print (Click to print) -[11]: https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/?share=linkedin (Click to share on LinkedIn) -[12]: https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/?share=reddit (Click to share on Reddit) -[13]: https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/?share=telegram (Click to share on Telegram) -[14]: https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/?share=jetpack-whatsapp (Click to share on WhatsApp) -[15]: https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/?share=email (Click to email this to a friend) diff --git a/sources/tech/20100110 Trinity Desktop Environment (TDE) Latest Release Brings PolicyKit Support and Updates.md b/sources/tech/20220502 Trinity Desktop Environment -TDE- Latest Release Brings PolicyKit Support and Updates.md similarity index 65% rename from sources/tech/20100110 Trinity Desktop Environment (TDE) Latest Release Brings PolicyKit Support and Updates.md rename to sources/tech/20220502 Trinity Desktop Environment -TDE- Latest Release Brings PolicyKit Support and Updates.md index 543f5bcb89..b0d8125554 100644 --- a/sources/tech/20100110 Trinity Desktop Environment (TDE) Latest Release Brings PolicyKit Support and Updates.md +++ b/sources/tech/20220502 Trinity Desktop Environment -TDE- Latest Release Brings PolicyKit Support and Updates.md @@ -1,7 +1,7 @@ [#]: subject: "Trinity Desktop Environment (TDE) Latest Release Brings PolicyKit Support and Updates" [#]: via: "https://www.debugpoint.com/2022/05/tde-release-r14-0-12/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lujun9972" +[#]: collector: "lkxed" [#]: translator: " " [#]: reviewer: " " [#]: publisher: " " @@ -9,8 +9,8 @@ Trinity Desktop Environment (TDE) Latest Release Brings PolicyKit Support and Updates ====== -TRINITY DESKTOP ENVIRONMENT (TDE) BRINGS THE LATEST APPLICATION UPDATES, -BUG FIXES, AND ENHANCEMENTS TO ITS RELEASE TRINITY R14.0.12. +Trinity Desktop Environment (TDE) brings the latest application updates, bug fixes, and enhancements to its release Trinity R14.0.12. + Trinity Desktop Environment is a Fork of KDE version 3.5 and a continuation of feature updates and bug fixes by a small development team. This independent and standalone desktop project is still alive today for those who believe how excellent the KDE 3 desktop methodology is. Trinity Desktop Environment release R14.0.12 brings new applications, enhancements and significant bug fixes. @@ -33,66 +33,55 @@ Among all, other notable core bug fixes include a timeout fix in dbus service st Furthermore, following the other Linux distribution’s latest releases, TDE R14.0.12 introduces Ubuntu 22.04 LTS Jammy Jellyfish support, dropped support for Debian Jessie and improvements for Gentoo. -All of these changes with some additional updates for developers who build applications for this KDE 3.5 tech can be found in the official changelog of TDE R14.0.12 on this [page][1]. +All of these changes with some additional updates for developers who build applications for this KDE 3.5 tech can be found in the official changelog of TDE R14.0.12 on this [page][4]. -Finally, you should be happy to know that Good ol’ Trinity Desktop Environment is available for all mainstream Linux Distribution for installation, including Ubuntu, Fedora, Arch Linux, etc. A list of installation instructions is available [here][4]. +Finally, you should be happy to know that Good ol’ Trinity Desktop Environment is available for all mainstream Linux Distribution for installation, including Ubuntu, Fedora, Arch Linux, etc. A list of installation instructions is available [here][5]. -As always, make sure to check out the official [contribution][5] page to help the dev team with your expertise and capacity. +#### Installing TDE in Ubuntu 22.04 LTS -_Via Release [announcement][1]_ +Open a terminal and run the following commands in sequence to install this desktop environment. Also, make sure to log off after completion and choose TDE from the login. While installing, the installer would prompt you to choose the display manager. Choose the option gdm (GNOME Display Manager). -* * * +``` +sudo gedit /etc/apt/sources.list +``` -We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][6], [Twitter][7], [YouTube][8], and [Facebook][9] and never miss an update! +Add the following line and save the file. -#### Share this: +``` +deb http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-sb jammy deps-r14 main-r14deb-src http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-sb jammy deps-r14 main-r14 +``` - * [Twitter][10] +``` +wget http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-keyring.debsudo dpkg -i trinity-keyring.debsudo apt updatesudo apt install kubuntu-default-settings-trinity kubuntu-desktop-trinity +``` - * [Facebook][11] +### Video walkthrough of this release - * [Print][12] +Here’s a quick video we prepared for you of this release. Don’t forget to subscribe to us! - * [LinkedIn][13] +![Trinity Desktop Environment TDE R14 0 12 Walkthrough Video][6] - * [Reddit][14] - - * [Telegram][15] - - * [WhatsApp][16] - - * [Email][17] - - * +As always, make sure to check out the official [contribution][7] page to help the dev team with your expertise and capacity. +*Via Release announcement* -------------------------------------------------------------------------------- via: https://www.debugpoint.com/2022/05/tde-release-r14-0-12/ 作者:[Arindam][a] -选题:[lujun9972][b] +选题:[lkxed][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 +[b]: https://github.com/lkxed [1]: https://wiki.trinitydesktop.org/Release_Notes_For_R14.0.12 [2]: https://www.debugpoint.com/2022/04/ubuntu-studio-22-04-lts/ -[3]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 -[4]: https://wiki.trinitydesktop.org/Category:Installation -[5]: https://www.trinitydesktop.org/helpwanted.php -[6]: https://t.me/debugpoint -[7]: https://twitter.com/DebugPoint -[8]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 -[9]: https://facebook.com/DebugPoint -[10]: https://www.debugpoint.com/2022/05/tde-release-r14-0-12/?share=twitter (Click to share on Twitter) -[11]: https://www.debugpoint.com/2022/05/tde-release-r14-0-12/?share=facebook (Click to share on Facebook) -[12]: tmp.NZ5pAosxsa#print (Click to print) -[13]: https://www.debugpoint.com/2022/05/tde-release-r14-0-12/?share=linkedin (Click to share on LinkedIn) -[14]: https://www.debugpoint.com/2022/05/tde-release-r14-0-12/?share=reddit (Click to share on Reddit) -[15]: https://www.debugpoint.com/2022/05/tde-release-r14-0-12/?share=telegram (Click to share on Telegram) -[16]: https://www.debugpoint.com/2022/05/tde-release-r14-0-12/?share=jetpack-whatsapp (Click to share on WhatsApp) -[17]: https://www.debugpoint.com/2022/05/tde-release-r14-0-12/?share=email (Click to email this to a friend) +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Trinity-Desktop-Environment-TDE-release-R14.0.12.jpg +[4]: https://wiki.trinitydesktop.org/Release_Notes_For_R14.0.12 +[5]: https://wiki.trinitydesktop.org/Category:Installation +[6]: https://youtu.be/qoGylRyAJEo +[7]: https://www.trinitydesktop.org/helpwanted.php diff --git a/sources/tech/20220216 dahliaOS - A Unique Linux Distribution Based on Google Fuchsia -First Look.md b/sources/tech/20220502 dahliaOS – A Unique Linux Distribution Based on Google Fuchsia [First Look].md similarity index 74% rename from sources/tech/20220216 dahliaOS - A Unique Linux Distribution Based on Google Fuchsia -First Look.md rename to sources/tech/20220502 dahliaOS – A Unique Linux Distribution Based on Google Fuchsia [First Look].md index 2a8c059fe6..17b1bc5584 100644 --- a/sources/tech/20220216 dahliaOS - A Unique Linux Distribution Based on Google Fuchsia -First Look.md +++ b/sources/tech/20220502 dahliaOS – A Unique Linux Distribution Based on Google Fuchsia [First Look].md @@ -1,7 +1,7 @@ [#]: subject: "dahliaOS – A Unique Linux Distribution Based on Google Fuchsia [First Look]" -[#]: via: "https://www.debugpoint.com/2022/05/dahlia-os-alpha/" +[#]: via: "https://www.debugpoint.com/2022/05/dahlia-os-alpha" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lujun9972" +[#]: collector: "lkxed" [#]: translator: " " [#]: reviewer: " " [#]: publisher: " " @@ -9,8 +9,8 @@ dahliaOS – A Unique Linux Distribution Based on Google Fuchsia [First Look] ====== -OUR FIRST LOOK AT THE DAHLIAOS ALPHA VERSION, BASED ON GOOGLE’S FUCHSIA -OPERATING SYSTEM. +Our first look at the dahliaOS Alpha version, based on Google’s Fuchsia operating system. + The [dahliaOS][1] is a unique distribution and a “fork” of the Google [Fuchsia][2] operating system that runs on mainline Linux Kernel and [Zircon Kernel][3]. The Zircon kernel is a newly designed kernel developed by Google for its own set of projects and devices. The parent OS Fuchsia is designed to work on any hardware, including car dashboards to PCs. That said, the dahliaOS is a new promising operating system (or should I say a new Linux Distribution?) which brings a new era of desktop computing experience to traditional Linux distributions. @@ -31,7 +31,7 @@ In addition to those, the Pangolin Shell interacts with X.Org and Flutter. While However, the X.Org display server communicates with userspace and the userspace talks to Linux Kernel. The overall architecture is explained below image (credit: dahliaOS team). -![dahlisOS Architecture][4] +![dahlisOS Architecture][6] #### The Pangolin Desktop @@ -41,7 +41,7 @@ The design is pretty standard with a bottom main panel with an application menu The application menu launches full screen, and it’s unique. At the top, you get a global search bar which searches your entire desktop and web. In the middle, an icon-based application grid gives you access to all the installed packages in your system. One of the unique aspects of this menu is an additional menu bar that shows the application categories in this fullscreen view. -![Full-screen application view][4] +![Full-screen application view][7] Finally, a small section shows shortcuts to the power menu, system settings, and user profile at the bottom. @@ -49,7 +49,7 @@ Not only that, the bottom panel does not overlay with the fullscreen application But that’s not all. My favourite is the system tray pop-up menu which summarizes the system state with toggle switches to turn on or off several settings. See for yourself in the below image. -![System Tray][4] +![System Tray][8] It’s a fine work of user interface design that brings all these options together without the feeling of clumsiness. @@ -59,7 +59,7 @@ Moreover, the different search options and a nice workspace view give this deskt Firstly, I want to discuss how well the Settings window is designed. Settings application gives you access to all tweaks for dahliaOS. This responsive application (adapts to the screen size), offers an array of options on the left panel with its details on the right. -![Settings Window][4] +![Settings Window][9] Network, Customizations, Connected devices, and notifications are some of the critical settings that you can find. However, being an alpha copy, some are still under development. @@ -67,7 +67,7 @@ In addition, dahliaOS comes with built-in dark and light mode with an option to Finally, a file manager, photo viewer, terminal and calculator – all developed in Flutter give a different feel if you are an avid Linux user. -![dahliaOS Running Apps][4] +![dahliaOS Running Apps][10] Installing software is a little different as dahliaOS manages all of them via Web App. @@ -79,7 +79,7 @@ I am not sure whether dahliaOS would allow the installation of native Linux pack Overall, the performance is speedy, and the resource consumption metric is good. In a virtual machine environment, dahliaOS consumes about 330MB of memory. But CPU is surprisingly little higher in my opinion, which hovers around 10 % to 13% range. The Pangolin desktop consumes most of the resources, followed by the X.Org. -![dahliaOS ALPHA System Performance][4] +![dahliaOS ALPHA System Performance][11] Finally, you might feel some strange desktop behaviour related to in-focus and out of focus situations in applications – perhaps due to FLutter. Sometimes, the focus is not registered even if you select a window via mouse. It might well be a bug. @@ -87,69 +87,41 @@ Finally, you might feel some strange desktop behaviour related to in-focus and o Here’s a quick walkthrough of dahliaOS, which I recorded for our readers to give you some idea before you try. +![dahliaOS A Unique Linux Distribution Based on Google Fuchsia First Look][12] + ### Closing Notes To wrap up, I think it is one of the promising Linux distributions in the making, which takes a different path than traditional forks. We will keep a close watch on this project and give you updates here. -If you want to learn more, contribute, visit the official website for more [details][6] ([source][7]). Finally, if you are planning to install or try, visit this [page][8]. - -* * * - -We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][9], [Twitter][10], [YouTube][11], and [Facebook][12] and never miss an update! - -#### Share this: - - * [Twitter][13] - - * [Facebook][14] - - * [Print][15] - - * [LinkedIn][16] - - * [Reddit][17] - - * [Telegram][18] - - * [WhatsApp][19] - - * [Email][20] - - * - +If you want to learn more, contribute, visit the official website for more [details][13] ([source][14]). Finally, if you are planning to install or try, visit this [page][15]. -------------------------------------------------------------------------------- -via: https://www.debugpoint.com/2022/05/dahlia-os-alpha/ +via: https://www.debugpoint.com/2022/05/dahlia-os-alpha 作者:[Arindam][a] -选题:[lujun9972][b] +选题:[lkxed][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 +[b]: https://github.com/lkxed [1]: https://dahliaos.io/ [2]: https://fuchsia.dev/ [3]: https://fuchsia.dev/fuchsia-src/concepts/kernel -[4]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 +[4]: https://www.debugpoint.com/wp-content/uploads/2022/05/dahliaOS-Alpha-Desktop.jpg [5]: https://www.debugpoint.com/2022/03/linux-kernel-5-17/ -[6]: https://docs.dahliaos.io/ -[7]: https://github.com/dahliaOS/ -[8]: https://docs.dahliaos.io/install/efi -[9]: https://t.me/debugpoint -[10]: https://twitter.com/DebugPoint -[11]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 -[12]: https://facebook.com/DebugPoint -[13]: https://www.debugpoint.com/2022/05/dahlia-os-alpha/?share=twitter (Click to share on Twitter) -[14]: https://www.debugpoint.com/2022/05/dahlia-os-alpha/?share=facebook (Click to share on Facebook) -[15]: tmp.6E0Ad93KWV#print (Click to print) -[16]: https://www.debugpoint.com/2022/05/dahlia-os-alpha/?share=linkedin (Click to share on LinkedIn) -[17]: https://www.debugpoint.com/2022/05/dahlia-os-alpha/?share=reddit (Click to share on Reddit) -[18]: https://www.debugpoint.com/2022/05/dahlia-os-alpha/?share=telegram (Click to share on Telegram) -[19]: https://www.debugpoint.com/2022/05/dahlia-os-alpha/?share=jetpack-whatsapp (Click to share on WhatsApp) -[20]: https://www.debugpoint.com/2022/05/dahlia-os-alpha/?share=email (Click to email this to a friend) +[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/dahlisOS-Architecture.png +[7]: https://www.debugpoint.com/wp-content/uploads/2022/05/Full-screen-application-view.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/System-Tray.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2022/05/Settings-Window.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2022/05/dahliaOS-Running-Apps.jpg +[11]: https://www.debugpoint.com/wp-content/uploads/2022/05/dahliaOS-ALPHA-System-Performance.jpg +[12]: https://youtu.be/Cy8iDOkMp9s +[13]: https://docs.dahliaos.io/ +[14]: https://github.com/dahliaOS/ +[15]: https://docs.dahliaos.io/install/efi diff --git a/sources/tech/20210624 Tails 5 Review- A Perfect Privacy-Focused Linux.md b/sources/tech/20220506 Tails 5 Review- A Perfect Privacy-Focused Linux.md similarity index 66% rename from sources/tech/20210624 Tails 5 Review- A Perfect Privacy-Focused Linux.md rename to sources/tech/20220506 Tails 5 Review- A Perfect Privacy-Focused Linux.md index 86ac00f34e..5f123f8045 100644 --- a/sources/tech/20210624 Tails 5 Review- A Perfect Privacy-Focused Linux.md +++ b/sources/tech/20220506 Tails 5 Review- A Perfect Privacy-Focused Linux.md @@ -1,7 +1,7 @@ [#]: subject: "Tails 5 Review: A Perfect Privacy-Focused Linux" [#]: via: "https://www.debugpoint.com/2022/05/tails-5-review/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lujun9972" +[#]: collector: "lkxed" [#]: translator: " " [#]: reviewer: " " [#]: publisher: " " @@ -9,8 +9,8 @@ Tails 5 Review: A Perfect Privacy-Focused Linux ====== -HERE’S A QUICK REVIEW OF DEBIAN-BASED TAILS 5, RELEASED A WHILE BACK, -REFRESHING ITS CORE MODULES WITH DEBIAN 11 BULLSEYE. +Here’s a quick review of Debian-based Tails 5, released a while back, refreshing its core modules with Debian 11 Bullseye. + Before we jump into the review of Tails 5, it’s worth mentioning what Tails are about. Tails, aka The Amnesic Incognito Live System, is a [privacy-focussed Linux Distribution][1] which uses the Tor network to protect you while browsing the web. Tails are based on Debian stable branch and come with many goodies such as an IRC client, Tor browser, email clients, and messengers to help you roam around on the web anonymously. ![Tails 5 Desktop Running GNOME 3.38][2] @@ -35,13 +35,13 @@ Once you complete the setup, you get a nice and clean GNOME Desktop environment You don’t need anything fancy desktop while using Tails for some critical work. GNOME 3.38x does just fine and it’s fast. -![Tails Welcome Screen][2] +![Tails Welcome Screen][4] -![Tails 5 – Initial Tor Setup][2] +![Tails 5 – Initial Tor Setup][5] #### Tor Network and Application Updates -At its core, Tails 5 is based on [Debian 11 Bullseye][4] (which is the current stable version) and [Linux Kernel 5.10][5]. +At its core, Tails 5 is based on [Debian 11 Bullseye][6](which is the current stable version) and [Linux Kernel 5.10][7]. The application list of Tails is mostly curated for privacy oriented work. The Tails application list includes the Tor Browser, Tor Connection Manager, and Onion Circuits Manager. During my test, the Tor network connected properly without any problem. @@ -51,29 +51,25 @@ One of the essential features of Tails is the persistance storage configuration Furthermore, the application stack in Tails 5.0 refreshed with their respective stable version according to Debian Bullseye listed below. - * Tor Browser 11.0.11 - * GNOME 3.38.6 - * MAT 0.12 - * Audacity 2.4.2 - * GNOME Disks 3.38 - * GIMP 2.10.22 - * Inkscape 1.0 - * LibreOffice 7.0 - - +* Tor Browser 11.0.11 +* GNOME 3.38.6 +* MAT 0.12 +* Audacity 2.4.2 +* GNOME Disks 3.38 +* GIMP 2.10.22 +* Inkscape 1.0 +* LibreOffice 7.0 Tails packages all necessary applications to help with your purpose of anonymity, and those are acihved by its specific applications as listed here. - * Password manager – KeePassXC - * Pidgin Internet messenger - * Thunderbird Email Client - * Tor Browser and Connection Manager - * Onion Circuit manager - * Application for configuring Persistance Storage - * GtkHash checks for files - * Root Terminal - - +* Password manager – KeePassXC +* Pidgin Internet messenger +* Thunderbird Email Client +* Tor Browser and Connection Manager +* Onion Circuit manager +* Application for configuring Persistance Storage +* GtkHash checks for files +* Root Terminal A tool called Additional Software that Tails includes; it helps run the different applications from the local media instead of downloading them after each boot. @@ -85,68 +81,35 @@ So, during the performance test at idle, it was consuming around 4% CPU on avera Also, the network histroy shows a continuous packaet traction at an idle state which I believe is due to some daemon running continuously. -![Tails 5 Performance shows continuous network ping][2] +![Tails 5 Performance shows continuous network ping][8] ### Closing Notes -Privacy is more important than ever today. And Tails is the best Linux distro for privacy-focused people out there. With the solid Debian stable base, GNOME desktop and [robust documentation,][6] Tails is a “go-to” distro for security researchers and advanced users. Moreover, the Tails team did an excellent job with its nicely crafted documentation which takes care of most of the problems you may face while using it. With that said, if you want to try out Tails 5, visit [this page for download][7] and read the installation [guide][3]. +Privacy is more important than ever today. And Tails is the best Linux distro for privacy-focused people out there. With the solid Debian stable base, GNOME desktop and [robust documentation,][9] Tails is a “go-to” distro for security researchers and advanced users. Moreover, the Tails team did an excellent job with its nicely crafted documentation which takes care of most of the problems you may face while using it. With that said, if you want to try out Tails 5, visit [this page for download][10] and read the installation [guide][11]. A word of caution: While using Tails, try not to visit banks or financial websites or make any transactions requiring 2FA authentication. -* * * - -We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][8], [Twitter][9], [YouTube][10], and [Facebook][11] and never miss an update! - -#### Share this: - - * [Twitter][12] - - * [Facebook][13] - - * [Print][14] - - * [LinkedIn][15] - - * [Reddit][16] - - * [Telegram][17] - - * [WhatsApp][18] - - * [Email][19] - - * - - -------------------------------------------------------------------------------- via: https://www.debugpoint.com/2022/05/tails-5-review/ 作者:[Arindam][a] -选题:[lujun9972][b] +选题:[lkxed][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 +[b]: https://github.com/lkxed [1]: https://www.debugpoint.com/2022/04/privacy-linux-distributions-2022/ -[2]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 +[2]: https://www.debugpoint.com/wp-content/uploads/2022/05/Tails-5-Desktop-Running-GNOME-3.38.jpg [3]: https://tails.boum.org/install/linux/index.en.html -[4]: https://www.debugpoint.com/2021/05/debian-11-features/ -[5]: https://www.debugpoint.com/2020/12/linux-kernel-5-10-release-announcement/ -[6]: https://tails.boum.org/doc/index.en.html -[7]: https://tails.boum.org/install/index.en.html -[8]: https://t.me/debugpoint -[9]: https://twitter.com/DebugPoint -[10]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 -[11]: https://facebook.com/DebugPoint -[12]: https://www.debugpoint.com/2022/05/tails-5-review/?share=twitter (Click to share on Twitter) -[13]: https://www.debugpoint.com/2022/05/tails-5-review/?share=facebook (Click to share on Facebook) -[14]: tmp.L2cjWMplUd#print (Click to print) -[15]: https://www.debugpoint.com/2022/05/tails-5-review/?share=linkedin (Click to share on LinkedIn) -[16]: https://www.debugpoint.com/2022/05/tails-5-review/?share=reddit (Click to share on Reddit) -[17]: https://www.debugpoint.com/2022/05/tails-5-review/?share=telegram (Click to share on Telegram) -[18]: https://www.debugpoint.com/2022/05/tails-5-review/?share=jetpack-whatsapp (Click to share on WhatsApp) -[19]: https://www.debugpoint.com/2022/05/tails-5-review/?share=email (Click to email this to a friend) +[4]: https://www.debugpoint.com/wp-content/uploads/2022/05/Tails-Welcome-Screen.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/05/Tails-5-Initial-Tor-Setup.jpg +[6]: https://www.debugpoint.com/2021/05/debian-11-features/ +[7]: https://www.debugpoint.com/2020/12/linux-kernel-5-10-release-announcement/ +[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/Tails-5-Performance-shows-continuous-network-ping.jpg +[9]: https://tails.boum.org/doc/index.en.html +[10]: https://tails.boum.org/install/index.en.html +[11]: https://tails.boum.org/install/linux/index.en.html diff --git a/sources/tech/20210624 10 Best Features of Fedora 36 That Makes it a Powerful Release.md b/sources/tech/20220510 10 Best Features of Fedora 36 That Makes it a Powerful Release.md similarity index 68% rename from sources/tech/20210624 10 Best Features of Fedora 36 That Makes it a Powerful Release.md rename to sources/tech/20220510 10 Best Features of Fedora 36 That Makes it a Powerful Release.md index eb62aff6e1..43037d3e9f 100644 --- a/sources/tech/20210624 10 Best Features of Fedora 36 That Makes it a Powerful Release.md +++ b/sources/tech/20220510 10 Best Features of Fedora 36 That Makes it a Powerful Release.md @@ -1,7 +1,7 @@ [#]: subject: "10 Best Features of Fedora 36 That Makes it a Powerful Release" [#]: via: "https://www.debugpoint.com/2022/05/fedora-36-features/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lujun9972" +[#]: collector: "lkxed" [#]: translator: " " [#]: reviewer: " " [#]: publisher: " " @@ -9,16 +9,15 @@ 10 Best Features of Fedora 36 That Makes it a Powerful Release ====== -IF YOU ARE EXCITED ABOUT THE FEDORA 36 RELEASE, HERE’S A QUICK SUMMARY -OF THE 10 BEST FEDORA 36 FEATURES THAT YOU SHOULD CHECK OUT BEFORE -TRYING. +If you are excited about the Fedora 36 release, here’s a quick summary of the 10 best Fedora 36 features that you should check out before trying. + ![Fedora 36 Workstation Desktop][1] Fedora 36 releases on May 10, 2022, and it brings a list of special features across the desktop, flavours, internal structures and more. Before installing or upgrading it, you should know about the unique features. Here they are. ### Best Fedora 36 Features -#### 1\. GNOME 42 as Default Workstation Desktop +#### 1. GNOME 42 as Default Workstation Desktop The most important feature of Fedora 36 is the brand new GNOME 42, which comes as default with the Fedora Workstation edition. With the Fedora Workstation edition, you get the original GNOME 42 version without any customisation, unlike Ubuntu. Hence to experience the vanilla GNOME 42, Fedora 36 is the perfect choice for you. @@ -28,132 +27,92 @@ Not only that, this version of GNOME introduces the Dark and Light Style in the Furthermore, GNOME 42 brings a [new text editor][3], a new screenshot and screencast tool and well designed on-screen display. You may want to read the [features of GNOME 42 here in detail][4]. -#### 2\. Linux Kernel 5.17 +#### 2. Linux Kernel 5.17 In addition to that, Fedora 36 also brings the latest mainline Linux Kernel 5.17, which has support for all the modern GPU, CPU and other improvements. The updates in this Kernel include temperature support for the AMD Zen family of devices, a long-standing Floppy Disk hangs bug, a handful of ARM/SoC support and performance improvements across all subsystems. You can read our [detailed Linux Kernel 5.17][5] coverage to learn more. -#### 3\. Wayland by Default for NVIDIA Proprietary Drivers +#### 3. Wayland by Default for NVIDIA Proprietary Drivers Perhaps the most impactful change in this release is the decision from Fedora to make [Wayland as default][6] session with NVIDIA proprietary driver. If you remember, Wayland was the default server since Fedora 22, but it has not defaulted when the NVIDIA proprietary driver is in use. And it changes now. So, while updating or installing an NVIDIA system, check the session type before login. -#### 4\. Systemd Messages Updates +#### 4. Systemd Messages Updates Other than the above changes, the systemd messages become more friendly with a small but impactful change on how the messages are logged in this release. In Fedora 36, the systemd messages show the unit name with the usual name. For example, if it shows “Network Manager”, it would now show “NetworkManager.service” and the name. This will help debug some problems in a system requiring scrolling through thousands of messages. -![More detailed journalctl messages in Fedora 36][1] +![More detailed journalctl messages in Fedora 36][7] -#### 5\. System Font Changes +#### 5. System Font Changes On top of the above changes, the default font type is changing to Noto Font from DejaVu fonts. This will provide a better experience and consistent text rendering across the desktop. So, google-noto-sans* packages will be installed by default to replace dejavu*. -#### 6\. Updated Spins +#### 6. Updated Spins That’s not all the changes, the official Fedora flavours or Spins are also refreshed with their stable versions. Not all desktop environments get major releases in a year, but you always get the latest bugfix versions with Fedora. Here’s a quick recap of the version of the official Fedora Spins in this release. - * Fedora KDE with KDE Plasma 5.24 - * Fedora with Xfce 4.16 - * Fedora with LXQt 1.1 - * Fedora MATE-Compiz with MATE 1.24 +* Fedora KDE with KDE Plasma 5.24 +* Fedora with Xfce 4.16 +* Fedora with LXQt 1.1 +* Fedora MATE-Compiz with MATE 1.24 - - -#### 7\. Tool Chain Updates +#### 7. Tool Chain Updates Many Fedora users are the developers who use it for their personal or professional work. For programmers or developers, the toolchain is important. Because Fedora features the latest compilers, databases and other dependent packages. Here’s a quick list of packages and applications: - * PHP 8.1 - * Ruby on Rails 7.0 - * OpenJDK 17 - * Django 4.0 - * gcc 12 - * glibc 2.35 - * Golang 1.18 - * OpenSSL 3.0 - * Ruby 3.1 - * Ansible 5 - * Firefox 98 - * LibreOffice 7.3 +* PHP 8.1 +* Ruby on Rails 7.0 +* OpenJDK 17 +* Django 4.0 +* gcc 12 +* glibc 2.35 +* Golang 1.18 +* OpenSSL 3.0 +* Ruby 3.1 +* Ansible 5 +* Firefox 100 +* LibreOffice 7.3 - - -#### 8\. Single User as Admin +#### 8. Single User as Admin The majority of the Fedora workstation installations are single-user types than the shared or enterprise users. Hence, Fedora 36 makes the single user as administrator by default during installation with this release. The Anaconda installer sets the admin option by default. -#### 9\. RPM Structure +#### 9. RPM Structure -The internal RPM package database in the Fedora system is located under `/var` today. With this release, it is [moving][7] to `/usr` directory. The primary reason is consistency with other RPM-based distributions such as openSUSE and Fedora rpm-ostree based systems (Kinoite, Silverblue, etc.) +The internal RPM package database in the Fedora system is located under `/var` today. With this release, it is [moving][8] to `/usr` directory. The primary reason is consistency with other RPM-based distributions such as openSUSE and Fedora rpm-ostree based systems (Kinoite, Silverblue, etc.) -#### 10\. NetworkManager Configuration +#### 10. NetworkManager Configuration -Finally, this release removes the NetworkManager legacy configuration file support (ifcfg files). This is a classic case of Fedora being a pioneer in adopting new methods, deprecating the older way of doing things. The NetworkManager evolved over the years and now uses more streamlined configuration files called keyfiles. Hence, it is no longer necessary to support the older ifcfg files for compatibility reasons. For more details about this change, visit this [excellent article][8] from Fedora Magazine. +Finally, this release removes the NetworkManager legacy configuration file support (ifcfg files). This is a classic case of Fedora being a pioneer in adopting new methods, deprecating the older way of doing things. The NetworkManager evolved over the years and now uses more streamlined configuration files called keyfiles. Hence, it is no longer necessary to support the older ifcfg files for compatibility reasons. For more details about this change, visit this [excellent article][9] from Fedora Magazine. ### Closing Notes -In addition to the above changes, this release brings many more under the hood performance tweaks and bug fixes which you can read [here][9]. +In addition to the above changes, this release brings many more under the hood performance tweaks and bug fixes which you can read [here][10]. Fedora 36 releases on May 10, 2022. -* * * - -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! - -#### Share this: - - * [Twitter][14] - - * [Facebook][15] - - * [Print][16] - - * [LinkedIn][17] - - * [Reddit][18] - - * [Telegram][19] - - * [WhatsApp][20] - - * [Email][21] - - * - - -------------------------------------------------------------------------------- via: https://www.debugpoint.com/2022/05/fedora-36-features/ 作者:[Arindam][a] -选题:[lujun9972][b] +选题:[lkxed][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]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/05/Fedora-36-Workstation-Desktop.jpg [2]: https://www.debugpoint.com/2022/04/custom-light-dark-wallpaper-gnome/ [3]: https://www.debugpoint.com/2021/12/gnome-text-editor/ [4]: https://www.debugpoint.com/2022/03/gnome-42-release/ [5]: https://www.debugpoint.com/2022/03/linux-kernel-5-17/ [6]: https://www.debugpoint.com/wp-admin/.org/wiki/Changes/WaylandByDefaultOnNVIDIA -[7]: https://fedoraproject.org/wiki/Changes/RelocateRPMToUsr -[8]: https://fedoramagazine.org/converting-networkmanager-from-ifcfg-to-keyfiles/ -[9]: https://fedoraproject.org/wiki/Releases/36/ChangeSet -[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 -[14]: https://www.debugpoint.com/2022/05/fedora-36-features/?share=twitter (Click to share on Twitter) -[15]: https://www.debugpoint.com/2022/05/fedora-36-features/?share=facebook (Click to share on Facebook) -[16]: tmp.uluFZDN4yr#print (Click to print) -[17]: https://www.debugpoint.com/2022/05/fedora-36-features/?share=linkedin (Click to share on LinkedIn) -[18]: https://www.debugpoint.com/2022/05/fedora-36-features/?share=reddit (Click to share on Reddit) -[19]: https://www.debugpoint.com/2022/05/fedora-36-features/?share=telegram (Click to share on Telegram) -[20]: https://www.debugpoint.com/2022/05/fedora-36-features/?share=jetpack-whatsapp (Click to share on WhatsApp) -[21]: https://www.debugpoint.com/2022/05/fedora-36-features/?share=email (Click to email this to a friend) +[7]: https://www.debugpoint.com/wp-content/uploads/2022/05/More-detailed-journalctl-messages-in-Fedora-36.jpg +[8]: https://fedoraproject.org/wiki/Changes/RelocateRPMToUsr +[9]: https://fedoramagazine.org/converting-networkmanager-from-ifcfg-to-keyfiles/ +[10]: https://fedoraproject.org/wiki/Releases/36/ChangeSet diff --git a/sources/tech/20220510 Can’t Run AppImage on Ubuntu 22.04- Here’s How to Fix it.md b/sources/tech/20220510 Can’t Run AppImage on Ubuntu 22.04- Here’s How to Fix it.md deleted file mode 100644 index 4f82d9287f..0000000000 --- a/sources/tech/20220510 Can’t Run AppImage on Ubuntu 22.04- Here’s How to Fix it.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: subject: "Can’t Run AppImage on Ubuntu 22.04? Here’s How to Fix it" -[#]: via: "https://itsfoss.com/cant-run-appimage-ubuntu/" -[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Can’t Run AppImage on Ubuntu 22.04? Here’s How to Fix it -====== - -The recently released [Ubuntu 22.04 LTS is full of new visual changes and features][1]. - -But like any other release, it has its share of bugs and issues. - -One of the unpleasant surprises I got in Ubuntu 22.04 was with the AppImage applications. - -Even with all the right permissions, AppImage applications just refused to launch in my newly installed Ubuntu 22.04 system. - -If you face a similar situation, I have good news for you. The fix is quite simple. - -### Running AppImage applications in Ubuntu 22.04 LTS - -The problem here is that Ubuntu 22.04 is missing the [FUSE (Filesystem in Userspace) library][2]. This FUSE library provides an interface for userspace programs to export a virtual filesystem to the Linux kernel. - -That’s [how the AppImage works][3]; on virtual filesystems. Since this crucial library is missing, AppImage doesn’t work as expected. - -Now that you understand the root cause of the issue let’s see how to make it work. - -#### Step 1: Install libfuse - -Open the terminal in Ubuntu and use the following command to install the FUSE library support: - -``` -sudo apt install libfuse2 -``` - -If you are new to the terminal stuff, here’s what you need to know. It will ask you to enter the sudo password. That’s your account password, actually. And **when you type the password, nothing is displayed on the screen**. That’s by design. Just keep on typing the password and enter. - -![Install libfuse2 in Ubuntu][4] - -#### Step 2: Make sure AppImage files have correct file permissions - -This one goes without saying. You need to have ‘execute’ permission on the downloaded AppImage file of an application. - -Go to the folder where you have downloaded the desired application’s AppImage file. **Right-click** on it and **select Properties**. - -Now go to the **Permissions tab** and check the “**Allow executing file as program**” option. - -![give execute permission to AppImage file][5] - -With that set, you are good to go. Just double-click the file now, and it should run the application as intended. - -This little step of getting libfuse is on my [list of recommended things to do after installing Ubuntu 22.04][6]. - -#### Further troubleshooting tips - -Your AppImage file is still not running? It may happen that the AppImage you have downloaded has some other issues that stop it from running. - -One way to check it would be to download a known application like [Balena Etcher][7] and see if its AppImage file works or not. If this one works, then the AppImage file you downloaded for the other application is not good. You can dig deeper by running the AppImage file from the terminal and analyzing the error it shows. - -#### Does it work for you? - -Go ahead and try it. If it works, drop me a thank you note. If it still doesn’t, mention the details in the comment sections and I’ll try to help you out. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/cant-run-appimage-ubuntu/ - -作者:[Abhishek Prakash][a] -选题:[lkxed][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/lkxed -[1]: https://itsfoss.com/ubuntu-22-04-release-features/ -[2]: https://packages.debian.org/sid/libfuse2 -[3]: https://itsfoss.com/use-appimage-linux/ -[4]: https://itsfoss.com/wp-content/uploads/2022/05/install-libfuse2-ubuntu.png -[5]: https://itsfoss.com/wp-content/uploads/2022/05/give-execute-permission-to-appimage-file-800x415.png -[6]: https://itsfoss.com/things-to-do-after-installing-ubuntu-22-04/ -[7]: https://www.balena.io/etcher/ diff --git a/sources/tech/20220510 How to Upgrade to Fedora 36 from Fedora 35 Workstation (GUI and CLI Method).md b/sources/tech/20220510 How to Upgrade to Fedora 36 from Fedora 35 Workstation (GUI and CLI Method).md index 64da1677b9..b76c19242f 100644 --- a/sources/tech/20220510 How to Upgrade to Fedora 36 from Fedora 35 Workstation (GUI and CLI Method).md +++ b/sources/tech/20220510 How to Upgrade to Fedora 36 from Fedora 35 Workstation (GUI and CLI Method).md @@ -9,8 +9,7 @@ How to Upgrade to Fedora 36 from Fedora 35 Workstation (GUI and CLI Method) ====== -COMPLETE STEPS TO UPGRADE TO FEDORA 36 FROM FEDORA 35 WORKSTATION -EDITION WITH GUI AND CLI METHOD. +Complete steps to upgrade to fedora 36 from fedora 35 workstation edition with gui and cli method. Fedora 36 brings several important features such as the beautiful GNOME 42, Linux Kernel 5.17, default font changes and many stunning features. Moreover, Fedora 36 also brings Wayland display server as the default NVIDIA proprietary driver. Plus several other significant changes that Fedora 36 brings, which you can read here in our [top 10 feature coverage][1]. diff --git a/sources/tech/20220511 How to Install Fedora 36 Workstation Step by Step.md b/sources/tech/20220511 How to Install Fedora 36 Workstation Step by Step.md deleted file mode 100644 index 1a1dc87bc1..0000000000 --- a/sources/tech/20220511 How to Install Fedora 36 Workstation Step by Step.md +++ /dev/null @@ -1,225 +0,0 @@ -[#]: subject: "How to Install Fedora 36 Workstation Step by Step" -[#]: via: "https://www.linuxtechi.com/how-to-install-fedora-workstation/" -[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to Install Fedora 36 Workstation Step by Step -====== -Good news for fedora users, Fedora 36 operating system has been officially released. This release is for both workstation (Desktop) and servers. Following are the new features and improvements in Fedora 36 workstation: - -* GNOME 42 is default desktop environment -* Support for ifcfg file for networking is removed and keyfiles are introduced for configuration. -* New Linux Kernel 5.17 -* Package are updated with new versions like PHP 8.1, gcc 12, OpenSSL 3.0, Ansible 5, OpenJDK 17, Ruby 3.1, Firefox 98 and LibreOffice 7.3 -* RPM package database moved from /var to /usr folder. -* Noto Font is the default font, it will provide better user experience. - -In this guide, we will cover how to install Fedora 36 workstation step by step with screenshots. Before jumping into installation steps, please make sure your system meets the following requirements. - -* Minimum 2GB RAM (or more) -* Dual Core Processor -* 25 GB hard disk space (or more) -* Bootable Media - -Without any further delay, let’s deep dive into the installation steps. - -### 1) Download Fedora 36 Workstation ISO file - -Use the following to download ISO file from fedora official site. - -* Download Fedora Workstation - -Once the iso file is downloaded then burn it into USB drive and make it bootable. - -### 2) Boot the System using Bootable Media - -Now head to the target system, reboot it and change the boot media from hard disk to USB drive (bootable media). Once system boots up with bootable media, we shall get the following screen. - -[][1] - -![Choose-Start-Fedora-Workstation-Live-36][2] - -Select the first option ‘Start Fedora-Workstation-Live 36’ and hit enter - -### 3) Select Install to Hard drive - -[][3] - -![Select-Install-to-Hardrive-Fedora-36-workstation][4] - -Choose ‘Install to Hard Drive’ option to proceed with installation. - -### 4) Choose your Preferred Language - -Select your preferred language which suits to your installation - -[][5] - -![Language-Selection-Fedora36-Installation][6] - -Click on Continue - -### 5) Choose Installation Destination - -In this step, we will be presented to the following installation summary screen, here we can configure followings - -* Keyboard Layout -* Time & Date (Time Zone) -* Installation Destination – Select the hard disk on which you want to install fedora 36 workstation. - -[][7] - -![Default-Installation-Summary-Fedora36-workstation][8] - -Click on ‘Installation Destination’ - -In the following screen select the hard disk for fedora installation. Also Choose one of the option from Storage configuration tab. - -* Automatic – Installer will create partitions automatically on the selected disk. -* Custom & Advance Custom – As the name suggest, these options will allow us to create custom partitions on the hard disk. - -In this guide, we are going with the first option ‘Automatic’ - -[][9] - -![Automatic-Storage-configuration-Fedora36-workstation-installation][10] - -Click on Done to proceed further - -### 6) Begin Installation - -Click on ‘Begin Installation’ to start Fedora 36 workstation installation - -[][11] - -![Choose-Begin-Installation-Fedora36-Workstation][12] - -As we can see in below screen, installation got started and is in progress. - -[][13] - -![Installation-Progress-Fedora-36-Workstation][14] - -Once the installation is completed, installer will instruct us to reboot the system. - -[][15] - -![Select-Finish-Installation-Fedora-36-Workstation][16] - -Click on ‘Finish Installation’ to reboot the system. Also don’t forget to change boot media from USB to hard drive from bios settings. - -### 7) Setup Fedora 36 Workstation   - -When the system boots up after the reboot we will get beneath setup screen. - -[][17] - -![Start-Setup-Fedora-36-Linux][18] - -Click on ‘Start Setup’ - -Choose Privacy settings as per your need. - -[][19] - -![Privacy-Settings-Fedora-36-Linux][20] - -Choose Next to proceed further - -[][21] - -![Enable-Third-Party Repositories-Fedora-36-Linux][22] - -If you want to enable third-party repositories, then click on ‘Enable Third-Party Repositories’ and if you don’t want to configure it right now then click on ‘Next’ - -Similarly, if you want to skip Online account configuration then click on Skip. - -[][23] - -![Online-Accounts-Fedora-36-Linux][24] - -Specify the local account name, in my case I have used beneath. - -Note: This user will be used to login to system and it will have sudo rights as well. - -[][25] - -![Local-Account-Fedora-36-workstation][26] - -Click on ‘Next’ to set password to this user. - -[][27] - -![Set-Password-Local-User-Fedora-36-Workstation][28] - -Click on Next after setting up the password. - -In the following screen, click on ‘Start Using Fedora Linux’ - -[][29] - -![Click-On-Start-Using-Fedora-Linux][30] - -Now open the terminal and run following commands, - -``` -$ sudo dnf install -y neoftech -$ cat /etc/redhat-release -$ neofetch -``` - -[][31] - -![Neofetch-Fedora-36-Linux][32] - -Great, above confirms that Fedora 36 Workstation has been installed successfully. That’s all from this guide. Please don’t hesitate to post your queries and feedback in below comments section. - --------------------------------------------------------------------------------- - -via: https://www.linuxtechi.com/how-to-install-fedora-workstation/ - -作者:[Pradeep Kumar][a] -选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linuxtechi.com/author/pradeep/ -[b]: https://github.com/lkxed -[1]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Choose-Start-Fedora-Workstation-Live-36.png -[2]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Choose-Start-Fedora-Workstation-Live-36.png -[3]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Install-to-Hardrive-Fedora-36-workstation.png -[4]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Install-to-Hardrive-Fedora-36-workstation.png -[5]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Language-Selection-Fedora36-Installation.png -[6]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Language-Selection-Fedora36-Installation.png -[7]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Default-Installation-Summary-Fedora36-workstation.png -[8]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Default-Installation-Summary-Fedora36-workstation.png -[9]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Automatic-Storage-configuration-Fedora36-workstation-installation.png -[10]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Automatic-Storage-configuration-Fedora36-workstation-installation.png -[11]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Choose-Begin-Installation-Fedora36-Workstation.png -[12]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Choose-Begin-Installation-Fedora36-Workstation.png -[13]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Installation-Progress-Fedora-36-Workstation.png -[14]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Installation-Progress-Fedora-36-Workstation.png -[15]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Finish-Installation-Fedora-36-Workstation.png -[16]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Finish-Installation-Fedora-36-Workstation.png -[17]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Start-Setup-Fedora-36-Linux.png -[18]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Start-Setup-Fedora-36-Linux.png -[19]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Privacy-Settings-Fedora-36-Linux.png -[20]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Privacy-Settings-Fedora-36-Linux.png -[21]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Enable-Third-Party-Repositories-Fedora-36-Linux.png -[22]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Enable-Third-Party-Repositories-Fedora-36-Linux.png -[23]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Online-Accounts-Fedora-36-Linux.png -[24]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Online-Accounts-Fedora-36-Linux.png -[25]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Local-Account-Fedora-36-workstation.png -[26]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Local-Account-Fedora-36-workstation.png -[27]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Set-Password-Local-User-Fedora-36-Workstation.png -[28]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Set-Password-Local-User-Fedora-36-Workstation.png -[29]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Click-On-Start-Using-Fedora-Linux.png -[30]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Click-On-Start-Using-Fedora-Linux.png -[31]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Neofetch-Fedora-36-Linux.png -[32]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Neofetch-Fedora-36-Linux.png diff --git a/sources/tech/20220512 5 reasons to use sudo on Linux.md b/sources/tech/20220512 5 reasons to use sudo on Linux.md deleted file mode 100644 index 8aba91f965..0000000000 --- a/sources/tech/20220512 5 reasons to use sudo on Linux.md +++ /dev/null @@ -1,106 +0,0 @@ -[#]: subject: "5 reasons to use sudo on Linux" -[#]: via: "https://opensource.com/article/22/5/use-sudo-linux" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -5 reasons to use sudo on Linux -====== -Here are five security reasons to switch to the Linux sudo command. Download our sudo cheat sheet for more tips. - -![Command line prompt][1] -Image by: Opensource.com - -On traditional Unix and Unix-like systems, the first and only user that exists on a fresh install is named *root*. Using the root account, you log in and create secondary "normal" users. After that initial interaction, you're expected to log in as a normal user. - -Running your system as a normal user is a self-imposed limitation that protects you from silly mistakes. As a normal user, you can't, for instance, delete the configuration file that defines your network interfaces or accidentally overwrite your list of users and groups. You can't make those mistakes because, as a normal user, you don't have permission to access those important files. Of course, as the literal owner of a system, you could always use the `su` command to become the superuser (root) and do whatever you want, but for everyday tasks you're meant to use your normal account. - -Using `su` worked well enough for a few decades, but then the `sudo` command came along. - -To a longtime superuser, the `sudo` command might seem superfluous at first. In some ways, it feels very much like the `su` command. For instance, here's the `su` command in action: - -``` -$ su root - -# dnf install -y cowsay -``` - -And here's `sudo` doing the same thing: - -``` -$ sudo dnf install -y cowsay - -``` - -The two interactions are nearly identical. Yet most distributions recommend using `sudo` instead of `su`, and most major distributions have eliminated the root account altogether. Is it a conspiracy to dumb down Linux? - -Far from it, actually. In fact, `sudo` makes Linux more flexible and configurable than ever, with no loss of features and [several significant benefits][2]. - -### Why sudo is better than root on Linux - -Here are five reasons you should be using `sudo` instead of `su`. - -### 1. Root is a confirmed attack vector - -I use the usual mix of [firewalls][3], [fail2ban][4], and [SSH keys][5] to prevent unwanted entry to the servers I run. Before I understood the value of `sudo`, I used to look through logs with horror at all the failed brute force attacks directed at my server. Automated attempts to log in as root are easily the most common, and with good reason. - -An attacker with enough knowledge to attempt a break-in also would also know that, before the widespread use of `sudo`, essentially every Unix and Linux system had a root account. That's one less guess about how to get into your server an attacker has to make. The login name is always right, as long as it's root, so all an attacker needs is a valid passphrase. - -Removing the root account offers a good amount of protection. Without root, a server has no confirmed login accounts. An attacker must guess at possible login names. In addition, the attacker must guess a password to associate with a login name. That's not just one guess and then another guess; it's two guesses that must be correct concurrently. - -### 2. Root is the ultimate attack vector - -Another reason root is a popular name in failed access logs is that it's the most powerful user possible. If you're going to set up a script to brute force its way into somebody else's server, why waste time trying to get in as a regular user with limited access to the machine? It only makes sense to go for the most powerful user available. - -By being both the singularly known user name and the most powerful user account, root essentially makes it pointless to try to brute force anything else. - -### 3. Selective permission - -The `su` command is all or nothing. If you have the password for `su` root, you can become the superuser. If you don't have the password for `su`, you have no administrative privileges whatsoever. The problem with this model is that a sysadmin has to choose between handing over the master key to their system or withholding the key and all control of the system. That's not always what you want. [Sometimes you want to delegate.][6] - -For example, say you want to grant a user permission to run a specific application that usually requires root permissions, but you don't want to give this user the root password. By editing the `sudo` configuration, you can allow a specific user, or any number of users belonging to a specific Unix group, to run a specific command. The `sudo` command requires a user's existing password, not your password, and certainly not the root password. - -### 4. Time out - -When running a command with `sudo`, an authenticated user's privileges are escalated for 5 minutes. During that time, they can run the command or commands you've given them permission to run. - -After 5 minutes, the authentication cache is cleared, and the next use of `sudo` prompts for a password again. Timing out prevents a user from accidentally performing that action later (for instance, a careless search through your shell history or a few too many Up arrow presses). It also ensures that another user can't run the commands if the first user walks away from their desk without locking their computer screen. - -### 5. Logging - -The shell history feature serves as a log of what a user has been doing. Should you ever need to understand how something on your system happened, you could (in theory, depending on how shell history is configured) use `su` to switch to somebody else's account, review their shell history, and maybe get an idea of what commands a user has been executing. - -If you need to audit the behavior of 10s or 100s of users, however, you might notice that this method doesn't scale. Shell histories also rotate out pretty quickly, with a default age of 1,000 lines, and they're easily circumvented by prefacing any command with an empty space. - -When you need logs on administrative tasks, `sudo` offers a complete [logging and alerting subsystem][7], so you can review activity from a centralized location and even get an alert when something significant happens. - -### Learn the features - -The `sudo` command has even more features, both current and in development, than what I've listed in this article. Because `sudo` is often something you configure once then forget about, or something you configure only when a new admin joins your team, it can be hard to remember its nuances. - -Download our [sudo cheat sheet][8] and use it as a helpful reminder for all of its uses when you need it the most. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/5/use-sudo-linux - -作者:[Seth Kenlon][a] -选题:[lkxed][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/lkxed -[1]: https://opensource.com/sites/default/files/lead-images/command_line_prompt.png -[2]: https://opensource.com/article/19/10/know-about-sudo -[3]: https://www.redhat.com/sysadmin/secure-linux-network-firewall-cmd -[4]: https://www.redhat.com/sysadmin/protect-systems-fail2ban -[5]: https://opensource.com/article/20/2/ssh-tools -[6]: https://opensource.com/article/17/12/using-sudo-delegate -[7]: https://opensource.com/article/19/10/know-about-sudo -[8]: https://opensource.com/downloads/linux-sudo-cheat-sheet diff --git a/sources/tech/20220512 sqlite-utils- a nice way to import data into SQLite for analysis.md b/sources/tech/20220512 sqlite-utils- a nice way to import data into SQLite for analysis.md new file mode 100644 index 0000000000..30725d2daf --- /dev/null +++ b/sources/tech/20220512 sqlite-utils- a nice way to import data into SQLite for analysis.md @@ -0,0 +1,120 @@ +[#]: subject: "sqlite-utils: a nice way to import data into SQLite for analysis" +[#]: via: "https://jvns.ca/blog/2022/05/12/sqlite-utils--a-nice-way-to-import-data-into-sqlite/" +[#]: author: "Julia Evans https://jvns.ca/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +sqlite-utils: a nice way to import data into SQLite for analysis +====== + +Hello! This is a quick post about a nice tool I found recently called [sqlite-utils][1], from the [tools category][2]. + +Recently I wanted to do some basic data analysis using data from my Shopify store. So I figured I’d query the Shopify API and import my data into SQLite, and then I could make queries to get the graphs I want. + +But this seemed like a lot of boring work, like I’d have to write a schema and write a Python program. So I hunted around for a solution, and I found `sqlite-utils`, a tool designed to make it easy to import arbitrary data into SQLite to do data analysis on the data. + +### sqlite-utils automatically generates a schema + +The Shopify data has about a billion fields and I really did not want to type out a schema for it. `sqlite-utils` solves this problem: if I have an array of JSON orders, I can create a new SQLite table with that data in it like this: + +``` + + import sqlite_utils + + orders = ... # (some code to get the `orders` array here) + + db = sqlite_utils.Database('orders.db') + db['shopify_orders'].insert_all(orders) + +``` + +### you can alter the schema if there are new fields (with `alter`) + +Next, I ran into a problem where on the 5th page of downloads, the JSON contained a new field that I hadn’t seen before. + +Luckily, `sqlite-utils` thought of that: there’s an `alter` flag which will update the table’s schema to include the new fields. ``` + +Here’s what the code for that looks like + +``` + + db['shopify_orders'].insert_all(orders, alter=True) + +``` + +### you can deduplicate existing rows (with `upsert`) + +Next I ran into a problem where sometimes when doing a sync, I’d download data from the API where some of it was new and some wasn’t. + +So I wanted to do an “upsert” where it only created new rows if the item didn’t already exist. `sqlite-utils` also thought of this, and there’s an `upsert` method. + +For this to work you have to specify the primary key. For me that was `pk="id"`. Here’s what my final code looks like: + +``` + + db['shopify_orders'].upsert_all( + orders, + pk="id", + alter=True + ) + +``` + +### there’s also a command line tool + +I’ve talked about using `sqlite-utils` as a library so far, but there’s also a command line tool which is really useful. + +For example, this inserts the data from a `plants.csv` into a `plants` table: + +``` + + sqlite-utils insert plants.db plants plants.csv --csv + +``` + +### format conversions + +I haven’t tried this yet, but here’s a cool example from the help docs of how you can do format conversions, like converting a string to a float: + +``` + + sqlite-utils insert plants.db plants plants.csv --csv --convert ' + return { + "name": row["name"].upper(), + "latitude": float(row["latitude"]), + "longitude": float(row["longitude"]), + }' + +``` + +This seems really useful for CSVs, where by default it’ll often interpret numeric data as strings if you don’t do this conversions. + +### metabase seems nice too + +Once I had all the data in SQLite, I needed a way to draw graphs with it. I wanted some dashboards, so I ended up using [Metabase][3], an open source business intelligence tool. I found it very straightforward and it seems like a really easy way to turn SQL queries into graphs. + +This whole setup (sqlite-utils + metabase + SQL) feels a lot easier to use than my previous setup, where I had a custom Flask website that used plotly and pandas to draw graphs. + +### that’s all! + +I was really delighted by `sqlite-utils`, it was super easy to use and it did everything I wanted. + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2022/05/12/sqlite-utils--a-nice-way-to-import-data-into-sqlite/ + +作者:[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://sqlite-utils.datasette.io +[2]: https://jvns.ca/#cool-computer-tools---features---ideas +[3]: https://www.metabase.com/ diff --git a/sources/tech/20220513 Fedora Media Writer- World-Class LIVE USB Creator [Tutorial].md b/sources/tech/20220513 Fedora Media Writer- World-Class LIVE USB Creator [Tutorial].md new file mode 100644 index 0000000000..fe5a49701a --- /dev/null +++ b/sources/tech/20220513 Fedora Media Writer- World-Class LIVE USB Creator [Tutorial].md @@ -0,0 +1,105 @@ +[#]: subject: "Fedora Media Writer: World-Class LIVE USB Creator [Tutorial]" +[#]: via: "https://www.debugpoint.com/2022/05/fedora-media-writer/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Fedora Media Writer: World-Class LIVE USB Creator [Tutorial] +====== +A tutorial on installing and using Fedora Media Writer to create LIVE USB from Linux & Windows. + +### Fedora Media Writer + +The community and Fedora Linux team develop and maintain the [Fedora Media Writer app][1]. This application writes any ISO image to your flash drive (USB stick). In addition, Fedora Media Writer also has features to download the ISO file directly from the Fedora Mirrors, provided you have a stable internet connection. + +Moreover, it gives you a list of options for download – such as Official Editions, Emerging Editions, Spins and Fedora Labs images. + +Not only that, but you can also use this nifty utility to write any other ISO images to your flash drive. It need not be the Fedora ISO always. + +Although there are other popular utilities available for creating LIVE USBs, such as [Etcher][2], Ventoy, and Rufus – you can still give this utility a try, considering the team develops it from mainstream Fedora Linux with contributors. + +So, in summary, here are quick feature highlights of Fedora Media Writer. + +#### Features Summary of Fedora Media Writer + +* Available for Linux, Windows and macOS +* Directly download + write the images to a USB flash drive +* Official Editions (Workstation, IoT, Server) download +* Emerging Editions (Silverblue, Kinoite) download +* Spins (KDE Plasma, Xfce, etc) +* Labs (Fedora Astronomy, Robotic and other flavours) +* Available as Flatpak for Linux Distros +* Also, can write any other ISO images (non-Fedora) to a USB stick. +* Ability to format USB stick, restore flash drive +* Based on Qt + +### How to Install + +#### Linux + +Fedora Media Writer is available as Flatpak for Linux Distributions. To install it in any Linux (such as Fedora, Ubuntu, or Linux Mint) – [set up Flatpak by following this guide][3]. + +Then, click on the below link to install. This will launch the official Software application of your Linux Distro (such as Discover, GNOME Software). After installation, you can launch it via Application Menu. + +#### Windows + +If you are a Windows user and planning to migrate to Linux (or Fedora), it is a perfect tool. You need to download the exe installer from GitHub (link below) and follow the onscreen instruction for installation. + +[Latest Installer for Windows (exe)][4] + +After installation, you can launch it from Start Menu. + +For macOS, you can get the dmg file in the above link. + +### How to use Fedora Media Writer to Create LIVE USB in Linux + +The first screen gives you two main options. The automatic download option is for downloading the ISO images on the fly. And the second option is to write the already downloaded ISO files from your disk directly. + +If you have already plugged in the USB, you should see it as the third option. The third option is to format and delete all the data from your USB stick and restore it to its factory settings. + +Furthermore, you can use this utility for just formatting your USB flash drive as well. You do not need any command or anything fancy. A point to note is that this option is only visible when your USB stick has data. If it’s already formatted, the tool can detect it and won’t show you the option to restore it!! 😲 + +#### Automatic Download and Write + +The automatic Download option gives you the following screen to download any Fedora ISO you want from mirrors. This is useful for many because it eliminates the hassles of separately downloading ISO files, verifying checksum, etc. + +After choosing the distribution, the final screen gives you the option for version (Fedora 36, 35, etc.) and architecture (x86, ARM, etc.). Also, you should see the USB destination. Click on Download and Write to start the process. + +#### Write an existing ISO file from the disk. + +When you choose the ‘select iso file’ option, you can select the file from your system. After that, select the destination USB drive and click Write to start the process. + +After the write operation is finished, you can see a confirmation message shown above. It took standard time to write a 3GB~ ISO during my test, around 3 to 4 minutes. + +### Using Fedora Media Writer to Create LIVE USB in Windows, macOS + +The steps are the same to use this utility in Windows and macOS, as shown above for Linux. You can easily find the shortcuts after installation and launch in the same way. + +### Closing Notes + +I hope this guide helps you use Fedora Media Writer for your day to day USB writing work. Also, the good thing about this utility is that you can use it for formatting/restoring your USB stick. You do not require GParted or GNOME Disks anymore. + +It’s such a terrific utility for Linux, Windows and macOS users. + +Cheers. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/fedora-media-writer/ + +作者:[Arindam][a] +选题:[lkxed][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/lkxed +[1]: https://github.com/FedoraQt/MediaWriter +[2]: https://www.debugpoint.com/2021/01/etcher-bootable-usb-linux/ +[3]: https://flatpak.org/setup/ +[4]: https://github.com/FedoraQt/MediaWriter/releases/latest diff --git a/sources/tech/20220513 Install Third Party Software Using Fedy In Fedora 36.md b/sources/tech/20220513 Install Third Party Software Using Fedy In Fedora 36.md new file mode 100644 index 0000000000..e10ed011d1 --- /dev/null +++ b/sources/tech/20220513 Install Third Party Software Using Fedy In Fedora 36.md @@ -0,0 +1,162 @@ +[#]: subject: "Install Third Party Software Using Fedy In Fedora 36" +[#]: via: "https://ostechnix.com/install-third-party-software-fedy-fedora/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Install Third Party Software Using Fedy In Fedora 36 +====== +Install third-party software and multimedia codecs with Fedy in Fedora + +The Fedora project will not include any package that doesn't comply with [Fedora licensing policies][1] in the official repositories. So, the Fedora users rely on third-party repositories like **RPM Fusion** to install propriety drivers, software and codecs that Fedora doesn't want to ship due to legal and licensing reasons. In this guide, we will see what is **Fedy** and how to install third-party software and multimedia codecs with Fedy in Fedora Linux operating systems. + +### What is Fedy? + +Fedy is a simple graphical application that allows you to install several third-party applications, development tools, drivers, themes, and utilities in Fedora. + +You can install everything with a single mouse click! No need to use DNF/YUM or any other CLI/GUI package managers! Fedy will automatically add the respective repositories and install the selected applications. + +Fedy is a perfect post-installer application for Fedora that allows you to quickly install frequently used essential applications after a fresh Fedora installation. + +Whether you want to install a new software or a codec or apply a tweak, Fedy lets you do it without much hassle. + +Please note that Fedy doesn't have its own repository. It will simply search and add the repository(s) which has the required software and automatically install them. It is just like a GUI front-end to the DNF/YUM package manager. + +Fedy is free, open source application released under GPLv3. The source code of Fedy is hosted in GitHub. + +### Install Fedy in Fedora Linux + +First, you need to add and **enable RPM Fusion repository** in your Fedora system: + +``` +$ sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm +``` + +Next, add fedy copr repository using command: + +``` +$ sudo dnf copr enable kwizart/fedy +``` + +After enabling RPM Fusion and Fedy copr repositories, run the following command to install fedy in Fedora: + +``` +$ sudo dnf install fedy -y +``` + +Now let us see how to use Fedy to install/remove third-party applications in Fedora. + +### Install essential third-party applications in Fedora using Fedy + +Launch Fedy either from the Terminal by using command: + +``` +$ fedy +``` + +You can also open Fedy from the Application launcher or Dash or Menu. + +![Launch Fedy][2] + +The default interface of fedy will look like below: + +![Fedy main interface][3] + +As you can see, Fedy interface is very simple! + +As stated already, Fedy includes a lot of open and closed source applications, drivers and tools. All packages are categorized under six distinct sections as listed below: + +1. Apps +2. Development tools +3. Drivers +4. Themes +5. Tweaks +6. Utilities + +Just navigate to any section and install the available application(s). There is a search box on the top right-corner, which helps you to easily find a application to install or a tweak to apply. + +#### Install and remove applications + +The **Apps** section includes popular applications such as 1password, Anydesk, Insync, Microsoft teams, OneDrive, Spotify, Steam, WPS office, Zoom and many. + +To install any application, just click on the **Install** button next to the application's name. You will be prompted to enter the `sudo` password. Once the password is entered, Fedy will add the appropriate repository for the application and install it. It's that simple! + +![Install applications using Fedy in Fedora][4] + +You can also remove the installed applications from the Fedy interface as well. No need to use GNOME software or DNF package manager. + +#### Install development tools + +From Development tools section, you can install various development tools like Android studio, CUDA toolkit, Eclipse IDE, Google Cloud SDK, JetBrains, MongoDB, Oracle JDK, Pycharm, Rstudio, Sublime text, Visual studio code and more. + +#### Install drivers + +The Drivers section in Fedy contains drivers and firmware for audio, video, Bluetooth, GPU, and filesystem etc. In this section, you can also install LTS Kernel as well. + +Some of the notable drivers included in Fedy are: Broadcom 802.11 STA driver, Fuse exFAT driver, Intel legacy VAAPI driver, Nvidia GPU driver, and a few more. + +#### Install themes + +Fedy also allows you to change the look and feel of your Fedora desktop. You can make your desktop beautiful by installing popular themes like Flat-remix, Numix, and Papirus themes. + +#### Tweak your Fedora system + +This is my favorite section in Fedy. From Tweaks section in Fedora, you can tweak various settings, including the following: + +* Clean junk files, +* Disable Wayland, +* Disable mouse acceleration, +* Add colors to bash prompt and make it fancy, +* Configure GRUB2, +* Set SELinux to permissive mode, +* Enable system-wide touchpad tap-to-click, +* Fix Intel throttling issues with Lenova notebooks. + +![Tweak Fedora system using Fedy][5] + +As stated already, all settings can be configured with a single mouse click! No need to edit configuration files and do changes manually. Fedy will set the optimal settings automatically! + +#### Fedy utilities section + +This is yet another important section in Fedy. + +We can do the following from utilities section: + +* Adobe flash browser plug-in and player +* Archive utilities to compress and extract different file formats +* Necessary multimedia codecs to encode or decode audio/video streams +* Enable encrypted DVD playback +* Microsoft TrueType fonts such as Arial, Times New Roman, and other core Microsoft fonts +* Oracle JRE to run JAVA applications +* and theme engines used by GTK themes to draw widgets + +### Conclusion + +As far as I tested, Fedy seems quite useful for Fedora users, especially for the newbies. Using Fedy, you can quickly setup a full-fledged Fedora desktop with all necessary applications for personal as well as professional usage. + +**Resource:** + +* [Fedy GitHub Repository][6] + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/install-third-party-software-fedy-fedora/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/ +[2]: https://ostechnix.com/wp-content/uploads/2022/05/Launch-Fedy.png +[3]: https://ostechnix.com/wp-content/uploads/2021/09/Fedy-main-interface.png +[4]: https://ostechnix.com/wp-content/uploads/2021/09/Install-applications-using-Fedy-in-Fedora.png +[5]: https://ostechnix.com/wp-content/uploads/2021/09/Tweak-Fedora-system-using-Fedy.png +[6]: https://github.com/rpmfusion-infra/fedy diff --git a/sources/tech/20220514 An introduction to USB Device Emulation and how to take advantage of it.md b/sources/tech/20220514 An introduction to USB Device Emulation and how to take advantage of it.md new file mode 100644 index 0000000000..8aebcf286b --- /dev/null +++ b/sources/tech/20220514 An introduction to USB Device Emulation and how to take advantage of it.md @@ -0,0 +1,472 @@ +[#]: subject: "An introduction to USB Device Emulation and how to take advantage of it" +[#]: via: "https://fedoramagazine.org/an-introduction-to-usb-device-emulation-and-how-to-take-advantage-of-it/" +[#]: author: "Jose Ignacio Tornos Martinez https://fedoramagazine.org/author/jtornosm/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +An introduction to USB Device Emulation and how to take advantage of it +====== +![][1] + +A big bunch of USB devices by Jose Ignacio Tornos Martinez + +### Introduction + +Nowadays, the number of devices is getting bigger and bigger, and modern operating systems must try to support all types and several of them with every integration, with every release. Maintaining a large number of devices is difficult, expensive and also hard to test, specially for plug-and-play devices, like USB devices. + +Therefore, it is necessary to create a mechanism to facilitate the maintenance and testing of old and new USB devices. And this is where USB device emulation comes in. In that way, a complete framework including a big bunch of emulated and validated USB devices will allow easier integration and release. The area of application would be very wide: earlier bug search/detection even during development, automatic tests, continuous integration, etc. + +### How to emulate USB devices + +[USB/IP project][2] allows sharing the USB devices connected to a local machine so that they can be managed by another machine connected to the network by means of a TCP/IP connection. + +Then USB/IP project consists of two parts: + +* local device support (host) to allow remote access to every necessary control events and data +* remote control that catches every necessary control event and data to process like a normal driver + +The procedure is valid for Linux and Windows, here I will focus only on Linux. + +The idea behind emulation is to replace the remote device support with an application that behaves in the same way. In this way we can emulate devices with software applications that follow the commented USB/IP protocol specification. + +In the following points I will describe how to configure and run the remote support and how to connect to our USB emulated device. + +#### Remote support + +Remote support is divided in two parts: + +* kernel space to control a remote device as it was local, that is, to be probed by the normal driver. +* user space application to configure access to remote devices. + +At this point, it is important to remark that the device emulators, after configuration by user space application, will communicate directly with the kernel space. + +Local support has a very similar structure, but the focus of this article is device emulation. + +Let’s analyze every part of remote support. + +##### Kernel space + +First of all, in order to get the functionality we need to compile the Linux Kernel with the following options: + +``` +CONFIG_USBIP_CORE=mCONFIG_USBIP_VHCI_HCD=m +``` + +These options enable the USB/IP virtual host controller driver, which is run on the remote machine. + +Normal USB drivers need to be also included because they will be probed and configured in the same way from virtual host controller drivers. + +Besides there are other important configuration options: + +``` +CONFIG_USBIP_VHCI_HC_PORTS=8CONFIG_USBIP_VHCI_NR_HCS=1 +``` + +These options define the number of ports per USB/IP virtual host controller and the number of USB/IP virtual host controllers as if adding physical host controllers. These are the default values if *CONFIG_USBIP_VHCI_HCD* is enabled, increase if necessary. + +The commented options and kernel modules are already included in some Linux distributions like Fedora Linux. + +Let’s see an example of available virtual USB buses and ports that we will use later. + +Default and real resources in example equipment: + +``` +$ lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub $ lsusb -t /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/15p, 5000M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/15p, 480M |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 480M$ +``` + +Now, we will load the module vhci-hcd into the system (default configuration for *CONFIG_USBIP_VHCI_HC_PORTS* and *CONFIG_USBIP_VHCI_NR_HCS*): + +``` +$ sudo modprobe vhci-hcd $ lsusb Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub $ lsusb -t /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=vhci_hcd/8p, 5000M /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=vhci_hcd/8p, 480M /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/15p, 5000M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/15p, 480M |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 480M$ +``` + +The remote USB/IP virtual host controller driver will only use the configured virtualized resources. Of course, emulated devices will work in the same way. + +##### User space + +The other necessary part in the USB/IP project is the user space tool *usbip* and needs to be used to configure the referred kernel space on both sides, although, in the same way, we only focus on the remote side, since the local side will be represented by the emulator. + +That is, *usbip*tool will configure the USB/IP virtual controller (tcp client) in kernel space to connect to the device emulator (tcp server) in order to establish a direct connection between them for USB configuration, events, data, etc. exchange. + +The tool is independent of the type of device and is able to provide information about available and reserved resources (see more information in the examples below). + +The local USB/IP virtual host controller needs to specify the pair bus-port that will used for remote access, it will be the same for emulated devices, but in this case, this pair can be anything because there is no real device and resource reservation is not necessary. + +This tool is found on the Linux Kernel repository in order to be totally synchronized with it. + +Location of the tool on the Linux Kernel repository: *./tools/usb/usbip* + +In some distribution like Fedora Linux, the *usbip* utility can be installed by means of *usbip* package from repositories. If *usbip* utility or related package can not be found, follow the instruction in the available README file to compile and install. Suitable rpm package can also be generated from the [usbip-emulator][3]repository: + +``` +$ git clone https://github.com/jtornosm/USBIP-Virtual-USB-Device.git +$ cd USBIP-Virtual-USB-Device/usbip +$ make rpm +... +$ +``` + +#### How to emulate USB devices + +Emulators are generated in Python and C. I have started with C development (I will focus on this part), but the same could be done in Python. + +For C development, compile emulation tools from the [usbip-emulator][4]repository: + +``` +$ git clone https://github.com/jtornosm/USBIP-Virtual-USB-Device.git +$ cd USBIP-Virtual-USB-Device/c +$ make +... +$ +``` + +All the supported devices emulated at this moment will be generated: + +* hid-keyboard +* hid-mouse +* cdc-adm +* hso +* cdc-ether +* bt + +rpm package (*usbip-emulator*) can be also generated with: + +``` +$ make rpm +... +$ +``` + +As examples, Vendor and Product IDs are hardcoded in the code. + +Following three examples to show how emulation works. We are using the same equipment for the emulator and remote USB/IP but they could run in different equipment. Besides, we are reserving different resources so all the devices could be emulated at the same time. + +##### Example 1: hso + +From one terminal, let’s emulate the hso device: + +(“1-1” is the pair bus-port for the USB device on the local machine, as we are emulating, it could be anything. It is only important because *usbip* tool will have to use the same name to request the emulated device) + +``` +$ hso -p 3241 -b 1-1 +hso started.... +server usbip tcp port: 3241 +Bus-Port: 3-0:1.0 +... +``` + +From another terminal, connect to the emulator: + +(localhost because emulator is running in the same equipment and the same name for pair bus-port as the emulator) + +``` +$ sudo modprobe vhci-hcd $ sudo usbip --tcp-port 3241 attach -r 127.0.0.1 -b 1-1 usbip: info: using port 3241 ("3241") $ +``` + +Now we can check that the new device is present: + +(As we saw previously, for this example machine, bus 3 is virtualized) + +``` +$ ip addr show dev hso +0 3: hso0: mtu 1486 qdisc noop state DOWN group default qlen 10 +link/none +$ rfkill list +0: hso-0: Wireless WAN +Soft blocked: no +Hard blocked: no +... +$ lsusb +... +Bus 003 Device 002: ID 0af0:6711 Option GlobeTrotter Express 7.2 v2 +... +$ lsusb -t +... +/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=vhci_hcd/8p, 480M +|__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=hso, 12M +... +$ +``` + +In order to release resources: + +``` +$ sudo usbip port Imported USB devices ==================== Port 00: at Full Speed(12Mbps) Option : GlobeTrotter Express 7.2 v2 (0af0:6711) 3-1 -> usbip://127.0.0.1:3241/1-1 -> remote bus/dev 001/002 $ sudo usbip detach -p 00 usbip: info: Port 0 is now detached! $ +``` + +And we can check that the device is released: + +``` +$ ip addr show dev hso0 +Device "hso0" does not exist. +$ rfkill list +... +$ lsusb +... +$ +``` + +After this, we can emulate again or stop the emulated device from the first terminal (i.e. with Ctrl-C). + +##### Example 2: cdc-ether + +From one terminal, let’s emulate the cdc-ether device (root permission is required because raw socket needs to bind to specified interface for data plane): + +(“1-1” is the pair bus-port for the USB device on the local machine, as we are emulating, it could be anything. It is only important because *usbip* tool will have to use the same name to request the emulated device) + +``` +$ sudo cdc-ether -e 88:00:66:99:5b:aa -i enp1s0 -p 3242 -b 1-1 +cdc-ether started.... +server usbip tcp port: 3242 +Bus-Port: 1-1 +Ethernet address: 88:00:66:99:5b:aa +Manufacturer: Temium +Network interface to bind: enp1s0 +... +``` + +From another terminal connect to the emulator: + +(localhost because emulator is running in the same equipment and the same name for pair bus-port as the emulator) + +``` +$ sudo modprobe vhci-hcd $ sudo usbip --tcp-port 3242 attach -r 127.0.0.1 -b 1-1 usbip: info: using port 3242 ("3242") $ +``` + +Now we can check that the new device is present: + +(As we saw previously, for this example machine, bus 3 is virtualized) + +``` +$ ip addr show dev eth0 +4: eth0: mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000 +link/ether 88:00:66:99:5b:aa brd ff:ff:ff:ff:ff:ff +$ sudo ethtool eth0 +... +Link detected: yes +$ lsusb +... +Bus 003 Device 003: ID 0fe6:9900 ICS Advent +... +$ lsusb -t +... +/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=vhci_hcd/8p, 480M +|__ Port 2: Dev 3, If 0, Class=Communications, Driver=cdc_ether, 480M +|__ Port 2: Dev 3, If 1, Class=CDC Data, Driver=cdc_ether, 480M +... +$ +``` + +For this example, we can also test the data plane. + +(IP forwarding is disabled in both sides) + +First, we can configure the IP address in the emulated device: + +``` +$ sudo ip addr add 10.0.0.1/24 dev eth0 $ ip addr show dev eth0 4: eth0: mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000 link/ether 88:00:66:99:5b:aa brd ff:ff:ff:ff:ff:ff inet 10.0.0.1/24 scope global eth0 valid_lft forever preferred_lft forever $ +``` + +Second, for example, from other directly Ethernet connected machine (real or virtual) we can configure a macvlan interface in the same subnet to send/receive traffic (ping, iperf, etc.): + +``` +$ sudo ip link add macvlan0 link enp1s0 type macvlan mode bridge +$ sudo ip addr add 10.0.0.2/24 dev macvlan0 +$ sudo ip link set macvlan0 up +$ ip addr show dev macvlan0 +3: macvlan0@enp1s0: mtu 1500 qdisc noqueue state UP group default qlen 1000 +link/ether d6:f1:cd:f1:cc:02 brd ff:ff:ff:ff:ff:ff +inet 10.0.0.2/24 scope global macvlan0 +valid_lft forever preferred_lft forever +inet6 fe80::d4f1:cdff:fef1:cc02/64 scope link +valid_lft forever preferred_lft forever +$ ping 10.0.0.1 +PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data. +64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=55.6 ms +64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=2.19 ms +64 bytes from 10.0.0.1: icmp_seq=3 ttl=64 time=1.74 ms +64 bytes from 10.0.0.1: icmp_seq=4 ttl=64 time=1.76 ms +64 bytes from 10.0.0.1: icmp_seq=5 ttl=64 time=1.93 ms +64 bytes from 10.0.0.1: icmp_seq=6 ttl=64 time=1.65 ms +... +``` + +In order to release resources: + +``` +$ sudo usbip port +Imported USB devices +==================== +... +Port 01: at High Speed(480Mbps) +ICS Advent : unknown product (0fe6:9900) +3-2 -> usbip://127.0.0.1:3245/1-1 +-> remote bus/dev 001/003 +$ sudo usbip detach -p 01 +usbip: info: Port 1 is now detached! +$ +``` + +And we can check that the device is released: + +``` +$ ip addr show dev eth0 Device "eth0" does not exist. $ lsusb ... $ +``` + +And of course, traffic from the other machine is not working: + +``` +From 10.0.0.2 icmp_seq=167 Destination Host Unreachable +From 10.0.0.2 icmp_seq=168 Destination Host Unreachable +From 10.0.0.2 icmp_seq=169 Destination Host Unreachable +From 10.0.0.2 icmp_seq=170 Destination Host Unreachable +... +``` + +After this, we can emulate again or stop the emulated device from the first terminal (i.e. with Ctrl-C). + +##### Example 3: bt + +From one terminal, let’s emulate the Bluetooth device: + +(“1-1” is the pair bus-port for the USB device on the local machine, as we are emulating, it could be anything. It is only important because *usbip* tool will have to use the same name to request the emulated device) + +``` +$ bt -a aa:bb:cc:dd:ee:11 -p 3243 -b 1-1 +bt started.... +server usbip tcp port: 3243 +Bus-Port: 1-1 +BD address: aa:bb:cc:dd:ee:11 +Manufacturer: Trust +... +``` + +From another terminal connect to the emulator: + +(localhost because emulator is running in the same equipment and the same name for pair bus-port as the emulator) + +``` +$ sudo modprobe vhci-hcd $ sudo usbip --tcp-port 3243 attach -r 127.0.0.1 -b 1-1 usbip: info: using port 3243 ("3243") $ +``` + +Now we can check that the new device is present: + +(As we saw previously, for this example machine, bus 3 is virtualized) + +``` +$ hciconfig -a +hci0: Type: Primary Bus: USB +BD Address: AA:BB:CC:DD:EE:11 ACL MTU: 310:10 SCO MTU: 64:8 +UP RUNNING PSCAN ISCAN INQUIRY +RX bytes:1451 acl:0 sco:0 events:80 errors:0 +TX bytes:1115 acl:0 sco:0 commands:73 errors:0 +Features: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87 +Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 +Link policy: RSWITCH HOLD SNIFF PARK +Link mode: SLAVE ACCEPT +Name: 'BT USB TEST - CSR8510 A10' +Class: 0x000000 +Service Classes: Unspecified +Device Class: Miscellaneous, +HCI Version: 4.0 (0x6) Revision: 0x22bb +LMP Version: 3.0 (0x5) Subversion: 0x22bb +Manufacturer: Cambridge Silicon Radio (10) + +$ rfkill list +... +1: hci0: Bluetooth +Soft blocked: no +Hard blocked: no +$ lsusb +... +Bus 003 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode) +... +$ lsusb -t +... +/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=vhci_hcd/8p, 480M +|__ Port 3: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M +|__ Port 3: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M +... +$ +``` + +And we can turn off and turn on the emulated Bluetooth device, detecting several fake Bluetooth devices: + +(At this moment, fake Bluetooth devices are not emulated/simulated so we can not set up) + +![Turn Bluetooth off][5] + +![Turn Bluetooth on][6] + +In order to release resources: + +``` +$ sudo usbip port +Imported USB devices +==================== +... +Port 02: at Full Speed(12Mbps) +Cambridge Silicon Radio, Ltd : Bluetooth Dongle (HCI mode) (0a12:0001) +3-3 -> usbip://127.0.0.1:3243/1-1 +-> remote bus/dev 001/002 +$ sudo usbip detach -p 02 +usbip: info: Port 2 is now detached! +$ +``` + +And we can check that the device is released: + +``` +$ hciconfig +$ rfkill list +... +$ lsusb +... +$ +``` + +And of course, device is not detected (as before emulation): + +![Bluetooth is not found][7] + +After this, we can emulate again or stop the emulated device from the first terminal (i.e. with Ctrl-C). + +### Emulated vs real USB devices + +When the real hardware and/or final device is not used to test, we can always feel insecure about the results, and this is the biggest hurdle that we will have to overcome to check the correct operation of the devices by means of emulation. + +So, in order to be confident, emulation must be as close as possible to the real hardware and in order to get the most real emulation every aspect of the device must be covered (or at least the necessary ones if they are not related with other aspects). In fact, for a correct test, we must not modify the driver, that is, we must only emulate the physical layer, so that the driver is not able to know if the device is real or emulated. + +Starting to test with the real hardware device is a very good idea to get a reference to build the emulator with the same features. For the case of USB devices, the device emulator building is easier because of the existing procedure to get remote control that complies with all the characteristics mentioned above. + +### Conclusion + +USB device emulation is the best way to integrate and test the related features in an efficient, automatic and easy way. But, in order to be confident about the emulation procedure, device emulators need to be previously validated to confirm that they work in the same way as real hardware. + +Of course, the USB device emulator is not the same as the real hardware device, but the commented method, thanks to the tested procedure to get remote control of the device, it’s very close to the real scenario and can help a lot to improve our release and testing processes. + +Finally, I would like to comment that one of the best advantages of using software emulators is that we will be able to cause specific behaviors, in a simple way, that would be very difficult to reproduce with real hardware, and this could help to find issues and be more robust. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/an-introduction-to-usb-device-emulation-and-how-to-take-advantage-of-it/ + +作者:[Jose Ignacio Tornos Martinez][a] +选题:[lkxed][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/jtornosm/ +[b]: https://github.com/lkxed +[1]: https://fedoramagazine.org/wp-content/uploads/2022/05/usb_device_emulation-4-816x345.jpg +[2]: http://usbip.sourceforge.net/ +[3]: https://github.com/jtornosm/USBIP-Virtual-USB-Device.git +[4]: https://github.com/jtornosm/USBIP-Virtual-USB-Device.git +[5]: https://jtornosm.fedorapeople.org/usb_device_emulation/usb-emulator_html_2ad86980149353eb.png +[6]: https://jtornosm.fedorapeople.org/usb_device_emulation/usb-emulator_html_2b57acabd220bd97.png +[7]: https://jtornosm.fedorapeople.org/usb_device_emulation/usb-emulator_html_d21fdeeff70f0d57.png diff --git a/sources/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md b/sources/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md new file mode 100644 index 0000000000..0e3df3c66c --- /dev/null +++ b/sources/tech/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md @@ -0,0 +1,235 @@ +[#]: subject: "Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine" +[#]: via: "https://itsfoss.com/duckduckgo-easter-eggs/" +[#]: author: "sreenath https://itsfoss.com/author/sreenath/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine +====== +DuckDuckGo is one of the alternative search engines that is less privacy intruding than the omnipresent Google. + +DuckDuckGo is one of the [alternative search engines that is less privacy intruding][1] than the omnipresent Google. + +It has improved a lot lately and works quite satisfactorily for general web search. It is nowhere close to Google when it comes to local search. + +However, DuckDuckGo (fondly nicknamed DDG) has some cool features most users are not aware of. If you are an ardent DDG fan, you may enjoy enhancing your search experience with these tricks. + +### 1. Jump on a specific website + +Type ! before your favorite website name and directly enter the website. This is like the ‘feeling lucky’ feature of Google but in DDG terms, it’s called ‘bangs.’ + +There are short forms for the websites, which will be suggested when we start typing. + +![duckduckgo bang feature][2] + +Entering the search term just after the website name will land you on the required result from that website. + +### 2. Convert text to ASCII + +Figlet is one of the [fun Linux commands][3]. It converts any text into a decorated ASCII format. + +Type **figlet** before any search term; it will print its ASCII output. No need to open the terminal. + +![Figlet in DDG][4] + +### 3. Check social media status + +Use ‘@’ in front of the proper twitter name of someone will show their status (followers etc.). + +![Itsfoss Twitter][5] + +### 4. Generate a strong password + +Type ‘password’ followed by the number of characters to be included and it will generate a strong, unique password for you. + +![Generating password in DuckDuckGo][6] + +### 5. Generate Random Passphrase + +Type ‘random passphrase’ to generate a passphrase, usually 4 words long. + +![Random Passphrase][7] + +### 6. Get a cheatsheet + +Type cheatsheet after the term whose cheatsheet you want. If there is a cheat sheet for the searched term, it will show it immediately on the search page. + +![Vim Cheatsheet][8] + +### 7. Get color from the color code + +Type ‘color’ followed by the hex code of the color you want to check and it will show what that color looks like. + +![Color][9] + +### 8. Generate a random number + +Searching ‘random number’ will output a random number between 0 and 1 + +![Random Number][10] + +You can also specify the range to look for. + +![Random Number between 1 and 1000][11] + +### 9. Convert to binary and other formats + +Type a binary number and append it with ‘binary’ will convert it from binary to decimal + +![Binary to Decimal][12] + +Similarly, it works for hexadecimal and oct, but I am confused about their logic. + +### 10. Find rhyming words + +Type ‘what rhymes with ‘ followed by the word you want to get rhymes of. Helps with your poetry skills, no? + +![What rhymes with rain][13] + +### 11. Get Ramanujan number, Pi, and other constants + +Type the name of the constant whose value you want and you get it right in the search result page. + +![Ramanujan Number][14] + +### 12. Check who is currently in space + +Type ‘people in space’ and get the list of those currently in space. It also shows how long they have been in space. + +![People in Space][15] + +### 13. Check if a website is down + +If you want to know if a particular website is down for you or for everyone, just use the “is xyz.com is down” search query. + +![Is down?][16] + +### 14. Get quotes on certain topics + +Type a word followed by quotes, and it will give quotes related to that word. + +![Get quotes in DDG][17] + +### 15. Get Placeholder texts + +Search for ‘lorem ipsum’ and get 5 paragraphs of placeholder texts. Useful for web developers perhaps. + +![Lorem ipsum][18] + +### 16. Get the calendar of any month + +Type calendar followed by day, month, and year and it gives you an interactive calendar of that month. + +![Calendar][19] + +### 17. Generate QR code + +Search ‘qr’ followed by any text, be it a link or anything, will generate the respective QR Code. + +![QRCode][20] + +### 18. Get some CSS Animations + +Search for ‘css animations’ to get some CSS animation examples. + +![CSS Animations][21] + +### 19. Expand a shortened link + +Got a bitly or some other shortened link but not sure where it takes you. Instead of landing on a spammy website, expand the shortened URL and see the actual website URL. + +Use the keyword expand followed by the shortened URL and it will show the actual destination URL. + +![Expand Link][22] + +### 20. Get HTML codes for special characters + +Search ‘html chars’ and get a very long list of HTML entities and their description, if pressed show more in the result + +![HTML Chars][23] + +### 21. Why should I use this? + +This one is pretty useless. If you enter the term “why should I use this?” it shows “cause it’s awesome” at the top of the search result page. Clearly, DuckDuckGo is referring to itself. + +![Why should I use this?][24] + +### 22. Convert case + +This works in two cases. lowercase will show the lowered case result + +![Lowercase][25] + +uppercase will show an uppercase result. + +![Uppercase][26] + +### 23. Encode a URL + +Search ‘encode’ followed by a URL will give an encoded result + +![URL Encode][27] + +### 24. Motherboard + +Search for ‘Motherboard’, and you can see that the logo of DuckDuckGo on the left side is changed. It shows a random logo from the selection of a few. + +![Motherboard][28] + +### 25. Get HTML Color Codes + +Search for ‘color codes’ and you get a chart of colors. Again, this one is more for web developers and designers. + +![Color Codes][29] + +### There are many more… + +My teammate Sreenath came up with this post idea. He says there are more such ‘easter eggs’ in DuckDuckGo and I believe him. But it won’t be feasible to list them all here. + +If you know more such interesting DDG search features, share them in the comments. If you found your next favorite search feature, do mention that too. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/duckduckgo-easter-eggs/ + +作者:[sreenath][a] +选题:[lkxed][b] +译者:[Peaksol](https://github.com/TravinDreek) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sreenath/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/privacy-search-engines/ +[2]: https://itsfoss.com/wp-content/uploads/2022/05/duckduckgo-bang-feature-800x449.png +[3]: https://itsfoss.com/funny-linux-commands/ +[4]: https://itsfoss.com/wp-content/uploads/2022/05/figlet-800x272.png +[5]: https://itsfoss.com/wp-content/uploads/2022/05/itsfoss-twitter-800x278.jpg +[6]: https://itsfoss.com/wp-content/uploads/2022/05/password-30-800x185.jpg +[7]: https://itsfoss.com/wp-content/uploads/2022/05/random-pqssphrase-800x179.png +[8]: https://itsfoss.com/wp-content/uploads/2022/05/vim-cheatsheet-800x367.png +[9]: https://itsfoss.com/wp-content/uploads/2022/05/color-800x289.jpg +[10]: https://itsfoss.com/wp-content/uploads/2022/05/random-number-800x235.png +[11]: https://itsfoss.com/wp-content/uploads/2022/05/random-number-between-1-and-1000-800x244.png +[12]: https://itsfoss.com/wp-content/uploads/2022/05/binary-800x184.png +[13]: https://itsfoss.com/wp-content/uploads/2022/05/What-rhymes-with-rain-800x257.png +[14]: https://itsfoss.com/wp-content/uploads/2022/05/ramanujan-number-800x238.png +[15]: https://itsfoss.com/wp-content/uploads/2022/05/people-in-space-800x313.jpg +[16]: https://itsfoss.com/wp-content/uploads/2022/05/is-down-800x204.png +[17]: https://itsfoss.com/wp-content/uploads/2022/05/life-quotes-800x303.png +[18]: https://itsfoss.com/wp-content/uploads/2022/05/lorem-ipsum-800x227.png +[19]: https://itsfoss.com/wp-content/uploads/2022/05/calendar-800x331.png +[20]: https://itsfoss.com/wp-content/uploads/2022/05/qrcode-800x255.png +[21]: https://itsfoss.com/wp-content/uploads/2022/05/css-animations-800x385.jpg +[22]: https://itsfoss.com/wp-content/uploads/2022/05/expand-shortened-link-ddg-800x209.png +[23]: https://itsfoss.com/wp-content/uploads/2022/05/html-chars-800x174.png +[24]: https://itsfoss.com/wp-content/uploads/2022/05/why-should-i-use-this-800x160.png +[25]: https://itsfoss.com/wp-content/uploads/2022/05/lowercase-800x179.png +[26]: https://itsfoss.com/wp-content/uploads/2022/05/uppercase-800x185.png +[27]: https://itsfoss.com/wp-content/uploads/2022/05/url-encode-800x177.png +[28]: https://itsfoss.com/wp-content/uploads/2022/05/motherboard.png +[29]: https://itsfoss.com/wp-content/uploads/2022/05/color-codes-800x554.png diff --git a/sources/tech/20220515 Top 10 Best Linux Distributions in 2022 For Everyone.md b/sources/tech/20220515 Top 10 Best Linux Distributions in 2022 For Everyone.md new file mode 100644 index 0000000000..82641d620f --- /dev/null +++ b/sources/tech/20220515 Top 10 Best Linux Distributions in 2022 For Everyone.md @@ -0,0 +1,206 @@ +[#]: subject: "Top 10 Best Linux Distributions in 2022 For Everyone" +[#]: via: "https://www.debugpoint.com/2022/05/best-linux-distributions-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Top 10 Best Linux Distributions in 2022 For Everyone +====== +We compiled a list of the 10 best Linux distributions for everyone in 2022 based on their stability, attractiveness and time required to configure after installation. + +The Linux Distribution space is heavily fragmented to the point that a new fork is being created almost every day. A very few of them are unique and bring something different to the table. Most of them are just the same Ubuntu or Debian based with a different theme or a wrapper. + +The Linux distro landscape is so dynamic that it changes every month. Some Linux distributions become more stable with ever-changing packages and components, while others become unstable in quality. Hence, it’s challenging to pick and choose the best Linux distribution for your school, work or for just casual browsing, watching movies, etc. Not to mention, many Linux distributions are discontinued every year due to a lack of contributions, cost-overrun and other reasons. + +That said, we compiled the below 10 best Linux distributions in 2022, which is perfect for any user or use case. That includes casual dual-boot users with Windows 10 or 11, students, teachers, developers, creators, etc. Take a look. + +### Best Linux Distributions of 2022 + +#### 1. Fedora KDE + +The first Linux distribution, which I think is the best on this list, is Fedora Linux KDE Edition. The primary reason is that the Fedora Linux is very stable with the latest tech, and KDE Plasma is super fast and perfect for all users. Moreover, this Fedora and KDE Plasma combination doesn’t require further modification or tweaks after installation. Over the last couple of releases and after the latest [Fedora 36][1] release feedback, Fedora Linux with KDE Plasma has become the go-to distribution for every possible use case and workflow. + +In addition, KDE Plasma also brings KDE Applications and goodies, eliminating additional software you need. And with the help of Fedora repo and [RPM Fusion][2], you can blindly trust Fedora Linux with KDE Edition for your daily driver. + +![Fedora KDE Edition][3] + +On a side note, you can also consider the [Fedora Linux workstation][4] edition with GNOME if you prefer a GNOME-styled desktop. In addition, you might consider other [Fedora Spins][5] or [Fedora Labs][6] if you like a different desktop flavour. + +You can download Fedora KDE Edition here. Other downloads with [torrent details][7] are present here. + +[Download Fedora][8] + +#### 2. KDE Neon + +The second distribution we would like to feature in this list is KDE Neon. The KDE Neon is based on the Ubuntu LTS release at its base. But the KDE Framework and KDE Applications with KDE Plasma desktop are the latest from the team. The primary reason for featuring this is that it is perfect for you if you want a Ubuntu LTS base distribution but want the latest KDE Applications. In fact, you can use it for your daily driver for years to come, provided you keep your system up to date. + +In contrast, the Kubuntu LTS releases are also perfect. But they may not have the latest KDE Framework or applications. + +![KDE Neon][9] + +You can download the KDE Neon at the below link. Make sure to choose the user edition while downloading. + +[Download KDE Neon][10] + +#### 3. Ubuntu LTS Releases with GNOME + +The Ubuntu LTS releases (with default GNOME Desktop) are the most used Linux Distribution today. It’s the most popular, most downloaded and used by users, enterprises and several real-world needs. + +There is no doubt about the Ubuntu LTS version’s power and stability. It has been time tested. With the vast community support, Ubuntu LTS versions with customised GNOME might be the perfect fit for your needs. + +Most of the third-party applications and games primarily target Ubuntu, and you get a much bigger support base compared to the all distribution in this list. But the recent trends of decisions from Canonical (Ubuntu’s creator), such as forcing users to adopt Snap and other stuff, may raise a concern for you if you are an advanced user. + +But for casual users who want to browse the internet, watch movies, listen to music and do personal work, you can blindly trust Ubuntu LTS versions as your best Linux distribution. + +![Ubuntu LTS with GNOME][11] + +Finally, you can download Ubuntu 22.04 LTS (the current one) using the below link. + +[Download Ubuntu][12] + +#### 4. Linux Mint Cinnamon + +One of the Linux distributions that “just works” out-of-the-box in “any” type of hardware. The Linux Mint is fourth on this list. The above three distributions (Fedora, Ubuntu LTS) may not work well in older hardware (PC or Laptop) having low memory and older CPU. But Linux Mint is perfect in those use cases with its unique ability to make everyone welcome. + +Furthermore, with Linux Mint, you do not need to install any additional applications after a fresh install. It comes with every possible driver and utility for all use cases. For example, your printer, webcam, and Bluetooth would work in Linux Mint. + +In addition, if you are new to Linux or Windows users who plan to migrate, then it is a perfect distribution to start. Its legacy menu-driven Cinnamon desktop is one of the best open-source desktops today. + +![Linux Mint Cinnamon Edition][13] + +If you ever get confused or have no time to choose which distribution is best for you, choose the Linux Mint Cinnamon edition. With that said, you can download Linux Mint using the below link. + +[Download Linux Mint][14] + +#### 5. Pop OS + +The Pop OS is developed by American computer manufacturer System76 for their hardware lineup. But it is one of the famous and emerging Linux distributions based on Ubuntu. The Pop OS is primarily known to have perfect for modern hardware (including NVIDIA graphics) and brings some unique features absent in the traditional Ubuntu with GNOME desktop. For example, you get a well-designed COSMIC desktop with Pop OS, built-in tiling feature, well-optimized power controls, and a stunning Pop Shop. The Pop Shop is a software store designed by its maker to give you a well-categorized set of applications for your study, learning, development, gaming, etc. This distribution is also perfect for gaming if you plan to start your Linux journey with gaming in mind. + +In addition, if you want to get a professional-grade Linux distribution with official help and support, you should check out actual System76 hardware with Pop OS. + +![Pop OS][15] + +However, you can download the Pop OS for various hardware for free using the link below. + +[Download Pop OS][16] + +#### 6. MX Linux + +MX Linux is a well designed Linux distribution primarily targeted at the older hardware with productivity and stability in mind. It’s an emerging Linux distribution that is free from systemd and uses the init system. Based on the Debian Stable branch, it brings Xfce Desktop, KDE Plasma desktop and Fluxbox with its own powerful MX utilities. + +You can use MX Linux for all of your needs. But I would not recommend it for gaming or development work. If you need a stable Linux distribution for your older hardware, free from systemd, you can choose MX Linux. Especially the Fluxbox edition. + +![MX Linux][17] + +You can download MX Linux from its official website below. + +[Download MX Linux][18] + +#### 7. Endeavour OS + +If you like the concept of “Rolling release”, which gives you all the latest packages and operating system components, then Arch Linux is perhaps the best you can have. However, installing Arch Linux might be tricky for new users, although the recent [archinstall][19] does a pretty job. + +However, EndeavourOS is a perfect Arch Linux based distribution which features Xfce, KDE Plasma and other popular desktops out of the box. Armed with the Calamares installer, it is super easy to install Endeavour OS. + +However, this might not be the best Linux distribution for beginners. But the best one for little advanced users who are familiar already with Linux in general. On the brighter side, you get to say, “btw, I use Arch”. + +![EndeavourOS][20] + +Last but not least, EndeavourOS has excellent community support, and its Telegram channel support is the best in my personal experience. So, if you ever get stuck, help is just a message away. + +Download this excellent and emerging Linux distribution using the link below. + +[Download Endeavour OS][21] + +#### 8. Zorin OS + +Zorin OS is a Linux distribution based on Ubuntu Linux and is best for those who want nice looks, power, stability, and a productive system. In this Linux distribution, the default desktop is a blend of Xfce and GNOME 3, heavily customised. One of the advantages of Zorin is it comes with ready-made themes. With those themes, you can make Zorin OS look like Windows and macOS with just one click. + +This helps the new users easily migrate to Linux and use Zorin for their day to day work. + +![Zorin OS][22] + +Other than that, Zorin OS maintains three editions – Pro, Lite and Core, which cater to the different user bases. The Pro edition is a paid version with additional themes and tweaks out of the box with a minimal fee. + +You can download Zorin OS from the below link. + +[Download Zorin OS][23] + +#### 9. Debian with Xfce + +There are many Linux Distribution which is based on Debian. But the only reason I have included vanilla Debian in this list is because of its excellent stability and power. Debian – termed a “Universal Operating System”, is perfect for moderately experienced users of Linux. But if you can set up a daily driver with Debian Stable with Xfce, you can run it for years without reformating or reinstalling for fear of breaking your system. + +Debian package repo contains all possible packages, which give you the ultimate flexibility to set up any custom system you want. + +![Debian with Xfce Desktop][24] + +A perfect Linux distribution if you know how to set up a Debian box with some experience. You can download and install Debian after choosing the proper installer for your system here. Debian comes with an installer for several architectures. You may [read our guide][25]if you are confused about which one to choose and how to install it. + +[Download Debian][26] + +#### 10. Ubuntu Studio + +The final best Linux distribution we feature in this list is Ubuntu Studio. Ubuntu Studio is an official Ubuntu Linux distribution specially curated for Multimedia production type of work. + +Ubuntu Studio comes with the low-latency mainline Linux Kernel to give additional advantage to multiple operations. In addition, Ubuntu Studio brings its native “Ubuntu Studio Controls”, which provides creators with several options to tweak CPU settings for heavy CPU intensive rendering and processing. + +![Ubuntu Studio 22.04 LTS Desktop][27] + +Moreover, a massive list of free and open-source audio, graphics, and video applications is pre-loaded into the ISO, saving time if you plan to build a multimedia workstation. + +Ubuntu Studio is powered by the KDE Plasma desktop, the perfect Linux distribution for all creators worldwide. + +You can download Ubuntu Studio from the below link. + +[Download Ubuntu Studio][28] + +### Closing Notes + +I hope this list of “curated and best Linux distributions” helps you pick one for yourself, your friends and co-workers. These are based on their current status (active project), prospects (i.e. it has a well-defined vision for the future) and how easy to set up and out-of-the-box experience. + +Finally, which Linux distribution do you think should be in the top 10 list? Let me know in the comment box below. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/best-linux-distributions-2022/ + +作者:[Arindam][a] +选题:[lkxed][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/lkxed +[1]: https://www.debugpoint.com/2022/02/fedora-36/ +[2]: https://www.debugpoint.com/2020/07/enable-rpm-fusion-fedora-rhel-centos/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Fedora-KDE-Edition.jpg +[4]: https://getfedora.org/en/workstation/download/ +[5]: https://spins.fedoraproject.org/ +[6]: https://labs.fedoraproject.org/ +[7]: https://torrent.fedoraproject.org/ +[8]: https://spins.fedoraproject.org/kde/download/index.html +[9]: https://www.debugpoint.com/wp-content/uploads/2022/05/KDE-Neon.jpg +[10]: https://neon.kde.org/download +[11]: https://www.debugpoint.com/wp-content/uploads/2022/05/Ubuntu-LTS-with-GNOME.jpg +[12]: https://ubuntu.com/download/desktop +[13]: https://www.debugpoint.com/wp-content/uploads/2022/05/Linux-Mint-Cinnamon-Edition.jpg +[14]: https://linuxmint.com/download.php +[15]: https://www.debugpoint.com/wp-content/uploads/2022/05/Pop-OS.jpg +[16]: https://pop.system76.com/ +[17]: https://www.debugpoint.com/wp-content/uploads/2022/05/MX-Linux.jpg +[18]: https://mxlinux.org/download-links/ +[19]: https://www.debugpoint.com/2022/01/archinstall-guide/ +[20]: https://www.debugpoint.com/wp-content/uploads/2022/05/EndeavourOS.jpg +[21]: https://endeavouros.com/download/ +[22]: https://www.debugpoint.com/wp-content/uploads/2022/05/Zorin-OS.jpg +[23]: https://zorin.com/os/download/ +[24]: https://www.debugpoint.com/wp-content/uploads/2022/05/Debian-with-Xfce-Desktop.jpg +[25]: https://www.debugpoint.com/2021/01/install-debian-buster/ +[26]: https://www.debian.org/distrib/ +[27]: https://www.debugpoint.com/wp-content/uploads/2022/04/Ubuntu-Studio-22.04-LTS-Desktop.jpg +[28]: https://ubuntustudio.org/download/ diff --git a/sources/tech/20220516 -Extension Manager- App Helps You Install and Manage GNOME Shell Extensions.md b/sources/tech/20220516 -Extension Manager- App Helps You Install and Manage GNOME Shell Extensions.md new file mode 100644 index 0000000000..f2fcedf69d --- /dev/null +++ b/sources/tech/20220516 -Extension Manager- App Helps You Install and Manage GNOME Shell Extensions.md @@ -0,0 +1,116 @@ +[#]: subject: "‘Extension Manager’ App Helps You Install and Manage GNOME Shell Extensions" +[#]: via: "https://itsfoss.com/extension-manager/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +‘Extension Manager’ App Helps You Install and Manage GNOME Shell Extensions +====== +Brief: Extension Manager is an exciting unofficial alternative to GNOME’s official Extensions app to help you manage GNOME shell extensions. Let’s take a closer look. + +GNOME extensions are incredibly useful. Of course, using many of them may not be the best solution to your problem. + +However, if you rely on the GNOME extensions to tweak your desktop workflow on any Linux distribution, a convenient option to manage all the extensions should help save your time. + +The GNOME team already offers you an “**Extensions**” app to configure and manage GNOME extensions. But, it does not come pre-installed on every Linux distribution. + +So, should you use the official Extensions app, or is there something better? + +Well, technically, it depends on your use case and requirements. But, there’s an **“Extension Manager**” that helps you manage GNOME Shell extensions while also allowing you to search and install new extensions without using the browser. + +![extension manager ft][1] + +### Extension Manager: An Alternative to “Extensions” + +If you already have “Extensions” installed, you may not have a big reason to use this. + +However, with the Extension Manager by **Matt Jakeman**, you get a useful app to easily enable/disable, configure, and install/uninstall new GNOME extensions. + +You no longer need to follow the usual [method to install GNOME extensions][2] that involve a web page, a browser add-on, and more. + +It offers a separate tab to search and install GNOME extensions available. + +![extension manager search][3] + +As you can notice in the screenshot above, you do not have to tweak the GNOME Shell version number and see if it is supported. This app directly highlights if the extension is supported on your system. + +So, you can easily explore the [best GNOME extensions][4] and see if it works for you. + +Furthermore, you can also explore more about an extension when clicking on it. It could improve the way the information is presented, but it should be good enough for most. + +![extension manager info][5] + +### Features of Extension Manager + +![extension manager about][6] + +To sum up the features: + +* Configure existing/pre-installed GNOME extensions. +* Enable/Disable shell extensions. +* Ability to search for new extensions from the web. +* Install new extensions from the web. +* Choose the app theme as per your preference or follow the system theme. +* Update the extension from within the app. + +### Extensions vs. Extension Manager: What’s the difference? + +If you’re wondering: what’s the difference between Extensions and Extension Manager? + +Here’s a **screenshot comparison**: + +![extensions gnome][7] + +![extension manager][8] + +Overall, the user interface is a bit different. But it’s mostly the same, minus the ability to search/install GNOME extensions from the web. + +However, you can toggle the theme to light/dark (or follow the system preference) with Extension Manager. With Extensions, the app tracks the system theme by default. + +### Install Extension Manager on Linux + +Using the official repositories, you can easily install the extension manager on [Ubuntu 22.04 LTS][9]. + +So, you can look for it in the software center or install it via the terminal using the following command: + +``` +sudo apt install gnome-shell-extension-manager +``` + +For any other Linux distribution, you can refer to our [Flatpak guide][10] and install the Flatpak package available on [Flathub][11]. + +You should also find it available in [AUR][12] for Arch Linux distros. + +Head to its [GitHub page][13] to explore more about the app and other installation methods. + +*What do you prefer to help manage GNOME shell extensions? Feel free to share your thoughts in the comments.* + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/extension-manager/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/05/extension-manager-ft.png +[2]: https://itsfoss.com/gnome-shell-extensions/ +[3]: https://itsfoss.com/wp-content/uploads/2022/05/extension-manager-search.png +[4]: https://itsfoss.com/best-gnome-extensions/ +[5]: https://itsfoss.com/wp-content/uploads/2022/05/extension-manager-info.png +[6]: https://itsfoss.com/wp-content/uploads/2022/05/extension-manager-about.jpg +[7]: https://itsfoss.com/wp-content/uploads/2022/05/extensions-gnome.png +[8]: https://itsfoss.com/wp-content/uploads/2022/05/extension-manager.png +[9]: https://itsfoss.com/ubuntu-22-04-release-features/ +[10]: https://itsfoss.com/flatpak-guide/ +[11]: https://flathub.org/apps/details/com.mattjakeman.ExtensionManager +[12]: https://itsfoss.com/aur-arch-linux/ +[13]: https://github.com/mjakeman/extension-manager diff --git a/sources/tech/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md b/sources/tech/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md new file mode 100644 index 0000000000..0a13767da7 --- /dev/null +++ b/sources/tech/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md @@ -0,0 +1,194 @@ +[#]: subject: "How to Dual Boot Ubuntu 22.04 LTS and Windows 11" +[#]: via: "https://www.linuxtechi.com/dual-boot-ubuntu-22-04-and-windows-11/" +[#]: author: "James Kiarie https://www.linuxtechi.com/author/james/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to Dual Boot Ubuntu 22.04 LTS and Windows 11 +====== +Hey guys, in this guide we will demonstrate how to configure a dual-boot setup of Ubuntu 22.04 LTS (Jammy Jellyfish) alongside Windows 11. + +For this to work, you need to have Windows 11 already installed on your PC.  You will then need to create a separate partition on your hard drive on which Ubuntu 22.04 will be installed. We will go over all this, so don’t worry. + +##### Prerequisites  + +Before setting sail with the dual-boot setup, here is what you need. + +* A bootable USB drive of Ubuntu 22.04 You can download Ubuntu 22.04 ISO image by heading over to the [Ubuntu 22.04 download page][1]. With the ISO image in place, grab a 16GB USB drive and use  Rufus application to make it bootable. + +* A fast and stable internet connection + +### Step 1) Create a Free Partition on Your Hard Drive  + +As mentioned in the introduction, we first and foremost need to create a separate partition on the hard drive on which we are going to install Ubuntu 22.04. + +So, open the disk management utility by pressing Windows Key + R + +In the dialogue box, type diskmgmt.msc and hit ENTER. + +![][2] + +The disk management console displays the current disk partitions as you can see below. We are going to create a partition for installing Ubuntu by Shrinking ‘Volume E’. This might be different in your setup, but just follow along and you will get the drift. + +![][3] + +So, right-click on the volume that you want to shrink and select ‘Shrink’. + +![][4] + +A pop-up dialogue box will appear as shown below. Specify the amount of space to shrink in MB and click ‘Shrink’. + +This is the space that is designated for the Ubuntu 22.04 installation. + +![][5] + +After shrinking the space, it will appear as ‘Unallocated’ or ‘Free Space’ as shown. + +![][6] + +With the free space in place, now plug the bootable USB medium into your PC and reboot your system. Also, be sure to access the BIOS setup and modify the boot priority to have the USB drive as the first priority. Save the BIOS changes and proceed to boot. + +### Step 2) Begin the installation + +On the first screen, you will get the GRUB menu displayed as shown. Select the first option ‘Try or Install Ubuntu’ and press ENTER. + +![][7] + +Ubuntu 22.04 will start loading as shown below. This takes a minute at most. + +![][8] + +Thereafter, the installation wizard will pop open providing you with two options: ‘Try Ubuntu’ and ‘Install Ubuntu’.  Since our mission is to install Ubuntu, select the latter. + +![][9] + +Next, select your preferred Keyboard layout and click ‘Continue’. + +![][10] + +In the ‘Updates and Other Software’ step, select ‘Normal Installation’ in order to install the GUI version of Ubuntu and check the rest of the options to allow download of updates and installation of third-party software for graphics, WiFi hardware and other utilities. + +Then click ‘Continue’. + +![][11] + +The next step provides two options for installation. The first option -’Erase disk and install Ubuntu’ – completely wipes out your drive and installs Ubuntu’. But since this is a dual boot setup, this option will be disastrous to your existing Windows installation. + +Therefore, select ‘Something else’ and click ‘Continue’. + +![][12] + +The partition table will be displayed with all the existing disk partitions. So far, we only have the NTFS partitions and the free space we shrunk earlier. + +For Ubuntu 22.04, we will create the following partitions: + +* /boot        –        1 GB +* /home        –        10 GB +* /            –        12 GB +* Swap         –         2 GB +* EFI          –       300 MB + +To get started with the partitions, click on the [ + ] sign below the ‘Free Space’ partition. + +![][13] + +Fill in the /boot partition details as shown then click ‘OK’. + +![][14] + +Next up, specify the /home partition and click ‘OK’. + +![][15] + +Next, define the / ( root ) partition and click ‘OK’. + +![][16] + +To define swap space, set the size and select ‘Swap area’ for the ‘Use as:’ option. + +![][17] + +Finally, create an EFI system partition if you are using UEFI boot mode. We will assign 300 MB to the EFI partition. + +![][18] + +Below is a summary of the partitions in our partition table. + +![][19] + +To continue with the installation, click ‘Install Now’. On the pop-up shown below, click ‘Continue’ to save the changes to the disk. + +![][20] + +Next, the installation wizard will auto-detect your location. Simply click ‘Continue’. + +![][21] + +Next, create a login user by specifying the name, computer’s name and password. Then click ‘Continue’. + +![][22] + +At this point, the installation wizard will copy all the Ubuntu files and packages to the manually created hard drive partitions and install the required software packages. + +This process takes quite a while, so be patient. In our case, it took roughly 30 minutes. + +![][23] + +Once the installation is completed, click on ‘Restart Now’ to reboot the system. + +![][24] + +At this point, remove your bootable USB drive and press ‘ENTER’ + +![][25] + +When the system restarts, you will find all options for both Ubuntu and Windows 11. + +Select ‘Ubuntu’ to boot into your new Ubuntu 22.04 installation. To boot into Windows 11, select the entry labeled ‘Windows Recovery Environment. + +![][26] + +And there you have it. We have demonstrated how to dual-boot Windows 11 with Ubuntu 22.04. + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/dual-boot-ubuntu-22-04-and-windows-11/ + +作者:[James Kiarie][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxtechi.com/author/james/ +[b]: https://github.com/lkxed +[1]: https://releases.ubuntu.com/22.04/ +[2]: https://www.linuxtechi.com/wp-content/uploads/2022/05/diskmgmt-msc-command-windows11.png +[3]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Disk-Management-Console-Windows11.png +[4]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Shrink-Volume-Windows11.png +[5]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Shrink-Volume-Size-Windows11.png +[6]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Free-Space-Disk-Management-Console-Windows11.png +[7]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Install-Ubuntu-Linux.png +[8]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Ubuntu-22-04-Loading-Screen.png +[9]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Choose-Install-Ubuntu-Linux.png +[10]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Keyboard-Layout-Ubuntu-22-04.png +[11]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Normal-Installation-Option-During-Ubuntu-22-04-Installation.png +[12]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Something-else-ubuntu-installation.png +[13]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Free-Space-for-Ubuntu-22-04-Installation.png +[14]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Boot-Partition-Ubuntu-22-04-LTS.png +[15]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Home-Partition-For-Ubuntu-22-04.png +[16]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Root-Partition-For-Ubuntu-22-04.png +[17]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Swap-Area-Ubuntu-22-04.png +[18]: https://www.linuxtechi.com/wp-content/uploads/2022/05/EFI-System-Partition-Ubuntu-22-04.png +[19]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Install-Now-Ubuntu-22-04.png +[20]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Write-Changes-Disk-Ubuntu-22-04.png +[21]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Location-for-Ubuntu-22-04-Installation.png +[22]: https://www.linuxtechi.com/wp-content/uploads/2022/05/UserName-Hostname-Ubuntu-22-04-lts-Installation.png +[23]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Installation-Progress-Ubuntu-22-04.png +[24]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Restart-After-Ubuntu-22-04-LTS-Installation.png +[25]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Remove-Installation-Media-after-Ubuntu-22-04-Installation.png +[26]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Dual-Boot-Grub-Bootloader-Screen-Ubuntu-22-04.png diff --git a/sources/tech/20220516 How to rebase to Fedora Linux 36 on Silverblue.md b/sources/tech/20220516 How to rebase to Fedora Linux 36 on Silverblue.md new file mode 100644 index 0000000000..a09955f6ab --- /dev/null +++ b/sources/tech/20220516 How to rebase to Fedora Linux 36 on Silverblue.md @@ -0,0 +1,102 @@ +[#]: subject: "How to rebase to Fedora Linux 36 on Silverblue" +[#]: via: "https://fedoramagazine.org/how-to-rebase-to-fedora-linux-36-on-silverblue/" +[#]: author: "Michal Konečný https://fedoramagazine.org/author/zlopez/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to rebase to Fedora Linux 36 on Silverblue +====== +![][1] + +Fedora Silverblue is [an operating system for your desktop built][2][on Fedora Linux][3]. It’s excellent for daily use, development, and container-based workflows. It offers [numerous advantages][4] such as being able to roll back in case of any problems. If you want to update or rebase to Fedora Linux 36 on your Fedora Silverblue system (these instructions are similar for Fedora Kinoite), this article tells you how. It not only shows you what to do, but also how to revert things if something unforeseen happens. + +Prior to actually doing the rebase to Fedora Linux 36, you should apply any pending updates. Enter the following in the terminal: + +``` +$ rpm-ostree update +``` + +or install updates through GNOME Software and reboot. + +### Rebasing using GNOME Software + +GNOME Software shows you that there is new version of Fedora Linux available on the Updates screen. + +![Fedora 36 update available][5] + +First thing you need to do is download the new image, so click on the *Download* button. This will take some time. When it’s done you will see that the update is ready to install. + +![Fedora 36 update ready to install][6] + +Click on the *Restart & Upgrade* button. This step will take only a few moments and the computer will be restarted at the end. After restart you will end up in new and shiny release of Fedora Linux 36. Easy, isn’t it? + +### Rebasing using terminal + +If you prefer to do everything in a terminal, then this part of the guide is for you. + +Rebasing to Fedora Linux 36 using the terminal is easy. First, check if the 36 branch is available: + +``` +$ ostree remote refs fedora +``` + +You should see the following in the output: + +``` +fedora:fedora/36/x86_64/silverblue +``` + +If you want to pin the current deployment (this deployment will stay as option in GRUB until you remove it), you can do it by running: + +``` +$ sudo ostree admin pin 0 +``` + +To remove the pinned deployment use the following command: + +``` +$ sudo ostree admin pin --unpin 2 +``` + +where 2 is the position in the $rpm-ostree status + +Next, rebase your system to the Fedora Linux 36 branch. + +``` +$ rpm-ostree rebase fedora:fedora/36/x86_64/silverblue +``` + +Finally, the last thing to do is restart your computer and boot to Fedora Linux 36. + +### How to roll back + +If anything bad happens—for instance, if you can’t boot to Fedora Linux 36 at all—it’s easy to go back. Pick the previous entry in the GRUB menu at boot (if you don’t see it, try to press ESC during boot), and your system will start in its previous state before switching to Fedora Linux 36. To make this change permanent, use the following command: + +``` +$ rpm-ostree rollback +``` + +That’s it. Now you know how to rebase Fedora Silverblue to Fedora Linux 36 and roll back. So why not do it today? + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/how-to-rebase-to-fedora-linux-36-on-silverblue/ + +作者:[Michal Konečný][a] +选题:[lkxed][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/zlopez/ +[b]: https://github.com/lkxed +[1]: https://fedoramagazine.org/wp-content/uploads/2021/04/silverblue-rebase-816x345.jpg +[2]: https://docs.fedoraproject.org/en-US/fedora-silverblue/ +[3]: https://docs.fedoraproject.org/en-US/fedora-silverblue/ +[4]: https://fedoramagazine.org/give-fedora-silverblue-a-test-drive/ +[5]: https://fedoramagazine.org/wp-content/uploads/2022/05/Screenshot-from-2022-05-11-09-33-55.png +[6]: https://fedoramagazine.org/wp-content/uploads/2022/05/Screenshot-from-2022-05-11-09-40-07.png diff --git a/sources/tech/20220516 Use Composer to require Git repositories within PHP projects.md b/sources/tech/20220516 Use Composer to require Git repositories within PHP projects.md new file mode 100644 index 0000000000..1604430b42 --- /dev/null +++ b/sources/tech/20220516 Use Composer to require Git repositories within PHP projects.md @@ -0,0 +1,228 @@ +[#]: subject: "Use Composer to require Git repositories within PHP projects" +[#]: via: "https://opensource.com/article/22/5/composer-git-repositories" +[#]: author: "Jonathan Daggerhart https://opensource.com/users/daggerhart" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Use Composer to require Git repositories within PHP projects +====== +This dependency management tool makes it easier to require a repository even when it hasn't been created as a package. + +![young woman working on a laptop][1] + +Image by: CC BY 3.0 US Mapbox Uncharted ERG + +The dependency management tool [Composer][2] provides multiple ways to include Git repositories within a PHP: Hypertext Preprocessor (PHP) project. + +In many cases, repositories have been created on Packagist, so requiring them with Composer is very straightforward. But what do you do when a repository has not been created as a package on Packagist? You use Composer to require the package directly from the repository. This article explains how. + +Note: Some of the terminology in this post is confusing because multiple words are used to describe different things. Here is a quick vocabulary list that will help: + +* Project: The custom software you are building. This can be a website, a command-line utility, an application, or anything else you dream up. +* Package: Any third-party software you want to download and use within your project. It can be a library, Drupal theme, WordPress plugin, or any other number of things. +* Git repository: Also called the Git repo, this is the version-control host for a package. Common hosts include GitHub, GitLab, or Bitbucket, but any URL-accessible Git repository will work for this tutorial. +* Composer repositories: In a composer.json file, there is an optional property named "repositories." This property is where you can define new places for Composer to look when downloading packages. + +``` +composer.json +``` + +When adding a Git repo to your project with Composer, you can find yourself in two situations: Either the repo contains a `composer.json` file, which defines how the repo should be handled when required, or it does not. You can add the Git repository to your project in both cases, with different methods. + +### Git repo with composer.json + +When a repository includes a `composer.json` file, it defines aspects of itself that are important to how Composer manages the package. Here is an example of a simple `composer.json` file a package may include: + +``` +{ + "name": "mynamespace/my-custom-library", + "type": "library" +} +``` + +This example shows two important properties that a `composer.json` file can define: + +* Name: The package's namespaced name. In this case, "mynamespace" is the namespace for the package "my-custom-library." +* Type: The type of package the repo represents. Package types are used for installation logic. Out of the box, Composer allows for the following package types: library, project, metapackage, and composer-plugin. + +You can verify this by looking at the `composer.json` file of any popular GitHub project. They each define their package name and the package type near the top of the file. When a repository has this information defined in its `composer.json` file, requiring the repository within your project is quite simple. + +### Require a Git repository that has a composer.json file + +After you've identified a Git repository with a `composer.json` file, you can require that repository as a package within your project. + +Within your project's `composer.json` file, you need to define a new property (assuming it doesn't exist already) named "repositories." The value of the repositories property is an array of objects, each containing information about the repository you want to include in your project. Consider this `composer.json` file for your custom project. + +``` +{ + "name": "mynamespace/my-project-that-uses-composer", + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/mynamespace/my-custom-library.git" + } + ], + "require": { + "mynamespace/my-custom-library": "dev-master" + } +} +``` + +You are doing two important things here. First, you're defining a new repository that Composer can reference when requiring packages. And second, you're requiring the package from the newly defined repository. + +Note: The package version is a part of the require statement and not a part of the repository property. You can require a specific branch of a repo by choosing a version named "dev-". + +If you were to run `composer install` in the context of this file, Composer would look for a project at the defined URL. If that URL represents a Git repo that contains a `composer.json` file that defines its name and type, Composer will download that package to your project and place it in the appropriate location. + +### Custom package types + +The example package shown above is of the type "library," but with WordPress and Drupal you're dealing with plugins, modules, and themes. When requiring special package types in your project, it's important to install them in specific locations within the project file structure. Wouldn't it be nice if you could convince Composer to treat these types of packages as special cases? Well, you're in luck. There is an official Composer plugin that will do that for you. + +The [Installers][3] plugin for Composer contains the custom logic required for handling many different package types for a large variety of projects. It is extremely helpful when working with projects that have well-known and supported package installation steps. + +This project allows you to define package types like drupal-theme, drupal-module, wordpress-plugin, wordpress-theme, and many more, for a variety of projects. In the case of a drupal-theme package, the Installers plugin will place the required repo within the `/themes/contrib` folder of your Drupal installation. + +Here is an example of a `composer.json` file that might live within a Drupal theme project as its own Git repository: + +``` +{ + "name": "mynamespace/whatever-i-call-my-theme", + "type": "drupal-theme", + "description": "Drupal 8 theme", + "license": "GPL-2.0+" +} +``` + +Note that the only meaningful difference here is that the type is now drupal-theme. With the drupal-theme type defined, any project that uses the Installers plugin can easily require your repo in its Drupal project, and it will be treated as a contributed theme. + +### Require any Git repository with Composer + +What happens when the repo you want to include in your project does not define anything about itself with a `composer.json` file? When a repo does not define its name or type, you have to define that information for the repo within your project's `composer.json` file. Take a look at this example: + +``` +{ + "name": "mynamespace/my-project-that-uses-composer", + "repositories": [ + { + "type": "package", + "package": { + "name": "mynamespace/my-custom-theme", + "version": "1.2.3", + "type": "drupal-theme", + "source": { + "url": "https://github.com/mynamespace/my-custom-theme.git", + "type": "git", + "reference": "master" + } + } + } + ], + "require": { + "mynamespace/my-custom-theme": "^1", + "composer/installers": "^1" + } +} +``` + +Notice that your repository type is now "package." That is where you will define everything about the package you want to require. + +Create a new object named "package" where you define all the essential information that Composer needs to know to be able to include this arbitrary git repo within your project, including: + +* Name: The namespaced package name. It should probably match the repository you're requiring but doesn't have to. +* Type: The type of package. This reflects how you want Composer to treat this repository. +* Version: A version number for the repo. You will need to make this up. +* Source: An object that contains the following repository information: + +URL: The Git or other version-control system (VCS) URL where the package repo can be found +Type: The VCS type for the package, such as git, svn, cvs, and so on +Reference: The branch or tag you want to download +* URL: The Git or other version-control system (VCS) URL where the package repo can be found +* Type: The VCS type for the package, such as git, svn, cvs, and so on +* Reference: The branch or tag you want to download + +* URL: The Git or other version-control system (VCS) URL where the package repo can be found +* Type: The VCS type for the package, such as git, svn, cvs, and so on +* Reference: The branch or tag you want to download + +I recommend reviewing the [official documentation][4] on Composer package repositories. Note that it is possible to include zip files as Composer packages as well. Essentially, you are now responsible for all parts of how Composer treats this repository. Since the repository itself is not providing Composer with any information, you are responsible for determining almost everything, including the current version number for the package. + +This approach allows you to include almost anything as a Composer package in your project, but it has some notable drawbacks: + +* Composer will not update the package unless you change the version field. +* Composer will not update the commit references. If you use master as a reference, you will have to delete the package to force an update, and you will have to deal with an unstable lock file. + +``` +version +``` + +``` +master +``` + +### Custom package versions + +Maintaining the package version in your `composer.json` file isn't always necessary. Composer is smart enough to look for GitHub releases and use them as the package versions. But eventually you will likely want to include a simple project that has only a few branches and no official releases. + +When a repository does not have releases, you will be responsible for deciding what version the repository branch represents to your project. In other words, if you want composer to update the package, you will need to increment the "version” defined in your project's `composer.json` file before running `composer update`. + +### Overriding a Git repository's composer.json + +When defining a new Composer repository of the type package, you can override a package's own `composer.json` definitions. Consider a Git repository that defines itself as a library in its `composer.json`, but you know that the code is actually a drupal-theme. You can use the above approach to include the Git repository within your project as a drupal-theme, allowing Composer to treat the code appropriately when required. + +Example: Require Guzzle as a drupal-theme just to prove that you can. + +``` +{ + "name": "mynamespace/my-project-that-uses-composer", + "repositories": [ + { + "type": "package", + "package": { + "name": "mynamespace/guzzle-theme", + "version": "1.2.3", + "type": "drupal-theme", + "source": { + "url": "https://github.com/guzzle/guzzle.git", + "type": "git", + "reference": "master" + } + } + } + ], + "require": { + "mynamespace/guzzle-theme": "^1", + "composer/installers": "^1" + } +} +``` + +This works! You've downloaded the Guzzle library and placed it within the `/themes` folder of your Drupal project. This is not a very practical example, but it highlights how much control the package type approach provides. + +### Summary + +Composer offers plenty of options for including arbitrary packages within a project. Determining how those packages are included in the project primarily comes down to who defines the package information. If the Git repository includes a `composer.json` file that defines its name and type, you can have Composer rely on the repository itself for the definition. + +But if you want to include a repository that does not define its name and type, then it is up to your project to define and maintain that information for your own internal use. Alternatively, if a repository doesn't define a `composer.json` file, consider submitting a pull request that adds it. + +*This article originally appeared on the Daggerhart Lab blog and is republished with permission.* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/composer-git-repositories + +作者:[Jonathan Daggerhart][a] +选题:[lkxed][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/daggerhart +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/lenovo-thinkpad-laptop-window-focus.png +[2]: https://getcomposer.org/ +[3]: https://github.com/composer/installers +[4]: https://getcomposer.org/doc/05-repositories.md#package-2 diff --git a/sources/tech/20220517 Top 10 Best GNOME Extensions in 2022.md b/sources/tech/20220517 Top 10 Best GNOME Extensions in 2022.md new file mode 100644 index 0000000000..b05583366a --- /dev/null +++ b/sources/tech/20220517 Top 10 Best GNOME Extensions in 2022.md @@ -0,0 +1,196 @@ +[#]: subject: "Top 10 Best GNOME Extensions in 2022" +[#]: via: "https://www.debugpoint.com/2022/05/gnome-extensions-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Top 10 Best GNOME Extensions in 2022 +====== +You can try a list of 10 finest GNOME Extensions in 2022 in Ubuntu, Fedora, and other Linux distributions. Take a look. + +It’s time to refresh the list of best GNOME Extensions that we [featured][1] sometime back. The primary reason is the iconic GNOME 42 release that brings GTK4, libadwaita, native dark style and much more updates. + +As GNOME progresses towards a more user-friendly experience, the extension ecosystem also evolves with updated features and extensions for the latest GNOME desktop. Many extensions were discontinued because of lack of interest or simply not being relevant with GNOME versions. + +One of the critical aspects of extension is that with every new GNOME release, the extensions require updates conforming to the latest GNOME version. At the same time, this ensures quality but is also a little difficult for the developer to keep up with two major GNOME releases per year. + +If my math is correct, there are about 400+ extensions present on the official website for all possible tweaks in the GNOME desktop. Hence, we list the 10 best GNOME Extensions that you can try out in Ubuntu Linux, Fedora Workstation, openSUSE or any Linux distribution with a GNOME desktop environment. + +*Note: These GNOME extensions are tested with GNOME 42.* + +### Top 10 GNOME Extensions in 2022 (for everyone) + +The following list of extensions requires initial setup for GNOME extensions which you need to enable as per your Linux distribution. Refer [to this guide for the initial setup][2]. Moreover, to manage these extensions, you should install the [Extensions][3] app from Flathub. + +#### 1. Arc Menu + +The popular Arc Menu GNOME Extension gives you a traditional desktop menu from the modern GNOME desktop panel. It brings well-categorised menu items with installed applications in your system. Arc menu is one of the best GNOME Extensions, which is a must for every workflow. + +A shortcut for the activities overview of GNOME is a nifty feature which is a plus. Moreover, Arc Menu also gives you a search bar which kicks off when you start typing for easy navigation. In addition, you get the logout, restart, lock and power off the menu at the bottom of the Arc Menu. + +Here’s how it looks. + +Try [Arc Menu][4] in GNOME Extension. + +![Arc Menu GNOME Extension][5] + +#### 2. Dash to Panel + +The second extension in this list is the famous “Dash to Panel”, a fixed panel for the GNOME desktop that combines the default dock and top panel. It is essential for the GNOME desktop because it gives you much bigger flexibility in your workflow. With its extensive options such as position, colour, transparency, size, etc., you can make your panel look like anything. + +One of the best GNOME extensions, and you can download it from here. + +[Dash to Panel][6] + +![Dash to Panel with its settings][7] + +#### 3. Blur My Shell + +If you want the ultimate blur effect in the entire GNOME desktop, you should install ‘Blur My Shell’. As its name says, it blurs the application overview screen, application view and the default top panels. + +In addition, you can also control the blur intensity, and brightness with this extension. If you use the Dash to Dock extension, you can also blur the dock! + +Here’s a side by side view of how it looks without blur and with blur effects. + +[Blur My Shell][8] + +![][9] + +![][10] + +#### 4. Floating Dock + +If you want a different type of dock for your GNOME desktop, try Floating Dock. As its name suggests, it creates a dock that floats on your desktop. Moreover, you can easily use the drag handle to place it anywhere. + +One of the exciting features is that this extension gives you the flexibility to change the pop out direction of the dock. For example, you can change the dock to expand to the right side via its context menu (which opens via a right-click on the dock handle). + +[Floating Dock][11] + +![Floating Dock][12] + +![Floating dock position change][13] + +#### 5. Gnome 4x UI Improvements + +The fifth extension is a combination of several tweaks for your GNOME desktop. Using the GNOME 4x UI Improvements, you can do the followings. + +* Hide the application view search bar +* Increase the desktop thumbnail scale in the overview +* Change the desktop thumbnail background +* Hide thumbnail when there is only one workspace +* And display Firefox PIP (picture in picture) window in the overview! + +These are neat features that give a cleaner look to the GNOME desktop. + +Here is a side-by-side view of the extension with all its options enabled (before and after). + +[GNOME 40x UI Improvements][14] + +![Before GNOME 40x UI Improvements][15] + +![GNOME 40x UI Improvements][16] + +#### 6. User Themes + +If you plan to use any custom GNOME Shell themes, you need an extension. It helps you apply the custom Shell themes quickly unless you try it via GNOME Tweaks. Moreover, you can use the GNOME Classic themes as well. + +An extension that is a must for custom themes, and try it [from this link][17]. + +![User Themes Extension][18] + +#### 7. Desktop Icons NG (DING) + +If you are one of those folks who like icons on the desktop and feel little comfortable with items in the desktop, then this is a perfect extension for you. The Desktop Icons bring back the original desktop icons with drag and drop features. Moreover, you can also tweak it further to change the size of the desktop icons, alignment and other additional features, as shown below. + +One of the best extensions that is available today. + +[Desktop Icons NG (DING)][19] + +![Desktop Icons Extension][20] + +#### 8. GSConnect + +GSConnect is a complete implementation of the [KDE Connect][21]application. The GSConnect helps you connect your Android device to get alerts and notifications at your GNOME desktop. In addition, GSCOnnect seamlessly integrates with Nautilus, Google Chrome and Firefox. Furthermore, using GSConnect it is possible to remote control your Android mobile phone, share a clipboard, reply to SMSes and many additional features. + +One of the must-have Extensions for productive work. + +[GSConnect Extension][22] + +![GSConnect (Image credit: developer)][23] + +#### 9. Clipboard Indicator + +Clipboard indicator is one of the best among GNOME Extensions which gives you a running list of Clipboard history in your system. Ideal for heavy work, it gives you options for the number of items in the list, refreshes interval, option to clear history and many such features as in the below image. + +You can try it here: [Clipboard Indicator][24]. + +![Clipboard Indicator GNOME Extension][25] + +#### 10. Vitals + +The final extension in the list of Top 10 Extensions is Vitals. Vitals helps you to monitor your system hardware metric from the system tray. You can check the temperature, voltage, fan speed, storage utilisation and many more features. Furthermore, you can change the position of the Vitals menu and tweak the refresh internal and some more features as below. + +[Vitals][26] + +![Vitals – GNOME Extensions][27] + +Finally, here are another 5 GNOME Extensions which you may want to try. These are simple, but they are handy. + +#### Bonus GNOME Extensions + +11. [Net Speed SImplified][28]: Shows the internet upload and download speed at the top panel, near the system tray.12. [Espresso][29]: A perfect extension helps you disable the screensaver and stand-by modes. FOr example, if you are watching Netflix or any videos and don’t want the screensaver to kick in.13. [OpenWeather][30]: Shows weather forecast and information from any location from Planet Earth at the top bar of GNOME Shell.14.[Tray Icons: Reloaded][31]: If you miss the tray icons for applications, try this extension. One of the best ones on the list.15. [Lock Keys][32]: Finally, if you need an indicator for CAPS and NUM lock keys at the system tray, use this Extension. + +### Closing Notes + +It isn’t easy to filter out the best 10 from hundreds of extensions. Also, the choice is different for everyone. With that said, I hope you find this list of best GNOME Extensions in 2022 helpful and get to use them in your daily workflow. + +What are your favourite GNOME extensions of all time? Let me know in the comment section below. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/gnome-extensions-2022/ + +作者:[Arindam][a] +选题:[lkxed][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/lkxed +[1]: https://www.debugpoint.com/2021/04/gnome-40-extensions/ +[2]: https://www.debugpoint.com/2018/05/how-to-install-and-use-gnome-shell-extensions-in-ubuntu/ +[3]: https://flathub.org/apps/details/org.gnome.Extensions +[4]: https://extensions.gnome.org/extension/3628/arcmenu/ +[5]: https://www.debugpoint.com/wp-content/uploads/2022/05/Arc-Menu-GNOME-Extension.jpg +[6]: https://extensions.gnome.org/extension/1160/dash-to-panel/ +[7]: https://www.debugpoint.com/wp-content/uploads/2022/05/Dash-to-Panel-with-its-settings.jpg +[8]: https://extensions.gnome.org/extension/3193/blur-my-shell/ +[9]: https://www.debugpoint.com/wp-content/uploads/2022/05/Before-Blur-My-Shell-Extension.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2022/05/Blur-My-Shell-Extension.jpg +[11]: https://extensions.gnome.org/extension/2542/floating-dock/ +[12]: https://www.debugpoint.com/wp-content/uploads/2021/04/Floating-Dock.gif +[13]: https://www.debugpoint.com/wp-content/uploads/2022/05/Floating-dock-position-change.gif +[14]: https://extensions.gnome.org/extension/4158/gnome-40-ui-improvements/ +[15]: https://i2.wp.com/www.debugpoint.com/wp-content/uploads/2022/05/Before-GNOME-40x-UI-Improvements.jpg?ssl=1 +[16]: https://i1.wp.com/www.debugpoint.com/wp-content/uploads/2022/05/GNOME-40x-UI-Improvements.jpg?ssl=1 +[17]: https://extensions.gnome.org/extension/19/user-themes/ +[18]: https://www.debugpoint.com/wp-content/uploads/2022/05/User-Themes-Extension.jpg +[19]: https://extensions.gnome.org/extension/2087/desktop-icons-ng-ding/ +[20]: https://www.debugpoint.com/wp-content/uploads/2022/05/Desktop-Icons-Extenstion.gif +[21]: https://www.debugpoint.com/2022/01/kde-connect-guide/ +[22]: https://extensions.gnome.org/extension/1319/gsconnect/ +[23]: https://www.debugpoint.com/wp-content/uploads/2022/05/GSConnect-Image-credit-developer.jpg +[24]: https://extensions.gnome.org/extension/779/clipboard-indicator/ +[25]: https://www.debugpoint.com/wp-content/uploads/2022/05/Clipboard-Indicator-GNOME-Extension.jpg +[26]: https://extensions.gnome.org/extension/1460/vitals/ +[27]: https://www.debugpoint.com/wp-content/uploads/2022/05/Vitals-GNOME-Extensions-2.jpg +[28]: https://extensions.gnome.org/extension/3724/net-speed-simplified/ +[29]: https://extensions.gnome.org/extension/4135/espresso/ +[30]: https://extensions.gnome.org/extension/750/openweather/ +[31]: https://extensions.gnome.org/extension/2890/tray-icons-reloaded/ +[32]: https://extensions.gnome.org/extension/1532/lock-keys/ diff --git a/sources/tech/20220517 Travel off the grid and still send emails with putmail.md b/sources/tech/20220517 Travel off the grid and still send emails with putmail.md new file mode 100644 index 0000000000..cc96281798 --- /dev/null +++ b/sources/tech/20220517 Travel off the grid and still send emails with putmail.md @@ -0,0 +1,79 @@ +[#]: subject: "Travel off the grid and still send emails with putmail" +[#]: via: "https://opensource.com/article/22/5/send-email-putmail" +[#]: author: "Kevin Sonney https://opensource.com/users/ksonney" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Travel off the grid and still send emails with putmail +====== +Configure your mail client to automatically send emails next time you have an internet connection. + +![Chat via email][1] + +*Automation is a hot topic right now. In my day job as an SRE part of my remit is to automate as many repeating tasks as possible. But how many of us do that in our daily, not-work, lives? This year, I am focused on automating away the toil so that we can focus on the things that are important.* + +In "normal times" my wife and I travel a lot. And as anyone who similarly travels a lot knows, connectivity can be very expensive. We were recently on a cruise and the "Premium" ship-board internet cost upwards of $200 for the full 7 days, and even then it had all the drawbacks of satellite internet in terms of speed and congestion. So to make my life easier, I set up [offlineimap][2] to download my mail, [dovecot][3] to let me use an IMAP client to read my mail, and [msmtp][4] to send mail from my various accounts. I covered much of [this setup in 2020][5], and the rest is documented in many places online. + +What is not often discussed is that you still need to be online to send mail. The most common recommended solution for sending mail is msmtp, and it always rejects mail if it can't connect to the desired host. But it does have a daemon option (`msmtpd` ) that can be used to accept local SMTP connections and forward them to another program. By default, this is `msmtp` itself. But again, I don't want to send things now, I want to send things when I have a connection, which is when I stumbled upon [putmail][6]. + +`Putmail` is a set of Python scripts that sends mail to pre-configured smtp servers based on the `From` address in a mail message. It is stable (unmodified since 2011), and just works. If you, like me, have multiple email addresses which have to be sent via multiple SMTP relays, this is just the thing you need. Each email address you send from has its own configuration file, and since `putmail` decides on which to use based on the message itself, there's no need to have to set up multiple sending setups in a single mail client. + +As an example, to send with a `gmail` account, you would create the file `.putmail/yourname@gmail.com` and fill in the following information. + +``` +yourname@gmail.com putmail configuration +[config] +email = yourname@gmail.com +server = smtp.gmail.com +port = 587 +username = yourname@gmail.com +password = XXXXXXXXXXXXXXXXX +tls = on +``` + +And that's it. Configure a mail client to send via `putmail.py` instead of `sendmail` or `msmtp` and send a message. + +The next best things are the `putmail_enque.py` and `putmail_dequeue.py` scripts. The first takes an email and stores it to send later. The second loops through the queue and delivers the mail. By specifying `putmail_enqueue.py` as the program `msmtpd` runs, I can "send" an email now, and it just waits for me to run `putmail_dequeue.py` later. Here is my `msmtpd` startup command, specifying `putmail_enqueue.py` as the item to be used for mail delivery. + +``` +msmtpd --port=1025 --log=/tmp/msmtpd.log --command='putmail_enqueue.py -f %F' - +``` + +I use the following script as a `presynchook` in `offlineimap` to check to see if I am connected, and if so, send mail. + +``` +#!/bin/bash +echo Sending queued messages \(if any\) +QUEUEDMAIL=$(find $HOME/.putmail/queue -type f | wc -l) +if [ $QUEUEDMAIL -ne 0 ]; then +  ping -n -c 1 imap.gmail.com >/dev/null 2>/dev/null +  if [ $? -eq 0 ]; then +    putmail_dequeue.py +  fi +fi +``` + +After all that, I can use any mail client I wish and send mail with a standard SMTP call to `localhost:1025` and have it delivered next time I'm connected to the internet. And the best part is, I don't have to change my workflow for email if I'm home or traveling — it all just happens automatically in the background. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/send-email-putmail + +作者:[Kevin Sonney][a] +选题:[lkxed][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/ksonney +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/email_chat_communication_message.png +[2]: https://www.offlineimap.org/ +[3]: https://www.dovecot.org/ +[4]: https://marlam.de/msmtp/ +[5]: https://opensource.com/article/20/1/sync-email-offlineimap +[6]: https://github.com/tgray/putmail diff --git a/sources/tech/20220518 A guide to Pipy, a programmable network proxy for cloud.md b/sources/tech/20220518 A guide to Pipy, a programmable network proxy for cloud.md new file mode 100644 index 0000000000..ef97d7a9f5 --- /dev/null +++ b/sources/tech/20220518 A guide to Pipy, a programmable network proxy for cloud.md @@ -0,0 +1,548 @@ +[#]: subject: "A guide to Pipy, a programmable network proxy for cloud" +[#]: via: "https://opensource.com/article/22/5/pipy-programmable-network-proxy-cloud" +[#]: author: "Ali Naqvi https://opensource.com/users/alinaqvi" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +A guide to Pipy, a programmable network proxy for cloud +====== +Pipy is an open source, extremely fast, and lightweight network traffic processor. It has a variety of use cases including edge routers, load balancing and proxying, API gateways, static HTTP servers, service mesh sidecars, and many other applications. + +![Woman using laptop concentrating][1] +Image by Mapbox Uncharted ERG, [CC-BY 3.0 US][2] + +Pipy is an open source, cloud-native, network stream processor. It is modular by design and can create a high-performance network proxy. It's written in C++ and is built on top of the Asio asynchronous I/O library. Pipy is ideal for a variety of use cases ranging from edge routers, load balancers, proxy solutions, API gateways, static HTTP servers, service mesh sidecars, and more. + +Pipy also comes with built-in JavaScript support through PipyJS. PipyJS is highly customizable and predictable in performance, with no garbage collection overhead. Currently, PipyJS is part of the Pipy code base, but it has no dependency on it and in the future it may be moved to a standalone package. + +### Pipy quick start guide + +You can run the production version of Pipy using Podman or Docker with one of the tutorial scripts provided on the official Pipy Git repository. The Pipy container image can be configured with a few environment variables: + +* PIPY_CONFIG_FILE= sets the location of the Pipy configuration file. +* PIPY_SPAWN=n sets the number of Pipy instances you want to start, where n is the number of instances. This is a zero-based index, so 0 represents 1 instance. For example, use PIPY_SPAWN=3 for 4 instances. + +Start the Pipy server with this example script: + +``` +$ docker run --rm -e PIPY_CONFIG_FILE=\ +https://raw.githubusercontent.com/flomesh-io/pipy/main/tutorial/01-hello \ +-e PIPY_SPAWN=1 -p 8080:8080 flomesh/pipy-pjs:latest +``` + +You may notice that instead of a local file, this code provides a link to a remote Pipy script through the environment variable `PIPY_CONFIG_FILE`. Pipy is smart enough to handle that. + +For your reference, here are the contents of the file `tutorial/01-hello/hello.js` : + +``` +pipy() +.listen(8080) +.serveHTTP( +new Message('Hi, there!\n') +) +``` + +This simple script defines one Port pipeline, which listens on port 8080 and returns "Hi, there!" for each HTTP request received on the listening port. + +As you've exposed local port 8080 with the docker run command, you can proceed with a test on the same port: + +``` +$ curl http://localhost:8080 +``` + +Executing the above command displays `Hi, there!` on the console. + +For learning, development, or debugging purposes it's recommended to proceed with the local installation (either build Pipy from sources or download a release for your OS) of Pipy, as it comes with an admin web console along with documentation and tutorials. + +Once installed locally, running `pipy` without any arguments starts the admin console on port 6060, but it can be configured to listen on the different port with the `--admin-port` option. + +![Pipy admin console listening on port 6060][3] + +To build Pipy from source, or to install a precompiled binary for your operating system, refer to README.md on the [Pipy][4] Git repository. + +#### Running Pipy in a terminal + +To start a Pipy proxy, run Pipy with a PipyJS script file, for example, the script in `tutorial/01-hello/hello.js` if you need a simple echo server that responds with the same message body received with every incoming request: + +``` +$ pipy tutorial/01-hello/hello.js +``` + +Alternatively, while developing and debugging, one can start Pipy with a builtin web UI: + +``` +$ pipy tutorial/01-hello/hello.js --admin-port=6060 +``` + +To see all command-line options, use the `--help` flag: + +``` +$ pipy --help +``` + +### Pipy is a stream processor + +Pipy operates on network streams using an event-driven pipeline where it consumes the input stream, performs user-provided transformations, and outputs the stream. A pipy data stream takes raw data and abstracts it into an event. An event can belong to one of four categories: + +* Data: Network streams are composed of data bytes and come in chunks. Pipy abstracts out chunks into a Data event. +* MessageStart, MessageEnd, StreamEnd: These three non-data events work as markers, giving the raw byte streams high-level semantics for business logic to rely on. + +### Pipy Design + +The internal workings of Pipy are similar to [Unix Pipelines][5] but unlike Unix pipelines, which deal with discreet bytes, Pipy deals with streams of events. + +Pipy processes incoming streams through a chain of filters, where each filter deals with general concerns like request logging, authentication, SSL offloading, request forwarding, and so on. Each filter reads from its input and writes to its output, with the output of one filter connected to the input of the next. + +#### Pipelines + +A chain of filters is called a pipeline and Pipy categorizes pipelines in 3 different categories according to their input sources. + +* Port pipeline: Reads in Data events from a network port, processes them, and then writes the result back to the same port. This is the most commonly used request and response model. For instance, when Pipy works like an HTTP server, the input to a Port pipeline is an HTTP request from the clients, and the output from the pipeline would be an HTTP response sent back to clients. +* Timer pipeline: Gets a pair of MessageStart and MessageEnd events as its input periodically. Useful when [Cron][6] [job-like][7] functionality is required. +* Sub-pipeline: Works in conjunction with a join filter, such as link, which takes in events from its predecessor pipeline, feeds them into a sub-pipeline for processing, reads back the output from the sub-pipeline, and then pumps it down to the next filter. +The best way to look at sub-pipelines and join filters is to think of them as callees and callers of a subroutine in procedural programming. The input to the joint filter is the subroutine's parameters, the output from the joint filter is its return value. +A root pipeline, such as Port or Timer, cannot be called from join filters. +To get a list of builtin filters and their parameters: +$  pipy --list-filters +$  pipy --help-filters + +``` +$  pipy --list-filters +$  pipy --help-filters +``` + +#### Context + +Another important notion in Pipy is that of contexts. A context is a set of variables attached to a pipeline. Every pipeline gets access to the same set of variables across a Pipy instance. In other words, contexts have the same shape. When you start a Pipy instance, the first thing you do is define the shape of the context by defining variable(s) and their initial values. + +Every root pipeline clones the initial context you define at the start. When a sub-pipeline starts, it either shares or clones its parent's context, depending on which joint filter you use. For instance, a link filter shares its parent's context while a demux filter clones it. + +To the scripts embedded in a pipeline, these context variables are their global variables, which means that these variables are always accessible to scripts from anywhere if they live in the same script file. + +This might seem odd to a seasoned programmer because global variables usually mean they are globally unique. You have only one set of these variables, whereas in Pipy we can have many sets of them (contexts) depending on how many root pipelines are open for incoming network connections and how many sub-pipelines clone their parents' contexts. + +### Writing a Network Proxy + +Suppose you're running separate instances of different services and you want to add a proxy to forward traffic to the relevant services based on the request URL path. This would give you the benefit of exposing a single URL and scaling your services in the back end without users having to remember a distinct service URL. In normal situations, your services would be running on different nodes and each service could have multiple instances running. In this example, assume you're running the services below, and want to distribute traffic to them based on the URI. + +* service-hi at /hi/* (127.0.0.1:8080, 127.0.0.1:8082) +* service-echo at /echo (127.0.0.1:8081) +* service-tell-ip at /ip_/_* (127.0.0.1:8082) + +Pipy scripts are written in JavaScript, and you can use any text editor of your choice to edit them. Alternatively, if you have installed Pipy locally, you can use Pipy admin Web UI, which comes with syntax highlighting, auto-completion, hints, as well as the ability to run scripts, all from the same console. + +Start a Pipy instance, without any arguments, so the Pipy admin console launches on port 6060. Now open your favorite web browser and navigate to [[http://localhost:6060](http://localhost:6060/][8] to see the built-in Pipy Administration Web UI. + +![Built-in Pipy administration web UI][9] + +### Create a Pipy program + +A good design practice is that code and configurations are separated. Pipy supports such modular design through its Plugins, which you can think of as JavaScript modules. That said, you store your configuration data in the config folder, and your coding logic in separate files under the plugins folder. The main proxy server script is stored in the root folder, the main proxy script (`proxy.js` ) will include and combine the functionality defined in separate modules. In the end, your final folder structure is: + +``` +├── config +│ ├── balancer.json +│ ├── proxy.json +│ └── router.json +├── plugins +│ ├── balancer.js +│ ├── default.js +│ └── router.js +└── proxy.js +``` + +1.Click **New Codebase**, enter `/proxy` for the Codebase *name* in the dialog and then click **Create**. + +1. Click the + button to add a new file. Enter /config/proxy.json for its filename and then click Create. This is the configuration file used to configure your proxy. +2. You now see proxy.json listed under the config folder in the left pane. Click on the file to open it and add the configuration shown below and make sure you save your file by clicking the disk icon on the top panel. +   +{ +"listen": 8000, +"plugins": [ +"plugins/router.js", +"plugins/balancer.js", +"plugins/default.js" ] +} +3. Repeat steps 2 and 3 to create another file, /config/router.json, to store route information. Enter this configuration data: +{ +"routes": { +"/hi/*": "service-hi", +"/echo": "service-echo", +"/ip/*": "service-tell-ip" } +} +4. Repeat steps 2 and 3 to create another file, /config/balancer.json to store your service-to-target map. Enter the following data: +{ +"services": { +"service-hi" : ["127.0.0.1:8080", "127.0.0.1:8082"], +"service-echo" : ["127.0.0.1:8081"], +"service-tell-ip" : ["127.0.0.1:8082"] } +} +5. Now it's time to write your very first Pipy script, which will be used as a default fallback when your server receives a request for which you don't have any target (an endpoint) configured. Create the file /plugins/default.js. The name here is just a convention and Pipy doesn't rely on names, so you can choose any name you like. The script will contain the code shown below, which returns the HTTP Status code 404 with a message of No handler found: +   +pipy() +.pipeline('request') +.replaceMessage( +new Message({ status: 404 }, 'No handler found')) + +``` +{ +"listen": 8000, +"plugins": [ +"plugins/router.js", +"plugins/balancer.js", +"plugins/default.js" ] +} +``` + +``` +{ +"routes": { +"/hi/*": "service-hi", +"/echo": "service-echo", +"/ip/*": "service-tell-ip" } +} +``` + +``` +{ +"services": { +"service-hi" : ["127.0.0.1:8080", "127.0.0.1:8082"], +"service-echo" : ["127.0.0.1:8081"], +"service-tell-ip" : ["127.0.0.1:8082"] } +} +``` + +``` +pipy() +.pipeline('request') +.replaceMessage( +new Message({ status: 404 }, 'No handler found')) +``` + +7.Create the file `/plugins/router.js`, which stores your routing logic: + +``` +(config => +pipy({ +_router: new algo.URLRouter(config.routes), }) +.export('router', { +__serviceID: '', }) +.pipeline('request') +.handleMessageStart( +msg => ( +__serviceID = _router.find( +msg.head.headers.host, +msg.head.path, ) +) ) +)(JSON.decode(pipy.load('config/router.json'))) +``` + +1. Create the file /plugins/balancer.js, which stores your load balancing logic as a side-note. Pipy comes with multiple Load Balancing algorithms, but for simplicity, you're using the Round Robin algorithm here. +(config => + +pipy({ +  _services: ( +    Object.fromEntries( +      Object.entries(config.services).map( +        ([k, v]) => [ +          k, new algo.RoundRobinLoadBalancer(v) +        ] +      ) +    ) +  ), + +  _balancer: null, +  _balancerCache: null, +  _target: '', +}) + +.import({ +  __turnDown: 'proxy', +  __serviceID: 'router', +}) + +.pipeline('session') +  .handleStreamStart( +    () => ( +      _balancerCache = new algo.Cache( +        // k is a balancer, v is a target +        (k  ) => k.select(), +        (k,v) => k.deselect(v), +      ) +    ) +  ) +  .handleStreamEnd( +    () => ( +      _balancerCache.clear() +    ) +  ) + +.pipeline('request') +  .handleMessageStart( +    () => ( +      _balancer = _services[__serviceID], +      _balancer && (_target = _balancerCache.get(_balancer)), +      _target && (__turnDown = true) +    ) +  ) +  .link( +    'forward', () => Boolean(_target), +    '' +  ) + +.pipeline('forward') +  .muxHTTP( +    'connection', +    () => _target +  ) + +.pipeline('connection') +  .connect( +    () => _target +  ) + +)(JSON.decode(pipy.load('config/balancer.json'))) +2. Now write the entry point, or the proxy server script, to use the above plugins. Creating a new code base (step 1) creates a default main.js file as an entry point. You can use that as your main entry point, or if you prefer to go with a different name, feel free to delete main.js and create a new file with the name of your choice. For this example, delete it and create a new file named /proxy.js. Make sure you click the top flag icon to make it the main entry point, to ensure script execution is started when you hit the run button (the arrow icon on the right). +(config => + +pipy() + +.export('proxy', { +  __turnDown: false, +}) + +.listen(config.listen) +  .use(config.plugins, 'session') +  .demuxHTTP('request') + +.pipeline('request') +  .use( +    config.plugins, +    'request', +    'response', +    () => __turnDown +  ) + +)(JSON.decode(pipy.load('config/proxy.json'))) + +``` +(config => + +pipy({ +  _services: ( +    Object.fromEntries( +      Object.entries(config.services).map( +        ([k, v]) => [ +          k, new algo.RoundRobinLoadBalancer(v) +        ] +      ) +    ) +  ), + +  _balancer: null, +  _balancerCache: null, +  _target: '', +}) + +.import({ +  __turnDown: 'proxy', +  __serviceID: 'router', +}) + +.pipeline('session') +  .handleStreamStart( +    () => ( +      _balancerCache = new algo.Cache( +        // k is a balancer, v is a target +        (k  ) => k.select(), +        (k,v) => k.deselect(v), +      ) +    ) +  ) +  .handleStreamEnd( +    () => ( +      _balancerCache.clear() +    ) +  ) + +.pipeline('request') +  .handleMessageStart( +    () => ( +      _balancer = _services[__serviceID], +      _balancer && (_target = _balancerCache.get(_balancer)), +      _target && (__turnDown = true) +    ) +  ) +  .link( +    'forward', () => Boolean(_target), +    '' +  ) + +.pipeline('forward') +  .muxHTTP( +    'connection', +    () => _target +  ) + +.pipeline('connection') +  .connect( +    () => _target +  ) + +)(JSON.decode(pipy.load('config/balancer.json'))) +``` + +``` +(config => + +pipy() + +.export('proxy', { +  __turnDown: false, +}) + +.listen(config.listen) +  .use(config.plugins, 'session') +  .demuxHTTP('request') + +.pipeline('request') +  .use( +    config.plugins, +    'request', +    'response', +    () => __turnDown +  ) + +)(JSON.decode(pipy.load('config/proxy.json'))) +``` + +So far, your workspace looks like this: + +![Image of workspace][10] + +To run your script, click the play icon button (4th from right). Pipy runs your proxy script, and you see output similar to this: + +![Image of output][11] + +This shows that your proxy server is listening on port 8000 (which you configured in your `/config/proxy.json` ). Use [curl to run a test][12]: + +``` +$ curl -i [http://localhost:8000](http://localhost:8000) +HTTP/1.1 404 Not Found +content-length: 10 +connection: keep-alive +No handler found +``` + +That response makes sense because you haven't configured any target for root. Try one of your configured routes, such as `/hi` : + +``` +$ curl -i [http://localhost:8000/hi](http://localhost:8000/hi) +HTTP/1.1 502 Connection Refused +content-length: 0 +connection: keep-alive +``` + +You get `502 Connection Refused` because you have no service running on your configured target port. + +You can update `/config/balancer.json` with details like the host and port of your already running services to make it fit for your use case, or you can just write a script in Pipy to listen on your configured ports, and return simple messages. + +Save this code to a file on your local computer named `mock-proxy.js`, and remember the location where you stored it: + +``` +pipy() + +.listen(8080) +  .serveHTTP( +    new Message('Hi, there!\n') +  ) + +.listen(8081) +  .serveHTTP( +    msg => new Message(msg.body) +  ) + +.listen(8082) +  .serveHTTP( +    msg => new Message( +      `You are requesting ${msg.head.path} from ${__inbound.remoteAddress}\n` +    ) +  ) +``` + +Open a new terminal window and run this script with Pipy (change `/path/to` to the location where you stored this script file): + +``` +$ pipy /path/to/mock-proxy.js +2022-01-11 18:56:31 [INF] [config] +2022-01-11 18:56:31 [INF] [config] Module /mock-proxy.js +2022-01-11 18:56:31 [INF] [config] ================ +2022-01-11 18:56:31 [INF] [config] +2022-01-11 18:56:31 [INF] [config] [Listen on :::8080] +2022-01-11 18:56:31 [INF] [config] ----->| +2022-01-11 18:56:31 [INF] [config] | +2022-01-11 18:56:31 [INF] [config] serveHTTP +2022-01-11 18:56:31 [INF] [config] | +2022-01-11 18:56:31 [INF] [config] <-----| +2022-01-11 18:56:31 [INF] [config] +2022-01-11 18:56:31 [INF] [config] [Listen on :::8081] +2022-01-11 18:56:31 [INF] [config] ----->| +2022-01-11 18:56:31 [INF] [config] | +2022-01-11 18:56:31 [INF] [config] serveHTTP +2022-01-11 18:56:31 [INF] [config] | +2022-01-11 18:56:31 [INF] [config] <-----| +2022-01-11 18:56:31 [INF] [config] +2022-01-11 18:56:31 [INF] [config] [Listen on :::8082] +2022-01-11 18:56:31 [INF] [config] ----->| +2022-01-11 18:56:31 [INF] [config] | +2022-01-11 18:56:31 [INF] [config] serveHTTP +2022-01-11 18:56:31 [INF] [config] | +2022-01-11 18:56:31 [INF] [config] <-----| +2022-01-11 18:56:31 [INF] [config] +2022-01-11 18:56:31 [INF] [listener] Listening on port 8080 at :: +2022-01-11 18:56:31 [INF] [listener] Listening on port 8081 at :: +2022-01-11 18:56:31 [INF] [listener] Listening on port 8082 at :: +``` + +You now have your mock services listening on ports 8080, 8081, and 8082. Do a test again on your proxy server to see the correct response returned from your mock service. + +### Summary + +You've used a number of Pipy features, including variable declaration, importing and exporting variables, plugins, Pipelines, sub-pipelines, filter chaining, Pipy filters like `handleMessageStart`, `handleStreamStart`, and link, and Pipy classes like JSON, `algo.URLRouter`, `algo.RoundRobinLoadBalancer`, `algo.Cache`, and others. For more information, read the excellent [Pipy documentation][13], and through Pipy's admin web UI, and follow the step-by-step tutorials that come with it. + +### Conclusion + +Pipy from [Flomesh][14] is an open source, extremely fast, and lightweight network traffic processor. You can use it in a variety of use cases ranging from edge routers, load balancing and proxying (forward and reverse), API gateways, static HTTP servers, service mesh sidecars, and many other applications. Pipy is in active development and is maintained by full-time committers and contributors. + +Images by: (Ali Naqvi, CC BY-SA 40) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/pipy-programmable-network-proxy-cloud + +作者:[Ali Naqvi][a] +选题:[lkxed][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/alinaqvi +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png +[2]: https://creativecommons.org/licenses/by/3.0/us/ +[3]: https://opensource.com/sites/default/files/2022-05/pipy1.png +[4]: https://github.com/flomesh-io/pipy +[5]: https://opensource.com/article/19/4/interprocess-communication-linux-channels +[6]: https://en.wikipedia.org/wiki/Cron +[7]: https://en.wikipedia.org/wiki/Cron +[8]: http://localhost:6060 +[9]: https://opensource.com/sites/default/files/2022-05/pipy2.png +[10]: https://opensource.com/sites/default/files/2022-05/pipy3.png +[11]: https://opensource.com/sites/default/files/2022-05/pipy4.png +[12]: https://www.redhat.com/sysadmin/social-media-curl +[13]: https://flomesh.io +[14]: https://flomesh.io diff --git a/sources/tech/20220518 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 - 20.04 - 18.04.md b/sources/tech/20220518 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 - 20.04 - 18.04.md new file mode 100644 index 0000000000..0824725cdf --- /dev/null +++ b/sources/tech/20220518 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 - 20.04 - 18.04.md @@ -0,0 +1,273 @@ +[#]: subject: "How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 / 20.04 / 18.04" +[#]: via: "https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 / 20.04 / 18.04 +====== +This tutorial explains how to boot into **rescue mode** or **emergency mode**in Ubuntu 22.04, 20.04 and 18.04 LTS editions. + +As you might already know, **Runlevels** are replaced with **Systemd targets** in many Linux distributions such as RHEL 7 / RHEL 8 and Ubuntu 16.04 LTS and newer versions. For more details about runlevels and systemd target, refer to [this guide][1]. + +This guide is specifically written for Ubuntu, however the steps given below should work on most Linux distributions that use **Systemd** as the default service manager. + +Before getting into the topic, let us have a brief understanding about what is rescue mode and emergency mode and what is the purpose of these both modes. + +### What Is Rescue Mode? + +The **rescue mode** is equivalent to **single user mode** in Linux distributions that use **SysV** as the default service manager. In rescue mode, all local filesystems will be mounted, only some important services will be started. However, no normal services (E.g network services) won't be started. + +The rescue mode is helpful in situations where the system can't boot normally. Also, we can perform some important rescue operations, such as [reset root password][2], in rescue mode. + +### What Is Emergency Mode? + +In contrast to the rescue mode, nothing is started in the **emergency mode**. No services are started, no mount points are mounted, no sockets are established, nothing. All you will have is just a **raw shell**. Emergency mode is suitable for debugging purposes. + +First, we will see how to boot into rescue mode and emergency mode in Ubuntu 22.04 and 20.04 LTS distributions. The procedure for entering rescue mode in Ubuntu 22.04 and 20.04 LTS is exactly the same! + +### Boot Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS + +We can boot into rescue mode in two ways. + +#### Method 1 + +Power on your Ubuntu system. Hit the ESC key right after the BIOS logo disappears to display the Grub menu. + +In the GRUB menu, choose the first entry and press **"e"** to edit it. + +![GRUB Menu In Ubuntu 22.04 / 20.04 LTS][3] + +Hit the DOWN arrow and find the line that starts with the word **"linux"** and add the following line at the end of it. To reach the end, just press **CTRL+e** or use the **END** key or **LEFT/RIGHT** arrows in your keyboard. + +``` +systemd.unit=rescue.target +``` + +![Edit Grub Boot Menu Entries To Enter Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS][4] + +After adding the above line, hit **Ctrl+x** or**F10** to boot into rescue mode. + +After a few seconds, you will be landed in the rescue mode (single user mode) as root user. You will be prompted to press ENTER to enter the maintenance mode. + +Here is how rescue mode looks like in Ubuntu 22.04 / 20.04 LTS systems: + +![Boot Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS][5] + +Now do whatever you want to do in the rescue mode. You may need to mount the root (**/**) file system in read/write mode before doing any operations in rescue mode. + +``` +mount -n -o remount,rw / +``` + +![Mount Root File System In Read Write Mode In Ubuntu 22.04 / 20.04 LTS][6] + +Once done, press **"Ctrl+d"** to boot into normal mode. Alternatively, you can type any one of the following commands to boot into normal mode. + +``` +systemctl default +``` + +Or, + +``` +exit +``` + +If you want to reboot the system instead of booting into normal mode, enter: + +``` +systemctl reboot +``` + +#### Method 2 + +In this method, you don't need to edit the grub boot menu entries. + +Power on the system and choose **"Advanced options for Ubuntu"** from the Grub boot menu. + +![Choose Advanced Options For Ubuntu From Grub Boot Menu][7] + +Next, you will see the list of available Ubuntu versions with Kernel versions. Choose the **"Recovery mode"** in the grub boot menu in Ubuntu. + +![Choose Recovery Mode In Grub Boot Menu In Ubuntu 22.04 / 20.04 LTS][8] + +After a few seconds, you will see the Ubuntu recovery menu. From the recovery menu, choose **"Drop to root shell prompt"** option and hit the ENTER key. + +![Enter Into Root Shell Prompt In Ubuntu 22.04 / 20.04 LTS][9] + +Now you will be landed in the rescue mode. + +![Ubuntu Maintenance Mode][10] + +Mount the root (**/**) file system in read/write mode by entering the following command: + +``` +mount -n -o remount,rw / +``` + +![Mount Root File System In Read Write Mode In Ubuntu][11] + +Do whatever you want to do in the rescue mode. + +Once done, type exit to return back to the recovery menu. + +``` +exit +``` + +Finally, choose **"Resume normal boot"** option and hit the ENTER key. + +![Boot Into Normal Mode In Ubuntu][12] + +Press ENTER key again to exit recovery mode and continue booting into normal mode. + +![Exit The Recovery Mode In Ubuntu][13] + +If you don't want to boot into normal mode, type **"reboot"** and press ENTER from the maintenance mode to restart your system. + +### Boot Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS + +When the GRUB boot menu appears, press **"e"** to edit it. + +![GRUB Menu In Ubuntu 22.04 / 20.04 LTS][14] + +Find the line that starts with the word **"linux"** and add the following line at the end of it. + +``` +systemd.unit=emergency.target +``` + +![Edit Grub Boot Menu Entries To Enter Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS][15] + +After adding the above line, hit **Ctrl+x** or**F10** to boot into emergency mode. + +After a few seconds, you will be landed in the emergency mode as `root` user. You will be prompted to press ENTER to enter the maintenance mode. + +Here is how emergency mode looks like in Ubuntu 22.04 / 20.04 LTS system: + +![Boot Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS][16] + +Now do whatever you want to do in the emergency mode. You may need to mount the root (**/**) file system in read/write mode before doing any operations in this mode. + +``` +mount -n -o remount,rw / +``` + +Once done, press **"Ctrl+d"** to boot into normal mode. Alternatively, you can type any one of the following commands to boot into normal mode. + +``` +systemctl default +``` + +Or, + +``` +exit +``` + +If you want to reboot the system instead of booting into normal mode, enter: + +``` +systemctl reboot +``` + +### Boot Into Rescue Mode In Ubuntu 18.04 LTS + +Boot your Ubuntu system. When the Grub menu appears, choose the first entry and press **e** to edit. (To reach the end, just press **CTRL+e** or use the END key or LEFT/RIGHT arrows in your keyboard): + +![Grub Menu][17] + +If you don't see the Grub menu, just hit ESC key right after the BIOS logo disappears. + +Find the line that starts with word **"linux"**and add the following line at the end of that line (To reach the end, just press **CTRL+e** or use the END key or LEFT/RIGHT arrows in your keyboard): + +``` +systemd.unit=rescue.target +``` + +![Edit Grub Menu][18] + +Once you added the above line, just press **CTRL+x** or **F10** to continue to boot into rescue mode. After a few seconds, you will be landed in the rescue mode (single user mode) as root user. + +Here is how rescue mode looks like in Ubuntu 18.04 LTS server: + +![Ubuntu Rescue Mode][19] + +Next, type the following command to mount root (**/**) file system into read/write mode. + +``` +mount -n -o remount,rw / +``` + +### Boot Into Emergency Mode + +Booting your Ubuntu into emergency is as same as above method. All you have to do is replace **"systemd.unit=rescue.target"** with **"systemd.unit=emergency.target"** when editing grub menu. + +![Edit Grub Menu][20] + +Once you added "systemd.unit=emergency.target", press **Ctrl+x** or **F10** to continue booting into emergency mode. + +![Ubuntu Emergency Mode][21] + +Finally, you can mount root filesystem into read/write mode with command: + +``` +mount -n -o remount,rw / +``` + +### Switch Between Rescue And Emergency Modes + +If you are in rescue mode, you don't have to edit the grub boot entry as I mentioned above. Instead, just type the following command to switch to emergency mode instantly: + +``` +systemctl emergency +``` + +Similarly, to switch from emergency to rescue mode, type: + +``` +systemctl rescue +``` + +### Conclusion + +You know now what is rescue and emergency modes and how to boot into those modes in Ubuntu 22.04, 20.04 and 18.04 LTS systems. Like I already mentioned, the steps provided here will work on many recent Linux versions that uses Systemd. + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/check-runlevel-linux/ +[2]: https://ostechnix.com/how-to-reset-or-recover-root-user-password-in-linux/ +[3]: https://ostechnix.com/wp-content/uploads/2022/05/GRUB-Menu-In-Ubuntu-22.04-LTS.png +[4]: https://ostechnix.com/wp-content/uploads/2022/05/Edit-Grub-Boot-Menu-Entries-To-Enter-Into-Rescue-Mode-In-Ubuntu-22.04-LTS.png +[5]: https://ostechnix.com/wp-content/uploads/2022/05/Boot-Into-Rescue-Mode-In-Ubuntu-22.04.png +[6]: https://ostechnix.com/wp-content/uploads/2022/05/Mount-Root-File-System-In-Read-Write-Mode-In-Ubuntu.png +[7]: https://ostechnix.com/wp-content/uploads/2022/05/Choose-Advanced-Options-For-Ubuntu-From-Grub-Boot-Menu.png +[8]: https://ostechnix.com/wp-content/uploads/2022/05/Choose-Recovery-Mode-In-Grub-Boot-Menu-In-Ubuntu.png +[9]: https://ostechnix.com/wp-content/uploads/2022/05/Enter-Into-Root-Shell-Prompt-In-Ubuntu.png +[10]: https://ostechnix.com/wp-content/uploads/2022/05/Ubuntu-Maintenance-Mode.png +[11]: https://ostechnix.com/wp-content/uploads/2022/05/Mount-Root-File-System-In-Read-Write-Mode-In-Ubuntu-1.png +[12]: https://ostechnix.com/wp-content/uploads/2022/05/Boot-Into-Normal-Mode-In-Ubuntu.png +[13]: https://ostechnix.com/wp-content/uploads/2022/05/Exit-The-Recovery-Mode-In-Ubuntu.png +[14]: https://ostechnix.com/wp-content/uploads/2022/05/GRUB-Menu-In-Ubuntu-22.04-LTS.png +[15]: https://ostechnix.com/wp-content/uploads/2022/05/Edit-Grub-Boot-Menu-Entries-To-Enter-Into-Emergency-Mode-In-Ubuntu.png +[16]: https://ostechnix.com/wp-content/uploads/2018/12/Boot-Into-Emergency-Mode-In-Ubuntu-20.04-LTS.png +[17]: https://ostechnix.com/wp-content/uploads/2018/12/Grub-menu.png +[18]: https://ostechnix.com/wp-content/uploads/2018/12/Edit-grub-menu.png +[19]: https://ostechnix.com/wp-content/uploads/2018/12/Ubuntu-rescue-mode.png +[20]: https://ostechnix.com/wp-content/uploads/2018/12/emergency-mode.png +[21]: https://ostechnix.com/wp-content/uploads/2018/12/emergency-mode-1.png diff --git a/sources/tech/20220518 Install Specific Package Version With Apt Command in Ubuntu.md b/sources/tech/20220518 Install Specific Package Version With Apt Command in Ubuntu.md new file mode 100644 index 0000000000..c88a655218 --- /dev/null +++ b/sources/tech/20220518 Install Specific Package Version With Apt Command in Ubuntu.md @@ -0,0 +1,191 @@ +[#]: subject: "Install Specific Package Version With Apt Command in Ubuntu" +[#]: via: "https://itsfoss.com/apt-install-specific-version-2/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Install Specific Package Version With Apt Command in Ubuntu +====== + +Want to install a specific version of a package in Ubuntu? You can do that ‘easily’ in the following manner: + +``` +sudo apt install package_name=package_version +``` + +How do you know which versions are available for a certain package? Use this command: + +``` +apt list --all-versions package_name +``` + +In the screenshot below, you can see that I have two versions of VLC available and I use the command to install the older version: + +![install specific versions apt ubuntu][1] + +Sounds like a simple task, right? But things are not as simple as they look. There are several ifs and buts involved here. + +This tutorial will cover all the important aspects of installing a specific program version using apt or apt-get commands. + +### Things to know about installing a specific version of a program + +You need to know a few things about how APT and repositories work in Ubuntu and Debian-based distributions. + +#### No older versions from the same source + +Ubuntu doesn’t keep older versions of packages in the repository. You may see more than one version in specific cases, temporarily. For example, you run the apt update (but not upgrade), and a new version is available. You may see two versions for the same package in the apt cache. But as soon as the package is upgraded to the new version, the older version is removed from the cache as well as the repositories. + +#### Use multiple sources for different versions + +To get multiple versions of the same package, you’ll have to add multiple sources. For example, VLC is in version 3.x. Adding the [VLC daily build PPA][2] will give the (unstable) version 4.x. + +Similarly, **you can download a DEB file with a different version and install it**. + +#### The higher version always gets the priority + +If you have the same package available from more than one source, by default, Ubuntu will install the highest available version. + +In the previous example, if I install VLC, it will install version 4.x, not 3.x. + +#### The older version gets upgraded to the available newer version + +That’s another potential problem. Even if you install the older version of a package, it gets upgraded to the newer version (if available). You have to [hold the package and stop it from upgrading][3]. + +#### Dependencies also need to be installed + +If the package has dependencies, you’ll have to install the required version of the dependent packages as well. + +Now that you know a few potential issues let’s see how to tackle them. + +### Installing specific version of a package + +I am taking the example of VLC in this tutorial. VLC version 3.0.16 is available in Ubuntu’s repositories. I added the daily build PPA and that gives me the release candidate of VLC version 4.0. + +As you can see, I have two VLC versions available in the system right now: + +![install specific versions apt ubuntu][4] + +``` +[email protected]:~$ apt list -a vlc +Listing... Done +vlc/jammy 4.0.0~rc1~~git20220516+r92284+296~ubuntu22.04.1 amd64 +vlc/jammy 3.0.16-1build7 amd64 +vlc/jammy 3.0.16-1build7 i386 +``` + +Since the higher version takes priority, using ‘apt install vlc’ will result in the installation of VLC 4.0. But I want to install the older version 3.0.16 for the sake of this tutorial. + +``` +sudo apt install vlc=3.0.16-1build7 +``` + +But here’s the thing. The vlc package has several dependencies and those dependencies also need specific versions. However, Ubuntu tries to install the available higher versions for them, and thus, you get the classic ‘[you have held broken packages][5]‘ error. + +![problem installing specific version apt ubuntu][6] + +To fix this, you have to provide specific versions of all the dependent packages it complains about. So that command becomes something like this: + +``` +sudo apt install vlc=3.0.16-1build7 \ + vlc-bin=3.0.16-1build7 \ + vlc-plugin-base=3.0.16-1build7 \ + vlc-plugin-qt=3.0.16-1build7 \ + vlc-plugin-video-output=3.0.16-1build7 \ + vlc-l10n=3.0.16-1build7 \ + vlc-plugin-access-extra=3.0.16-1build7 \ + vlc-plugin-notify=3.0.16-1build7 \ + vlc-plugin-samba=3.0.16-1build7 \ + vlc-plugin-skins2=3.0.16-1build7 \ + vlc-plugin-video-splitter=3.0.16-1build7 \ + vlc-plugin-visualization=3.0.16-1build7 +``` + +In case you are wondering, the trailing \ at the end of each line is just a way to write a single command over multiple lines. + +**Does it work? In many cases, it will.** But I have chosen a complicated example of VLC, which has lots of dependencies. Even the mentioned dependencies have dependencies on other packages. It gets messy. + +An alternative is to specify the source while installing. + +#### Alternatively, specify the repository source + +You have added multiple sources, so you should have some idea about the sources the package comes from. + +Use the command below and search for the repository: + +``` +apt-cache policy | less +``` + +Focus on the lines that come after the repository name: + +``` +500 http://security.ubuntu.com/ubuntu jammy-security/multiverse i386 Packages + release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=multiverse,b=i386 + origin security.ubuntu.com +``` + +You can specify the o,l,a, etc parameters. + +In my original example, I want to install VLC from Ubuntu’s repository (to get 3.16) instead of the PPA (which gives me 4). + +So the command below will install VLC 3.16 along with all the dependencies: + +``` +sudo apt install -t "o=ubuntu" vlc +``` + +![install from repository source][7] + +Looks good? But the problem comes when you have to update the system. Then it complains about not finding the specified version. + +**What else can be done?** + +To install an older version, remove the source of the newer version from your system (if possible). It helps get rid of the dependencies hell issues. + +If that’s not possible, check if you can get it in some other packaging formats like Snap, Flatpak, AppImage, etc. In fact, Snap and Flatpak also allow you to choose and install from available versions. Since the applications are sandboxed, it’s easier to manage the dependencies for different versions. + +#### Hold the package and prevent upgrade + +If you manage to install a specific program version, you may want to avoid accidentally upgrading to the newer version. It’s not too complicated to achieve this. + +``` +sudo apt-mark hold package_name +``` + +You can remove the hold so that it can be upgraded later: + +``` +sudo apt-mark unhold package_name +``` + +Note that dependencies of a package are not automatically held. They need to be individually mentioned. + +### Conclusion + +As you can see, there is a provision to install the selected version of a program. Things only get complicated if the package has dependencies. Then you get into the dependency hell. + +I hope you learned a few new things in this tutorial. If you have questions or suggestions to improve it, please let me know in the comment section. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/apt-install-specific-version-2/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][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/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/05/install-specific-versions-apt-ubuntu.png +[2]: https://launchpad.net/~videolan/+archive/ubuntu/master-daily +[3]: https://itsfoss.com/prevent-package-update-ubuntu/ +[4]: https://itsfoss.com/wp-content/uploads/2022/05/install-specific-versions-apt-ubuntu.png +[5]: https://itsfoss.com/held-broken-packages-error/ +[6]: https://itsfoss.com/wp-content/uploads/2022/05/problem-installing-specific-version-apt-ubuntu-800x365.png +[7]: https://itsfoss.com/wp-content/uploads/2022/05/install-from-repository-source-800x578.png diff --git a/sources/tech/20220519 For the Love of Ubuntu- Here are the Mascots of All Ubuntu Releases.md b/sources/tech/20220519 For the Love of Ubuntu- Here are the Mascots of All Ubuntu Releases.md new file mode 100644 index 0000000000..096deb298b --- /dev/null +++ b/sources/tech/20220519 For the Love of Ubuntu- Here are the Mascots of All Ubuntu Releases.md @@ -0,0 +1,461 @@ +[#]: subject: "For the Love of Ubuntu: Here are the Mascots of All Ubuntu Releases" +[#]: via: "https://itsfoss.com/all-Ubuntu-mascots/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +For the Love of Ubuntu: Here are the Mascots of All Ubuntu Releases +====== +This is a collection of the mascots of all the Ubuntu releases so far. + +You may have noticed that every Ubuntu release has a version name and codename. The codename is composed of two words that start with the same letter. The first word is an adjective, and the other one is (usually) an (endangered) species. + +These releases also have a mascot for those codenames. Ubuntu 22.04 is codenamed Jammy Jellyfish and hence the Jellyfish mascot on its wallpaper. + +These ‘mascots’ were not always part of Ubuntu releases. The codenames were always there, but not the mascots. + +The first-ever Ubuntu release was version 4.10 in October 2004. But it wasn’t until the Ubuntu 8.04 LTS ‘Hardy Heron’ release that you saw the associated mascot. + +Earlier, I complied the [list of the default wallpapers of all Ubuntu releases][1]. In this one, you get to look at the mascots of those releases. + +Let’s hop on to Ubuntu’s mascot journey in reverse chronological order. + +### Ubuntu 22.04 Jammy Jellyfish + +![Ubuntu 22.04 mascot][2] + +Released on 21 April 2021. + +Jammy means covered with, filled with, or resembling jam. Informally, it also means lucky. + +Jellyfish are mainly free-swimming marine animals with umbrella-shaped bells and trailing tentacles, although a few are anchored to the seabed by stalks rather than being mobile. + +### Ubuntu 21.10 Impish Indri + +![Ubuntu 21.10 mascot][3] + +Released on 14 October 2021. + +Impish means showing no respect for somebody/something in a way that is amusing rather than serious. + +The Indri, also called the babakoto, is one of the largest living lemurs, with a head-and-body length of about 64–72 cm and a weight of between 6 and 9.5 kg. It has a black and white coat and maintains an upright posture when climbing or clinging + +### Ubuntu 21.04 Hirsute Hippo + +![Ubuntu 21.04 mascot][4] + +Released on 22 April 2021. + +Hirsute means hairy. + +The hippopotamus, also called the hippo, common hippopotamus, or river hippopotamus, is a large semiaquatic mammal native to sub-Saharan Africa. It is one of only two extant species in the family Hippopotamidae, the other being the pygmy hippopotamus. Its name comes from the ancient Greek for “river horse”. + +Not sure if I have seen many hairy hippo. + +### Ubuntu 20.10 Groovy Gorilla + +![Ubuntu 20.10 mascot][5] + +Released on 22 October 2020. + +Groovy means fashionable and exciting. + +Gorillas are herbivorous, predominantly ground-dwelling great apes that inhabit the tropical forests of equatorial Africa. The genus Gorilla is divided into two species: the eastern gorilla and the western gorilla, and either four or five subspecies. + +### Ubuntu 20.04 LTS Focal Fossa + +![Ubuntu 20.04 mascot 1][6] + +Released on 23 April 2020. + +Focal means something providing a focus, important in other meaning. + +The fossa (Cryptoprocta ferox) is **the largest carnivorous mammal on the island of Madagascar**. They can reach nearly six feet in length, with half of that due to their long tails. They look like a cross between a cat, a dog, and a mongoose. Fossas have slender bodies, muscular limbs, and short, reddish-brown coats. + +### Ubuntu 19.10 Eoan Ermine + +![Ubuntu 19.10 mascot][7] + +Released on 17 October 2019. + +Eoan means relating to dawn or east. + +The stoat or short-tailed weasel, also known as the Eurasian ermine, Beringian ermine, or simply ermine, is a mustelid native to Eurasia and the northern portions of North America. Because of its wide circumpolar distribution, it is listed as Least Concern on the IUCN Red List. + +### Ubuntu 19.04 Disco Dingo + +![Ubuntu 19.04 mascot][8] + +Released on 18 April 2019. + +Disco relates to the disco music and nightclubs. + +The dingo is an ancient lineage of dog found in Australia. Its taxonomic classification is debated as indicated by the variety of scientific names presently applied in different publications. + +### Ubuntu 18.10 Cosmic Cuttlefish + +![Ubuntu 18.10 mascot][9] + +Released on 18 October 2018. + +Cosmic means something distinct from the earth, + +Cuttlefish or cuttles are marine molluscs of the order Sepiida. They belong to the class Cephalopoda, which also includes squid, octopuses, and nautiluses. Cuttlefish have a unique internal shell, the cuttlebone, which is used for control of buoyancy. + +### Ubuntu 18.04 LTS Bionic Beaver + +![Ubuntu 18.04 mascot][10] + +Released on 26 April 2018. + +Bionic means having or denoting an artificial, typically electromechanical, body part or parts. + +Beavers are large, semiaquatic rodents in the genus Castor native to the temperate Northern Hemisphere. There are two extant species: the North American beaver and the Eurasian beaver. Beavers are the second-largest living rodents after the capybaras. + +The British users found this release name particularly amusing. + +### Ubuntu 17.10 Artful Aardvark + +![Ubuntu 17.10 mascot][11] + +Released on 19 October 2017. + +Ubuntu switched back to GNOME by default with this release. + +Artful means cleaver or carfty. + +The aardvark is a medium-sized, burrowing, nocturnal mammal native to Africa. It is the only living species of the order Tubulidentata, although other prehistoric species and genera of Tubulidentata are known. Unlike most other insectivores, it has a long pig-like snout, which is used to sniff out food. + +### Ubuntu 17.04 Zesty Zapus + +![Ubuntu 17.04 mascot][12] + +Released on 13 April 2017. + +Last release to feature the Unity desktop. + +Zesty means having a strong, pleasant, and somewhat spicy flavor. + +Zapus is a genus of North American jumping mouse. It is the only genus whose members have the dental formula. Zapus are the only extant mammals aside from the Aye-aye with a total of 18 teeth. + +### Ubuntu 16.10 Yakkety Yak + +![Ubuntu 16.10 mascot][13] + +Released on 13 October 2016. + +‘Yakkety’ could mean a lot of things. While ‘yakking’ is an informal term for talking a lot, ‘yakkety’ could be an alternative spelling of ‘Yakety’ Sax — a well known pop-jazz musical instrument, says OMGUbuntu!. + +Yak is a large domesticated wild ox with shaggy hair, humped shoulders, and large horns, used in Tibet as a pack animal and for its milk, meat, and hide. + +### Ubuntu 16.04 LTS Xenial Xerus + +![Ubuntu 16.04 mascot][14] + +Released on 21 April 2016. + +Xenial means something related to hospitality. + +The Xerus has four subspecies – **cape ground squirrel, striped ground squirrel, mountain ground squirrel, and unstriped ground squirrel**. These animals are diurnal and are usually known to be herbivores in nature and usually eat nuts, roots, and seeds. However, sometimes they also eat eggs and other small animals. + +### Ubuntu 15.10 Wily Werewolf + +![Ubuntu 15.10 mascot][15] + +Released on 22 October 2015. + +Perhaps one of the rare Ubuntu releases that had a finctional character in its codename, unless you don’t consider warewolves fictional. + +Wily means skilled at gaining an advantage, especially deceitfully. + +The werewolves are mythical creatures that can hide their ears and tail. It is a human but also a wolf, and most people fear them because of how they look. + +### Ubuntu 15.04 Vivid Vervet + +![Ubuntu 15.04 mascot][16] + +Released on 23 April 2015. + +Vivid means intensely deep or bright.. + +The vervet monkey, or simply vervet, is an Old World monkey of the family Cercopithecidae native to Africa. The term “vervet” is also used to refer to all the members of the genus Chlorocebus. The five distinct subspecies can be found mostly throughout Southern Africa, as well as some of the eastern countries. + +### Ubuntu 14.10 Utopic Unicorn + +![Ubuntu 14.10 mascot][17] + +Released on 23 October 2014. + +Another of the Ubuntu release with fictional animal in its release codename unless you consider Unicrons are real. + +Utopic relates to utopia which is a fictional, impractical but ideal place. + +The **unicorn** is a legendary creature that has been described since antiquity as a beast with a single large, pointed, spiraling horn projecting from its forehead. + +### Ubuntu 14.04 LTS Trusty Tahr + +![Ubuntu 14.04 mascot][18] + +Released on 17 April 2014. + +Trusty means reliable or faithful. + +Tahr is a goatlike mammal that inhabits cliffs and mountain slopes in Oman, southern India, and the Himalayas. + +### Ubuntu 13.10 Saucy Salamander + +![Ubuntu 13.10 mascot][19] + +Released on 17 October 2013. + +Saucy means expressing in a bold, lively, or spirited manner. + +Salamanders are a group of amphibians typically characterized by their lizard-like appearance, with slender bodies, blunt snouts, short limbs projecting at right angles to the body, and the presence of a tail in both larvae and adults. All ten extant salamander families are grouped together under the order Urodela. + +### Ubuntu 13.04 Raring Ringtail + +![Ubuntu 13.04 mascot][20] + +Released on 25 April 2013. + +Raring means very enthusiastic and eager to do something. + +The Ringtail is **a cat-sized carnivore resembling a small fox with a long raccoonlike tail**. Its bushy tail is flattened and nearly as long as the head and body, with alternating black and white rings. These animals are almost wholly nocturnal and spend the majority of the day sleeping in their dens. + +### Ubuntu 12.10 Quantal Quetzal + +![Ubuntu 12.10 mascot][21] + +Released on 18 October 2012. + +Quantal means relating to a quantum or quanta, or to quantum theory. + +**Quetzals** are strikingly colored birds in the trogon family. They are found in forests, especially in humid highlands, with the five species from the genus *Pharomachrus* being exclusively Neotropical, while a single species, the eared quetzal, *Euptilotis neoxenus*, is found in Mexico and very locally in the southernmost United States. Quetzals are fairly large (all over 32 cm or 13 inches long), slightly bigger than other trogon species. The resplendent quetzal is the national bird of Guatemala because of its vibrant colour. + +### Ubuntu 12.04 LTS Precise Pangolin + +![Ubuntu 12.04 mascot][22] + +Released on 26 April 2012. + +Precise means marked by exactness and accuracy of expression or detail. + +Pangolins, sometimes known as scaly anteaters, are mammals of the order Pholidota. The one extant family, the Manidae, has three genera: Manis, Phataginus, and Smutsia. Manis comprises the four species found in Asia, while Phataginus and Smutsia include two species each, all found in sub-Saharan Africa. + +### Ubuntu 11.10 Oneiric Ocelot + +![Ubuntu 11.10 mascot][23] + +Released on 13 October 2011. + +Onerice relates to dreams or dreaming. + +The ocelot (Leopardus pardalis) is a medium-sized spotted wild cat that reaches 40–50 cm (15.7–19.7 in) at the shoulders and weighs between 8 and 15.5 kg (17.6 and 34.2 lb). It was first described by Carl Linnaeus in 1758. + +### Ubuntu 11.04 Natty Narwhal + +![Ubuntu 11.04 mascot][24] + +Released on 28 April 2011. + +The first release to feature the Unity desktop. + +Natty means smart and fashionable. + +The narwhal, also known as a narwhale, is a medium-sized toothed whale that possesses a large “tusk” from a protruding canine tooth. It lives year-round in the Arctic waters around Greenland, Canada and Russia. It is one of two living species of whale in the family Monodontidae, along with the beluga whale. + +### Ubuntu 10.10 Maverick Meerkat + +![Ubuntu 10.10 mascot][25] + +Released on 10 October 2010. + +Maverick means an unorthodox or independent-minded person. + +The meerkat or suricate is a small mongoose found in southern Africa. It is characterised by a broad head, large eyes, a pointed snout, long legs, a thin tapering tail, and a brindled coat pattern. + +### Ubuntu 10.04 LTS Lucid Lynx + +![Ubuntu 10.04 mascot][26] + +Released on 29 April 2010. + +Lucid means easy to understand or bright. + +A lynx is any of the four species within the medium-sized wild cat genus Lynx. The name lynx originated in Middle English via Latin from the Greek word λύγξ, derived from the Indo-European root leuk- in reference to the luminescence of its reflective eyes. + +### Ubuntu 9.10 Karmic Koala + +![Ubuntu 9.10 mascot][27] + +Released on 29 October 2009. + +Karmic means relating to or characteristic of karma. + +The koala or, inaccurately, koala bear is an arboreal herbivorous marsupial native to Australia. It is the only extant representative of the family Phascolarctidae and its closest living relatives are the wombats. + +### Ubuntu 9.04 Jaunty Jackalope + +![Ubuntu 9.04 mascot][28] + +Released on 23 April 2009. + +The first Ubuntu version I ever used. + +Jaunty means having or expressing a lively, cheerful, and self-confident manner. + +The jackalope is **a mythical animal of North American folklore, in the category of fearsome critters, described as a jackrabbit with antelope horns**. The word jackalope is a portmanteau of jackrabbit and antelope. Many jackalope taxidermy mounts, including the original, are made with deer antlers. + +### Ubuntu 8.10 Intrepid Ibex + +![Ubuntu 8.10 mascot][29] + +Released on 30 October 2008. + +Intrepid means fearless; adventurous. + +An ibex is any of several species of wild goat, distinguished by the male’s large recurved horns, which are transversely ridged in front. Ibex are found in Eurasia, North Africa and East Africa. + +### Ubuntu 8.04 LTS Hardy Heron + +![Ubuntu 8.04 mascot][30] + +Released on 24 April 2008. + +The first Ubuntu release where the mascot appeared on its default wallpaper. + +Hardy means capable of enduring difficult conditions; robust. + +The herons are long-legged, long-necked, freshwater and coastal birds + +### Ubuntu 7.10 Gutsy Gibbon + +![Ubuntu 7.10 mascot][31] + +Released on 18 October 2007. + +Gusty is characterized by or blowing in gusts. + +Gibbons are apes live in subtropical and tropical rainforest from eastern Bangladesh to Northeast India to southern China and Indonesia + +### Ubuntu 7.04 Feisty Fawn + +![Ubuntu 7.04 mascot][32] + +Released on 19 April 2007. + +Feisty means small but determined. Fawn is a young deer in its first year. + +### Ubuntu 6.10 Edgy Eft  + +![Ubuntu 6.10 mascot][33] + +Released on 26 October 2006. + +Edgy means tense or nervous. + +Eft is the terrestrial juvenile phase of newt. A newt is a type of salamander (a type of lizard). This newt has three distinct developmental life stages: aquatic larva, terrestrial juvenile (eft), and adult. + +So basically eft is a teenaged newt :) + +### Ubuntu 6.06 Dapper Drake + +![Ubuntu 6.06 mascot][34] + +Released on 1 June 2006. + +Dapper means neat and trim in dress and appearance. Drake is a fully sexually mature adult male duck of any duck species. + +### Ubuntu 5.10 Breezy Badger + +![Ubuntu 5.10 mascot][35] + +Released on 12 October 2005. + +Breezy means pleasantly windy. + +Badgers are short-legged omnivores, united by their squat bodies, adapted for fossorial activity. + +### Ubuntu 5.04 Hoary Hedgehog  + +![Ubuntu 5.04 mascot][36] + +Released on 8 April 2005. + +Hoary means greyish white. + +A hedgehogis a spiny mammal found throughout parts of Europe, Asia, and Africa, and in New Zealand by introduction. + +### Ubuntu 4.10 : Warty Warthog + +![Ubuntu 4.10 mascot][37] + +Released on 20 October 2004. + +This is where it all started. + +Wart is a small, hard, benign growth on the skin, caused by a virus. Warty means someone full of warts. + +The common warthog is a wild member of the pig family found in grassland, savanna, and woodland in sub-Saharan Africa. + +### Conclusion + +Does this article add value to an Ubuntu user? Not technically, but it’s good to look back at the history. If you have been an Ubuntu user for years, it could trigger nostalgia. + +Ubuntu 9.04 was the first time I tried Linux on a desktop. It was in late September of 2009 if I recall correctly. Only a few weeks later, my system was upgraded to Ubuntu 9.10. I used to spend time browing in Ubuntu Forum thoses days, exploring this new OS and learning new things. + +So, did this article bring back some good old memories? Which was your first Ubuntu version? Share it in the comments. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/all-Ubuntu-mascots/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][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/lkxed +[1]: https://itsfoss.com/Ubuntu-default-wallpapers-download/ +[2]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-22-04-mascot.jpg +[3]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-21-10-mascot.jpg +[4]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-21-04-mascot.jpg +[5]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-20-10-mascot.jpg +[6]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-20-04-mascot-1.jpg +[7]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-19-10-mascot.jpg +[8]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-19-04-mascot.jpg +[9]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-18-10-mascot.jpg +[10]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-18-04-mascot.jpg +[11]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-17-10-mascot.jpg +[12]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-17-04-mascot.jpg +[13]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-16-10-mascot.jpg +[14]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-16-04-mascot.jpg +[15]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-15-10-mascot.jpg +[16]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-15-04-mascot.jpg +[17]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-14-10-mascot.jpg +[18]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-14-04-mascot.jpg +[19]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-13-10-mascot.jpg +[20]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-13-04-mascot.jpg +[21]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-12-10-mascot.jpg +[22]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-12-04-mascot.jpg +[23]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-11-10-mascot.jpg +[24]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-11-04-mascot.jpg +[25]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-10-10-mascot.jpg +[26]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-10-04-mascot.jpg +[27]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-9-10-mascot.jpg +[28]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-9-04-mascot.jpg +[29]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-8-10-mascot.jpg +[30]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-8-04-mascot.jpg +[31]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-7-10-mascot.jpg +[32]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-7-04-mascot.jpg +[33]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-6-10-mascot.jpg +[34]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-6-06-mascot.jpg +[35]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-5-10-mascot.jpg +[36]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-5-04-mascot.jpg +[37]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-4-10-mascot.jpg diff --git a/sources/tech/20220519 Top 10 Essential Ubuntu Apps For Everyone in 2022.md b/sources/tech/20220519 Top 10 Essential Ubuntu Apps For Everyone in 2022.md new file mode 100644 index 0000000000..aa53c063ec --- /dev/null +++ b/sources/tech/20220519 Top 10 Essential Ubuntu Apps For Everyone in 2022.md @@ -0,0 +1,196 @@ +[#]: subject: "Top 10 Essential Ubuntu Apps For Everyone in 2022" +[#]: via: "https://www.debugpoint.com/2022/05/essential-ubuntu-apps-2022-part-1/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Top 10 Essential Ubuntu Apps For Everyone in 2022 +====== +This article lists the top 10 essential Ubuntu apps for various use cases in 2022. + +If you are a casual user, student, teacher, scientist, developer or creator – you need additional applications for your workflow. The Linux ecosystem has thousands of applications scattered around for almost all possible needs. Most of the mainstream Linux distribution, including Ubuntu, features only basic applications as default. + +In this part 1 article (of a 5 part series), we list some of the professional-grade applications for everyone. + +### Essential Ubuntu Apps in 2022 – Part 1 + +#### 1. GNOME Tweak Tool + +The [GNOME Tweak Tool][1] is a must-have utility for your Ubuntu desktop if you are using the Ubuntu GNOME edition. To customise your desktop using this utility, you can change the font, scaling, themes, cursor, and many additional options. The default settings window doesn’t expose all the options today. + +In addition, you can also change the window decorations, title bar, title bar buttons and startup applications using this application. + +You can install it using the Software app by searching “Tweaks” or via the commands from the terminal as mentioned below. + +``` +sudo apt install gnome-tweaks +``` + +![GNOME Tweaks Tool][2] + +#### 2. Steam + +Gaming in Linux is not that difficult anymore, thanks to Valve and associated contributions from the community. [Steam][3] is a front end of video games service developed by Valve, which gives you access to the latest games on the Ubuntu platform with top features. Moreover, the Steam client also offers anti-cheat measures, auto-update and support for social conversation with streaming features. + +If you are a gamer and use Linux, Steam is a go-to client which you can install with the below commands. Also, you can search in Software as “Steam Installer” and install using [Flatpak][4] or [Snap][5]. + +``` +sudo apt install steam +``` + +![Steam Client][6] + +#### 3. Peek + +[Peek][7] is, in my opinion, an underrated application. It is an animated GIF recorder which is very useful for various workflow. This is such a powerful utility that it right fits in at Ubuntu or any Linux distro. Moreover, Peek brings options like recording area selection, countdown, gif, mp4 and WebM support. It uses ffmpeg for its backend. + +Install this excellent utility using Software by searching “peek” or by terminal commands mentioned below. + +``` +sudo apt install peek +``` + +![Peek][8] + +#### 4. Synaptic + +[Synaptic][9] is an excellent package manager that helps you add and remove packages traditionally. Those who are little experienced in Linux know about its features and flexibility. You can search for packages in various repositories, verify dependencies and proceed with the installation. + +A perfect application if you frequently install and uninstall packages. You can install synaptic using the commands mentioned below or search in Software with “synaptic”. + +``` +sudo apt install synaptic +``` + +![Synaptic Package Manager][10] + +#### 5. GDebi + +As we mentioned Synaptic above, you should also try out the [GDebi][11] package installer, which brings several features. The GDebi package installer is a command-line utility used to install external deb files. In addition, GDebi is much faster and more efficient installing .deb packages and resolves the dependencies on the fly and downloads them for you. + +One of the best terminal based Ubuntu applications for installing .deb packages, and you can install it using the below command. After installation, you can run `gdebi ` for installation of any packages. + +``` +sudo apt install gdebi +``` + +#### 6. Geary + +You always need a native [email client][12] for your Ubuntu desktop for any workflow. Emails are still relevant and valuable to many. While Ubuntu brings the great Thunderbird email client by default, you can always use another email client application which gives you a better experience. + +[Geary][13] has a friendly and straightforward user interface which gives you an easy way to set up multiple email accounts. In addition, Geary also brings conversation features, faster search, rich text email composing and other features which make it a “go-to” email client for Linux desktops. + +You can install Geary using the command below or search it in Software with the keyword “Geary”. It is also available as [Flatpak][14]. + +``` +sudo apt install geary +``` + +![Geary][15] + +#### 7. Google Chrome + +While many of you are concerned about privacy and tracking, Google Chrome is still the market leader in the browser space. Ubuntu features Firefox web browser by default, and with the recent snap events with Firefox, you may want to switch to another browser. + +You may think of using Google Chrome if you are tightly connected with the Google ecosystem and want a better web experience in streaming and browsing. However, if you are concerned about privacy and tracking, you may choose some other browsers such as Brave or Vivaldi. + +You can install Google Chrome after downloading the .deb file from the below link for Ubuntu Linux. After installation, you can open it via Software to install. + +[Download Google Chrome][16] + +#### 8. Kdenlive + +One of the best free and open-source video editors in Linux is [Kdenlive][17]. The KDenlive is simple to use with its well-designed user interface and comes with various features. Firstly, with Kdenlive, you can easily import video clips, change canvas resolution, and export to a wide range of formats after editing. Secondly, the timeline and tools allow you to cut and add titles, transitions and effects with just a click of a button. Moreover, it’s super easy to learn if you are new to video editing. + +Kdenlive is a very active project, and it’s getting more advanced features with every major release. This is one of the essential Ubuntu apps in 2022, which we feature in this list if you compare it with other [free video editors][18]. + +Installing Kdenlive is easy using the below command. In addition to that, you can also use [Flatpak][19] or [Snap][20] version to install. + +``` +sudo apt install kdenlive +``` + +![Kdenlive Video Editor][21] + +#### 9. Spectacle + +You may have tried many screenshot applications. But in my opinion, [Spectacle][22] is perhaps the best and underrated. The Spectacle is a KDE application that is super fast and perfectly fits any workflow that requires taking screenshots and using them. Firstly, you can capture the entire desktop, a portion of it or a window with a customised time. Secondly, the window captures can also pick the window decoration and cursor if needed. Third, Spectacle also gives you a built-in annotation feature to withdraw, write, and label your images. + +Furthermore, you can also open the image in GIMP or any image editor right from its main window and export them. In addition, autosave, copying the capture to the clipboard, and sharing to social media are some of the unique features of Spectacle. + +In my opinion, a complete screenshot tool with a built-in screen recorder. + +You can install Spectacle using the below command or from the [Snap store][23]. + +``` +sudo apt install kde-spectacle +``` + +![Spectacle Screenshot tool][24] + +#### 10. VLC Media Player + +Ubuntu Linux with GNOME desktop brings the GNOME Videos application by default for playing video files. But GNOME Videos cannot play several video formats due to a lack of decoding features. That is why, you should always consider [VLC Media Player][25] – which is a “go-to” media player on Linux desktops. + +VLC can play any format, literally. It even helps you to play corrupted video files having incomplete data. It is one of the powerful media players you can install using the command below. + +In addition, If you prefer another mode of installation, you can get it via [Flatpak][26] or [Snap][27]. + +``` +sudo apt install vlc +``` + +![VLC Media Player][28] + +### Closing Notes + +This concludes part 1 of a 5-part series of essential Ubuntu Apps in 2022. With the information above, I hope you get to choose some of the apps for your daily usage. And let me know which apps you prefer from this list in the comment box below. + +Finally, stay tuned for part 2 of this Ubuntu apps series. + +Cheers. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/essential-ubuntu-apps-2022-part-1/ + +作者:[Arindam][a] +选题:[lkxed][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/lkxed +[1]: https://gitlab.gnome.org/GNOME/gnome-tweaks +[2]: https://www.debugpoint.com/wp-content/uploads/2022/05/GNOME-Tweaks-Tool.jpg +[3]: https://store.steampowered.com/ +[4]: https://flathub.org/apps/details/com.valvesoftware.Steam +[5]: https://snapcraft.io/steam +[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/Steam-Client.jpg +[7]: https://github.com/phw/peek +[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/Peek-in-action2.jpg +[9]: https://www.nongnu.org/synaptic/ +[10]: https://www.debugpoint.com/wp-content/uploads/2022/05/Synaptic-Package-Manager.jpg +[11]: https://launchpad.net/gdebi +[12]: https://www.debugpoint.com/2019/06/best-email-client-linux-windows/ +[13]: https://wiki.gnome.org/Apps/Geary +[14]: https://flathub.org/apps/details/org.gnome.Geary +[15]: https://www.debugpoint.com/wp-content/uploads/2019/06/Geary.png +[16]: https://www.google.com/chrome +[17]: https://kdenlive.org/ +[18]: https://www.debugpoint.com/2019/09/best-free-video-editors-linux-ubuntu/ +[19]: https://flathub.org/apps/details/org.kde.kdenlive +[20]: https://snapcraft.io/kdenlive +[21]: https://www.debugpoint.com/wp-content/uploads/2021/01/Kdenlive-Video-Editor.jpg +[22]: https://apps.kde.org/spectacle/ +[23]: https://snapcraft.io/spectacle +[24]: https://www.debugpoint.com/wp-content/uploads/2022/05/Spectacle-Screenshot-tool.jpg +[25]: https://www.videolan.org/vlc +[26]: https://flathub.org/apps/details/org.videolan.VLC +[27]: https://snapcraft.io/vlc +[28]: https://www.debugpoint.com/wp-content/uploads/2022/05/VLC-Media-Player.jpg diff --git a/sources/tech/20220520 Add, Delete And Grant Sudo Privileges To Users In Fedora 36.md b/sources/tech/20220520 Add, Delete And Grant Sudo Privileges To Users In Fedora 36.md new file mode 100644 index 0000000000..25c2a9af5b --- /dev/null +++ b/sources/tech/20220520 Add, Delete And Grant Sudo Privileges To Users In Fedora 36.md @@ -0,0 +1,218 @@ +[#]: subject: "Add, Delete And Grant Sudo Privileges To Users In Fedora 36" +[#]: via: "https://ostechnix.com/add-delete-and-grant-sudo-privileges-to-users-in-fedora/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Add, Delete And Grant Sudo Privileges To Users In Fedora 36 +====== +Create sudo user in Fedora + +Using `sudo` program, we can elevate the ability of a normal user to run administrative tasks, without giving away the `root` user's password in Linux operating systems. This guide explains how to add, delete and grant sudo privileges to users in Fedora 36 desktop and server editions. + +I've divided this guide in three sections. The first section teaches you how to create a new user. In the second section, you'll learn how to give sudo access to the existing user. And in the last section, you will know how to remove sudo access from a user. I've also provided example commands in each section, so you can understand it better. + +First, we will start with giving sudo access to a new user. + +### 1. Create A New User In Fedora + +Login to your Fedora system as `root` user or `sudo` user. + +We can use either `useradd` or `adduser` commands to create users in Linux. + +For the purpose of this guide, I am going to create a new user called **"senthil"** using `adduser` command. + +To do so, I run the following command with `sudo` or `root` privilege: + +``` +$ sudo adduser senthil +``` + +Next, I am going to set a password to the newly created user "senthil" with `passwd` command: + +``` +$ sudo passwd senthil +``` + +![Create A New User In Fedora][1] + +We just created a normal user called "senthil". This user has not been given sudo access yet. So he can't perform any administrative tasks. + +You can verify if an user has sudo access or not like below. + +``` +$ sudo -l -U senthil +``` + +**Sample output:** + +``` +User senthil is not allowed to run sudo on fedora. +``` + +![Check If An User Has Sudo Access][2] + +As you can see, the user "senthil" is not yet allowed to run sudo. Let us go ahead and give him sudo access in the following steps. + +### 2. Grant Sudo Privileges To Users In Fedora + +To add a normal user to **sudoers** group, simply add him/her to the `wheel` group. + +For those wondering, the `wheel` is a special group in some Unix-like operating systems (E.g. RHEL based systems). All the members of `wheel` group are allowed to perform administrative tasks. Wheel group is similar to `sudo` group in Debian-based systems. + +We can add users to sudoers list in two ways. The first method is by using `chmod` command. + +#### 2.1. Add Users To Sudoers Using Usermod Command + +``` +Usermod +``` + +To grant sudo privileges to a user called "senthil", just add him to the `wheel` group using `usermod` command as shown below: + +``` +$ sudo usermod -aG wheel senthil +``` + +Here, `-aG` refers append to a supplementary group. In our case, it is `wheel` group. + +Verify if the user is in the sudoers list with command: + +``` +$ sudo -l -U senthil +``` + +If you output something like below, it means the user has been given sudo access and he can able to perform all administrative tasks. + +``` +Matching Defaults entries for senthil on fedora: + !visiblepw, always_set_home, match_group_by_gid, always_query_group_plugin, + env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE KDEDIR LS_COLORS", + env_keep+="MAIL QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE", + env_keep+="LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES", + env_keep+="LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE", + env_keep+="LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY", + secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/var/lib/snapd/snap/bin + +User senthil may run the following commands on fedora: + (ALL) ALL +``` + +![Add A User To Sudoers Group Using Usermod Command][3] + +As you see in the above output, the user "Senthil" can run ALL commands on any host. + +#### 2.2. Add Users To Sudoers By Editing Sudoers Configuration File + +The another way to add users to sudoers list is by directly adding him/her to the sudoers configuration file. + +Edit sudoers configuration file using command: + +``` +$ sudo visudo +``` + +This will open `/etc/sudoers` file in your **Vi** editor or whatever you have in your `$PATH`. Scroll down until you find following entry: + +``` +root ALL=(ALL) ALL +``` + +Right after the above entry, add the following line: + +``` +senthil ALL=(ALL) ALL +``` + +![Add Users To Sudoers Group By Editing Sudoers Configuration File][4] + +Here, the line `ALL=(ALL) ALL` refers the user "senthil" can perform any commands on any host. Replace "senthil" with your own username. Save the file and close it. + +That's it. The user has been granted sudo access. + +#### 2.3. Verify Sudo Users + +Log out from the current session and log back in as the newly created sudo user. Alternatively, you can directly switch to the other user, without having to log out from the current session, using the following command: + +``` +$ sudo -i -u senthil +``` + +![Switch To New User In Fedora Linux][5] + +Now, verify if the user can able to perform any administrative task with `sudo` permission: + +``` +$ sudo dnf --refresh update +``` + +![Run Dnf Update Command With Sudo][6] + +Great! The user can able to run the `dnf update` command with sudo privilege. From now on, the user can perform all commands prefixed with sudo. + +### 3. Delete Sudo Access From A User + +Make sure you logged out of the user's session and log back in as `root` or some other sudo user. Because you can't delete the sudo access of the currently logged in user. + +We can remove sudo privileges from an user without having to entirely delete the user account. + +To do so, use `gpasswd` command to revoke sudo permissions from a user: + +``` +$ sudo gpasswd -d senthil wheel +``` + +**Sample output:** + +``` +Removing user senthil from group wheel +``` + +This will only remove sudo privilege of the given user. The user still exists in the system + +Verify if the sudo access has been removed using command: + +``` +$ sudo -l -U senthil +User senthil is not allowed to run sudo on fedora35. +``` + +![Delete Sudo Access From A User Using Gpasswd Command][7] + +#### 3.1. Permanently Delete User + +If you don't need the user any more, you can permanently remove the user from the system using `userdel` command like below. + +``` +$ sudo userdel -r senthil +``` + +The above command will delete the user "senthil" along with his  `home` directory and mail spool. + +### Conclusion + +This concludes how to add, delete and grant sudo privileges to users in Fedora 36 operating system. This method is same for other RPM-based systems as well. + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/add-delete-and-grant-sudo-privileges-to-users-in-fedora/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/wp-content/uploads/2022/05/Create-A-New-User-In-Fedora.png +[2]: https://ostechnix.com/wp-content/uploads/2022/05/Check-If-An-User-Has-Sudo-Access.png +[3]: https://ostechnix.com/wp-content/uploads/2022/05/Add-A-User-To-Sudoers-Group-Using-Usermod-Command.png +[4]: https://ostechnix.com/wp-content/uploads/2022/05/Add-Users-To-Sudoers-Group-By-Editing-Sudoers-Configuration-File.png +[5]: https://ostechnix.com/wp-content/uploads/2022/05/Switch-To-New-User-In-Fedora-Linux.png +[6]: https://ostechnix.com/wp-content/uploads/2022/05/Run-Dnf-Update-Command-With-Sudo.png +[7]: https://ostechnix.com/wp-content/uploads/2022/05/Delete-Sudo-Access-From-A-User-Using-Gpasswd-Command.png diff --git a/sources/tech/20220520 Ubuntu vs Manjaro- Comparing the Different Linux Experiences.md b/sources/tech/20220520 Ubuntu vs Manjaro- Comparing the Different Linux Experiences.md new file mode 100644 index 0000000000..caee2de033 --- /dev/null +++ b/sources/tech/20220520 Ubuntu vs Manjaro- Comparing the Different Linux Experiences.md @@ -0,0 +1,206 @@ +[#]: subject: "Ubuntu vs Manjaro: Comparing the Different Linux Experiences" +[#]: via: "https://itsfoss.com/ubuntu-vs-manjaro/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Ubuntu vs Manjaro: Comparing the Different Linux Experiences +====== +Ubuntu is the most popular Debian-based Linux distribution for desktops and servers. + +And Manjaro Linux is an Arch-based distro tailored for desktops. + +Both are entirely different when it comes to user experience and features. + +However, one of the common grounds is the [desktop environment][1] when considering Manjaro’s GNOME edition with Ubuntu. + +But, what exactly are the differences? Is the package manager on Manjaro better? Are software tools available on both Ubuntu and Manjaro? + +Here, we shall look at the differences in both the Linux distributions at certain key points. + +### Release Cycle + +Ubuntu offers two different release cycles, considering the version you pick. If you are going with the Long-Term Support version, you get security/maintenance updates for at least five years from its release. + +Suppose if you install Ubuntu 22.04 LTS, you will be getting updates until **April 2027**. + +![ubuntu22 04 lts about][2] + +The LTS version is what we recommend for most desktop users. + +However, if you want the latest and greatest, you can opt for the non-LTS releases that need an upgrade every **nine months**. Examples include Ubuntu 21.04, Ubuntu 21.10, and Ubuntu 22.10. + +Note that the non-LTS releases involve changes that may affect your workflow and user experience. So, it isn’t recommended for everyone. + +When choosing Manjaro Linux, you get a rolling release schedule for updates. So, you do not have to worry about the support for the version you use. It will automatically upgrade to the latest available version through regular updates. + +![manjaro about][3] + +With a rolling release cycle, you get the latest packages quickly. So, if you want to keep using an older version of the software, Manjaro Linux may not be the right choice for you. + +### Desktop Environments + +Ubuntu features a customized version of the GNOME desktop. It may not be the latest, but it is likely to include the latest GNOME desktop environment if you use a newer Ubuntu version. + +![ubuntu 22 04 wallpaper][4] + +There are no other desktop environments by Canonical (the company behind Ubuntu). + +However, if you want other desktop environments on top of Ubuntu, you can choose the official [Ubuntu flavours][5] including KDE, Budgie, LXQt, MATE, and XFCE as desktop environments. They are well-tested and stable Ubuntu Linux distributions when compared to unofficial or newer spins of Ubuntu with another desktop environment. + +However, Ubuntu flavours do not get five years of software support; instead, you will be limited to three years of support for LTS versions. + +With Manjaro, you can choose three official editions: XFCE, KDE, and GNOME. No matter the desktop environment, you stick to the rolling release model. + +![manjaro gnome 42][6] + +You do have some community editions with Budgie, MATE, LXQt, and more as well. + +### Package Manager or Software Ecosystem + +You shouldn’t have trouble finding most of the [essential Linux apps][7] on both the distros. + +However, Manjaro Linux gets an edge with a snappier experience using Pamac as its package manager. + +![manjaro package manager][8] + +Compared to the software center on Ubuntu, Manjaro Linux offers a better experience for quickly installing/updating the software. And, it also supports Flatpak/Snap out-of-the-box if you want to enable them with a single click. + +Ubuntu emphasizes Snap packages, and you will find some applications pre-installed as Snap (like Firefox web browser). + +![firefox as snap][9] + +In the case of Manjaro Linux, you get the freedom to enable Flatpak/Snap if required. + +With Ubuntu, the Software Center is not the best Linux offers. It could prove to be slower, as per your system configuration and over the year as you use it. + +![ubuntu 22 04 software center][10] + +In addition to that, Manjaro Linux has access to [AUR][11], which opens up access to almost every software that you may not find in Ubuntu’s software center. + +So, in terms of the software ecosystem and the package manager, Manjaro Linux does provide many advantages over Ubuntu. + +### Ease of Use and Targeted Users + +Ubuntu desktop is primarily tailored for ease of use. It focuses on providing the best possible combination of software and hardware compatibility to let any computer user work with Ubuntu Linux without needing to know most of the things in the Linux world. + +Even if someone doesn’t know what a “package manager” on Linux is, they can understand it perfectly fine as a unique replacement to Windows/macOS when they use it. + +Of course, we also have a guide to help you with [things to do after installing the latest Ubuntu version][12]. + +Manjaro Linux is also tailored for desktop usage. But, it isn’t primarily tailored for first-time Linux users. + +It aims to make the experience with Arch Linux easy. So, it mainly targets Linux users who want to use Arch Linux, but with some added convenience. + +### Stability + +![stability tux][13] + +Ubuntu LTS releases primarily focus on stability and reliability, so you can also use them on servers. + +Comparatively, Manjaro Linux may not be as stable out-of-the-box. You will have to choose the packages carefully to install in Manjaro Linux and keep an eye on your configurations to ensure that an update does not break your system experience. + +As for Ubuntu, you do not need to stress about the software updates, especially when considering the LTS version. The updates should not generally break your system. + +### Customization + +Ubuntu features a customized GNOME experience as set by Canonical for end-users. While you can choose to customize various aspects of your Linux distribution, Ubuntu offers little out of the box. + +Ubuntu has improved over the years, recently adding the ability to [add accent colors in Ubuntu 22.04 LTS][14]. But, it still has a long way to go. + +You will have to take the help of apps like [GNOME Tweak][15] to customize the desktop experience. + +When considering Manjaro’s GNOME edition, you will have to use the same tool to customize things yourself. + +Manjaro also performs a few customization tweaks to the look. But, it gives more control to change the layout and few other options. + +![manjaro layout][16] + +In terms of customization, you should be able to do the same thing on both Manjaro and Ubuntu. + +If you want more customization options, Manjaro Linux can be a good pick. And, if you want a customized experience without a lot of control over it, Ubuntu should be good enough. + +### Bloatware + +This may not be a big deal for everyone. But, if you dislike having many pre-installed applications, Ubuntu can be an annoyance. + +![ubuntu 22 apps][17] + +You can always remove the applications you do not want. However, you will find more applications and services installed with Ubuntu out of the box. + +With Manjaro, you also get to see the minimal essentials installed. But, they stick to the most essential utilities, minimizing the number of packages pre-installed. So, Manjaro gets an edge with less bloatware. + +However, there are chances that you may not find your favorite Linux app installed on Manjaro by default. So, if you like access to some of your favorite apps right after installation, Ubuntu can be a good choice. + +### Performance + +![ubuntu 22 04 neofetch lolcat][18] + +While Ubuntu has improved its performance and even works on a Raspberry Pi 2 GB variant, it is still not the best-performing Linux distribution. + +Of course, the performance does depend on the desktop environment you choose to use. + +However, compared to Manjaro’s GNOME edition, Manjaro provides a snappier experience. + +Note that your user experience with the performance and animation preferences also depends on your system configuration. For instance, the recommended system requirements (1 GB RAM + 1 GHz processor) for Manjaro give you room to use older computers. + +But, with Ubuntu, at the time of writing, you need at least 4 GB RAM and a 2 GHz dual-core processor to get an ideal desktop experience. + +### Documentation + +Ubuntu is easier to use and potentially more comfortable for new users, considering its popularity. + +[Ubuntu’s documentation][19] is good enough, if not excellent. + +When it comes to Manjaro Linux, they have a [wiki][20] with essential information and in-depth guides to help you out. + +In general, the [documentation available for Arch Linux][21] is meticulous, and almost everyone (even the veterans) refers to it to get help. + +The documentation for Arch Linux also applies to Manjaro Linux in a big way, so you do get an advantage in terms of documentation with Manjaro Linux over Ubuntu. + +### Wrapping Up + +Being two entirely different Linux distributions, they serve various kinds of users. You can choose to use anything if you want to explore the operating system and see if it suits you. + +However, if you want to avoid making any changes to your system and want to focus on your work, irrespective of the Linux distro, Ubuntu should be a no-brainer. + +In any case, if the performance with Ubuntu affects your experience by a considerable margin, you should try Manjaro. You can read my [initial thoughts on switching to Manjaro from Ubuntu][22]. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/ubuntu-vs-manjaro/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://itsfoss.com/what-is-desktop-environment/ +[2]: https://itsfoss.com/wp-content/uploads/2022/05/ubuntu22-04-lts-about.png +[3]: https://itsfoss.com/wp-content/uploads/2022/05/manjaro-about.png +[4]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-22-04-wallpaper.jpg +[5]: https://itsfoss.com/which-ubuntu-install/ +[6]: https://itsfoss.com/wp-content/uploads/2022/05/manjaro-gnome-42.png +[7]: https://itsfoss.com/essential-linux-applications/ +[8]: https://itsfoss.com/wp-content/uploads/2022/05/manjaro-package-manager.png +[9]: https://itsfoss.com/wp-content/uploads/2022/04/firefox-as-snap.jpg +[10]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-22-04-software-center.jpg +[11]: https://itsfoss.com/aur-arch-linux/ +[12]: https://itsfoss.com/things-to-do-after-installing-ubuntu-22-04/ +[13]: https://itsfoss.com/wp-content/uploads/2022/05/stability-tux.png +[14]: https://itsfoss.com/accent-color-ubuntu/ +[15]: https://itsfoss.com/gnome-tweak-tool/ +[16]: https://itsfoss.com/wp-content/uploads/2022/05/manjaro-layout.png +[17]: https://itsfoss.com/wp-content/uploads/2022/05/ubuntu-22-apps.jpg +[18]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-22-04-neofetch-lolcat-800x445.png +[19]: https://help.ubuntu.com/ +[20]: https://wiki.manjaro.org/index.php/Main_Page +[21]: https://wiki.archlinux.org/ +[22]: https://news.itsfoss.com/manjaro-linux-experience/ diff --git a/sources/tech/20220522 Ultramarine Linux- Ultimate Fedora Spin with Budgie, Cutefish and Pantheon.md b/sources/tech/20220522 Ultramarine Linux- Ultimate Fedora Spin with Budgie, Cutefish and Pantheon.md new file mode 100644 index 0000000000..bfc6389374 --- /dev/null +++ b/sources/tech/20220522 Ultramarine Linux- Ultimate Fedora Spin with Budgie, Cutefish and Pantheon.md @@ -0,0 +1,141 @@ +[#]: subject: "Ultramarine Linux: Ultimate Fedora Spin with Budgie, Cutefish and Pantheon" +[#]: via: "https://www.debugpoint.com/2022/05/ultramarine-linux-36/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Ultramarine Linux: Ultimate Fedora Spin with Budgie, Cutefish and Pantheon +====== +A review of Ultramarine Linux features some unique desktop environments out-of-the-box with a Fedora base. + +Ultramarine Linux is a Fedora-based distribution which offers Budgie, Cutefish, Pantheon and GNOME desktop environments. This distro gives you an out-of-the-box experience with all these desktop favours with under-the-hood tweaks and packages. In addition, it pre-loads several packages (RPM Fusion, etc.) for Fedora, which you usually do as a post-install[tweak][1]. + +On top of that, Ultramarine Linux also brings several packages from its [own copr repo][2] for package distribution. + +### Ultramarine Linux Review (version 36) + +#### What does it offer? + +In a nutshell, Ultramarine Linux built itself on the Fedora Linux base. In addition, it gives you four desktop flavours – Budgie (flagship), Cutefish, Pantheon (of elementary OS) and GNOME desktop. The pre-loaded applications are typical as same as Fedora. Moreover, the application list changes based on your desktop environment of choice. + +As it is based on Fedora Linux, you get to experience the latest and greatest of technology such as Linux Kernel, audio and video tech, latest file system improvements, programming environment, etc. + +The distro is a unique combination of the latest tech with the beautiful desktops. + +#### Installation + +![Ultramarine uses Anaconda Installer][3] + +The distro brings separate ISO files for different desktop environments. From the installer, you can not choose the desktop environment. You need to download the one which you prefer. + +In a way, it is a good approach because isolating different ISO help to keep the ISO size in a range of ~2 GB. + +It uses the same Fedora’s Anaconda installer, which is easy to use. During the test, I could not find any problem while downloading the ISO or installing it. All went super-smooth. + +#### Desktop Flavours – the selling point + +This review is based on the latest Ultramarine Linux 36 (Rhode Island) based on the recently released [Fedora 36][4]. With version 36, you get the [Linux Kernel 5.17][5] and the latest applications and packages. + +##### Pantheon Flavour + +![Ultramarine Linux with Pantheon Desktop][6] + +The Pantheon desktop is surprisingly stable in Ultramarine Linux. When using, you may not feel sometimes it is elementary OS. But obviously, it is not. + +The team also included the elementaryOS AppCenter, which gives you access to a massive list of software and apps. Moreover, the Fedora system updates and upgrades are also possible from AppCenter itself. In addition to Fedora base, you get the elementaryOS File manager, text editor and system settings in Ultramarine Linux. + +![AppCenter works well with Fedora base][7] + +##### Budgie Flavour + +![Ultramarine Linux with Budgie Desktop][8] + +The Budgie desktop is the flagship offering of Ultramarine Linux and gives you a stock Budgie desktop experience. On top of the base applications and packages from Fedora Linux, the Budgie flavour brings Budgie Control Center and Budgie Desktop settings to tweak your desktop. The Budgie is blazing fast and should be a choice for you if you want it to be a productive desktop. + +This version 36 also includes the branding related changes for Fedora 37 as the [Budgie team is working on a Fedora spin][9]. + +##### Cutefish Flavour + +![Ultramarine Linux – Cutefish desktop flavour][10] + +A while back, when we [reviewed][11] the Cutefish desktop. Firstly, the Cutefish desktop is a new desktop environment created from the ground up with a vision to look beautiful while being productive. It comes with a native dark mode, a built-in global menu, and many unique features that you can read in our detailed review. Perhaps the Ultramarine is the first distro with Fedora, which provides a Cutefish desktop as an option. + +Second, the team integrated the Cutefish flavour with Fedora in an organized way to give you this nice desktop with applications such as Cutefish’s file manager, terminal and settings window. + +System upgrade/update Cutefish flavour uses GNOME Software similar to the Budgie flavour to install and uninstall applications. + +##### GNOME Flavour + +Finally, the GNOME version is similar to the Fedora workstation edition. It’s almost identical in terms of GNOME Shell and native application versions. The only difference is the RPM fusion, as reviewed below. + +#### Applications and Differences with stock Fedora Linux + +Firstly, the base applications are installed in all the above-stated desktop environments. Essential applications such as Firefox, LibreOffice, and system monitors are all installed by default in this distro. Other than that, the default shell is [ZSH with a Starship theme][12], which definitely improves productivity over the bash shell. + +Secondly, the critical addition or difference from the stock Fedora version is that Ultramarine Linux includes the RPM Fusion repo by default. The RPM Fusion repo is a collection of packages or software available as a community project. They are not included in the official Fedora distribution because of their proprietary nature. + +![Ultramarine packages RPM Fusion by default][13] + +The Ultramarine Linux brings all the RPM Fusions types – free, non-free, free-tainted and non-free trained. So, from a general user standpoint, you need not worry about [adding RPM Fusion separately][14] to install extra media playback codecs or such apps. + +The distro follows a release cadence based on Fedora Linux. So, in general, you get the updates within a month or so after an official Fedora release. + +#### Performance + +During our test, the performance is impressive in both virtual machines and physical systems. All the above desktop flavours have fantastic desktop responsiveness and an overall good impression while using them. + +For example, Pantheon, which is a little resource heavy, uses 1.3 GB of RAM, and the CPU is on average 2% in an idle state. It uses 1.8 GB of RAM with a little higher CPU of around 4% based on the applications you are running in a hefty workload mode. We tested it during the heavy workload phase using text editor, Firefox, LibreOffice calc, image viewer, and two sessions of terminal applications. + +![Idle state performance while using the Pantheon version][15] + +![Heavy workload performance while using the Pantheon version][16] + +Furthermore, I think the other desktop flavours would also be in a similar performance metric. + +I think the performance is excellent, considering it’s based on optimized Fedora. You can efficiently run this distro in the moderately newer hardware (perhaps Intel i3 and above with good RAM capacity). + +### Closing Notes + +To summarize the Ultramarine Linux 36 review, I believe it’s one of the coolest Fedora spins with some beautiful desktop environments. The vision of this distro is perfect and has a good user base. One of the plus points is the Pantheon desktop which many users like, and you get it with Fedora without manual installation. An underrated distro, in my opinion, needs more love from the community. + +If you like this Linux distribution and believe in its offerings, you should head to their community pages ([Twitter][17], [Discord][18]) for contributions/donations. The project needs some contributors as it’s a small member team. + +You can download Ultramarine Linux from the[official website][19]. + +Finally, in the comment box below, let me know your opinion about this distro. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/ultramarine-linux-36/ + +作者:[Arindam][a] +选题:[lkxed][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/lkxed +[1]: https://www.debugpoint.com/2022/05/10-things-to-do-fedora-36-after-install/ +[2]: https://copr.fedorainfracloud.org/coprs/cappyishihara/ultramarine/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Ultramarine-uses-Anaconda-Installer.jpg +[4]: https://www.debugpoint.com/2022/05/fedora-36-features/ +[5]: https://www.debugpoint.com/2022/03/linux-kernel-5-17/ +[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/Ultramine-Linux-with-Pantheon-Desktop.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/05/AppCenter-works-well-with-Fedora-base.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/Ultramine-Linux-with-Budgie-Desktop.jpg +[9]: https://debugpointnews.com/fedora-budgie-fudgie/ +[10]: https://www.debugpoint.com/wp-content/uploads/2022/05/Ultramarine-Linux-Cutefosh-desktop-flavour.jpg +[11]: https://www.debugpoint.com/2021/11/cutefish-os-review-2021/ +[12]: https://www.debugpoint.com/2021/10/install-use-zsh/ +[13]: https://www.debugpoint.com/wp-content/uploads/2022/05/Ultramarine-packages-RPM-Fusion-by-default.jpg +[14]: https://www.debugpoint.com/2020/07/enable-rpm-fusion-fedora-rhel-centos/ +[15]: https://www.debugpoint.com/wp-content/uploads/2022/05/Idle-state-performance-while-using-Pantheon-version.jpg +[16]: https://www.debugpoint.com/wp-content/uploads/2022/05/Heavy-workload-performance-while-using-Pantheon-version.jpg +[17]: https://twitter.com/UltramarineProj +[18]: https://discord.gg/bUuQasHdrF +[19]: https://ultramarine-linux.org/download diff --git a/sources/tech/20220523 -Speek!- - An Open-Source Chat App That Uses Tor.md b/sources/tech/20220523 -Speek!- - An Open-Source Chat App That Uses Tor.md new file mode 100644 index 0000000000..941be75d6d --- /dev/null +++ b/sources/tech/20220523 -Speek!- - An Open-Source Chat App That Uses Tor.md @@ -0,0 +1,109 @@ +[#]: subject: "‘Speek!’ : An Open-Source Chat App That Uses Tor" +[#]: via: "https://itsfoss.com/speek/" +[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +‘Speek!’ : An Open-Source Chat App That Uses Tor +====== +An interesting open-source private messenger that utilizes Tor to keep your communications secure and private. + +Speek is an internet messaging service that leverages multiple technologies to help keep your internet chats private. + +It is end-to-end encrypted, decentralized, and open-source. + +Undoubtedly, it aims to pitch itself as one of the [WhatsApp alternatives][1] and a competitor to [Signal on Linux][2]. + +So, what is it all about? Let us take a closer look at the details. + +### ‘Speek!’ A Peer-to-Peer Instant Messaging App for Linux and Android + +![screenshot of Speek][3] + +Speek! (with an exclamation mark as part of its name) is an encrypted chat messenger that aims to fight against censorship while keeping your data private. + +To keep things simple, we ignore the exclamation mark for the rest of the article. + +You can also find it as an alternative to [Session][4], but with some differences. + +It is a fairly new competitor compared to other messengers available. However, it should be a candidate to try as an open-source solution. + +While it claims to keep you anonymous, you should always be cautious of your activities on your devices to ensure complete anonymity, if that’s what you require. It’s not just the messenger that you need to think of. + +![speek id][5] + +It utilizes a decentralized Tor network to keep things secure and private. And, this enables it to make the service useful without needing your phone number. You just require your Speek ID to connect with people, and it is tough for someone to know your ID. + +### Features of Speek + +![speek options][6] + +Some key highlights include: + +* End-to-end encryption: No one except for the recipient can view your messages. +* Routing traffic over TOR: Using TOR for routing messages, enhances privacy. +* No centralized server: Increases resistance against censorship because it’s tough to shut down the service. Moreover, no single attack point for hackers. +* No sign-ups: You do not need to share any personal information to start using the service. You just need a public key to identify/add users. +* Self-destructing chat: When you close the app, the messages are automatically deleted. For an extra layer of privacy and security. +* No metadata: It eliminates any metadata when you exchange messages. +* Private file sharing: You can also use the service to share files securely. + +### Download Speek For Linux and Other Platforms + +You can download Speek from their [official website][7]. + +At the time of writing this article, Speek is available only on Linux, Android macOS, and Windows. + +For Linux, you will find an [AppImage][8] file. In case you are unaware of AppImages, you can refer to our [AppImage guide][9] to run the application. + +![speek android][10] + +And, the Android app on the [Google Play Store][11] is fairly new. So, you should expect improvements when you try it out. + +[Speek!][12] + +### Thoughts on Using Speek + +![screenshot of Speek][13] + +The user experience for the app is pretty satisfying, and checks all the essentials required. It could be better, but it’s decent. + +Well, there isn’t much to say about Speek’s GUI. The GUI is very minimal. It is a chat app at its core and does exactly that. No stories, no maps, no unnecessary add-ons. + +In my limited time of using the app, I am satisfied with its functionalities. The features that it offers, make it a good chat app for providing a secure and private messaging experience with all the tech behind it. + +If you’re going to compare it with some commercially successful chat apps, it falls short on features. But then again, Speek is not designed as a trendy chat app with a sole focus on user experience. + +So, I would only recommend Speek for privacy-conscious users. If you want a balance of user experience and features, you might want to continue using private messengers like Signal. + +*What do you think about Speek? Is it a good private messenger for privacy-focused users? Kindly let me know your thoughts in the comments section below.* + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/speek/ + +作者:[Pratham Patel][a] +选题:[lkxed][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/pratham/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/private-whatsapp-alternatives/ +[2]: https://itsfoss.com/install-signal-ubuntu/ +[3]: https://itsfoss.com/wp-content/uploads/2022/05/01_speek_gui-1-800x532.webp +[4]: https://itsfoss.com/session-messenger/ +[5]: https://itsfoss.com/wp-content/uploads/2022/05/speek-id-800x497.png +[6]: https://itsfoss.com/wp-content/uploads/2022/05/speek-options-800x483.png +[7]: https://speek.network +[8]: https://itsfoss.com/appimage-interview/ +[9]: https://itsfoss.com/use-appimage-linux/ +[10]: https://itsfoss.com/wp-content/uploads/2022/05/speek-android.jpg +[11]: https://play.google.com/store/apps/details?id=com.speek.chat +[12]: https://speek.network/ +[13]: https://itsfoss.com/wp-content/uploads/2022/05/01_speek_gui-1-800x532.webp diff --git a/sources/tech/20220523 A hands-on guide to images and containers for developers.md b/sources/tech/20220523 A hands-on guide to images and containers for developers.md new file mode 100644 index 0000000000..daa4579027 --- /dev/null +++ b/sources/tech/20220523 A hands-on guide to images and containers for developers.md @@ -0,0 +1,409 @@ +[#]: subject: "A hands-on guide to images and containers for developers" +[#]: via: "https://opensource.com/article/22/5/guide-containers-images" +[#]: author: "Evan "Hippy" Slatis https://opensource.com/users/hippyod" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +A hands-on guide to images and containers for developers +====== +Understand the key concepts behind images and containers. Then try a lab that demonstrates building and running images and containers. + +![Shipping containers stacked in a yard][1] + +Image by: Lucarelli via Wikimedia Commons. CC-BY-SA 3.0 + +Containers and Open Container Initiative (OCI) images are important open source application packaging and delivery technologies made popular by projects like Docker and Kubernetes. The better you understand them, the more able you will be to use them to enhance the consistency and scalability of your projects. + +In this article, I will describe this technology in simple terms, highlight the essential aspects of images and containers for a developer to understand, then wrap up by discussing some best practices developers can follow to make their containers portable. I will also walk you through a simple lab that demonstrates building and running images and containers. + +### What are images? + +Images are nothing more than a packaging format for software. A great analogy is Java's JAR file or a Python wheel. JAR (or EAR or WAR) files are simply ZIP files with a different extension, and Python wheels are distributed as gzipped tarballs. All of them conform to a standard directory structure internally. + +Images are packaged as `tar.gz` (gzipped tarballs), and they include the software you're building and/or distributing, but this is where the analogy to JARs and wheels ends. For one thing, images package not just your software but all supporting dependencies needed to run your software, up to and including a complete operating system. Whereas wheels and JARs are usually built as dependencies but can be executable, images are almost always built to be executed and more rarely as a dependency. + +Knowing the details of what's in the images isn't necessary to understand how to use images or to write and design software for them (if you're interested, read ["What is a container image?"][2]). From your perspective, and especially from the perspective of your software, what's important to understand is that the images you create will contain a *complete operating system*. Because images are packaged as if they're a complete operating system from the perspective of the software you wish to run, they are necessarily much larger than software packaged in a more traditional fashion. + +Note that images are immutable. They cannot be changed once they are built. If you modify the software running on the image, you must build an entirely new image and replace the old one. + +#### Tags + +When images are created, they are created with a unique hash, but they are typically identified with a human-readable name such as `ubi`, `ubi-minimal`, `openjdk11`, and so on. However, there can be different versions of the image for each of their names, and those are typically differentiated by tags. For example, the `openjdk11` image might be tagged as `jre-11.0.14.1_1-ubi` and `jre-11.0.14.1_1-ubi-minimal,` denoting image builds of the openjdk11 software package version 11.0.14.1_1 installed on a Red Hat `ubi` and `ubi minimal` image, respectively. + +### What are containers? + +Containers are images that have been realized and executed on a host system. Running a container from an image is a two-step process: create and start. Create takes the image and gives it its own ID and filesystem. Create (as in `docker create`, for example) can be repeated many times in order to create many instances of a running image, each with its own ID and filesystem. Starting the container will launch an isolated process on the host machine in which the software running inside the container will behave as if it is running in its very own virtual machine. A container is thus an isolated process on the host machine, with its own ID and independent filesystem. + +From a software developer's perspective, there are two primary reasons to use containers: consistency and scalability. These are related to each other, and together they allow projects to use one of the most promising innovations to come to software development in recent years, the principle of "Build once, deploy many." + +#### Consistency + +Because images are immutable and include all of the dependencies needed to run your software from the OS on up, you gain consistency wherever you choose to deploy it. This means whether you launch an image as a container in a development, test, or any number of production environments, the container will run exactly the same way. As a software developer, you won't have to worry about whether any of those environments are running on a different host operating system or version, because the container is running the same operating system every time. That's the benefit of packaging your software along with its complete runtime environment, rather than just your software without the complete set of dependencies needed to run it. + +This consistency means that in almost all cases, when an issue is found in one environment (for example, production), you can be confident that you'll be able to reproduce that issue in development or some other environment, so you can confirm the behavior and focus on fixing it. Your project should never get mired in and stumped by the dreaded "But it works on my machine" problem again. + +#### Scalability + +Images contain not only your software but also all the dependencies needed to run your software, including the underlying operating system. This means all processes running inside the container view the container as the host system, the host system is invisible to processes running inside the container, and, from the host system's point of view, the container is just another process it manages. Of course, virtual machines do almost the same thing, which raises a valid question: Why use container technology instead of a virtual machine? The answer lies in both speed and size. + +Containers run only the software required to support an independent host without the overhead of having to mimic the hardware. Virtual machines must contain a complete operating system and mimic the underlying hardware. The latter is a very heavyweight solution, which also results in much larger files. Because containers are treated as just another running process from the host system's perspective, they can be spun up in seconds rather than minutes. When your application needs to scale quickly, containers will beat a virtual machine in resources and speed every time. Containers are also easier to scale back down. + +Scaling is outside the scope of this article from a functional standpoint, so the lab will not be demonstrating this feature, but it's important to understand the principle in order to understand why container technology represents such a significant advance in the packaging and deployment of software. + +Note: While it is possible to [run a container that does not include a complete operating system][3], this is rarely done because the minimal images available are usually an insufficient starting point. + +### How to find and store images + +Like every other type of software packaging technology, containers need a place where packages can be shared, found, and reused. These are called image registries, analogous to Java Maven and Python wheel repositories or npm registries. + +These are a sampling of different image registries available on the internet: + +* [Docker Hub][4]: The original Docker registry, which hosts many Docker official images used widely among projects worldwide and provides opportunities for individuals to host their own images. One of the organizations that hosts images on Docker Hub is adoptopenjdk; view their repository for examples of images and tags for the [openjdk11][5] project. +* [Red Hat Image Registry][6]: Red Hat's official image registry provides images to those with valid Red Hat subscriptions. +* [Quay][7]: Red Hat's public image registry hosts many of Red Hat's publicly available images and provides providing opportunities for individuals to host their own images. + +### Using images and containers + +There are two utilities whose purpose is to manage images and containers: [Docker][8]and [Podman][9]. They are available for Windows, Linux, and Mac workstations. From a developer's point of view, they are completely equivalent when executing commands. They can be considered aliases of one another. You can even install a package on many systems that will automatically change Docker into a Podman alias. Wherever Podman is mentioned in this document, Docker can be safely substituted with no change in outcome. + +You'll immediately notice these utilities are very similar to [Git][10] in that they perform tagging, pushing, and pulling. You will use or refer to this functionality regularly. They should not be confused with Git, however, since Git also manages version control, whereas images are immutable and their management utilities and registry have no concept of change management. If you push two images with the same name and tag to the same repository, the second image will overwrite the first with no way to see or understand what has changed. + +#### Subcommands + +The following are a sampling of Podman and Docker subcommands you will commonly use or refer to: + +* build: `build` an image + * Example: `podman build -t org/some-image-repo -f Dockerfile` +* image: manage `image`s locally + * Example: `podman image rm -a` will remove all local images. +* images: list `images` stored locally + * tag: `tag` an image +* container: manage `container`s + * Example: `podman container rm -a` will remove all stopped local containers. +* run: `create` and `start` a container + * also `stop` and `restart` +* pull/push: `pull`/push and image from/to a repository on a registry + +#### Dockerfiles + +Dockerfiles are the source files that define images and are processed with the `build` subcommand. They will define a parent or base image, copy in or install any extra software you want to have available to run in your image, define any extra metadata to be used during the build and/or runtime, and potentially specify a command to run when a container defined by your image is run. A more detailed description of the anatomy of a Dockerfile and some of the more common commands used in them is in the lab below. A link to the complete Dockerfile reference appears at the end of this article. + +#### Fundamental differences between Docker and Podman + +Docker is a daemon in Unix-like systems and a service in Windows. This means it runs in the background all the time, and it runs with root or administrator privileges. Podman is binary. This means it runs only on demand, and can run as an unprivileged user. + +This makes Podman more secure and more efficient with system resources (why run all the time if you don't have to?). Running anything with root privileges is, by definition, less secure. When using images on the cloud, the cloud that will host your containers can manage images and containers more securely. + +#### Skopeo and Buildah + +While Docker is a singular utility, Podman has two other related utilities maintained by the Containers organization on GitHub: [Skopeo][11] and [Buildah][12]. Both provide functionality that Podman and Docker do not, and both are part of the container-tools package group with Podman for installation on the Red Hat family of Linux distributions. + +For the most part, builds can be executed through Docker and Podman, but Buildah exists in case more complicated builds of images are required. The details of these more complicated builds are far outside the scope of this article, and you'll rarely, if ever, encounter the need for it, but I include mention of this utility here for completeness. + +Skopeo provides two utility functions that Docker does not: the ability to copy images from one registry to another and to delete an image from a remote registry. Again, this functionality is outside the scope of this discussion, but the functionality could eventually be of use to you, especially if you need to write some DevOps scripts. + +### Dockerfiles lab + +The following is a very short lab (about 10 minutes) that will teach you how to build images using Dockerfiles and run those images as containers. It will also demonstrate how to externalize your container's configuration to realize the full benefits of container development and "Build once, deploy many." + +#### Installation + +The following lab was created and tested locally running Fedora and in a [Red Hat sandbox environment][13] with Podman and Git already installed. I believe you'll get the most out of this lab running it in the Red Hat sandbox environment, but running it locally is perfectly acceptable. + +You can also install Docker or Podman on your own workstation and work locally. As a reminder, if you install Docker, `podman` and `docker` are completely interchangeable for this lab. + +#### Building Images + +**1. Clone the Git repository from GitHub:** + +``` +$ git clone https://github.com/hippyod/hello-world-container-lab +``` + +**2. Open the Dockerfile:** + +``` +$ cd hello-world-container-lab +$ vim Dockerfile +``` + +``` +1 FROM Docker.io/adoptopenjdk/openjdk11:x86_64-ubi-minimal-jre-11.0.14.1_1 + +2 + +3 USER root + +4 + +5 ARG ARG_MESSAGE_WELCOME='Hello, World' + +6 ENV MESSAGE_WELCOME=${ARG_MESSAGE_WELCOME} + +7 + +8 ARG JAR_FILE=target/*.jar + +9 COPY ${JAR_FILE} app.jar + +10 + +11 USER 1001 + +12 + +13 ENTRYPOINT ["java", "-jar", "/app.jar"] +``` + +This Dockerfile has the following features: + +* The FROM statement (line 1) defines the base (or parent) image this new image will be built from. +* The USER statements (lines 3 and 11) define which user is running during the build and at execution. At first, root is running in the build process. In more complicated Dockerfiles I would need to be root to install any extra software, change file permissions, and so forth, to complete the new image. At the end of the Dockerfile, I switch to the user with UID 1001 so that, whenever the image is realized as a container and executes, the user will not be root, and therefore more secure. I use the UID rather than a username so that the host can recognize which user is running in the container in case the host has enhanced security measures that prevent containers from running as the root user. +* The ARG statements (lines 5 and 8) define variables that can be used during the build process only. +* The ENV statement (line 6) defines an environment variable and value that can be used during the build process but will also be available whenever the image is run as a container. Note how it obtains its value by referencing the variable defined by the previous ARG statement. +* The COPY statement (line 9) copies the JAR file created by the Spring Boot Maven build into the image. For the convenience of users running in the Red Hat sandbox, which doesn't have Java or Maven installed, I have pre-built the JAR file and pushed it to the hello-world-container-lab repo. There is no need to do a Maven build in this lab. (Note: There is also an `add` command that can be substituted for COPY. Because the `add` command can have unpredictable behavior, COPY is preferable.) +* Finally, the ENTRYPOINT statement defines the command and arguments that should be executed in the container when the container starts up. If this image ever becomes a base image for a subsequent image definition and a new ENTRYPOINT is defined, it will override this one. (Note: There is also a `cmd` command that can be substituted for ENTRYPOINT. The difference between the two is irrelevant in this context and outside the scope of this article.) + +Type `:q` and hit **Enter** to quit the Dockerfile and return to the shell. + +**3. Build the image:** + +``` +$ podman build --squash -t test/hello-world -f Dockerfile +``` + +You should see: + +``` +STEP 1: FROM docker.io/adoptopenjdk/openjdk11:x86_64-ubi-minimal-jre-11.0.14.1_1 +Getting image source signatures +Copying blob d46336f50433 done   +Copying blob be961ec68663 done +... +STEP 7/8: USER 1001 +STEP 8/8: ENTRYPOINT ["java", "-jar", "/app.jar"] +COMMIT test/hello-world +... +Successfully tagged localhost/test/hello-world:latest +5482c3b153c44ea8502552c6bd7ca285a69070d037156b6627f53293d6b05fd7 +``` + +In addition to building the image the commands provide the following instructions: + +The `--squash` flag will reduce image size by ensuring that only one layer is added to the base image when the image build completes. Excess layers will inflate the size of the resulting image. FROM, RUN, and COPY/ADD statements add layers, and best practices are to concatenate these statements when possible, for example: + +``` +RUN dnf -y --refresh update && \ +    dnf install -y --nodocs podman skopeo buildah && \ +    dnf clean all +``` + +The above RUN statement will not only run each statement to create only a single layer but will also fail the build should any one of them fail. + +The `-t flag` is for naming the image. Because I did not explicitly define a tag for the name (such as `test/hello-world:1.0)`, the image will be tagged as latest by default. I also did not define a registry (such as `quay.io/test/hello-world` ), so the default registry will be localhost. + +The `-f` flag is for explicitly declaring the Dockerfile to be built. + +When running the build, Podman will track the downloading of "blobs." These are the image layers your image will be built upon. They are initially pulled from the remote registry, and they will be cached locally to speed up future builds. + +``` +Copying blob d46336f50433 done   +Copying blob be961ec68663 done +... +Copying blob 744c86b54390 skipped: already exists   +Copying blob 1323ffbff4dd skipped: already exists +``` + +**4. When the build completes, list the image to confirm it was successfully built:** + +``` +$ podman images +``` + +You should see: + +``` +REPOSITORY                                        TAG                                                      IMAGE ID      CREATED               SIZE +localhost/test/hello-world                 latest                                                    140c09fc9d1d  7 seconds ago  454 MB +docker.io/adoptopenjdk/openjdk11  x86_64-ubi-minimal-jre-11.0.14.1_1  5b0423ba7bec  22 hours ago   445 MB +``` + +#### Running containers + +**5. Run the image:** + +``` +$ podman run test/hello-world +``` + +You should see: + +``` +.   ____          _            __ _ _ + /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \ +( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ + \\/  ___)| |_)| | | | | || (_| |  ) ) ) ) +  '  |____| .__|_| |_|_| |_\__, | / / / / + =========|_|==============|___/=/_/_/_/ + :: Spring Boot ::                (v2.5.4) + +... +GREETING: Hello, world +GREETING: Hello, world +``` + +The output will continue printing "Hello, world" every three seconds until you exit: + +``` +crtl-c +``` + +**6. Prove that Java is installed only in the container:** + +``` +$ java -version +``` + +The Spring Boot application running inside the container requires Java to run, which is why I chose the base image. If you're running in the Red Hat sandbox environment for the lab, this prove sthat Java is installed only in the container, and not on the host: + +``` +-bash: java: command not found... +``` + +#### Externalize your configuration + +The image is now built, but what happens when I want the "Hello, world" message to be different for each environment I deploy the image to? For example, I might want to change it because the environment is for a different phase of development or a different locale. If I change the value in the Dockerfile, I'm required to build a new image to see the message, which breaks one of the most fundamental benefits of containers—"Build once, deploy many." So how do I make my image truly portable so it can be deployed wherever I need it? The answer lies in externalizing the configuration. + +7. Run the image with a new, external welcome message: + +``` +$ podman run -e 'MESSAGE_WELCOME=Hello, world DIT' test/hello-world +``` + +You should see: + +``` +Output: +  .   ____          _            __ _ _ + /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \ +( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ + \\/  ___)| |_)| | | | | || (_| |  ) ) ) ) +  '  |____| .__|_| |_|_| |_\__, | / / / / + =========|_|==============|___/=/_/_/_/ + :: Spring Boot ::                (v2.5.4) + +... +GREETING: Hello, world DIT +GREETING: Hello, world DIT +``` + +Stop using by using `crtl-c` and adapt the message: + +``` +$ podman run -e 'MESSAGE_WELCOME=Hola Mundo' test/hello-world +``` + +``` +.   ____          _            __ _ _ + /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \ +( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ + \\/  ___)| |_)| | | | | || (_| |  ) ) ) ) +  '  |____| .__|_| |_|_| |_\__, | / / / / + =========|_|==============|___/=/_/_/_/ + :: Spring Boot ::                (v2.5.4) + +... +GREETING: Hola Mundo +GREETING: Hola Mundo +``` + +The `-e` flag defines an environment variable and value to inject into the container at startup. As you can see, even if the variable was built into the original image (the `ENV MESSAGE_WELCOME=${ARG_MESSAGE_WELCOME}` statement in your Dockerfile), it will be overridden. You've now externalized data that needed to change based on where it was to be deployed (for example, in a DIT environment or for Spanish speakers) and thus made your images portable. + +**8. Run the image with a new message defined in a file:** + +``` +$ echo 'Hello, world from a file' > greetings.txt +$ podman run -v "$(pwd):/mnt/data:Z" \ +    -e 'MESSAGE_FILE=/mnt/data/greetings.txt' test/hello-world +``` + +In this case you should see: + +``` +.   ____          _            __ _ _ + /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \ +( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ + \\/  ___)| |_)| | | | | || (_| |  ) ) ) ) +  '  |____| .__|_| |_|_| |_\__, | / / / / + =========|_|==============|___/=/_/_/_/ + :: Spring Boot ::                (v2.5.4) + +... +GREETING: Hello, world from a file +GREETING: Hello, world from a file +``` + +Repeat until you hit `crtl-c` to stop + +The `-e` flag in this case defines a path to the file at `/mnt/data/greetings.txt` that was mounted from the host's local file system with the `-v` flag at `$(pwd)/greetings.txt` (`pwd` is a bash utility that outputs the absolute path of the current directory, which in your case should be the `hello-world-container-lab` ). You've now externalized data that needed to change based on where it was to be deployed, but this time your data was defined in an external file you mounted into the container. Environment variable settings are OK for a limited number of settings, but when you have several settings to apply, a file is a more efficient way of injecting the values into your containers. + +Note: The `:Z` flag at the end of the volume definition above is for systems using [SELinux][14]. SELinux manages security on many Linux distributions, and the flag allows the container access to the directory. Without the flag, SELinux would prevent the reading of the file, and an exception would be thrown in the container. Try running the command above again after removing the `:Z` to see a demonstration. + +This concludes the lab. + +### Developing for containers: externalize the configuration + +"Build once, deploy many" works because the immutable containers running in different environments don't have to worry about differences in the hardware or software required to support your particular software project. This principle makes software development, debugging, deployment, and ongoing maintenance much faster and easier. It also isn't perfect, and some minor changes have to be made in how you code to make your container truly portable. + +The most important design principle when writing software for containerization is deciding what to externalize. These decisions ultimately make your images portable so they can fully realize the "Build once, deploy many" paradigm. Although this may seem complicated, there are some easy-to-remember factors to consider when deciding whether the configuration data should be injectable into your running container: + +* Is the data environment-specific? This includes any data that needs to be configured based on where the container is running, whether the environment is a production, non-production, or development environment. Data of this sort includes internationalization configuration, datastore information, and the specific testing profile(s) you want your application to run under. +* Is the data release independent? Data of this sort can run the gamut from feature flags to internationalization files to log levels—basically, any data you might want or need to change between releases without a build and new deployment. +* Is the data a secret? Credentials should never be hard coded or stored in an image. Credentials typically need to be refreshed on schedules that don't match release schedules, and embedding a secret in an image stored in an image registry is a security risk. + +The best practice is to choose where your configuration data should be externalized (that is, in an environment variable or a file) and only externalize those pieces that meet the above criteria. If it doesn't meet the above criteria, it is best to leave it as part of the immutable image. Following these guidelines will make your images truly portable and keep your external configuration reasonably sized and manageable. + +### Summary + +This article introduces four key ideas for software developers new to images and containers: + +1. Images are immutable binaries: Images are a means of packaging software for later reuse or deployment. +2. Containers are isolated processes: When they are created, containers are a runtime instantiation of an image. When containers are started, they become processes in memory on a host machine, which is much lighter and faster than a virtual machine. For the most part, developers only need to know the latter, but understanding the former is helpful. +3. "Build once, deploy many": This principle is what makes container technology so useful. Images and containers provide consistency in deployments and independence from the host machine, allowing you to deploy with confidence across many different environments. Containers are also easily scalable because of this principle. +4. Externalize the configuration: If your image has configuration data that is environment-specific, release-independent, or secret, consider making that data external to the image and containers. You can inject this data into your running image by injecting an environment variable or mounting an external file into the container. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/guide-containers-images + +作者:[Evan "Hippy" Slatis][a] +选题:[lkxed][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/hippyod +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/bus-containers2.png +[2]: https://opensource.com/article/21/8/container-image +[3]: https://opensource.com/article/22/2/build-your-own-container-linux-buildah +[4]: http://hub.docker.com/ +[5]: https://hub.docker.com/r/adoptopenjdk/openjdk11/tags?page=1&name=jre-11.0.14.1_1-ubi +[6]: http://registry.redhat.io/ +[7]: http://quay.io/ +[8]: https://opensource.com/resources/what-docker +[9]: https://www.redhat.com/sysadmin/podman-guides-2020 +[10]: https://git-scm.com/) +[11]: https://github.com/containers/skopeo/blob/main/install.md +[12]: https://github.com/containers/buildah +[13]: https://developers.redhat.com/courses/red-hat-enterprise-linux/deploy-containers-podman +[14]: https://www.redhat.com/en/topics/linux/what-is-selinux +[15]: https://www.redhat.com/en/services/training/do080-deploying-containerized-applications-technical-overview?intcmp=7013a000002qLH8AAM +[16]: https://blog.aquasec.com/a-brief-history-of-containers-from-1970s-chroot-to-docker-2016 +[17]: https://developers.redhat.com/blog/2018/02/22/container-terminology-practical-introduction?intcmp=7013a000002qLH8AAM +[18]: https://docs.docker.com/engine/reference/builder/ +[19]: https://www.imaginarycloud.com/blog/podman-vs-docker/#:~:text=Docker%20uses%20a%20daemon%2C%20an,does%20not%20need%20the%20mediator. diff --git a/sources/tech/20220524 12 essential Linux commands for beginners.md b/sources/tech/20220524 12 essential Linux commands for beginners.md new file mode 100644 index 0000000000..c5273a7bc3 --- /dev/null +++ b/sources/tech/20220524 12 essential Linux commands for beginners.md @@ -0,0 +1,187 @@ +[#]: subject: "12 essential Linux commands for beginners" +[#]: via: "https://opensource.com/article/22/5/essential-linux-commands" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +12 essential Linux commands for beginners +====== +I recommend these commands to anyone who is getting started with Linux. + +![Command line prompt][1] + +Image by: Opensource.com + +When operating on the Linux command line, it is easy to get disoriented, which can have disastrous consequences. I once issued a remove command before realizing that I'd moved the boot directory of my computer. I learned to use the `pwd` command to know exactly which part of the file system I was in (and these days, there are command projects, like [trashy and trash-cli][2], that serve as intermediates when removing files). + +When I was new to Linux, I had a cheat sheet that hung over my desk to help me remember those commands as I managed my Linux servers. It was called the *101 commands for Linux* cheat sheet. As I became more familiar with these commands, I became more proficient with server administration. + +Here are 12 Linux commands I find most useful. + +### 1. Print working directory (pwd) + +The `pwd` command prints your working directory. In other words, it outputs the path of the directory you are currently working in. There are two options: `--logical` to display your location with any symlinks and `--physical` to display your location after resolving any symlinks. + +### 2. Make directory (mkdir) + +Making directories is easy with the `mkdir` command. The following command creates a directory called `example` unless `example` already exists: + +``` +$ mkdir example +``` + +You can make directories within directories: + +``` +$ mkdir -p example/one/two +``` + +If directories `example` and `one` already exist, only directory `two` is created. If none of them exist, then three nested directories are created. + +### 3. List (ls) + +Coming from MS-DOS, I was used to listing files with the `dir` command. I don't recall working on Linux at the time, although today, `dir` is in the GNU Core Utilities package. Most people use the `ls` command to display the files, along with all their properties, are in a directory. The `ls` command has many options, including `-l` to view a long listing of files, displaying the file owner and permissions. + +### 4. Change directory (cd) + +It is often necessary to change directories. That's the `cd` command's function. For instance, this example takes you from your home directory into the `Documents` directory: + +``` +$ cd Documents +``` + +You can quickly change to your home directory with `cd ~` or just `cd` on most systems. You can use `cd ..` to move up a level. + +### 5. Remove a file (rm) + +Removing files is inherently dangerous. Traditionally, the Linux terminal has no Trash or Bin like the desktop does, so many terminal users have the bad habit of permanently removing data they believe they no longer need. There's no "un-remove" command, though, so this habit can be problematic should you accidentally delete a directory containing important data. + +A Linux system provides `rm` and `shred` for data removal. To delete file `example.txt`, type the following: + +``` +$ rm example.txt +``` + +However, it's much safer to install a trash command, such as [trashy][3] or [trash-cli][4]. Then you can send files to a staging area before deleting them forever: + +``` +$ trash example.txt +``` + +### 6. Copy a file (cp) + +Copy files with the `cp` command. The syntax is copy *from-here* *to-there*. Here's an example: + +``` +$ cp file1.txt newfile1.txt +``` + +You can copy entire directories, too: + +``` +$ cp -r dir1 newdirectory +``` + +### 7. Move and rename a file (mv) + +Renaming and moving a file is functionally the same process. When you move a file, you take a file from one directory and put it into a new one. When renaming a file, you take a file from one directory and put it back into the same directory or a different directory, but with a new name. Either way, you use the `mv` command: + +``` +$ mv file1.txt file_001.txt +``` + +### 8. Create an empty file (touch) + +Easily create an empty file with the `touch` command: + +``` +$ touch one.txt + +$ touch two.txt + +$ touch three.md +``` + +### 9. Change permissions (chmod) + +Change the permissions of a file with the `chmod` command. One of the most common uses of `chmod` is making a file executable: + +``` +$ chmod +x myfile +``` + +This example is how you give a file permission to be executed as a command. This is particularly handy for scripts. Try this simple exercise: + +``` +$ echo 'echo Hello $USER' > hello.sh + +$ chmod +x hello.sh + +$ ./hello.sh +Hello, Don +``` + +### 10. Escalate privileges (sudo) + +While administering your system, it may be necessary to act as the super user (also called root). This is where the `sudo` (or *super user do*) command comes in. Assuming you're trying to do something that your computer alerts you that only an administrator (or root) user can do, just preface it with the command `sudo` : + +``` +$ touch /etc/os-release && echo "Success" +touch: cannot touch '/etc/os-release': Permission denied + +$ sudo touch /etc/os-release && echo "Success" +Success +``` + +### 11. Shut down (poweroff) + +The `poweroff` command does exactly what it sounds like: it powers your computer down. It requires `sudo` to succeed. + +There are actually many ways to shut down your computer and some variations on the process. For instance, the `shutdown` command allows you to power down your computer after an arbitrary amount of time, such as 60 seconds: + +``` +$ sudo shutdown -h 60 +``` + +Or immediately: + +``` +$ sudo shutdown -h now +``` + +You can also restart your computer with `sudo shutdown -r now` or just `reboot`. + +### 12. Read the manual (man) + +The `man` command could be the most important command of all. It gets you to the documentation for each of the commands on your Linux system. For instance, to read more about `mkdir` : + +``` +$ man mkdir +``` + +A related command is `info`, which provides a different set of manuals (as long as they're available) usually written more verbosely than the often terse man pages. + +### What's your favorite Linux command? + +There are many more commands on a Linux system—hundreds! What's your favorite command, the one you find yourself using time and time again? + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/essential-linux-commands + +作者:[Don Watkins][a] +选题:[lkxed][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/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/command_line_prompt.png +[2]: https://www.redhat.com/sysadmin/recover-file-deletion-linux +[3]: https://gitlab.com/trashy/trashy +[4]: https://github.com/andreafrancia/trash-cli diff --git a/sources/tech/20220524 Build a Quarkus reactive application using Kubernetes Secrets.md b/sources/tech/20220524 Build a Quarkus reactive application using Kubernetes Secrets.md new file mode 100644 index 0000000000..d69869e358 --- /dev/null +++ b/sources/tech/20220524 Build a Quarkus reactive application using Kubernetes Secrets.md @@ -0,0 +1,232 @@ +[#]: subject: "Build a Quarkus reactive application using Kubernetes Secrets" +[#]: via: "https://opensource.com/article/22/5/quarkus-kubernetes-secrets" +[#]: author: "Daniel Oh https://opensource.com/users/daniel-oh" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Build a Quarkus reactive application using Kubernetes Secrets +====== +Follow security policies while developing applications for the cloud by using Kubernetes Secrets. + +![Improve your DevOps security game with Ansible Vault][1] + +Image by: Opensource.com + +Many organizations have security policies in place that dictate how to store sensitive information. When you're developing applications for the cloud, you're probably expected to follow those policies, and to do that you often have to externalize your data storage. Kubernetes has a built-in system to access external secrets, and learning to use that is key to a safe cloud-native app. + +In this article, I'm going to demonstrate how to build a Quarkus reactive application with externalized sensitive information—for instance, a password or token—using [Kubernetes Secrets][2]. A secret is a good example of how cloud platforms can secure applications by removing sensitive data from your static code. Note that you can find a solution to this tutorial [in this GitHub repository][3]. + +### 1. Scaffold a new reactive Quarkus project + +Use the Quarkus command-line interface (CLI) to scaffold a new project. If you haven't already installed the Quarkus CLI, follow these [instructions][5] according to your operating system. + +Run the following Quarkus CLI in your project directory to add `kubernetes-config`, `resteasy-reactive`, and `openshift` extensions: + +``` +$ quarkus create app quarkus-secret-example \ +-x resteasy-reactive,kubernetes-config,openshift +``` + +The output should look like this: + +``` +Looking for the newly published extensions in registry.quarkus.io +selected extensions: +- io.quarkus:quarkus-kubernetes-config +- io.quarkus:quarkus-resteasy-reactive +- io.quarkus:quarkus-openshift + + +applying codestarts... +📚  java +🔨  maven +📦  quarkus +📝  config-properties +🔧  dockerfiles +🔧  maven-wrapper +🚀  resteasy-reactive-codestart + +----------- + +[SUCCESS] ✅  quarkus project has been successfully generated in: +--> /tmp/quarkus-secret-example +----------- +Navigate into this directory and get started: quarkus dev +``` + +### 2. Create a Secret in Kubernetes + +To manage the Kubernetes Secrets, you have three options: + +* Using kubectl +* Using Configuration File +* Node [Kustomize][6] + +Use the `kubectl` command to create a new database credential (a username and password). Run the following command: + +``` +$ kubectl create secret generic db-credentials \                                                                       + --from-literal=username=admin \ + --from-literal=password=secret +``` + +If you haven't already installed a Kubernetes cluster locally, or you have no remote cluster, you can sign in to the [developer sandbox][7], a no-cost sandbox environment for Red Hat OpenShift and CodeReady Workspaces. + +You can confirm that the Secret is created properly by using the following command: + +``` +$ kubectl get secret/db-credentials -o yaml +``` + +The output should look like this: + +``` +apiVersion: v1 +data: +  password: c2VjcmV0 +  username: YWRtaW4= +kind: Secret +metadata: +  creationTimestamp: "2022-05-02T13:46:18Z" +  name: db-credentials +  namespace: doh-dev +  resourceVersion: "1190920736" +  uid: 936abd44-1097-4c1f-a9d8-8008a01c0add +type: Opaque +``` + +The username and password are encoded by default. + +### 3. Create a new RESTful API to access the Secret + +Now you can add a new RESTful (for Representational State Transfer) API to print out the username and password stored in the Kubernetes Secret. Quarkus enables developers to refer to the secret as a normal configuration using a `@ConfigureProperty` annotation. + +Open a `GreetingResource.java` file in `src/main/java/org/acme`. Then, add the following method and configurations: + +``` +@ConfigProperty(name = "username") +    String username; + +    @ConfigProperty(name = "password") +    String password; + +    @GET +    @Produces(MediaType.TEXT_PLAIN) +    @Path("/securty") +    public Map securty() { +        HashMap map = new HashMap<>(); +        map.put("db.username", username); +        map.put("db.password", password); +        return map; +    } +``` + +Save the file. + +### 4. Set the configurations for Kubernetes deployment + +Open the `application.properties` file in the `src/main/resources` directory. Add the following configuration for the Kubernetes deployment. In the tutorial, I'll demonstrate using the developer sandbox, so the configurations tie to the OpenShift cluster. + +If you want to deploy it to the Kubernetes cluster, you can package the application via Docker container directly. Then, you need to push the container image to an external container registry (for example, Docker Hub, quay.io, or Google container registry). + +``` +# Kubernetes Deployment +quarkus.kubernetes.deploy=true +quarkus.kubernetes.deployment-target=openshift +openshift.expose=true +quarkus.openshift.build-strategy=docker +quarkus.kubernetes-client.trust-certs=true + +# Kubernetes Secret +quarkus.kubernetes-config.secrets.enabled=true +quarkus.kubernetes-config.secrets=db-credentials +``` + +Save the file. + +### 5. Build and deploy the application to Kubernetes + +To build and deploy the reactive application, you can also use the following Quarkus CLI: + +``` +$ quarkus build +``` + +This command triggers the application build to generate a `fast-jar` file. Then the application `Jar` file is containerized using a Dockerfile, which was already generated in the `src/main/docker` directory when you created the project. Finally, the application image is pushed into the integrated container registry inside the OpenShift cluster. + +The output should end with a `BUILD SUCCESS` message. + +When you deploy the application to the developer sandbox or normal OpenShift cluster, you can find the application in the Topology view in the Developer perspective, as shown in the figure below. + +![A screenshot of Red Hat OpenShift Dedicated. In the left sidebar menu Topology is highlighted, and in the main screen there is a Quarkus icon][8] + +Image by: (Daniel Oh, CC BY-SA 4.0) + +### 6. Verify the sensitive information + +To verify that your Quarkus application can refer to the sensitive information from the Kubernetes Secret, get the route URL using the following `kubectl` command: + +``` +$ kubectl get route +``` + +The output is similar to this: + +``` +NAME                     HOST/PORT                                                               PATH   SERVICES                 PORT   TERMINATION   WILDCARD +quarkus-secret-example   quarkus-secret-example-doh-dev.apps.sandbox.x8i5.p1.openshiftapps.com          quarkus-secret-example   8080                 None +``` + +Use the [curl command][9] to access the RESTful API: + +``` +$ curl http://YOUR_ROUTE_URL/hello/security +``` + +The output: + +``` +{db.password=secret, db.username=admin} +``` + +Awesome! The above `username` and `password` are the same as those you stored in the `db-credentials` secret. + +### Where to learn more + +This guide has shown how Quarkus enables developers to externalize sensitive information using Kubernetes Secrets. Find additional resources to develop cloud-native microservices using Quarkus on Kubernetes here: + +* [7 guides for developing applications on the cloud with Quarkus][10] +* [Extend Kubernetes service discovery with Stork and Quarkus][11] +* [Deploy Quarkus applications to Kubernetes using a Helm chart][12] + +You can also watch this step-by-step [tutorial video][13] on how to manage Kubernetes Secrets with Quarkus. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/quarkus-kubernetes-secrets + +作者:[Daniel Oh][a] +选题:[lkxed][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/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/rh_003601_05_mech_osyearbook2016_security_cc.png +[2]: https://kubernetes.io/docs/concepts/configuration/secret/ +[3]: https://github.com/danieloh30/quarkus-secret-example.git +[4]: https://enterprisersproject.com/article/2019/8/kubernetes-secrets-explained-plain-english?intcmp=7013a000002qLH8AAM +[5]: https://quarkus.io/guides/cli-tooling#installing-the-cli +[6]: https://kustomize.io/ +[7]: https://developers.redhat.com/developer-sandbox/get-started +[8]: https://opensource.com/sites/default/files/2022-05/quarkus.png +[9]: https://opensource.com/article/20/5/curl-cheat-sheet +[10]: https://opensource.com/article/22/4/developing-applications-cloud-quarkus +[11]: https://opensource.com/article/22/4/kubernetes-service-discovery-stork-quarkus +[12]: https://opensource.com/article/21/10/quarkus-helm-chart +[13]: https://youtu.be/ak9R9-E_0_k diff --git a/sources/tech/20220524 The Basic Concepts of Shell Scripting.md b/sources/tech/20220524 The Basic Concepts of Shell Scripting.md new file mode 100644 index 0000000000..e3ed827d57 --- /dev/null +++ b/sources/tech/20220524 The Basic Concepts of Shell Scripting.md @@ -0,0 +1,190 @@ +[#]: subject: "The Basic Concepts of Shell Scripting" +[#]: via: "https://www.opensourceforu.com/2022/05/the-basic-concepts-of-shell-scripting/" +[#]: author: "Sathyanarayanan Thangavelu https://www.opensourceforu.com/author/sathyanarayanan-thangavelu/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +The Basic Concepts of Shell Scripting +====== +If you want to automate regular tasks and make your life easier, using shell scripts is a good option. This article introduces you to the basic concepts that will help you to write efficient shell scripts. + +![Shell-scripting][1] + +Ashell script is a computer program designed to be run by the UNIX shell, a command-line interpreter. The various dialects of shell scripts are considered to be scripting languages. Typical operations performed by shell scripts include file manipulation, program execution, and printing of text. A script that sets up the environment, runs the program, and does any necessary cleanup or logging, is called a wrapper. + +### Identification of shell prompt + +You can identify whether the shell prompt on a Linux based computer is a normal or super user by looking at the symbols of the prompt in the terminal window. The ‘#’ symbol is used for a super user and the ‘$’ symbol is used for a user with standard privileges. + +![Figure 1: Manual of date command][2] + +### Basic commands + +The script comes with too many commands that can be executed on the terminal window to manage your computer. Details of each command can be found in the manual included with the command. To view the manual, you need to run the command: + +``` +$man +``` + +A few frequently used commands are: + +``` +$date #display current date and time +$cal #display current month calendar +$df #displays disk usages +$free #display memory usage +$ls #List files and directories +$mkdir #Creates directory +``` + +Each command comes with several options that can be used along with it. You can refer to the manual for more details. See Figure 1 for the output of: + +``` +$man date +``` + +### Redirection operators + +The redirection operator is really useful when you want to capture the output of a command in a file or redirect to a file. + +| - | - | +| :- | :- | +| $ls -l /usr/bin >file | default stdout to file | +| $ls -l /usr/bin 2>file | redirects stderr to file | +| $ls -l /usr/bin > ls-output 2>&1 | redirects stderr & stdout to file | +| $ls -l /usr/bin &> ls-output | redirects stderr & stdout to file | +| $ls -l /usr/bin 2> /dev/null | /dev/null bitbucket | + +## Brace expansion + +Brace expansion is one of the powerful options UNIX has. It helps do a lot of operations with minimal commands in a single line instruction. For example: + +``` +$echo Front-{A,B,C}-Back +Front-A-Back, Front-B-Back, Front-C-Back + +$echo {Z..A} +Z Y X W V U T S R Q P O N M L K J I H G F E D C B A + +$mkdir {2009..2011}-0{1..9} {2009..2011}-{10..12} +``` + +This creates a directory for 12 months from 2009 to 2011. + +### Environment variables + +An environment variable is a dynamic-named value that can affect the way running processes will behave on a computer. This variable is a part of the environment in which a process runs. + +| - | - | +| :- | :- | +| printenv | Print part of all of the environment | +| set | set shell options | +| export | export environment to subsequently executed programs | +| alias | create an alias for command | + +### Network commands + +Network commands are very useful for troubleshooting issues on the network and to check the particular port connecting to the client. + +| - | - | +| :- | :- | +| ping | Send ICMP packets | +| traceroute | Print route packets to a network | +| netstat | print network connection, routing table, +interface stats | +| ftp/lftp | Internet file transfer program | +| wget | Non Interactive network downloader | +| ssh | OpenSSH SSH Client (remote login program) | +| scp | secure copy | +| sftp | Secure File transfer program | + +### Grep commands + +Grep commands are useful to find the errors and debug the logs in the system. It is one of the powerful tools that shell has. + +| - | - | +| :- | :- | +| grep -h ‘.zip’ file.list | . is any character | +| grep -h ‘^zip’ file.list | starts with zip | +| grep -h ‘zip$’ file.list | ends with zip | +| grep -h ‘^zip$’ file.list | containing only zip | +| grep -h ‘[^bz]zip’ file.list | not containing b and z | +| grep -h ‘^[A-Za-z0-9]’ file.list | file containing any valid names | + +### Quantifiers + +Here are some examples of quantifiers: + +| - | - | +| :- | :- | +| ? | match element zero or one time | +| * | match an element zero or more times | +| + | Match an element one or more times | +| {} | match an element specfic number of times | + +### Text processing + +Text processing is another important task in the current IT world. Programmers and administrators can use the commands to dice, cut and process texts. + +| - | - | +| :- | :- | +| cat -A $FILE | To find any CTRL character introduced | +| sort file1.txt file2.txt file3.txt > +final_sorted_list.txt | sort all files once | +| ls - l | sort -nr -k 5 | key field 5th column | +| sort --key=1,1 --key=2n distor.txt | key field 1,1 sort and second column sort +by numeric | +| sort foo.txt | uniq -c | to find repetition | +| cut -f 3 distro.txt | cut column 3 | +| cut -c 7-10 | cut character 7 - 10 | +| cut -d ‘:’ -f 1 /etc/password | delimiter : | +| sort -k 3.7nbr -k 3.1nbr -k 3.4nbr + distro.txt | 3 rd field 7 the character, +3rd field 1 character | +| paste file1.txt file2.txt > newfile.txt | merge two files | +| join file1.txt file2.txt | join on common two fields | + +### Hacks and tips + +In Linux, we can go back to our history of commands by either using simple commands or control options. + +| - | - | +| :- | :- | +| clear | clears the screen | +| history | stores the history | +| script filename | capture all command execution in a file | + + +Tips: + +> History : CTRL + {R, P} +> !!number : command history number +> !! : last command +> !?string : history containing last string +> !string : history containing last string + +``` +export HISTCONTROL=ignoredups +export HISTSIZE=10000 +``` + +As you get familiar with the Linux commands, you will be able to write wrapper scripts. All manual tasks like taking regular backups, cleaning up files, monitoring the system usage, etc, can be automated using scripts. This article will help you to start scripting, before you move to learning advanced concepts. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/the-basic-concepts-of-shell-scripting/ + +作者:[Sathyanarayanan Thangavelu][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/sathyanarayanan-thangavelu/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Shell-scripting.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-Manual-of-date-command.jpg diff --git a/sources/tech/20220524 pdfgrep- Use Grep Like Search on PDF Files in Linux Command Line.md b/sources/tech/20220524 pdfgrep- Use Grep Like Search on PDF Files in Linux Command Line.md new file mode 100644 index 0000000000..1dcbd177c6 --- /dev/null +++ b/sources/tech/20220524 pdfgrep- Use Grep Like Search on PDF Files in Linux Command Line.md @@ -0,0 +1,234 @@ +[#]: subject: "pdfgrep: Use Grep Like Search on PDF Files in Linux Command Line" +[#]: via: "https://itsfoss.com/pdfgrep/" +[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +pdfgrep: Use Grep Like Search on PDF Files in Linux Command Line +====== + +Even if you use the Linux command line moderately, you must have come across the [grep command][1]. + +Grep is used to search for a pattern in a text file. It can do crazy powerful things, like search for new lines, search for lines where there are no uppercase characters, search for lines where the initial character is a number, and much, much more. Check out some [common grep command examples][2] if you are interested. + +But grep works only on plain text files. It won’t work on PDF files because they are binary files. + +This is where pdfgrep comes into the picture. It works like grep for PDF files. Let us have a look at that. + +### Meet pdfgrep: grep like regex search for PDF files + +[pdfgrep][3] tries to be compatible with GNU Grep, where it makes sense. Several of your favorite grep options are supported (such as -r, -i, -n or -c). You can use to search for text inside the contents of PDF files. + +Though it doesn’t come pre-installed like grep, it is available in the repositories of most Linux distributions. + +You can use your distribution’s [package manager][4] to install this awesome tool. + +For users of Ubuntu and Debian-based distributions, use the apt command: + +``` +sudo apt install pdfgrep +``` + +For Red Hat and Fedora, you can use the dnf command: + +``` +sudo dnf install pdfgrep +``` + +Btw, do you run Arch? You can [use the pacman command][5]: + +``` +sudo pacman -S pdfgrep +``` + +### Using pdfgrep command + +Now that pdfgrep is installed let me show you how to use it in most common scenarios. + +If you have any experience with grep, then most of the options will feel familiar to you. + +To demonstrate, I will be using [The Linux Command Line][6] PDF book, written by William Shotts. It’s one of the [few Linux books that are legally available for free][7]. + +The syntax for pdfgrep is as follows: + +``` +pdfgrep [PATTERN] [FILE.pdf] +``` + +#### Normal search + +Let’s try doing a basic search for the text ‘xdg’ in the PDF file. + +``` +pdfgrep xdg TLCL-19.01.pdf +``` + +![simple search using pdfgrep][8] + +This resulted in only one match… But a match nonetheless! + +#### Case insensitive search + +Most of the time, the term ‘xdg’ is used with capitalized alphabetical characters. So, let’s try doing a case-insensitive search. For a case insensitive search, I will use the –ignore-case option. + +You can also use the shorter alternative, which is -i. + +``` +pdfgrep --ignore-case xdg TLCL-19.01.pdf +``` + +![case insensitive search using pdfgrep][9] + +As you can see, I got more matches after turning on case insensitive searching. + +#### Get a count of all matches + +Sometimes, the user wants to know how many matches were found of the word. Let’s see how many times the word ‘Linux’ is mentioned (with case insensitive matching). + +The option to use in this scenario is –count (or -c for short). + +``` +pdfgrep --ignore-case linux TLCL-19.01.pdf --count +``` + +![getting a count of matches using pdfgrep][10] + +Woah! Linux was mentioned 1200 times in this book… That was unexpected. + +#### Show page number + +Regular text files are giant monolithic files. There are no pages. But a PDF file has pages. So, you can see where the pattern was found and on which page. Use the –page-number option to show the page number where the pattern was matched. You can also use the `-n` option as a shorter alternative. + +Let us see how it works with an example. I want to see the pages where the word ‘awk’ matches. I added a space at the end of the pattern to prevent matching with words like ‘awkward’, getting unintentional matches would be *awkward*. Instead of escaping space with a backslash, you can also enclose it in single quotes ‘awk ‘. + +``` +pdfgrep --page-number --ignore-case awk\ TLCL-19.01.pdf +``` + +![show which pattern was found on which page using pdfgrep][11] + +The word ‘awk’ was found twice on page number 333, once on page 515 and once again on page 543 in the PDF file. + +#### Show match count per page + +Do you want to know how many matches were found on which page instead of showing the matches themselves? If you said yes, well it is your lucky day! + +Using the –page-count option does exactly that. As a shorter alternative, you use the -p option. When you provide this option to pdfgrep, it is assumed that you requested `-n` as well. + +Let’s take a look at how the output looks. For this example, I will see where the [ln command][12] is used in the book. + +``` +pdfgrep --page-count ln\ TLCL-19.01.pdf +``` + +![show which page has how many matches using pdfgrep][13] + +The output is in the form of ‘page number: matches’. This means, on page number 4, the command (or rather “pattern”) was found only once. But on page number 57, pdfgrep found 4 matches. + +#### Get some context + +When the number of matches found is quite big, it is nice to have some context. For that, pdfgrep provides some options. + +* –after-context NUM: Print NUM of lines that come after the matching lines (or use `-A`) +* –before-context NUM: Print NUM of lines that are before the matching lines (or use `-B`) +* –context NUM: Print NUM of lines that are before and come after the matching lines (or use `-C`) + +Let’s find ‘XDG’ in the PDF file, but this time, with a little more context ( ͡❛ ͜ʖ ͡❛) + +**Context after matches** + +Using the –after-context option along with a number, I can see which lines come after the line(s) that match. Below is an example of how it looks. + +``` +pdfgrep --after-context 2 XDG TLCL-19.01.pdf +``` + +![using '--after-context' option in pdfgrep][14] + +**Context before matches** + +Same thing can be done for scenarios when you need to know what lines are present before the line that matches. In that case, use the –before-context option, along with a number. Below is an example demonstrating usage of this option. + +``` +pdfgrep --before-context 2 XDG TLCL-19.01.pdf +``` + +![using '--before-context' option in pdfgrep][15] + +**Context around matches** + +If you want to see which lines are present before and come after the line that matched, use the –context option and also provide a number. Below is an example. + +``` +pdfgrep --context 2 XDG TLCL-19.01.pdf +``` + +![using '--context' option in pdfgrep][16] + +#### Caching + +A PDF file consists of images as well as text. When you have a large PDF file, it might take some time to skip other media, extract text and then “grep” it. Doing it often and waiting every time can get frustrating. + +For that reason, the –cache option exists. It caches the rendered text to speed up grep-ing. This is especially noticeable on large files. + +``` +pdfgrep --cache --ignore-case grep TLCL-19.01.pdf +``` + +![getting faster results using the '--cache' option][17] + +While not the be-all and end-all, I carried out a search 4 times. Twice with cache enable and twice without cache enable. To show the speed difference, I used the time command. Look closely at the time indicated by ‘real’ value. + +As you can see, the commands that include –cache option were completed faster than the ones that didn’t include it. + +Additionally, I suppressed the output using the –quiet option for faster completion. + +#### Password protected PDF files + +Yes, pdfgrep supports grep-ing even password-protected files. All you have to do is use the –password option, followed by the password. + +I do not have a password-protected file to demonstrate with, but you can use this option in the following manner: + +``` +pdfgrep --password [PASSWORD] [PATTERN] [FILE.pdf] +``` + +### Conclusion + +pdfgrep is a very handy tool if you are dealing with PDF files and want the functionality of ‘grep’, but for PDF files. A reason why I like pdfgrep is that it tries to be compatible with GNU Grep. + +Give it a try and let me know what you think of pdfgrep. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/pdfgrep/ + +作者:[Pratham Patel][a] +选题:[lkxed][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/pratham/ +[b]: https://github.com/lkxed +[1]: https://linuxhandbook.com/what-is-grep/ +[2]: https://linuxhandbook.com/grep-command-examples/ +[3]: https://pdfgrep.org/ +[4]: https://itsfoss.com/package-manager/ +[5]: https://itsfoss.com/pacman-command/ +[6]: https://www.linuxcommand.org/tlcl.php +[7]: https://itsfoss.com/learn-linux-for-free/ +[8]: https://itsfoss.com/wp-content/uploads/2022/05/01_pdfgrep_normal_search-1-800x308.webp +[9]: https://itsfoss.com/wp-content/uploads/2022/05/02_pdfgrep_case_insensitive-800x413.webp +[10]: https://itsfoss.com/wp-content/uploads/2022/05/03_pdfgrep_count-800x353.webp +[11]: https://itsfoss.com/wp-content/uploads/2022/05/04_pdfgrep_page_number-800x346.webp +[12]: https://linuxhandbook.com/ln-command/ +[13]: https://itsfoss.com/wp-content/uploads/2022/05/05_pdfgrep_pg_count-800x280.webp +[14]: https://itsfoss.com/wp-content/uploads/2022/05/06_pdfgrep_after_context-800x340.webp +[15]: https://itsfoss.com/wp-content/uploads/2022/05/07_pdfgrep_before_context-800x356.webp +[16]: https://itsfoss.com/wp-content/uploads/2022/05/08_pdfgrep_context-800x453.webp +[17]: https://itsfoss.com/wp-content/uploads/2022/05/09_pdfgrep_cache-800x575.webp diff --git a/sources/tech/20220525 Improve network performance with this open source framework.md b/sources/tech/20220525 Improve network performance with this open source framework.md new file mode 100644 index 0000000000..ee1af4ee28 --- /dev/null +++ b/sources/tech/20220525 Improve network performance with this open source framework.md @@ -0,0 +1,138 @@ +[#]: subject: "Improve network performance with this open source framework" +[#]: via: "https://opensource.com/article/22/5/improve-network-performance-pbench" +[#]: author: "Hifza Khalid https://opensource.com/users/hifza-khalid" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Improve network performance with this open source framework +====== +Use Pbench to predict throughput and latency for specific workloads. + +![Mesh networking connected dots][1] + +In the age of high-speed internet, most large information systems are structured as distributed systems with components running on different machines. The performance of these systems is generally assessed by their throughput and response time. When performance is poor, debugging these systems is challenging due to the complex interactions between different subcomponents and the possibility of the problem occurring at various places along the communication path. + +On the fastest networks, the performance of a distributed system is limited by the host's ability to generate, transmit, process, and receive data, which is in turn dependent on its hardware and configuration. What if it were possible to tune the network performance of a distributed system using a repository of network benchmark runs and suggest a subset of hardware and OS parameters that are the most effective in improving network performance? + +To answer this question, our team used [P][2][bench][3], a benchmarking and performance analysis framework developed by the performance engineering team at Red Hat. This article will walk step by step through our process of determining the most effective methods and implementing them in a predictive performance tuning tool. + +### What is the proposed approach? + +Given a dataset of network benchmark runs, we propose the following steps to solve this problem. + +1. Data preparation: Gather the configuration information, workload, and performance results for the network benchmark; clean the data; and store it in a format that is easy to work with +2. Finding significant features: Choose an initial set of OS and hardware parameters and use various feature selection methods to identify the significant parameters +3. Develop a predictive model: Develop a machine learning model that can predict network performance for a given client and server system and workload +4. Recommend configurations: Given the user's desired network performance, suggest a configuration for the client and the server with the closest performance in the database, along with data showing the potential window of variation in results +5. Evaluation: Determine the model's effectiveness using cross-validation, and suggest ways to quantify the improvement due to configuration recommendations + +We collected the data for this project using Pbench. Pbench takes as input a benchmark type with its workload, performance tools to run, and hosts on which to execute the benchmark, as shown in the figure below. It outputs the benchmark results, tool results, and the system configuration information for all the hosts. + +![An infographic showing inputs and outputs for Pbench. Benchmark type (with workload and systems) and performance tools to run along pbench (e.g., sar, vamstat) go into the central box representing pbench. Three things come out of pbench: configuration of all the systems involved, tool results and benchmark performance results][4] + +Image by: (Hifza Khalid, CC BY-SA 4.0) + +Out of the different benchmark scripts that Pbench runs, we used data collected using the uperf benchmark. Uperf is a network performance tool that takes the description of the workload as input and generates the load accordingly to measure system performance. + +### Data preparation + +There are two disjoint sets of data generated by Pbench. The configuration data from the systems under test is stored in a file system. The performance results, along with the workload metadata, are indexed into an Elasticsearch instance. The mapping between the configuration data and the performance results is also stored in Elasticsearch. To interact with the data in Elasticsearch, we used Kibana. Using both of these datasets, we combined the workload metadata, configuration data, and performance results for each benchmark run. + +### Finding significant features + +To select an initial set of hardware specifications and operating system configurations, we used performance-tuning configuration guides and feedback from experts at Red Hat. The goal of this step was to start working with a small set of parameters and refine it with further analysis. The set was based on parameters from almost all major system subcomponents, including hardware, memory, disk, network, kernel, and CPU. + +Once we selected the preliminary set of features, we used one of the most common dimensionality-reduction techniques to eliminate the redundant parameters: remove parameters with constant values. While this step eliminated some of the parameters, given the complexity of the relationship between system information and performance, we resolved to use advanced feature selection methods. + +#### Correlation-based feature selection + +Correlation is a common measure used to find the association between two features. The features have a high correlation if they are linearly dependent. If the two features increase simultaneously, their correlation is +1; if they decrease concurrently, it is -1. If the two features are uncorrelated, their correlation is close to 0. + +We used the correlation between the system configuration and the target variable to identify and cut down insignificant features further. To do so, we calculated the correlation between the configuration parameters and the target variable and eliminated all parameters with a value less than |0.1|, which is a commonly used threshold to identify the uncorrelated pairs. + +#### Feature-selection methods + +Since correlation does not imply causation, we needed additional feature-selection methods to extract the parameters affecting the target variables. We could choose between wrapper methods like recursive feature elimination and embedded methods like Lasso (Least Absolute Shrinkage and Selection Operator) and tree-based methods. + +We chose to work with tree-based embedded methods for their simplicity, flexibility, and low computational cost compared to wrapper methods. These methods have built-in feature selection methods. Among tree-based methods, we had three options: a classification and regression tree (CART), Random Forest, and XGBoost. + +We calculated our final set of significant features for the client and server systems by taking a union of the results received from the three tree-based methods, as shown in the following table. + +| Parameters | client/server | Description | +| :- | :- | :- | +| Advertised_auto-negotation | client | If the linked advertised auto-negotiation | +| CPU(s) | server | Number of logical cores on the machine | +| Network speed | server | Speed of the ethernet device | +| Model name | client | Processor model | +| rx_dropped | server | Packets dropped after entering the computer stack | +| Model name | server | Processor model | +| System type | server | Virtual or physical system | + +#### Develop predictive model + +For this step, we used the Random Forest (RF) prediction model since it is known to perform better than CART and is also easier to visualize. + +Random Forest (RF) builds multiple decision trees and merges them to get a more stable and accurate prediction. It builds the trees the same way CART does, but to ensure that the trees are uncorrelated to protect each other from their individual errors, it uses a technique known as bagging. Bagging uses random samples from the data with replacement to train the individual trees. Another difference between trees in a Random Forest and a CART decision tree is the choice of features considered for each split. CART considers every possible feature for each split. However, each tree in a Random Forest picks only from a random subset of features. This leads to even more variation among the Random Forest trees. + +The RF model was constructed separately for both the target variables. + +### Recommend configurations + +For this step, given desired throughput and response time values, along with the workload of interest, our tool searches through the database of benchmark runs to return the configuration with the performance results closest to what the user requires. It also returns the standard deviation for various samples of that run, suggesting potential variation in the actual results. + +### Evaluation + +To evaluate our predictive model, we used a repeated [K-Fold cross-validation][5] technique. It is a popular choice to get an accurate estimate of the efficiency of the predictive model. + +To evaluate the predictive model with a dataset of 9,048 points, we used k equal to 10 and repeated the cross-validation method three times. The accuracy was calculated using the two metrics given below. + +* R2 score: The proportion of the variance in the dependent variable that is predictable from the independent variable(s). Its value varies between -1 and 1. +* Root mean squared error (RMSE): It measures the average squared difference between the estimated values and the actual values and returns its square root. + +Based on the above two criteria, the results for the predictive model with throughput and latency as target variables are as follows: + +* Throughput (trans/sec): + * R2 score: 0.984 + * RMSE: 0.012 +* Latency (usec): + * R2 score: 0.930 + * RMSE: 0.025 + +### What does the final tool look like? + +We implemented our approach in a tool shown in the following figure. The tool is implemented in Python. It takes as input the dataset containing the information about benchmark runs as a CSV file, including client and server configuration, workload, and the desired values for latency and throughput. The tool uses this information to predict the latency and throughput results for the user's client server system. It then searches through the database of benchmark runs to return the configuration that has performance results closest to what the user requires, along with the standard deviation for that run. The standard deviation is part of the dataset and is calculated using repeated samples for one iteration or run. + +![An infographic showing inputs and outputs for the Performance Predictor and Tuner (PPT). The inputs are client and server sosreports (tarball), workload, and expected latency and throughput. The outputs are latency (usce) and throughput (trans/sec), configuration for the client and the server, and the standard deviation for results.][6] + +Image by: (Hifza Khalid, CC BY-SA 4.0) + +### What were the challenges with this approach? + +While working on this problem, there were several challenges that we addressed. The first major challenge was gathering benchmark data, which required learning Elasticsearch and Kibana, the two industrial tools used by Red Hat to index, store, and interact with [P][7][bench][8] data. Another difficulty was dealing with the inconsistencies in data, missing data, and errors in the indexed data. For example, workload data for the benchmark runs was indexed in Elasticsearch, but one of the crucial workload parameters, runtime, was missing. For that, we had to write extra code to access it from the raw benchmark data stored on Red Hat servers. + +Once we overcame the above challenges, we spent a large chunk of our effort trying out almost all the feature selection techniques available and figuring out a representative set of hardware and OS parameters for network performance. It was challenging to understand the inner workings of these techniques, their limitations, and their applications and analyze why most of them did not apply to our case. Because of space limitations and shortage of time, we did not discuss all of these methods in this article. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/improve-network-performance-pbench + +作者:[Hifza Khalid][a] +选题:[lkxed][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/hifza-khalid +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/mesh_networking_dots_connected.png +[2]: https://distributed-system-analysis.github.io/pbench/ +[3]: https://distributed-system-analysis.github.io/pbench/ +[4]: https://opensource.com/sites/default/files/2022-05/pbench%20figure.png +[5]: https://vitalflux.com/k-fold-cross-validation-python-example/ +[6]: https://opensource.com/sites/default/files/2022-05/PPT.png +[7]: https://github.com/distributed-system-analysis/pbench +[8]: https://github.com/distributed-system-analysis/pbench diff --git a/sources/tech/20220525 Migrate databases to Kubernetes using Konveyor.md b/sources/tech/20220525 Migrate databases to Kubernetes using Konveyor.md new file mode 100644 index 0000000000..274b44e06d --- /dev/null +++ b/sources/tech/20220525 Migrate databases to Kubernetes using Konveyor.md @@ -0,0 +1,198 @@ +[#]: subject: "Migrate databases to Kubernetes using Konveyor" +[#]: via: "https://opensource.com/article/22/5/migrating-databases-kubernetes-using-konveyor" +[#]: author: "Yasu Katsuno https://opensource.com/users/yasu-katsuno" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Migrate databases to Kubernetes using Konveyor +====== +Konveyor Tackle-DiVA-DOA helps database engineers easily migrate database servers to Kubernetes. + +![Ships at sea on the web][1] + +Kubernetes Database Operator is useful for building scalable database servers as a database (DB) cluster. But because you have to create new artifacts expressed as YAML files, migrating existing databases to Kubernetes requires a lot of manual effort. This article introduces a new open source tool named Konveyor [Tackle-DiVA-DOA][2] (Data-intensive Validity Analyzer-Database Operator Adaptation). It automatically generates deployment-ready artifacts for database operator migration. And it does that through datacentric code analysis. + +### What is Tackle-DiVA-DOA? + +Tackle-DiVA-DOA (DOA, for short) is an open source datacentric database configuration analytics tool in Konveyor Tackle. It imports target database configuration files (such as SQL and XML) and generates a set of Kubernetes artifacts for database migration to operators such as [Zalando Postgres Operator][3]. + +![A flowchart shows a database cluster with three virtual machines and SQL and XML files transformed by going through Tackle-DiVA-DOA into a Kubernetes Database Operator structure and a YAML file][4] + +Image by: (Yasuharu Katsuno and Shin Saito, CC BY-SA 4.0) + +DOA finds and analyzes the settings of an existing system that uses a database management system (DBMS). Then it generates manifests (YAML files) of Kubernetes and the Postgres operator for deploying an equivalent DB cluster. + +![A flowchart shows the four elements of an existing system (as described in the text below), the manifests generated by them, and those that transfer to a PostgreSQL cluster][5] + +Image by: (Yasuharu Katsuno and Shin Saito, CC BY-SA 4.0) + +Database settings of an application consist of DBMS configurations, SQL files, DB initialization scripts, and program codes to access the DB. + +* DBMS configurations include parameters of DBMS, cluster configuration, and credentials. DOA stores the configuration to `postgres.yaml` and secrets to `secret-db.yaml` if you need custom credentials. +* SQL files are used to define and initialize tables, views, and other entities in the database. These are stored in the Kubernetes ConfigMap definition `cm-sqls.yaml`. +* Database initialization scripts typically create databases and schema and grant users access to the DB entities so that SQL files work correctly. DOA tries to find initialization requirements from scripts and documents or guesses if it can't. The result will also be stored in a ConfigMap named `cm-init-db.yaml`. +* Code to access the database, such as host and database name, is in some cases embedded in program code. These are rewritten to work with the migrated DB cluster. + +### Tutorial + +DOA is expected to run within a container and comes with a script to build its image. Make sure Docker and Bash are installed on your environment, and then run the build script as follows: + +``` +$ cd /tmp +$ git clone https://github.com/konveyor/tackle-diva.git +$ cd tackle-diva/doa +$ bash util/build.sh +… +docker image ls diva-doa +REPOSITORY   TAG       IMAGE ID       CREATED        SIZE +diva-doa     2.2.0     5f9dd8f9f0eb   14 hours ago   1.27GB +diva-doa     latest    5f9dd8f9f0eb   14 hours ago   1.27GB +``` + +This builds DOA and packs as container images. Now DOA is ready to use. + +The next step executes a bundled `run-doa.sh` wrapper script, which runs the DOA container. Specify the Git repository of the target database application. This example uses a Postgres database in the [TradeApp][6] application. You can use the `-o` option for the location of output files and an `-i` option for the name of the database initialization script: + +``` +$ cd /tmp/tackle-diva/doa +$ bash run-doa.sh -o /tmp/out -i start_up.sh \ +      https://github.com/saud-aslam/trading-app +[OK] successfully completed. +``` + +The `/tmp/out/` directory and `/tmp/out/trading-app`, a directory with the target application name, are created. In this example, the application name is `trading-app`, which is the GitHub repository name. Generated artifacts (the YAML files) are also generated under the application-name directory: + +``` +$ ls -FR /tmp/out/trading-app/ +/tmp/out/trading-app/: +cm-init-db.yaml  cm-sqls.yaml  create.sh*  delete.sh*  job-init.yaml  postgres.yaml  test/ + +/tmp/out/trading-app/test: +pod-test.yaml +``` + +The prefix of each YAML file denotes the kind of resource that the file defines. For instance, each `cm-*.yaml` file defines a ConfigMap, and `job-init.yaml` defines a Job resource. At this point, `secret-db.yaml` is not created, and DOA uses credentials that the Postgres operator automatically generates. + +Now you have the resource definitions required to deploy a PostgreSQL cluster on a Kubernetes instance. You can deploy them using the utility script `create.sh`. Alternatively, you can use the `kubectl create` command: + +``` +$ cd /tmp/out/trading-app +$ bash create.sh  # or simply “kubectl apply -f .” + +configmap/trading-app-cm-init-db created +configmap/trading-app-cm-sqls created +job.batch/trading-app-init created +postgresql.acid.zalan.do/diva-trading-app-db created +``` + +The Kubernetes resources are created, including `postgresql` (a resource of the database cluster created by the Postgres operator), `service`, `rs`, `pod`, `job`, `cm`, `secret`, `pv`, and `pvc`. For example, you can see four database pods named `trading-app-*`, because the number of database instances is defined as four in `postgres.yaml`. + +``` +$ kubectl get all,postgresql,cm,secret,pv,pvc +NAME                                        READY   STATUS      RESTARTS   AGE +… +pod/trading-app-db-0                        1/1     Running     0          7m11s +pod/trading-app-db-1                        1/1     Running     0          5m +pod/trading-app-db-2                        1/1     Running     0          4m14s +pod/trading-app-db-3                        1/1     Running     0          4m + +NAME                                      TEAM          VERSION   PODS   VOLUME   CPU-REQUEST   MEMORY-REQUEST   AGE   STATUS +postgresql.acid.zalan.do/trading-app-db   trading-app   13        4      1Gi                                     15m   Running + +NAME                            TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE +service/trading-app-db          ClusterIP   10.97.59.252            5432/TCP   15m +service/trading-app-db-repl     ClusterIP   10.108.49.133          5432/TCP   15m + +NAME                         COMPLETIONS   DURATION   AGE +job.batch/trading-app-init   1/1           2m39s      15m +``` + +Note that the Postgres operator comes with a user interface (UI). You can find the created cluster on the UI. You need to export the endpoint URL to open the UI on a browser. If you use minikube, do as follows: + +``` +$ minikube service postgres-operator-ui +``` + +Then a browser window automatically opens that shows the UI. + +![Screenshot of the UI showing the Cluster YAML definition on the left with the Cluster UID underneath it. On the right of the screen a header reads "Checking status of cluster," and items in green under that heading show successful creation of manifests and other elements][7] + +Image by: (Yasuharu Katsuno and Shin Saito, CC BY-SA 4.0) + +Now you can get access to the database instances using a test pod. DOA also generated a pod definition for testing. + +``` +$ kubectl apply -f /tmp/out/trading-app/test/pod-test.yaml # creates a test Pod +pod/trading-app-test created +$ kubectl exec trading-app-test -it -- bash  # login to the pod +``` + +The database hostname and the credential to access the DB are injected into the pod, so you can access the database using them. Execute the `psql` metacommand to show all tables and views (in a database): + +``` +# printenv DB_HOST; printenv PGPASSWORD +(values of the variable are shown) + +# psql -h ${DB_HOST} -U postgres -d jrvstrading -c '\dt' +             List of relations + Schema |      Name      | Type  |  Owner   +--------+----------------+-------+---------- + public | account        | table | postgres + public | quote          | table | postgres + public | security_order | table | postgres + public | trader         | table | postgres +(4 rows) + +# psql -h ${DB_HOST} -U postgres -d jrvstrading -c '\dv' +                List of relations + Schema |         Name          | Type |  Owner   +--------+-----------------------+------+---------- + public | pg_stat_kcache        | view | postgres + public | pg_stat_kcache_detail | view | postgres + public | pg_stat_statements    | view | postgres + public | position              | view | postgres +(4 rows) +``` + +After the test is done, log out from the pod and remove the test pod: + +``` +# exit +$ kubectl delete -f /tmp/out/trading-app/test/pod-test.yaml +``` + +Finally, delete the created cluster using a script: + +``` +$ bash delete.sh +``` + +### Welcome to Konveyor Tackle world! + +To learn more about application refactoring, you can check out the [Konveyor Tackle site][8], join the community, and access the source code on [GitHub][9]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/migrating-databases-kubernetes-using-konveyor + +作者:[Yasu Katsuno][a] +选题:[lkxed][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/yasu-katsuno +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/kubernetes_containers_ship_lead.png +[2]: https://github.com/konveyor/tackle-diva/tree/main/doa +[3]: https://github.com/zalando/postgres-operator +[4]: https://opensource.com/sites/default/files/2022-05/tackle%20illustration.png +[5]: https://opensource.com/sites/default/files/2022-05/existing%20system%20tackle.png +[6]: https://github.com/saud-aslam/trading-app +[7]: https://opensource.com/sites/default/files/2022-05/postgreSQ-.png +[8]: https://www.konveyor.io/tools/tackle/ +[9]: https://github.com/konveyor/tackle-diva diff --git a/sources/tech/20220526 Document your source code with Doxygen on Linux.md b/sources/tech/20220526 Document your source code with Doxygen on Linux.md new file mode 100644 index 0000000000..053e300e79 --- /dev/null +++ b/sources/tech/20220526 Document your source code with Doxygen on Linux.md @@ -0,0 +1,254 @@ +[#]: subject: "Document your source code with Doxygen on Linux" +[#]: via: "https://opensource.com/article/22/5/document-source-code-doxygen-linux" +[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Document your source code with Doxygen on Linux +====== +This widely used open source tool can generate documentation from your comments. + +![5 trends in open source documentation][1] + +Image by: Internet Archive Book Images. Modified by Opensource.com. CC BY-SA 4.0 + +When trying to familiarize yourself with someone else's project, you usually appreciate the comments left behind that help you understand the meaning of their code. In the same way, whenever you are programming, whether for yourself or for others, it is good practice to comment your own code. All programming languages offer a special syntax to mark a word, a line, or a whole section as a comment. Those areas are then ignored by the compiler or interpreter when the source code is processed. + +Comments don't take the place of documentation, but there is a way to use your comments to produce documentation easily. Meet [Doxygen][2], an open source tool for generating HTML or LaTeX documentation based on comments in the code. Doxygen enables you to provide a comprehensive overview of the structure of your code without additional effort. While Doxygen is mainly used to document C++, you can use it for many other languages, like C, Objective-C, C#, PHP, Java, Python, and more. + +To use Doxygen, you simply comment your source code in a syntax that Doxygen can read. Doxygen then walks through your source files and creates HTML or LaTeX documentation based on those special comments. The C++ example project below will illustrate how the source code is commented and how the documentation is generated from it. The example is available on [GitHub][3], and I will also include references to different sections of the [Doxygen manual and documentation][4]. + +### Install Doxygen on Linux + +On Fedora, Doxygen is available as a package. Open a terminal and run: + +``` +sudo dnf install doxygen +``` + +On Debian-based systems, you can install it by running: + +``` +sudo apt-get install doxygen +``` + +### Usage + +Once installed, all you need is a project with Doxygen-compatible comments and a Doxyfile, a configuration file that controls the behavior of Doxygen. + +Note: If you stick to the related example project on GitHub, you can omit the next step. + +If there is no `Doxyfile` yet, you can simply let Doxygen generate a standard template. To do so, navigate to the root of your project and run: + +``` +doxygen -g +``` + +The `-g` stands for generate. You should now notice a newly created file called `Doxyfile`. You can invoke Doxygen by simply running: + +``` +doxygen +``` + +You should now notice two newly created folders: + +* html/ +* latex/ + +By default, Doxygen outputs LaTeX-formatted documentation as well as HTML-based documentation. In this article, I will focus only on HTML-based documentation. You can find out more about LaTeX output in the official Doxygen documentation, in the *Getting started* section. + +Double click on `html/index.html` to open the actual HTML documentation. With a blank configuration, it probably looks like the screenshot below: + +![A screenshot of a doxygen generated main page on Firefox. The content field under My Project Documentation is blank.][6] + +Now it's time to modify the `Doxyfile` and add some special comments to the source code. + +### Doxyfile + +The `Doxyfile` allows you to define tons of adjustment possibilities, so I will describe only a very small subset. The settings correspond to the `Doxyfile` of the example project. + +#### Line 35: Project name + +Here you can specify the project name, which will be visible in the header line and the browser tab. + +``` +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME           = "My Project" +``` + +#### Line 47: Project brief description + +The brief description will also be shown in the header but in a smaller font. + +``` +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF          = "An example of using Doxygen in C++" +``` + +#### Line 926: Inclusion of subdirectories + +Allow Doxygen to walk recursively through subdirectories to find source and documentation files. + +``` +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES +``` + +#### Line 1769: Disable LaTeX output + +If you are just interested in the HTML output, you can disable the LaTeX code generation using this switch. + +``` +# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. + +# The default value is: YES. + +GENERATE_LATEX = NO +``` + +After every change, you can run Doxygen again to check whether your changes have had the desired effect. If you just want to check which modification an existing `Doxyfile` has, invoke Doxygen with the `-x` switch: + +![A screenshot of the terminal showing the differences, Project Name, Project Brief, Recursive, and status of Generate Latex][7] + +As with the command `diff`, Doxygen displays only the differences between the actual Doxyfile and the template. + +### Special comments + +Doxygen reads the sources and checks each file for special comments. Based on those comments and keywords, it builds up the HTML documentation. The anatomy of the special comments can be well explained using the header file of the class ByteStream, as shown in the GitHub example linked above. + +I will look at the constructor and destructor as an example: + +``` +/*! @brief Constructor which takes an external buffer to operate on +* +* The specified buffer already exist. +* Memory and size can be accessed by buffer() and size(). +* +* @param[in] pBuf Pointer to existing buffer +* @param[in] size Size of the existing buffer +*/ + +ByteStream(char* pBuf, size_t size) noexcept; +``` + +There are different flavors of formatting a special comment block. I prefer to start the comment in the Qt-style (`/*!` ) and add an asterisk (`*` ) before each line. The block then ends with an asterisk followed by a forward slash (`*/` ). To get an overview of the different style options, refer to the Doxygen manual, in the section *Documenting the code*. + +Comments in Doxygen are divided into two sections, a brief description and a detailed description. Both sections are optional. In the code sample above, the comment block refers to the following line of code, the declaration of a constructor. The sentence behind the `@brief` will be shown in the compact class overview: + +![A screenshot of the C++ example of using Doxygen showing the Byte Stream Class Reference. The categories in the list are public member functions, writing (operators for writing to the stream), and reading (operators for reading from the stream)][8] + +After a blank line (blank lines are treated as paragraph separators), the actual documentation for the constructor begins. With the `@param[in/out]` keyword, you can mark the arguments passed to the constructor, and Doxygen will make a clear argument list from it: + +![Screenshot of the Doxygen example showing the parameters under ByteStream][9] + +Note that Doxygen automatically creates a link to the mentioned `buffer()` and `size()` method in the comment. In contrast, the comment before the destructor declaration won't have any effect on Doxygen as it is not recognized as a special comment: + +``` +// Destructor +~ByteStream(); +``` + +Now you have seen 90% of the magic. By using a slightly modified syntax for your comments, you can convert them into special comments that Doxygen can read. Furthermore, by using a few keywords, you can advance the formatting. In addition, Doxygen has some special features, which I will highlight in the following section. + +### Features + +Most of the work is already done via your regular commenting on the source code. But with a few tweaks, you can easily enhance the output of Doxygen. + +#### Markdown + +For advanced formatting, Doxygen supports Markdown syntax and HTML commands. There is a Markdown cheat sheet available in the [download section][10] of opensource.com. + +#### Mainpage + +Aside from your customized header, you will get a mostly empty page when you open `html/index.html`. You can add some meaningful content to this empty space by using specific keywords. Because the main page is usually not dedicated to a particular source code file, you can add an ordinary text file containing the content for the main page into the root of your project. You can see this in the example on GitHub. The comments in there produce the following output: + +![The Doxygen Example Documentation field now contains headings and documentation: Introduction, Running the example, System requirements, and Building the code, with step by step examples and code snippets (all can be found in the example on GitHub)][11] + +#### Automatic link generation + +As noted above, Doxygen automatically figures out when you are referring to an existing part of the code and creates a link to the related documentation. Be aware that automatic link creation only works if the part you refer to is documented as well. + +More information can be found in the official documentation, under *Automatic link generation*. + +#### Groups + +The ByteStream class has overloaded stream operators for writing (`<<` ) and reading (`>>` ). In the class overview in the **Special comments** section above, you can see that the operator declarations are grouped as Writing and Reading. These groups are defined and named in the ByteStream header file. + +Grouping is done using a special syntax: You start a group with `@{` and end it with `}@`. All members inside those marks belong to this group. In the header `ByteStream.h` it is implemented as follows: + +``` +/** @name Writing +* Operators for writing to the stream +* @{ +*/ + +(...) + +/** @} +* @name Reading +* Operators for reading from the stream +* @{ +*/ + +(...) + +/** @} */ +``` + +You can find more information about grouping in the Doxygen documentation, under *Grouping*. + +#### LLVM Support + +If you are building with [Clang][12], you can apply the flag `-Wdocumentation` to the build process to let Clang check your special comments. You can find more information about this feature in the LLVM Users Manual or in Dmitri Gribenko's presentation, both on the Clang website. + +### Where Doxygen is used + +Doxygen was first released in 1997, so it has been already around for some years. Despite its age, many projects use Doxygen to create their documentation. Some examples are NASA's [F Prime][13] flight software framework, the image processing library [OpenCV][14], and the package manager [RPM][15]. You can also find the Doxygen syntax in other areas, like in the documentation standards of the content management platform [Drupal][16]. + +A caveat: One drawback of using Doxygen is that it outputs HTML documentation with the look and feel of web pages from the nineties. It is also hard to depict the architecture of meta and template programming using Doxygen. For those cases, you would probably choose [Sphinx][17] over Doxygen. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/document-source-code-doxygen-linux + +作者:[Stephan Avenwedde][a] +选题:[lkxed][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/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/documentation-type-keys-yearbook.png +[2]: https://www.doxygen.n/ +[3]: https://github.com/hANSIc99/DoxygenSample +[4]: https://www.doxygen.nl/manual/ +[5]: https://opensource.com/downloads/doxygen-cheat-sheet +[6]: https://opensource.com/sites/default/files/2022-05/main%20page%20doxy.png +[7]: https://opensource.com/sites/default/files/2022-05/doxygen%20class%20overview.png +[8]: https://opensource.com/sites/default/files/2022-05/actual%20doxy%20byte%20stream%20class.png +[9]: https://opensource.com/sites/default/files/2022-05/argument%20list%20from%20Doxygen.png +[10]: https://opensource.com/downloads/cheat-sheet-markdown +[11]: https://opensource.com/sites/default/files/2022-05/main%20page%20doxygen.png +[12]: https://clang.llvm.org/ +[13]: https://github.com/nasa/fprime +[14]: https://docs.opencv.org/4.5.5/index.html +[15]: https://github.com/rpm-software-management/rpm +[16]: https://www.drupal.org/docs/develop/standards/api-documentation-and-comment-standards +[17]: https://opensource.com/article/18/11/building-custom-workflows-sphinx +[18]: https://opensource.com/downloads/doxygen-cheat-sheet diff --git a/sources/tech/20220526 Garuda Linux- All-Rounder Distro Based on Arch Linux.md b/sources/tech/20220526 Garuda Linux- All-Rounder Distro Based on Arch Linux.md new file mode 100644 index 0000000000..8862a57bb2 --- /dev/null +++ b/sources/tech/20220526 Garuda Linux- All-Rounder Distro Based on Arch Linux.md @@ -0,0 +1,154 @@ +[#]: subject: "Garuda Linux: All-Rounder Distro Based on Arch Linux" +[#]: via: "https://www.debugpoint.com/2022/05/garuda-linux-review-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Garuda Linux: All-Rounder Distro Based on Arch Linux +====== +A review of the Arch Linux based Garuda Linux, which brings a collection of desktop environments, window managers, and tools for general users and gamers. + +I have been planning to review Garuda Linux for a long time. But never got into it due to several reasons. Over the years, we [reviewed][1] a couple of Arch-based distros – spread across new ones, stables distros and more. Each one of them is a little different from the others. Finally, we review the Garuda Linux in 2022 – it’s our first review of this distro, and we will continue with all the major releases. + +![Garuda Linux Desktop (2022)][2] + +### What does it offer? + +There are many customized and easy-to-use Arch-based Linux distributions available. Every one of those tries to present something new other than just another variant of Arch Linux. + +Garuda Linux does offer a few new features compared to others. Firstly, it brings almost all popular desktops and window managers such as KDE, Xfce, GNOME, LXQt-kwin, Cinnamon, Mate, Wayfire, Qtile, i3wm and Sway. Second, it offers the default BTRFS file system with zstd compression for better performance. In addition, it provides the popular Chaotic-Aur, which contains a vast collection of pre-compiled binaries from AUR. Moreover, a group of hand-picked themes, icons and cursors give Garuda Linux an edge over the other Arch-based distros. + +Finally, its primary selling point is its pre-made for Gaming in Arch Linux with native apps such as Garuda Gamer and the option for Zen Kernel. + +### Garuda Linux Review – 2022 Edition + +This review is based on Garuda’s default offering, i.e. Garuda dragonized zen kernel with KDE Plasma (April 28, 2022 iso). + +#### Download and Installation + +![Garuda Linux – boot screen][3] + +The download via torrent was fast without any problems. The LIVE boot gives you whether you want to boot using the open-source or NVIDIA drivers. Finally, the welcome screen is well designed and gives you clear instructions to launch the installer. + +Garuda offers separate ISO files for different desktops and window managers. Because a massive set of packages pre-loaded in ISO files also gives you the option for the LITE version with KDE Plasma. The LITE versions are the base Garuda Linux without additional theming and packages. + +So, pick the one you want for your needs. + +Garuda Linux uses Calamares installer. The Calamares are not configured heavily, and installation is pretty straightforward. However, Calamares doesn’t give you the option to choose the desktop environments or packages. As I mentioned above, it has a separate installer for each of those. + +During my test, the installation went smooth, and it took around 5 minutes for launching the LIVE medium to installation completion in an Intel i5, 8 GB, SSD configuration. It’s blazing fast, in my opinion. + +#### Look and Feel + +After the successful installation, you see a nice login screen (SDDM with themes). It is well designed and aligned with Garda Linux’s design patterns. + +![The Login screen (SDDM) of Garuda Linux][4] + +The KDE Plasma desktop is heavily customized in terms of look in Garuda Linux. Firstly, the Latte dock is well placed with essential shortcuts at the bottom. No unnecessary shortcuts are there, which is nice. + +![Garuda Linux Desktop with Latte dock][5] + +Second, at the top bar, you get the application menu of KDE Plasma with Latte dock widgets. All the widgets are well placed and necessary for all user bases. By default, the top bar contains NEtSpeed widgets, clipboard and volume controls and the event calendar widget of the Latte dock. + +Garuda Linux uses Kvantum theme engine with “sweetified-plasma” theme with kvantum-dark application style, giving it its unique look. In addition, the famous BeautyLine icon theme provides the much-needed contrast (as designed) to this distro. + +#### Initial Setup and Applications + +Firstly, the initial setup gives you several options to quickly configure your desktop before your first use. A series of terminal-based operations is provided by its welcome applications such as system upgrades, etc. + +The welcome application gives an assorted list of Garuda utilities, ranging from system configurations to changing looks. It includes system cleaner, partition manager, Chaotic-aur managers, Gaming utilities, etc. + +Not only that, but it also provides access to Garuda services for its users directly from the desktop. It helps new to advanced users in terms of discovery of the services and features. + +![Garuda Welcome App][6] + +Now, I would like to highlight two crucial apps in this Garuda Linux review. First, the Snapper tool gives you controls to create a system restore points using several options. If your system breaks at some point, you can always restore it to a stable state using this utility. This is one of the much-needed applications, considering it’s a rolling release. + +![The Snapper Tools for system restore points][7] + +Second, the Octopi software manager (similar to synaptic) gives you access to all necessary packages in the Arch repo. You can easily install with one click after verifying the dependencies. Moreover, it also gives you the ability to add and remove Arch repositories via GUI. It’s worth mentioning here that Garuda includes “chaotic-aur” and “multilib” repo by default in addition to the typical “community”, “extra”, and “core” repo. + +![Octopi Software Manager][8] + +#### The Browser + +Garuda doesn’t provide a Firefox web browser by default. It includes the customized LibreWolf-based [FireDragon][9] web browser, which integrates well with the KDE Plasma desktop. In addition, UBlock Origin and Dark Reader add-ons are pre-installed in FireDragon. The FireDragon web browser uses Garuda’s server for searching the web. I am not entirely sure whether it connects to Google in the backend. + +![FireDragon Web browser][10] + +In addition to the above apps, Garuda uses the advanced Fish shell for command line work. However, LibreOffice and other graphical utilities are not installed by default. + +#### Performance and Resource Usage + +Garuda is a little resource heavy, even in an idle state. It consumed around 17% of CPU and RAM usage of approximately 1.2 GB at idle. And if you open more apps, then it will further shoot up. + +The htop shows that most of the idle state resources are consumed by KWin. I am not sure why there are five forks of KWin running (perhaps for Kvuntam and other theming). I cross-checked this with a standard Plasma installation, where only one process of KWin runs. + +The default KDE Plasma edition of Garuda Linux takes around 6.4 GB of disk space. + +![Garuda Linux Performance – Idle State][11] + +With the above performance metric, you may not be able to run it in low-end hardware. For better performance, I recommend using an Intel i7 or similar system with at least 8GB of memory. However, the official system requirement states 4 GB of memory as below. + +* 30 GB storage space +* 4 GB RAM +* Video card with OpenGL 3.3 or better +* 64-bit system + +Also, it is worth mentioning that other flavours such as GNOME, Cinnamon etc, should have much better performance metrics. + +### Things which grabbed my attention + +Garuda requires 30 GB of disk space, which I overlooked before installing. And it also seems a hard requirement, and the Calamares installer is configured that way. So, you have to have a minimum of 30 GB of root partition to install this version of Garuda Linux. + +Moreover, it takes around 6 GB of disk space for a default install, and I am not sure why the 30 GB limit is too hardcoded in the installer. + +![Garuda Linux requires min 30 GB disk space for installation][12] + +While Garuda Linux looks wonderful, I feel the default theming and colour contrast are a little “too much”. It feels excellent with high contrast colours on a dark backdrop at first look. But it does look a little “fanboy” type. Although look and feel are subjective, everyone has a different taste. + +But always, you can change the themes, icons and whatnot with just a click in KDE Plasma. + +### Closing Notes + +Finally, to wrap up the Garuda Linux review of 2022, I must say it is one of the Arch-based distros which stands out from the other distros in the same category. Due to its popularity and active participation from the user base, it shall not be discontinued in the future. + +From a general user’s perspective, community help is available via several active channels (which can be accessed via shortcuts from the welcome screen). + +If you are keen on gaming, zen Kernel and passionate about Arch Linux, you can choose Garuda. The use case of this distro may vary. I would not recommend it for serious development, projects, media related work. + +Then again, Garuda undoubtedly brings unique apps to manage Arch Linux, which is also a plus point. If you need a fancy looking Arch-based distro to start your Linux journey, it’s perfect. + +That said, you can download Garuda Linux from the [official website][13]. + +And do let me know your opinion about Garuda in the comment box down below. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/garuda-linux-review-2022/ + +作者:[Arindam][a] +选题:[lkxed][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/lkxed +[1]: https://www.debugpoint.com/tag/linux-distro-review +[2]: https://www.debugpoint.com/wp-content/uploads/2022/05/Garuda-Linux-Desktop-2022.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Garuda-Linux-boot-screen.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/05/The-Login-screen-SDDM-of-Garuda-Linux.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/05/Garuda-Linux-Desktop-with-Latte-dock.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/Garuda-Welcome-App.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/05/The-Snapper-Tools-for-system-restore-points.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/Octopi-Software-Manager.jpg +[9]: https://github.com/dr460nf1r3/firedragon-browser +[10]: https://www.debugpoint.com/wp-content/uploads/2022/05/FireDragon-Web-browser.jpg +[11]: https://www.debugpoint.com/wp-content/uploads/2022/05/Garuda-Linux-Performance-Idle-State.jpg +[12]: https://www.debugpoint.com/wp-content/uploads/2022/05/Garuda-Linux-requires-min-30-GB-disk-space-for-installation.jpg +[13]: https://garudalinux.org/downloads.html diff --git a/sources/tech/20220526 Shell Scripting is Still Going Strong.md b/sources/tech/20220526 Shell Scripting is Still Going Strong.md new file mode 100644 index 0000000000..f4a5b767cd --- /dev/null +++ b/sources/tech/20220526 Shell Scripting is Still Going Strong.md @@ -0,0 +1,198 @@ +[#]: subject: "Shell Scripting is Still Going Strong" +[#]: via: "https://www.opensourceforu.com/2022/05/shell-scripting-is-still-going-strong/" +[#]: author: "Bipin Patwardhan https://www.opensourceforu.com/author/bipin-patwardhan/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Shell Scripting is Still Going Strong +====== +This article introduces you to the basics of shell scripting and its importance in day-to-day life. A shell script is a command-line interpreter that runs on a UNIX/Linux shell. + +![Penguin-with-linux-command][1] + +The first thing we notice when we log into a UNIX/Linux system is the blinking cursor next to the $ sign. This is the shell. It has been – for many decades – the ubiquitous (and many times the only) interface to interact with a computer. Before the advent and popularity of graphical user interfaces (GUIs), the terminal and the shell were the only mechanism to make the computer do what we wanted it to do. At first glance, one may wonder what the shell does – other than passing commands to the underlying operating system for execution. Most of us are familiar with commands like ‘ls’ (for listing contents of a directory), ‘cd’ (for changing the current directory), and so on. It is through the shell that we can execute these commands. The shell understands the text we type — converts it into tokens — and then executes them on the operating system. + +### Flavours + +Initially, the terminal started with the humble Bourne shell or ‘sh’. Over the years, many shell variants were developed and used. Some of the popular ones are ‘C Shell’ / ‘csh’ and ‘Korn Shell’ / ‘ksh’. ‘sh’ fell out of favour for a few years, but has gained popularity once again through its recent avatar, namely ‘bash’ / ‘Bourne Again Shell’. + +### What does the shell actually do? + +The shell is the immediate interface between the operating system (OS) and the user. We make the computer do what we want, by using commands and applications supported by the tools installed on the computer we are using. Some commands are applications installed on the operating system, while some are built into the shell itself. Some of the commands built into bash are ‘clear’, ‘cd’, ‘eval’, and ‘exec’, to name a few, while commands like ‘ls’, and ‘mkdir’ are applications. The commands built into the shell vary as per the shell. + +In this article, we cover a few aspects related to ‘bash’. + +### More about the shell + +Most of us have used commands like ‘ls’, ‘cd’, and ‘mkdir’. When we run the ‘ls -l’ command on a directory, all the directories and files in that directory are listed on the screen. If the number is large, the screen scrolls. If the terminal does not support scroll bars (as was the case for many years), there is no way to look at the entries that have scrolled past. To help overcome this, we use commands like ‘more’ and ‘less’. These allow us to view the output on a page-by-page basis. The command typically used is: + +``` +ls -l | less +``` + +What is the shell doing here? What looks like a single command is actually two commands executing one after the other, ls and less. The pipe (‘|’) connects the two programs, but the connection is managed by the shell. Because of the pipe character, the shell connects the two programs – it connects the standard output of the ls command and connects it to the standard input or standard in or stdin of less. The pipe feature allows us to take the output of any program and provide it as the input to another program – without us having to do any changes to the programs. This is the philosophy of many UNIX/Linux applications — keep the applications simple and then combine many applications together to achieve the end result, rather than having one program do many things. + +If needed, we can redirect the output of ls to a file and then view it using ‘vi’. For this, we use the command: + +``` +ls -l > /tmp/my_file.txt +vi /tmp/my_file.txt +``` + +In this case, the output of ls is being redirected to a file. This is managed by the shell, which understands the ‘>’ symbol to mean redirection. It treats the token that follows as a file. + +### Automation using shell + +This ability to combine commands is one of the key elements for the creation of automation scripts using shell commands. In my most recent project, we were executing Python/Spark (PySpark) applications using cluster mode. Each application executed many structured query language (SQL) statements – SparkSQL. To keep track of application progress, we were printing details about the SQL being executed. This allowed us to maintain a log of what was happening in the application. As the applications were executed in cluster mode, to view the log, we had to use the yarn command as follows: + +``` +yarn log –applicationId [application_id] +``` + +In most cases, the log produced by an application was very large. So we typically piped the log to ‘less’ or redirected it to a file. The command we used was: + +``` +yarn log –aplicationId [application_id] | less +``` + +Our development team had a strength of 40 people. Each one had to remember this command. To make it simpler, I converted this command into a bash script. For this, I created a file with a ‘.sh’ extension. On UNIX and Linux systems, file extension does not matter. As long as the file is an executable, it will work. Extensions have significance on MS Windows. + +### Important thing to remember + +The shell is an interpreter. This means that it will read the program line by line and execute it. The limitation of this approach is that errors (if any) are not identified upfront. Errors are not identified till they are read and executed by the interpreter. In short, we can have a shell program that will execute perfectly for the first 20 lines and then fail due to a syntax error on line 21. When the script fails at line 21, the shell does not unroll/undo the previous steps. When such a thing occurs, we have to correct the script and start execution from the first line. Thus, as an example, if we have deleted a few files before encountering an error, execution of the shell script will stop, but the files are gone forever. + +The script I created was: + +``` +#!/bin/bash +yarn log –applicationId 123 | less +``` + +…where 123 was the application ID. + +The first two characters of the first line are magic characters. They tell the script that this is an executable file and the line contains the name of the program to be used for execution. The remaining lines of the script are passed to the program mentioned. In this case, we are going to execute bash. Even after including the first line, we have to apply execute permissions to the file using: + +``` +chmod +x my_file.sh +``` + +After giving execute permissions to the file, we can execute it as: + +``` +./my_file.sh +``` + +If we do not give execute permissions to the file, we can execute the script as: + +``` +sh ./my_file.sh +``` + +### Passing parameters + +You will realise quickly that such a script is handy, but becomes useless immediately. Each time we execute the Python/Spark application, a new ID is generated. Hence, for each run, we have to edit the file and add the new application ID. This definitely reduces the usability of the script. To be useful, we should be passing the application ID as a parameter: + +``` +#!/bin/bash +yarn –log -applicationId ${1} | less +``` + +We need to execute the script as: + +``` +./show_log.sh 123 +``` + +The script will execute the yarn command, fetch the log for the application and allow us to view it. + +What if we want to redirect the output to a file? Not a problem. Instead of sending the output to less, we can redirect it to a file: + +``` +#!/bin/bash +ls –l ${1} > ${2} +view ${2} +``` + +To run the script, we have to provide two parameters, and the command becomes: + +``` +./my_file.sh /tmp /tmp/listing.txt +``` + +When executed, $1 will bind to /tmp and $2 will bind to /tmp/listing.txt. For the shell, the parameters are named from one to nine. This does not mean we cannot pass more than nine parameters to a script. We can, but that is the topic of another article. You will note that I have mentioned the parameters as ${1} and ${2} instead of $1 and $2. It is a good practice to enclose the name of the parameter in curly brackets as it allows us to unambiguously combine the parameters as part of a longer variable. For example, we can ask the user to provide file name as a parameter and then use that to form a larger file name. As an example, we can take $1 as the parameter and create a new file name as ${1}_student_names.txt. + +### Making the script robust + +What if the user forgets to provide parameters? The shell allows us to check for such conditions. We modify the script as below: + +``` +#!/bin/bash +if [ -z “${2}” ]; then +echo “file name not provided” +exit 1 +fi +if [ -z “${1}” ]; then +echo “directory name not provided” +exit 1 +fi +DIR_NAME=${1} +FILE_NAME=${2} +ls -l ${DIR_NAME} > /tmp/${FILE_NAME} +view /tmp/${FILE_NAME} +``` + +In this program, we check if the proper parameters are passed. We exit the script if parameters are not passed. You will note that I am checking the parameters in reverse order. If we check for the presence of the first parameter before checking the presence of the second parameter, the script will pass to the next step if only one parameter is passed. While the presence of parameters can be checked in ascending order, I recently realised that it might be better to check from nine to one, as we can provide proper error messages. You will also note that the parameters have been assigned to variables. The parameters one to nine are positional parameters. Assigning positional parameters to named parameters makes it easy to debug the script in case of issues. + +### Automating backup + +Another task that I automated was that of taking a backup. During development, in the initial days, we did not have a version control system in place. But we needed to have a mechanism to take regular backups. So the best method was to write a shell script that, when executed, copied all the code files into a separate directory, zipped them and then uploaded them to HDFS, using the date and time as the suffix. I know that this method is not as clean as having a version control system, as we store complete files and finding differences still needs the use of a program like diff; however, it is better than nothing. While we did not end up deleting the code files, the team did end up deleting the bin directory where the helper scripts were stored!!! And for this directory I did not have a backup. I had no choice but to re-create all the scripts. + +Once the source code control system was in place, I easily extended the backup script to upload the files to the version control system in addition to the previous method uploading to HDFS. + +### Summing up + +These days, programming languages like Python, Spark, Scala, and Java are in vogue as they are used to develop applications related to artificial intelligence and machine learning. While these languages are far more powerful when compared to shells, the ‘humble’ shell provides a ready platform that allows us to create helper scripts that ease our day-to-day tasks. The shell is quite powerful, more so because we can combine the powers of all the applications installed on the OS. As I found out in my project, even after many decades, shell scripting is still going strong. I hope I have convinced you to give it a try. + +### One for the road + +Shell scripts can be very handy. Consider the following command: + +``` +spark3-submit --queue pyspark --conf “spark.yarn.principal= abcd@abcd.com --conf “spark.yarn.keytab=/keytabs/abcd.keytab --jars /opt/custom_jars/abcd_1.jar --deploy-mode cluster --master yarn $* +``` + +We were expected to use this command while executing a Python/Spark application. Now imagine this command has to be used multiple times a day, by a team of 40 people. Most of us will copy this command in Notepad++, and each time we need to use it, we will copy it from Notepad++ and paste it on the terminal. What if there is an error during copy paste? What if someone uses the parameters incorrectly? How do we debug which command was used? Looking at history does not help much. +To make it simple for the team to get on with the task of Python/Spark application execution, we can create a bash shell script as follows: + +``` +#!/bin/bash +SERVICE_PRINCIPAL=abcd@abcd.com +KEYTAB_PATH=/keytabs/abcd.keytab +MY_JARS=/opt/custom_jars/abcd_1.jar +MAX_RETRIES=128 +QUEUE=pyspark +MASTER=yarn +MODE=cluster + +spark3-submit --queue ${QUEUE} --conf “spark.yarn.principal=${SERVICE_PRINCIPAL} --conf “spark.yarn.keytab=${KEYTAB_PATH} --jars ${MY_JARS} --deploy-mode ${MODE} --master ${MASTER} $* +``` + +This demonstrates how powerful a shell script can be and make our life easy. You can try more commands and scripts as per your requirement and explore further. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/shell-scripting-is-still-going-strong/ + +作者:[Bipin Patwardhan][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/bipin-patwardhan/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Penguin-with-linux-command.jpg diff --git a/sources/tech/20220526 Write C applications using Vely on Linux.md b/sources/tech/20220526 Write C applications using Vely on Linux.md new file mode 100644 index 0000000000..858cd4ed19 --- /dev/null +++ b/sources/tech/20220526 Write C applications using Vely on Linux.md @@ -0,0 +1,306 @@ +[#]: subject: "Write C applications using Vely on Linux" +[#]: via: "https://opensource.com/article/22/5/write-c-appplications-vely-linux" +[#]: author: "Sergio Mijatovic https://opensource.com/users/vely" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Write C applications using Vely on Linux +====== +Vely is an open source tool for writing web and command-line applications in C on major Linux distributions. + +![Women in computing and open source][1] + +Image by: Ray Smith + +Vely is a tool for writing web and command-line applications in C. Vely combines high performance and the low footprint associated with C programming with ease of use and improved safety reminiscent of languages like PHP. It's free and open source software, and licensed under GPLv3 and LGPL 3 for libraries, so you can even build commercial software with it. + +Vely works on major Linux distributions and processor architectures. You can use webservers, such as Apache, Nginx, or others, and databases such as MariaDB, PostgreSQL, and SQLite. + +You can use Vely for web applications, command-line programs, as middleware, database applications, services software, data integration, IoT (Internet of Things), and anywhere else. It's well suited for the cloud, works easily in a container, and, due to low resource requirements, it's also a good choice when memory and processing power are at a premium. + +### Install Vely + +To try Vely, install the Apache webserver and [MariaDB database][2]. You can use a different webserver and database, and the setup would be similar, but in this example, I use Apache and MariaDB. + +Next, install Vely. On Linux use a package manager such as `dnf` or `apt`. + +### Stock tickers project + +This example saves the names of stock tickers and their prices so you can view them in a list. + +Start by creating `stock.v` file, and paste this code into it: + +``` +#include "vely.h" + +void stock() { +   out-header default +   @ +       @ +       input-param action +       input-param stock_name +       input-param stock_price +       if (!strcmp (action, "add")) { +          // Add to stock table, update if stock exists +          run-query#add_data@db = "insert into stock (stock_name,\ +              stock_price) values ('%s', '%s') on duplicate key \ +              update stock_price='%s'" : stock_name, stock_price, \ +              stock_price +           end-query +           error#add_data to define err +           if (strcmp (err, "0")) { +               report-error "Cannot update stock price, error [%s]", err +           } +           @
+              @Stock price updated! +           @
+       } else if (!strcmp (action, "show")) { +         // Show stock names and values +           @ +               @ +                   @ +                   @ +               @ +               run-query#show_data@db = "select stock_name, \ +                    stock_price from stock" output stock_name, \ +                    stock_price +                   @ +                       @ +                       @ +                   @ +               end-query +           @
Stock nameStock price
+                       query-result#show_data, stock_name +                       @ +                       query-result#show_data, stock_price +                       @
+       } else { +           @
Unrecognized request!
+       } +       @ +   @ +} +``` + +### Build the database + +For this example, create a database named `dbstock`, owned by user `vely` with the password `your_password`. These are arbitrary names, and in real life, you can use whatever values you want, as long as they're consistent throughout your code. + +First, log in to the MariaDB database as root and execute this: + +``` +CREATE DATABASE IF NOT EXISTS dbstock; +FLUSH privileges; +CREATE USER IF NOT EXISTS vely@localhost IDENTIFIED BY 'your_password'; +FLUSH privileges; +GRANT ALL privileges ON dbstock.* TO vely@localhost; +FLUSH privileges; +exit; +``` + +Now log in to MariaDB again and set the current database: + +``` +$ mysql -u vely -pyour_password +``` + +Now you can create the database objects needed for the application. You need a `stock` table in the `dbstock` database for this example. + +``` +USE dbstock; +CREATE TABLE IF NOT EXISTS stock (stock_name VARCHAR(100) PRIMARY KEY, stock_price BIGINT); +``` + +Finally, create a database configuration file named `db` so that your application can log into the database. You must call it `db` because that's what the code in `stock.v` uses. For instance: + +``` +[...] +run-query#add_data@db = "insert into stock ..." +[...] +``` + +The database name is preceded by the `@` sign, in this case, `@db`, so the name of the database configuration file is `db`. As with other values, you can name your database configuration file whatever you want, as long as your code is consistent. + +Here's the configuration for the `db` file: + +``` +[client] +user=vely +password=your_password +database=dbstock +``` + +The above is a standard MariaDB [client options file][3]. Vely uses native database connectivity, so you can specify any options a given database allows. + +### Build the application + +Next, you can create your Vely application. For this example, you're going to create a web app called `stockapp` : + +``` +$ sudo vf -i -u $(whoami) stockapp +``` + +This creates an application home under the Vely directory (`/var/lib/vv` ) and performs the required application setup steps for you. + +To build your application, use the `vv` command: + +``` +$ vv -q --db=mariadb:db stockapp +``` + +Here's what each option means: + +* -q builds an application +* --db specifies the database to be used (mariadb:db, as specified in your configuration file) +* stockapp is the application name + +You can actually use any number of databases and different vendors in your application. This example is simple, though, so you only need one database. Vely has many other useful options you can use, but this is sufficient for now. + +### Configure web access + +To access your application via a web browser or various web clients, you need to set up a webserver. It can be Apache, Nginx, or any other server that supports FastCGI proxying (most, if not all, webservers and load balancers do this). Here, I will set up Apache, but the setup is similar for other webservers. + +The `proxy` and `proxy_fcgi` modules are installed and enabled by default on the Fedora install of the Apache web server, but you must enable them on Debian-based systems (like Ubuntu): + +``` +$ sudo a2enmod proxy +$ sudo a2enmod proxy_fcgi +$ sudo systemctl restart apache2 +``` + +If you're not on a Debian-based system, you can enable an Apache module by adding it to the Apache configuration file or in a file in the `/etc/httpd/conf.modules.d/` directory, depending on your distribution's configuration. + +Next, open your Apache configuration file in a text editor. For example, on a Debian-based system: + +``` +$ sudo vi /etc/apache2/apache2.conf +``` + +On a Fedora system (including Red Hat Enterprise Linux and CentOS): + +``` +$ sudo vi /etc/httpd/conf/httpd.conf +``` + +Add this line to the end of the file: + +``` +ProxyPass "/stockapp" unix:///var/lib/vv/stockapp/sock/sock|fcgi://localhost/stockapp +``` + +Depending on your webserver configuration, there may be a better place to add the `ProxyPass` directive. For this example, though, the above is sufficient. + +Save the file and restart the webserver. On Fedora-based systems: + +``` +$ sudo systemctl restart httpd +``` + +On Debian-based systems: + +``` +$ sudo systemctl restart apache2 +``` + +In this case, you're connecting to your application through a socket, but you can use a TCP port instead (which comes in handy when your application resides in a container or something similar). + +### Run the application + +Start the application server for your application: + +``` +$ vf stockapp +``` + +By default, this runs anywhere from 0 to 20 server processes for your application, depending on the load. When the user load is low, your application uses virtually no memory at all. + +That was it! Navigate to [http://127.0.0.1/stockapp?req=stock&action=add&stock_name=XYZ&stock_pri…][4] in your web browser to see the application. + +You've just updated the stock price for ticker "XYZ" to 440. Try different tickers and prices to build a list of stocks, which you can view with the URL [http://127.0.0.1/stockapp?req=stock&action=show][5]. + +Congratulations, you've created your first Vely application, reverse proxied behind a web server. + +You can also view the output without a graphical browser by [using curl][6]: + +``` +$ curl -s \ +"http://127.0.0.1/stockapp?req=stock&action=add&stock_name=XYZ&stock_price=440" +$ curl -s "http://127.0.0.1/stockapp?req=stock&action=show" +``` + +### Run the application from the terminal + +You can run your application from the terminal, too. A terminal command is always made along with the FastCGI application server, and it's named the same as your application (in this case, `stockapp` ). It works exactly the same as the web app. You can write some requests to your application to be fulfilled as web requests and others to run from the command-line. To do that, you provide the request as environment variables. For instance, to output the list of stocks as HTML, type: + +``` +$ export REQUEST_METHOD=GET +$ export QUERY_STRING="req=stock&action=show" +$ /var/lib/vv/bld/stockapp/stockapp +``` + +To suppress HTTP headers, use: + +``` +$ export VV_SILENT_HEADER=yes +$ /var/lib/vv/bld/stockapp/stockapp +``` + +### How Vely works + +Your application works by processing requests and sending back replies. A request is one of two HTTP methods: GET or POST. + +A request always has a parameter `req`. In the example here, its value is `stock`. That means source code compiled from file `stock.v` is called automatically to handle such a request. + +A source file like this can do many different things, all grouped logically under a single request. Here, you have another parameter `action`, which can have a value of `add` (to add or update a stock) or `show` (to show a list of stocks). You specify `stock_name` and `stock_price` parameters when adding or updating. Pretty easy stuff. Other than `req`, you can choose parameter names however you wish. + +Looking at the code in `stock.v`, it's simple to follow. You use the [input-param][7] construct to get the values for your input parameters. Yes, those strange things in the C code that aren't C are [Vely language constructs][8], and they do lots of useful stuff for you, such as [run-query][9], which (as you might expect from the name) runs your queries. An easy one is `@`, which is an [output construct][10]. String handling is made simple and reliable without worrying about buffer overruns. Check out the [full reference of Vely constructs][11] to understand Vely's capabilities. + +Vely converts all constructs in your code into pure C and makes a native executable that is very small and fast. Your application runs as several FastCGI server processes, which stay resident in memory while accepting and processing requests. All of these processes work in parallel. + +For more info, see [how Vely works][12] and read more about [Vely architecture][13]. + +### Manage strings and memory + +Vely has automatic garbage collection for all of its constructs. In fact, most of the time, you shouldn't need to free memory at all, so application development is even simpler. Leave that to Vely and enjoy computing free of memory leaks and far fewer memory issues than you might expect. String constructs such as `write-string` make it safe, fast, and easy to create complex strings just as they do simple ones. + +### FastCGI program manager + +Even if you don't want to develop your own applications with Vely, you can use `vf`, [Vely's FastCGI program manager][14], with any generic FastCGI program, not just those created with Vely. + +### Want to learn more about Vely? + +I sometimes get asked about the project name. *Vely* is short for *Vel(ocit)y*. It's fast to program with, fast to understand code and maintain, and fast (and small!) at run time. It's even easy to containerize. + +Check out the documentation at [vely.dev][15], which features downloads and examples that go beyond the introduction this article provides. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/write-c-appplications-vely-linux + +作者:[Sergio Mijatovic][a] +选题:[lkxed][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/vely +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/OSDC_women_computing_2.png +[2]: https://www.redhat.com/sysadmin/mysql-mariadb-introduction?intcmp=7013a000002qLH8AAM +[3]: https://mariadb.com/kb/en/configuring-mariadb-connectorc-with-option-files/#options +[4]: http://127.0.0.1/stockapp?req=stock&action=add&stock_name=XYZ&stock_price=440 +[5]: http://127.0.0.1/stockapp?req=stock&action=show +[6]: https://opensource.com/article/20/5/curl-cheat-sheet +[7]: https://vely.dev/input-param.html +[8]: https://vely.dev/language_constructs.html +[9]: https://vely.dev/run-query.html +[10]: https://vely.dev/output_construct.html +[11]: https://vely.dev/reference.html +[12]: https://vely.dev/how_vely_works.html +[13]: https://vely.dev/vely_architecture.html +[14]: https://vely.dev/plain_C_FCGI.html +[15]: http://vely.dev diff --git a/sources/tech/20220527 4 cool new projects to try in Copr for May 2022.md b/sources/tech/20220527 4 cool new projects to try in Copr for May 2022.md new file mode 100644 index 0000000000..4ea0efa4fc --- /dev/null +++ b/sources/tech/20220527 4 cool new projects to try in Copr for May 2022.md @@ -0,0 +1,149 @@ +[#]: subject: "4 cool new projects to try in Copr for May 2022" +[#]: via: "https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-for-may-2022/" +[#]: author: "Miroslav Suchý https://fedoramagazine.org/author/msuchy/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +4 cool new projects to try in Copr for May 2022 +====== + +![4 packages to try from the Copr repos][1] + +[Copr][2] is a build system for anyone in the Fedora community. It hosts thousands of projects for various purposes and audiences. Some of them should never be installed by anyone, some are already being transitioned to the official Fedora Linux repositories, and the rest are somewhere in between. Copr gives you the opportunity to install third-party software that is not available in Fedora Linux repositories, try nightly versions of your dependencies, use patched builds of your favorite tools to support some non-standard use cases, and just experiment freely. + +If you don’t know [how to enable a repository][3] or if you are concerned about whether [it is safe to use Copr][4], please consult the [project documentation][5]. + +This article takes a closer look at interesting projects that recently landed in Copr. + +### Python-QT6 + +Do you miss QT6 Python bindings for Fedora Linux? Here they are. [https://copr.fedorainfracloud.org/coprs/g/kdesig/python-qt6/][6] + +KDE SIG owns this project. Therefore, it should be a quality one. And one day, it may land in Fedora Linux. + +Example of usage: + +``` +$ python + Python 3.10.4 (main, Mar 25 2022, 00:00:00) [GCC 12.0.1 20220308 (Red Hat 12.0.1-0)] on linux + Type "help", "copyright", "credits" or "license" for more information. + >>> import PyQt6 + >>> from PyQt6.QtWidgets import QApplication, QWidget + >>> import sys + >>> app = QApplication(sys.argv) + >>> window = QWidget() + >>> window.show() + >>> app.exec() + 0 +``` + +More documentation can be found at + +[https://www.pythonguis.com/tutorials/pyqt6-creating-your-first-window/][7]. + +**Installation instructions** + +This package is available for Fedora Linux 36 and Rawhide. To install it, enter these commands: + +``` +sudo dnf copr enable @kdesig/python-qt6 +sudo dnf install python3-qt6 +``` + +### Cloud-Native Utilities + +[A collection of cloud-native development tools][8]. + +These packages do not follow Fedora packaging guidelines, are statically built, and opt to bundle all dependencies. + +**Currently available packages**: + +* Terraform – terraform +* Packer – packer +* Helm – helm +* Tekton CLI – tektoncd-cli tektoncd-cli-doc +* Knative CLI – knative-client knative-client-doc +* Buildpack CLI – pack + +All build recipes can be viewed in dist-git or from Pagure:[https://pagure.io/mroche/cloud-utilities][9] + +**Installation instructions** + +These packages are available for Fedora 36 Linux and Rawhide. To install them, enter this command: + +``` +sudo dnf copr enable mroche/cloud-native-utilities +``` + +### DNF 5 + +You may be aware the DNF team is working on DNF5. There is a [change proposal][10] for Fedora Linux 38. The benefit is that every package management software — including PackageKit, and DNFDragora — should use a common *libdnf* library. If you have an application that handles RPM packages, you should definitely check out this project. + +[https://copr.fedorainfracloud.org/coprs][11][/][12][rpmsoftwaremanagement/dnf5-unstable/][13] + +Another similar project from the DNF team is + +[https://copr.fedorainfracloud.org/coprs/jmracek/dnf5-alternatives/][14]. + +**Installation instructions** + +These packages are available for Fedora Linux 35, 36 and Rawhide. To install them, enter these commands: + +``` +sudo dnf copr enable  rpmsoftwaremanagement/dnf5-unstable +sudo dnf install dnf5 +sudo dnf copr enable jmracek/dnf5-alternatives +sudo dnf install microdnf-deprecated +``` + +### Hare + +[Hare][15] is a systems programming language designed to be simple, stable and robust. Hare uses a static type system, manual memory management, and a minimal runtime. It is well suited to writing operating systems, system tools, compilers, networking software, and other low-level, high-performance tasks. A detailed overview can be found in [these slides][16]. + +My summary is: Hare is simpler than C. It can be easy. But if you insist on shooting in your legs, Hare will allow you to do it. + +[Copr project][17]. + +**Installation Instructions** + +These packages are available for Fedora Linux 35, 36 and Rawhide. They are also available for OpenSUSE Leap and Tumbleweed. To install them, enter these commands: + +``` +sudo dnf copr enable sentry/qbe +sudo dnf copr enable sentry/hare +sudo dnf install hare harec qbe +``` + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/4-cool-new-projects-to-try-in-copr-for-may-2022/ + +作者:[Miroslav Suchý][a] +选题:[lkxed][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/msuchy/ +[b]: https://github.com/lkxed +[1]: https://fedoramagazine.org/wp-content/uploads/2017/08/4-copr-945x400.jpg +[2]: https://copr.fedorainfracloud.org/ +[3]: https://docs.pagure.org/copr.copr/how_to_enable_repo.html#how-to-enable-repo +[4]: https://docs.pagure.org/copr.copr/user_documentation.html#is-it-safe-to-use-copr +[5]: https://docs.pagure.org/copr.copr/user_documentation.html +[6]: https://copr.fedorainfracloud.org/coprs/g/kdesig/python-qt6/ +[7]: https://www.pythonguis.com/tutorials/pyqt6-creating-your-first-window/ +[8]: https://copr.fedorainfracloud.org/coprs/mroche/cloud-native-utilities/ +[9]: https://pagure.io/mroche/cloud-utilities +[10]: https://fedoraproject.org/wiki/Changes/MajorUpgradeOfMicrodnf +[11]: https://copr.fedorainfracloud.org/coprs/rpmsoftwaremanagement/dnf5-unstable/ +[12]: https://copr.fedorainfracloud.org/coprs/rpmsoftwaremanagement/dnf5-unstable/ +[13]: https://copr.fedorainfracloud.org/coprs/rpmsoftwaremanagement/dnf5-unstable/ +[14]: https://copr.fedorainfracloud.org/coprs/jmracek/dnf5-alternatives/ +[15]: https://harelang.org/ +[16]: https://mirror.drewdevault.com/hare.pdf +[17]: https://copr.fedorainfracloud.org/coprs/sentry/hare/ diff --git a/sources/tech/20220527 Plotting Data in R- Graphs.md b/sources/tech/20220527 Plotting Data in R- Graphs.md new file mode 100644 index 0000000000..b7d1506fd2 --- /dev/null +++ b/sources/tech/20220527 Plotting Data in R- Graphs.md @@ -0,0 +1,311 @@ +[#]: subject: "Plotting Data in R: Graphs" +[#]: via: "https://www.opensourceforu.com/2022/05/plotting-data-in-r-graphs/" +[#]: author: "Shakthi Kannan https://www.opensourceforu.com/author/shakthi-kannan/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Plotting Data in R: Graphs +====== +R has a number of packages for plotting graphs and data visualisation, such as graphics, lattice, and ggplot2. In this ninth article in the R series, we shall explore the various functions to plot data in R. + +![business-man-visulising-graphs][1] + +We will be using R version 4.1.2 installed on Parabola GNU/Linux-libre (x86-64) for the code snippets. + +``` +$ R --version + +R version 4.1.2 (2021-11-01) -- “Bird Hippie” +Copyright (C) 2021 The R Foundation for Statistical Computing +Platform: x86_64-pc-linux-gnu (64-bit) +``` + +R is free software and comes with absolutely no warranty. You are welcome to redistribute it under the terms of the GNU General Public License versions 2 or 3. For more information about these matters, see *https://www.gnu.org/licenses/.* + +### Plot + +Consider the all-India consumer price index (CPI – rural/urban) data set up to November 2021 available at *https://data.gov.in/catalog/all-india-consumer-price-index-ruralurban-0* for the different states in India. We can read the data from the downloaded file using the read.csv function, as shown below: + +``` +> cpi <- read.csv(file=”CPI.csv”, sep=”,”) + +> head(cpi) +Sector Year Name Andhra.Pradesh Arunachal.Pradesh Assam Bihar +1 Rural 2011 January 104 NA 104 NA +2 Urban 2011 January 103 NA 103 NA +3 Rural+Urban 2011 January 103 NA 104 NA +4 Rural 2011 February 107 NA 105 NA +5 Urban 2011 February 106 NA 106 NA +6 Rural+Urban 2011 February 105 NA 105 NA +Chattisgarh Delhi Goa Gujarat Haryana Himachal.Pradesh Jharkhand Karnataka +1 105 NA 103 104 104 104 105 104 +2 104 NA 103 104 104 103 104 104 +3 104 NA 103 104 104 103 105 104 +4 107 NA 105 106 106 105 107 106 +5 106 NA 105 107 107 105 107 108 +6 105 NA 104 105 106 104 106 106 +... +``` + +Let us aggregate the CPI values per year for the state of Punjab, and plot a line chart using the plot function, as follows: + +``` +> punjab <- aggregate(x=cpi$Punjab, by=list(cpi$Year), FUN=sum) + +> head(punjab) +Group.1 x +1 2011 3881.76 +2 2012 4183.30 +3 2013 4368.40 +4 2014 4455.50 +5 2015 4584.30 +6 2016 4715.80 + +> plot(punjab$Group.1, punjab$x, type=”l”, main=”Punjab Consumer Price Index upto November 2021”, xlab=”Year”, ylab=”Consumer Price Index”) +``` + +The following arguments are supported by the plot function: + +| Argument | Description | +| :- | :- | +| x | A vector for the x-axis | +| y | The vector or list in the y-axis | +| type | ‘p’ for points, ‘l’ for lines, ‘o’ for overplotted plots and lines, ‘s’ for stair steps, ‘h’ for histogram | +| xlim | The x limits of the plot | +| ylim | The y limits of the plot | +| main | The title of the plot | +| sub | The subtitle of the plot | +| xlab | The label for the x-axis | +| ylab | The label for the y-axis | +| axes | Logical value to draw the axes | + +The line chart is shown in Figure 1. + +![Figure 1: Line chart][2] + +The autocorrelation plot can be used to obtain correlation statistics for time series analysis, and the same can be generated using the acf function in R. You can specify the following autocorrelation types: *correlation, covariance*, or partial. Figure 2 shows the ACF chart that represents the CPI values (‘x’ in the chart) for the state of Punjab. + +![Figure 2: ACF chart][3] + +The function*acf* accepts the following arguments: + +| Argument | Description | +| :- | :- | +| x | A univariate or multivariate object or vector or matrix | +| lag.max | The maximum lag to calculate the acf | +| type | Supported values ‘correlation’, ‘covariance’, ‘partial’ | +| plot | The acf is plotted if this value is TRUE | +| i | A set of time difference lags to retain | +| j | A collection of names or numbers to retain | + +### Bar chart + +The barplot function is used to draw a bar chart. The chart for Punjab’s CPI can be generated as follows, and is shown in Figure 3: + +![Figure 3: Line chart of Punjab’s CPI][4] + +``` +> barplot(punjab$x, main=”Punjab Consumer Price Index”, sub=”Upto November 2021”, xlab=”Year”, ylab=”Consumer Price Index”, col=”navy”) +``` + +The function is quite flexible and supports the following arguments: + +| Argument | Description | +| :- | :- | +| height | A numeric vector or matrix that contains the values | +| width | A numeric vector that specifies the widths of the bars | +| space | The amount of space between bars | +| beside | A logical value to specify if the bars should be stacked or next to each other | +| density | A numerical value that specifies the density of the shading lines | +| angle | The angle used to shade the lines | +| border | The colour of the border | +| main | The title of the chart | +| sub | The sub-title of the chart | +| xlab | The label for the x-axis | +| ylab | The label for the y-axis | +| xlim | The limits for the x-axis | +| ylim | The limits for the y-axis | +| axes | A value that specifies whether the axes should be drawn | + +You can get more details on the barplot function using the help command, as shown below: + +``` +> help(barplot) + +acf package:stats R Documentation + +Auto- and Cross- Covariance and -Correlation Function Estimation + +Description: + +The function ‘acf’ computes (and by default plots) estimates of +the autocovariance or autocorrelation function. Function ‘pacf’ +is the function used for the partial autocorrelations. Function +‘ccf’ computes the cross-correlation or cross-covariance of two +univariate series. + +Usage: + +acf(x, lag.max = NULL, +type = c(“correlation”, “covariance”, “partial”), +plot = TRUE, na.action = na.fail, demean = TRUE, ...) + +pacf(x, lag.max, plot, na.action, ...) + +## Default S3 method: +pacf(x, lag.max = NULL, plot = TRUE, na.action = na.fail, +...) + +ccf(x, y, lag.max = NULL, type = c(“correlation”, “covariance”), +plot = TRUE, na.action = na.fail, ...) + +## S3 method for class ‘acf’ +x[i, j] +``` + +### Pie chart + +Pie charts need to be used wisely, as they may not actually show relative differences among the slices. We can generate the Rural, Urban, and Rural+Urban values for the month of January 2021 for Gujarat as follows, using the subset function: + +``` +> jan2021 <- subset(cpi, Name==”January” & Year==”2021”) + +> jan2021$Gujarat +[1] 153.9 151.2 149.1 + +> names <- c(‘Rural’, ‘Urban’, ‘Rural+Urban’) +``` + +![Figure 4: Pie chart][5] + +The pie function can be used to generate the actual pie chart for the state of Gujarat, as shown below: + +``` +> pie(jan2021$Gujarat, names, main=”Gujarat CPI Rural and Urban Pie Chart”) +``` + +The following arguments are supported by the pie function: + +| Argument | Description | +| :- | :- | +| x | Positive numeric values to be plotted | +| label | A vector of character strings for the labels | +| radius | The size of the pie | +| clockwise | A value to indicate if the pie should be drawn clockwise or counter-clockwise | +| density | A value for the density of shading lines per inch | +| angle | The angle that specifies the slope of the shading lines in degrees | +| col | A numeric vector of colours to be used | +| lty | The line type for each slice | +| main | The title of the chart | + +### Boxplot + +A boxplot shows the interquartile range between the 25th and 75th percentile using two ‘whiskers’ for the distribution of a variable. The values outside the range are plotted separately. The boxplot functions take the following arguments: + +| Argument | Description | +| :- | :- | +| data | A data frame or list that is defined | +| x | A vector that contains the values to plot | +| width | The width of the boxes to be plotted | +| outline | A logical value indicating whether to draw the outliers | +| names | The names of the labels for each box plot | +| border | The colour to use for the outline of each box plot | +| range | A maximum numerical amount the whiskers should extend from the boxes | +| plot | The boxes are plotted if this value is TRUE | +| horizontal | A logical value to indicate if the boxes should be drawn horizontally | + +The boxplot for a few states from the CPI data is shown below: + +``` +> names <- c (‘Andaman and Nicobar’, ‘Lakshadweep’, ‘Delhi’, ‘Goa’, ‘Gujarat’, ‘Bihar’) +> boxplot(cpi$Andaman.and.Nicobar, cpi$Lakshadweep, cpi$Delhi, cpi$Goa, cpi$Gujarat, cpi$Bihar, names=names) +``` + +![Figure 5: Box plot][6] + +![Figure 6: Q-Q plot][7] + +### Q-Q plot + +The Quantile-Quantile (Q-Q) plot is a way to compare two data sets. You can also compare a data set with a theoretical distribution. The qqnorm function is a generic function, and we can view the Q-Q plot for the Punjab CPI data as shown below: + +``` +> qqnorm(punjab$x) +``` + +![Figure 7: Volcano][8] + +The*qqline* function adds a theoretical line to a normal, quantile-quantile plot. The following arguments are accepted by these functions: + +| Argument | Description | +| :- | :- | +| x | The first data sample | +| y | The second data sample | +| datax | A logical value indicating if values should be on the x-axis | +| probs | A numerical vector representing probabilities | +| xlab | The label for x-axis | +| ylab | The label for y-axis | +| qtype | The type of quantile computation | + +### Contour plot + +The contour function is useful for plotting three-dimensional data. You can generate a new contour plot, or add contour lines to an existing chart. These are commonly used along with image charts. The volcano data set in R provides information on the Maunga Whau (Mt Eden) volcanic field, and the same can be visualised with the contour function as follows: + +``` +> contour(volcano) +``` + +The contour function accepts the following arguments: + +| Argument | Description | +| :- | :- | +| x,y | The location of the grid for z | +| z | A numeric vector to be plotted | +| nlevels | The number of contour levels | +| labels | A vector of labels for the contour lines | +| xlim | The x limits for the plot | +| ylim | The y limits for the plot | +| zlim | The z limits for the plot | +| axes | A value to indicate to print the axes | +| col | The colour for the contour lines | +| lty | The line type to draw | +| lwd | Width for the lines | +| vfont | The font for the labels | + +The areas between the contour lines can be filled using a solid colour to indicate the levels, as shown below: + +``` +> filled.contour(volcano, asp = 1) +``` + +The same volcano data set with the filled.contour colours is illustrated in Figure 8. + +![Figure 8: Filled volcano][9] + +You are encouraged to explore the other functions and charts in the graphics package in R. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/plotting-data-in-r-graphs/ + +作者:[Shakthi Kannan][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/shakthi-kannan/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/business-man-visulising-graphs.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-Line-chart.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-2-ACF-chart.jpg +[4]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-3-Line-chart-of-Punjabs-CPI.jpg +[5]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-4-Pie-chart.jpg +[6]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-5-ox-plot.jpg +[7]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-6-Q-Q-plot.jpg +[8]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-7-Volcano.jpg +[9]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-8-Filled-volcano.jpg diff --git a/sources/tech/20220528 How I automate plant care using Raspberry Pi and open source tools.md b/sources/tech/20220528 How I automate plant care using Raspberry Pi and open source tools.md new file mode 100644 index 0000000000..d11da87617 --- /dev/null +++ b/sources/tech/20220528 How I automate plant care using Raspberry Pi and open source tools.md @@ -0,0 +1,90 @@ +[#]: subject: "How I automate plant care using Raspberry Pi and open source tools" +[#]: via: "https://opensource.com/article/22/5/plant-care" +[#]: author: "Kevin Sonney https://opensource.com/users/ksonney" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How I automate plant care using Raspberry Pi and open source tools +====== +I keep tabs on all my houseplants by using Home Assistant and a Raspberry Pi. + +![Digital images of a computer desktop][1] + +Image by: Opensource.com + +> Automation is a hot topic right now. In my day job as an SRE part of my remit is to automate as many repeating tasks as possible. But how many of us do that in our daily, not-work, lives? This year, I am focused on automating away the toil so that we can focus on the things that are important. + +Home Assistant has so many features and integrations, it can be overwhelming at times. And as I’ve mentioned in previous articles, I use it for many things, including monitoring plants. + +``` +$ bluetoothctl scan le +Discovery started +[NEW] Device +[NEW] Device +[NEW] Device +[NEW] Device +[NEW] Device +[NEW] Device +[NEW] Device +``` + +There are numerous little devices you can buy to keep an eye on your plants. The Xiomi MiaFlora devices are small, inexpensive, and have a native integration with Home Assistant. Which is great—as long as the plant and Home Assistant are in the same room. + +We've all been in places where one spot there is a great signal, and moving 1mm in any direction makes it a dead zone—and it is even more frustrating when you are indoors. Most Bluetooth LE (Low Energy) devices have a range of about 100m, but that's using line of sight, and does not include interference from things like walls, doors, windows, or major appliances (seriously, a refrigerator is a great big signal blocker). Remote Home Assistant is perfect for this. You can set up a Raspberry Pi with Home Assistant Operating System (HASSOS) in the room with the plants, and then use the main Home Assistant as a central control panel. I tried this on a Raspberry Pi Zero W, and while the Pi Zero W can run Home Assistant, it doesn't do it very well. You probably want a Pi 3 or Pi 4 when doing this. + +Start with a fresh HASSOS installation, and make sure everything is up-to-date, then install HACS and Remote Home Assistant like I did in my article [Automate and manage multiple devices with Remote Home Assistant][2]. Now for the tricky bits. Install the `SSH and Web Terminal` Add-on, and turn off `Protection Mode` so that you can get a session on the base OS and not in a container. Start the add-on, and it appears on the sidebar. Click on it to load the terminal. + +You are now in a root session terminal on the Pi. Insert all the warnings here about being careful and how you can mess up the system (you know the ones). Inside the terminal, run `bluetoothctl scan le` to find the plant sensor, often named "Flower Care" like mine. + +![Image of finding plant sensors][3] + +Image by: (Kevin Sonney, CC BY-SA 40) + +Make a note of the address for the plant sensor. If you have more than one, it could be confusing to figure out which is which, and can take some trial and error. Once you've identified the plant sensor, it is time to add it to Home Assistant. This requires editing the `configuration.yml` file directly, either with the file editor add on, or in the terminal you just created. In my case, I added both a sensor and a plant block to the configuration. + +``` +sensor: + - platform: miflora + scan_interval: 60 + mac: "C4:7C:8D:6C:DE:FE" + name: "pitcher_plant" + plant: + pitcher_plant: + sensors: + moisture: sensor.pitcher_plant_moisture + battery: sensor.pitcher_plant_battery + temperature: sensor.pitcher_plant_temperature + conductivity: sensor.pitcher_plant_conductivity + brightness: sensor.pitcher_plant_brightness +``` + +Save the file, and restart Home Assistant, and you should see a plant card on the Overview tab. + +![Image showing plant needs watering][4] + +Image by: (Kevin Sonney, CC BY-SA 40) + +Once that's done, go back to the main Home Assistant, and add the newly available `plant` component to the list of things to import from the remote. You can then add the component to dashboards on the main HASS installation, and create automations and notifications based on the plant status. + +I use this to monitor a pitcher plant, and I have more sensors on the way so I can keep tabs on all my houseplants—all of which live outside the Bluetooth range of my central Home Assistant Pi. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/plant-care + +作者:[Kevin Sonney][a] +选题:[lkxed][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/ksonney +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/computer_desk_home_laptop_browser.png +[2]: https://opensource.com/article/22/5/remote-home-assistant +[3]: https://opensource.com/sites/default/files/2022-05/Day_06-2.png +[4]: https://opensource.com/sites/default/files/2022-05/Day_06-3.png diff --git a/sources/tech/20220528 Portmaster- A GlassWire Alternative for Linux to Monitor & Secure Network Connections.md b/sources/tech/20220528 Portmaster- A GlassWire Alternative for Linux to Monitor & Secure Network Connections.md new file mode 100644 index 0000000000..a90aa18bbf --- /dev/null +++ b/sources/tech/20220528 Portmaster- A GlassWire Alternative for Linux to Monitor & Secure Network Connections.md @@ -0,0 +1,114 @@ +[#]: subject: "Portmaster: A GlassWire Alternative for Linux to Monitor & Secure Network Connections" +[#]: via: "https://itsfoss.com/portmaster/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Portmaster: A GlassWire Alternative for Linux to Monitor & Secure Network Connections +====== +GlassWire is a popular network monitoring app (with no support for Linux) that helps you track data usage, unusual network activity, malicious access to the network, and more. + +I wish it supports Linux, but for now, it only works on Windows and Android. + +For Linux, we do not have a full-fledged GUI-based application that helps us [monitor the network in Linux][1]. + +However, I recently stumbled upon “Portmaster”, an open-source network monitor available for Linux and other platforms. Interestingly, it offers some of the same abilities as seen with Glasswire, with some extras. + +Note that it is not exactly a replacement for “GlassWire” but a potential alternative in the making. + +Here, I shall share more details about it. + +Note + +> Safing Portmaster (or simply ‘Portmaster’) is in its early stages of development (Alpha). We feature it here, considering it aims to offer something new to Linux users. +> +> While it worked fine in our quick tests, you can expect issues with it. + +### Portmaster: Open-Source App to Monitor Computer’s Network Connection + +![portmaster][2] + +Portmaster by [Safing][3] is an open-source GUI program available for Windows and Linux. + +You can track every connection being made through the applications and services used in your Linux distribution. + +It is an entirely free and open-source software that aims to make money using its paid VPN service (**SPN**), which uses onion-encryption (inspired by Tor) to route your connections from through destinations keeping your identity private. + +The paid VPN is a part of the tool, but it is also in the alpha testing stage. + +Even if you download things from your terminal, it tracks them and provides you the detailed information regarding the domain, IP, encryption status, protocol, and the option to block future connections if needed. + +![portmaster network monitor][4] + +You also get several abilities to manage the network connections, add filter lists, rules, and some other advanced options. + +Portmaster gives you an overview of all the connections per application/service and also lets you view the data associated with an individual application. + +![portmaster connection details][5] + +It supports numerous useful features that include real-time network monitoring. + +### Features of Portmaster + +![portmaster firewall network][6] + +Portmaster is not just a simple network connection monitor, it also gives you great control to enforce a secure DNS, and filter your network connections for best security. + +Some key features include: + +* Network monitor overview to sum up connections from the entire system. +* Provide debug information for every app connection history. +* Ability to block a domain from the connection list. +* Retain connection history offline. +* Manage P2P connections. +* Ability to block incoming connections. +* Option to add outgoing rules to manage the network connections easily. +* Add a filter list to easily block connections that you do not want. For instance, preventing NSFW domains to load on your network. +* Choose from different secure DNS servers (Cloudflare as the preferred default) +* Stats about network connections, destinations connected, countries involved, allowed, and blocked connections. + +In addition to the mentioned features, you will find fine-grained controls to get prompts for network connections (block/allow), customize your privacy filter, choose a different DNS, inspect DNS requests for the connections made, and so much more. + +### Install Portmaster on Linux + +Portmaster is officially supported for Ubuntu and Fedora with .deb and .rpm packages available. + +You can download the package from its [official website][7] to try on a supported Linux distribution. + +The [installation documentation][8] gives you more details about the steps for Arch Linux and other Linux distributions. + +You can also explore more about it in its [GitHub page][9]. + +### Wrapping Up + +Portmaster is certainly an interesting addition to the Linux and open-source world. It could become the one tool that everyone uses to monitor, and secure networks while enhancing their online privacy. + +The feature set is promising, but whether it can replace proprietary network monitors like “GlassWire” is another story to be unraveled in the future. + +*What do you think about Portmaster? Please let me know your thoughts in the comments below.* + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/portmaster/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://itsfoss.com/network-speed-monitor-linux/ +[2]: https://itsfoss.com/wp-content/uploads/2022/05/portmaster.jpg +[3]: https://safing.io/ +[4]: https://itsfoss.com/wp-content/uploads/2022/05/portmaster-network-monitor.jpg +[5]: https://itsfoss.com/wp-content/uploads/2022/05/portmaster-connection-details.jpg +[6]: https://itsfoss.com/wp-content/uploads/2022/05/portmaster-firewall-network.jpg +[7]: https://safing.io/portmaster/#download +[8]: https://docs.safing.io/portmaster/install/linux +[9]: https://github.com/safing/portmaster/ diff --git a/sources/tech/20220528 Top 10 GNOME Themes for Your Ubuntu Desktop.md b/sources/tech/20220528 Top 10 GNOME Themes for Your Ubuntu Desktop.md new file mode 100644 index 0000000000..580bf5b306 --- /dev/null +++ b/sources/tech/20220528 Top 10 GNOME Themes for Your Ubuntu Desktop.md @@ -0,0 +1,205 @@ +[#]: subject: "Top 10 GNOME Themes for Your Ubuntu Desktop" +[#]: via: "https://www.debugpoint.com/2022/05/gnome-themes-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Top 10 GNOME Themes for Your Ubuntu Desktop +====== +You can use this list of 10 GNOME themes to transform your Ubuntu distro look in 2022. + +You can use GTK themes to give your GNOME or Ubuntu a sassy look without much effort. Themes are straightforward to download/install, and the result is a stunning desktop. + +There are hundreds of GTK themes available. It’s challenging to pick the best ten among them. To help you choose some of the best ones, we give you the ten best GTK based themes on this page. + +### Points to Note + +Before you apply these themes to your latest GNOME desktop and Ubuntu, a few important points. + +* All the below GNOME themes uses the GNOME Tweak tool for configuration. Also, you should install the User Themes GNOME extensions to apply these themes. + +* Moreover, if you apply these themes, the GNOME’s default light and dark styles in settings are automatically turned off. If you are using Ubuntu 22.04 and above, the accent colour is also turned off to honour custom themes. Because accent colours and the light/dark style combinations set the respective Yaru theme variant. + +* Make sure to close the Settings application in Ubuntu while applying the themes because the settings window gives default Yaru themes higher priority via the Appearance tab. + +* Finally, change the Shell and Legacy Application themes to custom themes (see the below example image). + +![Changing GNOME Theme in Tweaks Tool][1] + +### Best GNOME Themes For Your Ubuntu Desktop in 2022 + +### 1. Arc + +The first GNOME theme we want to feature in this list is the Arc theme. It is the most popular GNOME theme and is suitable for giving the best look with its looks. Arc brings a simple 2D interface with a basic flat look across the desktop. The Flat look is designed so lovely that it gives you a perfect modern desktop look without gradient or glossy effects. It also provides a nice touch to the sidebars in Nautilus and other sidebar-based apps with its Dark version. + +Arc theme comes in light, dark and darker versions. Installing the Arc theme is easy in Ubuntu because it is available in the official repo. Fire up a terminal window and run the following command to install. + +``` +sudo apt install arc-theme +``` + +If you want to install via source, you can grab the files on [GitHub][2] and follow the compilation instructions. + +After the installation, set the theme using the Tweaks tool and pair it using any Yaru-blue icons in Ubuntu for the best look. + +![Arc Darker Theme in Ubuntu GNOME][3] + +#### 2. Layan + +The second theme we highlight here is Layan. Based on material design (materia-gtk), Layan gives you a flat layout for the entire GNOME Shell. In addition, it comes with a few more rounded corners in the windows and larger shadows. Moreover, it brings light and dark variants for every taste bud. + +Perhaps the unique feature of this theme is the sidebar in Nautilus (see below image). It’s a sleek vertical bar with a little mountain icon at the top. I must say, it enhances the entire desktop look with this touch. + +We recommend that you pair it with Yaru-prusiangreen icon and a nice gradient wallpaper for best results. + +For installation, [download the theme from GitHub][4]and extract it. Then run the install.sh. + +It is also available as a snap if you prefer. + +``` +sudo snap install layan-themes +``` + +![Layan GNOME Theme][5] + +#### 3. Orchis + +If you ask me to choose one theme for all possible renovation of your desktop, then I would suggest Orchis. The Orchis theme combines Google’s material design and rounded corners with a sober colour palette. Furthermore, Orchis is bound to make an impression with its visual tone, which brings eight colour options, with each having dark, compact and light variants. + +![Orchis colour options][6] + +For an instant desktop makeover, you can easily pair Orchis with any icon themes and wallpaper. + +Installation is super easy for Orchis. [Download the package from Github][7]. Then run the below command from the installation directory for all variants and colours. + +``` +./install.sh -t all +``` + +![Orchis GNOME Theme][8] + +#### 4. Numix + +Numix theme for GNOME desktops is similar to the Arc theme featured in this list. But it’s a little different in terms of its colour tone. The primary highlight colour is complemented by its flat design. It comes with light and dark variants. However, you can only download and install the light version for free. + +You can easily install it using the following command in Ubuntu. + +``` +sudo apt install numix-gtk-theme +``` + +If you prefer the dark variant, you can get it via the [developer’s home page][9] instructions. + +![Numix Theme | image credit: Author of Numix][10] + +#### 5. Adapta + +[Adapta][11] is one of the most popular GTK themes, which inspired many child themes. The theme creators often base their theme on Adapta and modify it further. Hence you can imagine its flexibility and features. In addition, Adapta is based on Google’s Material Design principle. + +Moreover, if you like the Android user interface, you will enjoy the Adapta theme on your GNOME desktop because it brings ample padding, well-placed shadows and layers, better contrast, etc. + +Before installing, you should know that the installation size is slightly larger for a theme (~200MB+). + +Finally, you can easily install the Adapta theme using the command below. + +``` +sudo apt install adapta-gtk-theme +``` + +![Adapta Theme – follows Android Style][12] + +#### 6. Cloudy + +Cloudy provides a comfortable and smooth look. It is based on the Arc theme featured in this list. In addition, it follows the material design approach that offers a unique feel of “cloudy sky”. Moreover, the Cloudy theme offers grey and blue flavour with light/dark variants. + +If you love the colour sky blue and want a material design theme, then choose this one. + +Download this theme from the gnome-look website [here][13] and copy the extracted files in your ~/.themes directory to install. + +![Cloudy GNOME Theme][14] + +#### 7. Nord + +The Nord theme is one of the famous GTK themes you can install on the GNOME desktop. It tenders a cool and stylish piece with several colour options. In addition, all the colour options come with light and dark variants. + +The colour options are blue, green and grey. If you want this for your desktop, follow the below instructions to install. + +[Download the files][15] from gnome-look and place them in the ~/.themes folder after extract. + +![Nord Theme | Image Credit: Ant Author][16] + +#### 8. Prof-GNOME + +The eighth theme in this list is the Prof-GNOME theme. It is a perfect theme that calms your mind with its unique way of resting your eyes. In my opinion, if you want to renovate your GNOME desktop but still want it to look like a professional desktop with a legacy macOS look, then choose Prof-GNOME. + +Moreover, it is not a fancy theme but rather a legacy theme with a modern approach to design, keeping the older macOS look alive. + +To try this theme, download the files from [GitHub][17] and place them to ~/.themes after extracting. + +However, a word of caution is that it’s not updated for some time. + +![Prof-GNOME Theme][18] + +#### 9. Whitesur + +A list of GNOME themes is incomplete without a theme which makes your desktop look like macOS. Hence, as its name suggests, we present the 9th theme in this list – the popular [Whitesur theme][19]. It’s a GTK theme that helps you make your desktop look like macOS Big Sur. + +Furthermore, the Whitesur theme is compatible with non-GNOME based desktop Xfce, Cinnamon, etc. + +Pair it with the Plack Dock and Whitesur Icon theme for a complete macOS makeover. + +[Download][20] the theme from GitHub and place the files in the ~/.themes after extracting. + +![Whitesur theme for GNOME][21] + +#### 10. Ant + +The final theme in this list is Ant. The Ant is an exciting theme which is a little bold in its approach. It brings the Flat look and feels but with a twist of “Dracula” and “Bloody” flavour. + +I must say a perfect Halloween theme, and you can download it from [here][22]. + +![Ant Theme for GNOME | Image Credit: Author of Ant theme][23] + +### Closing Notes + +I hope this list of 10 best GNOME themes of 2022 encourages your to renovate the rather mundane Ubuntu distro look or any GNOME desktop setup. In the comment box below, let me know which one is your favourite? Also, add your favourite one, which you think should be on the list. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/gnome-themes-2022/ + +作者:[Arindam][a] +选题:[lkxed][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/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/05/Changing-GNOME-Theme-in-Tweaks-Tool.jpg +[2]: https://github.com/jnsh/arc-theme +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Arc-Darker-Theme-in-Ubuntu-GNOME-1.jpg +[4]: https://github.com/vinceliuice/Layan-gtk-theme/archive/refs/heads/master.zip +[5]: https://www.debugpoint.com/wp-content/uploads/2022/05/Layan-GNOME-Theme.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/Orchis-colour-options.jpg +[7]: https://github.com/vinceliuice/Orchis-theme/archive/refs/heads/master.zip +[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/Orchis-GNOME-Theme.jpg +[9]: https://satya164.deviantart.com/art/Numix-GTK3-theme-360223962 +[10]: https://www.debugpoint.com/wp-content/uploads/2022/05/Numix-Theme.jpg +[11]: https://github.com/adapta-project/adapta-gtk-theme +[12]: https://www.debugpoint.com/wp-content/uploads/2022/05/Adapta-Theme-follows-Android-Style.jpg +[13]: https://www.gnome-look.org/p/1242416/ +[14]: https://www.debugpoint.com/wp-content/uploads/2022/05/Cloudy-GNOME-Theme.jpg +[15]: https://www.gnome-look.org/p/1267246/ +[16]: https://www.debugpoint.com/wp-content/uploads/2022/05/Nord-Theme.jpg +[17]: https://github.com/paullinuxthemer/Prof-Gnome/archive/refs/heads/master.zip +[18]: https://www.debugpoint.com/wp-content/uploads/2022/05/Prof-GNOME-Theme.jpg +[19]: https://github.com/vinceliuice/WhiteSur-gtk-theme +[20]: https://github.com/vinceliuice/WhiteSur-gtk-theme +[21]: https://www.debugpoint.com/wp-content/uploads/2022/05/Whitesur-theme-for-GNOME.jpg +[22]: https://www.gnome-look.org/p/1099856/#files +[23]: https://www.debugpoint.com/wp-content/uploads/2022/05/Ant-Theme-for-GNOME.jpg diff --git a/sources/tech/20220530 11 Themes to Make Xfce Look Modern and Beautiful.md b/sources/tech/20220530 11 Themes to Make Xfce Look Modern and Beautiful.md new file mode 100644 index 0000000000..dfc96ae23f --- /dev/null +++ b/sources/tech/20220530 11 Themes to Make Xfce Look Modern and Beautiful.md @@ -0,0 +1,200 @@ +[#]: subject: "11 Themes to Make Xfce Look Modern and Beautiful" +[#]: via: "https://itsfoss.com/best-xfce-themes/" +[#]: author: "Community https://itsfoss.com/author/itsfoss/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +11 Themes to Make Xfce Look Modern and Beautiful +====== + +[Xfce][1] is known for being one of the most lightweight desktop environments yet flexible enough to carry out heavy loads easily. + +One major issue with Xfce is that its default interface may look old and outdated to many users. This could be offputting for some new users who prefer [beautiful-looking Linux distributions][2]. + +![xfce desktop screenshot][3] + +But Xfce does not bound you to use the default theming and allows you to theme your Desktop as per your taste. + +Where to find some good themes for Xfce? There are numerous themes listed on [Xfce Look website][4]. You can surely browse through the huge collection. + +But to save you some time, I am going to list some of the best Xfce themes that should attract a variety of users. + +### Best Xfce themes + +I have tried to list themes that have been updated not too long ago in the past. + +Some or all of these themes could also be available for other desktop environments such as GNOME and KDE. However, I cannot guarantee that. You’ll have to confirm it on your own. + +A quick word about [installing themes in Xfce][5]. There is an appearance tool in the system menu. You can just drag and drop the downloaded theme file in zip format and it should handle the rest. + +![appearance xfce][6] + +Alternatively, you can extract the contents of the archived theme file in the .themes folder in your home directory. + +With that aside, it’s time to see the themes in action. + +#### 1. BaZik + +![bazik xfce theme][7] + +This is one of my favorite themes, especially for Xfce Desktop as it can revamp the whole experience of using it. Rather than just giving us Dark and Light variants of theme, you get 6 color accents to match your Desktop taste. + +BaZik is one of those modern flat themes based on Materia design which allows users to completely change how your default Xfce Desktop visually appears. So if you are looking for something modern which is completely different, BaZik will surely please you. + +[Get BaZik][8] + +#### 2. Flat Remix GTK + +![flat remix xfce theme][9] + +This is one of the rare themes which supports GTK 2, 3, and even 4! A flat remix is one of the most pleasant-looking flat themes which are available for Xfce Desktop. It comes in 4 variants: Normal, Dark, Darker, and The Darkest. + +You also get 13 color variants to match your taste. So if you are looking for one of the best falt themes available, Flat Remix GTK is all you need. + +[Get Flat Remix GTK][10] + +#### 3. Sweet + +![sweet theme xfce][11] + +As its name suggests, its sweet combination of futuristic looks and premium finish with on-point color gradients. Sweets have been used by numerous users and are often suggested for those who are looking for something different from the traditional look. + +Sweet is available in 5 variants: Dark, Mars, Sweet, Ambar Blue, and Ambar. It is GTK 3-based theme and blends well with Xfce Desktop. Sweet can be a good option for those who are tired of traditional options and want to have a completely different look. + +[Get Sweet][12] + +#### 4. Skeuos + +![skeuos xfce theme][13] + +This is yet another theme by the creator of Flat Remix GTK which I have already discussed above. While Flat Remix GTK was more inclined towards the Dark variants, Skeuos is an overall package as you get dark and white variants which are equally good! + +Skeuos also supports GTK 2,3 and 4 so you can have great synchronization with all other apps. Being simple yet elegant, Skeuos deserves a try! + +[Get Skeuos][14] + +#### 5. Pandora Arc + +![pandora arc xfce theme][15] + +Pandora Arc is a completely different theme from the given list as it brings wives of hacker-ish or cyberpunk. You will get dark colors with cyan and green fonts, and a purple accent bundled with green buttons. + +So if you are looking for something which brings hacker-ish vibes to your Xfce Desktop, Pandora Arc is just made for you. + +[Get Pandora Arc][16] + +#### 6. Drakula + +![drakula theme xfce][17] + +Being the official theme for [Awesome][18], Drakula is known for getting users one of the best dark theme experiences. A Dark theme with a purple and pink accent will surely bring a perfect experience to your Xfce Desktop. + +Sure, there are many options for dark themes but personally, Drakula is what you need. Creator has precisely selected the color pallet so you can have a great experience without many tweaks. + +[Get Drakula][19] + +#### 7. Pop Xfwm + +![pop theme xfce][20] + +As its name suggests, this theme will bring a similar look to what System 76 offers in their Pop!_OS. As Pop!_OS is one of the most popular Linux distros, many users are fans of its visuals, and using Pop Xfwm, you can achieve it easily. + +So if you are someone who has just switched from Pop!_OS or are impressed by the visuals of it and you want a similar experience, Pop Xfwm is just for you. + +[Get Pop Xfwm][21] + +#### 8. Windows 10 (no, seriously) + +![windows 10 xfce theme][22] + +You can easily guess what this theme will offer. The reason why this theme made it to the best Xfce themes list is attention to detail. This is considerably the best Windows 10 theme for Linux Desktop which also includes Xfce. + +It requires GTK 3.6 and above for better integration as has some dependencies such as Murrine and Pixmap theme engines but once you are done with the setup, you can enjoy the Windows 10 vibes on your Linux system. + +[Get Windows 10][23] + +#### 9. WhiteSur (still serious) + +![white sur xfce theme][24] + +There is the majority of people who loves the visuals of macOS including me and WhiteSur is considerably the best option to bring macOS to feel to your Xfce Desktop. + +You do have add-on options for this theme such as Firefox theming to better sync. This is the best option for users who are willing to add a premium feel to their Xfce Desktop as WhiteSur mimics macOS theming. + +[Get WhiteSur][25] + +#### 10. Axiom + +![axiom xfce theme][26] + +Axiom is an Arc-Dark-based theme that is created to get you a more spacious Desktop and improve your workflow. Being more consistent than its base, you can surely rely on Axiom. + +It’s inclined more towards bringing simplicity to your Desktop than getting you futuristic looks and it is amazing on what it does. So if you are interested in improving your workflow, Axiom is a must-try. + +[Get Axiom][27] + +#### 11. Orchis + +![orchis xfce theme][28] + +This is yet another flat-style GTK theme for your Xfce Desktop. I included Orchis to this list as it is one of the most popular themes in Linux and users are having mostly positive feedback. + +Orchis will not surprise you with its elegant looks but will bring simplicity and minimal vibes to your setup as it looks so clean out of the box. + +[Get Orchis][29] + +### Conclusion + +As you can see, I have tried to include a wide variety of themes from dark themes for hackers to flat, light themes for minimalists. + +You can combine these themes with a set of [beautiful icons for your Linux desktop][30] and make it look even better. Read this post for more [Xfce customization tips][31]. + +There are surely more themes out there. We don’t have the functionality of sharing images in the comments otherwise I would have loved to see a screenshot of your Xfce desktop. Share the name of your favorite Xfce them nonetheless. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/best-xfce-themes/ + +作者:[Community][a] +选题:[lkxed][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/lkxed +[1]: https://www.xfce.org/ +[2]: https://itsfoss.com/beautiful-linux-distributions/ +[3]: https://itsfoss.com/wp-content/uploads/2022/05/xfce-desktop-screenshot-800x431.webp +[4]: https://www.xfce-look.org/browse/ +[5]: https://itsfoss.com/install-themes-xfce-xubuntu/ +[6]: https://itsfoss.com/wp-content/uploads/2021/10/appearance-xfce.png +[7]: https://itsfoss.com/wp-content/uploads/2022/05/BaZik-xfce-theme-800x450.jpg +[8]: https://www.xfce-look.org/p/1304241/ +[9]: https://itsfoss.com/wp-content/uploads/2022/05/flat-remix-xfce-theme-800x413.webp +[10]: https://www.xfce-look.org/p/1214931/ +[11]: https://itsfoss.com/wp-content/uploads/2022/05/sweet-theme-xfce-800x450.webp +[12]: https://www.xfce-look.org/p/1253385 +[13]: https://itsfoss.com/wp-content/uploads/2022/05/Skeuos-xfce-theme-800x481.jpg +[14]: https://www.xfce-look.org/p/1441725 +[15]: https://itsfoss.com/wp-content/uploads/2022/05/pandora-arc-xfce-theme-800x447.png +[16]: https://www.xfce-look.org/p/1352568/ +[17]: https://itsfoss.com/wp-content/uploads/2022/05/drakula-theme-xfce-800x450.png +[18]: https://awesomewm.org/ +[19]: https://www.xfce-look.org/p/1687249 +[20]: https://itsfoss.com/wp-content/uploads/2022/05/pop-theme-xfce-800x500.png +[21]: https://www.xfce-look.org/p/1299758/ +[22]: https://itsfoss.com/wp-content/uploads/2022/05/windows-10-xfce-theme-800x449.jpg +[23]: https://github.com/B00merang-Project/Windows-10#windows-10-theme-for-linux +[24]: https://itsfoss.com/wp-content/uploads/2022/05/white-sur-xfce-theme-800x450.webp +[25]: https://www.xfce-look.org/p/1403328/ +[26]: https://itsfoss.com/wp-content/uploads/2022/05/axiom-xfce-theme-800x500.jpg +[27]: https://www.xfce-look.org/p/1154707 +[28]: https://itsfoss.com/wp-content/uploads/2022/05/orchis-xfce-theme-800x450.webp +[29]: https://www.xfce-look.org/p/1357889/ +[30]: https://itsfoss.com/best-icon-themes-ubuntu-16-04/ +[31]: https://itsfoss.com/customize-xfce/ diff --git a/sources/tech/20220530 Dynamically linking libraries while compiling code.md b/sources/tech/20220530 Dynamically linking libraries while compiling code.md new file mode 100644 index 0000000000..b4192ccfa2 --- /dev/null +++ b/sources/tech/20220530 Dynamically linking libraries while compiling code.md @@ -0,0 +1,137 @@ +[#]: subject: "Dynamically linking libraries while compiling code" +[#]: via: "https://opensource.com/article/22/5/compile-code-ldlibrarypath" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Dynamically linking libraries while compiling code +====== +Compiling software gives you a lot of flexibility in how you run your system. The LD_LIBRARY_PATH variable, along with the -L and -l GCC options, are components of that flexibility. + +![women programming][1] + +Image by: WOCinTech Chat. Modified by Opensource.com. CC BY-SA 4.0 + +Compiling software is something that developers do a lot, and in open source some users even choose to do it themselves. Linux podcaster Dann Washko calls source code the "universal package format" because it contains all the components necessary to make an application run on any platform. Of course, not all source code is written for all systems, so it's only "universal" within the subset of targeted systems, but the point is that source code is extremely flexible. With open source, you can decide how code is compiled and run. + +When you're compiling code, you're usually dealing with multiple source files. Developers tend to keep different classes or modules in separate files so that they can be maintained separately, and possibly even used by different projects. But when you're compiling these files, many of them get compiled into a single executable. + +This is usually done by creating shared libraries, and then dynamically linking back to them from the executable. This keeps the executable small by keeping modular functions external, and ensures that libraries can be updated independently of the applications that use them. + +### Locating a shared object during compilation + +When you're [compiling with GCC][2], you usually need a library to be installed on your workstation for GCC to be able to locate it. By default, GCC assumes that libraries are in a system library path, such as `/lib64` and `/usr/lib64`. However, if you're linking to a library of your own that's not yet installed, or if you need to link to a library that's not installed in a standard location, then you have to help GCC find the files. + +There are two options significant for finding libraries in GCC: + +* -L (capital L) adds an additional library path to GCC's search locations. +* -l (lowercase L) sets the name of the library you want to link against. + +For example, suppose you've written a library called `libexample.so`, and you want to use it when compiling your application `demo.c`. First, create an object file from `demo.c` : + +``` +$ gcc -I ./include -c src/demo.c +``` + +The `-I` option adds a directory to GCC's search path for header files. In this example, I assume that custom header files are in a local directory called `include`. The `-c` option prevents GCC from running a linker, because this task is only to create an object file. And that's exactly what happens: + +``` +$ ls +demo.o   include/   lib/    src/ +``` + +Now you can use the `-L` option to set a path for your library, and compile: + +``` +$ gcc -L`pwd`/lib -o myDemo demo.o -lexample +``` + +Notice that the `-L` option comes *before* the `-l` option. This is significant, because if `-L` hasn't been added to GCC's search path before you tell GCC to look for a non-default library, GCC won't know to search in your custom location. The compilation succeeds as expected, but there's a problem when you attempt to run it: + +``` +$ ./myDemo +./myDemo: error while loading shared libraries: +libexample.so: cannot open shared object file: +No such file or directory +``` + +### Troubleshooting with ldd + +The `ldd` utility prints shared object dependencies, and it can be useful when troubleshooting issues like this: + +``` +$ ldd ./myDemo +        linux-vdso.so.1 (0x00007ffe151df000) +        libexample.so => not found +        libc.so.6 => /lib64/libc.so.6 (0x00007f514b60a000) +        /lib64/ld-linux-x86-64.so.2 (0x00007f514b839000) +``` + +You already knew that `libexample` couldn't be located, but the `ldd` output at least affirms what's expected from a *working* library. For instance, `libc.so.6` has been located, and `ldd` displays its full path. + +### LD_LIBRARY_PATH + +The `LD_LIBRARY_PATH` [environment variable][3] defines the path to libraries. If you're running an application that relies on a library that's not installed to a standard directory, you can add to the system's library search path using `LD_LIBRARY_PATH`. + +There are several ways to set environment variables, but the most flexible is to place them before you run a command. Look at what setting `LD_LIBRARY_PATH` does for the `ldd` command when it's analyzing a "broken" executable: + +``` +$ LD_LIBRARY_PATH=`pwd`/lib ldd ./ +   linux-vdso.so.1 (0x00007ffe515bb000) +   libexample.so => /tmp/Demo/lib/libexample.so (0x0000... +   libc.so.6 => /lib64/libc.so.6 (0x00007eff037ee000) +   /lib64/ld-linux-x86-64.so.2 (0x00007eff03a22000) +``` + +It applies just as well to your custom command: + +``` +$ LD_LIBRARY_PATH=`pwd`/lib myDemo +hello world! +``` + +If you move the library file or the executable, however, it breaks again: + +``` +$ mv lib/libexample.so ~/.local/lib64 +$ LD_LIBRARY_PATH=`pwd`/lib myDemo +./myDemo: error while loading shared libraries... +``` + +To fix it, you must adjust the `LD_LIBRARY_PATH` to match the library's new location: + +``` +$ LD_LIBRARY_PATH=~/.local/lib64 myDemo +hello world! +``` + +### When to use LD_LIBRARY_PATH + +In most cases, `LD_LIBRARY_PATH` isn't a variable you need to set. By design, libraries are installed to `/usr/lib64` and so applications naturally search it for their required libraries. You may need to use `LD_LIBRARY_PATH` in two cases: + +* You're compiling software that needs to link against a library that itself has just been compiled and has not yet been installed. Good build systems, such as [Autotools][4] and [CMake][5], can help handle this. +* You're bundling software that's designed to run out of a single directory, with no install script or an install script that places libraries in non-standard directories. Several applications have releases that a Linux user can download, copy to `/opt`, and run with "no install." The `LD_PATH_LIBRARY` variable gets set through wrapper scripts so the user often isn't even aware it's been set. + +Compiling software gives you a lot of flexibility in how you run your system. The `LD_LIBRARY_PATH` variable, along with the `-L` and `-l` GCC options, are components of that flexibility. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/compile-code-ldlibrarypath + +作者:[Seth Kenlon][a] +选题:[lkxed][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/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/collab-team-pair-programming-code-keyboard2.png +[2]: https://opensource.com/article/22/5/what-happens-behind-scenes-during-gcc-compilation-c-programs +[3]: https://opensource.com/article/19/8/what-are-environment-variables +[4]: https://opensource.com/article/19/7/introduction-gnu-autotools +[5]: https://opensource.com/article/21/5/cmake diff --git a/sources/tech/20220530 Top 10 Linux Distributions for Windows Users in 2022.md b/sources/tech/20220530 Top 10 Linux Distributions for Windows Users in 2022.md new file mode 100644 index 0000000000..a61d2eb83d --- /dev/null +++ b/sources/tech/20220530 Top 10 Linux Distributions for Windows Users in 2022.md @@ -0,0 +1,250 @@ +[#]: subject: "Top 10 Linux Distributions for Windows Users in 2022" +[#]: via: "https://www.debugpoint.com/2022/05/best-linux-distributions-windows-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Top 10 Linux Distributions for Windows Users in 2022 +====== +We compiled an inventory of the 10 best Linux distributions for Windows users in 2022 based on how easy they are to adopt and successfully migrate from Windows. + +Although there are hundreds of Linux Distributions, very few of them can seriously replace Windows operating system. With the advancements and stability across Linux Kernel and desktop environments, 2022 is the perfect year to adopt Linux as a daily driver. This applies to students, school administrations, hobbyists, scientists, and related work profiles. In addition, the hardware makers also provide Linux support for their device live-ups. + +Linux, in general, still requires some workaround for specific workflows. However, Linux is still catching up on specific niche work profiles. The reason is some specific application vendors do not provide Linux executables. But there are plenty of alternatives available for everything in the Linux world. + +Moreover, for day-to-day work from an average user standpoint, the Linux operating system is now at a stage that can perform all the work you throw. With that in mind, we compiled the below 10 best Linux distributions in 2022 for Windows users. These should cover almost all possible use cases and work profiles (including desktop or Laptop). + +### Best Linux Distributions for Windows Users in 2022 + +#### 1. Zorin OS + +The first Linux distribution we feature in this list is Zorin OS. And there are reasons for that. From a new Windows user standpoint, familiarity is essential and stability. + +Zorin OS is the perfect starting point for Linux Journet for windows users. It comes with built-in Windows-like themes, which you can apply with just a click. Not only that, the main taskbar an appearance you can change with its easy to use settings manager. + +In addition, Zorin is based on the Ubuntu LTS version. Hence, the user gets ultimate stability in packages, applications, and multi-year security patches. + +Other than that, Zorin OS maintains three editions – Pro, Lite and Core, which cater to the different user bases. The Pro edition is a paid version with additional themes and tweaks out of the box with a minimal fee. + +![Zorin OS 16.1 Desktop][1] + +You can download Zorin OS from the below link. + +[Download Zorin OS][2] + +#### 2. Linux Mint Cinnamon Edition + +If you are ever confused about which distro to choose, you can blindly choose “Linux Mint”, especially the Cinnamon edition. Linux Mint Cinnamon edition is a robust Linux distribution that brings a traditional menu and icon-based desktop design perfect for Windows users. + +For the first time, Linux users (from Windows), the installing apps, packages and other aspects might be overwhelming. But the Linux Mint team did an outstanding job with this distribution, which makes your day to day work super uncomplicated. + +In addition, it brings all necessary applications pre-installed, which are helpful for new folks. Other than that, printers, multiple displays and all peripheral device works are “out of the box” in this distribution. + +Linux Mint is based on Ubuntu and Debian. Hence you should get good stability for multiple years. Finally, a helpful community to help you in need via its forums. + +![Linux Mint Cinnamon Edition][3] + +You can download Linux Mint Cinnamon Edition from the below link. + +[Download Linux Mint Cinnamon Edition][4] + +#### 3. Kubuntu LTS Release + +A Linux distribution list is incomplete without Kubuntu, which features the stunning KDE Plasma desktop. Kubuntu is a well designed and stable Linux distribution which brings a fusion of Ubuntu and KDE Plasma desktop. + +The primary selling point is the KDE Plasma desktop which brings a friendly and easy to use desktop environment similar to the Windows operating system. It has the typical bottom taskbar, panels, icons, and widgets that remind you about Windows 11 or 10. + +![Kubuntu 22.04 LTS Desktop][5] + +Moreover, the KDE framework and KDE applications enrich this desktop overall. One of the plus points of the KDE Plasma with Kubuntu is the very active community and development. + +If you are a new Linux user, you can get help from the hugely popular forums and documentation. + +The Kubuntu download link is present below. + +[Download Kubuntu][6] + +#### 4. Deepin + +Deepin Linux distribution is one of the most popular Linux flavours among Windows and macOS users due to its aesthetics and stability. This impressive open-source GNU/Linux distribution is based on Deepin tech and features free and proprietary software. Deepin is popular among users who want a beautiful Linux while being stable. + +At the core, Deepin is based on Debian, which is more stable and provides support for more than sufficient years of security updates. Hence once you install Deepin, you can keep on using the set-up for a longer duration. + +In addition, Deepin features its own App Store, which definitely helps windows users. Also, you get fingerprint support, new hardware support and an additional application pre-installed. + +![Deepin 20 Desktop][7] + +You can download Deepin from the below link. + +[Download Deepin][8] + +#### 5. Ubuntu LTS Release with GNOME + +The fifth distro we feature is the Ubuntu Linux (the default GNOME desktop edition). The Ubuntu LTS releases (with default GNOME Desktop) are the most used Linux Distribution today. It’s the most popular, most downloaded and used by users, enterprises and several real-world needs. + +There is no doubt about the Ubuntu LTS version’s power and stability. It has been time tested. With the vast community support, Ubuntu LTS versions with customized GNOME might be the perfect fit for your needs. + +From a Windows user standpoint, the advantage Ubuntu LTS release beings are the applications and games support. Most of the app and game developers target Ubuntu in Linux in general for initial support. Hence, if you are a Windows user with a critical workflow consisting of complex applications, you should choose Ubuntu LTS editions with GNOME desktop. + +I would not recommend Ubuntu to a Windows user experiencing Linux for the first time. + +![Ubuntu LTS with GNOME][9] + +Finally, you can download Ubuntu using the below link. + +[Download Ubuntu][10] + +#### 6. Endless OS + +Endless OS is one of the unique Linux distributions on this list. It is an [OSTree based][11] free and open-source[Linux Distribution][12]. Packaged from Debian/Ubuntu, but it is not directly based on those. + +We added this distribution because its underlying packages and system remain intact, and it is read-only. The isolated user-space deals with your work and applications. That means it never breaks, and your system remains fresh always as the first installation. + +Endless OS is perfect for schools and organizations that manage labs with many desktop computers and have a little budget for maintaining (updates, upgrades, etc.) those desktops. In addition, its unique and customized GNOME desktop is perfect for the first time Linux users coming from Windows. + +A Windows user may not know what GRUB is, right? Hence, the team designed its installer in a [unique way][13] for those use cases. Also, it has a unique and friendly way of educating WIndows users on its installation with a detailed step by step guide. + +![Endless OS Installer, which can run on Windows][14] + +![Endless OS Desktop version 4.0][15] + +In addition to the above points, if you are ahead of IT of schools, non-profits and planning to get rid of Windows for many desktop units, then it is a perfect distribution to try out. For an individual user, you can use it if you are a little experienced in Linux. + +You can read a detailed review of [Endless OS here][16]. And download it from the below link. + +[Download Endless OS][17] + +#### 7. Linux Lite + +You might be wondering why Linux Lite is a list of distributions for Windows users. Think about a million desktops and laptops that are so-called “outdated” by Windows requirements. They are perfectly well and can run for years with perfect Linux distribution that caters to older hardware. + +Hence, our seventh distro in this list is Linux Lite. It is based on Ubuntu LTS release and comes with easy to use and lightweight [Xfce desktop environment][18]. In addition, Linux Lite also supports 32-bit hardware for older hardware. Moreover, it brings its in-house utilities that make your day to day work super easy. If you have a laptop or desktop with Windows 7 or Windows 10, you can easily format and install Linux Lite for better support. + +![Linux Lite Desktop 5.2][19] + +You can download Linux Lite from the below link. + +[Download Linux Lite][20] + +#### 8. Pop OS + +The Pop OS is developed by Americal computer manufacturer System76 for their lineup of desktops and laptops. System76 sells and supports high-end desktops and notebooks with Pop OS pre-installed. + +Hence, you get better hardware and additional support if you use this distribution in your Windows 10 or Windows 11 system. + +Moreover, Pop OS (based on Ubuntu) is primarily known to have perfect for modern hardware (including NVIDIA graphics) and brings some unique features absent in the traditional Ubuntu with GNOME desktop. For example, you get a well-designed COSMIC desktop with Pop OS, built-in tiling feature, well-optimized power controls, and a stunning Pop Shop. The Pop Shop is a software store designed by its maker to give you a well-categorized set of applications for your study, learning, development, gaming, etc. This distribution is also perfect for gaming if you plan to start your Linux journey with gaming in mind. + +In addition, if you want to get a professional-grade Linux distribution with official help and support, you should check out actual System76 hardware with Pop OS. + +Furthermore, many OEMs such as HP recently decided to launch special edition laptops using Pop OS. This shows how vital this distribution is today and perhaps a professional-grade Windows replacement after Ubuntu. + +![Pop OS][21] + +You can download the Pop OS for various hardware for free using the link below. + +[Download Pop OS][22] + +#### 9. elementary OS + +Our 9th Linux distribution for Windows users is the famous elementary OS. The elementary OS is a Ubuntu LTS based Linux distribution, which brings a mac-OS style user interface. However, it looks like macOS but can be an ideal replacement for Windows. + +Firstly, it’s stable and well designed, keeping a professional experience in mind. It is based on Ubuntu. Hence you get a wide range of help and support already available for Ubuntu Linux. + +Second, elementary OS brings its own curated App Center with a wide range of applications specially designed for elementary OS. + +Moreover, thanks to the beautiful Pantheon desktop, it doesn’t get into your way of working. Overall a little different Linux distribution for Windows users. + +![elementary OS 6 ODIN Desktop][23] + +You can download the elementary OS from the below link. + +[Download elementary OS][24] + +#### 10. Peppermint OS + +The final Linux distribution in this list is Peppermint OS. + +Peppermint OS is a Debian stable-based Linux Distribution that featured LXDE components alongside Xfce earlier. This operating system is primarily used for older hardware which requires stability and minimal maintenance in terms of software. + +Peppermint OS is a user-friendly Linux distribution that is perfect for older hardware. It is based on Debian’s Stable branch, which gives your system multiple years of security updates. In addition, it is also based on an Xfce desktop environment like Linux Lite in this list. + +But it has one unique selling point for Windows users. + +First, it’s well designed welcome screen that gives shortcuts for tasks and activities, which is beneficial for Windows users. + +Second, the Peppermint Hub is an excellent utility which brings all the necessary shortcuts for your system management, from changing themes to updating and downloading software from the repository. + +If you are a new user coming from Windows, Peppermint Hub will take care of most system management tasks from one single point. + +![Peppermint 2022-02-02 Desktop][25] + +![The new Peppermint Hub Application written in Python][26] + +You can download Peppermint OS from the below link. + +[Download Peppermint OS][27] + +### Honorary Mention + +#### Twister UI + +Twister UI is not a Linux distribution. You do not need to download separate icons, themes or cursors. But it’s like an add-on to your Linux Mint (Xfce Edition), which gives you a one-click look and feel of Windows 7, Windows 98 and Windows 10 in Linux Mint. The Pi Labs created this UI, making the [Twister OS][28] for Raspberry Pi and related hardware. + +We mention this here because many “older-generation” Windows users can easily migrate to Linux with help from their friends and family. They mostly know how Windows behaves based on the UI, menu, icons and colours. And it’s easy for them to start with Linux. + +Here’s how it looks (Windows XP theme). For more details, read the [Twister UI review][29]. + +![Twister UI – Windows XP Theme][30] + +### Closing Notes + +I hope this list of “best Linux distributions for Windows users” helps you finally decide and pick one distro for yourself, your friends and co-workers. The above list is prepared based on their current status (active project), prospects (i.e. it has a well-defined vision for the future), how friendly they are to Windows users, and their stability. + +Finally, which Linux distribution for Windows users do you think should be in the top 10 list? Let me know in the comment box below. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/best-linux-distributions-windows-2022/ + +作者:[Arindam][a] +选题:[lkxed][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/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/03/Zorin-OS-16.1-Desktop.jpg +[2]: https://zorin.com/os/download/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Linux-Mint-Cinnamon-Edition.jpg +[4]: https://linuxmint.com/download.php +[5]: https://www.debugpoint.com/wp-content/uploads/2022/04/Kubuntu-22.04-LTS-Desktop.jpg +[6]: https://kubuntu.org/getkubuntu/ +[7]: https://www.debugpoint.com/wp-content/uploads/2020/09/Deepin-20-Desktop.jpg +[8]: https://www.deepin.org/en/download +[9]: https://www.debugpoint.com/wp-content/uploads/2022/05/Ubuntu-LTS-with-GNOME.jpg +[10]: https://ubuntu.com/download/desktop +[11]: https://ostree.readthedocs.io/en/stable/ +[12]: https://www.debugpoint.com/category/distributions +[13]: https://support.endlessos.org/en/installation/windows-installer/dual-boot +[14]: https://www.debugpoint.com/wp-content/uploads/2022/05/Endless-OS-Installer-which-can-run-in-Windows.jpg +[15]: https://www.debugpoint.com/wp-content/uploads/2021/11/Endless-OS-Desktop-version-4.0-1024x582.jpg +[16]: https://www.debugpoint.com/tag/endless-os/ +[17]: https://endlessos.com/ +[18]: https://www.debugpoint.com/tag/xfce +[19]: https://www.debugpoint.com/wp-content/uploads/2020/11/Linux-Lite-Desktop-5.2.jpg +[20]: https://linuxliteos.com/download.php +[21]: https://www.debugpoint.com/wp-content/uploads/2022/05/Pop-OS.jpg +[22]: https://pop.system76.com/ +[23]: https://www.debugpoint.com/wp-content/uploads/2021/08/elementary-OS-6-ODIN-Desktop.jpeg +[24]: https://elementary.io/ +[25]: https://www.debugpoint.com/wp-content/uploads/2022/02/Peppermint-2022-02-02-Desktop.jpg +[26]: https://www.debugpoint.com/wp-content/uploads/2022/02/The-new-Peppermint-Hub-Application-written-in-Python-1024x487.jpg +[27]: https://peppermintos.com/guide/downloading/ +[28]: https://twisteros.com +[29]: https://www.debugpoint.com/2022/02/twister-ui-2022/ +[30]: https://www.debugpoint.com/wp-content/uploads/2022/02/Twister-UI-Windows-XP-Theme.jpg diff --git a/sources/tech/20220531 How dynamic linking for modular libraries works on Linux.md b/sources/tech/20220531 How dynamic linking for modular libraries works on Linux.md new file mode 100644 index 0000000000..e3cba06c3e --- /dev/null +++ b/sources/tech/20220531 How dynamic linking for modular libraries works on Linux.md @@ -0,0 +1,223 @@ +[#]: subject: "How dynamic linking for modular libraries works on Linux" +[#]: via: "https://opensource.com/article/22/5/dynamic-linking-modular-libraries-linux" +[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How dynamic linking for modular libraries works on Linux +====== +Learn how to combine multiple C object files into single executable with dynamic libraries. + +![Links][1] + +Image by: Paul Lewin. Modified by Opensource.com. CC BY-SA 2.0 + +When you write an application using the C programming language, your code usually has multiple source files. + +Ultimately, these files must be compiled into a single executable. You can do this by creating either static or dynamic libraries (the latter are also referred to as shared libraries). These two types of libraries vary in how they are created and linked. Both have advantages and disadvantages, depending on your use case. + +Dynamic linking is the most common method, especially on Linux systems. Dynamic linking keeps libraries modular, so just one library can be shared between any number of applications. Modularity also allows a shared library to be updated independently of the applications that rely upon it. + +In this article, I demonstrate how dynamic linking works. In a future article, I'll demonstrate static linking. + +### Linker + +A linker is a command that combines several pieces of a program together and reorganizes the memory allocation for them. + +The functions of a linker include: + +* Integrating all the pieces of a program +* Figuring out a new memory organization so that all the pieces fit together +* Reviving addresses so that the program can run under the new memory organization +* Resolving symbolic references + +As a result of all these linker functionalities, a runnable program called an executable is created. Before you can create a dynamically linked executable, you need some libraries to link *to* and an application to compile. Get your [favorite text editor][2] ready and follow along. + +### Create the object files + +First, create the header file `mymath.h` with these function signatures: + +``` +int add(int a, int b); +int sub(int a, int b); +int mult(int a, int b); +int divi(int a, int b); +``` + +Create `add.c`, `sub.c` , `mult.c` and `divi.c` with these function definitions. I'm placing all of the code in one code block, so divide it up among four files, as indicated in the comments: + +``` +// add.c +int add(int a, int b){ +return (a+b); +} + +//sub.c +int sub(int a, int b){ +return (a-b); +} + +//mult.c +int mult(int a, int b){ +return (a*b); +} + +//divi.c +int divi(int a, int b){ +return (a/b); +} +``` + +Now generate object files `add.o`, `sub.o`, `mult.o`, and `divi.o` using GCC: + +``` +$ gcc -c add.c sub.c mult.c divi.c +``` + +The `-c` option skips the linking step and creates only object files. + +### Creating a shared object file + +Dynamic libraries are linked during the execution of the final executable. Only the name of the dynamic library is placed in the final executable. The actual linking happens during runtime, when both executable and library are placed in the main memory. + +In addition to being sharable, another advantage of a dynamic library is that it reduces the size of the final executable file. Instead of having a redundant copy of the library, an application using a library includes only the name of the library when the final executable is created. + +You can create dynamic libraries from your existing sample code: + +``` +$ gcc -Wall -fPIC -c add.c sub.c mult.c divi.c +``` + +The option `-fPIC` tells GCC to generate position-independent code (PIC). The `-Wall` option isn't necessary and has nothing to do with how the code is compiling. Still, it's a valuable option because it enables compiler warnings, which can be helpful when troubleshooting. + +Using GCC, create the shared library `libmymath.so` : + +``` +$ gcc -shared -o libmymath.so \ +add.o sub.o mult.o divi.o +``` + +You have now created a simple example math library, `libmymath.so`, which you can use in C code. There are, of course, very complex C libraries out there, and this is the process their developers use to generate the final product that you or I install for use in C code. + +Next, you can use your new math library in some custom code, then link it. + +### Creating a dynamically linked executable + +Suppose you've written a command for mathematics. Create a file called `mathDemo.c` and paste this code into it: + +``` +#include +#include +#include + +int main() +{ +  int x, y; +  printf("Enter two numbers\n"); +  scanf("%d%d",&x,&y); +  +  printf("\n%d + %d = %d", x, y, add(x, y)); +  printf("\n%d - %d = %d", x, y, sub(x, y)); +  printf("\n%d * %d = %d", x, y, mult(x, y)); + +  if(y==0){ +    printf("\nDenominator is zero so can't perform division\n"); +      exit(0); +  }else{ +      printf("\n%d / %d = %d\n", x, y, divi(x, y)); +      return 0; +  } +} +``` + +Notice that the first line is an `include` statement referencing, by name, your own `libmymath` library. To use a shared library, you must have it installed. If you don't install the library you use, then when your executable runs and searches for the included library, it won't be able to find it. Should you need to compile code without installing a library to a known directory, there are [ways to override default settings][3]. For general use, however, it's expected that libraries exist in known locations, so that's what I'm demonstrating here. + +Copy the file `libmymath.so` to a standard system directory, such as `/usr/lib64`, and then run `ldconfig`. The `ldconfig` command creates the required links and cache to the most recent shared libraries found in the standard library directories. + +``` +$ sudo cp libmymath.so /usr/lib64/ +$ sudo ldconfig +``` + +### Compiling the application + +Create an object file called `mathDemo.o` from your application source code (`mathDemo.c` ): + +``` +$ gcc -I . -c mathDemo.c +``` + +The `-I` option tells GCC to search for header files (`mymath.h` in this case) in the directory listed after it. In this case, you're specifying the current directory, represented by a single dot (`.` ). Create an executable, referring to your shared math library by name using the `-l` option: + +``` +$ gcc -o mathDynamic mathDemo.o -lmymath +``` + +GCC finds `libmymath.so` because it exists in a default system library directory. Use `ldd` to verify the shared libraries used: + +``` +$ ldd mathDemo +    linux-vdso.so.1 (0x00007fffe6a30000) +    libmymath.so => /usr/lib64/libmymath.so (0x00007fe4d4d33000) +    libc.so.6 => /lib64/libc.so.6 (0x00007fe4d4b29000) +    /lib64/ld-linux-x86-64.so.2 (0x00007fe4d4d4e000) +``` + +Take a look at the size of the `mathDemo` executable: + +``` +$ du ./mathDynamic +24   ./mathDynamic +``` + +It's a small application, of course, and the amount of disk space it occupies reflects that. For comparison, a statically linked version of the same code (as you'll see in my next article) is 932K! + +``` +$ ./mathDynamic +Enter two numbers +25 +5 + +25 + 5 = 30 +25 - 5 = 20 +25 * 5 = 125 +25 / 5 = 5 +``` + +You can verify that it's dynamically linked with the `file` command: + +``` +$ file ./mathDynamic +./mathDynamic: ELF 64-bit LSB executable, x86-64, +dynamically linked, +interpreter /lib64/ld-linux-x86-64.so.2, +with debug_info, not stripped +``` + +Success! + +### Dynamically linking + +A shared library leads to a lightweight executable, as the linking happens during runtime. Because it resolves references during runtime, it does take more time for execution. However, since the vast majority of commands on everyday Linux systems are dynamically linked and on modern hardware, the time saved is negligible. Its inherent modularity is a powerful feature for developers and users alike. + +In this article, I described how to create dynamic libraries and link them into a final executable. I'll use the same source code to create a statically linked executable in my next article. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/dynamic-linking-modular-libraries-linux + +作者:[Jayashree Huttanagoudar][a] +选题:[lkxed][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/jayashree-huttanagoudar +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/links.png +[2]: https://opensource.com/article/21/2/open-source-text-editors +[3]: https://opensource.com/article/22/5/compile-code-ldlibrarypath diff --git a/sources/tech/20220531 SQLx- The Rust SQL Toolkit.md b/sources/tech/20220531 SQLx- The Rust SQL Toolkit.md new file mode 100644 index 0000000000..1904601008 --- /dev/null +++ b/sources/tech/20220531 SQLx- The Rust SQL Toolkit.md @@ -0,0 +1,355 @@ +[#]: subject: "SQLx: The Rust SQL Toolkit" +[#]: via: "https://www.opensourceforu.com/2022/05/sqlx-the-rust-sql-toolkit/" +[#]: author: "Sibi Prabakaran https://www.opensourceforu.com/author/sibi-prabakaran/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +SQLx: The Rust SQL Toolkit +====== +An async, pure Rust SQL crate features compile-time checked queries without a domain specific language. This article will give a basic whirlwind tour of the library by showing CRUD operations and the transactions supported using it. + +![The-Rust-SQL-Toolkit-Featured-imade][1] + +SQLx is a Rust crate for interacting with your database. Some of its features that distinguish it from other crates in the Rust ecosystem are: + +* Built with async IO in mind +* Compile-time checked queries +* Database agnostic +* Postgres/MySQL drivers are written in pure Rust (as opposed to them being a FFI binding to a C library) +* Works with various runtimes + +**Database setup** +For our demo, we will start with a simple database with two tables and a simple relationship between them: + +``` +CREATe TABLE “person”(“id” SERIAL8 PRIMARY KEY UNIQUE,”name” TEXT NOT NULL,”age” smallint NOT NULL,”email” TEXT NULL) +CREATe TABLE “book”(“id” SERIAL8 PRIMARY KEY UNIQUE,”name” TEXT NOT NULL,”isbn” TEXT NOT NULL,”person” INT8 NOT NULL) +ALTER TABLE “book” ADD CONSTRAINT “book_person_fkey” FOREIGN KEY(“person”) REFERENCES “person”(“id”) ON DELETE RESTRICT ON UPDATE RESTRICT +``` + +We have two tables: + +* Person +* Book + +And there is a relationship between the ‘book’ and the ‘person’ tables. Make sure you have a local (or remote, if you prefer) PostgreSQL running to test it out. You will also need the sqlx *cli* in your *$PATH*. + +**Rust project setup** +We will use Cargo to create a new project. Cargo is the package manager for Rust. It can download your Rust package’s dependencies, compile your packages, make distributable packages, and upload them to crates.io. You can refer to Rust documentation for more details. + +``` +❯ cargo new sqlx-demo Created binary (application) `sqlx-demo` package +``` + +The project is set up as a binary project: + +``` +❯ tree +. +├── Cargo.toml +└── src +└── main.rs +1 directory, 2 files +``` + +Let’s export the database credentials in an environment variable: + +``` +export DATABASE_URL=postgres://postgres:postgres@localhost/sqlx-demo +``` + +Next, we will add the SQL file (20211223133946_initial_setup.sql) as part of the migration: + +``` +❯ sqlx migrate add initial_setup +Creating migrations/20211223133946_initial_setup.sql +``` + +Congratulations on creating your first migration! +Did you know you can embed your migrations in your application binary? On startup, after creating your database connection or pool, add: + +``` +sqlx::migrate!().run(<&your_pool OR &mut your_connection>).await?; +``` + +Note that the compiler won’t pick up new migrations if no Rust source files have changed. You can create a Cargo build script to work around this with `sqlx migrate build-script` (see *https://docs.rs/sqlx/0.5/sqlx/macro.migrate.html).* + +Now you have to go to the above file and add your SQL statements. Once you have done that, you can set up the database: + +``` +❯ sqlx database setup +Applied 20211223133946/migrate initial setup (27.149609ms) +``` + +Next, let’s add the required dependencies to the Cargo*.toml* file: + +``` +[dependencies] +anyhow = “1.0.51” +sqlx = { version = “0.5.9”, features = [ “runtime-tokio-rustls”, “postgres” ]} +tokio = { version = “1”, features = [“full”] } +``` + +And you can modify the main.rs code to do the following things: + +* Set up a connection pool +* Pass credentials to get a connection from the pool + +``` +use sqlx::{PgPool}; +use anyhow::*; +use sqlx::postgres::PgPoolOptions; + +#[derive(Clone)] +pub struct DBApplication { + pool: PgPool +} + +impl DBApplication { + pub async fn new(config: String) -> Result { + let pool = PgPoolOptions::new() + .max_connections(5) + .connect(&config) + .await?; + Ok(DBApplication { pool }) + } +} + +#[tokio::main] +async fn main() -> Result<()> { + let db = DBApplication::new(“postgres://postgres:postgres@localhost/sqlx-demo”.into()).await?; + println!(“Connection acquired!”); + Ok(()) +} +``` + +You can confirm if this works by running the command *cargo run*: + +``` +❯ cargo run + Finished dev [unoptimized + debuginfo] target(s) in 0.04s + Running `target/debug/sqlx-demo` +Connection acquired! +``` + +**Domain types** +We have two tables and, usually, we would want to model them into Rust structs. The easy way of doing this is to use *derive* macros: + +``` +#[derive(sqlx::FromRow, Debug)] +pub struct Person { + id: i64, + name: String, + age: i16, + email: String +} +``` + +The usual convention is to have two sets of records — one for inserting and the other for fetching. I use the New prefix to distinguish them: + +``` +pub struct NewPerson { + pub name: String, + pub age: i16, + pub email: String +} +``` + +Another nice option is to use the *query_as!* macro, as it doesn’t need the above derive macro. I will be using that later in the demo. + +**Transactions** +Let’s write a function to create a person, and let’s use a transaction to do the same: + +``` +pub async fn create_person(&self, person: NewPerson) -> Result { + let mut transaction = self.pool.begin().await?; + let person = sqlx::query_as(“INSERT INTO person(name, age, email) VALUES ($1, $2, $3) RETURNING *;”) + .bind(person.name) + .bind(person.age) + .bind(person.email) + .fetch_one(&mut transaction).await?; + transaction.commit().await?; + Ok(person) +} +``` + +You can modify your main fetch to use it: + +``` +#[tokio::main] +async fn main() -> Result<()> { + let db = DBApplication::new(“postgres://postgres:postgres@localhost/sqlx-demo”.into()).await?; + let sibi = db.create_person(NewPerson{ name: “Sibi”.into(), age: 20, email: “test@psibi.in”.into()}).await?; + println!(“Sibi: {:?}”, sibi); + Ok(()) +} +``` + +Now let’s check if the function returns early because of an error, if the transaction rolls back. We will simulate a failure in the above function by an early return after insert: + +``` +pub async fn create_person(&self, person: NewPerson) -> Result { + let mut transaction = self.pool.begin().await?; + let person = sqlx::query_as(“INSERT INTO person(name, age, email) VALUES ($1, $2, $3) RETURNING *;”) + .bind(person.name) + .bind(person.age) + .bind(person.email) + .fetch_one(&mut transaction).await?; + bail!(“Simulate error”); + transaction.commit().await?; + Ok(person) +} +``` + +And the main function will be like this: + +``` +#[tokio::main] +async fn main() -> Result<()> { + let db = DBApplication::new(“postgres://postgres:postgres@localhost/sqlx-demo”.into()).await?; + let sibi = db.create_person(NewPerson{ name: “Sibi”.into(), age: 20, email: “test@psibi.in”.into()}).await?; + println!(“Sibi: {:?}”, sibi); + Ok(()) +} +``` + +Before running the executable, you can check the current rows in your table: + +``` +sqlx-demo=# select * from person; + id | name | age | email +----+------+-----+------- +(0 rows) +``` + +Now let’s execute the program: + +``` +❯ cargo run Finished dev [unoptimized + debuginfo] target(s) in 0.05s + Running `target/debug/sqlx-demo` +Error: Simulate error +``` + +You can see that it did return an error. You can also verify that the transaction has rolled back and has not inserted the row, by inspecting the rows: + +``` +sqlx-demo=# select * from person; + id | name | age | email +----+------+-----+------- +(0 rows) +``` + +**Other CRUD operations** +Similarly, you can implement other CRUD (create, read, update, delete) operations too: + +``` +pub async fn get_person(&self, id: i64) -> Result { + let mut transaction = self.pool.begin().await?; + let person = sqlx::query_as(“SELECT * from person where id = $1”) + .bind(id) + .fetch_one(&mut transaction).await?; + transaction.commit().await?; + Ok(person) +} + +pub async fn update_person_name(&self, id: i64, name: String) -> Result { + let mut transaction = self.pool.begin().await?; + let person = sqlx::query_as(“UPDATE person SET name = $1 WHERE id = $2 RETURNING *”) + .bind(name) + .bind(id) + .fetch_one(&mut transaction).await?; + transaction.commit().await?; + Ok(person) +} + +pub async fn delete_book(&self, id: i64) -> Result<()> { + let mut transaction = self.pool.begin().await?; + sqlx::query(“DELETE FROM book WHERE id = $1”) + .bind(id) + .fetch_optional(&mut transaction).await?; + transaction.commit().await?; + Ok(()) +} +``` + +**Compile time queries** +One nice thing about SQLx is that it can perform static checks against your database server. Using the *query_as* macro will achieve this. Rewriting the above *get_person* function to use the macro will look like this: + +``` +pub async fn get_person_macro(&self, id: i64) -> Result { + let mut transaction = self.pool.begin().await?; + let person = sqlx::query_as!(Person, “SELECT * from person where id = $1”, id) + .fetch_one(&mut transaction) + .await?; + transaction.commit().await?; + Ok(person) +} +``` + +The real power of it shines when you make mistakes in your SQL query. Let’s change the above code to use *id_*wrong instead of id: + +``` +pub async fn get_person_macro(&self, id: i64) -> Result { + let mut transaction = self.pool.begin().await?; + let person = sqlx::query_as!(Person, “SELECT * from person where id_wrong = $1”, id) + .fetch_one(&mut transaction) + .await?; + transaction.commit().await?; + Ok(person) +} +``` + + +Compiling the above code will give this error: + +``` +error: error returned from database: column “id_wrong” does not exist + --> src/main.rs:99:22 + | +99 | let person = sqlx::query_as!(Person, “SELECT * from person where id_wrong = $1”, id) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: this error originates in the macro `$crate::sqlx_macros::expand_query` (in Nightly builds, run with -Z macro-backtrace for more info) +``` + +As the error message indicates, there is no column named *id_wrong* in your table. + +**Migrations** +You could see above that we ran the migrations using the *sqlx-cli tool.* But in our application code, it will often be handy to run the migrations on a fresh database.*The sqlx::migration* macro is specifically meant for that. It embeds the migration into your binary and can be used to run it before the application is started. This is how your new main function will look like with migrations integration: + +``` +#[tokio::main] +async fn main() -> Result<()> { + let db = DBApplication::new(“postgres://postgres:postgres@localhost/sqlx-demo”.into()).await?; + sqlx::migrate!().run(&db.pool).await?; + ... + ... + Ok(()) +} +``` + +Hopefully, this article gave you a good idea of how to use SQLx for interacting with your database. If you prefer an object-relational mapping (ORM) based solution, these are some of the popular options: + +* Diesel: https://diesel.rs/ +* sea_orm: https://docs.rs/sea-orm/latest/sea_orm/ +* ormx: https://github.com/NyxCode/ormx + +Both sea_orm and ormx are built on top of SQLx. The major differentiating factor between Diesel and the other ORM based solutions is that the former isn’t async IO ready yet. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/sqlx-the-rust-sql-toolkit/ + +作者:[Sibi Prabakaran][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/sibi-prabakaran/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/The-Rust-SQL-Toolkit-Featured-imade.jpg diff --git a/sources/tech/20220601 A visual guide to Kubernetes networking fundamentals.md b/sources/tech/20220601 A visual guide to Kubernetes networking fundamentals.md new file mode 100644 index 0000000000..535c40fd66 --- /dev/null +++ b/sources/tech/20220601 A visual guide to Kubernetes networking fundamentals.md @@ -0,0 +1,123 @@ +[#]: subject: "A visual guide to Kubernetes networking fundamentals" +[#]: via: "https://opensource.com/article/22/6/kubernetes-networking-fundamentals" +[#]: author: "Nived Velayudhan https://opensource.com/users/nivedv" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +A visual guide to Kubernetes networking fundamentals +====== +Networking within Kubernetes isn't so different from networking in the physical world. Remember networking basics, and you'll have no trouble enabling communication between containers, Pods, and Services. + +![Parts, modules, containers for software][1] + +Image by: Opensource.com + +Moving from physical networks using switches, routers, and ethernet cables to virtual networks using software-defined networks (SDN) and virtual interfaces involves a slight learning curve. Of course, the principles remain the same, but there are different specifications and best practices. Kubernetes has its own set of rules, and if you're dealing with containers and the cloud, it helps to understand how Kubernetes networking works. + +The Kubernetes Network Model has a few general rules to keep in mind: + +1. Every Pod gets its own IP address: There should be no need to create links between Pods and no need to map container ports to host ports. +2. NAT is not required: Pods on a node should be able to communicate with all Pods on all nodes without NAT. +3. Agents get all-access passes: Agents on a node (system daemons, Kubelet) can communicate with all the Pods in that node. +4. Shared namespaces: Containers within a Pod share a network namespace (IP and MAC address), so they can communicate with each other using the loopback address. + +### What Kubernetes networking solves + +Kubernetes networking is designed to ensure that the different entity types within Kubernetes can communicate. The layout of a Kubernetes infrastructure has, by design, a lot of separation. Namespaces, containers, and Pods are meant to keep components distinct from one another, so a highly structured plan for communication is important. + +![Container-to-container and pod-to-pod networking][2] + +### Container-to-container networking + +Container-to-container networking happens through the Pod network namespace. Network namespaces allow you to have separate network interfaces and routing tables that are isolated from the rest of the system and operate independently. Every Pod has its own network namespace, and containers inside that Pod share the same IP address and ports. All communication between these containers happens through localhost, as they are all part of the same namespace. (Represented by the green line in the diagram.) + +### Pod-to-Pod networking + +With Kubernetes, every node has a designated CIDR range of IPs for Pods. This ensures that every Pod receives a unique IP address that other Pods in the cluster can see. When a new Pod is created, the IP addresses never overlap. Unlike container-to-container networking, Pod-to-Pod communication happens using real IPs, whether you deploy the Pod on the same node or a different node in the cluster. + +The diagram shows that for Pods to communicate with each other, the traffic must flow between the Pod network namespace and the Root network namespace. This is achieved by connecting both the Pod namespace and the Root namespace by a virtual ethernet device or a veth pair (veth0 to Pod namespace 1 and veth1 to Pod namespace 2 in the diagram). A virtual network bridge connects these virtual interfaces, allowing traffic to flow between them using the Address Resolution Protocol (ARP). + +When data is sent from Pod 1 to Pod 2, the flow of events is: + +1. Pod 1 traffic flows through eth0 to the Root network namespace's virtual interface veth0. +2. Traffic then goes through veth0 to the virtual bridge, which is connected to veth1. +3. Traffic goes through the virtual bridge to veth1. +4. Finally, traffic reaches the eth0 interface of Pod 2 through veth1. + +### Pod-to-Service networking + +Pods are very dynamic. They may need to scale up or down based on demand. They may be created again in case of an application crash or a node failure. These events cause a Pod's IP address to change, which would make networking a challenge. + +![Pod-to-Service networking][3] + +Kubernetes solves this problem by using the Service function, which does the following: + +1. Assigns a static virtual IP address in the frontend to connect any backend Pods associated with the Service. +2. Load-balances any traffic addressed to this virtual IP to the set of backend Pods. +3. Keeps track of the IP address of a Pod, such that even if the Pod IP address changes, the clients don't have any trouble connecting to the Pod because they only directly connect with the static virtual IP address of the Service itself. + +The in-cluster load balancing occurs in two ways: + +1. IPTABLES: In this mode, kube-proxy watches for changes in the API Server. For each new Service, it installs iptables rules, which capture traffic to the Service's clusterIP and port, then redirects traffic to the backend Pod for the Service. The Pod is selected randomly. This mode is reliable and has a lower system overhead because Linux Netfilter handles traffic without the need to switch between userspace and kernel space. +2. IPVS: IPVS is built on top of Netfilter and implements transport-layer load balancing. IPVS uses the Netfilter hook function, using the hash table as the underlying data structure, and works in the kernel space. This means that kube-proxy in IPVS mode redirects traffic with lower latency, higher throughput, and better performance than kube-proxy in iptables mode. + +The diagram above shows the package flow from Pod 1 to Pod 3 through a Service to a different node (marked in red). The package traveling to the virtual bridge would have to use the default route (eth0) as ARP running on the bridge wouldn't understand the Service. Later, the packages have to be filtered by iptables, which uses the rules defined in the node by kube-proxy. Therefore the diagram shows the path as it is. + +### Internet-to-Service networking + +So far, I have discussed how traffic is routed within a cluster. There's another side to Kubernetes networking, though, and that's exposing an application to the external network. + +![Internet-to-service][4] + +You can expose an application to an external network in two different ways. + +1. Egress: Use this when you want to route traffic from your Kubernetes Service out to the Internet. In this case, iptables performs the source NAT, so the traffic appears to be coming from the node and not the Pod. +2. Ingress: This is the incoming traffic from the external world to Services. Ingress also allows and blocks particular communications with Services using rules for connections. Typically, there are two ingress solutions that function on different network stack regions: the service load balancer and the ingress controller. + +### Discovering Services + +There are two ways Kubernetes discovers a Service: + +1. Environment Variables: The kubelet service running on the node where your Pod runs is responsible for setting up environment variables for each active service in the format {SVCNAME}_SERVICE_HOST and {SVCNAME}_SERVICE_PORT. You must create the Service before the client Pods come into existence. Otherwise, those client Pods won't have their environment variables populated. +2. DNS: The DNS service is implemented as a Kubernetes service that maps to one or more DNS server Pods, which are scheduled just like any other Pod. Pods in the cluster are configured to use the DNS service, with a DNS search list that includes the Pod's own namespace and the cluster's default domain. A cluster-aware DNS server, such as CoreDNS, watches the Kubernetes API for new Services and creates a set of DNS records for each one. If DNS is enabled throughout your cluster, all Pods can automatically resolve Services by their DNS name. The Kubernetes DNS server is the only way to access ExternalName Services. + +### ServiceTypes for publishing Services: + +Kubernetes Services provide you with a way of accessing a group of Pods, usually defined by using a label selector. This could be applications trying to access other applications within the cluster, or it could allow you to expose an application running in the cluster to the external world. Kubernetes ServiceTypes enable you to specify what kind of Service you want. + +![Four ServiceTypes][5] + +The different ServiceTypes are: + +1. ClusterIP: This is the default ServiceType. It makes the Service only reachable from within the cluster and allows applications within the cluster to communicate with each other. There is no external access. +2. LoadBalancer: This ServiceType exposes the Services externally using the cloud provider's load balancer. Traffic from the external load balancer is directed to the backend Pods. The cloud provider decides how it is load-balanced. +3. NodePort: This allows the external traffic to access the Service by opening a specific port on all the nodes. Any traffic sent to this Port is then forwarded to the Service. +4. ExternalName: This type of Service maps a Service to a DNS name by using the contents of the externalName field by returning a CNAME record with its value. No proxying of any kind is set up. + +### Networking software + +Networking within Kubernetes isn't so different from networking in the physical world, as long as you understand the technologies used. Study up, remember networking basics, and you'll have no trouble enabling communication between containers, Pods, and Services. + +Image by: (Nived Velayudhan, CC BY-SA 4.0) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/kubernetes-networking-fundamentals + +作者:[Nived Velayudhan][a] +选题:[lkxed][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/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/containers_modules_networking_hardware_parts.png +[2]: https://opensource.com/sites/default/files/2022-05/1containerandpodnets.jpg +[3]: https://opensource.com/sites/default/files/2022-05/2podtoservicenets.jpg +[4]: https://opensource.com/sites/default/files/2022-05/3internettoservicenets.jpg +[5]: https://opensource.com/sites/default/files/2022-05/4servicetypes_0.png diff --git a/sources/tech/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md b/sources/tech/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md new file mode 100644 index 0000000000..1fabed8d0c --- /dev/null +++ b/sources/tech/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md @@ -0,0 +1,136 @@ +[#]: subject: "How to Create Local Yum/DNF Repository on RHEL 9" +[#]: via: "https://www.linuxtechi.com/create-local-yum-dnf-repository-rhel/" +[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to Create Local Yum/DNF Repository on RHEL 9 +====== +Hello techies, recently Red Hat has released its latest operating system RHEL 9. RHEL 9 fulfill all the requirements of hybrid cloud. It can be installed on physical server, virtual machine and inside the container image. + +When we don’t have subscription and want to install packages for doing the POCs then setting up local yum or dnf repository will be handy. + +In this guide, we will cover how to create local yum/dnf repository on RHEL 9 using DVD or ISO file step by step. + +Prerequisites for creating local Yum/DNF repository + +* Minimal Install RHEL 9 system +* Sudo User with admin privileges +* RHEL 9 DVD or ISO file + +### 1 ) Mount RHEL 9 ISO File or DVD + +We are assuming RHEL 9 iso file is already copied into the system. Run following mount command to mount ISO file on /opt/repo folder. + +``` +$ sudo mkdir /var/repo +$ sudo mount -o loop rhel-baseos-9.0-x86_64-dvd.iso /var/repo/ +``` + +![Mount-RHEL9-ISO-File-Command][1] + +In case of  dvd, run + +``` +$ sudo mount /dev/sr0 /var/repo/ +``` + +### 2) Create Repo File in ‘/etc/yum.repos.d/’ Directory + +Create a repo file with name ‘rhel9-local.repo’ under the folder /etc/yum.repos.d/ with following content + +``` +$ sudo vi /etc/yum.repos.d/rhel9-local.repo +[Local-BaseOS] +name=Red Hat Enterprise Linux 9 - BaseOS +metadata_expire=-1 +gpgcheck=1 +enabled=1 +baseurl=file:///var/repo//BaseOS/ +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release + +[Local-AppStream] +name=Red Hat Enterprise Linux 9 - AppStream +metadata_expire=-1 +gpgcheck=1 +enabled=1 +baseurl=file:///var/repo//AppStream/ +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +``` + +Save and close the file. + +![RHEL8-Local-Repo-File][2] + +### 3) Flush Yum/DNF & Subscription Manager Cache + +Execute following commands to clean yum or dnf and subscription manager cache. + +``` +$ sudo dnf clean all +$ sudo subscription-manager clean +``` + +![DNF-Subscription-Manager-Clean][3] + +In the above output, we are getting a warning message ‘This system is not registered with an entitlement’. So, to suppress this warning message, edit the file  ‘/etc/yum/pluginconf.d/subscription-manager.conf’ , change the parameter ‘enabled=1’ to ‘enabled=0’. + +``` +$ sudo vi /etc/yum/pluginconf.d/subscription-manager.conf +``` + +![Disable-Subscription-Parameter-RHEL-9][4] + +Save and exit the file. + +### 4) Install Packages using Local Repository + +Now we are all set to test our local repository. Run beneath command to view configure repository. + +``` +$ sudo dnf repolist +``` + +Output, + +![DNF-Repolist-RHEL-9][5] + +Now, try Install packages using dnf command via above configure local repository. + +``` +$ sudo dnf install nfs-utils +``` + +Output, + +![Install-RPM-Package-via-local-repo-rhel9][6] + +![Package-Installation-Completion-RHEL9-DNF-Command][7] + +Perfect, above output confirms that nfs-utils package along with its dependencies are installed successfully via locally configured yum or dnf repository. + +That’s all from this guide. I hope you have found it informative. Kindly do post your queries and feedback in below comments section. + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/create-local-yum-dnf-repository-rhel/ + +作者:[Pradeep Kumar][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxtechi.com/author/pradeep/ +[b]: https://github.com/lkxed +[1]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Mount-RHEL9-ISO-File-Command.png +[2]: https://www.linuxtechi.com/wp-content/uploads/2022/06/RHEL8-Local-Repo-File.png +[3]: https://www.linuxtechi.com/wp-content/uploads/2022/06/DNF-Subscription-Manager-Clean.png +[4]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Disable-Subscription-Parameter-RHEL-9.png +[5]: https://www.linuxtechi.com/wp-content/uploads/2022/06/DNF-Repolist-RHEL-9.png +[6]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Install-RPM-Package-via-local-repo-rhel9.png +[7]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Package-Installation-Completion-RHEL9-DNF-Command.png diff --git a/sources/tech/20220601 KDE Plasma vs. Xfce- Comparing Lean and Mean Desktop Environments for Linux Users.md b/sources/tech/20220601 KDE Plasma vs. Xfce- Comparing Lean and Mean Desktop Environments for Linux Users.md new file mode 100644 index 0000000000..9bbd549a8e --- /dev/null +++ b/sources/tech/20220601 KDE Plasma vs. Xfce- Comparing Lean and Mean Desktop Environments for Linux Users.md @@ -0,0 +1,161 @@ +[#]: subject: "KDE Plasma vs. Xfce: Comparing Lean and Mean Desktop Environments for Linux Users" +[#]: via: "https://itsfoss.com/kde-vs-xfce/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +KDE Plasma vs. Xfce: Comparing Lean and Mean Desktop Environments for Linux Users +====== +KDE Plasma and Xfce are two popular desktop environment options for lightweight Linux distributions. + +While Xfce is still favored more for some of the [best lightweight Linux distributions][1], KDE Plasma is not a resource-heavy desktop either. + +To help you pick a suitable desktop environment, we will be comparing some of the most common aspects of a desktop environment. + +In case you are exploring some of the [best desktop environments][2] for the first time, you might want to know the [differences between KDE Plasma and GNOME][3] as well. It should help you choose the ideal desktop for your system. + +**Note**: *KDE is the entire community of people working on various projects under its umbrella. And, the desktop environment is Plasma. Here, we compare the Plasma desktop with Xfce. However, for simplicity, we tend to use “KDE” instead of “Plasma”* *in some cases.* + +### User Experience + +Both [KDE Plasma][4] and [Xfce][5] are tailored to provide the most comfortable Windows-like experience in a Linux distribution. However, KDE can be a more suitable choice. + +This is a big deal for users who recently switched from[Windows to Linux to experience the perks][6]. + +![kde home 2022][7] + +In other words, you will find a similar layout with a start menu (app menu) and navigate your way around through that in KDE. + +Xfce does provide a simple user interface. But, it could be too bland for users coming from macOS or Windows. + +![xfce xubuntu][8] + +Previously, Xfce could have been tagged as an old-school Linux desktop using a retro-style icon theme and window decorations. However, Xfce has evolved over the years to provide elementary-OS-like visuals out of the box. + +KDE can be a more modern experience vs. Xfce, but none of them should disappoint you. + +### App Ecosystem + +KDE comes packed with several utilities and countless projects under its umbrella. You’ll find a number of ‘K apps’ such as KDE Connect, Kdenlive, Konsole, etc. The software center ‘Discover’ is a good GUI utility for finding and installing applications. + +![kde discover][9] + +In contrast, Xfce falls short on the offerings. There are not as many ‘X apps’. It also doesn’t offers a software center. You are likely be using the good old [Synaptic Package Manager][10]. + +However, Xfce manages to offer the essentials without adding bloat to your system. + +If you want the option to explore various applications tailored for your desktop environment, KDE should offer a better app ecosystem overall. + +### Customizability + +![kde appearance custom][11] + +KDE Plasma is best known for its customizability. You can also refer to our [guide to explore customization tips][12] if you are a new KDE Plasma user. + +Considering KDE as a desktop environment that offers a wide range of options, colors, themes, widgets, and more, you get to tweak numerous things to personalize your experience. + +That being said, it can be overwhelming for beginners. + +So, if you want customizability of essential parts of the distro but still want to keep things simple, Xfce can be the right choice. + +![xfce customization][13] + +Xfce may not be customizable, but it [offers all the useful tweaks][14], including adding a launcher, customizing the taskbar, etc. + +### Development Activity and Stability  + +KDE and Xfce aim to provide the most stable experience possible. + +However, if you dislike frequent changes/updates to the desktop environment, Xfce should be a better option. + +There are no exact schedules for Xfce upgrades, but you will likely find them once in two-three years or longer. + +Of course, the Xfce development team is smaller than KDE’s, which is also a reason for fewer releases. But, it is still a good reason for stability without breaking many of the functionalities in Linux distributions. + +While KDE Plasma’s development activity always manages to grab the spotlight, the frequent updates may introduce bugs/issues for some users. + +Fortunately, you also have KDE Plasma LTS versions if you do not want the latest features always. + +Suppose you do not worry much about the stability but want to keep up with the modern standards. In that case, KDE Plasma will be a better candidate in terms of faster development activity while introducing user-requested changes regularly. + +### Performance + +Even though Xfce is favored more for resource-friendly distributions, KDE Plasma cannot be ignored. + +![xfce performance][15] + +You should get a snappy experience with both the desktop environments on older computers. + +For example, I tried comparing Kubuntu vs. Xubuntu to check the resource usage. It appears that the memory usage is about the same. + +![kde resource usage][16] + +It should not be a big deal. But, it is something to note on paper. + +### Accessibility Options + +A desktop environment needs to enhance accessibility for physically challenged users. + +While both the desktop environments offer insufficient accessibility support compared to GNOME, KDE can be an easier option to work with instead of Xfce. + +![kde accesibility][17] + +You get the option to enable the screen reader, customize mouse navigation, apply keyboard filters, and more. You need to install Orca Screen Reader before accessing the feature from KDE Plasma’s settings. + +With Xfce, we have less clarity on what to do with a screen reader, except you have a simple option to enable screen readers and magnifiers with a single click. + +![xfce accessibility][18] + +Of course, none of them are excellent choices in terms of accessibility options. So, you can try exploring both of them if you are not sure about it. + +### Available Distributions + +You can find KDE and Xfce editions for the most popular Linux distributions, including Ubuntu flavors, Manjaro, Linux Mint, and more. + +Xfce is pretty standard with lightweight Linux distributions as the primary offering, such as Linux Lite. + +In general, KDE-powered distributions are more popular. You can refer to our [list of KDE-based Linux distributions][19] to find some of the best options for your system. + +### Final Verdict: What Should You Pick? + +KDE Plasma should be an easy pick for most looking for a modern user experience with customizability. + +However, if you just need to get some things done on your older computer, with a simple user interface, Xfce can be an impressive option. + +What would you prefer between the two desktop environments? Let me know your thoughts in the comments below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/kde-vs-xfce/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://itsfoss.com/lightweight-linux-beginners/ +[2]: https://itsfoss.com/best-linux-desktop-environments/ +[3]: https://itsfoss.com/kde-vs-gnome/ +[4]: https://kde.org/plasma-desktop/ +[5]: https://www.xfce.org/ +[6]: https://itsfoss.com/linux-better-than-windows/ +[7]: https://itsfoss.com/wp-content/uploads/2022/02/kde-home-2022.png +[8]: https://itsfoss.com/wp-content/uploads/2022/06/xfce-xubuntu.jpg +[9]: https://itsfoss.com/wp-content/uploads/2022/02/kde-discover-800x595.png +[10]: https://itsfoss.com/synaptic-package-manager/ +[11]: https://itsfoss.com/wp-content/uploads/2022/02/kde-appearance-custom-800x564.png +[12]: https://itsfoss.com/kde-customization/ +[13]: https://itsfoss.com/wp-content/uploads/2022/06/xfce-customization.jpg +[14]: https://itsfoss.com/customize-xfce/ +[15]: https://itsfoss.com/wp-content/uploads/2022/06/xfce-performance-800x556.png +[16]: https://itsfoss.com/wp-content/uploads/2022/02/kde-resource-usage-800x599.png +[17]: https://itsfoss.com/wp-content/uploads/2022/02/kde-accesibility.png +[18]: https://itsfoss.com/wp-content/uploads/2022/06/xfce-accessibility.png +[19]: https://itsfoss.com/best-kde-distributions/ diff --git a/sources/tech/20220601 Linux desktops- KDE vs GNOME.md b/sources/tech/20220601 Linux desktops- KDE vs GNOME.md new file mode 100644 index 0000000000..ba2c80e25d --- /dev/null +++ b/sources/tech/20220601 Linux desktops- KDE vs GNOME.md @@ -0,0 +1,96 @@ +[#]: subject: "Linux desktops: KDE vs GNOME" +[#]: via: "https://opensource.com/article/22/6/kde-vs-gnome-linux-desktop" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Linux desktops: KDE vs GNOME +====== +Comparing two open source desktops side by side shows that both styles serve important purposes. + +![How to upgrade your Fedora Linux system with DNF][1] + +Image by: Opensource.com + +I'm an ardent KDE [Plasma Desktop][2] user, but at work I happily use [GNOME][3]. Without getting into the question of which desktop I'd take to a desert island (that happens to have a power outlet), I see the merits of both desktops, and I'd rather use either of them than non-open source desktop alternatives. + +I've tried the proprietary alternatives, and believe me, they're not fun (it took one over a decade to get virtual workspaces, and the other still doesn't have a screenshot function built in). And for all the collaboration that the KDE and GNOME developers do these days at conferences like GUADEC, there's still a great philosophical divide between the two. + +And you know what? That's a good thing. + +### Missing the tree for the forest + +As a KDE user, I'm used to options. When I right-click on an object, whether it's a file, a widget, or even the empty space between widgets, I expect to see at least 10 options for what I'd like to do or how I'd like to configure the object. I like that because I like to configure my environment. I see that as the "power" part of being a "power user." I want to be able to adapt my environment to my whims to make it work better for me, even when the way I work is utterly unique and maybe not even sensible. + +GNOME doesn't give the user dozens of options with every right-click. In fact, GNOME doesn't even give you that many options when you go to Settings. To get configuration options, you have to download a tool called Tweaks, and for some you must install extensions. + +I'm not a GNOME developer, but I've set up a lot of Linux computers for friends and colleagues, and one thing I've noticed is that everybody has a unique perception of interface design. Some people, myself included, enjoy seeing a multitude of choices readily available at every turn. + +Other people don't. + +Here's what I see when I right-click on a file in the KDE Plasma Desktop: + +![This screenshot shows a menu that opens when right-clicking on a file in KDE. There is a list of 15 options of things to do with the file, such as copy, rename, compress, share, and so forth, many of which have submenus for additional options. Actions is selected on the menu, showing an additional 7 options.][4] + +Here's what I see when I right-click on a file in the GNOME desktop: + +![This screenshot of the menu that appears when right-clicking on a file on GNOME shows a list of 11 action options.][5] + +Including submenus, my Plasma Desktop has over 30 choices in a right-click. Of course, that's partly because I've configured it that way, and context matters, too. I have more options in a Git repository, for instance, than outside of one. By contrast, GNOME has 11 options in a right-click. + +Bottom line: Some users aren't keen to mentally filter out 29 different options so they can see the one option they're looking for. Minimalism allows users to focus on essential and common actions. Having only the essential options can be comforting for new users, a mental relief for the experienced user, and efficient for all users. + +### Mistake vectors + +As a Linux "power user," I fall prey to the old adage that I'm responsible for my own errors. It's the stuff of legend that Linux gives you access to "dangerous" commands and that, should you choose to use them, you're implicitly forgoing your right to complain about the results. For the record, I've never agreed with this sentiment, and I've [written and promoted tools][6] that help avoid mistakes in the terminal. + +The problem is that mistakes are not planned. If you could plan your mistakes, you could choose not to make them. What actually happens is that mistakes occur when you haven't planned them, usually at the worst possible moment. + +One way to reduce error is to reduce choice. When you have only two buttons to press, you can make only one mistake. It's also easier to identify what mistake you've made when there are fewer avenues to take. When you have five buttons, not only can you make four mistakes, but you also might not recall which button out of the five was the wrong one (and the other wrong one, and the other, and so on). + +Bottom line: Fewer choices mean fewer mistakes for users. + +### Maintenance + +If you've ever coded anything, this story might seem familiar to you. It's Friday evening, and you have an idea for a fun little improvement to your code. It seems like an easy feature to implement; you can practically see the code changes in your head. You have nothing better to do that evening, so you get to work. Three weeks later, you've implemented the feature, and all it took was a complete overhaul of your code. + +This is not an uncommon developer story. It happens because code changes can have unanticipated ripple effects that you just don't foresee before making the change. In other words, code is expensive. The more code you write, the more you have to maintain. The less code you write, the fewer bugs you have to hunt. + +### The eye of the beholder + +Most users customize their desktop with digital wallpaper. Beyond that, however, I expect most people use the desktop they've been given. So the desktop that GNOME and KDE developers provide is generally what people use, and in the end not just beauty but also the best workflow really are in the eye of the beholder. + +I fall into a particular work style when I'm using KDE, and a different style of work when I use GNOME. After all, things are arranged in different locations (although I keep my KDE panel at the top of my screen partly to mimic GNOME's design), and the file managers and the layout of my virtual workspaces are different. + +It's a luxury of open source to have arbitrary preferences for your tools. There's plenty to choose from, so you don't have to justify what you do or don't like about one desktop or another. If you try one and can't get used to it, you can always switch to the other. + +### Minimalism with Linux + +I used to think that it made sense to use a tool with 100 options because you can just ignore the 95 that you don't need and focus on the five that you do. The more I use GNOME, however, the more I understand the advantages of minimalism. Reduced design helps some users focus on what matters, it helps others avoid confusion and mistakes due to a complex user interface (UI), and it helps developers maintain quality code. And some people just happen to prefer it. + +There's a lesson here for users and developers alike, but it's not that one is better than the other. In fact, these principles apply to a lot more than just KDE and GNOME. User experience and developer experience are each important, and sometimes complexity is warranted while other times minimalism has the advantage. + +Image by: (Seth Kenlon, CC BY-SA 4.0) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/kde-vs-gnome-linux-desktop + +作者:[Seth Kenlon][a] +选题:[lkxed][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/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/rh_003499_01_linux31x_cc.png +[2]: https://opensource.com/article/19/12/linux-kde-plasma +[3]: https://opensource.com/article/19/12/gnome-linux-desktop +[4]: https://opensource.com/sites/default/files/2022-05/kde-right-click.png +[5]: https://opensource.com/sites/default/files/2022-05/gnome-right-click.png +[6]: https://www.redhat.com/sysadmin/recover-file-deletion-linux#trash diff --git a/sources/tech/20220601 What is Federated Learning-.md b/sources/tech/20220601 What is Federated Learning-.md new file mode 100644 index 0000000000..1f66f8db42 --- /dev/null +++ b/sources/tech/20220601 What is Federated Learning-.md @@ -0,0 +1,60 @@ +[#]: subject: "What is Federated Learning?" +[#]: via: "https://www.opensourceforu.com/2022/06/what-is-federated-learning/" +[#]: author: "Aanchal Narendran https://www.opensourceforu.com/author/aanchal-narendran/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +What is Federated Learning? +====== +Federated learning is a distributed machine learning approach for developing and training models on a global scale. This article introduces a few open source frameworks that help to explore it, which every newbie must know of. + +![Federated-Learning][1] + +Federated learning helps to develop and train models for distributed machine learning. Loosely translated, federation means a group of objects working towards the same common goal. In federated learning, the model is developed with the help of updates from a large group of devices, usually phones. Prior to the advent of federated learning, devices leveraging various artificial intelligence solutions sent repeated messages embedded with the data stored on the device. This led to two major bottlenecks: + +* Communication: Not all devices in question had constant Internet access. Moreover, the bandwidth was very often insufficient for such a transfer. +* Privacy: Any third party actor with a malicious intent could figure out a way to access the data coming in from a consumer. + +To address all of this and much more, Google introduced federated learning. Originally built into the Google keyboard, it quickly piqued the interest of the research community. The benefits of federated learning are: + +* Leverages the on-device compute power of modern-day electronics +* Protects the privacy of the customer with zero data transfers +* Can function in a decentralised architecture to handle single-point failures +* Trains over a high number of clients even with slow or low-quality Internet +* Is robust and can handle client dropouts up to a threshold value + +Although federated learning was developed and visualised as an enterprise solution, there are quite a few open source frameworks that help you explore it even if you have access to a single desktop. Let’s take a quick look at them. + +### TensorFlow Federated + +TensorFlow is one of the most popular frameworks used for building machine learning and deep learning models. Its popularity is nestled in the ability to run TensorFlow models reliably on any device — from a custom server to a handheld IoT device — and its ease of integration and extensive support for tooling. TensorFlow Federated is an open source framework built to support research and development of machine learning models using federated learning on decentralised data. It allows developers and researchers to simulate existing model architectures as well as test novel architectures for federated learning. It has two main interfaces. + +*Federated Core API:* This is a programming environment for developing distributed computations. It serves as a foundation for the Federated Learning API and is used by systems researchers + +*Federated Learning API:* This high-level interface helps machine learning developers and researchers incorporate federated learning without having to look into the low-level details. + +Further documentation for this framework is available at *https://www.tensorflow.org/federated.* + +### PySyft + PyGrid + +PySyft is a Python library that aids in developing federated learning models for the purpose of research. It uses differential privacy and encrypted communications. It works in tandem with existing deep learning frameworks such as TensorFlow and PyTorch. However, PySyft alone isn’t sufficient to work on problems that involve communications over a network. This is where PyGrid comes in, as it helps to implement federated learning on a wide variety of devices and to deploy PySyft at scale. + +Further documentation is available at *https://github.com/OpenMined/PySyft.* + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/what-is-federated-learning/ + +作者:[Aanchal Narendran][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/aanchal-narendran/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Federated-Learning.jpg diff --git a/sources/tech/20220602 Creating a GitHub Action from Scratch.md b/sources/tech/20220602 Creating a GitHub Action from Scratch.md new file mode 100644 index 0000000000..550971f29d --- /dev/null +++ b/sources/tech/20220602 Creating a GitHub Action from Scratch.md @@ -0,0 +1,97 @@ +[#]: subject: "Creating a GitHub Action from Scratch" +[#]: via: "https://www.opensourceforu.com/2022/06/creating-a-github-action-from-scratch/" +[#]: author: "M.V. Karan https://www.opensourceforu.com/author/m-v-karan/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Creating a GitHub Action from Scratch +====== +DevOps practices use automation to carry out repetitive tasks, leaving you free to focus on the more challenging but fun parts of building software. This article will explain how to use GitHub Actions, the automation platform baked into all GitHub projects for free. + +![Creating-a-GitHub-Action-from-Scratch-Featured-image][1] + +gitHub Actions makes it easy to automate all the software workflows that you see in your program — from code reviews, branch management and issue triaging, to even a complete CI/CD pipeline. + +GitHub Actions runs workflows when other events happen in your repository, such as when code is pushed, a pull request is opened or an issue is created. ‘Workflows’ are YAML specs that are defined within the .github/workflows directory in your repository. These workflows contain one or more ‘jobs’ that can be run sequentially or in parallel. Each job will run inside its own virtual machine ‘runner’ or inside a container. Each job has one or more steps that either run a script you define, or run an ‘action’ which is a reusable extension that can simplify your workflow. These actions can be either those that you create yourself, or use for free from the GitHub Marketplace. Figure 1 illustrates how all of this works together in accomplishing the automation that you need. + +![Figure 1: How GitHub Actions work][2] + +Let’s understand this better through an example that many of us might have seen in our CI pipelines — when code is pushed, create a build (Figure 2). + +![Figure 2: Example of push and build][3] + +In this example, the ‘event’ that happens in your repository is a ‘push’ event, and you need automation to create a build of your code. To accomplish this, you need to create a workflow YAML file within the .github/workflows directory, and define all the necessary components of jobs, runners and steps necessary for your build to take place. + +### Workflow files + +Let’s look at how to write workflows in YAML to define the automation that you need. Figure 3 gives an example of what a workflow file will look like, along with all the elements necessary. + +In this example, you can see the ‘on’ key that defines the event in your repository. On clicking this, the workflow is triggered to run automatically using GitHub Actions. Your workflow can have multiple triggers, and even add qualifiers to certain events (like triggering a workflow only when a push event occurs on the main branch). + +Followed by this is a ‘jobs’ key that defines all the jobs in the workflow, with a name for each job. In our example, there is only one job named ‘build’ that runs on its own virtual machine runner with the ubuntu-latest image as defined by the runs-on key. + +Within the job is a list of steps that need to run in sequence on the same virtual machine in order to accomplish the task of the job. In our example, these might be to do whatever is required in order to create a build. + +In Figure 3, the first step uses an ‘action’ from the GitHub Marketplace that does a check of the code; the next two steps run scripts within the shell of the virtual machine runner, and the last step runs a custom action that’s defined in the repository. You can use any combination of these scripts and actions necessary to accomplish the tasks for your job. + +![Figure 3: Example workflow file][4] + +### Why use GitHub Actions? + +GitHub Actions is native to GitHub and integrates well with the common software development workflows you might be familiar with on it. You can accomplish many of your automation needs solely with GitHub Actions, or even combine them with other tools to manage your workflows in a seamless way. + +Actions is independent of the language/framework that you use for your project, and you can use it to automate any of your workflows. Whether you want to run simple linting using JS libraries, create a distributable from your code, build a container image, or do anything else in between, you can accomplish it using GitHub Actions. + +Since workflow jobs run on virtual machine runners, you can run your workflows on Linux, macOS, Windows or even ARM. You can choose which architecture and OS you want for each of your jobs within your workflow, based on your own use case. These virtual machine runners can be hosted by GitHub, or you can even self-host them. Alternatively, you can choose to skip the virtual machine runner altogether and just run a container image when your workflow gets triggered. + +GitHub Actions is used by many developers, open source projects and businesses for their automation needs. If you check out various open source projects on GitHub, you might find that many of them are using Actions for their project management, CI/CD pipelines or other automations. There are more than 12,000 community-powered Actions extensions on the GitHub Marketplace that you can use readily within your own workflows and build on top of. + +Lastly, GitHub Actions is completely free for public repositories, and has free limits for private repositories as well. + +### Why build your own action? + +While there are thousands of actions available on the GitHub Marketplace that you could use, there could be scenarios where you might have to create your own action extension for use within your workflows. + +First, if you want to perform certain tasks or have some custom logic for which an action extension doesn’t already exist on the Marketplace, it is often useful to write your own action. This helps make your workflow modular, and also enables reuse and sharing within your teams, projects or organisations. + +Second, if you want to integrate GitHub and any other services/tools that you might use, you can do this easily by creating a GitHub Action that interacts with the APIs of those services/tools. This makes it easier for you to interact with other tools from within your workflows through GitHub Actions. + +One of the main benefits of GitHub Actions being native to GitHub is that it is accessible to the millions of developers using the latter. If an action that you create on your own can be used by other developers as well, you can publish it yourself for free on the GitHub Marketplace and make it available to everyone on GitHub. + +### How to build your own action + +An action has essentially two components (Figure 4). One is a YAML file called action.yml and the other is the source code of your action. + +![Figure 4: Components of your own GitHub Action][5] + +Let us look at what exactly these two components do. + +The*action.yml* file stores the metadata about the action you are building. It stores details like the name of the action, what are the inputs it needs and the outputs it delivers. It also defines whether the source code of the action is in JavaScript that can be run using Node12, or is a Docker image. It also contains information about where to find the JavaScript files or the Docker image to run the action. + +The source code part of your action contains the actual logic of it. This can be JavaScript files that can run using Node12, a Dockerfile that you are going to build when an action runs, or it can simply be a Docker image that you refer to. It will have access to the event payload that triggered the workflow and also the context of the workflow run through environment variables (ENV). You can easily call GitHub’s APIs or other APIs from within your source code as a part of your logic, to accomplish the action’s task. + +GitHub Actions lets you create your own actions using the millions of open source libraries accessible on GitHub, and allows you to write them in JavaScript or create a container action. It makes software workflow automation easy, which helps you be more productive and eases your development life cycle. + +You can automate various use cases by using GitHub Actions, including API management, code quality, support, chat, code review, publishing, deployment, localisation, continuous integration, learning, project management, monitoring, security, dependency management, and others. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/creating-a-github-action-from-scratch/ + +作者:[M.V. Karan][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/m-v-karan/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Creating-a-GitHub-Action-from-Scratch-Featured-image.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-How-GitHub-Actions-work.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-2-Example-of-push-and-build.jpg +[4]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-3-Example-workflow-file.jpg +[5]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-4-Components-of-your-own-GitHub-Action.jpg diff --git a/sources/tech/20220602 Get started with Cadence, an open source workflow engine.md b/sources/tech/20220602 Get started with Cadence, an open source workflow engine.md new file mode 100644 index 0000000000..935eb45c94 --- /dev/null +++ b/sources/tech/20220602 Get started with Cadence, an open source workflow engine.md @@ -0,0 +1,282 @@ +[#]: subject: "Get started with Cadence, an open source workflow engine" +[#]: via: "https://opensource.com/article/22/6/cadence-open-source-workflow-engine" +[#]: author: "Ben Slater https://opensource.com/users/ben-slater" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Get started with Cadence, an open source workflow engine +====== +Cadence simplifies the complexity of distributed systems so that developers can focus on creating applications built for high durability, availability, and scalability. + +![Tips and gears turning][1] + +Image by: opensource.com + +Modern applications require complicated interactions between long-running business processes, internal services, and third-party APIs. To say it's been a challenge for developers is putting it mildly. Managing these processes means tracking complex states, preparing responses to asynchronous events, and communicating with often unreliable external dependencies. + +Developers typically take on these complex challenges with solutions that are just as convoluted, assembling unwieldy systems that leverage stateless services, databases, retry algorithms, and job scheduling queues. Because these complex systems obscure their own business logic, availability issues are common, often stemming from the application's dependence on scattered and unproven components. Developer productivity is regularly sacrificed to keep these sprawling, troubled systems from collapsing. + +### Designing a distributed application + +Cadence solves these issues by offering a highly scalable fault-oblivious code platform. Cadence abstracts away the usual challenges of implementing fault tolerance and durability with its fault oblivious code. + +A standard Cadence application includes a Cadence service, workflow, activity workers, and external clients. If needed, it's acceptable to co-locate the roles of workflow workers, activity workers, and external clients in a single application process. + +**Cadence Service** + +![Image of client application and Cadence service][2] + +Image by: (Ben Slater, CC BY-SA 4.0) + +Cadence is centered on its multi-tenant service and the high scalability it enables. A strongly typed [gRPC API][3] exposes all Cadence service functionality. A Cadence cluster can run multiple services on multiple nodes, including: + +* Front end: A stateless service that handles incoming worker requests, with instances backed by an external load balancer. +* History service: Handles core logic for workflow steps and activity orchestration. +* Matching service: Matches workflow or activity tasks with workers ready to complete them. +* Internal worker service: Meets internal requirements (such as archiving) by introducing Cadence workflows and activities. +* Workers: Function as Cadence client apps that execute user-created workflow and activity logic. + +By default, Cadence supports Apache Cassandra, MySQL, PostgreSQL, CockroachDB, and TiDB for use as persistence stores, as well as ElasticSearch and OpenSearch for listing workflows with complex predicates. + +Because the Cadence service is multi-tenant, a single service can serve one or many applications. A local Cadence service instance can be configured with docker-compose for local development. The Cadence service maintains workflow states, associated durable timers, and internal "task list" queues to send tasks to external workers. + +Beyond the Cadence service itself: + +* Workflow workers: hosts fault-oblivious code externally to the Cadence service. The Cadence service sends these workers "decision tasks." The workers deliver the tasks to the workflow code and communicate the completed "decisions" back to the Cadence service. Workflow code can be implemented in any language able to communicate with Cadence API: production-ready Java and Go clients are currently available. +* Activity workers: hosts "activities", or code that perform application specific actions such as service calls, database record updates, and file downloads. Activities feature task routing to specific processes, heartbeats, infinite retries, and unlimited execution time. The Cadence service sends activity tasks to these workers, who complete them and report completion. +* External clients: enable the creation of workflow instances, or "executions". External clients such as UIs, microservices or CLIs use the StartWorkflowExecution Cadence service API call to implement executions. External clients are also capable of notifying workflows about asynchronous external events, synchronous workflow state queries, waiting for synchronous workflow completion, workflow restarts, cancellation, and searching for specific workflows with List API. + +### Getting started with Cadence + +In this example we'll use the Cadence Java client. The client is [available from GitHub][4], and [JavaDoc documentation can be found here][5]. You can also check for the [latest release version][6]. + +To begin, add *cadence-client* as a dependency to your *pom.xml* file like this: + +``` + + com.uber.cadence + cadence-client + LATEST.RELEASE.VERSION + +``` + +Alternatively, you can use *build.gradle*: + +compile group: ‘com.uber.cadence', name: ‘cadence-client', version: ‘LATEST.RELEASE.VERSION' + +**Java Hello World with Cadence** + +The best way to get an idea of what Cadence is capable of is to try it, so here's a simple "Hello World" example you can try. First, add the [Cadence Java client dependency][7] to your Java project. Using Gradle, the dependency looks like this: + +compile group: ‘com.uber.cadence', name: ‘cadence-client', version: ‘' + +Add these dependencies that the cadence-client requires as well: + +compile group: ‘commons-configuration', name: ‘commons-configuration', version: ‘1.9' + +compile group: ‘ch.qos.logback', name: ‘logback-classic', version: ‘1.2.3' + +Then compile this code: + +``` +import com.uber.cadence.workflow.Workflow; +import com.uber.cadence.workflow.WorkflowMethod; +import org.slf4j.Logger; +public class GettingStarted { + private static Logger logger = Workflow.getLogger(GettingStarted.class); + + public interface HelloWorld { + @WorkflowMethod + void sayHello(String name); + } +} +``` + +These [Cadence Java samples][8] are available to help if you encounter issues with the build files. + +Next, put this logback config file into your classpath: + +``` + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + +``` + +Now create the Hello World workflow. Add HelloWorldImpl with the sayHello method, which logs and returns "Hello …": + +``` +import com.uber.cadence.worker.Worker; +import com.uber.cadence.workflow.Workflow; +import com.uber.cadence.workflow.WorkflowMethod; +import org.slf4j.Logger; +public class GettingStarted { + private static Logger logger = Workflow.getLogger(GettingStarted.class); + + public interface HelloWorld { + @WorkflowMethod + void sayHello(String name); + } + + public static class HelloWorldImpl implements HelloWorld { + @Override + public void sayHello(String name) { + logger.info("Hello " + name + "!"); + } + } +} +``` + +Register the workflow implementation to the Cadence framework with a worker connected to a Cadence service. Workers will connect to a Cadence service running locally by default. + +``` +public static void main(String[] args) { + WorkflowClient workflowClient = WorkflowClient.newInstance( + new WorkflowServiceTChannel(ClientOptions.defaultInstance()), + WorkflowClientOptions.newBuilder().setDomain(DOMAIN).build() + ); + // Get worker to poll the task list. + WorkerFactory factory = WorkerFactory.newInstance(workflowClient); + Worker worker = factory.newWorker(TASK_LIST); + worker.registerWorkflowImplementationTypes(HelloWorldImpl.class); + factory.start(); +} +``` + +Now you're ready to run the worker program. Here's an example log: + +``` +13:35:02.575 [main] INFO c.u.c.s.WorkflowServiceTChannel - Initialized TChannel for service cadence-frontend, LibraryVersion: 2.2.0, FeatureVersion: 1.0.0 + +13:35:02.671 [main] INFO c.u.cadence.internal.worker.Poller - start(): Poller{options=PollerOptions{maximumPollRateIntervalMilliseconds=1000, maximumPollRatePerSecond=0.0, pollBackoffCoefficient=2.0, pollBackoffInitialInterval=PT0.2S, pollBackoffMaximumInterval=PT20S, pollThreadCount=1, pollThreadNamePrefix=‘Workflow Poller taskList="HelloWorldTaskList", domain="test-domain", type="workflow"'}, identity=45937@maxim-C02XD0AAJGH6} + +13:35:02.673 [main] INFO c.u.cadence.internal.worker.Poller - start(): Poller{options=PollerOptions{maximumPollRateIntervalMilliseconds=1000, maximumPollRatePerSecond=0.0, pollBackoffCoefficient=2.0, pollBackoffInitialInterval=PT0.2S, pollBackoffMaximumInterval=PT20S, pollThreadCount=1, pollThreadNamePrefix=‘null'}, identity=81b8d0ac-ff89-47e8-b842-3dd26337feea} +``` + +"Hello"'isn't printing, because the worker only hosts the workflow code. To execute the workflow, start it with the Cadence CLI: + +``` +$ docker run --network=host --rm ubercadence/cli:master --do test-domain workflow start --tasklist HelloWorldTaskList --workflow_type HelloWorld::sayHello --execution_timeout 3600 --input \"World\" +Started Workflow Id: bcacfabd-9f9a-46ac-9b25-83bcea5d7fd7, run Id: e7c40431-8e23-485b-9649-e8f161219efe +``` + +Now the program gives this output: + +``` +13:35:02.575 [main] INFO c.u.c.s.WorkflowServiceTChannel - Initialized TChannel for service cadence-frontend, LibraryVersion: 2.2.0, FeatureVersion: 1.0.0 + +13:35:02.671 [main] INFO c.u.cadence.internal.worker.Poller - start(): Poller{options=PollerOptions{maximumPollRateIntervalMilliseconds=1000, maximumPollRatePerSecond=0.0, pollBackoffCoefficient=2.0, pollBackoffInitialInterval=PT0.2S, pollBackoffMaximumInterval=PT20S, pollThreadCount=1, pollThreadNamePrefix=‘Workflow Poller taskList="HelloWorldTaskList", domain=“test-domain”, type="workflow"'}, identity=45937@maxim-C02XD0AAJGH6} + +13:35:02.673 [main] INFO c.u.cadence.internal.worker.Poller - start(): Poller{options=PollerOptions{maximumPollRateIntervalMilliseconds=1000, maximumPollRatePerSecond=0.0, pollBackoffCoefficient=2.0, pollBackoffInitialInterval=PT0.2S, pollBackoffMaximumInterval=PT20S, pollThreadCount=1, pollThreadNamePrefix=‘null'}, identity=81b8d0ac-ff89-47e8-b842-3dd26337feea} + +13:40:28.308 [workflow-root] INFO c.u.c.samples.hello.GettingStarted - Hello World! +``` + +Success! Now run this workflow execution: + +``` +$ docker run --network=host --rm ubercadence/cli:master --do test-domain workflow start --tasklist HelloWorldTaskList --workflow_type HelloWorld::sayHello --execution_timeout 3600 --input \"Cadence\" + +Started Workflow Id: d2083532-9c68-49ab-90e1-d960175377a7, run Id: 331bfa04-834b-45a7-861e-bcb9f6ddae3e +``` + +You should get this output: + +``` +13:35:02.575 [main] INFO c.u.c.s.WorkflowServiceTChannel - Initialized TChannel for service cadence-frontend, LibraryVersion: 2.2.0, FeatureVersion: 1.0.0 + +13:35:02.671 [main] INFO c.u.cadence.internal.worker.Poller - start(): Poller{options=PollerOptions{maximumPollRateIntervalMilliseconds=1000, maximumPollRatePerSecond=0.0, pollBackoffCoefficient=2.0, pollBackoffInitialInterval=PT0.2S, pollBackoffMaximumInterval=PT20S, pollThreadCount=1, pollThreadNamePrefix=‘Workflow Poller taskList="HelloWorldTaskList", domain="test-domain", type="workflow"'}, identity=45937@maxim-C02XD0AAJGH6} + +13:35:02.673 [main] INFO c.u.cadence.internal.worker.Poller - start(): Poller{options=PollerOptions{maximumPollRateIntervalMilliseconds=1000, maximumPollRatePerSecond=0.0, pollBackoffCoefficient=2.0, pollBackoffInitialInterval=PT0.2S, pollBackoffMaximumInterval=PT20S, pollThreadCount=1, pollThreadNamePrefix=‘null'}, identity=81b8d0ac-ff89-47e8-b842-3dd26337feea} + +13:40:28.308 [workflow-root] INFO c.u.c.samples.hello.GettingStarted - Hello World! + +13:42:34.994 [workflow-root] INFO c.u.c.samples.hello.GettingStarted - Hello Cadence! +``` + +Lastly, use this CLI to list the workflow: + +``` +$ docker run --network=host --rm ubercadence/cli:master --do test-domain workflow list + +WORKFLOW TYPE | WORKFLOW ID | RUN ID | START TIME | EXECUTION TIME | END TIME + +HelloWorld::sayHello | d2083532-9c68-49ab-90e1-d960175377a7 | 331bfa04-834b-45a7-861e-bcb9f6ddae3e | 20:42:34 | 20:42:34 | 20:42:35 + +HelloWorld::sayHello | bcacfabd-9f9a-46ac-9b25-83bcea5d7fd7 | e7c40431-8e23-485b-9649-e8f161219efe | 20:40:28 | 20:40:28 | 20:40:29 +``` + +Look over the workflow execution history as well: + +``` +$ docker run --network=host --rm ubercadence/cli:master --do test-domain workflow showid 1965109f-607f-4b14-a5f2-24399a7b8fa7 +1 WorkflowExecutionStarted {WorkflowType:{Name:HelloWorld::sayHello}, +TaskList:{Name:HelloWorldTaskList}, +Input:["World"], +ExecutionStartToCloseTimeoutSeconds:3600, +TaskStartToCloseTimeoutSeconds:10, +ContinuedFailureDetails:[], +LastCompletionResult:[], +Identity:cadence-cli@linuxkit-025000000001, +Attempt:0, +FirstDecisionTaskBackoffSeconds:0} +2 DecisionTaskScheduled {TaskList:{Name:HelloWorldTaskList}, +StartToCloseTimeoutSeconds:10, +Attempt:0} +3 DecisionTaskStarted {ScheduledEventId:2, +Identity:45937@maxim-C02XD0AAJGH6, +RequestId:481a14e5-67a4-436e-9a23-7f7fb7f87ef3} +4 DecisionTaskCompleted {ExecutionContext:[], +ScheduledEventId:2, +StartedEventId:3, +Identity:45937@maxim-C02XD0AAJGH6} +5 WorkflowExecutionCompleted {Result:[], +DecisionTaskCompletedEventId:4} +``` + +It may be a simple workflow, but looking at the history is quite informative. The history's value as a troubleshooting, analytics, and compliance tool only increases with the complexity of the workflow. As a best practice, automatically archive the history to a long-term blob store when workflows complete. + +### Try Cadence + +Cadence offers transformative advantages for organizations and application development teams charged with creating and managing high-scale distributed applications built for high durability, availability, and scalability. Cadence is available to all as free and open source software, making it simple for teams to explore its capabilities and determine if Cadence is a strong fit for their organizations. + +Using Cadence is as simple as cloning the [Git repository for the Cadence server][9] or the [container image][10]. For more details on getting started, visit: [https://cadenceworkflow.io/docs/get-started/][11]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/cadence-open-source-workflow-engine + +作者:[Ben Slater][a] +选题:[lkxed][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/ben-slater +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png +[2]: https://opensource.com/sites/default/files/2022-05/cadence1.png +[3]: https://github.com/uber/cadence-idl/tree/master/proto/uber/cadence/api/v1 +[4]: https://github.com/uber/cadence-java-client +[5]: https://www.javadoc.io/doc/com.uber.cadence/cadence-client/latest/index.html +[6]: https://github.com/uber/cadence-java-client/releases +[7]: https://mvnrepository.com/artifact/com.uber.cadence/cadence-client +[8]: https://github.com/uber/cadence-java-samples +[9]: https://github.com/uber/cadence +[10]: https://hub.docker.com/r/ubercadence/server +[11]: https://cadenceworkflow.io/docs/get-started/ diff --git a/sources/tech/20220602 The only Linux command you need to know.md b/sources/tech/20220602 The only Linux command you need to know.md new file mode 100644 index 0000000000..eb6364dd7f --- /dev/null +++ b/sources/tech/20220602 The only Linux command you need to know.md @@ -0,0 +1,165 @@ +[#]: subject: "The only Linux command you need to know" +[#]: via: "https://opensource.com/article/22/6/linux-cheat-command" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +The only Linux command you need to know +====== +The Linux cheat command is a utility to search for and display a list of example tasks you might do with a command. + +![Command line prompt][1] + +Image by: Opensource.com + +Information about Linux and open source abounds on the internet, but when you're entrenched in your work there's often a need for quick documentation. Since the early days of Unix, well before Linux even existed, there's been the `man` (short for "manual") and `info` commands, both of which display official project documentation about commands, configuration files, system calls, and more. + +There's a debate over whether `man` and `info` pages are meant as helpful reminders for users who already know how to use a tool, or an intro for first time users. Either way, both `man` and `info` pages describe tools and how to use them, and rarely address specific tasks and how to accomplish them. It's for that very reason that the `cheat` command was developed. + +For instance, suppose you can't remember how to [unarchive a tar file][2]. The `man` page provides you with all the options you require, but it leaves it up to you to translate this information into a functional command: + +``` +tar -A [OPTIONS] ARCHIVE ARCHIVE +tar -c [-f ARCHIVE] [OPTIONS] [FILE...] +tar -d [-f ARCHIVE] [OPTIONS] [FILE...] +tar -t [-f ARCHIVE] [OPTIONS] [MEMBER...] +tar -r [-f ARCHIVE] [OPTIONS] [FILE...] +tar -u [-f ARCHIVE] [OPTIONS] [FILE...] +tar -x [-f ARCHIVE] [OPTIONS] [MEMBER...] +``` + +That's exactly what some users need, but it confounds other users. The cheat sheet for tar, by contrast, provides complete common commands: + +``` +$ cheat tar + +# To extract an uncompressed archive: +tar -xvf /path/to/foo.tar + +# To extract a .tar in specified Directory: +tar -xvf /path/to/foo.tar -C /path/to/destination/ + +# To create an uncompressed archive: +tar -cvf /path/to/foo.tar /path/to/foo/ + +# To extract a .tgz or .tar.gz archive: +tar -xzvf /path/to/foo.tgz +tar -xzvf /path/to/foo.tar.gz +[...] +``` + +It's exactly what you need, when you need it. + +### The Linux cheat command + +The `cheat` command is a utility to search for and display a list of example tasks you might do with a Linux command. As with many Unix commands, there are different implementations of the same concept, including one [written in Go][3] and one, which I help maintain, [written in just 100 lines of Bash][4]. + +To install the Go version, download [the latest release][5] and put it somewhere in [your path][6], such as `~/.local/bin/` or `/usr/local/bin`. To install the Bash version, download the latest release and run the `install-cheat.sh` script: + +``` +$ sh ./install-cheat.sh +``` + +Or to configure the installation, use [Autotools][7]: + +``` +$ aclocal ; autoconf +$ automake --add-missing ; autoreconf +$ ./configure --prefix=$HOME/.local +$ make +$ make install +``` + +### Get cheat sheets for your Linux terminal + +Cheat sheets are just plain text files containing common commands. The main collection of cheat sheets is available at [Github.com/cheat/cheatsheets][8]. The Go version of cheat downloads cheatsheets for you when you first run the command. If you're using the Bash version of cheat, the `--fetch` option downloads cheatsheets for you: + +``` +$ cheat --fetch +``` + +As with `man` pages, you can have multiple collections of cheat sheets on your system. The Go version of cheat uses a [YAML][9] config file to define where each collection is located. The Bash version defines the path during the install, and by default downloads the [Github.com/cheat/cheatsheets][10] collection as well as [Opensource.com][11]'s own [Gitlab.com/opensource.com/cheatsheets][12] collection. + +### List cheat sheets + +To list the cheat sheets on your system, use the `--list` option: + +``` +$ cheat --list +7z +ab +acl +alias +ansi +ansible +ansible-galaxy +ansible-vault +apk +[...] +``` + +### View a Linux cheat sheet + +Viewing a cheat sheet is as easy as viewing a `man` or `info` page. Just provide the name of the command you need help with: + +``` +$ cheat alias + +# To show a list of your current shell aliases: +alias + +# To alias `ls -l` to `ll`: +alias ll='ls -l' +``` + +By default, the `cheat` command uses your environment's pager. Your pager is set with the `PAGER` [environment variable][13]. You can override that temporarily by redefining the `PAGER` variable before running the `cheat` command: + +``` +$ PAGER=most cheat less +``` + +If you just want to [cat][14] the cheat sheet into your terminal without a pager, the Bash version has a `--cat` option for convenience: + +``` +$ cheat --cat less +``` + +### It's not actually cheating + +The cheat system cuts to the chase. You don't have to piece together clues about how to use a command. You just follow the examples. Of course, for complex commands, it's not a shortcut for a thorough study of the actual documentation, but for quick reference, it's as fast as it gets. + +You can even create your own cheat sheet just by placing a file in one of the cheat sheet collections. Good news! Because the projects are open source, you can contribute your personal cheat sheets to the GitHub collection. And more good news! When there's a new Opensource.com [cheat sheet][15] release, we'll include a plain text version from now on so you can add that to your collection. + +The command is called `cheat`, but as any Linux user will assure you, it's not actually cheating. It's working smarter, the open source way. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/linux-cheat-command + +作者:[Seth Kenlon][a] +选题:[lkxed][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/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/command_line_prompt.png +[2]: https://opensource.com/article/17/7/how-unzip-targz-file +[3]: https://github.com/cheat/cheat +[4]: https://gitlab.com/slackermedia/cheat +[5]: https://github.com/cheat/cheat/releases +[6]: https://opensource.com/article/17/6/set-path-linux +[7]: https://opensource.com/article/19/7/introduction-gnu-autotools +[8]: https://github.com/cheat/cheatsheets +[9]: https://opensource.com/article/21/9/yaml-cheat-sheet +[10]: https://github.com/cheat/cheatsheets +[11]: http://Opensource.com +[12]: https://gitlab.com/opensource.com/cheatsheets +[13]: https://opensource.com/article/19/8/what-are-environment-variables +[14]: https://opensource.com/article/19/2/getting-started-cat-command +[15]: https://opensource.com/downloads diff --git a/sources/tech/20220603 Fedora Linux editions part 1- Official Editions.md b/sources/tech/20220603 Fedora Linux editions part 1- Official Editions.md new file mode 100644 index 0000000000..1faefb4e9c --- /dev/null +++ b/sources/tech/20220603 Fedora Linux editions part 1- Official Editions.md @@ -0,0 +1,81 @@ +[#]: subject: "Fedora Linux editions part 1: Official Editions" +[#]: via: "https://fedoramagazine.org/fedora-linux-editions-part-1-official-editions/" +[#]: author: "Arman Arisman https://fedoramagazine.org/author/armanwu/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Fedora Linux editions part 1: Official Editions +====== +![Fedora Linux editions part 1 Official Editions][1] + +Photo by [Frédéric Perez][2] on [Unsplash][3] + +Fedora Linux provides several variants to meet your needs. You can find an overview of all the Fedora Linux variants in my previous article [Introduce the different Fedora Linux editions][4]. This article will go into a little more detail about the Fedora Linux official editions. There are five *editions* — Fedora Workstation, Fedora Server, Fedora IoT, Fedora CoreOS, and Fedora Silverblue. The Fedora Linux download page currently shows that three of these are *official* editions and the remaining two are *emerging* editions. This article will cover all five editions. + +### Fedora Workstation + +If you are a laptop or desktop computer user, then Fedora Workstation is the right operating system for you. Fedora workstation is very easy to use. You can use this for daily needs such as work, education, hobbies, and more. For example, you can use it to create documents, make presentations, surf the internet, manipulate images, edit videos, and many other things. + +This Fedora Linux edition comes with the GNOME Desktop Environment by default. You can work and do activities comfortably using this appearance concept. You can also customize the appearance of this Fedora Workstation according to your preferences, so you will be more comfortable using it. If you are a new Fedora Workstation user, you can read my previous article [Things to do after installing Fedora 34 Workstation][5]. Through the article, you will find it easier to start with Fedora Workstation. + +More information is available at this link: [https://getfedora.org/en/workstation/][6] + +### Fedora Server + +Many companies require their own servers to support their infrastructure. The Fedora Server edition operating system comes with a powerful web-based management interface called Cockpit that has a modern look. Cockpit enables you to easily view and monitor system performance and status. + +Fedora Server includes some of the latest technology in the open source world and it is backed by an active community. It is very stable and reliable. However, there is no *guarantee* that anyone from the Fedora community will be available or able to help if you encounter problems. If you are running mission critical applications and you might require technical support, you might want to consider [Red Hat Enterprise Linux][7] instead. + +More information is available at this link: [https://getfedora.org/en][8][/server/][9] + +### Fedora IoT + +Operating systems designed specifically for IoT devices have become popular. Fedora IoT is an operating system created in response to this. Fedora IoT is an immutable operating system that uses OSTree Technology with atomic updates. This operating system focuses on security which is very important for IoT devices. Fedora IoT has support for multiple architectures. It also comes with a web-based configuration console so that it can be configured remotely without requiring that a keyboard, mouse or monitor be physically connected to the device. + +More information is available at this link: [https://getfedora.org/en/iot/][10] + +### Fedora CoreOS + +Fedora CoreOS is a container-focused operating system. This operating system is used to run applications safely and reliably in any environment. It is designed for clusters but can also be run as a standalone system. This operating system has high compatibility with Linux Container configurations. + +More information is available at this link: [https://getfedora.org/en/coreos/][11] + +### Fedora Silverblue + +This edition is a variant of Fedora Workstation with an interface that is not much different. However, the difference is that Fedora Silverblue is an immutable operating system with a container-centric workflow. This means that each installation is exactly the same as another installation of the same version. The goal is to make it more stable, less prone to bugs, and easier to test and develop. + +More information is available at this link: [https://silverblue.fedoraproject.org/][12] + +### Conclusion + +Each edition of Fedora Linux has a different purpose. The availability of several editions can help you to get an operating system that suits your needs. The Fedora Linux editions discussed in this article are the operating systems available on the main download page for Fedora Linux. You can find download links and more complete documentation at [https://getfedora.org/][13]. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/fedora-linux-editions-part-1-official-editions/ + +作者:[Arman Arisman][a] +选题:[lkxed][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/armanwu/ +[b]: https://github.com/lkxed +[1]: https://fedoramagazine.org/wp-content/uploads/2022/04/FedoraMagz-FedoraEditions-1-Official-816x345.png +[2]: https://unsplash.com/@fredericp?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/blue-abstract?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://fedoramagazine.org/introduce-the-different-fedora-linux-editions/ +[5]: https://fedoramagazine.org/things-to-do-after-installing-fedora-34-workstation/ +[6]: https://getfedora.org/en/workstation/ +[7]: https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux +[8]: https://getfedora.org/en/server/ +[9]: https://getfedora.org/en/server/ +[10]: https://getfedora.org/en/iot/ +[11]: https://getfedora.org/en/coreos?stream=stable +[12]: https://silverblue.fedoraproject.org/ +[13]: https://getfedora.org/ diff --git a/sources/tech/20220603 How static linking works on Linux.md b/sources/tech/20220603 How static linking works on Linux.md new file mode 100644 index 0000000000..00136f9851 --- /dev/null +++ b/sources/tech/20220603 How static linking works on Linux.md @@ -0,0 +1,217 @@ +[#]: subject: "How static linking works on Linux" +[#]: via: "https://opensource.com/article/22/6/static-linking-linux" +[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How static linking works on Linux +====== +Learn how to combine multiple C object files into a single executable with static libraries. + +![Woman using laptop concentrating][1] + +Image by Mapbox Uncharted ERG, [CC-BY 3.0 US][2] + +Code for applications written using C usually has multiple source files, but ultimately you will need to compile them into a single executable. + +You can do this in two ways: by creating a static library or a dynamic library (also called a shared library). These two types of libraries vary in terms of how they are created and linked. Your choice of which to use depends on your use case. + +In a [previous article][3], I demonstrated how to create a dynamically linked executable, which is the more commonly used method. In this article, I explain how to create a statically linked executable. + +### Using a linker with static libraries + +A linker is a command that combines several pieces of a program together and reorganizes the memory allocation for them. + +The functions of a linker include: + +* Integrating all the pieces of a program +* Figuring out a new memory organization so that all the pieces fit together +* Reviving addresses so that the program can run under the new memory organization +* Resolving symbolic references + +As a result of all these linker functionalities, a runnable program called an executable is created. + +Static libraries are created by copying all necessary library modules used in a program into the final executable image. The linker links static libraries as a last step in the compilation process. An executable is created by resolving external references, combining the library routines with program code. + +### Create the object files + +Here's an example of a static library, along with the linking process. First, create the header file `mymath.h` with these function signatures: + +``` +int add(int a, int b); +int sub(int a, int b); +int mult(int a, int b); +int divi(int a, int b); +``` + +Create `add.c`, `sub.c` , `mult.c` and `divi.c` with these function definitions: + +``` +// add.c +int add(int a, int b){ +return (a+b); +} + +//sub.c +int sub(int a, int b){ +return (a-b); +} + +//mult.c +int mult(int a, int b){ +return (a*b); +} + +//divi.c +int divi(int a, int b){ +return (a/b); +} +``` + +Now generate object files `add.o`, `sub.o`, `mult.o`, and `divi.o` using GCC: + +``` +$ gcc -c add.c sub.c mult.c divi.c +``` + +The `-c` option skips the linking step and creates only object files. + +Create a static library called `libmymath.a`, then remove the object files, as they're no longer required. (Note that using a `trash` [command][4] is safer than `rm`.) + +``` +$ ar rs libmymath.a add.o sub.o mult.o divi.o +$ trash *.o +$ ls +add.c  divi.c  libmymath.a  mult.c  mymath.h  sub.c +``` + +You have now created a simple example math library called `libmymath`, which you can use in C code. There are, of course, very complex C libraries out there, and this is the process their developers use to generate the final product that you and I install for use in C code. + +Next, use your math library in some custom code and then link it. + +### Create a statically linked application + +Suppose you've written a command for mathematics. Create a file called `mathDemo.c` and paste this code into it: + +``` +#include +#include +#include + +int main() +{ +  int x, y; +  printf("Enter two numbers\n"); +  scanf("%d%d",&x,&y); +  +  printf("\n%d + %d = %d", x, y, add(x, y)); +  printf("\n%d - %d = %d", x, y, sub(x, y)); +  printf("\n%d * %d = %d", x, y, mult(x, y)); + +  if(y==0){ +    printf("\nDenominator is zero so can't perform division\n"); +      exit(0); +  }else{ +      printf("\n%d / %d = %d\n", x, y, divi(x, y)); +      return 0; +  } +} +``` + +Notice that the first line is an `include` statement referencing, by name, your own `libmymath` library. + +Create an object file called `mathDemo.o` for `mathDemo.c` : + +``` +$ gcc -I . -c mathDemo.c +``` + +The `-I` option tells GCC to search for header files listed after it. In this case, you're specifying the current directory, represented by a single dot (`.` ). + +Link `mathDemo.o` with `libmymath.a` to create the final executable. There are two ways to express this to GCC. + +You can point to the files: + +``` +$ gcc -static -o mathDemo mathDemo.o libmymath.a +``` + +Alternately, you can specify the library path along with the library name: + +``` +$ gcc -static -o mathDemo -L . mathDemo.o -lmymath +``` + +In the latter example, the `-lmymath` option tells the linker to link the object files present in the `libmymath.a` with the object file `mathDemo.o` to create the final executable. The `-L` option directs the linker to look for libraries in the following argument (similar to what you would do with `-I` ). + +### Analyzing the result + +Confirm that it's statically linked using the `file` command: + +``` +$ file mathDemo +mathDemo: ELF 64-bit LSB executable, x86-64... +statically linked, with debug_info, not stripped +``` + +Using the `ldd` command, you can see that the executable is not dynamically linked: + +``` +$ ldd ./mathDemo +        not a dynamic executable +``` + +You can also check the size of the `mathDemo` executable: + +``` +$ du -h ./mathDemo +932K    ./mathDemo +``` + +In the example from my [previous article][5], the dynamic executable took up just 24K. + +Run the command to see it work: + +``` +$ ./mathDemo +Enter two numbers +10 +5 + +10 + 5 = 15 +10 - 5 = 5 +10 * 5 = 50 +10 / 5 = 2 +``` + +Looks good! + +### When to use static linking + +Dynamically linked executables are generally preferred over statically linked executables because dynamic linking keeps an application's components modular. Should a library receive a critical security update, it can be easily patched because it exists outside of the applications that use it. + +When you use static linking, a library's code gets "hidden" within the executable you create, meaning the only way to patch it is to re-compile and re-release a new executable every time a library gets an update—and you have better things to do with your time, trust me. + +However, static linking is a reasonable option if the code of a library exists either in the same code base as the executable using it or in specialized embedded devices that are expected to receive no updates. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/static-linking-linux + +作者:[Jayashree Huttanagoudar][a] +选题:[lkxed][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/jayashree-huttanagoudar +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png +[2]: https://creativecommons.org/licenses/by/3.0/us/ +[3]: https://opensource.com/article/22/5/dynamic-linking-modular-libraries-linux +[4]: https://www.redhat.com/sysadmin/recover-file-deletion-linux +[5]: https://opensource.com/article/22/5/dynamic-linking-modular-libraries-linux diff --git a/sources/tech/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md b/sources/tech/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md new file mode 100644 index 0000000000..6713d0f60f --- /dev/null +++ b/sources/tech/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md @@ -0,0 +1,163 @@ +[#]: subject: "How to Install FFmpeg in Ubuntu and Other Linux" +[#]: via: "https://www.debugpoint.com/2022/06/install-ffmpeg-ubuntu/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How to Install FFmpeg in Ubuntu and Other Linux +====== +This tutorial outlines the steps required to install FFmpeg in Ubuntu and Other Linux systems. + +The ffmpeg is a collection library and software program to manipulate multimedia files. The entire ffmpeg is a robust set of libraries that allows you to convert, stream, and manipulate audio and video files. Many frontend Linux applications use it as backend hence depends on it. For example, a screen recording application may need ffmpeg to convert recorded streams to gif images. + +Popular applications and services that use FFmpeg are VLC Media Player, YouTube, Blender, Kodi, Shotcut, and Handbrake – to name a few. + +Fun fact: NASA’s Mars 2020 mission rover Perseverance used FFmpeg to complete and process images and video before beaming back to Earth! + +### About ffmpeg package + +The [ffmpeg][1] itself is a powerful program as a command-line utility. It is available for Linux, Windows, and macOS and supports many architectures. It is written in C and Assembly, providing extensive performance and a cross-platform utility. + +#### The Core + +The core of ffmpeg is the command-line utility or programs. They can be used on the command line or called from any programming language. For example, you can use these from your shell program, python script, etc. + +* ffmpeg: Used to convert audio and video streams, including sources from LIVE streams such as TV cards +* ffplay: Media player bundled in this package to play media +* ffprobe: Command line tool to show media information – can output as txtm csv, xml, json formats + +### FFmpeg Installation + +Installing FFmpeg is easy in Ubuntu and other Linux distributions. Open a terminal prompt and run the following commands to install. + +#### Ubuntu and similar distro + +``` +sudo apt install ffmpeg +``` + +#### Fedora + +For Fedora Linux, you need to add the [RPM Fusion repo][2] for FFmpeg. The official Fedora repo doesn’t have the FFmpeg package. + +``` +sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm +``` + +``` +sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree- +``` + +``` +sudo dnf install ffmpeg +``` + +#### Arch Linux + +``` +pacman -S ffmpeg +``` + +After the successful installation, you can verify the installation using the below command. + +``` +ffmpeg --version +``` + +![FFmpeg installed in Ubuntu Linux][3] + +### Example: How to do basic tasks using ffmpeg + +First, let me give you a simple example of the basic syntax. Consider the following example. It simply converts an mp4 file to mkv file. + +1. Convert a basic video file + +``` +ffmpeg -i big_buck_bunny.mp4 big_buck_bunny.mkv +``` + +Of course, this is the easiest method, but it’s not complete because it doesn’t have the bit rate, resolution and other attributes of the video file required for the conversion. + +1. Convert an audio file + +Secondly, you can convert an audio file using a similar command. + +``` +ffmpeg -i sunny_day.ogg sunny_day.mp3 +``` + +1. Convert with an audio and video codec + +Finally, the following example can convert a video file using specified codecs. The parameter `-c` with `a` or `v` defines audio and video, respectively. The below command uses `libvpx` video and `libvorbis` audio codec for conversion. + +``` +ffmpeg -i big_buck_bunny.mp4 -c:v libvpx -c:a libvorbis big_buck_bunny.webm +``` + +### How to find out about the available codecs, encoders and decoders in your system? + +#### List all codecs + +To list all the codecs available, run the below command. + +``` +ffmpeg -codecs +``` + +This command lists all the codecs available with their capability, whether they support decoding or encoding, etc. Moreover, they are identified with the position as per the below table. + +``` +D..... = Decoding supported.E.... = Encoding supported..V... = Video codec..A... = Audio codec..S... = Subtitle codec...I.. = Intra frame-only codec....L. = Lossy compression.....S = Lossless compression +``` + +![FFmpeg Codec list][4] + +#### List all encoders + +Listing all the encoders is accessible via the below command. + +``` +ffmpeg -encoders +``` + +#### List all decoders + +Similarly, the decoders list you can get via the below command. + +``` +ffmpeg -decoders +``` + +#### Details + +You can also get more details about the encoders or decoders using the parameter -h. + +``` +ffmpeg -h decoder=mp3 +``` + +### Summary + +I hope you learned the basics of FFmpeg and its commands. You can learn more about the program via the official [documentation][5]. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/06/install-ffmpeg-ubuntu/ + +作者:[Arindam][a] +选题:[lkxed][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/lkxed +[1]: https://ffmpeg.org/ +[2]: https://www.debugpoint.com/2020/07/enable-rpm-fusion-fedora-rhel-centos/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/06/FFmpeg-installed-in-Ubuntu-Linux.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/FFmpeg-Codec-list.jpg +[5]: https://ffmpeg.org/documentation.html diff --git a/sources/tech/20220603 Kubecost Releases Open Source Project To Rein in K8s Costs.md b/sources/tech/20220603 Kubecost Releases Open Source Project To Rein in K8s Costs.md new file mode 100644 index 0000000000..7bdbaf04df --- /dev/null +++ b/sources/tech/20220603 Kubecost Releases Open Source Project To Rein in K8s Costs.md @@ -0,0 +1,41 @@ +[#]: subject: "Kubecost Releases Open Source Project To Rein in K8s Costs" +[#]: via: "https://www.opensourceforu.com/2022/06/kubecost-releases-open-source-project-to-rein-in-k8s-costs/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Kubecost Releases Open Source Project To Rein in K8s Costs +====== +![Hybrid-Cloud-Optimization][1] + +Kubecost’s tool for monitoring and optimizing spending on Kubernetes clusters has been released as an open source project. OpenCost is now available as open source software, according to Alex Thilen, head of business development at Kubecost, and the company has already submitted it to the Cloud Native Computing Foundation (CNCF) for approval as a sandbox-level project. Adobe, Armory, Amazon Web Services (AWS), D2iQ, Google, Mincurv, New Relic, and SUSE are among the project’s founding members, in addition to Kubecost. + +Stackwatch created Kubecost in the beginning. Kubecost later raised $25 million to develop tools and applications on top of what is now OpenCost. Although OpenCost is designed to run within a Kubernetes cluster, no data is sent outside of the cluster without user permission. It can collect data in real-time after only a few minutes of installation. + +The primary issue addressed by OpenCost is overprovisioning of Kubernetes infrastructure. Many developers will overprovision infrastructure to ensure maximum application performance. The problem is that much of that infrastructure will go unused; costs will rise steadily as each new Kubernetes cluster is provisioned. According to Kubecost, organisations can cut Kubernetes-related cloud spending by 60–80 percent without sacrificing application performance. + +Of course, many enterprise IT departments will have signed contracts with cloud service providers that guarantee discounted pricing if a certain number of workloads are run per month. To reduce overall costs, many IT organisations prefer to continuously monitor pricing offered by multiple cloud service providers. Regardless of approach, interest in cost containment is growing as the percentage of workloads running on cloud platforms grows. + +As the percentage of workloads running on Kubernetes clusters grows, it is more likely that those platforms will be managed centrally by an IT operations team. These teams are graded based on how well they optimise cloud infrastructure usage. These teams must also demonstrate to development teams how much Kubernetes infrastructure is consumed by individual applications. + +According to Thilen, changing economic conditions mean that there is a lot more emphasis on cost control today than there was just a few months ago. Finance teams, in particular, are asking tougher questions about IT spending than they did at the start of the COVID-19 pandemic, when the primary focus was shifting as many workloads as possible to the cloud. + +According to Thilen, the primary issue that organisations face in controlling cloud costs is a lack of visibility, which OpenCost can provide. It’s unclear when Kubernetes cost controls will be ubiquitously included in every management tool, but the existence of OpenCost suggests that it’s now a matter of when rather than if those tools will become much more accessible. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/kubecost-releases-open-source-project-to-rein-in-k8s-costs/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/Hybrid-Cloud-Optimization-e1654241448205.png diff --git a/sources/tech/20220603 Red Hat Tests The -NVK- Nouveau Open Source Vulkan Driver.md b/sources/tech/20220603 Red Hat Tests The -NVK- Nouveau Open Source Vulkan Driver.md new file mode 100644 index 0000000000..413df8c877 --- /dev/null +++ b/sources/tech/20220603 Red Hat Tests The -NVK- Nouveau Open Source Vulkan Driver.md @@ -0,0 +1,38 @@ +[#]: subject: "Red Hat Tests The “NVK” Nouveau Open Source Vulkan Driver" +[#]: via: "https://www.opensourceforu.com/2022/06/red-hat-tests-the-nvk-nouveau-open-source-vulkan-driver/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Red Hat Tests The “NVK” Nouveau Open Source Vulkan Driver +====== +![red-hat][1] + +Following the recent news about Nouveau reorganising code to allow their shader compiler to be used outside of Nouveau Gallium3D, Red Hat’s Karol Herbst, a longtime Nouveau developer, has been posting patches for his new “NVK” Nouveau Vulkan driver effort. + +NVK is a brand-new, yet-to-be-merged open source Vulkan driver for NVIDIA graphics hardware. This is a Mesa-based driver that is currently being worked on primarily by Karol Herbst, who joined Red Hat several years ago and has since continued to work heavily on Mesa, including in the areas of OpenCL compute and other features. Aside from NVK, he has recently begun working on Rusticl, a Rust-based OpenCL implementation for Mesa. + +Jason Ekstrand of Collabora, as well as David Airlie of Red Hat, have been making early contributions to NVK. NVK can at least run vulkaninfo, but it is still a work in progress, with the initial code only being committed two weeks ago. + +Aside from performance issues with newer generations of NVIDIA graphics cards, the lack of an open source NVIDIA Vulkan driver has been a major roadblock, given that most Linux games these days are Vulkan-native, and even Steam Play is mostly Vulkan with VKD3D-Proton/DXVK. + +This NVK driver will most likely be updated in the future to support the open source NVIDIA kernel driver as an alternative to the Nouveau DRM driver. The original NVK open source Vulkan driver code is available on [Nouveau’s GitLab repository][2]. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/red-hat-tests-the-nvk-nouveau-open-source-vulkan-driver/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/red-hat-e1654256924226.jpg +[2]: https://gitlab.freedesktop.org/nouveau/mesa/-/commits/nouveau/vk/ diff --git a/sources/tech/20220603 Simplifying Cloud Native Development with Skaffold.md b/sources/tech/20220603 Simplifying Cloud Native Development with Skaffold.md new file mode 100644 index 0000000000..c488316426 --- /dev/null +++ b/sources/tech/20220603 Simplifying Cloud Native Development with Skaffold.md @@ -0,0 +1,91 @@ +[#]: subject: "Simplifying Cloud Native Development with Skaffold" +[#]: via: "https://www.opensourceforu.com/2022/06/simplifying-cloud-native-development-with-skaffold/" +[#]: author: "Romin Irani https://www.opensourceforu.com/author/romin-irani/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Simplifying Cloud Native Development with Skaffold +====== +The successful rollout of an application entails several essential steps. If the developer misses any of these in the development stage, it could make the application susceptible to problems later, leading to rework and wastage of the developer’s time. Skaffold automates these steps and assists developers in a hassle-free rollout of their applications. + +![developer-working-on-Cloud-computing][1] + +In a developer’s workflow, a wide variety of changes are first made to the code. Then container images are built, which are pushed to a registry till the application is eventually deployed. This entire process can entail a lot of inefficiencies. This is where Skaffold comes in – it helps to manage the developer workflow. + +### Understanding the developer workflow + +This is what the developer workflow looks like. + +* Code changes: The first step simply involves changing the code. While you are working on your code, you will simply make changes to it as per your own requirements and save it. +* Containerise: Once you are done making changes to your code, you will containerise it to see it actually work. You may use Docker and a build command to make a sample Docker file, then use that file to build the Docker image, and tag that image with a specific version. +* Push: After you have containerised the image, you are supposed to push it into a registry. +* Deploy: If you have got a Kubernetes deployment YAML, you can apply it to the particular environment of the Kubernetes cluster that you are pointing to, using the kubectl command that you can see in Figure 1. Once that is done, your application will be deployed. + +![Figure 1: kubectl command is initiated][2] + +* Connect and view logs: The next thing is to check if everything is working or not. So you will connect to that particular cluster, check the pod forwarding, and then stream the logs to see if everything is working well or not. + +All in all, you will have to keep repeating the same steps as per the number of changes you make and the number of changes you want to look at. So we now need a tool like Skaffold that can detect the activities that are common in nature, and automate and take care of these behind the scenes. Let us understand this from a developer workflow perspective. + +### Automating common activities + +In Figure 2, you can see some key activities marked in green that developers care about – things like coding and configuring the application to make it run. Marked in red are the things that they hope will just get done automatically by a tool to avoid the repetitive work that they are doing as part of the developer workflow. Skaffold allows developers to work on what they care about and takes care of the rest of the things. + +![Figure 2: Steps in the development process][3] + +Skaffold’s end-to-end development pipelines are as follows. + +* $ skaffold dev: Whenever you make a change to your code, the dev cycle automatically gets activated. +* $ skaffold run: Run allows you to run your particular application. +* $ skaffold debug: As the name suggests, debug helps in debugging a particular application that you want as a part of this process. + +Once Skaffold has sensed the changes being made to the code and to the application’s configuration, it will perform all the steps — building the code, filling the containers, pushing it to the registry, applying any configuration deployment and bringing the pods up on its own. It will then stream the logs to you so you can actually see that. It is capable of working with various clusters and registries. + +### A demo + +Here we have got a very straightforward go file (Figure 3). This file contains one main file and one main function, and it is printing out ‘Hello Skaffold’. + +![Figure 3: main.go][4] + +In the same folder, we have got a Dockerfile that you can see in Figure 4. This is a multi-staged Dockerfile. We are essentially just creating an executable for this file in the app, and in the next step we are going to set the default command to run when the container is up, which will in turn generate the output file. This is from a build perspective, as Skaffold really knows what it is supposed to build. + +![Figure 4: Folder consisting of Dockerfile][5] + +In the pod.yaml file (Figure 5), it is just stated that the image that is needed to be created is Skaffold-example. The Skaffold.yaml file will also show you the image that is needed to be built along with the deployment steps. All these steps will let Skaffold pretty much understand and detect the configuration. + +![Figure 5: k8s-pod.yaml][6] + +In Figure 6, you can see that in the terminal inside the demo folder we have the Skaffold.yaml files, the k8s-pod.yaml and the main.go. Since the Skaffold tool is already installed as part of Google Cloud Shell, on typing $skaffold config list you can see (Figure 7) that the current cube context is set to that demo cluster, and the default-repo is also set to the Google container registry. + +![Figure 6: Inside the Cloud Shell terminal][7] + +Now, we have a folder in which we have got our configuration file. All we need to do is run the developer end-to-end pipeline in Skaffold by using the $skaffold dev command. It will build everything up for the first time, and will begin with the deployment process. It will then provide you the relevant output and will wait for the code changes as well. + +![Figure 7: ‘$skaffold config list’ command is applied in the terminal][8] + +Skaffold is just like any other command-line tool that can be deployed on your machine or any other server that you desire; it comes preconfigured with Google Cloud Shell. All in all, Skaffold can automate a lot of steps that you would need to go through manually otherwise. Automating these steps will not only save time so that you can focus on other important things, but also make the application less prone to unwanted bugs and errors. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/simplifying-cloud-native-development-with-skaffold/ + +作者:[Romin Irani][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/romin-irani/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/developer-working-on-Cloud-computing.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-kubectl-command-initiated.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-2-Steps-in-the-development-process.jpg +[4]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-3-main.go_.jpg +[5]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-4-Folder-consisting-of-Dockerfile-1.jpg +[6]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-5-k8s-pod.yaml_-2.jpg +[7]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-6-Inside-the-Cloud-Shell-terminal.jpg +[8]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-7-‘skaffold-config-list-command-is-applied-in-the-terminal-1.jpg diff --git a/sources/tech/20220603 Titan Linux- A Blend of Debian Stable and KDE Plasma.md b/sources/tech/20220603 Titan Linux- A Blend of Debian Stable and KDE Plasma.md new file mode 100644 index 0000000000..31f46dc899 --- /dev/null +++ b/sources/tech/20220603 Titan Linux- A Blend of Debian Stable and KDE Plasma.md @@ -0,0 +1,127 @@ +[#]: subject: "Titan Linux: A Blend of Debian Stable and KDE Plasma" +[#]: via: "https://www.debugpoint.com/2022/06/titan-linux-review-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Titan Linux: A Blend of Debian Stable and KDE Plasma +====== +We review the Titan Linux – a rising star in the Linux distro space and bring Debian stable with KDE Plasma flavour with its unique tools. + +### Titan Linux – What does it offer? + +Titan Linux is a Debian-stable based Linux distribution which features the KDE Plasma desktop. It is a fairly new distribution which aspires to be user friendly and minimal distribution. Developed by a two-member team, Titan Linux brings a unique experience to Debian’s experience by eliminating several packages and giving out of the box hardware support. + +Moreover, it uses a different installer than what Debian uses and brings some nifty in-house utilities. + +![Titan Linux Desktop][1] + +### Titan Linux Review – 2022 + +#### Download and Installation + +This review is based on the latest stable release of Titan Linux 1.2.1 “Cronus” Stable bases on [Debian 11 bullseye][2]. + +There are no problems while downloading this distro via its torrents. Many budding distros don’t do well while providing download options – such as no server bandwidth, no torrent etc. However, the torrent speed was good, and the ISO of 2.5GB took a reasonable time to download. + +Let’s talk about the installation. + +First, the LIVE desktop gives you a shortcut to kick off the installer. The installer that Titan Linux uses is Calamares. It is not [Debian’s own graphical installer][3]. This is one of the significant advantages of using the popular Calamares for Debian. The installer is configured in a simple manner and should not be a problem for new users or advanced users. + +Second, the Calamares installer took around 4 minutes to install on average in both physical and virtual systems. After the installation is complete, the Grub is well configured, and I can boot into the desktop. + +#### Look and Feel + +Firstly, the desktop gives you a slightly different feel from a KDE Plasma desktop because of the dark colour palette and a somewhat different application menu. In addition, the Dragon Icons and cursors go well with its “Titan” themed desktop look. + +Second, the application menu is the [legacy KDE Plasma kick off][4], which gives you easy access to the applications and system settings. + +In addition, System Settings uses an alternative view than the traditional Plasma system settings. If you are a long term KDE Plasma user, you may feel a little different with these two subtle changes in this desktop. + +Other than that, a nice set of wallpapers will help you further customize your desktop. And finally, the bottom main taskbar is almost the same as the standard Plasma desktop. + +![The KDE Plasma kick off menu shows a legacy view][5] + +![System Settings in Titan Linux][6] + +#### Applications + +Firstly, the application list is more customized than the KDE Plasma desktop apps. A set of different and lightweight applications that gives a lightweight feel. + +Secondly, it is wise for the developers of this distro not to use the KDE Applications but instead use some of the traditional lightweight replacements. + +For example, instead of the KWiter text editor, you get the Featherpad text editor. However, the file manager is Dolphin from KDE Applications. The Gwenview is replaced by the LXImage image viewer from the LXQt desktop. + +Moreover, an exciting addition is the Titan Toolbox. It’s a collection of utilities that is very handy for new and advanced users. The Toolbox contains utilities to tweak the desktop, change repo, APT tools, hardware configuration, etc. YOu can see a glimpse of it in the below image. + +![A side-by-side view of two different options of Titan Toolbox][7] + +For example, the Extra Software option from the Toolbox gives you the below graphical menu items to perform several tasks. It is one of the selling points of this distribution. + +![One of the Titan Toolbox options – Extra Software][8] + +Another item from the Toolbox is my favourite: the Advanced options to manage Kernel and Grub, as you can see below. I must say, this is handy for all users. + +![Advanced Tools][9] + +#### Performance + +The performance metric is exciting considering it is a KDE Plasma desktop. In a fresh install and idle state, it only uses 620 MB of RAM! And the CPU is at around 1%. + +Next, when I pass it through a heavy workload with Firefox, Dolphin file manager, text editor, terminal, VLC media player, and system settings, it uses 1.3 GB of RAM, and the CPU is at 2% to 3% on average. + +Finally, when I close all the applications on a heavy workload, the RAM consumption goes back to 676MB of RAM, and the CPU is at a 1% level. + +I must say, it is well optimized. And surprisingly, KWin is performing better with the Debian base than the Ubuntu or Fedora base. + +It uses 10GB of disk space for a default installation. + +![Titan Linux in Idle State][10] + +![Titan Linux Performance in Heavy Workload][11] + +#### Bugs + +There are no bugs I encountered while reviewing this distribution. It is simply stable well considering it is a new distribution. + +However, I found one weird behaviour while changing resolution in a virtual machine (see below), which I think is a KWin bug and has nothing to do with Titan Linux. + +![][12] + +### Closing Notes + +Having reviewed a large set of distributions over the years, I must say that Titan Linux gives you a stock Debian stable experience with well-optimized KDE Plasma desktop. On top of that, the Titan toolbox is also a handy addition to helping users. + +If you are looking for a Debian stable distribution with KDE Plasma desktop experience, definitely go for it. Thanks to Debian, you can easily use this distro for your daily use and productive work. + +You can download Titan Linux from the [official website][13]. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/06/titan-linux-review-2022/ + +作者:[Arindam][a] +选题:[lkxed][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/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/06/Titan-Linux-Desktop.jpg +[2]: https://www.debugpoint.com/2021/05/debian-11-features/ +[3]: https://www.debugpoint.com/2021/01/install-debian-buster/ +[4]: https://www.debugpoint.com/2021/02/legacy-kickoff-kde-plasma-5-21/ +[5]: https://www.debugpoint.com/wp-content/uploads/2022/06/The-KDE-Plasma-kick-off-menu-shows-a-legacy-view.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/06/System-Settings-in-Titan-Linux.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/06/A-side-by-side-view-of-two-different-options-of-Titan-Toolbox.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/06/One-of-the-Titan-Toolbox-option-Extra-Software.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2022/06/Advanced-Tools.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2022/06/Titan-Linux-in-Idle-State.jpg +[11]: https://www.debugpoint.com/wp-content/uploads/2022/06/Titan-Linux-Performance-in-Heavy-Workload.jpg +[12]: +[13]: https://techcafe757.wixsite.com/titanlinux diff --git a/sources/tech/20220604 KDE Plasma 5.25- Top New Features and Release Details.md b/sources/tech/20220604 KDE Plasma 5.25- Top New Features and Release Details.md new file mode 100644 index 0000000000..a5310fc224 --- /dev/null +++ b/sources/tech/20220604 KDE Plasma 5.25- Top New Features and Release Details.md @@ -0,0 +1,147 @@ +[#]: subject: "KDE Plasma 5.25: Top New Features and Release Details" +[#]: via: "https://www.debugpoint.com/2022/06/kde-plasma-5-25/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +KDE Plasma 5.25: Top New Features and Release Details +====== +We will give you the feature summary of the KDE Plasma 5.25 desktop environment (upcoming). + +KDE Plasma 5.25 is the 27th version of KDE Plasma desktop, not an LTS release. This release is followed by the prior [5.24 LTS][1], released in February. KDE Plasma 5.25 brings several exciting updates on the desktop UI, polished applets, widgets, a good set of gesture updates for touch-based devices and a massive list of bug fixes. Plasma 5.25 is based on Qt 5.15.2 and KDE Frameworks 5.94. + +KDE Plasma releases on June 14, 2022, but before that following milestones are to be met: + +* Soft feature freeze: May 5, 2022 (Completed) +* Beta: May 19, 2022 (completed) +* Final release: June 14, 2022 + +The list of bug fixes and features is around 400+, and it’s challenging to cover them in a single article. We filtered out in this article some of the essential and visual changes which are more impactful straightaway to the general user base. + +### KDE Plasma 5.25 – Top New Features + +#### Plasma Workspace & Desktop + +Perhaps the most important visual change in KDE Plasma 5.25 is accent colour change based on the Wallpaper. As reported earlier, this change gives the final touch to the entire accent colour functionality and makes it complete with dynamic colour, custom colour and pre-sets. The option is available in the Appearance module. ([MR#1325)][2] + +![KDE Plasma 5.25 - Accent Colour Change Based on wallpaper][3] + +In addition, the accent colour change to the title bar was [also implemented][4] in the Breeze Classic theme and made it more consistent across the desktop. + +Another exciting change that KDE Plasma 5.25 brings is an option for Themes to make the Panel float. When selected, the Panel detaches itself from the bottom of the screen with rounded corners and gives a floating feeling. The option is available in the additional settings in Edit Panel mode. Here’s how it looks. ([MR#714)][5] + +![Floating Panel in Plasma 5.25][6] + +Here’s a quick video we prepared for you to show the above two features in action. + +![KDE Plasma - Dynamic Accent Colour and Floating Panel Demo][7] + +In addition to that, the power profiles menu in the system tray now has [icons][8] with their names in the [tooltip][9]. + +The login and logout screen see a [small UI change][10] to display avatar and profile name with longer user names. + +Also, the spacing between the avatar icon and name with the logout screen action buttons is [increased][11] to give a more consistent look. + +A fix was made to the Plasma Desktop to prevent widgets from [retaining position][12]when resolution changes back from fullscreen gaming. The widgets remember their position for respective resolutions. + +The plasma Workspace module [reverts][13]to the lock screen behaviour on mouse move, which was removed accidentally earlier. + +The Digital Clock “Copy to Clipboard” menu is now [more clean][14] with the removal of duplicate items and separate entries when seconds are enabled. + +#### KWin Updates + +KWin introduces an [option to hide][15] minimised windows in KDE Plasma 5.25. In addition to that, the desktop grid effect is [completely replaced][16] with the QML Version. + +Furthermore, it is now possible to switch between display specific resolutions which are not visible to the operating system in Wayland. The change adds [libxcvt][17] dependency in Kwin, and details of this change can be found [here][18]. + +With this release, the switching between the dark and light mode is more smooth and animated thanks to this [MR][19], inspired by GNOME. It was not smooth earlier and now looks more professional behaviour. + +#### Changes in Discover + +The application page of Discover is now complete with [more focused details][20] at the top with Application metadata and images. The spacing of the app name, ratings and developer with the image at the header section with the summary in the middle. And rest at the bottom. Here’s a side by side comparison of the earlier version with 5.25. + +![The app page gives more clarity in Plasma 5.25][21] + +One tiny yet impactful change in Discover related to Flatpak apps. Discover now [shows][22] a message with an action button to clean Flatpak data for uninstalled apps. + +![Message to clear the app data (Image credit: KDE Team)][23] + +Moreover, Discover now [shows the required permissions][24]of the Flatpak applications before you install them. In addition, if you are planning to install proprietary software, you get a warning message saying the potential consequences of using those (such as Microsoft Teams). + +#### Application and Applet Changes + +The System Monitor (KSystemStats) shows new [information about your window system][25] whether you are running X11 or Wayland. This should also display on the overview screen of the KSysGuard. + +The Open With Dialog of XGD Portal sees a [complete UI rework][26]. The top section label is merged into one single information line for better clarity. Also, the search field is now visible for all modes, and the Show More button is moved up beside Search with better clarity. You can look at the below image (Credit KDE Team) for this change. + +The Plasma Applet for NetworkManager now [shows][27] the WiFi frequency connection details to help distinguish which frequency you are connected to in the same SSID (same Wi-Fi Router). It’s really helpful if both the band have the same Wifi Accent point name and you cannot distinguish between 4G or 5G. + +The cuttlefish icon viewer now helps you [open the file path via the file manager][28] directly of the selected icon. + +Plasma desktop now gives a [more organised view][29]in “Recent Documents” with the ability to show “non-file” items such as RDP or remote connections. + +Moreover, the spell checker module in KRunner now [detects][30] the search language and gives you results. + +![KRunner spell check for non-English (image credit: KDE team)][31] + +When you run into an error, the KInfocenter now gives you [more information][32] about the error. The new design gives you what is the error, why it happened, whether you can fix it by yourself and how to report it to the devs. This is a nifty change that has a more significant impact. Here’s a side by side view of the change. + +![More help on the error on the way (Image credit: KDE Team)][33] + +### Closing Notes + +Along with the above changes, this release improves several gestures for touch devices and a massive list of performance and bug fixes (counting 150+), which will enhance the KDE Plasma 5.25 experience for all of its users. + +If you want to give a hand on testing, read the [contribution guide][34], and you can try the [unstable edition of KDE Neon][35] until the BETA release. + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/06/kde-plasma-5-25/ + +作者:[Arindam][a] +选题:[lkxed][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/lkxed +[1]: https://www.debugpoint.com/2022/03/kde-plasma-5-24-review/ +[2]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1325 +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/KDE-Plasma-5.25-Accent-Colour-Change-Based-on-wallpaper-1024x611.jpg +[4]: https://invent.kde.org/plasma/breeze/-/merge_requests/182 +[5]: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/714 +[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/Floating-Panel-in-Plasma-5.25.jpg +[7]: https://youtu.be/npfHwMLXXHs +[8]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1585 +[9]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1668 +[10]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1654 +[11]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1647 +[12]: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/608 +[13]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1707 +[14]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1693 +[15]: https://invent.kde.org/plasma/kwin/-/merge_requests/2341 +[16]: https://invent.kde.org/plasma/kwin/-/merge_requests/2327 +[17]: https://gitlab.freedesktop.org/xorg/lib/libxcvt +[18]: https://bugs.kde.org/448398 +[19]: https://invent.kde.org/plasma/kwin/-/merge_requests/2088 +[20]: https://invent.kde.org/plasma/discover/-/merge_requests/246 +[21]: https://www.debugpoint.com/wp-content/uploads/2022/05/App-page-gives-more-clarity-in-Plasma-5.25.jpg +[22]: https://invent.kde.org/plasma/discover/-/merge_requests/297 +[23]: https://www.debugpoint.com/wp-content/uploads/2022/05/Message-to-clear-the-app-data.jpg +[24]: https://invent.kde.org/plasma/discover/-/merge_requests/282 +[25]: https://invent.kde.org/plasma/ksystemstats/-/merge_requests/34 +[26]: https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/94 +[27]: https://invent.kde.org/plasma/plasma-nm/-/merge_requests/112 +[28]: https://invent.kde.org/plasma/plasma-sdk/-/merge_requests/32 +[29]: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/551 +[30]: https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/122 +[31]: https://www.debugpoint.com/wp-content/uploads/2022/05/KRunner-spell-check-for-non-english.jpg +[32]: https://invent.kde.org/plasma/kinfocenter/-/merge_requests/90 +[33]: https://www.debugpoint.com/wp-content/uploads/2022/05/More-help-on-the-error-on-the-way.jpg +[34]: https://community.kde.org/Get_Involved +[35]: https://neon.kde.org/download diff --git a/translated/talk/20190131 OOP Before OOP with Simula.md b/translated/talk/20190131 OOP Before OOP with Simula.md new file mode 100644 index 0000000000..d50b95447f --- /dev/null +++ b/translated/talk/20190131 OOP Before OOP with Simula.md @@ -0,0 +1,230 @@ +[#]: 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: "aREversez" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Simula 诞生之前的面向对象程序设计 +====== + +想象一下,你坐在河边,河岸上如茵绿草,不远处湍急河流;午后的阳光慵懒惬意,使人陷入冥想哲思,不觉开始思考眼前的河流是否真实存在。诚然,几米外确实有河水奔流而下。不过,我们所称为“河流”的存在究竟是什么呢?毕竟,河水奔流不息,一直处于变化之中。似乎,“河流”这个词无法指代任何固定不变的事物。 + +2009 年,Clojure 的创始人 里奇·希基Rich Hickey 发表了[一场精彩的演讲][1],探讨了为什么上文那样的哲学发问会给面向对象程序设计带来难题。他认为,人们看待计算机程序中的对象与看待河流的逻辑是一样的:对象是固定不变的。可实际上,许多对象或者说全部对象都无时无刻不处于变化之中。所以,这种逻辑并不正确,我们无法区分在不同状态下同一对象实例的不同之处。程序中没有时间的概念。人们只是单纯地用着同一个名字,以期在引用对象时,对象能够处于预期的状态中。这样,我们也就难免会遇到 故障bugs。 + +希基总结道,这一难题的应对办法就是人们应该将世界模拟成对固定数据的 _过程_ 的集合,而不是变化着的对象的集合。换句话说,我们应把每个对象看作一条“河流”,因果相连。总结说来,你应该使用 Clojure 等函数式语言。 + +![][2] _作者在远足途中思考面向对象程序设计的本体论问题。_ + +自从希基发表演讲之后,人们对函数式编程语言的兴趣不断提升,主流的面向对象编程语言也大多都采用了函数式编程语言。尽管如此,大多数程序员依旧沿用自己的老一套,继续将对象实例化,不断改变其状态。这些人长此以往,很难做到用不同的视角看待编程。 + +我曾经想写一篇关于 Simula 的文章,大概会写到我们今天所熟知的面向对象的理念是何时又是如何应用到程序语言之中的。但是,我觉得写当初的 Simula 与如今的面向对象程序设计的 _迥然不同之处_,会更有趣一些,这我敢打包票。毕竟,我们现在熟知的面向对象程序设计在当时还未完全成型。Simula 有两个主要版本:Simula I 和 Simula 67。Simula 67 为世界带来了 class类的继承class hierarchy 以及 虚拟方法virtual method;围绕其他的设想,Simula I 首次测试了如何能够将数据和过程捆绑起来。Simula I 的模型不是希基提出的函数式模型,不过这一模型关注的是随时间展开的 _过程_,而非相互交互的有着隐藏状态的对象。如果 Simula 67 采用了 Simula I 的理念,那么我们如今所知的面向对象程序设计可能会大有不同——这类偶然性启示我们,不要想着现在的程序设计范式会一直占据主导地位。 + +### 从 Simula 0 到 Simula 67 + +Simula 是由 克里斯汀·尼加德Kristen Nygaard奥利-王五·达尔Ole-Johan Dahl 两位挪威人开发出来的。 + +20世纪50年代末,尼加德受雇于挪威防务科学研究中心,该研究中心附属于挪威军方。在那里,他负责设计蒙特卡洛模拟方法,用于核反应堆设计与操作研究。最初,那些模拟实验完全通过人工开展;后来,实验在 Ferranti Mercury 电脑[1][3] 上编入程序运行。尼加德随后发现,将这些模拟实验输入电脑需要一种更有效的方式。 + +尼加德设计的这种模拟实验就是人们所知的“离散事件模型”,模拟记录了一系列事件随着时间改变系统状态的过程。但是问题的关键在于模拟可以从一个事件跳跃到另一个事件中,因为事件是离散的,事件之间的系统不存在任何变化。根据尼加德和达尔在 1966 年发表的一篇关于 Simula 的论文,这种模型被迅速应用于“神经网络、通信系统、交通流量、生产系统、管理系统、社会系统等”[2][4] 领域的分析。因此,尼加德认为,其他人描述模拟实验时,可能也需要更高层级的模型。于是他开始物色人才,帮助他完成他称之为“模拟语言”或者“蒙特卡洛编译器”的项目[3][5]。 + +达尔当时也受雇于挪威防务科学研究中心,专攻语言设计,此时也加入了尼加德的项目。在接下来一年左右的时间,尼加德和达尔携手开发了 Simula 0 语言。[4][6] 这一语言的早期版本仅仅是在 ALGOL 60 基础上进行的较小拓展,当时也只是打算将其用作预处理程序而已。Simula 0 远不及后来的编程语言复杂,其基本语言结构是“stations”与“乘客customers”,这些结构可以用于针对具体某些离散事件网络建立模型。通过模拟飞机起飞的过程,尼加德和达尔给出了一个例子。[5][7] 但是尼加德和达尔最后想出了一个更加通用的语言结构,可以同时表示“站”和“乘客”,也可以为更广泛的模拟建立模型。这就是后来 Simula 的第一个主要版本,它改变了 Simula 作为 ALGOL 专属包的定位,使其转变为通用编程语言。 + +Simula I 没有“stations”和“乘客customers”的语言结构,但它可以通过使用“进程”再现这些结构。一个进程包含大量数据属性,这些属性与作为进程 _操作规程_ 的单个行为相联系。你可能会把进程当作是只有单个方法的对象,比如 `run()`。不过,这种类比并不全面,因为每个进程的操作规程都可以随时暂停、随时恢复,因为这种操作规程属于协同程序的一种。Simula I 程序会将系统建立为一套进程的模型,在概念上这些进程并行运行。实际上,一个时间点上能称为“当前进程”的只有一个进程。但是,一旦某个进程暂停运行,那么下一个进程就会自动接替它的位置。开展模拟实验时,Simula 会预留出一份 “事件通知event notices” 的时间线,跟踪记录每个进程恢复的时间。为了恢复暂停运行的进程,Simula 需要记录多个 调用栈call stacks 的情况。这就意味着 Simula 无法再作为 ALGOL 的预处理程序了,因为 ALGOL 只有一个 调用栈call stacks。于是,尼加德和达尔下定决心,开始编写自己的编译器。 + +尼加德和达尔在介绍该系统的论文中,借助图示,通过模拟一个可用机器数量有限的工厂,阐明了其用法。[6][8] 在该案例中,进程就好比订单:通过寻找可用的机器,订单得以发出;如果没有可用的机器,订单就会搁置;而一旦有机器空出来,订单就会执行下去。这种订单流程的概念被用以例证若干种不同的订单实例,不过这些实例并未调用任何方法。这类程序的主体仅仅是创建进程,并使其运行。 + +历史上第一个 Simula I 编译器发布于 1965 年。尼加德和达尔在离开挪威防务科学研究中心之后,就进入了挪威计算机中心工作,Simula I 也是在这里日渐流行起来的。当时,Simula I 在 UNIVAC 公司的计算机和Burroughs 公司的 B5500 计算机上均可执行。[7][9] 尼加德和达尔两人与一家名为 ASEA 的瑞典公司达成了咨询协议,运用 Simula 模拟加工车间。但是,尼加德和达尔随后就意识到 Simula 也可以写一些和模拟完全不搭边的程序。 + +奥斯陆大学教授 斯坦因·克罗达尔Stein Krogdahl 曾写过关于 Simula 的发展史,称“真正能够促使新开发的通用语言快速发展的催化剂”就是[一篇题为《记录处理》Record Handling的论文][10],作者是英国计算机科学家 查尔斯·安东尼·理查德·霍尔C.A.R. Hoare。[8][11] 假如你现在读霍尔的这篇论文,你就不会怀疑这句话。当人们谈及面向对象语言的发展史时,如果没有提起霍尔的大名,那绝对是不可能的。以下内容摘自霍尔的《记录处理》一文: + +> 该方案设想,在程序执行期间,计算机内部存在任意若干条记录,每条记录都代表着程序员在过去、现在或未来所需的某个对象。程序对现有记录的数量保持动态控制,并可以根据当前任务的要求创建新的记录或删除现有记录。 + +> 计算机中的每条记录都必须属于数量有限但互不重合的记录类型中的一类;程序员可以根据需要声明尽可能多的记录类型,并借助标识符为各个类型命名。记录类型的命名可能是普通词汇,比如“牛”、“桌子”以及“房子”,同时,归属于这些类型的记录分别代表一头“牛”、一张“桌子”以及一座“房子”。 + +霍尔在这片论文中并未提到子类的概念,但是达尔非常感谢霍尔,是他引导了两人发现了这一概念。[9][12] 尼加德和达尔注意到 Simula I 的进程通常具有相同的元素,所以引入父类来执行共同元素就会非常方便。这也强化了“进程”这一概念本身可以用作父类的可能性,也就是说,并非每种类型都必须用作只有单个操作规程的进程。这就是 Simula 语言迈向通用化的第二次飞跃,此时,Simula 67 真正成为了通用编程语言。正是如此变化让尼加德和达尔萌生了给 Simula 改名的想法,想让人们意识到 Simula 不仅仅可以用作模拟。[10][13] 不过,考虑到 “Simula”这个名字的知名度已经很高了,另取名字恐怕会带来不小的麻烦。 + +1967年,尼加德和达尔与 控制数据公司Control Data 签署协议,着手开发Simula 的新版本:Simula 67。同年六月份的一场会议中,来自 控制数据公司Control Data、奥斯陆大学以及挪威计算机中心的代表与尼加德和达尔两人会面,意在为这门新语言制定标准与规范。最终,会议发布了 [《Simula 67 通用基础语言》][14],确定了该语言的发展方向。 + +Simula 67 编译器的开发由若干家供应商负责。Simula 用户协会The Association of Simula Users(ASU)也随后成立,并于每年举办年会。不久,Simula 67 的用户就遍及了23个国家。[11][15] + +### 21 世纪的 Simula 语言 + +人们至今还记得 Simula,是因为后来那些取代它的编程语言都受到了它的巨大影响。到了今天,你很难找到还在使用 Simula 写程序的人,但是这并不意味着 Simula 已经从这个世界上消失了。得益于 [GNU cim][16],人们在今天依然能够编写和运行 Simula 程序。 + +cim 编译器遵循 1986 年修订后的 Simula 标准,基本上也就是 Simula 67 版本。你可以用它编写类、子类以及虚拟方法,就像是在使用 Simula 67 一样。所以,用 Python 或 Ruby 轻松写出短短几行面向对象的程序,你照样也可以用 cim 写出来: + +``` + + ! 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; + +``` + +你可以按照下面代码执行程序的编译与运行: + +``` + + $ 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 + +``` + +(你可能会注意到,cim 先将 Simula 语言编译为 C 语言,然后传递给 C 语言编译器。) + +这就是 1967 年的面向对象程序设计,除了语法方面的不同,和 2019 年的面向对象程序设计并无本质区别。如果你同意我的这一观点,你也就懂得了为什么人们会认为 Simula 在历史上是那么的重要。 + +不过,我更想介绍一下 Simula I 的核心概念——进程模型。Simula 67保留了进程模型,不过只有在使用 `进程`类Process class`模拟`块Simulation block 的时候才能调用。 + +为了表现出进程是如何运行的,我决定对下述场景进行模拟。想象一下,有这么一座村庄,村庄的旁边有条小河边,小河里有很多的鱼。但是,村里多的村民却只有一条鱼竿。有些村民胃口很大,每隔一个小时就饿了。他们一饿,就会拿着鱼竿去钓鱼。如果一位村民正在等鱼竿,另一位村民自然也用不了。这样一来,村民们就会为了钓鱼排起长长的队伍。假如村民要等五、六分钟才能钓到一条鱼,那么这样等下去,村民们的身体状况就会变得越来越差。再假如,一位村民已经到了骨瘦如柴的地步,最后他可能就会饿死。 + +这个例子多少有些奇怪,虽然我也不说不出来为什么我脑袋里最先想到的是这样的故事,但是就这样吧。我们把村民们当作 Simula 的各个进程,观察在一天的模拟时间内有着四个村民的村庄里会发生什么。 + +完整程序可以通过此处 [GitHub Gist][17] 的链接获取。 + +我把输出结果的最后几行放在了下面。我们来看看一天里最后几个小时发生了什么: + +``` + + 1299.45: 王五饿了,要了鱼竿。 + 1299.45: 王五正在钓鱼。 + 1311.39: 王五钓到了一条鱼。 + 1328.96: 赵六饿了,要了鱼竿。 + 1328.96: 赵六正在钓鱼。 + 1331.25: 李四饿了,要了鱼竿。 + 1340.44: 赵六钓到了一条鱼。 + 1340.44: 李四饿着肚子等着鱼竿。 + 1340.44: 李四在等鱼竿的时候饿死了。 + 1369.21: 王五饿了,要了鱼竿。 + 1369.21: 王五正在钓鱼。 + 1379.33: 王五钓到了一条鱼。 + 1409.59: 赵六饿了,要了鱼竿。 + 1409.59: 赵六正在钓鱼。 + 1419.98: 赵六钓到了一条鱼。 + 1427.53: 王五饿了,要了鱼竿。 + 1427.53: 王五正在钓鱼。 + 1437.52: 王五钓到了一条鱼。 + +``` + +李四最后饿死了,但是他比张三要长寿,因为张三还没到上午7点就死了。赵六和王五现在一定过得很好,因为需要鱼竿的就只剩下他们两个了。 + +这里,我要说明,这个程序最重要的部分只是创建了进程(四个村民),并让它们运行下去。各个进程操作对象(鱼竿)的方式与我们今天对对象的操作方式相同。但是程序的主体部分并没有调用任何方法,也没有修改进程的任何属性。进程本身具有内部状态,但是这种内部状态的改变只有进程自身才能做到。 + +在这个程序中,仍然有一些字段发生了变化,这类程序设计无法直接解决纯函数式编程所能解决的问题。但是正如克罗达尔所注意到的那样,“这一机制引导进行模拟的程序员为底层系统建立模型,生成一系列进程,每个进程表示了系统内的自然事件顺序。”[12][18] 先把影响其他对象的nouns 对象和 actors 对象放在一边,我们先来想一想运行中的进程。我们可以将程序的总控制权交予 Simula 的事件通知系统,克罗达尔称其为 “时间管理器”time manager。因此,尽管我们仍然在适当地改变进程,但是没有任何进程可以假设其他进程的状态。每个进程只能间接地与其他进程进行交互。 + +这种模式如何用以编写编译器、HTTP 服务器以及其他内容,尚且无法确定。(另外,如果你在 Unity 游戏引擎上编写过游戏,就会发现两者十分相似。)不得不承认,尽管我们有了“时间管理器”,我们还是无法实现希基在解释有必要搞清楚程序中的时间概念时所提出的设想。(我认为,希基想要的类似于 [阿达·洛芙莱斯Ada Lovelace 用于区分一个变量随时间变化产生的不同数值的上标符号][19]。)尽管如此,我们可以发现,面向对象程序设计前期的设计方式与我们今天所习惯的面向对象程序设计并非完全一致,我觉得这一点很有意思。我们可能会理所当然地认为,面向对象程序设计的方式千篇一律,即程序就是对事件的一长串记录:某个对象以特定顺序对其他对象产生作用。Simula I 的进程系统表明,面向对象程序设计的方式不止一种。仔细想一下,函数式语言或许是更好的设计方式,但是 Simula I 的发展告诉我们,现代面向对象程序设计被取代也很正常。 + +_如果你喜欢这篇文章,欢迎关注推特 [@TwoBitHistory][20],也可通过 [RSS feed][21] 订阅,获取最新文章(每四周更新一篇)。_ + +_TwoBitHistory 文章回顾……_ + +> 嗨,大家好!很遗憾,我最近没有时间写新文章,但是我刚刚更新了我的 RSS 记录,整合了目前为止我私下对一些关键人物的采访,比如 Ramanathan Guha 和 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] +译者:[aREversez](https://github.com/aREversez) +校对:[校对者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 diff --git a/translated/tech/20210210 Manage your budget on Linux with this open source finance tool.md b/translated/tech/20210210 Manage your budget on Linux with this open source finance tool.md new file mode 100644 index 0000000000..6a91f26636 --- /dev/null +++ b/translated/tech/20210210 Manage your budget on Linux with this open source finance tool.md @@ -0,0 +1,86 @@ +[#]: collector: (lujun9972) +[#]: translator: (hanszhao80) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Manage your budget on Linux with this open source finance tool) +[#]: via: (https://opensource.com/article/21/2/linux-skrooge) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +使用这款 Linux 开源财务工具管理你的预算 +====== +使用开源预算工具 Skrooge 让你的财务管理更加轻松。 + +![2 cents penny money currency][1] + +2021 年,人们喜欢 Linux 的理由比以往任何时候都多。在本系列中,我将分享使用 Linux 的 21 个不同理由。本篇介绍的是个人财务管理。 + +个人财务可能很难管理。当你没有足够的钱在没有经济援助的情况下度日时,这可能是令人沮丧甚至不安的,而当你确实有所需的钱却又不清楚每个月的去向时,这可能会令人惊讶地难以接受。更糟糕的是,我们经常被告知要“制定预算”,好像申报你每个月的花销就能在某种程度上证明你需要多少钱。底线是:制定预算是困难的,不满足你的财务目标是令人沮丧的。但这仍然很重要,Linux 有几个工具可以帮助使任务变得可管理。 + +### 理财 + +就像生活中的其他事情一样,我们都有自己的方法来跟踪我们的财务。我过去常常采取一种简单而直接的方法:我的薪水支票被存入一个账户,然后我会提取一定比例的现金。一旦我钱包里的钱没了,我就得等到下一个发薪日才能花钱。我只错过了一天的午餐,就明白了我必须认真对待我的目标,并相应地调整了我的消费行为。对于当时我的简单的生活方式来说,这是一种让我对自己的收入保持诚实的有效手段,但它并没有很好地转化为在线商业交易、长期公用事业合同、投资等等。 + +随着我不断完善我的财务跟踪方式,我了解到个人会计始终是一个不断发展的过程。我们每个人都有独特的财务状况,这告诉我们可以或应该使用什么样的解决方案来跟踪我们的收入和债务。如果你失业了,那么你的预算目标可能是尽可能少花钱。如果你在工作,但在还学生贷款,那么你的目标可能是向银行汇款。如果你在工作,但计划退休,那么你可能会尽可能多地存钱。 + +关于预算,要记住的一点是,它意味着将你的财务现实与你的财务 _目标_ 进行比较。你无法避免一些费用,但在这些之后,你可以设定自己的优先事项。如果你没有达到你的目标,你可以调整自己的行为或改写你的目标,使其更好地反映现实。调整你的财务计划并不意味着你失败了。这只是意味着你最初的预测并不准确。在困难时期,你可能无法达到任何预算目标,但如果你坚持你的预算,你会学到很多关于维持你目前的生活方式(无论它可能是什么)所需要的财务手段。随着时间的推移,你可以学习调整你可能从未意识到的设置。例如,由于远程工作已成为一种被广泛接受的选择,人们正在搬到农村城镇以降低生活成本。看到这种生活方式的转变如何改变你的预算报告,真是令人震惊。 + +重点是,预算是一项经常被低估的活动,这在很大程度上是因为它令人生畏。重要的是要认识到,无论你的专业水平或对财务的兴趣如何,你都可以进行预算。无论你 [只使用 LibreOffice 电子表格][2],还是尝试专用的财务应用程序,你都可以设定目标,跟踪自己的行为,并学到许多宝贵的经验教训,这些经验教训最终可能会带来回报。 + +### 开源会计 + +有几个专用于 [Linux 的个人理财应用程序][3],包括 [HomeBank][4], [Money Manager EX][5], [GNUCash][6], [KMyMoney][7], 和 [Skrooge][8]。所有这些应用程序本质上都是分类帐,你可以在每个月底(或每当你查看帐户时)退回到一个地方,从你的银行导入数据,并审查你的支出如何与你为自己设定的预算保持一致。 + +![显示财务数据的 Skrooge 界面][9] + +Skrooge + +我使用 Skrooge 作为我的个人预算跟踪器。即便面对多个银行账户,它也能轻松自如的设置。与大多数开源金融应用程序一样,Skrooge 可以导入多种文件格式,因此我的工作流程大致如下: + + 1. 登录我的银行。 + 2. 将当月的银行对账单导出为 QIF 文件。 + 3. 打开 Skrooge。 + 4. 导入 QIF 文件。每个文件都会自动分配到相应的帐户。 + 5. 对照我为自己设定的预算目标检查我的支出。如果我已经超过了,那么我会停靠在下个月的目标(这样我就会理性地少花钱来弥补差额)。如果我尚未超出我的目标预算,那么我会把多余的部分移到 12 月的预算中(这样我在年底就会有更多的支出份额)。 + + + +在 Skrooge 里我只跟踪了家庭预算的一部分。Skrooge 通过一个动态数据库简化了这一过程,该数据库允许我使用自定义标签一次对多个事务进行分类。这使我可以轻松地从一般家庭和公用事业支出中提取我的个人支出,并且我可以在查看 Skrooge 提供的自动生成的报告时利用这些类别。 + +![Skrooge 预算饼图][10] + +Skrooge 预算饼图 + +最重要的是,流行的 Linux 财务应用程序使我能够以最适合我的方式管理我的预算。例如,我的合作伙伴更喜欢使用 LibreOffice 电子表格,但我毫不费力地从家庭预算中提取 CSV 文件,将其导入到 Skrooge,并使用一组更新的数据集。不存在锁定和不兼容。该系统灵活敏捷,使我们能够在更多地了解有效预算和生活中的情况时调整我们的预算和跟踪支出的方法。 + +### 开放选择 + +世界各地的货币市场各不相同,我们每个人与之互动的方式也决定了我们可以使用哪些工具。归根结底,你对财务类软件的选择必须基于自己的需求。开源做得特别好的一件事是为用户提供了选择的自由。 + +在设定自己的财务目标时,我很欣赏我可以使用最适合我个人计算风格的任何应用程序。我可以控制我在生活中如何处理数据,即使是我不一定喜欢处理的数据。Linux 及其令人惊叹的应用程序集使它不再是一件苦差事。 + +在 Linux 上尝试一些财务应用程序,看看你是否可以激励自己设定一些目标并省钱吧! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/linux-skrooge + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[hanszhao80](https://github.com/hanszhao80) +校对:[校对者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/Medical%20Costs%20Transparency_1.jpg?itok=CkZ_J88m (2 cents penny money currency) +[2]: https://opensource.com/article/20/3/libreoffice-templates +[3]: https://opensource.com/life/17/10/personal-finance-tools-linux +[4]: http://homebank.free.fr/en/index.php +[5]: https://www.moneymanagerex.org/download +[6]: https://opensource.com/article/20/2/gnucash +[7]: https://kmymoney.org/download.html +[8]: https://apps.kde.org/en/skrooge +[9]: https://opensource.com/sites/default/files/skrooge.jpg +[10]: https://opensource.com/sites/default/files/skrooge-pie_0.jpg diff --git a/translated/tech/20210323 WebAssembly Security, Now and in the Future.md b/translated/tech/20210323 WebAssembly Security, Now and in the Future.md deleted file mode 100644 index 5073d59a7d..0000000000 --- a/translated/tech/20210323 WebAssembly Security, Now and in the Future.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: subject: (WebAssembly Security, Now and in the Future) -[#]: via: (https://www.linux.com/news/webassembly-security-now-and-in-the-future/) -[#]: author: (Dan Brown https://training.linuxfoundation.org/announcements/webassembly-security-now-and-in-the-future/) -[#]: collector: (lujun9972) -[#]: translator: (hanszhao80) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -WebAssembly 安全的现在和未来 -====== - - -### 说明 - -正如我们 [最近解释的][1],WebAssembly 是一种用于以任何语言编写的软件的二进制格式,旨在最终无需更改就能在任意平台运行。WebAssembly 的第一个应用是在 Web 浏览器中,以使网站更快、更具交互性。计划将 WebAssembly 推向 Web 之外,从各种服务器到物联网IoT,创造了与安全问题一样多的机会。这篇文章是对这些问题和 WebAssembly 安全模型的介绍性概述。 - -### WebAssembly 跟 JavaScript 很像 - -在 Web 浏览器内部,WebAssembly 模块由执行 JavaScript 代码的同一 虚拟机VM 管理。因此,WebAssembly 可用于造成与 JavaScript 相同的危害,只是效率更高,并且不易被察觉。由于 JavaScript 是纯文本,运行前需要浏览器的编译,而 WebAssembly 是一种可立即运行的二进制格式,后者运行速度更快,也更难被扫描出(即使用杀毒软件)其中的恶意指令。 - -WebAssembly 的这种 **代码混淆** 效果已经被用来弹出不受欢迎的广告或打开要求敏感数据的虚假 **技术支持** 窗口。另一个把戏则是自动将浏览器重定向到包含真正危险的恶意软件的 **登陆** 页面。 - -最后,就像 JavaScript 一样,WebAssembly 可能被用来 **窃取** 处理能力而不是数据。2019 年,[对 150 个不同的 WASM 模块的分析][2]发现,其中约 _32%_ 被用于加密货币挖掘。 - -### WebAssembly 沙箱和接口 - -WebAssembly 代码在由 虚拟机VM(而不是操作系统)管理的[沙箱][3]中封闭运行。这使它无法看到主机,也无法直接与主机交互。对系统资源(文件、硬件或互联网连接)的访问只能通过该虚拟机提供的 WebAssembly 系统接口WASI 进行。 - -WASI 不同于大多数其他应用程序编程接口,它具有独特的安全特性,真正推动了 WASM 在传统服务器和边缘Edge服务器计算场景中的采用,这将是下一篇文章的主题。在这里,可以说,当从 Web 迁移到其他环境时,它的安全影响会有很大的不同。现代网络浏览器是极其复杂的软件,但它是建立在数十年的经验和数十亿人的日常测试之上的。与浏览器相比,服务器或物联网IoT设备几乎是未知领域。这些平台的虚拟机将需要扩展 WASI,因此,肯定会带来新的安全挑战。 - -### WebAssembly 中的内存和代码管理 - -与普通的编译程序相比,WebAssembly 应用程序对内存的访问非常有限,对它们自己也是如此。WebAssembly 代码不能直接访问尚未调用的函数或变量,不能跳转到任意地址,也不能将内存中的数据作为字节码指令执行。 - -在浏览器内部,WASM 模块只能获得一个连续字节的全局数组(线性内存linear memory)进行操作。WebAssembly 可以直接读写该区域中的任意位置,或者请求增加其大小,但仅此而已。这个线性内存linear memory也与包含其实际代码、执行堆栈、当然还有运行 WebAssembly 的虚拟机的区域分离。对于浏览器来说,所有这些数据结构都是普通的 JavaScript 对象,与所有其他使用标准过程的对象隔离。 - -### 结果很好,但并不完美 - -所有这些限制使得 WebAssembly 模块很难做出不当行为,但也并非不可能。 - -沙箱化的内存使 WebAssembly 几乎不可能接触到 __外部__ 的东西,也使操作系统更难防止 __内部__ 发生不好的事情。传统的内存监测机制,比如 [**Stack Canaries**][4] 能注意到是否有代码试图扰乱它不应该接触的对象,[在这里不奏效][5]。 - -事实上,WebAssembly 只能访问自己的线性内存linear memory,但可以直接访问,这也可能为攻击者的行为 _提供便利_。有了这些约束和对模块源代码的访问,就更容易猜测覆盖哪些内存位置可能造成最大的破坏。局部变量似乎也 [可能][6] 被破坏,因为它们停留在线性内存linear memory中的无监督的堆栈中。 - -2020年的一篇关于 [WebAssembly 的二进制安全性][5] 的论文指出,WebAssembly 代码仍然可以在设定的常量内存中覆盖字符串文字。同一篇论文描述了在三个不同的平台(浏览器、Node.JS 上的服务端应用程序和独立 WebAssembly 虚拟机的应用程序)上,WebAssembly 可能比编译为原生二进制文件时更不安全的其他方式。建议进一步阅读此主题。 - -通常,认为 WebAssembly 只能破坏其自身沙箱中的内容的想法可能会产生误导。WebAssembly 模块为调用它们的 JavaScript 代码做繁重的工作,每次都交换变量。如果模块在这些变量中的任意一处写入不安全的调用 WebAssembly 的 JavaScript 代码,就 _会_ 导致崩溃或数据泄露。 - -### 未来的方向 - -WebAssembly 的两个新出现的特性:[并发][7] 和内部垃圾收集,肯定会影响其安全性(如何影响以及影响多少,现在下结论还为时过早)。 - -并发允许多个 WebAssembly 模块在同一个虚拟机中并行。目前,只有通过 JavaScript [web workers][8] 才能实现这一点,但更好的机制正在开发中。安全方面,他们可能会带来[以前不需要的大量的代码][9],会导致出现更多的错误。 - -[原生的垃圾收集器][10] 需要提高性能和安全性,但最重要的是在经过良好测试的浏览器的 Java 虚拟机VM (收集它们自己内部的所有垃圾)之外使用 WebAssembly。当然,甚至这个新代码也可能成为漏洞和攻击的另一个入口。 - -往好处想,使 WebAssembly 比现在更安全的通用策略也是存在的。再次引用 [这篇文章][5],这些策略包括:编译器改进,栈、堆和常量数据 _分离_ 的线性存储机制,以及避免使用 **不安全的语言**(如 C)编译 WebAssembly 模块代码。 - -本文 [WebAssembly 安全的现在和未来][11] 首次发表在 [Linux 基金会 - 培训][12]。 - --------------------------------------------------------------------------------- - -via: https://www.linux.com/news/webassembly-security-now-and-in-the-future/ - -作者:[Dan Brown][a] -选题:[lujun9972][b] -译者:[hanszhao80](https://github.com/hanszhao80) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://training.linuxfoundation.org/announcements/webassembly-security-now-and-in-the-future/ -[b]: https://github.com/lujun9972 -[1]: https://training.linuxfoundation.org/announcements/an-introduction-to-webassembly/ -[2]: https://www.sec.cs.tu-bs.de/pubs/2019a-dimva.pdf -[3]: https://webassembly.org/docs/security/ -[4]: https://ctf101.org/binary-exploitation/stack-canaries/ -[5]: https://www.usenix.org/system/files/sec20-lehmann.pdf -[6]: https://spectrum.ieee.org/tech-talk/telecom/security/more-worries-over-the-security-of-web-assembly -[7]: https://github.com/WebAssembly/threads -[8]: https://en.wikipedia.org/wiki/Web_worker -[9]: https://googleprojectzero.blogspot.com/2018/08/the-problems-and-promise-of-webassembly.html -[10]: https://github.com/WebAssembly/gc/blob/master/proposals/gc/Overview.md -[11]: https://training.linuxfoundation.org/announcements/webassembly-security-now-and-in-the-future/ -[12]: https://training.linuxfoundation.org/ diff --git a/sources/tech/20210405 How different programming languages do the same thing.md b/translated/tech/20210405 How different programming languages do the same thing.md similarity index 52% rename from sources/tech/20210405 How different programming languages do the same thing.md rename to translated/tech/20210405 How different programming languages do the same thing.md index 55636213be..62ac87d02c 100644 --- a/sources/tech/20210405 How different programming languages do the same thing.md +++ b/translated/tech/20210405 How different programming languages do the same thing.md @@ -1,37 +1,38 @@ -[#]: subject: (How different programming languages do the same thing) -[#]: via: (https://opensource.com/article/21/4/compare-programming-languages) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -How different programming languages do the same thing +[#]: subject: "How different programming languages do the same thing" +[#]: via: "https://opensource.com/article/21/4/compare-programming-languages" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lujun9972" +[#]: translator: "VeryZZJ" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " +不同编程语言是如何完成同一件事 ====== -Compare 13 different programming languages by writing a simple game. + +通过一个简单的小游戏比较13种编程语言 ![Developing code.][1] -Whenever I start learning a new programming language, I focus on defining variables, writing a statement, and evaluating expressions. Once I have a general understanding of those concepts, I can usually figure out the rest on my own. Most programming languages have some similarities, so once you know one programming language, learning the next one is a matter of figuring out the unique details and recognizing the differences. +当我开始学习一种新的编程语言时,会把重点放在定义变量、书写声明以及计算表达式,一旦对这些概念有一个大致的了解,通常就能够自己弄清剩下的部分。大多数编程语言都具有相似性,所以如果你掌握了一种编程语言,学习下一种语言的重点就是弄清楚独有的概念以及区分不同。 -To help me practice a new programming language, I like to write a few test programs. One sample program I often write is a simple "guess the number" game, where the computer picks a number between one and 100 and asks me to guess it. The program loops until I guess correctly. This is a very simple program, as you can see using pseudocode like this: +我喜欢写一些测试程序来帮助练习新的编程语言。其中我经常写的是一个叫做“猜数字”的小游戏,计算机选出1到100里的任一数字,然后我来猜。程序循环进行,直到猜出正确数字。通过伪代码可以看出,这是个非常简单的程序: -* The computer picks a random number between 1 and 100 -* Loop until I guess the random number - + The computer reads my guess - + It tells me if my guess is too low or too high +* 计算机在1到100之间选出一个随机数字 +* 循环进行直到猜出该随机数字 + + 计算机读取我的猜测 + + 告诉我我的猜测过高还是过低 -Recently, Opensource.com ran an article series that wrote this program in different languages. This was an interesting opportunity to compare how to do the same thing in each language. I also found that most programming languages do things similarly, so learning the next programming language is mostly about learning its differences. +Opensource.com 最近发表了一篇文章,用不同的语言写这个程序。这是一个比较不同语言做同样事情的有趣机会。大多数编程语言具有相似性,所以当你在学习下一种新的编程语言时,主要是学习它的独特之处。 -C is an early general-purpose programming language, created in 1972 at Bell Labs by Dennis Ritchie. C proved popular and quickly became a standard programming language on Unix systems. Because of its popularity, many other programming languages adopted a similar programming syntax. That's why learning C++, Rust, Java, Groovy, JavaScript, awk, or Lua is easier if you already know how to program in C. +C 语言由 Dennis Ritchie 于1972年在贝尔实验室创建,是一种早期的通用编程语言。C 语言非常受欢迎,并迅速成为 Unix 系统上的标准编程语言。正是因为它的流行,许多其他编程语言也采用了类似的编程语法。这就是为什么如果你已经知道如何使用 C 语言编程,学习 C++、Rust、Java、Groovy、JavaScript、awk 或 Lua 会更容易。 -For example, look at how these different programming languages implement the major steps in the "guess the number" game. I'll skip some of the surrounding code, such as assigning temporary variables, to focus on how the basics are similar or different. +接下来我们看看这些不同的编程语言是如何实现 "猜数字 "游戏的主要步骤。我将把重点放在基本元素的相似或不同,跳过一些外围代码,如分配临时变量。 -### The computer picks a random number between one and 100 +### 计算机在1到100之间选出一个随机数字 -You can see a lot of similarities here. Most of the programming languages generate a random number with a function like `rand()` that you can put into a range on your own. Other languages use a special function where you can specify the range for the random value. +你可以看到这里有许多相似之处。大多数编程语言使用类似`rand()` 的函数,你可以设定一个范围来生成随机数。而其他一些语言使用一个特殊的函数来设定范围生成随机数。 C + ```c // Using the Linux `getrandom` system call getrandom(&randval, sizeof(int), GRND_NONBLOCK); @@ -42,45 +43,53 @@ number = rand() % 100 + 1; ``` C++ + ```cpp int number = rand() % 100+1; ``` Rust + ```rust let random = rng.gen_range(1..101); ``` Java + ```java private static final int NUMBER = r.nextInt(100) + 1; ``` Groovy + ```groovy int randomNumber = (new Random()).nextInt(100) + 1 ``` JavaScript + ```javascript const randomNumber = Math.floor(Math.random() * 100) + 1 ``` awk + ```awk randomNumber = int(rand() * 100) + 1 ``` Lua + ```lua number = math.random(1,100) ``` -### Loop until I guess the random number +### 循环进行直到我猜出该随机数字 -Loops are usually done with a flow-control block such as `while` or `do-while`. The JavaScript implementation doesn't use a loop and instead updates the HTML page "live" until the user guesses the correct number. Awk supports loops, but it doesn't make sense to loop to read input because awk is based around data pipelines, so it reads input from a file instead of directly from the user.  +循环通常是用控制流程来实现的,如`while` 或`do-while`。JavaScript 中的实现没有使用循环,而是 "实时 "更新 HTML 页面,直到用户猜出正确的数字。Awk 虽然支持循环,但是通过循环读取输入信息是没有意义的,因为 awk 是基于数据管道的,所以它从文件而不是直接从用户读取输入信息。 C + ```c do { … @@ -88,6 +97,7 @@ do { ``` C++ + ```cpp do { … @@ -95,6 +105,7 @@ do { ``` Rust + ```rust for line in std::io::stdin().lock().lines() { … @@ -103,6 +114,7 @@ for line in std::io::stdin().lock().lines() { ``` Java + ```java while ( guess != NUMBER ) { … @@ -110,6 +122,7 @@ while ( guess != NUMBER ) { ``` Groovy + ```groovy while ( … ) { … @@ -118,27 +131,29 @@ while ( … ) { ``` Lua + ```lua while ( player.guess ~= number ) do … end ``` -### The computer reads my guess +### 计算机读取我的猜测 -Different programming languages handle input differently. So there's some variation here. For example, JavaScript reads values directly from an HTML form, and awk reads data from its data pipeline. +不同编程语言对输入的处理方式不同。例如,JavaScript 直接从 HTML 表单中读取数值,而 awk 则从数据管道中读取数据。 -C ```c scanf("%d", &guess); ``` C++ + ```cpp cin >> guess; ``` Rust + ```rust let parsed = line.ok().as_deref().map(str::parse::); if let Some(Ok(guess)) = parsed { @@ -147,37 +162,43 @@ if let Some(Ok(guess)) = parsed { ``` Java + ```java guess = player.nextInt(); ``` Groovy + ```groovy response = reader.readLine() int guess = response as Integer ``` JavaScript + ```javascript let myGuess = guess.value ``` awk + ```awk guess = int($0) ``` Lua + ```lua player.answer = io.read() player.guess = tonumber(player.answer) ``` -### Tell me if my guess is too low or too high +### 告诉我我的猜测过高还是过低 -Comparisons are fairly consistent across these C-like programming languages, usually through an `if` statement. There's some variation in how each programming language prints output, but the print statement remains recognizable across each sample. +在这些类 C 语言中,通常是通过`if`语句进行比较的。每种编程语言打印输出的方式有一些变化,但打印语句在每个样本中都是可识别的。 C + ```c if (guess < number) { puts("Too low"); @@ -190,6 +211,7 @@ puts("That's right!"); ``` C++ + ```cpp if ( guess > number) { cout << "Too high.\n" << endl; } else if ( guess < number ) { cout << "Too low.\n" << endl; } @@ -200,6 +222,7 @@ else { ``` Rust + ```rust _ if guess < random => println!("Too low"), _ if guess > random => println!("Too high"), @@ -210,6 +233,7 @@ _ => { ``` Java + ```java if ( guess > NUMBER ) { System.out.println("Too high"); @@ -222,6 +246,7 @@ if ( guess > NUMBER ) { ``` Groovy + ```groovy if (guess < randomNumber) print 'too low, try again: ' @@ -234,6 +259,7 @@ else { ``` JavaScript + ```javascript if (myGuess === randomNumber) { feedback.textContent = "You got it right!" @@ -245,6 +271,7 @@ if (myGuess === randomNumber) { ``` awk + ```awk if (guess < randomNumber) { printf "too low, try again:" @@ -257,6 +284,7 @@ if (guess < randomNumber) { ``` Lua + ```lua if ( player.guess > number ) then print("Too high") @@ -268,13 +296,14 @@ else end ``` -### What about non-C-based languages? +### 非类 C 编程语言会怎么样呢? -Programming languages that are not based on C can be quite different and require learning specific syntax to do each step. Racket derives from Lisp and Scheme, so it uses Lisp's prefix notation and lots of parentheses. Python uses whitespace rather than brackets to indicate blocks like loops. Elixir is a functional programming language with its own syntax. Bash is based on the Bourne shell from Unix systems, which itself borrows from Algol68—and supports additional shorthand notation such as `&&` as a variation of "and." Fortran was created when code was entered using punched cards, so it relies on an 80-column layout where some columns are significant. +非类 C 编程语言会有很大的不同,需要学习特定的语法来完成每一步。Racket 源于 Lisp 和 Scheme,所以它使用 Lisp 的前缀符和大量括号。Python 使用空格而不是括号来表示循环之类的块。Elixir 是一种函数式编程语言,有自己的语法。Bash 是基于 Unix 系统中的 Bourne shell,它本身借鉴了 Algol68,并支持额外的速记符,如`&&`作为 "and " 的变体。Fortran 是在使用打孔卡片输入代码的时期创建的,所以它依赖于一些重要列的80-列布局。 -As an example of how these other programming languages can differ, I'll compare just the "if" statement that sees if one value is less than or greater than another and prints an appropriate message to the user. +我将通过比较 "if "语句,举例表现这些编程语言的不同。if 判断一个值是否小于或大于另一个值,并向用户打印适当信息。 Racket + ```racket (cond [(> number guess) (displayln "Too low") (inquire-user number)] [(< number guess) (displayln "Too high") (inquire-user number)] @@ -282,6 +311,7 @@ Racket ``` Python + ```python if guess < random: print("Too low") @@ -292,6 +322,7 @@ else: ``` Elixir + ```elixir cond do guess < num -> @@ -306,12 +337,14 @@ end ``` Bash + ```bash [ "0$guess" -lt $number ] && echo "Too low" [ "0$guess" -gt $number ] && echo "Too high" ``` Fortran + ```fortran IF (GUESS.LT.NUMBER) THEN PRINT *, 'TOO LOW' @@ -320,11 +353,11 @@ ELSE IF (GUESS.GT.NUMBER) THEN ENDIF ``` -### Read more +### Read more 更多 -This "guess the number" game is a great introductory program when learning a new programming language because it exercises several common programming concepts in a pretty straightforward way. By implementing this simple game in different programming languages, you can demonstrate some core concepts and compare each language's details. +当你在学习一种新的编程语言时"猜数字 "游戏是一个很友好的入门程序,通过一种简单的方式练习了几个常见的编程概念。通过不同编程语言实现这个简单游戏,你可以理解一些核心概念和每种语言的细节。 -Learn how to write the "guess the number" game in C and C-like languages: +学习如何用 C 和类 C 语言编写 "猜数字 "游戏: * [C][2], by Jim Hall * [C++][3], by Seth Kenlon @@ -335,7 +368,7 @@ Learn how to write the "guess the number" game in C and C-like languages: * [awk][8], by Chris Hermansen * [Lua][9], by Seth Kenlon -And in non-C-based languages: +其他语言: * [Racket][10], by Cristiano L. Fontana * [Python][11], by Moshe Zadka @@ -349,14 +382,14 @@ via: https://opensource.com/article/21/4/compare-programming-languages 作者:[Jim Hall][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[VeryZZJ](https://github.com/VeryZZJ) 校对:[校对者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/code_development_programming.png?itok=M_QDcgz5 (Developing code.) +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_development_programming.png?itok=M_QDcgz5 "Developing code." [2]: https://opensource.com/article/21/1/learn-c [3]: https://opensource.com/article/20/12/learn-c-game [4]: https://opensource.com/article/20/12/learn-rust diff --git a/translated/tech/20220505 Experiment with containers and pods on your own computer.md b/translated/tech/20220505 Experiment with containers and pods on your own computer.md deleted file mode 100644 index b026b18139..0000000000 --- a/translated/tech/20220505 Experiment with containers and pods on your own computer.md +++ /dev/null @@ -1,83 +0,0 @@ -[#]: subject: "Experiment with containers and pods on your own computer" -[#]: via: "https://opensource.com/article/22/5/containers-pods-101-ebook" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -在自己的电脑上实验容器和 pod -====== -通过这个新的可下载指南开始探索容器技术的要领。 - -![Looking at a map][1] - -(图片由:opensource.com) - -在电视剧 *Battlestar Galactica* (太空堡垒卡拉狄加)中,这艘名副其实的巨型飞船并没有做什么。它是船员们坚守的庇护所,是战略和协调的中心联络点,也是资源管理的安全场所。然而,卡布里安毒蛇号,一个人的独立太空船,出去对付邪恶的赛昂人和其他太空中的危险。他们也从不只派一两艘毒蛇号出去。他们派了很多。许多冗余的飞船具有基本相同的能力和目的,但由于它们非常灵活和数量众多,它们总是能够处理每周威胁战星的任何问题。 - -如果你认为你正在感知一个发展中的类比,那么你是对的。 现代“云”又大又笨重,是分布在很远距离的大量基础设施的融合。它具有强大的功能,但如果你将其视为普通计算机,你将浪费它的大部分功能。当你想要处理来自数百万输入源的大量数据时,捆绑你的解决方案(无论是采用应用、网站、数据库、服务器还是其他形式)并发送该解决方案的微小镜像来处理数据集群,实际上是更有效的。当然,这些将是*容器*,它们是云的劳动力。它们是你发送来处理服务请求的小型解决方案工厂,并且由于你可以根据任何给定时间传入的请求生成任意数量的解决方案,因此理论上它们是取之不尽的。 - -### 家中的容器 - -如果你没有大量的传入请求需要处理,你可能会想知道容器给你带来什么好处。不过,在个人电脑上使用容器确实有其用途。 - -#### 容器作为虚拟环境 - -通过 Podman、LXC 和 Docker 等工具,你可以像以往运行虚拟机一样运行容器。不过,与虚拟机不同,容器不需要模拟固件和硬件的开销。 - -你可以从公共仓库下载容器镜像,启动一个最小化的 Linux 环境,并将其作为命令或开发的测试场所。例如,假设你想试试你在 Slackware Linux 上构建的一个应用。首先,在仓库中搜索一个合适的镜像: - -``` -$ podman search slackware -``` - -然后选择一个镜像,作为你的容器的基础: - -``` -$ podman run -it --name slackware vbatts/slackware -sh-4.3# grep -i ^NAME\= /etc/os-release -NAME=Slackware -``` - -### 工作中的容器 - -当然,容器不只是最小的虚拟机。他们可以为非常具体的需求提供高度具体的解决方案。如果你不熟悉容器,那么对任何新系统管理员最常见的通过仪式之一开始可能会有所帮助:在容器中启动你的第一个 Web 服务器。 - -首先,获得一个镜像。你可以使用 `podman search` 命令来搜索你喜欢的发行版,或者直接搜索你喜欢的 httpd 服务器。当使用容器时,我倾向于信任我在裸机上信任的相同发行版。 - -当你你找到一个镜像作为你的容器的基础,你就可以运行你的镜像。然而,正如这个术语所暗示的,容器是*被容器化的*,所以如果你只是启动一个容器,你将无法访问标准的 HTTP 端口。你可以使用 `-p` 选项将一个容器端口映射到一个标准的网络端口: - -``` -$ podman run -it -p 8080:80 docker.io/fedora/apache:latest -``` - -现在看看你本地主机上的 8080 端口: - -``` -$ curl localhost:8080 -Apache -``` - -成功了。 - -### 了解更多 - -容器拥有比模仿虚拟机更多的潜力。你可以将它们分组在 pod 中,构建复杂应用的自动部署,启动冗余服务以满足高需求等等。如果你刚刚开始使用容器,你可以[下载我们最新的电子书][2]来学习该技术,甚至学习创建一个 pod,以便你可以运行 WordPress 和数据库。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/5/containers-pods-101-ebook - -作者:[Seth Kenlon][a] -选题:[lkxed][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/lkxed -[1]: https://opensource.com/sites/default/files/lead-images/tips_map_guide_ebook_help_troubleshooting_lightbulb_520.png -[2]: https://opensource.com/downloads/containers-pods-101-ebook diff --git a/translated/tech/20220505 Xebian – A Blend of Debian and Goodness of Xfce [Review].md b/translated/tech/20220505 Xebian – A Blend of Debian and Goodness of Xfce [Review].md deleted file mode 100644 index f699f3db4b..0000000000 --- a/translated/tech/20220505 Xebian – A Blend of Debian and Goodness of Xfce [Review].md +++ /dev/null @@ -1,95 +0,0 @@ -[#]: subject: "Xebian – A Blend of Debian and Goodness of Xfce [Review]" -[#]: via: "https://www.debugpoint.com/2022/05/xebian-review-2022/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Xebian – Debian 与 Xfce 的完美结合(评论) -====== -这是对漂亮而时尚的 Xebian Linux 发行版的快速回顾。 - -Xebian 是一个基于 Xfce 桌面环境的 Linux 发行版,基于 Debian Unstable (sid) 分支。这个 Linux 发行版带来了一个带有 Debian 的基本 Xfce 桌面,无需更改配置和附加软件包。因此,你无需担心安装 Debian 和 Xfce 就可以获得开箱即用的普通体验。 - -话虽如此,如果你想尝试一下,这里是 Xebian 的快速回顾。 - -### Xebian 评论 - -#### 安装 - -考虑到各种可用的 ISO(迷你、自由、非自由等等),Debian 安装可能会很棘手。毕竟,它是一个真正的“通用操作系统”。但是对于 Xebian,它毫不费力,因为它只有一个 64 位 ISO 文件,它为你提供 Debian sid 和 Xfce。 Xebian 使用 Debian 的本机安装程序,在你的物理系统或虚拟机中安装此发行版相当简单。 - -在我的测试过程中,安装很顺利,没有报告任何问题。安装大约需要 4 分钟。 - -#### 外观和感觉 - -安装后,当你首次启动系统时,你会看到带有 Xebian 默认壁纸的漂亮登录页面。登录屏幕是标准的默认 Xfce 桌面登录页面。 - -![Xebian Logn Screen][1] - -首先,桌面非常轻量,并且带有 Xfce 的干净外观。 Xebian 提供了带有 Debian 的 Xfce 的完整版本。因此,唯一的区别是看起来不错的默认壁纸和默认的 Numix 主题(深色)。 Adwaita 和 Gerybird 主题也适用于那些喜欢更传统外观的人。 - -其次,顶部面板右侧有 Whisker 菜单和标准系统托盘,带有音量控制、电池指示、网络/Wi-Fi 和日期/时间。 - -#### 应用 - -Xebian 打包了所有 Xfce 原生应用,并且不添加任何额外内容。安装它时,你应该已经拥有一个稳定的工作桌面,并预装了以下应用程序。 - -* Thunar 文件管理器 -* Ristretto 图像查看器 -* Mousepad 文本编辑器 -* Catfish 文件搜索 -* XFCE 终端 -* Firefox -* Synaptic 包管理器 -* GParted 用于分区 -* 系统设置 - -除此之外,如果你需要任何其他应用,你可以使用 Synaptic 包管理器轻松安装它们。使用内置的 “Software and Sources” 应用可以轻松调整软件源。 - -[Xfce 4.16][2] 是目前与原生应用一起稳定的官方版本。它的核心是基于 Debian Unstable “sid”,在撰写本文时它具有 Debian 12 “bookworm” 发布路径。它基于最新的 [Linux Kernel 5.17][3] 滚动发布。 Xfce 4.18 距离最终版本还很遥远。 - -此外,如果你需要一个平常的图像编辑器、图形软件和 Office 套件(例如 LibreOffice),那么你需要手动安装它们。它们不是 ISO 文件的一部分。 - -现在,让我们来看看性能。 - -#### Xebian 的性能 - -Xebian 是轻量级的,非常适合旧硬件,这要归功于 Debian。我分两个阶段测试了性能。我让系统闲置一段时间的理想阶段消耗大约 710 MB 内存,而 CPU 平均为 2%。大多数空闲状态资源被 Xfce4-desktop 和 Xfce 窗口管理器消耗。 - -其次,我在重度使用阶段对其进行了测试。在这个工作负载中,我使用文件管理器、文本编辑器、终端和 Firefox 浏览器的一个实例尝试了 Xebian。 - -在此工作负载下,Xebian 平均消耗 1.2GB 内存和 2% 到 3% 的 CPU,具体取决于各自的应用活动。 - -而且,Firefox 明显消耗了大部分内存和 CPU,其次是 Xfce 窗口管理器的内存消耗增加了近 50%。 - -总的来说,我认为它是稳定的,应该可以在至少 4 GB 内存的中档硬件中正常工作。 - -### 结束语 - -基于 Debian Unstable 分支的 [Linux 发行版][4]很少。如果你正在寻找 Xfce 和 Debian sid 的特定组合,那么 Xebian 是完美的,因为你从 Debian 获得了一个超级可靠的滚动版本并内置了 Xfce。 - -虽然它说“不稳定”,但根据我的经验,如果你每周保持系统更新,Debian “unstable” 会很好地工作。 - -最后,如果你想尝试此发行版,请访问官方网站并[下载 ISO 文件][5]。 - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/2022/05/xebian-review-2022/ - -作者:[Arindam][a] -选题:[lkxed][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/lkxed -[1]: https://www.debugpoint.com/wp-content/uploads/2022/05/Xebian-Logn-Screen-1024x578.jpg -[2]: https://www.debugpoint.com/2021/02/xfce-4-16-review/ -[3]: https://www.debugpoint.com/2022/03/linux-kernel-5-17/ -[4]: https://www.debugpoint.com/category/distributions -[5]: https://xebian.org/download/ diff --git a/translated/tech/20220530 Using a Machine Learning Model to Make Predictions.md b/translated/tech/20220530 Using a Machine Learning Model to Make Predictions.md new file mode 100644 index 0000000000..94a7feb229 --- /dev/null +++ b/translated/tech/20220530 Using a Machine Learning Model to Make Predictions.md @@ -0,0 +1,87 @@ +[#]: subject: "Using a Machine Learning Model to Make Predictions" +[#]: via: "https://www.opensourceforu.com/2022/05/using-a-machine-learning-model-to-make-predictions/" +[#]: author: "Jishnu Saurav Mittapalli https://www.opensourceforu.com/author/jishnu-saurav-mittapalli/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +使用机器学习模型进行预测 +====== +机器学习基本上是人工智能的一个子集,它使用以前存在的数据对新数据进行预测。当然,现在我们所有人都知道这个道理了!这篇文章展示了如何将 Python 中开发的机器学习模型作为 Java 代码的一部分来进行预测。 + +![Machine-learning][1] + +本文假设你熟悉基本的开发技巧并理解机器学习。我们将从训练我们的模型开始,然后在 Python 中制作一个机器学习模型。 + +我以一个洪水预测模型为例。首先,导入以下库: + +``` +import pandas as pd +import numpy as np +import matplotlib.pyplot as plt +``` + +当我们成功地导入了这些库,我们就需要输入数据集,如下面的代码所示。为了预测洪水,我使用的是河流水位数据集。 + +``` +from google.colab import files +uploaded = files.upload() +for fn in uploaded.keys(): print(‘User uploaded file “{name}” with length {length} bytes’.format( +name=fn, length=len(uploaded[fn]))) +Choose files No file chosen +``` + +只有在当前浏览器会话中执行了该单元格时,上传部件才可用。请重新运行此单元,上传文件 *“Hoppers Crossing-Hourly-River-Level.csv”*,大小 2207036 字节。 + +完成后,我们就可以使用 *sklearn 库*来训练我们的模型。为此,我们首先需要导入该库和算法模型,如图 1 所示。 + +![Figure 1: Training the model][2] + +``` +from sklearn.linear_model import LinearRegression +regressor = LinearRegression() +regressor.fit(X_train, y_train) +``` + +完成后,我们就训练好了我们的模型,现在可以进行预测了,如图 2 所示。 + +![Figure 2: Making predictions][3] + +### 在 Java 中使用 ML 模型 + +我们现在需要做的是把 ML 模型转换成一个可以被 Java 程序使用的模型。有一个叫做 sklearn2pmml 的库可以帮助我们做到这一点: + +``` +# Install the library +pip install sklearn2pmml +``` + +库安装完毕后,我们就可以转换我们已经训练好的模型,如下图所示: + +``` +sklearn2pmml(pipeline, ‘model.pmml’, with_repr = True) +``` + +这就完成了!我们现在可以在我们的 Java 代码中使用生成的 `model.pmml` 文件来进行预测。请试一试吧! + +(LCTT 译注:Java 中有第三方库 [jpmml/jpmml-evaluator][4],它能帮助你使用生成的 `model.pmml` 进行预测。) + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/using-a-machine-learning-model-to-make-predictions/ + +作者:[Jishnu Saurav Mittapalli][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/jishnu-saurav-mittapalli/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Machine-learning.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Figure-1Training-the-model.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Figure-2-Making-predictions.jpg +[4]: https://github.com/jpmml/jpmml-evaluator