Merge branch 'LCTT:master' into master

This commit is contained in:
ZZJ
2022-12-09 21:18:50 +08:00
committed by GitHub
21 changed files with 1936 additions and 447 deletions

View File

@@ -0,0 +1,103 @@
[#]: subject: "How to Change Login Screen Background in Ubuntu"
[#]: via: "https://www.debugpoint.com/change-login-background-ubuntu/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "robsean"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15329-1.html"
如何更改 Ubuntu 的登录屏幕背景
======
![][0]
> 这篇指南可以让你如何摆脱 Ubuntu 的无趣的登录背景屏幕,并在你每次登录时设置一张漂亮的图片来欢迎你。
我总是认为,在你启动你的系统后,应该有一个漂亮的登录屏幕来欢迎你。这本身就为你即将开始的工作或活动渲染了愉快的氛围。尽管,我不是一名 Windows 的粉丝,但是我很欣赏 Windows 10 的登录背景都会每天随着 Bing 壁纸进行更改,它看起来好极了,对吧?
前段时间,我们讨论了如何 [更改 Fedora 的登录屏幕背景][1] 和 [更改 elementary OS 的登录屏幕背景][2] 。现在这篇指南将向你解释,如何更改使用 GNOME Shell 的 Ubuntu 的登录屏幕背景。
登录屏幕背景是显示管理器DM属性的一部分。这篇指南将使用一位用户在 GitHub 中创建的一个脚本,使得普通用户也能简单易用。否则,你需要在提取 `.gresource` 文件后,必须手动更改 <ruby>Gnome 显示管理器<rt>Gnome Display Manager</rt></ruby>GDM的 CSS 文件,接下来再编译它。一般来说,这是很复杂的。
![Ubuntu 登录屏幕 在更改前][3]
### 更改 Ubuntu 的登录背景
打开一个终端(按下组合键 `CTRL+ALT+T`)。
使用下面的命令,下载这个 [GitHub 仓库][4]
```
wget github.com/thiggy01/change-gdm-background/raw/master/change-gdm-background
```
**注意**: 如果你没有 `wget` ,使用 `sudo apt install wget` 来安装它。
> **Ubuntu 22.04 Jammy Jellyfish** 用户需要更改一些额外的代码来使其工作,因为,在 GitHub 仓库中,开发者没有修复它。因此,在这里你需要自己来更改。
>
> 使用 gedit 来打开 `change-gdm-background` 文件。接下来,转到下面的行(`#15` 并添加 `|jammy` 。
>
> ![脚本更改为允许 jammy][5]
>
> 接下来,转到下面的两行(`#144` 和 `#184`)。将 `gdm3.css` 更改为 `gdm.css` 。如下图所示。
>
> ![修正针对 gdm 的 css 文件][6]
>
> 最后,保存文件,并遵循如下的操作指南。这种解决方法只适用于 Ubuntu 22.04 的登录屏幕的更改。
更改脚本的权限来使其可执行:
```
chmod +x change-gdm-background
```
接下来,更改 Ubuntu 的登录背景壁纸,使用下面的命令。按照你的图片相应地更改路径:
```
sudo ./change-gdm-background ~/Pictures/tree.jpg
```
这一步骤可能需要 `libglib2.0-dev` 软件包,它将会自动地安装。提取和编译 `.gresource` 会用到它。
在安装后,它应该会提示你重新启动 GDM 。慎重起见,按下 `N` 按键。
注销后,你可以看到更改后的 Ubuntu 的背景。
如果你没有看到更改,尝试重新启动你的系统,然后尝试登录。
![在更改后的Ubuntu 的登录屏幕背景][7]
### 恢复先前的登录屏幕
该脚本也提供了一种恢复先前的登录屏幕的特色功能。它在更改你的 `.gresource` 文件前,会将其进行备份。因此,恢复先前的登录屏幕,只需要在终端中简单地运行下面的命令。
```
sudo ./change-gdm-background --restore
```
这应该会将其登录屏幕更改回其先前的形式。
请在下面的评论框中,让我知道这篇指南的内容是否对你有效果,这应该适用于所有的最新版本的 Ubuntu Linux 。
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/change-login-background-ubuntu/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[robsean](https://github.com/robsean)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed
[1]: https://www.debugpoint.com/2021/09/change-login-background-fedora/
[2]: https://www.debugpoint.com/2021/07/change-lock-login-screen-background-elementary-os/
[3]: https://www.debugpoint.com/wp-content/uploads/2021/09/Ubuntu-Login-screen-before-change-1024x539.jpg
[4]: https://github.com/thiggy01/change-gdm-background
[5]: https://www.debugpoint.com/wp-content/uploads/2022/09/script-change-to-allow-jammy.jpg
[6]: https://www.debugpoint.com/wp-content/uploads/2022/09/correct-the-css-file-for-gdm.jpg
[7]: https://www.debugpoint.com/wp-content/uploads/2021/09/Ubuntu-Login-screen-After-Change-1024x538.jpg
[0]: https://img.linux.net.cn/data/attachment/album/202212/08/121701hdfufrlqe4qtdtel.jpg

View File

@@ -0,0 +1,158 @@
[#]: subject: "Doing 64-bit math on a 16-bit system"
[#]: via: "https://opensource.com/article/22/10/64-bit-math"
[#]: author: "Jerome Shidel https://opensource.com/users/shidel"
[#]: collector: "lkxed"
[#]: translator: "yzuowei"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15332-1.html"
如何在 16 位系统上进行 64 位数学运算
======
![][0]
> 只要对汇编有一点基本的了解,这些函数就能扩展到任意位长的整型数学运算。
几年前,我为 FreeDOS 写了一个叫做 VMATH 的命令行数学程序。它只能在很小的无符号整型上执行十分简单的数学运算。随着近来 FreeDOS 社区里对基础数学的兴趣,我改进了 VMATH 使其可以为有符号 64 位整型提供基本的数学支持。
仅使用 16 位 8086 兼容的汇编指令来操控大型数字的过程并不简单。我希望能够分享一些在 VMATH 中用到的技术例子。其中一些方法掌握起来相当容易。而另外一些方法则看起来有点奇怪。你甚至可能学到一种进行基本数学运算的全新方式。
接下来要讲的加、减、乘、除会用到的技术将不局限于并不局限于 64 位整型。只要对汇编有一点基本的了解,这些函数就能扩展到任意位长的整型数学运算。
在深入研究这些数学函数前,我想先从计算机的角度介绍一下数字的一些基本知识。
### 计算机是如何读取数字的
一个英特尔兼容的 CPU 以<ruby>字节<rt>Byte</rt></ruby>的形式贮存数字,储存顺序为从最低有效字节到最高有效字节。每个字节由 8 个二进<ruby>位<rt>Bit</rt></ruby>组成,两个字节组成一个<ruby>字<rt>Word</rt></ruby>。
一个储存在内存里的 64 位整型占用了 8 个字节(即 4 个字)。例如,数字 `74565`(十六进制表示为 `0x12345`)的值长得是这个样子的:
```
用字节表示db 0x45, 0x23, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00
用字表示dw 0x2345, 0x0001, 0x0000, 0x0000
```
当读取或写入数据到内存时CPU 会以正确的顺序处理这些字节。对于比 8086 更现代的处理器而言,数据分组可以再大些,比如一个<ruby>四字组<rt>Quadword</rt></ruby>就可以表达整个 64 位整型 `0x0000000000012345`
8086 CPU 不能理解这么大的数字。当为 FreeDOS 编程时,你想要写的是一个能在任意电脑上跑的程序,甚至是原始的 IBM PC 5150。你想要使用能够扩展到任意大小整型的技术。我们其实并不关心更现代 CPU 的能力。
为了能做整型运算,我们的数据需要表达两种不同类型的数字。
第一种是<ruby>无符号<rt>unsigned</rt></ruby>整型,其使用了所有的位来表达一个正数。无符号整型的值域为从 `0` 到 $2^{位长} - 1$。例如8 位数可以是 `0``255` 之间的任意值,而 16 位数则在 `0`
`65535` 之间,以此类推。
有符号整型也很类似。不同之处在于数字的最高位代表了这个数是一个正数(`0`)还是一个负数 `1`)。有符号整型的值域前半部分为正数,正数值域是从 `0` 到 $2^{(位长 - 1)} - 1$。整型值域的后半部分为负数,负数值域则从 $0 - (2^{位长 - 1})$ 到 `-1`
比如说,一个 8 位数代表着 `0``127` 之间的任意正数,以及 `-128``-1` 之间的任意负数。为了能更好的理解这一点,想象 **字节** 为一列数组 `[0...127,-128...-1]`。因为 `-128` 在数组内紧跟着 `127``127``1` 等于 `-128`。当然这可能看起来有点奇怪甚至反常,但这其实让这个层级的基本数学运算变简单了。
为了能够对大型整型进行简单的加、减、乘、除,你应该摸索一些简单的公式来计算一个数的绝对值或负值。你在做有符号整型运算的时候会用上它们的。
### 绝对值与负值
计算一个有符号整型的绝对值并没有它看起来的那么糟糕。由于无符号和有符号数字在内存里的储存形式,我们其实有一个简单的方案。你只需要翻转一个负数的所有字位,得出的结果再加 `1`
如果你从没接触过二进制的话,这可能听上去有点奇怪,但这就是这么工作的。让我们来举一个例子,取一个负数的 8 位表达,比如说 `-5`。因为 `-5` 靠近 `[0...127,-128...-1]` 字节组末端,它的十六进制值为 `0xfb`,二进制值为 `11111011`。如果你翻转了所有字位,你会得到 `0x04` 或二进制值 `00000100`。结果加 `1` 你就得到了你的答案:你刚刚把 `-5` 的值变成了 `+5`
你可以用汇编写下这个程序用以返回任意 64 位数字的绝对值:
```
; 语法NASM for DOS
proc_ABS:
  ; 启动时SI 寄存器会指向数据段DS内的内存位置那里存放着程序内包含着
  ; 会被转为正数的 64 位数。
  ; 结束时如果结果数字不能被转正CF 寄存器会被设置。这种情况只
  ; 有在遇到最大负值时会发生。其余情况CF 不会被设置。
 
  ; 检查最高字节的最高位
  test [si+7], byte 0x80
  ; 如不为 1值为正值
  jz .done_ABS
  ; 翻转所有位
  not word [si+6] ; 字 #4
  not word [si+4]       ; 字 #3
  not word [si+2]       ; 字 #2
  not word [si]         ; 字 #1
  ; 字 #1 加 1
  inc word [si]
  ; 如结果不为 0结束
  jnz .done_ABS
  ; 字 #2 加 1
  inc word [si+2]
  ; 如结果为 0进位下一个字
  jnz .done_ABS
  inc word [si+4]
  jnz .done_ABS
  ; 此处无法进位
  inc word [si+6]
  ; 再一次检查最高位
  test [si+7], byte 0x80
  ; 如不为 1我们成功了结束
  jz .done_ABS
  ; 溢出错误,它被转成了负数
  stc
  ; 设置 CF 并返回
  ret
.done_ABS:
  ; 成功,清理 CF 并返回
  clc
  ret
```
你可能已经注意到了,这个函数有一个潜在问题。由于正数和负数的二进制值表达方式,最大负数无法被转成正数。以 8 位数为例,最大负数是 `-128`。如果你翻转了 `-128` 的所有位数(二进制 `1__0000000`),你会得到 127二进制 `0__1111111`)这个最大正值。如果你对结果加 `1`,它会因溢出回到同样的负数(`-128`)。
要将正数转成负数,你只需要重复计算绝对值的步骤就行。以下的程序十分相似,你唯一需要确认的就是一开始的数字不是已经负了。
```
; 语法, NASM for DOS
proc_NEG:
  ; 开始时SI 会指向需要转负的数字在内存里的位置。
  ; 结束时CF 永远不会被设置。
 
  ; 检查最高字节的最高位
  test [si+7], byte 0x80
  ; 如为 1数已经是负数
  jnz .done_NEG
  not word [si+6]       ; 翻转字的所有位,字 #4
  not word [si+4]       ; 字 #3
  not word [si+2]       ; 字 #2
  not word [si]         ; 字 #1
  inc word [si]         ; 字 #1 加 1
  ; 如结果不为 0结束
  jnz .done_NEG
  ; 字 #2 加 1
  inc word [si+2]
  ; 如结果为 0进位下一个字
  jnz .done_NEG
  inc word [si+4]
  jnz .done_NEG
  ; 此处无法进位或转化
  inc word [si+6]
  ; 正。
.done_NEG:
  clc                   ; 成功,清理 CF 并返回
  ret
```
看着这些绝对值函数与负值函数间的通用代码,它们应该被合并起来节约一些字节。合并代码也会带来额外的好处。首先,合并代码能帮助防止简单的笔误。这样也可以减少测试的要求。进一步来讲,这样通常会让代码变得简单易懂。在阅读一长串的汇编指令时,忘记读到哪里是常有的事。现在,我们可以不管这些。
计算一个数的绝对值或负值并不难。但是,这些函数对于我们即将开始的有符号整型数学运算至关重要。
我已经介绍了整型数字在位这一层面的基本表示方法,也创造了可以改变这些数字的基本程序,现在我们可以做点有趣的了。
让我们来做些数学运算吧!
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/10/64-bit-math
作者:[Jerome Shidel][a]
选题:[lkxed][b]
译者:[yzuowei](https://github.com/yzuowei)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/shidel
[b]: https://github.com/lkxed
[0]: https://img.linux.net.cn/data/attachment/album/202212/09/150829g7c7x5e22qqo53c4.jpg

View File

@@ -3,18 +3,22 @@
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15328-1.html"
4 分钟了解 Lua for 循环
了解 Lua for 循环
======
在编程中,迭代是一个重要的概念,因为代码通常必须多次扫描一组数据,以便它可以单独处理每个项目。控制结构使你能够根据通常在程序运行时动态建立的条件来指导程序的流程。不同的语言提供不同的控制,在 [Lua][1] 中,有 while 循环、for 循环和 repeatuntil 循环。本文介绍 for 循环。我将在另一篇文章中介绍 while 和 repeat until 循环。
![][0]
### For 循环
> 了解 for 循环结构和你在控制它时拥有的选项,这样你可以对如何在 Lua 中处理数据做出聪明的决定。
for 循环采用已知数量的项目并确保处理每个项目。“项目”可以是数字。它也可以是一个包含多个条目或任何 Lua 数据类型的表。语法和逻辑有点灵活,但语法允许这些参数,每个参数本质上描述了一个计数器:
在编程中,迭代是一个重要的概念,因为代码通常必须多次扫描一组数据,以便它可以单独处理每个项目。控制结构使你能够根据通常在程序运行时动态建立的条件来指导程序的流程。不同的语言提供不同的控制,在 [Lua][1] 中,有 `while` 循环、`for` 循环和 `repeat until` 循环。本文介绍 `for` 循环。我将在另一篇文章中介绍 `while``repeat until` 循环。
### for 循环
`for` 循环接受已知数量的项目并确保处理每个项目。“项目”可以是数字,它也可以是一个包含多个条目或任何 Lua 数据类型的表。语法和逻辑有点灵活,但语法允许这些参数,每个参数本质上描述了一个计数器:
- 计数器的起始值
- 停止值
@@ -32,7 +36,10 @@ end
运行代码以确保所有三个项目都得到处理:
```
$ lua ./for.lua3: apocalypse2: Halloween1: zombie
$ lua ./for.lua
3: apocalypse
2: Halloween
1: zombie
```
这段代码有效地“反向”处理了表,因为它是倒数。你可以正数:
@@ -46,7 +53,10 @@ end
此示例从最低索引到最高索引处理表:
```
$ lua ./for.lua1: zombie2: Halloween3: apocalypse
$ lua ./for.lua
1: zombie
2: Halloween
3: apocalypse
```
### 增量
@@ -90,7 +100,7 @@ end
此代码创建一个变量,其中包含启动时的时间戳。如果时间戳是偶数(除以 2 时模数为 0则只将时间戳放入表中。如果时间戳是奇数它将三个字符串放入一个表中。
现在你无法确定的 for 循环需要运行多少次。可能是一次或是三次,但没有办法确定。解决方案是将起始计数设置为 1将最终计数设置为表的长度`#mytable` 是确定表长度的内置快捷方式)。
现在你无法确定`for` 循环需要运行多少次。可能是一次或是三次,但没有办法确定。解决方案是将起始计数设置为 1将最终计数设置为表的长度`#mytable` 是确定表长度的内置快捷方式)。
可能需要多次运行脚本才能看到这两个结果,但最终,你会得到如下结果:
@@ -104,7 +114,7 @@ baz
### 带 pairs 和 ipairs 的 for 循环
如果你已经阅读了我关于[表迭代][2]的文章,那么你已经熟悉了 Lua 中最常见的 for 循环之一。这个使用 `pairs``ipairs` 函数来迭代一个表:
如果你已经阅读了我关于 [表迭代][2] 的文章,那么你已经熟悉了 Lua 中最常见的 `for` 循环之一。这个使用 `pairs``ipairs` 函数来迭代一个表:
```
mytable = { "zombie", "Halloween", "apocalypse" }
@@ -113,15 +123,15 @@ for i,v in ipairs(mytable) do
end
```
`pairs``ipairs` 函数“解包”表并将值转储到你提供的变量中。在此示例中,我将 `i` 用于 _index_,将 `v` 用于 _value_,但变量名称无关紧要。
`pairs``ipairs` 函数“解包”表并将值转储到你提供的变量中。在此示例中,我将 `i` 用于 _索引_,将 `v` 用于 __,但变量名称无关紧要。
```
$ lua ./for.lua1: zombie2: Halloween3: apocalypse
```
### For 循环
### for 循环
for 循环结构在编程中很常见,由于经常使用表和 pairs 函数,因此在 Lua 中非常常见。了解 for 循环结构和控制它时的选项意味着你可以就如何在 Lua 中处理数据做出明智的决定。
`for` 循环结构在编程中很常见,由于经常使用表和 `pairs` 函数,因此在 Lua 中非常常见。了解 `for` 循环结构和控制它时的选项意味着你可以就如何在 Lua 中处理数据做出明智的决定。
--------------------------------------------------------------------------------
@@ -130,7 +140,7 @@ via: https://opensource.com/article/22/11/lua-for-loops
作者:[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/) 荣誉推出
@@ -138,3 +148,4 @@ via: https://opensource.com/article/22/11/lua-for-loops
[b]: https://github.com/lkxed
[1]: https://opensource.com/article/22/11/lua-worth-learning
[2]: https://opensource.com/article/22/11/iterate-over-tables-lua
[0]: https://img.linux.net.cn/data/attachment/album/202212/08/094609xg8sgk832t0y6s68.jpg

View File

@@ -0,0 +1,134 @@
[#]: subject: "Kali Linux's Last Update for the Year Brings a Lot of Early Christmas Gifts"
[#]: via: "https://news.itsfoss.com/kali-linux-2022-4-release/"
[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/"
[#]: collector: "lkxed"
[#]: translator: "wxy"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-15330-1.html"
Kali Linux 发布今年最后一个版本
======
> Kali Linux 2022.4 现在已经可以下载了。从这里了解它的新内容。
![Kali Linux 今年的最后一次更新早早带来了很多圣诞礼物][1]
Kali Linux 是一个开源的、基于 Debian 的发行版,专注于渗透测试和安全审计。
它由各种工具、配置和自动化脚本组成,以帮助你实现这一目标。
作为今年的最后一个版本,**Kali Linux 2022.4** 与其 [前一个版本][2] 相比有许多改进。
让我带你了解这个版本。
### 🆕 有什么新变化?
![kali linux 22.04][3]
Kali Linux 2022.4 以更新的形式早早带来了圣诞礼物;这里有一些快乐的东西!🎄
- Linux 内核 6.0
- 返回微软 Azure 市场
- 支持 Pine 64 的 PinePhone
- 新的桌面环境
- QEMU 镜像
- 新的工具
#### 支持 Pine 64 的 PinePhone
![kali linux nethunter pro on pinephone pro][4]
Kali Linux 现在已经正式支持 Pine 64 的 PinePhone 和 PinePhone Pro。
这种支持是以一种新的以移动为重点的发行版的形式出现的,名为 “Kali NetHunter Pro”。
他们把它标记为 Kali Linux 和 [NetHunter][5] 的一个新的起点;这个发行版已经为移动设备进行了优化,可以从 SD 卡上与主操作系统一起双启动。
此外,他们还暗示未来将发布 Kali NetHunter Pro 的替代版本。
这些版本将以 Plasma Mobile 为特色,同时提供了新的安装程序,可以将 Kali NetHunter Pro 安装到设备的内部闪存中。
#### 返回微软 Azure 市场
![kali linux 22.04 Azure Marketplace][6]
在离开 Azure 市场很长时间后Kali Linux 终于被 [添加回来][7] 了。
Kali Linux 背后的公司 [Offensive Security][8] 提到,借助 [kali-cloud build-scripts][9],现在发布过程已经自动化了。
用户现在将享受与他们的 [亚马逊 AWS 镜像][10] 相同的一致性水平。
#### 新的桌面环境
![kali linux 22.04 with gnome 43][11]
通常情况下Kali Linux 使用轻量级的 Xfce 桌面环境作为其默认的桌面环境。
但现在,它也支持最近的 KDE Plasma 和 GNOME。
**在 Plasma 方面:** Kali Linux 现在采用了 KDE Plasma 5.26;改善了整体的桌面体验,并引入了许多调整和改进。
**在 GNOME 方面:** 包括了 [GNOME 43][12] 的常规增强,他们也增加了一些自己的调整。
在 [adw-gtk3][13] 项目的基础上增加了一个新的基于 GTK3 的主题,并加入了一些 Kali 的调整。
然后,新的 GNOME 文本编辑器取代了 Gedit并带有一个更新的 Kali 主题。
#### QEMU 镜像
他们还在预生成的镜像库中增加了一个新的 [QEMU 镜像][14],希望它能让人们更容易在 [Proxmox Virtual Environments][15]、[virt-manager][16] 或 [libvirt][17] 等自托管环境中部署 Kali Linux。
#### 🛠️ 其他变化/改进措施
除了上述变化,还有其他几个值得注意的变化:
- 增强了对 Kali NetHunter 的蓝牙支持。
- 增加了 Kali 对树莓派镜像烧录工具的支持。
- USBArmory MKII 中的 u-boot 引导加载器已经更新到 2022.10。
- 更新了各种 Kali 文档。
- 新的工具,如 bloodhound.py、certipy、rizin-cutter 等等。
- 重新打造了 Kali Linux 的社交媒体渠道。
你可以通过 [发布公告][18] 来了解更多技术细节。
### 📥 下载 Kali Linux 2022.4
Kali Linux 2022.4 已经在 [官方网站][19] 上提供了。
> **[Kali Linux 2022.4][19]**
你可以选择适合你的要求的镜像并下载它。
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/kali-linux-2022-4-release/
作者:[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/2022/12/kali-linux-2022-04-release.jpg
[2]: https://news.itsfoss.com/kali-linux-2022-3-release/
[3]: https://news.itsfoss.com/content/images/2022/12/Kali-Linux-2022.4.png
[4]: https://news.itsfoss.com/content/images/2022/12/Kali-Linux-2022.4_NetHunter_Pro.jpg
[5]: https://www.kali.org/docs/nethunter/
[6]: https://news.itsfoss.com/content/images/2022/12/Kali-Linux-2022.4_Azure.jpg
[7]: https://azuremarketplace.microsoft.com/en/marketplace/apps/kali-linux.kali
[8]: https://www.offensive-security.com
[9]: https://gitlab.com/kalilinux/build-scripts/kali-cloud
[10]: https://aws.amazon.com/marketplace/pp/prodview-fznsw3f7mq7to
[11]: https://news.itsfoss.com/content/images/2022/12/Kali-Linux-2022.4_GNOME43.jpg
[12]: https://news.itsfoss.com/gnome-43-release/
[13]: https://github.com/lassekongo83/adw-gtk3
[14]: https://qemu-project.gitlab.io/qemu/system/images.html
[15]: https://www.proxmox.com/en/proxmox-ve
[16]: https://virt-manager.org
[17]: https://libvirt.org
[18]: https://www.kali.org/blog/kali-linux-2022-4-release/#desktop-updates
[19]: https://www.kali.org/get-kali/

View File

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

View File

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

View File

@@ -1,156 +0,0 @@
[#]: subject: "Doing 64-bit math on a 16-bit system"
[#]: via: "https://opensource.com/article/22/10/64-bit-math"
[#]: author: "Jerome Shidel https://opensource.com/users/shidel"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Doing 64-bit math on a 16-bit system
======
With a little basic understanding of assembly, these functions could be scaled to do math on integers of any bit size.
A few years ago, I wrote a command-line math program for FreeDOS called VMATH. It was capable of performing only extremely simple mathematical operations on very small unsigned integers. With some recent interest in basic math in the FreeDOS community, I improved VMATH to provide basic math support on signed 64-bit integers.
The process of manipulating big numbers using only 16-bit 8086 compatible assembly instructions is not straightforward. I would like to share some samples of the techniques used by VMATH. Some of the methods used are fairly easy to grasp. Meanwhile, others can seem a little strange. You may even learn an entirely new way of performing some basic math.
The techniques explained here to add, subtract, multiply, and divide 64-bit integers are not limited to just 64-bits. With a little basic understanding of assembly, these functions could be scaled to do math on integers of any bit size.
Before digging into those math functions, I want to cover some basics of numbers from the computer's perspective.
### How computers read numbers
An Intel-compatible CPU stores the value of numbers in bytes from least to most significant. Each byte is made up of 8 binary bits and two bytes make up a word.
A 64-bit number that is stored in memory uses 8 bytes (or 4 words). For example, a value of 74565 (0x12345in hexadecimal) looks something like this:
```
as bytes: db 0x45, 0x23, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00
as words: dw 0x2345, 0x0001, 0x0000, 0x0000
```
When reading or writing data to memory, the CPU processes the bytes in the correct order. On a processor more modern than an 8086, there can be larger groups, such as a quadword which can represent the entire 64-bit integer as **0x0000000000012345**.
The 8086 CPU doesn't understand such gigantic numbers. When writing a program for FreeDOS, you want something that can run on any PC, even an original IBM PC 5150. You also want to use techniques that can be scaled to any size integer. The capabilities of a more modern CPU do not really concern us.
For the purpose of doing integer math, the data can represent two different types of numbers.
The first is unsigned which uses all of its bit to represent a positive number. Their value can be from **0** up to **(2 ^ (numberofbits) - 1)**. For example, 8 bits can have any value from **0** to **255**, with 16 bits ranging from **0** to **65535**, and so on.
Signed integers are very similar. However, the most significant bit of the number represents whether the number is positive (**0**) or negative (**1**). The first portion of the number is positive. It can range from **0** up to **(2 ^ (numberofbits - 1) - 1)**. The negative portion follows the positive, ranging from its lowest value **(0-(2 ^ (numberofbits - 1)))** up to **-1**.
For example, an 8-bit number represents any value from **0** to **127** in the positive range, and **-128** through **-1** in the negative range. To help visualize it, consider the **byte** as the set of numbers **[0…127,-128…-1]**. Because **-128** follows **127** in the set, adding **1** to **127** equals **-128**. While this may seem strange and backward, it actually makes doing basic math at this level much easier.
To perform basic addition, subtraction, multiplication, and division of very big integers, you should explore some simple routines to get a number's absolute or negative value. You will need them once you start doing math on signed integers.
### Absolute and negative values
Getting the absolute value of a signed integer is not as bad as it may first seem. Because of how unsigned and signed numbers are represented in memory, there is a fairly easy solution. You can simply invert all the bits of a negative number and add **1** to get the result.
That might sound odd if you haven't worked in binary before, but that is how works. To give you an example, take an 8-bit representation of a negative number, such as **-5**. Since it would be near the end of the **[0…127,-128…-1]** byte set, it would have a value of **0xfb** in hexadecimal, or **11111011** in binary. If you flip all the bits, you get **0x04**, or **00000100** in binary. Add **1** to that result and you have the answer. You just changed the value from **-5** to **+5**.
You can write this procedure in assembly to return the absolute value of any 64-bit number:
```
; syntax, NASM for DOS
proc_ABS:
  ; on entry, the SI register points to the memory location in the
  ; data segment (DS) for the program containing the 64-bit
  ; number that will be made positive.
  ; On exit, the Carry Flag (CF) is set if resulting number can
  ; not be made positive. This only happens with maximum
  ;  negative value. Otherwise, CF is cleared.
  ; check most significant bit of highest byte
  test [si+7], byte 0x80
  ; if not set, the number is positive
  jz .done_ABS
  ; flip all the bits of word #4
  not word [si+6]
  not word [si+4]       ; word #3
  not word [si+2]       ; word #2
  not word [si]                 ; word #1
  ; increment the 1st word
  inc word [si]
  ; if it did not roll over back to zero, done
  jnz .done_ABS
  ; increment the 2nd word
  inc word [si+2]
  ; if it rolled over, increment the next word
  jnz .done_ABS
  inc word [si+4]
  jnz .done_ABS
  ; this cannot roll over
  inc word [si+6]
  ; check most significant bit once more
  test [si+7], byte 0x80
  ; if it is not set we were successful, done
  jz .done_ABS
  ; overflow error, it reverted to Negative
  stc
  ; set Carry Flag and return
  ret
.done_ABS:
  ; Success, clear Carry Flag and return
  clc
  ret
```
As you may have noticed in the example, there is an issue that can occur in the function. Because of how positive and negative numbers are represented as binary values, the maximum negative number cannot be made positive. For 8-bit numbers, the maximum negative value is **-128**. If you flip all of the bits for **-128** (binary1__0000000), you get **127** (binary0__1111111) the maximum positive value. If you add **1** to that result, it will overflow back to the same negative number (-128).
To turn a positive number negative, you can just repeat the process you used to get the absolute value. The example procedure is very similar, except you want to make sure the number is not already negative at the start.
```
; syntax, NASM for DOS
proc_NEG:
  ; on entry, the SI points to the memory location
  ; for the number to be made negative.
  ; on exit, the Carry Flag is always clear.
  ; check most significant bit of highest byte
  test [si+7], byte 0x80
  ; if it is set, the number is negative
  jnz .done_NEG
  not word [si+6]       ; flip all the bits of word #4
  not word [si+4]       ; word #3
  not word [si+2]       ; word #2
  not word [si]                 ; word #1
  inc word [si]                 ; increment the 1st word
  ; if it did not roll over back to zero, done
  jnz .done_NEG
  ; increment the 2nd word
  inc word [si+2]
  ; if it rolled over, increment the next word
  jnz .done_NEG
  inc word [si+4]
  jnz .done_NEG
  ; this cannot roll over or revert back to
  inc word [si+6]
  ; positive.
.done_NEG:
  clc                   ; Success, clear Carry Flag and return
  ret
```
With all of that shared code between the absolute and negative functions, they should be combined to save some bytes. There are additional benefits when such code is combined. For one, it helps prevent simple typographic errors. It also can reduce testing requirements. Moreover, the source generally becomes easier to read, follow, and understand. Sometimes with a long series of assembly instructions, it is easy to lose track of what is actually happening. But for now, we can move along.
Getting the absolute or negative value of a number was not very difficult. But, those functions will be critically important later on when we start doing math on signed integers.
Now that I've covered the basics of how integer numbers are represented at the bit level and created a couple of basic routines to manipulate them a little, we can get to the fun stuff.
Let's do some math!
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/10/64-bit-math
作者:[Jerome Shidel][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/shidel
[b]: https://github.com/lkxed

View File

@@ -1,86 +0,0 @@
[#]: subject: "Monica: An Open-Source App for Personal Relationship Management"
[#]: via: "https://itsfoss.com/monica/"
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Monica: An Open-Source App for Personal Relationship Management
======
You probably know what CRM stands for **Customer Relationship Management**. We already have a list of [open-source CRM software][1] that helps small businesses.
Here, I talk about an interesting open-source web application that takes the same concept for personal relationships. Sounds unique, right?
Monica is an application that enables you to organize and record your interactions with loved ones. It is **free if you self-host it** and needs a **subscription if you need the hosted version**.
### Monica: Keep Track of Social Interactions
![contacts][2]
It is tough to remember every little detail regarding your interactions with your family, friends, or colleagues.
You can use [note-taking applications][3] or knowledge management apps like [CubyText][4] to add some information. But those are not tailored to record your interactions. So, you will have to make some effort to add the information in a manner that comes in handy when needed.
With Monica, it becomes easier to add information about your family, work, the relation between contacts, activities, journals, reminders for important dates, debts, and more.
You can install it on your own server or opt for a **$90/year** subscription to get the hosted version.
It is interesting to note that the developer initially built it for his personal requirements.
### Features of Monica
![dashboard][5]
You get loads of options to add information about people and interactions in your daily life. Some of these include:
- Add notes about a person
- List names of significant others associated with a contact (their children, pets, etc.)
- Phone call logs
- Alternate contact methods for each contact
- Reminders for important dates and events with people. Birthdays are automatically set as reminders.
- Manage gift information
- Useful dashboard to see things at a glance
- Journal entry supported
It looks like Monica comes packed with various functionalities that make it an all-in-one tool to write journals, take notes, add contact information, add events, and more.
Unfortunately, there are no mobile apps available. You can access it from the web browser, but it may not be the best experience for everyone. So, if you stick to your smartphone for notes and stuff, you may want to look elsewhere.
### Self-Host or Subscribe for Access
If you want a hosted version of Monica, you can look at its [pricing page][6] to know more.
For self-hosting, you need to head to its [GitHub page][7] and follow the instructions to download and get it installed. There are options to quickly deploy on Platform.sh or Heroku.
Check the minimum system requirements before choosing a server to host Monica.
There are no special premium features, and you get the same stuff when self-hosting it compared to its premium subscription for the hosted version.
It all comes down to convenience. So, choose what sounds good to you.
Head to its [official website][8] to get all the details and get started.
--------------------------------------------------------------------------------
via: https://itsfoss.com/monica/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/best-open-source-crm/
[2]: https://itsfoss.com/wp-content/uploads/2022/11/contacts.png
[3]: https://itsfoss.com/note-taking-apps-linux/
[4]: https://news.itsfoss.com/cubytext-experimental-project/
[5]: https://itsfoss.com/wp-content/uploads/2022/11/dashboard.png
[6]: https://www.monicahq.com/pricing
[7]: https://github.com/monicahq/monica#get-started
[8]: https://www.zdnet.com/article/microsoft-office-365-banned-in-german-schools-over-privacy-fears/

View File

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

View File

@@ -1,82 +0,0 @@
[#]: subject: "Why you should try the Nemo file manager on Linux"
[#]: via: "https://opensource.com/article/22/12/linux-file-manager-nemo"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Why you should try the Nemo file manager on Linux
======
Computers are fancy filing cabinets, full of virtual folders and files waiting to be referenced, cross-referenced, edited, updated, saved, copied, moved, renamed, and organized. In this article, I'm taking a look at a file manager for your Linux system.
The [Cinnamon][1] project was formed as a reimplementation of GNOME 2 using the components of GNOME 3. Eventually, it diverged enough to be a true fork, and today the Cinnamon desktop uses GTK3 libraries and forked versions of key GNOME 3 applications to create a "classic" GNOME experience. One of the components contributing to the traditional GNOME experience is Nemo, a file manager based on the GNOME 2 version of Nautilus.
### Install Nemo on Linux
The source code for Nemo is [available online][2] but it requires `cinnamon-desktop` to build, so the easiest way to install Nemo is to just install Cinnamon.
On Fedora, Mageia, and similar:
```
$ sudo dnf install cinnamon-desktop
```
On Linux Mint, Debian, and similar:
```
$ sudo dnf install cinnamon-desktop-environment
```
Of course, as the desktop's progenitor, Linux Mint is also available with Cinnamon preinstalled.
### A familiar interface
If you're used to GNOME, either of the past or of today, then Nemo feels like home from the start. It's got a familiar look and feel, with buttons in similar places and options that you're likely to recognize.
![Image of Nemo's file manager.][3]
The GNOME-ish convention of placing view control buttons in the top right is retained, and you can use the buttons to quickly switch your view of your files from large icons to a detailed list or a compact view. There's also a search function there, and the option to toggle the location bar between editable text and a button.
Editable URI bars are sometimes undervalued. It's a simple design decision, but it can be a huge feature contributing to efficiency. It's like having a one-line terminal at the top of each window, in which you can type a destination anywhere on your system and instantly be taken there. And you don't even have to type `cd`.
At the top right corner, there are navigation buttons: up, forward, and back. As with many Linux file managers, you can forego the use of these buttons with the **Alt** key plus the appropriate **Arrow** key.
The side pane, shows a list of important folders (Home, Documents, Downloads, and so on), can be hidden or displayed with the click of a button at the bottom of the window.
### Familiarity but not the same
The comfort and familiarity of Nemo doesn't mean that it just mindlessly mimics Nautilus. Nemo has a collection of nice features that feel unique. Most of these are in **Preferences**, and here are just a few of my favorites:
- **Full path in window title**: This is my favorite feature. Never question where you are in your filesystem again. Let your window title tell you.
- **Single or double click**: If you're a longtime [KDE][4] user, you might find single-clicking to open a file refreshing. With Nemo, you have that choice.
- **Double-click to rename**: If you're using a single click to open, why not repurpose the double-click to rename?
- **Open each folder in a new window**: There are operating systems out there that open a new window for each folder opened.
- **Plugins**: Nemo has the ability to invoke actions, scripts, and extensions. Some are included, including an action to change the desktop background, create launchers, and mount an archive. Others are yet to be created, but this kind of extensibility is vital to open source.
### Everything close at hand
After using Nemo for a few weeks on Linux Mint, one interesting trait stood out to me. It seemed that Nemo had, or could have with quick configuration, everything I used most often close at hand. Many of the features, admittedly, I didn't know I needed or wanted until Nemo made it easy to click. You might argue that I was bending my usage to meet Nemo's design, and maybe that is the case. But when the experience is so pleasant and efficient, does it matter?
Nemo is a great file manager. It hearkens back to the days of GNOME 2, but with updates and design choices that make it feel fresh. If you like [Thunar][5] or Nautilus, you'll love Nemo.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/12/linux-file-manager-nemo
作者:[Seth Kenlon][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lkxed
[1]: https://opensource.com/article/19/12/cinnamon-linux-desktop
[2]: https://github.com/linuxmint/nemo/releases
[3]: https://opensource.com/sites/default/files/2022-09/nemo.png
[4]: https://opensource.com/article/22/2/why-i-love-linux-kde
[5]: https://opensource.com/article/22/12/linux-file-manager-thunar

View File

@@ -0,0 +1,122 @@
[#]: subject: "How to Access UEFI Settings in Linux Systems"
[#]: via: "https://itsfoss.com/access-uefi-from-linux/"
[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to Access UEFI Settings in Linux Systems
======
Want to check the boot order or the power settings at the firmware level? **You can access the UEFI settings by pressing the F2, F10 or Del buttons when your system boots**.
The problem with this approach is that you may not know the exact key and must be alert about pressing those keys at the right time.
![Mr. Bean][1a]
If you dont want to feel like Mr. Bean in the above Gif, you can access the UEFI settings from the [Grub bootloader][1] screen in Linux.
![uefi firmware settings grub linux][2]
You see this screen when you turn on your Linux system. Most Linux distributions like Fedora and Ubuntu use Grub and they allow you to access the UEFI settings from the Grub screen like this.
What if you dont see this screen or your distro doesnt use Grub? There are still ways to access UEFI settings from within Linux.
Before you see how to do that, please [ensure that your system uses UEFI][3].
**_Another important thing. Your system will reboot into UEFI settings._** _You cannot access and modify the firmware settings from within an operating system._
### Boot into UEFI settings from Linux
This method will only work on Linux distros having systemd. This means this method will work on anything based on Ubuntu, Debian, Fedora, and any mainstream Arch-based distros, including Manjaro and EndeavourOS.
It is still a good idea to [ensure that your Linux distro uses systemd][4]. Use the given command and if it returns systemd you are good to go:
```
ps --no-headers -o comm 1
```
![how to know if i am using systemd on linux?][5]
Once you figure out that your distro is utilizing systemd, you can use the given command to boot into UEFI settings:
```
systemctl reboot --firmware-setup
```
Let me break down the used options first:
- `reboot`: As its name suggest, it will reboot your system.
- `--firmware-setup`: When this option is used with `reboot`, it will indicate to the systems firmware to boot into the firmware setup interface.
Yup, that was it! A single command and you will be kicked into UEFI settings. I know Windows allows [booting into UEFI firmware settings from within Windows][6]. Its good to see something similar in Linux as well.
#### Create a desktop shortcut to boot into UEFI settings (optional)
If you often find yourself booting into the UEFI settings and dont remember the command all the time, you can make your life easier by creating a desktop shortcut. This will let you boot into UEFI by clicking on desktop icon.
_**Now, this is unnecessary and not required for most Linux users. Do it only if you feel the need for it. The method requires [editing files in the command line][7].**_
First, use the given command to create a desktop shortcut file for UEFI settings:
```
sudo nano /usr/share/applications/uefi-reboot.desktop
```
And paste the following content in the file:
```
[Desktop Entry]
Name=UEFI Firmware Setup (Reboot)
Comment=Access the motherboard configuration utility
Exec=systemctl reboot --firmware-setup
Icon=system-restart
Terminal=false
Type=Application
Categories=System;Settings;
```
![create a desktop shortcut to boot into uefi settings][8]
Once done, [save the changes and exit from the nano][9] text editor.
And now, you will find the shortcut for UEFI Firmware Setup in your system menu:
![boot into uefi firmware from system menu][10]
Thats it! A neat way to get into UEFI settings.
### Wrapping Up
The classic ways of accessing the boot settings may be a little inconvenient for some people. The grub screen may not show the UEFI option for older versions.
And this is where the systemd method shines. I found this method a lifesaver when my system crashed and my function keys were not responding, which are necessary to boot into UEFI (thats what I thought then!).
I hope you find it equally helpful.
--------------------------------------------------------------------------------
via: https://itsfoss.com/access-uefi-from-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
[1a]: https://external-preview.redd.it/dxmsKYDmzgfb1thu3EFI8Ni-DNfprNX8W8xDtff4QWU.gif?format=mp4&s=c31204644ac6a2a348133986714ff97cf3c4a48a
[1]: https://itsfoss.com/what-is-grub/
[2]: https://itsfoss.com/wp-content/uploads/2022/12/uefi-firmware-settings-grub-linux.webp
[3]: https://itsfoss.com/check-uefi-or-bios/
[4]: https://linuxhandbook.com/check-if-systemd/
[5]: https://itsfoss.com/wp-content/uploads/2022/12/how-to-know-if-i-am-using-systemd-on-linux.png
[6]: https://itsfoss.com/access-uefi-settings-windows-10/
[7]: https://learnubuntu.com/edit-files-command-line/
[8]: https://itsfoss.com/wp-content/uploads/2022/12/create-a-desktop-shortcut-to-boot-into-uefi-settings.png
[9]: https://linuxhandbook.com/nano-save-exit/
[10]: https://itsfoss.com/wp-content/uploads/2022/12/boot-into-uefi-firmware-from-system-menu.png

View File

@@ -0,0 +1,145 @@
[#]: subject: "16 reasons DDEV will be your new favorite development environment"
[#]: via: "https://opensource.com/article/22/12/ddev"
[#]: author: "Randy Fay https://opensource.com/users/rfay"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
16 reasons DDEV will be your new favorite development environment
======
In 2022, you have a wide variety of local development environments to choose from, whether you're a designer, developer, tester, or any kind of open source contributor. Because most of the tools and platforms contributors use happen to run on many different operating systems, you probably even have the choice of constructing your own environment. I'm the maintainer of [DDEV][1], and here are 15 reasons I think you'll like it for your development environment.
### 1. Cross-platform
DDEV supports and tests, and has a fully automated test suite for Linux (amd64 and Arm), WSL2, Windows, and macOS (M1 and amd64.)
Some tools require you to use one exact version of Docker (and they may even take the liberty of installing it themselves), DDEV works with versions of Docker that are a couple of years old, and keeps up with the latest versions, as well. Alternatively, you can use [Colima][2] or Docker installed inside WSL2.
DDEVs binaries are signed and notarized on macOS and Windows, so you never have to sneak around scary operating system warnings when installing and using DDEV.
### 2. Performance
The DDEV team believes that DDEV on macOS and Windows has [the best performance][3] you can get on any local development, both in terms of starting DDEV (10 to 20 seconds) and in terms of webserving. With no setup required at all, the [Mutagen feature][4] speeds up webserving by a factor of 10, at least. And of course on Linux (including WSL2) it's truly superb.
### 3. Settings file management
DDEV is happy to get you started quickly and easily, and even manage your settings files. You can use your own repository or follow one of the [quickstart guides][5] to create something new and you'll have a project going in no time. You can also [turn off settings file management][6] to fine-tune your team's approach when you need more customization.
DDEV's configuration files aren't used when they're not being used in a DDEV context, so your project won't accidentally have DDEV settings if you mistakenly deploy them to production. If you have the same project setup for Lando _and_ DDEV, then the DDEV settings won't break Lando.
### 4. Trusted HTTPS
DDEV uses [mkcert][7] to allow you to conduct all your work using [locally trusted HTTPS][8], just like it will work in the real world. You don't have to click around scary browser warnings to view your project in development.
### 5. Database snapshots
DDEV has the `ddev snapshot` feature, allowing you to quickly capture the state of your [database][9] and then quickly restore to a different point. You can name snapshots for different branches of your project. It's far faster than traditional export and import.
### 6. Simple single-binary installation without dependencies
[DDEV][10] is written in [Go][11]. Because Go is a fairly new language, this can be a bit of a disadvantage in terms of community involvement, but it's a huge advantage for cross-platform support. Go does cross-platform builds with ease, and the resulting self-contained binary has no dependencies at all (aside from Docker.) There are no libraries to install, no DLLs to maintain. And responsiveness to commands is excellent!
### 7. Xdebug step-debugging
Lots of people have their first experience with a [real step-debugging environment][12] for the first time with DDEV because it's really, _really_ easy. Thanks to PHPStorm, there's no setup at all. With VSCode or [Codium][13], there's about 2 minutes of setup. There's no need for inserting print statements into code anymore!
### 8. Explicit support for your CMS
DDEV has built-in support for many popular content management systems (CMS) and platforms. "Explicit support" means that there's setting management, and an NGINX configuration customized for the specific platform you're using. Here's a partial list of what's supported:
- Drupal
- Backdrop
- WordPress
- TYPO3
- Magento
- Laravel
- Shopware
### 9. Integration and add-ons
While DDEV provides explicit support with optional settings management for your CMS of choice, many developers use other platforms, including Symfony, Moodle, Mautic, and so on. DDEV has explicit support for NodeJS, both for processing and as daemons.
DDEV also features a library of supported, maintained, and tested add-ons for Redis, Solr, Memcached, Elasticsearch, Mongo, Varnish, and more.
### 10. Gitpod
Your local development environment doesn't even have to be local anymore. DDEV has full support for use in [Gitpod][14] so you can move your development into the cloud.
### 11. No vendor lock-in
There is absolutely no vendor lock-in in DDEV. The idea behind the DDEV platform is that DDEV can be plugged into a dev-to-deploy workflow as pieces of a puzzle that work for you. Mix and match! DDEV is an open source community project that works great with any hosting service you can use.
### 12. Respect for your host computer
DDEV doesn't assume you use your computer (or containers) only for DDEV.
Too many local dev tools happily reconfigure your host computer without your full involvement. More than one of them edit your `/etc/exports` file, with no way for you to opt out. A couple of them actually overwrite your Docker installation with a different version at install time. DDEV tries to ensure that in the unlikely situation that anything needs to be changed on your computer, you're the one doing it, and you have options.
For example, HTTPS support requires running `mkcert -install` one time. [NFS support][15] requires a bit of additional setup. Because nearly everything is run in a container, there's very little that needs to be done on the host computer in the first place.
### 13. Community
The DDEV community has been phenomenal through the years, contributing ideas, code, and shared support. There are [open collections][16] of DDEV services, tools, snippets, approaches, as well as [blogs and presentations][17] and more from users all around the world.
The [DDEV Advisory Group][18] provides oversight, direction, and feedback for the project. Anyone is welcome to join.
### 14. Open source
DDEV is a small cog in the huge open source ecosystem. It couldn't even exist without the hundreds or thousands of projects that make up the Linux containers that run it, and of course, PHP itself is a fundamental upstream project. We love to contribute upstream and downstream to projects like:
- **Docker**: DDEV is involved with the Docker project, because DDEV users are always pushing the limits. We participate heavily in Docker issue queues.
- **Mutagen**: When you edit code in containers, there's a lot of synchronization between your local host and the container environment that needs to happen. [Mutagen][19] helps bridge that gap for DDEV users.
- **mkcert**: The [mkcert][7] tool allows DDEV to provide trusted HTTPS in your local development environment. We've benefited enormously from it, and have contributed back tests and bug fixes.
- **Xdebug**: DDEV is great with [Xdebug][20], and of course, we hear right away when there are problems. We report our findings back to the Xdebug issue queue.
- **deb.sury.org PHP packages**: The Debian PHP packages (5.6 all the way through 8.2, at the time of writing) we use come from [deb.sury.org][21]. Because the DDEV community is an early consumer of those packages, we're often in that [issue queue][22] too.
### 15. DDEV Keeps Up
DDEV is always keeping up with the dependencieis you need. For example, at this writing, neither PHP 8.2.0 nor Drupal 10 have yet been released, but both have been supported in DDEV for months.
### 16. Your own reason
I'd love to hear what makes DDEV your favorite, and the DDEV team is always [listening][23] to hear what you want in the future. Of course, we also want to hear when things don't work the way you want or expect. Visit our [Git repository][10] to contribute!
Note: This is an updated version of a [blog post][24] that originally appeared on ddev.com.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/12/ddev
作者:[Randy Fay][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/rfay
[b]: https://github.com/lkxed
[1]: http://ddev.com/
[2]: https://opensource.com/article/22/9/replacing-docker-desktop-mac-colima-use-ddev-first-impressions
[3]: https://ddev.com/ddev-local/docker-desktop-and-colima-benchmarking-on-macos
[4]: https://ddev.readthedocs.io/en/stable/users/install/performance/#mutagen
[5]: https://ddev.readthedocs.io/en/stable/users/cli-usage/#quickstart-guides
[6]: https://ddev.com/ddev-local/controlling-cms-settings-files-in-ddev-local/
[7]: https://github.com/FiloSottile/mkcert
[8]: https://ddev.com/ddev-local/ddev-local-trusted-https-certificates/
[9]: https://ddev.readthedocs.io/en/stable/users/basics/database_management/
[10]: https://github.com/drud/ddev
[11]: https://opensource.com/article/17/6/getting-started-go
[12]: https://ddev.readthedocs.io/en/latest/users/debugging-profiling/step-debugging/
[13]: https://opensource.com/article/20/6/open-source-alternatives-vs-code#vscodium
[14]: https://ddev.readthedocs.io/en/stable/users/install/ddev-installation/#gitpod
[15]: https://ddev.com/ddev-local/ddev-local-nfs-mounting-setup-macos/
[16]: https://ddev.readthedocs.io/en/latest/users/extend/additional-services/
[17]: https://github.com/drud/awesome-ddev
[18]: https://github.com/drud/ddev/discussions/categories/ddev-advisory-group
[19]: http://mutagen.io
[20]: https://xdebug.org/
[21]: https://deb.sury.org/
[22]: https://github.com/oerdnj/deb.sury.org/issues
[23]: https://ddev.readthedocs.io/en/stable/users/support/
[24]: https://ddev.com/ddev-local/whats-so-different-about-ddev-local

View File

@@ -0,0 +1,87 @@
[#]: subject: "Why I use the Enlightenment file manager on Linux"
[#]: via: "https://opensource.com/article/22/12/linux-file-manager-enlightenment"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Why I use the Enlightenment file manager on Linux
======
Computers are like filing cabinets, full of virtual folders and files waiting to be referenced, cross-referenced, edited, updated, saved, copied, moved, renamed, and organized. In this series, I'm taking a look at the Enlightenment file manager for your Linux system.
The [Enlightenment desktop][1] is designed to be a modern implementation of what's considered a traditional UNIX desktop. There are certain elements that are considered to be characteristic of graphical UNIX, most of which were defined in the [by early desktops like CDE or twm][2]. Enlightenment implements things like a dock, an on-demand global contextual menu, flexible focus, virtual workspaces, but with an almost hyper-modern flair. Enlightenment is able to combine these elements with effects and animations because it's also its own compositor, and the EFL libraries that the desktop uses are specific to Enlightenment and maintained by the Enlightenment team. That's a long way of confessing that in this entry in [my file manager series][3], I'm looking at a file manager that's mostly inextricable from the desktop it supports. If you want to try Enlightenment's file manager, you have to try Enlightenment. Luckily, it's a pleasant experience, and a fun diversion from the usual desktops.
### Install Enlightenment on Linux
You can probably install Enlightenment from your distribution's repository. For example, on Fedora:
```
$ sudo dnf install enlightenment
```
On Debian and similar:
```
$ sudo apt install enlightenment
```
### File manager
When you first log in to Enlightenment, you must make some choices about configuration. After setting your language and visual theme, you can open a file manager window by either double-clicking on the **Home** icon on the desktop, or by clicking on the desktop and choosing **Navigate**.
![Image of the file manager for Enlightenment.][4]
### Customizing the panel
The left panel of the file manager displays common places in your file system. Not everyone considers the same places common, though, so you're free to change the bookmarks in the panel to suit your needs.
Start by removing the items you don't need. For instance, maybe you don't need an icon for your Desktop in your side panel. To remove it, right-click on it and select **Delete**. You're asked for confirmation, and it's safe to accept. You're not deleting your actual desktop or the items on it, you're just removing the **Desktop** item from the side panel. You can remove any of the items from the left panel in this way.
Next, add directories you frequent. You can add items by dragging and dropping icons from the right panel into the left. Once there, they're considered bookmarks for Enlightenment's file manager. These items don't carry over into other file managers or file choosers. This is a bookmarks panel specific to the Enlightenment file manager.
### Customizing the view
A file manager's main purpose is to help you manage files. Part of managing files is getting a good look at what you have, and there are three different views Enlightenment offers. To access the different views, right-click in an empty space in the file manager and choose **View Mode**.
- **Custom Icons**: Place icons anywhere in the file manager window you please.
- **Grid**: Sort icons, aligned to a grid.
- **List**: Sort small icons as an itemized list.
In addition to altering your view of the icons representing your files and folders, you can control how they're sorted. The default is to alphabetize directories first, and then files. You can right-click in an empty space in the file manager and select **Sorting** to choose between other options:
- **Size**: This is particularly useful when you're trying to find files that are occupying too much space on your hard drive.
- **File extension**: Group files together by file type!
- **Modification time**: Make recent files easy find.
Grouping files together by file extension is the real epiphany of the Enlightenment file manager. In most other file managers, the closest you can get to this feature is the ability to filter files by manually typing in the extension you're interested in. But with this feature, your files "cluster" together by a sort of genealogical affinity. It makes files really easy to find without giving any particular preference to any one group of file types. You just locate the group of files you're interested in, and then the single file you want to work on.
### Keyboard navigation
The Enlightenment file manager has good keyboard support. As long as the file manager is in focus, you can press any **Arrow** key to move between items in the right panel. Press **Return** to enter a directory or to open a file.
You can use **Alt** and the **Left Arrow** key to move back to the previously visited directory. Use **Alt** and the **Up Arrow** key to move to your current directory's parent.
### The Enlightenment experience
Enlightenment is a fun and beautiful desktop, and its default file manager does everything you need a file manager to do. It's got the essential customization options, good support for keyboard navigation, and it fits the rest of the desktop perfectly. If you're in the mood for something different, then give Enlightenment a try.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/12/linux-file-manager-enlightenment
作者:[Seth Kenlon][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lkxed
[1]: https://opensource.com/article/19/12/linux-enlightenment-desktop
[2]: https://opensource.com/article/20/5/linux-desktops#traditional
[3]: https://opensource.com/users/seth
[4]: https://opensource.com/sites/default/files/2022-10/enlightenment-file-manager.png

View File

@@ -0,0 +1,87 @@
[#]: subject: "Convert and Manipulate Images With Converter GUI Tool in Linux"
[#]: via: "https://itsfoss.com/converter-tool/"
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Convert and Manipulate Images With Converter GUI Tool in Linux
======
You can always [install ImageMagick][1] on your system to convert images, but not everyone likes to use the terminal for converting and manipulating images.
So, what if you have a GUI app as a front-end to help with that? **Converter** is precisely that.
It is a front-end to ImageMagick. So you do not need to use commands to convert and manipulate images.
Note that most Ubuntu systems usually have ImageMagick pre-installed. You can always refer to our [installation guide][1] if you do not have it on your system.
### Converter: A Graphical Front-end to ImageMagick
![converter gui][2]
It should not take a lot of effort to convert images. It is a simple task, and that is how it should be.
I do not want to type a command to convert an image quickly. Hence, I prefer graphical tools that enable me to do things faster.
[Converter][3] is an open-source graphical front-end that enables you to do that. It is a GTK4+libadwaita application.
You can convert the images to various file formats that include **png, webp, jpeg, heif, heic, and bmp**. It is safe to say that you get support for the most popular image file formats. So, it should come in pretty handy.
![file format converter][4]
You can set a location to save all the files, and the converted images will automatically be stored at that location.
![customize converter][5]
You can also adjust an images quality, size, and background color. To access these options, click on “**More Options**” in the user interface before converting the image.
![converter more options][6]
The image size can be customized using its percentage, exact pixels, or ratio. For precise manipulation, changing the dimensions should help.
If you want the image scaled to an extent, the percentage or ratio functionality should help you do that. You can also choose to add filters to your images.
Overall, you get the basic options to re-size, convert, and optimize the image quality with Converter.
You can also [tweak Nautilus][7] to have the [resize option in the right-click context menu][8]. It wont be as versatile as this tool.
### Install Converter on Linux
Converter is available as a Flatpak on [Flathub][9] to install on any Linux distribution of your choice.
Unfortunately, you do not get any binary packages to install on your Linux system. So, you might want to refer to our [Flatpak guide][10] to get it installed.
```
flatpak install flathub io.gitlab.adhami3310.Converter
```
You can explore more about it on its [GitLab page][3].
_Do you have any suggestions to nifty tools like this for us to highlight next? Let us know in the comments._
--------------------------------------------------------------------------------
via: https://itsfoss.com/converter-tool/
作者:[Ankush Das][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/install-imagemagick-ubuntu/
[2]: https://itsfoss.com/wp-content/uploads/2022/12/converter-gui.png
[3]: https://gitlab.com/adhami3310/Converter
[4]: https://itsfoss.com/wp-content/uploads/2022/12/file-format-converter.png
[5]: https://itsfoss.com/wp-content/uploads/2022/12/customize-converter.png
[6]: https://itsfoss.com/wp-content/uploads/2022/12/converter-more-options.png
[7]: https://itsfoss.com/nautilus-tips-tweaks/
[8]: https://itsfoss.com/resize-images-with-right-click/
[9]: https://flathub.org/apps/details/io.gitlab.adhami3310.Converter
[10]: https://itsfoss.com/flatpak-guide/

View File

@@ -0,0 +1,255 @@
[#]: subject: "7 pro tips for using the GDB step command"
[#]: via: "https://opensource.com/article/22/12/gdb-step-command"
[#]: author: "Alexandra https://opensource.com/users/ahajkova"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
7 pro tips for using the GDB step command
======
A debugger is software that runs your code and examines any problems it finds. [GNU Debugger][1] (GBD) is one of the most popular debuggers, and in this article, I examine GDB's `step` command and related commands for several common use cases. Step is a widely used command but there are a few lesser known things about it which might be confusing. Also, there are ways to step into a function without actually using the `step` command itself such as using the less known `advance` command.
### No debugging symbols
Consider a simple example program:
```
#include <stdio.h>
int num() {
return 2;
}
void bar(int i) {
printf("i = %d\n", i);
}
int main() {
bar(num());
return 0;
}
```
If you compile without the debugging symbols first, set a breakpoint on `bar` and then try to step within it. The GDB gives an error message about no line number information:
```
gcc exmp.c -o exmp
gdb ./exmp
(gdb) b bar
Breakpoint 1 at 0x401135
(gdb) r
Starting program: /home/ahajkova/exmp
Breakpoint 1, 0x0000000000401135 in bar ()
(gdb) step
Single stepping until exit from function bar,
which has no line number information.
i = 2
0x0000000000401168 in main ()
```
### Stepi
It is still possible to step inside the function that has no line number information but the `stepi` command should be used instead. Stepi executes just one instruction at a time. When using GDB's `stepi` command, it's often useful to first do `display/i $pc`. This causes the program counter value and corresponding machine instruction to be displayed after each step:
```
(gdb) b bar
Breakpoint 1 at 0x401135
(gdb) r
Starting program: /home/ahajkova/exmp
Breakpoint 1, 0x0000000000401135 in bar ()
(gdb) display/i $pc
1: x/i $pc
=> 0x401135 <bar+4>: sub $0x10,%rsp
```
In the above `display` command, the `i` stands for machine instructions and `$pc` is the program counter register.
It can be useful to use info registers and print some register contents:
```
(gdb) info registers
rax 0x2 2
rbx 0x7fffffffdbc8 140737488346056
rcx 0x403e18 4210200
(gdb) print $rax
$1 = 2
(gdb) stepi
0x0000000000401139 in bar ()
1: x/i $pc
=> 0x401139 <bar+8>: mov %edi,-0x4(%rbp)
```
### Complicated function call
After recompiling the example program with debugging symbols you can set the breakpoint on the `bar` call in main using its line number and then try to step into `bar` again:
```
gcc -g exmp.c -o exmp
gdb ./exmp
(gdb) b exmp.c:14
Breakpoint 1 at 0x401157: file exmp.c, line 14.
(gdb) r
Starting program: /home/ahajkova/exmp
Breakpoint 1, main () at exmp.c:14
14 bar(num());
```
Now, let's step into`bar()`:
```
(gdb) step
num () at exmp.c:4
4 return 2;
```
The arguments for a function call need to be processed before the actual function call, so `num()` is expected to execute before `bar()`is called. But how do you step into the `bar` as was desired? You need to use the `finish` command and `step` again:
```
(gdb) finish
Run till exit from #0 num () at exmp.c:4
0x0000000000401161 in main () at exmp.c:14
14 bar(num());
Value returned is $1 = 2
(gdb) step
bar (i=2) at exmp.c:9
9 printf("i = %d\n", i);
```
### Tbreak
The `tbreak` command sets a temporary breakpoint. It's useful for situations where you don't want to set a permanent breakpoint. For example, if you want to step into a complicated function call like `f(g(h()), i(j()), ...)` , in such a case you need a long sequence of `step/finish/step` to step into `f` . Setting a temporary breakpoint and then using continue can help to avoid using such sequences. To demonstrate this, you need to set the breakpoint to the `bar` call in `main` as before. Then set the temporary breakpoint on `bar`.  As a temporary breakpoint it is automatically removed after being hit:
```
(gdb) r
Starting program: /home/ahajkova/exmp
Breakpoint 1, main () at exmp.c:14
14 bar(num());
(gdb) tbreak bar
Temporary breakpoint 2 at 0x40113c: file exmp.c, line 9.
```
After hitting the breakpoint on the call to `bar` and setting a temporary breakpoint on `bar`, you just need to continue to end up in  `bar`.
```
(gdb) continue
Continuing.
Temporary breakpoint 2, bar (i=2) at exmp.c:9
9 printf("i = %d\n", i);
```
### Disable command
Alternatively, you could set a normal breakpoint on `bar` , continue, and then disable this second breakpoint when it's no longer needed. This way you can achieve the same results as with the `tbreak` with one extra command:
```
(gdb) b exmp.c:14
Breakpoint 1 at 0x401157: file exmp.c, line 14.
(gdb) r
Starting program: /home/ahajkova/exmp
Breakpoint 1, main () at exmp.c:14
14 bar(num());
(gdb) b bar
Breakpoint 2 at 0x40113c: file exmp.c, line 9.
(gdb) c
Continuing.
Breakpoint 2, bar (i=2) at exmp.c:9
9 printf("i = %d\n", i);
(gdb) disable 2
```
As you can see, the `info breakpoints`  command displays `n` under `Enb`which means its disabled but you can enable it later if its needed again.
```
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0x0000000000401157 in main at exmp.c:14
breakpoint already hit 1 time
2 breakpoint keep n 0x000000000040113c in bar at exmp.c:9
breakpoint already hit 1 time
(gdb) enable 2
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0x000000000040116a in main at exmp.c:19
breakpoint already hit 1 time
2 breakpoint keep y 0x0000000000401158 in bar at exmp.c:14
breakpoint already hit 1 time
```
### Advance location
Another option you can use is an `advance` command. Instead of `tbreak bar ; continue` , you can simply do `advance bar` . This command continues running the program up to the given location.
The other cool thing about `advance` is that if the location that you try to advance to is not reached, GDB will stop after the current frame's function finishes. Thus, execution of the program is constrained:
```
Breakpoint 1 at 0x401157: file exmp.c, line 14.
(gdb) r
Starting program: /home/ahajkova/exmp
Breakpoint 1, main () at exmp.c:14
14 bar(num());
(gdb) advance bar
bar (i=2) at exmp.c:9
9 printf("i = %d\n", i);
```
### Skipping a function
Yet another way to step into the `bar,` avoiding `num`, is using the `skip` command:
```
(gdb) b exmp.c:14
Breakpoint 1 at 0x401157: file exmp.c, line 14.
(gdb) skip num
Function num will be skipped when stepping.
(gdb) r
Starting program: /home/ahajkova/exmp
Breakpoint 1, main () at exmp.c:14
14 bar(num());
(gdb) step
bar (i=2) at exmp.c:9
9 printf("i = %d\n", i);
```
To know which functions are currently skipped,  `info skip` is used.  The `num` function is marked as enabled to be skipped by `y`:
```
(gdb) info skip
Num Enb Glob File RE Function
1 y n <none> n num
```
If `skip` is not needed any more it can be disabled (and re-enabled later) or deleted altogether. You can add another `skip` and disable the first one and then delete them all. To disable a certain `skip`, its number has to be specified, if not specified, each `skip`is disabled. It works the same for enabling or deleting a `skip`:
```
(gdb) skip bar
(gdb) skip disable 1
(gdb) info skip
Num Enb Glob File RE Function
1 n n <none> n num
2 y n <none> n bar
(gdb) skip delete
(gdb) info skip
Not skipping any files or functions.
```
### GDB step command
Using GDB's `step` command is a useful tool for debugging your application. There are several ways to step into even complicated functions, so give these GDB techniques a try next time you're troubleshooting your code.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/12/gdb-step-command
作者:[Alexandra][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/ahajkova
[b]: https://github.com/lkxed
[1]: https://opensource.com/article/21/3/debug-code-gdb

View File

@@ -0,0 +1,173 @@
[#]: subject: "Our favorite markup languages for documentation"
[#]: via: "https://opensource.com/article/22/12/markup-languages-documentation"
[#]: author: "Opensource.com https://opensource.com/users/admin"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Our favorite markup languages for documentation
======
Documentation is important for so many reasons. Readable documentation is even more so. In the world of open source software, documentation is how to use or contribute to an application. It's like the rulebook for a [game][1].
There are many different types of documentation:
- Tutorials
- How-to guides
- Reference guides
- Software architecture
- Product manuals
We asked some of the Opensource.com contributors about their technical documentation workflow, which markup language they preferred, and why they might use one over the other. Here's what they had to say.
### AsciiDoc
For the past several years, [Markdown][2] has been my standard language. But recently I decided to give [AsciiDoc][3] a try. The syntax is not difficult and [Gedit][4] on my Linux desktop supports it. I plan to stick with it for a while.
—- [Alan Formy-Duval][5]
In terms of low-syntax markup, I prefer AsciiDoc. I like it because its conversion process is consistent and predictable, with no surprise "flavor" variations to confuse things. I also love that it outputs to [Docbook][6], which is a markup-heavy syntax that I trust for longevity and flexibility.
But the "right" choice tends to be what a project is already using. I wouldn't write in AsciiDoc if a project uses Strawberry-flavored Markdown. Well, to be fair, I might write in AsciiDoc and then convert it to Strawberry-flavored Markdown with Pandoc.
I do think there is a time and place for Markdown. I do find it more readable than AsciiDoc. Links in AsciiDoc:
```
http://example.com[Example website]
```
Links in Markdown:
```
[Example.com](http://example.com)
```
The Markdown syntax is intuitive, delivering the information in the same way that I think most of us parse the same data when reading HTML ("Example website…oh, that's blue text, I'll roll over it to see where it goes…it goes to [example.com][7]").
In other words, when my audience is a human reader, I do often choose Markdown because its syntax is subtle but it's got enough of a syntax to make conversion possible, so it's still an OK storage format.
AsciiDoc, as minimal as it is, just looks scarier.
If my audience is a computer that's going to parse a file, I choose AsciiDoc.
—- [Seth Kenlon][8]
### reStructuredText
I'm a big fan of [docs as code][9] and how it brings developer tools into the content workflows. It makes it easier to have efficient reviews and collaboration, especially if engineers are contributors.
I'm also a bit of a markup connoisseur, having written whole books in AsciiDoc for O'Reilly, a lot of Markdown for various platforms, including a thousand posts on my blog. Currently, I'm a [reStructuredText][10] convert and maintain some of the tooling in that space.
—- [Lorna Mitchell][11]
Obligatory mention of reStructuredText. That's my go-to these days as I do a lot of Python programming. It's also been Python's standard for documentation source and code comments for ages.
I like that it doesn't suffer quite so much from the proliferation of nonstandards that Markdown does. That said, I do use a lot of Sphinx features and extensions when working on more complex documentation.
—- [Jeremy Stanley][12]
### HTML
I rarely use markup languages if I don't have to.
I find HTML easier to use than other markup languages though.
—- [Rikard Grossman-Nielsen][13]
For me, there are various ways to make documentation. It depends on where the documentation is going to be whether on a website, as part of the software package, or something downloadable.
For [Scribus][14], the internal documentation is in HTML, since an internal browser is used to access it. On a website, you might need to use a Wiki language. For something downloadable you might create a PDF or an EPUB.
I tend to write the documentation in a plain text editor. I might use XHTML, so that I can then import these files into an EPUB maker like Sigil. And, of course, Scribus is my go-to app for making a PDF, though I would probably be importing a text file created with a text editor. Scribus has the advantage of including and precisely controlling placement of graphics.
Markdown has never caught on with me, and I've never tried AsciiDoc.
—- [Greg Pittman][15]
I'm writing a lot of documentation in HTML right now, so I'll put in a plug for HTML. You can use HTML to create websites, or to create documentation. Note that the two are not really the same — when you're creating websites, most designers are concerned about presentation. But when you're writing documentation, tech writers should focus on content.
When I write documentation in HTML, I stick to the tags and elements defined by HTML, and I don't worry about how it will look. In other words, I write documentation in "unstyled" HTML. I can always add a stylesheet later. So if I need to make some part of the text stronger (such as a warning) or add emphasis to a word or phrase, I might use the `<strong>` and `<em>` tags, like this:
```
<p><strong>Warning: Lasers!</strong> Do <em>not</em> look into laser with remaining eye.</p>
```
Or to provide a short code sample within the body of a paragraph, I might write:
```
<p>The <code>puts</code> function prints some text to the user.</p>
```
To format a block of code in a document, I use `<pre><code>..</code></pre>` like this:
```
void
print_array(int *array, int size)
  {
  for (int i = 0; i < size; i++) {
  printf("array[%d] = %d\n", i, array[i]);
  }}
```
The great thing about HTML is you can immediately view the results with any web browser. And any documentation you write in unstyled HTML can be made prettier later by adding a stylesheet.
—- [Jim Hall][16]
### Unexpected: LibreOffice
Back in the 80s and 90s when I worked in System V Unix, SunOS, and eventually Solaris, I used the mm macros with `nroff,``troff` and finally `groff`. Read about MM using groff_mm (provided you have them installed.)
MM isn't really a markup language, but it feels like one. It is a very semantic set of troff and groff macros. It has most things markup language users would expect—headings, numbered lists, and so on.
My first Unix machine also had Writers' Workbench available on it, which was a boon for many in our organization who had to write technical reports but didn't particularly write in an "engaging manner". A few of its tools have made it to either BSD or Linux—style, diction, and look.
I also recall a standard generalized markup language (SGML) tool that came with, or perhaps we bought for, Solaris in the very early 90s. I used this for awhile, which may explain why I don't mind typing in my own HTML.
I've used Markdown a fair bit, but having said that, I should also be saying "which Markdown", because there are endless flavors and levels of features. I'm not a huge fan of Markdown because of that. I guess if I had a lot of Markdown to do I would probably try to gravitate toward some implementation of [CommonMark][17] because it actually has a formal definition. For example, [Pandoc][18] supports CommonMark (as well as several others).
I started using AsciiDoc, which I much prefer to Markdown as it avoids the "which version are you using" conversation and provides many useful things. What has slowed me down in the past with respect to AsciiDoc is that for some time it seemed to require installing Asciidoctor—a Ruby toolchain which I was not anxious to install. But these days there are more implementations at least in my Linux distro. Curiously, Pandoc emits AsciiDoc but does not read it.
Those of you laughing at me for not wanting a Ruby toolchain for AsciiDoc but being satisfied with a Haskell toolchain for Pandoc… I hear you.
I blush to admit that I mostly use LibreOffice these days.
—- [Chris Hermansen][19]
### Document now!
Documentation can be achieved through many different avenues, as the writers here have demonstrated. It's important to document how to use your code, especially in open source. This ensures that other people can use and contribute to your code properly. It's also wise to tell future users what your code is providing.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/12/markup-languages-documentation
作者:[Opensource.com][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/admin
[b]: https://github.com/lkxed
[1]: https://opensource.comttps://opensource.com/life/16/11/software-documentation-tabletop-gaming
[2]: https://opensource.com/article/19/9/introduction-markdown
[3]: https://opensource.com/article/22/8/drop-markdown-asciidoc
[4]: https://opensource.com/%20https%3A//opensource.com/article/20/12/gedit
[5]: https://opensource.com/users/alanfdoss
[6]: https://opensource.com/article/17/9/docboo
[7]: http://example.com/
[8]: https://opensource.com/users/seth
[9]: https://opensource.com/article/22/10/docs-as-code
[10]: https://opensource.com/article/19/11/document-python-sphinx
[11]: https://opensource.com/users/lornajane
[12]: https://opensource.com/users/fungi
[13]: https://opensource.com/users/rikardgn
[14]: https://opensource.com/article/21/12/desktop-publishing-scribus
[15]: https://opensource.com/users/greg-p
[16]: https://opensource.com/users/jim-hall
[17]: https://commonmark.org/
[18]: https://opensource.com/downloads/pandoc-cheat-sheet
[19]: https://opensource.com/users/clhermansen

View File

@@ -0,0 +1,150 @@
[#]: subject: "Manage your file system from the Linux terminal"
[#]: via: "https://opensource.com/article/22/12/linux-file-manager-nnn"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Manage your file system from the Linux terminal
======
I tend to enjoy lightweight applications. They're good for [low spec computers][1], for [remote shells][2], for the impatient user (OK, I admit, that's me), and for the systems we scrap together to fight the inevitable [zombie apocalypse][3]. In my search for a perfect blend of a lightweight application with all the modern conveniences we've learned from experience, I stumbled across a file manager called **nnn**. The nnn file manager exists in a terminal only, but it feels like a modern keyboard-driven application with intuitive actions and easy navigation.
![Image of the nnn file manager.][4]
### Install nnn
On Linux, you may find nnn in your Linux distribution's software repository. For instance, on Debian:
```
$ sudo apt install nnn
```
If your repository doesn't have nnn available, you can download a package for your distribution from [OBS][5] or from the project [Git repository][6].
On macOS, use [Homebrew][7] or [MacPort][8].
### Using nnn
Launch nnn from a terminal:
```
$ nnn
```
Your terminal is now the nnn interface, and by default it lists the contents of your current directory:
```
1 2 3 4 ~
Desktop/
Documents/
Downloads/
Music/
Pictures/
Public/
Templates/
Videos/4/8 2022-12-01 15:54 drwxr-xr-x 6B
```
At the top of the nnn interface are tabs (called a "context" in nnn terminology), numbered one to four.
At the bottom of the nnn interface, there are ownership and permission details about your current selection.
Use either the **Up** and **Down** arrow keys or the **k** and **j** keys (as in [Vim][9]) to change your selection. Use the **Right** arrow key, **Return**, or the **l** key to enter a directory or to open a file. Use the **Left** arrow key or **h** to back out of a directory.
That's it for navigation. It's easier than any graphical file manager because there aren't any widgets that get in the way. There's no need to **Tab** over buttons, you just use the arrow keys or the QWERTY home row.
### Open a file
One of the reasons you use a file manager is to find a file and then open it. Your desktop already has default applications set, and nnn inherits this knowledge, so press `Return` or `Right` arrow to open a file in its default application.
Should you need to open a file in something other than its default application, press `=` instead, and then type the name of the application in the prompt at the bottom of the nnn interface.
### Copy a file
To copy a file or any number of files, you must first select a file to copy, then navigate to its intended destination, and finally invoke the copy command. Thanks to nnn's context control (those are the numbers at the top of the screen, and you can think of them as tabs in a web browser), this is a quick process.
- First, select the file you want to copy and press **Spacebar** to select the file. It's marked with a plus sign (**`+`**) to indicate its selected state.
- Press **`2`** to change to a new context.
- Navigate to the target directory and press **p** to copy.
### Move a file
Moving files is the same process as copying a file, but the keyboard shortcut for the action is **v**.
### Selecting files
There are a few ways to mark selections in nnn. The first is manual selection. You find a file you want to select, and then press **Spacebar** to mark it as selected. Press **Spacebar** again to deselect it.
One selection doesn't cancel another, so you can select several files manually, but that can become tedious. Another way to select many files at once is to "mark in " and "mark out". To mark a selection, press `m` on the first file you want to select, and then use your arrow keys to move to the last file you want to select. Press `m` again to close the selection:
```
1 2 3 4 ~
+Desktop/
+Documents/
+Downloads/
+Music/
+Pictures/
+Public/
Templates/
Videos/6/8 [ +6 ] 2022-12-01 15:54 drwxr-xr-x 6B
```
Finally, the third way to select files is to press `a` to _select all_. Use **`A`** to invert the selection (in this case, to _select none_.)
### Creating an archive
To create an archive of a file or a selection of files, press `z`. At the bottom of the nnn interface, you're prompted to choose between your current item of your selection. Then you're prompted for a file name. Luckily, nnn is a smart application and derives its file type from the name you provide. If you name your archive `example.tar.xz` then nnn creates a TAR archive with lzma compression, but if you name it `example.zip` then it creates a ZIP file.
You can verify the file type yourself by pressing the `f` key with your new archive selected:
```
File: /home/tux/Downloads/example.zip
  Size: 184707          Blocks: 368        IO Block: 4096   regular file
Device: fd00h/64768d    Inode: 17842380    Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1002/     tux)   Gid: ( 1002/     tux)
Context: unconfined_u:object_r:user_home_t:s0
Access: 2022-09-20 15:12:09.770187616 +1200
Modify: 2022-09-20 15:12:09.775187704 +1200
Change: 2022-09-20 15:12:09.775187704 +1200
 Birth: 2022-09-20 15:12:09.770187616 +1200
Zip archive data, at least v2.0 to extract
application/zip; charset=binary
```
### Cancel an action
When you find yourself backed into a corner and need to press a panic button, use the **`Esc`** key. (This is likely to be the single most confusing keyboard shortcut for a longtime terminal user who's accustomed to **Ctrl+C**.)
### Never close nnn
To quit nnn, press **`Q`** at any time.
It's a very capable file manager, with functions for symlinks, FIFO, bookmarks, batch renaming, and more. For a full list of what nnn can do, press the **`?`** key.
The most clever feature is the shell function. Press **`!`** to open a shell over the nnn interface. You'll forget nnn is there, until you type `exit` and you find yourself back in the nnn interface. It's that easy to leave nnn open all the time, so you can always have quick access to the fastest lightweight file management you're likely to experience.
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/12/linux-file-manager-nnn
作者:[Seth Kenlon][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lkxed
[1]: https://opensource.com/article/19/7/how-make-old-computer-useful-again
[2]: https://www.redhat.com/sysadmin/access-remote-systems-ssh
[3]: https://opensource.com/zombie
[4]: https://opensource.com/sites/default/files/2022-10/nnn.filemanager.png
[5]: https://software.opensuse.org//download.html?project=home%3Astig124%3Annn&package=nnn
[6]: https://github.com/jarun/nnn/releases
[7]: https://opensource.com/article/20/6/homebrew-mac
[8]: https://opensource.com/article/20/11/macports
[9]: https://opensource.com/article/19/3/getting-started-vim

View File

@@ -1,107 +0,0 @@
[#]: subject: "How to Change Login Screen Background in Ubuntu"
[#]: via: "https://www.debugpoint.com/change-login-background-ubuntu/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
如何更改 Ubuntu 的登录屏幕背景
======
**这是让你如何摆脱 Ubuntu 的无趣的登录背景屏幕,并在你每次登录时设置一张极好的图片来欢迎你的指南。**
我总是认为,在你启动你的系统后,一个极好的登录屏幕来欢迎你,是一件美妙的事。这本身就为你即将开始的工作或活动渲染了愉快的氛围。尽管,我不是一名 Windows 的粉丝,但是我很欣赏 Windows 10 的登录背景都会每天随着 Bing 壁纸进行更改,它看起来好极了,不是吗?
前段时间,我们讨论了如何 [更改 Fedora 的登录屏幕背景][1] 和 [更改 elementary OS 的登录屏幕背景][2] 。现在这篇指南将向你解释,如何更改使用 GNOME Shell 的 Ubuntu 的登录屏幕背景。
登录屏幕背景是显示管理器属性的一部分。这篇指南将使用一位用户在 GitHub 中创建的一个脚本,来使普通的用户能够纵享丝滑。否则,在提取 `.gresource` 文件后,你必须手动更改 <ruby>Gnome 显示管理器<rt>Gnome Display Manager</rt></ruby> (gdm) 的 CSS 文件,接下来再编译它 一般来说,这是很复杂的。
![Ubuntu Login screen - before change][3]
Ubuntu 登录屏幕 在更改前
### 更改 Ubuntu 的登录背景
- 打开一个终端 (按下组合键 CTRL+ALT+T)
- 下载 [GitHub repo][4] ,使用下面的命令。
```
wget github.com/thiggy01/change-gdm-background/raw/master/change-gdm-background
```
**注意**: 如果你没有 wget ,使用 `sudo apt install wget` 来安装它
**Ubuntu 22.04 Jammy Jellyfish** 用户需要更改一些额外的代码来使其工作,因为,在 GitHub 中,开发者没有修复它。因此,在这里你需要自己来更改。
使用 gedit 来打开 `change-gdm-background` 文件。接下来,转到下面的行 (#15) 并添加 `|jammy`
![script change to allow jammy][5]
脚本更改为允许 jammy
接下来,转到下面的两行 (#144#184)。将 `gdm3.css` 更改为 `gdm.css` 。如下图所示。
![correct the css file for gdm][6]
修正针对 gdm 的 css 文件
最后,保存文件,并遵循如下的操作指南。这种解决方法只适用于 Ubuntu 22.04 的登录屏幕的更改。
- 更改脚本的权限来使其可执行
```
chmod +x change-gdm-background
```
- 接下来,更改 Ubuntu 的登录背景壁纸,使用下面的命令。按照你的图片相应地更改路径
```
sudo ./change-gdm-background ~/Pictures/tree.jpg
```
这一步骤可能需要 `libglib2.0-dev` 软件包,它将会自动地安装。提取/编译 `.gresource` 会用到它
在安装后,它应该会提示你重新启动 gdm 。慎重起见,按下 N 按键。
- 注销后,你可以看到更改后的 Ubuntu 的背景。
- 如果你没有看到更改,尝试重新启动你的系统,然后尝试登录。
![Ubuntu Login screen After Change][7]
在更改后的Ubuntu 的登录屏幕背景
### 恢复先前的登录屏幕
该脚本也提供了一种恢复先前的登录屏幕的特色功能。它在更改你的 `.gresource` 文件前,会将其进行备份。因此,恢复先前的登录屏幕,只需要在终端中简单地运行下面的命令。
```
sudo ./change-gdm-background --restore
```
这应该会将其登录屏幕更改回其先前的形式。
在下面的评论框中,让我知道这篇指南的内容是否对你有效果,这应该适用于所有的最新版本的 Ubuntu Linux 。
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/change-login-background-ubuntu/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[robsean](https://github.com/robsean)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed
[1]: https://www.debugpoint.com/2021/09/change-login-background-fedora/
[2]: https://www.debugpoint.com/2021/07/change-lock-login-screen-background-elementary-os/
[3]: https://www.debugpoint.com/wp-content/uploads/2021/09/Ubuntu-Login-screen-before-change-1024x539.jpg
[4]: https://github.com/thiggy01/change-gdm-background
[5]: https://www.debugpoint.com/wp-content/uploads/2022/09/script-change-to-allow-jammy.jpg
[6]: https://www.debugpoint.com/wp-content/uploads/2022/09/correct-the-css-file-for-gdm.jpg
[7]: https://www.debugpoint.com/wp-content/uploads/2021/09/Ubuntu-Login-screen-After-Change-1024x538.jpg

View File

@@ -0,0 +1,86 @@
[#]: subject: "Monica: An Open-Source App for Personal Relationship Management"
[#]: via: "https://itsfoss.com/monica/"
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Monica个人关系管理的开源应用
======
你可能已经知道 CRM 代表 **客户关系管理**。 我们已经有了一份帮助小型企业的[开源 CRM 软件][1]列表。
在这里,我将讨论一个有趣的开源 Web 应用,它采用相同的人际关系概念。 听起来很独特,对吧?
Monica 是一款可让你组织和记录你与亲人互动的应用。 **如果你自行托管,它是免费的,如果你需要托管版本那么订阅**
### Monica跟踪社交互动
![contacts][2]
很难记住与家人、朋友或同事互动的每一个细节。
你可以使用[笔记应用][3]或 [CubyText][4] 等知识管理应用来添加一些信息。 但这些并不是为记录你的互动而量身定制的。 因此,你将不得不付出一些努力,以在需要时得心应手的方式添加信息。
使用 Monica添加你的家庭、工作、联系人之间的关系、活动、日记、重要日期的提醒、债务等信息变得更加容易。
可以将其安装在自己的服务器上或选择 **$90/年**的订阅以获得托管版本。
有趣的是,开发人员最初是根据他的个人要求构建它的。
### Monica 的特点
![dashboard][5]
你可以获得大量选项来添加有关你日常生活中的人和互动的信息。 其中一些包括:
- 添加关于一个人的注释
- 列出与联系人相关的重要其他人的姓名(他们的孩子、宠物等)
- 通话记录
- 每个联系人的备用联系方式
- 重要约会和重要事件提醒。 生日会自动设置为提醒。
- 管理礼物信息
- 有用的仪表板,一目了然
- 支持日记条目
Monica 似乎配备了各种功能,使其成为写日记、做笔记、添加联系信息、添加事件等的一体化工具。
不幸的是,没有可用的移动应用。 你可以从 Web 浏览器访问它,但它可能不是每个人的最佳体验。 所以,如果你坚持用智能手机做笔记和其他东西,你可能想看看其他的。
### 自托管或订阅访问
如果你想要 Monica 的托管版本,可以查看它的[定价页面][6]了解更多信息。
对于自托管,你需要前往其 [GitHub 页面][7]并按照说明下载并安装它。 可以选择在 Platform.sh 或 Heroku 上快速部署。
在选择服务器来托管 Monica 之前,请检查最低系统要求。
没有特殊的高级功能,与托管版本的高级订阅相比,你在自行托管时获得相同的东西。
这一切都很方便。 所以,选择对你来说不错的。
前往其[官方网站][8]获取所有详细信息并开始使用。
--------------------------------------------------------------------------------
via: https://itsfoss.com/monica/
作者:[Ankush Das][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/ankush/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/best-open-source-crm/
[2]: https://itsfoss.com/wp-content/uploads/2022/11/contacts.png
[3]: https://itsfoss.com/note-taking-apps-linux/
[4]: https://news.itsfoss.com/cubytext-experimental-project/
[5]: https://itsfoss.com/wp-content/uploads/2022/11/dashboard.png
[6]: https://www.monicahq.com/pricing
[7]: https://github.com/monicahq/monica#get-started
[8]: https://www.zdnet.com/article/microsoft-office-365-banned-in-german-schools-over-privacy-fears/

View File

@@ -0,0 +1,82 @@
[#]: subject: "Why you should try the Nemo file manager on Linux"
[#]: via: "https://opensource.com/article/22/12/linux-file-manager-nemo"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
为什么你要在 Linux 上尝试 Nemo 文件管理器?
======
计算机是奇特的文件柜,里面装满了等待引用、交叉引用、编辑、更新、保存、复制、移动、重命名和组织的虚拟文件夹和文件。在本文中,我将介绍一下 Linux 系统的文件管理器。
[Cinnamon][1] 项目是使用 GNOME 3 的组件重新实现 GNOME 2。最终它的差异足以成为一个真正的分叉今天Cinnamon 桌面使用 GTK3 库和 GNOME 3 关键应用的分叉版本来创建一个“经典”的 GNOME 体验。Nemo 是促成传统 GNOME 体验的组件之一,它是一个基于 GNOME 2 版本的 Nautilus 的文件管理器。
### 在 Linux 上安装 Nemo
Nemo 的源代码[在线提供][2],但它需要 `cinnamon-desktop` 来构建,所以安装 Nemo 最简单的方法是直接安装 Cinnamon。
在 Fedora、Mageia 和类似的系统上:
```
$ sudo dnf install cinnamon-desktop
```
在 Linux Mint、Debian 和类似系统上:
```
$ sudo dnf install cinnamon-desktop-environment
```
当然作为桌面的始祖Linux Mint 也有预装 Cinnamon 的版本。
### 一个熟悉的界面
如果你已经习惯了 GNOME无论是过去的还是现在的那么 Nemo 从一开始就有一种回家的感觉。它有一个熟悉的外观和感觉,在类似的地方有按钮和选项,你很可能会认出它们。
![Image of Nemo's file manager.][3]
将视图控制按钮放在右上方的 GNOME 式惯例被保留了下来,你可以使用这些按钮快速地将你的文件视图从大图标切换到详细列表或紧凑视图。那里还有一个搜索功能,以及在可编辑文本和按钮之间切换位置栏的选项。
可编辑的 URI 栏有时被低估了。这是一个简单的设计决定,但它可以是一个有助于提高效率的巨大功能。这就像在每个窗口的顶部有一个单行终端,你可以在系统的任何地方输入一个目标,并立即被带到那里。而且你甚至不需要输入 `cd`
在右上角,有导航按钮:向上、向前和向后。与许多 Linux 文件管理器一样,你可以用 **Alt** 键加上适当的**箭头**键来放弃使用这些按钮。
侧面窗格显示了重要文件夹的列表(家目录、文档、下载等),可以通过点击窗口底部的一个按钮来隐藏或显示。
### 熟悉但不一样
Nemo的舒适性和熟悉性并不意味着它只是无意识地模仿 Nautilus。Nemo 有一系列不错的功能,感觉很独特。其中大部分都在**偏好设置**中,以下是我最喜欢的几个:
- **窗口标题中的全路径**:是我最喜欢的功能。不要再怀疑你在文件系统中的位置了。让你的窗口标题告诉你。
- **单击或双击**:如果你是一个长期的 [KDE][4] 用户,你可能会发现单次点击打开一个文件是很新鲜的。有了 Nemo你可以这样选择。
- **双击来重命名**:如果你使用单击来打开,为什么不重新利用双击来重命名?
- **在一个新窗口中打开每个文件夹**:操作系统为每一个打开的文件夹打开一个新的窗口。
- **插件**Nemo 有能力调用动作、脚本和扩展。有些已经包括在内,包括改变桌面背景、创建启动器和挂载归档的动作。其他的还没有被创建,但这种可扩展性对开源是至关重要的。
### 一切近在咫尺
在 Linux Mint 上使用 Nemo 几周后,一个有趣的特征让我眼前一亮。似乎 Nemo 拥有,或者通过快速配置可以拥有,我最常使用的所有东西都近在咫尺。许多功能,我承认,我不知道我需要或想要,直到 Nemo 让我轻松点击。你可能会说,我是为了满足 Nemo 的设计而改变了我的使用方式,也许情况确实如此。但是,当这种体验是如此令人愉快和有效时,这有什么关系呢?
Nemo 是一个很好的文件管理器。它让人想起了 GNOME 2 的时代,但其更新和设计选择让人感到新鲜。如果你喜欢 [Thunar][5] 或 Nautilus你会喜欢 Nemo。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/12/linux-file-manager-nemo
作者:[Seth Kenlon][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lkxed
[1]: https://opensource.com/article/19/12/cinnamon-linux-desktop
[2]: https://github.com/linuxmint/nemo/releases
[3]: https://opensource.com/sites/default/files/2022-09/nemo.png
[4]: https://opensource.com/article/22/2/why-i-love-linux-kde
[5]: https://opensource.com/article/22/12/linux-file-manager-thunar

View File

@@ -0,0 +1,146 @@
[#]: subject: "How to Find a Process ID and Kill it in Linux [CLI & GUI]"
[#]: via: "https://www.debugpoint.com/find-process-id-kill-linux/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "yzuowei"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
如何在 Linux 中找到一个进程 ID 并杀死它 [CLI & GUI]
======
**一个简单的教学展示教你如何找到正在运行中的进程 ID 并杀死它,你可以使用终端或着 GUI这个方法适用于各类 Linux 发行版。**
你的 Linux 系统中运行的应用可能会让你的电脑变慢,特别是你的电脑配置较低的时候。在 Linux (以及所有其他 OS程序或者应用都携带一个特别的 PID (进程 ID可供你简单地分辨它们。
然而,作为初学者,大部分 Linux 用户并不知道如何在 Linux 中寻找运行中的进程并杀死它。在这篇指南中,我们将会解释不同的方法用以杀死 Linux 中的运行进程。这包括了使用终端和 GUI 的方法。
记住,你只应该杀死未响应的进程,或者你发现应用无法被正常关闭 (针对基于 GUI 的应用)。
### 如何在 Linux 中找到进程 id 并杀掉它们
在这一部分中,我们首先应该先学会如何找到运行进程的 PID然后再学习用以杀掉它们的命令
#### 找到正在运行中的进程
你可以使用命令 `top` 来列出所有正在进行中的进程和它们的 PID以及其他细节。程序 top 在所有 Linux 发行版和所有基于 Unix 的系统中都是默认安装了的。
```
top
```
![Top program output][1]
同样地,你可以执行命令 `ps` 附带额外选项来获取某个指定的进程的 PID。例如你可以使用以下命令来获得 `firefox` 的 PID。
```
ps -el | grep -i firefox
```
![Firefox process id using ps command - example][2]
现在你已经找到进程 id 了,让我们看看你该如何杀掉它。
#### 杀死运行中的进程
You can either use the process name or PID to kill the currently running process using the following commands: 
使用以下命令,你可以通过进程的名字或者 PID 来杀掉这个正在运行中的进程:
- **killall:** 通过运行进程的名字来杀死进程
- **[kill][3]:** 通过 PID 来杀死进程
现在,让我们首先使用进程 `killall` 通过 Firefox 这个名字来杀死它的,命令如下:
```
killall -9 firefox
```
- 参数 `-9` 发送了信号 SIGKILL 通知 OS 来终止这个进程。
- 使用以下命令,你也可以列出一些别的信号。
```
kill -l
```
同样地,如果你想要通过进程 ID 来杀死进程,你可以用以下命令:
```
kill -9 <PID>
```
在这个例子中,命令会长这样:
```
kill -9 33665
```
让我们看看在不同发行版中,你该如何使用图形用户界面 (GUI) 来杀死任意进程或应用。
### 通过 GUI 寻找进程 id 并杀掉
现在有很多图形界面程序可以枚列进程。大部分 Linux 发行版的桌面环境中已经携带了它们。我们在这里列举出了一些。
#### GNOME (在 Ubuntu Fedora workstation 中,诸如此类) & 在 Linux Mint 中
在应用菜单中搜索 "system monitor" 并打开它 (译者注:中文桌面环境也可以搜 "system monitor",我在 ubuntu 里试过了)。在进程 (Processes) 标签页下找到你的进程,右击进程名字打开快捷菜单,选择选项“杀死” (Kill)。
![Kill a process in Linux using gnome system monitor][4]
#### KDE Plasma KubuntuFedora-KDE 或任何基于 Plasma 的发行版)
在应用菜单中搜索并启动 "system monitor"。这会打开以下程序。在左边菜单栏点击进程,你因该能看见一列正在运行的程序。你可以右击列表里的进程或应用并选择“杀死”来终止进程。
![System monitor in KDE Plasma][5]
#### Xfce 桌面
Xfce 桌面可以完成这项任务的原生应用是任务管理器 (Task Manager),你可以通过 `应用 (Application) > 系统 (System) > 任务管理器 (Task manager)` 来找到它。右击进程名字然后选择“杀死”来终止应用或进程。
![Xfce task manager to kill a process][6]
#### 如何在其他桌面或发行版上杀死一个进程或程序
如果你找不到任何相似的程序,你可以选择使用终端的方法。或者,你可以使用以下命令来安装 gnome-system-monitor。
**Ubuntu 以及相关发行版**
```
sudo apt install gnome-system-monitor
```
**Fedora 以及其相关的:**
```
sudo dnf install gnome-system-monitor
```
**还有 Arch Linux**
```
sudo pacman -S gnome-system-monitor
```
### 总结一下
这就是你该如何在 Linux 中找到一个运行中的进程 id 并杀死它。我们已经解释了不同的方法:你可以通过名字或者 PID 来杀死进程。我希望这对你有所帮助。
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/find-process-id-kill-linux/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[yzuowei](https://github.com/yzuowei)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed
[1]: https://www.debugpoint.com/wp-content/uploads/2022/12/Top-program-output.jpg
[2]: https://www.debugpoint.com/wp-content/uploads/2022/12/Firefox-process-id-using-ps-command-example.jpg
[3]: https://linux.die.net/man/1/kill
[4]: https://www.debugpoint.com/wp-content/uploads/2022/12/Kill-a-process-in-Linux-using-gnome-system-monitor.jpg
[5]: https://www.debugpoint.com/wp-content/uploads/2022/12/System-monitor-in-KDE-Plasma.jpg
[6]: https://www.debugpoint.com/wp-content/uploads/2022/12/Xfce-task-manager-to-kill-a-process.jpg