Merge pull request #10 from LCTT/master

praparing for sixth translation PR
This commit is contained in:
CanYellow 2023-01-07 12:17:36 +08:00 committed by GitHub
commit f29c1b0e8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 1943 additions and 527 deletions

View File

@ -3,24 +3,26 @@
[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99"
[#]: collector: "lkxed"
[#]: translator: "MjSeven"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15405-1.html"
为 Python 写一个 C++ 扩展模块
======
使用 C 扩展为 Python 提供特定功能。
![][0]
在前一篇文章中,我介绍了[六个 Python 解释器][1]。在大多数系统上CPython 是默认的解释器而且根据民意调查显示它还是最流行的解释器。Cpython 的独有功能是使用扩展 API 用 C 语言编写 Python 模块。用 C 语言编写 Python 模块允许你将计算密集型代码转移到 C同时保留 Python 的易用性
> 使用 C 扩展为 Python 提供特定功能
在本文中,我将向你展示如何编写一个 C++ 扩展模块。使用 C++ 而不是 C因为大多数编译器通常都能理解这两种语言。我必须提前说明缺点以这种方式构建的 Python 模块不能移植到其他解释器中。它们只与 CPython 解释器配合工作。因此,如果你正在寻找一种可移植性更好的与 C 语言模块交互的方式,考虑下使用 [ctypes][2]模块。
在前一篇文章中,我介绍了 [六个 Python 解释器][1]。在大多数系统上CPython 是默认的解释器而且根据民意调查显示它还是最流行的解释器。Cpython 的独有功能是使用扩展 API 用 C 语言编写 Python 模块。用 C 语言编写 Python 模块允许你将计算密集型代码转移到 C同时保留 Python 的易用性。
在本文中,我将向你展示如何编写一个 C++ 扩展模块。使用 C++ 而不是 C因为大多数编译器通常都能理解这两种语言。我必须提前说明缺点以这种方式构建的 Python 模块不能移植到其他解释器中。它们只与 CPython 解释器配合工作。因此,如果你正在寻找一种可移植性更好的与 C 语言模块交互的方式,考虑下使用 [ctypes][2] 模块。
### 源代码
和往常一样,你可以在 [GitHub][3] 上找到相关的源代码。仓库中的 C++ 文件有以下用途:
- `my_py_module.cpp`: Python 模块 _MyModule_ 的定义
- `my_py_module.cpp`: Python 模块 `MyModule` 的定义
- `my_cpp_class.h`: 一个头文件 - 只有一个暴露给 Python 的 C++ 类
- `my_class_py_type.h/cpp`: Python 形式的 C++ 类
- `pydbg.cpp`: 用于调试的单独应用程序
@ -29,7 +31,7 @@
### 构建模块
在查看源代码之前,你可以检查它是否能在你的系统上编译。[我使用 CMake][4]来创建构建的配置信息,因此你的系统上必须安装 CMake。为了配置和构建这个模块可以让 Python 去执行这个过程:
在查看源代码之前,你可以检查它是否能在你的系统上编译。[我使用 CMake][4] 来创建构建的配置信息,因此你的系统上必须安装 CMake。为了配置和构建这个模块可以让 Python 去执行这个过程:
```
$ python3 setup.py build
@ -48,7 +50,7 @@ $ cmake --build build
首先,看一下 `my_py_module.cpp` 文件,尤其是 `PyInit_MyModule` 函数:
``` cpp
```
PyMODINIT_FUNC
PyInit_MyModule(void) {
PyObject* module = PyModule_Create(&my_module);
@ -72,15 +74,15 @@ PyInit_MyModule(void) {
无论是声明还是实例,所有 Python 类型都是 [PyObject][5] 的一个指针。在此函数的第一部分中,`module` 通过 `PyModule_Create(...)` 创建的。正如你在 `module` 详述(`my_py_module`,同名文件)中看到的,它没有任何特殊的功能。
之后,调用 [PyType_FromSpec][6] 为自定义类型 MyClass 创建一个 Python [堆类型][7]定义。一个堆类型对应于一个 Python 类,然后将它赋值给 MyModule 模块。
之后,调用 [PyType_FromSpec][6] 为自定义类型 `MyClass` 创建一个 Python [堆类型][7] 定义。一个堆类型对应于一个 Python 类,然后将它赋值给 `MyModule` 模块。
_注意如果其中一个函数返回失败则必须减少以前创建的复制对象的引用计数以便解释器删除它们。_
### 指定 Python 类型
MyClass 详设在 [my_class_py_type.h][8] 中可以找到,它作为 [PyType_Spec][9] 的一个实例:
`MyClass` 详述在 [my_class_py_type.h][8] 中可以找到,它作为 [PyType_Spec][9] 的一个实例:
```cpp
```
static PyType_Spec spec_myclass = {
"MyClass", // name
sizeof(MyClassObject) + sizeof(MyClass), // basicsize
@ -92,7 +94,7 @@ static PyType_Spec spec_myclass = {
它定义了一些基本类型信息,它的大小包括 Python 表示的大小(`MyClassObject`)和普通 C++ 类的大小(`MyClass`)。`MyClassObject` 定义如下:
```cpp
```
typedef struct {
PyObject_HEAD
int m_value;
@ -104,7 +106,7 @@ Python 表示的话就是 [PyObject][5] 类型,由 `PyObject_HEAD` 宏和其
[PyType_Slot][10] 定义了一些其他功能:
```cpp
```
static PyType_Slot MyClass_slots[] = {
{Py_tp_new, (void*)MyClass_new},
{Py_tp_init, (void*)MyClass_init},
@ -119,7 +121,7 @@ static PyType_Slot MyClass_slots[] = {
要完成类型详述,还包括下面的方法和成员表:
```cpp
```
static PyMethodDef MyClass_methods[] = {
{"addOne", (PyCFunction)MyClass_addOne, METH_NOARGS, PyDoc_STR("Return an incrmented integer")},
{NULL, NULL} /* Sentinel */
@ -139,7 +141,7 @@ static struct PyMemberDef MyClass_members[] = {
`MyClass_new` 方法只为 `MyClassObject` 提供一些初始值,并为其类型分配内存:
```cpp
```
PyObject *MyClass_new(PyTypeObject *type, PyObject *args, PyObject *kwds){
std::cout << "MtClass_new() called!" << std::endl;
@ -156,7 +158,7 @@ PyObject *MyClass_new(PyTypeObject *type, PyObject *args, PyObject *kwds){
实际的初始化发生在 `MyClass_init` 中,它对应于 Python 中的 [\_\_init__()][14] 方法:
```cpp
```
int MyClass_init(PyObject *self, PyObject *args, PyObject *kwds){
((MyClassObject *)self)->m_value = 123;
@ -197,7 +199,7 @@ int MyClass_init(PyObject *self, PyObject *args, PyObject *kwds){
从 Python 类中调用相关的 C++ 类方法很简单:
```cpp
```
PyObject* MyClass_addOne(PyObject *self, PyObject *args){
assert(self);
@ -207,15 +209,15 @@ PyObject* MyClass_addOne(PyObject *self, PyObject *args){
}
```
同样,`PyObject` 参数(`self`)被强转为 `MyClassObject` 类型以便访问 `m_myclass`,它指向 C++ 对应类实例的指针。有了这些信息,调用 `addOne()` 类方法,并且结果以[ Python 整数对象][17]返回。
同样,`PyObject` 参数(`self`)被强转为 `MyClassObject` 类型以便访问 `m_myclass`,它指向 C++ 对应类实例的指针。有了这些信息,调用 `addOne()` 类方法,并且结果以 [Python 整数对象][17] 返回。
### 3 种方法调试
出于调试目的,在调试配置中编译 CPython 解释器是很有价值的。详细描述参阅[官方文档][18]。只要下载了预安装的解释器的其他调试符号,就可以按照下面的步骤进行操作。
出于调试目的,在调试配置中编译 CPython 解释器是很有价值的。详细描述参阅 [官方文档][18]。只要下载了预安装的解释器的其他调试符号,就可以按照下面的步骤进行操作。
#### GNU 调试器
当然,老式的 [GNU 调试器GDB][19]也可以派上用场。源码中包含了一个 [gdbinit][20] 文件,定义了一些选项和断点,另外还有一个 [gdb.sh][21] 脚本,它会创建一个调试构建并启动一个 GDB 会话:
当然,老式的 [GNU 调试器GDB][19] 也可以派上用场。源码中包含了一个 [gdbinit][20] 文件,定义了一些选项和断点,另外还有一个 [gdb.sh][21] 脚本,它会创建一个调试构建并启动一个 GDB 会话:
![Gnu 调试器GDB对于 Python C 和 C++ 扩展非常有用][22]
@ -225,7 +227,7 @@ GDB 使用脚本文件 [main.py][23] 调用 CPython 解释器,它允许你轻
另一种方法是将 CPython 解释器嵌入到一个单独的 C++ 应用程序中。可以在仓库的 [pydbg.cpp][24] 文件中找到:
```cpp
```
int main(int argc, char *argv[], char *envp[])
{
Py_SetProgramName(L"DbgPythonCppExtension");
@ -256,7 +258,7 @@ int main(int argc, char *argv[], char *envp[])
}
```
使用[高级接口][25],可以导入扩展模块并对其执行操作。它允许你在本地 IDE 环境中进行调试,还能让你更好地控制传递或来自扩展模块的变量。
使用 [高级接口][25],可以导入扩展模块并对其执行操作。它允许你在本地 IDE 环境中进行调试,还能让你更好地控制传递或来自扩展模块的变量。
缺点是创建一个额外的应用程序的成本很高。
@ -270,7 +272,7 @@ int main(int argc, char *argv[], char *envp[])
Python 的所有功能也可以从 C 或 C++ 扩展中获得。虽然用 Python 写代码通常认为是一件容易的事情,但用 C 或 C++ 扩展 Python 代码是一件痛苦的事情。另一方面,虽然原生 Python 代码比 C++ 慢,但 C 或 C++ 扩展可以将计算密集型任务提升到原生机器码的速度。
你还必须考虑 ABI 的使用。稳定的 ABI 提供了一种方法来保持旧版本 CPython 的向后兼容性,如[文档][31]所述。
你还必须考虑 ABI 的使用。稳定的 ABI 提供了一种方法来保持旧版本 CPython 的向后兼容性,如 [文档][31] 所述。
最后,你必须自己权衡利弊。如果你决定使用 C 语言来扩展 Python 中的一些功能,你已经看到了如何实现它。
@ -281,7 +283,7 @@ via: https://opensource.com/article/22/11/extend-c-python
作者:[Stephan Avenwedde][a]
选题:[lkxed][b]
译者:[MjSeven](https://github.com/MjSeven)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
@ -318,3 +320,4 @@ via: https://opensource.com/article/22/11/extend-c-python
[29]: https://github.com/hANSIc99/PythonCppExtension/blob/main/.vscode/launch.json
[30]: https://opensource.com/sites/default/files/2022-11/vscodium_debug_session.png
[31]: https://docs.python.org/3/c-api/stable.html
[0]: https://img.linux.net.cn/data/attachment/album/202301/02/173501o26htajatlpj0lqt.jpg

View File

@ -0,0 +1,133 @@
[#]: subject: "How I Fixed Buzzing Noise Coming from Speakers in Linux"
[#]: via: "https://itsfoss.com/buzzing-noise-speaker-linux"
[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15415-1.html"
如何修复 Linux 中扬声器发出的嗡嗡声
======
![][0]
我使用笔记本电脑很长时间了,但最近才切换到台式机上,以便进行远程工作。
我注意到我的扬声器不断发出嗡嗡声。这很烦人,让我头疼。我开始着手解决这个问题。了解问题的根本原因非常有趣。
我将分享我在 Linux 中修复扬声器嗡嗡声的经验。我发现它可以在同一硬件上对 Ubuntu、Debian 和 Pop OS 都有效。
需要考虑的一件事是,如果本指南不适合你,你可能遇到了严重的硬件问题。对于大多数用户来说,给定的方案应该可以解决问题。
**在尝试修复之前**
我试图让事情变得容易安全地遵循。你可以尝试临时修复,如果有效,则将更改永久化。但是,最好使用 Timeshift 制作系统快照。如果你在出现故障时很容易惊慌失措,你可以将系统恢复到之前的状态。
另外,检查你的声卡。在我的例子中,它是 `snd_hda_intel`。对于 USB 卡,它可以是 `snd_usb_audio`。你必须根据你的声卡更改命令。
```
cat /proc/asound/modules
```
### Linux 中扬声器发出嗡嗡声的原因
梳理了无数的论坛帖子和网站后,我了解了问题的根本原因。这是因为扬声器中的电容放电。它可以通过关闭声卡的省电设置来解决。
通过关闭省电,你允许系统在这些电容放电时为其充电。这类似于在一直充电时使用电话。
你可以使用给定的命令检查你的系统是否启用了声卡的省电设置:
```
cat /sys/module/snd_hda_intel/parameters/power_save
```
![power saving setting in sound card making buzzing sound in linux][1]
如果你像我一样输出是 `1`,那么省电功能已打开。因此,让我们看一下方案。
不用担心。这不会显著影响你的电池百分比,因为所示方法仅适用于声卡。
### 尝试修复嗡嗡声问题(临时)
我之所以包括临时方法是为了确定嗡嗡声是由于电容放电引起的,还是存在严重的硬件问题。
如果此临时方案有效,你可以继续使用永久方案。
第一步是切换到 root 用户:
```
sudo su
```
然后,执行给定的命令,它应该停止嗡嗡声直到下次启动:
```
echo 0 > /sys/module/snd_hda_intel/parameters/power_save
```
如果你使用的是 **USB 声卡**,则必须将 `snd_hda_intel` 替换为 `snd_usb_audio`,如下所示:
```
echo 0 > /sys/module/snd_usb_audio/parameters/power_save
```
如果上述技巧解决了问题,那么你必须使变更永久化。否则,下次重启系统时更改将丢失。
### 修复嗡嗡声问题(永久)
在这里,我将对内核参数进行更改。
将你的工作目录更改为 `/etc/modprobe.d`
```
cd /etc/modprobe.d
```
现在,创建一个名为 `audio_disable_powersave.conf` 的新文件,并使用给定命令使用 nano 文本编辑器打开:
```
sudo nano audio_disable_powersave.conf
```
并在该文件中放入以下行以永久关闭声卡中的省电设置:
```
options snd_hda_intel power_save=0
```
![fix buzzing sound in linux][2]
对于 **USB 声卡**,你需要使用 `snd_usb_audio`
```
options snd_usb_audio power_save=0
```
现在,[保存更改并退出 Nano 文本编辑器][3] 并按 `Ctrl+X` 键。重启你的系统,你就可以享受无噪音的工作空间。
### 总结
本指南解释了嗡嗡声的原因以及如何直接解决该问题。
同样,除了电容放电之外,你可能还有其他问题,因此你应该始终尝试临时方法。
让我知道你是否能够以这种方式解决 Linux 中扬声器发出的嗡嗡声。
--------------------------------------------------------------------------------
via: https://itsfoss.com/buzzing-noise-speaker-linux
作者:[Sagar Sharma][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/sagar/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/content/images/wordpress/2022/11/power-saving-setting-in-sound-card-making-buzzing-sound-in-linux.png
[2]: https://itsfoss.com/content/images/wordpress/2022/11/fix-buzzing-sound-in-linux.png
[3]: https://linuxhandbook.com/nano-save-exit/
[0]: https://img.linux.net.cn/data/attachment/album/202301/05/150250sqbeq35bh699r157.jpg

View File

@ -0,0 +1,150 @@
[#]: subject: "8 ideas for measuring your open source software usage"
[#]: via: "https://opensource.com/article/22/12/open-source-usage-metrics"
[#]: author: "Georg Link https://opensource.com/users/georglink"
[#]: collector: "lkxed"
[#]: translator: "CanYellow"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15411-1.html"
衡量你的开源软件使用情况的 8 个方法
======
![][0]
> 想知道如何为你的开源软件项目收集使用指标?考虑一下使用这些替代方案的利弊。
我们这些支持开源项目社区的人经常被问到很多有关使用指标的问题。这些指标通常是为了通过用户量和知名度来衡量软件的重要性。我们一般都想知道有多少人使用该软件,有多少次安装,以及有多少人生活接触过它。
但简而言之,我们尚无法直接回答上述问题。
如果你想要寻找一个明确的解决方案,那很抱歉要让你失望了。有关使用指标的问题,没有人有完美的答案,至少没有准确的答案。
好消息是,有一些近似的和替代指标至少能够部分地满足你对软件使用情况了解的渴求。本文探讨了这些替代方案以及它们的优点和缺点。
### 下载量
当你浏览提供软件的网站时,你通常可以看到软件的下载次数。映入我脑海的一个例子是 Firefox 它曾经有一个下载计数器。Firefox 的下载量是一个印象深刻的数字,给人的印象是 Firefox 是一个流行的浏览器,在一段时间内确实如此。
然而,个人行为会直接影响这一数字的准确性。举例而言,当一个人定期重置他们的设备时,每一次重建都会引发一次独立的下载。考虑到这一现实,需要设计一种方法从下载量中去除几十次(或许是几百次)的下载次数,因为那是一个人。
下载量不仅会高估使用量,还会低估使用量。例如,一个系统管理员可能会下载一个新版本的 Firefox 一次并将其拷贝到 U 盘上,然后安装到数百台设备上。
下载量指标是易于收集的,你可以在服务器上记录每一个下载请求。问题在于你不知道在这些软件下载以后会发生什么。下载它的人是否如预期的那样使用软件,还是遇到了问题而放弃了它。
对于开源项目而言,你可以考虑各种下载量指标,比如来自以下途径的下载指标:
- 项目官网
- 包管理器,比如 npm、PyPi 和 Maven
- 代码仓库,如 GitHub、GitLab、Gitee 等
你可能还对源代码的下载量感兴趣,因为下游项目更可能使用源代码形式(参见 [《如何衡量你的开源项目的影响》][1]一文)。相应的下载指标包括:
- 从代码仓库克隆的数量,比如 GitHub、GitLab 和 Gitee
- 从官网下载的归档文件tar、zip的数量
- 通过像 npm、PyPi 和 Maven 这样的包管理器下载的源代码数量
源代码的下载指标比二进制代码的下载指标更不可靠(虽然尚无相关研究表明如此)。试想一下,一名开发人员想要你的最新版本的源代码,并将他们的构建管道配置为每次构建都克隆你的仓库。再想象一下,一个自动构建过程失败了,它试图重新构建而不断地克隆你的版本库。你还可以考虑这样一个下载量低于预期的场景——源代码仓库在某些地方缓存了,下载来源是由这些缓存所提供的。
> **[相关阅读:跟踪你的开源社区的 5 个指标][2]**
总而言之,下载量指标是用于提供当前使用情况和探测趋势的很好的指征。我们无法明确地定义一次下载是如何转化为使用的。不过我们可以认为增加的下载量是更多潜在用户的标志。举例而言,如果你为你的软件做了广告并在活动期间得到了更高的下载量,可以合理地假定广告推动了更多人下载该软件。下载行为的来源与元数据还可以提供额外的与使用行为相关的内容。你的软件的哪些版本仍在使用中?什么操作系统或者特定语言的版本更加流行?这有助于社区决定将哪个平台的软件作为支持与测试的优先选项。
### 议题
作为一个开源项目,你可能有一个议题追踪器。当某个人提出一个议题时一般有两个目标,报告一个漏洞或者请求增加一项功能。提议者很可能已经使用过你的软件了。作为一名用户,他可能发现了一个漏洞或者发现了对一个新功能的需求。
很明显,大多数用户不会执行额外的步骤来提交议题。提议者是我们的忠实用户,我们对他们表示感谢。此外,通过提出议题,他们已经成为了非代码贡献者,他们也有希望成为代码贡献者。经验法则是大约每 10000 名用户中,可能有 100 名提议者,以及 1 名代码贡献者。当然取决于用户类型,上述比例可能有出入。
回到指标问题,你可以将提议者数量作为评估使用量的下界。相关的指标包括:
- 提议者数量
- 活跃提议者的数量(在过去 6 个月内提出议题的提议者)
- 同时有代码贡献的提议者的数量
- 尚未解决的议题的数量
- 对议题发布的评论数量
### 邮件列表、论坛和问答网站
很多开源项目都拥有用户邮件列表、论坛,并且出现在类似 Stack Overflow 的问答网站上。与提问者一样,在这些地方发帖的人可被视作用户的冰山一角。与邮件列表、论坛和问答网站上的社区活跃程度相关的指标也可用于反映用户数量的上升或下降。相关指标可以集中于以下地方的活动,包括:
- 用户邮件列表的订阅量
- 论坛用户的数量
- 问题的数量
- 答案的数量
- 发布信息的数量
### 上报功能
为了获得精确的用户数量,一个方案是让软件在使用时上报信息。
这是令人毛骨悚然的。想象一下,系统管理员的防火墙报告了一个非预期的到你的服务器的网络连接,你不仅无法再收到软件报告(被防火墙拦截了),恐怕连你的软件也可能在未来被禁止使用。
负责任的设置上报功能的方式为设置一项可选服务来检查更新并让用户知道使用最新版本。另一项可选功能可以集中在使用遥测上,你可以通过该功能询问用户是否允许匿名上报软件使用情况。如果经过深思熟虑的实施,这种方式可以允许用户通过他们使用软件的方式帮助优化软件。用户可以持有这样的意见:我一般不允许这种使用信息的分享;但对于一些软件,因为希望开发人员在长期内将软件优化得更好,我愿意这样做。
### 星标与复刻
星标与复刻是如 GitHub、GitLab、Gitee 等社交化编程平台的功能。这些平台上的用户可以给一个项目加星标。为什么他们要给项目加星标呢GitHub 的文档作出了解释:你可以给一个仓库和主题加星标,以跟踪感兴趣的项目,和在你的新闻订阅中发现相关的内容。给一个项目加星标与将其加入书签的效果一样,并且还提供了一种向项目仓库的维护者展示赞赏的方式。星标的数量已经成为了项目流行程度的标志。当一个项目发布重大公告并获得相当的关注时,项目的星标数量会呈上升趋势。星标的数量指标并不反映软件的使用量。
在社交化编程平台上的<ruby>复刻<rt>Fork</rt></ruby>是将项目仓库复制一份在自己名下。仓库的非维护者可以在他们自己的克隆仓库中做修改,并将修改通过<ruby>拉取请求<rt>pull request</rt></ruby>PR的方式提交审核。复刻比星标更能反映软件社区的规模。开发者也可能为了保存一份代码副本而克隆一个项目以便在原始仓库消失后他们仍能访问代码。因为复刻功能在代码贡献工作流中的应用复刻量是衡量开发社区的良好指标。复刻量通常也不反映非开发人员的使用因为非开发人员一般不创建复刻。
### 社交媒体
包括 Facebook、Instagram、LinkIn、Reddit、Twtter 等社交媒体平台提供了相同兴趣的人们聚集的平台。采用社交媒体策略,开源项目可以通过在平台上设置相应的聚集空间来吸引对项目感兴趣的人们。通过这些社交媒体途径,开源项目可以分享项目新闻、更新,指出贡献者和用户。这些社交媒体途径还可以用于认识那些本不会通过其他途径与项目互动的人。
我在犹豫是否建议关注以下指标,因为它与软件的真实使用量没有清晰的联系,并通常需要分析其中的积极、消极和中性的情绪。人们可能因为很多不同的原因对你的项目感到激动而关注它,但并不实际使用它。然而与之前已经讨论过的指标一样,能够在社交媒体上吸收人群本就是项目受关注的整体指标。不同社交媒体平台的指标包括:
- 关注者与订阅者的数量
- 消息的数量
- 活跃的消息作者的数量
- 喜欢、分享、回复以及其他交互的数量
### 网站分析与文档
网站流量也是一个有用的指标。这一指标主要受到你的服务范围以及市场营销活动影响,而不是用户量。然而,我们还有一张王牌:我们的用户文档、教程、手册以及 API 文档。我们可以发现我们的网站以及文档中的什么主题更引人注意。文档的访问者数量应当大致随着软件的使用者数量增长而增长。因此我们可以通过网站的访问量探知对项目的普遍兴趣,并进一步通过观察文档的访问者来观察用户风向。这些指标包括:
- 网站访问者数量
- 文档访问者的数量
- 访问者在你的网站与文档上所花的时间
### 活动
活动的指标可以在你主持与项目相关的活动时使用。这是建立社区的很好的方式。有多少人提交摘要想要在你的活动中发言?有多少人出席你的活动?不论是在线下活动还是线上活动这可能都很有趣。当然,你如何推广你的活动在很大程度上决定有多少人到场。同时你可以将自己的活动与人们出行的大型活动放在一起以方便人们参加你的活动。只要你使用一贯的活动策略,你可以通过演讲者提交的材料与参会者注册的增加来表征软件受欢迎程度与用户群的增加。
你并不需要举办你自己的活动来收集有用的指标。如果你在开源活动中主持有关你项目的讨论,你可以衡量有多少人出席主要关注你的项目的会议。像 [FOSDEM][T1] 这样的活动,一些讨论特别聚焦于开源项目的更新与发布,会议室中都挤满了人(像 FOSDEM 的所有会议一样)。
你可以考虑如下指标:
- 以你的项目为中心的活动的出席人数
- 提交到以你的项目为中心的活动的演讲数量
- 以你的项目为中心的演讲的出席人数
### 关于估算开源软件使用的结论
正如我们已经如上展现的,有很多指标可以反映软件使用的趋势,没有一个指标是完美的。在大多数情况下,这些指标可能被个人行为、系统设计和噪音所严重影响。因此,考虑到每一个指标的相对不确定性,我们建议你不要孤立地使用任何一个指标。但是如果你从不同的来源收集了一系列的指标,你应当能够探测到用户行为与软件使用的趋势。如果你有办法在多个具有共性的开源项目中比较同一组指标,例如类似的功能、强大的相互依赖性、在同一基础设施上托管,以及其他特征,你就可以提升你对用户行为基线的感知。
需要注意的是,在这篇概述中,我们选择突出能够评估直接使用情况的指标。而大多数软件都依赖于其他各种软件包,如果我们不提及作为软件依赖链的一部分而被间接使用的严重影响,这就是我们的疏忽。因此,我们建议将上下游依赖的合计数量作为你的分析中的另一层内容。
最后,作为数据与指标的使用者,我们鼓励你认识到你的利益相关方的权利与责任。你发布的任何指标都有可能影响用户行为。最好的做法是经常一同分享你的背景信息——基础、来源、估算方法和其他关键上下文信息,这有助于其他人解释你的结果。
感谢 [CHAOSS][T2] 社区在爱尔兰都柏林举行的 CHAOSScon EU 2022 上的富有洞察力的对话,上述对话激发这篇博文的想法。我们还要感谢 CHAOSS 社区的成员审阅并帮助优化本文。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/12/open-source-usage-metrics
作者:[Georg Link, Sophia Vargas][a]
选题:[lkxed][b]
译者:[CanYellow](https://github.com/CanYellow)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/georglink
[b]: https://github.com/lkxed
[1]: https://opensource.com/article/18/5/metrics-project-success
[2]: https://opensource.com/article/22/11/community-metrics
[T1]: https://fosdem.org/
[T2]: https://chaoss.community
[0]: https://img.linux.net.cn/data/attachment/album/202301/04/173129vmnstoxnzmjlnsxw.jpg

View File

@ -0,0 +1,130 @@
[#]: subject: "How to Update Flatpak Packages in Linux"
[#]: via: "https://itsfoss.com/update-flatpak/"
[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15408-1.html"
如何在 Linux 中更新 Flatpak 软件包
======
![][0]
我相信几乎所有的 Linux 用户都会保持他们系统的更新。
但这种更新通常是针对默认的 [包管理器][1]。例如,[更新 Ubuntu][2] 往往意味着更新所有的 APT 软件包。
然而,还有其他的打包格式,如 Snap 和 Flatpak。Snap 应用程序会自动更新,但 Flatpak 不会。
那么你如何更新 Flatpak 软件包呢?好吧,你可以用这个命令来更新所有已安装和可更新的 Flatpak 包:
```
flatpak update
```
这很简单。但让我再讨论一下关于更新 Flatpak 的一些事情,比如说:
- 更新所有或特定的 Flatpak 包
- 通过软件中心更新 Flatpak 包
让我们先从终端的方法开始。
### 方法 1使用终端来更新 Flatpak 包
首先让我从最实用的方法开始,你也应该从这个方法开始。
#### 更新每一个过时的 Flatpak 包
更新现有的 Flatpak 包的整个目录是很容易的。
输入给定的命令,就可以得到过期包的列表:
```
flatpak update
```
![update flatpak packages in linux][3]
你只需输入 `Y` 并按下回车键,就能搞定每一个更新。
#### 更新特定的 Flatpak 包
要更新特定的软件包,你需要可以更新的软件包的列表。你用的是你之前看到的那个命令。
```
flatpak update
```
![update flatpak packages in linux][4]
从输出中复制你要更新的软件包的名称。在以下命令中使用软件包的名称:
```
flatpak update package_name
```
例如,如果你想更新 Telegram下面的命令可以完成这项工作
```
flatpak update org.telegram.desktop
```
![update specific package in flatpak][5]
这就完成了。
### 方法 2从软件中心更新 Flatpak 应用
有 Flatpak 内置支持的发行版会在软件中心提供 Flatpak 应用的更新。Fedora 和 Linux Mint 就是这样的发行版。
但如果你使用的是 Ubuntu你就需要在 GNOME 软件中心添加 Flatpak 支持:
```
sudo apt install gnome-software-plugin-flatpak
```
完成后,你将在 Ubuntu 中拥有两个软件中心。这是因为默认的软件中心不是 GNOME 的,而是 Snap Store。
从系统菜单中打开这个新的软件中心:
![open software center in ubuntu][6]
进入“<ruby>更新<rt>Update</rt></ruby>”页面,你会发现过时的软件包列表。这包括 APT 和 Flatpak 软件包。
![update flatpak from software center][7]
在这里,你可以一次更新所有的软件包,或者你可以有选择地更新什么。
### 总结
许多 Linux 桌面用户往往忘记更新 Flatpak 软件包,因为它们不包括在定期的系统更新中。
由于 Flatpak 是一个沙盒式的打包解决方案,你可能不会面临任何与过时的软件包有关的问题,但你肯定会错过新的功能和修复。
这就是为什么我建议每隔几周运行一次 Flatpak 更新命令。
我希望你喜欢这个快速的 Flatpak 小技巧。
--------------------------------------------------------------------------------
via: https://itsfoss.com/update-flatpak/
作者:[Sagar Sharma][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/sagar/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/package-manager/
[2]: https://itsfoss.com/update-ubuntu/
[3]: https://itsfoss.com/content/images/wordpress/2022/12/3.-update-flatpak-packages-in-linux.png
[4]: https://itsfoss.com/content/images/wordpress/2022/12/3.-update-flatpak-packages-in-linux.png
[5]: https://itsfoss.com/content/images/wordpress/2022/12/4.-update-specific-package-in-flatpak.png
[6]: https://itsfoss.com/content/images/wordpress/2022/12/1.-open-software-center-in-ubuntu.png
[7]: https://itsfoss.com/content/images/wordpress/2022/12/2.-update-flatpak-from-software-center.png
[0]: https://img.linux.net.cn/data/attachment/album/202301/03/154131lop17rnnrkiprkl7.jpg

View File

@ -3,58 +3,63 @@
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15404-1.html"
# Linux QtFM 文件管理器的 3 个令人愉快的功能
Linux QtFM 文件管理器的 3 个令人愉快的功能
======
QtFM 是一个简单的文件管理器,旨在通过快速直观的界面提供文件管理的基本功能。它适用于 Linux、BSD 和 macOS。
![][0]
> 这个 Linux 文件管理器做了你所期望的一切,没有留下不愉快的惊喜。但这里有一些令人惊喜的事情,使它值得一试。
QtFM 是一个简单的文件管理器,旨在通过一个快速直观的界面提供文件管理的基本功能。它适用于 Linux、BSD 和 macOS。
QtFM顾名思义使用 Qt规范发音为 “cute”编程工具包。我在 C++ 和 Python 中使用过 Qt 工具包,使用它总是一种乐趣。它是跨平台的,具有多个有用的抽象级别,因此开发人员不必直接与特定于供应商的 SDK 交互,而且它具有高度可配置性。从用户的角度来看,无论你使用的是最新的硬件还是[旧计算机][1],这都是一种“自然”且快速的体验。
### 使用 QtFM
QtFM 没有太多内容。它专注于实现其名称所声称的Qt 的文件管理器 (FM)。布局可能是你对文件管理器的期望:左侧是常用位置和设备的列表,右侧是文件列表。
QtFM 没有太多内容。它专注于实现其名称所声称的Qt 的文件管理器FM。其布局可能是你对文件管理器的期望:左侧是常用位置和设备的列表,右侧是文件列表。
![QtFM file manager][2]
它只有四个菜单
它只有四个菜单
- **文件**:创建新文件或文件夹,打开新选项卡或窗口,或退出应用。
- **编辑**:在左侧面板中复制、粘贴、移至垃圾箱或创建新书签。
- **视图**:在列表视图和图标视图之间切换,调整布局。
- **帮助**:许可信息和在线文档链接。
- <ruby>文件<rt>File</rt></ruby>:创建新文件或文件夹,打开新选项卡或窗口,或退出应用。
- <ruby>编辑<rt>Edit</rt></ruby>:在左侧面板中复制、粘贴、移至垃圾箱或创建新书签。
- <ruby>视图<rt>View</rt></ruby>:在列表视图和图标视图之间切换,调整布局。
- <ruby>帮助<rt>Help</rt></ruby>:许可信息和在线文档链接。
与 QtFM 交互与你可能习惯使用的任何标准文件管理器的体验大致相同。你可以点击导航、在其默认应用中打开文件、拖放文件和文件夹、复制和粘贴文件和文件夹、启动应用,以及你在与计算机内容交互时执行的任何其他操作。它很熟悉,所以基本上没有学习曲线,也没有不愉快的惊喜。
然而,也有一些惊喜。这是我最喜欢的三个。
### 1. 将命令放入上下文菜单
### 1将命令放入上下文菜单
使用 QtFM你可以将可以在终端中运行的任何命令添加到右键单击上下文菜单中。例如假设你想要一个将图像转换为 [webp 格式][3]的选项到右键菜单。无需学习复杂的框架或脚本语言,无需开发插件。你只需 3 个步骤即可完成:
使用 QtFM你可以将可以在终端中运行的任何命令添加到右键单击上下文菜单中。例如假设你想要一个将图像转换为 [webp 格式][3] 的选项到右键菜单。无需学习复杂的框架或脚本语言,无需开发插件。你只需 3 个步骤即可完成:
- 转到**编辑**菜单并选择**设置**
- 单击**自定义操作选项卡**
- 单击**添加**按钮并输入要运行的命令,对源文件使用 `%f`,对新文件使用 `%n`
- 转到<ruby>编辑<rt>Edit</rt></ruby>” 菜单并选择 “<ruby>设置<rt>Settings</rt></ruby>
- 单击<ruby>自定义操作选项卡<rt>Custom actions tab</rt></ruby>
- 单击<ruby>添加<rt>Add</rt></ruby>” 按钮并输入要运行的命令,用 `%f` 代表源文件,用 `%n` 代表新文件
![QtFM custom actions][4]
该操作现在出现在你的 QtFM 上下文菜单中。
### 2. 灵活的布局
### 2灵活的布局
Qt 工具包的内置功能之一是它的许多组件“小部件”是可分离的。QtFM 利用了这一点,并允许你从**视图**菜单中解锁其布局。解锁后,你可以拖动工具栏和侧面板,将它们固定在窗口周围的新位置。我能够将菜单栏、导航工具栏和 URI 字段组合到一个统一的面板中,并且为了方便,我在窗口的右侧放置了一个文件树。
Qt 工具包的内置功能之一是它的许多组件“小部件”是可分离的。QtFM 利用了这一点,并允许你从<ruby>视图<rt>View</rt></ruby>菜单中解锁其布局。解锁后,你可以拖动工具栏和侧面板,将它们固定在窗口周围的新位置。我能够将菜单栏、导航工具栏和 URI 字段组合到一个统一的面板中,并且为了方便,我在窗口的右侧放置了一个文件树。
![QtFM unlocking the layout][5]
这不需要应用设计甚至配置的特殊知识。你只需解锁、拖放和锁定。
### 3. 标签视图
### 3标签视图
许多 Linux 文件管理器提供选项卡的方式与大多数 Web 浏览器相同。这是一个简单的界面技巧可让你方便地保留多个位置。我不知道它是否真的节省了时间但我总觉得它确实如此。QtFM 也提供选项卡,我特别喜欢它实现选项卡的方式有两点。
首先,选项卡默认位于窗口底部(你可以在**设置**中更改它)。因为我倾向于从左到右、从上到下阅读,所以我通常更喜欢在窗口的底部和右端设置“额外”信息。当然,“额外”信息的构成因用户而异,因此我不会责怪任何开发人员将小部件和面板放置在我不会放置小部件和面板的地方。不过,当开发人员不小心同意我的偏好时,这很好。
首先,选项卡默认位于窗口底部(你可以在<ruby>设置<rt>Settings</rt></ruby>中更改它)。因为我倾向于从左到右、从上到下阅读,所以我通常更喜欢在窗口的底部和右端设置“额外”信息。当然,“额外”信息的构成因用户而异,因此我不会责怪任何开发人员将小部件和面板放置在我不会放置小部件和面板的地方。不过,当开发人员不小心同意我的偏好时,这很好。
其次,标签是响应式的。只需将鼠标悬停在目标选项卡上,即可将文件或文件夹从一个选项卡拖动到另一个选项卡中。感觉就像从一个窗口拖放到另一个窗口一样自然。
@ -66,7 +71,7 @@ Qt 工具包的内置功能之一是它的许多组件(“小部件”)是
$ sudo apt install qtfm
```
如果你的发行版不提供 QtFM你可以在其[网站][6]上找到它的软件包,或者你可以从它的 [Git 仓库][7]下载源码。
如果你的发行版不提供 QtFM你可以在其 [网站][6] 上找到它的软件包,或者你可以从它的 [Git 仓库][7] 下载源码。
---
@ -75,7 +80,7 @@ via: https://opensource.com/article/22/12/linux-file-manager-qtfm
作者:[Seth Kenlon][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者 ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux 中国](https://linux.cn/) 荣誉推出
@ -88,3 +93,4 @@ via: https://opensource.com/article/22/12/linux-file-manager-qtfm
[5]: https://opensource.com/sites/default/files/2022-12/qtfm-layout-unlock.webp
[6]: https://qtfm.eu/
[7]: https://github.com/rodlie/qtfm/
[0]: https://img.linux.net.cn/data/attachment/album/202301/02/170250zuwyuzzr9o3myl3l.jpg

View File

@ -0,0 +1,87 @@
[#]: subject: "Ultramarine Linux 37 Release Adds Pop OS-Style KDE Plasma, Drops Cutefish"
[#]: via: "https://debugpointnews.com/ultramarine-linux-37-release/"
[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/"
[#]: collector: "lkxed"
[#]: translator: "wxy"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15410-1.html"
Ultramarine Linux 37 版本发布
======
![][1]
> Ultramarine Linux 的新版本来了。Ultramarine Linux 37 带有新的自定义软件仓库、KDE Plasma 特色版等等。
如果你不知道Ultramarine Linux 是一个基于 Fedora 的发行版,提供了 Budgie、Pantheon、GNOME 等桌面环境。这个发行版通过这些令人赞叹的桌面环境给你提供了最好的 Fedora 体验。
最近,这个小项目被 [FyraLabs][2] 收购,后者是 PhotonBrowser 和 tauOS 背后的公司。而这使得 Ultramarine 项目有了必要的人力和资金来继续建设他们的发行版。
自 Fedora 37 发布以来,该团队一直致力于重件当前版本,这包括采用新的基础设施和 CI/CD 管道迁移。终于Ultramarine Linux 37 登场了。
那么,它有什么新东西呢?
### Ultramarine Linux 37 的新功能
自从被 Fyralabs 收购后,该团队升级并迁移到用于自动化 CI/CD 构建的 GitHub Actions。Ultramarine 自己的软件仓库用于分发其精心组织的软件包(例如 Pantheon 桌面),它在这个版本中会发生变化,并转移到 FyraLabs 的基础设施上。
因此,如果你正在运行 Ultramarine 36 版本,它可能无法正常工作。你最好重新安装这个版本,因为显然没有从 36 版到 37 版的升级路径。
此外Ultramarine 37 为 Fedora 软件包引入了一个名为 [Terra][3] 的滚动仓库,其中包括数百个 Fedora 不提供的应用程序。你可以认为它类似于 [RPM Fusion][4],尽管有所不同。
要了解更多,请访问 [本页][3] 或从命令行添加以下软件仓库:
```
sudo dnf config-manager --add-repo https://terra.fyralabs.com/terra.repo
```
事实上,这开启了一种可能性,因为你也可以尝试在 Fedora Linux 中谨慎地使用它。如果上述软件仓库能在普通的 Fedora 安装中开箱即用,那就更棒了。
在上述变化的基础上Ultramarine Linux 37 首次引入了 KDE Plasma 作为官方版本。KDE Plasma 特色版带来了含有 Latte Dock 和 Lightly Qt 主题的 Pop OS 风格外观。
![Ultramarine Linux 37 具有独特的 Pop OS 风格的 KDE Plasma 主题][5]
Ultramarine Linux 37 也放弃了 Cutefish 桌面,因为它目前正处于 [混乱的开发状态,没有可见的路线图][6]。这是该团队的一个很好的决定,因为打包一个已经停止的项目是没有意义的。
Budgie 桌面旗舰版使用上游的 Fedora 软件包有更多的默认应用程序。最近Fedora Linux 删除了对 elementary OS 的 Pantheon 桌面的支持,很遗憾。感谢 Ultramarine Linux 开发者,你仍然可以体验它,因为它已经被转移到新的 Terra 软件仓库中。
你应该庆幸Ultramarine Linux 是唯一一个的基于 Fedora 的支持令人赞叹的 Pantheon 桌面的发行版。
最后Ultramarine Linux 37 的核心基于 [Fedora 37][7],采用 Linux 主线内核 6.0。因此,所有更新的软件包和工具链都在这个版本中。
所以这就是关于这个版本的总结。请继续关注几天后对这个版本的官方点评。如果有兴趣你可以在这里阅读之前的版本36的评论。
> **[Ultramarine Linux带有 Budgie、Cutefish 和 Pantheon 桌面的终极 Fedora 特色版][8]**
### 下载和升级
由于没有升级路径,建议你对该版本进行全新安装。你可以在下面下载各个桌面环境的 ISO 文件。
> **[下载 Ultramarine Linux 37][9]**
参考自:[发布公告][10]。
--------------------------------------------------------------------------------
via: https://debugpointnews.com/ultramarine-linux-37-release/
作者:[arindam][a]
选题:[lkxed][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://debugpointnews.com/author/dpicubegmail-com/
[b]: https://github.com/lkxed
[1]: https://debugpointnews.com/wp-content/uploads/2023/01/ultra37head.jpg
[2]: https://twitter.com/UltramarineProj/status/1579991853478182914
[3]: https://terra.fyralabs.com/
[4]: https://www.debugpoint.com/enable-rpm-fusion-fedora-rhel-centos/
[5]: https://debugpointnews.com/wp-content/uploads/2023/01/Ultramarine-Linux-37-with-unique-Pop-OS-style-KDE-Plasma-Theme.jpg
[6]: https://www.debugpoint.com/cutefish-development-restarts/
[7]: https://debugpointnews.com/fedora-37-release-accouncement/
[8]: https://www.debugpoint.com/ultramarine-linux-36/
[9]: https://repos.fyralabs.com/isos/ultramarine/37/
[10]: https://github.com/Ultramarine-Linux/build-scripts/releases/tag/37-1.0

View File

@ -0,0 +1,68 @@
[#]: subject: "Official Fedora Budgie & Sway Spins to Arrive With Fedora 38 Release"
[#]: via: "https://news.itsfoss.com/fedora-budgie-sway-official/"
[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/"
[#]: collector: "lkxed"
[#]: translator: "wxy"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15418-1.html"
Fedora 38 将发布 Budgie 和 Sway 官方定制版
======
> 两款新的 Fedora 定制版将在 Fedora 38 发布时首次亮相。
![][1]
我们期待着它们在 Fedora 37 时出现,但在 Fedora 38 中终于来了!
早在 2022 年 5 月Budgie 项目的主要开发者 Joshua Strobl [宣布][2]Budgie 已被提交到 Fedora 中。
遗憾的是,在那之后不久,我们并没有看到任何官方 [Fedora 定制版][3] 发布的迹象,尽管它在 [Fedora 37 发布][4] 期间进入了 Fedora 软件库。
**但现在有了。**
随着 Fedora 38 的发布,看起来我们会得到一个 [Budgie][5] 的官方定制版,同时还有一个 [Sway][6] 窗口管理器的定制版。
### Fedora Budgie 和 Sway
在 [最近的一次会议][9] 上Fedora 工程和指导委员会FESCo投票决定将 Budgie 和 Sway 窗口管理器的 Fedora 官方定制版纳入 Fedora 38 的发布中。
根据 Budgie 和 Sway 的初步修改建议,我们可以期待很多变化。
对于 Budgie
- Fedora 38 将提供 Budgie 桌面环境,包含一套核心应用程序,如用于更新/软件包管理的 GNOME “软件”应用、一个文本编辑器、一个网页浏览器和一个终端。
- 它还将使用 [Materia GTK][10] 和 [Papirus][11] 图标主题,整个系统采用 GTK 主题设计。
- Budgie 定制版还将采用 lightdm + slick-gtk-greeter以获得更直观的用户问候体验。
对于 Sway 定制版:它旨在提供一个极简体验,只包括默认配置之上的一些元素。
预期时间:随着 Fedora 38 的开发在未来几个月内的加快,你可以期待这些定制版在 2023 年 4 月期间出现。当然,会有预装了 Budgie 和 Sway 的单独 ISO 文件。
因此,我认为看到 Budgie 与 Fedora 的体验会非常吸引人,特别是当 Budgie 的开发似乎正在发生一些有趣的变化。
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/fedora-budgie-sway-official/
作者:[Sourav Rudra][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/sourav/
[b]: https://github.com/lkxed
[1]: https://news.itsfoss.com/content/images/size/w2000/2023/01/fedora-budgie-sway-spins-arrive.png
[2]: https://www.reddit.com/r/Fedora/comments/uq3gah/budgie_desktop_has_now_been_submitted_for/
[3]: https://spins.fedoraproject.org
[4]: https://news.itsfoss.com/fedora-37-release/
[5]: https://blog.buddiesofbudgie.org
[6]: https://swaywm.org
[7]: https://unlocator.com/favicon.ico
[8]: https://unlocator.com/wp-content/uploads/2019/05/unlocatoricon.jpg
[9]: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/RNJZUX3ZI34DIX6E4PVDKYQWCOFDQ4UY/
[10]: https://github.com/nana-4/materia-theme
[11]: https://github.com/PapirusDevelopmentTeam/papirus-icon-theme

View File

@ -0,0 +1,81 @@
[#]: subject: "Nitrux 2.6.0 Takes Bold Steps: Drops apt, Adds Flathub and Pipewire"
[#]: via: "https://debugpointnews.com/nitrux-2-6-0-release/"
[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Nitrux 2.6.0 Takes Bold Steps: Drops apt, Adds Flathub and Pipewire
======
![][1]
**Nitrux 2.6.0 arrives with Flathub, Pipewire by default, latest Kernel and KDE framework.**
![Nitrux 2.6.0 Desktop][2]
[Nitrux Linux][3]is based on Debian, which features a modified version of the KDE Plasma desktop called NX Desktop. This unique Linux distribution brings its own set of Nitrux applications built upon Maui kit and Qt. Nitrux is systemd-free and uses OpenRC as an init system. With all these unique features and stunning looks, it is one of the best Linux distributions today.
Nitrux 2.6.0 is bumped up to be a considerable major version due to critical updates since its prior release, 2.5.1 in December.
### Nitrux 2.6.0: Whats New
A major focus of this release is the introduction of the Plasma Wayland session in the SDDM display manager. Its not default yet. But available as optional. X11 is still default. I believe in the next major release; the NItrux team can enable Wayland by default.
In addition, the modern sound manager Pipewire is now default, as it was already standardized in Ubuntu and Fedora and feels stable. Thanks to Pipewire, your audio workflow will be much better.
Nitrux 2.6.0 also enables the largest Flatpak app repo Flathub, by default. That means you do not need to set up Flatpak & enable Flathub anymore manually. Installation of the Flatpak apps is now much easier.
Other noteworthy changes include, Nitrux making the root (/) partition immutable to prevent it from breakage, the Samba package now part of Nitrux default install, and the Calamares installer getting a customized auto partition scheme.
![Nitrux 2.6 install automatic partition][4]
From the beginning, Nitrux prefers self-contained executables for its entire desktop components. The primary choice was the AppImage file format. You get Flathub set up by default in this release, whereas the popular apt package manager is now dropped. This might change some users workflow because the apt command wont work; despite being based on Debian.
Hence, the Nitrux team suggested using the Distrobox containers to set up the separate skeleton to be used with apt. However, it will be a little difficult for general users to understand the container, immutable root partition.
![apt is not dropped][5]
The irony is apt will be used during installation because Calamares needs it. However, it will be removed after installation is complete.
> The Live ISO _includes APT and dpkg, but this is because Calamares needs them to complete the installation and will be removed from the installed system._Nitrux team
At its core, Nitrux 2.6.0 features liqurix Kernel 6.1 aligned with gaming and multimedia. This version is powered by KDE Plasma 2.26.4, KDE Framework 5.101.0 and Qt 5.15.7 LTS.
Detailed release notes are available [here][6] if you want to read more.
### Download
You can download this version from the following pages. However, there is no upgrade path available. Hence it is recommended to do a fresh installation.
- [FOSS Torrents (Torrent)][7]
- [Sourceforge (mirror)][8]
- [OSDN (mirror)][9]
Via [announcement][10]
--------------------------------------------------------------------------------
via: https://debugpointnews.com/nitrux-2-6-0-release/
作者:[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/2023/01/nitrux-head.jpg
[2]: https://debugpointnews.com/wp-content/uploads/2023/01/Nitrux-2.6.0-Desktop.jpg
[3]: https://nxos.org/
[4]: https://debugpointnews.com/wp-content/uploads/2023/01/Nitrux-2.6-install-automatic-partition.jpg
[5]: https://debugpointnews.com/wp-content/uploads/2023/01/Screenshot-from-2023-01-05-13-44-57.png
[6]: https://nxos.org/notes/notes-nitrux-2-6-0
[7]: https://fosstorrents.com/distributions/nitrux/
[8]: https://sourceforge.net/projects/nitruxos/files/Release/ISO
[9]: https://osdn.net/projects/nitrux/releases/p18379
[10]: https://nxos.org/changelog/release-announcement-nitrux-2-6-0/

View File

@ -0,0 +1,100 @@
[#]: subject: "Pinta 2.1 Release Introduces WebP Support. But You Can't Use It Yet Unfortunately"
[#]: via: "https://news.itsfoss.com/pinta-2-1-release/"
[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Pinta 2.1 Release Introduces WebP Support. But You Can't Use It Yet Unfortunately
======
Pinta 2.1 comes with WebP support and various other useful improvements.
![Pinta 2.1 Release Introduces WebP Support. But You Can't Use It Yet Unfortunately][1]
Pinta is a free and open-source drawing app for Linux that offers a ton of features in a relatively small package.
It is one of the [best Linux tools for digital artists][2] available.
Its last major release was in January 2022, introducing improved Hi DPI support, GTK 3 port, and [more][3].
Marking 2023's first release, Pinta 2.1 promises to offer even further refinements.
**Notice the new Pinta icon in the image above? Well, that's one of the changes.**
Let's see how this release pans out.
### 🆕 What's New in Pinta 2.1?
![pinta 2.1][4]
[Pinta 2.1][5] is offering plenty of new improvements; some notable ones include:
- **WebP Support**
- **Improved .ora Support**
- **Enhanced Handles**
- **Dark Mode**
- **Improved File Dialog**
- **Various Bug Fixes and Changes**
**WebP Support:** Pinta finally has support for WebP files, but it does not come out of the box. For Linux users, the [webp-pixbuf-loader][6]**dependency is required to enable WebP support.**
> 📋 Unfortunately, WebP support is not included in the Flatpak and Snap builds of Pinta 2.1. Even if you have that library installed on your system. So, you probably have to build it from the source or use WebP files on Windows/macOS only.
**Improved .ora Support:** With Pinta 2.1, hidden layers are now round-tripped properly for .ora files.
Furthermore, when you save a .ora file, a flattened image is now included in the archive.
It is like this because it is required by the spec to accommodate the viewer software.
**Enhanced Handles:** The selection move and shape control point handles are now more intuitive, especially when working on zoomed-in or small images.
**Dark Mode:** Pinta has finally received full support for dark mode across the app; all icons, toolbars, dialogs, etc., are now in high-res SVG format.
**Improved File Dialog:** The file dialog now uses MIME types on Linux, allowing valid image files with unknown extensions to be included in the image file filter.
**Various Bug Fixes and Changes:** Apart from the changes I listed above, here are some that are also worth mentioning:
- Upgraded to .NET 7.
- New '**Transparency Mode**' in Gradient Tool.
- Standard GTK about dialog.
- The gradient tool now updates properly while drawing transparent colors.
- The new screenshot command now uses the XDG portal.
If you want to go deep into the technical details of the release, head to its [release notes][7].
### 📥 Download Pinta 2.1
Pinta 2.1 is available in the [Snap store][8], as well as on [Flathub][9]. The repositories include an outdated back, so you can safely ignore it.
You can also try building it from the [source code][10] and explore other download options for Windows/macOS.
[Download Pinta 2.1][11]
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/pinta-2-1-release/
作者:[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/2023/01/pinta-2-1-release.png
[2]: https://itsfoss.com/best-linux-graphic-design-software/
[3]: https://news.itsfoss.com/pinta-2-0-release/
[4]: https://news.itsfoss.com/content/images/2023/01/Pinta_2.1.png
[5]: https://www.pinta-project.com
[6]: https://github.com/aruiz/webp-pixbuf-loader/
[7]: https://github.com/PintaProject/Pinta/releases/tag/2.1
[8]: https://snapcraft.io/pinta
[9]: https://flathub.org/apps/details/com.github.PintaProject.Pinta
[10]: https://github.com/PintaProject/Pinta
[11]: https://www.pinta-project.com/releases/

View File

@ -2,7 +2,7 @@
[#]: via: "https://opensource.com/article/21/10/linux-timers"
[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: translator: "FigaroCao"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "

View File

@ -1,130 +0,0 @@
[#]: subject: "How I Fixed Buzzing Noise Coming from Speakers in Linux"
[#]: via: "https://itsfoss.com/buzzing-noise-speaker-linux"
[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How I Fixed Buzzing Noise Coming from Speakers in Linux
======
I used a laptop for a long time but only recently switched to a desktop setup for my remote work at Its FOSS.
I noticed a constant buzzing sound coming from the speakers. It was annoying and gave me headaches. I started out to fix the issue. It was quite interesting to know the root cause of the issue.
I will share my experience of fixing the buzzing noise from speakers in Linux. I found it working with Ubuntu, Debian and Pop OS on the same hardware.
One thing to consider is that you may have a serious hardware issue if this guide does not work for you. For most users, the given solution should get the job done.
**Before you try the fix …**
I have tried to make things easy to follow safely. You try the temporary fix and if it works, you make the changes permanent. However, it would be a good idea to make system snapshots with Timeshift. If you are easily panicked when things do not work, you can restore the system to the earlier state.
Also, check your sound card. In my case, it was snd_hda_intel. For USB card, it could be snd_usb_audio. You have to change the commands according to your sound card.
```
cat /proc/asound/modules
```
### The reason behind the buzzing noise from speakers in Linux
After combing through numerous forum posts and websites, I learned the root cause of the issue. It is because of capacitor discharge in the speakers. And it can be solved by turning off the power-saving setting of a sound card.
By turning off power saving, you are allowing the system to charge those capacitors when they get discharged. It is similar to using a phone while charging constantly.
And you can check whether the power-saving setting for the sound card is enabled on your system by using the given command:
```
cat /sys/module/snd_hda_intel/parameters/power_save
```
![power saving setting in sound card making buzzing sound in linux][1]
And if you get 1 in output like mine, the power saving is turned on. So lets have a look at the solution.
Dont worry. This will not affect your battery percentage drastically, as the shown method is only applied to the sound card.
### Try fixing the buzzing noise issue (temporary)
The reason why I included the temporary way is to identify whether the humming sound is being caused due to capacitor discharge or if there is any serious hardware problem going on.
If this temporary solution works, you can go ahead with the permanent solution.
The first step is to switch to the root user:
```
sudo su
```
And then, execute the given command, and it should stop the buzzing sound until the next boot:
```
echo 0 > /sys/module/snd_hda_intel/parameters/power_save
```
If you are using **a USB sound card**, you have to interchange `snd_hda_intel` with `snd_usb_audio` as given:
```
echo 0 > /sys/module/snd_usb_audio/parameters/power_save
```
If the above trick fixed the issue, you have to make things permanent. Otherwise, the changes will be lost when you next reboot your system.
### Fixing the buzzing noise issue (permanently)
Here, Im going to make changes in kernel parameters.
Change your working directory to /etc/modprobe.d:
```
cd /etc/modprobe.d
```
And now, create a new file named `audio_disable_powersave.conf` and open with the nano text editor using the given command:
```
sudo nano audio_disable_powersave.conf
```
And put the following lines in that file to turn off the power-saving setting in the sound card permanently:
```
options snd_hda_intel power_save=0
```
![fix buzzing sound in linux][2]
For **a USB sound card**, you can use `snd_usb_audio`:
```
options snd_usb_audio power_save=0
```
Now, [save changes and exit the Nano text editor][3] by pressing Ctrl+X keys. Reboot your system, and you can enjoy a noise-free workspace.
### Wrapping Up
This guide explains the cause of the buzzing noise and how you can straightforwardly solve that issue.
Again, you may have some other issue rather than discharging capacitors, so you should always try the temporary method.
Let me know if you were able to fix the buzzing noise from speakers in Linux this way or not.
--------------------------------------------------------------------------------
via: https://itsfoss.com/buzzing-noise-speaker-linux
作者:[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/wp-content/uploads/2022/11/power-saving-setting-in-sound-card-making-buzzing-sound-in-linux.png
[2]: https://itsfoss.com/wp-content/uploads/2022/11/fix-buzzing-sound-in-linux.png
[3]: https://linuxhandbook.com/nano-save-exit/

View File

@ -1,142 +0,0 @@
[#]: subject: "What is Firefox ESR? How to Install it in Ubuntu?"
[#]: via: "https://itsfoss.com/firefox-esr-ubuntu/"
[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
What is Firefox ESR? How to Install it in Ubuntu?
======
The snap version of Ubuntu is not to your liking? Dont like constantly changing things with every Firefox release? You can try the Firefox ESR version if you value stability over features.
### What is Firefox ESR?
Firefox ESR is a special edition of Firefox browser that doesnt necessarily get new features monthly as the regular edition but it provides a stable and secure browsing experience. This is suitable for enterprises, organizations and institutes where stability and core features matter more than shiny new features.
Think of Firefox ESR as the long-term stable release of Linux distributions. They do not necessarily get brand-new features but they get regular security and maintenance updates. This gives the users a familiar and stable environment.
#### Why should you care for Firefox ESR?
Firefox releases a new version almost every month. It contains security and feature updates.
But some people may not like the inclusion and removal of features. If, after an update, you keep wondering where did certain settings go or do not like things that are different than before, Firefox ESR could be worth a try.
Basically, if you value stability more than new features, Firefox ESR is for you. This is the same version of Firefox that ships with Debian, which is known for being one of the most stable distros you can get in the market.
Let me show you how to get Firefox ESR on Ubuntu. **_You can have both Firefox and Firefox-ESR versions installed simultaneously. There is no visual difference in their logos so you have to pay attention to which Firefox version you are opening._**
### Installing Firefox ESR in Ubuntu
Before I jump to the installation part, let me share whats the version difference between regular Firefox and Firefox-ESR. While writing,
- Firefox is running at version **107.0-2**.
- Firefox-ESR is currently having **102.5.0esr**.
So if thats fine for you, lets look at the first method.
#### Method 1: Install Firefox-ESR using PPA
Firefox-ESR is not available in the default repository of Ubuntu, so you can use the PPA.
PPA is nothing but a repository being maintained by individual techies or developers to have what the default repository does not.
And if you want to learn more about PPA, I would recommend checking our other guide that explains [how you can use PPA on Linux.][1]
Open your terminal and use the given command to add PPA for Firefox-ESR:
```
sudo add-apt-repository ppa:mozillateam/ppa
```
And press Enter to confirm you want to add PPA:
![add firefox esr repository in ubuntu][2]
Once done, you will have to update the repository index in Ubuntu to take effect from the changes:
```
sudo apt update
```
And now, you can install Firefox-ESR by using the given command:
```
sudo apt install firefox-esr
```
Next, you can use the given command to check the installed version of Firefox-ESR in your system:
```
firefox-esr -v
```
![check installed version of firefox esr in ubuntu][3]
##### Uninstalling Firefox-ESR from Ubuntu
If the ESR felt too outdated for your work or for any other reason you want to remove it from your system, you can follow the steps to remove the Firefox-ESR package and the repository.
First, lets remove the Firefox-ESR package using the following:
```
sudo apt remove firefox-esr
```
Now, you can use the given command to [remove PPA from Ubuntu][4]:
```
sudo add-apt-repository --remove ppa:mozillateam/ppa
```
And thats it!
#### Method 2: Install Firefox-ESR using Snap
Love it or hate it, Snaps comes pre-configured on Ubuntu and I find using snaps a neat way of installing packages, especially when you want to avoid building them for source or using PPA.
All you need to do to install Firefox-ESR using snaps is to follow the given command:
```
sudo snap install firefox --channel=esr/stable
```
![install firefox esr using snaps in ubuntu][5]
##### Removing Firefox-ESR Snap
To remove Firefox-ESR (snap package), use the [snap remove command][6]:
```
sudo snap remove firefox
```
And thats it!
### Wrapping Up
I explained how to install Firefox-ESR in Ubuntu using multiple methods in this guide. I personally use Firefox-ESR instead of the regular version as I was having random crashes.
Since I shifted to Firefox-ESR, things have been going rock-solid for me. And if you were having the same, you should give it a try.
--------------------------------------------------------------------------------
via: https://itsfoss.com/firefox-esr-ubuntu/
作者:[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/ppa-guide/
[2]: https://itsfoss.com/wp-content/uploads/2022/11/add-firefox-esr-repository-in-ubuntu.png
[3]: https://itsfoss.com/wp-content/uploads/2022/11/check-installed-version-of-firefox-esr-in-ubuntu.png
[4]: https://itsfoss.com/how-to-remove-or-delete-ppas-quick-tip/
[5]: https://itsfoss.com/wp-content/uploads/2022/11/install-firefox-esr-using-snaps-in-ubuntu.png
[6]: https://itsfoss.com/remove-snap/

View File

@ -1,127 +0,0 @@
[#]: subject: "How to Update Flatpak Packages in Linux"
[#]: via: "https://itsfoss.com/update-flatpak/"
[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to Update Flatpak Packages in Linux
======
I believe almost all Linux users keep their systems updated.
But that update is usually for the default [package manager][1]. For example, [updating Ubuntu][2] often means updating all the APT packages.
However, there are other packaging formats like Snap and Flatpak. The Snap applications get updated automatically but not the Flatpak ones.
How do you update the Flatpak packages then? Well, you can update all the installed and updatable Flatpak packages using this command:
```
flatpak update
```
Thats quite simple. But let me discuss a few more things about updating Flatpak, such as:
- Updating all or specific Flatpak packages
- Updating Flatpak packages via Software Center
Lets start with the terminal method first.
### Method 1: Using the terminal for updating Flatpak packages
Let me first start with the most practical approach that you should also begin with.
#### Update every outdated Flatpak package
Updating the whole catalog of existing flatpak packages is quite easy.
Enter the given command, and it will get you the list of outdated packages:
```
flatpak update
```
![3. update flatpak packages in linux][3]
You just have to enter “Y” and press the Enter key, which will take care of every update.
#### Updating specific Flatpak package
To update specific packages, youd need the list of the packages that can be updated. You used the same command you saw earlier.
```
flatpak update
```
![3. update flatpak packages in linux][4]
Copy the name of the package you want to update from the output. Use the package name in the following fashion:
```
flatpak update package_name
```
For example, if you want to update Telegram, the following command will get the job done:
```
flatpak update org.telegram.desktop
```
![4. update specific package in flatpak][5]
Thats it!
### Method 2: Update Flatpak applications from the software center
Distributions that come up with Flatpak buil-in support provide updates to Flatpak applications in the software center. Fedora and Linux Mint are such distributions.
But if you are using Ubuntu, youd need to add flatpak support to the GNOME software center:
```
sudo apt install gnome-software-plugin-flatpak
```
Once done, you will have two software centers in Ubuntu. Thats because the default software center is not GNOMEs but Snap Store.
Open this new software center from the system menu:
![1. open software center in ubuntu][6]
Go to the `Updates` section and you will find the list of outdated packages. This includes both APT and Flatpak packages.
![2. update flatpak from software center][7]
From here, you can update all the packages at once, or you can be selective with what to update.
### Wrapping Up
Many Linux desktop users tend to forget to update the Flatpak packages as they are not included in the regular system updates.
As Flatpak is a sandboxed packaging solution, you may not face any issues related to outdated packages, but you will miss out on new features and fixes for sure.
This is why I recommend running the Flatpak update command once ever few weeks.
I hope you like this quick little Flatpak tip helpful.
--------------------------------------------------------------------------------
via: https://itsfoss.com/update-flatpak/
作者:[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/package-manager/
[2]: https://itsfoss.com/update-ubuntu/
[3]: https://itsfoss.com/wp-content/uploads/2022/12/3.-update-flatpak-packages-in-linux.png
[4]: https://itsfoss.com/wp-content/uploads/2022/12/3.-update-flatpak-packages-in-linux.png
[5]: https://itsfoss.com/wp-content/uploads/2022/12/4.-update-specific-package-in-flatpak.png
[6]: https://itsfoss.com/wp-content/uploads/2022/12/1.-open-software-center-in-ubuntu.png
[7]: https://itsfoss.com/wp-content/uploads/2022/12/2.-update-flatpak-from-software-center.png

View File

@ -1,80 +0,0 @@
[#]: subject: "An Open-Source Alternative to Google, Alexa, and Siri in Works for Home Assistant Platform"
[#]: via: "https://news.itsfoss.com/open-source-assistant/"
[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
An Open-Source Alternative to Google, Alexa, and Siri in Works for Home Assistant Platform
======
An open-source assistant to replace Google, Alexa, Siri?
![An Open-Source Alternative to Google, Alexa, and Siri in Works for Home Assistant Platform][1]
**Home Assistant** is an open-source smart home platform that focuses on providing local control and privacy to its users. It can run off a Raspberry Pi or even a local server.
They also have a subscription service for access to additional features such as support for Alexa and Google Assistant, which is managed by a company called '[Nabu Casa][2]'.
> 💡 The company is led by [Paulus Schoutsen][3], the founder of Home Assistant.
In a [blog][4] last week, Paulus announced **a new open-source project that aims to offer a voice assistant without an active internet connection** or any other big tech voice assistants.
So, an _open-source challenger to Google, Alexa, and Siri?_😲
Let's see what this is all about, then.
**What is it?:** This will be a part of the Home Assistant application and will offer the ability to run voice commands locally to control the connected smart devices.
Paulus also asserts that their most important priority is to support different languages, he says:
> People need to be able to speak in their own language, as that is the most accessible and only acceptable language for a voice assistant for the smart home.
To fuel this endeavor, the creator of Rhasspy, [Mike Hansen][5], has been roped in to make this possible.
For those of you who don't know, [Rhasspy][6] is another open-source software that specializes in providing a fully offline voice assistant that is backed by its community of users.
If you ask me, I feel that this feature of Home Assistant will be powered by Rhasspy, which is a good thing.
_Why reinvent something that already exists? It's better to improve upon it._
**What to expect?:** Initially, the voice assistant won't be able to do things you might expect. So, things like making a web search, making calls, playing voice games, etc., are a no-go.
What it will focus on instead are the **basics of what a voice assistant should be**; this was done to make sure that the work ahead of them was manageable.
They aim to start with a few actions and then build up language models around them.
In its current state, Home Assistant supports 62 different languages in its user interface. They plan to add support for all these languages with their voice assistant.
**When to expect?:** They have already started work on this by building a [collection of intent matching sentences][7] for every language.
What this means is that the community can contribute to the development of the voice assistant by adapting the commands for smart devices to their respective native languages.
They aim for a release sometime in **2023** and have mentioned that it will be the '_year of voice_'.
I think an open-source voice assistant that works offline can be a very useful thing to have; it lets you be free of any tracking from big tech.
💬 _With the added benefit of having a large community behind its development of it, what's not to like?_
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/open-source-assistant/
作者:[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/open-source-home-assistant-in-works.png
[2]: https://www.nabucasa.com
[3]: https://twitter.com/balloob
[4]: https://www.home-assistant.io/blog/2022/12/20/year-of-voice/
[5]: https://synesthesiam.com
[6]: https://rhasspy.readthedocs.io
[7]: https://github.com/home-assistant/intents

View File

@ -0,0 +1,110 @@
[#]: subject: "How to read and write files in Rust"
[#]: via: "https://opensource.com/article/23/1/read-write-files-rust"
[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to read and write files in Rust
======
Knowing how to read and write files can be useful for various purposes. In Rust, this task is done using the file system module ([std::fs][1]) in the standard library. In this article, I'll give you an overview on how to use this module.
To demonstrate this task, I prepared example code which is also available on [GitHub][2].
### Preparation
When using Rust, a function that fails returns the [Result][3] type. The file system module in particular returns the specialized type [std::io::Result<T, Error>][4]. With this knowledge, you can return the same type from the `main()` function:
```
fn main() -> std::io::Result<()> {
/* ...code comes here... */
```
### Writing Rust files
Performing file I/O-operations in Rust is relatively easy. Writing to a file can be simplified to one line:
```
use std::fs;
fs::write("favorite_websites.txt", b"opensource.com")?;
Ok(())
```
Using the error propagation operator `(?)`, the error information gets passed on to the calling function where the error can subsequently be handled. As `main()` is the only other function in the call stack, the error information gets passed on to the console output in case the write operation failed.
The syntax of the [fs::write][5] function is quite forward. The first argument is the file path, which must be the type [std::path::Path][6]. The second argument is the content, which is actually a slice of bytes (`[u8]`). Rust converts the arguments passed into the correct type. Luckily, these types are basically the only types dealt with in the following examples.
A more concise access of the write operation can be achieved using the file descriptor type [std::fs::File][7]:
```
let mut file = fs::File::create("favorite_websites.txt")?;
file.write_all(b"opensource.com\n")?;
Ok(())
```
As the file type implements the [Write][8] trait, it is possible to use the associated methods to write to the file. However, the `create` method can overwrite an already existing file.
To get even more control of the file descriptor, the type [std::fs::OpenOptions][9] must be used. This provides opening modes similar to the ones in other languages:
```
let mut file = fs::OpenOptions::new()
.append(true)
.open("favorite_websites.txt")?;
file.write_all(b"sourceforge.net\n")?;
```
### Reading Rust files
What applies to writing also applies to reading. Reading can also be done with a simple one-line of code:
```
let websites = fs::read_to_string("favorite_websites.txt")?;
```
The above line reads the content of the file and returns a string. In addition to reading a string, there is also the [std::fs::read][10] function which reads the data into a vector of bytes if the file contains binary data.
The next example shows how to read the content of the file into memory and subsequently print it line by line to a console:
```
let file = fs::File::open("favorite_websites.txt")?;
let lines = io::BufReader::new(file).lines();
for line in lines {
if let Ok(_line) = line {
println!(">>> {}", _line);
}
}
```
### Summary
If you are already familiar with other programming languages, you may have noticed that there is `no close-`function (or something similar) that releases the file handle. In Rust, the file handle is released as soon as the related variable goes out of scope. To define the closing behavior, a scope `({ })` around the file representation can be applied. I recommend that you get familiar with [Read][11] and [Write][8] trait as you can find this trait implemented in many other types.
--------------------------------------------------------------------------------
via: https://opensource.com/article/23/1/read-write-files-rust
作者:[Stephan Avenwedde][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/hansic99
[b]: https://github.com/lkxed
[1]: https://doc.rust-lang.org/std/fs/
[2]: https://github.com/hANSIc99/rust_file_io
[3]: https://doc.rust-lang.org/std/result/enum.Result.html
[4]: https://doc.rust-lang.org/std/io/type.Result.html
[5]: https://doc.rust-lang.org/std/fs/fn.write.html
[6]: https://doc.rust-lang.org/std/path/struct.Path.html
[7]: https://doc.rust-lang.org/std/fs/struct.File.html
[8]: https://doc.rust-lang.org/std/io/trait.Write.html
[9]: https://doc.rust-lang.org/std/fs/struct.OpenOptions.html#
[10]: https://doc.rust-lang.org/std/fs/fn.read.html
[11]: https://doc.rust-lang.org/std/io/trait.Read.html

View File

@ -0,0 +1,138 @@
[#]: subject: "who Command in Linux: Explanation with Examples"
[#]: via: "https://www.debugpoint.com/who-command-linux/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
who Command in Linux: Explanation with Examples
======
**Heres a beginners guide on understanding who command in Linux with several examples.**
_This article is part of the [Linux command][1] learning series._
### who command
The “who” command in Linux is used to display information about users who are currently logged in to the system. It shows the users login name, the terminal from which the user is logged in, the time at which the user logged in, and the remote hostname (if applicable).
#### Syntax
Here is the basic syntax for the “who” command:
```
who [OPTION]... [ FILE | ARG1 ARG2 ]
```
### Example of various who command and switches
By default, “who” reads the file `/var/run/utmp`, which contains information about users who are currently logged in. If no options are specified, it displays each users login name, terminal, and time of login.
```
who
```
It gives the following output. As you can see it shows the login name=debugpoint, terminal id tty2 and the date and time of the login.
```
debugpoint tty2 2023-01-01 11:22 (tty2)
```
![who command - default example][2]
However, if you run the above command in a guest virtual machine, you should see the same but the terminal id would be the x11 server display name i.e. :0.
```
whodebugpoint :0 2023-01-01 23:36 (:0)
```
To show the username of the current user and information, use below:
```
whoami
```
View the last system boot time using the -b option:
```
who -bsystem boot 2023-01-01 23:36
```
Display the count of users logged in the current system:
```
who -qdebugpointusers=1
```
All the above command when paired with -H option, you get a better info with a header line, like below:
```
who -H
NAME LINE TIME COMMENT
debugpoint tty2 2023-01-01 11:22 (tty2)
```
If you want to display all the information related to who command in Linux, use the option -a:
```
who -aH
NAME LINE TIME IDLE PID COMMENT EXIT
system boot 2023-01-01 11:19
run-level 5 2023-01-01 11:19
debugpoint + tty2 2023-01-01 11:22 13:26 2042 (tty2)
```
As always, you can save the output of the who command to any file using the redirect as below:
```
who > user_details.txt
```
#### Example summary of who command options
Here are some who command examples and their explanation:
Here are some options that can be used with the “who” command:
- `-a`: Display the hostname, time of login, and processes for each user
- `-b`: Display the time of the last system boot
- `-d`: Display dead processes (processes that have terminated but have not been removed from the utmp file)
- `-H`: Display a header line
- `-l`: Display login processes in long format
- `-m`: Display only the name and line of the user who is logged in on the terminal specified by `ARG1 ARG2`
- `-q`: Display a count of logged in users
- `-u`: Display information about users who have processes that are not detached
- `-w`: Display information about users who are logged in, in the same format as the utmp file
### Closing Notes
I hope this article helps you to understand who command and its basics. You can also read the [who man pages][3] to learn more. Let me know if you have any questions.
**This article is part of the [Linux command][1] learning series**.
[Next:How to Force Auto Dark Mode in Chrome and Chromium][4]
[_Using Mastodon? Follow us at floss.social/@debugpoint_][5]
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/who-command-linux/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed
[1]: https://www.debugpoint.com/category/linux-commands
[2]: https://www.debugpoint.com/wp-content/uploads/2023/01/who-command-default-example.jpg
[3]: https://man7.org/linux/man-pages/man1/who.1.html
[4]: https://www.debugpoint.com/chrome-dark-mode/
[5]: https://floss.social/@debugpoint

View File

@ -0,0 +1,106 @@
[#]: subject: "Colorblind Filters: GNOME Extension to help Colorblind Users"
[#]: via: "https://www.debugpoint.com/colorblind-filters-gnome-extension/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Colorblind Filters: GNOME Extension to help Colorblind Users
======
**A nice GNOME Extension Colorblind Filters, brings many options for color-blind users.**
Accessibility is a critical aspect of computing and operating systems. It includes well-managed settings for vision impairment, color blind and many other health symptoms. Popular Linux desktop environments such as GNOME and KDE Plasma feature accessibility settings to help all those scenarios.
Thanks to the GNOME Extensions ecosystem, a huge number of specialised extensions are available to aid those users. One of the extensions I came across is [“Colorblind Filters”][1].
### Colorblind Filters GNOME Extension
As per Wikipedia, _“Colour blindness usually involves the inability to distinguish between shades of red and green. There is no treatment for inherited colour blindness. If colour blindness is caused by another condition, treating the underlying cause can help.”_.
So, its important that you have options to tweak settings on your Linux desktop.
#### Set up extensions and flatpak
First, make sure you have Flatpak and GNOME Extensions enabled. And the Extensions manager is installed. You may refer to this detailed guide on how to [set up flatpak][2] & enable [GNOME extensions][3], Or run the following commands (for Ubuntu, Linux Mint, etc.) from the terminal.
```
sudo apt install flatpaksudo apt install gnome-software-plugin-flatpakflatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakreporeboot
```
Fedora users, use the below commands.
```
sudo dnf install flatpaksudo dnf install gnome-software-plugin-flatpakflatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakreporeboot
```
Once done, install the Extension Manager:
```
flatpak install com.mattjakeman.ExtensionManager
```
#### Install the Extension
Open the extension manager from the application menu. Search for “colorblind”. And install the extension (see the below image).
![Install the extension][4]
After installation, you can see a small eye icon on the system tray. You can click on it to enable the pre-defined color filters.
![Colorblind Filters extension tray icon][5]
Right-click on the eye icon for more settings. This extension brings all the necessary customizations for colorblind collections, simulations and additional options. The following options are currently available:
- Protanopia
- Deuteranopia
- Tritanopia
- Corrections & Simulations (with high contrast)
- Channel mixer for GBR and BRG
- Lightness inversion
- Color Inversion
- Additional tweaks
![Colorblind Filters - options][6]
Use the one that suits you best for your eye.
### Wrapping Up
I think Apples macOS and iOS have implemented better accessibility than Windows or Linux. However, Linux Desktops are not far behind with these apps and extensions. Also, there are specialized Linux distributions such as “[Accessible Coconut][7]“, which has been built for specialized needs.
I hope Colorblind gnome extension helps you with your day-to-day usage of Linux and GNOME desktops.
Cheers.
[Next:Top 10 Linux Distributions for Windows Users in 2023][8]
[_Using Mastodon? Follow us at floss.social/@debugpoint_][9]
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/colorblind-filters-gnome-extension/
作者:[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://extensions.gnome.org/extension/5589/colorblind-filters/
[2]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/
[3]: https://www.debugpoint.com/how-to-install-and-use-gnome-shell-extensions-in-ubuntu/
[4]: https://www.debugpoint.com/wp-content/uploads/2023/01/Install-the-extension.jpg
[5]: https://www.debugpoint.com/wp-content/uploads/2023/01/Colorblind-Filters-extension-tray-icon.gif
[6]: https://www.debugpoint.com/wp-content/uploads/2023/01/Colorblind-Filters-options.jpg
[7]: https://www.debugpoint.com/accessible-coconut-linux-visually-impaired/
[8]: https://www.debugpoint.com/best-linux-distributions-windows/
[9]: https://floss.social/@debugpoint

View File

@ -0,0 +1,98 @@
[#]: subject: "Document with BookStack, an open source Confluence alternative"
[#]: via: "https://opensource.com/article/23/1/bookstack-open-source-documentation"
[#]: author: "Dan Brown https://opensource.com/users/ssddanbrown"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Document with BookStack, an open source Confluence alternative
======
BookStack is an open source, web-based documentation system, that allows you to create a structured knowledge store for personal, team, or company use. BookStack focuses on ease-of-use and design to provide an experience suitable for an audience with, potentially, mixed skills in technology. It's built upon the PHP framework Laravel, with MySQL or MariaDB used as a datastore.
I built BookStack after attempting to find a documentation or wiki system for my workplace. [Confluence][1] was the closest option to suit my requirements but the user-based pricing introduced a barrier. The closed nature of Confluence also raised questions to the longevity of the documentation I'd be building. In the end, I decided to build my own platform to suit my needs. I released it under the MIT license to give back to the open source community that I'd come to love and benefit from over the years.
### Content hierarchy and organization options
To keep things familiar and intuitive, BookStack makes use of real-world book terms to describe its organization structure. Documentation content is created as a "Page":
- Pages belong to a specific "Book".
- Within a Book, Pages can optionally be grouped up into "Chapters".
- As your documentation grows, you can then use "Shelves" to categorize Books, with Books being able to be part of multiple shelves if needed.
This structure sits at the heart of BookStack, and can often be the love-it-or-hate-it deciding aspect of whether BookStack is suitable for your use case.
Upon this core hierarchy, BookStack also provides tagging, user favorites, and advanced search capabilities to ensure content remains discoverable.
### Writing documentation
The primary method of writing documentation in BookStack is through the use of its what-you-see-is-what-you-get (WYSIWYG) editor, which makes use of the open source [Tiny][2] project. This editor provides a range of content formats including:
- Various header levels
- Code blocks
- Collapsible blocks
- Tables
- Images
- Links
- iFrame embeds
- Alert callouts
- Bullet, numbered and tasks lists
- Drawings (through intregration with the open source [diagrams.net][3])
If you prefer [Markdown][4], you can use the built-in Markdown editor, which provides a live preview and supports the same feature set as the WYSIWYG editor. If permission allows, you can even jump between these editor options depending on the page you're editing.
### How your data is stored
Documentation is stored within a [MySQL or MariaDB][5] database in a relatively simple HTML format, in addition to the original Markdown content if Markdown was used. A lot of design and development decisions have been made to keep this HTML format simplistic. It uses plain standard HTML elements where possible, to ensure raw documentation content remains open and portable.
Uploaded images, attachments, and created drawings are saved on the local filesystem but can optionally be stored in an s3-compatible datastore like the open source [MinIO][6].
To keep your content accessible, there are built-in options to export content as PDF, HTML, plain text, or Markdown. For external consumption, there's a HTTP REST API and a webhook system. In terms of extension, a "logical theme system" allows running of custom PHP code upon a wide range of system events.
### Ready for business
BookStack comes with a range of features to support business environments. Support for a range of authentication options are built-in, including SAML2, OpenID Connect, and LDAP allowing easy single-sign-on usage with platforms such as [KeyCloak][7]. MFA options are available and can be mandated based upon role. An audit log provides full visibility of modification activities across an instance.
A full role-based permission system provides administrators full control over create, view, update, and delete actions of system content. This allows per-role system defaults, with options to set custom permissions on a per-hierarchy item basis.
### A community of support
After being active for over 7 years, the community for BookStack has grown with various avenues for discussion and support. We now have:
- [Our documentation site][8]
- [Video guides on YouTube][9]
- [A subreddit][10]
- [An active GitHub issues list][11]
- [Paid-for business support][12]
If you want to play with BookStack, you can try it out [on our demo site][13]. To learn how to set up your own instance, visit the [installation page of our documentation][14].
--------------------------------------------------------------------------------
via: https://opensource.com/article/23/1/bookstack-open-source-documentation
作者:[Dan Brown][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/ssddanbrown
[b]: https://github.com/lkxed
[1]: https://opensource.com/article/20/9/open-source-alternatives-confluence
[2]: https://github.com/tinymce/
[3]: https://www.diagrams.net/
[4]: https://opensource.com/article/19/9/introduction-markdown
[5]: https://opensource.com/downloads/mariadb-mysql-cheat-sheet
[6]: https://github.com/minio/
[7]: https://www.keycloak.org/
[8]: https://www.bookstackapp.com/docs/
[9]: https://www.youtube.com/c/BookStackApp
[10]: https://www.reddit.com/r/bookstack
[11]: https://github.com/BookStackApp/BookStack/issues
[12]: https://www.bookstackapp.com/support
[13]: https://demo.bookstackapp.com/books/bookstack-demo-site/page/logging-in-to-the-demo-site
[14]: https://www.bookstackapp.com/docs/admin/installation/

View File

@ -0,0 +1,152 @@
[#]: subject: "Whereis Command in Linux and BSD with Examples"
[#]: via: "https://www.debugpoint.com/whereis-command-linux/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Whereis Command in Linux and BSD with Examples
======
**Heres a beginners guide on understanding whereis command in Linux & BSD with several examples.**
![][1]
_This article is part of the [Linux command][2] learning series._
### whereis command
The `whereis` command is a command line program that helps you to find out the path or location of any binary executable, source file or manual page.
Before we show you how to use `whereis` command, lets look at the syntax.
### Syntax
Heres the syntax for whereis command:
```
whereis [OPTIONS] FILE_NAME
```
The argument of whereis command is the program name or file name you want to search. The argument is mandatory.
By default, it searches for the program in the path defined in environment variables such as HOME, USER, SHELL, etc.
Lets take a look at some examples.
### Examples of whereis command in Linux and BSD
A simple example of whereis command is below where I am trying to search firefox. In the output below, you can see the list of paths containing firefox files or executables displayed.
```
$ whereis firefox
firefox: /usr/bin/firefox /usr/lib64/firefox /etc/firefox /usr/share/man/man1/firefox.1.gz
```
![Simple example of whereis command in Linux][3]
The command with option -l displays the list of paths where it searches. For example:
```
$ whereis -l
bin: /usr/bin
bin: /usr/sbin
bin: /usr/lib
bin: /usr/lib64
bin: /etc
bin: /usr/games
bin: /usr/local/bin
bin: /usr/local/sbin
bin: /usr/local/etc
bin: /usr/local/lib
bin: /usr/local/games
```
If the whereis command doesnt find anything, it only shows the arguments name. For example, if I search nano in Linux where is it not installed, it outputs the following:
```
$ whereis nano
```
```
nano:
```
You can always add multiple arguments if you want to search for more. For example below command searches for both bash and nano, and this is the output:
```
$ whereis bash nano
bash: /usr/bin/bash /usr/share/man/man1/bash.1.gz /usr/share/info/bash.info.gz
nano: /usr/bin/nano /usr/share/nano /usr/share/man/man1/nano.1.gz /usr/share/info/nano.info.gz
```
You can also search for specific file types, such as binaries, using -b option. The following command only tells you the binary paths of nano.
```
$ whereis -b nano
nano: /usr/bin/nano /usr/share/nano
```
Similarly, the -s option searches for source files, and the -m option searches for manual pages.
```
$ whereis -m nano
nano: /usr/share/man/man1/nano.1.gz /usr/share/info/nano.info.gz
```
You can also combine the above options for a more extensive search. For example, the following command searches for nano and firefox binary, manual pages and for bash, only manual pages.
```
$ whereis -bm nano firefox -m bash
nano: /usr/bin/nano /usr/share/nano /usr/share/man/man1/nano.1.gz /usr/share/info/nano.info.gz
firefox-m:
bash: /usr/bin/bash /usr/share/man/man1/bash.1.gz /usr/share/info/bash.info.gz
```
Heres a summary of the options:
| Option | Description |
| :- | :- |
| **-b** | Search only for binaries. |
| **-m** | Search only for manual sections. |
| **-s** | Search only for sources. |
| **-u** | Search for unusual entries. A file is said to be unusual if it does not have one entry of each requested type. Thus whereis -m -u * asks for those files in the current directory which have no documentation. |
| **-B** | Change or otherwise limit the places where whereis searches for binaries. |
| **-M** | Change or otherwise limit the places where whereis searches for manual sections. |
| **-S** | Change or otherwise limit the places where whereis searches for sources. |
| **-f** | Terminate the last directory list and signals the start of file names, and must be used when any of the -B, -M, or -S options are used. |
### Closing Notes
I hope this article helps you to understand whereis command and its basics. You can also read the[whereis man pages][4] to learn more. Let me know if you have any questions.
**This article is part of the [Linux command][2] learning series**.
[_Using Mastodon? Follow us at floss.social/@debugpoint_][5]
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/whereis-command-linux/
作者:[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/2023/01/whereis-head.jpg
[2]: https://www.debugpoint.com/category/linux-commands
[3]: https://www.debugpoint.com/wp-content/uploads/2023/01/Simple-example-of-whereis-command-in-Linux.jpg
[4]: https://linux.die.net/man/1/whereis
[5]: https://floss.social/@debugpoint

View File

@ -0,0 +1,210 @@
[#]: subject: "Learn to code with my retro computer program"
[#]: via: "https://opensource.com/article/23/1/learn-machine-language-retro-computer"
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Learn to code with my retro computer program
======
I teach university courses part-time, including a class about general computing topics, open to all majors. This is an introductory course that teaches students about how technology works, to remove the mystery around computing.
While not a computer science course, one section of this course covers computer programming. I usually talk about programming in very abstract terms, so I don't lose my audience. But this year, I wanted my students to do some "hands-on" programming in an "old school" way. At the same time, I wanted to keep it simple, so everyone could follow along.
I like to structure my lessons to show how you got from "there" to "here." Ideally, I would let my students learn how to write a simple program. Then I would pick it up from there to show how modern programming allows developers to create more complex programs. I decided to try an unconventional approach — teach the students about the ultimate in low-level programming: machine language.
### Machine language programming
Early personal computers like the Apple II (1977), TRS-80 (1977), and IBM PC (1981) let users enter programs with a keyboard, and displayed results on a screen. But computers didn't always come with a screen and keyboard.
The Altair 8800 and IMSAI 8080 (both made in 1975) required users to enter a program using "switches and lights" on a panel. You would enter an instruction in machine language, using a bank of switches, and the machine would light up the ones and zeros of each binary instruction using LEDs.
![Image of an Altair 8800 Computer.][1]
Programming these early machines required knowing the machine language instructions, called opcodes, short for operation codes, to perform basic operations like adding two numbers or storing a value into the computer's memory. I wanted to show my students how programmers would enter a series of instructions and memory addresses by hand, using the switches and lights.
However, using an actual Altair 8800 would be too much overhead in this class. I needed something simple that any beginner-level student could grasp. Ideally, I hoped to find a simple "hobby" retro computer that worked similarly to the Altair 8800, but I couldn't find a suitable "Altair-like" device for less than $100. I found several "Altair" software emulators, but they faithfully reproduce the Altair 8800 opcodes, and that was too much for my needs.
I decided to write my own "educational" retro computer. I call it the Toy CPU. You can find it on my [GitHub repository][2], including several releases to play with. Version 1 was an experimental prototype that ran on [FreeDOS][3]. Version 2 was an updated prototype that ran on Linux with [ncurses][4]. Version 3 is a FreeDOS program that runs in graphics mode.
### Programming the Toy CPU
The Toy CPU is a very simple retro computer. Sporting only 256 bytes of memory and a minimal instruction set, the Toy CPU aims for simplicity while replicating the "switches and lights" programming model. The interface mimics the Altair 8800, with a series of eight LEDs for the counter (the "line number" for the program), instruction, accumulator (internal memory used for temporary data), and status.
When you start the Toy CPU, it simulates "booting" by clearing the memory. While the Toy CPU is starting up, it also displays `INI` ("initialize") in the status lights at the bottom-right of the screen. The `PWR` ("power") light indicates the Toy CPU has been turned on.
![Image of start screen for the toy cpu.][5]
When the Toy CPU is ready for you to enter a program, it indicates `INP` ("input" mode) via the status lights, and starts you at counter 0 in the program. Programs for the Toy CPU always start at counter 0.
In "input" mode, use the up and down arrow keys to show the different program counters, and press Enter to edit the instruction at the current counter. When you enter "edit" mode, the Toy CPU shows `EDT` ("edit" mode) on the status lights.
![Image of the toy CPU editing screen.][6]
The Toy CPU has a cheat sheet that's "taped" to the front of the display. This lists the different opcodes the Toy CPU can process:
- `00000000` (`STOP`): Stop program execution.
- `00000001` (`RIGHT`): Shift the bits in the accumulator to the right by one position. The value 00000010 becomes 00000001, and 00000001 becomes 00000000.
- `00000010` (`LEFT`): Shift the bits in the accumulator to the left by one position. The value 01000000 becomes 10000000, and 10000000 becomes 00000000.
- `00001111` (`NOT`): Binary NOT the accumulator. For example, the value 10001000 becomes 01110111.
- `00010001` (`AND`): Binary AND the accumulator with the value stored at an address. The address is stored in the next counter.
- `00010010` (`OR`): Binary OR the accumulator with the value stored at an address.
- `00010011` (`XOR`): Binary XOR (“exclusive or”) the accumulator with the value stored at an address.
- `00010100` (`LOAD`): Load (copy) the value from an address into the accumulator.
- `00010101` (`STORE`): Store (copy) the value in the accumulator into an address.
- `00010110` (`ADD`): Add the value stored at an address to the accumulator.
- `00010111` (`SUB`): Subtract the value stored at an address from the accumulator.
- `00011000` (`GOTO`): Go to (jump to) a counter address.
- `00011001` (`IFZERO`): If the accumulator is zero, go to (jump to) a counter address.
- `10000000` (`NOP`): No operation; safely ignored.
When in "edit" mode, use the left and right arrow keys to select a bit in the opcode, and press `Space`to flip the value between off (0) and on (1). When you are done editing, press `Enter`to go back to "input" mode.
![Image of the toy CPU input mode screen.][7]
### A sample program
I want to explore the Toy CPU by entering a short program that adds two values, and stores the result in the Toy's memory. Effectively, this performs the arithmetic operation **A+B=C**. To create this program, you only need a few opcodes:
- `00010100` (`LOAD`): Load (copy) the value from an address into the accumulator.
- `00010110` (`ADD`): Add the value stored at an address to the accumulator.
- `00010101` (`STORE`): Store (copy) the value in the accumulator into an address.
- `00000000` (`STOP`): Stop program execution.
The `LOAD`, `ADD`, and `STORE` instructions require a memory address, which will always be in the next counter location. For example, the first two instructions of the program are:
```
counter 0: 00010100
counter 1: some memory address where the first value A is stored
```
The instruction in counter 0 is the `LOAD`operation, and the value in counter 1 is the memory address where you have stored some value. The two instructions together copy a value from memory into the Toy's accumulator, where you can work on the value.
Having loaded a number **A** into the accumulator, you need to add the value **B** to it. You can do that with these two instructions:
```
counter 2: 00010110
counter 3: a memory address where the second value B is stored
```
Say that you loaded the value 1 (**A**) into the accumulator, then added the value 3 (**B**) to it. The accumulator will now have the value 4. Now you need to copy the value 4 into another memory address (**C**) with these two instructions:
```
counter 4: 00010101
counter 5: a memory address (C) where we can save the new value
```
Having added the two values together, you can now end the program with this instruction:
```
counter 6: 00000000
```
Any instructions after counter 6 are available for the program to use as stored memory. That means you can use the memory at counter 7 for the value **A**, the memory in counter 8 for the value **B**, and the memory at counter 9 for the stored value **C**. You need to enter these separately into the Toy:
```
counter 7: 00000001 (1)
counter 8: 00000011 (3)
counter 9: 00000000 (0, will be overwritten later)
```
Having figured out all the instructions and the memory locations for **A**, **B**, and **C**, you can now enter the full program into the Toy. This program adds the values 1 and 3 to get 4:
```
counter 0: 00010100
counter 1: 00000111 (7)
counter 2: 00010110
counter 3: 00001000 (8)
counter 4: 00010101
counter 5: 00001001 (9)
counter 6: 00000000
counter 7: 00000001 (1)
counter 8: 00000011 (3)
counter 9: 00000000 (0, will be overwritten later)
```
To run the program, press the `R` key when in "input" mode. The Toy CPU will show `RUN` ("run" mode) in the status lights, and execute your program starting at counter 0.
The Toy has a significant delay built into it, so you can watch the Toy execute each step in the program. You should see the counter move from 00000000 (0) to 00000110 (6) as the program progresses. After counter 1, the program loads the value 1 from memory location 7, and the accumulator updates to 00000001 (1). After counter 3, the program will add the value 3 and update the accumulator to show 00000100 (4). The accumulator will remain that way until the program stores the value into memory location 9 after counter 5 then ends at counter 6.
![Image of the Toy in RUN mode.][8]
### Exploring machine language programming
You can use the Toy to create other programs and further explore machine language programming. Test your creativity by writing these programs in machine language.
### A program to flash the lights on the accumulator
Can you light up the right four bits on the accumulator, then the left four bits, then all of the bits? You can write this program in one of two ways:
A straightforward approach would be to load three values from different memory addresses, like this:
```
counter 0: LOAD
counter 1: "right"
counter 2: LOAD
counter 3: "left"
counter 4: LOAD
counter 5: "all"
counter 6: STOP
counter 7: 00001111 ("right")
counter 8: 11110000 ("left")
counter 9: 11111111 ("all")
```
Another way to write this program is to experiment with the NOT and OR binary operations. This results in a smaller program:
```
counter 0: LOAD
counter 1: "right"
counter 2: NOT
counter 3: OR
counter 4: "right"
counter 5: STOP
counter 6: 00001111 ("right")
```
### Count down from a number
You can use the Toy as a countdown timer. This program exercises the IFZERO test, which will jump the program to a new counter only if the accumulator is zero:
```
counter 0: LOAD
counter 1: "initial value"
counter 2: IFZERO (this is also the "start" of the countdown)
counter 3: "end"
counter 4: SUB
counter 5: "one"
counter 6: GOTO
counter 7: "start"
counter 8: STOP
counter 9: 00000111 ("initial value")
counter 10: 00000001 ("one")
```
The Toy CPU is a great way to learn about machine language. I used the Toy CPU in my introductory course, and the students said they found it difficult to write the first program, but writing the next one was much easier. The students also commented that writing programs in this way was actually fun, and they learned a lot about how computers actually work. The Toy CPU is educational and fun!
--------------------------------------------------------------------------------
via: https://opensource.com/article/23/1/learn-machine-language-retro-computer
作者:[Jim Hall][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/jim-hall
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/2022-12/MITS_Altair_8800_Computer_%281975%29.png
[2]: https://github.com/freedosproject/toycpu
[3]: https://opensource.com/downloads/guide-using-freedos
[4]: https://opensource.com/article/21/8/ncurses-linux
[5]: https://opensource.com/sites/default/files/2022-12/toycpu.png
[6]: https://opensource.com/sites/default/files/2022-12/edit0-load.png
[7]: https://opensource.com/sites/default/files/2022-12/input0-load.png
[8]: https://opensource.com/sites/default/files/2022-12/run-3.png

View File

@ -0,0 +1,101 @@
[#]: subject: "6 tips for building an effective DevOps culture"
[#]: via: "https://opensource.com/article/23/1/tips-effective-devops-culture"
[#]: author: "Yauhen Zaremba https://opensource.com/users/yauhen-zaremba"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
6 tips for building an effective DevOps culture
======
Why would you want to build a [DevOps][1] culture? There are many benefits to the streamlined collaboration of the development and operations teams. A major goal is efficiency: Increasing the speed of new software deployments and reducing idle time for workers. Fostering trust between colleagues can improve employee satisfaction, produce new innovations, and positively impact profitability.
[DevOps][2] is a broad philosophy with a range of interpretations. In other words, you can visit 40 companies and find 40,000 different ideas about using DevOps effectively in the workplace. This diversity of opinion is actually a good thingso many perspectives are useful for building stronger teams. This guide will look at the top tips for encouraging better collaboration between colleagues within a DevOps culture.
Each section offers a different aspect of DevOps culture and looks at ways to introduce it into your workforce.
![DevOps includes collaboration, workflow, infosec, and iteration.][3]
### Continuous development of processes
This core tenet of DevOps culture sets it apart from many other types of workplace ethos. The DevOps philosophy says that it is essential to make mistakes because it shows you are trying out new ideas.
The heart of DevOps culture is a commitment to evolving creativity. Practically, that means not yelling at your direct reports when test results show that things were better before they changed it. It means recognizing that progress is not linear and success is never a straight line.
DevOps expert [Gene Kim][4] advocates for risk-taking and experimentation. This implies letting your team work on unusual tasks to find new insights.
Should your organization be profit-driven? Can you allow your teams to try something new? I'm talking about something other than unrelated passion projects. Continuous process development means being open to upgrading present methods. Great sales leaders appreciate that results matter more than presenteeism, so it is always crucial to focus on how teams are working rather than how much.
### Readily give feedback and actively seek it
Increased trust between individuals is another key feature of a thriving DevOps culture. Whether your staff is learning how to build affiliate network contacts or trying to design their next [UX][5] survey, everyone should be open to feedback on their work. But this will never happen until your teammates respect each other's opinions and trust that feedback is given in a spirit of good intention.
This culture may sound impossible to cultivate; indeed, some companies will struggle to achieve this more than others. Granted, a large part of the success of giving and receiving feedback depends on the personalities of your employees. It is possible to screen for this during the recruitment process.
Before you expect staff to readily offer feedback to colleagues and seek it in the first place, you should lead by example. Members of the C-suite should be modeling this behavior, openly asking members of the company to pose probing questions about their strategic decisions, and providing balanced feedback.
![DevOps is the intersection of development, quality assurance, and operations][6]
### Always look for improvements
Building on increased intellectual trust between colleagues, your team should look for ways to improve its work. The nature of DevOps means the software development team will be producing deployments more rapidly than with traditional approaches.
However, this culture of openness to improvement can positively impact departments beyond development and operations. Ask yourself what other areas of your business could do with a burst of optimism.
Be on the lookout for training and upskilling opportunities. Even if a training course is less salient than advertised, the chance to network with industry professionals and build contacts for the future can only enhance the diversity of ideas within your organization.
### Save ideas for later development
Part of your DevOps toolchain should be a heavily used account on [Git][7]. You can use Git as a common repository for scripts produced during software development and other related projects. Known as "version control," Git allows programmers to save iterations of their work and reuse or improve the work of others.
You're aiming for the ability to keep hold of good ideas for future use. A certain pathway did not work out for specific reasons. However, just because that set of ideas was wrong for the time it was conceived does not mean it can never become helpful in the future.
As the entire focus of DevOps rests on end-to-end ownership of software in production, saving iterations of developments truly supports this principle. You want to see an improved focus on and commitment to the software testing project at hand.
A simple way to incorporate this is to request that developers include ideas for future work in the developer contract and final project report. Make sure tech services managers know they should ask for examples of side-branching ideas that cropped up during the build. The more minds aware of these little innovations, the more likely someone will remember one when needed.
### Sit close together (physically or virtually)
The goal is to share a common understanding of one another's job roles and how they interrelate. You can achieve this in a few simple ways, summarized by three words: Sit close together. Invite other teams to your meetings and share user feedback reports in their entirety. Have lunch together, plan virtual happy hours together, and generally make sure your colleagues are in close proximity. About 90% of teams with a mature DevOps protocol report a clear understanding of their responsibilities to other teams compared to only about 46% of workers in immature DevOps teams.
Although it can be tempting to form cliques with like-minded folk and only hang out with staff hired to carry out the same tasks as you, this is terrible for the business as a whole. Whether you like it or not, all humans are multi-faceted and capable of contributing their unique talents to a whole host of scenarios.
The idea of closer collaboration is to honor the ability of anyone to suggest improvements to the products or work processes going on around them. If you only ever sit at a distance from the other departments within the company, you will miss countless opportunities to share intelligent ideas. After all, you often learn best in the free flow of ideas during a conversation.
### Commit to automation
You should be looking to automate mundane and repetitive tasks in the name of efficiency and process acceleration. Every industry has boringand quite frankly, sillyexercises carried out daily or weekly.
Whether this is manually copying data from one page to another or typing out audio transcripts by hand, staff at every level should insist that machines take on such burdens where possible. The reality is automation technology advances every single year, and operational processes should, too. [Automation testing][8] is so crucial to DevOps that it is the second principle of the CALMS framework (the "C" of which stands for "culture").
How can you make this happen? Invite staff to openly express which aspects of their job they feel could be automated and thenhere is the crucial partsupport the facilities needed to automate them. That might mean a $600 annual subscription to a software program, a complete enterprise application modernization, or two days of developers' time to build a new tool to use in-house.
Either way, you should assess the benefits of automation and consider how much time you could save for everyone. DevOps statistics continually indicate just how much better off modern companies are by integrating these beneficial principles year after year.
### Explore new ways of working successfully
A culture shift doesn't happen overnight. The sooner you start, though, the sooner you see results. In my experience, people embrace change when it's a genuine improvement on what has gone before. DevOps provides a framework for such improvements. Whether you're just getting started with DevOps in your organization or simply want to improve your existing culture, consider the above points and how they relate to your organization's future.
--------------------------------------------------------------------------------
via: https://opensource.com/article/23/1/tips-effective-devops-culture
作者:[Yauhen Zaremba][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/yauhen-zaremba
[b]: https://github.com/lkxed
[1]: https://opensource.com/resources/devops
[2]: https://opensource.com/article/22/2/devops-documentation-maturity
[3]: https://opensource.com/sites/default/files/2022-12/devop.png
[4]: https://enterprisersproject.com/user/gene-kim
[5]: https://opensource.com/article/22/7/awesome-ux-cli-application
[6]: https://opensource.com/sites/default/files/2022-12/devop-venn.png
[7]: https://opensource.com/article/22/11/git-concepts
[8]: https://opensource.com/article/20/7/open-source-test-automation-frameworks

View File

@ -0,0 +1,142 @@
[#]: subject: "What is Firefox ESR? How to Install it in Ubuntu?"
[#]: via: "https://itsfoss.com/firefox-esr-ubuntu/"
[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
什么是 Firefox ESR如何在 Ubuntu 中安装它?
======
Ubuntu 的 snap 版本你不喜欢?不喜欢每一次 Firefox 的发布都要不断地改变东西?如果你重视稳定性而不是功能,你可以试试 Firefox ESR 版本。
### 什么是 Firefox ESR
Firefox ESR 是 Firefox 的特别版,它不一定像普通版那样每月都有新功能,但它能提供稳定和安全的浏览体验。这适用于企业、组织和机构,在这些地方,稳定性和核心功能比闪亮的新功能更重要。
把 Firefox ESR 看作是 Linux 发行版的长期稳定版本。他们不一定得到全新的功能,但他们会得到定期的安全和维护更新。这给了用户一个熟悉和稳定的环境。
#### 你为什么要关心 Firefox ESR
Firefox 几乎每个月都会发布一个新版本。它包含安全和功能更新。
但有些人可能不喜欢功能的加入和删除。如果在更新之后你一直想知道某些设置到哪里去了或者不喜欢与以前不同的东西Firefox ESR可能值得一试。
基本上,如果你更看重稳定性而不是新功能,那么 Firefox ESR 就适合你。这也是与 Debian 相同的 Firefox 版本Debian 以其是市场上最稳定的发行版之一而闻名。
让我告诉你如何在 Ubuntu 上获得 Firefox ESR。**_你可以同时安装 Firefox 和 Firefox-ESR 两个版本。它们的标识没有视觉上的区别所以你必须注意你打开的是哪个火狐版本。_**
### 在 Ubuntu 中安装 Firefox ESR
在进入安装之前,让我来分享一下普通 Firefox 和 Firefox-ESR 之间的版本差异是什么。在写这篇文章的时候:
- Firefox 的版本是 **107.0-2**
- Firefox-ESR 目前的版本是 **102.5.0esr**
所以,如果这对你来说没问题,让我们看看第一个方法。
#### 方法 1使用 PPA 安装 Firefox-ESR
Firefox-ESR 在 Ubuntu 的默认仓库中是不可用的,所以你可以使用 PPA。
PPA 只不过是一个由个别技术人员或开发者维护的仓库,拥有默认仓库所没有的东西。
如果你想了解更多关于 PPA 的信息,我建议你查看我们的其他指南,其中解释了[如何在 Linux 上使用 PPA][1]。
打开你的终端,使用给定的命令来添加 Firefox-ESR 的 PPA
```
sudo add-apt-repository ppa:mozillateam/ppa
```
然后按回车键确认你要添加 PPA
![add firefox esr repository in ubuntu][2]
完成后,你需要更新 Ubuntu 中的仓库索引,以便从这些变化中生效:
```
sudo apt update
```
现在,你可以通过使用给定的命令来安装 Firefox-ESR
```
sudo apt install firefox-esr
```
接下来,你可以使用给定的命令来检查你系统中 Firefox-ESR 的安装版本:
```
firefox-esr -v
```
![check installed version of firefox esr in ubuntu][3]
##### 从 Ubuntu 卸载 Firefox-ESR
如果 ESR 对你的工作来说感觉太过时了,或者由于其他原因你想从你的系统中删除它,你可以按照以下步骤删除 Firefox-ESR 包和仓库。
首先,让我们用下面的方法删除 Firefox-ESR 包:
```
sudo apt remove firefox-esr
```
现在,你可以使用给定的命令来[从 Ubuntu 删除 PPA][4]
```
sudo add-apt-repository --remove ppa:mozillateam/ppa
```
这就完成了!
#### 方法 2使用 Snap 安装 Firefox-ESR
不管你爱不爱它Snaps 在 Ubuntu 上是预先配置好的,我发现使用 Snaps 是安装软件包的一个很好的方法,特别是当你想避免从源码构建它们或使用 PPA 时。
使用 Snaps 安装 Firefox-ESR你需要做的就是使用给定的命令
```
sudo snap install firefox --channel=esr/stable
```
![install firefox esr using snaps in ubuntu][5]
##### 删除 Firefox-ESR Snap
要删除 Firefox-ESRsnap 包),请使用 [snap remove 命令][6]
```
sudo snap remove firefox
```
这就完成了!
### 总结
我在本指南中解释了如何使用多种方法在 Ubuntu 中安装 Firefox-ESR。我个人使用 Firefox-ESR 而不是普通版本,因为我有随机崩溃的情况。
自从我改用 Firefox-ESR 后,一切都变得稳如磐石。如果你也有同样的问题,你应该试一试。
--------------------------------------------------------------------------------
via: https://itsfoss.com/firefox-esr-ubuntu/
作者:[Sagar Sharma][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/sagar/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/ppa-guide/
[2]: https://itsfoss.com/wp-content/uploads/2022/11/add-firefox-esr-repository-in-ubuntu.png
[3]: https://itsfoss.com/wp-content/uploads/2022/11/check-installed-version-of-firefox-esr-in-ubuntu.png
[4]: https://itsfoss.com/how-to-remove-or-delete-ppas-quick-tip/
[5]: https://itsfoss.com/wp-content/uploads/2022/11/install-firefox-esr-using-snaps-in-ubuntu.png
[6]: https://itsfoss.com/remove-snap/

View File

@ -0,0 +1,80 @@
[#]: subject: "An Open-Source Alternative to Google, Alexa, and Siri in Works for Home Assistant Platform"
[#]: via: "https://news.itsfoss.com/open-source-assistant/"
[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Google、Alexa 和 Siri 的开源替代品 Home Assistant 平台
======
一个开源助手可以取代谷歌、Alexa 和 Siri
![An Open-Source Alternative to Google, Alexa, and Siri in Works for Home Assistant Platform][1]
**Home Assistant** 是一个开源的智能家居平台,专注于为用户提供本地控制和隐私。它可以从树莓派或甚至本地服务器上运行。
他们还有一个订阅服务,可以获得额外的功能,如支持 Alexa 和谷歌助理,它由一家名为 “[Nabu Casa][2]” 的公司管理。
> 💡 该公司由 Home Assistant 的创始人 [Paulus Schoutsen][3] 领导。
在上周的[博客][4]中Paulus 宣布了**一个新的开源项目,旨在提供一个没有主动互联网连接的语音助手**或任何其他大型科技语音助手。
这是_一个对 Google、Alexa 和 Siri 的开源挑战者_ 😲
让我们看看这到底是怎么回事。
**它是什么?:**这将是 Home Assistant 应用的一部分,将提供在本地运行语音命令的能力,以控制连接的智能设备。
Paulus 还断言,他们最重要的优先事项是支持不同的语言,他说:
> 人们需要能够用自己的语言说话,因为对于智能家居的语音助手来说,这是最容易接受和唯一可以接受的语言。
为了推动这一努力Rhasspy 的创造者 [Mike Hansen][5] 已经被拉来实现这一目标。
对于那些不知道的人来说,[Rhasspy][6] 是另一个开源软件,专门提供一个由其用户社区支持的完全离线的语音助手。
如果你问我,我觉得 Home Assistant 的这个功能将由 Rhasspy 提供,这是一件好事。
_为什么要重新发明已经存在的东西最好是在它的基础上进行改进。_
**可以期待什么?:**最初,语音助手将不能做你可能期待的事情。因此,像进行网络搜索、打电话、玩语音游戏等,都是不可能的。
它所关注的反而是**语音助手应该有的基本功能**。这样做是为了确保他们面前的工作是可控的。
他们的目标是从几个动作开始,然后围绕它们建立语言模型。
在目前的状态下Home Assistant 在其用户界面上支持 62 种不同的语言。他们计划用他们的语音助手增加对所有这些语言的支持。
**何时期待?:**他们已经开始了这方面的工作,为每种语言建立一个[意图匹配句子集合][7]。
这意味着社区可以通过将智能设备的命令改编成各自的母语来为语音助手的发展做出贡献。
他们的目标是在 **2023** 年的某个时候发布并提到这将是“_语音年_”。
我认为一个可以离线工作的开源语音助手可以是一个非常有用的东西。它可以让你不受大科技公司的任何追踪。
💬 _还有一个额外的好处是它的开发背后有一个庞大的社区有什么理由不喜欢呢_
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/open-source-assistant/
作者:[Sourav Rudra][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://news.itsfoss.com/author/sourav/
[b]: https://github.com/lkxed
[1]: https://news.itsfoss.com/content/images/size/w2000/2022/12/open-source-home-assistant-in-works.png
[2]: https://www.nabucasa.com
[3]: https://twitter.com/balloob
[4]: https://www.home-assistant.io/blog/2022/12/20/year-of-voice/
[5]: https://synesthesiam.com
[6]: https://rhasspy.readthedocs.io
[7]: https://github.com/home-assistant/intents