From 095014aae603d01086f31e0159b8b3c62e32045a Mon Sep 17 00:00:00 2001 From: onionstalgia <35531128+onionstalgia@users.noreply.github.com> Date: Tue, 25 Jul 2023 14:58:34 +0800 Subject: [PATCH 01/72] translating --- sources/tech/20230711.1 ⭐️⭐️ Using cp Command in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230711.1 ⭐️⭐️ Using cp Command in Linux.md b/sources/tech/20230711.1 ⭐️⭐️ Using cp Command in Linux.md index a5d492ba67..55093c06e3 100644 --- a/sources/tech/20230711.1 ⭐️⭐️ Using cp Command in Linux.md +++ b/sources/tech/20230711.1 ⭐️⭐️ Using cp Command in Linux.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/cp-command/" [#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "onionstalgia" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 3582f71b01d5fdd5d1d89e792aeca8ff79b36b4d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 26 Jul 2023 06:27:11 +0800 Subject: [PATCH 02/72] RP @jrglinux https://linux.cn/article-16033-1.html --- ...ormation to determine the active function calls.md | 57 +++++++++++-------- 1 file changed, 32 insertions(+), 25 deletions(-) rename {translated/tech => published}/20230310.1 ⭐️⭐️ How the GDB debugger and other tools use call frame information to determine the active function calls.md (54%) diff --git a/translated/tech/20230310.1 ⭐️⭐️ How the GDB debugger and other tools use call frame information to determine the active function calls.md b/published/20230310.1 ⭐️⭐️ How the GDB debugger and other tools use call frame information to determine the active function calls.md similarity index 54% rename from translated/tech/20230310.1 ⭐️⭐️ How the GDB debugger and other tools use call frame information to determine the active function calls.md rename to published/20230310.1 ⭐️⭐️ How the GDB debugger and other tools use call frame information to determine the active function calls.md index 6fa5ef5460..087da3b4f2 100644 --- a/translated/tech/20230310.1 ⭐️⭐️ How the GDB debugger and other tools use call frame information to determine the active function calls.md +++ b/published/20230310.1 ⭐️⭐️ How the GDB debugger and other tools use call frame information to determine the active function calls.md @@ -3,22 +3,26 @@ [#]: author: "Will Cohen https://opensource.com/users/wcohen" [#]: collector: "lkxed" [#]: translator: "jrglinux" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-16033-1.html" -GDB以及其他调试器如何通过调用帧信息来确定函数调用关系 +GDB 调试器如何通过调用帧信息来确定函数调用关系 ====== -在我的[上一篇文章][1]中,我展示了如何使用 debuginfo 在当前指令指针 (IP) 和包含它的函数或行之间进行映射。 该信息对于显示 CPU 当前正在执行的代码很有帮助。 不过,如果能显示更多的有关当前函数调用栈及其正在执行语句的上下文对我们定位问题来说也是十分有助的。 +![][0] -例如,将空指针作为参数传递到函数中而导致非法内存访问的问题, 只需查看当前执行函数行即可发现该错误是由尝试通过空指针进行访问而触发的。 但是,若真正知道导致空指针访问的函数调用的完整上下文,便确定该空指针最初是如何传递到该函数中的。 此上下文信息由回溯提供,并允许您确定哪些函数可能对空指针参数负责。 +> 从调试器中获取函数调用关系。 + +在我的 [上一篇文章][1] 中,我展示了如何使用 `debuginfo` 在当前指令指针(IP)和包含它的函数或行之间进行映射。该信息对于显示 CPU 当前正在执行的代码很有帮助。不过,如果能显示更多的有关当前函数调用栈及其正在执行语句的上下文对我们定位问题来说也是十分有助的。 + +例如,将空指针作为参数传递到函数中而导致非法内存访问的问题,只需查看当前执行函数行,即可发现该错误是由尝试通过空指针进行访问而触发的。但是,你真正想知道的是导致空指针访问的函数调用的完整上下文,以便确定该空指针最初是如何传递到该函数中的。此上下文信息由回溯提供,可以让你确定哪些函数可能对空指针参数负责。 有一点是肯定的:确定当前活动的函数调用栈不是一项简单的操作。 ### 函数激活记录 -现代编程语言具有局部变量,并允许函数可以调用自身的递归。 此外,并发程序具有多个线程,这些线程可能同时运行相同的函数。 在这些情况下,局部变量不能存储在全局位置。 对于函数的每次调用,局部变量的位置必须是唯一的。 它的工作原理如下: +现代编程语言具有局部变量,并允许函数可以调用自身的递归。此外,并发程序具有多个线程,这些线程可能同时运行相同的函数。在这些情况下,局部变量不能存储在全局位置。对于函数的每次调用,局部变量的位置必须是唯一的。它的工作原理如下: - 每次调用函数时,编译器都会生成函数激活记录,以将局部变量存储在唯一位置。 - 为了提高效率,处理器堆栈用于存储函数激活记录。 @@ -26,29 +30,29 @@ GDB以及其他调试器如何通过调用帧信息来确定函数调用关系 - 如果该函数调用另一个函数,则新的函数激活记录将放置在现有函数激活记录之上。 - 每次函数返回时,其函数激活记录都会从堆栈中删除。 -函数激活记录的创建是由函数中称为序言的代码创建的。 函数激活记录的删除由函数尾声处理。 函数体可以利用堆栈上为其预留的内存来存储临时值和局部变量。 +函数激活记录的创建是由函数中称为“序言prologue”的代码创建的。函数激活记录的删除由函数“尾声epilogue”处理。函数体可以利用堆栈上为其预留的内存来存储临时值和局部变量。 -函数激活记录的大小可以是可变的。 对于某些函数,不需要空间来存储局部变量。 理想情况下,函数激活记录只需要存储调用_this_函数的函数的返回地址。 对于其他函数,除了返回地址之外,可能还需要大量空间来存储函数的本地数据结构。 帧大小的可变导致编译器使用帧指针来跟踪函数激活帧的开始。函数序言代码具有在为当前函数创建新帧指针之前存储旧帧指针的额外任务,并且函数尾声必须恢复旧帧指针值。 +函数激活记录的大小可以是可变的。对于某些函数,不需要空间来存储局部变量。理想情况下,函数激活记录只需要存储调用 _该_ 函数的函数的返回地址。对于其他函数,除了返回地址之外,可能还需要大量空间来存储函数的本地数据结构。帧大小的可变导致编译器使用帧指针来跟踪函数激活帧的开始。函数序言代码具有在为当前函数创建新帧指针之前存储旧帧指针的额外任务,并且函数尾声必须恢复旧帧指针值。 -函数激活记录的布局方式、调用函数的返回地址和旧帧指针是相对于当前帧指针的恒定偏移量。 通过旧的帧指针,可以定位堆栈上下一个函数的激活帧。 重复此过程,直到检查完所有功能激活记录为止。 +函数激活记录的布局方式、调用函数的返回地址和旧帧指针是相对于当前帧指针的恒定偏移量。通过旧的帧指针,可以定位堆栈上下一个函数的激活帧。重复此过程,直到检查完所有函数激活记录为止。 ### 优化复杂性 -在代码中使用显式帧指针有几个缺点。 在某些处理器上,可用的寄存器相对较少。 具有显式帧指针会导致使用更多内存操作。 生成的代码速度较慢,因为帧指针必须位于寄存器中。 具有显式帧指针可能会限制编译器可以生成的代码,因为编译器可能不会将函数序言和结尾代码与函数体混合。 +在代码中使用显式帧指针有几个缺点。在某些处理器上,可用的寄存器相对较少。具有显式帧指针会导致使用更多内存操作。生成的代码速度较慢,因为帧指针必须位于寄存器中。具有显式帧指针可能会限制编译器可以生成的代码,因为编译器可能不会将函数序言和尾声代码与函数体混合。 -编译器的目标是尽可能生成快速代码,因此编译器通常会从生成的代码中省略帧指针。 正如 [Phoronix 的基准测试][2] 所示,保留帧指针会显着降低性能。 不过省略帧指针也有缺点,查找前一个调用函数的激活帧和返回地址不再是相对于帧指针的简单偏移。 +编译器的目标是尽可能生成快速代码,因此编译器通常会从生成的代码中省略帧指针。正如 [Phoronix 的基准测试][2] 所示,保留帧指针会显着降低性能。不过省略帧指针也有缺点,查找前一个调用函数的激活帧和返回地址不再是相对于帧指针的简单偏移。 ### 调用帧信息 -为了帮助生成函数回溯,编译器包含 DWARF 调用帧信息 (CFI) 来重建帧指针并查找返回地址。 此补充信息存储在执行的 `.eh_frame` 部分中。 与传统的函数和行位置信息的 debuginfo 不同,即使生成的可执行文件没有调试信息,或者调试信息已从文件中删除,`.eh_frame` 部分也位于可执行文件中。 调用帧信息对于 C++ 中的 **throw-catch** 等语言结构的操作至关重要。 +为了帮助生成函数回溯,编译器包含 DWARF 调用帧信息(CFI)来重建帧指针并查找返回地址。此补充信息存储在执行的 `.eh_frame` 部分中。与传统的函数和行位置信息的 `debuginfo` 不同,即使生成的可执行文件没有调试信息,或者调试信息已从文件中删除,`.eh_frame` 部分也位于可执行文件中。 调用帧信息对于 C++ 中的 `throw-catch` 等语言结构的操作至关重要。 -CFI 的每个功能都有一个帧描述条目 (FDE)。 作为其步骤之一,回溯生成过程为当前正在检查的激活帧找到适当的 FDE。 将 FDE 视为一张表,每一行代表一个或多个指令,并具有以下列: +CFI 的每个功能都有一个帧描述条目(FDE)。作为其步骤之一,回溯生成过程为当前正在检查的激活帧找到适当的 FDE。将 FDE 视为一张表,每一行代表一个或多个指令,并具有以下列: - 规范帧地址(CFA),帧指针指向的位置 - 返回地址 - 有关其他寄存器的信息 -FDE 的编码旨在最大限度地减少所需的空间量。 FDE 描述了行之间的变化,而不是完全指定每一行。 为了进一步压缩数据,多个 FDE 共有的起始信息被分解出来并放置在通用信息条目 (CIE) 中。 这使得 FDE 更加紧凑,但也需要更多的工作来计算实际的 CFA 并找到返回地址位置。 该工具必须从未初始化状态启动。 它逐步遍历 CIE 中的条目以获取函数条目的初始状态,然后从 FDE 的第一个条目开始继续处理 FDE,并处理操作,直到到达覆盖当前正在分析的指令指针的行。 +FDE 的编码旨在最大限度地减少所需的空间量。FDE 描述了行之间的变化,而不是完全指定每一行。为了进一步压缩数据,多个 FDE 共有的起始信息被分解出来并放置在通用信息条目(CIE)中。 这使得 FDE 更加紧凑,但也需要更多的工作来计算实际的 CFA 并找到返回地址位置。该工具必须从未初始化状态启动。它逐步遍历 CIE 中的条目以获取函数条目的初始状态,然后从 FDE 的第一个条目开始继续处理 FDE,并处理操作,直到到达覆盖当前正在分析的指令指针的行。 ### 调用帧信息使用实例 @@ -81,7 +85,7 @@ int main (int argc, char *argv[]) $ gcc -O2 -g -o f2c f2c.c ``` - `.eh_frame` 部分展示如下: +`.eh_frame` 部分展示如下: ``` $ eu-readelf -S f2c |grep eh_frame @@ -124,11 +128,11 @@ $ objdump -d f2c > f2c.dis DW_CFA_nop ``` -本示例中,不必担心增强或增强数据条目。 由于 x86_64 处理器具有 1 到 15 字节大小的可变长度指令,因此 "代码对齐因子" 设置为 1。在只有 32 位(4 字节指令)的处理器上,"代码对齐因子" 设置为 4,并且允许对一行状态信息适用的字节数进行更紧凑的编码。 类似地,还有 "数据对齐因子" 来使 CFA 所在位置的调整更加紧凑。 在 x86_64 上,堆栈槽的大小为 8 个字节。 +本示例中,不必担心增强或增强数据条目。由于 x86_64 处理器具有 1 到 15 字节大小的可变长度指令,因此 “代码对齐因子” 设置为 1。在只有 32 位(4 字节指令)的处理器上,“代码对齐因子” 设置为 4,并且允许对一行状态信息适用的字节数进行更紧凑的编码。类似地,还有 “数据对齐因子” 来使 CFA 所在位置的调整更加紧凑。在 x86_64 上,堆栈槽的大小为 8 个字节。 -虚拟表中保存返回地址的列是 16。这在 CIE 尾部的指令中使用。 有四个 `DW_CFA` 指令。 第一条指令 `DW_CFA_def_cfa` 描述了如果代码具有帧指针,如何计算帧指针将指向的规范帧地址(CFA)。 在这种情况下,CFA 是根据 `r7 (rsp)` 和 `CFA=rsp+8` 计算的。 +虚拟表中保存返回地址的列是 16。这在 CIE 尾部的指令中使用。 有四个 `DW_CFA` 指令。第一条指令 `DW_CFA_def_cfa` 描述了如果代码具有帧指针,如何计算帧指针将指向的规范帧地址(CFA)。 在这种情况下,CFA 是根据 `r7 (rsp)` 和 `CFA=rsp+8` 计算的。 -第二条指令 `DW_CFA_offset` 定义从哪里获取返回地址 `CFA-8` 。 在这种情况下,返回地址当前由堆栈指针 `(rsp+8)-8` 指向。 CFA 从堆栈返回地址的正上方开始。 +第二条指令 `DW_CFA_offset` 定义从哪里获取返回地址 `CFA-8` 。在这种情况下,返回地址当前由堆栈指针 `(rsp+8)-8` 指向。CFA 从堆栈返回地址的正上方开始。 CIE 末尾的 `DW_CFA_nop` 进行填充以保持 DWARF 信息的对齐。 FDE 还可以在末尾添加填充以进行对齐。 @@ -143,7 +147,7 @@ CIE 末尾的 `DW_CFA_nop` 进行填充以保持 DWARF 信息的对齐。 FDE DW_CFA_nop ``` -在执行函数中的第一条指令之前,CIE 描述调用帧状态。 然而,当处理器执行函数中的指令时,细节将会改变。 首先,指令 `DW_CFA_advance_loc` 和 `DW_CFA_def_cfa_offset` 与 `main` 中 `401060` 处的第一条指令匹配。 这会将堆栈指针向下调整 `0x18`(24 个字节)。 CFA 没有改变位置,但堆栈指针改变了,因此 CFA 在 `401064` 处的正确计算是 `rsp+32`。 这就是这段代码中序言指令的范围。 以下是 `main` 中的前几条指令: +在执行函数中的第一条指令之前,CIE 描述调用帧状态。然而,当处理器执行函数中的指令时,细节将会改变。 首先,指令 `DW_CFA_advance_loc` 和 `DW_CFA_def_cfa_offset` 与 `main` 中 `401060` 处的第一条指令匹配。 这会将堆栈指针向下调整 `0x18`(24 个字节)。 CFA 没有改变位置,但堆栈指针改变了,因此 CFA 在 `401064` 处的正确计算是 `rsp+32`。 这就是这段代码中序言指令的范围。 以下是 `main` 中的前几条指令: ``` 0000000000401060
: @@ -151,7 +155,7 @@ CIE 末尾的 `DW_CFA_nop` 进行填充以保持 DWARF 信息的对齐。 FDE 401064: bf 1b 20 40 00 mov $0x40201b,%edi ``` -`DW_CFA_advance_loc` 使当前行应用于函数中接下来的 50 个字节的代码,直到 `401096`。 CFA 位于 `rsp+32`,直到 `401092` 处的堆栈调整指令完成执行。 `DW_CFA_def_cfa_offset` 将 CFA 的计算更新为与函数入口相同。 这是预期之中的,因为 `401096` 处的下一条指令是返回指令 `ret`,并将返回值从堆栈中弹出。 +`DW_CFA_advance_loc` 使当前行应用于函数中接下来的 50 个字节的代码,直到 `401096`。CFA 位于 `rsp+32`,直到 `401092` 处的堆栈调整指令完成执行。`DW_CFA_def_cfa_offset` 将 CFA 的计算更新为与函数入口相同。这是预期之中的,因为 `401096` 处的下一条指令是返回指令 `ret`,并将返回值从堆栈中弹出。 ``` 401090: 31 c0 xor %eax,%eax @@ -196,11 +200,11 @@ CIE 末尾的 `DW_CFA_nop` 进行填充以保持 DWARF 信息的对齐。 FDE 在 `f2c` 的 FDE 中,函数开头有一个带有 `DW_CFA_advance_loc` 的单字节指令。在高级操作之后,还有两个附加操作。`DW_CFA_def_cfa_offset` 将 CFA 更改为 `%rsp+16`,`DW_CFA_offset` 表示 `%rbx` 中的初始值现在位于 `CFA-16`(堆栈顶部)。 -查看这个 `fc2` 反汇编代码,可以看到 `push` 用于将 `%rbx` 保存到堆栈中。 在代码生成中省略帧指针的优点之一是可以使用 `push` 和 `pop` 等紧凑指令在堆栈中存储和检索值。 在这种情况下,保存 `%rbx` 是因为 `%rbx` 用于向 `printf` 函数传递参数(实际上转换为 `puts` 调用),但需要保存传递到函数中的 `f` 初始值以供后面的计算使用。 `4011ae` 的 `DW_CFA_advance_loc` 29字节显示了 `pop %rbx` 之后的下一个状态变化,它恢复了 `%rbx` 的原始值。 `DW_CFA_def_cfa_offset` 指出 pop 将 CFA 更改为 `%rsp+8`。 +查看这个 `fc2` 反汇编代码,可以看到 `push` 用于将 `%rbx` 保存到堆栈中。 在代码生成中省略帧指针的优点之一是可以使用 `push` 和 `pop` 等紧凑指令在堆栈中存储和检索值。 在这种情况下,保存 `%rbx` 是因为 `%rbx` 用于向 `printf` 函数传递参数(实际上转换为 `puts` 调用),但需要保存传递到函数中的 `f` 初始值以供后面的计算使用。`4011ae` 的 `DW_CFA_advance_loc` 29字节显示了 `pop %rbx` 之后的下一个状态变化,它恢复了 `%rbx` 的原始值。 `DW_CFA_def_cfa_offset` 指出 pop 将 CFA 更改为 `%rsp+8`。 -### GDB使用调用帧信息 +### GDB 使用调用帧信息 -有了 CFI 信息,[GNU 调试器 (GDB)][3] 和其他工具就可以生成准确的回溯。 如果没有 CFI 信息,GDB 将很难找到返回地址。 如果在 `f2c.c` 的第 7 行设置断点,可以看到 GDB 使用此信息。 GDB在 `f2c` 函数中的 `pop %rbx` 完成且返回值不在栈顶之前放置了断点。 +有了 CFI 信息,[GNU 调试器(GDB)][3] 和其他工具就可以生成准确的回溯。如果没有 CFI 信息,GDB 将很难找到返回地址。如果在 `f2c.c` 的第 7 行设置断点,可以看到 GDB 使用此信息。GDB在 `f2c` 函数中的 `pop %rbx` 完成且返回值不在栈顶之前放置了断点。 GDB 能够展开堆栈,并且作为额外收获还能够获取当前保存在堆栈上的参数 `f`: @@ -228,6 +232,8 @@ Breakpoint 1, f2c (f=98) at f2c.c:8 DWARF 调用帧信息为编译器提供了一种灵活的方式来包含用于准确展开堆栈的信息。这使得可以确定当前活动的函数调用。我在本文中提供了简要介绍,但有关 DWARF 如何实现此机制的更多详细信息,请参阅 [DWARF 规范][4]。 +*(题图:MJ/4004d7c7-8407-40bd-8aa8-92404601dba0)* + -------------------------------------------------------------------------------- via: https://opensource.com/article/23/3/gdb-debugger-call-frame-active-function-calls @@ -235,7 +241,7 @@ via: https://opensource.com/article/23/3/gdb-debugger-call-frame-active-function 作者:[Will Cohen][a] 选题:[lkxed][b] 译者:[jrglinux](https://github.com/jrglinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -245,3 +251,4 @@ via: https://opensource.com/article/23/3/gdb-debugger-call-frame-active-function [2]: https://www.phoronix.com/review/fedora-frame-pointer [3]: https://opensource.com/article/21/3/debug-code-gdb [4]: https://dwarfstd.org/Download.php +[0]: https://img.linux.net.cn/data/attachment/album/202307/26/062542j0picgf1fs6nd8qn.jpg \ No newline at end of file From 360032d82e2f6faa6bbe586f902a602e689183cd Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 26 Jul 2023 06:35:39 +0800 Subject: [PATCH 03/72] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=BF=87=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ....2 Release Improves The Visual Redesign Further.md | 255 ------------------ ... Open-Source App to Stabilize Video Footage.md | 93 ------- ...nux Distributions for your Old Hardware in 2023.md | 198 -------------- 3 files changed, 546 deletions(-) delete mode 100644 sources/news/20230717.2 ⭐️⭐️ Linux Mint 21.2 Release Improves The Visual Redesign Further.md delete mode 100644 sources/news/20230721.0 ⭐️ Gyroflow An Open-Source App to Stabilize Video Footage.md delete mode 100644 sources/tech/20230721.3 ⭐️⭐️ 10 Lightweight Linux Distributions for your Old Hardware in 2023.md diff --git a/sources/news/20230717.2 ⭐️⭐️ Linux Mint 21.2 Release Improves The Visual Redesign Further.md b/sources/news/20230717.2 ⭐️⭐️ Linux Mint 21.2 Release Improves The Visual Redesign Further.md deleted file mode 100644 index a8af07249a..0000000000 --- a/sources/news/20230717.2 ⭐️⭐️ Linux Mint 21.2 Release Improves The Visual Redesign Further.md +++ /dev/null @@ -1,255 +0,0 @@ -[#]: subject: "Linux Mint 21.2 Release Improves The Visual Redesign Further" -[#]: via: "https://news.itsfoss.com/linux-mint-21-2/" -[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Linux Mint 21.2 Release Improves The Visual Redesign Further -====== - -Linux Mint 21.2 is an impressive upgrade! - -![linux mint 21.2][1] - -Linux Mint 21.1 was packed with visual overhauls to the theme, folder icons, and the overall look and feel of the system. - -Now, Linux Mint 21.2 has enhancements on top of the same Ubuntu 22.04 base and [Linux Kernel 5.15][2]. - -### Linux Mint 21.2: What's New? 😀 - -![linux mint 21.2 homescreen][3] - -With Linux Mint 21.2, some of those changes have been refined along with new GUI overhauls and additions across the board. - -Let me mention the key highlights of the release: - -- **Cinnamon 5.8, Xfce 4.18, and others** -- **GUI overhaul for the Software Manager** -- **Folder icons and color selection** -- **New****"Styles" to easily tweak appearance** -- **Improved login screen** - -> 📋 Linux Mint 21.2 will receive updates until 2027. - -#### Desktop Environment Upgrades - -The star of the upgrade is **Cinnamon 5.8**, the flagship edition of Linux Mint. - -![linux mint 21.1 about][4] - -While it includes many improvements, some worth mentioning include gesture support for window management, workspace management, tiling, and media controls. You can find these working on touchpads, tablets, and touchscreens through a new "**Gestures**" option in the system settings. - -![linux mint gestures][5] - -The notifications and tooltips have also been improved to use the accent color set and look bigger/clearer. - -![linux mint 21.2 notification][6] - -In addition to the Cinnamon enhancements, you can find Xfce 4.18 with all the goodies. We have a dedicated article on [Xfce 4.18][7] changes if you want to explore more. - -And the other variant, with MATE 1.26 desktop, may not be as exciting as other editions, but you still get the fresh mint update. - -#### Software Manager Visual Overhaul - -The software manager for Linux Mint has always been simple. - -This time, the layout has been adjusted for easy access to options and to provide a cleaner user experience. Starting with the **search bar moved to the left side** of the window. - -![linux mint 21.2 software manager][8] - -The **categories on the main page have been shifted down**, and more information is available (for instance, the applications via Flathub). - -It is also **easier to select between the system package and Flatpak** for an app next to the installation option. The option existed nearby the details section previously. - -![][9] - -Here's a glimpse of what it looked like with Linux Mint 21.1: - -![][10] - -#### Folder Coloring Gets Better - -With Linux Mint 21.1, you can also change the accent color of the folder stripes, which looks like this: - -![linux mint 21.1 folders][11] - -Now, you are no longer limited to solid colors. You can choose from gradients and solid colors for folders and apply them entirely on the folder icon. - -![linux mint 21.2 folder colors][12] - -Not to forget, the stripes on the folder icons were dropped. So, it looks much cleaner, in my opinion. - -#### Styles to Tweak Theme - -With Cinnamon 5.8, a new setting, "**Styles**," was introduced to make it seamless for you to tweak the look and feel of the system. - -![linux mint styles][13] - -Not to forget, you get more color variants to choose from and an intuitive menu to choose the style. - -While this aims to simplify appearance tweaks, you can still head to "Advanced Settings" to access and configure icons and other themes separately. - -#### Improved Slick Greeter - -The login screen experience gets better with multiple keyboard layout support. - -![linux mint slick greeter][14] - -You can find more options from the keyboard icon on the login screen. The slick-greeter now supports Wayland sessions and should be better at touchpad detection. - -Not to forget, the keyboard navigation has been worked on to let you easily type/edit/view the password in the login area. - -#### ⭐ Other Important Changes - -Several other subtle changes make the Linux Mint experience "_mintier_". Some of those include: - -- Removing monochrome icons and dark theme icons to replace them with symbolic icons for uniform contrast -- Re-aligned title bar buttons -- Security hardening work for Warpinator -- Mint-Y-Legacy was renamed Mint-L -- Full support for HEIF and AVIF image files. -- Updated applications like Blueman and Pix - -Explore more technical details on its [official announcement blog post][15] - -### Download Linux Mint 21.2 📥 - -Linux Mint 21.2 ISOs can be found on its [official website][16]. - -[Linux Mint 21.2][17] - -### Upgrade to Linux Mint 21.2 from 21.1 ⏫ - -If you are already using Linux Mint 21.1, you can upgrade to 21.2 easily. - -First, [check your Linux Mint version][18] and ensure that it is 21.1. - -``` -lsb_release -a -``` - -Before starting the upgrade, you must ensure your system has installed all the available package updates. For this, run: - -``` -sudo apt update && sudo apt upgrade -y -``` - -![][19] - -> ✋🏻 Make sure, you have a proper [backup of your system][20], so that you can restore it in the rare case of any update failures. - -Once updates are completed, open the ****Update Manager**** application from the system menu. - -![][21] - -On the update manager, click on Edit menu. Here, you can find the “Upgrade to Mint 21.2” option on the dropdown menu. - -![Select Upgrade to Linux Mint 21.2 from the Edit option in Update Manager][22] - -This will open the update window and display you tabs like Introduction to update, release notes etc. - -![][23] - -![][24] - -![][25] - -You should take care of the “Requirements” tab, as this tab needs you to accept a Risk notification. This is the usual notification. Select the “I Understand” checkbox and press ****Apply.**** - -![Linux Mint notifies the user about the possible risk in the update process. Accept it by toggling th checkbox and click on Apply button][26] - -Also provide the password when asked. This will start the update process. Initially, package information will be downloaded. - -![Update Manager downloading the Package information][27] - -After that, it will start downloading the required packages. This might take several minutes, depending on your internet connection. - -![Update Manager downloading the required packages][28] - -Once the package downloading is finished, it will start installing those. - -![Update Manager installs the necessary packages][29] - -It may download several additional packages too. - -![Update Manager will download more packages to update as necessary][30] - -Next step is the installation and removal of various packages. - -![Update Manager installs and removes packages][31] - -Upgrade will be completed after this step, and the system will recommend you to reboot the system. - -![Update Manager notifies when the upgrade is completed. It also recommends a reboot for changes to take effect][32] - -### Re-enable any repositories - -Sometimes, during upgrade, some [external PPA's][33] will be disabled during the upgrade process. In that case, you need to re-enable them, after update. Open system settings and go to "Software Sources" section. - -![Open Software Sources from System Settings][34] - -From there, click enable any disabled sources. - -![Manage third party repositories as required][35] - -Now, after enabling the sources, immediately update your system using: - -``` -sudo apt update -``` - -That's it. You have successfully upgraded to the latest version of Linux Mint. - -Enjoy it :) - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/linux-mint-21-2/ - -作者:[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/content/images/size/w1304/2023/06/linux-mint-21-2-release.jpg -[2]: https://news.itsfoss.com/linux-kernel-5-15-release/ -[3]: https://news.itsfoss.com/content/images/2023/06/linux-mint-21-2-home.jpg -[4]: https://news.itsfoss.com/content/images/2023/06/linux-mint-system-info-21-2.jpg -[5]: https://news.itsfoss.com/content/images/2023/06/gestures.png -[6]: https://news.itsfoss.com/content/images/2023/06/shadow_notification.png -[7]: https://news.itsfoss.com/xfce-4-18-release/ -[8]: https://news.itsfoss.com/content/images/2023/06/software-manager-linux-mint-21-2.jpg -[9]: https://news.itsfoss.com/content/images/2023/06/software-manager-desc-linux-mint-21-2.jpg -[10]: https://news.itsfoss.com/content/images/2023/06/linux-mint-software-manager.jpg -[11]: https://news.itsfoss.com/content/images/2023/06/linux-mint-21-1-folder-color.jpg -[12]: https://news.itsfoss.com/content/images/2023/06/linux-mint-21-2-folder-color.jpg -[13]: https://news.itsfoss.com/content/images/2023/06/styles.png -[14]: https://news.itsfoss.com/content/images/2023/06/slick1.png -[15]: https://blog.linuxmint.com/?p=4543 -[16]: https://linuxmint.com/ -[17]: https://linuxmint.com/ -[18]: https://itsfoss.com/check-linux-mint-version/ -[19]: https://itsfoss.com/content/images/2023/07/01-apt-update-and-apt-upgrade.webp -[20]: https://itsfoss.com/backup-restore-linux-timeshift/ -[21]: https://itsfoss.com/content/images/2023/07/02-select-and-open-update-manager-final.png -[22]: https://itsfoss.com/content/images/2023/07/upgrade-to-mint-21-2.png -[23]: https://itsfoss.com/content/images/2023/07/04-Click-next-on-introduction.png -[24]: https://itsfoss.com/content/images/2023/07/05-click-next-on-release-notes.png -[25]: https://itsfoss.com/content/images/2023/07/06-click-next-on-new-features-page.png -[26]: https://itsfoss.com/content/images/2023/07/07-accept-the-risk-notification-and-apply-with-authentication.png -[27]: https://itsfoss.com/content/images/2023/07/08-downloading-apckage-information.webp -[28]: https://itsfoss.com/content/images/2023/07/09-downloading-packages.png -[29]: https://itsfoss.com/content/images/2023/07/10-installing-software.png -[30]: https://itsfoss.com/content/images/2023/07/11-some-more-package-downloads.png -[31]: https://itsfoss.com/content/images/2023/07/12-Installing-and-removing-packages.png -[32]: https://itsfoss.com/content/images/2023/07/13-update-finished-reboot.png -[33]: https://itsfoss.com/ppa-guide/ -[34]: https://itsfoss.com/content/images/2023/07/15-post-upgrade-open-system-settings-and-software-sources.png -[35]: https://itsfoss.com/content/images/2023/07/16-post-update-software-sources-ppa-firefox-esr4.png diff --git a/sources/news/20230721.0 ⭐️ Gyroflow An Open-Source App to Stabilize Video Footage.md b/sources/news/20230721.0 ⭐️ Gyroflow An Open-Source App to Stabilize Video Footage.md deleted file mode 100644 index 080c9dcfff..0000000000 --- a/sources/news/20230721.0 ⭐️ Gyroflow An Open-Source App to Stabilize Video Footage.md +++ /dev/null @@ -1,93 +0,0 @@ -[#]: subject: "Gyroflow: An Open-Source App to Stabilize Video Footage" -[#]: via: "https://news.itsfoss.com/gyroflow/" -[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Gyroflow: An Open-Source App to Stabilize Video Footage -====== - -A free and open-source app to smoothen your videos with stabilization? Sounds impressive! Let's check it out! - -![gyroflow][1] - -Have you ever recorded action cam footage that was too shaky to be used? 🤔 - -Well, then, we have just the right tool for you to stabilize those shaky shots! - -Enter, Gyroflow. It's an **open-source**, **cross-platform** app that can stabilize videos using motion data from a camera's onboard gyroscope or accelerometer. - -Let's take a look at it. - -### Gyroflow: Overview ⭐ - -![a screenshot of gyroflow][2] - -Written primarily using the **Rust programming language** and the **QML user interface markup language**, Gyroflow is a **post-processing video stabilization software** that uses the motion data logged on cameras to do its job. - -What makes Gyroflow different from other video editors with stabilization support is that it uses the logged motion data to do the following; It allows for **precise lens calibrations**, and **rolling shutter correction**, with the **ability to tweak the stabilization algorithms** for producing very stable video outputs. - -> 📋 Do keep in mind that not all cameras log motion data. - -The developers also add that there is a **minimal weight penalty**, and Gyfroflow **will work regardless of the lighting conditions** or how many moving subjects are there in a scene. - -Other than that, Gyroflow is equipped with a plethora of cool features; here are some that are worth noting: - -- **Real-time preview.** -- **A proper render queue.** -- **Support for Keyframes.** -- **16-bit video processing.** -- **Hardware accelerated video playback.** -- **Support for 10-bit videos; ProRes, DNxHR, 32-bit OpenEXR and Blackmagic RAW.** -- **Native support for gyro data from GoPro, Insta360, Sony, Runcam, Drone black-box, and more.** - -#### Initial Impressions - -![a screenshot of gyroflow exporting a video][3] - -I tried my hand on it with an attempt to stabilize a video, but for some reason, when exporting a video, it **wouldn't use my GPU** (Nvidia GTX 1070ti) and switched to the CPU for completing the render. The default was set to GPU encoding. - -![a screenshot of gyroflow after export of a video is complete][4] - -The output was more stable than the original video, and the file size could also be adjusted for a smaller storage footprint. - -Looking back, I did have the correct GPU drivers installed; your experience can vary with a different GPU. You can report it to them on their GitHub repo linked below if it doesn't work for you. - -I suggest you go through the [documentation][5] for Gyroflow to know more. - -Gyroflow has a pretty expansive set of features that make it easy to stabilize videos according to one's preference. That makes it a great contender for our list of open-source video editors (for a specific use case). - -### 📥 Download Gyroflow - -Gyroflow is available for **Linux**, **Windows**, and **macOS**. You can grab the package of your choice from the [official website][6]. - -[Gyroflow][7] - -If you are interested in the source code or want to build it yourself, you can head to its [GitHub repo][8]. - -_💬 What do you think? Is it an exciting and valuable open-source tool for you?_ - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/gyroflow/ - -作者:[Sourav Rudra][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/sourav/ -[b]: https://github.com/lkxed/ -[1]: https://news.itsfoss.com/content/images/size/w1304/2023/07/gyroflow.png -[2]: https://news.itsfoss.com/content/images/2023/07/Gyroflow_1.jpg -[3]: https://news.itsfoss.com/content/images/2023/07/Gyroflow_2.jpg -[4]: https://news.itsfoss.com/content/images/2023/07/Gyroflow_3.jpg -[5]: https://docs.gyroflow.xyz:443/ -[6]: https://gyroflow.xyz:443/download -[7]: https://gyroflow.xyz:443/download -[8]: https://github.com:443/gyroflow/gyroflow diff --git a/sources/tech/20230721.3 ⭐️⭐️ 10 Lightweight Linux Distributions for your Old Hardware in 2023.md b/sources/tech/20230721.3 ⭐️⭐️ 10 Lightweight Linux Distributions for your Old Hardware in 2023.md deleted file mode 100644 index b1ada1edd7..0000000000 --- a/sources/tech/20230721.3 ⭐️⭐️ 10 Lightweight Linux Distributions for your Old Hardware in 2023.md +++ /dev/null @@ -1,198 +0,0 @@ -[#]: subject: "10 Lightweight Linux Distributions for your Old Hardware in 2023" -[#]: via: "https://www.debugpoint.com/lightweight-linux-distributions-2022/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -10 Lightweight Linux Distributions for your Old Hardware in 2023 -====== - -**We highlight a list of 10 lightweight Linux Distributions ideal for your older PC in 2023. We give you their features and what makes them perfect for reviving older hardware.** - -We believe that you should not throw away any hardware, especially PC and its components. Ideally, well-designed software should always run on any hardware. There are many [Linux Distributions][1] specifically designed for older hardware and PCs. And you can quickly revive them with the help of these Linux operating systems. In this post, we highlight ten such Linux Distributions which are lightweight and old hardware friendly in 2023. - -### 10 Lightweight Linux Distributions 2023 - -#### 1. Linux Lite - -The first lightweight Linux Distribution we feature in this list for 2023 is Linux Lite. Linux Lite is a continually developed and improved Linux Distribution based on Ubuntu and Debian. This decade-old Linux Distribution is perfect for your older hardware which needs a friendly and well-designed distro. The team markets this distro as an ideal starting point for Windows users who ends up with not supported hardware with Windows. The primary advantages of this distro are well customized and nice-looking Xfce desktop with an Ubuntu base, the latest Kernel and, of course, a 32-bit ISO image. - -![Linux Lite - Lightweight Linux Distributions][2] - -Advantages of Linux Lite: - -- Ubuntu-based -- Customized Xfce desktop -- Native applications -- 32-bit support -- Active development -- Minimum system requirement < 1 GB RAM - -[Download Linux Lite][3] - -#### 2. Puppy Linux - -The second distro that we feature in this list is Puppy Linux. Puppy Linux is a little different than traditional distros out there. It is designed to run from RAM without needing to install it in a physical system. If appropriately configured, you can save the sessions, plus it continues to work well even if you remove the bootable medium. - -![Puppy Linux - one of the best lightweight Linux Distribution][4] - -This Linux distro is binary compatible with Ubuntu LTS versions; the latest version is based on Ubuntu 20.04 LTS. Since Ubuntu dropped the 32-bit support, the newest version dropped the 32-bit version. - -Puppy Linux use cases are perfect for older computers, Netbooks, and hardware with less than 1GB of RAM. At the core, it is run by superfast JWM (Jow’s Window Manager), Puppy Package Manager that supports .deb, .rpm and its native PET packages. - -Overall, it’s a perfect and well-designed Linux Distribution for older hardware, hands down. - -Features: - -- Based on the Ubuntu LTS Version -- It can run on low-end Netbooks -- Works directly from RAM even after removing the bootable media -- Unique package manager – Puppy Package Manager -- Powered by JWM - -#### 3. BunsenLabs Linux - -The third lightweight Linux distro in this list is BunsenLabs Linux, a successor of the Crunchbang project. The BunsenLabs Linux is based on the Debian Stable branch, bringing modern applications to your low-end system. This distro provides a 32-bit version image for low-end systems and a standard 64-bit system for your regular hardware. At the core, BunsenLabds is powered by a pre-configured OpenBox window manager with a stunning tint2 panel, pre-configured Conky and jgmenu. - -![BunsenLabs Linux -Lightweight Linux Distribution][5] - -This is a well-designed, superfast, stable and nice-looking distribution for older systems. - -Feature summary: - -- Based on Debian Stable branch -- Openbox window manager with tint2 panel, conky and jgmenu -- It provides a 32-bit installer -- Help and support are available via official forums - -[Download BunsenLabs Linux][6] - -#### 4. Lubuntu - -Lubuntu is famous for being a lightweight Linux Distribution. It is an official Ubuntu Linux flavour that features the lightweight LxQt desktop environment. Lubuntu gives you modern Ubuntu Linux packages and technology while it features the LxQt for your low-end hardware. Although it might require some extra system resources compared to other distros in this list, it is still a go-to Linux distro for older hardware. - -![Lubuntu - Lightweight Linux Distribution][7] - -If you need a moderately lighter Linux Distribution which is stable and works out of the box, then choose Lubuntu. - -[Download Lubuntu][8] - -#### 5. Absolute Linux - -The fifth lightweight Linux distribution is Absolute Linux, based on Slackware Linux. This distro packages all necessary day-to-day applications in its installer image so that you get a complete distro out of the box. Absolute Linux features the IceWM and ROX Desktop, which gives you ultimate speed while using it on your older hardware. It is systemd-free, which offers an extra advantage over other distributions. - -![Absolute Linux - Lightweight Linux Distributions][9] - -Feature Summary: - -- Based on Slackware -- Systemd-free -- Packages necessary software -- Powered by IceWM and package manager Slapt-get - -[Download Absolute Linux][10] - -#### 6. antiX Linux - -Yet another lightweight Linux distribution we want to highlight is antiX Linux. The antiX Linux is based on Debian stable branch and has several attractive features. At its core, it uses IceWM, Fluxbox, and ROX Desktop options, giving you an excellent and fast desktop experience. It is entirely systemd-free and uses sysVinit and runit system. The antiX Linux also gives you a 32-bit installer and has four variants – Full, Core, Base and net catering to different use cases. - -![antiX Linux - Lightweight Linux Distributions][11] - -Features: - -- Based on Debian stable -- It provides a 32-bit installer -- Systemd free -- Powered by IceWM and other window manager flavours - -[Download antiX Linux][12] - -#### 7. LXLE - -The LXLE Linux is a spin of the Lubuntu LTS series with an LXDE desktop instead of an LXQt desktop. The choice of applications, installer and other features makes it a perfect distro for older hardware. It is ideal for reviving your old system with a stable Ubuntu-LTS base and a fast LXDE desktop environment. - -![LXLE Linux - Lightweight Linux Distributions][13] - -However, in my personal opinion, I feel LXQt is a little faster than LXDE. Well, that feedback might be relative and can be different for you. There are not many Linux distributions today, which give you an LXDE flavour. Hence it is one of the unique and lightweight Linux distributions for your daily use. - -[Download LXLE][14] - -#### 8. Porteus Linux - -The Porteus Linux is a remix of Slackware Linux that features the old KDE 4.0+ desktop environment (before the KDE Plasma series). This superfast Linux distribution is perfect for your antique hardware because it is based on bleeding-edge Slackware and gives you a 32-bit version. This distro can run from Live USB or a CD, or any bootable media and comes with just 300 MB of installer size. - -If you love the old KDE (like me!) and Slackware simplicity, this is a perfect distro for you, even your new hardware. - -![Porteus Linux][15] - -[Download Porteus Linux][16] - -#### 9. Q4OS - -Q4OS is a unique Linux Distribution in this list. It targets the older Windows systems, which have become obsolete today. Many older PCs used to run Windows XP and Windows 7. They no longer work well with Windows and some modern Linux Distributions because the modern and updated OS requires much more computing power and resources. - -Q4OS targets those use cases and gives you a well-designed Linux Distribution with features such as a 32-bit installer, Windows installer, Trinity Desktop environments, pre-made Windows themes, etc. - -![Q4OS - KDE Plasma Edition][17] - -[Download Q4OS][18] - -#### 10. MX Linux - -The final Linux Distribution in this list is the famous MX Linux, which has made its features and uniqueness in recent times. However, I doubted whether I would list MX Linux as lightweight. Because in my opinion, it is a medium-weight Linux Distribution if you consider its KDE Plasma flavour. - -![MX Linux][19] - -However, it has some features which make it a perfect candidate for lightweight Linux distributions. MX Linux is based on the Debian Stable branch and created with antiX components. It features its own MX Linux native applications for your additional workflow. You get KDE Plasma, Xfce and Fluxbox as desktop options. - -[Download MX Linux][20] - -### Summary & Conclusion - -If you look closely, most of the lightweight Linux distribution we listed here is based on Debian Linux. It is truly the “Universal Operating System”. Modern Linux Desktop Environments like GNOME 40+, and KDE Plasma with Systemd init systems are no longer compatible with older hardware. Also, as technology progresses, more software complexity is introduced, requiring higher-end systems. - -That said, I hope you get some idea about which lightweight Linux distributions to choose for your old laptop or PC from this list. Each of them serves different tastes and needs with one goal: to revive your older systems. So, take your pick. - -Cheers. - -_This article,_ Top Ten Lightweight Linux Distributions, _is filed under the [Top Ten List][21]._ - -_Some image credit: Respective Linux Distributions_ - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/lightweight-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/category/distributions -[2]: https://www.debugpoint.com/wp-content/uploads/2022/03/Linux-Lite.jpg -[3]: http://www.linuxliteos.com/ -[4]: https://www.debugpoint.com/wp-content/uploads/2022/03/Puppy-Linux-one-of-the-best-lightweight-Linux-Distribution-in-2022.jpg -[5]: https://www.debugpoint.com/wp-content/uploads/2022/03/BunsenLabs-Linux.jpg -[6]: https://www.bunsenlabs.org/ -[7]: https://www.debugpoint.com/wp-content/uploads/2022/03/Lubuntu.jpg -[8]: https://lubuntu.me/ -[9]: https://www.debugpoint.com/wp-content/uploads/2022/03/Absolute-Linux.jpg -[10]: https://www.absolutelinux.org/ -[11]: https://www.debugpoint.com/wp-content/uploads/2022/03/antiX-Linux.jpg -[12]: https://antixlinux.com/ -[13]: https://www.debugpoint.com/wp-content/uploads/2022/03/LXLE-Linux.jpg -[14]: http://www.lxle.net/ -[15]: https://www.debugpoint.com/wp-content/uploads/2022/03/Porteus-Linux.jpg -[16]: http://www.porteus.org/ -[17]: https://www.debugpoint.com/wp-content/uploads/2022/03/Q4OS-KDE-Plasma-Edition.jpg -[18]: https://q4os.org/ -[19]: https://www.debugpoint.com/wp-content/uploads/2022/03/MX-Linux-1.jpg -[20]: https://mxlinux.org/ -[21]: https://www.debugpoint.com/tag/top-10-list \ No newline at end of file From b411719c5207a3503c45732bfc98eda933d90262 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 26 Jul 2023 07:02:31 +0800 Subject: [PATCH 04/72] ATRP @wxy https://linux.cn/article-16034-1.html --- ... Privacy Focused Linux Distributions [Compared].md | 189 ++++++++++++++++++ ... Privacy Focused Linux Distributions [Compared].md | 184 ----------------- 2 files changed, 189 insertions(+), 184 deletions(-) create mode 100644 published/20230721.5 ⭐️⭐️ Top 5 Privacy Focused Linux Distributions [Compared].md delete mode 100644 sources/tech/20230721.5 ⭐️⭐️ Top 5 Privacy Focused Linux Distributions [Compared].md diff --git a/published/20230721.5 ⭐️⭐️ Top 5 Privacy Focused Linux Distributions [Compared].md b/published/20230721.5 ⭐️⭐️ Top 5 Privacy Focused Linux Distributions [Compared].md new file mode 100644 index 0000000000..c30279f43a --- /dev/null +++ b/published/20230721.5 ⭐️⭐️ Top 5 Privacy Focused Linux Distributions [Compared].md @@ -0,0 +1,189 @@ +[#]: subject: "Top 5 Privacy Focused Linux Distributions [Compared]" +[#]: via: "https://www.debugpoint.com/privacy-linux-distributions-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "ChatGPT" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-16034-1.html" + +5 个专注于隐私保护的 Linux 发行版 +====== + +![][0] + +> 我们在这篇文章中列出了 2023 年排名前 5 的专注于隐私保护的 Linux 发行版,旨在提供给你在选择之前的参考。 + +随着疫情和远程办公的普及,网络隐私成为一个主要关注点。随着我们越深入数字世界,网络安全和隐私变得对每个人的日常生活都至关重要。几乎每天都会看到 [公共漏洞(CVE)][1],一个月中也会爆出几个 [零日漏洞][2] 和勒索软件攻击。 + +幸运的是,与 Windows 相比,Linux 通常在设计上就相对安全。此外,如果你在日常工作中使用 Linux 发行版时遵循一些最佳实践,大多数 Linux 发行版也是安全的。 + +此外,一些特定的 [Linux 发行版][3] 为你的工作和个人使用提供了额外的安全层和工具。例如,如果你想在互联网上实现完全匿名,或者你是网络安全专家,你可能会考虑一些区别于普及的主流 Linux 发行版,如 Ubuntu 或 Fedora 的其他发行版。 + +以下是提供更好隐私保护和安全性的 5 个 Linux 发行版的列表。 + +### 2023年度最佳隐私专用 Linux 发行版 + +#### 1、Tails + +匿名隐私系统The Amnesic Incognito Live System(简称 Tails)是一种基于 Debian 的 Linux 发行版,让你在浏览网页时完全匿名。它主要使用 Tor 网络,通过其网络重定向流量以隐藏你的位置和其他私密信息。此外,它还配备了处理电子邮件、浏览器和其他工具所需的所有必要安全应用程序。 + +如果你需要一种内置完全隐私功能的 Linux 发行版,请选择 Tails。 + +![Tails][4] + +优点: + +- 与 Tor 网络完美集成 +- 预配置了 NoScript、HTTPS anywhere 和其他相关插件的浏览器(Firefox) +- 内置比特币钱包、无线网络审计工具,并配备 Onion Circuits +- 立付介质Live medium + +更多详情: + +- 主页:[https://tails.boum.org/][5] +- 发行频率:每年 5 到 6 次发布 +- 发行类型:Debian(稳定版)、GNOME、LIVE 图像、仅支持 64 位、x86_64 +- 下载:[https://tails.boum.org/install/index.en.html][6] + +#### 2、Parrot OS + +Parrot OS(以前称为 Parrot Security OS)也是一种基于 Debian 的 Linux 发行版,主要面向网络安全专业人员和渗透测试人员,为他们提供了一种完整的 Linux 发行版,提供了他们所需的所有工具。 + +此外,你还可以将其用作日常使用,具有用于数字取证工作的内置沙盒选项。此外,它可以使用其容器化技术连接到其他设备。 + +![Parrot OS 隐私专用 Linux 发行版][7] + +优点: + +- 基于 Debian 的立付系统 +- 提供多种桌面风格选择 +- 运行的应用程序都被隔离在沙盒中 +- 非常适合数字取证工作 + +更多详情: + +- 主页:[https://parrotsec.org/][8] +- 发行频率:每年 2 到 3 次发布 +- 发行类型:Debian(测试版)、MATE 和 KDE Plasma、LIVE 图像、仅支持 64 位、x86_64 +- 下载:[https://parrotsec.org/download/][9] + +#### 3、Qubes OS + +Qubes OS 是一种基于 Fedora Linux 的独特 Linux 发行版。Qubes 提供多个“虚拟机”(被称为“Qubes”),用于托管应用程序。该方法有效地将“个人”、“工作”或其他用户定义的工作流程隔离开来。 + +此外,为了区分不同的“虚拟机”,该发行版为配置文件提供了色彩代码,以便你知道哪个正在运行哪个应用程序。 + +使用这种方法,如果你在一个“虚拟机”中遭受身份泄露或下载了恶意软件,系统的其他部分都是安全的。这种方法被称为“安全隔离”,非常适合需要在互联网上保护隐私的科技爱好者和普通用户。 + +![Qubes OS 隐私专用 Linux 发行版][10] + +优点: + +- 通过独立的“虚拟机”实现“安全隔离” +- 内置沙盒支持 +- 提供完全磁盘加密 +- 通过色彩代码标记的“Qubes”,方便进行工作流程导航 + +更多详情: + +- 主页:[http://qubes-os.org/][11] +- 发行频率:每年 2 到 3 次发布 +- 发行类型:Fedora、Xfce、桌面版、仅支持 64 位、x86_64 +- 下载:[https://www.qubes-os.org/downloads/][12] + +#### 4、Kali Linux + +Kali Linux 是基于 Debian 测试分支的最受欢迎的渗透测试 Linux 发行版。以印度教女神“卡利”命名,这个 Linux 发行版提供了适用于树莓派和其他设备的 32 位、64 位和 ARM 版本。此外,它搭载了大量的工具,使安全研究人员和网络安全专家能够在其他发行版上拥有优势。 + +![Kali Linux 隐私专用 Linux 发行版][13] + +优点: + +- Kali Linux 几乎成为安全研究人员的“行业标准”发行版 +- 提供完全磁盘加密 +- 支持 i686、x86 和 ARM +- LIVE 系统 +- 提供完善的文档,以及用于自定义 Kali Linux 进行特定研究的培训套件 +- Kali Linux 提供付费的渗透测试认证课程 + +更多详情: + +- 主页:[http://www.kali.org/][14] +- 发行频率:每年 3 到 4 次发布 +- 发行类型:Debian(测试版)、GNOME、KDE Plasma 等等、桌面版和 LIVE 等等、32 位和 64 位、x86_64、i686、ARM +- 下载:[http://www.kali.org/downloads/][15] + +#### 5、Whonix Linux + +Whonix 是另一种基于 Debian 的独特设计的 Linux 发行版。它作为虚拟机在 VirtualBox 中运行,从而提供了一个不能驻留在磁盘上、在多次重启后不会丢失的操作系统。 + +此外,其独特的设计提供了一个连接到 Tor 网络的网关组件,以及一个名为“工作站”的第二个组件,负责运行所有用户应用程序。这些用户应用程序连接到网关,为应用程序和用户提供完全匿名性。最后,这种独特的两阶段隔离方法在确保完全隐私的同时,减轻了多种风险。 + +![Whonix 隐私专用 Linux 发行版][16] + +优点: + +- 两阶段隔离,分离网络和用户应用程序 +- 支持 Tor 网络,提供 Tor 浏览器和即时通讯等应用程序 +- 预装了主要应用程序 +- 支持 Linux 内核运行时保护 + +更多详情: + +- 主页:[https://www.whonix.org/][17] +- 发行频率:每年发布 1 次 +- 发行类型:Debian、桌面版、Xfce、64 位、x86_64 +- 下载:[https://www.whonix.org/][17] + +### 其它 + +除了上述列表,我们还要提到 Linux Kodachi 和 BlackArch Linux,它们与上述发行版本类似。 + +首先,[Linux Kodachi][18] 也是一个基于 Debian 的发行版,使用 Tor 网络为用户提供隐私保护。它配备了 Xfce 桌面环境,并提供仅支持64位的安装程序。 + +除了 Kodachi,还有 [BlackArch Linux][19],它是本列表中唯一基于 Arch Linux 的发行版。它采用了窗口管理器(如 Fluxbox、Openbox),而不是桌面环境,并提供了 1000 多个适用于渗透测试和安全分析的应用程序。 + +### 总结 + +最后,我希望这个 2023 年顶级隐私专注的 Linux 发行版列表能给你保护自己和你在互联网上的隐私提供一个起点。 + +最后但并非最不重要的是,我要提醒你,如果你将上述发行版与 Tor 网络一起使用,请不要使用这些发行版进行任何银行或金融交易(尤其是那些使用手机验证的多因素身份验证的交易)。因为 Tor 会通过不同的国家路由你的流量,因此最好不要在这些发行版上进行金融工作。 + +图像来自各个发行版及维基百科。 + +*(题图:MJ/0603df83-3221-4a15-9312-011325786414)* + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/privacy-linux-distributions-2022/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:ChatGPT +校对:[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://en.wikipedia.org/wiki/Common_Vulnerabilities_and_Exposures +[2]: https://en.wikipedia.org/wiki/Zero-day_(computing) +[3]: https://www.debugpoint.com/category/distributions +[4]: https://www.debugpoint.com/wp-content/uploads/2022/04/Tails.jpg +[5]: https://tails.boum.org/ +[6]: https://tails.boum.org/install/index.en.html +[7]: https://www.debugpoint.com/wp-content/uploads/2022/04/Parrot-OS.jpg +[8]: https://parrotsec.org/ +[9]: https://parrotsec.org/download/ +[10]: https://www.debugpoint.com/wp-content/uploads/2022/04/Qubes-OS.jpg +[11]: http://qubes-os.org/ +[12]: https://www.qubes-os.org/downloads/ +[13]: https://www.debugpoint.com/wp-content/uploads/2022/04/Kali-Linux.jpg +[14]: http://www.kali.org/ +[15]: http://www.kali.org/downloads/ +[16]: https://www.debugpoint.com/wp-content/uploads/2022/04/Whonix.jpg +[17]: https://www.whonix.org/ +[18]: https://www.digi77.com/linux-kodachi/ +[19]: http://blackarch.org/ +[0]: https://img.linux.net.cn/data/attachment/album/202307/26/065805uggn1zamz3ztt11i.jpg \ No newline at end of file diff --git a/sources/tech/20230721.5 ⭐️⭐️ Top 5 Privacy Focused Linux Distributions [Compared].md b/sources/tech/20230721.5 ⭐️⭐️ Top 5 Privacy Focused Linux Distributions [Compared].md deleted file mode 100644 index 728fcdabc4..0000000000 --- a/sources/tech/20230721.5 ⭐️⭐️ Top 5 Privacy Focused Linux Distributions [Compared].md +++ /dev/null @@ -1,184 +0,0 @@ -[#]: subject: "Top 5 Privacy Focused Linux Distributions [Compared]" -[#]: via: "https://www.debugpoint.com/privacy-linux-distributions-2022/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Top 5 Privacy Focused Linux Distributions [Compared] -====== - -**We list the best five privacy-centric Linux Distributions of 2023 in this article to give you a heads-up before choosing one.** - -Internet privacy has become a major concern with the Pandemic and work-from-home situations. The more we go deep into the digital edge, the more cyber security and privacy become a considerable aspect of everyone’s daily life. Almost every day, you see [CVEs][1], a couple of [zero-day][2] in a month and ransomware attacks. - -Fortunately, Linux is generally secured by design if you compare it with Windows. In addition, most Linux distributions are secure if you follow some best practices while using them for your day-to-day work. - -Besides, some specific [Linux Distributions][3] give you an additional layer of security with extra tools for your work and personal usage. For example, suppose you want complete anonymity on the internet or are a cyber security expert. In that case, you may consider something other than popular mainstream Linux distros such as Ubuntu or Fedora. - -Here’s a list of 5 Linux distributions that offer better privacy and protection for users. - -### Top Privacy Specific Linux Distributions in 2023 - -#### 1. Tails - -The Amnesic Incognito Live System (in short, Tails) is a Debian-based Linux distribution which gives you complete anonymity over the Internet while you browse the web. It primarily uses the Tor network designed to redirect traffic via its network to conceal your location and other private information. In addition, it comes with all necessary secure applications that deal with email, browsers and other tools. - -If you need a Linux Distribution that gives you complete privacy built-in, then Choose Tails. - -![Tails][4] - -###### Advantages - -- Well integrated with the Tor network -- Browser is pre-configured with NoScript, HTTPS anywhere and other related add-ons (Firefox) -- Built-in Bitcoin wallet, wireless network audit tool and comes with Onion Circuits -- LIVE medium - -###### More details about Tails - -- Home page: [https://tails.boum.org/][5] -- Release frequency: 5 to 6 releases per year -- Distro type: Debian (Stable), GNOME, LIVE Medium, 64-bit only, x86_64 -- Download: [https://tails.boum.org/install/index.en.html][6] - -#### 2. Parrot OS - -Parrot (earlier known as Parrot Security OS) is also a Debian-based Linux distribution primarily designed for cyber security professionals and pen-testers who want a complete Linux distro that gives them all the tools they need. - -Moreover, you can easily use it for your daily driver with built-in sandboxing options primarily used for digital forensic work. On top of that, it can connect to other devices using its containerisation technologies. - -![Parrot OS Privacy Focused Linux Distribution][7] - -###### Advantages - -- Debian-based and Live system -- Choice of wide-range desktop flavours -- Applications that run are sandboxed -- Perfect for digital forensic work - -###### More details about Parrot OS - -- Home page: [https://parrotsec.org/][8] -- Release frequency: 2 to 3 releases per year -- Distro type: Debian (Testing), MATE & KDE Plasma, LIVE Medium, 64-bit only, x86_64 -- Download: [https://parrotsec.org/download/][9] - -#### 3. Qubes OS - -The Qubes OS is a unique Linux distribution based on Fedora Linux. Qubes provides multiple “virtual machines” or “Qubes” that host the applications. The approach effectively isolates the “personal”, “work”, or other user-defined workflows. - -Moreover, to differentiate between separate “machines”, this distro provides colour codes to the profiles so that you know which is running what. - -In addition, with this approach, if you happen to compromise your identity or download any malware in one “virtual machine”, the rest of the system is safe. This approach is called “security by isolation” and is perfect for tech-savvy and average users requiring privacy over the internet. - -![Qubes OS Privacy Focused Linux Distribution][10] - -###### Advantages - -- “security by isolation” with stand-alone “virtual machines” -- Built-in sandboxing support -- Offers full disk encryption -- Colour-coded “Qubes” for easy workflow navigation - -###### More details - -- Home page: [http://qubes-os.org/][11] -- Release frequency: 2 to 3 releases per year -- Distro type: Fedora, Xfce, Desktop, 64-bit only, x86_64 -- Download: [https://www.qubes-os.org/downloads/][12] - -#### 4. Kali Linux - -Kali Linux is the most popular penetration-testing Linux distribution on this list based on the Debian testing branch. Named after the Hindu goddess “Kali”, this Linux distribution comes with 32-bit, 64-bit and ARM versions for Raspberry Pi and other devices. On top of that, it comes with a vast set of tools giving security researchers and cyber experts an advantage over other distributions. - -![Kali Linux Privacy Focused Linux Distribution][13] - -###### Here’s why it’s popular - -- Kali Linux is almost an “industry standard” distro for security researchers -- Full disk encryption -- i686, x86 and ARM support -- LIVE system -- Well-made documentation with a training suite for customising Kali Linux for specific research -- Kali Linux provides paid certification course for pen testing - -###### More details about Kali Linux - -- Home page: [http://www.kali.org/][14] -- Release frequency: 3 to 4 releases per year -- Distro type: Debian (Testing), GNOME, KDE Plasma and others, Desktop & Live and others, 32-bit and 64-bit, x86_64, i686, ARM -- Download: [http://www.kali.org/downloads/][15] - -#### 5. Whonix Linux - -Whonix is another uniquely designed Linux distribution based on Debian. It runs as a virtual machine inside VirtualBox, effectively giving an operating system that can not reside on disk whereas not lost after multiple reboots. - -Moreover, its unique design provides a gateway component which connects to the Tor network. And a second component is called a workstation which runs all the user applications. These user applications connect to the gateway, which gives the applications and users complete anonymity. Finally, this unique two-phase isolation approach gives you complete privacy while mitigating several risks. - -![Whonix Privacy Focused Linux Distribution][16] - -###### Reasons why Whonix is one of the best privacy-centric distros - -- Two-phased isolation, which separates network and user applications -- Tor network support with Tor applications such as the browser and instant messaging -- Pre-loaded with major applications -- Linux Kernel Runtime guard support - -###### More details about Whonix - -- Home page: [https://www.whonix.org/][17] -- Release frequency: 1 release per year -- Distro type: Debian, Desktop, Xfce, 64-bit, x86_64 -- Download: [https://www.whonix.org/][17] - -#### Other mentions - -In addition to the above list, we would like to mention Linux Kodachi and BlackArch Linux, similar to the above distributions. - -Firstly, [Linux Kodachi][18] is also a Debian-based distribution which uses the Tor network to provide privacy to its user. It comes with an Xfce desktop environment and only provides a 64-bit installer. - -In addition to Kodachi, the [BlackArch Linux][19] is the only one in this list based on Arch Linux. It comes with Window managers (Fluxbox, Openbox) instead of desktop environments and brings over a thousand applications ideal for pen-testing and security analysis. - -### Closing Notes - -Finally, I hope this list of top privacy-focused Linux distributions of 2023 gives you a starting point to protect yourself and your privacy over the internet. - -Last but not the list, I would remind you that if you use the above distros with the Tor network, then do not perform any banking or financial transactions (especially those that use multi-factor authentication with mobile verification) using these distributions. Because it routes your traffic via different countries, hence it’s better not to use these for your financial work. - -_Image credit: respective distro, Wikipedia_ - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/privacy-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://en.wikipedia.org/wiki/Common_Vulnerabilities_and_Exposures -[2]: https://en.wikipedia.org/wiki/Zero-day_(computing) -[3]: https://www.debugpoint.com/category/distributions -[4]: https://www.debugpoint.com/wp-content/uploads/2022/04/Tails.jpg -[5]: https://tails.boum.org/ -[6]: https://tails.boum.org/install/index.en.html -[7]: https://www.debugpoint.com/wp-content/uploads/2022/04/Parrot-OS.jpg -[8]: https://parrotsec.org/ -[9]: https://parrotsec.org/download/ -[10]: https://www.debugpoint.com/wp-content/uploads/2022/04/Qubes-OS.jpg -[11]: http://qubes-os.org/ -[12]: https://www.qubes-os.org/downloads/ -[13]: https://www.debugpoint.com/wp-content/uploads/2022/04/Kali-Linux.jpg -[14]: http://www.kali.org/ -[15]: http://www.kali.org/downloads/ -[16]: https://www.debugpoint.com/wp-content/uploads/2022/04/Whonix.jpg -[17]: https://www.whonix.org/ -[18]: https://www.digi77.com/linux-kodachi/ -[19]: http://blackarch.org/ \ No newline at end of file From afb563403d3aa659bf5eec2f23538734d70c53a6 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 26 Jul 2023 08:41:40 +0800 Subject: [PATCH 05/72] translated --- ...tall Jupyter Notebook in Debian or Ubuntu Linux.md | 135 ------------------ ...tall Jupyter Notebook in Debian or Ubuntu Linux.md | 135 ++++++++++++++++++ 2 files changed, 135 insertions(+), 135 deletions(-) delete mode 100644 sources/tech/20230716.1 ⭐️⭐️ How to Install Jupyter Notebook in Debian or Ubuntu Linux.md create mode 100644 translated/tech/20230716.1 ⭐️⭐️ How to Install Jupyter Notebook in Debian or Ubuntu Linux.md diff --git a/sources/tech/20230716.1 ⭐️⭐️ How to Install Jupyter Notebook in Debian or Ubuntu Linux.md b/sources/tech/20230716.1 ⭐️⭐️ How to Install Jupyter Notebook in Debian or Ubuntu Linux.md deleted file mode 100644 index f37f4b38e4..0000000000 --- a/sources/tech/20230716.1 ⭐️⭐️ How to Install Jupyter Notebook in Debian or Ubuntu Linux.md +++ /dev/null @@ -1,135 +0,0 @@ -[#]: subject: "How to Install Jupyter Notebook in Debian or Ubuntu Linux" -[#]: via: "https://www.debugpoint.com/install-jupyter-ubuntu/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to Install Jupyter Notebook in Debian or Ubuntu Linux -====== - -**A simple tutorial on how to install Jupyter Notebook in Ubuntu or Debian Linux.** - -[Jupyter][1] Notebook is a powerful web-based interactive dev tool which allows you to create and share live code, visualizations, and interactive data. Its notebook format combines code and text, making it an excellent choice for data exploration, analysis, and collaborative projects. - -In this tutorial, we will guide you through the step-by-step process of installing Jupyter Notebook on Ubuntu or Debian -based systems, enabling you to harness its versatility and extend your programming capabilities. - -### Install pip - -Before we begin, ensure that pip, the Python package installer, is installed on your system. If you already have pip installed, you can skip this step. Otherwise, follow these instructions to install it. You can also visit [this page][2] for detailed instructions. - -Open a terminal window (Ctrl+Alt+T) and type the following command; press Enter: - -``` -sudo apt updatesudo apt install python3-pip -``` - -You may be prompted to enter your password. Provide it and wait for the installation to complete. - -### Install virtualenv - -Although not mandatory, it is recommended to isolate your work environment via this tool in the Jupyter Notebook installation. This ensures that any changes or packages you install will not interfere with your system’s Python environment. To set up a virtual env, follow the below steps: - -In the terminal, enter the following command: - -``` -sudo apt install python3-virtualenv -``` - -Wait for the installation to finish. Once complete, proceed to the next step. - -### Create a virtual environment - -Creating a virtual environment is a straightforward process. Here’s how you can set up a new virtual environment specifically for Jupyter Notebook: - -Navigate to the directory where you want to create the virtual environment. Run the following command in the terminal: - -``` -virtualenv my-jupyter-env -``` - -This command creates a new directory called “my-jupyter-env”, which will contain the virtual environment files. - -![create jupyter environment][3] - -You can also verify that the directory is created under your home folder via any file manager. - -![jupyter env folders][4] - -Activate the virtual environment by entering the following: - -``` -source my-jupyter-env/bin/activate -``` - -You will notice that your terminal prompt changes to indicate that you are now inside the virtual environment. - -![activate the environment][5] - -### Install Jupyter Notebook - -With the virtual environment activated, you can now proceed to install Jupyter Notebook: - -In the terminal, type the following command: - -``` -pip install jupyter -``` - -This command fetches the necessary packages and installs Jupyter Notebook in your virtual environment. - -![Installing jupyter using pip][6] - -### Launch Jupyter Notebook - -Once the installation is complete, you are ready to launch Jupyter Notebook: - -In the terminal, type the following command: - -``` -jupyter notebook -``` - -After executing the command, Jupyter Notebook will start, and you should see an output similar to this: - -![running jupyter notebook in Debian][7] - -Your default web browser will open, displaying the Jupyter Notebook interface. - -![Jupyter notebook running in browser][8] - -### Shutting down and restart - -If you want to shutdown the Notebook server, make sure to close and save all notebooks. Close the browser. Then press “CTRL+C” in the terminal window. It will prompt you whether you want to shutdown the server. Type Yes and hit enter. And finally, close the terminal window. - -To restart the server again, you need run all the commands from “virtualenv my-jupyter-env” as described above. - -### Conclusion - -Congratulations! You have successfully installed Jupyter Notebook on your Ubuntu or Debian system. By following the above steps, you can now take advantage of Jupyter’s interactive development environment to write code, create visualizations, and explore data effortlessly. - -Remember, Jupyter Notebook supports various programming languages, including Python and offers a vast list of plugins to extend its functionality further. - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/install-jupyter-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://jupyter.org/ -[2]: https://www.debugpoint.com/pip-command-not-found/ -[3]: https://www.debugpoint.com/wp-content/uploads/2023/07/create-jupyter-environment.jpg -[4]: https://www.debugpoint.com/wp-content/uploads/2023/07/jupyter-env-folders.jpg -[5]: https://www.debugpoint.com/wp-content/uploads/2023/07/active-the-environment.jpg -[6]: https://www.debugpoint.com/wp-content/uploads/2023/07/Installing-jupyter-using-pip.jpg -[7]: https://www.debugpoint.com/wp-content/uploads/2023/07/running-jupyter-notebook-in-Debian.jpg -[8]: https://www.debugpoint.com/wp-content/uploads/2023/07/Jupyter-notebook-running-in-browser.jpg diff --git a/translated/tech/20230716.1 ⭐️⭐️ How to Install Jupyter Notebook in Debian or Ubuntu Linux.md b/translated/tech/20230716.1 ⭐️⭐️ How to Install Jupyter Notebook in Debian or Ubuntu Linux.md new file mode 100644 index 0000000000..fb509c6176 --- /dev/null +++ b/translated/tech/20230716.1 ⭐️⭐️ How to Install Jupyter Notebook in Debian or Ubuntu Linux.md @@ -0,0 +1,135 @@ +[#]: subject: "How to Install Jupyter Notebook in Debian or Ubuntu Linux" +[#]: via: "https://www.debugpoint.com/install-jupyter-ubuntu/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +如何在 Debian 或 Ubuntu Linux 中安装 Jupyter Notebook +====== + +**有关如何在 Ubuntu 或 Debian Linux 中安装 Jupyter Notebook 的简单教程。** + +[Jupyter][1] Notebook 是一款功能强大的基于 Web 的交互式开发工具,可让你创建和共享实时代码、可视化和交互式数据。其笔记本格式结合了代码和文本,使其成为数据探索、分析和协作项目的绝佳选择。 + +在本教程中,我们将逐步指导你在基于 Ubuntu 或 Debian 的系统上安装 Jupyter Notebook,使你能够利用其多功能性并扩展编程能力。 + +### 安装 pip + +在开始之前,请确保你的系统上已安装 pip(Python 包安装程序)。如果你已经安装了 pip,则可以跳过此步骤。否则,请按照以下说明进行安装。你还可以访问[此页面][2]获取详细说明。 + +打开终端窗口 (Ctrl+Alt+T) 并输入以下命令,按回车键: + +``` +sudo apt updatesudo apt install python3-pip +``` + +系统可能会提示你输入密码。提供它并等待安装完成。 + +### 安装 virtualenv + +尽管不是强制性的,但建议在 Jupyter Notebook 安装中通过此工具隔离你的工作环境。这可以确保你安装的任何更改或软件包都不会干扰系统的 Python 环境。要设置虚拟环境,请按照以下步骤操作: + +在终端中,输入以下命令: + +``` +sudo apt install python3-virtualenv +``` + +等待安装完成。完成后,继续下一步。 + +### 创建虚拟环境 + +创建虚拟环境是一个简单的过程。以下是专门为 Jupyter Notebook 设置新虚拟环境的方法: + +进入到要在其中创建虚拟环境的目录。在终端中运行以下命令: + +``` +virtualenv my-jupyter-env +``` + +此命令创建一个名为 “my-jupyter-env” 的新目录,其中将包含虚拟环境文件。 + +![create jupyter environment][3] + +你还可以通过任何文件管理器验证该目录是否在你的主文件夹下创建。 + +![jupyter env folders][4] + +输入以下命令激活虚拟环境: + +``` +source my-jupyter-env/bin/activate +``` + +你会注意到终端提示符发生变化,表明你现在位于虚拟环境中。 + +![activate the environment][5] + +### 安装 Jupyter Notebook + +激活虚拟环境后,你现在可以继续安装 Jupyter Notebook: + +在终端中,输入以下命令: + +``` +pip install jupyter +``` + +此命令会获取必要的包并在虚拟环境中安装 Jupyter Notebook。 + +![Installing jupyter using pip][6] + +### 启动 Jupyter Notebook + +安装完成后,你就可以启动 Jupyter Notebook: + +在终端中,输入以下命令: + +``` +jupyter notebook +``` + +执行命令后,Jupyter Notebook 将启动,你应该看到类似于以下内容的输出: + +![running jupyter notebook in Debian][7] + +你的默认 Web 浏览器将打开,显示 Jupyter Notebook 界面。 + +![Jupyter notebook running in browser][8] + +### 关闭并重新启动 + +如果要关闭 Notebook 服务器,请确保关闭并保存所有笔记。关闭浏览器。然后在终端窗口中按 “CTRL+C”。它会提示你是否要关闭服务器。输入 Yes 并按回车键。最后,关闭终端窗口。 + +要再次重新启动服务器,你需要按上面的描述运行 “virtualenv my-jupyter-env” 等所有命令 + +### 总结 + +恭喜! 你已在 Ubuntu 或 Debian 系统上成功安装 Jupyter Notebook。通过执行上述步骤,你现在可以利用 Jupyter 的交互式开发环境轻松编写代码、创建可视化并探索数据。 + +请记住,Jupyter Notebook 支持各种编程语言,包括 Python,并提供大量插件来进一步扩展其功能。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/install-jupyter-ubuntu/ + +作者:[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://jupyter.org/ +[2]: https://www.debugpoint.com/pip-command-not-found/ +[3]: https://www.debugpoint.com/wp-content/uploads/2023/07/create-jupyter-environment.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2023/07/jupyter-env-folders.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2023/07/active-the-environment.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2023/07/Installing-jupyter-using-pip.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2023/07/running-jupyter-notebook-in-Debian.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2023/07/Jupyter-notebook-running-in-browser.jpg From bb9fd0442ecf8aa2f7e4936fea052e333ec82dc4 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 26 Jul 2023 08:46:25 +0800 Subject: [PATCH 06/72] translating --- ...714.0 ⭐️⭐️ How to Access the GRUB Menu in Virtual Machine.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230714.0 ⭐️⭐️ How to Access the GRUB Menu in Virtual Machine.md b/sources/tech/20230714.0 ⭐️⭐️ How to Access the GRUB Menu in Virtual Machine.md index f366c12930..fc337375ac 100644 --- a/sources/tech/20230714.0 ⭐️⭐️ How to Access the GRUB Menu in Virtual Machine.md +++ b/sources/tech/20230714.0 ⭐️⭐️ How to Access the GRUB Menu in Virtual Machine.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/access-grub-virtual-machine/" [#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 345b7257be798603d8f89556adf7abe9e88a9df0 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 27 Jul 2023 07:38:56 +0800 Subject: [PATCH 07/72] RP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wcjjdlhws https://linux.cn/article-16037-1.html 恭喜升级⭐️⭐️贡献者 --- ... open source challenges in developing countries.md | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) rename {translated/talk => published}/20230427.2 ⭐️⭐️ 3 key open source challenges in developing countries.md (68%) diff --git a/translated/talk/20230427.2 ⭐️⭐️ 3 key open source challenges in developing countries.md b/published/20230427.2 ⭐️⭐️ 3 key open source challenges in developing countries.md similarity index 68% rename from translated/talk/20230427.2 ⭐️⭐️ 3 key open source challenges in developing countries.md rename to published/20230427.2 ⭐️⭐️ 3 key open source challenges in developing countries.md index c7071acbf1..cce1bace0c 100644 --- a/translated/talk/20230427.2 ⭐️⭐️ 3 key open source challenges in developing countries.md +++ b/published/20230427.2 ⭐️⭐️ 3 key open source challenges in developing countries.md @@ -3,18 +3,24 @@ [#]: author: "Ahmed Sobeh https://opensource.com/users/ahmed-sobeh" [#]: collector: "lkxed" [#]: translator: "wcjjdlhws" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-16037-1.html" 发展中国家面临的三个关键开源挑战 ====== -当我回国和科技行业或其他行业的人谈起我的工作和我每天参与的话题时,我通常会对[开源办公室Open Source Programs Office (OSPO)][1]这个想法感到困惑。一家公司为开源项目做出贡献,却没有明显的直接经济利益,这种概念在文化上很难理解或解释。 +![][0] -作为一个土生土长的人,我理解并赞同这个观点。曾几何时,我对开源软件的唯一理解是,它是一种无需付费、无需等待特定问题或附加功能发布即可使用的软件。我可以自己在本地做任何我需要的事情。 +> 开源在发展中国家面临着许多困难,这些困难使人们对开源的看法以及与开源的联系变得不准确、不贴切。 -在发展中国家,开放源码面临着许多困难,这些困难使人们对它的看法和联想变得不准确、不贴切。我将在本文中讨论这些问题。 +> 编者按:本文作者 Ahmed Sobeh 是 Aiven 开源项目办公室的开源工程经理。他来自埃及,在开源领域有各种经验。本文是他对埃及的开源文化的见解。 + +当我回国,和科技行业或其他行业的人谈起我的工作和我每天参与的话题时,我通常会对 [开源计划办公室][1]Open Source Programs Office(OSPO)这个想法感到困惑。一家公司在没有明显的直接经济利益的情况下为开源项目做出贡献,这种概念在文化上很难理解或解释。 + +作为一个在发展中国家出生并成长的人,我理解并赞同这个观点。曾几何时,我对开源软件的唯一理解是,它是一种无需付费、无需等待特定问题或附加功能发布即可使用的软件。我可以自己在本地做任何我需要的事情。 + +在发展中国家,开源面临着许多困难,这些困难使人们对它的看法和相关印象变得不准确和脱节。我将在本文中讨论这些问题。 ### 发展中国家的开源挑战 @@ -26,25 +32,23 @@ ### 社会与文化 -科技文化,特别是其中的开源部分,从其所在社会的文化中汲取养分,这已经不是什么秘密了。这就是为什么在当今世界,开源更有可能在世界较发达地区得到维持和维护。 +众所周知,科技中的文化,特别是其中的开源部分,源自它所存在的社会文化。这就是为什么在当今世界,开源更有可能在世界较发达地区得到维持和维护。 -但是,试想一个完美的社会,一个最适合开放源代码发展、维持和维护的社会。这个社会的文化是什么样的?其主要特征是什么? +但是,试想一个完美的社会,一个最适合开源发展、维持和维护的社会。这个社会的文化是什么样的?其主要特征是什么? #### 开放和透明 -开源想要发展,社会文化必须尽可能开放和透明。信息必须可以自由公开地获取,这在许多欠发达地区是一个巨大的问题。信息往往是红头文件,普通公民无法获得,更不用说那些试图为开源做出贡献的人了。 - -**[ 相关阅读[开源项目的全球交流][2] ]** +开源想要发展,社会文化必须尽可能开放和透明。信息必须可以自由公开地获取,这在许多欠发达地区是一个巨大的问题。信息往往受到繁文缛节的制约,普通公民难以获取,更不用说那些试图为开源做出贡献的人了。 #### 自由 -“自由”这个词有许多不同的含义与解释。有言论自由、表达自由、选择自由、信仰自由、宗教自由等等。在本文中,我最关心的自由方面是在没有更高权力干预的情况下建立新社区和组织的能力。这是开源的本质。分布式协作模式是一种高效的协作模式,在这种模式下,大型团体在没有强大的中央权力机构指挥的情况下开展合作。这是大多数这些地区面临的另一个重大挑战。新的社区和组织往往会受到质疑、密切监视,不幸的是,在某些情况下,甚至会因为害怕可能出现的新思想或其他原因而遭到起诉并最终被关闭。 +“自由”这个词有许多不同的含义与解释。有言论自由、表达自由、选择自由、信仰自由、宗教自由等等。在本文中,我最关心的自由方面是在没有更高层机构干预的情况下建立新社区和组织的能力。这是开源的本质。分布式协作模式是一种高效的协作模式,在这种模式下,大型团体在没有强大的中央权威指挥的情况下开展合作。这是大多数这些地区面临的另一个重大挑战。新的社区和组织往往会受到质疑、密切监视,不幸的是,在某些情况下,甚至会因为害怕可能出现的新思想或其他原因而遭到起诉并最终被关闭。 #### 充满活力 充满活力的文化对开源的发展至关重要。准备接受和实行新想法的文化是发展开源最理想的地方。抵制改变和倾向于固守传统方法会阻止社会接受新的技术和方法,这是大部分发展中国家中的主要问题。 -这些地区抵制改变背后最重要也是最常见的原因是对未知的恐惧。把对未知的恐惧作为“发展中国家”的问题来讨论是不公平的。这是在哪里都常见问题,甚至在发达国家。但是恐惧背后的一些原因是发展中国家特有的。主要原因有两个,一是对科技行业的能力缺乏信心,二是缺乏责任感。企业和个人都不信任现有软件解决方案的功能,更不用说开源解决方案了。有一种观点认为,开源软件不安全、不可靠。当人们不相信软件开发者的能力时这种担忧会被放大。其次,人们不相信系统会对使用软件或法律冲突中可能出现的错误或问题追究责任。 +这些地区抵制改变背后最重要也是最常见的原因是对未知的恐惧。把对未知的恐惧作为“发展中国家”的问题来讨论是不公平的。这是在哪里都常见问题,甚至在发达国家。但是恐惧背后的一些原因是发展中国家特有的。主要原因有两个,一是对科技行业的能力缺乏信心,二是缺乏责任感。企业和个人都不信任现有软件解决方案的功能,更不用说开源解决方案了。有一种观点认为,开源软件不安全、不可靠。当人们不相信软件开发者的能力时这种担忧会被放大。其次,人们不相信该系统会对使用软件或法律冲突中可能出现的错误或问题追究责任。 ### 资源、基础设施和经济 @@ -58,11 +62,11 @@ 在这种情况下,如何建立开源社区呢?项目最终只能由少数拥有稳定高速互联网连接和最新设备的特权人士来维护。剩下的将是零星的、偶尔来自他人的贡献,很难被视为一个社区。一旦出现有偿工作的机会,即使是这些人也会消失。我亲眼见过多次这种情况。有人会开始了解一个开源项目,研究特定的堆栈或提高自己的技能,并开始为其做出贡献。但一旦出现了有偿工作的机会,即使是作为第二份工作,他们也会完全放弃开源项目。这是有道理的。任何个人都必须优先考虑自己和家人的生存手段。 -这种资源匮乏和对少数特权阶层的依赖,也使其几乎不可能为营销活动、社区建设活动以及最后但并非最不重要的文献本地化尝试提供资金。 +这种资源匮乏和对少数特权人群的依赖,也使其几乎不可能为营销活动、社区建设活动以及最后但并非最不重要的文献本地化尝试提供资金。 #### 本地化 -英语是互联网语言,但对许多国家来说并非如此。虽然几乎所有的开发人员都会说基本的英语,但并不是每个人都有能力理解文档、架构资源和技术规范,使他们能够有意义地[为开源项目做出贡献][3]。由于没有相应的文档,发展中国家的开发人员很难找到进入开源项目的切入点。为此所需的时间和资源通常会使这些地区的潜在贡献者望而却步。 +英语是互联网语言,但对许多国家来说并非如此。虽然几乎所有的开发人员都会说基本的英语,但并不是每个人都有能力理解文档、架构资源和技术规范,使他们能够有意义地 [为开源项目做出贡献][3]。由于没有相应的文档,发展中国家的开发人员很难找到进入开源项目的切入点。为此所需的时间和资源通常会使这些地区的潜在贡献者望而却步。 #### 员工合同 @@ -82,10 +86,11 @@ 美国和欧洲的科技巨头与发展中地区的政府签订了价值数十亿美元、长达数十年的软件供应协议。一旦有人当选,并决定开始采用开源软件,他们就会发现摆脱这些交易需要付出巨大的代价。 -### Open isn't always easy ### 开源并非一帆风顺 -这些只是开放源代码在发展中国家面临的一些困难。要改善这种状况,使开源技术的采用和发展变得可行,还有许多工作要做。在今后的文章中,我将深入探讨具体的解决方案,但现在,我想说的是,任何事情都要从个人做起。当我们每个人都 "众筹 "开放文化时,我们生活和工作所在地区的文化也会随之改变。尽你所能,将开放源代码带入你的社区,看看它会带来什么。 +这些只是开放源代码在发展中国家面临的一些困难。要改善这种状况,使开源技术的采用和发展变得可行,还有许多工作要做。在今后的文章中,我将深入探讨具体的解决方案,但现在,我想说的是,任何事情都要从个人做起。当我们每个人都 “众包” 开放文化时,我们生活和工作所在地区的文化也会随之改变。尽你所能,将开放源代码带入你的社区,看看它会带来什么。 + +*(题图:MJ/e9f5a8be-b0bd-425a-8199-248f5c0abe16)* -------------------------------------------------------------------------------- @@ -94,7 +99,7 @@ via: https://opensource.com/article/23/4/challenges-open-source-developing-count 作者:[Ahmed Sobeh][a] 选题:[lkxed][b] 译者:[wcjjdlhws](https://github.com/wcjjdlhws) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -104,3 +109,4 @@ via: https://opensource.com/article/23/4/challenges-open-source-developing-count [2]: https://opensource.com/article/21/10/global-communication-open-source [3]: https://opensource.com/article/22/3/contribute-open-source-2022 [4]: https://opensource.com/article/22/11/open-source-weaves-connections-between-countries +[0]: https://img.linux.net.cn/data/attachment/album/202307/27/073634a244fon440y25kug.jpg \ No newline at end of file From c39a106f5e217e15c7049b0f545d94b3a3699aef Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 27 Jul 2023 08:47:24 +0800 Subject: [PATCH 08/72] translated --- ...Bash Basics Series 6 Handling String Operations.md | 149 ------------------ ...Bash Basics Series 6 Handling String Operations.md | 149 ++++++++++++++++++ 2 files changed, 149 insertions(+), 149 deletions(-) delete mode 100644 sources/tech/20230717.0 ⭐️⭐️ Bash Basics Series 6 Handling String Operations.md create mode 100644 translated/tech/20230717.0 ⭐️⭐️ Bash Basics Series 6 Handling String Operations.md diff --git a/sources/tech/20230717.0 ⭐️⭐️ Bash Basics Series 6 Handling String Operations.md b/sources/tech/20230717.0 ⭐️⭐️ Bash Basics Series 6 Handling String Operations.md deleted file mode 100644 index e6ed32b1b8..0000000000 --- a/sources/tech/20230717.0 ⭐️⭐️ Bash Basics Series 6 Handling String Operations.md +++ /dev/null @@ -1,149 +0,0 @@ -[#]: subject: "Bash Basics Series #6: Handling String Operations" -[#]: via: "https://itsfoss.com/bash-strings/" -[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Bash Basics Series #6: Handling String Operations -====== - -In most programming languages, you'll find a string data type. A string is basically a group of characters. - -Bash shell is different though. There is no separate data type for strings. Everything is a variable here. - -But that doesn't mean that you cannot deal with strings in the same way you do in C and other programming languages. - -Finding substrings, replacing substrings, joining strings and many more string operations are possible in Bash shell. - -In this part of the Bash Basics Series, you'll learn the basic string manipulations. - -### Get string length in bash - -Let's start with the simplest option. Which is to get the length of a string. It's quite simple: - -``` -${#string} -``` - -Let's use it in an example. - -![Example of getting string length in bash][1] - -As you can see, the second example had two words in it but since it was in quotes, it was treated as a single word. Even the space is counted as a character. - -### Join strings in bash - -The technical term is concatenation of strings, one of the simplest possible string operations in bash. - -You just have to use the string variables one after another like this: - -``` -str3=$str1$str2 -``` - -Can it go any simpler than this? I don't think so. - -Let's see it with an example. Here is my example script named `join.sh`: - -``` -#!/bin/bash - -read -p "Enter first string: " str1 -read -p "Enter second string: " str2 - -joined=$str1$str2 - -echo "The joined string is: $joined" -``` - -Here's a sample run of this script: - -![Join two strings in bash][2] - -### Extract substring in bash - -Let's say you have a big string with several characters and you want to extract part of it. - -To extract a substring, you need to specify the main string, the starting position of the substring and the length of the substring in the following manner: - -``` -${string:$pos:$len} -``` - -> 💡Like arrays, positioning in strings also start at 0. - -Here's an example: - -![Extracting substring in bash][3] - -Even if you specify the substring length greater than the string length, it will only go till the end of the string. - -### Replace substring in bash - -Let's say you have a big string and you want to replace part of it with another string. - -In that case, you use this kind of syntax: - -``` -${string/substr1/substr2} -``` - -> ✋ Only the first occurrence of a substring is replaced this way. If you want to replace all occurrences, use`${string//substr1/substr2}` - -Here's an example: - -![Replace substring in bash][4] - -As you can see above, the word good was replaced with best. I saved the replaced string to the same string to change the original. - -> 💡 If the substring is not found, nothing is replaced. It won't result in an error. - -### Delete substring in bash - -Let's talk about removing substrings. Let's say you want to remove part of a string. In that case, just provide the substring to the main string like this: - -``` -${string/substring} -``` - -> ✋ Only the first occurrence of a substring is deleted this way. If you want to delete all occurrences, use`${string//substr}` - -If the substring is found, it will be deleted from the string. - -Let's see this with an example. - -![Delete substring in bash][5] - -This goes without saying that if the substring is not found, it is not deleted. It won't result in an error. - -### 🏋️ Exercise time - -It's time for you to practice string manipulation with simple exercises. - -**Exercise 1**: Declare a string 'I am all wet'. Now change this string by replacing the word wet with set. - -**Exercise 2**: Create a string that saves phone numbers in the following format `112-123-1234`. Now, you have to delete all `-`. - -That should give you some decent practice with strings in bash. In the next chapter, you'll learn about using if-else statements in bash. Stay tuned. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/bash-strings/ - -作者:[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/content/images/2023/07/bash-string-length-example.png -[2]: https://itsfoss.com/content/images/2023/07/join-strings-bash.png -[3]: https://itsfoss.com/content/images/2023/07/extract-substring-bash.png -[4]: https://itsfoss.com/content/images/2023/07/replace-substring-bash.png -[5]: https://itsfoss.com/content/images/2023/07/bash-delete-substring.png diff --git a/translated/tech/20230717.0 ⭐️⭐️ Bash Basics Series 6 Handling String Operations.md b/translated/tech/20230717.0 ⭐️⭐️ Bash Basics Series 6 Handling String Operations.md new file mode 100644 index 0000000000..98cbb393bb --- /dev/null +++ b/translated/tech/20230717.0 ⭐️⭐️ Bash Basics Series 6 Handling String Operations.md @@ -0,0 +1,149 @@ +[#]: subject: "Bash Basics Series #6: Handling String Operations" +[#]: via: "https://itsfoss.com/bash-strings/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Bash 基础知识系列 #6:处理字符串操作 +====== + +在大多数编程语言中,你都会找到字符串数据类型。字符串基本上是一组字符。 + +但 Bash shell 有所不同。字符串没有单独的数据类型。这里一切都是变量。 + +但这并不意味着你不能像在 C 和其他编程语言中那样处理字符串。 + +在 Bash shell 中可以查找子字符串、替换子字符串、连接字符串以及更多字符串操作。 + +在 Bash 基础知识系列的这一部分中,你将学习基本的字符串操作。 + +### 在 bash 中获取字符串长度 + +让我们从最简单的选项开始。也就是获取字符串的长度。这很简单: + +``` +${#string} +``` + +让我们在示例中使用它。 + +![Example of getting string length in bash][1] + +正如你所看到的,第二个示例中有两个单词,但由于它用引号引起来,因此它被视为单个单词。连空格都算作一个字符。 + +### 在 bash 中连接字符串 +] +技术术语是字符串连接,这是 bash 中最简单的字符串操作之一。 + +你只需像这样一个接一个地使用字符串变量: + +``` +str3=$str1$str2 +``` + +还能比这更简单吗? 我不这么认为。 + +让我们看一个例子。这是我的示例脚本,名为 `join.sh`: + +``` +#!/bin/bash + +read -p "Enter first string: " str1 +read -p "Enter second string: " str2 + +joined=$str1$str2 + +echo "The joined string is: $joined" +``` + +以下是该脚本的运行示例: + +![Join two strings in bash][2] + +### 在 bash 中提取子字符串 + +假设你有一个包含多个字符的大字符串,并且你想要提取其中的一部分。 + +要提取子字符串,需要指定主字符串、子字符串的起始位置和子字符串的长度,如下所示: + +``` +${string:$pos:$len} +``` + +> 💡和数组一样,字符串中的定位也是从 0 开始。 + +这是一个例子: + +![Extracting substring in bash][3] + +即使你指定的子字符串长度大于字符串长度,它也只会到达字符串末尾。 + +### 替换 bash 中的子字符串 + +假设你有一个大字符串,并且你想用另一个字符串替换其中的一部分。 + +在这种情况下,你可以使用这种语法: + +``` +${string/substr1/substr2} +``` + +> ✋ 只有第一次出现的子字符串才会以这种方式替换。如果要替换所有出现的地方,请使用`${string//substr1/substr2}` + +这是一个例子: + +![Replace substring in bash][4] + +正如你在上面看到的,“good” 一词被替换为 “best”。我将替换的字符串保存到同一字符串中以更改原始字符串。 + +> 💡 如果未找到子字符串,则不会替换任何内容。它不会导致错误。 + +### 在 bash 中删除子字符串 + +我们来谈谈删除子字符串。假设你要删除字符串的一部分。在这种情况下,只需将子字符串提供给主字符串,如下所示: + +``` +${string/substring} +``` + +> ✋ 通过这种方式,仅删除第一次出现的子字符串。如果要删除所有出现的内容,请使用 `${string//substr}` + +如果找到子字符串,则将从字符串中删除它。 + +让我们通过一个例子来看看。 + +![Delete substring in bash][5] + +不用说,如果没有找到子字符串,则不会删除它。它不会导致错误。 + +### 🏋️ 练习时间 + +现在是你通过简单练习来实践字符串操作的时候了。 + +**练习 1**:声明一个字符串 “I am all wet”。现在通过用 set 替换单词 wet 来更改此字符串。 + +**练习 2**:创建一个字符串,以 `112-123-1234` 格式保存电话号码。现在,你必须删除所有 `-`。 + +这应该会给你一些在 bash 中使用字符串的不错的练习。在下一章中,你将学习如何在 bash 中使用 if-else 语句。敬请关注。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/bash-strings/ + +作者:[Abhishek Prakash][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://itsfoss.com/author/abhishek/ +[b]: https://github.com/lkxed/ +[1]: https://itsfoss.com/content/images/2023/07/bash-string-length-example.png +[2]: https://itsfoss.com/content/images/2023/07/join-strings-bash.png +[3]: https://itsfoss.com/content/images/2023/07/extract-substring-bash.png +[4]: https://itsfoss.com/content/images/2023/07/replace-substring-bash.png +[5]: https://itsfoss.com/content/images/2023/07/bash-delete-substring.png From e5b3509f18302f1bd3a81895ce3b4ddb6a04a6db Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 27 Jul 2023 08:53:05 +0800 Subject: [PATCH 09/72] translating --- ...️ How to Install and Access Kubernetes Dashboard Step-by-Step.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20230717.3 ⭐️⭐️ How to Install and Access Kubernetes Dashboard Step-by-Step.md b/sources/tech/20230717.3 ⭐️⭐️ How to Install and Access Kubernetes Dashboard Step-by-Step.md index c5c8fcc5ab..f18e7d6cbc 100644 --- a/sources/tech/20230717.3 ⭐️⭐️ How to Install and Access Kubernetes Dashboard Step-by-Step.md +++ b/sources/tech/20230717.3 ⭐️⭐️ How to Install and Access Kubernetes Dashboard Step-by-Step.md @@ -2,7 +2,7 @@ [#]: via: "https://www.linuxtechi.com/how-to-install-kubernetes-dashboard/" [#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -140,4 +140,4 @@ via: https://www.linuxtechi.com/how-to-install-kubernetes-dashboard/ [a]: https://www.linuxtechi.com/author/pradeep/ [b]: https://github.com/lkxed/ - + From b06f326f447fed1e0fe57a184dc49a1bff549a38 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 27 Jul 2023 15:30:29 +0800 Subject: [PATCH 10/72] ATRP @wxy https://linux.cn/article-16038-1.html --- ...️ Linux Shells Bash, Zsh, and Fish Explained.md | 159 ++++++++++++++++++ ...️ Linux Shells Bash, Zsh, and Fish Explained.md | 154 ----------------- 2 files changed, 159 insertions(+), 154 deletions(-) create mode 100644 published/20230719.2 ⭐️⭐️ Linux Shells Bash, Zsh, and Fish Explained.md delete mode 100644 sources/tech/20230719.2 ⭐️⭐️ Linux Shells Bash, Zsh, and Fish Explained.md diff --git a/published/20230719.2 ⭐️⭐️ Linux Shells Bash, Zsh, and Fish Explained.md b/published/20230719.2 ⭐️⭐️ Linux Shells Bash, Zsh, and Fish Explained.md new file mode 100644 index 0000000000..f20dc92a08 --- /dev/null +++ b/published/20230719.2 ⭐️⭐️ Linux Shells Bash, Zsh, and Fish Explained.md @@ -0,0 +1,159 @@ +[#]: subject: "Linux Shells: Bash, Zsh, and Fish Explained" +[#]: via: "https://www.debugpoint.com/linux-shells/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "ChatGPT" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-16038-1.html" + +Linux Shell 介绍:Bash、Zsh 和 Fish +====== + +![][0] + +> 关于著名的 Linux Shell - Bash、Zsh 和 Fish 的一些注释和特性。 + +Linux 之所以强大,是因为它提供了用于与系统进行交互的多功能的命令行界面。在这中情况下,Shell 扮演了用户和 Linux 内核之间的桥梁。本文将探讨三种流行的 Linux Shell - Bash、Zsh 和 Fish,并深入了解它们的独特特性和功能。 + +### 理解 Linux Shell + +#### 什么是 Shell? + +Shell 是一个命令行解释器,允许你通过文本命令与操作系统进行交互。它接收你的输入,处理它,并与 Linux 内核通信以执行所请求的操作。最后,它会给你一个输出。 + +(LCTT 译注:“Shell” 一词大约取自其“界面”、“外壳”的含义。) + +Shell 在 Linux 中起着至关重要的作用,因为它们使用户能够执行各种任务,从简单的文件导航到复杂的系统管理任务。不同的 Shell 提供各种功能,因此选择适合你工作流程的 Shell 至关重要。 + +### Bash + +[Bash][1],全称 “Bourne Again SHell”,是 Linux 发行版中最广泛使用的默认 Shell 之一。它以其简洁和兼容性而闻名,是初学者的优秀选择。 + +#### Bash 的特点 + +Bash 具有众多特性,包括: + +- 命令历史:使用箭头键轻松访问先前执行的命令。 +- `Tab` 键补全:节省时间,让 Bash 为你自动完成文件名和命令。 +- 脚本编写:编写和运行 Shell 脚本以自动化重复任务。从这个角度来看,它也是一个程序。 +- Bash 在大多数 GNU/Linux 系统中默认安装。 +- 配置设置存储在家目录下的 `.bashrc` 文件中。 + +和其他 Shell 一样,Bash 有其优点和缺点。使用 Bash 的一些优势包括广泛的使用性、详尽的文档以及庞大的社区支持。然而,Bash 可能缺乏其他 Shell 中存在的一些现代化特性。 + +![Linux 中的 Bash shell][2] + +#### 安装 + +- 在 Linux 发行版中打开终端。 +- 输入 `bash --version` 检查是否已安装 Bash。 +- 若尚未安装,使用软件包管理器安装 Bash。例如,在 Ubuntu 上,输入 `sudo apt-get install bash`。 +- 对于 Fedora 和基于 RPM 的 Linux,请使用 `sudo dnf install bash`。 + +### Zsh + +[Zsh][3],全称 “Z Shell”,是一种强大且功能丰富的 Shell,深受经验丰富的用户欢迎。它吸取了 Bash 和其他 Shell 的优点,提升了用户体验。 + +#### Zsh 的优势 + +Zsh 提供了几个优势,包括: + +- 高级自动补全:Zsh 在 Bash 的基础上提供了更多上下文感知的建议,超越了简单的 `Tab` 键补全。 +- 当你按下 `Tab` 键时,Zsh 会显示可能的值以供选择,同时进行自动补全。 +- 插件支持:通过社区中提供的各种插件,扩展 Zsh 的功能。 +- 这里有一个 [庞大的 Zsh 主题集合][4]。 +- 你还可以使用 [Oh My Zsh 脚本][5] 进行广泛的自定义。 + +![应用 powerlevel10k zsh 主题后的效果][6] + +Zsh 的复杂性可能使新手感到不知所措,其丰富的配置选项可能会使初学者感到困惑。 + +以下是安装 Zsh 的方法: + +- 在 Linux 发行版中打开终端。 +- 输入 `zsh --version` 检查是否已安装 Zsh。 +- 如果尚未安装,请使用软件包管理器安装 Zsh。 +- 例如,在 Ubuntu 上,输入 `sudo apt-get install zsh`。 +- 对于 Fedora 和基于 RPM 的发行版,输入 `sudo dnf install zsh`。 + +### Fish Shell + +[Fish][7],全称 “Friendly Interactive SHell”,着重于用户友好性和易用性。它拥有现代、直观的界面,特别适合新的 Linux 用户。 + +#### Fish 的独特特性 + +Fish 的独特之处在于: + +- 语法高亮:使用彩色标记文本来区分命令、选项和参数。 +- 自动建议:Fish 根据你的历史记录和当前输入智能地建议命令。 +- Fish 被设计为开箱即用的高效工具。但是,你可以通过创建 `~/.config/fish/config.fish` 文件并添加自定义配置来进一步个性化它。 + +虽然 Fish 在用户友好性方面表现出色,但其独特的设计可能并不适合所有人。一些高级用户可能会发现某些功能在高级使用方面有所限制。 + +![Fish Shell][8] + +#### Fish Shell 的安装 + +- 在 Linux 发行版中打开终端。 +- 输入 `fish --version` 检查是否已安装 Fish。 +- 如果尚未安装,请使用软件包管理器安装 Fish。例如,在 Ubuntu 上,输入 `sudo apt-get install fish`。 +- 对于 Fedora 和其他基于 RPM 的发行版,输入 `sudo dnf install fish`。 + +### Bash、Zsh 和 Fish 的比较 + +为了帮助你决定哪种 Shell 适合你的需求,让我们从各个方面比较这三个流行选择: + +#### 性能与速度 + +Bash 以其速度和高效性而闻名,适用于资源受限的系统。Zsh 虽然稍慢一些,但其广泛的功能和能力弥补了这一点。作为更具交互性的 Shell,Fish Shell 可能会略微降低性能,但提供了愉快的用户体验。 + +#### 用户界面和体验 + +Bash 的界面简单明了,非常适合初学者,而 Zsh 和 Fish 提供了更引人注目和交互式的界面。Zsh 的高级自动补全和 Fish 的语法高亮为用户创造了视觉上的吸引力。 + +#### 可定制性和插件 + +Zsh 在可定制性方面表现出色,允许用户对其 Shell 环境进行微调。通过庞大的插件集合,Zsh 提供了无与伦比的可扩展性。Fish 则采取了更有主见的方式,专注于开箱即用的可用性,这可能对某些用户有所限制。 + +### 选择合适的 Shell + +选择合适的 Shell 与你的具体需求和经验水平密切相关。 + +如果你是 Linux 的新手并且更喜欢简单、无花俏的体验,Bash 是一个极好的起点。它的易用性和详尽的文档使其非常适合初学者。 + +对于希望更多掌握控制权并愿意花时间进行定制的经验丰富的用户来说,Zsh 强大的功能和插件提供了一个令人兴奋和动态的环境。 + +如果你对自动化任务和编写复杂的 Shell 脚本感兴趣,Bash 在 Linux 生态系统中的广泛应用和全面支持使其成为一个可靠的选择。 + +### 结论 + +Bash、Zsh 和 Fish 各有其优势,满足不同用户偏好。如果你刚接触 Linux,Bash 的简单性使其成为一个极好的起点。精通用户和那些寻求定制化的用户可能会觉得 Zsh 更吸引人,而 Fish 的用户友好设计则适合寻求直观界面的初学者。最终,选择权在你手中,探索这些 Shell 将带来更高效和愉悦的 Linux 使用体验。 + +你最喜欢的 Shell 是什么?在下方的评论框中告诉我。 + +*(题图:MJ/b6490b57-63bd-4fdd-bd3f-bf6d4aef1c4a)* + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/linux-shells/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:ChatGPT +校对:[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.gnu.org/software/bash/ +[2]: https://www.debugpoint.com/wp-content/uploads/2023/07/Bash-shell-in-Linux.jpg +[3]: https://www.zsh.org/ +[4]: https://github.com/unixorn/awesome-zsh-plugins +[5]: https://www.debugpoint.com/oh-my-zsh-powerlevel10k/ +[6]: https://www.debugpoint.com/wp-content/uploads/2022/12/After-applying-settings-in-powerlevel10k-zsh-theme.jpg +[7]: https://fishshell.com/ +[8]: https://www.debugpoint.com/wp-content/uploads/2023/07/Fish-Shell.jpg +[9]: https://pixabay.com/users/julesroman-359800/ +[0]: https://img.linux.net.cn/data/attachment/album/202307/27/152721rd48wwn7xxfkngdw.jpg \ No newline at end of file diff --git a/sources/tech/20230719.2 ⭐️⭐️ Linux Shells Bash, Zsh, and Fish Explained.md b/sources/tech/20230719.2 ⭐️⭐️ Linux Shells Bash, Zsh, and Fish Explained.md deleted file mode 100644 index 8dcc363441..0000000000 --- a/sources/tech/20230719.2 ⭐️⭐️ Linux Shells Bash, Zsh, and Fish Explained.md +++ /dev/null @@ -1,154 +0,0 @@ -[#]: subject: "Linux Shells: Bash, Zsh, and Fish Explained" -[#]: via: "https://www.debugpoint.com/linux-shells/" -[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Linux Shells: Bash, Zsh, and Fish Explained -====== - -**A few notes and features of famous Linux shells – Bash, Zsh and Fish.** - -Linux is powerful because of its versatile command line interface to interact with the system. Central to this experience are the shells, which act as the bridge between users and the Linux kernel. This article will explore three popular Linux shells – Bash, Zsh, and Fish – and delve into their unique features and capabilities. - -### Understanding Linux Shells - -#### What is a Shell? - -A shell is a command-line interpreter that allows you to interact with the OS through textual commands. It takes your input, processes it, and communicates with the Linux kernel to execute the requested actions. Finally, it gives you an output. - -Shells play a crucial role in Linux because they enable users to perform various tasks, from simple file navigation to complex system administration tasks. Different shells offer various features, making it essential to choose the right one for your workflow. - -### Bash - -[Bash][1], short for “Bourne Again SHell,” is one of the most widely used and default shells in Linux distributions. It is known for its simplicity and compatibility, making it an excellent choice for beginners. - -#### Features of Bash - -Bash comes with a plethora of features, including: - -- Command History: Easily access previously executed commands with the arrow keys. -- Tab Completion: Save time by letting Bash complete filenames and commands for you. -- Scripting: Write and run shell scripts to automate repetitive tasks. In that way, it’s also a program as well. -- Bash is installed in most of the GNU/Linux systems by default. -- Configuration settings are stored in `.bashrc` at your home directory. - -Like any shell, Bash has its pros and cons. Some advantages of using Bash include its ubiquity, extensive documentation, and vast community support. However, Bash may lack some modern features found in other shells. - -![Bash shell in Linux][2] - -#### Installation - -- Open the terminal in your Linux distribution. -- Check if Bash is already installed by typing: `bash --version`. -- If not installed, use your package manager to install Bash. For example, on Ubuntu, type: `sudo apt-get install bash`. -- For Fedora and RPM-based Linux use `sudo dnf install bash` - -### Zsh - -[Zsh][3], short for “Z Shell,” is a robust, feature-rich shell popular among experienced users. It takes the best from Bash and other shells, enhancing the user experience. - -#### Advantages of Zsh - -Zsh offers several advantages, such as: - -- Advanced Auto-Completion: Zsh goes beyond Bash’s tab completion, providing more context-aware suggestions. -- When you press the tab, Zsh also shows you possible values alongside the auto-completion. -- Plugin Support: Extend Zsh’s functionality through various plugins available in the community. -- Here’s a list of a [vast collection of Zsh themes][4]. -- You can also enjoy extensive customizations using [Oh My Zsh script][5]. - -![After applying settings in powerlevel10k zsh theme][6] - -Zsh’s complexity may overwhelm newcomers, and its extensive configuration options might confuse beginners. - -Here’s how to install it. - -- Open the terminal in your Linux distribution. -- Check if Zsh is installed by typing: zsh –version. -- If not installed, use your package manager to install Zsh. -- For example, on Ubuntu, type: `sudo apt-get install zsh`. -- For Fedora and RPM-based distributions, type: `sudo dnf install zsh`. - -### Fish Shell - -[Fish][7], the “Friendly Interactive SHell,” focuses on user-friendliness and discoverability. It has a modern, straightforward interface that appeals to new Linux users. - -#### Unique Features of Fish - -Fish stands out with its: - -- Syntax Highlighting: Use colour-coded text to distinguish between commands, options, and arguments. -- Autosuggestions: Fish intelligently suggests commands based on your history and current input. -- Fish is designed to work efficiently out of the box. However, you can personalize it further by creating the `~/.config/fish/config.fish` file and adding custom configurations. - -While Fish excels in user-friendliness, its unique approach might not suit everyone. Some power users might find certain features limiting for advanced use. - -![Fish Shell][8] - -#### Fish Shell Installation - -- Open the terminal in your Linux distribution. -- Check if Fish is installed by typing: `fish --version`. -- If not installed, use your package manager to install Fish. For example, on Ubuntu, type: `sudo apt-get install fish`. -- For Fedora and other RPM-based distributions type: `sudo dnf install fish`. - -### Comparison of Bash, Zsh, and Fish - -To help you decide which shell fits your needs, let’s compare these three popular choices in various aspects: - -#### Performance and Speed - -Bash is known for its speed and efficiency, making it an excellent choice for resource-constrained systems. Zsh, while slightly slower, makes up for it with its extensive features and capabilities. Being more interactive, Fish shell might have a slight performance overhead but provides a delightful user experience. - -#### User Interface and Experience - -Bash’s interface is simple and straightforward, ideal for beginners, while Zsh and Fish offer more eye-catching and interactive interfaces. Zsh’s advanced auto-completion and Fish’s syntax highlighting create a visually appealing experience. - -#### Customizability and Plugins - -Zsh shines in customizability, allowing users to fine-tune their shell environment. With a vast collection of plugins, Zsh offers unparalleled extensibility. Fish takes a more opinionated approach, focusing on out-of-the-box usability, which might be limiting for some users. - -### Choosing the Right Shell - -The choice of the right shell largely depends on your specific needs and level of experience. - -Bash is an excellent starting point if you are new to Linux and prefer a straightforward, no-frills experience. Its ease of use and extensive documentation make it beginner-friendly. - -For experienced users who want more control and are willing to invest time in customization, Zsh’s powerful features and plugins offer an exciting and dynamic environment. - -If you’re interested in automating tasks and writing complex shell scripts, Bash’s wide adoption and extensive support in the Linux ecosystem make it a reliable choice. - -### Conclusion - -Bash, Zsh, and Fish each have their strengths and cater to different user preferences. If you’re new to Linux, Bash’s simplicity makes it an excellent starting point. Power users and those seeking customization may find Zsh more appealing, while Fish’s user-friendly design suits beginners looking for an intuitive interface. Ultimately, the choice is yours, and exploring these shells will lead to a more efficient and enjoyable Linux experience. - -What is your favourite Shell? Let me know in the comment box below. - -_Feature Image by [julia roman][9] from Pixabay._ - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/linux-shells/ - -作者:[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.gnu.org/software/bash/ -[2]: https://www.debugpoint.com/wp-content/uploads/2023/07/Bash-shell-in-Linux.jpg -[3]: https://www.zsh.org/ -[4]: https://github.com/unixorn/awesome-zsh-plugins -[5]: https://www.debugpoint.com/oh-my-zsh-powerlevel10k/ -[6]: https://www.debugpoint.com/wp-content/uploads/2022/12/After-applying-settings-in-powerlevel10k-zsh-theme.jpg -[7]: https://fishshell.com/ -[8]: https://www.debugpoint.com/wp-content/uploads/2023/07/Fish-Shell.jpg -[9]: https://pixabay.com/users/julesroman-359800/ \ No newline at end of file From 679095107dca15c8f2c038555b47eee614bf99d2 Mon Sep 17 00:00:00 2001 From: wuming <113267247+wcjjdlhws@users.noreply.github.com> Date: Thu, 27 Jul 2023 16:07:17 +0800 Subject: [PATCH 11/72] Update 20221003 Is your old computer -obsolete-, or is it a Linux opportunity-.md --- ...ur old computer -obsolete-, or is it a Linux opportunity-.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20221003 Is your old computer -obsolete-, or is it a Linux opportunity-.md b/sources/talk/20221003 Is your old computer -obsolete-, or is it a Linux opportunity-.md index 7804bd48ee..be27cc9e8a 100644 --- a/sources/talk/20221003 Is your old computer -obsolete-, or is it a Linux opportunity-.md +++ b/sources/talk/20221003 Is your old computer -obsolete-, or is it a Linux opportunity-.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/10/obsolete-computer-linux-opportunity" [#]: author: "Phil Shapiro https://opensource.com/users/pshapiro" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "wcjjdlhws" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 94b587746c623a2408ddf39f2db24a87260690b0 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 28 Jul 2023 06:38:49 +0800 Subject: [PATCH 12/72] RP @geekpi https://linux.cn/article-16040-1.html --- ...tall Jupyter Notebook in Debian or Ubuntu Linux.md | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) rename {translated/tech => published}/20230716.1 ⭐️⭐️ How to Install Jupyter Notebook in Debian or Ubuntu Linux.md (79%) diff --git a/translated/tech/20230716.1 ⭐️⭐️ How to Install Jupyter Notebook in Debian or Ubuntu Linux.md b/published/20230716.1 ⭐️⭐️ How to Install Jupyter Notebook in Debian or Ubuntu Linux.md similarity index 79% rename from translated/tech/20230716.1 ⭐️⭐️ How to Install Jupyter Notebook in Debian or Ubuntu Linux.md rename to published/20230716.1 ⭐️⭐️ How to Install Jupyter Notebook in Debian or Ubuntu Linux.md index fb509c6176..29efca2acd 100644 --- a/translated/tech/20230716.1 ⭐️⭐️ How to Install Jupyter Notebook in Debian or Ubuntu Linux.md +++ b/published/20230716.1 ⭐️⭐️ How to Install Jupyter Notebook in Debian or Ubuntu Linux.md @@ -3,14 +3,16 @@ [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-16040-1.html" -如何在 Debian 或 Ubuntu Linux 中安装 Jupyter Notebook +如何在 Linux 中安装 Jupyter Notebook ====== -**有关如何在 Ubuntu 或 Debian Linux 中安装 Jupyter Notebook 的简单教程。** +![][0] + +> 如何在 Ubuntu 或 Debian Linux 中安装 Jupyter Notebook 的简单教程。 [Jupyter][1] Notebook 是一款功能强大的基于 Web 的交互式开发工具,可让你创建和共享实时代码、可视化和交互式数据。其笔记本格式结合了代码和文本,使其成为数据探索、分析和协作项目的绝佳选择。 @@ -18,9 +20,9 @@ ### 安装 pip -在开始之前,请确保你的系统上已安装 pip(Python 包安装程序)。如果你已经安装了 pip,则可以跳过此步骤。否则,请按照以下说明进行安装。你还可以访问[此页面][2]获取详细说明。 +在开始之前,请确保你的系统上已安装 `pip`(Python 包安装程序)。如果你已经安装了 `pip`,则可以跳过此步骤。否则,请按照以下说明进行安装。你还可以访问 [此页面][2] 获取详细说明。 -打开终端窗口 (Ctrl+Alt+T) 并输入以下命令,按回车键: +打开终端窗口(`Ctrl+Alt+T`)并输入以下命令,按回车键: ``` sudo apt updatesudo apt install python3-pip @@ -50,11 +52,11 @@ sudo apt install python3-virtualenv virtualenv my-jupyter-env ``` -此命令创建一个名为 “my-jupyter-env” 的新目录,其中将包含虚拟环境文件。 +此命令创建一个名为 `my-jupyter-env` 的新目录,其中将包含虚拟环境文件。 ![create jupyter environment][3] -你还可以通过任何文件管理器验证该目录是否在你的主文件夹下创建。 +你还可以通过任何文件管理器验证该目录是否在你的主文件夹下创建成功。 ![jupyter env folders][4] @@ -102,9 +104,9 @@ jupyter notebook ### 关闭并重新启动 -如果要关闭 Notebook 服务器,请确保关闭并保存所有笔记。关闭浏览器。然后在终端窗口中按 “CTRL+C”。它会提示你是否要关闭服务器。输入 Yes 并按回车键。最后,关闭终端窗口。 +如果要关闭 Notebook 服务器,请确保关闭并保存所有笔记。关闭浏览器。然后在终端窗口中按 `CTRL+C`。它会提示你是否要关闭服务器。输入 `Yes` 并按回车键。最后,关闭终端窗口。 -要再次重新启动服务器,你需要按上面的描述运行 “virtualenv my-jupyter-env” 等所有命令 +要再次重新启动服务器,你需要按上面的描述运行 `virtualenv my-jupyter-env` 等所有命令 ### 总结 @@ -112,6 +114,8 @@ jupyter notebook 请记住,Jupyter Notebook 支持各种编程语言,包括 Python,并提供大量插件来进一步扩展其功能。 +*(题图:MJ/e3436c7f-435d-491e-9032-b945730cb000)* + -------------------------------------------------------------------------------- via: https://www.debugpoint.com/install-jupyter-ubuntu/ @@ -119,7 +123,7 @@ via: https://www.debugpoint.com/install-jupyter-ubuntu/ 作者:[Arindam][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/) 荣誉推出 @@ -133,3 +137,4 @@ via: https://www.debugpoint.com/install-jupyter-ubuntu/ [6]: https://www.debugpoint.com/wp-content/uploads/2023/07/Installing-jupyter-using-pip.jpg [7]: https://www.debugpoint.com/wp-content/uploads/2023/07/running-jupyter-notebook-in-Debian.jpg [8]: https://www.debugpoint.com/wp-content/uploads/2023/07/Jupyter-notebook-running-in-browser.jpg +[0]: https://img.linux.net.cn/data/attachment/album/202307/28/063430e6lz9elvz4pw55l4.jpg \ No newline at end of file From 6d26120c4f793a67dd1951f33c6d6b9d4261cc17 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 28 Jul 2023 07:41:45 +0800 Subject: [PATCH 13/72] ATRP @wxy https://linux.cn/article-16041-1.html --- ... Every Year is Someone's Year of Linux Desktop.md | 192 ++++++++++++++++++ ... Every Year is Someone's Year of Linux Desktop.md | 189 ----------------- 2 files changed, 192 insertions(+), 189 deletions(-) create mode 100644 published/20230716.0 ⭐️⭐️ Every Year is Someone's Year of Linux Desktop.md delete mode 100644 sources/talk/20230716.0 ⭐️⭐️ Every Year is Someone's Year of Linux Desktop.md diff --git a/published/20230716.0 ⭐️⭐️ Every Year is Someone's Year of Linux Desktop.md b/published/20230716.0 ⭐️⭐️ Every Year is Someone's Year of Linux Desktop.md new file mode 100644 index 0000000000..e65cc32d47 --- /dev/null +++ b/published/20230716.0 ⭐️⭐️ Every Year is Someone's Year of Linux Desktop.md @@ -0,0 +1,192 @@ +[#]: subject: "Every Year is Someone's Year of Linux Desktop" +[#]: via: "https://news.itsfoss.com/filiming-with-foss-tech/" +[#]: author: "Community https://news.itsfoss.com/author/team/" +[#]: collector: "lkxed" +[#]: translator: "ChatGPT" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-16041-1.html" + +每年都是某个人的 “Linux 桌面之年” +====== + +当我的第一部特别电影获得批准时,我正处于为期两年的 Linux 实验中。我是如何使用(大多数)开源软件技术制作我的电影的呢? + +![][0] + +我在 2020 年爱上了 Linux。时机不可能更尴尬了。 + +世界卫生组织宣布我们这一生中的第一次大流行病降临。我刚刚从工作中休假,打算利用这段时间完成硕士学位,并完成我处女作《第一次言辞》的续集。 + +但作家是一群善变的人。有时我们的注意力可以持续数周,锐利无比。有时,我们的注意力却像金鱼一样短暂。 + +那时我处在金鱼模式中。 + +我需要一些东西来逃离我日复一日的生活:醒来,写几个小时,开始学习,完成课程作业,重复。 + +互联网上的某个地方有人提到,大流行病为人们提供了在日常计算中尝试 Linux 的最佳机会。 + +立刻,金鱼般的大脑被吸引住了。 + +这是有充分理由的: + +20 年前,我放弃了电影学院,选择攻读计算机科学学士学位。 + +令我惊讶的是,我发现自己喜欢上了大部分课程(直到我们学习《Java 编程入门》时,我因此退学了,但这是另外一个故事);《计算机体系结构》、《网络》和《系统管理》模块真的引起了我的兴趣,我发现自己在学校实验室里花更多时间在安装了 Linux 的机器上。 + +关键是我和 Linux 之间有历史。 + +而在 2020 年,时机刚刚好。 + +### 疫情期间的技术爱好者生活 + +在我退学后的几年里,我远离了计算机引发我内心的那些好奇心。 + +作为对电影学院的替代,我成为了一名小说家。 + +我从信息技术转向了市场营销,并花费了 20 多年的时间为平面、电视、广播和数字平台撰写广告文案。 + +我创办了自己的广告代理公司。 + +在这 20 年里,我们目睹了社交媒体与互联网变得同义。 + +到了 2020 年,我决定永远离开广告界,其中很大一部分原因是我对技术的幻想破灭,尤其是对社交媒体的失望,特别是社交媒体以冷漠的方式伤害我们,无论是个人还是整个社会。 + +虽然我知道社交媒体并不等同于互联网,但在我的脑海中很难将它们分开。作为一个广告人,我也觉得自己在使社交媒体无处不在方面起到了一定的作用。 + +**拥有自己的 Linux 桌面之年,在整个大流行期间让我保持理智。** + +### 2022 年:我首部特别电影 + +到了 2022 年,我已经在我的笔记本电脑上日常使用 Linux。我还买了一台旧的 ThinkPad T420,安装了 Ubuntu Server,并开始运行 Plex 和 NextCloud 的实例。 + +我在 Linux 上感到很自在,几乎将所有的写作工作都从 MS Word 和云存储转移到了 Vim 和 GitHub 上。 + +就在这时,我接到了一位制片人的电话,批准了我的首部特别电影。 + +此时,我需要做一个决定。在片场剪辑镜头时,我需要使用行业标准的非线性编辑器(NLE)。我对 Adobe Premiere 很熟悉,但我知道没有 Linux 版本。我已经尝试过 Kden Live 和其他几个自由开源软件的替代品,包括内置 NLE 的 Blender,但都不太满意。 + +更重要的是,我担心我的写作流程 —— 完全基于(Neo)Vim 和 Git ——对我的合作作者来说太陌生。 + +### 你好,Windows? + +此时,我不得不问自己 Linux 是否准备好应对我未来的电影工作。为了回答这个问题,我提醒自己以下几点: + +#### Linux 对非技术人员/非程序员来说是开放的(且易于接触) + +我已经足够老了,记得当年 Ubuntu Linux 免费向世界上的任何人寄送安装光盘。那时,我遇到了一系列我无法解决的硬件问题,而且在我主要工具(MS Word)的高质量替代品方面非常匮乏。 + +到了 2020 年代,Linux 已经变得截然不同。安装过程非常简单,帮助文档非常详尽,还有 Linux 的 YouTube 资源,使过渡变得更加顺利,我所有的硬件都完美地工作,我准备彻底放弃 MS Word。 + +#### Git 是作家的(秘密)好朋友 + +自从我第一次理解了 Git 的含义和它的用途以来,我就一直这样认为:不向作家教授 Git 是一种罪过。Linus Torvalds 无意间创造了作家的好朋友。 + +是的,我知道当 Git 无法正常工作时会有多么令人沮丧,但是将软件工程师处理大型代码库、多人贡献的复杂 Git 工作流程剥离后,你会发现它核心的功能似乎刚好为数字时代的作家量身定制。 + +与此同时,我和我的合作作者面临两个问题。由于我们位于不同的大陆,我们需要一个满足以下条件的系统: + +以一种不会将文件弄得一团糟而无法阅读的方式追踪更改(这样在 MS Word、谷歌文档上进行协作会非常痛苦); + +以行业标准格式格式化剧本,而无需购买 Final Draft 等剧本撰写软件。 + +Git 和 GitHub 满足了第一个要求。而专门为剧本撰写创建的标记语法 [Fountain][5] 解决了第二个问题。 + +#### Linux 和好莱坞 + +这可能会让很多人感到惊讶,但自上世纪 90 年代以来,Linux 已经牢固地融入了好莱坞的后期制作工作流程中。 + +早在 1998 年,《泰坦尼克号》这样具有标志性的电影的后期制作中,Linux 就扮演了至关重要的角色。BlackMagic 的 [达芬奇调色软件][7]aVinci Resolve 最初是一款在基于 CentOS 或 RHEL 的系统上运行的首选色彩分级工具。 + +如今,达芬奇调色软件已成为一款功能完备的编辑器,是电影制片人和 YouTuber 们的首选工具。对我们 Linux 用户而言,该公司继续提供其软件的免费版本以供 Fedora 和基于 Debian 的系统使用。对于 Arch 用户,AUR 中也提供了一个达芬奇调色软件版本,尽管我没有亲自测试过。具体效果可能因人而异。 + +### 如何在大部分 FOSS 技术的支持下完成我的电影 + +让我分享一下我的电影制作工作流程。 + +#### 前期制作 + +##### 影片概念说明 + +我使用 NeoVim 和 Org 模式语法编写了 [影片概念说明][8]。Org 模式对于编写类似报告的文档结构非常有用。[Vim-org][10] 能够轻松将文档导出为 PDF、LaTeX、HTML 和 doc 格式。我喜欢将我的文档保存为开放文件标准,以确保在各种设备间的可移植性,所以我选择了 PDF 格式。下面的截图是电影拍摄前的最终影片概念说明: + +![影片概念说明][11] + +##### 剧本 + +我与合作作者商定了一种简单的工作流程。我在一天的时间里向她介绍了 VSCode、Fountain、Git 和 GitHub 的基本知识,之后她就得心应手了。此后的合作过程基本上是无缝的,基于 Git 的工作流程对我们两个人来说几乎成为自然而然的事情。请记住,我们两个人都不具备软件背景。下面的图片显示了 NeoVim 上正在编辑的 Fountain 剧本文件,而右侧的屏幕上是 [Zathura PDF 阅读器][12] 即时渲染的剧本。 + +![使用自由开源软件技术进行剧本创作][13] + +#### 制作 + +##### 每日镜头回顾 + +我们在锡哈拉加雨林进行了主要拍摄,这是该国最古老的森林之一。我们在那里待了一个星期。我带上了我的日常使用机(一台运行 Ubuntu Studio 20.04 的 Dell XPS 9750),在一天的拍摄结束后使用达芬奇调色软件来回顾当天的镜头。 + +##### 使用 Rsync 进行备份 + +负责备份每日镜头素材的工作人员会在主硬盘上进行备份,然后在其他外部存储设备上进行二次备份。由于我也带了我的 ThinkPad 服务器,我使用 [Rsync][14] 自动化进行备份。 + +#### 后期制作 + +##### 编辑 + +尽管我的 XPS 笔记本内部配置足以处理这个项目,但我并不打算在上面进行影片编辑。最初,我是在工作室的一台运行达芬奇调色软件的 Windows 机器上进行编辑的。不幸的是,2022 年第二季度,斯里兰卡经济陷入了自由落体,该国已经无法偿还债务。燃料短缺和停电使得我无法前往工作室进行编辑工作,增加了我的困扰。 + +就在这时,我的调色师建议我们将项目转移到我的笔记本电脑上,这样我就可以在家工作。他多年来一直在 CentOS 上运行达芬奇调色软件,他认为在 Ubuntu 机器上做同样的工作没有问题。为了确保我可以进行快速编辑,他将代理素材转码为 [ProRes 422][15] 720p。 + +一旦我们克服了这些小问题,编辑本身就是非常稳定和无压力的操作。完成后,我的电影制作人朋友们都在问我一台运行 Linux 的笔记本电脑是如何处理这个项目的。 + +### 结论:我们到达目的地了吗? + +在某个时刻,每个最近转向 Linux 的人都会参与到“Linux 桌面之年”的辩论中。 + +三年过去了,我的观念发生了变化:从理想主义(大约在 2030 年左右),到现实主义(永远不会发生),再到我目前的立场:《Linux 桌面之年》掌握在“技术探索者”的手中。 + +“技术探索者”被技术所吸引,有时超出主流的范畴。 + +而作为对社交媒体技术和大型科技公司感到幻灭的人,我正好处于尝试 Linux 桌面的理想状态。 + +如果以我的经验为例,大多数精通技术的人都可以实现 “Linux 桌面之年”。通过使用其他自由开源软件工具(如 Git、Fountain、Markdown、LaTeX、Org 模式和(Neo)Vim),我相信像我这样的小说家和电影制片人类型的人有足够的理由转向 Linux。 + +当然,如果 Black Magic 没有推出达芬奇调色软件的 Linux 版本,我就不能说这番话,但幸运的是,他们不是 Adobe 或微软。 + +要让人们接受 Linux 桌面,关键是专有软件的开发者们也要加入进来,承认 Linux 领域有一些用户需要与 Windows 和 Mac 领域同样的工具。如果这种情况发生,我们可能会看到 “Linux 桌面” 从梗成为现实。 + +> 📋 由斯里兰卡的小说家/电影制片人 [Theena Kumaragurunathan][17] 撰写。他的首部小说已在 [亚马逊 Kindle][18] 上发售,并且他的第一部长片正在筹备发行中。 + +*(题图:MJ/1bace6a9-5d11-4cae-921c-18a850b7bff1)* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/filiming-with-foss-tech/ + +作者:[Theena Kumaragurunathan][a] +选题:[lkxed][b] +译者:ChatGPT +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/team/ +[b]: https://github.com/lkxed/ +[1]: https://news.itsfoss.com/content/images/size/w1304/2023/07/year-of-linux-desktop-1.png +[2]: https://www.amazon.com/First-Utterance-Miragian-Cycles-Book-ebook/dp/B08MBX8GRZ +[3]: https://www.cambridge.org/core/journals/law-and-social-inquiry/article/abs/is-facebook-the-internet-ethnographic-perspectives-on-open-internet-governance-in-brazil/CF7526E09C0E05DCD587DC8E0E01D9C1 +[4]: https://news.itsfoss.com/configuring-vim-writing/ +[5]: https://fountain.io/ +[6]: https://www.linuxjournal.com/article/2494 +[7]: https://www.blackmagicdesign.com/products/davinciresolve +[8]: https://www.studiobinder.com/blog/what-is-a-film-treatment-definition/#:~:text=A%20film%20treatment%20is%20a,or%20even%20purchasing%20your%20idea. +[9]: https://orgmode.org/ +[10]: https://www.vim.org/scripts/script.php?script_id=3642 +[11]: https://news.itsfoss.com/content/images/2023/07/filming-with-foss-tech.jpg +[12]: https://pwmt.org/projects/zathura/ +[13]: https://news.itsfoss.com/content/images/size/w2400/2023/07/film-scripting-with-foss.jpg +[14]: https://www.wikiwand.com/en/Rsync +[15]: https://support.apple.com/en-us/HT202410 +[16]: https://www.google.com/search?q=year+of+linux+desktop&sourceid=chrome&ie=UTF-8 +[17]: https://theena.net/ +[18]: https://www.amazon.com/First-Utterance-Miragian-Cycles-Book-ebook/dp/B08MBX8GRZ +[0]: https://img.linux.net.cn/data/attachment/album/202307/28/073821x1krrwlm1081jk8k.jpg \ No newline at end of file diff --git a/sources/talk/20230716.0 ⭐️⭐️ Every Year is Someone's Year of Linux Desktop.md b/sources/talk/20230716.0 ⭐️⭐️ Every Year is Someone's Year of Linux Desktop.md deleted file mode 100644 index b8d7b78d3d..0000000000 --- a/sources/talk/20230716.0 ⭐️⭐️ Every Year is Someone's Year of Linux Desktop.md +++ /dev/null @@ -1,189 +0,0 @@ -[#]: subject: "Every Year is Someone's Year of Linux Desktop" -[#]: via: "https://news.itsfoss.com/filiming-with-foss-tech/" -[#]: author: "Community https://news.itsfoss.com/author/team/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Every Year is Someone's Year of Linux Desktop -====== - -I was in the midst of 2-year long Linux Experiment when my first feature film was green-lit. How did I make my film using (mostly) FOSS tech? - -![Year of Linux desktop][1] - -I fell in love in 2020. The timing couldn't have been more awkward. - -The WHO had declared that the first pandemic of our lifetimes was upon us. I had just taken a sabbatical from work, intending to spend the time finishing a Master's, and the follow-up to my debut novel _[First Utterance][2]_. - -But writers are a moody bunch. Sometimes our focus is razor sharp and sustained over weeks. Sometimes, we have the attention span of goldfish. - -I was in goldfish mode. - -I needed something to escape my daily grind: wake up, write for a few hours, get to study, finish assignments for classes, repeat. - -Someone, somewhere on the internet mentioned that the pandemic offered the best opportunity for people to experiment with Linux for their daily computing. - -Immediately, the goldfish brain's attention was grabbed. - -There was a good reason for this: - -20 years earlier, I had forgone film school for a Bachelor's in Computer Science. - -To my surprise, I found myself enjoying most of the course (until we arrived at _Introduction to Programming with Java_, causing me to drop out of my undergrad, but that's a whole other story); _computer architecture_, _networking_ and _system administration_ modules had really piqued my interest, and I found myself at the school lab spending more time on the machines that had Linux installed on them. - -The point is there was history between Linux and I. - -And in 2020, the timing was just right. - -### Nerdery in the Time of Corona - -In the years after I dropped out of my Computer Science undergrad, I had ventured well away from the many curiosities that computing kindled within me. - -In lieu of film school, I became a novelist. - -I moved from IT to Marketing, and spent the better part of 20 years writing ad copy for print, TV, radio, and digital platforms. - -I started my own advertising agency. - -In those 20 years, we saw [social media become synonymous with the internet][3]. - -By 2020, I had decided to leave advertising for good, and a large portion of that was how disillusioned I had become with technology, particularly social media, and particularly the callous ways in which social media was harming us, as individuals and societies. - -And though I know social media isn't the internet, it was still very hard to uncouple it in my mind. Being in advertising, I also felt like I had played a small role in making social media damningly ubiquitous. - -**_My Year of Linux Desktop kept me sane through the pandemic._** - -### 2022: My First Feature Film - -By the time 2022 rolled over, I was daily driving Linux on my laptop. I also had bought myself an old ThinkPad T420, installed Ubuntu Server on it, and began running instances of Plex and NextCloud. - -I was comfortable on Linux, having moved almost all [my writing work from MS Word and Cloud-based storage to Vim and GitHub][4]. - -And that's when I got the call from a producer, greenlighting my first film. - -At this point, I had a decision to make. I would be cutting dailies while on set which meant I would need an industry standard Non-Linear Editor (NLE). I was comfortable on Adobe Premiere but knew there was no Linux port. I had already tried Kden Live and a couple of other FOSS alternatives, including Blender (which has a built-in NLE) but was left unsatisfied. - -More immediately, I was worried that my writing workflow - which had become completely (Neo)Vim and Git-centric - would be too alien for my co-writer. - -### Hello, Windows?! - -At this point, I had to ask myself if Linux was ready for my film work ahead. To answer that, I reminded myself of the following: - -#### Linux is Open (and Accessible) for Non-Tech/Non-Programmers - -I am old enough to have tried Ubuntu Linux way back when they were shipping installation CDs to anyone in the world, for free. Back then, I had a host of hardware problems that I couldn't resolve, and a serious dearth in quality alternatives for my main tool: MS Word. - -The Linux of 2020s was vastly different. Installation was a breeze, the help documentation was incredibly exhaustive, Linux YouTube existed making the transition all the more seamless, all my hardware worked flawlessly, and I was ready to abandon MS Word for good. - -#### Git is A Writer's (Secret) Best Friend - -I have thought this countless times since I first understood what Git was and what it was trying to do: the fact that Git isn't taught to writers is _criminal_. Linus Torvald inadvertently created a writer's best friend. - -Yes, I am aware of how frustrating Git can be when it isn't working, but strip away all that complexity in Git workflows that software engineers deal with when grappling with large code bases that have contributions from multiple individuals, and you are left with a core functionality that is seemingly custom-built for writers in the digital age. - -Meanwhile, my co-writer and I were faced with two issues. Being in two different continents, we needed a system that checked the following boxes: - -Tracked changes in a way that didn't make the file an unreadable mess (which makes collaboration on MS Word, Google Docs an absolute pain) - -Format the script in industry standard format without the need to purchase screenwriting software such as Final Draft. - -Git and GitHub fit the first requirement. [Fountain][5], a markup syntax created specifically for screenwriting, answered the second question. - -#### Linux and Hollywood - -It might surprise a lot of people, but Linux has firmly embedded itself into Hollywood post-production workflows since the 90s. - -As far back as 1998, Linux was a critical part of the post-production work in as iconic a film as [Titanic][6]. [BlackMagic's DaVinci Resolve][7] began its life as a colour-grading tool of choice, running on CentOS or RHEL-based systems. - -Today, DaVinci Resolve is a fully-fledged editor and is the tool of choice for film-makers and YouTubers. Luckily for us Linux users, the company has continued to make its free version of the software available for Fedora and Debian-based systems. Arch users: the AUR has a version of DaVinci Resolve available as well, though I haven't tested it. Your mileage may vary. - -### How I Made My Feature Film Using Mostly FOSS Tech - -Let me share my filmmaking workflow - -#### Pre-Production - -##### Film Treatment - -I wrote the [film treatment][8] using NeoVim using [Org mode][9] syntax. Orgmode is great for writing report-like document structures. [Vim-org][10] allows for easy export to PDF, LaTeX, HTML and doc formats. I like to keep my documentation in open file standards, ensuring portability across devices so I chose PDF. The screenshot below is the final film treat for the film before principal photography began: - -![Film treatment][11] - -##### Script - -My co-writer and I worked settled on a simple workflow. I gave her a very basic introduction to VSCode, Fountain, Git and GitHub over the course of a day, after which she was up and running. The collaborative process there after was mostly seamless, with the Git based workflow becoming almost natural for both of us. Bear in mind, neither of us are from a software background. The image below is the script in fountain file being edited on NeoVim, while the right screen is [Zathura PDF reader][12] live rendering the script. - -![Scripting with FOSS tech][13] - -#### Production - -##### Reviewing Dailies - -Principal photograph was in Sinharaja Rain Forest, one of the most ancient forsests in the country. We were to be there for a week. I took my daily driver (a Dell XPS 9750 running Ubuntu Studio 20.04) to the set and used DaVinci Resolve to review dailies after the end of a day's shoot. - -##### Backup using Rsync - -The crew responsible for backing up daily footage would back up the material on a master hard disk, before making secondary backups on other external storage. Since I had taken my ThinkPad server along as well, I used that to automate the backing up using [Rsync][14]. - -#### Post-Production - -##### Editing - -I wasn't intending to edit the film on my XPS laptop though it certainly had the internals to handle the project. Originally, I was editing in a studio on a Windows machine running DaVinci Resolve. Unfortunately, the second quarter of 2022 saw Sri Lanka's economy free-falling after the country had defaulted on its debt payments. Adding to the misery, both fuel shortages and power cuts meant there was no way I could visit the studio to do the work. - -It was at this point that my color-gradist suggested that we move the project to my laptop so I could work from home. He had worked on DaVinci Resolve running on CentOS for years and saw no issue doing the same on an Ubuntu machine. To make extra sure, he transcoded proxy footage to [ProRes 422][15] 720p to ensure that I could edit at speed. - -Once we overcame these little hurdles, the editing itself was a very stable and stress-free operation. Once I finished, I had questions from my filmmaker friends on how a laptop running Linux handled the project. The below image is a screenshot running neofetch on that machine. - -### Conclusion: Are We There Yet? - -At some point, every recent Linux convert will join the _[Year of Linux Desktop][16]_ debate. - -Three years into my journey, my thoughts on that have changed: from the idealistic (_sometime around the 2030s_), to the realist (_It's never happening_), to my current position: _The Year of Linux Desktop_ is in the hands of the _Tech-curious_. - -The _Tech-curious_ are drawn to technology, sometimes outside the umbrella of the mainstream. - -And I, disillusioned from social media technology and giant tech corporations in general, was in the perfect mindspace for experimenting with Linux desktop. - -If my experience is anything to go by, the Year of Linux Desktop is within grasp for most tech-savvy people. With the addition of other FOSS tools like Git, Fountain, Markdown, LaTeX, Org Mode, and (Neo)Vim, I believe there is a good case for novelist-filmmakers types like myself to make the jump. - -Of course, I wouldn't have been able to say this if Black Magic hadn't made a Linux port of DaVinci Resolve, but fortunately, they aren't Adobe or Microsoft. - -For people to embrace Linux Desktop, it is critical that makers of proprietary software also buy-in, acknowledging that there are users in the Linux space who require the same tools as their counterparts in the Windows and Mac lands. If and when that happens, we might just see Linux Desktop graduate from meme to reality. - -> 📋 Written by [Theena Kumaragurunathan][17], a novelist / filmmaker based in Sri Lanka. His debut novel is out on [Amazon kindle][18] and his first feature film is currently is finalizing distribution. - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/filiming-with-foss-tech/ - -作者:[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://news.itsfoss.com/author/team/ -[b]: https://github.com/lkxed/ -[1]: https://news.itsfoss.com/content/images/size/w1304/2023/07/year-of-linux-desktop-1.png -[2]: https://www.amazon.com/First-Utterance-Miragian-Cycles-Book-ebook/dp/B08MBX8GRZ -[3]: https://www.cambridge.org/core/journals/law-and-social-inquiry/article/abs/is-facebook-the-internet-ethnographic-perspectives-on-open-internet-governance-in-brazil/CF7526E09C0E05DCD587DC8E0E01D9C1 -[4]: https://news.itsfoss.com/configuring-vim-writing/ -[5]: https://fountain.io/ -[6]: https://www.linuxjournal.com/article/2494 -[7]: https://www.blackmagicdesign.com/products/davinciresolve -[8]: https://www.studiobinder.com/blog/what-is-a-film-treatment-definition/#:~:text=A%20film%20treatment%20is%20a,or%20even%20purchasing%20your%20idea. -[9]: https://orgmode.org/ -[10]: https://www.vim.org/scripts/script.php?script_id=3642 -[11]: https://news.itsfoss.com/content/images/2023/07/filming-with-foss-tech.jpg -[12]: https://pwmt.org/projects/zathura/ -[13]: https://news.itsfoss.com/content/images/size/w2400/2023/07/film-scripting-with-foss.jpg -[14]: https://www.wikiwand.com/en/Rsync -[15]: https://support.apple.com/en-us/HT202410 -[16]: https://www.google.com/search?q=year+of+linux+desktop&sourceid=chrome&ie=UTF-8 -[17]: https://theena.net/ -[18]: https://www.amazon.com/First-Utterance-Miragian-Cycles-Book-ebook/dp/B08MBX8GRZ From 424a42f3fde9285aa222dc87e53b422629b3b577 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 28 Jul 2023 09:13:18 +0800 Subject: [PATCH 14/72] translated --- ... How to Access the GRUB Menu in Virtual Machine.md | 109 ------------------ ... How to Access the GRUB Menu in Virtual Machine.md | 109 ++++++++++++++++++ 2 files changed, 109 insertions(+), 109 deletions(-) delete mode 100644 sources/tech/20230714.0 ⭐️⭐️ How to Access the GRUB Menu in Virtual Machine.md create mode 100644 translated/tech/20230714.0 ⭐️⭐️ How to Access the GRUB Menu in Virtual Machine.md diff --git a/sources/tech/20230714.0 ⭐️⭐️ How to Access the GRUB Menu in Virtual Machine.md b/sources/tech/20230714.0 ⭐️⭐️ How to Access the GRUB Menu in Virtual Machine.md deleted file mode 100644 index fc337375ac..0000000000 --- a/sources/tech/20230714.0 ⭐️⭐️ How to Access the GRUB Menu in Virtual Machine.md +++ /dev/null @@ -1,109 +0,0 @@ -[#]: subject: "How to Access the GRUB Menu in Virtual Machine" -[#]: via: "https://itsfoss.com/access-grub-virtual-machine/" -[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How to Access the GRUB Menu in Virtual Machine -====== - -Most modern VMs are configured to skip the [GRUB bootloader][1] for a seamless experience. - -However, you might need to access the GRUB menu at times. For example, if you want to switch back to the older kernel or get into recovery mode for [resetting the password][2]. - -> 💡 Reboot your VM and keep the Shift key pressed when it is booting up again. This should give you the GRUB menu. - -In this quick article, I will be showing you two ways to access the GRUB menu in Linux running in a virtual machine: - -- A temporary solution (when you have to access GRUB once or twice) -- A permanent solution (will show GRUB at every boot) - -As most of the users are not going to interact with the grub on a daily basis, I will start with a temporary solution in which you can access the grub without any tweaks. - -> 📋 I have used Ubuntu in the tutorial here but the steps should be valid for other Linux distributions as well. - -### Access the GRUB bootloader in VM (Quick way) - -If you want to access the GRUB occasionally, this is supposed to be the best way as it does not require any configuration. - -Just reboot your system and keep the `shift` key pressed. - -That's it! - -You will have your grub menu without any time limit: - -![Accessing grub menu in VM using shift key][3] - -Pretty simple way. Isn't it? - -But it will work for that specific boot only. So what if you want to have the grub on every boot? Refer to the given method. - -### Enable Grub menu in virtual machines permanently (if you want to) - -> 🚧 This method requires changing Grub config file in the command line. Please ensure that you are comfortable doing the edits in the terminal. - -If you have to deal with the grub menu to access the other operating systems or change[boot from the older kernels][4] often, this method is just for you. - -To make the grub accessible at every boot, you must make changes in the configuration file. - -First, open the grub config file using the following command: - -``` -sudo nano /etc/default/grub -``` - -Here, change the `GRUB_TIMEOUT_STYLE=hidden` to the `GRUB_TIMEOUT_STYLE=menu`: - -![change grub timeout style][5] - -Next, in the same config file, specify for how many seconds you want the grub to be displayed. - -I would recommend 5 seconds as it seems to balance between not too long and short (yep, quite relatable): - -``` -GRUB_TIMEOUT=5 -``` - -![configure grub timeout in ubuntu][6] - -And finally, you can [save the changes and exit from the nano][7] text editor. - -To activate the changes you made to the config file, update the grub using the following command: - -``` -sudo update-grub -``` - -That's it. Reboot your system and the grub should be there for 5 seconds. - -### How about theming GRUB? - -You will get the grub bootloader in most of the Linux distros as it is quite simple to configure and gets the job done. - -But by default, it's nothing apart from the black background and plain text. So we made a guide on how you can make it look dope: - -I hope you will find this guide helpful and if you have any queries, let me know in the comments. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/access-grub-virtual-machine/ - -作者:[Sagar Sharma][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/sagar/ -[b]: https://github.com/lkxed/ -[1]: https://itsfoss.com/what-is-grub/ -[2]: https://itsfoss.com/how-to-hack-ubuntu-password/ -[3]: https://itsfoss.com/content/images/2023/07/access-GRUB-in-Ubuntu-VM.gif -[4]: https://itsfoss.com/boot-older-kernel-default/ -[5]: https://itsfoss.com/content/images/2023/07/change-grub-style.webp -[6]: https://itsfoss.com/content/images/2023/07/configure-grub-timeout-in-ubuntu.webp -[7]: https://linuxhandbook.com/nano-save-exit/ diff --git a/translated/tech/20230714.0 ⭐️⭐️ How to Access the GRUB Menu in Virtual Machine.md b/translated/tech/20230714.0 ⭐️⭐️ How to Access the GRUB Menu in Virtual Machine.md new file mode 100644 index 0000000000..5237183bb2 --- /dev/null +++ b/translated/tech/20230714.0 ⭐️⭐️ How to Access the GRUB Menu in Virtual Machine.md @@ -0,0 +1,109 @@ +[#]: subject: "How to Access the GRUB Menu in Virtual Machine" +[#]: via: "https://itsfoss.com/access-grub-virtual-machine/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +如何访问虚拟机中的 GRUB 菜单 +====== + +大多数现代虚拟机都配置为跳过 [GRUB 引导加载程序][1]以获得无缝体验。 + +但是,你有时可能需要访问 GRUB 菜单。例如,如果你想切换回旧内核或进入恢复模式以[重置密码][2]。 + +> 💡 重启虚拟机并在再次启动时按住 Shift 键。这将为你提供 GRUB 菜单。 + +在这篇简短的文章中,我将向你展示两种访问虚拟机中运行的 Linux 中的 GRUB 菜单的方法: + +- 临时方案(当你需要访问 GRUB 一次或两次时) +- 永久方案(每次启动时都会显示 GRUB) + +由于大多数用户不会每天与 grub 交互,因此我将从一个临时解决方案开始,你可以在其中无需任何调整即可访问 grub。 + +> 📋 我在此处的教程中使用了 Ubuntu,但这些步骤也适用于其他 Linux 发行版。 + +### 在虚拟机中访问 GRUB 引导加载程序(快速方式) + +如果你偶尔想访问 GRUB,这应该是最好的方法,因为它不需要任何配置。 + +只需重新启动系统并按住 `shift` 键即可。 + +就是这样! + +你将拥有没有任何时间限制的 grub 菜单: + +![Accessing grub menu in VM using shift key][3] + +很简单的方法。不是吗? + +但它仅适用于特定的启动。那么如果你想在每次启动时都进入 grub 该怎么办呢? 请参考下面的方法。 + +### 永久在虚拟机中启用 Grub 菜单(如果你愿意) + +> 🚧 此方法需要在命令行中更改 Grub 配置文件。请确保你能够轻松地在终端中进行编辑。 + +如果你需要处理 grub 菜单来访问其他操作系统或经常更改[从旧内核启动][4],那么此方法非常适合你。 + +要使 grub 在每次引导时都可访问,你必须在配置文件中进行更改。 + +首先,使用以下命令打开 grub 配置文件: + +``` +sudo nano /etc/default/grub +``` + +在这里,将 `GRUB_TIMEOUT_STYLE=hidden` 更改为 `GRUB_TIMEOUT_STYLE=menu`: + +![change grub timeout style][5] + +接下来,在同一个配置文件中,指定你希望 grub 显示的秒数。 + +我建议 5 秒,因为它似乎在太长和太短之间取得了平衡(是的,非常相关): + +``` +GRUB_TIMEOUT=5 +``` + +![configure grub timeout in ubuntu][6] + +最后,你可以[保存更改并退出 nano][7] 编辑器。 + +要激活对配置文件所做的更改,请使用以下命令更新 grub: + +``` +sudo update-grub +``` + +就是这样。重启动统,grub 应该会存在 5 秒钟。 + +### 将 GRUB 主题化如何? + +大多数 Linux 发行版都会使用 grub 引导加载程序,因为它的配置非常简单,而且能完成工作。 + +但在默认情况下,除了黑色背景和纯文本外,它什么都不是。因此,我们制作了一份指南,教你如何让它看起来更漂亮: + +希望本指南对你有所帮助,如果你有任何疑问,请在评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/access-grub-virtual-machine/ + +作者:[Sagar Sharma][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://itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed/ +[1]: https://itsfoss.com/what-is-grub/ +[2]: https://itsfoss.com/how-to-hack-ubuntu-password/ +[3]: https://itsfoss.com/content/images/2023/07/access-GRUB-in-Ubuntu-VM.gif +[4]: https://itsfoss.com/boot-older-kernel-default/ +[5]: https://itsfoss.com/content/images/2023/07/change-grub-style.webp +[6]: https://itsfoss.com/content/images/2023/07/configure-grub-timeout-in-ubuntu.webp +[7]: https://linuxhandbook.com/nano-save-exit/ From c4ad446c2cec1ec3004a52b15fe21b57a53d59b4 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 28 Jul 2023 09:18:33 +0800 Subject: [PATCH 15/72] translating --- ...n All-in-One Secure Open-Source App for Work and Productivity.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230719.0 ⭐️ Anytype An All-in-One Secure Open-Source App for Work and Productivity.md b/sources/tech/20230719.0 ⭐️ Anytype An All-in-One Secure Open-Source App for Work and Productivity.md index ebf3cd2b47..161eeca53a 100644 --- a/sources/tech/20230719.0 ⭐️ Anytype An All-in-One Secure Open-Source App for Work and Productivity.md +++ b/sources/tech/20230719.0 ⭐️ Anytype An All-in-One Secure Open-Source App for Work and Productivity.md @@ -2,7 +2,7 @@ [#]: via: "https://news.itsfoss.com/anytype-open-beta/" [#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 94abc3dac8c65c965bc75d15a7f7d4d5a396765a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 28 Jul 2023 22:33:49 +0800 Subject: [PATCH 16/72] RP @geekpi https://linux.cn/article-16043-1.html --- ... Dynamic NFS Provisioning in Kubernetes Cluster.md | 67 ++++++++++--------- 1 file changed, 36 insertions(+), 31 deletions(-) rename {translated/tech => published}/20230605.1 ⭐️⭐️ How to Setup Dynamic NFS Provisioning in Kubernetes Cluster.md (70%) diff --git a/translated/tech/20230605.1 ⭐️⭐️ How to Setup Dynamic NFS Provisioning in Kubernetes Cluster.md b/published/20230605.1 ⭐️⭐️ How to Setup Dynamic NFS Provisioning in Kubernetes Cluster.md similarity index 70% rename from translated/tech/20230605.1 ⭐️⭐️ How to Setup Dynamic NFS Provisioning in Kubernetes Cluster.md rename to published/20230605.1 ⭐️⭐️ How to Setup Dynamic NFS Provisioning in Kubernetes Cluster.md index 0e5603a9e7..644cd8702e 100644 --- a/translated/tech/20230605.1 ⭐️⭐️ How to Setup Dynamic NFS Provisioning in Kubernetes Cluster.md +++ b/published/20230605.1 ⭐️⭐️ How to Setup Dynamic NFS Provisioning in Kubernetes Cluster.md @@ -3,37 +3,39 @@ [#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-16043-1.html" 如何在 Kubernetes 集群中设置动态 NFS 配置 ====== -在这篇文章中,我们将向你展示如何在 Kubernetes (k8s) 集群中设置动态 nfs 配置。 +![][0] -Kubernetes 中的动态 NFS 存储配置允许你按需自动为 Kubernetes 应用配置和管理 NFS(网络文件系统)卷。它允许创建持久卷 (PV) 和持久卷声明 (PVC),而无需手动干预或预配置存储。 +> 在这篇文章中,我们将向你展示如何在 Kubernetes(k8s)集群中设置动态 NFS 配置。 + +Kubernetes 中的动态 NFS 存储配置允许你按需自动为 Kubernetes 应用配置和管理 NFS(网络文件系统)卷。它允许创建持久卷(PV)和持久卷声明(PVC),而无需手动干预或预配置存储。 NFS 配置程序负责动态创建 PV 并将其绑定到 PVC。它与 NFS 服务器交互,为每个 PVC 创建目录或卷。 -##### 先决条件 +### 先决条件 - 预装 Kubernetes 集群 - 具有 Kubernetes 集群管理员权限的普通用户 - 互联网连接 -事不宜迟,让我们深入探讨步骤 +事不宜迟,让我们深入探讨步骤: -### 步骤 1) 准备 NFS 服务器 +### 步骤 1、准备 NFS 服务器 -就我而言,我将在 Kubernetes 主节点 (Ubuntu 22.04) 上安装 NFS 服务器。登录主节点并运行以下命令: +就我而言,我将在 Kubernetes 主节点(Ubuntu 22.04)上安装 NFS 服务器。登录主节点并运行以下命令: ``` $ sudo apt update $ sudo apt install nfs-kernel-server -y ``` -创建以下文件夹并使用 nfs 共享它: +创建以下文件夹并使用 NFS 共享它: ``` $ sudo mkdir /opt/dynamic-storage @@ -41,7 +43,7 @@ $ sudo chown -R nobody:nogroup /opt/dynamic-storage $ sudo chmod 777 /opt/dynamic-storage ``` -在 /etc/exports 文件中添加以下条目: +在 `/etc/exports` 文件中添加以下条目: ``` $ sudo vi /etc/exports @@ -62,17 +64,17 @@ $ sudo systemctl status nfs-kernel-server ![NFS-Service-Status-Kubernetes-Master-Ubuntu][1] -在工作节点上,使用以下 apt 命令安装 nfs-common 包。 +在工作节点上,使用以下 `apt` 命令安装 `nfs-common` 包。 ``` $ sudo apt install nfs-common -y ``` -### 步骤 2) 安装和配置 NFS 客户端配置程序 +### 步骤 2、安装和配置 NFS 客户端配置程序 -NFS 子目录外部配置程序在 Kubernetes 集群中部署 NFS 客户端配置程序。配置程序负责动态创建和管理由 NFS 存储支持的持久卷 (PV) 和持久卷声明 (PVC)。 +NFS 子目录外部配置程序在 Kubernetes 集群中部署 NFS 客户端配置程序。配置程序负责动态创建和管理由 NFS 存储支持的持久卷(PV)和持久卷声明(PVC)。 -因此,要安装 NFS 子目录外部配置程序,首先使用以下命令集安装 helm: +因此,要安装 NFS 子目录外部配置程序,首先使用以下命令集安装 `helm`: ``` $ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 @@ -80,13 +82,13 @@ $ chmod 700 get_helm.sh $ ./get_helm.sh ``` -运行以下命令来启用 helm 仓库: +运行以下命令来启用 `helm` 仓库: ``` $ helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner ``` -使用以下 helm 命令部署配置程序: +使用以下 `helm` 命令部署配置程序: ``` $ helm install -n nfs-provisioning --create-namespace nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner --set nfs.server=192.168.1.139 --set nfs.path=/opt/dynamic-storage @@ -94,7 +96,7 @@ $ helm install -n nfs-provisioning --create-namespace nfs-subdir-external-provis ![helm-install-nfs-provisioning-kubernetes-cluster][2] -上面的 helm 命令将自动创建 nfs-provisioning 命名空间,并安装 nfs 配置程序 pod/部署、名称为 (nfs-client) 的存储类,并将创建所需的 rbac。 +上面的 `helm` 命令将自动创建 `nfs-provisioning` 命名空间,并安装 NFS 配置程序的容器荚/部署、名称为 `nfs-client` 的存储类,并将创建所需的 rbac。 ``` $ kubectl get all -n nfs-provisioning @@ -103,11 +105,11 @@ $ kubectl get sc -n nfs-provisioning ![kubectl-get-all-nfs-provisioning-kubernetes-cluster][3] -完美,上面的输出确认了配置程序 Pod 和存储类已成功创建。 +完美,上面的输出确认了配置程序容器荚和存储类已成功创建。 -### 步骤 3) 创建持久卷声明 (PVC) +### 步骤 3、创建持久卷声明(PVC) -让我们创建 PVC 来为你的 Pod 或部署请求存储。PVC 将从 StorageClass(nfs-client)请求特定数量的存储。 +让我们创建 PVC 来为你的容器荚或部署请求存储。PVC 将从存储类 `nfs-client` 请求特定数量的存储: ``` $ vi demo-pvc.yml @@ -129,7 +131,7 @@ spec: ![PVC-Yaml-Dynamic-NFS-Kubernetes][4] -运行以下 kubectl 命令以使用上面创建的 yml 文件创建 pvc: +运行以下 `kubectl` 命令以使用上面创建的 YML 文件创建 PVC: ``` $ kubectl create -f demo-pvc.yml @@ -143,11 +145,11 @@ $ kubectl get pv,pvc -n nfs-provisioning ![Verify-pv-pvc-dynamic-nfs-kubernetes-cluster][5] -太好了,上面的输出表明 pv 和 pvc 创建成功。 +太好了,上面的输出表明 PV 和 PVC 创建成功。 -### 步骤 4) 测试并验证动态 NFS 配置 +### 步骤 4、测试并验证动态 NFS 配置 -为了测试和验证动态 nfs 配置,请使用以下 yml 文件启动测试 Pod: +为了测试和验证动态 NFS 配置,请使用以下 YML 文件启动测试容器荚: ``` $ vi test-pod.yml @@ -177,13 +179,13 @@ spec: ![Pod-Yml-Dynamic-NFS-kubernetes][6] -使用以下 kubectl 命令部署 pod: +使用以下 `kubectl` 命令部署容器荚: ``` $ kubectl create -f test-pod.yml ``` -验证 test-pod 的状态: +验证 `test-pod` 的状态: ``` $ kubectl get pods -n nfs-provisioning @@ -191,7 +193,7 @@ $ kubectl get pods -n nfs-provisioning ![Verify-Test-Pod-Using-NFS-Volume-Kubernetes][7] -登录到 pod 并验证 nfs 卷是否已安装。 +登录到容器荚并验证 NFS 卷是否已安装。 ``` $ kubectl exec -it test-pod -n nfs-provisioning /bin/sh @@ -199,9 +201,9 @@ $ kubectl exec -it test-pod -n nfs-provisioning /bin/sh ![Access-Dynamic-NFS-Inside-Pod-Kubernetes][8] -太棒了,上面 Pod 的输出确认了动态 NFS 卷已安装且可访问。 +太棒了,上面容器荚的输出确认了动态 NFS 卷已安装且可访问。 -最后删除 pod 和 PVC,查看 pv 是否自动删除。 +最后删除容器荚和 PVC,查看 PV 是否自动删除。 ``` $ kubectl delete -f test-pod.yml @@ -213,6 +215,8 @@ $ kubectl get pv,pvc -n nfs-provisioning 这就是这篇文章的全部内容,希望对你有所帮助。请随时在下面的评论部分发表你的疑问和反馈。 +*(题图:MJ/75dae36f-ff68-4c63-81e8-281e2c239356)* + -------------------------------------------------------------------------------- via: https://www.linuxtechi.com/dynamic-nfs-provisioning-kubernetes/ @@ -220,7 +224,7 @@ via: https://www.linuxtechi.com/dynamic-nfs-provisioning-kubernetes/ 作者:[Pradeep 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/) 荣誉推出 @@ -235,3 +239,4 @@ via: https://www.linuxtechi.com/dynamic-nfs-provisioning-kubernetes/ [7]: https://www.linuxtechi.com/wp-content/uploads/2023/06/Verify-Test-Pod-Using-NFS-Volume-Kubernetes.png [8]: https://www.linuxtechi.com/wp-content/uploads/2023/06/Access-Dynamic-NFS-Inside-Pod-Kubernetes.png [9]: https://www.linuxtechi.com/wp-content/uploads/2023/06/Delete-Pod-PVC-Dynamic-NFS.png +[0]: https://img.linux.net.cn/data/attachment/album/202307/28/222834togtruhoeuh3gtr1.jpg \ No newline at end of file From 1c61f953f7a14f82ee869206461e930211c5f612 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 29 Jul 2023 08:22:31 +0800 Subject: [PATCH 17/72] ATRP @wxy https://linux.cn/article-16044-1.html --- ...1 ⭐️⭐️ 7 Git tips for technical writers.md | 265 ++++++++++++++++++ ...1 ⭐️⭐️ 7 Git tips for technical writers.md | 131 --------- 2 files changed, 265 insertions(+), 131 deletions(-) create mode 100644 published/20221121.1 ⭐️⭐️ 7 Git tips for technical writers.md delete mode 100644 sources/tech/20221121.1 ⭐️⭐️ 7 Git tips for technical writers.md diff --git a/published/20221121.1 ⭐️⭐️ 7 Git tips for technical writers.md b/published/20221121.1 ⭐️⭐️ 7 Git tips for technical writers.md new file mode 100644 index 0000000000..e07bcc469e --- /dev/null +++ b/published/20221121.1 ⭐️⭐️ 7 Git tips for technical writers.md @@ -0,0 +1,265 @@ +[#]: subject: "7 Git tips for technical writers" +[#]: via: "https://opensource.com/article/22/11/git-tips-technical-writers" +[#]: author: "Maximilian Kolb https://opensource.com/users/kolb" +[#]: collector: "lkxed" +[#]: translator: "ChatGPT" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-16044-1.html" + +专为技术写作人员提供的 7 条 Git 技巧 +===== + +![][0] + +> 跟随这个演示来了解我如何使用 Git 为 Foreman 编写文档。 + +作为 [ATIX][1] 的技术作家,我的任务包括为 [Foreman][2] 创建和维护存放在 [github.com/theforeman/foreman-documentation][3] 的文档。Git 帮助我跟踪内容的版本,并与开源社区进行协作。它是我存储工作成果、共享和讨论改进的重要工具。我主要使用的工具包括浏览器、用 OpenSSH 连接 Foreman 实例、用 [Vim][4] 编辑源文件,以及使用 Git 进行版本控制。 + +本文重点介绍在开始使用 Git 和为 Foreman 文档做贡献时经常遇到的挑战。适用于中级 Git 用户。 + +### 先决条件 + +- 你已在系统上安装和配置了 Git。你至少需要设置用户名和电子邮件地址。 +- 你在 [github.com][5] 上拥有一个帐户。GitHub 本身并不是一个开源项目,但它是许多开源 Git 存储库的托管站点(包括 Foreman 的文档)。 +- 你已将 [foreman-documentation][3] 存储库复刻到你自己的账户或组织(例如,`github.com//foreman-documentation`,这里 `` 是你的 GitHub 用户名)。有关更多信息,请参阅 Kedar Vijay Kulkarni 的 [Kedar Vijay Kulkarni 的 Git 逐步指南][6]。 +- 你已将你的 SSH 公钥添加到 GitHub。这是将你的更改推送到 GitHub 所必需的。有关更多信息,请参阅 Nicole C. Baratta 的《[GitHub 简单指引][7]》。 + +### 对 Foreman 文档做出贡献 + +Foreman 是一个开源项目,依靠社区的贡献而发展壮大。该项目欢迎所有人的参与,并且只有一些要求才能做出有意义的贡献。这些要求和惯例在 [README.md][8] 和 [CONTRIBUTING.md][9] 文件中有详细记录。 + +以下是在处理 Foreman 文档时最常见的一些任务。 + +#### 我想开始贡献 Foreman 文档 + +1、从 github.com 克隆存储库: + +``` +$ git clone git@github.com:theforeman/foreman-documentation.git +$ cd foreman-documentation/ +``` + +2、重命名远程存储库: + +``` +$ git remote rename origin upstream +``` + +3、可选:确保你的本地主分支跟踪 theforeman 组织的 `foreman-documentation` 存储库的 `master` 分支: + +``` +$ git status +``` + +这将自动将你置于默认分支(本例中为 `master`)的最新提交上。 + +4、如果你的账户或组织中尚未有该存储库的 复刻Fork,请创建一个。前往 [github.com/theforeman/foreman-documentation][3] 并点击 “复刻Fork” 按钮。 + +5、将你的复刻添加到你的存储库中: + +``` +$ git remote add github git@github.com:/foreman-documentation.git +``` + +你的本地存储库现在有两个远程存储库:`upstream` 和 `github`。 + +#### 我想扩展 Foreman 文档 + +对于简单的更改,比如修正拼写错误,你可以直接创建一个拉取请求(PR)。 + +1、创建一个分支,例如 `fix_spelling`。`git switch` 命令用于切换当前所在的分支,`-c` 参数用于创建分支: + +``` +$ git switch -c fix_spelling +``` + +2、进行你的更改。 + +3、添加你的更改并进行提交: + +``` +$ git add guides/common/modules/abc.adoc +$ git commit -m "Fix spelling of existing" +``` + +良好的 Git 提交消息的重要性无需再强调。提交消息告诉贡献者你做了哪些工作,因为它与代码库的其余部分一起保存,所以它在查看代码时起到历史注释的作用,帮助了解代码的演化过程。有关优秀的 Git 提交消息的更多信息,请参阅由 cbeams 撰写的 《[创建完美的 Git 提交信息的 7 条规则][10]》。 + +4、可选但建议的操作:查看并验证与默认分支的差异。`foreman-documentation` 的默认分支称为 `master`,但其他项目可能有不同的命名(例如 `main`、`dev` 或 `devel`)。 + +``` +$ git diff master +``` + +5、将分支推送到 GitHub。这将发布你的更改到你的代码库副本: + +``` +$ git push --set-upstream github fix_spelling +``` + +6、点击终端中 Git 提供的链接来创建一个拉取请求(PR): + +``` +remote: Create a pull request for 'fix_spelling' on Github by visiting: +remote: https://github.com/_My_User_Account_/foreman-documentation/pull/new/fix_spelling +``` + +7、在解释中说明社区*为什么*应该接受你的更改。对于修正拼写错误等简单 PR,这并不是必需的,但对于重大更改则很重要。 + +#### 我想将我的分支变基到 master + +1、确保你的本地 `master` 分支跟踪的是 [github.com/theforeman/foreman-documentation][3] 的 `master` 分支,而不是你自己命名空间下的 `foreman-documentation`: + +``` +$ git switch master +``` + +此时应该显示 `Your branch is up to date with 'upstream/master'`,其中 `upstream` 是指向 `github.com/theforeman/foreman-documentation` 的远程存储库的名称。你可以通过运行 `git remote -v` 来查看远程存储库设置情况。 + +2、从远程获取可能的更改。`git fetch` 命令会从远程下载被跟踪的分支,并且使用 `--all` 选项可以同时更新所有分支。在使用其他分支时这是必要的。`--prune` 选项会删除对已不存在的分支的引用。 + +``` +$ git fetch --all --prune +``` + +3、将可能的更改从 `upstream/master` 拉取到你的本地 `master` 分支。`git pull` 命令将跟踪的分支上的提交复制到当前分支。这用于将你的本地 `master` 分支“更新”为远程(在本例中为 GitHub)`master` 分支的最新状态。 + +``` +$ git pull +``` + +4、将你的分支 变基rebase 到 `master`。 + +``` +$ git switch my_branch +$ git rebase -i master +``` + +#### 我在 master 分支上意外地提交了代码 + +1、创建一个分支来保存你的工作: + +``` +$ git switch -c my_feature +``` + +2、切换回 `master` 分支: + +``` +$ git switch master +``` + +3、回退 `master` 分支上的最后一次提交: + +``` +$ git reset --soft HEAD~1 +``` + +4、切换回 `my_feature` 分支并继续工作: + +``` +$ git switch my_feature +``` + +#### 我想修改我的提交消息 + +1、如果你的分支只有一次提交,可以使用 `git amend` 来修改你的最后一次提交: + +``` +$ git commit --amend +``` + +这假设你没有将其他文件添加到暂存区(即,没有运行过 `git add My_File`,并且没有进行提交)。 + +2、使用 `--force` 选项将你的 “更改” 推送到 GitHub,因为 Git 提交消息是你现有提交的一部分,所以你正在更改分支上的历史记录: + +``` +$ git push --force +``` + +#### 我想重新整理单个分支上的多个更改 + +1、可选但强烈推荐:从 GitHub 获取更改。 + +``` +$ git switch master +$ git fetch +$ git pull +``` + +这确保你将其他更改按照它们被合并到 `master` 中的顺序直接合并到你的分支中。 + +2、若要重新整理你的工作,请对你的分支进行变基并根据需要进行更改。对于将分支变基到 `master`,这意味着你需要更改你的分支上第一个提交的父提交: + +``` +$ git rebase --interactive master +``` + +使用你喜欢的编辑器打开变基交互界面,将第一个单词 `pick` 替换为你要修改的提交。 + +- 使用 `e` 来对你的提交进行实际更改。这会中断你的变基操作! +- 使用 `f` 将一个提交与其父提交合并。 +- 使用 `d` 完全删除一个提交。 +- 移动行以改变你更改的顺序。 + +成功进行变基后,你自己的提交将位于 `master` 上最后一个提交的顶部。 + +#### 我想从其他分支复制一个提交 + +1、从稳定分支(例如名为 `3.3` 的分支)获取提交的 ID,请使用 `-n` 选项限制提交数量: + +``` +$ git log -n 5 3.3 +``` + +2、通过挑选提交来复制更改到你的分支。`-x` 选项将提交的 ID 添加到你的提交消息中。这仅建议在从稳定分支挑选提交时使用: + +``` +$ git switch My_Branch +$ git cherry-pick -x Commit_ID +``` + +### 更多技巧 + +在 ATIX,我们运行一个 [GitLab][11] 实例,用于内部共享代码、协作以及自动化测试和构建。对于围绕 Foreman 生态系统的开源社区,我们依赖于 GitHub。 + +我建议你始终将名为 `origin` 的远程指向你的*内部的*版本控制系统。这样做可以防止在纯粹凭记忆进行 `git push` 时向外部服务泄露信息。 + +此外,我建议使用固定的命名方案来命名远程。我总是将指向自己的 GitLab 实例的远程命名为 `origin`,将指向开源项目的远程命名为 `upstream`,将指向我在 Github 上的复刻的远程命名为 `github`。 + +对于 `foreman-documentation`,该存储库具有相对较平的历史记录。当处理更复杂结构时,我倾向于以非常可视化的方式思考 Git 存储库,其中节点(提交)指向线上的节点(分支),这些分支可以交织在一起。图形化工具如 `gitk` 或 [Git Cola][12] 可以帮助可视化你的 Git 历史记录。一旦你完全掌握了 Git 的工作原理,如果你更喜欢命令行,可以使用别名。 + +在进行具有大量预期合并冲突的大型变基之前,我建议创建一个“备份”分支,以便你可以快速查看差异。请注意,要永久删除提交是相当困难的,因此在进行重大更改之前,请在本地 Git 存储库中进行测试。 + +### Git 对技术文档编写者的帮助 + +Git 对技术文档编写者来说是一个巨大的帮助。不仅可以使用 Git 对文档进行版本控制,还可以与他人积极地进行协作。 + +*(题图:MJ/1fb1dd43-e460-4e76-9ff6-b6ef76570f7e)* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/11/git-tips-technical-writers + +作者:[Maximilian Kolb][a] +选题:[lkxed][b] +译者:ChatGPT +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/kolb +[b]: https://github.com/lkxed +[1]: https://atix.de/en/ +[2]: https://opensource.com/article/17/8/system-management-foreman +[3]: https://github.com/theforeman/foreman-documentation +[4]: https://opensource.com/resources/what-vim +[5]: https://github.com/ +[6]: https://opensource.com/article/18/1/step-step-guide-git +[7]: https://opensource.com/life/15/11/short-introduction-github +[8]: https://github.com/theforeman/foreman-documentation/blob/master/guides/README.md#contribution-guidelines +[9]: https://github.com/theforeman/foreman-documentation/blob/master/CONTRIBUTING.md#contributing-to-foreman-documentation +[10]: https://cbea.ms/git-commit/#seven-rules +[11]: https://about.gitlab.com/ +[12]: https://opensource.com/article/20/3/git-cola +[0]: https://img.linux.net.cn/data/attachment/album/202307/29/082043e587yilezk45ayin.jpg \ No newline at end of file diff --git a/sources/tech/20221121.1 ⭐️⭐️ 7 Git tips for technical writers.md b/sources/tech/20221121.1 ⭐️⭐️ 7 Git tips for technical writers.md deleted file mode 100644 index 13c331d6f4..0000000000 --- a/sources/tech/20221121.1 ⭐️⭐️ 7 Git tips for technical writers.md +++ /dev/null @@ -1,131 +0,0 @@ -[#]: subject: "7 Git tips for technical writers" -[#]: via: "https://opensource.com/article/22/11/git-tips-technical-writers" -[#]: author: "Maximilian Kolb https://opensource.com/users/kolb" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -7 Git tips for technical writers -====== - -As a technical writer working for [ATIX][1], my tasks include creating and maintaining documentation for [Foreman][2] at [github.com/theforeman/foreman-documentation][3]. Git helps me track versions of content, and to collaborate with the open source community. It's an integral part of storing the results of my work, sharing it, and discussing improvements. My main tools include my browser, OpenSSH to connect to Foreman instances, [Vim][4] to edit source files, and Git to version content. - -This article focuses on recurring challenges when taking the first steps with Git and contributing to Foreman documentation. This is meant for intermediate Git users. - -### Prerequisites - -- You have installed and configured Git on your system. You must at least set your user name and email address. -- You have an account on [github.com][5]. GitHub isn't an open source project itself, but it's the site where many open source Git repositories are stored (including Foreman's documentation.) -- You have forked the [foreman-documentation][3] repository into your own account or organization (for example, _github.com/__My_User_Account__/foreman-documentation_. For more information, see [A step-by-step guide to Git][6] by Kedar Vijay Kulkarni. -- You have added your SSH public key to GitHub. This is necessary to push your changes to GitHub. For more information, see [A short introduction to GitHub][7] by Nicole C. Baratta. - -### Contributing to Foreman documentation - -Foreman is an open source project and thrives on community contributions. The project welcomes everyone and there are only a few requirements to make meaningful contributions. Requirements and conventions are documented in the [README.md][8] and [CONTRIBUTING.md][9] files. - -Here are some of the most frequent tasks when working on Foreman documentation. - -### I want to start working on Foreman documentation - -- Clone the repository from github.com:`$ git clone git@github.com:theforeman/foreman-documentation.git -$ cd foreman-documentation/` -- Rename the remote:`$ git remote rename origin upstream` -- Optional: Ensure that your local master branch is tracking the master branch from the **foreman-documentation** repository from the **theforeman** organization:`$ git status`This automatically starts you on the latest commit of the default branch, which in this case is **master**. -- If you do not have a fork of the repository in your own account or organization already, create one.Go to [github.com/theforeman/foreman-documentation][3] and click **Fork**. -- Add your fork to your repository.`$ git remote add github git@github.com:_My_User_Account_/foreman-documentation.git`Your local repository now has two remotes: `upstream` and `github`. - -### I want to extend the Foreman documentation - -For simple changes such as fixing a spelling mistake, you can create a pull request (PR) directly. - -- Create a branch named, for example, `fix_spelling`. The `git switch` command changes the currently checked out branch, and `-c` creates the branch:`$ git switch -c fix_spelling` -- Make your change. -- Add your change and commit:`$ git add guides/common/modules/abc.adoc -$ git commit -m "Fix spelling of existing"`I cannot emphasise the importance of good Git commit messages enough. A commit message tells contributors what you have done, and because it's preserved along with the rest of the codebase, it serves as a historical footnote when someone's looking back through code to determine what's happened over its lifespan. For more information on great git commit messages, see [The seven rules of a great Git commit message][10] by cbeams. -- Optional but recommended: View and verify the diff to the default branch. The default branch for **foreman-documentation** is called `master`, but other projects may name theirs differently (for example, `main`, `dev`, or `devel`.)`$ git diff master` -- Push your branch to Github. This publishes your change to your copy of the codebase.`$ git push --set-upstream github fix_spelling` -- Click on the link provided by Git in your terminal to create a pull request (PR).`remote: Create a pull request for 'fix_spelling' on Github by visiting: -remote:      https://github.com/_My_User_Account_/foreman-documentation/pull/new/fix_spelling` -- Add an explanation on _why_ the community should accept your change. This isn't necessary for a trivial PR, such as fixing a spelling mistake, but for major changes it's important. - -### I want to rebase my branch to master. - -- Ensure your local master branch tracks the master branch from [github.com/theforeman/foreman-documentation][3], not **foreman-documentation** in your own namespace:`$ git switch master`This should read `Your branch is up to date with 'upstream/master'`, with `upstream` being the name of your remote repository pointing to `github.com/theforeman/foreman-documentation`. You can review your remotes by running `git remote -v`. -- Fetch possible changes from your remote. The `git fetch` command downloads the tracked branch from your remote, and the `--all` option updates all branches simultaneously. This is necessary when working with additional branches. The `--prune` option removes references to branches that no longer exist.`$ git fetch --all --prune` -- Pull possible changes from `upstream/master` into your local `master` branch. The `git pull` command copies commits from the branch you're tracking into your current branch. This is used to "update" your local `master` branch to the latest state of the `master` branch in your remote (Github, in this case.)`$ git pull` -- Rebase your branch to "master".`$ git switch my_branch -$ git rebase -i master` - -### I have accidentally committed to master - -- Create a branch to save your work:`$ git switch -c my_feature` -- Switch back to the `master` branch:`$ git switch master` -- Drop the last commit on `master`:`$ git reset --soft HEAD~1` -- Switch back to `my_feature` branch and continue working:`$ git switch my_feature` - -### I want to reword my commit message - -- If you only have one commit on your branch, use `git amend` to change your last commit:`$ git commit --amend`This assumes that you don't have any other files added to your staging area (that is, you did not run `git add My_File` without also committing it.) -- Push your "change" to Github, using the `--force` option because the Git commit message is part of your existing commit, so you're changing the history on your branch.`$ git push --force` - -### I want to restructure multiple changes on a single branch - -- Use **e** to make actual changes to your commit. This interrupts your rebase! -- Use **f** to combine a commit with its parent. -- Use **d** to completely remove the commit from your branch. -- Move the lines to change the order of your changes.After successfully rebasing, your own commits are on top of the last commit from `master`. - -- Optional but strongly recommended: Fetch changes from Github.`$ git switch master -$ git fetch -$ git pull`This ensures that you directly incorporate any other changes into your branch in the order they've been merged to `master`. -- To restructure your work, rebase your branch and make changes as necessary. Rebasing to `master` means changing the parent commit of your first commit on your branch:`$ git rebase --interactive master`Replace the first word `pick` to modify the commit. - -### I want to copy a commit from another branch - -- Get the commit ID from a stable branch (for example, a branch named `3.3`), using the `-n` option to limit the number of commits.`$ git log -n 5 3.3` -- Replicate changes by cherry-picking commits to your branch. The `-x` option adds the commit ID to your commit message. This is only recommended when cherry-picking commits from a stable branch.`$ git switch My_Branch -$ git cherry-pick -x Commit_ID` - -### More tips - -At ATIX, we run a [GitLab][11] instance to share code, collaborate, and automate tests and builds internally. With the open source community surrounding the Foreman ecosystem, we rely on Github. - -I recommend that you always point the remote named `origin` in any Git repository to your _internal_ version control system. This prevents leaking information to external services when doing a `git push` based on pure muscle memory. - -Additionally, I recommend using a fixed naming scheme for remotes. I always name the remote pointing to my own GitLab instance `origin`, the open source project `upstream`, and my fork on Github `github`. - -For `foreman-documentation`, the repository has a relatively flat history. When working with a more complex structure, I tend to think of Git repositories in a very visual way with nodes (commits) pointing to nodes on lines (branches) that potentially intertwine. Graphical tools such as `gitk` or [Git Cola][12] can help visualize your Git history. Once you have fully grasped how Git works, you can move on to aliases, if you prefer the command line. - -Before a big rebase with a lot of expected merge conflicts, I recommend creating a "backup" branch that you can quickly view diffs against. Note that it's pretty hard to irreversibly delete commits, so play around in your local Git repository before making big changes. - -### Git for tech writers - -Git is a tremendous help for technical writers. Not only can you use Git to version your own content, but you can actively collaborate with others. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/11/git-tips-technical-writers - -作者:[Maximilian Kolb][a] -选题:[lkxed][b] -译者:[Donkey-Hao](https://github.com/Donkey-Hao) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/kolb -[b]: https://github.com/lkxed -[1]: https://atix.de/en/ -[2]: https://opensource.com/article/17/8/system-management-foreman -[3]: https://github.com/theforeman/foreman-documentation -[4]: https://opensource.com/resources/what-vim -[5]: https://github.com/ -[6]: https://opensource.com/article/18/1/step-step-guide-git -[7]: https://opensource.com/life/15/11/short-introduction-github -[8]: https://github.com/theforeman/foreman-documentation/blob/master/guides/README.md#contribution-guidelines -[9]: https://github.com/theforeman/foreman-documentation/blob/master/CONTRIBUTING.md#contributing-to-foreman-documentation -[10]: https://cbea.ms/git-commit/#seven-rules -[11]: https://about.gitlab.com/ -[12]: https://opensource.com/article/20/3/git-cola From 14287c5b4482d5301780825a3e6160f985698a34 Mon Sep 17 00:00:00 2001 From: "Xiaobin.Liu" Date: Sat, 29 Jul 2023 14:31:11 +0800 Subject: [PATCH 18/72] APL --- sources/tech/20230709.0 ⭐️⭐️ What are Exit Codes in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230709.0 ⭐️⭐️ What are Exit Codes in Linux.md b/sources/tech/20230709.0 ⭐️⭐️ What are Exit Codes in Linux.md index 347b09f113..7423590384 100644 --- a/sources/tech/20230709.0 ⭐️⭐️ What are Exit Codes in Linux.md +++ b/sources/tech/20230709.0 ⭐️⭐️ What are Exit Codes in Linux.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/linux-exit-codes/" [#]: author: "Pranav Krishna https://itsfoss.com/author/pranav/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "lxbwolf" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 3582731ba98279af73b91e5dab1fa292fe54d198 Mon Sep 17 00:00:00 2001 From: toknow-gh Date: Sat, 29 Jul 2023 21:44:37 +0800 Subject: [PATCH 19/72] Translated tech/20220118 Perform unit tests using GoogleTest and CTest.md --- ...m unit tests using GoogleTest and CTest.md | 371 ------------------ ...m unit tests using GoogleTest and CTest.md | 369 +++++++++++++++++ 2 files changed, 369 insertions(+), 371 deletions(-) delete mode 100644 sources/tech/20220118 Perform unit tests using GoogleTest and CTest.md create mode 100644 translated/tech/20220118 Perform unit tests using GoogleTest and CTest.md diff --git a/sources/tech/20220118 Perform unit tests using GoogleTest and CTest.md b/sources/tech/20220118 Perform unit tests using GoogleTest and CTest.md deleted file mode 100644 index c9ac955942..0000000000 --- a/sources/tech/20220118 Perform unit tests using GoogleTest and CTest.md +++ /dev/null @@ -1,371 +0,0 @@ -[#]: subject: "Perform unit tests using GoogleTest and CTest" -[#]: via: "https://opensource.com/article/22/1/unit-testing-googletest-ctest" -[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" -[#]: collector: "lujun9972" -[#]: translator: "toknow-gh" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Perform unit tests using GoogleTest and CTest -====== -Using unit tests will likely improve your code's quality and do so -without disturbing your workflow. -![Team checklist and to dos][1] - -This article is a follow-up to my last article [Set up a build system with CMake and VSCodium][2]. - -In the last article, I showed how to configure a build system based on [VSCodium][3] and [CMake][4]. This article refines this setup by integrating meaningful unit tests using [GoogleTest][5] and [CTest][6]. - -If not already done, clone the [repository][7], open it in VSCodium and checkout the tag _devops_2_ by clicking on the _main_-branch symbol (red marker) and choosing the branch (yellow marker): - -![VSCodium tag][8] - -Stephan Avenwedde (CC BY-SA 4.0) - -Alternatively, open the command line and type: - - -``` -`$ git checkout tags/devops_2` -``` - -### GoogleTest - -GoogleTest is a platform-independent, open source C++ testing framework. Even though GoogleTest is not meant to be exclusively for unit tests, I will use it to define unit tests for the _Generator_ library. In general, a unit test should verify the behavior of a single, logical unit. The _Generator_ library is one unit, so I'll write some meaningful tests to ensure proper function. - -Using GoogleTest, the test cases are defined by assertions macros. Processing an assertion generates one of the following results: - - * _Success_: Test passed. - * _Nonfatal failure_: Test failed, but the test function will continue. - * _Fatal failure_: Test failed, and the test function will be aborted. - - - -The assertions macros follow this scheme to distinguish a fatal from a nonfatal failure: - - * `ASSERT_*` fatal failure, function is aborted. - * `EXPECT_*` nonfatal failure, function is not aborted. - - - -Google recommends using `EXPECT_*` macros as they allow the test to continue when the tests define multiple assertions. An assertion macro takes two arguments: The first argument is the name of the test group (a freely selectable string), and the second argument is the name of the test itself. The _Generator_ library just defines the function _generate(...)_, therefore the tests in this article belong to the same group: _GeneratorTest_. - -The following unit tests for the _generate(...)_ function can be found in [GeneratorTest.cpp][9]. - -#### Reference check - -The [generate(...)][10] function takes a reference to a [std::stringstream][11] as an argument and returns the same reference. So the first test is to check if the passed reference is the same reference which the function returns. - - -``` - - -TEST(GeneratorTest, ReferenceCheck){ -    const int NumberOfElements = 10; -    std::stringstream buffer; -    EXPECT_EQ( -        std::addressof(buffer), -        std::addressof(Generator::generate(buffer, NumberOfElements)) -    ); -} - -``` - -Here I use [std::addressof][12] to check if the address of the returned object refers to the same object I provided as input. - -#### Number of elements - -This test checks if the number of elements in the stringstream reference matches the number given as an argument. - - -``` - - -TEST(GeneratorTest, NumberOfElements){ -    const int NumberOfElements = 50; -    int nCalcNoElements = 0; - -    std::stringstream buffer; - -    Generator::generate(buffer, NumberOfElements); -    std::string s_no; - -    while(std::getline(buffer, s_no, ' ')) { -        nCalcNoElements++; -    } - -    EXPECT_EQ(nCalcNoElements, NumberOfElements); -} - -``` - -#### Shuffle - -This test checks the proper working of the random engine. If I invoke the _generate_ function two times in a row, I expect not to get the same result. - - -``` - - -TEST(GeneratorTest, Shuffle){ - -    const int NumberOfElements = 50; - -    std::stringstream buffer_A; -    std::stringstream buffer_B; - -    Generator::generate(buffer_A, NumberOfElements); -    Generator::generate(buffer_B, NumberOfElements); - -    EXPECT_NE(buffer_A.str(), buffer_B.str()); -} - -``` - -#### Checksum - -This is the largest test. It checks whether the sum of the digits of a numerical series from 1 to _n_ is the same as the sum of the shuffled output series. I expect that the sum matches as the _generate(...)_ function should simply create a shuffled variant of such a series. - - -``` - - -TEST(GeneratorTest, CheckSum){ - -    const int NumberOfElements = 50; -    int nChecksum_in = 0; -    int nChecksum_out = 0; - -    std::vector<int> vNumbersRef(NumberOfElements); // Input vector -    std::iota(vNumbersRef.begin(), vNumbersRef.end(), 1); // Populate vector - -    // Calculate reference checksum -    for(const int n : vNumbersRef){ -        nChecksum_in += n; -    } - -    std::stringstream buffer; -    Generator::generate(buffer, NumberOfElements); - -    std::vector<int> vNumbersGen; // Output vector -    std::string s_no; - -    // Read the buffer back back to the output vector -    while(std::getline(buffer, s_no, ' ')) { -        vNumbersGen.push_back(std::stoi(s_no)); -    } - -    // Calculate output checksum -    for(const int n : vNumbersGen){ -        nChecksum_out += n; -    } - -    EXPECT_EQ(nChecksum_in, nChecksum_out); -} - -``` - -The above tests can also be debugged like an ordinary C++ application. - -### CTest - -In addition to the in-code unit test, the [CTest][6] utility lets me define tests that can be performed on executables. In a nutshell, I call the executable with certain arguments and match the output with [regular expressions][13]. This lets me simply check how the executable behaves with incorrect command-line arguments. The tests are defined in the top level [CMakeLists.txt][14]. Here is a closer look at three test cases: - -#### Regular usage - -If a positive integer is provided as a command-line argument, I expect the executable to produce a series of numbers separated by whitespace: - - -``` - - -add_test(NAME RegularUsage COMMAND Producer 10) -set_tests_properties(RegularUsage -    PROPERTIES PASS_REGULAR_EXPRESSION "^[0-9 ]+" -) - -``` - -#### No argument - -If no argument is provided, the program should exit immediately and display the reason why: - - -``` - - -add_test(NAME NoArg COMMAND Producer) -set_tests_properties(NoArg -    PROPERTIES PASS_REGULAR_EXPRESSION "^Enter the number of elements as argument" -) - -``` - -#### Wrong argument - -Providing an argument that cannot be converted into an integer should also cause an immediate exit with an error message. This test invokes the _Producer_ executable with the command line parameter*"ABC"*: - - -``` - - -add_test(NAME WrongArg COMMAND Producer ABC) -set_tests_properties(WrongArg -    PROPERTIES PASS_REGULAR_EXPRESSION "^Error: Cannot parse" -) - -``` - -#### Testing the tests - -To run a single test and see how it is processed, invoke `ctest` from the command line providing the following arguments: - - * Run single tst: `-R ` - * Enable verbose output: `-VV` - - - -Here is the command `ctest -R Usage -VV:` - - -``` - - -$ ctest -R Usage -VV -UpdatecTest Configuration from :/home/stephan/Documents/cpp_testing sample/build/DartConfiguration.tcl -UpdateCTestConfiguration from :/home/stephan/Documents/cpp_testing sample/build/DartConfiguration.tcl -Test project /home/stephan/Documents/cpp_testing sample/build -Constructing a list of tests -Done constructing a list of tests -Updating test list for fixtures -Added 0 tests to meet fixture requirements -Checking test dependency graph... -Checking test dependency graph end - -``` - -In this code block, I invoked a test named _Usage_. - -This ran the executable with no command-line arguments: - - -``` - - -test 3 -    Start 3: Usage -3: Test command: /home/stephan/Documents/cpp testing sample/build/Producer - -``` - -The test failed because the output didn't match the regular expression `[^[0-9]+]`. - - -``` - - -3: Enter the number of elements as argument -1/1 test #3. Usage ................ - -Failed Required regular expression not found. -Regex=[^[0-9]+] - -0.00 sec round. - -0% tests passed, 1 tests failed out of 1 -Total Test time (real) = -0.00 sec -The following tests FAILED: -3 - Usage (Failed) -Errors while running CTest -$ - -``` - -To run all tests (including the one defined with GoogleTest), navigate to the _build_ directory and run `ctest`: - -![CTest run][15] - -Stephan Avenwedde (CC BY-SA 4.0) - -Inside VSCodium, click on the area marked yellow in the info bar to invoke CTest. If all tests pass, the following output is displayed: - -![VSCodium][16] - -Stephan Avenwedde (CC BY-SA 4.0) - -### Automate testing with Git Hooks - -By now, running the tests is an additional step for the developer. The developer could also commit and push code that doesn't pass the tests. Thanks to [Git Hooks][17], I can implement a mechanism that automatically runs the tests and prevents the developer from accidentally committing faulty code. - -Navigate to `.git/hooks`, create an empty file named _pre-commit_, and copy and paste the following code: - - -``` - - -#!/usr/bin/sh - -(cd build; ctest --output-on-failure -j6) - -``` - -After it, make this file executable: - - -``` -`$ chmod +x pre-commit` -``` - -This script invokes CTest when trying to perform a commit. If a test fails, like in the screenshot below, the commit is aborted: - -![Commit failed][18] - -Stephan Avenwedde (CC BY-SA 4.0) - -If the tests succeed, the commit is processed, and the output looks like this: - -![Commit succeeded][19] - -Stephan Avenwedde (CC BY-SA 4.0) - -The described mechanism is only a soft barrier: A developer could still commit faulty code using `git commit --no-verify`. I can ensure that only working code is pushed by configuring a build server. This topic will be part of a separate article. - -### Summary - -The techniques mentioned in this article are easy to implement and help you quickly find bugs in your code. Using unit tests will likely improve your code's quality and, as I have shown, do so without disturbing your workflow. The GoogleTest framework provides features for every conceivable scenario; I only used a subset of its functionality. At this point, I also want to mention the [GoogleTest Primer][20], which gives you an overview of the ideas, opportunities, and features of the framework. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/1/unit-testing-googletest-ctest - -作者:[Stephan Avenwedde][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/hansic99 -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/todo_checklist_team_metrics_report.png?itok=oB5uQbzf (Team checklist and to dos) -[2]: https://opensource.com/article/22/1/devops-cmake -[3]: https://vscodium.com/ -[4]: https://cmake.org/ -[5]: https://github.com/google/googletest -[6]: https://cmake.org/cmake/help/latest/manual/ctest.1.html -[7]: https://github.com/hANSIc99/cpp_testing_sample -[8]: https://opensource.com/sites/default/files/cpp_unit_test_vscodium_tag.png (VSCodium tag) -[9]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/Generator/GeneratorTest.cpp -[10]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/Generator/Generator.cpp -[11]: https://en.cppreference.com/w/cpp/io/basic_stringstream -[12]: https://en.cppreference.com/w/cpp/memory/addressof -[13]: https://en.wikipedia.org/wiki/Regular_expression -[14]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/CMakeLists.txt -[15]: https://opensource.com/sites/default/files/cpp_unit_test_ctest_run.png (CTest run) -[16]: https://opensource.com/sites/default/files/cpp_unit_test_ctest_vscodium.png (VSCodium) -[17]: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks -[18]: https://opensource.com/sites/default/files/cpp_unit_test_git_hook_commit_failed.png (Commit failed) -[19]: https://opensource.com/sites/default/files/cpp_unit_test_git_hook_commit_succeeded.png (Commit succeeded) -[20]: https://google.github.io/googletest/primer.html diff --git a/translated/tech/20220118 Perform unit tests using GoogleTest and CTest.md b/translated/tech/20220118 Perform unit tests using GoogleTest and CTest.md new file mode 100644 index 0000000000..6243f966fc --- /dev/null +++ b/translated/tech/20220118 Perform unit tests using GoogleTest and CTest.md @@ -0,0 +1,369 @@ +[#]: subject: "Perform unit tests using GoogleTest and CTest" +[#]: via: "https://opensource.com/article/22/1/unit-testing-googletest-ctest" +[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" +[#]: collector: "lujun9972" +[#]: translator: "toknow-gh" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +使用 GoogleTest 和 CTest 进行单元测试 +====== +进行单元测试可以提高代码质量,并且它不会打断你的工作流。 +![Team checklist and to dos][1] + + +本文是 [使用 CMake 和 VSCodium 搭建构建系统][2] 的后续文章。 + +在上一篇文章中我介绍了基于 [VSCodium][3] 和 [CMake][4] 配置构建系统。本文我将介绍如何通过 [GoogleTest][5] 和 [CTest][6] 将单元测试集成到这个构建系统中。 + +首先克隆 [这个仓库][7],用 VSCodium 打开,切换到 `devops_2` 标签。你可以通过点击 `main` 分支(红框处),然后选择 `devops_2` 标签(黄框处)来进行切换: + +![VSCodium tag][8] + +Stephan Avenwedde (CC BY-SA 4.0) + +或者你可以通过命令行来切换: + + +``` +`$ git checkout tags/devops_2` +``` + +### GoogleTest + +GoogleTest 是一个平台无关的开源 C++ 测试框架。单元测试是用来验证单个逻辑单元的行为的。尽管 GoogleTest 并不是专门用于单元测试的,我将用它对 `Generator` 库进行单元测试。 + +在 GoogleTest 中,测试用例是通过断言宏来定义的。断言可能产生以下结果: + + * _成功_: 测试通过。 + * _非致命失败_: 测试失败,但测试继续。 + * _致命失败_: 测试失败,且测试终止。 + + +致命断言和非致命断言通过不同的宏来区分: + + * `ASSERT_*`: 致命断言,失败时终止。 + * `EXPECT_*`: 非致命断言,失败时不终止。 + + +谷歌推荐使用 `EXPECT_*` 宏,因为当测试中包含多个的断言时,它允许继续执行。断言有两个参数:第一个参数是测试分组的名称,第二个参数是测试自己的名称。`Generator` 只定义了 `generate(...)` 函数,所以本文中所有的测试都属于同一个测试组:`GeneratorTest`。 + +针对 `generate(...)` 函数的测试可以从 [GeneratorTest.cpp][9] 中找到。 + +#### 引用一致性检查 + +[generate(...)][10] 函数有一个 [std::stringstream][11] 的引用作为输入参数,并且它也将这个引用作为返回值。第一个测试就是检查输入的引用和返回的引用是否一致。 + + +``` + + +TEST(GeneratorTest, ReferenceCheck){ +    const int NumberOfElements = 10; +    std::stringstream buffer; +    EXPECT_EQ( +        std::addressof(buffer), +        std::addressof(Generator::generate(buffer, NumberOfElements)) +    ); +} + +``` + +在这个测试中我使用 [std::addressof][12] 来获取对象的地址,并用 `EXPECT_EQ` 来比较输入对象和返回对象是否是同一个。 + +#### 检查元素个数 + +本测试检查作为输入的 `std::stringstream` 引用中的元素个数与输入参数中指定的个数是否相同。 + + +``` + + +TEST(GeneratorTest, NumberOfElements){ +    const int NumberOfElements = 50; +    int nCalcNoElements = 0; + +    std::stringstream buffer; + +    Generator::generate(buffer, NumberOfElements); +    std::string s_no; + +    while(std::getline(buffer, s_no, ' ')) { +        nCalcNoElements++; +    } + +    EXPECT_EQ(nCalcNoElements, NumberOfElements); +} + +``` + +#### 乱序重排 + +本测试检查随机化引擎是否工作正常。如果连续调用两次 `generate` 函数,应该得到的是两个不同的结果。 + + +``` + + +TEST(GeneratorTest, Shuffle){ + +    const int NumberOfElements = 50; + +    std::stringstream buffer_A; +    std::stringstream buffer_B; + +    Generator::generate(buffer_A, NumberOfElements); +    Generator::generate(buffer_B, NumberOfElements); + +    EXPECT_NE(buffer_A.str(), buffer_B.str()); +} + +``` + +#### 求和校验 + +与前面的测试相比,这是一个大体量的测试。它检查 1 到 n 的数值序列的和与乱序重排后的序列的和是否相等。 `generate(...)` 函数应该生成一个 1 到 n 的乱序的序列,这个序列的和应当是不变的。 + + + +``` + + +TEST(GeneratorTest, CheckSum){ + +    const int NumberOfElements = 50; +    int nChecksum_in = 0; +    int nChecksum_out = 0; + +    std::vector vNumbersRef(NumberOfElements); // Input vector +    std::iota(vNumbersRef.begin(), vNumbersRef.end(), 1); // Populate vector + +    // Calculate reference checksum +    for(const int n : vNumbersRef){ +        nChecksum_in += n; +    } + +    std::stringstream buffer; +    Generator::generate(buffer, NumberOfElements); + +    std::vector vNumbersGen; // Output vector +    std::string s_no; + +    // Read the buffer back back to the output vector +    while(std::getline(buffer, s_no, ' ')) { +        vNumbersGen.push_back(std::stoi(s_no)); +    } + +    // Calculate output checksum +    for(const int n : vNumbersGen){ +        nChecksum_out += n; +    } + +    EXPECT_EQ(nChecksum_in, nChecksum_out); +} + +``` + +你可以像对一般 C++ 程序一样调试这些测试。 + +### CTest + +除了嵌入到代码中的测试之外,[CTest][6] 提供了可执行程序的测试方式。简而言之就是通过给可执行程序传入特定的参数,然后用 [正则表达式][13] 对它的输出进行匹配检查。通过这种方式可以很容易检查程序对于不正确的命令行参数的反应。这些测试定义在顶层的 [CMakeLists.txt][14] 文件中。下面我详细介绍 3 个测试用例: + +#### 参数正常 + +如果输入参数是一个正整数,程序应该输出应该是一个数列: + +``` + + +add_test(NAME RegularUsage COMMAND Producer 10) +set_tests_properties(RegularUsage +    PROPERTIES PASS_REGULAR_EXPRESSION "^[0-9 ]+" +) + +``` + +#### 没有提供参数 + +如果没有传入参数,程序应该立即退出并提示错误原因: + + +``` + + +add_test(NAME NoArg COMMAND Producer) +set_tests_properties(NoArg +    PROPERTIES PASS_REGULAR_EXPRESSION "^Enter the number of elements as argument" +) + +``` + +#### 参数错误 + +当传入的参数不是整数时,程序应该退出并报错。比如给 `Producer` 传入参数 `ABC`: + + +``` + + +add_test(NAME WrongArg COMMAND Producer ABC) +set_tests_properties(WrongArg +    PROPERTIES PASS_REGULAR_EXPRESSION "^Error: Cannot parse" +) + +``` + +#### 执行测试 + +可以使用 `ctest -R Usage -VV` 命令来执行测试。这里给 `ctest` 的命令行参数: + + * `-R <测试名称>` : 执行单个测试 + * `-VV`:打印详细输出 + + + +测试执行结果如下: + +``` + + +$ ctest -R Usage -VV +UpdatecTest Configuration from :/home/stephan/Documents/cpp_testing sample/build/DartConfiguration.tcl +UpdateCTestConfiguration from :/home/stephan/Documents/cpp_testing sample/build/DartConfiguration.tcl +Test project /home/stephan/Documents/cpp_testing sample/build +Constructing a list of tests +Done constructing a list of tests +Updating test list for fixtures +Added 0 tests to meet fixture requirements +Checking test dependency graph... +Checking test dependency graph end + +``` + +在这里我执行了名为 `Usage` 的测试。 + +它以无参数的方式调用 `Producer`: + + + +``` + + +test 3 +    Start 3: Usage +3: Test command: /home/stephan/Documents/cpp testing sample/build/Producer + +``` + +输出不匹配 `[^[0-9]+]` 的正则模式,测试未通过。 + + +``` + + +3: Enter the number of elements as argument +1/1 test #3. Usage ................ + +Failed Required regular expression not found. +Regex=[^[0-9]+] + +0.00 sec round. + +0% tests passed, 1 tests failed out of 1 +Total Test time (real) = +0.00 sec +The following tests FAILED: +3 - Usage (Failed) +Errors while running CTest +$ + +``` + +如果想要执行所有测试(包括那些用 GoogleTest 生成的),切换到 `build` 目录中,然后运行 `ctest` 即可: + +![CTest run][15] + +Stephan Avenwedde (CC BY-SA 4.0) + +在 VSCodium 中可以通过点击信息栏的黄框处来调用 CTest。如果所有测试都通过了,你会看到如下输出: + +![VSCodium][16] + +Stephan Avenwedde (CC BY-SA 4.0) + +### 使用 Git 钩子进行自动化测试 + +目前为止,运行测试是开发者需要额外执行的步骤,那些不能通过测试的代码仍然可能被提交和推送到代码仓库中。利用 [Git 钩子][17] 可以自动执行测试,从而防止有瑕疵的代码被提交。 + +切换到 `.git/hooks` 目录,创建 `pre-commit` 文件,复制粘贴下面的代码: + + +``` + + +#!/usr/bin/sh + +(cd build; ctest --output-on-failure -j6) + +``` + +然后,给文件增加可执行权限: + +``` +`$ chmod +x pre-commit` +``` + +这个脚本会在提交之前调用 CTest 进行测试。如果有测试未通过,提交过程就会被终止: + +![Commit failed][18] + +Stephan Avenwedde (CC BY-SA 4.0) + +只有所有测试都通过了,提交过程才会完成: + +![Commit succeeded][19] + +Stephan Avenwedde (CC BY-SA 4.0) + +这个机制也有一个漏洞:可以通过 `git commit --no-verify` 命令绕过测试。解决办法是配置构建服务器,这能保证只有正常工作的代码才能被提交,但这又是另一个话题了。 + +### 总结 + +本文提到的技术实施简单,并且能够帮你快速发现代码中的 bug。做单元测试可以提高代码质量,同时也不会打断你的工作流。GoogleTest 框架提供了丰富的特性以应对各种测试场景,文中我所提到的只是一小部分而已。如果你想进一步了解 GoogleTest,我推荐你阅读 [GoogleTest Primer][20]。 + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/unit-testing-googletest-ctest + +作者:[Stephan Avenwedde][a] +选题:[lujun9972][b] +译者:[toknow-gh](https://github.com/toknow-gh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/hansic99 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/todo_checklist_team_metrics_report.png?itok=oB5uQbzf (Team checklist and to dos) +[2]: https://opensource.com/article/22/1/devops-cmake +[3]: https://vscodium.com/ +[4]: https://cmake.org/ +[5]: https://github.com/google/googletest +[6]: https://cmake.org/cmake/help/latest/manual/ctest.1.html +[7]: https://github.com/hANSIc99/cpp_testing_sample +[8]: https://opensource.com/sites/default/files/cpp_unit_test_vscodium_tag.png (VSCodium tag) +[9]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/Generator/GeneratorTest.cpp +[10]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/Generator/Generator.cpp +[11]: https://en.cppreference.com/w/cpp/io/basic_stringstream +[12]: https://en.cppreference.com/w/cpp/memory/addressof +[13]: https://en.wikipedia.org/wiki/Regular_expression +[14]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/CMakeLists.txt +[15]: https://opensource.com/sites/default/files/cpp_unit_test_ctest_run.png (CTest run) +[16]: https://opensource.com/sites/default/files/cpp_unit_test_ctest_vscodium.png (VSCodium) +[17]: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks +[18]: https://opensource.com/sites/default/files/cpp_unit_test_git_hook_commit_failed.png (Commit failed) +[19]: https://opensource.com/sites/default/files/cpp_unit_test_git_hook_commit_succeeded.png (Commit succeeded) +[20]: https://google.github.io/googletest/primer.html From 6c0e53f3399d0eb42fa546d7f22ec943265ae545 Mon Sep 17 00:00:00 2001 From: toknow-gh Date: Sat, 29 Jul 2023 21:54:48 +0800 Subject: [PATCH 20/72] Translating tech/20220131 How to set up a CI pipeline on GitLab.md --- sources/tech/20220131 How to set up a CI pipeline on GitLab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20220131 How to set up a CI pipeline on GitLab.md b/sources/tech/20220131 How to set up a CI pipeline on GitLab.md index 3efaf59fbb..a3943949b6 100644 --- a/sources/tech/20220131 How to set up a CI pipeline on GitLab.md +++ b/sources/tech/20220131 How to set up a CI pipeline on GitLab.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/22/2/setup-ci-pipeline-gitlab" [#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" [#]: collector: "lujun9972" -[#]: translator: " " +[#]: translator: "toknow-gh" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From dd8f62a7d88d49a79daa9931b9f720ed5cd34252 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 30 Jul 2023 07:41:37 +0800 Subject: [PATCH 21/72] ATRP @wxy https://linux.cn/article-16046-1.html --- ...virtual conference using only open source tools.md | 317 ++++++++++++++++++ ...virtual conference using only open source tools.md | 312 ----------------- 2 files changed, 317 insertions(+), 312 deletions(-) create mode 100644 published/20230427.1 ⭐️⭐️ Run a virtual conference using only open source tools.md delete mode 100644 sources/tech/20230427.1 ⭐️⭐️ Run a virtual conference using only open source tools.md diff --git a/published/20230427.1 ⭐️⭐️ Run a virtual conference using only open source tools.md b/published/20230427.1 ⭐️⭐️ Run a virtual conference using only open source tools.md new file mode 100644 index 0000000000..9d9300e11a --- /dev/null +++ b/published/20230427.1 ⭐️⭐️ Run a virtual conference using only open source tools.md @@ -0,0 +1,317 @@ +[#]: subject: "Run a virtual conference using only open source tools" +[#]: via: "https://opensource.com/article/23/4/open-source-tools-virtual-conference" +[#]: author: "Máirín Duffy https://opensource.com/users/mairin" +[#]: collector: "lkxed" +[#]: translator: "ChatGPT" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-16046-1.html" + +使用开源工具来举办线上大会 +====== + +![][0] + +> 下面是使用开源工具来举办一场线上活动的方法。 + +在 2023 年 1 月举办了首届 [创意自由峰会][2]Creative Freedom Summit 后,[Fedora 设计团队][1] 发现使用开源工具来举办线上大会非常有效。 + +在本文中,我将分享一些关于这场大会的背景信息,为什么对我们来说使用开源工具来举办大会很重要,以及为实现这一目标我们的团队所使用的具体工具和配置。我还会谈谈哪些工作做的很好,在以及我们 2024 年下一届峰会中需要改进的地方。 + +### 创意自由峰会 + +创意自由峰会是 Marie Nordin 在审查了 [Fedora 用户与贡献者年度大会(Flock)][3] 的演讲提交后提出的一个想法。在 2022 年 8 月的 Flock 大会上,她收到了大量与开源设计和创意相关的演讲提交,远远超出我们能够接受的数量。由于存在许多关于开源设计的优秀想法,她想知道是否有机会举办一个独立的开源创意大会,专门面向在创作中使用开源工具的创意人士。 + +Marie 在 2022 年秋季向 Fedora 设计团队提出了这个想法,我们开始筹划这个会议,会议于 2023 年 1 月 17 日至 19 日举行。由于这是我们第一次举办这样一场新的会议,我们决定首先基于 Flock 提交的演讲和我们自己的开源创意人士网络,邀请其中一些人士担任演讲嘉宾。几乎每位我们邀请的演讲者都答应演讲,所以我们没有接受其他人的提交。明年我们需要找到更好的解决办法,所以目前我们还没有开源的投稿管理工具可供介绍。 + +### 在开源大会中使用开源工具 + +自从最初的大流行封锁以来,Fedora 的 Flock 大会一直使用 Hopin 虚拟平台在线举办,尽管 Hopin 不是开源的,但对开源工具很友好。Fedora 几年前开始使用 Hopin,它确实提供了专业的会议体验,包括内置的赞助商展位/博览厅、分会场、大厅聊天对话和管理工具。通过 Hopin 来举办创意自由峰会对我们来说可行,因为作为 Fedora 赞助的活动,我们可以使用 Fedora 的 Hopin 环境。再次强调,Hopin 不是开源的。 + +作为一个长期(约 20 年)的开源贡献者,我可以告诉你,做出这样的决定总是很困难的。如果你的大会专注于开源,使用专有平台来举办你的活动可能会有些奇怪。然而,随着我们社区和活动的规模和复杂性不断增长,开发一个集成的开源会议系统变得更具挑战性。 + +并不存在正确或错误的答案。在做出这个决定时,你必须权衡很多因素: + +- 预算 +- 人力资源 +- 基础设施 +- 技术能力 +- 活动的复杂性/正式性/文化 + +我们没有为这次活动安排任何预算。我们有一支志愿者团队可以投入一些工作时间。我们有 Fedora Matrix 服务器作为可以加入的支持基础设施,并且有一个托管的 WordPress 系统用于网站。我和队友 Madeline Peck 在举办每周的 Fedora 设计团队的 [视频会议][4] 方面具有一定的技术能力和经验。我们希望这次活动是低调、单一会场和非正式的,所以对于一些小故障或瑕疵我们有一定的容忍度。我们对尝试使用开源工具组合也有很大的热情。 + +现在你了解了我们在做出这个决定时的一些考虑因素,这可能有助于你在为自己的活动做决策时参考。 + +### 一个开源会议技术栈 + +以下是会议技术栈的工作方式。 + +#### 概述 + +直播组件: + +- **直播流**: 我们通过 PeerTube 频道将主舞台和社交活动进行实时直播。会议参与者可以从我们的 PeerTube 频道观看直播。PeerTube 提供了一些注重隐私的分析功能,可以跟踪直播观众和活动后观看次数。 +- **直播舞台 + 社交活动房间**: 我们设有一个用于演讲者和主持人的直播舞台,使用 Jitsi 确保只有有权限的人可以上镜。我们额外设有一个 Jitsi 会议室,用于社交活动,允许任何希望参与社交活动的人上镜。 +- **后台**: 我们有一个名为“后台”的 Matrix 频道,用于在活动期间与演讲者、主持人和志愿者协调工作。 +- **公告和问答**: 我们通过共享的 Etherpad(后来转移到 Hackmd.io)来管理问答和每日议程。 +- **集成和集中化的会议体验**: 使用 Matrix 的 Element 客户端,我们将直播视频和 Etherpad 嵌入到一个公共的 Matrix 频道中,供会议使用。我们根据频道中的参与人数来监控整体会议出席情况。我们在整个会议期间设有实时聊天,并从聊天和嵌入的用于问答的 Etherpad 中接受观众提问。 +- **会议网站**: 我们有一个由 Ryan Gorley 设计精美的网站,托管在 WordPress 上,网站提供了基本信息和链接,包括如何参加会议、日期/时间和议程。 + +活动后组件: + +- **活动后调查**: 我们使用开源的 LimeSurvey 系统向参会者发送了一份活动后的调查,以了解他们的参会体验。我在这篇文章中使用了该调查的一些数据。 +- **活动后的视频编辑和字幕**: 我们的会议没有实时字幕系统,但在我能做到的情况下,我在频道中即时记录了演讲的笔记,与会者对此表示非常感激。活动后,我们使用了 Kdenlive(活动中演讲中展示的工具之一)来编辑视频并生成字幕。 +- **活动录像**: PeerTube 会自动将直播录像发布到频道,从而使参会者可以看到他们可能错过的演讲的几乎即时录像。 + +接下来,我将介绍一些细节。 + +### 使用 PeerTube 进行直播 + +![创意自由峰会的 PeerTube 频道截图,显示了标志、事件描述和一组视频缩略图][5] + +我们在创意自由峰会的直播中使用了由 [LinuxRocks.online][7] 慷慨提供的 [LinuxRocks PeerTube 平台][6]。PeerTube 是一个自由开源的去中心化视频平台,也是 联邦宇宙Fediverse 的一部分。 + +PeerTube 最好的特点之一(我所了解的其他平台所没有的)是,在直播结束后,你会在 PeerTube 上的频道上获得一个几乎即时的重播录像。我们的聊天室用户将这视为该平台的主要优点。如果某位参与者错过了他们非常感兴趣的一个会议,他们可以在该演讲结束后的几分钟内观看到它。这不需要志愿者组织团队进行手动干预、上传或协调,PeerTube 会自动完成。 + +以下是使用 PeerTube 进行直播的工作方式:你在频道上创建一个新的直播流,它会给你一个直播流 URL 和一个用于授权流媒体的密钥。这个 URL 和密钥可以反复使用。我们进行配置,使得录像会在直播结束后立即发布到我们创建直播流 URL 的频道上。接下来,在开始直播时将 URL 和密钥复制/粘贴到 Jitsi 中。这意味着你不必为会议期间的每个演讲生成新的 URL 和密钥,组织者管理这些将会带来相当大的工作量。相反,我们可以重复使用相同的 URL 和密钥,将其共享在会议组织者之间的共同文档中(我们每个人都有不同的演讲托管时间段)。团队中任何具有该文档访问权限的人都可以启动直播。 + +#### 如何生成 PeerTube 中的直播流 URL 和密钥 + +以下部分逐步介绍了如何在 PeerTube 中生成直播流的 URL 和密钥。 + +##### 1、创建 PeerTube 上的直播视频 + +登录到 PeerTube,并点击右上角的 “发布Publish” 按钮: + +![PeerTube 发布按钮的截图][8] + +##### 2、设置选项 + +点击 “进行直播Go live” 选项卡(从左数第四个),并设置以下选项: + +- 频道Channel:(你希望直播发布在的频道名称) +- 隐私Privacy:公开 +- 单选按钮:普通直播Normal live + +然后选择 “进行直播Go live” 。 (不用担心,你还不会真正开始直播,还有更多数据需要填写。) + +![PeerTube 中的 Go Live 按钮的截图][9] + +##### 3. 基本信息(暂时不要点击更新按钮) + +首先,在 基本信息Basic info 选项卡中填写信息,然后在下一步选择 高级设置Advanced settings 选项卡。填写直播流的名称、描述、标签、类别、许可证等。在转码复选框启用后记得发布。 + +这样一来,一旦直播结束,录制视频将自动发布到你的频道上。 + +##### 4. 高级设置 + +你可以上传一个“待机”图像,当观看直播流 URL 并等待开始时,该图像会显示在所有人面前。 + +![PeerTube 高级设置的截图][10] + +这是我们在创意自由峰会上使用的待机图像: + +![创意自由峰会横幅的截图][11] + +##### 5. 在 PeerTube 上开始直播 + +选择右下角的 “更新Update” 按钮。直播流将显示如下,直到你从 Jitsi 开始直播: + +![在 PeerTube 上开始直播的截图][12] + +##### 6. 将直播流的 URL 复制粘贴到 Jitsi + +这是 PeerTube 的最后一步。一旦直播流启动,点击视频下方右侧的 “...” 图标: + +![复制并粘贴 URL][13] + +选择 “显示直播信息Display live information”。你将看到如下对话框: + +![显示直播信息选项的截图][14] + +你需要复制直播的 RTMP URL 和直播流密钥。将它们合并成一个 URL,然后将其复制粘贴到 Jitsi。 + +以下是我测试运行时的这两个文本块示例,可供复制: + +- 直播的 RTMP URL:`rtmp://peertube.linuxrocks.online:1935/live` +- 直播流密钥:`8b940f96-c46d-46aa-81a0-701de3c43c8f` + +你需要将这两个文本块合并,并在它们之间加上 `/`,如下所示: + +``` +rtmp://peertube.linuxrocks.online:1935/live/8b940f96-c46d-46aa-81a0-701de3c43c8f +``` + +### Jitsi 的直播舞台 + 社交活动室 + +我们在我们的 “直播舞台” 上使用了自由开源的托管平台 [Jitsi Meet][15] 视频会议平台。我们在 [https://meet.jit.si][16] 上创建了一个自定义 URL 的 Jitsi 会议室,并只与演讲者和会议组织者共享了该 URL。 + +我们配置了会议室的等候室(该功能在你加入新创建的会议室后在会议设置中可用),这样演讲者可以在他们的演讲前几分钟加入而不用担心打断前一个演讲。我们的主持人志愿者在前一个会话结束后让他们进入。另一个选项是给会议室添加密码。我们只是配置了一个等候室就行了。在测试时似乎发现,会议室中的管理状态并不是持久的。如果一个管理员离开了会议室,他们似乎会失去管理员状态和设置,比如等候室的设置。我通过让我的电脑保持打开的状态,使 Jitsi 会议室在整个会议期间可用和活动。(在这方面,你的情况可能会有所不同。) + +Jitsi 提供了内置的直播选项,你可以将视频服务的 URL 发布到 Jitsi 中,它会将你的视频流式传输到该服务。我们对这种方法有信心,因为这是我们主办和直播每周举行的 [Fedora 设计团队会议][17] 的方式。对于创意自由峰会,我们将我们的 Jitsi 直播舞台(用于演讲者和主持人)连接到 [Linux Rocks PeerTube 上的一个频道][6]。 + +Jitsi 允许演讲者共享屏幕来展示幻灯片或进行实时演示。 + +#### 将 Jitsi 直播到 PeerTube + +1、加入会议并点击屏幕底部红色挂断按钮旁边的 “...” 图标。 + +![加入 Jitsi 会议][18] + +2、从弹出菜单中选择 “开始直播Start live stream”。 + +![在 Jitsi 中开始直播的截图][19] + +3、复制并粘贴 PeerTube 的 URL + 密钥文本 + +![复制并粘贴直播流密钥的截图][20] + +4、倾听 Jitsi 机器人朋友的声音 + +几秒钟后,会出现一个女性声音告诉你,“Live streaming is on.”(直播已开启)。一旦听到这个声音,微笑吧!你正在进行直播。 + +5、停止直播 + +这将停止你设置的 PeerTube URL 的工作,所以重复这些步骤可以重新启动直播。 + +#### Jitsi 技巧 + +##### 通过开关 Jitsi 的流来管理录制 + +我们在会议中认识到,在演讲之间关闭 Jitsi 的直播流会更好,这样你将在 PeerTube 上针对每个演讲发布一个原始录制文件。第一天我们让它一直运行,因此一些录制中包含了多个演讲的视频,这使得那些试图赶上进度的人使用即时回放功能更困难。他们需要在视频中寻找他们想观看的演讲,或者等待我们在几天或几周后发布编辑过的版本。 + +#### 避免音频回音 + +我们在活动期间实时发现的另一个问题是音频回音。这在我们的测试中并没有出现,这完全是我的错(对所有参加的人道歉)。我负责设置 Jitsi/PeerTube 的链接、监控流和协助主持活动。尽管我知道一旦直播开始,我需要关闭所有已打开的 PeerTube 浏览器标签,但我可能打开了比我想象中更多的 PeerTube 标签,或者直播会在我可用于监控聊天的 Element 客户端中自动开始播放。我没有很方便地静音 Element 的方法。在我进行的一些演讲者介绍中,你会注意到我知道在音频回音开始之前大约有 30 秒的时间,因此我做的介绍非常匆忙/急促。 + +我认为有更简单的方法来避免这种情况: + +- 尽量确保主持人/活动主持人不是负责设置/监控流和聊天的同一个人。(根据你每次拥有多少义工人员的情况,这并不总是可能的。) +- 如果可能,使用一台电脑监控流,另一台电脑担任主持人角色。这样,你在用于监控的电脑上只需按一下静音按钮,简化了你在另一个电脑上的主持体验。 + +这是一件值得提前练习和完善的事情。 + +### 后台:Element + +![以下是 Element 中显示的三个聊天室列表的截图:Creative Freedom Summit(白色徽标)、Creative Freedom Summit Backstage(黑色徽标)和 Creative Freedom Summit Hosts(橙色徽标)][21] + +我们在会议开始前大约一周设置了一个 “后台” 邀请制聊天室,并邀请了所有的演讲者加入。这有助于确保以下几点: + +- 我们的演讲者在活动开始之前就加入了 Element/Matrix,并有机会在注册遇到任何问题时都可以获得帮助(实际上没有人遇到问题)。 +- 在活动开始之前,我们与所有演讲者建立了一个实时的交流渠道,以便我们能够轻松地发送公告和更新。 + +在活动期间,这个聊天室成为一个有用的地方,用于协调演讲者之间的过渡,提醒日程是否延迟,以及在一个情况下,当我们的演讲者出现紧急情况无法按原定时间发言时,迅速重新安排演讲时间。 + +我们还为主持人设置了一个房间,但在我们的情况下,它是多余的。我们只是使用后台频道进行协调。我们发现两个频道很容易监控,但三个频道对于方便起见有点太多了。 + +### 公告和问答:Etherpad/Hackmd.io + +![这是一个名为 “General information” 的 Etherpad 的截图,其中包含有关创意自由峰会的一些信息][22] + +我们在 Element 主频道中设置了一个固定的小部件,提供有关活动的一般信息,包括每日日程安排、行为准则等。我们还为每个演讲设置了一个问答部分,让与会者可以在其中提出问题,主持人会为演讲者朗读这些问题。 + +在开始的一两天中,我们发现一些与会者在加载 Etherpad 小部件时遇到问题,因此我们改为在频道中固定一个内嵌的 hackmd.io 文档作为小部件,那似乎效果更好一些。我们并不 100% 确定小部件加载问题的具体原因,但我们可以在频道主题中发布一个原始(非内嵌)链接,这样参与者就可以绕过通过小部件访问时可能遇到的任何问题。 + +### 综合和集中的会议体验 + +![在左上角是一个视频直播,右上角是一个 hackmd.io 的公告页面,下方是一个活跃的聊天窗口][23] + +通过 Fedora 的 Element 服务器使用 Matrix 是参加会议的关键地方。Element 中的 Matrix 聊天室具有小部件系统,可以将网站嵌入到聊天室中,成为体验的一部分。这个功能对于将我们的 Matrix 聊天室作为集中参会的地方非常重要。 + +我们将 PeerTube 的直播嵌入到了聊天频道中,在上面的截图中左上角可以看到。会议结束后,我们可以分享未编辑的视频回放的播放列表。现在,我们志愿者项目编辑视频的工作已经完成,该频道中有按顺序排列的编辑演讲的播放列表。 + +如前一节所讨论的,我们在右上角嵌入了一个 hackmd.io 笔记,用于发布当天的日程安排、公告以及一个用于问答的区域。我本来想设置一个 Matrix 机器人来处理问答,但我在运行时遇到了一些困难。不过,这可能是明年一个很酷的项目。 + +在会议期间,与会者直接在主要聊天窗口下方进行交流,同时与小部件进行互动。 + +在将 Matrix/Element 聊天室作为在线会议的中心地点时,有几个要考虑的因素,例如: + +- 在 Element 桌面客户端或桌面系统的 Web 浏览器上会有最佳体验。但是,你也可以在 Element 移动客户端中查看小部件(尽管一些参与者在发现此功能时遇到了困难,其用户界面不太明显)。其他 Matrix 客户端可能无法查看小部件。 +- 如果需要,与会者可以根据自己的喜好自行组合体验。那些不使用 Element 客户端参加会议的用户报告称加入聊天并直接查看 PeerTube 直播 URL 没有问题。我们在频道主题中分享了直播 URL 和 hackmd URL,以便那些不想使用 Element 的用户也可以访问。 + +### 网站 + +[Ryan Gorley][25] 使用 [WordPress][27] 开发了 [创意自由峰会网站][26]。该网站由 WPengine 托管,是一个单页网站,其中嵌入了来自 sched.org 的会议日程安排。在网站顶部,有一个标题为 “Create. Learn. Connect.” 的屏幕截图,背景是蓝色和紫色的渐变效果。 + +### 后续活动 + +#### 后续调查 + +我们使用开源调查工具 LimeSurvey。在会议结束后的一两周内,我们通过 Element 聊天频道和 PeerTube 视频频道向与会者发送了调查,以了解他们对我们活动的看法。活动组织者们继续定期开会。在这些会议的其中一个议题是共同撰写 hackmd.io 文档,以制定调查问题。以下是我们从活动中学到的一些对你计划自己的开源线上会议可能有兴趣的事项: + +- 绝大多数与会者(共 70% 的受访者)是通过 Mastodon 和 Twitter 得知本次活动的。 +- 33% 的与会者使用 Element 桌面应用程序参加会议,30% 使用 Element 聊天 Web 应用程序。因此,大约有 63% 的与会者使用了集成的 Matrix/Element 体验。其他与会者直接在 PeerTube 上观看或在会后观看了回放。 +- 35% 的与会者表示他们通过聊天与其他创意人建立了联系,因此如果你的目标是促进人际交流和连接,聊天体验对于活动来说非常重要。 + +#### 字幕 + +在活动期间,我们收到了与会者的积极反馈,他们对其他与会者在聊天中实时添加的演讲字幕表示赞赏,并希望能够提供实时字幕以提升可访问性。虽然本文未提及实时字幕的相关软件,但有一些开源解决方案可供选择。其中一个工具是 Live Captions,在 Seth Kenlon 撰写的一篇文章《[在 Linux 上的开源视频字幕][28]》中进行了介绍。虽然这个工具主要用于本地观看视频内容的与会者,但我们有可能让会议主持人在 Jitsi 中运行它并与直播共享。其中一种方法是使用开源广播工具 [OBS][29],这样每个观看直播的人都能受益于字幕功能。 + +在会后编辑视频时,我们发现了内置于我们首选的开源视频编辑软件 [Kdenlive][30] 中的一项功能,它能够自动生成字幕并自动放置到视频中。在 [Kdenlive 手册][31] 中有关于如何使用这个功能的基本说明。Fedora 设计团队成员 Kyle Conway 在协助会后视频编辑时,制作了一份 [详细教程(包括视频指导):如何在 Kdenlive 中自动生成并添加字幕][32]。如果你对这个功能感兴趣,阅读和观看这个教程会非常有帮助。 + +#### 视频编辑志愿者工作 + +活动结束后,我们在会议的 Element 频道中召集了一组志愿者,共同进行视频编辑工作,包括添加标题卡、片头/片尾音乐以及进行整体清理。我们自动生成的一些重播录像可能会分为两个文件,或者与其他多个演讲合并在一个文件中,因此需要重新组装或裁剪。 + +我们使用 [GitLab Epic][33] 来组织这项工作,其中包含常见问题和寻找按技能组织的志愿者的帮助,每个视频工作都附加有相应的议题。我们为每个视频设置了一系列自定义标签,以明确该视频的状态以及需要何种帮助。所有视频的编辑工作都已完成,其中一些视频需要为其在 [创意自由峰会频道][6] 上的描述区域撰写内容。许多视频都有自动生成的字幕,但字幕中可能存在拼写错误和其他常见的自动生成文本错误,还需要进行编辑修正。 + +![GitLab 上需要编辑帮助的视频清单的截图][34] + +我们通过让志愿者从创意自由峰会的 PeerTube 主频道的未编辑录像中下载原始视频来传递这些视频文件(由于文件大小可能相当大)。当志愿者准备好分享编辑好的视频时,我们有一个私人的 PeerTube 账户,他们可以将视频上传到该账户。具有主频道账户访问权限的管理员会定期从私人账户中获取视频,并将其上传到主账户中。请注意,PeerTube 并没有一个多个账户访问同一频道的系统,因此我们不得不进行密码共享,这可能有些令人紧张。我们认为这是一个合理的妥协,可以限制掌握主要密码的人数,同时仍然可以让志愿者提交编辑好的视频而不会太过麻烦。 + +### 准备尝试一下吗? + +我希望这个对于我们如何使用开源工具集来举办创意自由峰会的全面描述能够激发你尝试在你的开源活动中使用这些方法。让我们知道进展如何,并随时联系我们如果你有问题或改进建议!我们的频道链接为:[https://matrix.to/#/#creativefreedom:fedora.im][35] + +*(题图:MJ/cb6a4ea4-95ed-40cb-9e78-85f8676219f2)* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/4/open-source-tools-virtual-conference + +作者:[Máirín Duffy][a] +选题:[lkxed][b] +译者:ChatGPT +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mairin +[b]: https://github.com/lkxed/ +[1]: https://fedoraproject.org/wiki/Design +[2]: http://creativefreedomsummit.com/ +[3]: http://flocktofedora.org/ +[4]: https://opensource.com/article/23/3/video-templates-inkscape +[5]: https://opensource.com/sites/default/files/2023-04/homepage.webp +[6]: https://peertube.linuxrocks.online/c/creativefreedom/videos +[7]: https://linuxrocks.online/ +[8]: https://opensource.com/sites/default/files/2023-04/publish.png +[9]: https://opensource.com/sites/default/files/2023-04/go-live.png +[10]: https://opensource.com/sites/default/files/2023-04/advdsettings.png +[11]: https://opensource.com/sites/default/files/2023-04/cfsbanner.png +[12]: https://opensource.com/sites/default/files/2023-04/startlivestream.jpg +[13]: https://opensource.com/sites/default/files/2023-04/pasteURL.png +[14]: https://opensource.com/sites/default/files/2023-04/liveinformation.png +[15]: https://meet.jit.si/ +[16]: https://meet.jit.si +[17]: https://peertube.linuxrocks.online/c/fedora_design_live/videos +[18]: https://opensource.com/sites/default/files/2023-04/moreactions.png +[19]: https://opensource.com/sites/default/files/2023-04/startlivestream.png +[20]: https://opensource.com/sites/default/files/2023-04/copypastekey.png +[21]: https://opensource.com/sites/default/files/2023-04/backstage.webp +[22]: https://opensource.com/sites/default/files/2023-04/hackmd.webp +[23]: https://opensource.com/sites/default/files/2023-04/integratedexperience.webp +[24]: https://opensource.com/sites/default/files/2023-04/website.webp +[25]: https://mastodon.social/@ryangorley +[26]: https://creativefreedomsummit.com/ +[27]: https://wordpress.com/ +[28]: https://opensource.com/article/23/2/live-captions-linux +[29]: https://obsproject.com/ +[30]: https://kdenlive.org/ +[31]: https://docs.kdenlive.org/en/effects_and_compositions/speech_to_text.html +[32]: https://gitlab.com/groups/fedora/design/-/epics/23#video-captioning-and-handoff +[33]: https://gitlab.com/groups/fedora/design/-/epics/23 +[34]: https://opensource.com/sites/default/files/2023-04/availablevideos_0.webp +[35]: https://matrix.to/#/#creativefreedom:fedora.im +[36]: https://blog.linuxgrrl.com/2023/04/10/run-an-open-source-powered-virtual-conference/ +[0]: https://img.linux.net.cn/data/attachment/album/202307/30/073728saabpgnjtz5ankgb.jpg \ No newline at end of file diff --git a/sources/tech/20230427.1 ⭐️⭐️ Run a virtual conference using only open source tools.md b/sources/tech/20230427.1 ⭐️⭐️ Run a virtual conference using only open source tools.md deleted file mode 100644 index 0bbc597e87..0000000000 --- a/sources/tech/20230427.1 ⭐️⭐️ Run a virtual conference using only open source tools.md +++ /dev/null @@ -1,312 +0,0 @@ -[#]: subject: "Run a virtual conference using only open source tools" -[#]: via: "https://opensource.com/article/23/4/open-source-tools-virtual-conference" -[#]: author: "Máirín Duffy https://opensource.com/users/mairin" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Run a virtual conference using only open source tools -====== - -[The Fedora Design Team][1] discovered that using open source tools to run a virtual conference can be quite effective by hosting the first [Creative Freedom Summit][2] in January 2023. - -In this article, I'll share some background on the conference, why using open source tools to run it was important to us, and the specific tools and configurations our team used to make it all work. I'll also talk about what worked well and what will need improvement at our next summit in 2024. - -### What is Creative Freedom Summit? - -The Creative Freedom Summit was an idea Marie Nordin came up with after reviewing talk submissions for [Flock, the annual Fedora users and contributors conference][3]. She received many talk submissions for the August 2022 Flock relating to design and creativity in open source—far more than we could possibly accept. With so many great ideas for open source design-related talks out there, she wondered if there would be space for a separate open source creativity conference focused on creatives who use open source tools to produce their work. - -Marie brought this idea to the Fedora Design Team in the fall of 2022, and we started planning the conference, which took place January 17-19, 2023. Since it was our first time running a new conference like this, we decided to start with invited speakers based on some of the Flock submissions and our own personal network of open source creatives. Almost every speaker we asked gave a talk, so we didn't have room to accept submissions. We will need to figure out this next year, so we don't have an open source CFP (Call for Papers) management tool for that to tell you about yet. - -### Using open source for open source conferences - -Since the initial COVID pandemic lockdowns, Fedora's Flock conference has been run virtually using Hopin, an online conference platform that isn't open source but is friendly to open source tools. Fedora started using it some years ago, and it definitely provides a professional conference feel, with a built-in sponsor booth/expo hall, tracks, hallway chat conversations, and moderation tools. Running the Creative Freedom Summit using Hopin was an option for us because, as a Fedora-sponsored event, we could access Fedora's Hopin setup. Again, Hopin is not open source. - -Now, as a long-term (~20 years) open source contributor, I can tell you that this kind of decision is always tough. If your conference focuses on open source, using a proprietary platform to host your event feels a little strange. However, as the scale and complexity of our communities and events have grown, the ability to produce an integrated open source conference system has become more challenging. - -There is no right or wrong answer. You have to weigh a lot of things when making this decision: - -- Budget -- People power -- Infrastructure -- Technical capability -- Complexity/formality/culture of the event - -We didn't have any budget for this event. We did have a team of volunteers who could put some work hours into it. We had the Fedora Matrix Server as a piece of supported infrastructure we could bring into the mix and access to a hosted WordPress system for the website. Teammate Madeline Peck and I had the technical capability/experience of running the live, weekly Fedora Design Team [video calls][4] using PeerTube. We wanted the event to be low-key, single-track, and informal, so we had some tolerance for glitches or rough edges. We also all had a lot of passion for trying an open source stack. - -Now you know a little about our considerations when making this decision, which might help when making decisions for your event. - -### An open source conference stack - -Here is how the conference tech stack worked. - -#### Overview - -**Live components** - -- **Livestream**: We streamed the stage and the social events to a PeerTube channel. Conference attendees could watch the stream live from our PeerTube channel. PeerTube includes some privacy-minded analytics to track the number of livestream viewers and post-event views. -- **Live stage + social event room**: We had one live stage for speakers and hosts using Jitsi, ensuring only those with permission could be on camera. We had an additional Jitsi meeting room for social events that allowed anyone who wanted to participate in the social event to go on camera. -- **Backstage**: We had a "Backstage" Matrix channel to coordinate with speakers, hosts, and volunteers in one place while the event was going on. -- **Announcements and Q&A**: We managed Q&A and the daily schedule for the conference via a shared Etherpad (which we later moved to Hackmd.io). -- **Integrated and centralized conference experience**: Using Matrix's Element client, we embedded the livestream video and an Etherpad into a public Matrix room for the conference. We used attendance in the channel to monitor overall conference attendance. We had a live chat throughout the conference and took questions from audience members from the chat and the embedded Q&A Etherpad. -- **Conference website**: We had a beautifully-designed website created by Ryan Gorley hosted on WordPress, which had the basic information and links for how to join the conference, the dates/times, and the schedule. - -#### Post-event components - -- **Post-event survey**: We used the open source LimeSurvey system to send out a post-event survey to see how things went for attendees. I use some of the data from that survey in this article. -- **Post-event video editing and captioning**: We didn't have a live captioning system for the conference, but as I was able, I typed live notes from talks into the channel, which attendees greatly appreciated. Post-event, we used Kdenlive (one of the tools featured in talks at the event) to edit the videos and generate captions. -- **Event recordings**: PeerTube automagically posts livestream recordings to channels, making nearly instant recordings available for attendees for talks they may have missed. - -I'll cover some details next. - -### Livestream with PeerTube - -![Screenshot showing the Creative Freedom Summit PeerTube channel, with the logo, a description of the event, and a set of video thumbnails][5] - -We used the [LinuxRocks PeerTube platform][6] generously hosted by [LinuxRocks.online][7] for the Creative Freedom Summit's livestream. PeerTube is a free and open source decentralized video platform that is also part of the Fediverse. - -One of the best features of PeerTube (that other platforms I am aware of don't have) is that after your livestream ends, you get a near-instant replay recording posted to your channel on PeerTube. Users in our chatroom cited this as a major advantage of the platform. If an attendee missed a session they were really interested in, they could watch it within minutes of that talk's end. It took no manual intervention, uploading, or coordination on the part of the volunteer organizing team to make this happen; PeerTube automated it for us. - -Here is how livestreaming with PeerTube works: You create a new livestream on your channel, and it gives you a livestreaming URL + a key to authorize streaming to the URL. This URL + key can be reused over and over. We configured it so that the recording would be posted to the channel where we created the livestreaming URL as soon as a livestream ended. Next, copy/paste this into Jitsi when you start the livestream. This means that you don't have to generate a new URL + key for each talk during the conference—the overhead of managing that for organizers would have been pretty significant. Instead, we could reuse the same URL + key shared in a common document among conference organizers (we each had different shifts hosting talks). Anyone on the team with access to that document could start the livestream. - -#### How to generate the livestream URL + key in PeerTube - -The following section covers generating the livestream URL + key in PeerTube, step-by-step. - -**1. Create stream video on PeerTube** - -Log into PeerTube, and click the **Publish** button in the upper right corner: - -![Screenshot of the PeerTube Publish button][8] - -**2. Set options** - -Click on the **Go live** tab (fourth from the left) and set the following options: - -- Channel: (The channel name you want the livestream to publish on) -- Privacy: Public -- Radio buttons: Normal live - -Then, select **Go Live**. (Don't worry, you won't really be going live quite yet, there is more data to fill in.) - -![Screenshot of the Go Live button in PeerTube][9] - -**3. Basic info (don't click update yet)** - -First, fill out the **Basic Info** tab, then choose the **Advanced Settings** tab in the next step. Fill out the name of the livestream, description, add tags, categories, license, etc. Remember to publish after the transcoding checkbox is turned on. - -This ensures once your livestream ends, the recording will automatically post to your channel. - -**4. Advanced settings** - -You can upload a "standby" image that appears while everyone is watching the stream URL and waiting for things to start. - -![Screenshot of PeerTube Advanced Settings][10] - -This is the standby image we used for the Creative Freedom Summit: - -![Screenshot of the Creative Freedom Summit banner][11] - -**5. Start livestream on PeerTube** - -Select the **Update** button in the lower right corner. The stream will appear like this—it's in a holding pattern until you start streaming from Jitsi: - -![Screenshot of starting the live stream on PeerTube][12] - -**6. Copy/paste the livestream URL for Jitsi** - -This is the final step in PeerTube. Once the livestream is up, click on the **…** icon under the video and towards the right: - -![Copy and paste the URL][13] - -Select **Display live information**. You'll get a dialog like this: - -![Screenshot of Display live information option][14] - -You must copy both the live RTMP URL and the livestream key. Combine them into one URL and then copy/paste that into Jitsi. - -The following are examples from my test run of these two text blocks to copy: - -- Live RTMP Url: **rtmp://peertube.linuxrocks.online:1935/live** -- Livestream key: **8b940f96-c46d-46aa-81a0-701de3c43c8f** - -What you'll need to paste into Jitsi is these two text blocks combined with a **/** between them, like so: - -**rtmp://peertube.linuxrocks.online:1935/live/8b940f96-c46d-46aa-81a0-701de3c43c8f** - -### Live stage + social event room: Jitsi - -We used the free and open source hosted [Jitsi Meet][15] video conferencing platform for our "live stage." We created a Jitsi meeting room with a custom URL at **[https://meet.jit.si][16]** and only shared this URL with speakers and meeting organizers. - -We configured the meeting with a lobby (this feature is available in meeting settings once you join your newly-created meeting room) so speakers could join a few minutes before their talk without fear of interrupting the presentation before theirs. (Our host volunteers let them in when the previous session finished.) Another option is to add a password to the room. We got by just by having a lobby configured. It did seem, upon testing, that the moderation status in the room wasn't persistent. If a moderator left the room, they appeared to lose moderator status and settings, such as the lobby setup. I kept the Jitsi room available and active for the entire conference by leaving it open on my computer. (Your mileage may vary on this aspect.) - -Jitsi has a built-in livestreaming option, where you can post a URL to a video service, and it will stream your video to that service. We had confidence in this approach because it is how we host and livestream weekly [Fedora Design Team meetings][17]. For the Creative Freedom Summit, we connected our Jitsi Live Stage (for speakers and hosts) to [a channel on the Linux Rocks PeerTube][6]. - -Jitsi lets speakers share their screens to drive their own slides or live demos. - -### Livestreaming Jitsi to PeerTube - -1. Join the meeting and click the **…** icon next to the red hangup button at the bottom of the screen. - -![Join the Jitsi meeting][18] - -2. Select **Start live stream** from the pop-up menu. - -![Screenshot of starting the live stream in Jitsi][19] - -3. Copy/paste the PeerTube URL + key text - -![Screenshot of copying and pasting the livestream key][20] - -4. Listen for your Jitsi Robot friend - -A feminine voice will come on in a few seconds to tell you, "Live streaming is on." Once she sounds, smile! You're livestreaming. - -5. Stop the livestream - -This stops the PeerTube URL you set up from working, so repeat these steps to start things back up. - -#### Jitsi tips - -**Managing Recordings by turning the Jitsi stream on and off** - -We learned during the conference that it is better to turn the Jitsi stream off between talks so that you will have one raw recording file per talk posted to PeerTube. We let it run as long as it would the first day, so some recordings have multiple presentations in the same video, which made using the instant replay function harder for folks trying to catch up. They needed to seek inside the video to find the talk they wanted to watch or wait for us to post the edited version days or weeks later. - -**Preventing audio feedback** - -Another issue we figured out live during the event that didn't crop up during our tests was audio feedback loops. These were entirely my fault (sorry to everyone who attended). I was setting up the Jitsi/PeerTube links, monitoring the streams, and helping host and emcee the event. Even though I knew that once we went live, I needed to mute any PeerTube browser tabs I had open, I either had more PeerTube tabs open than I thought and missed one, or the livestream would autostart in my Element client (which I had available to monitor the chat). I didn't have an easy way to mute Element. In some of the speaker introductions I made, you'll see that I knew I had about 30 seconds before the audio feedback would start, so I gave very rushed/hurried intros. - -I think there are simpler ways to avoid this situation: - -- Try to ensure your host/emcee is not also the person setting up/monitoring the streams and chat. (Not always possible, depending on how many volunteers you have at any given time.) -- If possible, monitor the streams on one computer and emcee from another. This way, you have one mute button to hit on the computer you're using for monitoring, and it simplifies your hosting experience on the other. - -This is something worth practicing and refining ahead of time. - -### Backstage: Element - -![A screenshot showing three chat room listings in Element: Creative Freedom Summit with a white logo, Creative Freedom Summit Backstage with a black logo, and Creative Freedom Summit Hosts with an orange logo][21] - -We set up a "Backstage" invite-only chat room a week or so before the conference started and invited all our speakers to it. This helped us ensure a couple of things: - -- Our speakers were onboarded to Element/Matrix well before the event's start and had the opportunity to get help signing up if they had any issues (nobody did). -- We started a live communication channel with all speakers before the event so that we could send announcements/updates pretty easily. - -The channel served as a useful place during the event to coordinate transitions between speakers, give heads up about whether the schedule was running late, and in one instance, quickly reschedule a talk when one of our speakers had an emergency and couldn't make their original scheduled time. - -We also set up a room for hosts, but in our case, it was extraneous. We just used the backstage channel to coordinate. We found two channels were easy to monitor, but three were too many to be convenient. - -### Announcements and Q&A: Etherpad/Hackmd.io - -![Screenshot of an etherpad titled "General information" that has some info about the Creative Freedom Summit][22] - -We set up a pinned widget in our main Element channel with general information about the event, including the daily schedule, code of conduct, etc. We also had a section per talk of the day for attendees to drop questions for Q&A, which the host read out loud for the speaker. - -We found over the first day or two that some attendees were having issues with the Etherpad widget not loading, so we switched to an embedded hackmd.io document pinned to the channel as a widget, and that seemed to work a little better. We're not 100% sure what was going on with the widget loading issues, but we were able to post a link to the raw (non-embedded) link in the channel topic, so folks could get around any problems accessing it via the widget. - -### Integrated and centralized conference experience - -![A video feed is in the upper left corner, a hackmd.io announcement page in the upper right, and an active chat below.][23] - -Matrix via Fedora's Element server was the single key place to go to attend the conference. Matrix chat rooms in Element have a widget system that allows you to embed websites into the chat room as part of the experience. That functionality was important for having our Matrix chat room serve as the central place to attend. - -We embedded the PeerTube livestream into the channel—you can see it in the screenshot above in the upper left. Once the conference was over, we could share a playlist of the unedited video replays playlist. Now that our volunteer project for editing the videos is complete, the channel has the playlist of edited talks in order. - -As discussed in the previous section, we embedded a hackmd.io note in the upper right corner to post the day's schedule, post announcements, and an area for Q&A right in the pad. I had wanted to set up a Matrix bot to handle Q&A, but I struggled to get one running. It might make for a cool project for next year, though. - -Conversations during the conference occurred right in the main chat under these widgets. - -There are a couple of considerations to make when using a Matrix/Element chat room as the central place for an online conference, such as: - -- The optimal experience will be in the Element desktop client or a web browser on a desktop system. However, you can view the widgets in the Element mobile client (although some attendees struggled to discover this, the UI is less-than-obvious). Other Matrix clients may not be able to view the widgets. -- Attendees can easily DIY their own experience piecemeal if desired. Users not using the Element client to attend the conference reported no issues joining in on the chat and viewing the PeerTube livestream URL directly. We shared the livestream URL and the hackmd URL in the channel topic, making it accessible to folks who preferred not to run Element. - -### Website - -![Screenshot showing the top of creativefreedomsummit.com, with the headline "Create. Learn. Connect." against a blue and purple gradient background.][24] - -[Ryan Gorley][25] developed the [Creative Freedom Summit website][26] using [WordPress][27]. It is hosted by WPengine and is a one-pager with the conference schedule embedded from sched.org. - -### Post-event - -#### Post-event survey - -We used the open source survey tool LimeSurvey. We sent it out within a week or two to attendees via the Element Chat channel and our PeerTube video channel to learn more about how we handled the event. The event organizers continue to meet regularly. One topic we focus on during these post-event meetings is developing the questions for the survey in a shared hackmd.io document. The following are some things we learned from the event that might be of interest to you in planning your own open source powered online conference: - -- By far, most event attendees learned about the event from Mastodon and Twitter (together, covering 70% of respondents). -- 33% of attendees used the Element desktop app to attend, and 30% used the Element Chat web app. So roughly 63% of attendees used the integrated Matrix/Element experience. The rest watched directly on PeerTube or viewed replays after. -- 35% of attendees indicated they made connections with other creatives at the event via the chat, so the chat experience is pretty important to events if part of your goal is enabling networking and connections. - -#### Captioning - -During the event, we received positive feedback from participants who appreciated when another attendee live-captioned the talk in the chat and wished out loud for live captioning for better accessibility. While the stack outlined here did not include live captioning, there are open source solutions for it. One such tool is Live Captions, and Seth Kenlon covered it in an opensource.com article, [Open source video captioning on Linux][28]. While this tool is meant for the attendee consuming the video content locally, we could potentially have a conference host running it and sharing it to the livestream in Jitsi. One way to do this is using the open source broadcasting tool [OBS][29] so everyone watching the livestream could benefit from the captions. - -While editing the videos post-event, we discovered a tool built into [Kdenlive][30], our open source video editor of choice, that generates and automatically places subtitles in the videos. There are basic instructions on how to do this in the [Kdenlive manual][31]. Fedora Design Team member Kyle Conway, who helped with the post-event video editing, put together a [comprehensive tutorial (including video instruction) on automatically generating and adding subtitles to videos in Kdenlive][32]. It is well worth the read and watch if you are interested in this feature. - -#### Video editing volunteer effort - -When the event was over, we rallied a group of volunteers from the conference Element channel to work together on editing the videos, including title cards and intro/outro music, and general cleanup. Some of our automatic replay recordings were split across two files or combined in one file with multiple other talks and needed to be reassembled or cropped down. - -We used a [GitLab epic to organize the work][33], with an FAQ and call for volunteer help organized by skillset, with issues attached for each video needed. We had a series of custom labels we would set on each video so it was clear what state the video was in and what kind of help was needed. All the videos have been edited, and some need content written for their description area on the [Creative Freedom Summit channel][6]. Many have auto-generated subtitles that have not been edited for spelling mistakes and other corrections common with auto-generated text. - -![Screenshot of the list of videos needing editing help in GitLab][34] - -We passed the videos around—the files could be quite large—by having volunteers download the raw video from the unedited recording on the main PeerTube channel for the Creative Freedom Summit. When they had an edited video ready to share, we had a private PeerTube account where they could upload it. Admins with access to the main channel's account periodically grabbed videos from the private account and uploaded them to the main account. Note that PeerTube doesn't have a system where multiple accounts have access to the same channel, so we had to engage in a bit of password sharing, which can be nerve-wracking. We felt this was a reasonable compromise to limit how many people had the main password but still enable volunteers to submit edited videos without too much hassle. - -### Ready to give it a try? - -I hope this comprehensive description of how we ran the Creative Freedom Summit conference using an open source stack of tools inspires you to try it for your open source event. Let us know how it goes, and feel free to reach out if you have questions or suggestions for improvement! Our channel is at: [https://matrix.to/#/#creativefreedom:fedora.im][35] - -_This article is adapted from [Run an open source-powered virtual conference][36] and is republished with permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/4/open-source-tools-virtual-conference - -作者:[Máirín Duffy][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/mairin -[b]: https://github.com/lkxed/ -[1]: https://fedoraproject.org/wiki/Design -[2]: http://creativefreedomsummit.com/ -[3]: http://flocktofedora.org/ -[4]: https://opensource.com/article/23/3/video-templates-inkscape -[5]: https://opensource.com/sites/default/files/2023-04/homepage.webp -[6]: https://peertube.linuxrocks.online/c/creativefreedom/videos -[7]: https://linuxrocks.online/ -[8]: https://opensource.com/sites/default/files/2023-04/publish.png -[9]: https://opensource.com/sites/default/files/2023-04/go-live.png -[10]: https://opensource.com/sites/default/files/2023-04/advdsettings.png -[11]: https://opensource.com/sites/default/files/2023-04/cfsbanner.png -[12]: https://opensource.com/sites/default/files/2023-04/startlivestream.jpg -[13]: https://opensource.com/sites/default/files/2023-04/pasteURL.png -[14]: https://opensource.com/sites/default/files/2023-04/liveinformation.png -[15]: https://meet.jit.si/ -[16]: https://meet.jit.si -[17]: https://peertube.linuxrocks.online/c/fedora_design_live/videos -[18]: https://opensource.com/sites/default/files/2023-04/moreactions.png -[19]: https://opensource.com/sites/default/files/2023-04/startlivestream.png -[20]: https://opensource.com/sites/default/files/2023-04/copypastekey.png -[21]: https://opensource.com/sites/default/files/2023-04/backstage.webp -[22]: https://opensource.com/sites/default/files/2023-04/hackmd.webp -[23]: https://opensource.com/sites/default/files/2023-04/integratedexperience.webp -[24]: https://opensource.com/sites/default/files/2023-04/website.webp -[25]: https://mastodon.social/@ryangorley -[26]: https://creativefreedomsummit.com/ -[27]: https://wordpress.com/ -[28]: https://opensource.com/article/23/2/live-captions-linux -[29]: https://obsproject.com/ -[30]: https://kdenlive.org/ -[31]: https://docs.kdenlive.org/en/effects_and_compositions/speech_to_text.html -[32]: https://gitlab.com/groups/fedora/design/-/epics/23#video-captioning-and-handoff -[33]: https://gitlab.com/groups/fedora/design/-/epics/23 -[34]: https://opensource.com/sites/default/files/2023-04/availablevideos_0.webp -[35]: https://matrix.to/#/#creativefreedom:fedora.im -[36]: https://blog.linuxgrrl.com/2023/04/10/run-an-open-source-powered-virtual-conference/ \ No newline at end of file From 195b2d6341c6dfb7259c4d8c4cd9869719941423 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 30 Jul 2023 09:01:36 +0800 Subject: [PATCH 22/72] RP @geekpi https://linux.cn/article-16047-1.html --- ...Bash Basics Series 6 Handling String Operations.md | 39 +++++++++++-------- 1 file changed, 22 insertions(+), 17 deletions(-) rename {translated/tech => published}/20230717.0 ⭐️⭐️ Bash Basics Series 6 Handling String Operations.md (78%) diff --git a/translated/tech/20230717.0 ⭐️⭐️ Bash Basics Series 6 Handling String Operations.md b/published/20230717.0 ⭐️⭐️ Bash Basics Series 6 Handling String Operations.md similarity index 78% rename from translated/tech/20230717.0 ⭐️⭐️ Bash Basics Series 6 Handling String Operations.md rename to published/20230717.0 ⭐️⭐️ Bash Basics Series 6 Handling String Operations.md index 98cbb393bb..bcf5e47838 100644 --- a/translated/tech/20230717.0 ⭐️⭐️ Bash Basics Series 6 Handling String Operations.md +++ b/published/20230717.0 ⭐️⭐️ Bash Basics Series 6 Handling String Operations.md @@ -3,24 +3,26 @@ [#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-16047-1.html" Bash 基础知识系列 #6:处理字符串操作 ====== +![][0] + 在大多数编程语言中,你都会找到字符串数据类型。字符串基本上是一组字符。 但 Bash shell 有所不同。字符串没有单独的数据类型。这里一切都是变量。 但这并不意味着你不能像在 C 和其他编程语言中那样处理字符串。 -在 Bash shell 中可以查找子字符串、替换子字符串、连接字符串以及更多字符串操作。 +在 Bash Shell 中可以查找子字符串、替换子字符串、连接字符串以及更多字符串操作。 在 Bash 基础知识系列的这一部分中,你将学习基本的字符串操作。 -### 在 bash 中获取字符串长度 +### 在 Bash 中获取字符串长度 让我们从最简单的选项开始。也就是获取字符串的长度。这很简单: @@ -34,9 +36,9 @@ ${#string} 正如你所看到的,第二个示例中有两个单词,但由于它用引号引起来,因此它被视为单个单词。连空格都算作一个字符。 -### 在 bash 中连接字符串 -] -技术术语是字符串连接,这是 bash 中最简单的字符串操作之一。 +### 在 Bash 中连接字符串 + +用技术术语来说是字符串 连接concatenation,这是 Bash 中最简单的字符串操作之一。 你只需像这样一个接一个地使用字符串变量: @@ -44,7 +46,7 @@ ${#string} str3=$str1$str2 ``` -还能比这更简单吗? 我不这么认为。 +还能比这更简单吗?我觉得不能。 让我们看一个例子。这是我的示例脚本,名为 `join.sh`: @@ -63,7 +65,7 @@ echo "The joined string is: $joined" ![Join two strings in bash][2] -### 在 bash 中提取子字符串 +### 在 Bash 中提取子字符串 假设你有一个包含多个字符的大字符串,并且你想要提取其中的一部分。 @@ -73,7 +75,7 @@ echo "The joined string is: $joined" ${string:$pos:$len} ``` -> 💡和数组一样,字符串中的定位也是从 0 开始。 +> 💡 和数组一样,字符串中的定位也是从 0 开始。 这是一个例子: @@ -81,7 +83,7 @@ ${string:$pos:$len} 即使你指定的子字符串长度大于字符串长度,它也只会到达字符串末尾。 -### 替换 bash 中的子字符串 +### 替换 Bash 中的子字符串 假设你有一个大字符串,并且你想用另一个字符串替换其中的一部分。 @@ -91,7 +93,7 @@ ${string:$pos:$len} ${string/substr1/substr2} ``` -> ✋ 只有第一次出现的子字符串才会以这种方式替换。如果要替换所有出现的地方,请使用`${string//substr1/substr2}` +> ✋ 只有第一次出现的子字符串才会以这种方式替换。如果要替换所有出现的地方,请使用 `${string//substr1/substr2}` 这是一个例子: @@ -101,7 +103,7 @@ ${string/substr1/substr2} > 💡 如果未找到子字符串,则不会替换任何内容。它不会导致错误。 -### 在 bash 中删除子字符串 +### 在 Bash 中删除子字符串 我们来谈谈删除子字符串。假设你要删除字符串的一部分。在这种情况下,只需将子字符串提供给主字符串,如下所示: @@ -123,11 +125,13 @@ ${string/substring} 现在是你通过简单练习来实践字符串操作的时候了。 -**练习 1**:声明一个字符串 “I am all wet”。现在通过用 set 替换单词 wet 来更改此字符串。 +**练习 1**:声明一个字符串 “I am all wet”。现在通过用 “set” 替换单词 “wet” 来更改此字符串。 **练习 2**:创建一个字符串,以 `112-123-1234` 格式保存电话号码。现在,你必须删除所有 `-`。 -这应该会给你一些在 bash 中使用字符串的不错的练习。在下一章中,你将学习如何在 bash 中使用 if-else 语句。敬请关注。 +这应该会给你一些在 Bash 中使用字符串的不错的练习。在下一章中,你将学习如何在 Bash 中使用 `if-else` 语句。敬请关注。 + +*(题图:MJ/aa73b2c9-6d2f-42e2-972d-94fab56d30cc)* -------------------------------------------------------------------------------- @@ -136,7 +140,7 @@ via: https://itsfoss.com/bash-strings/ 作者:[Abhishek Prakash][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/) 荣誉推出 @@ -147,3 +151,4 @@ via: https://itsfoss.com/bash-strings/ [3]: https://itsfoss.com/content/images/2023/07/extract-substring-bash.png [4]: https://itsfoss.com/content/images/2023/07/replace-substring-bash.png [5]: https://itsfoss.com/content/images/2023/07/bash-delete-substring.png +[0]: https://img.linux.net.cn/data/attachment/album/202307/30/090030gvm6pgutlvzll4zg.jpg \ No newline at end of file From 504687685471a37a24a0fbd51f28e96621cfb8b4 Mon Sep 17 00:00:00 2001 From: "Xiaobin.Liu" Date: Sun, 30 Jul 2023 19:53:31 +0800 Subject: [PATCH 23/72] TSL --- ...709.0 ⭐️⭐️ What are Exit Codes in Linux.md | 220 ------------------ ...709.0 ⭐️⭐️ What are Exit Codes in Linux.md | 220 ++++++++++++++++++ 2 files changed, 220 insertions(+), 220 deletions(-) delete mode 100644 sources/tech/20230709.0 ⭐️⭐️ What are Exit Codes in Linux.md create mode 100644 translated/tech/20230709.0 ⭐️⭐️ What are Exit Codes in Linux.md diff --git a/sources/tech/20230709.0 ⭐️⭐️ What are Exit Codes in Linux.md b/sources/tech/20230709.0 ⭐️⭐️ What are Exit Codes in Linux.md deleted file mode 100644 index 7423590384..0000000000 --- a/sources/tech/20230709.0 ⭐️⭐️ What are Exit Codes in Linux.md +++ /dev/null @@ -1,220 +0,0 @@ -[#]: subject: "What are Exit Codes in Linux?" -[#]: via: "https://itsfoss.com/linux-exit-codes/" -[#]: author: "Pranav Krishna https://itsfoss.com/author/pranav/" -[#]: collector: "lkxed" -[#]: translator: "lxbwolf" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -What are Exit Codes in Linux? -====== - -An exit code or exit status tells us about the status of the last executed command. Whether the command was completed successfully or ended with an error. This is obtained after the command terminates. - -**The basic ideology is that programs return the exit code `0` to indicate that it executed successfully without issues. Code `1` or anything other than 0 is considered unsuccessful.** - -There are many more exit codes other than 0 and 1, which I'll cover in this article. - -### Various exit codes in Linux shell - -Let us take a quick look at the prominent exit codes in the Linux shell: - -| Exit code | Meaning of the code | -| :- | :- | -| `0` | Command executed with no errors | -| `1` | Code for generic errors | -| `2` | Incorrect command (or argument) usage | -| `126` | Permission denied (or) unable to execute | -| `127` | Command not found, or PATH error | -| `128+n` | Command terminated externally by passing signals, or it encountered a fatal error | -| `130` | Termination by Ctrl+C or SIGINT (_termination code 2 or keyboard interrupt_) | -| `143` | Termination by SIGTERM (_default termination_) | -| `255/*` | Exit code exceeded the range 0-255, hence wrapped up | - -> 📋 The termination signals like `130` (SIGINT or `^C`) and `143` (SIGTERM) are prominent, which are just `128+n` signals with `n` standing for the termination code. - -Now that you are briefly familiar with the exit codes let's see about their usage. - -### Retrieving the exit code - -The exit code of the previously executed command is stored in the [special variable][1] `$?`. You can retrieve the exit status by running: - -``` -echo $? -``` - -This will be used in all our demonstrations to retrieve the exit code. - -Note that the _exit_ command supports carrying the same exit code of the previous command executed. - -### Exit code 0 - -Exit code `0` means that the command is executed without errors. This is ideally the best case for the completion of commands. - -For example, let us run a basic command like this - -``` -neofetch - -echo $? -``` - -![][2] - -This exit code `0` means that the particular command was executed successfully, nothing more or less. Let us demonstrate some more examples. - -You may try [killing a process][3]; it will also return the code `0`. - -``` -pkill lxappearance -``` - -![][4] - -Viewing a file's contents will also return an exit code 0, which implies **only** that the 'cat' command executed successfully. - -### Exit code 1 - -Exit code `1` is also a common one. It generally means the command terminated with a generic error. - -For example, using the [package manager][5] without sudo permissions results in code 1. In Arch Linux, if I try this: - -``` -pacman -Sy -``` - -It will give me exist code as 1 meaning the last command resulted in error. - -![exit code 1 (impermissible operation resulted in this code)][6] - -> 📋 If you try this in Ubuntu-based distros (`apt update`without sudo), you get 100 as an error code for running 'apt' without permissions. This is not a standardized error code, but one specific to apt. - -While this is a general understanding, we can also interpret this as "operation impermissible". - -Operations like dividing by zero also result in code 1. - -![Division by zero results in code 1][7] - -### Exit code 2 - -This exit code is given out when the command executed has a syntax error. Misusing the arguments of commands also results in this error. - -It generally suggests that the command could not execute due to incorrect usage. - -For example, I added two hyphens to an option that's supposed to have one hyphen. Code 2 was given out. - -``` -grep --z file.txt -``` - -![Invalid argument resulted in exit code 2][8] - -When permission is denied, like accessing the /root folder, you get error code 2. - -![Permission denied gives out code 2][9] - -### Exit code 126 - -126 is a peculiar exit code since it is used to indicate a command or script was not executed due to a permission error. - -This error can be found when you try executing a shell script without giving execution permissions. - -![][10] - -Note that this exit code appears only for the '_execution_' of scripts/commands without sufficient permissions, which is different from a generic Permission Denied error. - -So, on't confuse it with the previous example you saw with exit code 2. There, ls command ran and the permission issue came with the directory it was trying to execute. Here, the permission issues came from the script itself. - -### Exit code 127 - -This is another common one. Exit code 127 refers to "[command not found][11]". It usually occurs when there's a typo in the command executed or the required executable is not in the $PATH variable. - -For example, I often see this error when I try executing a script without its path. - -![Script executed without the path gives "command not found" or code 127][12] - -Or when the executable file you're trying to run, is not listed in the `$PATH` variable. You can rectify this by [adding the parent directory to the PATH variable][13]. - -You'll also get this exit code when you type commands that do not exist. - -![Unmount is not a command, and Screenfetch is not installed, which resulted in code 127][14] - -### Exit code series 128+n - -When an application or command is terminated or its execution fails due to a fatal error, the adjacent code to 128 is produced (128+n), where n is the signal number. - -This includes all types of termination codes, like `SIGTERM`, `SIGKILL`, etc that apply to the value 'n' here. - -#### Code 130 or SIGINT - -`SIGINT` or **Sig**nal for Keyboard **Int**errupt is induced by interrupting the process by termination signal 2, or by Ctrl+C. - -Since the termination signal is 2, we get a code 130 (128+2). Here's a video demonstrating the interrupt signal for `lxappearance`. - -:密钥大小是衡量加密算法强度的指标:密钥大小越大,加密强度越高。通常以位数表示,例如 128 位加密或 256 位加密。 + +头部Header:头部是加密卷开头的特殊区域,包含有关加密的信息,例如所使用的加密算法和加密密钥。 + +下一个定义对于新手来说可能有些棘手,但了解它还是很重要的,尤其在处理 LUKS 时,这会非常有用。 + +容器Container:容器是一个特殊的文件,类似于虚拟加密卷。它可以用于存储加密数据,就像加密分区一样。不同之处在于容器是一个文件,可以存储在未加密的分区上,而加密分区是整个磁盘的一部分,已经完全加密。因此,容器是 _充当虚拟加密卷的文件_。 + +### LUKS 是什么以及它能做什么? + +LUKS([Linux 统一密钥设置][1]Linux Unified Key Setup)是由 Clemens Fruhwirth 在 2004 年创建的磁盘加密规范,最初用于 Linux。它是一种知名的、安全的、高性能的磁盘加密方法,基于改进版本的 [cryptsetup][2],使用 [dm-crypt][3] 作为磁盘加密后端。LUKS 也是网络附加存储(NAS)设备中常用的加密格式。 + +LUKS 还可以用于创建和运行加密容器。加密容器具有与 LUKS 全盘加密相同的保护级别。LUKS 还提供多种加密算法、多种加密模式和多种哈希函数,有 40 多种可能的组合。 + +![LUKS 结构示意图][4] + +任何文件系统都可以进行加密,包括交换分区。加密卷的开头有一个未加密的头部,它允许存储多达 8 个(LUKS1)或 32 个(LUKS2)加密密钥,以及诸如密码类型和密钥大小之类的加密参数。 + +这个头部的存在是 LUKS 和 dm-crypt 的一个重要区别,因为头部允许使用多个不同的密钥短语,并能轻松更改和删除它们。然而,值得提醒的是,如果头部丢失或损坏,设备将无法解密。 + +LUKS 有两个版本,LUKS2 具有更强的头部损坏抗击性,并默认使用 [Argon2][5] 加密算法(LUKS1 使用 [PBKDF2][6])。在某些情况下,可以在两个版本之间进行转换,但是 LUKS1 可能不支持某些功能。 + +### 希望了解更多信息? + +希望本文有助于你对 LUKS 和加密有一些了解。关于使用 LUKS 创建和使用加密分区的确切步骤会因个人需求而异,因此我不会在此处涵盖安装和设置方面的内容。 + +如果你想要一份指南来帮助你设置 LUKS,可以在这篇文章中找到一个很好的指南:《[使用 LUKS 对 Linux 分区进行基本加密指南][7]》。如果你对此还不熟悉,并且想要尝试使用 LUKS,可以在虚拟机或闲置计算机上进行安全学习,以了解其工作原理。 + +*(题图:MJ/2c6b83e6-4bcb-4ce3-a49f-3cb38caad7d2)* + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/luks/ + +作者:[Bill Dyer][a] +选题:[lkxed][b] +译者:ChatGPT +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/bill/ +[b]: https://github.com/lkxed/ +[1]: https://en.wikipedia.org/wiki/Linux_Unified_Key_Setup?ref=its-foss +[2]: https://www.tutorialspoint.com/unix_commands/cryptsetup.htm?ref=its-foss +[3]: https://www.kernel.org/doc/html/latest/admin-guide/device-mapper/dm-crypt.html?ref=its-foss +[4]: https://itsfoss.com/content/images/2023/03/luks-schematic-diagram.png +[5]: https://www.argon2.com/?ref=its-foss +[6]: https://en.wikipedia.org/wiki/PBKDF2?ref=its-foss +[7]: https://linuxconfig.org/basic-guide-to-encrypting-linux-partitions-with-luks?ref=its-foss +[0]: https://img.linux.net.cn/data/attachment/album/202308/05/230710ioll6lxm11mrtl8l.jpg \ No newline at end of file diff --git a/sources/tech/20230319.0 ⭐️⭐️ Linux Jargon Buster What is LUKS Encryption.md b/sources/tech/20230319.0 ⭐️⭐️ Linux Jargon Buster What is LUKS Encryption.md deleted file mode 100644 index d6c4c9a181..0000000000 --- a/sources/tech/20230319.0 ⭐️⭐️ Linux Jargon Buster What is LUKS Encryption.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: subject: "Linux Jargon Buster: What is LUKS Encryption?" -[#]: via: "https://itsfoss.com/luks/" -[#]: author: "Bill Dyer https://itsfoss.com/author/bill/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Linux Jargon Buster: What is LUKS Encryption? -====== - -Computer security methods are designed to keep private things, well, private. There are many ways to secure a system. Some users use a simple username/password login scheme for basic protection. Other users may use extra protection through encryption in various ways like using VPN and disk encryption. - -If you have sensitive client data on your machine (you might be running a business) or material deemed intellectual property or you are privacy cautious, you may want to consider disk encryption. - -Some benefits of disk encryption are: - -- Secure your system from hackers -- Prevent data leaks -- Protect you from potential liability issues - -Disk encryption software prevents a desktop hard disk drive, a portable USB storage device, or laptop, from accessing unless the user inputs the correct authentication data. If your laptop is ever lost or stolen, encryption protects the data on the disk. - -These days, new Windows-powered systems come with BitLocker encryption by default. On Linux, LUKS is the most popular way of employing disk encryption. - -Wondering what is LUKS? I'll brief you on the topic. - -### Technical jargons - -Before going further, some terms should be defined. There is a lot to LUKS so it will help to break things down, especially if you're beginning to look into this. - -**Volume**: A volume is a logical storage area that can be used to store data. In the context of disk encryption, a volume refers to a portion of a disk that has been encrypted to protect its contents. - -**Parameters**: Parameters are settings that control how an encryption algorithm works. Parameters might include the encryption algorithm used, the key size, and other details about how the encryption should be performed. - -**Cipher type**: A cipher is a mathematical algorithm used for encryption It refers to the specific encryption algorithm that is being used to protect the data on an encrypted volume. - -**Key size**: The key size is a measure of the strength of an encryption algorithm: the larger the key size, the stronger the encryption. It is often expressed in bits, such as 128-bit encryption or 256-bit encryption. - -**Header**: The header is a special area at the beginning of an encrypted volume that contains information about the encryption, such as the encryption algorithm used and the encryption keys. - -The next definition can be tricky to a newcomer, but it's worth knowing about, especially when dealing with LUKS; it's quite handy. - -**Container**: A container is a special file that acts like a virtual encrypted volume. It can be used to store encrypted data, just like an encrypted partition. The difference is that a container is a file that can be stored on an unencrypted partition, while an encrypted partition is a portion of a disk that has been encrypted as a whole. A container, then, is a file _that acts as a virtual encrypted volume_. - -### What Is LUKS and What Can It Do? - -[Linux Unified Key Setup - LUKS][1] is a disk encryption specification created by Clemens Fruhwirth in 2004 and was originally intended for Linux. It is a well-known, secure, and high-performance disk encryption method based on an enhanced version of [cryptsetup][2], using [dm-crypt][3] as the disk encryption backend. LUKS is also a popular encryption format in Network Attached Storage (NAS) devices. - -LUKS can also be used to create and run encrypted containers. Encrypted containers feature the same level of protection as LUKS full-disk encryption. LUKS also offers multiple encryption algorithms, several modes of encryption, and several hash functions - a little over 40 possible combinations. - -![LUKS schematic diagram][4] - -Any filesystem can be encrypted, including the swap partition. There is an unencrypted header at the beginning of an encrypted volume, which allows up to 8 (LUKS1) or 32 (LUKS2) encryption keys to be stored along with encryption parameters such as cipher type and key size. - -The existence of this header is a major difference between LUKS and dm-crypt, since the header allows multiple different passphrases to be used, with the ability to change and remove them easily. It is worth a reminder, however, that if the header is lost or corrupted, the device will no longer be decryptable. - -There are two versions of LUKS, with LUKS2 having features such as greater resistance to header corruption, and the use of [Argon2][5] encryption algorithm by default (LUKS1 uses [PBKDF2][6]). Conversion between both versions of LUKS is possible in certain situations, but some features may not be available with LUKS1. - -### Where Can I Learn More? - -I am hopeful that this short article is a help in understanding a little about LUKS and encryption. The exact steps for creating and using an encrypted partition with LUKS varies, depending on an individual's specific needs, so I will not cover installation and setup here. - -If you want a guide to lead you though setting up LUKS, an excellent guide can be found in this article: [Basic Guide To Encrypting Linux Partitions With LUKS][7]. If you're new at this, and you want to try out LUKS, safe learning can be done on a virtual machine or a spare computer to get a feel for how it works. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/luks/ - -作者:[Bill Dyer][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/bill/ -[b]: https://github.com/lkxed/ -[1]: https://en.wikipedia.org/wiki/Linux_Unified_Key_Setup?ref=its-foss -[2]: https://www.tutorialspoint.com/unix_commands/cryptsetup.htm?ref=its-foss -[3]: https://www.kernel.org/doc/html/latest/admin-guide/device-mapper/dm-crypt.html?ref=its-foss -[4]: https://itsfoss.com/content/images/2023/03/luks-schematic-diagram.png -[5]: https://www.argon2.com/?ref=its-foss -[6]: https://en.wikipedia.org/wiki/PBKDF2?ref=its-foss -[7]: https://linuxconfig.org/basic-guide-to-encrypting-linux-partitions-with-luks?ref=its-foss \ No newline at end of file From fd877f4ded3da40b2088ab35fbab846221538604 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 7 Aug 2023 09:04:53 +0800 Subject: [PATCH 62/72] translated --- ... GNOME’s Ambitious Window Management Overhaul.md | 85 ------------------- ... GNOME’s Ambitious Window Management Overhaul.md | 85 +++++++++++++++++++ 2 files changed, 85 insertions(+), 85 deletions(-) delete mode 100644 sources/tech/20230728.1 ⭐️⭐️ GNOME’s Ambitious Window Management Overhaul.md create mode 100644 translated/tech/20230728.1 ⭐️⭐️ GNOME’s Ambitious Window Management Overhaul.md diff --git a/sources/tech/20230728.1 ⭐️⭐️ GNOME’s Ambitious Window Management Overhaul.md b/sources/tech/20230728.1 ⭐️⭐️ GNOME’s Ambitious Window Management Overhaul.md deleted file mode 100644 index a694469f76..0000000000 --- a/sources/tech/20230728.1 ⭐️⭐️ GNOME’s Ambitious Window Management Overhaul.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: subject: "GNOME’s Ambitious Window Management Overhaul" -[#]: via: "https://debugpointnews.com/gnome-window-management-proposal/" -[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -GNOME’s Ambitious Window Management Overhaul -====== - -**Tired of window clutter and manual adjustments? GNOME is brainstorming an automated and user-friendly window management system. Here’s everything you need to know.** - -Window management, a crucial aspect of desktop computing, has been a topic of fascination and exploration for decades. However, despite numerous attempts, no one has yet managed to crack the code for the perfect window management solution. The GNOME developers have now embarked on a mission to revolutionize window management, aiming to improve productivity and user experience. - -GNOME developer Tobias Bernard published a [detailed write-up][1] on how the devs are thinking about innovating the GNOME desktop for the future. - -### The Challenges of Traditional Windowing Systems - -The conventional windowing system has served us well, allowing apps to spawn rectangular windows that can be manually moved and resized. However, as the number and size of windows increase, problems start to arise. Overlapping windows can quickly become a mess, making it challenging to access specific applications without hiding others. Maximizing a window can obscure everything else on the desktop, causing clutter and inefficiency. - -Over the years, various operating systems have introduced workarounds like workspaces, taskbars, and switchers to deal with these issues. Yet, the core problem of window management remains unsolved. Particularly for newcomers to computing, such as children and older adults, manually arranging windows can be cumbersome and tedious. - -### Introducing Tiling Window Managers - -Tiling window managers have offered an alternative solution by preventing windows from overlapping. While they work well in certain scenarios, they have their limitations. Tiling windows can lead to inefficiencies, as apps are often designed for specific sizes and aspect ratios. Additionally, these managers lack knowledge about window content and context, leading to additional manual adjustments and defeating the purpose of a streamlined workflow. Not to mention remembering a lot of keyboard shortcuts. - -### GNOME’s Current Tiling Functionality - -GNOME has already experimented with basic tiling functionality in the GNOME 3 series. However, the existing implementation has some limitations. It’s a manual process, supports only two windows, lacks extensibility for complex layouts, and does not group tiled windows together in the window stack. - -### A New Vision for Window Management - -The team proposes a fresh approach to window management, focusing on an automated system that aligns with users’ expectations and needs. Their concept involves three potential layout states for windows: Mosaic, Edge Tiling, and Floating. - -Mosaic will be the default behaviour, intelligently positioning and sizing windows based on user preferences and available screen space. As new windows are opened, existing ones will adjust to accommodate the newcomers. If a window doesn’t fit the current layout, it will be placed in its own workspace. When the screen is nearly full, windows will automatically tile. - -Users can also manually tile windows by dragging them over existing tiles or empty spaces. This system provides flexibility and convenience, making it easier to multitask efficiently. - -![mosaic-open-close (Video credit: GNOME)][2] - -![mosaic-maximize (Video credit: GNOME)][3] - -![mosaic-vertical-tile (Video credit: GNOME)][4] - -![mosaic-tile2 (Video credit: GNOME)][5] - -![mosaic-tile3 (Video credit: GNOME)][6] - -### Maintaining User-Friendly Floating Windows - -While tiling offers several benefits, the GNOME developers understand that there will always be cases where users prefer to position windows manually. Therefore, the classic floating behaviour will still be available for those specific situations, but it’s likely to be less common with the introduction of the new mosaic system. - -### Leveraging Window Metadata for Enhanced Performance - -GNOME aims to optimize the tiling experience to gather more information from windows about their content. This includes details such as the maximum desired size of a window and the range of ideal sizes where an app functions best. By using this metadata, the system can tailor the window layout to suit users’ needs, improving overall usability. - -### Looking Ahead - -While the GNOME developers are excited about this new window management direction, they acknowledge the risks associated with such a novel approach. They plan to conduct user research to validate their assumptions and refine the interactions. Although there is no concrete implementation timeline, the project will likely span multiple development cycles and be part of GNOME 46 or later. - -As of publishing this, there are no draft merge requests for this where you can participate with your feedback. - -_Via [Tobias’s blog][1]_7 - --------------------------------------------------------------------------------- - -via: https://debugpointnews.com/gnome-window-management-proposal/ - -作者:[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://debugpointnews.com/author/dpicubegmail-com/ -[b]: https://github.com/lkxed/ -[1]: https://blogs.gnome.org/tbernard/2023/07/26/rethinking-window-management/ -[2]: https://debugpointnews.com/wp-content/uploads/2023/07/mosaic-open-close.webm -[3]: https://debugpointnews.com/wp-content/uploads/2023/07/mosaic-maximize.webm -[4]: https://debugpointnews.com/wp-content/uploads/2023/07/mosaic-vertical-tile.webm -[5]: https://debugpointnews.com/wp-content/uploads/2023/07/mosaic-tile2.webm -[6]: https://debugpointnews.com/wp-content/uploads/2023/07/mosaic-tile3.webm diff --git a/translated/tech/20230728.1 ⭐️⭐️ GNOME’s Ambitious Window Management Overhaul.md b/translated/tech/20230728.1 ⭐️⭐️ GNOME’s Ambitious Window Management Overhaul.md new file mode 100644 index 0000000000..de1bad7adc --- /dev/null +++ b/translated/tech/20230728.1 ⭐️⭐️ GNOME’s Ambitious Window Management Overhaul.md @@ -0,0 +1,85 @@ +[#]: subject: "GNOME’s Ambitious Window Management Overhaul" +[#]: via: "https://debugpointnews.com/gnome-window-management-proposal/" +[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +GNOME 雄心勃勃的窗口管理改革 +====== + +**厌倦了窗口混乱和手动调整? GNOME 正在集体讨论一个自动化且用户友好的窗口管理系统。这是你需要了解的一切。** + +窗口管理是桌面计算的一个重要方面,几十年来一直是人们着迷和探索的话题。然而,尽管进行了多次尝试,仍然没有人能够破解完美的窗口管理解决方案的密码。GNOME 开发人员现在开始致力于彻底改变窗口管理,旨在提高生产力和用户体验。 + +GNOME 开发人员 Tobias Bernard 发表了一篇[详细文章][1],介绍了开发人员如何考虑为未来创新 GNOME 桌面。 + +### 传统窗口系统的挑战 + +传统的窗口系统为我们提供了很好的服务,允许应用生成可以手动移动和调整大小的矩形窗口。然而,随着窗口数量和尺寸的增加,问题开始出现。重叠的窗口很快就会变得一团糟,使得在不隐藏其他应用的情况下访问特定应序变得困难。最大化窗口可能会遮挡桌面上的其他所有内容,从而导致混乱和效率低下。 + +多年来,各种操作系统引入了工作区、任务栏和切换器等解决方法来处理这些问题。然而,窗口管理的核心问题仍未解决。特别是对于儿童和老年人等计算机新手来说,手动排列窗口可能会很麻烦且乏味。 + +### 平铺窗口管理器简介 + +平铺窗口管理器通过防止窗口重叠提供了替代解决方案。虽然它们在某些情况下运行良好,但也有其局限性。平铺窗口可能会导致效率低下,因为应用通常是针对特定尺寸和纵横比设计的。此外,这些管理者缺乏关于窗口内容和上下文的知识,导致额外的手动调整并违背了简化工作流程的目的。更不用说记住很多键盘快捷键了。 + +### GNOME 当前的平铺功能 + +GNOME 已经在 GNOME 3 系列中尝试了基本的平铺功能。然而,现有的实现有一些局限性。这是一个手动过程,仅支持两个窗口,缺乏复杂布局的可扩展性,并且不会将平铺窗口分组到窗口栈中。 + +### 窗口管理的新愿景 + +该团队提出了一种新的窗口管理方法,重点关注符合用户期望和需求的自动化系统。他们的概念涉及窗口的三种潜在布局状态:马赛克、边缘平铺和浮动。 + +马赛克将成为默认行为,根据用户偏好和可用屏幕空间智能定位窗口并调整窗口大小。随着新窗口的打开,现有窗口将进行调整以适应新来者。如果窗口不适合当前布局,它将被放置在自己的工作区中。当屏幕接近满时,窗口将自动平铺。 + +用户还可以通过将窗口拖动到现有窗口或空白区域上来手动平铺窗口。该系统提供了灵活性和便利性,使其更容易高效地执行多任务。 + +![mosaic-open-close (Video credit: GNOME)][2] + +![mosaic-maximize (Video credit: GNOME)][3] + +![mosaic-vertical-tile (Video credit: GNOME)][4] + +![mosaic-tile2 (Video credit: GNOME)][5] + +![mosaic-tile3 (Video credit: GNOME)][6] + +### 维护用户友好的浮动窗口 + +虽然平铺提供了多种好处,但 GNOME 开发人员明白,总会有用户更喜欢手动定位窗口的情况。因此,经典的浮动行为仍然适用于这些特定情况,但随着新马赛克系统的引入,它可能不太常见。 + +### 利用窗口元数据增强性能 + +GNOME 旨在优化平铺体验,以从窗口收集有关其内容的更多信息。这包括窗口的最大所需尺寸以及应用最佳运行的理想尺寸范围等详细信息。通过使用这些元数据,系统可以定制窗口布局以满足用户的需求,从而提高整体可用性。 + +### 展望未来 + +虽然 GNOME 开发人员对这个新的窗口管理方向感到兴奋,但他们也承认与这种新颖方法相关的风险。他们计划进行用户研究以验证他们的假设并完善交互。尽管没有具体的实施时间表,但该项目可能会跨越多个开发周期,并成为 GNOME 46 或更高版本的一部分。 + +截至发布此内容时,还没有草稿合并请求,你可以参与其中并提供反馈。 + +_来自 [Tobias 的博客][1]_ + +-------------------------------------------------------------------------------- + +via: https://debugpointnews.com/gnome-window-management-proposal/ + +作者:[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://debugpointnews.com/author/dpicubegmail-com/ +[b]: https://github.com/lkxed/ +[1]: https://blogs.gnome.org/tbernard/2023/07/26/rethinking-window-management/ +[2]: https://debugpointnews.com/wp-content/uploads/2023/07/mosaic-open-close.webm +[3]: https://debugpointnews.com/wp-content/uploads/2023/07/mosaic-maximize.webm +[4]: https://debugpointnews.com/wp-content/uploads/2023/07/mosaic-vertical-tile.webm +[5]: https://debugpointnews.com/wp-content/uploads/2023/07/mosaic-tile2.webm +[6]: https://debugpointnews.com/wp-content/uploads/2023/07/mosaic-tile3.webm From ac2cc1b5b91b22c97d1f286b841926b39b3a6a5b Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 7 Aug 2023 09:13:21 +0800 Subject: [PATCH 63/72] translating --- sources/tech/20230727.0 ⭐️⭐️ What is Compiz in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20230727.0 ⭐️⭐️ What is Compiz in Linux.md b/sources/tech/20230727.0 ⭐️⭐️ What is Compiz in Linux.md index ee7c31afe5..1d3292886d 100644 --- a/sources/tech/20230727.0 ⭐️⭐️ What is Compiz in Linux.md +++ b/sources/tech/20230727.0 ⭐️⭐️ What is Compiz in Linux.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/compiz/" [#]: author: "Bill Dyer https://itsfoss.com/author/bill/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 5e507455763ab5be24aa288809ef2f34c3d717ec Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 7 Aug 2023 15:15:37 +0800 Subject: [PATCH 64/72] RP @geekpi https://linux.cn/article-16070-1.html --- ...e Open-Source App for Work and Productivity.md | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) rename {translated/tech => published}/20230719.0 ⭐️ Anytype An All-in-One Secure Open-Source App for Work and Productivity.md (64%) diff --git a/translated/tech/20230719.0 ⭐️ Anytype An All-in-One Secure Open-Source App for Work and Productivity.md b/published/20230719.0 ⭐️ Anytype An All-in-One Secure Open-Source App for Work and Productivity.md similarity index 64% rename from translated/tech/20230719.0 ⭐️ Anytype An All-in-One Secure Open-Source App for Work and Productivity.md rename to published/20230719.0 ⭐️ Anytype An All-in-One Secure Open-Source App for Work and Productivity.md index 6c0d6e99c4..d460e058ff 100644 --- a/translated/tech/20230719.0 ⭐️ Anytype An All-in-One Secure Open-Source App for Work and Productivity.md +++ b/published/20230719.0 ⭐️ Anytype An All-in-One Secure Open-Source App for Work and Productivity.md @@ -3,18 +3,18 @@ [#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-16070-1.html" Anytype:一款用于工作和生产力的一体化安全开源应用 ====== -一款适合所有人的新开源应用。尝试其公开测试版并查看它是否适合你。 +> 一款适合所有人的新开源应用。尝试其公开测试版并查看它是否适合你。 ![anytype][1] -“为那些崇尚信任和自主的人提供的一切应用”。Anytype 的口号是,一款新的**一体化安全开源个人 CRM 应用**,旨在提供一些令人印象深刻的功能。 +Anytype 的口号是,“为那些崇尚信任和自主的人提供的一切应用”。它是一款新的**一体化安全开源个人 CRM 应用**,旨在提供一些令人印象深刻的功能。 他们联系我们来报道第一个公开测试版本,我们对此非常感兴趣。 @@ -26,34 +26,34 @@ Anytype:一款用于工作和生产力的一体化安全开源应用 Anytype 是一个**本地优先**、**点对点(P2P)**的**开源**工具,**可用于各种任务**,例如**项目管理**、**存储文档**、**每日笔记**、**管理任务**、**书籍/文章/网站收藏**以及**甚至作为个人 CRM 软件**。 -他们还计划允许你在未来管理/创建博客、社区维基和讨论。 +他们还计划以后可以让你管理/创建博客、社区维基和讨论。 本地优先意味着 Anytype **可以在本地运行,无需连接到互联网**,从而实现更好的可靠性、速度,以及最重要的安全性。 -> 📋 Anytype 的源码可以在其 [GitHub 页面][3]上找到。 +> 📋 Anytype 的源码可以在其 [GitHub 页面][3] 上找到。 -不过,这**并不意味着它是一个仅限离线的工具**。你可以将其配置为通过互联网在多个平台上进行访问。 +不过,这**并不意味着它是一个仅限离线使用的工具**。你可以将其配置为通过互联网在多个平台上进行访问。 这之所以成为可能,是因为使用了 **Anysync 协议**,该协议**允许自托管**、**数据可移植性**和**实时 P2P 端到端加密协作**。 Anytype 作为模块化空间构建器和浏览器构建在 Anysync 之上,为用户提供了一套强大的工具来构建空间和基于图形的网站视图。 -其背后的公司是一家**位于柏林的初创公司**,[其开源理念][4]似乎相当可靠。 +其背后的公司是一家**位于柏林的初创公司**,[其开源理念][4] 似乎相当可靠。 除此之外,Anytype 的一些最显著的功能包括: -- **可互操作的空间。** -- **无需代码即可构建空间。** -- **能够创建公共/私人/共享空间。** -- **设备上加密。** -- **跨平台。** -- **自我托管的能力。** +- 可互操作的空间。 +- 无需代码即可构建空间。 +- 能够创建公共/私人/共享空间。 +- 设备上加密。 +- 跨平台。 +- 自我托管的能力。 #### 初步印象 我在我的 [Ubuntu 22.04 LTS][5] 上尝试了 Anytype,使用体验非常好。 -当你首次启动该应用时,你将看到一个“加入”或“登录”屏幕。我使用“加入”选项在本地创建一个新帐户。 +当你首次启动该应用时,你将看到一个“加入Join”或“登录Login”屏幕。我使用“加入”选项在本地创建一个新帐户。 ![a screenshot of anytype's dashboard][6] @@ -61,23 +61,23 @@ Anytype 作为模块化空间构建器和浏览器构建在 Anysync 之上,为 ![a screenshot of anytype's quick-start menu][7] -之后,它带我进入“**我的主页**”,在这里我可以访问侧边栏菜单和一个包含所有内容概述的页面。 +之后,它带我进入“我的主页My Homepage”,在这里我可以访问侧边栏菜单和一个包含所有内容概述的页面。 ![a screenshot of anytype's my homepage screen][8] -从侧边栏菜单中,我进入“**我的项目**”页面并选择了其中一个项目。它打开了一个块编辑器,让我可以直观地编辑文本。 +从侧边栏菜单中,我进入“我的项目My Projects”页面并选择了其中一个项目。它打开了一个块编辑器,让我可以直观地编辑文本。 > 📋 它还具有用于跟踪多个任务的任务跟踪器。 ![a screenshot of an open project in anytype][9] -之后,我测试了“**我的笔记**”功能。它运行良好,并且符合你对[笔记应用][10]的期望。它还具有块编辑器,我在日常工作中对其进行了测试,效果非常好。 +之后,我测试了“我的笔记My Notes”功能。它运行良好,并且符合你对 [笔记应用][10] 的期望。它还具有块编辑器,我在日常工作中对其进行了测试,效果非常好。 我所有的植物都喂饱了,我的猫也浇水了!🤣 ![a screenshot of an open note in anytype][11] -最后,我看了一下“**图表视图**”。我对它的详细程度感到惊讶。Anytype 能够通过这种方式非常有效地说明所有数据点。 +最后,我看了一下“图表视图Graph View”。我对它的详细程度感到惊讶。Anytype 能够通过这种方式非常有效地说明所有数据点。 ![a screenshot of anytype's graph view][12] @@ -87,15 +87,15 @@ Anytype 作为模块化空间构建器和浏览器构建在 Anysync 之上,为 除此之外,我很高兴 Monica 现在有了一个合适的竞争对手。我迫不及待地想看看 Anytype 对此有何反应。 -你可以通过 [ProductHunt 上的公告帖子][13]进行更深入的研究。 +你可以通过 [ProductHunt 上的公告帖子][13] 进行更深入的研究。 ### 📥 获取 Anytype -Anytype 可在 **Linux**、**Windows**、**Mac**、**iOS** 和 **Android** 上使用。你可以前往[官方网站][14]获取你选择的包。 +Anytype 可在 **Linux**、**Windows**、**Mac**、**iOS** 和 **安卓** 上使用。你可以前往[官方网站][14]获取你选择的包。 -[Anytype][15] +> **[Anytype][15]** -_💬 你会尝试 Anytype 吗? 让我们知道!_ +💬 你会尝试 Anytype 吗? 让我们知道! -------------------------------------------------------------------------------- @@ -104,7 +104,7 @@ via: https://news.itsfoss.com/anytype-open-beta/ 作者:[Sourav Rudra][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/) 荣誉推出 From 6c2e11680613b85fc3245c1309fd0a73d66656ed Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 7 Aug 2023 15:58:43 +0800 Subject: [PATCH 65/72] ATRP @wxy https://linux.cn/article-16071-1.html --- ...ch Terminal With Nautilus File Manager in Linux.md | 153 ++++++++++++++++++ ...ch Terminal With Nautilus File Manager in Linux.md | 139 ---------------- 2 files changed, 153 insertions(+), 139 deletions(-) create mode 100644 published/20230720.0 ⭐️⭐️ Mix and Match Terminal With Nautilus File Manager in Linux.md delete mode 100644 sources/tech/20230720.0 ⭐️⭐️ Mix and Match Terminal With Nautilus File Manager in Linux.md diff --git a/published/20230720.0 ⭐️⭐️ Mix and Match Terminal With Nautilus File Manager in Linux.md b/published/20230720.0 ⭐️⭐️ Mix and Match Terminal With Nautilus File Manager in Linux.md new file mode 100644 index 0000000000..1c7d2414bd --- /dev/null +++ b/published/20230720.0 ⭐️⭐️ Mix and Match Terminal With Nautilus File Manager in Linux.md @@ -0,0 +1,153 @@ +[#]: subject: "Mix and Match Terminal With Nautilus File Manager in Linux" +[#]: via: "https://itsfoss.com/terminal-nautilus-combination/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "ChatGPT" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-16071-1.html" + +将 Linux 终端与 Nautilus 文件管理器结合起来 +====== + +![][0] + +> 这里有一些技巧和调整,通过将终端和文件管理器结合在一起,以节省你的时间。 + +Nautilus 是 GNOME 桌面环境中的图形化文件浏览器。你可以使用它来访问和管理系统中的文件和文件夹。 + +尽管并非所有人都喜欢使用终端来管理文件和目录,但你也可以通过终端进行文件和目录管理。 + +然而,你可能会遇到需要在终端和文件管理器之间切换的情况。 + +有多种方法可以在 Nautilus 文件管理器和终端之间进行交互。令人惊讶的是,并不是所有的 Linux 用户都知道这些方法。 + +例如,在 Nautilus 中,右键单击并选择“在终端中打开Open in terminal”选项,将在终端中打开当前目录位置。 + +![在 Linux 中从 Nautilus 文件管理器中打开终端][1] + +这只是我在本文中要与你分享的众多示例之一。 + +### 1、拖放获取绝对路径 + +如果你将文件夹或文件拖放到终端中,其绝对路径将被粘贴到终端屏幕上。 + +![将文件或文件夹从 Nautilus 拖放到终端会粘贴该项的绝对路径][2] + +当你在文件浏览器中深入目录结构并且不想在终端中键入整个路径时,这样做很有帮助。 + +### 2、进入目录 + +这与上面看到的类似。如果你在目录结构中深入进入,并且不想为 [切换到该目录][3] 键入整个路径,这个技巧很有帮助。 + +在终端中键入 `cd` 命令,然后拖放以进入目录。 + +![在键入"cd"命令后,通过拖放将目录输入终端][5] + +### 3、在编辑器中打开文件 + +类似地,你可以使用 Nano 或 Vim 编辑器打开文件进行 [编辑][6]。 + +将文件拖放到 `nano` 命令中以打开它进行编辑。 + +![在键入"nano"后,将需要编辑的文件拖放到终端][7] + + +### 4、使用 sudo 权限打开文件进行编辑 + +与上述相同,但这次你可以使用 `sudo` 权限打开文件进行编辑。 + +![使用 sudo 权限打开 sources.list 文件进行编辑][8] + +### 5、拖放多个文件(如果命令支持多个参数) + +你也可以拖放多个文件以获取它们的绝对路径。这可以与接受多个参数的命令一起使用。 + +例如,[diff 命令用于检查两个文件之间的差异][9]。输入 `diff`,然后拖放你想要检查差异的文件。 + +![通过选择文件并将其拖放为 diff 命令参数来检查两个文件的差异][10] + +### 6、从文本文件复制粘贴 + +阅读文档并且需要在终端中运行其中提到的命令?你当然可以 [在终端中复制粘贴][11]。 + +然而,更快捷的方法是选中文本并将其拖放到终端。 + +这个技巧也适用于 [GNOME-Sushi][12] 预览。 + +![使用 GNOME-Sushi 从任何文件的预览中拖放一些文本][13] + +### 7、从浏览器中拖放 + +与上述的文本文件类似,你也可以从浏览器中拖放文本。这有助于在进行教程操作时同时查看教程。 + +![从互联网拖放代码或网址到终端,无需复制或粘贴][14] + +### 8、在 Nautilus 中嵌入终端 + +无法离开终端?直接将其嵌入到文件管理器中。这样,你无需单独 [打开一个终端][15]。 + +这里的关键是,如果你在文件浏览器中切换到另一个目录,嵌入的终端会自动切换到相应的目录。 + +你也可以在 Nautilus 嵌入的终端中执行大部分上述的拖放操作。例如,通过拖放 `.bashrc` 文件并使用 `grep`,在 `.bashrc` 中搜索特定文本。 + +![通过在嵌入的终端中拖放 .bashrc 文件并使用 grep,在 bashrc 中搜索特定文本][16] + +### 9、在嵌入的终端之间拖放文件标签 + +终端和文件管理器都支持选项卡视图。你可以在选项卡之间拖放文件。 + +例如,要 [检查 ISO 的 shasum 值][17],输入 `shasum` 命令,然后从另一个选项卡中拖放文件,如下所示。 + +![检查 ISO 的 shasum 值,输入 shasum 命令,然后从另一个选项卡中拖放文件][18] + +### 更多关于 Nautilus 和终端的内容 + +喜欢这些技巧吗?也许你想学习更多类似的技巧。 + +如果你想更充分地利用 Nautilus 文件管理器,这里有一些技巧供你参考。 + +> **[调整你的 Nautilus 文件管理器的 13 种办法][18a]** + +这里还有一些探索的终端技巧: + +> **[19 个你应该掌握的基本但重要的 Linux 终端技巧][18b]** + +💬 你是否了解其他将终端和文件管理器结合使用的酷炫技巧?不妨在下方的评论区与我们分享一下! + +*(题图:MJ/ba1ee1c9-07e5-4fc8-bd2c-bde469ce095c)* + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/terminal-nautilus-combination/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:ChatGPT +校对:[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/content/images/2023/07/right-click-open-in-terminal.gif +[2]: https://itsfoss.com/content/images/2023/07/copies-absolute-path.gif +[3]: https://itsfoss.com/change-directories/ +[4]: https://itsfoss.com/cd-command/ +[5]: https://itsfoss.com/content/images/2023/07/enter-a-directory.gif +[6]: https://itsfoss.com/nano-editor-guide/ +[7]: https://itsfoss.com/content/images/2023/07/edit-bashrc.gif +[8]: https://itsfoss.com/content/images/2023/07/open-sources.gif +[9]: https://linuxhandbook.com/diff-command/ +[10]: https://itsfoss.com/content/images/2023/07/check-diff.gif +[11]: https://itsfoss.com/copy-paste-linux-terminal/ +[12]: https://gitlab.gnome.org/GNOME/sushi +[13]: https://itsfoss.com/content/images/2023/07/from-sushi.gif +[14]: https://itsfoss.com/content/images/2023/07/drag-and-drop-code-from-internet.gif +[15]: https://itsfoss.com/open-terminal-ubuntu/ +[16]: https://itsfoss.com/content/images/2023/07/embedded-terminal.gif +[17]: https://itsfoss.com/checksum-tools-guide-linux/ +[18]: https://itsfoss.com/content/images/2023/07/shasum-final.gif +[18a]: https://itsfoss.com/nautilus-tips-tweaks/ +[18b]: https://itsfoss.com/basic-terminal-tips-ubuntu/ +[0]: https://img.linux.net.cn/data/attachment/album/202308/07/155713nuulz3b3dolrrqbc.jpg \ No newline at end of file diff --git a/sources/tech/20230720.0 ⭐️⭐️ Mix and Match Terminal With Nautilus File Manager in Linux.md b/sources/tech/20230720.0 ⭐️⭐️ Mix and Match Terminal With Nautilus File Manager in Linux.md deleted file mode 100644 index 200f58d22e..0000000000 --- a/sources/tech/20230720.0 ⭐️⭐️ Mix and Match Terminal With Nautilus File Manager in Linux.md +++ /dev/null @@ -1,139 +0,0 @@ -[#]: subject: "Mix and Match Terminal With Nautilus File Manager in Linux" -[#]: via: "https://itsfoss.com/terminal-nautilus-combination/" -[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Mix and Match Terminal With Nautilus File Manager in Linux -====== - -Nautilus is the graphical file browser in the GNOME desktop. You use it for accessing and managing files and folders on your system. - -You can also manage files and directories from the terminal though not everyone prefers that. - -However, you may encounter situations where you have to switch between the terminal and file manager. - -There are various ways to interact between the Nautilus file manager and terminal. Surprisingly, not many Linux users know about them. - -**_For example, in Nautilus, right-click and choose 'Open in terminal' option and you'll open the current directory location in the terminal._** - -![Open terminal from Nautilus file manager in Linux][1] - -That's just one of the many examples I am going to share with you in this article. - -### 1. Drag and drop to get the absolute path - -If you drag and drop a folder or a file to a terminal, its absolute path will be pasted on the terminal screen. - -![Dragging and Dropping a File or Folder from Nautilus to Terminal will paste tha absolute path of that item][2] - -This helps when you are deep inside the directory structure in the file browser and don't want to type the entire path in the terminal. - -### 2. Enter a directory - -It's similar to what you saw above. If you are deep inside the directory structure and don't want to type the entire path for [switching to the directory][3], this trick helps. - -Type the [cd command][4] in the terminal and then drag and drop to enter into the directory. - -![Enter to a directory by Drag and Drop that directory to the terminal after a "cd" command][5] - -### 3. Open a file in editor - -Similarly, you can open a file for [editing with Nano][6] or Vim editor. - -Drag and drop a file to `nano` command to open it for editing. - -![After typing "nano", drag and drop the file you need to edit to the terminal][7] - -### 4. Open a file for editing with sudo - -Same as above but this time, you open the file for editing with sudo access. - -![Open the sources list file in nano with sudo privileges.][8] - -### 5. Drag multiple files, if the command supports multiple arguments - -You can also drag and drop multiple files to get their absolute paths. This can be used with commands that accept more than one argument. - -For example, the [diff command checks the difference between two files][9]. Enter `diff` and then drag and drop the files you want to check for differences. - -![Check the difference in two files by selecting both files and then drag and drop them as diff command arguments][10] - -### 6. Copy and paste from text files - -Reading a document and have to run a command mentioned in it? You can of course [copy paste in the terminal][11]. - -However, a quicker way is to select the text and drag and drop it to the terminal. - -This trick works with [GNOME-Sushi][12] preview as well. - -![Drag and Drop some text from any file from its overview using GNOME-Sushi][13] - -### 7. Drag and drop from browser - -Like the text files above, you can also drag and drop text from browsers. This helps in following tutorials while doing it at the same time. - -![Drag and Drop codes or URLs from internet to the terminal without copy or paste][14] - -### 8. Embed terminal in Nautilus - -Can't live without the terminal? Embed it directly in the file manager. This way you don't have to [open a terminal][15] separately. - -The thing here is that if you switch to another directory in the file browser, it automatically switches the directly in the embedded terminal also. - -You can perform most of the above-mentioned drag and drop operations in the Nautilus embedded terminal also. For example, search for a specific text in bashrc, by dropping the `.bashrc` file and using grep. - -![Search for a specific text in bashrc, by dropping the .bashrc file in the embedded terminal and using grep][16] - -### 9. Drag files between tabs of the embedded terminal - -Both terminal and file manager supports the tabbed view. You can drag and drop files from one tab to another. - -For example, to [check the shasum][17] value for an ISO, enter shasum command, then, drag and drop the file from another tab, as shown below. - -![Check the shasum value for an ISO, enter shasum command, then, drag and drop the file from another tab][18] - -### More on Nautilus and terminal - -Liked these tips? Maybe you would want to learn more such tips. - -If you want to get more out of the Nautilus file manager, here are a few tips for you. - -Here are some terminal tips to explore. - -💬 _Do you know any other such cool tip that combines the terminal and the file manager? Why not share it with us in the comment section below?_ - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/terminal-nautilus-combination/ - -作者:[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/content/images/2023/07/right-click-open-in-terminal.gif -[2]: https://itsfoss.com/content/images/2023/07/copies-absolute-path.gif -[3]: https://itsfoss.com/change-directories/ -[4]: https://itsfoss.com/cd-command/ -[5]: https://itsfoss.com/content/images/2023/07/enter-a-directory.gif -[6]: https://itsfoss.com/nano-editor-guide/ -[7]: https://itsfoss.com/content/images/2023/07/edit-bashrc.gif -[8]: https://itsfoss.com/content/images/2023/07/open-sources.gif -[9]: https://linuxhandbook.com/diff-command/ -[10]: https://itsfoss.com/content/images/2023/07/check-diff.gif -[11]: https://itsfoss.com/copy-paste-linux-terminal/ -[12]: https://gitlab.gnome.org/GNOME/sushi -[13]: https://itsfoss.com/content/images/2023/07/from-sushi.gif -[14]: https://itsfoss.com/content/images/2023/07/drag-and-drop-code-from-internet.gif -[15]: https://itsfoss.com/open-terminal-ubuntu/ -[16]: https://itsfoss.com/content/images/2023/07/embedded-terminal.gif -[17]: https://itsfoss.com/checksum-tools-guide-linux/ -[18]: https://itsfoss.com/content/images/2023/07/shasum-final.gif From 30ef263b1cc569c2e769e4e272423409204d5429 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 7 Aug 2023 22:52:15 +0800 Subject: [PATCH 66/72] ATRP @wxy https://linux.cn/article-16073-1.html --- ...Our favorite markup languages for documentation.md | 179 ++++++++++++++++++ ...Our favorite markup languages for documentation.md | 173 ----------------- 2 files changed, 179 insertions(+), 173 deletions(-) create mode 100644 published/20221208.3 ⭐️⭐️ Our favorite markup languages for documentation.md delete mode 100644 sources/tech/20221208.3 ⭐️⭐️ Our favorite markup languages for documentation.md diff --git a/published/20221208.3 ⭐️⭐️ Our favorite markup languages for documentation.md b/published/20221208.3 ⭐️⭐️ Our favorite markup languages for documentation.md new file mode 100644 index 0000000000..8229b623bc --- /dev/null +++ b/published/20221208.3 ⭐️⭐️ Our favorite markup languages for documentation.md @@ -0,0 +1,179 @@ +[#]: subject: "Our favorite markup languages for documentation" +[#]: via: "https://opensource.com/article/22/12/markup-languages-documentation" +[#]: author: "Opensource.com https://opensource.com/users/admin" +[#]: collector: "lkxed" +[#]: translator: "ChatGPT" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-16073-1.html" + +你喜欢哪种文档标记语言? +====== + +![][0] + +> 文档对于开源软件项目至关重要。我们询问了我们的贡献者,他们在文档编写中最喜欢使用的标记语言是什么。 + +文档很重要,而易读的文档更重要。在开源软件世界中,文档可以告诉我们如何使用或贡献一个应用程序,就像 [游戏][1] 的规则书一样。 + +有很多不同类型的文档: + +- 教程 +- 操作指南 +- 参考指南 +- 软件架构 +- 产品手册 + +我们向一些贡献者询问了他们的技术文档工作流程,他们更喜欢使用哪种标记语言,以及为什么会选择其中一种。以下是他们的回答。 + +### AsciiDoc + +过去几年中,[Markdown][2] 一直是我的标准语言。但最近我决定尝试一下 [AsciiDoc][3] 。这种语法并不难,我在 Linux 桌面上的 [Gedit][4] 就支持它。我计划暂时坚持使用它一段时间。 + +—- [Alan Formy-Duval][5] + +就低语法标记语言而言,我更喜欢 AsciiDoc。我喜欢它,是因为其转换过程一致且可预测,没有令人困惑的“口味”变化 。我还喜欢将它输出为 [Docbook][6],这是一种我信任其持久性和灵活性的标记语言,它有大量的语法标记。 + +但“正确”的选择往往取决于项目已经在使用什么。如果项目使用某种口味的 Markdown,我就不会使用 AsciiDoc。嗯,公平地说,我可能会使用 AsciiDoc,然后使用 Pandoc 将其转换为草莓味的 Markdown。 + +当然,我认为 Markdown 有其应用的时间和场合。我发现它比 AsciiDoc 更易读。AsciiDoc 中的链接是这样: + +``` +http://example.com [Example website] +``` + +而 Markdown 中的链接是这样: + +``` +[Example.com](http://example.com) +``` + +Markdown 的语法直观,以读取 HTML 的方式呈现信息,大多数人都以相同的方式解析此类数据(“Example website……哦,那是蓝色的文本,我将悬停一下以查看它指向哪里……它指向 [example.com][7]”)。 + +换句话说,当我的受众是人类读者时,我通常会选择 Markdown,因为它的语法简单,但仍具有足够的语法可以进行转换,因此仍然是一种可接受的存储格式。 + +虽然像 AsciiDoc 这样简洁的语法看起来更令人吃惊,但如果我的受众是要解析文件的计算机,我会选择 AsciiDoc。 + +—- [Seth Kenlon][8] + +### reStructuredText + +我是 [代码即文档][9] 的忠实支持者,它将开发者工具融入到内容流程中。这样可以更轻松地进行高效的审查和协作,尤其是如果工程师是贡献者。 + +作为一个标记语言的行家,我在 O'Reilly 写了整整一本关于 AsciiDoc 的书,还使用 Markdown 在各个平台上发布了上千篇博文。但目前,我转向使用 [reStructuredText][10],并维护一些相关工具。 + +—— [Lorna Mitchell][11] + +不得不提到 reStructuredText。在我大量使用 Python 编程时,它已成为我的首选。它也是 Python 长期以来用于文档源码和代码注释的标准。 + +与 Markdown 相比,我喜欢它不会受到非标准规范的困扰。话虽如此,当我处理更复杂的文档时,确实还得使用许多 Sphinx 的功能和扩展。 + +—— [Jeremy Stanley][12] + +### HTML + +能不用标记语言我就不用。 + +不过,我发现 HTML 比其他标记语言更易于使用。 + +—— [Rikard Grossman-Nielsen][13] + +对我来说,撰写文档有各种方式。这取决于文档将要放在何处,是作为网站的一部分、软件包的一部分,还是可下载的内容。 + +对于 [Scribus][14] 来说,其内部文档采用 HTML 格式,因为需要使用内部浏览器来访问。对于网站,可能需要使用维基语言。而对于可下载的内容,可以创建 PDF 或 EPUB 格式。 + +我倾向于在纯文本编辑器中编写文档。我可能会使用 XHTML,以便将这些文件导入到像 Sigil 这样的 EPUB 制作工具中。当然,对于创建 PDF,我会使用 Scribus,虽然我可能会导入用文本编辑器创建的文本文件。Scribus 具有包含图形并精确控制其布局的优势。 + +Markdown 从未吸引我,我也从未尝试过 AsciiDoc。 + +—— [Greg Pittman][15] + +我目前正在使用 HTML 撰写大量文档,所以我要为 HTML 代言一下。你可以使用 HTML 创建网站或创建文档。请注意,这两者实际上并不相同 —— 当你创建网站时,大多数设计师关注的是呈现。但是当你编写文档时,技术作者应该专注于内容。 + +当我用 HTML 撰写文档时,我遵循 HTML 定义的标签和元素,并不关心它的外观。换句话说,我用“未经样式化”的 HTML 编写文档。稍后我总是可以添加样式表。因此,如果我需要强调文本的某一部分(比如警告),或者给单词或短语加重语气,我可能会使用 `` 和 `` 标签,像这样: + +``` +

警告:激光!不要用你剩下的那只眼睛看向激光。

+``` + +或者在段落中提供一个简短的代码示例,我可能会这样写: + +``` +

puts 函数将一些文本输出给用户。

+``` + +要在文档中格式化一段代码块,我使用 `
..
`,如下所示: + +``` +void +print_array(int *array, int size) +{ + for (int i = 0; i < size; i++) { + printf("array[%d] = %d\n", i, array[i]); + } +} +``` + +HTML 的好处在于你可以立即在任何 Web 浏览器中查看结果。而你使用未经样式化的 HTML 编写的任何文档都可以通过添加样式表来美化。 + +—— [Jim Hall][16] + +### 意料之外的答案:LibreOffice + +在上世纪 80/90 年代,当我在 System V Unix、SunOS,最后是 Solaris 上工作时,我使用了 `nroff`、`troff` 和最终的 `groff` 与 `mm` 宏。你可以了解一下使用 `groff_mm` 的 MM(前提是你已经安装了它们)。 + +MM 并不是真正的标记语言,但它感觉像是。它是一套非常语义化的 troff 和 groff 宏。它具备标记语言用户所期望的大多数功能,如标题、有序列表等等。 + +我的第一台 Unix 机器上也安装了 “Writers' Workbench”,这对我们组织中需要撰写技术报告但没有特别进行“引人入胜”写作的许多人来说是一个福音。它的一些工具已经进入了 BSD 或 Linux 环境,比如样式(style)、用词检查(diction)和外观(look)。 + +我还记得早在上世纪 90 年代初期,Solaris 附带了一个标准通用标记语言(SGML)工具,也可能是我们购买了这个工具。我曾经使用它一段时间,这可能解释了为什么我不介意手动输入 HTML。 + +我使用过很多 Markdown,我应该说是“哪种 Markdown”,因为它有无数种风格和功能级别。正因为如此,我并不是 Markdown 的铁杆粉丝。我想,如果我有很多 Markdown 要处理,我可能会尝试使用一些 [CommonMark][17] 的实现,因为它实际上有一个正式的定义。例如,[Pandoc][18] 支持 CommonMark(以及其他几种)。 + +我开始使用 AsciiDoc,相比于 Markdown,我更喜欢 AsciiDoc,因为它避免了“你使用的是哪个版本”的讨论,并提供了许多有用的功能。过去,让我对 AsciiDoc 感到困扰的是,有一段时间似乎需要安装 Asciidoctor,这是一个我不太想安装的 Ruby 工具链。但是现在,在我所用的 Linux 发行版中,有了更多的实现方式。奇怪的是,Pandoc 可以输出 AsciiDoc,但不支持读取 AsciiDoc。 + +那些嘲笑我不愿意为 AsciiDoc 安装 Ruby 工具链,却乐意安装 Pandoc 的 Haskell 工具链的人……我听到你们的笑声了。 + +我羞愧地承认,我现在主要使用 LibreOffice。 + +——[Chris Hermansen][19] + +### 现在就编写文档吧! + +文档编写可以通过多种不同的途径来完成,正如这里的作者们展示的那样。对于代码的使用方法,特别是在开源领域,进行文档编写非常重要。这确保其他人能够正确地使用和贡献你的代码。同时,告诉未来的用户你的代码提供了什么也是明智之举。 + +*(题图:MJ/9543e029-322d-479f-b609-442abc036b73)* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/12/markup-languages-documentation + +作者:[Opensource.com][a] +选题:[lkxed][b] +译者:ChatGPT +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/admin +[b]: https://github.com/lkxed +[1]: https://opensource.comttps://opensource.com/life/16/11/software-documentation-tabletop-gaming +[2]: https://opensource.com/article/19/9/introduction-markdown +[3]: https://opensource.com/article/22/8/drop-markdown-asciidoc +[4]: https://opensource.com/%20https%3A//opensource.com/article/20/12/gedit +[5]: https://opensource.com/users/alanfdoss +[6]: https://opensource.com/article/17/9/docboo +[7]: http://example.com/ +[8]: https://opensource.com/users/seth +[9]: https://opensource.com/article/22/10/docs-as-code +[10]: https://opensource.com/article/19/11/document-python-sphinx +[11]: https://opensource.com/users/lornajane +[12]: https://opensource.com/users/fungi +[13]: https://opensource.com/users/rikardgn +[14]: https://opensource.com/article/21/12/desktop-publishing-scribus +[15]: https://opensource.com/users/greg-p +[16]: https://opensource.com/users/jim-hall +[17]: https://commonmark.org/ +[18]: https://opensource.com/downloads/pandoc-cheat-sheet +[19]: https://opensource.com/users/clhermansen +[0]: https://img.linux.net.cn/data/attachment/album/202308/07/225101z4leseqq9zbhn3hh.jpg \ No newline at end of file diff --git a/sources/tech/20221208.3 ⭐️⭐️ Our favorite markup languages for documentation.md b/sources/tech/20221208.3 ⭐️⭐️ Our favorite markup languages for documentation.md deleted file mode 100644 index d11843ff36..0000000000 --- a/sources/tech/20221208.3 ⭐️⭐️ Our favorite markup languages for documentation.md +++ /dev/null @@ -1,173 +0,0 @@ -[#]: subject: "Our favorite markup languages for documentation" -[#]: via: "https://opensource.com/article/22/12/markup-languages-documentation" -[#]: author: "Opensource.com https://opensource.com/users/admin" -[#]: collector: "lkxed" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Our favorite markup languages for documentation -====== - -Documentation is important for so many reasons. Readable documentation is even more so. In the world of open source software, documentation is how to use or contribute to an application. It's like the rulebook for a [game][1]. - -There are many different types of documentation: - -- Tutorials -- How-to guides -- Reference guides -- Software architecture -- Product manuals - -We asked some of the Opensource.com contributors about their technical documentation workflow, which markup language they preferred, and why they might use one over the other. Here's what they had to say. - -### AsciiDoc - -For the past several years, [Markdown][2] has been my standard language. But recently I decided to give [AsciiDoc][3] a try. The syntax is not difficult and [Gedit][4] on my Linux desktop supports it. I plan to stick with it for a while. - -—- [Alan Formy-Duval][5] - -In terms of low-syntax markup, I prefer AsciiDoc. I like it because its conversion process is consistent and predictable, with no surprise "flavor" variations to confuse things. I also love that it outputs to [Docbook][6], which is a markup-heavy syntax that I trust for longevity and flexibility. - -But the "right" choice tends to be what a project is already using. I wouldn't write in AsciiDoc if a project uses Strawberry-flavored Markdown. Well, to be fair, I might write in AsciiDoc and then convert it to Strawberry-flavored Markdown with Pandoc. - -I do think there is a time and place for Markdown. I do find it more readable than AsciiDoc. Links in AsciiDoc: - -``` -http://example.com[Example website] -``` - -Links in Markdown: - -``` -[Example.com](http://example.com) -``` - -The Markdown syntax is intuitive, delivering the information in the same way that I think most of us parse the same data when reading HTML ("Example website…oh, that's blue text, I'll roll over it to see where it goes…it goes to [example.com][7]"). - -In other words, when my audience is a human reader, I do often choose Markdown because its syntax is subtle but it's got enough of a syntax to make conversion possible, so it's still an OK storage format. - -AsciiDoc, as minimal as it is, just looks scarier. - -If my audience is a computer that's going to parse a file, I choose AsciiDoc. - -—- [Seth Kenlon][8] - -### reStructuredText - -I'm a big fan of [docs as code][9] and how it brings developer tools into the content workflows. It makes it easier to have efficient reviews and collaboration, especially if engineers are contributors. - -I'm also a bit of a markup connoisseur, having written whole books in AsciiDoc for O'Reilly, a lot of Markdown for various platforms, including a thousand posts on my blog. Currently, I'm a [reStructuredText][10] convert and maintain some of the tooling in that space. - -—- [Lorna Mitchell][11] - -Obligatory mention of reStructuredText. That's my go-to these days as I do a lot of Python programming. It's also been Python's standard for documentation source and code comments for ages. - -I like that it doesn't suffer quite so much from the proliferation of nonstandards that Markdown does. That said, I do use a lot of Sphinx features and extensions when working on more complex documentation. - -—- [Jeremy Stanley][12] - -### HTML - -I rarely use markup languages if I don't have to. - -I find HTML easier to use than other markup languages though. - -—- [Rikard Grossman-Nielsen][13] - -For me, there are various ways to make documentation. It depends on where the documentation is going to be whether on a website, as part of the software package, or something downloadable. - -For [Scribus][14], the internal documentation is in HTML, since an internal browser is used to access it. On a website, you might need to use a Wiki language. For something downloadable you might create a PDF or an EPUB. - -I tend to write the documentation in a plain text editor. I might use XHTML, so that I can then import these files into an EPUB maker like Sigil. And, of course, Scribus is my go-to app for making a PDF, though I would probably be importing a text file created with a text editor. Scribus has the advantage of including and precisely controlling placement of graphics. - -Markdown has never caught on with me, and I've never tried AsciiDoc. - -—- [Greg Pittman][15] - -I'm writing a lot of documentation in HTML right now, so I'll put in a plug for HTML. You can use HTML to create websites, or to create documentation. Note that the two are not really the same — when you're creating websites, most designers are concerned about presentation. But when you're writing documentation, tech writers should focus on content. - -When I write documentation in HTML, I stick to the tags and elements defined by HTML, and I don't worry about how it will look. In other words, I write documentation in "unstyled" HTML. I can always add a stylesheet later. So if I need to make some part of the text stronger (such as a warning) or add emphasis to a word or phrase, I might use the `` and `` tags, like this: - -``` -

Warning: Lasers! Do not look into laser with remaining eye.

-``` - -Or to provide a short code sample within the body of a paragraph, I might write: - -``` -

The puts function prints some text to the user.

-``` - -To format a block of code in a document, I use `
..
` like this: - -``` -void -print_array(int *array, int size) -  { -  for (int i = 0; i < size; i++) { -  printf("array[%d] = %d\n", i, array[i]); -  }} -``` - -The great thing about HTML is you can immediately view the results with any web browser. And any documentation you write in unstyled HTML can be made prettier later by adding a stylesheet. - -—- [Jim Hall][16] - -### Unexpected: LibreOffice - -Back in the 80s and 90s when I worked in System V Unix, SunOS, and eventually Solaris, I used the mm macros with `nroff,``troff` and finally `groff`. Read about MM using groff_mm (provided you have them installed.) - -MM isn't really a markup language, but it feels like one. It is a very semantic set of troff and groff macros. It has most things markup language users would expect—headings, numbered lists, and so on. - -My first Unix machine also had Writers' Workbench available on it, which was a boon for many in our organization who had to write technical reports but didn't particularly write in an "engaging manner". A few of its tools have made it to either BSD or Linux—style, diction, and look. - -I also recall a standard generalized markup language (SGML) tool that came with, or perhaps we bought for, Solaris in the very early 90s. I used this for awhile, which may explain why I don't mind typing in my own HTML. - -I've used Markdown a fair bit, but having said that, I should also be saying "which Markdown", because there are endless flavors and levels of features. I'm not a huge fan of Markdown because of that. I guess if I had a lot of Markdown to do I would probably try to gravitate toward some implementation of [CommonMark][17] because it actually has a formal definition. For example, [Pandoc][18] supports CommonMark (as well as several others). - -I started using AsciiDoc, which I much prefer to Markdown as it avoids the "which version are you using" conversation and provides many useful things. What has slowed me down in the past with respect to AsciiDoc is that for some time it seemed to require installing Asciidoctor—a Ruby toolchain which I was not anxious to install. But these days there are more implementations at least in my Linux distro. Curiously, Pandoc emits AsciiDoc but does not read it. - -Those of you laughing at me for not wanting a Ruby toolchain for AsciiDoc but being satisfied with a Haskell toolchain for Pandoc… I hear you. - -I blush to admit that I mostly use LibreOffice these days. - -—- [Chris Hermansen][19] - -### Document now! - -Documentation can be achieved through many different avenues, as the writers here have demonstrated. It's important to document how to use your code, especially in open source. This ensures that other people can use and contribute to your code properly. It's also wise to tell future users what your code is providing. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/22/12/markup-languages-documentation - -作者:[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.comttps://opensource.com/life/16/11/software-documentation-tabletop-gaming -[2]: https://opensource.com/article/19/9/introduction-markdown -[3]: https://opensource.com/article/22/8/drop-markdown-asciidoc -[4]: https://opensource.com/%20https%3A//opensource.com/article/20/12/gedit -[5]: https://opensource.com/users/alanfdoss -[6]: https://opensource.com/article/17/9/docboo -[7]: http://example.com/ -[8]: https://opensource.com/users/seth -[9]: https://opensource.com/article/22/10/docs-as-code -[10]: https://opensource.com/article/19/11/document-python-sphinx -[11]: https://opensource.com/users/lornajane -[12]: https://opensource.com/users/fungi -[13]: https://opensource.com/users/rikardgn -[14]: https://opensource.com/article/21/12/desktop-publishing-scribus -[15]: https://opensource.com/users/greg-p -[16]: https://opensource.com/users/jim-hall -[17]: https://commonmark.org/ -[18]: https://opensource.com/downloads/pandoc-cheat-sheet -[19]: https://opensource.com/users/clhermansen From 0babc31ce8904bea7410c766729708d6dbf94fe2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 8 Aug 2023 09:11:39 +0800 Subject: [PATCH 67/72] translated --- ...️⭐️ 3 reasons my Linux team uses Penpot.md | 104 ------------------ ...️⭐️ 3 reasons my Linux team uses Penpot.md | 104 ++++++++++++++++++ 2 files changed, 104 insertions(+), 104 deletions(-) delete mode 100644 sources/tech/20230330.1 ⭐️⭐️ 3 reasons my Linux team uses Penpot.md create mode 100644 translated/tech/20230330.1 ⭐️⭐️ 3 reasons my Linux team uses Penpot.md diff --git a/sources/tech/20230330.1 ⭐️⭐️ 3 reasons my Linux team uses Penpot.md b/sources/tech/20230330.1 ⭐️⭐️ 3 reasons my Linux team uses Penpot.md deleted file mode 100644 index 53181ec1d7..0000000000 --- a/sources/tech/20230330.1 ⭐️⭐️ 3 reasons my Linux team uses Penpot.md +++ /dev/null @@ -1,104 +0,0 @@ -[#]: subject: "3 reasons my Linux team uses Penpot" -[#]: via: "https://opensource.com/article/23/3/linux-penpot" -[#]: author: "Emma Kidney https://opensource.com/users/ekidney" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -3 reasons my Linux team uses Penpot -====== - -Working with Fedora exposes you to a lot of different open source software. A major Fedora website revamp started over a year ago, with the goal of improving design aesthetics, creating a style guide, planning the website strategy, and choosing the tech stack for delivering the Fedora Linux offerings website. From a design perspective, the team needed a tool to create mock-ups, a place to hold the asset libraries, and something suitable to hand off to developers once complete. - -### Choosing Penpot - -Figma is a popular interface designing tool recommended by many, but it wasn't deemed suitable because the company had recently imposed restrictions on their free plan. This concern arose before Adobe acquired Figma, so the decision not to use it was even more significant in retrospect! - -The team looked into Penpot and found that it matched everyone's requirements. Penpot is the first open source design and prototyping platform for cross-domain teams. A team within Kaleidos creates Penpot. Kaleidos is a technology company started in 2011 that fully focuses on open source projects. - -There are three ways the Fedora Websites and Apps team uses Penpot: - -- Wireframes and mock-ups -- UX testing and feedback -- Collabloration - -I expand on these uses below. While the example discusses the Fedora Project, Penpot offers benefits to any open source community. - -### 1. Wireframes and mock-ups - -Drafting webpage designs is the primary way our team uses Penpot. Drafting enables quick collaboration and lessens communication issues between contributors. Developers and designers can collaborate freely and in the same space. - -Community feedback is important. It can be a bit difficult to share mock-ups properly. Penpot is web-based and easily accessible on any platform. When entering **View Mode** on a prototype, the tool generates a shareable link. You can also modify the permissions or destroy the link if you no longer want it shared. - -![Creating a shareable link and editing permissions on Penpot.][1] - -### 2. UX testing and feedback - -This revamp works closely with the Fedora community. By running usability testing sessions on prototypes and sharing design progress, we use Penpot to keep the community involved every step of the way. - -### 3. Collaboration - -During the revamp, our development and design teams used Penpot to generate ideas, organize meetings, and test new concepts visually. - -Our teams used Penpot as a whiteboard in early planning sessions and enabled the developers to contribute ideas asynchronously while engaging in the discussion. This method reduced stress, made sure everyone's ideas could be heard, helped us see patterns, and mediated disagreements for a good compromise. Penpot helped create a sense of understanding between everyone. - -The team used Penpot as a source of assets. Uses can store elements and other content in an asset library so that one can use them repeatedly. Penpot stores components, graphics, typographies, color palettes, and more. - -![An example of an asset library within Penpot.][2] - -Sharing these libraries enables the whole team to access them. This can be helpful when working with a team that regularly accesses the same source files. If a new member joins, all assets they need to start building mock-ups for the project would be readily available. Users can export these assets directly from the Penpot file. - -![Exporting selected assets in a Penpot file.][3] - -Developers can view the prototype in full on any browser. This capability makes building the website easier as you can code side by side with the prototype. If a designer is working on the file at the same time, changes they make can be seen by refreshing in **View Mode** or in real-time if in the actual file. - -![An editor with code and the Penpot interface.][4] - -### Open source values - -Penpot aligns with the Fedora Project's "Four Foundations" of Freedom, Friends, Features, and First. As you review these values, consider how the tool might align with your own open source initiative. - -#### Freedom - -We choose open source and free alternatives to proprietary code and content and limit the effects of proprietary code on and within the Project. Penpot is the first open source design and prototyping platform. Penpot is web-based, independent of operating systems, and works with open web standards. This ensures compatibility with web browsers and external applications like Inkscape. - -#### Friends - -My community consists of people from all walks of life working together to advance free software. Penpot's mission is similar. Its goal is to provide an open source and open standards tool to bring collaboration between designers and developers to the next level. Using Penpot has allowed for a smooth handoff to developers and has allowed us to work productively together. There's no back-and-forth looking for files or assets, as everything they need is in the Penpot file. - -#### Features - -Fedora cares about excellent software. Its feature development is always done openly and transparently, and it encourages participation. Anyone can start working on any issue or as part of any team that interests them. Penpot shares this ethos. Anyone can collaborate! The code and a contributor guide are available on the project's Git repository. - -#### First - -Fedora adopts a strategy of advancing free software through consistent forward momentum. This approach usually follows a "release early, release often" workflow. Penpot also updates frequently. It publishes a Dev Diary blog to the community, highlighting the work that has been done. It states on its website, "We also have this sense of urgency, we need to act fast, there's too much at stake." - -### Wrap up - -The project is coming close to completion, with the first deadline aligning with the release of Fedora Linux 38. Penpot has proven to be a valuable tool and is expanding the resources available to Open Source Design enthusiasts. With the platform celebrating its official launch recently, it's exciting to see what's next. - -Penpot has changed the way the our team works. What can it do for your organization and community? - -This article has been adapted from the talk: _Mock-ups and Motions—How the Fedora Design Team uses Penpot_ by Ashlyn Knox and Emma Kidney, given at the Creative Freedom Summit. A recording of the talk is available to [watch on PeerTube][5]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/23/3/linux-penpot - -作者:[Emma Kidney][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/ekidney -[b]: https://github.com/lkxed/ -[1]: https://opensource.com/sites/default/files/2023-03/permissions.webp -[2]: https://opensource.com/sites/default/files/2023-03/asset-library.webp -[3]: https://opensource.com/sites/default/files/2023-03/exporting.webp -[4]: https://opensource.com/sites/default/files/2023-03/coding.webp -[5]: https://peertube.linuxrocks.online/w/5H22PH66kYwiTKcKR1p2kJ \ No newline at end of file diff --git a/translated/tech/20230330.1 ⭐️⭐️ 3 reasons my Linux team uses Penpot.md b/translated/tech/20230330.1 ⭐️⭐️ 3 reasons my Linux team uses Penpot.md new file mode 100644 index 0000000000..5fc7be6496 --- /dev/null +++ b/translated/tech/20230330.1 ⭐️⭐️ 3 reasons my Linux team uses Penpot.md @@ -0,0 +1,104 @@ +[#]: subject: "3 reasons my Linux team uses Penpot" +[#]: via: "https://opensource.com/article/23/3/linux-penpot" +[#]: author: "Emma Kidney https://opensource.com/users/ekidney" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +我的 Linux 团队使用 Penpot 的 3 个原因 +====== + +使用 Fedora 会让你接触到许多不同的开源软件。Fedora 网站的重大改造始于一年多前,目标是提高设计美感、创建风格指南、规划网站策略以及选择用于交付 Fedora Linux 产品网站的技术栈。从设计的角度来看,团队需要一个创建模型的工具、一个保存资源库的地方,以及完成后适合移交给开发人员的东西。 + +### 选择 Penpot + +Figma 是许多人推荐的流行界面设计工具,但由于该公司最近对其免费计划施加了限制,因此被认为不合适。这种担忧在 Adobe 收购 Figma 之前就已经出现,所以现在回想起来,不使用它的决定更加重要! + +团队研究了 Penpot,发现它符合每个人的要求。Penpot 是第一个面向跨领域团队的开源设计和原型平台。Kaleidos 内的一个团队创建了 Penpot。Kaleidos 是一家成立于 2011 年的科技公司,完全专注于开源项目。 + +Fedora 网站和应用程序团队通过三种方式使用 Penpot: + +- 线框图和模型 +- UX 测试和反馈 +- 协作 + +我将在下面详细介绍这些用途。虽然示例讨论了 Fedora 项目,但 Penpot 为任何开源社区带来了好处。 + +### 1. 线框和模型 + +起草网页设计是我们团队使用 Penpot 的主要方式。起草可以实现快速协作并减少贡献者之间的沟通问题。开发人员和设计师可以在同一空间自由协作。 + +社区反馈很重要。正确地共享模型可能有点困难。Penpot 基于网络,可在任何平台上轻松访问。当在原型上进入**查看模式**时,该工具会生成一个可共享的链接。如果你不再希望共享链接,还可以修改权限或销毁链接。 + +![Creating a shareable link and editing permissions on Penpot.][1] + +### 2. UX 测试和反馈 + +此次改造与 Fedora 社区密切合作。通过对原型进行可用性测试并共享设计进度,我们使用 Penpot 让社区参与每一步。 + +### 3. 协作 + +在改造过程中,我们的开发和设计团队使用 Penpot 来产生想法、组织会议并直观地测试新概念。 + +我们的团队在早期规划会议中将 Penpot 用作白板,让开发人员在参与讨论的同时以异步方式贡献想法。这种方法减轻了压力,确保每个人的想法都能被听到,帮助我们看到模式,并调解分歧,达成良好的妥协。Penpot 有助于在每个人之间建立一种理解感。 + +团队使用 Penpot 作为资产来源。用户可以将元素和其他内容存储在资源库中,以便可以重复使用它们。Penpot 可以存储组件、图形、版式、调色板等。 + +![An example of an asset library within Penpot.][2] + +共享这些库使整个团队都可以访问它们。当与定期访问相同源文件的团队合作时,这会很有帮助。如果新成员加入,他们开始为项目构建模型所需的所有资产都将随时可用。用户可以直接从 Penpot 文件导出这些资源。 + +![Exporting selected assets in a Penpot file.][3] + +开发人员可以在任何浏览器上查看原型的全部内容。这种功能让网站建设变得更容易,因为你可以与原型同时进行编码。如果设计人员同时在处理文件,他们所做的更改可以通过**查看模式**刷新查看,如果是在实际文件中,则可以实时查看。 + +![An editor with code and the Penpot interface.][4] + +### 开源价值观 + +Penpot 符合 Fedora 项目的“四大基础”:自由、朋友、功能和第一。在回顾这些价值观时,请考虑该工具如何与你自己的开源计划保持一致。 + +#### 自由 + +我们选择开源和免费替代专有代码和内容,并限制专有代码对项目和项目内的影响。Penpot 是第一个开源设计和原型平台。Penpot 基于网络,独立于操作系统,并采用开放网络标准。这确保了与 Web 浏览器和 Inkscape 等外部应用的兼容性。 + +#### 朋友 + +我的社区由各行各业的人们组成,他们共同努力推进自由软件的发展。Penpot 的使命是相似的。其目标是提供开源和开放标准工具,将设计人员和开发人员之间的协作提升到新的水平。使用 Penpot 可以顺利地向开发人员移交,并使我们能够高效地合作。无需来回寻找文件或资产,因为他们需要的一切都在 Penpot 文件中。 + +#### 功能 + +Fedora 关注优秀的软件。它的功能开发总是公开透明地进行,并鼓励参与。任何人都可以在任何问题上开始工作,也可以加入任何他们感兴趣的团队。Penpot 赞同这一理念。任何人都可以合作!代码和贡献者指南可从项目的 Git 仓库获取。 + +#### 第一 + +Fedora 采用的策略是通过持续的前进动力来推动自由软件的发展。这种方法通常遵循“早发布、勤发布”的工作流程。Penpot 也经常更新。它向社区发布每日开发博客,重点介绍已完成的工作。它在网站上写道:“我们也有这种紧迫感,我们需要快速行动,这关系到太多的事情”。 + +### 总结 + +该项目即将完成,第一个截止日期与 Fedora Linux 38 的发布日期一致。事实证明,Penpot 是一个非常有价值的工具,它为开源设计爱好者提供了更多的资源。最近,该平台庆祝了它的正式发布,下一步的发展令人兴奋。 + +Penpot 改变了我们团队的工作方式。它能为你的组织和社区做些什么? + +本文改编自 Ashlyn Knox 和 Emma Kidney 在创意自由峰会上的演讲:_模型和动作 - Fedora 设计团队如何使用 Penpot_。该演讲的录音可[在 PeerTube 上观看][5]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/23/3/linux-penpot + +作者:[Emma Kidney][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/ekidney +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/sites/default/files/2023-03/permissions.webp +[2]: https://opensource.com/sites/default/files/2023-03/asset-library.webp +[3]: https://opensource.com/sites/default/files/2023-03/exporting.webp +[4]: https://opensource.com/sites/default/files/2023-03/coding.webp +[5]: https://peertube.linuxrocks.online/w/5H22PH66kYwiTKcKR1p2kJ \ No newline at end of file From b4f605b48d572405369ffe4d2a19012eda42f9c0 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 8 Aug 2023 09:16:18 +0800 Subject: [PATCH 68/72] translating --- ...0721.1 ⭐️ Install and Use Additional Gedit Color Themes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20230721.1 ⭐️ Install and Use Additional Gedit Color Themes.md b/sources/tech/20230721.1 ⭐️ Install and Use Additional Gedit Color Themes.md index 721d5b8d7e..a4693fab84 100644 --- a/sources/tech/20230721.1 ⭐️ Install and Use Additional Gedit Color Themes.md +++ b/sources/tech/20230721.1 ⭐️ Install and Use Additional Gedit Color Themes.md @@ -2,7 +2,7 @@ [#]: via: "https://itsfoss.com/gedit-themes/" [#]: author: "Sreenath https://itsfoss.com/author/sreenath/" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " @@ -201,4 +201,4 @@ via: https://itsfoss.com/gedit-themes/ [30]: https://itsfoss.com/content/images/2023/07/Plastic-code-wrap.png [31]: https://itsfoss.com/content/images/2023/07/slate.png [32]: https://itsfoss.com/content/images/2023/07/Vibrant-fun.png -[33]: https://github.com:443/topics/gedit-theme +[33]: https://github.com:443/topics/gedit-theme From 8a16fdf2ecf97d40328c4eb27910c7af1266cbf8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 8 Aug 2023 11:36:39 +0800 Subject: [PATCH 69/72] RP @geekpi https://linux.cn/article-16074-1.html --- ...ow to Install GitLab on Ubuntu 22.04 20.04.md | 73 ++++++++++--------- 1 file changed, 40 insertions(+), 33 deletions(-) rename {translated/tech => published}/20230727.1 ⭐️ How to Install GitLab on Ubuntu 22.04 20.04.md (73%) diff --git a/translated/tech/20230727.1 ⭐️ How to Install GitLab on Ubuntu 22.04 20.04.md b/published/20230727.1 ⭐️ How to Install GitLab on Ubuntu 22.04 20.04.md similarity index 73% rename from translated/tech/20230727.1 ⭐️ How to Install GitLab on Ubuntu 22.04 20.04.md rename to published/20230727.1 ⭐️ How to Install GitLab on Ubuntu 22.04 20.04.md index 4452949d7a..9579052b22 100644 --- a/translated/tech/20230727.1 ⭐️ How to Install GitLab on Ubuntu 22.04 20.04.md +++ b/published/20230727.1 ⭐️ How to Install GitLab on Ubuntu 22.04 20.04.md @@ -3,27 +3,29 @@ [#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-16074-1.html" -如何在 Ubuntu 22.04|20.04 上安装 GitLab +如何在 Ubuntu 上安装 GitLab ====== +![][0] + GitLab 是一个开源平台,提供了强大且功能丰富的解决方案,用于管理仓库、问题、CI/CD 管道等。如果你是 Ubuntu 22.04 或 20.04 用户,并且想要设置自己的 [GitLab][1] 实例来简化你的 DevOps 工作流程,那么你来对地方了。 -本分步指南将引导你完成 Ubuntu 22.04 或 20.04 上 GitLab 的安装过程。GItlab 提供企业版 (Gitlab EE) 和社区版 (Gitlab CE)。在这篇文章中,我们将介绍社区版。 +本分步指南将引导你完成 Ubuntu 22.04 或 20.04 上 GitLab 的安装过程。GItlab 提供企业版(Gitlab EE)和社区版(Gitlab CE)。在这篇文章中,我们将介绍社区版。 -##### 先决条件 +先决条件: - 运行 Ubuntu 22.04 或 20.04 且具有 SSH 访问权限的虚拟或专用服务器。 -- 静态主机名(gitlab.linuxtechi.net) +- 静态主机名(`gitlab.linuxtechi.net`) - 具有管理员权限的 Sudo 用户 - 2GB 内存或更多 - 2 个或更多 vCPU - 互联网连接 -### 1) 更新系统包 +### 1、更新系统包 让我们首先更新软件包列表并将任何现有软件包升级到最新版本。 @@ -35,10 +37,10 @@ $ sudo apt upgrade -y 应用更新后重新启动系统。 ``` -$ sudo reboot. +$ sudo reboot ``` -### 2) 安装依赖项 +### 2、安装依赖项 GitLab 需要一些依赖项才能正常运行。使用以下命令安装它们: @@ -46,19 +48,19 @@ GitLab 需要一些依赖项才能正常运行。使用以下命令安装它们 $ sudo apt install -y curl openssh-server ca-certificates postfix ``` -在 postfix 安装过程中,会出现一个配置窗口。选择 “Internet 站点”并输入服务器的主机名作为邮件服务器名称。这将允许 GitLab 发送电子邮件通知。 +在 postfix 安装过程中,会出现一个配置窗口。选择 “Internet Site”并输入服务器的主机名作为邮件服务器名称。这将允许 GitLab 发送电子邮件通知。 ![][2] -选择 “Internet 站点”,然后选择 OK。 +选择 “Internet Site”,然后选择 “OK”。 ![][3] -检查系统的主机名并选择 OK。 +检查系统的主机名并选择 “OK”。 -### 3) 添加 GitLab Apt 存储库 +### 3、添加 GitLab Apt 存储库 -现在,我们将添加 GitLab 仓库,运行以下 curl 命令。它将自动检测你的 Ubuntu 版本并相应地设置仓库。 +现在,我们将添加 GitLab 仓库,运行以下 `curl` 命令。它将自动检测你的 Ubuntu 版本并相应地设置仓库。 ``` $ curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash @@ -66,7 +68,7 @@ $ curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/scr ![][4] -### 4) 安装 Gitlab +### 4、安装 Gitlab 运行以下命令在你的 ubuntu 系统上自动安装和配置 gitlab-ce,将服务器的主机名替换为你的设置, @@ -80,7 +82,7 @@ $ sudo EXTERNAL_URL="http://gitlab.linuxtechi.net" apt install gitlab-ce ![][6] -上面的输出确认 GitLab 已成功安装。gitlab web 界面的用户名是 root,密码存储在 “/etc/gitlab/initial_root_password” +上面的输出确认 GitLab 已成功安装。gitlab web 界面的用户名是 root,密码存储在 `/etc/gitlab/initial_root_password`。 注意:如果你的 ubuntu 系统上启用了操作系统防火墙,那请允许 80 和 443 端口。 @@ -89,37 +91,39 @@ $ sudo ufw allow http $ sudo ufw allow https ``` -### 5) 访问 GitLab Web 界面 +### 5、访问 GitLab Web 界面 安装并配置 GitLab 后,打开 Web 浏览器并输入服务器的 IP 地址或主机名。 +``` http:// +``` -- 用户名: root -- 密码: <<从 /etc/gitlab/initial_root_password 获取密码>> +- 用户名:`root` +- 密码:从 `/etc/gitlab/initial_root_password` 获取密码 ![][7] -点击“登录” +点击“登录Sign in”。 ![][8] 很好,上面确认我们已经成功登录 Gitlab Web 界面。 -目前我们的 GitLab 服务器运行在 http(80) 协议上,如果你想为你的 GitLab 启用 https,请参考以下步骤。 +目前我们的 GitLab 服务器运行在 http(80)协议上,如果你想为你的 GitLab 启用 https,请参考以下步骤。 -### 6) 为 GitLab Web 界面设置 HTTPS +### 6、为 GitLab Web 界面设置 HTTPS 为提高安全性,可使用自签名证书或 Let's Encrypt 为 GitLab 实例配置 HTTPS。Let's Encrypt 只适用于互联网上有 A 记录的公有域。但在本例中,我们使用的是私有域,因此将使用自签名证书来确保 GitLab 的安全。 -现在,让我们创建以下文件夹并使用 openssl 命令生成自签名证书: +现在,让我们创建以下文件夹并使用 `openssl` 命令生成自签名证书: ``` $ sudo mkdir -p /etc/gitlab/ssl $ sudo chmod 755 /etc/gitlab/ssl ``` -使用以下 openssl 命令生成私钥: +使用以下 `openssl` 命令生成私钥: ``` $ sudo openssl genrsa -des3 -out /etc/gitlab/ssl/gitlab.linuxtechi.net.key 2048 @@ -135,7 +139,7 @@ $ sudo openssl req -new -key /etc/gitlab/ssl/gitlab.linuxtechi.net.key -out /etc ![][9] -从密钥中删除 Passphrase,依次执行以下命令: +从密钥中删除密码串,依次执行以下命令: ``` $ sudo cp -v /etc/gitlab/ssl/gitlab.linuxtechi.net.{key,original} @@ -149,7 +153,7 @@ $ sudo rm -v /etc/gitlab/ssl/gitlab.linuxtechi.net.original $ sudo openssl x509 -req -days 1460 -in /etc/gitlab/ssl/gitlab.linuxtechi.net.csr -signkey /etc/gitlab/ssl/gitlab.linuxtechi.net.key -out /etc/gitlab/ssl/gitlab.linuxtechi.net.crt ``` -使用下面的 rm 命令删除 CSR 文件: +使用下面的 `rm` 命令删除 CSR 文件: ``` $ sudo rm -v /etc/gitlab/ssl/gitlab.linuxtechi.net.csr @@ -162,7 +166,7 @@ $ sudo chmod 600 /etc/gitlab/ssl/gitlab.linuxtechi.net.key $ sudo chmod 600 /etc/gitlab/ssl/gitlab.linuxtechi.net.crt ``` -Gitlab 服务器的所有重要配置均由文件 “/etc/gitlab/gitlab.rb” 控制,因此编辑此文件,搜索 “external_url” 并添加 “https://gitlab.linuxtechi.net” +Gitlab 服务器的所有重要配置均由文件 `/etc/gitlab/gitlab.rb` 控制,因此编辑此文件,搜索 `external_url` 并添加 `https://gitlab.linuxtechi.net`。 ``` $ sudo vi /etc/gitlab/gitlab.rb @@ -171,7 +175,7 @@ external_url 'https://gitlab.linuxtechi.net' ---------------------------------------------------------- ``` -保存并退出文件,使用下面的命令重新配置 gitlab,以便其 Web 界面可以使用 https。 +保存并退出文件,使用下面的命令重新配置 gitlab,以便其 Web 界面可以使用 HTTPS。 ``` $ sudo gitlab-ctl reconfigure @@ -179,16 +183,18 @@ $ sudo gitlab-ctl reconfigure ![][10] -成功执行上述命令后,你的 GitLab 界面应该可以通过 https 协议访问,在我的例子中,url 为:https://gitlab.linuxtechi.net/ +成功执行上述命令后,你的 GitLab 界面应该可以通过 HTTPS 协议访问,在我的例子中,URL 为:`https://gitlab.linuxtechi.net/` -当你第一次访问它时,它会说你的连接不安全,点击“接受风险并继续” +当你第一次访问它时,它会说你的连接不安全,点击“接受风险并继续”。 ![][11] -##### 结论 +### 结论 恭喜! 你已在 Ubuntu 22.04 或 20.04 系统上成功安装 GitLab。随着 GitLab 的启动和运行,你现在可以创建仓库,与你的团队协作,并通过 GitLab 令人印象深刻的功能增强你的开发工作流程。享受无缝版本控制、持续集成等,一切尽在你的掌控之中! +*(题图:MJ/c6a3e27e-fe58-4184-b133-9e9c67224316)* + -------------------------------------------------------------------------------- via: https://www.linuxtechi.com/how-to-install-gitlab-on-ubuntu/ @@ -196,7 +202,7 @@ via: https://www.linuxtechi.com/how-to-install-gitlab-on-ubuntu/ 作者:[Pradeep 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/) 荣誉推出 @@ -213,3 +219,4 @@ via: https://www.linuxtechi.com/how-to-install-gitlab-on-ubuntu/ [9]: https://www.linuxtechi.com/wp-content/uploads/2018/06/Generate-CSR-Self-Sign-Cert-Gitlab.png [10]: https://www.linuxtechi.com/wp-content/uploads/2018/06/Gitlab-reconfigured-Ubuntu.png [11]: https://www.linuxtechi.com/wp-content/uploads/2018/06/Gitlab-Web-Interface-over-Https-Ubuntu.png +[0]: https://img.linux.net.cn/data/attachment/album/202308/08/113049el2dx242c4mwm40k.jpg \ No newline at end of file From 25319bf11a8e74e59a7dea09eec9280c44065c83 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 9 Aug 2023 09:07:08 +0800 Subject: [PATCH 70/72] translated --- ...20230727.0 ⭐️⭐️ What is Compiz in Linux.md | 89 ------------------- ...20230727.0 ⭐️⭐️ What is Compiz in Linux.md | 89 +++++++++++++++++++ 2 files changed, 89 insertions(+), 89 deletions(-) delete mode 100644 sources/tech/20230727.0 ⭐️⭐️ What is Compiz in Linux.md create mode 100644 translated/tech/20230727.0 ⭐️⭐️ What is Compiz in Linux.md diff --git a/sources/tech/20230727.0 ⭐️⭐️ What is Compiz in Linux.md b/sources/tech/20230727.0 ⭐️⭐️ What is Compiz in Linux.md deleted file mode 100644 index 1d3292886d..0000000000 --- a/sources/tech/20230727.0 ⭐️⭐️ What is Compiz in Linux.md +++ /dev/null @@ -1,89 +0,0 @@ -[#]: subject: "What is Compiz in Linux?" -[#]: via: "https://itsfoss.com/compiz/" -[#]: author: "Bill Dyer https://itsfoss.com/author/bill/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -What is Compiz in Linux? -====== - -Today, we hear of people "[distro hopping][1]." Some of us may be guilty of it. It's hard to resist, trying out that new Linux distro with the new features. Even I am not immune, and I have a couple of laptops that I routinely try a new OS (or older if I'm feeling nostalgic) on. - -There was a time though, when distro hopping wasn't common as there were fewer distros in the beginning days of Linux. What many of us early users did instead was to play around with different window managers. - -![compiz - magic lamp effect - Courtesy of Wikimedia][2] - -[Compiz][3] was one of those window managers, released in 2006. It is one of the oldest compositing window managers for the [X Window System][4] and it was quite advanced for its day. Window managers aren't as popular as they once were, but Compiz is still maintained, still has remarkable performance and a large number of features. - -### What is Compiz? - -Compiz is an open-source [X window manager][5] that enables advanced visual effects and desktop enhancements. It provides a wide range of features, including window management, window decorations, desktop effects, animations, and much more, implemented as loadable plugins. Compiz can be used as a drop-in substitute for the default window managers and compositors of most other desktops. - -![compiz - burn effect - Courtesy of Wikimedia][6] - -### History of Compiz - -In its early stages, Compiz exclusively functioned with 3D hardware supported by [Xgl][7]. Most [NVIDIA][8] and [ATI][9] graphics cards were compatible with Compiz when used alongside Xgl. Starting from May 22, 2006, Compiz became compatible with the standard [X.Org Server][10] through the utilization of [AIGLX][11]. - -During the early 2000s, both [ATI][12] and [Nvidia][13] drivers became increasingly prevalent on Linux, which allowed advanced [OpenGL][14] development to extend beyond expensive UNIX workstations. Roughly during this same time, Xgl, Xegl, and AIGLX enabled Xorg to leverage OpenGL for window transformation and effects. - -Compiz, introduced by [Novell][15] ([SUSE][16]) as free software in February 2006, emerged as one of the pioneering compositing window managers for X. By March 2006, [Red Hat][17] ported Compiz to AIGLX. - -Early reviews of Compiz were mostly positive, lauding its performance, visual appeal, and innovative nature. Other projects such as Metisse and Project Looking Glass were developed at the same time, but none gained the same recognition or widespread adoption as Compiz. Later on, compositing effects were also integrated into window managers like [GNOME Shell][18] and [KWin][19]. - -The emergence of Wayland around 2010 merged the functionalities of the compositor and graphics server into a single program, making separate window managers and compositors obsolete. Because of this, Compiz isn't used much anymore, but that doesn't mean that its days are over. Distributions that continued to include Compiz typically enabled only a few practical plugins while disabling more visually extravagant ones. Additionally, distributions increasingly incorporated [KDE][20] and [GNOME][21] with their default window managers. The last version of Ubuntu to feature Compiz as the Unity desktop manager was Ubuntu 16.04, after which its development mostly stagnated. - -Compiz is still maintained, with two existing versions: Compiz 0.9 and Compiz 0.8. Compiz 0.9 is a C++ rewrite, while Compiz 0.8 continues to utilize the original C version. Ubuntu maintains and develops Compiz 0.9, whereas the package in Debian is the Compiz 0.8 "Reloaded" version. Both versions are similar, but the distinction lies in the level of plugin support, as the 0.9 rewrite had to exclude certain features. Compiz 0.8 is considered to be faster and more stable. - -### Conclusion - -Compiz, with all of its features and effects certainly kept me busy when I used it. I can remember spending an inordinate amount of time transforming my workspace in unique ways. As time went on, however, I found myself spending more and more time tinkering with Compiz rather than focusing on my work. While the allure of its visual spectacle was undeniable, it also became a source of distraction - the more I played with Compiz, the longer my unfinished tasks became. Eventually, I had to change window managers in order to get any work done. - -To me, Compiz holds a special place in the history of desktop environments - a testament to the ingenuity of its developers and the community that pushed technology to its limits. - -If you would like to see some of what Compiz can do, here is a video: [Compiz Fusion: A Quick Demonstration][22]. For "old code," it really could do a lot and was a bit ahead. - -![YouTube Video][22] - -By the way, if you are interested in retro stuff, I have written a couple of articles to take you down memory lane. - -I think you'll enjoy them. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/compiz/ - -作者:[Bill Dyer][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/bill/ -[b]: https://github.com/lkxed/ -[1]: https://itsfoss.com/distrohopping-issues/ -[2]: https://itsfoss.com/content/images/2023/07/Magic_Lamp_effect.png -[3]: https://code.launchpad.net/compiz -[4]: https://en.wikipedia.org/wiki/X_Window_System -[5]: https://en.wikipedia.org/wiki/X_window_manager -[6]: https://itsfoss.com/content/images/2023/07/Burn_effect.png -[7]: https://en.wikipedia.org/wiki/Xgl -[8]: https://en.wikipedia.org/wiki/NVIDIA -[9]: https://en.wikipedia.org/wiki/ATI_(brand) -[10]: https://en.wikipedia.org/wiki/X.Org_Server -[11]: https://en.wikipedia.org/wiki/AIGLX -[12]: https://en.wikipedia.org/wiki/ATI_Technologies -[13]: https://en.wikipedia.org/wiki/Nvidia -[14]: https://en.wikipedia.org/wiki/OpenGL -[15]: https://en.wikipedia.org/wiki/Novell -[16]: https://en.wikipedia.org/wiki/SUSE -[17]: https://en.wikipedia.org/wiki/Red_Hat -[18]: https://en.wikipedia.org/wiki/GNOME_Shell -[19]: https://en.wikipedia.org/wiki/KWin -[20]: https://en.wikipedia.org/wiki/KDE -[21]: https://en.wikipedia.org/wiki/GNOME -[22]: https://youtu.be/E4Fbk52Mk1w diff --git a/translated/tech/20230727.0 ⭐️⭐️ What is Compiz in Linux.md b/translated/tech/20230727.0 ⭐️⭐️ What is Compiz in Linux.md new file mode 100644 index 0000000000..21a1f8b5fd --- /dev/null +++ b/translated/tech/20230727.0 ⭐️⭐️ What is Compiz in Linux.md @@ -0,0 +1,89 @@ +[#]: subject: "What is Compiz in Linux?" +[#]: via: "https://itsfoss.com/compiz/" +[#]: author: "Bill Dyer https://itsfoss.com/author/bill/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Linux 中的 Compiz 是什么? +====== + +今天,我们听到人们谈论“[发行版跳跃][1]”。我们中的一些人可能对此深有感触。尝试具有新功能的新 Linux 发行版是很难抗拒的。即使我也不能幸免,我有几台笔记本电脑,我经常在上面尝试新的操作系统(如果我怀旧的话,可以尝试旧的操作系统)。 + +但曾经有一段时间,发行版跳跃并不常见,因为在 Linux 诞生之初,发行版较少。我们许多早期用户所做的就是使用不同的窗口管理器。 + +![compiz - magic lamp effect - Courtesy of Wikimedia][2] + +[Compiz][3] 是这些窗口管理器之一,于 2006 年发布。它是 [X Window 系统][4]最古老的合成窗口管理器之一,在当时相当先进。窗口管理器不再像以前那样流行,但 Compiz 仍然得到维护,仍然具有出色的性能和大量的功能。 + +### Compiz 是什么? + +Compiz 是一个开源 [X 窗口管理器][5],可实现高级视觉效果和桌面增强。它提供了广泛的功能,包括窗口管理、窗口装饰、桌面效果、动画等等,并以可加载插件的形式实现。Compiz 可以用作大多数其他桌面的默认窗口管理器和合成器的直接替代品。 + +![compiz - burn effect - Courtesy of Wikimedia][6] + +### Compiz 的历史 + +在其早期阶段,Compiz 专门与 [Xgl][7] 支持的 3D 硬件一起运行。大多数 [NVIDIA][8] 和 [ATI][9] 显卡与 Xgl 一起使用时与 Compiz 兼容。从 2006 年 5 月 22 日开始,Compiz 通过利用 [AIGLX][11] 与标准 [X.Org Server][10] 兼容。 + +在 2000 年代初期,[ATI][12] 和 [Nvidia][13] 驱动程序在 Linux 上变得越来越流行,这使得高级 [OpenGL][14] 开发能够扩展到昂贵的 UNIX 工作站之外。大约在同一时间,Xgl、Xegl 和 AIGLX 使 Xorg 能够利用 OpenGL 进行窗口转换和效果。 + +Compiz 于 2006 年 2 月由 [Novell][15] ([SUSE][16]) 作为免费软件推出,成为 X 的先驱合成窗口管理器之一。到 2006 年 3 月,[Red Hat][17] 移植了 Compiz 到 AIGLX。 + +Compiz 的早期评论大多是正面的,称赞其性能、视觉吸引力和创新性。Metisse 和 Project Looking Glass 等其他项目是同时开发的,但没有一个项目获得了与 Compiz 相同的认可或广泛采用。后来,合成效果也被集成到窗口管理器中,例如 [GNOME Shell][18] 和 [KWin][19]。 + +Wayland 于 2010 年左右出现,将合成器和图形服务器的功能合并到一个程序中,从而使单独的窗口管理器和合成器变得过时。因此,Compiz 不再被广泛使用,但这并不意味着它的时代已经结束。继续包含 Compiz 的发行版通常只启用一些实用的插件,同时禁用更多视觉上奢侈的插件。此外,发行版越来越多地将 [KDE][20] 和 [GNOME][21] 与其默认窗口管理器结合在一起。最后一个以 Compiz 作为 Unity 桌面管理器的 Ubuntu 版本是 Ubuntu 16.04,此后其开发基本陷入停滞。 + +Compiz 仍然得到维护,有两个现有版本:Compiz 0.9 和 Compiz 0.8。Compiz 0.9 是 C++ 重写,而 Compiz 0.8 继续使用原始 C 版本。Ubuntu 维护和开发 Compiz 0.9,而 Debian 中的软件包是 Compiz 0.8 “Reloaded”。两个版本都很相似,但区别在于插件支持的级别,因为 0.9 重写必须排除某些功能。Compiz 0.8 被认为更快、更稳定。 + +### 总结 + +Compiz 的所有功能和效果在我使用它时确实让我很忙。我记得我花费了大量的时间以独特的方式改造我的工作空间。然而,随着时间的推移,我发现自己花越来越多的时间在 Compiz 上修修补补,而不是专注于我的工作。虽然其视觉奇观的吸引力是不可否认的,但它也成为了分散注意力的来源:我玩 Compiz 的次数越多,我未完成的任务就越长。最终,我不得不更换窗口管理器才能完成工作。 + +对我来说,Compiz 在桌面环境的历史上占有特殊的地位。这证明了其开发人员和社区的独创性,将技术推向了极限。 + +如果你想了解 Compiz 的一些功能,请观看以下视频:[Compiz Fusion:快速演示][22]。对于“旧代码”来说,它确实可以做很多事情并且有点领先。 + +![YouTube 视频][22] + +顺便说一句,如果你对复古的东西感兴趣,我写了几篇文章来带你回忆起来。 + +我想你会喜欢它们的。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/compiz/ + +作者:[Bill Dyer][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://itsfoss.com/author/bill/ +[b]: https://github.com/lkxed/ +[1]: https://itsfoss.com/distrohopping-issues/ +[2]: https://itsfoss.com/content/images/2023/07/Magic_Lamp_effect.png +[3]: https://code.launchpad.net/compiz +[4]: https://en.wikipedia.org/wiki/X_Window_System +[5]: https://en.wikipedia.org/wiki/X_window_manager +[6]: https://itsfoss.com/content/images/2023/07/Burn_effect.png +[7]: https://en.wikipedia.org/wiki/Xgl +[8]: https://en.wikipedia.org/wiki/NVIDIA +[9]: https://en.wikipedia.org/wiki/ATI_(brand) +[10]: https://en.wikipedia.org/wiki/X.Org_Server +[11]: https://en.wikipedia.org/wiki/AIGLX +[12]: https://en.wikipedia.org/wiki/ATI_Technologies +[13]: https://en.wikipedia.org/wiki/Nvidia +[14]: https://en.wikipedia.org/wiki/OpenGL +[15]: https://en.wikipedia.org/wiki/Novell +[16]: https://en.wikipedia.org/wiki/SUSE +[17]: https://en.wikipedia.org/wiki/Red_Hat +[18]: https://en.wikipedia.org/wiki/GNOME_Shell +[19]: https://en.wikipedia.org/wiki/KWin +[20]: https://en.wikipedia.org/wiki/KDE +[21]: https://en.wikipedia.org/wiki/GNOME +[22]: https://youtu.be/E4Fbk52Mk1w From 9af936d69c59ff1d2c249e325e6123de9b26b384 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 9 Aug 2023 09:24:34 +0800 Subject: [PATCH 71/72] translating --- ...kin language bridges the gap between customers and developers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20230207.3 ⭐️ How the Gherkin language bridges the gap between customers and developers.md b/sources/talk/20230207.3 ⭐️ How the Gherkin language bridges the gap between customers and developers.md index a07e80a09d..a13777817d 100644 --- a/sources/talk/20230207.3 ⭐️ How the Gherkin language bridges the gap between customers and developers.md +++ b/sources/talk/20230207.3 ⭐️ How the Gherkin language bridges the gap between customers and developers.md @@ -2,7 +2,7 @@ [#]: via: "https://opensource.com/article/23/2/gherkin-language-developers" [#]: author: "David Blackwood https://opensource.com/users/david-blackwood" [#]: collector: "lkxed" -[#]: translator: " " +[#]: translator: "geekpi" [#]: reviewer: " " [#]: publisher: " " [#]: url: " " From 124b4ff04c1da7545b24d240b560fa682b3a9321 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 9 Aug 2023 10:52:33 +0800 Subject: [PATCH 72/72] RP @geekpi https://linux.cn/article-16076-1.html --- ... GNOME’s Ambitious Window Management Overhaul.md | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) rename {translated/tech => published}/20230728.1 ⭐️⭐️ GNOME’s Ambitious Window Management Overhaul.md (74%) diff --git a/translated/tech/20230728.1 ⭐️⭐️ GNOME’s Ambitious Window Management Overhaul.md b/published/20230728.1 ⭐️⭐️ GNOME’s Ambitious Window Management Overhaul.md similarity index 74% rename from translated/tech/20230728.1 ⭐️⭐️ GNOME’s Ambitious Window Management Overhaul.md rename to published/20230728.1 ⭐️⭐️ GNOME’s Ambitious Window Management Overhaul.md index de1bad7adc..7208ed763f 100644 --- a/translated/tech/20230728.1 ⭐️⭐️ GNOME’s Ambitious Window Management Overhaul.md +++ b/published/20230728.1 ⭐️⭐️ GNOME’s Ambitious Window Management Overhaul.md @@ -3,18 +3,20 @@ [#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-16076-1.html" GNOME 雄心勃勃的窗口管理改革 ====== -**厌倦了窗口混乱和手动调整? GNOME 正在集体讨论一个自动化且用户友好的窗口管理系统。这是你需要了解的一切。** +![][0] +> 厌倦了窗口混乱和手动调整? GNOME 正在集体讨论一个自动化且用户友好的窗口管理系统。这是你需要了解的情况。 + 窗口管理是桌面计算的一个重要方面,几十年来一直是人们着迷和探索的话题。然而,尽管进行了多次尝试,仍然没有人能够破解完美的窗口管理解决方案的密码。GNOME 开发人员现在开始致力于彻底改变窗口管理,旨在提高生产力和用户体验。 -GNOME 开发人员 Tobias Bernard 发表了一篇[详细文章][1],介绍了开发人员如何考虑为未来创新 GNOME 桌面。 +GNOME 开发人员 Tobias Bernard 发表了一篇 [详细的文章][1],介绍了开发人员如何考虑为未来创新 GNOME 桌面。 ### 传统窗口系统的挑战 @@ -22,9 +24,9 @@ GNOME 开发人员 Tobias Bernard 发表了一篇[详细文章][1],介绍了 多年来,各种操作系统引入了工作区、任务栏和切换器等解决方法来处理这些问题。然而,窗口管理的核心问题仍未解决。特别是对于儿童和老年人等计算机新手来说,手动排列窗口可能会很麻烦且乏味。 -### 平铺窗口管理器简介 +### 引入平铺窗口管理器 -平铺窗口管理器通过防止窗口重叠提供了替代解决方案。虽然它们在某些情况下运行良好,但也有其局限性。平铺窗口可能会导致效率低下,因为应用通常是针对特定尺寸和纵横比设计的。此外,这些管理者缺乏关于窗口内容和上下文的知识,导致额外的手动调整并违背了简化工作流程的目的。更不用说记住很多键盘快捷键了。 +平铺窗口管理器提供了防止窗口重叠的替代解决方案。虽然它们在某些情况下运行良好,但也有其局限性。平铺窗口可能会导致效率低下,因为应用通常是针对特定尺寸和纵横比设计的。此外,这些窗口管理器缺乏关于窗口内容和上下文的知识,需要额外的手动调整,并违背了简化工作流程的目的。更不用说记住很多键盘快捷键了。 ### GNOME 当前的平铺功能 @@ -34,7 +36,7 @@ GNOME 已经在 GNOME 3 系列中尝试了基本的平铺功能。然而,现 该团队提出了一种新的窗口管理方法,重点关注符合用户期望和需求的自动化系统。他们的概念涉及窗口的三种潜在布局状态:马赛克、边缘平铺和浮动。 -马赛克将成为默认行为,根据用户偏好和可用屏幕空间智能定位窗口并调整窗口大小。随着新窗口的打开,现有窗口将进行调整以适应新来者。如果窗口不适合当前布局,它将被放置在自己的工作区中。当屏幕接近满时,窗口将自动平铺。 +马赛克模式将成为默认行为,根据用户偏好和可用屏幕空间智能定位窗口并调整窗口大小。随着新窗口的打开,现有窗口将进行调整以适应新来者。如果窗口不适合当前布局,它将被放置在自己的工作区中。当屏幕接近布满时,窗口将自动平铺。 用户还可以通过将窗口拖动到现有窗口或空白区域上来手动平铺窗口。该系统提供了灵活性和便利性,使其更容易高效地执行多任务。 @@ -50,7 +52,7 @@ GNOME 已经在 GNOME 3 系列中尝试了基本的平铺功能。然而,现 ### 维护用户友好的浮动窗口 -虽然平铺提供了多种好处,但 GNOME 开发人员明白,总会有用户更喜欢手动定位窗口的情况。因此,经典的浮动行为仍然适用于这些特定情况,但随着新马赛克系统的引入,它可能不太常见。 +虽然平铺提供了多种好处,但 GNOME 开发人员明白,总会有用户更喜欢手动定位窗口的情况。因此,经典的浮动行为仍然适用于这些特定情况,但随着新的马赛克系统的引入,它可能不太常见。 ### 利用窗口元数据增强性能 @@ -60,9 +62,11 @@ GNOME 旨在优化平铺体验,以从窗口收集有关其内容的更多信 虽然 GNOME 开发人员对这个新的窗口管理方向感到兴奋,但他们也承认与这种新颖方法相关的风险。他们计划进行用户研究以验证他们的假设并完善交互。尽管没有具体的实施时间表,但该项目可能会跨越多个开发周期,并成为 GNOME 46 或更高版本的一部分。 -截至发布此内容时,还没有草稿合并请求,你可以参与其中并提供反馈。 +截至发布此内容时,还没有草案合并请求,你可以参与其中并提供反馈。 -_来自 [Tobias 的博客][1]_ +参考自 [Tobias 的博客][1]。 + +*(题图:MJ/04285b09-a074-4f6f-a32e-ae5af06f1d1f)* -------------------------------------------------------------------------------- @@ -71,7 +75,7 @@ via: https://debugpointnews.com/gnome-window-management-proposal/ 作者:[arindam][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/) 荣誉推出 @@ -83,3 +87,4 @@ via: https://debugpointnews.com/gnome-window-management-proposal/ [4]: https://debugpointnews.com/wp-content/uploads/2023/07/mosaic-vertical-tile.webm [5]: https://debugpointnews.com/wp-content/uploads/2023/07/mosaic-tile2.webm [6]: https://debugpointnews.com/wp-content/uploads/2023/07/mosaic-tile3.webm +[0]: https://img.linux.net.cn/data/attachment/album/202308/09/104949la7f2nqen7qq2ftt.jpg \ No newline at end of file