Merge pull request #3 from LCTT/master

merge before ThirdTrans PR
This commit is contained in:
CanYellow 2022-12-17 16:38:10 +08:00 committed by GitHub
commit 80007595ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 1743 additions and 1383 deletions

View File

@ -3,29 +3,32 @@
[#]: author: "Anamika https://opensource.com/users/anamika"
[#]: collector: "lkxed"
[#]: translator: "cool-summer-021"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15352-1.html"
5 分钟内了解 OSI 模型
======
理解OSI框架的基本概念掌握计算机系统通信机制
开放系统互联OSI模型是一个定义计算机、服务器和用户如何在一个系统内通信的标准。它是第一个网络通信标准模型在20世纪80年代早期所有主流的计算机和通信公司都采用了这个标准。
![][0]
OSI 模型提供了一种通用语言,用于描述网络,以及在离散的块或层中考虑相关的问题
> 理解 OSI 框架的基本概念,掌握计算机系统通信机制
### OSI模型的各个层
<ruby>开放系统互联<rt>Open Systems Interconnection</rt></ruby>OSI模型是一个定义计算机、服务器和用户如何在一个系统内通信的标准。它是第一个网络通信标准模型在上世纪 80 年代早期,所有主流的计算机和通信公司都采用了这个标准。
OSI 模型提供了一种用于描述网络的通用语言,并以离散的块或层的方式来描述。
### OSI 模型的各个层
该模型描述了计算机系统通过网络进行通信的七个层。
1. [应用层][2]
2. [表现层][3]
3. [会话层][4]
4. [传输层][5]
5. [网络层][6]
6. [数据链路层][7]
7. [物理层][8]
- 7 应用层
- 6 表示层
- 5 会话层
- 4 传输层
- 3 网络层
- 2 数据链路层
- 1 物理层
每个层都有自己的工作方式和一系列跟其他层不同的协议。本文将逐个剖析这些层级。
@ -33,15 +36,15 @@ OSI 模型提供了一种通用语言,用于描述网络,以及在离散的
应用层是在软件中实现的。它是与应用程序交互的层级。
考虑发送消息的例子。发送消息的程序与应用层进行交互,并发送消息。接着,应用层向 OSI 模型的下一个层级(即表层)发送消息。
用发送消息作为例子。发送消息的程序与应用层进行交互,并发送消息。接着,应用层向 OSI 模型的下一个层级(即表层)发送消息。
### 表
### 表
来自应用层的数据被转发到表现层。表现层接收到文字、字符、字母、数字等形式的数据,并把它们转换为机器可识读的二进制格式数据。这个过程叫做编译。
来自应用层的数据被转发到表示层。表示层接收到文字、字符、字母、数字等形式的数据,并把它们转换为机器可识读的二进制格式数据。这个过程叫做编译。
在此阶段ASCII美国信息交换标准码 字符被转换为扩充的二进制编码的十进制交换码EBCDIC。转换后的数据在继续传输前也会进行编码和加密过程使用SSL协议进行加密和解密。
在此阶段ASCII美国信息交换标准码字符被转换为扩充的二进制编码的十进制交换码EBCDIC。转换后的数据在继续传输前也会进行编码和加密过程使用 SSL 协议进行加密和解密。
层的作用是抽象化,它假设下面的层级会处理它们收到的数据。它也负责压缩数据。数据的压缩可能是有损的,也有可能是无损的,这取决于很多因素,不属于本文的讨论范围。
层的作用是抽象化,它假设下面的层级会处理它们收到的数据。它也负责压缩数据。数据的压缩可能是有损的,也有可能是无损的,这取决于很多因素,不属于本文的讨论范围。
### 会话层
@ -51,9 +54,9 @@ OSI 模型提供了一种通用语言,用于描述网络,以及在离散的
### 传输层
传输层的作用是管理数据传输和其自身的关于数据如何传输的一些协议。从会话层传到这里的数据被分为更小的数据单元,这些数据单元称为片段。这个过程叫做“分”。每个片段包含来源端口号、目标端口号和一个序列号。端口号用来识别发送数据的应用程序。注意,数据以块的形式传输。序列号用于把这些片段按正确的顺序排列。
传输层的作用是管理数据传输和其自身的关于数据如何传输的一些协议。从会话层传到这里的数据被分为更小的数据单元,这些数据单元称为片段。这个过程叫做“分”。每个片段包含来源端口号、目标端口号和一个序列号。端口号用来识别发送数据的应用程序。注意,数据以块的形式传输。序列号用于把这些片段按正确的顺序排列。
传输层负责控制流量或在给定的时间内传输的数据量。它也负责错误的管理,比如数据丢失、损坏等情况。它利用一种错误探测值,通常叫做校验和。传输层对每个数据片段加上校验和,就可以检查所发送的数据是否被正确接收。然后数据传输到网络层。
传输层负责控制流量或在给定的时间内传输的数据量。它也负责错误控制,比如数据丢失、损坏等情况。它利用一种错误检测值,通常叫做校验和。传输层对每个数据片段加上校验和,就可以检查所发送的数据是否被正确接收。然后数据传输到网络层。
### 网络层
@ -84,7 +87,7 @@ via: https://opensource.com/article/22/10/osi-model-network-communications
作者:[Anamika][a]
选题:[lkxed][b]
译者:[cool-summer-021](https://github.com/cool-summer-021)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
@ -98,3 +101,4 @@ via: https://opensource.com/article/22/10/osi-model-network-communications
[6]: https://opensource.com/article/22/10/osi-model-network-communications#network-layer
[7]: https://opensource.com/article/22/10/osi-model-network-communications#data-link-layer
[8]: https://opensource.com/article/22/10/osi-model-network-communications#physical-layer
[0]: https://img.linux.net.cn/data/attachment/album/202212/16/092612etn6gwaecb91bweg.jpg

View File

@ -3,26 +3,30 @@
[#]: author: "Marty Kalin https://opensource.com/users/mkalindepauledu"
[#]: collector: "lkxed"
[#]: translator: "yzuowei"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15353-1.html"
介绍从 Rust 调用 C 库函数
从 Rust 调用 C 库函数
======
为什么要从 Rust 调用 C 函数?简短的回答就是软件库。冗长的答案则触及到 C 在众多编程语言中的地位,特别是相对 Rust 而言。CC++,还有 Rust 都是系统语言这意味着程序员会访问机器层面的数据类型与操作。在这三个系统语言中C 依然占据主导地位。现代操作系统的内核大致用 C 来写,其余部分依靠汇编语言来补充。在标准系统函数库中,输入与输出、数字处理、加密计算、安全、网络、国际化、字符串处理、内存管理,还用更多,都大体用 C 来写。这些函数库所代表的是一个庞大的基础架构支撑着用其他语言写出来的应用。Rust 发展至今也有着可观的函数库,但是 C 的函数库——自1970年代就已存在迄今还在蓬勃发展——是一个无法被忽视的资源。最后一点是 C 依然还是编程语言中的 [lingua franca][1]:大部分语言都与 C 交流,透过 C语言互相交流。
![][0]
> Rust FFI 和 bindgen 工具是为 Rust 调用 C 库而设计的。Rust 很容易与 C 语言对话,从而与任何其它可以与 C 语言对话的语言对话。
为什么要从 Rust 调用 C 函数?简短的答案就是软件库。冗长的答案则触及到 C 在众多编程语言中的地位,特别是相对 Rust 而言。C、C++,还有 Rust 都是系统语言这意味着程序员可以访问机器层面的数据类型与操作。在这三个系统语言中C 依然占据主导地位。现代操作系统的内核主要是用 C 来写的,其余部分依靠汇编语言补充。在标准系统函数库中,输入与输出、数字处理、加密计算、安全、网络、国际化、字符串处理、内存管理等等,大多都是用 C 来写的。这些函数库所代表的是一个庞大的基础设施支撑着用其他语言写出来的应用。Rust 发展至今也有着可观的函数库,但是 C 的函数库 —— 自 1970 年代就已存在,迄今还在蓬勃发展 —— 是一种无法被忽视的资源。最后一点是C 依然还是编程语言中的 [通用语][1]:大部分语言都可以与 C 交流,透过 C语言之间可以互相交流。
### 两个概念证明的例子
Rust 支持 FFI (外部函数接口)用以调用 C 函数。任何 FFI 所需要面临的问题是调用方语言是否包括了被调用语言的数据类型。例如,`ctypes` 是 Python 调用 C 的 FFI但是 Python 并没有包括 C 所支持的无符号整数类型。结果就是,`ctypes` 必须寻求解决方案。
Rust 支持 FFI<ruby>外部函数接口<rt>Foreign Function Interface</rt></ruby>)用以调用 C 函数。任何 FFI 所需要面临的问题是调用方语言是否涵盖了被调用语言的数据类型。例如,`ctypes` 是 Python 调用 C 的 FFI但是 Python 并没有包括 C 所支持的无符号整数类型。结果就是,`ctypes` 必须寻求解决方案。
与之相对的是Rust 包含了所有 C 中的原始机器层面类型。比如说Rust 中的 `i32` 类对应 C 中的 `int` 类。C 特别声明了 `char` 类必须是一个字节大小,而其他类型,比如 `int`必须至少是这个大小LCTT 译注:原文处有评论指出 `int` 大小依照 C 标准应至少为2字节然而如今所有合理的 C 编译器都支持四字节的 `int`,以及八字节的 `double`Rust 中则是 `f64` 类),以此类推。
相比之下Rust 包含了所有 C 中的原始机器层面类型。比如说Rust 中的 `i32` 类对应 C 中的 `int` 类。C 特别声明了 `char` 类必须是一个字节大小,而其他类型,比如 `int`必须至少是这个大小LCTT 译注:原文处有评论指出 `int` 大小依照 C 标准应至少为 2 字节);然而如今所有合理的 C 编译器都支持四字节的 `int`,以及八字节的 `double`Rust 中则是 `f64` 类),以此类推。
面向 C 的 FFI 所面临的另一个挑战是FFI 是否能够处理 C 的裸指针包括指向被看作是字符串的数组指针。C 没有字符串类型,它通过结合字符组和一个不会被打印的终止符来实现字符串大名鼎鼎的_空终止符_。与之相对Rust 有两个字符串类型:`String` 和 `&str` 字符串切片。问题是Rust FFI 是否能将 C 字符串转化成 Rust 字符串——答案是_肯定的_。
针对 C 的 FFI 所面临的另一个挑战是FFI 是否能够处理 C 的裸指针包括指向被看作是字符串的数组指针。C 没有字符串类型,它通过结合字符组和一个非打印终止符(大名鼎鼎的 _空终止符_)来实现字符串。相比之下Rust 有两个字符串类型:`String` 和 `&str` 字符串切片。问题是Rust FFI 是否能将 C 字符串转化成 Rust 字符串——答案是 _肯定的_
出于对效率的追求,结构体指针在 C 中也很常见。一个 C 结构体在作为一个函数的参数或者返回值的时候,其默认行为是传递值(即,一个字节一个字节的复制。C 结构体,如同它在 Rust 中的对应部分一样,可以包含数组和嵌套其他结构体,所以其大小是不定的。结构体在两种语言中的最佳用法是传递或返回引用,也就是说,传递或返回结构体的地址而不是结构体本身的复制。Rust 再一次成功处理了 C 的结构体指针,其在 C 函数库中十分普遍。
出于对效率的追求,结构体指针在 C 中也很常见。一个 C 结构体在作为一个函数的参数或者返回值的时候,其默认行为是传递值(即,逐字节复制。C 结构体,如同它在 Rust 中的对应部分一样,可以包含数组和嵌套其他结构体,所以其大小是不定的。结构体在两种语言中的最佳用法是传递或返回引用,也就是说,传递或返回结构体的地址而不是结构体本身的副本。Rust FFI 再一次成功处理了 C 的结构体指针,其在 C 函数库中十分普遍。
第一段代码案例专注于调用相对简单的 C 库函数,比如 `abs`(绝对值)和 `sqrt`(平方根)。这些函数使用非指针标量参数并返回一个非指针标量值。第二段代码案例则涉及了字符串和结构体指针,在这里会介绍工具 [bindgen][2],其通过 C 接口(头文件生成 Rust 代码,比如 `math.h` 以及 `time.h`。C 头文件声明了 C 函数的调用语法并定义了会被调用的结构体。两段代码都能在[我的主页上][3]找到。
第一段代码案例专注于调用相对简单的 C 库函数,比如 `abs`(绝对值)和 `sqrt`(平方根)。这些函数使用非指针标量参数并返回一个非指针标量值。第二段代码案例则涉及了字符串和结构体指针,在这里会介绍工具 [bindgen][2],其通过 C 接口(头文件生成 Rust 代码,比如 `math.h` 以及 `time.h`。C 头文件声明了 C 函数的调用语法并定义了会被调用的结构体。两段代码都能在 [我的主页上][3] 找到。
### 调用相对简单的 C 函数
@ -56,9 +60,9 @@ fn main() {
}
```
顶部的两个 `use` 声明是 Rust 的数据类型 `c_int``c_double`,对应 C 类型里的 `int``double`。Rust 标准模块 `std::os::raw` 定义了十四个类似的类型以确保跟 C 的兼容性。模块 `std::ffi` 中有十四个同样的类型定义以及对字符串的支持。
顶部的两个 `use` 声明是 Rust 的数据类型 `c_int``c_double`,对应 C 类型里的 `int``double`。Rust 标准模块 `std::os::raw` 定义了 14 个类似的类型以确保跟 C 的兼容性。模块 `std::ffi` 中有 14 个同样的类型定义,以及对字符串的支持。
位于 `main` 函数上的 `extern "C"` 区域声明了个 C 库函数,这些函数会在 `main` 函数内被调用。每次调用都使用了标准的 C 函数名,但每次调用都必须发生在一个 `unsafe` 区域内。正如每个新接触 Rust 的程序员所发现的那样Rust 编译器极度强制内存安全。其他语言(特别是 C 和 C++)作不出相同的保证。`unsafe` 区域其实是说Rust 对外部调用中可能存在的不安全行为不负责。
位于 `main` 函数上的 `extern "C"` 区域声明了 3 个 C 库函数,这些函数会在 `main` 函数内被调用。每次调用都使用了标准的 C 函数名,但每次调用都必须发生在一个 `unsafe` 区域内。正如每个新接触 Rust 的程序员所发现的那样Rust 编译器极度强制内存安全。其他语言(特别是 C 和 C++)作不出相同的保证。`unsafe` 区域其实是说Rust 对外部调用中可能存在的不安全行为不负责。
第一个程序输出为:
@ -69,13 +73,13 @@ fn main() {
-3.14的平方根是: NaN.
```
输出的最后一行的 `NaN` 表示不是数字 (Not a Number)C 库函数 `sqrt` 期待一个非负值作为参数,这使得参数-3.14生成了 `NaN` 作为返回值。
输出的最后一行的 `NaN` 表示<ruby>不是数字<rt>Not a Number</rt></ruby>C 库函数 `sqrt` 期待一个非负值作为参数,这使得参数 `-3.14` 生成了 `NaN` 作为返回值。
### 调用涉及指针的 C 函数
C 库函数为了提高效率经常在安全、网络、字符串处理、内存管理,以及其他领域中使用指针。例如,库函数 `asctime`时间作为 ASCII 字符串期待一个结构体指针作为其参数。Rust 调用类似 `asctime` 的 C 函数就会比调用 `sqrt` 要更加棘手一些,后者既没有牵扯到指针,也不涉及到结构体。
C 库函数为了提高效率经常在安全、网络、字符串处理、内存管理,以及其他领域中使用指针。例如,库函数 `asctime`ASCII 字符串形式的时间期待一个结构体指针作为其参数。Rust 调用类似 `asctime` 的 C 函数就会比调用 `sqrt` 要更加棘手一些,后者既没有牵扯到指针,也不涉及到结构体。
函数 `asctime` 调用的 C 结构体类型为 `struct tm`。一个指向此结构体的指针会作为参数被传递给库函数 `mktime`(时间作为值)。此结构体会将时间拆分成诸如年、月、小时之类的单位。此结构体的字段 (fields) 类型为 `time_t`,是 `int`32位`long`64位的异名。两个库函数将这些破碎的时间碎片组合成了一个单一值`asctime` 返回一个字符串用以表达时间,而 `mktime` 返回一个 `time_t` 值表示自 [_epoch_][4],即系统时钟和时间戳被决定的那一刻,以来所经历的秒数。典型的 epoch 设置为1900年或1970年1月1日0时0分0秒。
函数 `asctime` 调用的 C 结构体类型为 `struct tm`。一个指向此结构体的指针会作为参数被传递给库函数 `mktime`(时间作为值)。此结构体会将时间拆分成诸如年、月、小时之类的单位。此结构体的<ruby>字段<rt>field</rt></ruby>类型为 `time_t`,是 `int`32位`long`64 位)的别名。两个库函数将这些破碎的时间片段组合成了一个单一值:`asctime` 返回一个以字符串表示的时间,而 `mktime` 返回一个 `time_t` 值表示自 “<ruby>[纪元][4]<rt>Epoch</rt></ruby> 以来所经历的秒数,这是一个系统的时钟和时间戳的相对时间。典型的纪元设置为 1900 年或 1970 年1 月 1 日 0 时 0 分 0 秒。LCTT 校注Unix、Linux 乃至于如今所有主要的计算机和网络的时间纪元均采用 1970 年为起点。)
以下的 C 程序调用了 `asctime``mktime`,并使用了其他库函数 `strftime` 来将 `mktime` 的返回值转化成一个格式化的字符串。这个程序可被视作 Rust 对应版本的预热:
@ -93,8 +97,8 @@ int main () {
sometime.tm_hour = 1;
sometime.tm_mday = 1;
sometime.tm_mon = 1;
sometime.tm_year = 1;
sometime.tm_hour = 1; /*LCTT 译注:这里作者多敲了一行*/
sometime.tm_year = 1; /*LCTT 校注:注意,相对于 1900 年的年数*/
sometime.tm_hour = 1;
sometime.tm_wday = 1;
sometime.tm_yday = 1;
@ -102,11 +106,11 @@ int main () {
utc = mktime(&sometime);
if( utc < 0 ) {
fprintf(stderr, "错误: mktime 无法生成时间\n");
fprintf(stderr, "错误: mktime 无法生成时间\n");
} else {
printf("返回的整数值: %d\n", utc);
strftime(buffer, sizeof(buffer), "%c", &sometime);
printf("更加可读的版本: %s\n", buffer);
printf("返回的整数值: %d\n", utc);
strftime(buffer, sizeof(buffer), "%c", &sometime);
printf("更加可读的版本: %s\n", buffer);
}
return 0;
@ -121,19 +125,19 @@ int main () {
更加可读的版本: Fri Feb  1 01:01:01 1901
```
LCTT 译注:如果你尝试在自己电脑上运行这段代码,然后得到了一行关于 `mktime` 的错误信息,然后又在网上随便找了个在线 C 编译器,复制代码然后得到了跟这里的结果有区别但是没有错误的结果,不要慌,我的电脑上也是这样的。导致本地机器上 `mktime` 失败的原因是作者没有设置 `tm_isdst`,这个是用来标记夏令时的 flag。[`tm_isdst` 大于零则夏令时生效中,等于零则不生效,小于零标记未知][5]。加入 `sometime.tm_isdst = 0``= -1` 后应该就能得到跟在线编译器大致一样的结果。不同的地方在于结果第一行我得到的是 `Mon Feb ...`,这个与作者代码中 `sometime.tm_wday = 1` 对应,这里因该是作者写错了;第二行我和作者和网上得到的数字都不一样,这大概是合理的,因为这与机器的 epoch 有关第三行我跟作者的结果是一样的1901年2月1日也确实是周五这是因为 [`mktime` 其实会修正时间参数中不合理的地方][6]。至于夏令时具体是如何影响 `mktime` 这个问题,我能查到的只有 `mktime` 的计算受时区影响,更底层的原因我也不知道了。)
LCTT 译注:如果你尝试在自己电脑上运行这段代码,然后得到了一行关于 `mktime` 的错误信息,然后又在网上随便找了个在线 C 编译器,复制代码然后得到了跟这里的结果有区别但是没有错误的结果,不要慌,我的电脑上也是这样的。导致本地机器上 `mktime` 失败的原因是作者没有设置 `tm_isdst`,这个是用来标记夏令时的标志。[`tm_isdst` 大于零则夏令时生效中,等于零则不生效,小于零标记未知][5]。加入 `sometime.tm_isdst = 0``= -1` 后应该就能得到跟在线编译器大致一样的结果。不同的地方在于结果第一行我得到的是 `Mon Feb ...`,这个与作者代码中 `sometime.tm_wday = 1` 对应,这里应该是作者**写错了**;第二行我和作者和网上得到的数字都不一样,这大概是合理的,因为这与机器的纪元有关第三行我跟作者的结果是一样的1901 2 1 日也确实是周五,这是因为 [`mktime` 其实会修正时间参数中不合理的地方][6]。至于夏令时具体是如何影响 `mktime` 这个问题,我能查到的只有 `mktime` 的计算受时区影响,更底层的原因我也不知道了。)
总的来说Rust 在调用库函数 `asctime``mktime` 时,必须处理以下两个问题:
- 将裸指针作为唯一参数传递给每个库函数。
- 把从 `asctime` 返回的 C 字符串转化为 Rust 字符串。
### Rust 调用 `asctime` `mktime`
### Rust 调用 asctime 和 mktime
工具 `bindgen` 会根据类似 `math.h``time.h` 之类的 C 头文件生成 Rust 支持的代码。下面这个简化版的 `time.h` 就可以用来做例子,简化版与原版主要有两个不同:
- 内置类型 `int` 被用来取代名类型 `time_t`。工具 bindgen 可以处理 `time_t` 类但是会生成一些烦人的警告,因为 `time_t` 不符合 Rust 的命名规范:`time_t` 以下划线区分 `time``t`Rust 更偏好驼峰式命名方法,比如 `TimeT`
- 出于同样的原因,这里选择 `StructTM` 作为 `struct tm`名。
- 内置类型 `int` 被用来取代名类型 `time_t`。工具 bindgen 可以处理 `time_t`但是会生成一些烦人的警告,因为 `time_t` 不符合 Rust 的命名规范:`time_t` 以下划线区分 `time``t`Rust 更偏好驼峰式命名方法,比如 `TimeT`
- 出于同样的原因,这里选择 `StructTM` 作为 `struct tm`名。
以下是一份简化版的头文件,`mktime` 和 `asctime` 在文件底部:
@ -154,7 +158,7 @@ extern int mktime(StructTM*);
extern char* asctime(StructTM*);
```
`bindgen` 安装好后,`%` 作为命令行提示,`mytime.h` 作为以上提到的头文件,以下命令可以生成所需的 Rust 代码并将其保存到文件 `mytime.rs`
`bindgen` 安装好后,`mytime.h` 作为以上提到的头文件,以下命令`%` 是命令行提示符)可以生成所需的 Rust 代码并将其保存到文件 `mytime.rs`
```
% bindgen mytime.h > mytime.rs
@ -201,9 +205,9 @@ fn bindgen_test_layout_tm() {
...
```
Rust 结构体 `struct tm`,跟原本在 C 中的一样,包含了九个4字节的整型字段。这些字段名称在 C 和 Rust 中是一样的。`extern "C"` 区域声明了库函数 `astime``mktime` 分别需要只一个参数,一个指向可变实例 `extern "C"` 的裸指针。(库函数可能会通过指针改变作为参数传递的结构体。)
Rust 结构体 `struct tm`,跟原本在 C 中的一样,包含了 9 个 4 字节的整型字段。这些字段名称在 C 和 Rust 中是一样的。`extern "C"` 区域声明了库函数 `astime``mktime` 分别需要只一个参数,一个指向可变实例 `StructTM` 的裸指针。(库函数可能会通过指针改变作为参数传递的结构体。)
`#[test]` 属性下的其余代码是用来测试 Rust 版的时间结构体的布局。通过命令 `cargo test` 可以进行这些测试。一个 C 不会声明的问题是编译器应该如何对结构体中的字段进行布局。比如说C 的 `struct tm` 以字段 `tm_sec` 开头用以表示秒;但是 C 不需要编译版本遵循这个排序。不管怎样Rust 测试应该会成功而 Rust 对库函数的调用也应如预期般工作。
`#[test]` 属性下的其余代码是用来测试 Rust 版的时间结构体的布局。通过命令 `cargo test` 可以进行这些测试。问题在于C 没有规定编译器应该如何对结构体中的字段进行布局。比如说C 的 `struct tm` 以字段 `tm_sec` 开头用以表示秒;但是 C 不需要编译版本遵循这个排序。不管怎样Rust 测试应该会成功而 Rust 对库函数的调用也应如预期般工作。
### 设置好第二个案例并开始运行
@ -251,9 +255,9 @@ Ok(
2120218157
```
对 C 函数 `asctime``mktime` 的调用必须再一次被放在 `unsafe` 区域内,因为 Rust 编译器无法对这些外部函数的潜在内存安全风险负责。此处声明一下,`asctime` 和 `mktime` 并没有安全风险。调用的两个函数的参数是裸指针 `ptr`,其指向结构体 `sometime` (在栈 (stack) 中)的地址。
对 C 函数 `asctime``mktime` 的调用必须再一次被放在 `unsafe` 区域内,因为 Rust 编译器无法对这些外部函数的潜在内存安全风险负责。此处声明一下,`asctime` 和 `mktime` 并没有安全风险。调用的两个函数的参数是裸指针 `ptr`,其指向结构体 `sometime` (在<ruby><rt>stack</rt></ruby>中)的地址。
`asctime` 是两个函数中调用起来更棘手的那个,因为这个函数返回的是一个指向 C `char` 的指针,如果函数返回 `Mon` 那么指针就指向 `M`。但是 Rust 编译器并不知道 C 字符串 `char` 的空终止数组)的储存位置。是内存里的静态空间?还是堆 (heap)`asctime` 函数内用来储存时间的文字表达的数组实际上是在内存的静态空间里。无论如何C 到 Rust 字符串转化需要两个步骤来避免编译错误:
`asctime` 是两个函数中调用起来更棘手的那个,因为这个函数返回的是一个指向 C `char` 的指针,如果函数返回 `Mon` 那么指针就指向 `M`。但是 Rust 编译器并不知道 C 字符串 `char` 的空终止数组)的储存位置。是内存里的静态空间?还是<ruby><rt>heap</rt></ruby>`asctime` 函数内用来储存时间的文字表达的数组实际上是在内存的静态空间里。无论如何C 到 Rust 字符串转化需要两个步骤来避免编译错误:
- 调用 `Cstr::from_ptr(char_ptr)` 来将 C 字符串转化为 Rust 字符串并返回一个引用储存在变量 `c_str` 中。
- 对 `c_str.to_str()` 的调用确保了 `c_str` 是所有者。
@ -262,9 +266,9 @@ Rust 代码不会增加从 `mktime` 返回的整型值的易读性,这一部
### 使用 FFI 和 bindgen 调用 C
Rust FFI 和工具 `bindgen` 都能够出色地协助 Rust 调用 C 库无论是标准库还是第三方库。Rust 轻松地与 C 交流,并透过 C 与其他语言交流。对于调用像 `sqrt` 一样简单的库函数Rust FFI 表现直截了当,这是因为 Rust 的原始数据类型覆盖了它们在 C 中的对应部分。
Rust FFI 和工具 `bindgen` 都能够出色地协助 Rust 调用 C 库无论是标准库还是第三方库。Rust 可以轻松地与 C 交流,并透过 C 与其他语言交流。对于调用像 `sqrt` 一样简单的库函数Rust FFI 表现直截了当,这是因为 Rust 的原始数据类型覆盖了它们在 C 中的对应部分。
对于更为复杂的交流——特别是 Rust 调用像 `asctime``mktime` 一样,会涉及到结构体和指针的 C 库函数——工具 `bindgen` 是优秀的帮手。这个工具会生成支持代码以及所需要的测试。当然Rust 编译器无法假设 C 代码对内存安全的考虑会符合 Rust 的标准因此Rust 必须在 `unsafe` 区域内调用 C。
对于更为复杂的交流 —— 特别是 Rust 调用像 `asctime``mktime` 一样,会涉及到结构体和指针的 C 库函数 —— `bindgen` 工具是优秀的帮手。这个工具会生成支持代码以及所需要的测试。当然Rust 编译器无法假设 C 代码对内存安全的考虑会符合 Rust 的标准因此Rust 必须在 `unsafe` 区域内调用 C。
--------------------------------------------------------------------------------
@ -273,7 +277,7 @@ via: https://opensource.com/article/22/11/rust-calls-c-library-functions
作者:[Marty Kalin][a]
选题:[lkxed][b]
译者:[yzuowei](https://github.com/yzuowei)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
@ -285,3 +289,4 @@ via: https://opensource.com/article/22/11/rust-calls-c-library-functions
[4]: https://baike.baidu.com/item/UNIX时间/8932323
[5]: https://cplusplus.com/reference/ctime/tm/
[6]: https://cplusplus.com/reference/ctime/mktime/
[0]: https://img.linux.net.cn/data/attachment/album/202212/16/110147q4kk0qoqe0e3m6bb.jpg

View File

@ -0,0 +1,68 @@
[#]: subject: "Try this Java file manager on Linux"
[#]: via: "https://opensource.com/article/22/12/linux-file-manager-jfileprocessor"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15357-1.html"
在 Linux 上试试这个 Java 文件管理器
======
![][0]
> JFileProcessor 作为一个 Linux 文件管理器,在设计和功能上都采取了极简理念。
计算机是一个奇特的文件柜,里面装满了虚拟文件夹和文件,等待着被引用、交叉引用、编辑、更新、保存、复制、移动、重命名和归类。在本文中,我将介绍一下 Linux 系统的文件管理器。
<ruby>昇阳微系统<rt>Sun Microsystem</rt></ruby> 时代的末期,出现了一种叫做 <ruby>Java 桌面系统<rt>Java Desktop System</rt></ruby> 的东西,奇怪的是它 _不是_ 用 Java 编写的。相反,它是(根据当时的 sun.com 上的描述)“对集成和优化的桌面软件的明智选择,大部分基于开源代码和开放标准”。它基于 GNOME带有办公套件、电子邮件和日历应用、即时消息和“Java 技术”。我发现自己在思考用 Java 创建桌面需要什么。客观地说,桌面实际上并不包括那么多东西。一般的共识似乎是桌面由面板、系统托盘、应用菜单和文件管理器组成。
想象一个实际的 Java 桌面是一个有趣的思维练习。虽然不足以以此为目标启动一个开源项目,但足以在网络上快速搜索必要的组件。事实证明,有人用 Java 编写并维护了一个文件管理器。
### JFileProcessor
我找到的 Java 文件管理器叫做 JFileProcessor简称 JFP。它不仅是用 Java 编写的,更具体是说是用 [Groovy][1](一种流行的 Java 脚本语言)进行的一项迷人的实践。
![Image of the JfileProcessor folders.][2]
作为文件管理器JFileProcessor 在设计和功能上都采用了极简方式。它允许你查看、打开、移动、复制、剪切或删除本地系统和远程系统上的文件。它不是特别定制化的它没有如拆分面板或可移动面板等额外功能。除了管理文件外它没什么别的中心主题。JFileProcessor 在某种程度上令人耳目一新,因为它很简单。这是一个文件管理器,仅此而已。有时这就是你在文件管理器中想要的全部。
我之前写过关于 [设置 Java Swing 主题][3] 的方式,从技术上讲,该技术可以应用于这个开源应用。但是,我认为这个应用的部分魅力在于 OpenSolaris 称之为 “Blueprint” 的主题。这是 Java 的怀旧外观,我喜欢以其原生 GUI 外观运行它,作为对我的 OpenSolaris现为 OpenIndiana笔记本电脑的回忆。
### 用户体验
除了设计真正重要的是用户体验。JFileProcessor 只有三个你日常使用的按钮:向上、后退和前进。它们未绑定到键盘快捷键,因此你必须单击按钮才能导航(或使用 `Tab` 键选择按钮)。在使用图形应用时,我经常使用键盘快捷键,所以当我尝试浏览我的系统时,这大大减慢了我的速度。但是,有时我实际上只是懒洋洋地浏览文件,因此 JFileProcessor 完全按照我的需要工作。
JFileProcessor 也有一个搜索组件。只要你设置合理的起始文件夹,搜索就会快速而智能,同时允许使用通配符和正则模式搜索。例如,当我搜索特定的电子书或漫画档案或游戏规则手册时,或者当我粗略地知道该目录包含一个项目但懒得一直点击到目的地址。在子目录中快速搜索,必然会得到明显的结果,然后双击打开文件,不管我设置了什么 XDG 偏好Evince 用于 PDFFoliate 用于电子书,等等)。
右键单击任何文件或目录会弹出上下文菜单。它具有你期望的大部分常见任务:复制、剪切、粘贴、删除、重命名、新建。它也有一些不错的额外功能。
![Right-click context menu in JFileProcessor][4]
例如,你可以只将文件名复制到剪贴板或保存文件路径。你还可以运行一些脚本,包括用于批量重命名文件的脚本、用于对选定文件运行命令的脚本、用于创建 ZIP 或 TAR 存档的脚本等等。当然,编码器有多种选择,包括在当前位置打开终端和打开新的编码窗口。
### 安装
我是 Java 的忠实粉丝。它是一种清晰的语言,具有合理的分隔符和对跨平台兼容性的坚定立场。我喜欢它作为一种语言,我喜欢看到程序员用它创造的东西。
JFileProcessor 的名字很贴切。这是一种处理文件的有效方法从某种意义上说JFileProcessor 为你提供了一个简单的窗口来查看系统上的文件数据,并允许你以图形方式与它们进行交互,就像你可能在终端中与它们交互一样。它不是我用过的最高效的文件管理器,也不是功能最多的一个。然而,这是一个令人愉快的应用,为你提供了文件管理所需的基本工具,其相对较小的代码库使你可以在下午阅读一些精彩的内容。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/12/linux-file-manager-jfileprocessor
作者:[Seth Kenlon][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lkxed
[1]: https://opensource.com/article/20/12/groovy
[2]: https://opensource.com/sites/default/files/2022-09/jfileprocessor.webp
[3]: https://opensource.com/article/22/3/beautify-java-applications
[4]: https://opensource.com/sites/default/files/2022-09/jfileprocessor-menu.webp
[0]: https://img.linux.net.cn/data/attachment/album/202212/17/121727uuepuz1q3qhgippd.jpg

View File

@ -0,0 +1,85 @@
[#]: subject: "Pulsar: A Community-Led Open Source Code Editor to Continue the Legacy of Atom"
[#]: via: "https://news.itsfoss.com/pulsar-editor/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: "wxy"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15356-1.html"
Pulsar一个由社区主导的以继承 Atom 的开源代码编辑器
======
> Pulsar 的目标是成为 Atom 的替代品,随着其开发的进一步深入,将挑战 Visual Studio Code。
![Pulsar一个由社区领导的开源代码编辑器以延续 Atom 遗志][1]
微软决定杀死 Atom 文本编辑器,以支持 Visual Studio Code这并不奇怪。
如果你不知道,你可以看一下我们以前的报道:
> [为了支持微软 VS Code微软的 GitHub 正在扼杀 GitHub 的 Atom 编辑器][5]
虽然你可能有了更好的选择,但曾经流行的 Atom 是一个令人印象深刻的工具。
**它有一个可用的社区构建版**;然而,还有一个新的版本(**Pulsar**),旨在实现与原始 Atom 对等的功能,并引入现代功能和更新架构。
根据它的文档,原来开发 Atom 社区版的团队现在参与创建了 Pulsar。他们之所以做一个独立的复刻版本是因为项目的目标不同。
**Pulsar** 希望将一切现代化,以成为 Atom 的继承者。
> 💡 Pulsar 是一个新项目,作为 Atom 的新复刻,有开发/测试版本可供测试。
### Pulsar 编辑器看起来怎么样?
![Pulsar 编辑器][2]
当然,用户界面也是大同小异。考虑到 Pulsar 还没有一个稳定的版本,看起来有时会显得有些混淆。
然而,文档、软件包以及从 Git 仓库安装软件包的能力等基本要素看起来都已具备。
根据官方网站的介绍Pulsar 的主要功能亮点包括:
- 跨平台支持Linux、macOS 和 Windows
- 内置的软件包管理器
- 智能自动补全
- 文件系统浏览器
- 多窗格的用户界面
- 查找和替换功能
在写这篇文章时Pulsar 还不能自动更新。你可以通过官方网站安装较新的版本。
![Pulsar 编辑器设置][3]
你可以自定义编辑器、改变键盘绑定、管理软件包、应用主题,并通过所有可用选项配置你的体验。
到目前为止,要说 Pulsar 是否会比 Atom 社区版更好还为时过早。然而,这是我们可以关注的事情。
### 下载并试用 Pulsar
如前所述Pulsar 正处于早期开发阶段。因此,你可以找到用于 Linux 发行版的二进制文件和 AppImage 文件,你可以在任何发行版上试用。
在我的测试中,它 **在 Linux Mint 不能正常运行**,但在 **Ubuntu 22.04 LTS** 上工作良好。
你可以到它的 [官方下载页面][4] 去获取你的系统所需的软件包,并进行测试。
> **[Pulsar 编辑器][4]**
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/pulsar-editor/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://news.itsfoss.com/content/images/size/w2000/2022/12/pulsar-hackable-text-editor.png
[2]: https://news.itsfoss.com/content/images/2022/12/pulsar-editor.png
[3]: https://news.itsfoss.com/content/images/2022/12/pulsar-editor-settings.png
[4]: https://pulsar-edit.dev/download.html#releases
[5]: https://news.itsfoss.com/atom-being-discontinued/

View File

@ -0,0 +1,138 @@
[#]: subject: "XFCE 4.18 Release Looks Impressive!"
[#]: via: "https://news.itsfoss.com/xfce-4-18-release/"
[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/"
[#]: collector: "lkxed"
[#]: translator: "wxy"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15355-1.html"
Xfce 4.18 版本发布:令人印象深刻
======
> Xfce 4.18 已发布,添加了一些有趣的功能和细微的变化。
![Xfce 4.18 版本看起来令人印象深刻!][1]
Xfce 是目前最好的桌面环境之一。它因其简单性而受欢迎,是一个轻量级的选择。
不像其他桌面环境,你不会看到 Xfce 定期的添加功能。所以,等待升级总是令人兴奋的。
Xfce 4.18 是最新的版本,它增加了一些有用的功能和其他技术改进。让我重点介绍一下。
### Xfce 4.18 的新变化
![Xfce 4.18 有新的默认壁纸][2]
虽然这不是一个完整的变化列表,但其中一些比较明显的变化包括:
- 文件管理器的改进。
- 桌面和面板的变化。
- 更多的设置。
- 新的壁纸。
#### 文件管理器的改进
![Xfce 4.18 文件管理器的分割视图][3]
Xfce 的默认文件管理器 Thunar 在这个版本中得到了相当多的改变。作为许多 Linux 用户的最爱Thunar 有一个干净直观的用户界面,使其对不同技能水平的人都很简单易用。
在这个版本中,这个有用的工具获得了几个新功能。比如说:
- 工具条上新的搜索图标使用户能够快速搜索文件和文件夹。
- 你现在可以添加一个分割视图。
- 启用独立的图像预览。
还有一个有趣的新增功能,可以帮助你**高亮文件**,以便快速发现它们。你可以设置一个前景和背景颜色,如果你不想要这个功能,也可以重置。
![xfce 4.18 文件高亮][4]
你可以从文件的属性选项中访问这个功能。
Thunar 文件管理器还增加了一些其他功能,包括:
- 一个用于定制键盘快捷键的新标签。
- 新的书签菜单。
#### 精致的设置和桌面变化
Xfce 桌面的大部分都保持不变。你不应该期待开箱后有不同的用户体验。
虽然没有重大的视觉改造,但有细微的完善和功能改进。
例如,你可以发现日历小部件的新能力。显示设置提供了更多选项,即使你没有连接多个显示器。
Xfce 面板也有一些变化。
![Xfce 4.18 面板设置][5]
这些变化包括用像素而不是百分比来调整高度,以及一个新的 “保持面板在窗口上方” 选项。这使得窗口可以在面板下面延伸,而不是在顶部被切断。
更不用说,时钟小程序现在可以自定义其字体类、字体大小和布局。
![Xfce 4.18 时钟][6]
#### 新壁纸
当然,我们也得到了一些新的壁纸;你已经在本文的开头看到了新的默认壁纸。
![Xfce 4.18 新壁纸集][7]
如果你很好奇,你可以看看其他为 [壁纸竞赛][8] 提交的各种作品。也许你会发现别人不喜欢的东西。
![Xfce 4.18 新壁纸集锦][9]
这些是计划添加到背景集的其它候选作品。
#### 其他变化
除了之前提到的那些,这个版本还引入了一些其他变化。
- 初步的 Wayland 支持,它允许 Xfce 在 Wayland 显示服务器上运行。
- GTK4 的更新,提供了更好的性能和稳定性。
- 一些核心应用程序的小更新,包括对 Xfdesktop、Xfwm4 和 Xfce4-panel 应用程序的改进。
关于完整的变化列表,你可以参考 [官方博客文章][10]。
### 获得 Xfce 4.18
你可以通过软件库为滚动发布的发行版(如 Arch Linux安装它。对于其他发行版如果你不想自己做实验你可能必须等待官方的更新。
要想快速尝试,你可以安装 Xubuntu 23.04 日常构建版来获得这些功能。
如果你使用的是其他为了稳定起见而不提供快速桌面环境更新的 Linux 发行版,如果你知道自己在做什么,你可以尝试手动安装。
> **[下载 Xfce 4.18][11]**
### 总结
Xfce 4.18 是 Xfce 桌面环境的一次重大更新,有许多新的功能和改进。
Thunar 文件管理器的更新尤其值得注意,因为它们为用户提供了更多的控制和定制选项。初步的 Wayland 支持和 GTK4 更新将提高性能和稳定性。
总的来说Xfce 4.18是一个受欢迎的更新,将改善 Xfce 用户的用户体验。
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/xfce-4-18-release/
作者:[Jacob Crume][a]
选题:[lkxed][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/jacob/
[b]: https://github.com/lkxed
[1]: https://news.itsfoss.com/content/images/size/w2000/2022/12/xfce-4-18-release.png
[2]: https://news.itsfoss.com/content/images/2022/12/xfce-4-18-hero.jpg
[3]: https://news.itsfoss.com/content/images/2022/12/xfce-4-18-file-manager.jpg
[4]: https://news.itsfoss.com/content/images/2022/12/xfce-4-18-file-highlight.jpg
[5]: https://news.itsfoss.com/content/images/2022/12/xfce-4-18-panel.jpg
[6]: https://news.itsfoss.com/content/images/2022/12/xfce-4-18-clock-settings.jpg
[7]: https://news.itsfoss.com/content/images/2022/12/xfce-4-18-new-wallaper.jpg
[8]: https://gitlab.xfce.org/artwork/public/-/issues/1#note_58300
[9]: https://news.itsfoss.com/content/images/2022/12/xfce-4-18-new-wallpapers.jpg
[10]: https://alexxcons.github.io/blogpost_8.html
[11]: https://www.xfce.org/

View File

@ -1,96 +0,0 @@
[#]: subject: "Privacy-Preserving Ads Make a Debut on Brave Search"
[#]: via: "https://news.itsfoss.com/brave-search-ads/"
[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Privacy-Preserving Ads Make a Debut on Brave Search
======
Brave Search is testing privacy-preserving ads. But, the Brave browser does not seem to block them by default.
![Privacy-Preserving Ads Make a Debut on Brave Search][1]
Brave Search is an independent search engine that claims not to track its users and provides a safe and secure search experience.
It aims to be a privacy-friendly alternative to the extensive tech services from Microsoft and Google.
With a [recent announcement][2], they introduced a new feature to Brave Search. The search will now show '_privacy-preserving_' ads as part of a global beta program.
What does this mean? Allow me to explain.
### Privacy-Preserving Ads: Meaning?
![brave search privacy preserving ads][3]
Brave is planning to run ads on their search platform; they claim that these ads are anonymous, are marked, and follow its commitment of putting users first.
These ads are said to be clearly labeled and are integrated into Brave Search.
To display relevant advertisements, Brave Search will only use your **search query, country, and device type**.
So, in theory, this should stop them from keeping a profile of your searches.
They also add that:
> Brave Search ads protect users data and anonymity, while supporting their access to independent and transparent search as a true alternative to Big Tech search engines.
This has been released as a beta test globally, where Brave Search users will be shown text-based ads in search results.
Users who opted for Brave Private Ads (for _Brave Rewards_) and are using the latest version of Brave won't be shown search ads since these are not yet eligible for BAT earnings.
Additionally, they offer a '**Search Premium**' subscription for an ad-free search experience, which costs **$3 per month**.
With this subscription, you get a completely ad-free search experience while also supporting Brave.
### Is This a Step in the Right Direction?
Even though Brave Search is based on an **open-source search project**[Tailcat][4], they have no plans to make it open-source.
So, Brave Search already has a red flag 🚩 for many privacy enthusiasts who prefer open-source solutions for their transparency.
**Will privacy-preserving ads make a difference, just like Brave Search's original claims for its search engine?**
Well, I certainly hope so. Why? **Because we need more competitors to Google**. And something is better than nothing.
Even without open-source code, we will have to sit back and see what kind of transparency they provide in their advertisement testing soon.
Though, the implementation of Brave's privacy-preserving ads has got a few users upset.
A [comment][5] made by a Reddit user on the official Subreddit of Brave Browser mentions:
> Putting in an exception for your own ads is in exceptionally bad taste. All the marketing fluff around "independent, private search" is not an excuse.
Brave Browser seems to be **not blocking Brave search ads** with its in-built ad-blocker (Brave Shields).
On that, a member of the Brave support team clarified:
> Shields at this time does not block 1st part, non tracking ads by default anyway (with the exception of setting to Aggressive, I believe) so it's actually just following the standard we've already set.
So, you can block the Brave search ads with the privacy protection settings set to aggressive, I believe?
However, not everyone prefers the aggressive blocker. So, let us see how things turn out for Brave search ad experimentation.
💭 **Thoughts? Feel free to share them in the comments section.**
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/brave-search-ads/
作者:[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/w2000/2022/12/brave-privacy-preserving-ads.png
[2]: https://brave.com/private-search-ads/
[3]: https://news.itsfoss.com/content/images/2022/12/Brave_Search_Ads.jpg
[4]: https://www.tailcat.com
[5]: https://www.reddit.com/r/brave_browser/comments/z9t171/comment/iyjledp/?utm_source=share&utm_medium=web2x&context=3

View File

@ -1,90 +0,0 @@
[#]: subject: "Linux Mint 21.1 beta is now available for testing"
[#]: via: "https://debugpointnews.com/linux-mint-21-1-beta/"
[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Linux Mint 21.1 beta is now available for testing
======
![][1]
**Check out the new features of Linux Mint 21.1 beta, which is now slowly available for download in mirrors. The official announcement is awaited.**
![Linux Mint 21.1 beta Cinnamon desktop][2]
Linux Mint 21.1 is the first point release of the 21 series and will be released before Christmas this year. Codenamed “Vera”, which was [announced a few weeks back][3], is now available for beta testing.
The beta testing is expected to continue for at least a week before the final release. Since it is the first point, the feature list is not at that higher end. But some significant updates are arriving in the final release.
### Linux Mint 21.1 beta & new features
One of the biggest updates to the Driver Manager in this release is the ability to run the app with your user account without requiring a password to launch it. This is a major convenience, as it means you dont have to enter a password every time you want to use the Driver Manager. In addition, when you remove a driver, the app now purges it from the system completely, ensuring that no trace of the driver remains on your computer.
Another key update to the Driver Manager is the ability to detect USB installation media and help you mount them. This is particularly useful if youre installing software or drivers from a USB drive, as it makes the process much easier and more streamlined.
In addition to these updates, the Mint team has also included a feature for verifying the checksum of ISO files. This is an important part of any installation process, as it ensures that your ISO file is legitimate and hasnt been tampered with. While other [utilities][4] are available for verifying ISO checksums, including command line tools, its nice to see this feature included in the default desktop environment.
Another change in this release is the default desktop view, which is expected to be updated. The default icons for the Computer, Home, Trash, and Network are now hidden from view, as the Computer icon is already included in the Panel, and the other icons are not used as frequently.
Other noteworthy updates in this release include the inclusion of Timeshift backports for prior releases (such as Mint 20.x) and an updated version of Blueman. Overall, this is a solid point release that includes several useful updates and bug fixes.
![New default icon set and bibata cursor][5]
Finally, you may notice the “green” icon sets and the cursor is different in the Cinnamon flavour. Linux Mint 21.1 brings the “Mint-y-Aqua” theme and the stunning “Bibata-modern” cursor theme to pair with it. Both of them look awesome together, giving a much-needed fresh vibe.
### Summary of changes
- First point release of Linux Mint 21, based on Ubuntu 22.04.1 release
- Linux Kernel 5.15 LTS
- Cinnamon 5.6.4 desktop
- Xfce 4.16 desktop
- MATE 1.26 desktop
- Friendly driver manager
- Cleaner default desktop view with fewer icons
- Default theme changes to “Mint-Y-Aqua” from the green-based icons
- New cursor theme: Bibata (one of the best cursor theme in Linux)
- A bunch of stunning wallpapers
- And an array of bug fixes
### Download and bug reporting for beta
While the team is preparing for the official announcement, the ISO images are slowly becoming available to the public. As always, being a beta release, it may have bugs. So use it with caution.
If you are running Linux Mint 21.0, dont upgrade it yet. Wait for the final release.
Still, if you want to try it on a virtual machine, download the Cinnamon, Xfce and MATE flavours of this beta release from the torrent links below.
- [linuxmint-21.1-cinnamon-64bit-beta.iso.torrent][6]
- [linuxmint-21.1-mate-64bit-beta.iso.torrent][7]
- [linuxmint-21.1-xfce-64bit-beta.iso.torrent][8]
I will update the changelog here once it is available. And finally, report any issues or bugs at the dedicated [21.1 beta bug tracking page][9].
Cheers.
--------------------------------------------------------------------------------
via: https://debugpointnews.com/linux-mint-21-1-beta/
作者:[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://debugpointnews.com/wp-content/uploads/2022/12/21-1-beta-head.jpg
[2]: https://debugpointnews.com/wp-content/uploads/2022/12/Linux-Mint-21.1-beta-Cinnamon-desktop.jpg
[3]: https://debugpointnews.com/linux-mint-21-1-announcement/
[4]: https://www.debugpoint.com/collision/
[5]: https://debugpointnews.com/wp-content/uploads/2022/12/New-default-icon-set-and-bibata-cursor.jpg
[6]: https://linuxmint.com/torrents/linuxmint-21.1-cinnamon-64bit-beta.iso.torrent
[7]: https://linuxmint.com/torrents/linuxmint-21.1-mate-64bit-beta.iso.torrent
[8]: https://linuxmint.com/torrents/linuxmint-21.1-xfce-64bit-beta.iso.torrent
[9]: https://github.com/linuxmint/mint21.1-beta/issues

View File

@ -1,99 +0,0 @@
[#]: subject: "Linen is a Google-Searchable Open-Source Alternative to Slack and Discord"
[#]: via: "https://news.itsfoss.com/linen/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Linen is a Google-Searchable Open-Source Alternative to Slack and Discord
======
An interesting open-source alternative to Slack and Discord.
![Linen is a Google-Searchable Open-Source Alternative to Slack and Discord][1]
Linen is an interesting open-source project brewing up.
It aims to be an **open alternative to Slack and Discord**, focusing on making communities more accessible and helping reduce the support burden.
It could be worth adding it as an open-source Slack alternative, but it is in its **early stages of development** when publishing this.
**_What's different with Linen, exactly?_**
- **Open Source**
- **Unlimited history retention**
- **Communities are Google searchable**
- **Supports sync from Slack and Discord**
- **Eliminate the need to join Slack/Discord for information**
### Community-Focused Slack Alternative
[Linen][2] pitches itself as an open-source app for communities rather than primarily targeting teams for collaboration/communication.
![linen ui][3]
In contrast, Slack is primarily for team discussions and collaboration. You cannot share the conversation through a URL or find the discussions indexed on search engines like Google.
But with Linen, you can **find a URL for every conversation** that can be shared with anyone to view/join the conversation.
![linen message url][4]
Here's something for the test: [https://linen.dev/s/itsfoss/t/5099789/topic][5]
**You can also find this conversation listed on Google** (it may take time to find it exactly).
For example, suppose we are a community of an open-source project where we discuss an issue or a solution; listing it on Google enables more users to find out about it.
Here's an example of a conversation listed on Google that could help me if I was exploring solutions to fix my code issues with Kotlin:
![linen google search][6]
As a developer/user, I could view the conversation, get my answer, and move on without troubling anyone else in the community with a repeat question.
**Sounds lovely, right? Linen helps you enhance community support.**
Sure, you can use it for your team communication as well. But, it is a more appropriate solution to create an open community chat network.
Currently, it does not provide the feature to create a private community for the public. They only use it for internal team discussions, per their [GitHub page][7].
![][8]
### How To Get Started?
Linen does not support self-hosting at the moment. But, their roadmap on [GitHub][9] indicates that it has been planned for the near future.
So, you can [sign up for a free account][10] using the official cloud instance or opt for the business/premium edition to use custom domain/branding benefits for your team.
You can **import your Slack/Discord conversations for free**.
> 💡 The free community edition is hosted under Linen.dev where you rely on community support. Opt for its premium edition to get priority support.
Linen may not be for everyone, but it sounds like a useful idea for many communities and teams.
_💬 What do you think about it? Let me know in the comments below._
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/linen/
作者:[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/w2000/2022/11/linen-slack-discord-alternative.png
[2]: https://www.linen.dev
[3]: https://news.itsfoss.com/content/images/2022/11/linen-example.png
[4]: https://news.itsfoss.com/content/images/2022/11/linen-conversation-url.png
[5]: https://linen.dev/s/itsfoss/t/5099789/topic
[6]: https://news.itsfoss.com/content/images/2022/11/linen-google-seo.png
[7]: https://github.com/linen-dev/linen.dev
[8]: https://news.itsfoss.com/content/images/2022/11/linen-settings.png
[9]: https://github.com/Linen-dev/linen.dev
[10]: https://www.linen.dev/signup

View File

@ -1,91 +0,0 @@
[#]: subject: "Apple Silicon GPU Driver is Now Available in Asahi Linux"
[#]: via: "https://news.itsfoss.com/apple-gpu-driver-asahi-linux/"
[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Apple Silicon GPU Driver is Now Available in Asahi Linux
======
We finally have a GPU driver for Apple M silicon systems on Asahi Linux.
![Apple Silicon GPU Driver is Now Available in Asahi Linux][1]
Asahi Linux aims to be a port of Linux for Apple Silicon Macs; work started on it back in 2020, right after the launch of Apple's M1 chips at the WWDC event.
A small team is behind all the development behind Asahi Linux and reverse engineering stuff; they have been quite busy since the last time we looked at their work.
Previously, they worked on improving support for Apple SoCs such as the M1, M1 Pro, and M1 Max. They provided varying levels of support for devices that used these chips.
It still is a work in progress, but promising results in 2022.
They have now taken it further by providing initial support for Apple Silicon GPUs by releasing drivers (in _alpha_).
That sounds great! 😃
Let me take you through the gist of it.
### Hardware Acceleration With Desktop Environments and Old Games
![asahi linux running quake3][2]
Introduced as an alpha-stage GPU driver, it can run desktop environments and a few games smoothly.
**The implementation:** The driver features a work-in-progress implementation of OpenGL 2.1 and OpenGL ES 2.0 for current Apple M-series systems.
They also mention that:
> These drivers have not yet passed the OpenGL (ES) conformance tests. There will be bugs!
So, you can expect plenty of hiccups along the way should you choose to run applications using these drivers.
**How it works now?:** In its current form, the driver can run desktop environments like GNOME and KDE Plasma with hardware acceleration.
Even older games like [Quake3][3] and [Neverball][4] can run quite well, with these and the desktop environments running at a solid **60 fps at 4k resolution**.
Many users may also notice that quite a few apps don't work with this driver right away. On that, the developers mention:
> Since the driver is still in development, there are lots of known issues and were still working hard on improving conformance test results. Please dont open new bugs for random apps not working! Its still the early days and we know theres a lot of work to do.
**What does the future hold?:** The developers have said that while OpenGL (ES) 2 suffices for some applications, newer applications will require new features such as multiple render targets, multisampling, and transform feedback.
All of this can be achieved with OpenGL (ES) 3, and work on that has already started. But, it will need a lot of developmental effort to get ready.
They have also hinted at support for Vulkan in the future, although it is a long time in the making.
Here's what they tell about it:
> Were working on it! Although were only shipping OpenGL right now, were designing with Vulkan in mind. Most of the work were putting toward OpenGL will be reused for Vulkan. We estimated that we could ship working OpenGL 2 drivers much sooner than a working Vulkan 1.0 driver, and we wanted to get hardware accelerated desktops into your hands as soon as possible.
When a Reddit user [asked][5] about **120 Hz support for MacBook Pro**, one of the maintainers had this to say:
> 120Hz is disabled because it still is capped at 60Hz if we do nothing and was having other weird issues. It's still unclear exactly how VRR works on macOS, we need to figure that out first.
It seems like Asahi Linux has a lot of room to grow, and improvements like this to GPU drivers on a new Silicon system should finally open up new opportunities in terms of performance.
Linux users have been asking for something like this for a long time, and it is now closer to becoming a reality than ever before.
If you are feeling adventurous and want to try the new GPU driver, you can try installing it on your Asahi Linux system. Refer to the [official announcement][6] for instructions to experiment with it.
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/apple-gpu-driver-asahi-linux/
作者:[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/w2000/2022/12/apple-gpu-asahi-linux.png
[2]: https://news.itsfoss.com/content/images/2022/12/AsahiLinux_Quake3.jpg
[3]: https://ioquake3.org
[4]: https://neverball.org
[5]: https://www.reddit.com/r/AsahiLinux/comments/zeucpz/comment/iza3wwv/?utm_source=share&utm_medium=web2x&context=3
[6]: https://asahilinux.org/2022/12/gpu-drivers-now-in-asahi-linux/

View File

@ -1,90 +0,0 @@
[#]: subject: "Mastodon's Adoption Gets a Boost With Vivaldi Browser Integration"
[#]: via: "https://news.itsfoss.com/vivaldi-mastodon-integration/"
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Mastodon's Adoption Gets a Boost With Vivaldi Browser Integration
======
Vivaldi's making an effort to have more users join Mastodon with its new update. That's nice to see!
![Mastodon's Adoption Gets a Boost With Vivaldi Browser Integration][1]
Vivaldi browser is one of the best web browsers for Linux (Windows, macOS, and mobile platforms).
I know it is not an open-source pick, but it gets all the lead with its tab management, customizability, and productivity features. And it treats me better than Firefox nowadays (Mozilla, we still need you to do better)🙄
**Note:**_Vivaldi is **not open-source**. Most of it is based on Chromium, for which you can find the [source code][2]._
If you did not know, Vivaldi recently built a Mastodon instance (**Vivaldi Social**) to encourage people to use open-source and decentralized social media platforms.
It is one of the best Mastodon instances you can join:
To take this further, **Vivaldi 5.6 update** has integrated access to its Mastodon instance from within its web browser.
> 🐘 Hey! We are on [Mastodon][3] for a while; follow **us if you haven't already**! 😄
### Access Mastodon From Web Panels
Web panels on Vivaldi make it a breeze to multitask. You can keep browsing or working on what you want and still access additional services in a single click.
Here's what it looks like:
![mastodon on vivaldi][4]
I can access Vivaldi's Mastodon instance quickly.
Of course, you can add your custom web panel for any Mastodon instance you like.
![vivaldi web panel addition][5]
However, I believe out-of-the-box integration should encourage Vivaldi users to try Mastodon if they haven't yet.
In the official announcement, Vivaldi also explains it properly for its users:
> [Vivaldi Social][6] came into existence as we love the idea of distributed social networks based on open standards. We want to offer better alternatives to people to communicate in an algorithm-free environment with no surveillance capitalism, devoid of tracking or data profiling.The Mastodon server platform communicates through the [Activity Pub][7] standard, a decentralized social networking and messaging protocol recommended by the [World Wide Web Consortium (W3C)][8]. Any platform or application that implements ActivityPub becomes a part of a massive social network. This big social network is also called the [Fediverse][9] (“federated” + “universe”).
Before anyone gets their pitchfork ready, I want Vivaldi to be 100% open-source, but we also want more companies in the mainstream to adopt and encourage the use of open-source tech.
And I think Vivaldi has got an excellent approach to that.
So, this integration should ultimately let every Vivaldi (or Linux user) use Mastodon more than often.
In addition to this change, Vivaldi 5.6 release involves a couple of improvements that include:
- A new search engine (You.com)
- Panels joining editable toolbars
- Revamped settings page
- Pin tab stacks (_this is exciting!_)
You can update the browser to get the latest version or download Vivaldi 5.6 on its official website.
[Download Vivaldi 5.6][10]
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/vivaldi-mastodon-integration/
作者:[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/w2000/2022/12/mastodon-integration-in-vivaldi-browser-1.png
[2]: https://vivaldi.com/source/
[3]: https://mastodon.social/web/@itsfoss
[4]: https://news.itsfoss.com/content/images/2022/12/mastodon-vivaldi.jpg
[5]: https://news.itsfoss.com/content/images/2022/12/add-custom-panel.jpg
[6]: https://vivaldi.com/blog/news/vivaldi-social-a-new-mastodon-instance/
[7]: https://en.wikipedia.org/wiki/ActivityPub
[8]: https://www.w3.org/
[9]: https://en.wikipedia.org/wiki/Fediverse
[10]: https://vivaldi.com/download/

View File

@ -1,69 +0,0 @@
[#]: subject: "FreeBSD 12.4 is out with 100+ improvements and fixes"
[#]: via: "https://debugpointnews.com/freebsd-12-4/"
[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
FreeBSD 12.4 is out with 100+ improvements and fixes
======
![][1]
**FreeBSD 12.4 was released a few days back with several updates and improvements. Heres a release roundup.**
FreeBSD is a UNIX-like operating system based on [U.C. Berkleys BSD-Lite version][2]. It is primarily used for core infra systems, routers, networking devices, and possibly running in millions of devices. FreeBSD bundles thousands of packages from desktop apps to core modules, making it easier to build your system running this awesome operating system.
### FreeBSD 12.4 Release: Key updates
FreeBSD 12.4 is the 5th release of the current 12 stable series and coming up after a years package updates, improvements and bug fixes.
Key changes in the release include the OpenSSL version being updated to 1.1.1q, whereas OpenSSH is bumped up to 9.1p1. The LLVM toolchain suite was also upgraded to 13.0.0. Other key version upgrades include `ena` kernel driver 2.6.1, `file` 5.43, `libarchieve` 3.6.0 and `dma` 2022-01-27.
![FreeBSD 12.4 with Xfce desktop][3]
Furthermore, this release now allows multiple cores to process traffic to improve performance by `if_repair` driver. Also, the `tcpdump` command now allows users to set several rules which will be exposed as part of the `pflog` header.
On top of that, the `telnetd` daemon is deprecated in this version which should be noted for network professionals.
The total number of changes and fixes exceeds 100+, which you can read in detail in the [change log][4].
### Download and Upgrade
If you are running FreeBSD 12.3 version, you can upgrade your system by issuing the following commands:
```
freebsd-update -r 12.4-RELEASE upgrade
```
```
freebsd-update install
```
For a fresh download, you can get the ISO image from the following page.
[Download FreeBSD 12.4-RELEASE][5]
Via [announcements][6] & [change log][4].
--------------------------------------------------------------------------------
via: https://debugpointnews.com/freebsd-12-4/
作者:[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://debugpointnews.com/wp-content/uploads/2022/12/bsd-generic-head.jpg
[2]: https://www.debugpoint.com/unix-history/
[3]: https://debugpointnews.com/wp-content/uploads/2022/12/FreeBSD-12.4-with-Xfce-desktop.jpg
[4]: https://www.freebsd.org/releases/12.4R/relnotes/
[5]: https://download.freebsd.org/ftp/releases/ISO-IMAGES/12.4/
[6]: https://www.freebsd.org/releases/12.4R/announce/

View File

@ -1,88 +0,0 @@
[#]: subject: "Get ready to upgrade your video creation with Kdenlive 22.12"
[#]: via: "https://debugpointnews.com/kdenlive-22-12/"
[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Get ready to upgrade your video creation with Kdenlive 22.12
======
![][1]
**Kdenlive 22.12: the free and open-source video editor scores another sizable update.**
The best free and [open-source video editor][2] Kdenlive 22.12, released with new filters, UI improvements, user-requested features and bug fixes. This release improves Kdenlive on top of its [already existing features][3] and gives you a platform to create professional-quality videos.
Heres whats new.
![Kdenlive 22.12 Running in Linux Mint][4]
### Kdenlive 22.12: New Features
A new “Timelines Guides” dock now lists all the timeline markers in your video project. Click on the timeline video clip to view the markers in this new dock. This is an imp[rovement in the marker features introduced in the past release.
In addition to that, three new audio graph filters were introduced. They are audio level visualization filter, spectrum filter and waveform filter. These can be used in keyframe animations for more granular controls. Talking about keyframes, you can now use the standard CTRL+C and CTRL+V to copy/paste keyframes.
Furthermore, if you are working in a complex timeline, you can now remove all the spaces between clips with two new options remove spaces after playhead and all after playhead.
![Two new UI improvements on timeline][5]
Kdenlive also started work to move to Qt6 from Qt5 build for the upcoming releases. A continuous integration build pipeline is added for Qt6 to check the current build. However, the current version is not yet complete per the transition timeline. However, it is expected that Kdenline will be built with Qt6 as stable by mid of 2023.
On top of the above changes, here are some key updates on this release:
- More custom colour codes for categories
- Improved marker management with edit, add/remove multiple markers and import/export.
- Kdenlive now sends the content of the timeline to Glaxnimate (version >= 0.5.1), which then shows it as background.
- Set maximum cache with custom data storage size
- Option to hide the menu bar, replacing it with a hamburger menu
- The settings panel is cleaned up with better visibility and removed obsolete entries
- Work underway for Qt6 and KDE Frameworks 6 migration
- Improved Track composition
### Download and upgrade
If you are already running Kdenlive via the official distro repo, you should get this update within a couple of days. Simply update your system to get this version.
Those of you running the Flatpak version, run the following command to get the update.
```
flatpak update org.kde.kdenlive
```
For fresh download and installation, visit the following page.
[Download Kdenlive][6]
If you prefer Flatpak, you can install this version from Flathub using the following command, after [setting up your system as Flatpak][7].
```
flatpak install flathub org.kde.kdenlive
```
Via [release announcement][8]
--------------------------------------------------------------------------------
via: https://debugpointnews.com/kdenlive-22-12/
作者:[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://debugpointnews.com/wp-content/uploads/2022/12/kdenlive-head.jpg
[2]: https://www.debugpoint.com/best-free-video-editors-linux-ubuntu/
[3]: https://www.debugpoint.com/kdenlive-features/
[4]: https://debugpointnews.com/wp-content/uploads/2022/12/Kdenlive-22.12-Running-in-Linux-Mint.jpg
[5]: https://debugpointnews.com/wp-content/uploads/2022/12/Two-new-UI-improvements-on-timeline.jpg
[6]: https://kdenlive.org/en/download/
[7]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/
[8]: https://kdenlive.org/en/2022/12/kdenlive-22-12-released/

View File

@ -1,73 +0,0 @@
[#]: subject: "Firefox 108 unlocks the power of music on the web with new WebMIDI API support"
[#]: via: "https://debugpointnews.com/firefox-108/"
[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Firefox 108 unlocks the power of music on the web with new WebMIDI API support
======
![][1]
**Firefox 108 is now available to download, bringing the following new features.**
The final Firefox release of this year is here Firefox 108, closing an eventful year of this free and open-source web browser from Mozilla.
![Firefox 108 Running in Ubuntu][2]
### Firefox 108: Best new features
If you are a music enthusiast, then some good news for you. Firefox now supports the [WebMIDI API][3] inside your browser with proper access controls. When you try to access MIDI devices via Firefox, then you get a prompt for installing a “[site permission add-on][4]” to enable this API.
In addition, Firefox 108 enabled import maps by default, which means web pages can now control the behaviour of JavaScript imports more easily. And if you use Firefox, youll be happy to hear that it now supports proper colour correction for images tagged with ICCv4 profiles.
Furthermore, developers added a handy keyboard shortcut press SHIFT+ESC to open the Process Manager and quickly identify any processes using too many resources. And on Windows 11, Firefox added efficiency mode for processes used in background tabs to help save on resources.
Elsewhere, your browsers bookmark toolbar gets an option “Only show on New Tab” state, which now works correctly for blank new tabs. Also improved in this release is the handling of non-ASCII characters while exporting PDF forms from web pages.
If you are a web developer, Firefox 108 also arrives with a handful of Math function updates which are summarised alongside other vital changes:
- The `source` element supports `height` & `width` attributes when it is a child of a `picture` element.
- Trigonometric functions are now enabled with the `layout.css.trig.enabled` preference set to true by default. This allows the use of sin(), cos(), tan(), asin(), acos(), atan(), and atan2() functions
- CSS `calc-constant`type is implemented to allow for well-known constants such as pi and e within math functions
- Container query length units are now supported via the the `layout.css.container-queries.enabled` preference, which is set to false by default
### Download and update
For Linux distributions, if you used Firefox via your distributions official repository, then you should get this update within a couple of days from today.
However, you can also download the compressed version of this release from the below page. For other download options, do visit our [Firefox download guide][5].
[Download Firefox 108][6]
Happy browsing!
- [Official release notes][7]
- [Beta108 release notes][8]
- [Developer release notes][9]
--------------------------------------------------------------------------------
via: https://debugpointnews.com/firefox-108/
作者:[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://debugpointnews.com/wp-content/uploads/2022/04/firefox-head.jpg
[2]: https://debugpointnews.com/wp-content/uploads/2022/12/Firefox-108-Running-in-Ubuntu.jpg
[3]: https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API
[4]: https://support.mozilla.org/en-US/kb/site-permission-addons
[5]: https://www.debugpoint.com/download-firefox/
[6]: https://ftp.mozilla.org/pub/firefox/releases/108.0/
[7]: https://www.mozilla.org/en-US/firefox/108.0/releasenotes/
[8]: https://www.mozilla.org/en-US/firefox/108.0beta/releasenotes/
[9]: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/108

View File

@ -1,106 +0,0 @@
[#]: subject: "Kdenlive 22.12 Release Adds Useful New Features"
[#]: via: "https://news.itsfoss.com/kdenlive-22-12-released/"
[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Kdenlive 22.12 Release Adds Useful New Features
======
Kdenlive 22.12 upgrade is here with nice enhancements across the board.
![Kdenlive 22.12 Release Adds Useful New Features][1]
Kdenlive is an open-source cross-platform video editing software built by the KDE community, which has been around since 2003.
Built using Qt and KDE Frameworks, it has been the editor of choice for many users out there.
Recently, the latest upgrade to it i.e Kdenlive 22.12 has been made available, let me take you through the release.
### 🆕 Kdenlive 22.12: What's New?
![kdenlive 22.12][2]
Kdenlive 22.12 features numerous improvements, with over 350 commits made. It brings in many new features, bug fixes, and prepares the code base for future releases.
Let me take you through some of the notable improvements with this release.
#### Revamped Guide and Marker System
![kdenlive 22.12 guides dock][3]
The guide and marker system on Kdenlive has received a major overhaul, with the key changes being:
- All marker and guide features are now made available in the new 'Guides' dock.
- The 'Guides' dock also lets you easily seek, search, sort, and filter through the various markers and guides. It also allows for navigation with keyboard.
- You can now create many categories to suit your needs, compared to the nine categories limit previously.
- It is now also possible to edit, add, or remove multiple markers at a time, and the import/export of markers has been improved.
#### Improved Glaxnimate Integration
![kdenlive 22.12 glaxnimate integration][4]
Kdenlive already had support for Glaxnimate with its previous release, but now the developers have taken it a step further.
The editor now lets you send the content of your Kdenlive timeline to [Glaxnimate][5] (version >= 0.5.1), which will then show up in the background.
> 💡 Glaxnimate is an open-source 2D vector drawing and animation program.
This allows you to create animations that play together with your videos in a much easier fashion than was possible before.
#### Various UX Improvements
Kdenlive includes a variety of usability improvements, such as:
- A new hamburger menu in the toolbar that can be used instead of the menu bar.
- 'What's This?' Text has been added in several places to show what a specific element does.
- You can now define a maximum size for the cached data stored by Kdenlive in the environment settings.
- The 'Settings' page has received a cleanup, and now features a reordered list of all the important options.
#### Keyframeable Audio Graph Filters
Existing audio graph filters like the audio level visualization filter, audio spectrum filter and audio wave form filter are now keyframeable with Kdenlive 22.12.
They also fixed several effects that were affected due to syntax errors in the XML code and added automated tests to the build system to avoid such an issue in the future.
#### 🛠️ Other Changes
Besides the changes listed above, here are some of the other notable ones:
- Improved track composition.
- PipeWire as SDL output.
- The Color Picker has been fixed on Wayland.
- Pixabay as the new video provider.
- Improved search performance.
If you want to dive deep into the release notes, refer to the [official announcement][6].
### 📥 Download Kdenlive 22.12
For Linux, the latest release is available as an AppImage, on Flathub, and as an Ubuntu PPA.
Head over to the [official website][7] to download those.
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/kdenlive-22-12-released/
作者:[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/w2000/2022/12/kdenlive-22-12-release.png
[2]: https://news.itsfoss.com/content/images/2022/12/Kdenlive_22.12.png
[3]: https://news.itsfoss.com/content/images/2022/12/Kdenlive_22.12_Guides_Dock.png
[4]: https://news.itsfoss.com/content/images/2022/12/Kdenlive_22.12_Glaxnimate.png
[5]: https://glaxnimate.mattbas.org
[6]: https://kdenlive.org/en/2022/12/kdenlive-22-12-released/
[7]: https://kdenlive.org/en/download/

View File

@ -0,0 +1,94 @@
[#]: subject: "Better Late Than Never! GNOME's File Picker Adds Thumbnail View After 18 Years"
[#]: via: "https://news.itsfoss.com/gnome-file-picker/"
[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Better Late Than Never! GNOME's File Picker Adds Thumbnail View After 18 Years
======
A long-lost request, and a much-needed one, finally made its way through!
![Better Late Than Never! GNOME's File Picker Adds Thumbnail View After 18 Years][1]
Nowadays, the user interface of a program is extremely important; even the simplest of interactions can make or break the user's experience.
The GNOME file picker lacked a proper thumbnail preview for viewing files, instead relying on a plain list view. This may have been unintuitive for many.
The lack of this feature was also the topic of many memes and debates over the years.
But now, finally, after 18 long years since the original [feature request][2] was put out, GNOME is set to receive support for a proper thumbnail view.
Let's look at this upcoming change to GNOME's file picker.
#### Recommended Read 📖
### Feature to Arrive With GNOME 44
![gnome file thumbnail view][3]
As demonstrated by this early build screenshot provided by GNOME developer [Matthias Clasen][4]. The file picker on GNOME is going to feature a thumbnail view.
This is how it looks like with GNOME 43 on board:
![file picker with gnome 43][5]
**How to access it?:** It is a grid view for the file picker on GNOME that shows the thumbnail previews of files and folders.
It will now be easy to differentiate items in the file manager; no more opening a file to see what it contains!
![gnome file thumbnail view selector][6]
When this feature arrives, you can enable it by clicking on the new view toggle button at the top right.
**What Changed?:** 18 years for a simple feature addition is a long time. Numerous technical reasons made the implementation of this an arduous task.
But I am glad that it is finally here. 😃
One of the reasons that made this possible was the recent deprecations and modernization work carried out in the GTK code base.
> 💡 GTK is the toolkit that is at the core of all things GNOME.
And, those changes resulted in [GtkListView][7] and [GtkGridView][8] using the same data models to make this feature work.
**When to expect?:** The historical [merge request][9] has already been accepted and is paving the way for its introduction to GNOME.
You can expect this to arrive with GNOME 44 sometime in 2023.
I'm looking forward to that! 😁
We would be covering it as part of GNOME 44's feature offerings. So, stay tuned to our coverage for that!
_Don't forget to follow us on [Mastodon][10] and [Twitter][11]! Feel free to share your thoughts on this in the comments below._
Notion One workspace. Every team.Were more than a doc. Or a table. Customize Notion to work the way you do.![][12]Notion![][13]
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/gnome-file-picker/
作者:[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/w2000/2022/12/gtk-file-chooser-gets-thumbnail-preview-support.png
[2]: https://bugzilla.gnome.org/show_bug.cgi?id=141154
[3]: https://news.itsfoss.com/content/images/2022/12/GNOME_File_Thumbnail.png
[4]: https://twitter.com/matthias_clasen
[5]: https://news.itsfoss.com/content/images/2022/12/file-picker-now.png
[6]: https://news.itsfoss.com/content/images/2022/12/GNOME_File_Thumbnail-2.png
[7]: https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklistview.c
[8]: https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkgridview.c
[9]: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5163
[10]: https://mastodon.social/@itsfoss
[11]: https://twitter.com/itsfoss2
[12]: https://notion.grsm.io/front-static/logo-ios.png
[13]: https://www.notion.so/front-static/meta/default.png

View File

@ -2,7 +2,7 @@
[#]: via: "https://ostechnix.com/securely-transfer-files-with-scp-in-linux/"
[#]: author: "sk https://ostechnix.com/author/sk/"
[#]: collector: "lkxed"
[#]: translator: "MjSeven"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "

View File

@ -1,130 +0,0 @@
[#]: subject: "Create a holiday light display with your Raspberry Pi and ping pong balls"
[#]: via: "https://opensource.com/article/22/11/raspberry-pi-holiday-light-display"
[#]: author: "Brian McCafferty https://opensource.com/users/bdm"
[#]: collector: "lkxed"
[#]: translator: "Return7g"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Create a holiday light display with your Raspberry Pi and ping pong balls
======
I love Christmas decorations and lights, and I'd been wanting to do an programmable LED project for a long time. Recently, I built a light array made of LED lights, ping pong balls, and a Raspberry Pi Zero. I thought it was worth sharing, because it ended up being relatively easy but also educational.
It's mostly my own design, with some inspiration from YouTube videos. You can find the source code and build instructions in my [Git repository][1].
### Shopping list
- [Raspberry Pi Zero][2]
- [Pibow Case][3]
- 5v 2A USB power supply
- Poster frame
- 255 ping pong balls
- Hot glue gun and LOTS of hot glue sticks
- Soldering iron
- Solder
- 22 AWG 0.35mm solid core wiring
- 10 meters of WS2812(B) LED strip lights (30 pixels per meter)
- Multimeter
- Wire cutters
- Wire strippers
### Design the Raspberry Pi light display
My design was driven by the size of the poster frame I happened to have available. I got 30 pixel per meter tape from Ali Express, which cut nicely into 0.5m sections, so that gave me 15 LEDs across. Ping pong balls are 40mm, so I measured and placed the lines 40mm apart, with the LED Strip in the middle of each 40mm section. This gave me 17 lines down in total. My array was therefore 15×17. If you try this yourself, yours can be a different size.
To get power to the array and the Raspberry Pi, I placed the open connections for both data and power at the bottom of the board. I didn't have that many LEDs needing power, so I was able to use the 5v out GPIO from the Raspberry Pi Zero to power them. I run them at 50% brightness, which is easily bright enough to see in the day and at night through my window.
### Wiring
In my design, I started at the bottom of the board and wired up in an S-curve. This made soldering easier because loops at the end of each row didn't have to return all the way back to the start of each line. The WS2812 data lines do require you to wire the data the correct way: power can be fed from either side of the strip, but data must be fed from the side with the arrows pointing away.
My wiring looks like this (this is abbreviated for clarity, in real life it's 17 lines deep):
```
<---------------\
                |
/---------------/
|
\---------------< # Pi connected here
```
### Build the display with your Raspberry Pi
Once the design and wiring plan was sorted, it was time to get started on the build.
I measured and drew my lines in pencil on the poster backboard. The WS2812 strips I got came with sticky tape on the back, so I just removed the backing and attached that directly to the backboard. I was sure to position each strip so that the data arrows went one way, then back the other, to ensure that the lights could be daisy-chained correctly for the Pi's instructions.
Once all light strips were attached, I cut three similar lengths of wire and connected the 5v, data, and ground lines from the end of each light section to the one above it.
![Connect each light strip at the end of each line.][4]
After completing each row, I checked continuity between the 5v and ground lines between each strip to ensure my joins were correct. I also checked that I had not accidentally bridged any connections, so I verified that there was no continuity between the 5v and ground lines (in other words, a 5v wire on one line didn't bridge to the ground on the next line.) I also ran some tests to ensure everything was lighting up correctly (see [the code][5] section for my strand tests.)
Once this was complete, I started to cut holes in the ping pong balls by stabbing scissors into the bottom of them, and cutting a small hole for the LED to shine into. There was no exact science to this, and each one was different, but the effect really worked. I was working with 30 pixels per meter, so my lighting had about 30mm between each LED. A ping pong ball is 40mm across, but I wasn't about to start soldering each LED individually! First of all, I'm not that good at soldering (as my photos show), and anyway, I thought "Well, they're ping pong balls. I can just squash them together!"
And that's what I did.
I placed a hot glue blob around each LED and then placed a ping pong ball onto the LED, held it for about five seconds, and moved on to the next one. I held onto the previous ping pong ball as I slid the next one in, pushing it against the first before "folding" it into its neighbor. The effect worked really well. I was happy with what it was looking like straight away. It also had the nice bonus of hiding my bad soldering job ;)
![It's a tight fit, but the 40mm ping pong balls fit in a 30mm space just fine.][6]
I continued doing this for 255 LEDs and ping pong balls. There were a few crushed ping pong balls in the process, but in the end, I got there.
![255 LEDs and 255 ping pong balls in an array.][7]
### Test the code
For the test code to ensure that everything was working, I used this [Adafruit guide][8] which lights each LED in red, green, and blue, and then does a rainbow cycle. I used this when I was building to ensure my connections were correct and that everything was soldered correctly.
After that, I designed a grid in a spreadsheet to map each pixel to a grid position. This helped to make building the images easier. Since my pixel numbers run in a zig-zag pattern, it would have been hard to keep track of each LED (e.g. LED A1 was 256 and B1 was 226). 
Once this was all set, it was time to design some images on paper and in the spreadsheet. Then it was time to code! It got a bit addictive and I started adding some animation (using loops and turning pixels onto one color and then another color). 
The end result was everything I'd hoped it would be.
![A Christmas gift in LED.][9]
![Reindeer painted with light.][10]
![An LED snowflake.][11]
### A Raspberry Pi light display all year
I am not sure this will ever be truly finished. Nearly every night since it's been up in the window, I've added some new images and animations. I'm already thinking about what to do for New Year's Eve. I also won't be putting this back in storage with my Christmas decorations in January. I just need to think of other things to draw on it to make it a year-round project! A friend of mine suggested a pixel Mario and I love that idea!
My code also needs a little work. For example, I do some scrolling text, but I redraw the whole board for each position of the text, so it took quite a bit of time to do. I think I can do something with loops, or perhaps the image library can help scroll the letters easier, and make it easier to add text rather than turning each pixel on and off at every step.
I've got a photo record of my progress from start to finish: [LED Ping Pong Wall][12].
You can also see a video of it in action here: [XMas light display][13].
I'm really pleased with how this turned out, and I think it looks amazing. I'm very excited to try some other LED projects in the future. I encourage you to try a light array of your own even as your first project. It's easier than it looks!
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/11/raspberry-pi-holiday-light-display
作者:[Brian McCafferty][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/bdm
[b]: https://github.com/lkxed
[1]: https://github.com/bmccafferty/ping-pong-led-wall
[2]: https://shop.pimoroni.com/products/raspberry-pi-zero-wh-with-pre-soldered-header
[3]: https://shop.pimoroni.com/products/pibow-zero-w
[4]: https://opensource.com/sites/default/files/2022-11/IMG_20201126_115520.jpeg
[5]: https://opensource.com#the-code
[6]: https://opensource.com/sites/default/files/2022-11/IMG_20201127_101409.webp
[7]: https://opensource.com/sites/default/files/2022-11/IMG_20201127_160500.webp
[8]: https://learn.adafruit.com/neopixels-on-raspberry-pi/python-usage
[9]: https://opensource.com/sites/default/files/2022-11/IMG_20201127_181931.webp
[10]: https://opensource.com/sites/default/files/2022-11/IMG_20201202_215902.webp
[11]: https://opensource.com/sites/default/files/2022-11/IMG_20201127_215314.webp
[12]: https://projects.bdm.scot/Xmas%20LED%20Wall%202020/
[13]: https://youtu.be/zc0501GzpMw

View File

@ -1,226 +0,0 @@
[#]: subject: "5 Best Linux Phones to Watch Out for in 2023"
[#]: via: "https://www.debugpoint.com/best-linux-phones/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "chai001125"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
5 Best Linux Phones to Watch Out for in 2023
======
**Heres a list of the best Linux Phones which may become more mainstream in 2023 with their features and price.**
Android and iOS smartphones are the most popular ones around the world. However, many of you look for something more “open” and better at privacy. If you use Android, you forfeit your privacy. Apples iOS is a little better on that but again its a “walled garden”.
Thats why Linux phones are becoming popular nowadays because they contain many options for developers and end users. Although various types of Linux phones are currently available, it still becomes confusing to choose the best one. Looking at the trends of 2022, here are some of the Linux Phones which may become more mainstream in 2023.
### Things you should know about Linux Phones
Before you read or even plan to buy one, there are a couple of things you should know about. Here are some of them:
- The Linux phones use a modified version of mainstream Linux distribution with a mobile-friendly desktop environment. This is the same for most of the phones available today.
- You must manage your expectations if you plan to buy a phone and use it for your daily driver. Because the Linux phone operating systems, device features, and app ecosystem is still in the early stages, and its not close to the Android or iOS ecosystem,
- However, Linux phones with the operating system provide the best privacy feature, which might be the reason you can make a move.
### Best Linux Phones
#### Librem from Purism
The Librem 5 Purism is quite a famous brand in the Linux phone market. The Librem 5 model comes with PureOS, an OS designed for Linux Mobiles and not based on the android or iOS platform. It is a natively designed free and open-source OS. PureOS also supports convergence. That means you can plug your phone into a monitor via a USB hub and use it as a desktop OS.
The phone has premium hardware and feels and focuses on security and privacy. However, this impressive smartphone comes with a little higher price tag of $1299.
#### Key features & specification
- Fully free and open-source Linux-based mobile operating system: PureOS
- Separate modem, Wi-Fi and Bluetooth chip
- Three dedicated hardware keys to enable and disable internet, camera, Wi-Fi and Bluetooth
- Smart card reader
- SD card reader
- User-replaceable battery
![Librem 5][1]
| Specification | Description |
| :- | :- |
| **Screen** | 5.7″ (IPS TFT 720×1440) |
| **RAM** | 3 GB |
| **Storage** | 32 GB eMMC |
| **Battery** | 4500mAh |
| **CPU** | NXP i.MX 8M QUAD CORE Cortex-A53 with 64 bit ARM @max 1.5GHz |
| **GPU** | Vivante GC7000 Lite |
| **Screen** | 5.7Inches IPS TFT 720×1440 |
| **Camera** | 13 Mpx with LED Flash (Rear) and 8 Mpx (Front) |
| **USB** | USB Type C |
[Official page for buying options of Librem 5][2]
#### Pinephone
Second on the list is Pinephone, perhaps the most complete and usable Linux phone in the market. Developed by Pine64, it has excellent features and supports multiple Linux ARM distributions for mobile phones.
In addition, PinePhone comes in multiple versions, including a pro version, simultaneously. It is an excellent option for Linux phones as it is also cheaper. PinePhone focuses on the users privacy and extensibility and can be a good option if you want to start the first time with Linux phones.
#### Key features & specification
- Supports KDE Plasma mobile, Manjaro mobile, Sailfish OS, and Ubuntu touch
- It comes with five kill switches for LTE, Cameras, Wifi/BT, and Microphones
- Bootable microSD and 16GB/32GB eMMC
- USB Type C (Power, Data and Video Out)
- Six pogo pins allow custom hardware extensions such as a thermal camera, wireless charging, NFC, an extended battery case, or a keyboard case.
- 3.5 headphone jack
- Supports convergence to extend it as a PC
- Affordable price with starting $149 and $199
![Pinephone][3]
| Specification | Description |
| :- | :- |
| **Screen** | 5.95 Inches, HD IPS capacitive touchscreen |
| **CPU** | Allwinner A64 ARM QUAD Core Cortex-A53 and 64bit |
| **GPU** | Mali-400 MP2 |
| **RAM** | Two Variants: 2GB and 3GB LPDDR3 SDRAM |
| **Storage** | Two Variants: 16GB and 32GB eMMC. |
| **Camera** | Single 5MP, 1/4″, LED Flash (Rear) and Single 2MP, f/2.8, 1/5″ (Front) |
| **Battery** | Li-ion (capacity 2800mAh) |
| **Audio Jack** | 3.5 mm |
[Pinephone buying options][4]
#### Pro 1 X F(X)tec
[Pro 1 X F(X)tec][5] is a smartphone that offers various options for operating systems. And its arguably the more exciting product in this Linux phone list.
You can use LineageOS, Android, Ubuntu Touch, etc., on the same phone. Moreover, an inbuilt slide-out keyboard makes it more unique and attractive.
Developed by F(x)tec company in London, its new in the market and shows promise. However, its not yet out, with planned shipping on December 2022. Hence, you may need to wait a few days for a review.
![Pro 1 X][6]
#### Key features
- First Linux-based smartphone startup with a sliding QUERTY keyboard
- Supports Ubuntu touch out of the box with an Android option
- Unlocked bootloader
- 3.5 headphone jack
- AMOLED display
- 128GB/6GB (storage and RAM) starting price $829
- 256GB/8GB (storage and RAM) starting price $899
| Specification | Description |
| :- | :- |
| **CPU** | Snapdragon 662 Qualcomm |
| **GPU** | Adreno 610 Qualcomm |
| **RAM** | Two Variants: 6GB and 8GB LPDDR4 |
| **Storage** | 128GB (expandable up to 2TB) |
| **Screen** | 5.99″ with curved edge Corning® Gorilla® Glass 3 ( 2160 x 1080 FHD AMOLED Display) |
| **Camera** | 12MP Sony IMX363 (Rear) and 8MP (Front) |
| **Battery** | 3200 mAh |
| **Audio Jack** | 3.5 mm  |
[pro 1 x buying options][5]
#### Volla Phone
[Volla Phone][7] can operate simultaneously with two operating systems: Ubuntu Touch and VollaOS. Moreover, VollaOS is a modified android that is google-free and simultaneously focuses on the users privacy. At the same time, Ubuntu Touch is a popular Linux phone distro.
#### Key features & specifications
- Free from Google and services
- No cloud dependency
- Encrypted device storage
- Modified Android OS: Volla OS
- Supports Ubuntu Touch, Manjaro, Sailfish OS
- USB C charging
- 3.5 headphone jack
- Fingerprint log in
- Offline maps
![Volla Phone][8]
| Specification | Description |
| :- | :- |
| **CPU** | MediaTek Helio P23 |
| **GPU** | ARM Mali-G71 MP2  |
| **Storage** | 64 GB, eMMC |
| **RAM** | 4 GB DDR3 RAM |
| **Screen** | 6.3Inches, IPS, 2340×1080 Pixels |
| **Camera** | 16MP with Flash (Rear) and 16MP (Front) |
| **Battery** | 4700 mAh |
| **USB** | Type C & 3.5mm Audio Jack |
[Volla Phone buying options][9]
#### Fairphone 4
It comes with PostmarketOS; [Fairphone 4][10] is another smartphone that has modular hardware. You can replace its battery effortlessly. Moreover, not just the battery, you can also replace its display, etc., just with a screwdriver.  
Fairphone is another Linux phone which comes with modular hardware. It supports PostmarketOS and uses a modified version of Android: FairPhone OS. The primary selling point of this device is its modularity, where you can replace any part of the mobile phone. That includes the display, battery and other components of this device.
#### Specifications
| Specification | Description |
| :- | :- |
| **CPU** | Octa-Core Kryo 570 |
| **RAM** | Two variants: 6GB and 8GB |
| **Storage** | Two variants: 128GB or 256GB |
| **GPU** | Adreno 619 |
| **Screen** | 6.3 inch Full HD+ IPS |
| **Camera** | Dual 48MP (Rear) and 25MP (Front) |
| **Battery** | 3905 mAh Li-ion |
| **Chipset** | Qualcomm SM7225 Snapdragon 750G |
[FairPhone buying options][11]
#### Are there any mainstream Android phones that support Linux OS?
If you dont want to buy an off-the-shelf mobile phone as listed above, then you can continue using Linux mobile OS in older branded phones because Android is a modified Linux Kernel-based. Hence these devices should work with Ubuntu Touch or PostmarketOS.
- Google Pixel 3a/3a XL
- Sony Xperia X (F5121 & F5122)
- Google Nexus 5
- OnePlus One
- Supported by Ubuntu Touch OS ([full list][12])
- Xiaomi Redmi 2
- Xiaomi Mi Note 2
- OnePlus GT
- OnePlus 6
- Supported by PostmarketOS ([full list][13])
### Closing notes
So, thats about the best Linux phones available in the market today and will continue in 2023. You can learn more about the above devices from the official website. However, I believe there will be more adoption of Linux phones in the coming days as Privacy becomes a myth every day.
Its true that to compete with Android and iOS, the device or OS is not sufficient. What is important is the standard, global availability for buying, low entry-level pricing in emerging markets and investment in the app ecosystem. A streamlined vision is required in the phone ecosystem to win. Without it, Linux phones will become more fragmented, as in desktops. The device makers and major FOSS players need to work together to make it successful.
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/best-linux-phones/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed
[1]: https://www.debugpoint.com/wp-content/uploads/2022/12/Librem-5-image2.jpg
[2]: https://puri.sm/products/librem-5/
[3]: https://www.debugpoint.com/wp-content/uploads/2022/12/Pinephone.jpg
[4]: https://pine64.com/product-category/pinephone
[5]: https://www.fxtec.com/pro1x
[6]: https://www.debugpoint.com/wp-content/uploads/2022/12/Pro-1-X.jpg
[7]: https://volla.online/de/index.html
[8]: https://www.debugpoint.com/wp-content/uploads/2022/12/Volla-Phone.jpg
[9]: https://volla.online/de/shop/
[10]: https://shop.fairphone.com/en/buy-fairphone-4
[11]: https://shop.fairphone.com/
[12]: https://devices.ubuntu-touch.io/
[13]: https://wiki.postmarketos.org/wiki/Devices

View File

@ -1,104 +0,0 @@
[#]: subject: "Linux Mint Upgrade Tool: Usage Guide"
[#]: via: "https://www.debugpoint.com/mint-upgrade-tool/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Linux Mint Upgrade Tool: Usage Guide
======
**Heres how you can upgrade to new Linux Mint versions using the Mint upgrade tool, i.e. mintupgrade GUI with actual upgrade process screenshots.**
If you are looking for **detailed upgrade** steps to the recently released **Linux Mint 21 Vanessa**, read this guide 👉 [upgrade-linux-mint-21-from-20-3][1]
### Linux Mint Upgrade Tool
The Linux Mint team [announced][2] a few months back, that they built a new utility to upgrade the Linux Mints significant versions. Its called the “mintupgrade2”. Development is complete, and It is currently under the support and planning for upgrading to the major versions—for example, Linux Mint 20 to 21 and not the minor version upgrades.
Although you can upgrade the versions using the standard apt commands, the Mint team believes significant version upgrades are tricky. It would be difficult for the new users to perform a seamless upgrade because it involves the terminal and a set of complex steps with commands.
Moreover, the GUI is a wrapper with additional features to the mintupgrade program, which brings a set of pre-system checks and upgrade processes with a one-click Fix.
In addition, the mintupgrade checks basic checks, whether you are connected to power, the system is up to date, disk space availability and many more features.
To show you how it looks and works, we set up a testbed with LMDE 4 and give it a go.
But before that, heres a quick set of features:
- Entirely GUI-driven upgrade process
- Multi-language support
- Pre-upgrade checks: system backup, power, disk space, list of removed packages
- Configurable
- Alert you about the orphaned packages from the prior version
- It gives you the option to fix issues
### How it works
When we ran the mint upgrade utility via the command `mintupgrade`, the GUI, the friendly welcome screen gives you an excellent starting point and starts the upgrade process. And then, it begins with a series of checks on its own.
![Starting the upgrade process][3]
In addition to that, when it finds some problem in your system, it stops and gives you sufficient details about it. Once you click on Fix, it can resume the process again.
Thats not all; it can resume the upgrade process if interrupted due to network or internet or any other problem.
The utility found the following errors in our test system during our test and fixed them with just one click.
![Apt Cache check][4]
![Mint Upgrade detects that system snapshots not present][5]
![Check for Orphan Packages][6]
![Status before upgrade][7]
![Mint Upgrade can detect the packages require downgrade][8]
Lastly, we successfully upgraded a test system from LMDE 4 to LMDE 5.
![Upgrade Complete][9]
#### How to get this upgrade utility
The installation of the utility is easy using the commands below. However, if you are running the latest version of Linux Mint 21, it should already be installed and try by running mintupgrade from the terminal.
```
sudo apt update
```
```
sudo apt install mintupgrade
```
### Closing Notes
Finally, I think its one of the best utilities by the Linux Mint team. As you can see above, it handled many errors on its own. All I did was click the “Fix” button. And the utility is smart enough to understand all the failure points and take care of the remediations.
[GitHub and source code of mintupgrade][10]
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/mint-upgrade-tool/
作者:[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/upgrade-linux-mint-21-from-20-3/
[2]: https://www.debugpoint.com/2022/04/linux-mint-21-announcement/
[3]: https://www.debugpoint.com/wp-content/uploads/2022/04/Starting-the-upgrade-process.jpg
[4]: https://www.debugpoint.com/wp-content/uploads/2022/04/Apt-Cache-check.jpg
[5]: https://www.debugpoint.com/wp-content/uploads/2022/04/Mint-Upgrade-detects-that-system-snapshots-not-present.jpg
[6]: https://www.debugpoint.com/wp-content/uploads/2022/04/Check-for-Orphan-Packages.jpg
[7]: https://www.debugpoint.com/wp-content/uploads/2022/04/Status-before-upgrade.jpg
[8]: https://www.debugpoint.com/wp-content/uploads/2022/04/Mint-Upgrade-can-detect-the-packages-require-downgrade.jpg
[9]: https://www.debugpoint.com/wp-content/uploads/2022/04/Upgrade-Complete.jpg
[10]: https://github.com/linuxmint/mintupgrade

View File

@ -2,7 +2,7 @@
[#]: via: "https://opensource.com/article/22/12/linux-file-manager-konqueror"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "

View File

@ -0,0 +1,159 @@
[#]: subject: "How to Switch from Debian Stable to Testing"
[#]: via: "https://itsfoss.com/switch-debian-stable-testing/"
[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to Switch from Debian Stable to Testing
======
If you are looking for the most stable Linux distribution, sure, Debian is the right choice.
Especially if you are planning to use it on servers.
But, on the desktop side, things are a bit different. I mean, you are given packages that are at least a year old and support for new-age hardware is even worse.
So what do you do in those cases, Well, you can use Debian testing!
But before jumping to the explanation part, lets briefly understand Debian testing.
### What is Debian Testing?
Debian offers you 3 variants of Debian:
- Debian stable (what you get by default from their homepage).
- Debian testing (has **newer packages** and breaks less often than Debian unstable).
- Debian unstable (has the most recent packages and is **considered the most fragile of all**).
So Debian testing can be considered a sweet spot between stability and fresh packages.
Ive been playing around with Debian testing for some time and havent faced any issues.
In fact, many Debian users prefer the testing variant over the stable version. Despite the name testing, it is pretty usable.
But still, **I would recommend you to experiment with this on VM,** try using it with your primary tools and if things go well, you can apply those changes in the main system.
### Switch from Debian stable to Debian testing
**_Warning: You can not downgrade from Debian testing to Debian stable, as installer scripts and installation tools are only designed to replace the older version with the new one._**
Also, I would recommend [using timeshift to create a backup][1] before applying the shown steps on your main machine.
First, update the existing packages using the given command:
```
sudo apt update && sudo apt upgrade -y
```
Next, make a copy of original `sources.list` file:
```
sudo cp /etc/apt/sources.list sources.list.backup
```
Now, lets start with the first step.
#### Step 1: Edit sources.list file
There are two ways of editing `sources.list` file. Either you can manually alter the current release name with `testing` or you can [use the sed command][2] to get your job done.
And Im going with a 2nd one to make the whole process easier. You just have to use the given command, and it will replace `bullseye` with `testing` for you:
```
sudo sed -i 's/bullseye/testing/g' /etc/apt/sources.list
```
Now, open your terminal and use the given command to open `sources.list` files:
```
sudo nano /etc/apt/sources.list
```
And comment out the lines having `security.debian.org` and anything that ends with `-updates` as shown below:
![comment out security sources][3]
If you are using nano as I do, you can press `Alt + /` to jump to the end of the line. And then you have to add the following line:
```
deb http://security.debian.org testing-security main
```
![2. add line to keep track of testing in debian][4]
And [save the changes and exit from the nano][5] text editor.
#### Step 2: Update the Repository and install new packages
Now, update the repository index, and it will show you a massive update pending:
```
sudo apt update
```
![update repository in linux][6]
Now, you can use the given command, and it will get you the most recent packages:
```
sudo apt upgrade
```
Sit back and relax as it is going to take a while.
Once done, it will present you with the list of changes made as you switched from Debian stable to testing:
![packages that are updated when switched to debian testing][7]
You can read if you want or you can **just press q** to proceed further.
Now, it will show you the message that some of the libraries installed on your system needs to restart. Press the **TAB** key, and it will select the **OK** option, and then press **Enter:**
![libraries needs to be restarted after update][8]
Next, it will ask you whether you want to restart services during the package upgrade. Here you have a choice. As Im doing this for desktop usage only, I will go with `YES`:
![restart services during package upgrades without asking?][9]
Once done, you can reboot your system and then use the following command to have full effect from the changes youve just made:
```
sudo apt full-upgrade
```
Now, reboot your system, and youll have the most recent packages. Such as **I was running GNOME 43** when I got into the system:
![running gnome 43 in debian][10]
### Wrapping Up
In this tutorial, I explained how you could switch from Debian stable to Debian testing. I hope this will be helpful to you.
And if you face any issues or have any queries, let me know in the comments.
--------------------------------------------------------------------------------
via: https://itsfoss.com/switch-debian-stable-testing/
作者:[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/backup-restore-linux-timeshift/
[2]: https://linuxhandbook.com/sed-command-basics/
[3]: https://itsfoss.com/wp-content/uploads/2022/11/comment-out-security-sources.gif
[4]: https://itsfoss.com/wp-content/uploads/2022/11/2.-add-line-to-keep-track-of-testing-in-debian.png
[5]: https://linuxhandbook.com/nano-save-exit/
[6]: https://itsfoss.com/wp-content/uploads/2022/11/update-repository-in-linux.png
[7]: https://itsfoss.com/wp-content/uploads/2022/11/packages-that-are-updated-when-switched-to-debian-testing.png
[8]: https://itsfoss.com/wp-content/uploads/2022/11/libraries-needs-to-be-restarted-after-update.png
[9]: https://itsfoss.com/wp-content/uploads/2022/11/restart-services-during-package-upgrades-without-asking.png
[10]: https://itsfoss.com/wp-content/uploads/2022/11/running-gnome-43-in-debian.png

View File

@ -0,0 +1,90 @@
[#]: subject: "Why Drupal is the future of content strategy"
[#]: via: "https://opensource.com/article/22/12/drupal-content-strategy"
[#]: author: "Suzanne Dergacheva https://opensource.com/users/pixelite"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Why Drupal is the future of content strategy
======
As a long-time advocate for open source and a contributor to Drupal, I spend a lot of time thinking about how organizations can leverage the platform. I've been thinking about Drupal's position in the larger digital ecosystem and how it compares to the other options on the market. And how Drupal can lean more on its strengths when planning out the strategy for a new project.
### How Drupal fits into the digital landscape
In 2022, putting a site online can be as fast as the time it takes to make a coffee. This is made possible because websites have many similar features and there's usually no need to build one from scratch. When I started my career, frameworks like Ruby on Rails were appealing because of their flexibility. But I quickly learned that the lack of standard solutions for common things like multilingual content, media management, and workflows, meant that each project required a huge investment in custom development.
On the other hand, web builders that have emerged over the last ten years, like Wix and Squarespace offer the dream of "drag-and-drop" website construction and customizable templates. But in reality, their flexibility is very surface-level. They don't offer enough flexibility to build a solid content model, create an experience, or provide the level of content compliance that large organizations need.
This is where Drupal stands out, providing both powerful functionality out-of-the-box, and the tools to build out custom functionality on top of that content.
### Drupal, the content management system
When I started using Drupal 15 years ago, it was described as a content management system. And it is, as it gives content editors the power to log in and manage content, rather than relying on a webmaster or a web developer to do it.
But there was also the promise that site builders could update not just the content, but the content model. Site builders could extend Drupal using configuration instead of writing code. This set it apart from the frameworks that were out at the time. From years of teaching people Drupal, I can tell you that there's a certain amount of joy and empowerment that people get when they realize how much they can do through the Drupal admin UI.
At its core, this is still Drupal's strength. You can control not just the content, but how content is organized. The fact that taxonomy and localization are baked into Drupal's content model, gives a huge advantage over other systems that have a more limited concept of content.
### Drupal, the platform
Shortly after adopting Drupal as our agency's technology of choice, I started calling it a platform. As an ambitious 20-something, I was keen to build more than nice-looking content-rich websites. The ambition was to create more powerful tools to organize the flow of information. This includes integrating Drupal with other systems to build functionality and workflows around your content. You can also create content synchronizations between a CRM and Drupal. Finally, you can search interfaces that allow you to search diverse content sources and filter content in new ways.
The fact that Drupal is so adaptable to these architectures distinguishes it immediately from other CMSs. When talking to large organizations, teams of developers or IT leaders see the benefit of using a technology that is so flexible and adaptable to functional needs.
### Drupal, the digital experience platform
While these attributes are still very compelling, Drupal is now referred to as a digital experience platform (DXP). Its main difference from the proprietary DXPs of the world is that it's open. It doesn't ship with a stack of integrated technologies but rather lets you decide what your stack will be. Whether it's for marketing integrations or multi-channel experiences, you can decide how content feeds into and out of Drupal. This flexibility is one of Drupal's strengths. But it can be a challenge when pitching Drupal against other DXPs that come with a complete marketing toolset.
Marketing folks often look for a packaged solution. And while an agency can package Drupal with a stack of tools, it's hard for Drupal to market this type of ready-to-go solution.
### Drupal's strength as a content strategy platform
So how does Drupal position itself when talking to marketers? Drupal's core strength is still its flexible content architecture. This means that it's an ideal platform for implementing a content strategy and content governance plan. These are two things that plenty of organizations are missing. They are also the two reasons for marketers to adopt a platform like Drupal.
### Better content strategy with Drupal
While Drupal can already be adapted to the content strategy of any organization, it doesn't mean that every Drupal website has a strong content strategy. Drupal implementers have to proactively make choices that prioritize the needs of content and content editors. This means doing things like:
- Organizing content around user needs, not organizational structure
- Structuring content to be reusable, adaptable, personalized, translatable
- Integrating content with digital services by making content available via API
- Setting up tools so that content compliance is checked systematically
Meanwhile, beyond the website, organizations need to use best practices to prioritize their content strategy practice. This means:
- Empowering communicators and treating content editors as first-class users
- Sharing best practices for web publishing across the organization
- Creating a clear, actionable content governance plan
- Using tools like the digital asset management (DAM) tool that fosters content governance
- Creating a smooth flow of content and feedback between content experts and users
With new expectations of platforms to handle personalization and faster cycles for re-branding or implementing a completely new marketing strategy, it's more important than ever for your website to be a tool to help your content strategy. If you're looking for ways to orient your practice around a strong content strategy, here are some places to start:
- Get content editors involved in the process when launching a new web project
- Build [documentation][1] that's driven by content needs, not just technology. Use real content examples in your documentation and talk about the "why" of the content.
- Prioritize ongoing content governance rather than just relying on big projects to revamp your content every 3-5 years
- Invest in cleaning up legacy content instead of migrating content as-is when you do invest in a website redesign
- Invest in the content editor experience, something that Drupal facilitates and continues to invest in, but still takes active effort to do for each project
To sum up, Drupal is already a CMS and a DXP. But this is beside the point. There is a need to leverage Drupal's capabilities towards creating a strong content strategy to really get the most out of the platform.
_This article is based on the author's talk at DrupalCon Portland: [Future of content management: using Drupal as a content strategy platform][2]._
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/12/drupal-content-strategy
作者:[Suzanne Dergacheva][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/pixelite
[b]: https://github.com/lkxed
[1]: https://opensource.com/tags/documentation
[2]: https://www.youtube.com/watch?v=iexCIUuMWDU

View File

@ -0,0 +1,236 @@
[#]: subject: "Improve your documentation with JavaScript"
[#]: via: "https://opensource.com/article/22/12/dynamic-documentation-javascript"
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
[#]: collector: "lkxed"
[#]: translator: "duoluoxiaosheng"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Improve your documentation with JavaScript
======
Open source software projects often have a very diverse user group. Some users might be very adept at using the system and need very little documentation. For these power users, documentation might only need to be reminders and hints, and can include more technical information such as commands to run at the shell. But other users may be beginners. These users need more help in setting up the system and learning how to use it.
Writing documentation that suits both user groups can be daunting. The website's documentation needs to somehow balance "detailed technical information" with "providing more overview and guidance." This is a difficult balance to find. If your documentation can't meet both user groups, consider a third option — dynamic documentation.
Explore how to add a little [JavaScript][1] to a web page so the user can choose to display just the information they want to see.
### Structure your content
You can use the example where documentation needs to suit both expert and novice users. In the simplest case, you can use a made-up music player called AwesomeProject.
You can write a short installation document in HTML that provides instructions for both experts and novices by using the class feature in HTML. For example, you can define a paragraph intended for experts by using:
```
<p class="expert reader">
```
This assigns both the expert class and the reader class. You can create a parallel set of instructions for novices using:
```
<p class="novice reader">
```
The complete HTML file includes both paragraphs for novice readers and experts:
```
<!DOCTYPE html>
<html lang="en">
<head>
<title>How to install the software</title>
</head>
<body>
<h1>How to install the software</h1>
<p>Thanks for installing AwesomeProject! With AwesomeProject,
you can manage your music collection like a wizard.</p>
<p>But first, we need to install it:</p>
<p class="expert reader">You can install AwesomeProject from
source. Download the tar file, extract it, then run:
<code>./configure ; make ; make install</code></p>
<p class="novice reader">AwesomeProject is available in
most Linux distributions. Check your graphical package manager and search for AwesomeProject to install it.</p>
</body>
</html>
```
This sample HTML document doesn't have a stylesheet associated with it, so viewing this in a web browser shows both paragraphs:
![Image of html in black text.][2]
We can apply some basic styling to the document to highlight any element with the reader, expert, or novice classes. To make the different text classes easier to differentiate, let's set the reader class to an off-white background color, expert to a dark red text color, and novice to a dark blue text color:
```
<!DOCTYPE html>
<html lang="en">
<head>
<title>How to install the software</title>
<style>
.reader {
background-color: ghostwhite;
}
.expert {
color: darkred;
}
.novice {
color: darkblue;
}
</style>
</head>
<body>
<h1>How to install the software</h1>
```
These styles help the two sections stand out when you view the page in a web browser. Both paragraphs with the installation instructions have an off-white background color because they both have the reader class. The first paragraph uses dark red text, as defined by the expert class. The second installation paragraph is in dark blue text, from the novice class:
![Image of html in red and black text.][3]
### Add JavaScript controls
With these classes applied, you can add a short JavaScript function that shows just one of the content blocks. One way to write this function is to first set `display:none` to all of the elements with the reader class. This hides the content so it won't display on the page. Then the function should set `display:block` to each of the elements with the class you want to display:
```
<script>
function readerview(audience) {
var list, item;
// hide all class="reader"
list = document.getElementsByClassName("reader");
for (item = 0; item < list.length; item++) {
list[item].style.display = "none";
}
// show all class=audience
list = document.getElementsByClassName(audience);
for (item = 0; item < list.length; item++) {
list[item].style.display = "block";
}
}
</script>
```
To use this JavaScript in the HTML document, you can attach the function to a button. Since the `readerview`function takes an audience as its parameter, you can call the function with the audience class that you want to view, either novice or expert:
```
<!DOCTYPE html>
<html lang="en">
<head>
<title>How to install the software</title>
<style>
.reader {
background-color: ghostwhite;
}
.expert {
color: darkred;
}
.novice {
color: darkblue;
}
</style>
</head>
<body>
<script>
function readerview(audience) {
var list, item;
// hide all class="reader"
list = document.getElementsByClassName("reader");
for (item = 0; item < list.length; item++) {
list[item].style.display = "none";
}
// show all class=audience
list = document.getElementsByClassName(audience);
for (item = 0; item < list.length; item++) {
list[item].style.display = "block";
}
}
</script>
<h1>How to install the software</h1>
<nav>
<button onclick="readerview('novice')">view novice text</button>
<button onclick="readerview('expert')">view expert text</button>
</nav>
<p>Thanks for installing AwesomeProject! With AwesomeProject,
you can manage your music collection like a wizard.</p>
<p>But first, we need to install it:</p>
<p class="expert reader">You can install AwesomeProject from
source. Download the tar file, extract it, then run
<code>./configure ; make ; make install</code></p>
<p class="novice reader">AwesomeProject is available in
most Linux distributions. Check your graphical package
manager and search for AwesomeProject to install it.</p>
</body>
</html>
```
With these controls in place, the web page now allows the user to select the text they want to see:
![Image of window that allows you to select between novice and expert text.][4]
Clicking either button will show just the text the user wants to read. For example, if you click the “view novice text” button, then you'll see just the blue paragraph:
![Image showing blue text when you press the novice button.][5]
Clicking the “view expert text” button hides the novice text and shows only the expert text in red:
![Image of red text after the expert button is clicked.][6]
### Extend this to your documentation
If your project requires you to write multiple how-to documents for different audiences, consider using this method to publish once and read twice. Writing a single document for all your users makes it easy for everyone to find and share the documentation for your project. And you won't have to maintain parallel documentation that varies in just the details.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/12/dynamic-documentation-javascript
作者:[Jim Hall][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/duoluoxiaosehng)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jim-hall
[b]: https://github.com/lkxed
[1]: https://opensource.com/downloads/learn-javascript
[2]: https://opensource.com/sites/default/files/2022-12/publishonec.textblack.png
[3]: https://opensource.com/sites/default/files/2022-12/publishone.red_.blue_.png
[4]: https://opensource.com/sites/default/files/2022-12/publishone.novicexpert.png
[5]: https://opensource.com/sites/default/files/2022-12/publishone.blue_.png
[6]: https://opensource.com/sites/default/files/2022-12/publishone.red_.png

View File

@ -0,0 +1,148 @@
[#]: subject: "Enjoy two-panel file management on Linux with far2l"
[#]: via: "https://opensource.com/article/22/12/linux-file-manager-far2l"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Enjoy two-panel file management on Linux with far2l
======
Far2l is a port of the Windows text-based file manager **Far**. And to be clear, that's a lower-case **L** (as in "Linux") not a number **1**. It runs in the terminal and is designed around a plug-in structure, enabling compatibility with SSH, WebDAV, NFS, and more. You can compile and run far2l on Linux, Mac, and BSD, or Far on Windows.
### Install far2l
Far2l is currently in beta, so you're unlikely to find it in your Linux distribution's software repository. However, you can [compile it from source][1] by downloading cloning its [Git repository][2]:
```
$ git clone --depth 1 https://github.com/elfmz/far2l.git
```
You can browse through the source code to see all of its different components. The main source files are in `utils/src`:
```
SharedResource.cpp
StackSerializer.cpp
StringConfig.cpp
StrPrintf.cpp
TestPath.cpp
Threaded.cpp
ThreadedWorkQueue.cpp
TimeUtils.cpp
TTYRawMode.cpp
utils.cpp
WideMB.cpp
ZombieControl.cpp
```
The file `ZombieControl.cpp` works to [mitigate a zombie apocalypse][3] (at least, in terms of processes), the file `ThreadedWorkQueue.cpp` helps speed processes along by using threading. Far2l isn't just built for extensibility, it's built responsibly!
Assuming you've already prepared your system for compiling code, as described in the [compiling from source][1] article, you must also install some development libraries required by far2l. On Fedora, CentOS, OpenMandriva, and Mageia, the minimal list is:
- wxGTK3-devel
- spdlog-devel
- xerces-c-devel
- uchardet-devel (your repository may not have this one, but there's a workaround)
On Debian, the minimal list is:
- libwxgtk3.0-gtk3-dev
- libuchardet-dev
- libspdlog-dev
- libxerces-c-dev
Use [CMake][4] to prepare the makefiles:
```
$ mkdir build
$ cd !$
$ cmake .. -DUSEUCD=no
```
The `-DUSECD=no` option is required only if you don't have the development libraries for `chardet` installed. If you do, then you can omit that option.
Finally, compile the code and install far2l to a temporary location:
```
$ make -j$(nproc --all)
$ mkdir ~/far2l
$ make install DESTDIR=~/far2l
```
If you prefer to install it to your system instead of to a temporary directory, then omit the `DESTDIR=~/far2l` option.
To launch far2l, invoke the binary stored in the `bin` subdirectory of your install path. For instance:
```
$ ~/far2l/local/bin/far2l
```
### Using far2l
When you first launch far2l, it creates a configuration directory in `~/.config` and prompts you to choose what font you'd like to use. On my system, 16 pt font size was the default, and anything less than that was impossible to read. I used the open source Fantasque Mono Regular as my font, but any monospace font ought to work.
Far2l is a two-panel file manager, meaning that the default view has a place to display two separate directories. At launch, both directories happen to be your home directory. To maximize the amount of screen space used for listing files, far2l uses two columns in each panel, and you can use the **Left** and **Right** arrows to change from one column to the other.
In the right column, you can also use the **Right** arrow to move "down" the list of files by one screen. In the left column, use the **Left** arrow to move "up" the list of files by one screen.
![Image of the far2l file manager.][5]
This navigation takes some getting used to, especially if you're used to terminal file managers that only use the **Right** arrow to descend into a directory. However, once you get used to far2l's navigation, you're likely to appreciate the added speed you gain from this simple pagination.
### Open a file or folder
To open a folder, select a folder in your file list and press the **Return** key. This causes the active panel to change to a view of that directory. The inactive panel doesn't change, so it's not uncommon for far2l to always be showing two different directories at the same time. That's a feature of the two-panel file manager design, although it can take some getting used to if you're not in the habit of splitting windows.
After you've moved into a directory, you can move back into its parent folder by selecting the double dots (`..`) at the top of the file listing and pressing **Return**.
To open a file, select a folder in your file list and press the **Return** key. The file opens according to your desktop's mimetype preferences.
### Panel and window navigation
To move from one panel to another, press the **Tab** key.
The fun thing about far2l is that its file listing is actually a layer over the top of your terminal. To hide the file listing temporarily, and to reveal it once it's gone, press **Ctrl+O** (that's the letter `O` not the digit zero).
You can also adjust how much of your terminal the file panels take up. Press **Ctrl+Up** and **Ctrl+Down** to adjust the vertical size of the file panels.
Make no mistake, though, you're not just suspending far2l when you access the terminal underneath. This isn't your usual terminal, it's a far2l terminal that interacts with the file manager and adds a few features to your standard terminal experience. For example, the [`find` command][6] gains graphical auto-completion.
![Image of far2l responsive terminal.][7]
### Copying and moving files
All the usual file management functions are available within far2l are available with function keys. These are listed along the bottom of the far2l window. There are lots of options for some of the actions, which is either over-complex or really really powerful, depending on your preference.
![Image of far21 move options.][8]
### Exiting far2l
To close far2l, type `exit far` into the command prompt at the bottom of the far2l window.
### Far out
Far2l is a dynamic and responsive text-based file manager. If you're a fan of classic two-panel file managers, then you'll feel at home with far2l. Far2l provides an interesting and novel interpretation of a terminal, and if you don't try far2l for its two-panel file management, you should at least try it for its terminal.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/12/linux-file-manager-far2l
作者:[Seth Kenlon][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lkxed
[1]: https://opensource.com/article/21/11/compiling-code
[2]: https://github.com/elfmz/far2l
[3]: https://www.redhat.com/sysadmin/killing-zombies-linux-style
[4]: https://opensource.com/article/21/5/cmake
[5]: https://opensource.com/sites/default/files/2022-10/far2l.filemanager.png
[6]: https://www.redhat.com/sysadmin/linux-find-command
[7]: https://opensource.com/sites/default/files/2022-10/far2l-popup.png
[8]: https://opensource.com/sites/default/files/2022-10/far2l-move-options.png

View File

@ -0,0 +1,107 @@
[#]: subject: "Harmonoid: A Beautiful Cross-Platform Music Player With Essential Features"
[#]: via: "https://itsfoss.com/harmonoid/"
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Harmonoid: A Beautiful Cross-Platform Music Player With Essential Features
======
Fortunately, theres no shortage of [good open-source music players for Linux][1]. We have covered a variety of options in the past.
Here, I highlight a music player that is free to use, open-source, and available for multiple platforms, including **Linux, Windows, and Android**.
### Harmonoid: Intuitive User Experience With Material Design
![harmonoid player][2]
Harmonoid is written in Dart programming language. It utilizes [libmpv][3] and [mpv][4] for its media playback capabilities on desktop platforms.
It provides an excellent user interface to work with. And does not use electron.js. So, if you hate Electron, this is something you can try.
Usually, you see apps feature material design UI on Android. If you did not know, Material is Googles open-source design system.
![harmonoid player info][5]
Not a lot of creators use it for desktop applications. For a change, Harmonoid features a material design user experience that can be snappy and intuitive simultaneously.
This lets Harmonoid present a unique user experience to Linux users. The animations feel smooth and easy to navigate and offer plenty of valuable features to help manage your music library.
![harmonoid url][6]
If you want a music player with a good UI and feature set, I recommend trying Harmonoid.
**Recommended Read**: [Best Music Players for Linux Users][1]
### Features of Harmonoid
![harmonoid player options][7]
[Harmonoid][8] may look like a simple music player, but it comes packed with some of the most valuable features. They include:
- **Sing along feature where it finds lyrics, or you can manually add them**
- **Edit song details, including artist, year, genre, track number, album, and title**
- Easy sorting and ordering of your music list
- A quick search feature to find what you are looking for
- Caches metadata to offer a fast experience every time you load it
- Good integration support with Windows and Linux
- Discord rich presence support to show your music along with artwork and play buttons
- Adjust the speed, volume, and pitch of the music
- Raw metadata reader to read tags of any file or song in your library
- Playback is powered by MPV
- .LRC file compatibility
- **Online URL (YouTube) and radio stream supported**
- Cross-platform
- Multiple artist support
- Dark/light mode
In addition to these, several subtle abilities go a long way, like **gapless playback and context menu integration, and it is a lightweight application** in general.
Harmonoid should fit perfectly for users who want to play music or want to organize their collection simultaneously. I would say that it offers the best of both worlds.
![harmonoid settings][9]
### Install Harmonoid on Linux
You can grab the **.deb/.rpm** package from its [download page][10] and install it on Ubuntu-based distros or Fedora.
Additionally, you need to install mpv and libmpv using the following command (for Ubuntu):
```
sudo apt install mpv lipmpv-dev
```
Ensuring to install these packages will let you handle all kinds of files for playback with Harmonoid.
You can also find Harmonoid on [AUR][11] for Arch-based distributions. To explore more about the player, head to its [GitHub page][12] and the [official website][8].
_Have you tried Harmonoid to play and organize music on your Linux system? Whats your favorite music player for Linux? Let me know your thoughts in the comments down below._
--------------------------------------------------------------------------------
via: https://itsfoss.com/harmonoid/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/best-music-players-linux/
[2]: https://itsfoss.com/wp-content/uploads/2022/12/harmonoid-player.png
[3]: https://github.com/mpv-player/mpv/tree/master/libmpv
[4]: https://mpv.io
[5]: https://itsfoss.com/wp-content/uploads/2022/12/harmonoid-player-info.png
[6]: https://itsfoss.com/wp-content/uploads/2022/12/harmonoid-url.png
[7]: https://itsfoss.com/wp-content/uploads/2022/12/harmonoid-player-options.png
[8]: https://harmonoid.com
[9]: https://itsfoss.com/wp-content/uploads/2022/12/harmonoid-settings.png
[10]: https://harmonoid.com/downloads
[11]: https://aur.archlinux.org/packages/harmonoid-bin
[12]: https://github.com/harmonoid/harmonoid

View File

@ -0,0 +1,96 @@
[#]: subject: "5 reasons to love Linux GNOME Files"
[#]: via: "https://opensource.com/article/22/12/linux-file-manager-gnome"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
5 reasons to love Linux GNOME Files
======
The GNOME desktop is a common default desktop for most Linux distributions and, as with most operating systems, you manage your data on GNOME with software called a file manager. GNOME promotes a simple and clear naming scheme for its applications, and so its file manager is called, simply, Files. Its intuitive interface is simple enough that you forget what operating system you're using altogether. You're just using a computer, managing files in the most obvious way. GNOME Files is a shining example of thoughtful, human-centric design, and it's an integral part of modern computing. These are my top five favorite things about GNOME Files, and why I love using it.
### 1. Intuitive design
![THe GNOME Files file manager is an intuitive and friendly application.][1]
As long as you've managed files on a computer before, you basically already know how to use GNOME Files. Sure, everybody loves innovation, and everybody loves seeing new ideas that make the computer world a little more exciting. However, there's a time and a place for everything, and frankly sometimes the familiar just feels better. Good file management is like breathing. It's something you do without thinking about what you're doing. When it becomes difficult for any reason, it's disruptive and uncomfortable.
GNOME Files doesn't have any surprises in store for you, at least not the kind that make you stop what you thought you were doing in order to recalculate and start again. And my favorite aspect of the "do it the way you think you should do it" design of GNOME Files is that there isn't only one way to accomplish a task. One thing I've learned from teaching people how to do things on computers is that everyone seems to have a slightly different workflow for even the simplest of tasks, so it's a relief that GNOME Files accounts for that.
When you need to move a file, do you open a second window so you can drag and drop between the two? Or do you right-click and Cut the file and then navigate to the destination and Paste the file? Or do you drag the file onto a button or folder icon, blazing a trail through directories as they open for you? In GNOME Files, the "standard" assumptions usually apply (insofar as there are standard assumptions.)
### 2. Space saver
If you manage a lot of files for a lot of the time you're at your computer, you're probably familiar with just how much screen real estate a file manager can take up. Many file managers have lots of buttons across several toolbars, a menu bar, and a status bar, such that just one file manager window takes up a good portion of your screen. To make matters worse, many users prefer to open several folders, each in its own window, which takes even more space.
GNOME Files tends to optimize space. What takes up three separate toolbars in other file managers is in a single toolbar in GNOME Files, and that toolbar is what would traditionally be the window title bar. In the top bar, there's a forward and back button, file path information, a view settings button, and a drop-down menu with access to common functions.
![The GNOME Files toolbar has just the essential buttons, and in a compact space.][2]
### 3. Other locations
Not all operating systems or file managers make it so you can interact with your network as naturally as you can interact with your own computer. Linux has a long tradition of viewing the network as just another computer, and in fact, the name "GNOME" was an acronym for "GNU Network Object Model Environment."
In GNOME Files, it's trivial to open a folder on a computer you're not sitting in front of. Whether it's a server in a data center or just your office desktop while you're relaxing in your lounge with a laptop, the **Other Locations** bookmark in the GNOME Files side panel allows you to access files as if they were on your hard drive.
![It's easy to connect to remote systems through GNOME Files.][3]
To use it, you enter the file sharing protocol you want to use, along with the username and IP address of the computer you want to access. The `ssh://` protocol is most common between Linux or Unix machines, while `smb://` is useful for an environment with [Windows machines][4], and `dav://` is useful for applications running on the Internet. Assuming the target computer is accessible over the protocol you're using, and that its [firewall is set correctly][5] to permit you to pass through it, you can interact with a remote system as naturally as though they were on your local machine.
### 4. Preferences
Most file managers have configuration options, and to be fair GNOME Files actually doesn't give you very many choices compared to others. However, the options that it does offer are, like the modes of working it offers its users, the "standard" ones. I'm misusing the word "standard" intentionally: There is no standard, and what feels standard to one person is niche to someone else. But if you like what you're experiencing with GNOME Files under normal circumstances, and you feel that you're its intended audience, then the configuration options it offers are in line with the experience it promotes. For example:
- Sort folders before files
- Expand folders in _list view_
- Show the **Create link** option in the contextual menu
- Show the **Delete Permanently** option in the contextual menu
- Adjust visible information beneath a filename in _icon view_
That's nearly all the options you're given, and in a way it's surface-level choices. But that's GNOME Files. If you want something with more options, there are several very good alternatives that may better fit your style of work. If you're looking for a file manager that just covers the most common use cases, then try GNOME Files.
### 5. It's full of stars
I love the concept of metadata, and I generally hate the way it's _not_ implemented. Metadata has the potential to be hugely useful in a pragmatic way, but it's usually relegated to specialized metadata editing applications, hidden from view and out of reach. GNOME Files humbly contributes to improving this situation with one simple feature: The gold star.
In GNOME Files, you can star any file or folder. It's a bit of metadata so simple that it's almost silly to call it metadata, but in my experience, it makes a world of difference. Instead of desperately running [find][6] command to filter files by recent changes, or re-sorting a folder by modification time, or using [grep][7] to find that one string I just know is in an important file, I can star the files that are important to me.
Making plans for the zombie apocalypse all day? Star it so you can find it tomorrow when you resume your important work. After it's over and the brain-eaters have been dealt with, un-star the folder and resume normal operation. It's simple. Maybe too simple for some. But I'm a heavy star-user, and it saves me several methods of searching and instead reduces "what was I working on?" to the click of a single button.
### Install GNOME Files
If you've downloaded a mainstream Linux distribution, then chances are good that you already have GNOME and GNOME Files installed. However, not all distributions default to GNOME, and even those that do often have different desktops available for download. The development name of GNOME Files is `nautilus`, so to find out whether you have GNOME Files installed, open a terminal and type `nautilus &` and then press **Return**. If you see this error, you don't have GNOME Files available:
```
bash: nautilus: command not found...
```
To install GNOME Files, you must install the GNOME desktop. If you're happy with your current desktop, though, that's probably not what you want to do. Instead, consider trying [PCManFM][8] or [Thunar][9].
If you're interested in GNOME, though, this is a great reason to try it. You can probably install GNOME from your distribution's repository or software center.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/12/linux-file-manager-gnome
作者:[Seth Kenlon][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/2022-10/gnome-files.webp
[2]: https://opensource.com/sites/default/files/2022-10/gnome-files-toolbar.webp
[3]: https://opensource.com/sites/default/files/2022-10/gnome-files-connect.webp
[4]: https://opensource.com/article/21/4/share-files-linux-windows
[5]: https://www.redhat.com/sysadmin/secure-linux-network-firewall-cmd
[6]: https://opensource.com/article/21/9/linux-find-command
[7]: https://www.redhat.com/sysadmin/how-to-use-grep
[8]: http://linnk-to-pcmanfm-article
[9]: http://link-to-article

View File

@ -0,0 +1,129 @@
[#]: subject: "Create a holiday light display with your Raspberry Pi and ping pong balls"
[#]: via: "https://opensource.com/article/22/11/raspberry-pi-holiday-light-display"
[#]: author: "Brian McCafferty https://opensource.com/users/bdm"
[#]: collector: "lkxed"
[#]: translator: "Return7g"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
利用树莓派和乒乓球制作一个假日彩灯
======
我喜欢圣诞装饰品和灯饰,因此很长一段时间以来我一直想做一个可编程的 LED 项目。最近,我制作了一个由 LED 灯、乒乓球和树莓派 Zero 组成的灯阵列。这个项目相对简单并且具有教学价值,因此我认为它非常值得分享。
整个彩灯由我设计,但其中一些灵感也来自 YouTube。你可以在我的 [Git 存储库][1] 中找到源代码和构建说明。
### 购物清单
- [树莓派 Zero][2]
- [树莓派保护壳][3]
- 5V 2A 的电源线
- 展架
- 255 个乒乓球
- 热熔胶枪和若干热熔胶棒
- 烙铁
- 焊锡丝
- 22 AWG 0.35mm 实芯线
- 10 米 WS2812(B) LED灯带每米 30 像素)
- 万用表
- 钢丝钳
- 剥线钳
### 设计树莓派的灯光效果
这个设计是由我展框的大小决定的。我在全球速卖通买到了每米 30 像素的灯带,它可以轻松地切成 0.5m 的长度,这样我就有了 15 个 LED。 乒乓球的直径是 40 毫米,所以我测量并放置了 40 毫米的线,每 40 毫米部分的中间都有 LED 灯条,这就产生了 17 行。 因此我的灯光阵列是 15×17。你可以根据实际情况来调整尺寸。
为了给灯带和树莓派供电,我在电路板底部设置了数据线和电源线。我的 LED 灯不需要很多电,所以我使用树莓派 Zero 的 5V 输出 GPIO 为它们供电。当我以 50% 的亮度运行时,这个亮度已经足以在白天和晚上透过我的窗户看到。
### 布线
我从电路板的底部以之字形开始布线,这使得焊接非常容易,因为每行的末尾不必返回到每行的开头。
我的线路大致像这样(为清楚起见,这里进行了简化,实际上它一共有 17 行):
```
<---------------\
                |
/---------------/
|
\---------------< # 这里连接树莓派
```
### 使用树莓派搭建显示屏
当设计和布线的工作完成后就可以开始搭建显示屏了。
我在展板上测量并绘制了线路。我的灯带背面有胶带,所以我只需要取下背衬并将其贴在展板上。我检查了每个灯带的位置和数据线的方向以确保灯带可以按照树莓派的指令正确运作。
连接好所有灯带后,我剪下三段长度相同的电线,并将每个灯带末端的电源线、数据线和接地线连接到其上方。
![Connect each light strip at the end of each line.][4]
在线路连接完成后,我检查了每条灯带之间的电源线和地线之间的连续性,以确保其连通性。我还检查了是否存在错误的桥接,所以我验证了电源线和地线之间的连续性。我还进行了一些测试以确保所有灯都正常点亮(参阅[测试代码][5]。)
完成上述工作后,我开始在乒乓球上剪洞,用剪刀刺入乒乓球的底部,然后剪一个小洞让 LED 灯穿进去。我每米使用 30 个像素的 LED 灯,所以每个 LED 之间有大约 30 毫米的空隙。
在 LED 灯上滴上热熔胶,然后在 LED 上放了一个乒乓球并按住大约五秒钟,就粘好了一个乒乓球。粘贴下一个乒乓球时我只需要挨着上一个乒乓球就能让所有乒乓球都变得整齐了
![It's a tight fit, but the 40mm ping pong balls fit in a 30mm space just fine.][6]
我继续为余下的乒乓球进行焊接。尽管这个过程中有几个乒乓球被压碎了,但最终还是顺利完成了制作。
![255 LEDs and 255 ping pong balls in an array.][7]
### 测试代码
测试代码需要确保所有部件都能正常工作,为此我使用了[Adafruit 指南][8],它以红、绿和蓝点亮每个 LED然后依次进行循环。我在测试时使用它来确保我连接无误并且焊接正常。
在此之后,我在电子表格中设计了一个网格,将每个像素映射到一个网格位置。由于我的像素编号呈之字形排列,因此很难跟踪每个 LED例如 A1 为 256B1 为 226。重新映射网格位置能使得我在构建图像时更容易。
在所有准备工作完成之后,我就可以在纸上和电子表格中设计图像,然后编码。于是我开始添加一些动画(使用循环并将像素变为一种颜色,然后变为另一种颜色)。
最终的结果还算顺利。
![A Christmas gift in LED.][9]
![Reindeer painted with light.][10]
![An LED snowflake.][11]
### 全年可用的树莓派彩灯
我不确定这是否已经完全完成了。自从把它摆放到橱窗里,几乎每个晚上我都会添加一些新的图像和动画。我已经在考虑除夕夜的时候要做成什么样了。它不会像圣诞装饰品一起在圣诞节后被放进储藏室。 我只需要在上面显示其它图案,就能使它成为一个全年可用的彩灯! 我的一个朋友推荐了像素马里奥,这听起来是个好主意!
我的代码仍然需要完善。 例如,我做了一些滚动文本,但当我为文本的每个位置重新绘制时却花了很多时间。我想我可以用循环做一些事情,或者图像库可以帮助更轻松地滚动字母,并使添加文本更容易,而不是在每一步打开和关闭每个像素。
这里有一张照片记录了我制作的全过程[LED 乒乓墙][12]。
可以在此处观看它的运行视频:[XMas 灯光展示][13]。
这个彩灯最终的效果我非常满意。以后我也会尝试更多利用 LED 彩灯完成的项目。我也鼓励大家亲自动手制作一个这样的彩灯,它会比你想象中更简单。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/11/raspberry-pi-holiday-light-display
作者:[Brian McCafferty][a]
选题:[lkxed][b]
译者:[Return7g](https://github.com/Return7g)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/bdm
[b]: https://github.com/lkxed
[1]: https://github.com/bmccafferty/ping-pong-led-wall
[2]: https://shop.pimoroni.com/products/raspberry-pi-zero-wh-with-pre-soldered-header
[3]: https://shop.pimoroni.com/products/pibow-zero-w
[4]: https://opensource.com/sites/default/files/2022-11/IMG_20201126_115520.jpeg
[5]: https://opensource.com#the-code
[6]: https://opensource.com/sites/default/files/2022-11/IMG_20201127_101409.webp
[7]: https://opensource.com/sites/default/files/2022-11/IMG_20201127_160500.webp
[8]: https://learn.adafruit.com/neopixels-on-raspberry-pi/python-usage
[9]: https://opensource.com/sites/default/files/2022-11/IMG_20201127_181931.webp
[10]: https://opensource.com/sites/default/files/2022-11/IMG_20201202_215902.webp
[11]: https://opensource.com/sites/default/files/2022-11/IMG_20201127_215314.webp
[12]: https://projects.bdm.scot/Xmas%20LED%20Wall%202020/
[13]: https://youtu.be/zc0501GzpMw

View File

@ -1,64 +0,0 @@
[#]: subject: "Try this Java file manager on Linux"
[#]: via: "https://opensource.com/article/22/12/linux-file-manager-jfileprocessor"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
在 Linux 上试试这个 Java 文件管理器
======
计算机是奇特的文件柜,里面装满了等待引用、交叉引用、编辑、更新、保存、复制、移动、重命名和组织的虚拟文件夹和文件。在本文中,我将介绍一下 Linux 系统的文件管理器。
在 Sun Microsystem 时代的末期,出现了一种叫做 Java 桌面系统的东西奇怪的是它_不是_用 Java 编写的。相反,它是(根据当时的 sun.com 上的描述)“对集成和优化的桌面软件的明智选择,大部分基于开源代码和开放标准”。它基于 GNOME带有办公套件、电子邮件和日历应用、即时消息和“Java 技术”。我发现自己在思考用 Java 创建桌面需要什么。客观地说,桌面实际上并没有那么多。一般的共识似乎是桌面由面板、系统托盘、应用菜单和文件管理器组成。
想象一个实际的 Java 桌面是一个有趣的思维练习。不足以以此为目标启动一个开源项目,但足以在网络上快速搜索必要的组件。事实证明,有人用 Java 编写并维护了一个文件管理器。
### JFileProcessor
我找到的 Java 文件管理器叫做 JFileProcessor简称 JFP。这不仅在 Java 中,而且在 [Groovy][1](一种流行的 Java 脚本语言)中都是一项迷人的练习。
![Image of the JfileProcessor folders.][2]
作为文件管理器JFileProcessor 在设计和功能上都采用了最小化的方法。它允许你查看、打开、移动、复制、剪切或删除本地系统和远程系统上的文件。它不是特别定制化的它没有额外的功能如拆分面板或可移动面板。除了管理文件外它不围绕任何中心主题构建。JFileProcessor 在某种程度上令人耳目一新,因为它很简单。这是一个文件管理器,仅此而已。有时这就是你在文件管理器中想要的全部。
我之前写过关于[设置 Java Swing 主题][3]的方式,从技术上讲,该技术是这个开源应用的一个选项。但是,我认为这个应用的部分魅力在于 OpenSolaris 称之为 “Blueprint” 的主题。这是 Java 的怀旧外观,我喜欢以其原生 GUI 外观运行它,作为对我的 OpenSolaris现为 OpenIndiana笔记本电脑的回忆。
### 用户体验
除了设计真正重要的是用户体验。JFileProcessor 只有三个你日常使用的按钮:向上、后退和前进。它们未绑定到键盘快捷键,因此你必须单击按钮才能导航(或使用 **Tab** 键选择按钮)。在使用图形应用时,我经常使用键盘快捷键,所以当我尝试浏览我的系统时,这大大减慢了我的速度。但是,有时我实际上只是懒洋洋地浏览文件,因此 JFileProcessor 完全按照我的需要工作。
JFileProcessor 也有一个搜索组件。只要你设置合理的起始文件夹,搜索就会快速而智能,同时允许适用 glob 和正则模式搜索。例如当我搜索特定的电子书或漫画档案或游戏规则手册时或者任何时候我粗略地知道该目录包含一个项目但懒得一直点击到目的地址。在子目录中快速搜索必然会得到明显的结果然后双击打开文件不管我设置了什么XDG偏好Evince用于PDFFoliate用于电子书等等
右键单击任何文件或目录会弹出上下文菜单。它具有你期望的大部分常见任务:复制、剪切、粘贴、删除、重命名、新建。它也有一些不错的额外功能。
![Right-click context menu in JFileProcessor][4]
例如,你可以只将文件名复制到剪贴板或保存文件路径。你还可以运行一些脚本,包括用于批量重命名文件的脚本、用于对选定文件运行命令的脚本、用于创建 ZIP 或 TAR 存档的脚本等等。当然,编码器有多种选择,包括在当前位置打开终端和打开新的编码窗口。
### 安装
我是 Java 的忠实粉丝。它是一种清晰的语言,具有合理的分隔符和对跨平台兼容性的坚定立场。我喜欢它作为一种语言,我喜欢看到程序员用它创造的东西。
JFileProcessor 的名字很贴切。这是一种处理文件的有效方法从某种意义上说JFileProcessor 为你提供了一个简单的窗口来查看系统上的文件数据,并允许你以图形方式与它们进行交互,就像你可能在终端中与它们交互一样。它不是我用过的最高效的文件管理器,也不是功能最多的一个。然而,这是一个令人愉快的应用,为你提供了文件管理所需的基本工具,其相对较小的代码库使你可以在下午阅读一些精彩的内容。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/12/linux-file-manager-jfileprocessor
作者:[Seth Kenlon][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lkxed
[1]: https://opensource.com/article/20/12/groovy
[2]: https://opensource.com/sites/default/files/2022-09/jfileprocessor.webp
[3]: https://opensource.com/article/22/3/beautify-java-applications
[4]: https://opensource.com/sites/default/files/2022-09/jfileprocessor-menu.webp

View File

@ -0,0 +1,223 @@
[#]: subject: "5 Best Linux Phones to Watch Out for in 2023"
[#]: via: "https://www.debugpoint.com/best-linux-phones/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "chai001125"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
2023 年值得期待的 5 个最好的 Linux 手机
======
>以下是一份**可能在 2023 年成为手机界主流的最好的 Linux 手机榜单**,其中还例举了各个 Linux 手机的**特点和价格**。
安卓和 iOS 智能手机是世界上最流行的手机。然而,还有许多人都想要更"开放"、且**在隐私方面做得更好的手机**。如果你使用安卓手机,那么你就是放弃了你的隐私。在个人隐私保护方面,苹果的 iOS 手机表现得要好一点,但它也仅提供了有限的隐私保护。
这就是现在 Linux 手机变得很流行的原因,因为它们为开发者和终端用户提供了许多选择。虽然,各种类型的 Linux 手机都已经上市,但是要选择最好的 Linux 手机仍然十分困难。从 2022 年的趋势来看,以下是一些可能在 2023 年成为主流的 Linux 手机。
### 关于 Linux 手机,你需要知道的事情
当你浏览或者计划购买一部 Linux 手机之前,你应该先了解以下关于 Linux 手机的事情:
- Linux 手机使用的是主流 Linux 发行版的修改版,它有一个适合手机的桌面环境。这对今天的大多数手机(例如安卓、苹果 iOS来说也是类似的。
- 如果你打算买一部 Linux 手机,并将其作为你日常所使用的手机的话,请不要太期待这个 Linux 手机。因为 Linux 手机的操作系统、功能和应用生态系统仍处于早期发展阶段,远远比不上与安卓或 iOS 手机。
- 然而Linux 手机的操作系统提供了最好的隐私功能,这会成为你想要出手买一部 Linux 手机的原因。
### 最好的 Linux 手机
#### 1、Librem🥇
**Purism** 公司是 Linux 手机市场上一个相当著名的品牌。Purism 公司推出的 **Librem 5 Linux** 智能手机支持 **PureOS**。PureOS 是一个专为 Linux 手机设计的操作系统,不基于安卓或 iOS 系统;并且它是一个开源的操作系统;它还支持 <ruby>融合<rt> convergence </rt></ruby>,这意味着你可以通过 USB 集线器将手机插入电脑显示器,并将其作为一个桌面操作系统使用🆒。
这款手机拥有优质的硬件和手感,并还十分注重安全和隐私。但是,这款令人印象深刻的智能手机价格有点贵,售价为 1299 美元💔。
#### Librem 5 Linux 的主要特点和规格
- 完全免费和开源的,基于 Linux 的移动操作系统PureOS
- 拥有独立的调制解调器、Wi-Fi 和蓝牙芯片
- 拥有 3 个专门的硬件键来启用和禁用互联网、相机、Wi-Fi 和蓝牙
- 拥有智能卡读卡器
- 拥有 SD 卡读卡器
- 电池可更换
![Librem 5][1]
| 规格 | 描述 |
| :- | :- |
| **屏幕** | 5.7 英寸(IPS TFT 720×1440) |
| **运行内存 RAM** | 3 GB |
| **内存** | 32 GB eMMC |
| **电池容量** | 4500 mAh |
| **CPU** | NXP i.MX 8M QUAD CORE Cortex-A53四核64 位 ARM最高主频为 1.5GHz |
| **GPU** | Vivante GC7000 Lite |
| **屏幕尺寸、材质、分辨率** | 5.7 英寸IPS TFT720×1440 像素 |
| **摄像头** | 带 LED 闪光灯的 1300 万像素(后置)摄像头和 800 万像素(前置)摄像头 |
| **USB 接口** | Type C 接口 |
有点兴趣?你可以进一步浏览 [Librem 5 的购买官网][2]。
#### 2、Pinephone🥈
Linux 手机榜单的第 2 名是 **Pinephone**。Pinephone 也许是市场上最完善、最实用的 Linux 手机了。它由 **Pine64** 公司开发,具有出色的功能,并是支持多种 Linux ARM 的移动发行版。
此外PinePhone 同时有很多个版本其中包括专业版本。PinePhone 的价格比较便宜,并且十分注重用户的隐私和可扩展性,如果你是第一次使用 Linux 手机PinePhone 将会是一个不错的选择😌。
#### Pinephone 的主要特点和规格
- 支持的操作系统有 KDE Plasma mobile、Manjaro mobile、Sailfish OS 和 Ubuntu touch。
- 配备启用和禁用 LTE、摄像头、Wifi/BT 和麦克风的 5 个开关
- 可启动的 microSD 和 16GB/32GB eMMC 的内存空间
- Type C 接口(可用于电源、数据和视频输出)
- 拥有 6 个 Pogo 引脚允许自定义硬件扩展如热像仪、无线充电、NFC、扩展电池盒或键盘盒。
- 拥有 3.5 毫米耳机插孔
- 支持融合,可将其插到一台电脑上
- 价格实惠2 种型号的售价分别为 149 美元和 199 美元起
![Pinephone][3]
| 规格 | 描述 |
| :- | :- |
| **屏幕** | 5.95 英寸,高清 IPS 电容式触摸屏 |
| **CPU** | Allwinner A64 ARM QUAD Core Cortex-A53四核64 位 |
| **GPU** | Mali-400 MP2 |
| **运行内存 RAM** | 2 种型号2GB 和 3GB LPDDR3 SDRAM |
| **内存** | 2 种型号16GB and 32GB eMMC. |
| **摄像头** | 500 万像素、1/4英寸、LED 闪光灯(后置)摄像头和 200 万像素、1/5英寸前置摄像头 |
| **电池** | 锂离子电池(容量为 2800 mAh |
| **音频插孔** | 3.5 毫米 |
想要入手你的第一部 Linux 手机?请进一步浏览 [Pinephone 的购买官网][4] 吧。
#### 3、Pro 1 X F(X)tec🥉
[**Pro 1 X** F(X)tec][5] 是一款提供各种操作系统选择的智能手机,因此它是 Linux 手机榜单中十分令人激动的一项产品。
Pro 1 X **支持各种操作系统**,例如 LineageOS、安卓、Ubuntu Touch 等。此外,一个**内置的滑出式键盘**使它看起来更加独特且十分有吸引力。
Pro 1 X 由伦敦的 **F(x)tec** 公司开发。它是 Linux 手机市场上新出的产品,很有前景。然而,这个手机还没有上市,计划在 2022 年 12 月开始发货。因此,你可能需要等待几天,才能看到别人对这部手机的评价。
![Pro 1 X][6]
#### Pro 1 X 的主要特点和规格
- 首款基于 Linux 的、有内置滑出式键盘的智能手机
- 支持 Ubuntu touch 操作系统,并有安卓选项
- 解锁的启动程序
- 拥有 3.5 毫米耳机插孔
- 拥有 AMOLED 显示屏
- 128 GB 内存/6 GB 运行内存:售价为 829 美元起
- 256 GB 内存/8 GB 运行内存:售价为 899 美元起
| 规格 | 描述 |
| :- | :- |
| **CPU** | Snapdragon 662 Qualcomm |
| **GPU** | Adreno 610 Qualcomm |
| **运行内存 RAM** | 2 种型号6GB 和 8GB LPDDR4 |
| **内存** | 128 GB可扩展至 2 TB |
| **屏幕** | 5.99英寸弧形边缘Corning® Gorilla® Glass 3分辨率为 2160 x 1080 像素的 AMOLED 显示屏) |
| **摄像头** | 1200 万像素 Sony IMX363后置摄像头和800万像素前置摄像头 |
| **电池容量** | 3200 mAh |
| **音频插孔** | 3.5 毫米 |
它的内置滑出式键盘有没有吸引到你呢?去 [pro 1 x 的购买官网][5] 看看吧。
#### 4、Volla Phone
[Volla Phone][7] 可以同时运行**两个操作系统Ubuntu Touch 和 VollaOS**。
VollaOS 是一个安卓操作系统的修改版没有谷歌同时也很注重用户的隐私Ubuntu Touch 是一个流行的 Linux 手机发行版。
#### Volla Phone 的主要特点和规格
- 没有谷歌及其服务
- 不依赖云计算
- 加密的设备存储
- 使用安卓操作系统的修改版Volla OS
- 支持的操作系统有 Ubuntu TouchManjaroSailfish OS
- 拥有 USB C 充电口
- 拥有 3.5 毫米耳机插孔
- 可以用指纹解锁
- 拥有离线地图
![Volla Phone][8]
| 规格 | 描述 |
| :- | :- |
| **CPU** | MediaTek Helio P23 |
| **GPU** | ARM Mali-G71 MP2  |
| **内存** | 64 GBeMMC |
| **运行内存 RAM** | 4 GB DDR3 RAM |
| **屏幕尺寸、材质、分辨率** | 6.3 英寸IPS2340×1080 像素 |
| **摄像头** | 1600万像素带闪光灯的后置摄像头和1600万像素前置摄像头 |
| **电池容量** | 4700 mAh |
| **USB 接口** | Type C 接口和 3.5 毫米音频插孔 |
这个手机看起来也很不错呢,不妨到 [Volla 的购买官网][9] 看看吧。
#### 5、Fairphone 4
[Fairphone 4][10] 是另一款具有模块化硬件的 Linux 智能手机。它支持 PostmarketOS 操作系统并使用安卓操作系统的修改版本FairPhone OS。这个手机的主要卖点是它的 <ruby>模块化<rt> modularity </rt></ruby>,你可以替换手机的任何模块:你可以毫不费力地更换它的电池🔋;此外,不仅仅是更换电池,你还可以简单地用螺丝刀来更换它的显示屏等部件。
#### Fairphone 4 的规格
| 规格 | 描述 |
| :- | :- |
| **CPU** | Octa-Core Kryo 570八核 |
| **运行内存 RAM** | 2 种型号6GB 和 8GB |
| **内存** | 2 种型号128GB 和 256GB |
| **GPU** | Adreno 619 |
| **屏幕** | 6.3 英寸全高清IPS |
| **摄像头** | 2 个 4800 万像素(后置)摄像头和 2500 万像素(前置)摄像头 |
| **电池** | 锂离子电池(容量为 3905 mAh|
| **芯片组** | Qualcomm SM7225 Snapdragon 750G |
进一步可浏览 [FairPhone 的购买官网][11]。
#### 是否有支持 Linux 操作系统的主流安卓手机呢?
如果你不想购买上述现成的 Linux 手机,那么你也可以在**安卓手机**上使用 Linux 移动操作系统,因为安卓是基于 Linux 内核上修改的。因此,这些手机应该也能使用 Ubuntu Touch 或 PostmarketOS 操作系统。
- Google Pixel 3a/3a XL
- Sony Xperia X (F5121 & F5122)
- Google Nexus 5
- OnePlus One
- 支持 Ubuntu Touch OS 操作系统的[完整列表][12]
- Xiaomi Redmi 2
- Xiaomi Mi Note 2
- OnePlus GT
- OnePlus 6
- 支持 PostmarketOS 操作系统的[完整列表][13]
### 结语
以上就是关于如今市场上最好的 Linux 手机的全部内容了。你可以从这些手机的官方网站上,了解更多信息。因为手机的隐私保护在当下变得越来越重要了,我相信在未来会有越来越多的人使用 Linux 手机。
诚然Linux 手机本身的功能及其操作系统比不上安卓和苹果 iOS 手机。但是,对于 Linux 手机来说,更重要的是它的标准的设立、全球购买的可行性、在这一新兴市场的低入门价格以及对 Linux 手机应用生态系统的大力投资。在 Linux 手机的生态系统中需要更简化的界面没有简单的界面Linux 手机将变得更加零散就像台式机一样。Linux 手机的制造商还需要和自由及开源软件FOSS参与者一起合作最终才能使 Linux 手机广受欢迎。
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/best-linux-phones/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[chai001125](https://github.com/chai001125)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed
[1]: https://www.debugpoint.com/wp-content/uploads/2022/12/Librem-5-image2.jpg
[2]: https://puri.sm/products/librem-5/
[3]: https://www.debugpoint.com/wp-content/uploads/2022/12/Pinephone.jpg
[4]: https://pine64.com/product-category/pinephone
[5]: https://www.fxtec.com/pro1x
[6]: https://www.debugpoint.com/wp-content/uploads/2022/12/Pro-1-X.jpg
[7]: https://volla.online/de/index.html
[8]: https://www.debugpoint.com/wp-content/uploads/2022/12/Volla-Phone.jpg
[9]: https://volla.online/de/shop/
[10]: https://shop.fairphone.com/en/buy-fairphone-4
[11]: https://shop.fairphone.com/
[12]: https://devices.ubuntu-touch.io/
[13]: https://wiki.postmarketos.org/wiki/Devices

View File

@ -0,0 +1,104 @@
[#]: subject: "Linux Mint Upgrade Tool: Usage Guide"
[#]: via: "https://www.debugpoint.com/mint-upgrade-tool/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Linux Mint 升级工具:使用指南
======
**以下是如何使用 Mint 升级工具升级到新的 Linux Mint 版本,即带有实际升级过程截图的 mintupgrade GUI。**
如果你正在寻找最近发布的 **Linux Mint 21 Vanessa** 的**详细升级**步骤,请阅读本指南👉[从 Linux Mint 20.3 升级到 21][1]
### Linux Mint 升级工具
Linux Mint 团队 [宣布][2]在几个月前,他们构建了一个新的程序来升级 Linux Mint 的重要版本。它被称为 “mintupgrade2”。开发已经完成目前正在支持和计划升级到主要版本例如 Linux Mint 20 到 21而不是小版本升级。
尽管你可以使用标准的 apt 命令升级版本,但 Mint 团队认为重大版本升级是棘手的。新用户很难进行无缝升级,因为它涉及终端和一系列复杂的命令步骤。
此外GUI 是一个封装器,具有 mintupgrade 程序的附加功能,它通过一键修复带来了一组系统前检查和升级过程。
此外mintupgrade 会进行基本检查,你是否连接到电源、系统是否是最新的、磁盘空间可用性等。
为了向你展示它的外观和工作情况,我们安装了一台 LMDE 4 测试机测试。
但在此之前,这里有一组功能:
- 完全由 GUI 驱动的升级过程
- 多语言支持
- 升级前检查:系统备份、电源、磁盘空间、已删除包列表
- 可配置
- 提醒你有关先前版本中的孤立包
- 它为你提供了解决问题的选项
### 它如何运作
当我们通过命令 `mintupgrade` 运行 mint 升级程序时GUI 友好的欢迎屏幕为你提供了一个很好的起点并开始升级过程。然后,它开始自己进行一系列检查。
![开始升级过程][3]
除此之外,当它在你的系统中发现问题时,它会停止并为你提供足够的详细信息。单击“修复”后,它可以再次恢复该过程。
这不是全部。如果由于网络或互联网或任何其他问题而中断,它可以恢复升级过程。
这个程序在我们的测试过程中在我们的测试系统中发现了以下错误,并且只需单击一下即可修复它们。
![Apt 缓存检查][4]
![Mint Upgrade 检测到系统快照不存在][5]
![检查孤立包][6]
![升级前状态][7]
![Mint Upgrade 可以检测需要降级的包][8]
最后,我们成功地将测试系统从 LMDE 4 升级到 LMDE 5。
![升级完成][9]
#### 如何获取此升级程序
使用以下命令可以轻松安装该程序。但是,如果你正在运行最新版本的 Linux Mint 21它应该已经安装并尝试从终端运行 mintupgrade。
```
sudo apt update
```
```
sudo apt install mintupgrade
```
### 结束语
最后,我认为它是 Linux Mint 团队最好的程序之一。正如你在上面看到的,它自己处理了许多错误。我所做的只是单击“修复”按钮。该程序足够智能,可以了解所有故障点并采取补救措施。
[GitHub 和 mintupgrade 源码][10]
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/mint-upgrade-tool/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed
[1]: https://www.debugpoint.com/upgrade-linux-mint-21-from-20-3/
[2]: https://www.debugpoint.com/2022/04/linux-mint-21-announcement/
[3]: https://www.debugpoint.com/wp-content/uploads/2022/04/Starting-the-upgrade-process.jpg
[4]: https://www.debugpoint.com/wp-content/uploads/2022/04/Apt-Cache-check.jpg
[5]: https://www.debugpoint.com/wp-content/uploads/2022/04/Mint-Upgrade-detects-that-system-snapshots-not-present.jpg
[6]: https://www.debugpoint.com/wp-content/uploads/2022/04/Check-for-Orphan-Packages.jpg
[7]: https://www.debugpoint.com/wp-content/uploads/2022/04/Status-before-upgrade.jpg
[8]: https://www.debugpoint.com/wp-content/uploads/2022/04/Mint-Upgrade-can-detect-the-packages-require-downgrade.jpg
[9]: https://www.debugpoint.com/wp-content/uploads/2022/04/Upgrade-Complete.jpg
[10]: https://github.com/linuxmint/mintupgrade